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
17,100
cpu_tensor_data_access_subscript_flattened_e8m23_Test::cpu_tensor_data_access_subscript_flattened_e8m23_Test()
magnetron/test/unittests/tensor/data_access.cpp
TEST(cpu_tensor_data_access_subscript, flattened_e8m23) { auto ctx = context{compute_device::cpu}; for_all_shape_perms(lim, 1, [&](std::span<const std::int64_t> shape) { tensor t {ctx, dtype::e8m23, shape}; t.fill_rand_uniform(-1.0f, 1.0f); std::vector<mag_e8m23_t> data {t.to_vector()}; ASSERT_EQ(t.numel(), data.size()); for (std::size_t i {0}; i < data.size(); ++i) { ASSERT_FLOAT_EQ(t(i), data[i]); } }); }
O3
cpp
cpu_tensor_data_access_subscript_flattened_e8m23_Test::cpu_tensor_data_access_subscript_flattened_e8m23_Test(): pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x60c6c movl $0x10, %esi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x106d0 nop
_ZN53cpu_tensor_data_access_subscript_flattened_e8m23_TestD0Ev: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call _ZN7testing4TestD2Ev; testing::Test::~Test() mov esi, 10h; unsigned __int64 mov rdi, rbx; void * add rsp, 8 pop rbx pop rbp jmp __ZdlPvm; operator delete(void *,ulong)
void cpu_tensor_data_access_subscript_flattened_e8m23_Test::~cpu_tensor_data_access_subscript_flattened_e8m23_Test( cpu_tensor_data_access_subscript_flattened_e8m23_Test *this) { testing::Test::~Test(this); operator delete(this, 0x10uLL); }
~cpu_tensor_data_access_subscript_flattened_e8m23_Test: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00160c6c MOV ESI,0x10 MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001106d0
/* cpu_tensor_data_access_subscript_flattened_e8m23_Test::~cpu_tensor_data_access_subscript_flattened_e8m23_Test() */ void __thiscall cpu_tensor_data_access_subscript_flattened_e8m23_Test:: ~cpu_tensor_data_access_subscript_flattened_e8m23_Test (cpu_tensor_data_access_subscript_flattened_e8m23_Test *this) { testing::Test::~Test((Test *)this); operator_delete(this,0x10); return; }
17,101
my_uni_utf16
eloqsql/strings/ctype-ucs2.c
int my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (wc <= 0xFFFF) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (MY_UTF16_SURROGATE(wc)) return MY_CS_ILUNI; *s++= (uchar) (wc >> 8); *s= (uchar) (wc & 0xFF); return 2; } if (wc <= 0x10FFFF) { if (s + 4 > e) return MY_CS_TOOSMALL4; *s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8; *s++= (uchar) (wc >> 10) & 0xFF; *s++= (uchar) ((wc >> 8) & 3) | 0xDC; *s= (uchar) wc & 0xFF; return 4; } return MY_CS_ILUNI; }
O0
c
my_uni_utf16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0xb7a4f movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xb79f8 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xb7b12 movq -0x18(%rbp), %rax andq $0xf800, %rax # imm = 0xF800 cmpq $0xd800, %rax # imm = 0xD800 jne 0xb7a16 movl $0x0, -0x4(%rbp) jmp 0xb7b12 movq -0x18(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x2, -0x4(%rbp) jmp 0xb7b12 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF ja 0xb7b0b movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0xb7a77 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0xb7b12 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) shrq $0x12, %rax movzbl %al, %eax orl $0xd8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0xa, %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0x8, %rax andq $0x3, %rax movzbl %al, %eax orl $0xdc, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x4, -0x4(%rbp) jmp 0xb7b12 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16: 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 cmp [rbp+var_18], 0FFFFh ja short loc_B7A4F mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_B79F8 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_B7B12 loc_B79F8: mov rax, [rbp+var_18] and rax, 0F800h cmp rax, 0D800h jnz short loc_B7A16 mov [rbp+var_4], 0 jmp loc_B7B12 loc_B7A16: mov rax, [rbp+var_18] shr rax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] and rax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 2 jmp loc_B7B12 loc_B7A4F: cmp [rbp+var_18], offset unk_10FFFF ja loc_B7B0B mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_B7A77 mov [rbp+var_4], 0FFFFFF98h jmp loc_B7B12 loc_B7A77: mov rax, [rbp+var_18] sub rax, offset stru_10000 mov [rbp+var_18], rax shr rax, 12h movzx eax, al or eax, 0D8h mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 0Ah movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 8 and rax, 3 movzx eax, al or eax, 0DCh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 4 jmp short loc_B7B12 loc_B7B0B: mov [rbp+var_4], 0 loc_B7B12: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( a2 > 0xFFFF ) { if ( a2 > (unsigned long long)&unk_10FFFF ) { return 0; } else if ( (unsigned long long)(a3 + 4) <= a4 ) { *a3 = ((a2 - (unsigned long long)&stru_10000) >> 18) | 0xD8; a3[1] = (a2 - (unsigned long long)&stru_10000) >> 10; a3[2] = ((unsigned __int16)(a2 - (_QWORD)&stru_10000) >> 8) & 3 | 0xDC; a3[3] = a2 - (_QWORD)&stru_10000; return 4; } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (a2 & 0xF800) == 0xD800 ) { return 0; } else { *a3 = BYTE1(a2); a3[1] = a2; return 2; } } else { return (unsigned int)-102; } }
my_uni_utf16: 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 CMP qword ptr [RBP + -0x18],0xffff JA 0x001b7a4f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001b79f8 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001b7b12 LAB_001b79f8: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xf800 CMP RAX,0xd800 JNZ 0x001b7a16 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001b7b12 LAB_001b7a16: MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x001b7b12 LAB_001b7a4f: CMP qword ptr [RBP + -0x18],0x10ffff JA 0x001b7b0b MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001b7a77 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x001b7b12 LAB_001b7a77: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX SHR RAX,0x12 MOVZX EAX,AL OR EAX,0xd8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 AND RAX,0x3 MOVZX EAX,AL OR EAX,0xdc MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x4 JMP 0x001b7b12 LAB_001b7b0b: MOV dword ptr [RBP + -0x4],0x0 LAB_001b7b12: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4) { int4 local_c; if (param_2 < 0x10000) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_2 & 0xf800) == 0xd800) { local_c = 0; } else { *param_3 = (byte)(param_2 >> 8); param_3[1] = (byte)param_2; local_c = 2; } } else if (param_2 < 0x110000) { if (param_4 < param_3 + 4) { local_c = 0xffffff98; } else { param_2 = param_2 - 0x10000; *param_3 = (byte)(param_2 >> 0x12) | 0xd8; param_3[1] = (byte)(param_2 >> 10); param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc; param_3[3] = (byte)param_2; local_c = 4; } } else { local_c = 0; } return local_c; }
17,102
flux::parser::BinaryExpr::BinaryExpr(std::unique_ptr<flux::parser::Expr, std::default_delete<flux::parser::Expr>>, flux::lexer::Token const&, std::unique_ptr<flux::parser::Expr, std::default_delete<flux::parser::Expr>>, flux::common::SourceRange const&)
kvthweatt[P]FluxLang/src/parser/ast.h
BinaryExpr(std::unique_ptr<Expr> left, const lexer::Token& op, std::unique_ptr<Expr> right, const common::SourceRange& range) : Expr(range), left(std::move(left)), op(op), right(std::move(right)) {}
O1
c
flux::parser::BinaryExpr::BinaryExpr(std::unique_ptr<flux::parser::Expr, std::default_delete<flux::parser::Expr>>, flux::lexer::Token const&, std::unique_ptr<flux::parser::Expr, std::default_delete<flux::parser::Expr>>, flux::common::SourceRange const&): pushq %r14 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdi, %rbx leaq 0x2856f(%rip), %rax # 0x3ac60 movq %rax, (%rdi) movups (%r8), %xmm0 movups 0x10(%r8), %xmm1 movups %xmm0, 0x8(%rdi) movups %xmm1, 0x18(%rdi) leaq 0x27904(%rip), %rax # 0x3a010 movq %rax, (%rdi) movq (%rsi), %rax movq %rax, 0x28(%rdi) movq $0x0, (%rsi) movups (%rdx), %xmm0 movups 0x10(%rdx), %xmm1 movups 0x20(%rdx), %xmm2 movups 0x30(%rdx), %xmm3 movups %xmm3, 0x60(%rdi) movups %xmm2, 0x50(%rdi) movups %xmm1, 0x40(%rdi) movups %xmm0, 0x30(%rdi) addq $0x70, %rdi leaq 0x80(%rbx), %rax movq %rax, 0x70(%rbx) movq 0x40(%rdx), %rsi movq 0x48(%rdx), %rdx addq %rsi, %rdx callq 0x9160 movq (%r14), %rax movq %rax, 0x90(%rbx) movq $0x0, (%r14) addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x12786 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x28(%rbx) movq %r14, %rdi callq 0x6440
_ZN4flux6parser10BinaryExprC2ESt10unique_ptrINS0_4ExprESt14default_deleteIS3_EERKNS_5lexer5TokenES6_RKNS_6common11SourceRangeE: push r14 push rbx push rax mov r14, rcx mov rbx, rdi lea rax, off_3AC60 mov [rdi], rax movups xmm0, xmmword ptr [r8] movups xmm1, xmmword ptr [r8+10h] movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm1 lea rax, off_3A010 mov [rdi], rax mov rax, [rsi] mov [rdi+28h], rax mov qword ptr [rsi], 0 movups xmm0, xmmword ptr [rdx] movups xmm1, xmmword ptr [rdx+10h] movups xmm2, xmmword ptr [rdx+20h] movups xmm3, xmmword ptr [rdx+30h] movups xmmword ptr [rdi+60h], xmm3 movups xmmword ptr [rdi+50h], xmm2 movups xmmword ptr [rdi+40h], xmm1 movups xmmword ptr [rdi+30h], xmm0 add rdi, 70h ; 'p' lea rax, [rbx+80h] mov [rbx+70h], rax mov rsi, [rdx+40h] mov rdx, [rdx+48h] 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] mov [rbx+90h], rax mov qword ptr [r14], 0 add rsp, 8 pop rbx pop r14 retn mov r14, rax mov rdi, [rbx+28h] test rdi, rdi jz short loc_12786 mov rax, [rdi] call qword ptr [rax+8] loc_12786: mov qword ptr [rbx+28h], 0 mov rdi, r14 call __Unwind_Resume
long long flux::parser::BinaryExpr::BinaryExpr(long long a1, _QWORD *a2, __int128 *a3, long long *a4, _OWORD *a5) { __int128 v6; // xmm1 __int128 v7; // xmm0 __int128 v8; // xmm1 __int128 v9; // xmm2 long long result; // rax *(_QWORD *)a1 = &off_3AC60; v6 = a5[1]; *(_OWORD *)(a1 + 8) = *a5; *(_OWORD *)(a1 + 24) = v6; *(_QWORD *)a1 = off_3A010; *(_QWORD *)(a1 + 40) = *a2; *a2 = 0LL; v7 = *a3; v8 = a3[1]; v9 = a3[2]; *(_OWORD *)(a1 + 96) = a3[3]; *(_OWORD *)(a1 + 80) = v9; *(_OWORD *)(a1 + 64) = v8; *(_OWORD *)(a1 + 48) = v7; *(_QWORD *)(a1 + 112) = a1 + 128; std::string::_M_construct<char *>( (_QWORD *)(a1 + 112), *((_BYTE **)a3 + 8), *((_QWORD *)a3 + 8) + *((_QWORD *)a3 + 9)); result = *a4; *(_QWORD *)(a1 + 144) = *a4; *a4 = 0LL; return result; }
BinaryExpr: PUSH R14 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDI LEA RAX,[0x13ac60] MOV qword ptr [RDI],RAX MOVUPS XMM0,xmmword ptr [R8] MOVUPS XMM1,xmmword ptr [R8 + 0x10] MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM1 LEA RAX,[0x13a010] MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x28],RAX MOV qword ptr [RSI],0x0 MOVUPS XMM0,xmmword ptr [RDX] MOVUPS XMM1,xmmword ptr [RDX + 0x10] MOVUPS XMM2,xmmword ptr [RDX + 0x20] MOVUPS XMM3,xmmword ptr [RDX + 0x30] MOVUPS xmmword ptr [RDI + 0x60],XMM3 MOVUPS xmmword ptr [RDI + 0x50],XMM2 MOVUPS xmmword ptr [RDI + 0x40],XMM1 MOVUPS xmmword ptr [RDI + 0x30],XMM0 ADD RDI,0x70 LEA RAX,[RBX + 0x80] MOV qword ptr [RBX + 0x70],RAX MOV RSI,qword ptr [RDX + 0x40] MOV RDX,qword ptr [RDX + 0x48] ADD RDX,RSI LAB_00112756: CALL 0x00109160 LAB_0011275b: MOV RAX,qword ptr [R14] MOV qword ptr [RBX + 0x90],RAX MOV qword ptr [R14],0x0 ADD RSP,0x8 POP RBX POP R14 RET
/* flux::parser::BinaryExpr::BinaryExpr(std::unique_ptr<flux::parser::Expr, std::default_delete<flux::parser::Expr> >, flux::lexer::Token const&, std::unique_ptr<flux::parser::Expr, std::default_delete<flux::parser::Expr> >, flux::common::SourceRange const&) */ void __thiscall flux::parser::BinaryExpr::BinaryExpr (BinaryExpr *this,int8 *param_2,int4 *param_3,int8 *param_4, int8 *param_5) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 uVar12; int4 uVar13; int4 uVar14; int4 uVar15; int8 uVar16; int8 uVar17; int8 uVar18; *(int ***)this = &PTR__Expr_0013ac60; uVar16 = param_5[1]; uVar17 = param_5[2]; uVar18 = param_5[3]; *(int8 *)(this + 8) = *param_5; *(int8 *)(this + 0x10) = uVar16; *(int8 *)(this + 0x18) = uVar17; *(int8 *)(this + 0x20) = uVar18; *(int ***)this = &PTR__BinaryExpr_0013a010; *(int8 *)(this + 0x28) = *param_2; *param_2 = 0; uVar1 = *param_3; uVar2 = param_3[1]; uVar3 = param_3[2]; uVar4 = param_3[3]; uVar5 = param_3[4]; uVar6 = param_3[5]; uVar7 = param_3[6]; uVar8 = param_3[7]; uVar9 = param_3[8]; uVar10 = param_3[9]; uVar11 = param_3[10]; uVar12 = param_3[0xb]; uVar13 = param_3[0xd]; uVar14 = param_3[0xe]; uVar15 = param_3[0xf]; *(int4 *)(this + 0x60) = param_3[0xc]; *(int4 *)(this + 100) = uVar13; *(int4 *)(this + 0x68) = uVar14; *(int4 *)(this + 0x6c) = uVar15; *(int4 *)(this + 0x50) = uVar9; *(int4 *)(this + 0x54) = uVar10; *(int4 *)(this + 0x58) = uVar11; *(int4 *)(this + 0x5c) = uVar12; *(int4 *)(this + 0x40) = uVar5; *(int4 *)(this + 0x44) = uVar6; *(int4 *)(this + 0x48) = uVar7; *(int4 *)(this + 0x4c) = uVar8; *(int4 *)(this + 0x30) = uVar1; *(int4 *)(this + 0x34) = uVar2; *(int4 *)(this + 0x38) = uVar3; *(int4 *)(this + 0x3c) = uVar4; *(BinaryExpr **)(this + 0x70) = this + 0x80; /* try { // try from 00112756 to 0011275a has its CatchHandler @ 00112774 */ std::__cxx11::string::_M_construct<char*> (this + 0x70,*(long *)(param_3 + 0x10), *(long *)(param_3 + 0x12) + *(long *)(param_3 + 0x10)); *(int8 *)(this + 0x90) = *param_4; *param_4 = 0; return; }
17,103
c4_get_validators
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
INTERNAL const c4_status_t c4_get_validators(verify_ctx_t* ctx, uint32_t period, c4_sync_state_t* target_state) { c4_sync_state_t sync_state = get_validators_from_cache(ctx, period); if (sync_state.validators.data == NULL) { if (sync_state.last_period == 0) { // there is nothing we can start syncing from TRY_ASYNC(init_sync_state(ctx)); return c4_get_validators(ctx, period, target_state); } else { bytes_t client_update = {0}; if (req_client_update(&ctx->state, sync_state.last_period, sync_state.current_period - sync_state.last_period, ctx->chain_id, &client_update)) { if (!c4_handle_client_updates(ctx, client_update, NULL)) return c4_state_get_pending_request(&ctx->state) ? C4_PENDING : c4_state_add_error(&ctx->state, "Failed to handle client updates"); } else return C4_PENDING; } sync_state = get_validators_from_cache(ctx, period); if (sync_state.validators.data == NULL) return c4_state_add_error(&ctx->state, "Failed to get validators"); } *target_state = sync_state; return C4_SUCCESS; }
O3
c
c4_get_validators: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x188, %rsp # imm = 0x188 movq %rdx, %rbx movl %esi, %ebp movq %rdi, %r14 leaq 0xb0(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi movl %ebp, %edx callq 0x29148 cmpq $0x0, 0x10(%r15) je 0x28d58 movups 0xb0(%rsp), %xmm0 movups 0xc0(%rsp), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) xorl %r12d, %r12d movl %r12d, %eax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0xb0(%rsp), %esi testl %esi, %esi je 0x28dfe xorps %xmm0, %xmm0 leaq 0xf0(%rsp), %r8 movaps %xmm0, (%r8) leaq 0x70(%r14), %r15 movl 0xb4(%rsp), %edx subl %esi, %edx movl 0x80(%r14), %ecx movq %r15, %rdi callq 0x292ce movl $0x2, %r12d testb %al, %al je 0x28d43 movl 0xf0(%rsp), %esi movq 0xf8(%rsp), %rdx movq %r14, %rdi xorl %ecx, %ecx callq 0x287bc testb %al, %al je 0x28eb3 leaq 0xb0(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi movl %ebp, %edx callq 0x29148 cmpq $0x0, 0x10(%r12) jne 0x28d29 leaq 0x57740(%rip), %rsi # 0x80525 movq %r15, %rdi addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x56981 movl 0x80(%r14), %edi callq 0x288e0 movq %rax, %r12 leaq 0x70(%r14), %r15 xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movq $0x0, 0x30(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) testl %edx, %edx je 0x28ed8 movl %edx, %eax movq %rax, %rcx shlq $0x4, %rcx leaq (%rcx,%rcx,2), %rcx xorl %edx, %edx xorl %esi, %esi cmpq $0x1, (%r12,%rdx) adcl $0x0, %esi addq $0x30, %rdx cmpq %rdx, %rcx jne 0x28e55 testl %esi, %esi je 0x2908c movl $0x0, 0x78(%rsp) leaq 0xf0(%rsp), %rdx movq %rdx, 0x80(%rsp) movl $0xffffff9c, 0x88(%rsp) # imm = 0xFFFFFF9C movq %r12, %r13 addq $0x8, %r13 xorl %ecx, %ecx cmpq $0x0, -0x8(%r13) je 0x28fa1 addq $0x30, %r13 decq %rax jne 0x28e9a jmp 0x28fe5 movq %r15, %rdi callq 0x56962 testq %rax, %rax jne 0x28d43 leaq 0x5763a(%rip), %rsi # 0x80505 movq %r15, %rdi callq 0x56981 jmp 0x29140 movaps %xmm0, 0xd0(%rsp) movq $0x0, 0xe0(%rsp) movl 0x80(%r14), %esi movq 0xe0(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0xd0(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x20(%rsp), %rdx movq %r15, %rdi callq 0x2938b testb %al, %al je 0x2908c movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x56938(%rip), %rsi # 0x7f873 leaq 0x170(%rsp), %r13 movq %r13, %rdi callq 0x556e5 movq 0x10(%r13), %rax movq %rax, 0x10(%rsp) movups (%r13), %xmm0 movups %xmm0, (%rsp) callq 0x559b9 movq %rax, %r13 shrq $0xd, %r13 leal -0x1(%r13), %esi movl 0x80(%r14), %ecx leaq 0x40(%rsp), %r8 movq %r15, %rdi movl $0x1, %edx callq 0x292ce addl $-0x15, %r13d movl 0x80(%r14), %ecx leaq 0x50(%rsp), %r8 movq %r15, %rdi movl %r13d, %esi jmp 0x2907d leaq 0x57596(%rip), %rsi # 0x8053e leaq 0x78(%rsp), %rdi movl $0x20, %edx movq %r13, %rcx xorl %eax, %eax callq 0x51734 leaq 0xf0(%rsp), %rdx movups (%r13), %xmm0 movups 0x10(%r13), %xmm1 movaps %xmm0, 0x90(%rsp) movaps %xmm1, 0xa0(%rsp) leaq 0x78(%rsp), %rax movl (%rax), %ecx movq %rdx, 0x60(%rsp) movq %rcx, 0x68(%rsp) movl $0x1, 0x70(%rsp) movl 0x80(%r14), %esi movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x20(%rsp), %rdx movq %r15, %rdi callq 0x2938b testb %al, %al je 0x2908c movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x56837(%rip), %rsi # 0x7f873 movq %r15, %r13 leaq 0x158(%rsp), %r15 movq %r15, %rdi callq 0x556e5 movq 0x10(%r15), %rax movq %rax, 0x10(%rsp) movups (%r15), %xmm0 movq %r13, %r15 movups %xmm0, (%rsp) callq 0x559b9 shrq $0xd, %rax movl 0x80(%r14), %ecx leaq 0x40(%rsp), %r8 movq %r13, %rdi movl %eax, %esi movl $0x1, %edx callq 0x292ce movl %eax, %r13d jmp 0x2908f xorl %r13d, %r13d movq %r12, %rdi callq 0x50f4c movl 0x40(%rsp), %esi testl %esi, %esi setne %al andb %r13b, %al cmpb $0x1, %al jne 0x290d0 movq 0x48(%rsp), %rdx leaq 0x90(%rsp), %rcx movq %r14, %rdi callq 0x287bc testb %al, %al jne 0x290d0 leaq 0x5743e(%rip), %rdi # 0x80505 callq 0x213d0 movq %rax, 0x78(%r14) movl 0x50(%rsp), %esi testl %esi, %esi setne %al andb %al, %r13b cmpb $0x1, %r13b jne 0x2910b movq 0x58(%rsp), %rdx leaq 0x90(%rsp), %rcx movq %r14, %rdi callq 0x287bc testb %al, %al jne 0x2910b leaq 0x57403(%rip), %rdi # 0x80505 callq 0x213d0 movq %rax, 0x78(%r14) movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpq $0x0, 0x78(%r14) jne 0x28d43 movq %r15, %rdi callq 0x56962 movl $0x2, %r12d testq %rax, %rax jne 0x28d43 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx callq 0x28cf4 movl %eax, %r12d jmp 0x28d43
c4_get_validators: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 188h mov rbx, rdx mov ebp, esi mov r14, rdi lea r15, [rsp+1B8h+var_108] mov rdi, r15 mov rsi, r14 mov edx, ebp call get_validators_from_cache cmp qword ptr [r15+10h], 0 jz short loc_28D58 loc_28D29: movups xmm0, [rsp+1B8h+var_108] movups xmm1, [rsp+1B8h+var_F8] movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 xor r12d, r12d loc_28D43: mov eax, r12d add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_28D58: mov esi, dword ptr [rsp+1B8h+var_108] test esi, esi jz loc_28DFE xorps xmm0, xmm0 lea r8, [rsp+1B8h+var_C8] movaps xmmword ptr [r8], xmm0 lea r15, [r14+70h] mov edx, dword ptr [rsp+1B8h+var_108+4] sub edx, esi mov ecx, [r14+80h] mov rdi, r15 call req_client_update mov r12d, 2 test al, al jz short loc_28D43 mov esi, [rsp+1B8h+var_C8] mov rdx, [rsp+1B8h+var_C0] mov rdi, r14 xor ecx, ecx call c4_handle_client_updates test al, al jz loc_28EB3 lea r12, [rsp+1B8h+var_108] mov rdi, r12 mov rsi, r14 mov edx, ebp call get_validators_from_cache cmp qword ptr [r12+10h], 0 jnz loc_28D29 lea rsi, aFailedToGetVal; "Failed to get validators" mov rdi, r15 add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp c4_state_add_error loc_28DFE: mov edi, [r14+80h] call c4_get_chain_state mov r12, rax lea r15, [r14+70h] xorps xmm0, xmm0 movaps [rsp+1B8h+var_198], xmm0 mov [rsp+1B8h+var_188], 0 movaps [rsp+1B8h+var_178], xmm0 movaps [rsp+1B8h+var_168], xmm0 movaps [rsp+1B8h+var_118], xmm0 movaps [rsp+1B8h+var_128], xmm0 test edx, edx jz loc_28ED8 mov eax, edx mov rcx, rax shl rcx, 4 lea rcx, [rcx+rcx*2] xor edx, edx xor esi, esi loc_28E55: cmp qword ptr [r12+rdx], 1 adc esi, 0 add rdx, 30h ; '0' cmp rcx, rdx jnz short loc_28E55 test esi, esi jz loc_2908C mov [rsp+1B8h+var_140], 0 lea rdx, [rsp+1B8h+var_C8] mov [rsp+1B8h+var_138], rdx mov [rsp+1B8h+var_130], 0FFFFFF9Ch mov r13, r12 add r13, 8 xor ecx, ecx loc_28E9A: cmp qword ptr [r13-8], 0 jz loc_28FA1 add r13, 30h ; '0' dec rax jnz short loc_28E9A jmp loc_28FE5 loc_28EB3: mov rdi, r15 call c4_state_get_pending_request test rax, rax jnz loc_28D43 lea rsi, aFailedToHandle; "Failed to handle client updates" mov rdi, r15 call c4_state_add_error jmp loc_29140 loc_28ED8: movaps [rsp+1B8h+var_E8], xmm0 mov [rsp+1B8h+var_D8], 0 mov esi, [r14+80h] mov rax, [rsp+1B8h+var_D8] mov [rsp+1B8h+var_1A8], rax movaps xmm0, [rsp+1B8h+var_E8] movups [rsp+1B8h+var_1B8], xmm0 lea rdx, [rsp+1B8h+var_198] mov rdi, r15 call req_header test al, al jz loc_2908C mov rax, [rsp+1B8h+var_188] mov [rsp+1B8h+var_1A8], rax movaps xmm0, [rsp+1B8h+var_198] movups [rsp+1B8h+var_1B8], xmm0 lea rsi, aSlot; "slot" lea r13, [rsp+1B8h+var_48] mov rdi, r13 call json_get mov rax, [r13+10h] mov [rsp+1B8h+var_1A8], rax movups xmm0, xmmword ptr [r13+0] movups [rsp+1B8h+var_1B8], xmm0 call json_as_uint64 mov r13, rax shr r13, 0Dh lea esi, [r13-1] mov ecx, [r14+80h] lea r8, [rsp+1B8h+var_178] mov rdi, r15 mov edx, 1 call req_client_update add r13d, 0FFFFFFEBh mov ecx, [r14+80h] lea r8, [rsp+1B8h+var_168] mov rdi, r15 mov esi, r13d jmp loc_2907D loc_28FA1: lea rsi, a0xX; "\"0x%x\"" lea rdi, [rsp+1B8h+var_140] mov edx, 20h ; ' ' mov rcx, r13 xor eax, eax call bprintf lea rdx, [rsp+1B8h+var_C8] movups xmm0, xmmword ptr [r13+0] movups xmm1, xmmword ptr [r13+10h] movaps [rsp+1B8h+var_128], xmm0 movaps [rsp+1B8h+var_118], xmm1 lea rax, [rsp+1B8h+var_140] mov ecx, [rax] loc_28FE5: mov qword ptr [rsp+1B8h+var_158], rdx mov qword ptr [rsp+1B8h+var_158+8], rcx mov dword ptr [rsp+1B8h+var_148], 1 mov esi, [r14+80h] mov rax, [rsp+1B8h+var_148] mov [rsp+1B8h+var_1A8], rax movups xmm0, [rsp+1B8h+var_158] movups [rsp+1B8h+var_1B8], xmm0 lea rdx, [rsp+1B8h+var_198] mov rdi, r15 call req_header test al, al jz short loc_2908C mov rax, [rsp+1B8h+var_188] mov [rsp+1B8h+var_1A8], rax movaps xmm0, [rsp+1B8h+var_198] movups [rsp+1B8h+var_1B8], xmm0 lea rsi, aSlot; "slot" mov r13, r15 lea r15, [rsp+1B8h+var_60] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+1B8h+var_1A8], rax movups xmm0, xmmword ptr [r15] mov r15, r13 movups [rsp+1B8h+var_1B8], xmm0 call json_as_uint64 shr rax, 0Dh mov ecx, [r14+80h] lea r8, [rsp+1B8h+var_178] mov rdi, r13 mov esi, eax loc_2907D: mov edx, 1 call req_client_update mov r13d, eax jmp short loc_2908F loc_2908C: xor r13d, r13d loc_2908F: mov rdi, r12 call safe_free mov esi, dword ptr [rsp+1B8h+var_178] test esi, esi setnz al and al, r13b cmp al, 1 jnz short loc_290D0 mov rdx, qword ptr [rsp+1B8h+var_178+8] lea rcx, [rsp+1B8h+var_128] mov rdi, r14 call c4_handle_client_updates test al, al jnz short loc_290D0 lea rdi, aFailedToHandle; "Failed to handle client updates" call _strdup mov [r14+78h], rax loc_290D0: mov esi, dword ptr [rsp+1B8h+var_168] test esi, esi setnz al and r13b, al cmp r13b, 1 jnz short loc_2910B mov rdx, qword ptr [rsp+1B8h+var_168+8] lea rcx, [rsp+1B8h+var_128] mov rdi, r14 call c4_handle_client_updates test al, al jnz short loc_2910B lea rdi, aFailedToHandle; "Failed to handle client updates" call _strdup mov [r14+78h], rax loc_2910B: mov r12d, 0FFFFFFFFh cmp qword ptr [r14+78h], 0 jnz loc_28D43 mov rdi, r15 call c4_state_get_pending_request mov r12d, 2 test rax, rax jnz loc_28D43 mov rdi, r14 mov esi, ebp mov rdx, rbx call c4_get_validators loc_29140: mov r12d, eax jmp loc_28D43
long long c4_get_validators(long long a1, unsigned int a2, _OWORD *a3) { __int128 v6; // xmm0 unsigned int v7; // r12d unsigned int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d long long chain_state; // r12 long long v14; // r15 long long v15; // rax long long v16; // rcx long long v17; // rdx int v18; // esi long long v19; // r13 unsigned long long v20; // rcx int v22; // edx int v23; // ecx int v24; // r8d int v25; // r9d int v26; // edx int v27; // ecx int v28; // r8d int v29; // r9d unsigned long long v30; // r13 long long v31; // rcx __int128 *v32; // r8 long long v33; // rdi long long v34; // rsi __int128 v35; // xmm1 int v36; // edx int v37; // ecx int v38; // r8d int v39; // r9d int v40; // edx int v41; // ecx int v42; // r8d int v43; // r9d unsigned long long v44; // rax unsigned __int8 v45; // r13 __int128 v46; // [rsp+20h] [rbp-198h] BYREF long long v47; // [rsp+30h] [rbp-188h] __int128 v48; // [rsp+40h] [rbp-178h] BYREF _OWORD v49[2]; // [rsp+50h] [rbp-168h] BYREF long long v50; // [rsp+70h] [rbp-148h] unsigned int v51; // [rsp+78h] [rbp-140h] BYREF _OWORD *v52; // [rsp+80h] [rbp-138h] int v53; // [rsp+88h] [rbp-130h] __m128i v54; // [rsp+90h] [rbp-128h] BYREF __int128 v55; // [rsp+A0h] [rbp-118h] __int128 v56; // [rsp+B0h] [rbp-108h] BYREF __int128 v57; // [rsp+C0h] [rbp-F8h] __int128 v58; // [rsp+D0h] [rbp-E8h] long long v59; // [rsp+E0h] [rbp-D8h] _OWORD v60[6]; // [rsp+F0h] [rbp-C8h] BYREF _QWORD v61[3]; // [rsp+158h] [rbp-60h] BYREF _QWORD v62[9]; // [rsp+170h] [rbp-48h] BYREF get_validators_from_cache(&v56, a1, a2); if ( (_QWORD)v57 ) goto LABEL_2; if ( !(_DWORD)v56 ) { chain_state = c4_get_chain_state(*(_DWORD *)(a1 + 128)); v14 = a1 + 112; v46 = 0LL; v47 = 0LL; v48 = 0LL; v49[0] = 0LL; v55 = 0LL; v54 = 0LL; if ( v9 ) { v15 = v9; v16 = 48LL * v9; v17 = 0LL; v18 = 0; do { v18 += *(_QWORD *)(chain_state + v17) == 0LL; v17 += 48LL; } while ( v16 != v17 ); if ( v18 ) { v51 = 0; v52 = v60; v53 = -100; v19 = chain_state + 8; v20 = 0LL; while ( *(_QWORD *)(v19 - 8) ) { v19 += 48LL; if ( !--v15 ) goto LABEL_22; } bprintf((unsigned int)&v51, (unsigned int)"\"0x%x\"", 32, v19, v11, v12); v35 = *(_OWORD *)(v19 + 16); v54 = *(__m128i *)v19; v55 = v35; v20 = v51; LABEL_22: v49[1] = __PAIR128__(v20, v60); LODWORD(v50) = 1; if ( (unsigned __int8)req_header( (int)a1 + 112, *(_DWORD *)(a1 + 128), (unsigned int)&v46, v20, v11, v12, (char)v60, v20, 1) ) { json_get((unsigned int)v61, (unsigned int)"slot", v36, v37, v38, v39, v46, v47); v14 = a1 + 112; v44 = json_as_uint64((unsigned int)v61, (unsigned int)"slot", v40, v41, v42, v43, v61[0], v61[1], v61[2]); v31 = *(unsigned int *)(a1 + 128); v32 = &v48; v33 = a1 + 112; v34 = (unsigned int)(v44 >> 13); goto LABEL_24; } } } else { v58 = 0LL; v59 = 0LL; if ( (unsigned __int8)req_header((int)a1 + 112, *(_DWORD *)(a1 + 128), (unsigned int)&v46, v10, v11, v12, 0, 0, 0) ) { json_get((unsigned int)v62, (unsigned int)"slot", v22, v23, v24, v25, v46, v47); v30 = (unsigned long long)json_as_uint64( (unsigned int)v62, (unsigned int)"slot", v26, v27, v28, v29, v62[0], v62[1], v62[2]) >> 13; req_client_update(a1 + 112, (unsigned int)(v30 - 1), 1LL, *(unsigned int *)(a1 + 128), &v48); v31 = *(unsigned int *)(a1 + 128); v32 = v49; v33 = a1 + 112; v34 = (unsigned int)(v30 - 21); LABEL_24: v45 = req_client_update(v33, v34, 1LL, v31, v32); goto LABEL_26; } } v45 = 0; LABEL_26: safe_free(chain_state); if ( (v45 & ((_DWORD)v48 != 0)) == 1 && !(unsigned __int8)c4_handle_client_updates(a1, v48, *((_BYTE **)&v48 + 1), &v54) ) { *(_QWORD *)(a1 + 120) = strdup("Failed to handle client updates"); } if ( ((LODWORD(v49[0]) != 0) & v45) == 1 && !(unsigned __int8)c4_handle_client_updates(a1, v49[0], *((_BYTE **)&v49[0] + 1), &v54) ) { *(_QWORD *)(a1 + 120) = strdup("Failed to handle client updates"); } v7 = -1; if ( *(_QWORD *)(a1 + 120) ) return v7; v7 = 2; if ( c4_state_get_pending_request(v14) ) return v7; return (unsigned int)c4_get_validators(a1, a2, a3); } v60[0] = 0LL; v7 = 2; if ( !(unsigned __int8)req_client_update( a1 + 112, (unsigned int)v56, (unsigned int)(DWORD1(v56) - v56), *(unsigned int *)(a1 + 128), v60) ) return v7; if ( !(unsigned __int8)c4_handle_client_updates(a1, v60[0], *((_BYTE **)&v60[0] + 1), 0LL) ) { if ( c4_state_get_pending_request(a1 + 112) ) return v7; return (unsigned int)c4_state_add_error(a1 + 112, "Failed to handle client updates"); } get_validators_from_cache(&v56, a1, a2); if ( (_QWORD)v57 ) { LABEL_2: v6 = v56; a3[1] = v57; *a3 = v6; return 0; } return c4_state_add_error(a1 + 112, "Failed to get validators"); }
c4_get_validators: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x188 MOV RBX,RDX MOV EBP,ESI MOV R14,RDI LEA R15,[RSP + 0xb0] MOV RDI,R15 MOV RSI,R14 MOV EDX,EBP CALL 0x00129148 CMP qword ptr [R15 + 0x10],0x0 JZ 0x00128d58 LAB_00128d29: MOVUPS XMM0,xmmword ptr [RSP + 0xb0] MOVUPS XMM1,xmmword ptr [RSP + 0xc0] MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 XOR R12D,R12D LAB_00128d43: MOV EAX,R12D ADD RSP,0x188 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00128d58: MOV ESI,dword ptr [RSP + 0xb0] TEST ESI,ESI JZ 0x00128dfe XORPS XMM0,XMM0 LEA R8,[RSP + 0xf0] MOVAPS xmmword ptr [R8],XMM0 LEA R15,[R14 + 0x70] MOV EDX,dword ptr [RSP + 0xb4] SUB EDX,ESI MOV ECX,dword ptr [R14 + 0x80] MOV RDI,R15 CALL 0x001292ce MOV R12D,0x2 TEST AL,AL JZ 0x00128d43 MOV ESI,dword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] MOV RDI,R14 XOR ECX,ECX CALL 0x001287bc TEST AL,AL JZ 0x00128eb3 LEA R12,[RSP + 0xb0] MOV RDI,R12 MOV RSI,R14 MOV EDX,EBP CALL 0x00129148 CMP qword ptr [R12 + 0x10],0x0 JNZ 0x00128d29 LEA RSI,[0x180525] MOV RDI,R15 ADD RSP,0x188 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00156981 LAB_00128dfe: MOV EDI,dword ptr [R14 + 0x80] CALL 0x001288e0 MOV R12,RAX LEA R15,[R14 + 0x70] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x30],0x0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVAPS xmmword ptr [RSP + 0x90],XMM0 TEST EDX,EDX JZ 0x00128ed8 MOV EAX,EDX MOV RCX,RAX SHL RCX,0x4 LEA RCX,[RCX + RCX*0x2] XOR EDX,EDX XOR ESI,ESI LAB_00128e55: CMP qword ptr [R12 + RDX*0x1],0x1 ADC ESI,0x0 ADD RDX,0x30 CMP RCX,RDX JNZ 0x00128e55 TEST ESI,ESI JZ 0x0012908c MOV dword ptr [RSP + 0x78],0x0 LEA RDX,[RSP + 0xf0] MOV qword ptr [RSP + 0x80],RDX MOV dword ptr [RSP + 0x88],0xffffff9c MOV R13,R12 ADD R13,0x8 XOR ECX,ECX LAB_00128e9a: CMP qword ptr [R13 + -0x8],0x0 JZ 0x00128fa1 ADD R13,0x30 DEC RAX JNZ 0x00128e9a JMP 0x00128fe5 LAB_00128eb3: MOV RDI,R15 CALL 0x00156962 TEST RAX,RAX JNZ 0x00128d43 LEA RSI,[0x180505] MOV RDI,R15 CALL 0x00156981 JMP 0x00129140 LAB_00128ed8: MOVAPS xmmword ptr [RSP + 0xd0],XMM0 MOV qword ptr [RSP + 0xe0],0x0 MOV ESI,dword ptr [R14 + 0x80] MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0xd0] MOVUPS xmmword ptr [RSP],XMM0 LEA RDX,[RSP + 0x20] MOV RDI,R15 CALL 0x0012938b TEST AL,AL JZ 0x0012908c MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x17f873] LEA R13,[RSP + 0x170] MOV RDI,R13 CALL 0x001556e5 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001559b9 MOV R13,RAX SHR R13,0xd LEA ESI,[R13 + -0x1] MOV ECX,dword ptr [R14 + 0x80] LEA R8,[RSP + 0x40] MOV RDI,R15 MOV EDX,0x1 CALL 0x001292ce ADD R13D,-0x15 MOV ECX,dword ptr [R14 + 0x80] LEA R8,[RSP + 0x50] MOV RDI,R15 MOV ESI,R13D JMP 0x0012907d LAB_00128fa1: LEA RSI,[0x18053e] LEA RDI,[RSP + 0x78] MOV EDX,0x20 MOV RCX,R13 XOR EAX,EAX CALL 0x00151734 LEA RDX,[RSP + 0xf0] MOVUPS XMM0,xmmword ptr [R13] MOVUPS XMM1,xmmword ptr [R13 + 0x10] MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM1 LEA RAX,[RSP + 0x78] MOV ECX,dword ptr [RAX] LAB_00128fe5: MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x68],RCX MOV dword ptr [RSP + 0x70],0x1 MOV ESI,dword ptr [R14 + 0x80] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP],XMM0 LEA RDX,[RSP + 0x20] MOV RDI,R15 CALL 0x0012938b TEST AL,AL JZ 0x0012908c MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x17f873] MOV R13,R15 LEA R15,[RSP + 0x158] MOV RDI,R15 CALL 0x001556e5 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R15] MOV R15,R13 MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001559b9 SHR RAX,0xd MOV ECX,dword ptr [R14 + 0x80] LEA R8,[RSP + 0x40] MOV RDI,R13 MOV ESI,EAX LAB_0012907d: MOV EDX,0x1 CALL 0x001292ce MOV R13D,EAX JMP 0x0012908f LAB_0012908c: XOR R13D,R13D LAB_0012908f: MOV RDI,R12 CALL 0x00150f4c MOV ESI,dword ptr [RSP + 0x40] TEST ESI,ESI SETNZ AL AND AL,R13B CMP AL,0x1 JNZ 0x001290d0 MOV RDX,qword ptr [RSP + 0x48] LEA RCX,[RSP + 0x90] MOV RDI,R14 CALL 0x001287bc TEST AL,AL JNZ 0x001290d0 LEA RDI,[0x180505] CALL 0x001213d0 MOV qword ptr [R14 + 0x78],RAX LAB_001290d0: MOV ESI,dword ptr [RSP + 0x50] TEST ESI,ESI SETNZ AL AND R13B,AL CMP R13B,0x1 JNZ 0x0012910b MOV RDX,qword ptr [RSP + 0x58] LEA RCX,[RSP + 0x90] MOV RDI,R14 CALL 0x001287bc TEST AL,AL JNZ 0x0012910b LEA RDI,[0x180505] CALL 0x001213d0 MOV qword ptr [R14 + 0x78],RAX LAB_0012910b: MOV R12D,0xffffffff CMP qword ptr [R14 + 0x78],0x0 JNZ 0x00128d43 MOV RDI,R15 CALL 0x00156962 MOV R12D,0x2 TEST RAX,RAX JNZ 0x00128d43 MOV RDI,R14 MOV ESI,EBP MOV RDX,RBX CALL 0x00128cf4 LAB_00129140: MOV R12D,EAX JMP 0x00128d43
ulong c4_get_validators(long param_1,int4 param_2,int8 *param_3,int8 param_4, int8 param_5,int8 param_6) { int4 uVar1; char cVar2; byte bVar3; uint uVar4; ulong uVar5; long lVar6; char *pcVar7; long lVar8; long lVar9; int iVar10; ulong *puVar11; int8 *puVar12; int1 auVar13 [12]; int8 local_198; int8 uStack_190; int8 local_188; ulong local_178; int8 uStack_170; ulong local_168; int8 uStack_160; ulong *local_158; ulong uStack_150; int4 local_148; uint local_140 [2]; ulong *local_138; int4 local_130; int8 local_128; int8 uStack_120; int8 local_118; int8 uStack_110; int local_108; int iStack_104; int8 uStack_100; long local_f8; int8 uStack_f0; int8 local_e8; int8 uStack_e0; int8 local_d8; ulong local_c8; int8 uStack_c0; int4 local_60 [2]; int4 uStack_58; int8 local_50; int4 local_48 [2]; int4 uStack_40; int8 local_38; get_validators_from_cache(&local_108,param_1,param_2); if (local_f8 != 0) { LAB_00128d29: param_3[2] = local_f8; param_3[3] = uStack_f0; *param_3 = CONCAT44(iStack_104,local_108); param_3[1] = uStack_100; return 0; } if (local_108 != 0) { local_c8 = 0; uStack_c0 = 0; lVar8 = param_1 + 0x70; cVar2 = req_client_update(lVar8,local_108,iStack_104 - local_108,*(int4 *)(param_1 + 0x80) ); if (cVar2 == '\0') { return 2; } cVar2 = c4_handle_client_updates(param_1,local_c8 & 0xffffffff,uStack_c0,0); if (cVar2 != '\0') { get_validators_from_cache(&local_108,param_1,param_2); if (local_f8 == 0) { uVar5 = c4_state_add_error(lVar8,"Failed to get validators"); return uVar5; } goto LAB_00128d29; } lVar6 = c4_state_get_pending_request(lVar8); if (lVar6 != 0) { return 2; } uVar4 = c4_state_add_error(lVar8,"Failed to handle client updates"); goto LAB_00129140; } auVar13 = c4_get_chain_state(*(int4 *)(param_1 + 0x80)); lVar6 = auVar13._0_8_; lVar8 = param_1 + 0x70; local_198 = 0; uStack_190 = 0; local_188 = 0; local_178 = 0; uStack_170 = 0; local_168 = 0; uStack_160 = 0; local_118 = 0; uStack_110 = 0; local_128 = 0; uStack_120 = 0; if (auVar13._8_4_ == 0) { local_e8 = 0; uStack_e0 = 0; local_d8 = 0; cVar2 = req_header(lVar8,*(int4 *)(param_1 + 0x80),&local_198); if (cVar2 == '\0') goto LAB_0012908c; json_get(local_48,&DAT_0017f873); uVar5 = json_as_uint64(); iVar10 = (int)(uVar5 >> 0xd); req_client_update(lVar8,iVar10 + -1,1,*(int4 *)(param_1 + 0x80),&local_178,param_6, local_48[0],uStack_40,local_38); uVar1 = *(int4 *)(param_1 + 0x80); puVar11 = &local_168; uVar5 = (ulong)(iVar10 - 0x15); local_60[0] = local_48[0]; uStack_58 = uStack_40; local_50 = local_38; LAB_0012907d: bVar3 = req_client_update(lVar8,uVar5,1,uVar1,puVar11,param_6,local_60[0],uStack_58,local_50); } else { uVar5 = (ulong)auVar13._8_4_; lVar9 = 0; iVar10 = 0; do { iVar10 = iVar10 + (uint)(*(long *)(lVar6 + lVar9) == 0); lVar9 = lVar9 + 0x30; } while (uVar5 * 0x30 != lVar9); if (iVar10 != 0) { local_140[0] = 0; local_138 = &local_c8; local_130 = 0xffffff9c; puVar12 = (int8 *)(lVar6 + 8); uStack_150 = 0; do { if (puVar12[-1] == 0) { bprintf(local_140,"\"0x%x\"",0x20,puVar12); local_128 = *puVar12; uStack_120 = puVar12[1]; local_118 = puVar12[2]; uStack_110 = puVar12[3]; uStack_150 = (ulong)local_140[0]; break; } puVar12 = puVar12 + 6; uVar5 = uVar5 - 1; } while (uVar5 != 0); local_158 = &local_c8; local_148 = 1; cVar2 = req_header(lVar8,*(int4 *)(param_1 + 0x80),&local_198); if (cVar2 != '\0') { json_get(local_60,&DAT_0017f873); uVar5 = json_as_uint64(); uVar1 = *(int4 *)(param_1 + 0x80); puVar11 = &local_178; uVar5 = uVar5 >> 0xd & 0xffffffff; goto LAB_0012907d; } } LAB_0012908c: bVar3 = 0; } safe_free(lVar6); if ((((int)local_178 != 0 & bVar3) == 1) && (cVar2 = c4_handle_client_updates(param_1,local_178 & 0xffffffff,uStack_170,&local_128), cVar2 == '\0')) { pcVar7 = strdup("Failed to handle client updates"); *(char **)(param_1 + 0x78) = pcVar7; } if (((bVar3 & (int)local_168 != 0) == 1) && (cVar2 = c4_handle_client_updates(param_1,local_168 & 0xffffffff,uStack_160,&local_128), cVar2 == '\0')) { pcVar7 = strdup("Failed to handle client updates"); *(char **)(param_1 + 0x78) = pcVar7; } if (*(long *)(param_1 + 0x78) != 0) { return 0xffffffff; } lVar8 = c4_state_get_pending_request(lVar8); if (lVar8 != 0) { return 2; } uVar4 = c4_get_validators(param_1,param_2,param_3); LAB_00129140: return (ulong)uVar4; }
17,104
mariadb_get_socket
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static my_socket mariadb_get_socket(MYSQL *mysql) { my_socket sock= INVALID_SOCKET; if (mysql->net.pvio) { ma_pvio_get_handle(mysql->net.pvio, &sock); } /* if an asynchronous connect is in progress, we need to obtain pvio handle from async_context until the connection was successfully established. */ else if (mysql->options.extension && mysql->options.extension->async_context && mysql->options.extension->async_context->pvio) { ma_pvio_get_handle(mysql->options.extension->async_context->pvio, &sock); } return sock; }
O0
c
mariadb_get_socket: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x1f3ff movq -0x8(%rbp), %rax movq (%rax), %rdi leaq -0xc(%rbp), %rsi callq 0x20ea0 jmp 0x1f453 movq -0x8(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x1f451 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x1f451 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax cmpq $0x0, 0x18(%rax) je 0x1f451 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq 0x18(%rax), %rdi leaq -0xc(%rbp), %rsi callq 0x20ea0 jmp 0x1f453 movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopl (%rax)
mariadb_get_socket: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], 0FFFFFFFFh mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_1F3FF mov rax, [rbp+var_8] mov rdi, [rax] lea rsi, [rbp+var_C] call ma_pvio_get_handle jmp short loc_1F453 loc_1F3FF: mov rax, [rbp+var_8] cmp qword ptr [rax+480h], 0 jz short loc_1F451 mov rax, [rbp+var_8] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz short loc_1F451 mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] cmp qword ptr [rax+18h], 0 jz short loc_1F451 mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] mov rdi, [rax+18h] lea rsi, [rbp+var_C] call ma_pvio_get_handle loc_1F451: jmp short $+2 loc_1F453: mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long mariadb_get_socket(_QWORD *a1) { unsigned int v2; // [rsp+4h] [rbp-Ch] BYREF _QWORD *v3; // [rsp+8h] [rbp-8h] v3 = a1; v2 = -1; if ( *a1 ) { ma_pvio_get_handle(*v3, &v2); } else if ( v3[144] && *(_QWORD *)(v3[144] + 40LL) && *(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL) ) { ma_pvio_get_handle(*(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL), &v2); } return v2; }
mariadb_get_socket: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0xffffffff MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0011f3ff MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0xc] CALL 0x00120ea0 JMP 0x0011f453 LAB_0011f3ff: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0011f451 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x0011f451 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0011f451 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RAX + 0x18] LEA RSI,[RBP + -0xc] CALL 0x00120ea0 LAB_0011f451: JMP 0x0011f453 LAB_0011f453: MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 mariadb_get_socket(long *param_1) { int4 local_14; long *local_10; local_14 = 0xffffffff; local_10 = param_1; if (*param_1 == 0) { if (((param_1[0x90] != 0) && (*(long *)(param_1[0x90] + 0x28) != 0)) && (*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x18) != 0)) { ma_pvio_get_handle(*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18),&local_14); } } else { ma_pvio_get_handle(*param_1,&local_14); } return local_14; }
17,105
ma_crypt_data_post_read_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_data_post_read_hook(int res, PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint size= share->block_size; const uchar page_type= args->page[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK; const uint32 key_version_offset= (page_type <= TAIL_PAGE) ? KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET; if (res == 0) { const uchar *src= args->page; uchar* dst= args->crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uint head= (page_type <= TAIL_PAGE) ? PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share); const uint tail= CRC_SIZE; const uint32 key_version= uint4korr(src + key_version_offset); /* 1 - copy head */ memcpy(dst, src, head); /* 2 - decrypt page */ res= ma_decrypt(share, share->crypt_data, src + head, dst + head, size - (head + tail), pageno, lsn, key_version); /* 3 - copy tail */ memcpy(dst + size - tail, src + size - tail, tail); /* 4 clear key version to get correct crc */ int4store(dst + key_version_offset, 0); } if (args->crypt_buf != NULL) { uchar *tmp= args->page; args->page= args->crypt_buf; args->crypt_buf= NULL; my_free(tmp); } return maria_page_crc_check_data(res, args); }
O0
c
ma_crypt_data_post_read_hook: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movzbl 0x7(%rax), %eax andl $0x7, %eax movb %al, -0x1d(%rbp) movzbl -0x1d(%rbp), %edx movl $0x8, %eax movl $0xc, %ecx cmpl $0x2, %edx cmovlel %ecx, %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x4(%rbp) jne 0x5eb86 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax movq -0x30(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x30(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x30(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x48(%rbp) movzbl -0x1d(%rbp), %eax cmpl $0x2, %eax jg 0x5eacf movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0xc, %eax movl %eax, -0x6c(%rbp) jmp 0x5eadf movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0x8, %eax movl %eax, -0x6c(%rbp) movl -0x6c(%rbp), %eax movl %eax, -0x4c(%rbp) movl $0x4, -0x50(%rbp) movq -0x30(%rbp), %rax movl -0x24(%rbp), %ecx movl (%rax,%rcx), %eax movl %eax, -0x54(%rbp) movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x4c(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rax movq 0xc20(%rax), %rsi movq -0x30(%rbp), %rdx movl -0x4c(%rbp), %eax addq %rax, %rdx movq -0x38(%rbp), %rcx movl -0x4c(%rbp), %eax addq %rax, %rcx movl -0x1c(%rbp), %r8d movl -0x4c(%rbp), %eax addl $0x4, %eax subl %eax, %r8d movl -0x3c(%rbp), %r9d movq -0x48(%rbp), %r10 movl -0x54(%rbp), %eax movq %r10, (%rsp) movl %eax, 0x8(%rsp) callq 0x5f360 movl %eax, -0x4(%rbp) movq -0x38(%rbp), %rax movl -0x1c(%rbp), %ecx movq -0x30(%rbp), %rdx movl -0x1c(%rbp), %esi movl -0x4(%rdx,%rsi), %edx movl %edx, -0x4(%rax,%rcx) movq -0x38(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movl $0x0, (%rax) jmp 0x5eb86 movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) je 0x5ebc0 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x68(%rbp), %rdi callq 0xf3bb0 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq 0x5d6a0 addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_crypt_data_post_read_hook: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] movzx eax, byte ptr [rax+7] and eax, 7 mov [rbp+var_1D], al movzx edx, [rbp+var_1D] mov eax, 8 mov ecx, 0Ch cmp edx, 2 cmovle eax, ecx mov [rbp+var_24], eax cmp [rbp+var_4], 0 jnz loc_5EB86 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_3C], eax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_30] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_48], rax movzx eax, [rbp+var_1D] cmp eax, 2 jg short loc_5EACF mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 0Ch mov [rbp+var_6C], eax jmp short loc_5EADF loc_5EACF: mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 8 mov [rbp+var_6C], eax loc_5EADF: mov eax, [rbp+var_6C] mov [rbp+var_4C], eax mov [rbp+var_50], 4 mov rax, [rbp+var_30] mov ecx, [rbp+var_24] mov eax, [rax+rcx] mov [rbp+var_54], eax mov rdi, [rbp+var_38] mov rsi, [rbp+var_30] mov eax, [rbp+var_4C] mov edx, eax call _memcpy mov rdi, [rbp+var_18] mov rax, [rbp+var_18] mov rsi, [rax+0C20h] mov rdx, [rbp+var_30] mov eax, [rbp+var_4C] add rdx, rax mov rcx, [rbp+var_38] mov eax, [rbp+var_4C] add rcx, rax mov r8d, [rbp+var_1C] mov eax, [rbp+var_4C] add eax, 4 sub r8d, eax mov r9d, [rbp+var_3C] mov r10, [rbp+var_48] mov eax, [rbp+var_54] mov [rsp+80h+var_80], r10 mov [rsp+80h+var_78], eax call ma_decrypt mov [rbp+var_4], eax mov rax, [rbp+var_38] mov ecx, [rbp+var_1C] mov rdx, [rbp+var_30] mov esi, [rbp+var_1C] mov edx, [rdx+rsi-4] mov [rax+rcx-4], edx mov rax, [rbp+var_38] mov ecx, [rbp+var_24] add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_60] mov dword ptr [rax], 0 jmp short $+2 loc_5EB86: mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jz short loc_5EBC0 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rdi, [rbp+var_68] call my_free loc_5EBC0: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call maria_page_crc_check_data add rsp, 80h pop rbp retn
bool ma_crypt_data_post_read_hook(int a1, _QWORD *a2) { int v2; // eax unsigned int v3; // eax long long v5; // [rsp+18h] [rbp-68h] int v6; // [rsp+2Ch] [rbp-54h] unsigned int v7; // [rsp+34h] [rbp-4Ch] unsigned long long v8; // [rsp+38h] [rbp-48h] int v9; // [rsp+44h] [rbp-3Ch] long long v10; // [rsp+48h] [rbp-38h] unsigned __int16 *v11; // [rsp+50h] [rbp-30h] unsigned int v12; // [rsp+5Ch] [rbp-24h] unsigned __int8 v13; // [rsp+63h] [rbp-1Dh] unsigned int v14; // [rsp+64h] [rbp-1Ch] long long v15; // [rsp+68h] [rbp-18h] int v16; // [rsp+7Ch] [rbp-4h] v16 = a1; v15 = a2[2]; v14 = *(_DWORD *)(v15 + 1980); v13 = *(_BYTE *)(*a2 + 7LL) & 7; v2 = 8; if ( v13 <= 2u ) v2 = 12; v12 = v2; if ( !a1 ) { v11 = (unsigned __int16 *)*a2; v10 = a2[3]; v9 = a2[1]; v8 = *(unsigned int *)((char *)v11 + 3) | ((unsigned long long)((*((unsigned __int8 *)v11 + 2) << 16) | (unsigned int)*v11) << 32); if ( v13 > 2u ) v3 = *(_DWORD *)(v15 + 3096) + 8; else v3 = *(_DWORD *)(v15 + 3096) + 12; v7 = v3; v6 = *(_DWORD *)((char *)v11 + v12); memcpy(v10, v11, v3); v16 = ma_decrypt( v15, *(_QWORD *)(v15 + 3104), v7 + (unsigned int)v11, v7 + (unsigned int)v10, v14 - (v7 + 4), v9, v8, v6); *(_DWORD *)(v10 + v14 - 4) = *(_DWORD *)((char *)v11 + v14 - 4); *(_DWORD *)(v12 + v10) = 0; } if ( a2[3] ) { v5 = *a2; *a2 = a2[3]; a2[3] = 0LL; my_free(v5); } return maria_page_crc_check_data(v16, (long long)a2); }
ma_crypt_data_post_read_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX + 0x7] AND EAX,0x7 MOV byte ptr [RBP + -0x1d],AL MOVZX EDX,byte ptr [RBP + -0x1d] MOV EAX,0x8 MOV ECX,0xc CMP EDX,0x2 CMOVLE EAX,ECX MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x4],0x0 JNZ 0x0015eb86 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOVZX EAX,byte ptr [RBP + -0x1d] CMP EAX,0x2 JG 0x0015eacf MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0xc MOV dword ptr [RBP + -0x6c],EAX JMP 0x0015eadf LAB_0015eacf: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0x8 MOV dword ptr [RBP + -0x6c],EAX LAB_0015eadf: MOV EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x4c],EAX MOV dword ptr [RBP + -0x50],0x4 MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x24] MOV EAX,dword ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x54],EAX MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x4c] MOV EDX,EAX CALL 0x0012a090 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0xc20] MOV RDX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x4c] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x4c] ADD RCX,RAX MOV R8D,dword ptr [RBP + -0x1c] MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,0x4 SUB R8D,EAX MOV R9D,dword ptr [RBP + -0x3c] MOV R10,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0x54] MOV qword ptr [RSP],R10 MOV dword ptr [RSP + 0x8],EAX CALL 0x0015f360 MOV dword ptr [RBP + -0x4],EAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4] MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],0x0 JMP 0x0015eb86 LAB_0015eb86: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0015ebc0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RDI,qword ptr [RBP + -0x68] CALL 0x001f3bb0 LAB_0015ebc0: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0015d6a0 ADD RSP,0x80 POP RBP RET
void ma_crypt_data_post_read_hook(int param_1,long *param_2) { uint uVar1; int4 uVar2; int4 uVar3; long lVar4; int3 *__src; void *__dest; ulong uVar5; int3 uVar6; byte bVar7; uint uVar8; uint local_74; int local_c; lVar4 = param_2[2]; uVar1 = *(uint *)(lVar4 + 0x7bc); bVar7 = *(byte *)(*param_2 + 7) & 7; uVar8 = 8; if (bVar7 < 3) { uVar8 = 0xc; } local_c = param_1; if (param_1 == 0) { __src = (int3 *)*param_2; __dest = (void *)param_2[3]; uVar5 = param_2[1]; uVar6 = *__src; uVar2 = *(int4 *)((long)__src + 3); if (bVar7 < 3) { local_74 = *(int *)(lVar4 + 0xc18) + 0xc; } else { local_74 = *(int *)(lVar4 + 0xc18) + 8; } uVar3 = *(int4 *)((long)__src + (ulong)uVar8); memcpy(__dest,__src,(ulong)local_74); local_c = ma_decrypt(lVar4,*(int8 *)(lVar4 + 0xc20),(long)__src + (ulong)local_74, (long)__dest + (ulong)local_74,uVar1 - (local_74 + 4),uVar5 & 0xffffffff, (ulong)CONCAT34(uVar6,uVar2),uVar3); *(int4 *)((long)__dest + ((ulong)uVar1 - 4)) = *(int4 *)((long)__src + ((ulong)uVar1 - 4)); *(int4 *)((long)__dest + (ulong)uVar8) = 0; } if (param_2[3] != 0) { lVar4 = *param_2; *param_2 = param_2[3]; param_2[3] = 0; my_free(lVar4); } maria_page_crc_check_data(local_c,param_2); return; }
17,106
ma_crypt_data_post_read_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_data_post_read_hook(int res, PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint size= share->block_size; const uchar page_type= args->page[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK; const uint32 key_version_offset= (page_type <= TAIL_PAGE) ? KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET; if (res == 0) { const uchar *src= args->page; uchar* dst= args->crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uint head= (page_type <= TAIL_PAGE) ? PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share); const uint tail= CRC_SIZE; const uint32 key_version= uint4korr(src + key_version_offset); /* 1 - copy head */ memcpy(dst, src, head); /* 2 - decrypt page */ res= ma_decrypt(share, share->crypt_data, src + head, dst + head, size - (head + tail), pageno, lsn, key_version); /* 3 - copy tail */ memcpy(dst + size - tail, src + size - tail, tail); /* 4 clear key version to get correct crc */ int4store(dst + key_version_offset, 0); } if (args->crypt_buf != NULL) { uchar *tmp= args->page; args->page= args->crypt_buf; args->crypt_buf= NULL; my_free(tmp); } return maria_page_crc_check_data(res, args); }
O3
c
ma_crypt_data_post_read_hook: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %rbx movl %edi, %r12d testl %edi, %edi jne 0x50f82 movq (%rbx), %r14 movq 0x10(%rbx), %r15 movl 0x7bc(%r15), %ecx movq %rcx, -0x48(%rbp) movb 0x7(%r14), %al andb $0x7, %al xorl %ecx, %ecx cmpb $0x3, %al setb %cl movq 0x18(%rbx), %r12 movl 0x8(%rbx), %eax movl %eax, -0x2c(%rbp) movzwl (%r14), %eax shlq $0x20, %rax movzbl 0x2(%r14), %edx shlq $0x30, %rdx orq %rax, %rdx movl 0x3(%r14), %eax orq %rdx, %rax movq %rax, -0x58(%rbp) movl 0xc18(%r15), %eax leal (,%rcx,4), %edx movq %rdx, -0x50(%rbp) leal 0x8(%rax,%rcx,4), %r13d movl 0x8(%r14,%rdx), %eax movq %rax, -0x40(%rbp) movq %r12, %rdi movq %r12, -0x38(%rbp) movq %r14, %rsi movq %r13, %rdx callq 0x29080 movq %r15, %rdi movq 0xc20(%r15), %rsi leaq (%r14,%r13), %rdx leaq (%r12,%r13), %rcx movq -0x48(%rbp), %r15 movl %r15d, %r8d subl %r13d, %r8d addl $-0x4, %r8d movl -0x2c(%rbp), %r9d pushq -0x40(%rbp) pushq -0x58(%rbp) callq 0x513cc addq $0x10, %rsp movl %eax, %r12d movl -0x4(%r14,%r15), %eax movq -0x38(%rbp), %rdx movl %eax, -0x4(%rdx,%r15) movq -0x50(%rbp), %rax movl $0x0, 0x8(%rdx,%rax) movq 0x18(%rbx), %rax testq %rax, %rax je 0x50f9e movq (%rbx), %rdi movq %rax, (%rbx) movq $0x0, 0x18(%rbx) callq 0x9fec2 movl %r12d, %edi movq %rbx, %rsi addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x503a7
ma_crypt_data_post_read_hook: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rsi mov r12d, edi test edi, edi jnz loc_50F82 mov r14, [rbx] mov r15, [rbx+10h] mov ecx, [r15+7BCh] mov [rbp+var_48], rcx mov al, [r14+7] and al, 7 xor ecx, ecx cmp al, 3 setb cl mov r12, [rbx+18h] mov eax, [rbx+8] mov [rbp+var_2C], eax movzx eax, word ptr [r14] shl rax, 20h movzx edx, byte ptr [r14+2] shl rdx, 30h or rdx, rax mov eax, [r14+3] or rax, rdx mov [rbp+var_58], rax mov eax, [r15+0C18h] lea edx, ds:0[rcx*4] mov [rbp+var_50], rdx lea r13d, [rax+rcx*4+8] mov eax, [r14+rdx+8] mov [rbp+var_40], rax mov rdi, r12 mov [rbp+var_38], r12 mov rsi, r14 mov rdx, r13 call _memcpy mov rdi, r15 mov rsi, [r15+0C20h] lea rdx, [r14+r13] lea rcx, [r12+r13] mov r15, [rbp+var_48] mov r8d, r15d sub r8d, r13d add r8d, 0FFFFFFFCh mov r9d, [rbp+var_2C] push [rbp+var_40] push [rbp+var_58] call ma_decrypt add rsp, 10h mov r12d, eax mov eax, [r14+r15-4] mov rdx, [rbp+var_38] mov [rdx+r15-4], eax mov rax, [rbp+var_50] mov dword ptr [rdx+rax+8], 0 loc_50F82: mov rax, [rbx+18h] test rax, rax jz short loc_50F9E mov rdi, [rbx] mov [rbx], rax mov qword ptr [rbx+18h], 0 call my_free loc_50F9E: mov edi, r12d mov rsi, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp maria_page_crc_check_data
char ma_crypt_data_post_read_hook(int a1, _QWORD *a2) { int v2; // r12d unsigned __int16 *v3; // r14 long long v4; // r15 BOOL v5; // ecx unsigned int v6; // r13d long long v7; // rax long long v8; // rdi unsigned long long v10; // [rsp+8h] [rbp-58h] long long v11; // [rsp+10h] [rbp-50h] long long v12; // [rsp+18h] [rbp-48h] int v13; // [rsp+20h] [rbp-40h] long long v14; // [rsp+28h] [rbp-38h] int v15; // [rsp+34h] [rbp-2Ch] v2 = a1; if ( !a1 ) { v3 = (unsigned __int16 *)*a2; v4 = a2[2]; v12 = *(unsigned int *)(v4 + 1980); v5 = (*(_BYTE *)(*a2 + 7LL) & 7u) < 3; v15 = *((_DWORD *)a2 + 2); v10 = ((unsigned long long)*v3 << 32) | ((unsigned long long)*((unsigned __int8 *)v3 + 2) << 48) | *(unsigned int *)((char *)v3 + 3); v11 = (unsigned int)(4 * v5); v6 = *(_DWORD *)(v4 + 3096) + 4 * v5 + 8; v13 = *(_DWORD *)(*a2 + v11 + 8); v14 = a2[3]; memcpy(v14, *a2, v6); v2 = ma_decrypt( v4, *(_QWORD *)(v4 + 3104), (unsigned int)v3 + v6, (unsigned int)v14 + v6, (unsigned int)v12 - v6 - 4, v15, v10, v13); *(_DWORD *)(v14 + v12 - 4) = *(_DWORD *)((char *)v3 + v12 - 4); *(_DWORD *)(v14 + v11 + 8) = 0; } v7 = a2[3]; if ( v7 ) { v8 = *a2; *a2 = v7; a2[3] = 0LL; my_free(v8); } return maria_page_crc_check_data(v2, (long long)a2); }
ma_crypt_data_post_read_hook: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RSI MOV R12D,EDI TEST EDI,EDI JNZ 0x00150f82 MOV R14,qword ptr [RBX] MOV R15,qword ptr [RBX + 0x10] MOV ECX,dword ptr [R15 + 0x7bc] MOV qword ptr [RBP + -0x48],RCX MOV AL,byte ptr [R14 + 0x7] AND AL,0x7 XOR ECX,ECX CMP AL,0x3 SETC CL MOV R12,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RBX + 0x8] MOV dword ptr [RBP + -0x2c],EAX MOVZX EAX,word ptr [R14] SHL RAX,0x20 MOVZX EDX,byte ptr [R14 + 0x2] SHL RDX,0x30 OR RDX,RAX MOV EAX,dword ptr [R14 + 0x3] OR RAX,RDX MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [R15 + 0xc18] LEA EDX,[RCX*0x4] MOV qword ptr [RBP + -0x50],RDX LEA R13D,[RAX + RCX*0x4 + 0x8] MOV EAX,dword ptr [R14 + RDX*0x1 + 0x8] MOV qword ptr [RBP + -0x40],RAX MOV RDI,R12 MOV qword ptr [RBP + -0x38],R12 MOV RSI,R14 MOV RDX,R13 CALL 0x00129080 MOV RDI,R15 MOV RSI,qword ptr [R15 + 0xc20] LEA RDX,[R14 + R13*0x1] LEA RCX,[R12 + R13*0x1] MOV R15,qword ptr [RBP + -0x48] MOV R8D,R15D SUB R8D,R13D ADD R8D,-0x4 MOV R9D,dword ptr [RBP + -0x2c] PUSH qword ptr [RBP + -0x40] PUSH qword ptr [RBP + -0x58] CALL 0x001513cc ADD RSP,0x10 MOV R12D,EAX MOV EAX,dword ptr [R14 + R15*0x1 + -0x4] MOV RDX,qword ptr [RBP + -0x38] MOV dword ptr [RDX + R15*0x1 + -0x4],EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RDX + RAX*0x1 + 0x8],0x0 LAB_00150f82: MOV RAX,qword ptr [RBX + 0x18] TEST RAX,RAX JZ 0x00150f9e MOV RDI,qword ptr [RBX] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x18],0x0 CALL 0x0019fec2 LAB_00150f9e: MOV EDI,R12D MOV RSI,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001503a7
void ma_crypt_data_post_read_hook(int param_1,long *param_2) { ushort uVar1; uint uVar2; uint uVar3; int4 uVar4; ushort *__src; long lVar5; void *__dest; long lVar6; ushort uVar7; ulong uVar8; uint uVar9; bool bVar10; ulong __n; if (param_1 == 0) { __src = (ushort *)*param_2; lVar5 = param_2[2]; uVar2 = *(uint *)(lVar5 + 0x7bc); bVar10 = (*(byte *)((long)__src + 7) & 7) < 3; __dest = (void *)param_2[3]; lVar6 = param_2[1]; uVar1 = *__src; uVar7 = __src[1]; uVar3 = *(uint *)((long)__src + 3); uVar8 = (ulong)((uint)bVar10 * 4); uVar9 = *(int *)(lVar5 + 0xc18) + 8 + (uint)bVar10 * 4; __n = (ulong)uVar9; uVar4 = *(int4 *)((long)__src + uVar8 + 8); memcpy(__dest,__src,__n); param_1 = ma_decrypt(lVar5,*(int8 *)(lVar5 + 0xc20),(long)__src + __n,(long)__dest + __n, (uVar2 - uVar9) + -4,(int)lVar6, (ulong)uVar3 | (ulong)(byte)uVar7 << 0x30 | (ulong)uVar1 << 0x20,uVar4); *(int4 *)((long)__dest + ((ulong)uVar2 - 4)) = *(int4 *)((long)__src + ((ulong)uVar2 - 4)); *(int4 *)((long)__dest + uVar8 + 8) = 0; } if (param_2[3] != 0) { lVar5 = *param_2; *param_2 = param_2[3]; param_2[3] = 0; my_free(lVar5); } maria_page_crc_check_data(param_1,param_2); return; }
17,107
downheap
eloqsql/mysys/queues.c
void _downheap(QUEUE *queue, uint idx) { uchar *element= queue->root[idx]; uint next_index, elements= queue->elements, half_queue= elements >> 1, offset_to_key= queue->offset_to_key, offset_to_queue_pos= queue->offset_to_queue_pos; while (idx <= half_queue) { next_index= idx+idx; if (next_index < elements && (queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, queue->root[next_index+1]+offset_to_key) * queue->max_at_top) > 0) next_index++; if ((queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, element+offset_to_key) * queue->max_at_top) >= 0) break; queue->root[idx]= queue->root[next_index]; if (offset_to_queue_pos) (*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx; idx= next_index; } queue->root[idx]=element; if (offset_to_queue_pos) (*(uint*) (element + offset_to_queue_pos-1))= idx; }
O0
c
downheap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax shrl %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movl 0x18(%rax), %eax movl %eax, -0x28(%rbp) movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x2c(%rbp) movl -0xc(%rbp), %eax cmpl -0x24(%rbp), %eax ja 0xf76ed movl -0xc(%rbp), %eax addl -0xc(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x20(%rbp), %eax jae 0xf7669 movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx movq (%rcx,%rdx,8), %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx addl $0x1, %edx movl %edx, %edx movq (%rcx,%rdx,8), %rdx movl -0x28(%rbp), %ecx addq %rcx, %rdx callq *%rax movq -0x8(%rbp), %rcx imull 0x24(%rcx), %eax cmpl $0x0, %eax jle 0xf7669 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx movq (%rcx,%rdx,8), %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi movq -0x18(%rbp), %rdx movl -0x28(%rbp), %ecx addq %rcx, %rdx callq *%rax movq -0x8(%rbp), %rcx imull 0x24(%rcx), %eax cmpl $0x0, %eax jl 0xf76a8 jmp 0xf76ed movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x1c(%rbp), %ecx movq (%rax,%rcx,8), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq %rdx, (%rax,%rcx,8) cmpl $0x0, -0x2c(%rbp) je 0xf76e2 movl -0xc(%rbp), %edx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movl -0x2c(%rbp), %ecx movl %edx, -0x1(%rax,%rcx) movl -0x1c(%rbp), %eax movl %eax, -0xc(%rbp) jmp 0xf75f7 movq -0x18(%rbp), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq %rdx, (%rax,%rcx,8) cmpl $0x0, -0x2c(%rbp) je 0xf7713 movl -0xc(%rbp), %edx movq -0x18(%rbp), %rax movl -0x2c(%rbp), %ecx movl %edx, -0x1(%rax,%rcx) addq $0x30, %rsp popq %rbp retq nopl (%rax)
_downheap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov [rbp+var_18], rax mov rax, [rbp+var_8] mov eax, [rax+10h] mov [rbp+var_20], eax mov eax, [rbp+var_20] shr eax, 1 mov [rbp+var_24], eax mov rax, [rbp+var_8] mov eax, [rax+18h] mov [rbp+var_28], eax mov rax, [rbp+var_8] mov eax, [rax+1Ch] mov [rbp+var_2C], eax loc_F75F7: mov eax, [rbp+var_C] cmp eax, [rbp+var_24] ja loc_F76ED mov eax, [rbp+var_C] add eax, [rbp+var_C] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] cmp eax, [rbp+var_20] jnb short loc_F7669 mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] mov rsi, [rcx+rdx*8] mov ecx, [rbp+var_28] add rsi, rcx mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] add edx, 1 mov edx, edx mov rdx, [rcx+rdx*8] mov ecx, [rbp+var_28] add rdx, rcx call rax mov rcx, [rbp+var_8] imul eax, [rcx+24h] cmp eax, 0 jle short loc_F7669 mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax loc_F7669: mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] mov rsi, [rcx+rdx*8] mov ecx, [rbp+var_28] add rsi, rcx mov rdx, [rbp+var_18] mov ecx, [rbp+var_28] add rdx, rcx call rax mov rcx, [rbp+var_8] imul eax, [rcx+24h] cmp eax, 0 jl short loc_F76A8 jmp short loc_F76ED loc_F76A8: mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_1C] mov rdx, [rax+rcx*8] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov [rax+rcx*8], rdx cmp [rbp+var_2C], 0 jz short loc_F76E2 mov edx, [rbp+var_C] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov ecx, [rbp+var_2C] mov [rax+rcx-1], edx loc_F76E2: mov eax, [rbp+var_1C] mov [rbp+var_C], eax jmp loc_F75F7 loc_F76ED: mov rdx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov [rax+rcx*8], rdx cmp [rbp+var_2C], 0 jz short loc_F7713 mov edx, [rbp+var_C] mov rax, [rbp+var_18] mov ecx, [rbp+var_2C] mov [rax+rcx-1], edx loc_F7713: add rsp, 30h pop rbp retn
long long downheap(long long *a1, unsigned int a2) { long long result; // rax unsigned int v3; // [rsp+4h] [rbp-2Ch] unsigned int v4; // [rsp+8h] [rbp-28h] unsigned int v5; // [rsp+10h] [rbp-20h] unsigned int v6; // [rsp+14h] [rbp-1Ch] long long v7; // [rsp+18h] [rbp-18h] unsigned int v8; // [rsp+24h] [rbp-Ch] v8 = a2; v7 = *(_QWORD *)(*a1 + 8LL * a2); v5 = *((_DWORD *)a1 + 4); v4 = *((_DWORD *)a1 + 6); v3 = *((_DWORD *)a1 + 7); while ( v8 <= v5 >> 1 ) { v6 = 2 * v8; if ( 2 * v8 < v5 && (int)(*((_DWORD *)a1 + 9) * ((long long ( *)(long long, _QWORD, _QWORD))a1[5])( a1[1], v4 + *(_QWORD *)(*a1 + 8LL * v6), v4 + *(_QWORD *)(*a1 + 8LL * (v6 + 1)))) > 0 ) { ++v6; } if ( (int)(*((_DWORD *)a1 + 9) * ((long long ( *)(long long, _QWORD, long long))a1[5])( a1[1], v4 + *(_QWORD *)(*a1 + 8LL * v6), v4 + v7)) >= 0 ) break; *(_QWORD *)(*a1 + 8LL * v8) = *(_QWORD *)(*a1 + 8LL * v6); if ( v3 ) *(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v8) + v3 - 1LL) = v8; v8 = v6; } result = *a1; *(_QWORD *)(*a1 + 8LL * v8) = v7; if ( v3 ) { result = v7; *(_DWORD *)(v7 + v3 - 1) = v8; } return result; }
_downheap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] SHR EAX,0x1 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x2c],EAX LAB_001f75f7: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x24] JA 0x001f76ed MOV EAX,dword ptr [RBP + -0xc] ADD EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] JNC 0x001f7669 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] ADD EDX,0x1 MOV EDX,EDX MOV RDX,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RDX,RCX CALL RAX MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x24] CMP EAX,0x0 JLE 0x001f7669 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX LAB_001f7669: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x28] ADD RDX,RCX CALL RAX MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x24] CMP EAX,0x0 JL 0x001f76a8 JMP 0x001f76ed LAB_001f76a8: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],RDX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001f76e2 MOV EDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX LAB_001f76e2: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0xc],EAX JMP 0x001f75f7 LAB_001f76ed: MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],RDX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001f7713 MOV EDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX LAB_001f7713: ADD RSP,0x30 POP RBP RET
void _downheap(long *param_1,uint param_2) { uint uVar1; uint uVar2; uint uVar3; long lVar4; int iVar5; uint local_24; uint local_14; lVar4 = *(long *)(*param_1 + (ulong)param_2 * 8); uVar1 = *(uint *)(param_1 + 2); uVar2 = *(uint *)(param_1 + 3); uVar3 = *(uint *)((long)param_1 + 0x1c); local_14 = param_2; while (local_14 <= uVar1 >> 1) { local_24 = local_14 * 2; if ((local_24 < uVar1) && (iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2, *(long *)(*param_1 + (ulong)(local_24 + 1) * 8) + (ulong)uVar2), 0 < iVar5 * *(int *)((long)param_1 + 0x24))) { local_24 = local_24 + 1; } iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2, lVar4 + (ulong)uVar2); if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) break; *(int8 *)(*param_1 + (ulong)local_14 * 8) = *(int8 *)(*param_1 + (ulong)local_24 * 8); if (uVar3 != 0) { *(uint *)(*(long *)(*param_1 + (ulong)local_14 * 8) + -1 + (ulong)uVar3) = local_14; } local_14 = local_24; } *(long *)(*param_1 + (ulong)local_14 * 8) = lVar4; if (uVar3 != 0) { *(uint *)(lVar4 + -1 + (ulong)uVar3) = local_14; } return; }
17,108
rw_pr_init
eloqsql/mysys/thr_rwlock.c
int rw_pr_init(rw_pr_lock_t *rwlock) { pthread_mutex_init(&rwlock->lock, NULL); pthread_cond_init(&rwlock->no_active_readers, NULL); rwlock->active_readers= 0; rwlock->writers_waiting_readers= 0; rwlock->active_writer= FALSE; #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif return 0; }
O3
c
rw_pr_init: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx xorl %esi, %esi callq 0x26510 leaq 0x28(%rbx), %rdi xorl %esi, %esi callq 0x26420 movq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
rw_pr_init: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi xor esi, esi call _pthread_mutex_init lea rdi, [rbx+28h] xor esi, esi call _pthread_cond_init mov qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long rw_pr_init(long long a1) { pthread_mutex_init(a1, 0LL); pthread_cond_init(a1 + 40, 0LL); *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return 0LL; }
rw_pr_init: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI XOR ESI,ESI CALL 0x00126510 LEA RDI,[RBX + 0x28] XOR ESI,ESI CALL 0x00126420 MOV qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 rw_pr_init(pthread_mutex_t *param_1) { pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0); pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0); *(int8 *)((long)param_1 + 0x58) = 0; *(int1 *)((long)param_1 + 0x60) = 0; return 0; }
17,109
JS_NewClass
bluesky950520[P]quickjs/quickjs.c
int JS_NewClass(JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def) { int ret, len; JSAtom name; // XXX: class_def->class_name must be raw 8-bit contents. No UTF-8 encoded strings len = strlen(class_def->class_name); name = __JS_FindAtom(rt, class_def->class_name, len, JS_ATOM_TYPE_STRING); if (name == JS_ATOM_NULL) { name = __JS_NewAtomInit(rt, class_def->class_name, len, JS_ATOM_TYPE_STRING); if (name == JS_ATOM_NULL) return -1; } ret = JS_NewClass1(rt, class_id, class_def, name); JS_FreeAtomRT(rt, name); return ret; }
O0
c
JS_NewClass: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movl %esi, 0x24(%rsp) movq %rdx, 0x18(%rsp) movq 0x18(%rsp), %rax movq (%rax), %rdi callq 0xe240 movl %eax, 0x10(%rsp) movq 0x28(%rsp), %rdi movq 0x18(%rsp), %rax movq (%rax), %rsi movslq 0x10(%rsp), %rdx movl $0x1, %ecx callq 0x26e60 movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jne 0x2803c movq 0x28(%rsp), %rdi movq 0x18(%rsp), %rax movq (%rax), %rsi movl 0x10(%rsp), %edx movl $0x1, %ecx callq 0x28080 movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jne 0x2803a movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0x2806d jmp 0x2803c movq 0x28(%rsp), %rdi movl 0x24(%rsp), %esi movq 0x18(%rsp), %rdx movl 0xc(%rsp), %ecx callq 0x28100 movl %eax, 0x14(%rsp) movq 0x28(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x22ae0 movl 0x14(%rsp), %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
JS_NewClass: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_14], esi mov [rsp+38h+var_20], rdx mov rax, [rsp+38h+var_20] mov rdi, [rax] call _strlen mov [rsp+38h+var_28], eax mov rdi, [rsp+38h+var_10] mov rax, [rsp+38h+var_20] mov rsi, [rax] movsxd rdx, [rsp+38h+var_28] mov ecx, 1 call __JS_FindAtom mov [rsp+38h+var_2C], eax cmp [rsp+38h+var_2C], 0 jnz short loc_2803C mov rdi, [rsp+38h+var_10] mov rax, [rsp+38h+var_20] mov rsi, [rax] mov edx, [rsp+38h+var_28] mov ecx, 1 call __JS_NewAtomInit mov [rsp+38h+var_2C], eax cmp [rsp+38h+var_2C], 0 jnz short loc_2803A mov [rsp+38h+var_4], 0FFFFFFFFh jmp short loc_2806D loc_2803A: jmp short $+2 loc_2803C: mov rdi, [rsp+38h+var_10] mov esi, [rsp+38h+var_14] mov rdx, [rsp+38h+var_20] mov ecx, [rsp+38h+var_2C] call JS_NewClass1 mov [rsp+38h+var_24], eax mov rdi, [rsp+38h+var_10] mov esi, [rsp+38h+var_2C] call JS_FreeAtomRT mov eax, [rsp+38h+var_24] mov [rsp+38h+var_4], eax loc_2806D: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long JS_NewClass(long long a1, unsigned int a2, long long *a3) { unsigned int Atom; // [rsp+Ch] [rbp-2Ch] unsigned int v5; // [rsp+10h] [rbp-28h] unsigned int v6; // [rsp+14h] [rbp-24h] v5 = strlen(*a3); Atom = _JS_FindAtom(a1, *a3, (int)v5); if ( Atom || (Atom = _JS_NewAtomInit(a1, *a3, v5, 1LL)) != 0 ) { v6 = JS_NewClass1(a1, a2, a3, Atom); JS_FreeAtomRT(a1, Atom); return v6; } else { return (unsigned int)-1; } }
JS_NewClass: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV dword ptr [RSP + 0x24],ESI MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] CALL 0x0010e240 MOV dword ptr [RSP + 0x10],EAX MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RAX] MOVSXD RDX,dword ptr [RSP + 0x10] MOV ECX,0x1 CALL 0x00126e60 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JNZ 0x0012803c MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RAX] MOV EDX,dword ptr [RSP + 0x10] MOV ECX,0x1 CALL 0x00128080 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JNZ 0x0012803a MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x0012806d LAB_0012803a: JMP 0x0012803c LAB_0012803c: MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x24] MOV RDX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RSP + 0xc] CALL 0x00128100 MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0xc] CALL 0x00122ae0 MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x34],EAX LAB_0012806d: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 JS_NewClass(int8 param_1,int4 param_2,int8 *param_3) { size_t sVar1; int local_2c; int4 local_4; sVar1 = strlen((char *)*param_3); local_2c = __JS_FindAtom(param_1,*param_3,(long)(int)sVar1,1); if ((local_2c == 0) && (local_2c = __JS_NewAtomInit(param_1,*param_3,sVar1 & 0xffffffff,1), local_2c == 0)) { local_4 = 0xffffffff; } else { local_4 = JS_NewClass1(param_1,param_2,param_3,local_2c); JS_FreeAtomRT(param_1,local_2c); } return local_4; }
17,110
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_object()
monkey531[P]llama/common/json.hpp
bool end_object() { if (ref_stack.back()) { if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) { // discard object *ref_stack.back() = discarded; } else { ref_stack.back()->set_parents(); } } JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(!keep_stack.empty()); ref_stack.pop_back(); keep_stack.pop_back(); if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) { // remove discarded value for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) { if (it->is_discarded()) { ref_stack.back()->erase(it); break; } } } return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_object(): pushq %r15 pushq %r14 pushq %rbx subq $0x70, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rsi movq -0x8(%rsi), %rcx testq %rcx, %rcx je 0x41388 leaq 0x80(%rbx), %rdi subq 0x8(%rbx), %rsi shrq $0x3, %rsi decl %esi pushq $0x1 popq %rdx callq 0x419dc testb %al, %al jne 0x41388 leaq 0xa8(%rbx), %rsi leaq 0x40(%rsp), %r14 movq %r14, %rdi callq 0x4228c movq 0x10(%rbx), %rax movq -0x8(%rax), %rdi movq %r14, %rsi callq 0x400ba movq %r14, %rdi callq 0x3d534 movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x4145c movq 0x20(%rbx), %rcx cmpq 0x30(%rbx), %rcx jne 0x413aa cmpl $0x0, 0x38(%rbx) je 0x41478 leaq 0x30(%rbx), %rdi addq $-0x8, %rax movq %rax, 0x10(%rbx) callq 0x41014 movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x41450 movq -0x8(%rax), %rsi testq %rsi, %rsi je 0x41450 movb (%rsi), %al decb %al cmpb $0x1, %al ja 0x41450 movq %rsp, %r14 movq %r14, %rdi callq 0x4232c leaq 0x20(%rsp), %r15 movq 0x10(%rbx), %rax movq -0x8(%rax), %rsi movq %r15, %rdi callq 0x4235c movq %r14, %rdi movq %r15, %rsi callq 0x42352 testb %al, %al je 0x41450 movq %r14, %rdi callq 0x42382 cmpb $0x9, (%rax) je 0x41420 movq %r14, %rdi callq 0x426a2 jmp 0x413ea movq 0x10(%rbx), %rax movq -0x8(%rax), %rsi movq (%rsp), %rax leaq 0x50(%rsp), %rdx movq %rax, (%rdx) movups 0x8(%rsp), %xmm0 movups %xmm0, 0x8(%rdx) movq 0x18(%rsp), %rax movq %rax, 0x18(%rdx) leaq 0x20(%rsp), %rdi callq 0x424b0 movb $0x1, %al addq $0x70, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x70783(%rip), %rdi # 0xb1be6 leaq 0x6acd6(%rip), %rdx # 0xac140 leaq 0x7176f(%rip), %rcx # 0xb2be0 movl $0x1bbd, %esi # imm = 0x1BBD jmp 0x41492 leaq 0x70767(%rip), %rdi # 0xb1be6 leaq 0x6acba(%rip), %rdx # 0xac140 leaq 0x716cd(%rip), %rcx # 0xb2b5a movl $0x1bbe, %esi # imm = 0x1BBE xorl %eax, %eax callq 0x24e90 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv: push r15 push r14 push rbx sub rsp, 70h mov rbx, rdi mov rsi, [rdi+10h] mov rcx, [rsi-8] test rcx, rcx jz short loc_41388 lea rdi, [rbx+80h] sub rsi, [rbx+8] shr rsi, 3 dec esi push 1 pop rdx call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &) test al, al jnz short loc_41388 lea rsi, [rbx+0A8h] lea r14, [rsp+88h+var_48] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, [rbx+10h] mov rdi, [rax-8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json() loc_41388: mov rax, [rbx+10h] cmp [rbx+8], rax jz loc_4145C mov rcx, [rbx+20h] cmp rcx, [rbx+30h] jnz short loc_413AA cmp dword ptr [rbx+38h], 0 jz loc_41478 loc_413AA: lea rdi, [rbx+30h]; this add rax, 0FFFFFFFFFFFFFFF8h mov [rbx+10h], rax call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void) mov rax, [rbx+10h] cmp [rbx+8], rax jz loc_41450 mov rsi, [rax-8] test rsi, rsi jz short loc_41450 mov al, [rsi] dec al cmp al, 1 ja short loc_41450 mov r14, rsp mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv; 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>::begin(void) lea r15, [rsp+88h+var_68] loc_413EA: mov rax, [rbx+10h] mov rsi, [rax-8] mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; 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>::end(void) mov rdi, r14 mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ test al, al jz short loc_41450 mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator->(void) cmp byte ptr [rax], 9 jz short loc_41420 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator++(void) jmp short loc_413EA loc_41420: mov rax, [rbx+10h] mov rsi, [rax-8] mov rax, [rsp+88h+var_88] lea rdx, [rsp+88h+var_38] mov [rdx], rax movups xmm0, [rsp+88h+var_80] movups xmmword ptr [rdx+8], xmm0 mov rax, [rsp+88h+var_70] mov [rdx+18h], rax lea rdi, [rsp+88h+var_68] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ loc_41450: mov al, 1 add rsp, 70h pop rbx pop r14 pop r15 retn loc_4145C: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1BBDh jmp short loc_41492 loc_41478: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1BBEh loc_41492: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_object( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, char a7, int a8, char a9) { long long v9; // rsi long long v10; // rcx long long v11; // rax long long v12; // rax _BYTE *v13; // rsi long long v14; // rsi int v16; // esi int v17; // edx int v18; // ecx int v19; // r8d int v20; // r9d long long v21; // [rsp+0h] [rbp-88h] BYREF __int128 v22; // [rsp+8h] [rbp-80h] long long v23; // [rsp+18h] [rbp-70h] _BYTE v24[32]; // [rsp+20h] [rbp-68h] BYREF _BYTE v25[16]; // [rsp+40h] [rbp-48h] BYREF long long v26; // [rsp+50h] [rbp-38h] __int128 v27; // [rsp+58h] [rbp-30h] long long v28; // [rsp+68h] [rbp-20h] v9 = *(_QWORD *)(a1 + 16); v10 = *(_QWORD *)(v9 - 8); if ( v10 && !(unsigned __int8)std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()( a1 + 128, (unsigned int)((unsigned long long)(v9 - *(_QWORD *)(a1 + 8)) >> 3) - 1, 1LL, v10) ) { 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>::basic_json( v25, a1 + 168); 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=( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL), (long long)v25); 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>::~basic_json((long long)v25); } v11 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v11 ) { v16 = 7101; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7101LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::key( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v16, v17, v18, v19, v20, a7, a8, a9); } if ( *(_QWORD *)(a1 + 32) == *(_QWORD *)(a1 + 48) && !*(_DWORD *)(a1 + 56) ) { v16 = 7102; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7102LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::key( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v16, v17, v18, v19, v20, a7, a8, a9); } *(_QWORD *)(a1 + 16) = v11 - 8; std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 48)); v12 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) != v12 ) { v13 = *(_BYTE **)(v12 - 8); if ( v13 ) { if ( (unsigned __int8)(*v13 - 1) <= 1u ) { 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>::begin(&v21); while ( 1 ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end( v24, *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL)); if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_( &v21, v24) ) break; if ( *(_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator->(&v21) == 9 ) { v14 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL); v26 = v21; v27 = v22; v28 = v23; ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_( v24, v14); return 1; } nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++(&v21); } } } } return 1; }
end_object: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x70 MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RSI + -0x8] TEST RCX,RCX JZ 0x00141388 LEA RDI,[RBX + 0x80] SUB RSI,qword ptr [RBX + 0x8] SHR RSI,0x3 DEC ESI PUSH 0x1 POP RDX CALL 0x001419dc TEST AL,AL JNZ 0x00141388 LEA RSI,[RBX + 0xa8] LEA R14,[RSP + 0x40] MOV RDI,R14 CALL 0x0014228c MOV RAX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,R14 CALL 0x001400ba MOV RDI,R14 CALL 0x0013d534 LAB_00141388: MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x0014145c MOV RCX,qword ptr [RBX + 0x20] CMP RCX,qword ptr [RBX + 0x30] JNZ 0x001413aa CMP dword ptr [RBX + 0x38],0x0 JZ 0x00141478 LAB_001413aa: LEA RDI,[RBX + 0x30] ADD RAX,-0x8 MOV qword ptr [RBX + 0x10],RAX CALL 0x00141014 MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x00141450 MOV RSI,qword ptr [RAX + -0x8] TEST RSI,RSI JZ 0x00141450 MOV AL,byte ptr [RSI] DEC AL CMP AL,0x1 JA 0x00141450 MOV R14,RSP MOV RDI,R14 CALL 0x0014232c LEA R15,[RSP + 0x20] LAB_001413ea: MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + -0x8] MOV RDI,R15 CALL 0x0014235c MOV RDI,R14 MOV RSI,R15 CALL 0x00142352 TEST AL,AL JZ 0x00141450 MOV RDI,R14 CALL 0x00142382 CMP byte ptr [RAX],0x9 JZ 0x00141420 MOV RDI,R14 CALL 0x001426a2 JMP 0x001413ea LAB_00141420: MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RSP] LEA RDX,[RSP + 0x50] MOV qword ptr [RDX],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS xmmword ptr [RDX + 0x8],XMM0 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RDX + 0x18],RAX LEA RDI,[RSP + 0x20] CALL 0x001424b0 LAB_00141450: MOV AL,0x1 ADD RSP,0x70 POP RBX POP R14 POP R15 RET LAB_0014145c: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b2be0] MOV ESI,0x1bbd JMP 0x00141492 LAB_00141478: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b2b5a] MOV ESI,0x1bbe LAB_00141492: XOR EAX,EAX CALL 0x00124e90
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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> >::end_object() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<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>> ::end_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { char cVar1; char *pcVar2; int8 uVar3; int8 local_88; int4 local_80; int4 uStack_7c; int4 uStack_78; int4 uStack_74; int8 local_70; int1 local_68 [32]; 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_48 [16]; int8 local_38; int4 local_30; int4 uStack_2c; int4 uStack_28; int4 uStack_24; int8 local_20; if ((*(long *)(*(long *)(this + 0x10) + -8) != 0) && (cVar1 = std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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()(this + 0x80, (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1,1) , cVar1 == '\0')) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_48,this + 0xa8); 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> **)(*(long *)(this + 0x10) + -8),local_48); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_48); } if (*(long *)(this + 8) == *(long *)(this + 0x10)) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1bbd; } else { if ((*(long *)(this + 0x20) != *(long *)(this + 0x30)) || (*(int *)(this + 0x38) != 0)) { *(long *)(this + 0x10) = *(long *)(this + 0x10) + -8; std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x30)); if ((*(long *)(this + 8) != *(long *)(this + 0x10)) && ((pcVar2 = *(char **)(*(long *)(this + 0x10) + -8), pcVar2 != (char *)0x0 && ((byte)(*pcVar2 - 1U) < 2)))) { 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> ::begin(); while( true ) { 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> ::end(); cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (&local_88,local_68); if (cVar1 == '\0') break; pcVar2 = (char *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator->((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_88); if (*pcVar2 == '\t') { local_38 = local_88; local_30 = local_80; uStack_2c = uStack_7c; uStack_28 = uStack_78; uStack_24 = uStack_74; local_20 = local_70; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (local_68,*(int8 *)(*(long *)(this + 0x10) + -8)); return 1; } iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_88); } } return 1; } pcVar2 = "!keep_stack.empty()"; uVar3 = 0x1bbe; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
17,111
my_strnxfrm_simple_nopad
eloqsql/strings/ctype-simple.c
size_t my_strnxfrm_simple_nopad(CHARSET_INFO * cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *d0= dst; dst= d0 + my_strnxfrm_simple_internal(cs, dst, dstlen, &nweights, src, srclen); return my_strxfrm_pad_desc_and_reverse_nopad(cs, d0, dst, d0 + dstlen, nweights, flags, 0); }
O0
c
my_strnxfrm_simple_nopad: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x28(%rbp), %r8 movq -0x30(%rbp), %r9 leaq -0x1c(%rbp), %rcx callq 0x4b3c0 movq %rax, %rcx movq -0x40(%rbp), %rax addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x38(%rbp), %rcx addq -0x18(%rbp), %rcx movl -0x1c(%rbp), %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x4b720 addq $0x50, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_simple_nopad: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov r8, [rbp+var_28] mov r9, [rbp+var_30] lea rcx, [rbp+var_1C] call my_strnxfrm_simple_internal mov rcx, rax mov rax, [rbp+var_40] add rax, rcx mov [rbp+var_10], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_38] mov rdx, [rbp+var_10] mov rcx, [rbp+var_38] add rcx, [rbp+var_18] mov r8d, [rbp+var_1C] mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+50h+var_50], 0 call my_strxfrm_pad_desc_and_reverse_nopad add rsp, 50h pop rbp retn
long long my_strnxfrm_simple_nopad( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned int a4, unsigned __int8 *a5, unsigned long long a6, int a7) { _BYTE *v7; // rax unsigned int v9; // [rsp+34h] [rbp-1Ch] BYREF unsigned long long v10; // [rsp+38h] [rbp-18h] unsigned __int8 *v11; // [rsp+40h] [rbp-10h] long long v12; // [rsp+48h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v7 = my_strnxfrm_simple_internal(a1, a2, a3, &v9, a5, a6); v11 = &a2[(_QWORD)v7]; return my_strxfrm_pad_desc_and_reverse_nopad(v12, (_DWORD)a2, (int)v7 + (int)a2, (int)v10 + (int)a2, v9, a7, 0); }
my_strnxfrm_simple_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x50 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 dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x1c] CALL 0x0014b3c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] ADD RCX,qword ptr [RBP + -0x18] MOV R8D,dword ptr [RBP + -0x1c] MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x0014b720 ADD RSP,0x50 POP RBP RET
void my_strnxfrm_simple_nopad (int8 param_1,long param_2,long param_3,int4 param_4,int8 param_5, int8 param_6,int4 param_7) { int4 local_24; long local_20; long local_18; int8 local_10; local_24 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_18 = my_strnxfrm_simple_internal(param_1,param_2,param_3,&local_24,param_5,param_6); local_18 = param_2 + local_18; my_strxfrm_pad_desc_and_reverse_nopad (local_10,param_2,local_18,param_2 + local_20,local_24,param_7,0); return; }
17,112
ggml_compute_forward_get_rel_pos_f16
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_get_rel_pos_f16( const struct ggml_compute_params * params, struct ggml_tensor * dst) { UNUSED(params); const struct ggml_tensor * src0 = dst->src[0]; // ref: https://github.com/facebookresearch/segment-anything/blob/main/segment_anything/modeling/image_encoder.py#L292-L322 GGML_TENSOR_UNARY_OP_LOCALS const int64_t w = ne1; ggml_fp16_t * src0_data = (ggml_fp16_t *) src0->data; ggml_fp16_t * dst_data = (ggml_fp16_t *) dst->data; for (int64_t i2 = 0; i2 < ne2; ++i2) { for (int64_t i1 = 0; i1 < ne1; ++i1) { const int64_t pos = (w - i1 - 1) + i2; for (int64_t i0 = 0; i0 < ne0; ++i0) { dst_data[i2*ne1*ne0 + i1*ne0 + i0] = src0_data[pos*ne00 + i0]; } } } }
O0
c
ggml_compute_forward_get_rel_pos_f16: pushq %rbp movq %rsp, %rbp subq $0x50, %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 movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x80(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x88(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x98(%rbp) movq -0x68(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x18(%rbp), %rax movq 0xf8(%rax), %rax movq %rax, -0xa8(%rbp) movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movq %rax, -0xb0(%rbp) movq $0x0, -0xb8(%rbp) movq -0xb8(%rbp), %rax cmpq -0x70(%rbp), %rax jge 0x3b14d movq $0x0, -0xc0(%rbp) movq -0xc0(%rbp), %rax cmpq -0x68(%rbp), %rax jge 0x3b134 movq -0xa0(%rbp), %rax subq -0xc0(%rbp), %rax subq $0x1, %rax addq -0xb8(%rbp), %rax movq %rax, -0xc8(%rbp) movq $0x0, -0xd0(%rbp) movq -0xd0(%rbp), %rax cmpq -0x60(%rbp), %rax jge 0x3b11b movq -0xa8(%rbp), %rax movq -0xc8(%rbp), %rcx imulq -0x20(%rbp), %rcx addq -0xd0(%rbp), %rcx movw (%rax,%rcx,2), %dx movq -0xb0(%rbp), %rax movq -0xb8(%rbp), %rcx imulq -0x68(%rbp), %rcx imulq -0x60(%rbp), %rcx movq -0xc0(%rbp), %rsi imulq -0x60(%rbp), %rsi addq %rsi, %rcx addq -0xd0(%rbp), %rcx movw %dx, (%rax,%rcx,2) movq -0xd0(%rbp), %rax addq $0x1, %rax movq %rax, -0xd0(%rbp) jmp 0x3b0aa jmp 0x3b11d movq -0xc0(%rbp), %rax addq $0x1, %rax movq %rax, -0xc0(%rbp) jmp 0x3b06e jmp 0x3b136 movq -0xb8(%rbp), %rax addq $0x1, %rax movq %rax, -0xb8(%rbp) jmp 0x3b052 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ggml_compute_forward_get_rel_pos_f16: push rbp mov rbp, rsp sub rsp, 50h 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 rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax+18h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov rax, [rax+30h] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+38h] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_50], rax mov rax, [rbp+var_18] mov rax, [rax+48h] mov [rbp+var_58], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_60], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_70], rax mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_78], rax mov rax, [rbp+var_10] mov rax, [rax+30h] mov [rbp+var_80], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_88], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov [rbp+var_90], rax mov rax, [rbp+var_10] mov rax, [rax+48h] mov [rbp+var_98], rax mov rax, [rbp+var_68] mov [rbp+var_A0], rax mov rax, [rbp+var_18] mov rax, [rax+0F8h] mov [rbp+var_A8], rax mov rax, [rbp+var_10] mov rax, [rax+0F8h] mov [rbp+var_B0], rax mov [rbp+var_B8], 0 loc_3B052: mov rax, [rbp+var_B8] cmp rax, [rbp+var_70] jge loc_3B14D mov [rbp+var_C0], 0 loc_3B06E: mov rax, [rbp+var_C0] cmp rax, [rbp+var_68] jge loc_3B134 mov rax, [rbp+var_A0] sub rax, [rbp+var_C0] sub rax, 1 add rax, [rbp+var_B8] mov [rbp+var_C8], rax mov [rbp+var_D0], 0 loc_3B0AA: mov rax, [rbp+var_D0] cmp rax, [rbp+var_60] jge short loc_3B11B mov rax, [rbp+var_A8] mov rcx, [rbp+var_C8] imul rcx, [rbp+var_20] add rcx, [rbp+var_D0] mov dx, [rax+rcx*2] mov rax, [rbp+var_B0] mov rcx, [rbp+var_B8] imul rcx, [rbp+var_68] imul rcx, [rbp+var_60] mov rsi, [rbp+var_C0] imul rsi, [rbp+var_60] add rcx, rsi add rcx, [rbp+var_D0] mov [rax+rcx*2], dx mov rax, [rbp+var_D0] add rax, 1 mov [rbp+var_D0], rax jmp short loc_3B0AA loc_3B11B: jmp short $+2 loc_3B11D: mov rax, [rbp+var_C0] add rax, 1 mov [rbp+var_C0], rax jmp loc_3B06E loc_3B134: jmp short $+2 loc_3B136: mov rax, [rbp+var_B8] add rax, 1 mov [rbp+var_B8], rax jmp loc_3B052 loc_3B14D: add rsp, 50h pop rbp retn
long long ggml_compute_forward_get_rel_pos_f16(long long a1, _QWORD *a2) { long long result; // rax long long k; // [rsp+0h] [rbp-D0h] long long j; // [rsp+10h] [rbp-C0h] long long i; // [rsp+18h] [rbp-B8h] long long v6; // [rsp+20h] [rbp-B0h] long long v7; // [rsp+28h] [rbp-A8h] long long v8; // [rsp+60h] [rbp-70h] long long v9; // [rsp+68h] [rbp-68h] long long v10; // [rsp+70h] [rbp-60h] long long v11; // [rsp+B0h] [rbp-20h] long long v12; // [rsp+B8h] [rbp-18h] v12 = a2[19]; v11 = *(_QWORD *)(v12 + 16); v10 = a2[2]; v9 = a2[3]; v8 = a2[4]; v7 = *(_QWORD *)(v12 + 248); v6 = a2[31]; for ( i = 0LL; ; ++i ) { result = i; if ( i >= v8 ) break; for ( j = 0LL; j < v9; ++j ) { for ( k = 0LL; k < v10; ++k ) *(_WORD *)(v6 + 2 * (k + v10 * j + v10 * v9 * i)) = *(_WORD *)(v7 + 2 * (k + v11 * (i + v9 - j - 1))); } } return result; }
ggml_compute_forward_get_rel_pos_f16: PUSH RBP MOV RBP,RSP SUB RSP,0x50 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 RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RBP + -0xb0],RAX MOV qword ptr [RBP + -0xb8],0x0 LAB_0013b052: MOV RAX,qword ptr [RBP + -0xb8] CMP RAX,qword ptr [RBP + -0x70] JGE 0x0013b14d MOV qword ptr [RBP + -0xc0],0x0 LAB_0013b06e: MOV RAX,qword ptr [RBP + -0xc0] CMP RAX,qword ptr [RBP + -0x68] JGE 0x0013b134 MOV RAX,qword ptr [RBP + -0xa0] SUB RAX,qword ptr [RBP + -0xc0] SUB RAX,0x1 ADD RAX,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0xc8],RAX MOV qword ptr [RBP + -0xd0],0x0 LAB_0013b0aa: MOV RAX,qword ptr [RBP + -0xd0] CMP RAX,qword ptr [RBP + -0x60] JGE 0x0013b11b MOV RAX,qword ptr [RBP + -0xa8] MOV RCX,qword ptr [RBP + -0xc8] IMUL RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RBP + -0xd0] MOV DX,word ptr [RAX + RCX*0x2] MOV RAX,qword ptr [RBP + -0xb0] MOV RCX,qword ptr [RBP + -0xb8] IMUL RCX,qword ptr [RBP + -0x68] IMUL RCX,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0xc0] IMUL RSI,qword ptr [RBP + -0x60] ADD RCX,RSI ADD RCX,qword ptr [RBP + -0xd0] MOV word ptr [RAX + RCX*0x2],DX MOV RAX,qword ptr [RBP + -0xd0] ADD RAX,0x1 MOV qword ptr [RBP + -0xd0],RAX JMP 0x0013b0aa LAB_0013b11b: JMP 0x0013b11d LAB_0013b11d: MOV RAX,qword ptr [RBP + -0xc0] ADD RAX,0x1 MOV qword ptr [RBP + -0xc0],RAX JMP 0x0013b06e LAB_0013b134: JMP 0x0013b136 LAB_0013b136: MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x1 MOV qword ptr [RBP + -0xb8],RAX JMP 0x0013b052 LAB_0013b14d: ADD RSP,0x50 POP RBP RET
void ggml_compute_forward_get_rel_pos_f16(int8 param_1,long param_2) { long lVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; int8 local_d8; int8 local_c8; int8 local_c0; lVar1 = *(long *)(*(long *)(param_2 + 0x98) + 0x10); lVar2 = *(long *)(param_2 + 0x10); lVar3 = *(long *)(param_2 + 0x18); lVar4 = *(long *)(param_2 + 0x20); lVar5 = *(long *)(*(long *)(param_2 + 0x98) + 0xf8); lVar6 = *(long *)(param_2 + 0xf8); for (local_c0 = 0; local_c0 < lVar4; local_c0 = local_c0 + 1) { for (local_c8 = 0; local_c8 < lVar3; local_c8 = local_c8 + 1) { for (local_d8 = 0; local_d8 < lVar2; local_d8 = local_d8 + 1) { *(int2 *)(lVar6 + (local_c0 * lVar3 * lVar2 + local_c8 * lVar2 + local_d8) * 2) = *(int2 *)(lVar5 + (((lVar3 - local_c8) + -1 + local_c0) * lVar1 + local_d8) * 2); } } } return; }
17,113
ft_nlq_read_next
eloqsql/storage/myisam/ft_nlq_search.c
int ft_nlq_read_next(FT_INFO *handler, char *record) { MI_INFO *info= (MI_INFO *) handler->info; if (++handler->curdoc >= handler->ndocs) { --handler->curdoc; return HA_ERR_END_OF_FILE; } info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->lastpos=handler->doc[handler->curdoc].dpos; if (!(*info->read_record)(info,info->lastpos,(uchar*) record)) { info->update|= HA_STATE_AKTIV; /* Record is read */ return 0; } return my_errno; }
O3
c
ft_nlq_read_next: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq 0x8(%rdi), %rbx movl 0x14(%rdi), %eax leal 0x1(%rax), %ecx movl %ecx, 0x14(%rdi) cmpl 0x10(%rdi), %ecx jge 0x4cbd9 movq %rsi, %rdx andl $0x401, 0x1d0(%rbx) # imm = 0x401 movslq 0x14(%rdi), %rax shlq $0x4, %rax movq 0x18(%rdi,%rax), %rsi movq %rsi, 0x170(%rbx) movq %rbx, %rdi callq *0x140(%rbx) testl %eax, %eax je 0x4cbe3 callq 0x5be8e movl (%rax), %eax jmp 0x4cbec movl %eax, 0x14(%rdi) movl $0x89, %eax jmp 0x4cbec orb $0x2, 0x1d0(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
ft_nlq_read_next: push rbp mov rbp, rsp push rbx push rax mov rbx, [rdi+8] mov eax, [rdi+14h] lea ecx, [rax+1] mov [rdi+14h], ecx cmp ecx, [rdi+10h] jge short loc_4CBD9 mov rdx, rsi and dword ptr [rbx+1D0h], 401h movsxd rax, dword ptr [rdi+14h] shl rax, 4 mov rsi, [rdi+rax+18h] mov [rbx+170h], rsi mov rdi, rbx call qword ptr [rbx+140h] test eax, eax jz short loc_4CBE3 call _my_thread_var mov eax, [rax] jmp short loc_4CBEC loc_4CBD9: mov [rdi+14h], eax mov eax, 89h jmp short loc_4CBEC loc_4CBE3: or byte ptr [rbx+1D0h], 2 xor eax, eax loc_4CBEC: add rsp, 8 pop rbx pop rbp retn
long long ft_nlq_read_next(long long a1, long long a2) { long long v2; // rbx int v3; // eax long long v5; // rsi v2 = *(_QWORD *)(a1 + 8); v3 = *(_DWORD *)(a1 + 20); *(_DWORD *)(a1 + 20) = v3 + 1; if ( v3 + 1 >= *(_DWORD *)(a1 + 16) ) { *(_DWORD *)(a1 + 20) = v3; return 137LL; } else { *(_DWORD *)(v2 + 464) &= 0x401u; v5 = *(_QWORD *)(a1 + 16LL * *(int *)(a1 + 20) + 24); *(_QWORD *)(v2 + 368) = v5; if ( (*(unsigned int ( **)(long long, long long, long long))(v2 + 320))(v2, v5, a2) ) { return *(unsigned int *)my_thread_var(v2); } else { *(_BYTE *)(v2 + 464) |= 2u; return 0LL; } } }
ft_nlq_read_next: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,qword ptr [RDI + 0x8] MOV EAX,dword ptr [RDI + 0x14] LEA ECX,[RAX + 0x1] MOV dword ptr [RDI + 0x14],ECX CMP ECX,dword ptr [RDI + 0x10] JGE 0x0014cbd9 MOV RDX,RSI AND dword ptr [RBX + 0x1d0],0x401 MOVSXD RAX,dword ptr [RDI + 0x14] SHL RAX,0x4 MOV RSI,qword ptr [RDI + RAX*0x1 + 0x18] MOV qword ptr [RBX + 0x170],RSI MOV RDI,RBX CALL qword ptr [RBX + 0x140] TEST EAX,EAX JZ 0x0014cbe3 CALL 0x0015be8e MOV EAX,dword ptr [RAX] JMP 0x0014cbec LAB_0014cbd9: MOV dword ptr [RDI + 0x14],EAX MOV EAX,0x89 JMP 0x0014cbec LAB_0014cbe3: OR byte ptr [RBX + 0x1d0],0x2 XOR EAX,EAX LAB_0014cbec: ADD RSP,0x8 POP RBX POP RBP RET
int4 ft_nlq_read_next(long param_1,int8 param_2) { int iVar1; long lVar2; int8 uVar3; int iVar4; int4 uVar5; int4 *puVar6; lVar2 = *(long *)(param_1 + 8); iVar1 = *(int *)(param_1 + 0x14); iVar4 = iVar1 + 1; *(int *)(param_1 + 0x14) = iVar4; if (iVar4 < *(int *)(param_1 + 0x10)) { *(uint *)(lVar2 + 0x1d0) = *(uint *)(lVar2 + 0x1d0) & 0x401; uVar3 = *(int8 *)(param_1 + 0x18 + (long)*(int *)(param_1 + 0x14) * 0x10); *(int8 *)(lVar2 + 0x170) = uVar3; iVar4 = (**(code **)(lVar2 + 0x140))(lVar2,uVar3,param_2); if (iVar4 == 0) { *(byte *)(lVar2 + 0x1d0) = *(byte *)(lVar2 + 0x1d0) | 2; uVar5 = 0; } else { puVar6 = (int4 *)_my_thread_var(); uVar5 = *puVar6; } } else { *(int *)(param_1 + 0x14) = iVar1; uVar5 = 0x89; } return uVar5; }
17,114
print_mysql_datetime_value(String*, enum_field_types, unsigned char const*, unsigned long)
eloqsql/plugin/type_mysql_json/mysql_json.cc
static bool print_mysql_datetime_value(String *buffer, enum_field_types type, const uchar *data, size_t len) { if (len < 8) return true; MYSQL_TIME t; switch (type) { case MYSQL_TYPE_TIME: TIME_from_longlong_time_packed(&t, sint8korr(data)); break; case MYSQL_TYPE_DATE: TIME_from_longlong_date_packed(&t, sint8korr(data)); break; case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: TIME_from_longlong_datetime_packed(&t, sint8korr(data)); break; default: DBUG_ASSERT(0); return true; } /* Wrap all datetime strings within double quotes. */ buffer->append('\"'); buffer->reserve(MAX_DATE_STRING_REP_LENGTH); buffer->length(buffer->length() + my_TIME_to_str(&t, const_cast<char *>(buffer->end()), 6)); buffer->append('\"'); return false; }
O0
cpp
print_mysql_datetime_value(String*, enum_field_types, unsigned char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0x8, -0x28(%rbp) jae 0x10d97 movb $0x1, -0x1(%rbp) jmp 0x10e7f movl -0x14(%rbp), %eax addl $-0x7, %eax movl %eax, %ecx movq %rcx, -0x58(%rbp) subl $0x5, %eax ja 0x10df2 movq -0x58(%rbp), %rax leaq 0x428d(%rip), %rcx # 0x15040 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x20(%rbp), %rax movq (%rax), %rsi leaq -0x50(%rbp), %rdi callq 0xf6a0 jmp 0x10dff movq -0x20(%rbp), %rax movq (%rax), %rsi leaq -0x50(%rbp), %rdi callq 0x10e90 jmp 0x10dff movq -0x20(%rbp), %rax movq (%rax), %rsi leaq -0x50(%rbp), %rdi callq 0xf430 jmp 0x10dff jmp 0x10df4 jmp 0x10df6 movb $0x1, -0x1(%rbp) jmp 0x10e7f movq -0x10(%rbp), %rdi movl $0x22, %esi callq 0xf3d0 movq -0x10(%rbp), %rdi addq $0x8, %rdi movl $0x1e, %esi callq 0xf6d0 movq -0x10(%rbp), %rax addq $0x8, %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi addq $0x8, %rdi callq 0xf1c0 movl %eax, -0x5c(%rbp) movq -0x10(%rbp), %rdi addq $0x8, %rdi callq 0xf480 movq %rax, %rsi leaq -0x50(%rbp), %rdi movl $0x6, %edx callq 0xf590 movq -0x68(%rbp), %rdi movl %eax, %ecx movl -0x5c(%rbp), %eax addl %ecx, %eax movl %eax, %eax movl %eax, %esi callq 0xf7a0 movq -0x10(%rbp), %rdi movl $0x22, %esi callq 0xf3d0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x70, %rsp popq %rbp retq nopw (%rax,%rax)
_ZL26print_mysql_datetime_valueP6String16enum_field_typesPKhm: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_28], 8 jnb short loc_10D97 mov [rbp+var_1], 1 jmp loc_10E7F loc_10D97: mov eax, [rbp+var_14] add eax, 0FFFFFFF9h; switch 6 cases mov ecx, eax mov [rbp+var_58], rcx sub eax, 5 ja short def_10DBA; jumptable 0000000000010DBA default case, cases 8,9 mov rax, [rbp+var_58] lea rcx, jpt_10DBA movsxd rax, ds:(jpt_10DBA - 15040h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_10DBC: mov rax, [rbp+var_20]; jumptable 0000000000010DBA case 11 mov rsi, [rax] lea rdi, [rbp+var_50] call __Z30TIME_from_longlong_time_packedP13st_mysql_timex; TIME_from_longlong_time_packed(st_mysql_time *,long long) jmp short loc_10DFF loc_10DCE: mov rax, [rbp+var_20]; jumptable 0000000000010DBA case 10 mov rsi, [rax] lea rdi, [rbp+var_50] call _ZL30TIME_from_longlong_date_packedP13st_mysql_timex; TIME_from_longlong_date_packed(st_mysql_time *,long long) jmp short loc_10DFF loc_10DE0: mov rax, [rbp+var_20]; jumptable 0000000000010DBA cases 7,12 mov rsi, [rax] lea rdi, [rbp+var_50] call __Z34TIME_from_longlong_datetime_packedP13st_mysql_timex; TIME_from_longlong_datetime_packed(st_mysql_time *,long long) jmp short loc_10DFF def_10DBA: jmp short $+2; jumptable 0000000000010DBA default case, cases 8,9 loc_10DF4: jmp short $+2 loc_10DF6: mov [rbp+var_1], 1 jmp loc_10E7F loc_10DFF: mov rdi, [rbp+var_10]; this mov esi, 22h ; '"'; char call __ZN6String6appendEc; String::append(char) mov rdi, [rbp+var_10] add rdi, 8; this mov esi, 1Eh; unsigned __int64 call __ZN13Binary_string7reserveEm; Binary_string::reserve(ulong) mov rax, [rbp+var_10] add rax, 8 mov [rbp+var_68], rax mov rdi, [rbp+var_10] add rdi, 8; this call __ZNK13Binary_string6lengthEv; Binary_string::length(void) mov [rbp+var_5C], eax mov rdi, [rbp+var_10] add rdi, 8; this call __ZNK13Binary_string3endEv; Binary_string::end(void) mov rsi, rax lea rdi, [rbp+var_50] mov edx, 6 call _my_TIME_to_str mov rdi, [rbp+var_68]; this mov ecx, eax mov eax, [rbp+var_5C] add eax, ecx mov eax, eax mov esi, eax; unsigned __int64 call __ZN13Binary_string6lengthEm; Binary_string::length(ulong) mov rdi, [rbp+var_10]; this mov esi, 22h ; '"'; char call __ZN6String6appendEc; String::append(char) mov [rbp+var_1], 0 loc_10E7F: mov al, [rbp+var_1] and al, 1 add rsp, 70h pop rbp retn
char print_mysql_datetime_value(String *a1, int a2, _QWORD *a3, unsigned long long a4) { long long v4; // rax int v5; // eax Binary_string *v7; // [rsp+8h] [rbp-68h] int v8; // [rsp+14h] [rbp-5Ch] _BYTE v9[40]; // [rsp+20h] [rbp-50h] BYREF unsigned long long v10; // [rsp+48h] [rbp-28h] _QWORD *v11; // [rsp+50h] [rbp-20h] int v12; // [rsp+5Ch] [rbp-14h] String *v13; // [rsp+60h] [rbp-10h] char v14; // [rsp+6Fh] [rbp-1h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; if ( a4 < 8 ) return 1; switch ( v12 ) { case 7: case 12: TIME_from_longlong_datetime_packed(v9, *v11); goto LABEL_8; case 10: TIME_from_longlong_date_packed(v9, *v11); goto LABEL_8; case 11: TIME_from_longlong_time_packed(v9, *v11); LABEL_8: String::append(v13, 34); Binary_string::reserve((String *)((char *)v13 + 8), 0x1EuLL); v7 = (String *)((char *)v13 + 8); v8 = Binary_string::length((String *)((char *)v13 + 8)); v4 = Binary_string::end((String *)((char *)v13 + 8)); v5 = my_TIME_to_str(v9, v4, 6LL); Binary_string::length(v7, (unsigned int)(v5 + v8)); String::append(v13, 34); v14 = 0; break; default: v14 = 1; break; } return v14; }
print_mysql_datetime_value: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x28],0x8 JNC 0x00110d97 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e7f LAB_00110d97: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,-0x7 MOV ECX,EAX MOV qword ptr [RBP + -0x58],RCX SUB EAX,0x5 JA 0x00110df2 MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[0x115040] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_110dbc: MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0x50] CALL 0x0010f6a0 JMP 0x00110dff caseD_110dce: MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0x50] CALL 0x00110e90 JMP 0x00110dff caseD_110de0: MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0x50] CALL 0x0010f430 JMP 0x00110dff caseD_110df2: JMP 0x00110df4 LAB_00110df4: JMP 0x00110df6 LAB_00110df6: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e7f LAB_00110dff: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x22 CALL 0x0010f3d0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 MOV ESI,0x1e CALL 0x0010f6d0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 CALL 0x0010f1c0 MOV dword ptr [RBP + -0x5c],EAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 CALL 0x0010f480 MOV RSI,RAX LEA RDI,[RBP + -0x50] MOV EDX,0x6 CALL 0x0010f590 MOV RDI,qword ptr [RBP + -0x68] MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,ECX MOV EAX,EAX MOV ESI,EAX CALL 0x0010f7a0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x22 CALL 0x0010f3d0 MOV byte ptr [RBP + -0x1],0x0 LAB_00110e7f: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x70 POP RBP RET
/* print_mysql_datetime_value(String*, enum_field_types, unsigned char const*, unsigned long) */ int1 print_mysql_datetime_value(String *param_1,int param_2,longlong *param_3,ulong param_4) { int iVar1; int iVar2; Binary_string *this; int8 uVar3; st_mysql_time local_58 [40]; ulong local_30; longlong *local_28; int local_1c; String *local_18; int1 local_9; if (param_4 < 8) { return 1; } if (param_2 - 7U < 5 || param_2 == 0xc) { local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; switch((long)&switchD_00110dba::switchdataD_00115040 + (long)(int)(&switchD_00110dba::switchdataD_00115040)[param_2 - 7U]) { case 0x110dbc: TIME_from_longlong_time_packed(local_58,*param_3); break; case 0x110dce: TIME_from_longlong_date_packed(local_58,*param_3); break; case 0x110de0: TIME_from_longlong_datetime_packed(local_58,*param_3); break; case 0x110df2: goto LAB_00110df6; } String::append(local_18,'\"'); Binary_string::reserve((Binary_string *)(local_18 + 8),0x1e); this = (Binary_string *)(local_18 + 8); iVar1 = Binary_string::length((Binary_string *)(local_18 + 8)); uVar3 = Binary_string::end((Binary_string *)(local_18 + 8)); iVar2 = my_TIME_to_str(local_58,uVar3,6); Binary_string::length(this,(ulong)(uint)(iVar1 + iVar2)); String::append(local_18,'\"'); local_9 = 0; } else { LAB_00110df6: local_9 = 1; } return local_9; }
17,115
google::protobuf::compiler::objectivec::(anonymous namespace)::SetPrimitiveVariables(google::protobuf::FieldDescriptor const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
void SetPrimitiveVariables(const FieldDescriptor* descriptor, std::map<std::string, std::string>* variables) { std::string primitive_name = PrimitiveTypeName(descriptor); (*variables)["type"] = primitive_name; (*variables)["storage_type"] = primitive_name; }
O3
cpp
google::protobuf::compiler::objectivec::(anonymous namespace)::SetPrimitiveVariables(google::protobuf::FieldDescriptor const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rsi, %rbx movq %rdi, %r14 movq 0x18(%rdi), %rdi testq %rdi, %rdi je 0xf1746 leaq 0x48503(%rip), %rax # 0x139c34 leaq 0x8(%rsp), %rsi movq %rax, (%rsi) leaq 0x40(%rsp), %rdx movq %r14, (%rdx) callq 0x2f19d movzbl 0x2(%r14), %edi callq 0x4ce97 cmpl $0xb, %eax jae 0xf1764 movl %eax, %eax leaq 0x189482(%rip), %rcx # 0x27abe0 movq (%rcx,%rax,8), %rsi jmp 0xf17aa leaq 0xf55b9(%rip), %rdx # 0x1e6d24 leaq 0x8(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x4e, %ecx callq 0x1072ba leaq 0xabe95(%rip), %rsi # 0x19d61e movq %r14, %rdi callq 0x106db8 leaq 0x40(%rsp), %rdi movq %rax, %rsi callq 0x106e92 leaq 0x8(%rsp), %rdi callq 0x1072d8 xorl %esi, %esi leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x1f1d0 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x10258e(%rip), %rsi # 0x1f3d57 leaq 0x10258b(%rip), %rdx # 0x1f3d5b leaq 0x8(%rsp), %rdi callq 0x250b2 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x2e310 leaq 0x48(%rsp), %rsi movq %rax, %rdi callq 0x1f260 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0xf1803 callq 0x1f4a0 leaq 0x8(%rsp), %rdi movq %r14, (%rdi) leaq 0xf4e49(%rip), %rsi # 0x1e665b leaq 0xf4e4e(%rip), %rdx # 0x1e6667 callq 0x250b2 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x2e310 leaq 0x48(%rsp), %rsi movq %rax, %rdi callq 0x1f260 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0xf1847 callq 0x1f4a0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf185a callq 0x1f4a0 addq $0x68, %rsp popq %rbx popq %r14 retq jmp 0xf1864 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x1072d8 jmp 0xf18a6 jmp 0xf1875 movq %rax, %rbx jmp 0xf1893 movq %rax, %rbx jmp 0xf18a6 jmp 0xf1881 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0xf1893 callq 0x1f4a0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf18a6 callq 0x1f4a0 movq %rbx, %rdi callq 0x1f860
_ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_121SetPrimitiveVariablesEPKNS0_15FieldDescriptorEPSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4lessISD_ESaISt4pairIKSD_SD_EEE: push r14 push rbx sub rsp, 68h mov rbx, rsi mov r14, rdi mov rdi, [rdi+18h] test rdi, rdi jz short loc_F1746 lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) lea rsi, [rsp+78h+var_70] mov [rsi], rax lea rdx, [rsp+78h+var_38] mov [rdx], r14 call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_F1746: movzx edi, byte ptr [r14+2] call _ZN6google8protobuf8compiler10objectivec17GetObjectiveCTypeENS0_15FieldDescriptor4TypeE; google::protobuf::compiler::objectivec::GetObjectiveCType(google::protobuf::FieldDescriptor::Type) cmp eax, 0Bh jnb short loc_F1764 mov eax, eax lea rcx, off_27ABE0; "int32_t" mov rsi, [rcx+rax*8] jmp short loc_F17AA loc_F1764: lea rdx, aWorkspaceLlm4b_43; "/workspace/llm4binary/github2025/aimrt_"... lea r14, [rsp+78h+var_70] mov rdi, r14 mov esi, 3 mov ecx, 4Eh ; 'N' call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCanTGetHere; "Can't get here." mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+78h+var_38] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+78h+var_70]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() xor esi, esi loc_F17AA: lea rdi, [rsp+78h+var_30] lea rdx, [rsp+78h+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea r14, [rsp+78h+var_60] mov [r14-10h], r14 lea rsi, aWrongSubmessag+11h; "type" lea rdx, aWrongSubmessag+15h; "" lea rdi, [rsp+78h+var_70] 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 rsi, [rsp+78h+var_70] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) lea rsi, [rsp+78h+var_30] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+78h+var_70]; void * cmp rdi, r14 jz short loc_F1803 call __ZdlPv; operator delete(void *) loc_F1803: lea rdi, [rsp+78h+var_70] mov [rdi], r14 lea rsi, aArrayStorageTy+6; "storage_type" lea rdx, aArrayStorageTy+12h; "" 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 rsi, [rsp+78h+var_70] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) lea rsi, [rsp+78h+var_30] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+78h+var_70]; void * cmp rdi, r14 jz short loc_F1847 call __ZdlPv; operator delete(void *) loc_F1847: lea rax, [rsp+78h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F185A call __ZdlPv; operator delete(void *) loc_F185A: add rsp, 68h pop rbx pop r14 retn jmp short $+2 loc_F1864: mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() jmp short loc_F18A6 jmp short $+2 loc_F1875: mov rbx, rax jmp short loc_F1893 mov rbx, rax jmp short loc_F18A6 jmp short $+2 loc_F1881: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_F1893 call __ZdlPv; operator delete(void *) loc_F1893: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F18A6 call __ZdlPv; operator delete(void *) loc_F18A6: mov rdi, rbx call __Unwind_Resume
void google::protobuf::compiler::objectivec::`anonymous namespace'::SetPrimitiveVariables( long long a1, long long a2) { long long v4; // rdi unsigned int ObjectiveCType; // eax long long v6; // rsi long long v7; // rax long long v8; // rax long long v9; // rax void *v10[2]; // [rsp+8h] [rbp-70h] BYREF _BYTE v11[40]; // [rsp+18h] [rbp-60h] BYREF long long v12; // [rsp+40h] [rbp-38h] BYREF void *v13[2]; // [rsp+48h] [rbp-30h] BYREF char v14; // [rsp+58h] [rbp-20h] BYREF v4 = *(_QWORD *)(a1 + 24); if ( v4 ) { v10[0] = google::protobuf::FieldDescriptor::TypeOnceInit; v12 = a1; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v4, (long long)v10, (long long)&v12); } ObjectiveCType = google::protobuf::compiler::objectivec::GetObjectiveCType(*(unsigned __int8 *)(a1 + 2)); if ( ObjectiveCType >= 0xB ) { google::protobuf::internal::LogMessage::LogMessage( v10, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objec" "tivec_primitive_field.cc", 78LL); v7 = google::protobuf::internal::LogMessage::operator<<(v10, "Can't get here."); google::protobuf::internal::LogFinisher::operator=(&v12, v7); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v10); v6 = 0LL; } else { v6 = (long long)*(&off_27ABE0 + ObjectiveCType); } std::string::basic_string(v13, v6, v10); v10[0] = v11; std::string::_M_construct<char const*>((long long)v10, "type", (long long)""); v8 = std::map<std::string,std::string>::operator[](a2, (long long)v10); std::string::_M_assign(v8, v13); if ( v10[0] != v11 ) operator delete(v10[0]); v10[0] = v11; std::string::_M_construct<char const*>((long long)v10, "storage_type", (long long)""); v9 = std::map<std::string,std::string>::operator[](a2, (long long)v10); std::string::_M_assign(v9, v13); if ( v10[0] != v11 ) operator delete(v10[0]); if ( v13[0] != &v14 ) operator delete(v13[0]); }
SetPrimitiveVariables: PUSH R14 PUSH RBX SUB RSP,0x68 MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x18] TEST RDI,RDI JZ 0x001f1746 LEA RAX,[0x239c34] LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX LEA RDX,[RSP + 0x40] MOV qword ptr [RDX],R14 CALL 0x0012f19d LAB_001f1746: MOVZX EDI,byte ptr [R14 + 0x2] CALL 0x0014ce97 CMP EAX,0xb JNC 0x001f1764 MOV EAX,EAX LEA RCX,[0x37abe0] MOV RSI,qword ptr [RCX + RAX*0x8] JMP 0x001f17aa LAB_001f1764: LEA RDX,[0x2e6d24] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,0x3 MOV ECX,0x4e CALL 0x002072ba LAB_001f1782: LEA RSI,[0x29d61e] MOV RDI,R14 CALL 0x00206db8 LAB_001f1791: LEA RDI,[RSP + 0x40] MOV RSI,RAX CALL 0x00206e92 LEA RDI,[RSP + 0x8] CALL 0x002072d8 XOR ESI,ESI LAB_001f17aa: LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] CALL 0x0011f1d0 LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 LAB_001f17c2: LEA RSI,[0x2f3d57] LEA RDX,[0x2f3d5b] LEA RDI,[RSP + 0x8] CALL 0x001250b2 LAB_001f17da: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0012e310 LEA RSI,[RSP + 0x48] MOV RDI,RAX CALL 0x0011f260 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x001f1803 CALL 0x0011f4a0 LAB_001f1803: LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R14 LAB_001f180b: LEA RSI,[0x2e665b] LEA RDX,[0x2e6667] CALL 0x001250b2 LAB_001f181e: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0012e310 LEA RSI,[RSP + 0x48] MOV RDI,RAX CALL 0x0011f260 LAB_001f1838: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x001f1847 CALL 0x0011f4a0 LAB_001f1847: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001f185a CALL 0x0011f4a0 LAB_001f185a: ADD RSP,0x68 POP RBX POP R14 RET
/* google::protobuf::compiler::objectivec::(anonymous namespace)::SetPrimitiveVariables(google::protobuf::FieldDescriptor const*, std::map<std::__cxx11::string, std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >*) */ void google::protobuf::compiler::objectivec::(anonymous_namespace)::SetPrimitiveVariables (FieldDescriptor *param_1,map *param_2) { uint uVar1; LogMessage *pLVar2; string *psVar3; char *pcVar4; code *local_70 [2]; int1 local_60 [40]; FieldDescriptor *local_38; int1 *local_30 [2]; int1 local_20 [16]; if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) { local_70[0] = FieldDescriptor::TypeOnceInit; local_38 = param_1; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)local_70,&local_38) ; } uVar1 = GetObjectiveCType(param_1[2]); if (uVar1 < 0xb) { pcVar4 = (&PTR_s_int32_t_0037abe0)[uVar1]; } else { internal::LogMessage::LogMessage ((LogMessage *)local_70,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc" ,0x4e); /* try { // try from 001f1782 to 001f1790 has its CatchHandler @ 001f1864 */ pLVar2 = (LogMessage *) internal::LogMessage::operator<<((LogMessage *)local_70,"Can\'t get here."); /* try { // try from 001f1791 to 001f179d has its CatchHandler @ 001f1862 */ internal::LogFinisher::operator=((LogFinisher *)&local_38,pLVar2); internal::LogMessage::~LogMessage((LogMessage *)local_70); pcVar4 = (char *)0x0; } /* try { // try from 001f17aa to 001f17b8 has its CatchHandler @ 001f187a */ std::__cxx11::string::string((string *)local_30,pcVar4,(allocator *)local_70); /* try { // try from 001f17c2 to 001f17d9 has its CatchHandler @ 001f1875 */ local_70[0] = (code *)local_60; std::__cxx11::string::_M_construct<char_const*>(local_70,"type",""); /* try { // try from 001f17da to 001f17f3 has its CatchHandler @ 001f1881 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)param_2,(string *)local_70); std::__cxx11::string::_M_assign(psVar3); if (local_70[0] != (code *)local_60) { operator_delete(local_70[0]); } local_70[0] = (code *)local_60; /* try { // try from 001f180b to 001f181d has its CatchHandler @ 001f1873 */ std::__cxx11::string::_M_construct<char_const*>(local_70,"storage_type",""); /* try { // try from 001f181e to 001f1837 has its CatchHandler @ 001f187f */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)param_2,(string *)local_70); std::__cxx11::string::_M_assign(psVar3); if (local_70[0] != (code *)local_60) { operator_delete(local_70[0]); } if (local_30[0] != local_20) { operator_delete(local_30[0]); } return; }
17,116
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
llama.cpp/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 0x1d3f0 leaq 0x40(%rsp), %rdi leaq 0x271e6(%rip), %rsi # 0xd8e04 movl $0x2, %edx callq 0x1ddc0 movq (%rbx), %r12 movq 0x8(%rbx), %r15 cmpq %r15, %r12 je 0xb1d1e movb $0x1, %al movl $0xd1b71759, %r14d # imm = 0xD1B71759 movl (%r12), %r13d testb $0x1, %al jne 0xb1c5e movl $0x2, %edx leaq 0x40(%rsp), %rdi leaq 0x278ad(%rip), %rsi # 0xd9506 callq 0x1ddc0 movl %r13d, %ebp negl %ebp cmovsl %r13d, %ebp movl $0x1, %ebx cmpl $0xa, %ebp jb 0xb1cad movl $0x4, %ebx movl %ebp, %eax cmpl $0x63, %eax jbe 0xb1ca6 cmpl $0x3e7, %eax # imm = 0x3E7 jbe 0xb1cab cmpl $0x2710, %eax # imm = 0x2710 jb 0xb1cad movl %eax, %ecx imulq %r14, %rcx shrq $0x2d, %rcx addl $0x4, %ebx cmpl $0x1869f, %eax # imm = 0x1869F movl %ecx, %eax ja 0xb1c78 addl $-0x3, %ebx jmp 0xb1cad addl $-0x2, %ebx jmp 0xb1cad 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 0x1d820 addq 0x8(%rsp), %r13 movq %r13, %rdi movl %ebx, %esi movl %ebp, %edx callq 0x26e80 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x1ddc0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0xb1d0f movq 0x18(%rsp), %rsi incq %rsi callq 0x1d160 addq $0x4, %r12 xorl %eax, %eax cmpq %r15, %r12 jne 0xb1c40 leaq 0x270e2(%rip), %rsi # 0xd8e07 movl $0x2, %edx leaq 0x40(%rsp), %rdi callq 0x1ddc0 movq 0x28(%rsp), %rbx leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x1d530 movq 0x59253(%rip), %rsi # 0x10afa0 leaq 0x30(%rsp), %rdi callq 0x1da70 leaq 0xb0(%rsp), %rdi callq 0x1d9f0 movq %rbx, %rax addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xb1d7d jmp 0xb1d7d movq %rax, %rbx jmp 0xb1da9 movq %rax, %rdi callq 0x232f3 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0xb1da9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1d160 movq 0x591f0(%rip), %rsi # 0x10afa0 leaq 0x30(%rsp), %rdi callq 0x1da70 leaq 0xb0(%rsp), %rdi callq 0x1d9f0 movq %rbx, %rdi callq 0x1d8e0
_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_D8E04; "[ " 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_B1D1E mov al, 1 mov r14d, 0D1B71759h loc_B1C40: mov r13d, [r12] test al, 1 jnz short loc_B1C5E 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_B1C5E: mov ebp, r13d neg ebp cmovs ebp, r13d mov ebx, 1 cmp ebp, 0Ah jb short loc_B1CAD mov ebx, 4 mov eax, ebp loc_B1C78: cmp eax, 63h ; 'c' jbe short loc_B1CA6 cmp eax, 3E7h jbe short loc_B1CAB cmp eax, 2710h jb short loc_B1CAD mov ecx, eax imul rcx, r14 shr rcx, 2Dh add ebx, 4 cmp eax, 1869Fh mov eax, ecx ja short loc_B1C78 add ebx, 0FFFFFFFDh jmp short loc_B1CAD loc_B1CA6: add ebx, 0FFFFFFFEh jmp short loc_B1CAD loc_B1CAB: dec ebx loc_B1CAD: 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_B1D0F mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1D0F: add r12, 4 xor eax, eax cmp r12, r15 jnz loc_B1C40 loc_B1D1E: lea rsi, asc_D8E07; " ]" 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_B1D7D jmp short $+2 loc_B1D7D: mov rbx, rax jmp short loc_B1DA9 mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, [rsp+1E8h+var_1E0]; void * lea rax, [rsp+1E8h+var_1D0] cmp rdi, rax jz short loc_B1DA9 mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1DA9: 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 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 0x0011d3f0 LEA RDI,[RSP + 0x40] LAB_001b1c17: LEA RSI,[0x1d8e04] MOV EDX,0x2 CALL 0x0011ddc0 MOV R12,qword ptr [RBX] MOV R15,qword ptr [RBX + 0x8] CMP R12,R15 JZ 0x001b1d1e MOV AL,0x1 MOV R14D,0xd1b71759 LAB_001b1c40: MOV R13D,dword ptr [R12] TEST AL,0x1 JNZ 0x001b1c5e LAB_001b1c48: MOV EDX,0x2 LEA RDI,[RSP + 0x40] LEA RSI,[0x1d9506] CALL 0x0011ddc0 LAB_001b1c5e: MOV EBP,R13D NEG EBP CMOVS EBP,R13D MOV EBX,0x1 CMP EBP,0xa JC 0x001b1cad MOV EBX,0x4 MOV EAX,EBP LAB_001b1c78: CMP EAX,0x63 JBE 0x001b1ca6 CMP EAX,0x3e7 JBE 0x001b1cab CMP EAX,0x2710 JC 0x001b1cad MOV ECX,EAX IMUL RCX,R14 SHR RCX,0x2d ADD EBX,0x4 CMP EAX,0x1869f MOV EAX,ECX JA 0x001b1c78 ADD EBX,-0x3 JMP 0x001b1cad LAB_001b1ca6: ADD EBX,-0x2 JMP 0x001b1cad LAB_001b1cab: DEC EBX LAB_001b1cad: SHR R13D,0x1f LEA ESI,[RBX + R13*0x1] LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX LAB_001b1cbf: LEA RDI,[RSP + 0x8] MOV EDX,0x2d CALL 0x0011d820 ADD R13,qword ptr [RSP + 0x8] MOV RDI,R13 MOV ESI,EBX MOV EDX,EBP CALL 0x00126e80 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001b1ce9: LEA RDI,[RSP + 0x40] CALL 0x0011ddc0 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001b1d0f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011d160 LAB_001b1d0f: ADD R12,0x4 XOR EAX,EAX CMP R12,R15 JNZ 0x001b1c40 LAB_001b1d1e: LEA RSI,[0x1d8e07] MOV EDX,0x2 LEA RDI,[RSP + 0x40] CALL 0x0011ddc0 MOV RBX,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x0011d530 LAB_001b1d46: MOV RSI,qword ptr [0x0020afa0] LEA RDI,[RSP + 0x30] CALL 0x0011da70 LEA RDI,[RSP + 0xb0] CALL 0x0011d9f0 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 001b1c17 to 001b1c27 has its CatchHandler @ 001b1d79 */ 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 001b1c48 to 001b1c5d has its CatchHandler @ 001b1d7d */ 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_001b1cad; } if (uVar7 < 1000) { uVar9 = uVar9 - 1; goto LAB_001b1cad; } if (uVar7 < 10000) goto LAB_001b1cad; uVar8 = uVar8 / 10000; uVar5 = uVar9 + 4; } while (99999 < uVar7); uVar9 = uVar9 + 1; } LAB_001b1cad: local_1e0 = local_1d0; /* try { // try from 001b1cbf to 001b1ccd has its CatchHandler @ 001b1d82 */ 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 001b1ce9 to 001b1cf2 has its CatchHandler @ 001b1d8a */ 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 001b1d1e to 001b1d45 has its CatchHandler @ 001b1d7b */ 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; }
17,117
emit_ic
bluesky950520[P]quickjs/quickjs.c
static void emit_ic(JSParseState *s, JSAtom atom) { uint32_t h; JSContext *ctx; JSInlineCache *ic; JSInlineCacheHashSlot *ch; ic = s->cur_func->ic; ctx = s->ctx; if (ic->count + 1 >= ic->capacity && resize_ic_hash(ctx, ic)) return; h = get_index_hash(atom, ic->hash_bits); for (ch = ic->hash[h]; ch != NULL; ch = ch->next) if (ch->atom == atom) return; ch = js_malloc(ctx, sizeof(*ch)); if (unlikely(!ch)) return; ch->atom = JS_DupAtom(ctx, atom); ch->index = 0; ch->next = ic->hash[h]; ic->hash[h] = ch; ic->count += 1; }
O1
c
emit_ic: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %esi, %ebx movq (%rdi), %r14 movq 0x90(%rdi), %rax movq 0x230(%rax), %r12 movl (%r12), %eax incl %eax cmpl 0x4(%r12), %eax jae 0x11b2c imull $0x9e370001, %ebx, %r15d # imm = 0x9E370001 xorl %ecx, %ecx subb 0x8(%r12), %cl shrl %cl, %r15d movq 0x10(%r12), %rax movq (%rax,%r15,8), %rax testq %rax, %rax je 0x11adf cmpl %ebx, (%rax) je 0x11b22 movq 0x8(%rax), %rax jmp 0x11ad0 pushq $0x10 popq %rsi movq %r14, %rdi callq 0xed5d testq %rax, %rax je 0x11b22 cmpl $0xe0, %ebx jl 0x11b07 movq 0x18(%r14), %rcx movq 0x68(%rcx), %rcx movl %ebx, %edx movq (%rcx,%rdx,8), %rcx incl (%rcx) movl %ebx, (%rax) andl $0x0, 0x4(%rax) movq 0x10(%r12), %rcx movq (%rcx,%r15,8), %rdx movq %rdx, 0x8(%rax) movq %rax, (%rcx,%r15,8) incl (%r12) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movb 0x8(%r12), %cl incb %cl pushq $0x1 popq %r13 shll %cl, %r13d leaq (,%r13,8), %rsi movq %r14, %rdi callq 0xed7d testq %rax, %rax je 0x11b22 movq %rax, %r15 movl 0x4(%r12), %eax movl 0x8(%r12), %edx leal 0x1(%rdx), %ecx movl %ecx, 0x8(%r12) testq %rax, %rax je 0x11ba6 pushq $0x1f popq %rcx subl %edx, %ecx xorl %edx, %edx movq 0x10(%r12), %rsi movq (%rsi,%rdx,8), %rsi testq %rsi, %rsi je 0x11b9e imull $0x9e370001, (%rsi), %edi # imm = 0x9E370001 shrl %cl, %edi movq 0x8(%rsi), %r8 movq (%r15,%rdi,8), %r9 movq %r9, 0x8(%rsi) movq %rsi, (%r15,%rdi,8) movq %r8, %rsi testq %r8, %r8 jne 0x11b7e incq %rdx cmpq %rax, %rdx jne 0x11b70 movq 0x10(%r12), %rsi movq %r14, %rdi callq 0x1bf85 movq %r15, 0x10(%r12) movl %r13d, 0x4(%r12) testq %r15, %r15 jne 0x11ab6 jmp 0x11b22
emit_ic: push r15 push r14 push r13 push r12 push rbx mov ebx, esi mov r14, [rdi] mov rax, [rdi+90h] mov r12, [rax+230h] mov eax, [r12] inc eax cmp eax, [r12+4] jnb short loc_11B2C loc_11AB6: imul r15d, ebx, 9E370001h xor ecx, ecx sub cl, [r12+8] shr r15d, cl mov rax, [r12+10h] mov rax, [rax+r15*8] loc_11AD0: test rax, rax jz short loc_11ADF cmp [rax], ebx jz short loc_11B22 mov rax, [rax+8] jmp short loc_11AD0 loc_11ADF: push 10h pop rsi mov rdi, r14 call js_malloc test rax, rax jz short loc_11B22 cmp ebx, 0E0h jl short loc_11B07 mov rcx, [r14+18h] mov rcx, [rcx+68h] mov edx, ebx mov rcx, [rcx+rdx*8] inc dword ptr [rcx] loc_11B07: mov [rax], ebx and dword ptr [rax+4], 0 mov rcx, [r12+10h] mov rdx, [rcx+r15*8] mov [rax+8], rdx mov [rcx+r15*8], rax inc dword ptr [r12] loc_11B22: pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_11B2C: mov cl, [r12+8] inc cl push 1 pop r13 shl r13d, cl lea rsi, ds:0[r13*8] mov rdi, r14 call js_mallocz test rax, rax jz short loc_11B22 mov r15, rax mov eax, [r12+4] mov edx, [r12+8] lea ecx, [rdx+1] mov [r12+8], ecx test rax, rax jz short loc_11BA6 push 1Fh pop rcx sub ecx, edx xor edx, edx loc_11B70: mov rsi, [r12+10h] mov rsi, [rsi+rdx*8] test rsi, rsi jz short loc_11B9E loc_11B7E: imul edi, [rsi], 9E370001h shr edi, cl mov r8, [rsi+8] mov r9, [r15+rdi*8] mov [rsi+8], r9 mov [r15+rdi*8], rsi mov rsi, r8 test r8, r8 jnz short loc_11B7E loc_11B9E: inc rdx cmp rdx, rax jnz short loc_11B70 loc_11BA6: mov rsi, [r12+10h] mov rdi, r14 call js_free mov [r12+10h], r15 mov [r12+4], r13d test r15, r15 jnz loc_11AB6 jmp loc_11B22
long long emit_ic(long long *a1, int a2) { long long v3; // r14 long long v4; // r12 long long v5; // r15 long long result; // rax _DWORD *v7; // rcx long long v8; // rcx long long v9; // r13 long long v10; // r15 long long v11; // rax int v12; // edx char v13; // cl long long i; // rdx long long v15; // rsi long long v16; // rdi long long v17; // r8 v3 = *a1; v4 = *(_QWORD *)(a1[18] + 560); if ( (unsigned int)(*(_DWORD *)v4 + 1) >= *(_DWORD *)(v4 + 4) ) { v9 = (unsigned int)(1 << (*(_BYTE *)(v4 + 8) + 1)); result = js_mallocz(*a1, 8 * v9); if ( !result ) return result; v10 = result; v11 = *(unsigned int *)(v4 + 4); v12 = *(_DWORD *)(v4 + 8); *(_DWORD *)(v4 + 8) = v12 + 1; if ( v11 ) { v13 = 31 - v12; for ( i = 0LL; i != v11; ++i ) { v15 = *(_QWORD *)(*(_QWORD *)(v4 + 16) + 8 * i); if ( v15 ) { do { v16 = (unsigned int)(-1640562687 * *(_DWORD *)v15) >> v13; v17 = *(_QWORD *)(v15 + 8); *(_QWORD *)(v15 + 8) = *(_QWORD *)(v10 + 8 * v16); *(_QWORD *)(v10 + 8 * v16) = v15; v15 = v17; } while ( v17 ); } } } js_free(v3, *(_QWORD *)(v4 + 16)); *(_QWORD *)(v4 + 16) = v10; *(_DWORD *)(v4 + 4) = v9; } v5 = (unsigned int)(-1640562687 * a2) >> -*(_BYTE *)(v4 + 8); for ( result = *(_QWORD *)(*(_QWORD *)(v4 + 16) + 8 * v5); result; result = *(_QWORD *)(result + 8) ) { if ( *(_DWORD *)result == a2 ) return result; } result = js_malloc(v3, 16LL); if ( result ) { if ( a2 >= 224 ) { v7 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v3 + 24) + 104LL) + 8LL * (unsigned int)a2); ++*v7; } *(_DWORD *)result = a2; *(_DWORD *)(result + 4) = 0; v8 = *(_QWORD *)(v4 + 16); *(_QWORD *)(result + 8) = *(_QWORD *)(v8 + 8 * v5); *(_QWORD *)(v8 + 8 * v5) = result; ++*(_DWORD *)v4; } return result; }
emit_ic: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EBX,ESI MOV R14,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x90] MOV R12,qword ptr [RAX + 0x230] MOV EAX,dword ptr [R12] INC EAX CMP EAX,dword ptr [R12 + 0x4] JNC 0x00111b2c LAB_00111ab6: IMUL R15D,EBX,-0x61c8ffff XOR ECX,ECX SUB CL,byte ptr [R12 + 0x8] SHR R15D,CL MOV RAX,qword ptr [R12 + 0x10] MOV RAX,qword ptr [RAX + R15*0x8] LAB_00111ad0: TEST RAX,RAX JZ 0x00111adf CMP dword ptr [RAX],EBX JZ 0x00111b22 MOV RAX,qword ptr [RAX + 0x8] JMP 0x00111ad0 LAB_00111adf: PUSH 0x10 POP RSI MOV RDI,R14 CALL 0x0010ed5d TEST RAX,RAX JZ 0x00111b22 CMP EBX,0xe0 JL 0x00111b07 MOV RCX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RCX + 0x68] MOV EDX,EBX MOV RCX,qword ptr [RCX + RDX*0x8] INC dword ptr [RCX] LAB_00111b07: MOV dword ptr [RAX],EBX AND dword ptr [RAX + 0x4],0x0 MOV RCX,qword ptr [R12 + 0x10] MOV RDX,qword ptr [RCX + R15*0x8] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RCX + R15*0x8],RAX INC dword ptr [R12] LAB_00111b22: POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00111b2c: MOV CL,byte ptr [R12 + 0x8] INC CL PUSH 0x1 POP R13 SHL R13D,CL LEA RSI,[R13*0x8] MOV RDI,R14 CALL 0x0010ed7d TEST RAX,RAX JZ 0x00111b22 MOV R15,RAX MOV EAX,dword ptr [R12 + 0x4] MOV EDX,dword ptr [R12 + 0x8] LEA ECX,[RDX + 0x1] MOV dword ptr [R12 + 0x8],ECX TEST RAX,RAX JZ 0x00111ba6 PUSH 0x1f POP RCX SUB ECX,EDX XOR EDX,EDX LAB_00111b70: MOV RSI,qword ptr [R12 + 0x10] MOV RSI,qword ptr [RSI + RDX*0x8] TEST RSI,RSI JZ 0x00111b9e LAB_00111b7e: IMUL EDI,dword ptr [RSI],-0x61c8ffff SHR EDI,CL MOV R8,qword ptr [RSI + 0x8] MOV R9,qword ptr [R15 + RDI*0x8] MOV qword ptr [RSI + 0x8],R9 MOV qword ptr [R15 + RDI*0x8],RSI MOV RSI,R8 TEST R8,R8 JNZ 0x00111b7e LAB_00111b9e: INC RDX CMP RDX,RAX JNZ 0x00111b70 LAB_00111ba6: MOV RSI,qword ptr [R12 + 0x10] MOV RDI,R14 CALL 0x0011bf85 MOV qword ptr [R12 + 0x10],R15 MOV dword ptr [R12 + 0x4],R13D TEST R15,R15 JNZ 0x00111ab6 JMP 0x00111b22
void emit_ic(long *param_1,uint param_2) { uint uVar1; int iVar2; long lVar3; int *piVar4; int *piVar5; int *piVar6; uint *puVar7; long lVar8; ulong uVar9; ulong uVar10; uint uVar11; lVar3 = *param_1; piVar4 = *(int **)(param_1[0x12] + 0x230); if ((uint)piVar4[1] <= *piVar4 + 1U) { uVar11 = 1 << ((char)piVar4[2] + 1U & 0x1f); lVar8 = js_mallocz(lVar3,(ulong)uVar11 * 8); if (lVar8 == 0) { return; } uVar1 = piVar4[1]; iVar2 = piVar4[2]; piVar4[2] = iVar2 + 1; if ((ulong)uVar1 != 0) { uVar9 = 0; do { piVar5 = *(int **)(*(long *)(piVar4 + 4) + uVar9 * 8); while (piVar5 != (int *)0x0) { uVar10 = (ulong)((uint)(*piVar5 * -0x61c8ffff) >> (0x1fU - (char)iVar2 & 0x1f)); piVar6 = *(int **)(piVar5 + 2); *(int8 *)(piVar5 + 2) = *(int8 *)(lVar8 + uVar10 * 8); *(int **)(lVar8 + uVar10 * 8) = piVar5; piVar5 = piVar6; } uVar9 = uVar9 + 1; } while (uVar9 != uVar1); } js_free(lVar3,*(int8 *)(piVar4 + 4)); *(long *)(piVar4 + 4) = lVar8; piVar4[1] = uVar11; if (lVar8 == 0) { return; } } uVar9 = (ulong)(param_2 * -0x61c8ffff >> (-(char)piVar4[2] & 0x1fU)); puVar7 = *(uint **)(*(long *)(piVar4 + 4) + uVar9 * 8); while( true ) { if (puVar7 == (uint *)0x0) { puVar7 = (uint *)js_malloc(lVar3,0x10); if (puVar7 != (uint *)0x0) { if (0xdf < (int)param_2) { piVar5 = *(int **)(*(long *)(*(long *)(lVar3 + 0x18) + 0x68) + (ulong)param_2 * 8); *piVar5 = *piVar5 + 1; } *puVar7 = param_2; puVar7[1] = 0; lVar3 = *(long *)(piVar4 + 4); *(int8 *)(puVar7 + 2) = *(int8 *)(lVar3 + uVar9 * 8); *(uint **)(lVar3 + uVar9 * 8) = puVar7; *piVar4 = *piVar4 + 1; } return; } if (*puVar7 == param_2) break; puVar7 = *(uint **)(puVar7 + 2); } return; }
17,118
emit_ic
bluesky950520[P]quickjs/quickjs.c
static void emit_ic(JSParseState *s, JSAtom atom) { uint32_t h; JSContext *ctx; JSInlineCache *ic; JSInlineCacheHashSlot *ch; ic = s->cur_func->ic; ctx = s->ctx; if (ic->count + 1 >= ic->capacity && resize_ic_hash(ctx, ic)) return; h = get_index_hash(atom, ic->hash_bits); for (ch = ic->hash[h]; ch != NULL; ch = ch->next) if (ch->atom == atom) return; ch = js_malloc(ctx, sizeof(*ch)); if (unlikely(!ch)) return; ch->atom = JS_DupAtom(ctx, atom); ch->index = 0; ch->next = ic->hash[h]; ic->hash[h] = ch; ic->count += 1; }
O3
c
emit_ic: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r14 movl (%rsi), %eax incl %eax cmpl 0x4(%rsi), %eax jae 0x12206 movq 0x10(%rbx), %r15 imull $0x9e370001, %ebp, %r12d # imm = 0x9E370001 xorl %ecx, %ecx subb 0x8(%rbx), %cl shrl %cl, %r12d movq (%r15,%r12,8), %rax testq %rax, %rax je 0x121bd cmpl %ebp, (%rax) je 0x121fd movq 0x8(%rax), %rax jmp 0x121ae pushq $0x10 popq %rsi movq %r14, %rdi callq 0xed89 testq %rax, %rax je 0x121fd cmpl $0xe0, %ebp jl 0x121e5 movq 0x18(%r14), %rcx movq 0x68(%rcx), %rcx movl %ebp, %edx movq (%rcx,%rdx,8), %rcx incl (%rcx) movl %ebp, (%rax) andl $0x0, 0x4(%rax) movq 0x10(%rbx), %rcx movq (%rcx,%r12,8), %rdx movq %rdx, 0x8(%rax) movq %rax, (%rcx,%r12,8) incl (%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movb 0x8(%rbx), %cl incb %cl pushq $0x1 popq %r12 shll %cl, %r12d leaq (,%r12,8), %rsi movq %r14, %rdi callq 0xedb6 testq %rax, %rax je 0x121fd movq %rax, %r15 movl 0x4(%rbx), %eax movl 0x8(%rbx), %edx leal 0x1(%rdx), %ecx movl %ecx, 0x8(%rbx) testq %rax, %rax je 0x12277 pushq $0x1f popq %rcx subl %edx, %ecx xorl %edx, %edx movq 0x10(%rbx), %rsi movq (%rsi,%rdx,8), %rsi testq %rsi, %rsi je 0x1226f imull $0x9e370001, (%rsi), %edi # imm = 0x9E370001 shrl %cl, %edi movq 0x8(%rsi), %r8 movq (%r15,%rdi,8), %r9 movq %r9, 0x8(%rsi) movq %rsi, (%r15,%rdi,8) movq %r8, %rsi testq %r8, %r8 jne 0x1224f incq %rdx cmpq %rax, %rdx jne 0x12242 movq 0x10(%rbx), %rsi movq %r14, %rdi callq 0x1c845 movq %r15, 0x10(%rbx) movl %r12d, 0x4(%rbx) jmp 0x1219b
emit_ic: push rbp push r15 push r14 push r12 push rbx mov ebp, edx mov rbx, rsi mov r14, rdi mov eax, [rsi] inc eax cmp eax, [rsi+4] jnb short loc_12206 mov r15, [rbx+10h] loc_1219B: imul r12d, ebp, 9E370001h xor ecx, ecx sub cl, [rbx+8] shr r12d, cl mov rax, [r15+r12*8] loc_121AE: test rax, rax jz short loc_121BD cmp [rax], ebp jz short loc_121FD mov rax, [rax+8] jmp short loc_121AE loc_121BD: push 10h pop rsi mov rdi, r14 call js_malloc test rax, rax jz short loc_121FD cmp ebp, 0E0h jl short loc_121E5 mov rcx, [r14+18h] mov rcx, [rcx+68h] mov edx, ebp mov rcx, [rcx+rdx*8] inc dword ptr [rcx] loc_121E5: mov [rax], ebp and dword ptr [rax+4], 0 mov rcx, [rbx+10h] mov rdx, [rcx+r12*8] mov [rax+8], rdx mov [rcx+r12*8], rax inc dword ptr [rbx] loc_121FD: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_12206: mov cl, [rbx+8] inc cl push 1 pop r12 shl r12d, cl lea rsi, ds:0[r12*8] mov rdi, r14 call js_mallocz test rax, rax jz short loc_121FD mov r15, rax mov eax, [rbx+4] mov edx, [rbx+8] lea ecx, [rdx+1] mov [rbx+8], ecx test rax, rax jz short loc_12277 push 1Fh pop rcx sub ecx, edx xor edx, edx loc_12242: mov rsi, [rbx+10h] mov rsi, [rsi+rdx*8] test rsi, rsi jz short loc_1226F loc_1224F: imul edi, [rsi], 9E370001h shr edi, cl mov r8, [rsi+8] mov r9, [r15+rdi*8] mov [rsi+8], r9 mov [r15+rdi*8], rsi mov rsi, r8 test r8, r8 jnz short loc_1224F loc_1226F: inc rdx cmp rdx, rax jnz short loc_12242 loc_12277: mov rsi, [rbx+10h] mov rdi, r14 call js_free mov [rbx+10h], r15 mov [rbx+4], r12d jmp loc_1219B
long long emit_ic(long long a1, long long a2, int a3) { long long v6; // r15 long long v7; // r12 long long result; // rax _DWORD *v9; // rcx long long v10; // rcx long long v11; // r12 long long v12; // rax int v13; // edx char v14; // cl long long i; // rdx long long v16; // rsi long long v17; // rdi long long v18; // r8 if ( (unsigned int)(*(_DWORD *)a2 + 1) >= *(_DWORD *)(a2 + 4) ) { v11 = (unsigned int)(1 << (*(_BYTE *)(a2 + 8) + 1)); result = js_mallocz(a1, 8 * v11); if ( !result ) return result; v6 = result; v12 = *(unsigned int *)(a2 + 4); v13 = *(_DWORD *)(a2 + 8); *(_DWORD *)(a2 + 8) = v13 + 1; if ( v12 ) { v14 = 31 - v13; for ( i = 0LL; i != v12; ++i ) { v16 = *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * i); if ( v16 ) { do { v17 = (unsigned int)(-1640562687 * *(_DWORD *)v16) >> v14; v18 = *(_QWORD *)(v16 + 8); *(_QWORD *)(v16 + 8) = *(_QWORD *)(v6 + 8 * v17); *(_QWORD *)(v6 + 8 * v17) = v16; v16 = v18; } while ( v18 ); } } } js_free(a1, *(_QWORD *)(a2 + 16)); *(_QWORD *)(a2 + 16) = v6; *(_DWORD *)(a2 + 4) = v11; } else { v6 = *(_QWORD *)(a2 + 16); } v7 = (unsigned int)(-1640562687 * a3) >> -*(_BYTE *)(a2 + 8); for ( result = *(_QWORD *)(v6 + 8 * v7); result; result = *(_QWORD *)(result + 8) ) { if ( *(_DWORD *)result == a3 ) return result; } result = js_malloc(a1, 16LL); if ( result ) { if ( a3 >= 224 ) { v9 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a3); ++*v9; } *(_DWORD *)result = a3; *(_DWORD *)(result + 4) = 0; v10 = *(_QWORD *)(a2 + 16); *(_QWORD *)(result + 8) = *(_QWORD *)(v10 + 8 * v7); *(_QWORD *)(v10 + 8 * v7) = result; ++*(_DWORD *)a2; } return result; }
emit_ic: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,EDX MOV RBX,RSI MOV R14,RDI MOV EAX,dword ptr [RSI] INC EAX CMP EAX,dword ptr [RSI + 0x4] JNC 0x00112206 MOV R15,qword ptr [RBX + 0x10] LAB_0011219b: IMUL R12D,EBP,-0x61c8ffff XOR ECX,ECX SUB CL,byte ptr [RBX + 0x8] SHR R12D,CL MOV RAX,qword ptr [R15 + R12*0x8] LAB_001121ae: TEST RAX,RAX JZ 0x001121bd CMP dword ptr [RAX],EBP JZ 0x001121fd MOV RAX,qword ptr [RAX + 0x8] JMP 0x001121ae LAB_001121bd: PUSH 0x10 POP RSI MOV RDI,R14 CALL 0x0010ed89 TEST RAX,RAX JZ 0x001121fd CMP EBP,0xe0 JL 0x001121e5 MOV RCX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RCX + 0x68] MOV EDX,EBP MOV RCX,qword ptr [RCX + RDX*0x8] INC dword ptr [RCX] LAB_001121e5: MOV dword ptr [RAX],EBP AND dword ptr [RAX + 0x4],0x0 MOV RCX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RCX + R12*0x8] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RCX + R12*0x8],RAX INC dword ptr [RBX] LAB_001121fd: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00112206: MOV CL,byte ptr [RBX + 0x8] INC CL PUSH 0x1 POP R12 SHL R12D,CL LEA RSI,[R12*0x8] MOV RDI,R14 CALL 0x0010edb6 TEST RAX,RAX JZ 0x001121fd MOV R15,RAX MOV EAX,dword ptr [RBX + 0x4] MOV EDX,dword ptr [RBX + 0x8] LEA ECX,[RDX + 0x1] MOV dword ptr [RBX + 0x8],ECX TEST RAX,RAX JZ 0x00112277 PUSH 0x1f POP RCX SUB ECX,EDX XOR EDX,EDX LAB_00112242: MOV RSI,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RSI + RDX*0x8] TEST RSI,RSI JZ 0x0011226f LAB_0011224f: IMUL EDI,dword ptr [RSI],-0x61c8ffff SHR EDI,CL MOV R8,qword ptr [RSI + 0x8] MOV R9,qword ptr [R15 + RDI*0x8] MOV qword ptr [RSI + 0x8],R9 MOV qword ptr [R15 + RDI*0x8],RSI MOV RSI,R8 TEST R8,R8 JNZ 0x0011224f LAB_0011226f: INC RDX CMP RDX,RAX JNZ 0x00112242 LAB_00112277: MOV RSI,qword ptr [RBX + 0x10] MOV RDI,R14 CALL 0x0011c845 MOV qword ptr [RBX + 0x10],R15 MOV dword ptr [RBX + 0x4],R12D JMP 0x0011219b
void emit_ic(long param_1,int *param_2,uint param_3) { uint uVar1; int iVar2; int *piVar3; int *piVar4; uint *puVar5; long lVar6; ulong uVar7; ulong uVar8; uint uVar9; if (*param_2 + 1U < (uint)param_2[1]) { lVar6 = *(long *)(param_2 + 4); } else { uVar9 = 1 << ((char)param_2[2] + 1U & 0x1f); lVar6 = js_mallocz(param_1,(ulong)uVar9 * 8); if (lVar6 == 0) { return; } uVar1 = param_2[1]; iVar2 = param_2[2]; param_2[2] = iVar2 + 1; if ((ulong)uVar1 != 0) { uVar7 = 0; do { piVar3 = *(int **)(*(long *)(param_2 + 4) + uVar7 * 8); while (piVar3 != (int *)0x0) { uVar8 = (ulong)((uint)(*piVar3 * -0x61c8ffff) >> (0x1fU - (char)iVar2 & 0x1f)); piVar4 = *(int **)(piVar3 + 2); *(int8 *)(piVar3 + 2) = *(int8 *)(lVar6 + uVar8 * 8); *(int **)(lVar6 + uVar8 * 8) = piVar3; piVar3 = piVar4; } uVar7 = uVar7 + 1; } while (uVar7 != uVar1); } js_free(param_1,*(int8 *)(param_2 + 4)); *(long *)(param_2 + 4) = lVar6; param_2[1] = uVar9; } uVar7 = (ulong)(param_3 * -0x61c8ffff >> (-(char)param_2[2] & 0x1fU)); puVar5 = *(uint **)(lVar6 + uVar7 * 8); while( true ) { if (puVar5 == (uint *)0x0) { puVar5 = (uint *)js_malloc(param_1,0x10); if (puVar5 != (uint *)0x0) { if (0xdf < (int)param_3) { piVar3 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_3 * 8); *piVar3 = *piVar3 + 1; } *puVar5 = param_3; puVar5[1] = 0; lVar6 = *(long *)(param_2 + 4); *(int8 *)(puVar5 + 2) = *(int8 *)(lVar6 + uVar7 * 8); *(uint **)(lVar6 + uVar7 * 8) = puVar5; *param_2 = *param_2 + 1; } return; } if (*puVar5 == param_3) break; puVar5 = *(uint **)(puVar5 + 2); } return; }
17,119
pfs_open_table_v1
eloqsql/storage/perfschema/pfs.cc
PSI_table* pfs_open_table_v1(PSI_table_share *share, const void *identity) { PFS_table_share *pfs_table_share= reinterpret_cast<PFS_table_share*> (share); /* When the performance schema is off, do not instrument anything. Table handles have short life cycle, instrumentation will happen again if needed during the next open(). */ if (psi_unlikely(! flag_global_instrumentation)) return NULL; if (unlikely(pfs_table_share == NULL)) return NULL; /* This object is not to be instrumented. */ if (! pfs_table_share->m_enabled) return NULL; /* This object is instrumented, but all table instruments are disabled. */ if (! global_table_io_class.m_enabled && ! global_table_lock_class.m_enabled) return NULL; PFS_thread *thread= my_thread_get_THR_PFS(); if (unlikely(thread == NULL)) return NULL; PFS_table *pfs_table= create_table(pfs_table_share, thread, identity); return reinterpret_cast<PSI_table *> (pfs_table); }
O3
cpp
pfs_open_table_v1: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0x3a89de(%rip), %rax # 0x3d0c00 cmpb $0x1, (%rax) je 0x2822e xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq movq %rdi, %r14 testq %rdi, %rdi je 0x28227 cmpb $0x1, 0x4(%r14) jne 0x28227 movq %rsi, %rbx leaq 0x3a5239(%rip), %rax # 0x3cd480 cmpb $0x0, 0x4(%rax) jne 0x2825a leaq 0x3a52ec(%rip), %rax # 0x3cd540 cmpb $0x1, 0x4(%rax) jne 0x28227 movl 0x3a800c(%rip), %edi # 0x3d026c callq 0x26540 testq %rax, %rax je 0x28227 movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x30982
pfs_open_table_v1: push rbp mov rbp, rsp push r14 push rbx lea rax, flag_global_instrumentation cmp byte ptr [rax], 1 jz short loc_2822E loc_28227: xor eax, eax pop rbx pop r14 pop rbp retn loc_2822E: mov r14, rdi test rdi, rdi jz short loc_28227 cmp byte ptr [r14+4], 1 jnz short loc_28227 mov rbx, rsi lea rax, global_table_io_class cmp byte ptr [rax+4], 0 jnz short loc_2825A lea rax, global_table_lock_class cmp byte ptr [rax+4], 1 jnz short loc_28227 loc_2825A: mov edi, cs:THR_PFS call _pthread_getspecific test rax, rax jz short loc_28227 mov rdi, r14; PFS_table_share * mov rsi, rax; PFS_thread * mov rdx, rbx; void * pop rbx pop r14 pop rbp jmp _Z12create_tableP15PFS_table_shareP10PFS_threadPKv; create_table(PFS_table_share *,PFS_thread *,void const*)
long long pfs_open_table_v1(PFS_table_share *a1, void *a2) { PFS_thread *v3; // rax if ( flag_global_instrumentation == 1 && a1 && *((_BYTE *)a1 + 4) == 1 && (*((_BYTE *)&global_table_io_class + 4) || *((_BYTE *)&global_table_lock_class + 4) == 1) && (v3 = (PFS_thread *)pthread_getspecific((unsigned int)THR_PFS)) != 0LL ) { return create_table(a1, v3, a2); } else { return 0LL; } }
pfs_open_table_v1: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RAX,[0x4d0c00] CMP byte ptr [RAX],0x1 JZ 0x0012822e LAB_00128227: XOR EAX,EAX POP RBX POP R14 POP RBP RET LAB_0012822e: MOV R14,RDI TEST RDI,RDI JZ 0x00128227 CMP byte ptr [R14 + 0x4],0x1 JNZ 0x00128227 MOV RBX,RSI LEA RAX,[0x4cd480] CMP byte ptr [RAX + 0x4],0x0 JNZ 0x0012825a LEA RAX,[0x4cd540] CMP byte ptr [RAX + 0x4],0x1 JNZ 0x00128227 LAB_0012825a: MOV EDI,dword ptr [0x004d026c] CALL 0x00126540 TEST RAX,RAX JZ 0x00128227 MOV RDI,R14 MOV RSI,RAX MOV RDX,RBX POP RBX POP R14 POP RBP JMP 0x00130982
int8 pfs_open_table_v1(PFS_table_share *param_1,void *param_2) { PFS_thread *pPVar1; int8 uVar2; if ((((flag_global_instrumentation == '\x01') && (param_1 != (PFS_table_share *)0x0)) && (param_1[4] == (PFS_table_share)0x1)) && ((global_table_io_class[4] != '\0' || (global_table_lock_class[4] == '\x01')))) { pPVar1 = (PFS_thread *)pthread_getspecific(THR_PFS); if (pPVar1 != (PFS_thread *)0x0) { uVar2 = create_table(param_1,pPVar1,param_2); return uVar2; } } return 0; }
17,120
LefDefParser::defwNetPathEnd()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwNetPathEnd() { defwFunc = DEFW_PATH; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_PATH) return DEFW_BAD_ORDER; defwState = DEFW_NET_OPTIONS; return DEFW_OK; }
O3
cpp
LefDefParser::defwNetPathEnd(): leaq 0xf4ec(%rip), %rax # 0x1e178 movl $0x37, (%rax) leaq 0xf4cf(%rip), %rax # 0x1e168 cmpq $0x0, (%rax) je 0xecb9 leaq 0xf4ce(%rip), %rcx # 0x1e174 movl $0x2, %eax cmpl $0x37, (%rcx) jne 0xecb8 movl $0x3b, (%rcx) xorl %eax, %eax retq movl $0x1, %eax retq
_ZN12LefDefParser14defwNetPathEndEv: lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 37h ; '7' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jz short loc_ECB9 lea rcx, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov eax, 2 cmp dword ptr [rcx], 37h ; '7' jnz short locret_ECB8 mov dword ptr [rcx], 3Bh ; ';' xor eax, eax locret_ECB8: retn loc_ECB9: mov eax, 1 retn
long long LefDefParser::defwNetPathEnd(LefDefParser *this) { long long result; // rax LefDefParser::defwFunc = 55; if ( !LefDefParser::defwFile ) return 1LL; result = 2LL; if ( LefDefParser::defwState == 55 ) { LefDefParser::defwState = 59; return 0LL; } return result; }
defwNetPathEnd: LEA RAX,[0x11e178] MOV dword ptr [RAX],0x37 LEA RAX,[0x11e168] CMP qword ptr [RAX],0x0 JZ 0x0010ecb9 LEA RCX,[0x11e174] MOV EAX,0x2 CMP dword ptr [RCX],0x37 JNZ 0x0010ecb8 MOV dword ptr [RCX],0x3b XOR EAX,EAX LAB_0010ecb8: RET LAB_0010ecb9: MOV EAX,0x1 RET
/* LefDefParser::defwNetPathEnd() */ int8 LefDefParser::defwNetPathEnd(void) { int8 uVar1; defwFunc = 0x37; if (defwFile != 0) { uVar1 = 2; if (defwState == 0x37) { defwState = 0x3b; uVar1 = 0; } return uVar1; } return 1; }
17,121
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const { try { do_render(out, context); } catch (const LoopControlException & e) { // TODO: make stack creation lazy. Only needed if it was thrown outside of a loop. std::ostringstream err; err << e.what(); if (location_.source) err << error_location_suffix(*location_.source, location_.pos); throw LoopControlException(err.str(), e.control_type); } catch (const std::exception & e) { std::ostringstream err; err << e.what(); if (location_.source) err << error_location_suffix(*location_.source, location_.pos); throw std::runtime_error(err.str()); } }
O3
cpp
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, %r14 movq (%rdi), %rax callq *(%rax) addq $0x1a0, %rsp # imm = 0x1A0 popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx cmpl $0x2, %edx jne 0x99c91 movq %rbx, %rdi callq 0x1a3a0 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1aba0 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x1a8a0 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x99d16 movl $0x18, %edi callq 0x1a460 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1add0 movl 0x10(%rbx), %ebx movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1aae0 leaq 0x913af(%rip), %rax # 0x12b018 addq $0x10, %rax movq %rax, (%r14) movl %ebx, 0x10(%r14) xorl %ebp, %ebp leaq 0x91383(%rip), %rsi # 0x12b000 movq 0x922fc(%rip), %rdx # 0x12bf80 movq %r14, %rdi callq 0x1af30 jmp 0x99d16 cmpl $0x1, %edx jne 0x99eb3 movq %rbx, %rdi callq 0x1a3a0 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1aba0 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x1a8a0 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x99d5c movl $0x10, %edi callq 0x1a460 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1add0 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1ae40 xorl %ebp, %ebp movq 0x922e9(%rip), %rsi # 0x12bff0 movq 0x92252(%rip), %rdx # 0x12bf60 movq %r14, %rdi callq 0x1af30 movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x775d0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1aa10 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99c33 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 jmp 0x99c33 movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x775d0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1aa10 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99cd2 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 jmp 0x99cd2 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99e5e movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 jmp 0x99e5e jmp 0x99e5b movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99e8b movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 jmp 0x99e8b movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99e13 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 testb %bpl, %bpl jne 0x99e1d jmp 0x99e5e movq %rax, %rbx movq %r14, %rdi callq 0x1a690 jmp 0x99e5e jmp 0x99e88 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99e47 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 testb %bpl, %bpl jne 0x99e51 jmp 0x99e8b movq %rax, %rbx movq %r14, %rdi callq 0x1a690 jmp 0x99e8b movq %rax, %rbx movq 0x92113(%rip), %rsi # 0x12bf78 leaq 0x28(%rsp), %rdi callq 0x1a4c0 leaq 0x98(%rsp), %rdi callq 0x1a2d0 jmp 0x99e81 movq %rax, %rbx callq 0x1ae70 jmp 0x99eb3 movq %rax, %rbx movq 0x920e6(%rip), %rsi # 0x12bf78 leaq 0x28(%rsp), %rdi callq 0x1a4c0 leaq 0x98(%rsp), %rdi callq 0x1a2d0 jmp 0x99eae movq %rax, %rbx callq 0x1ae70 movq %rbx, %rdi callq 0x1afd0 movq %rax, %rdi callq 0x218f5 nop
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r14 push rbx sub rsp, 1A0h mov r14, rdi mov rax, [rdi] call qword ptr [rax] add rsp, 1A0h pop rbx pop r14 pop rbp retn mov rbx, rax cmp edx, 2 jnz loc_99C91 mov rdi, rbx; void * call ___cxa_begin_catch mov rbx, rax lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] lea rdi, [rsp+arg_20] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+8]; int test rsi, rsi jnz loc_99D16 loc_99C33: mov edi, 18h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+arg_28] lea rdi, [rsp+arg_0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov ebx, [rbx+10h] mov bpl, 1 lea rsi, [rsp+arg_0] mov rdi, r14 call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException add rax, 10h mov [r14], rax mov [r14+10h], ebx xor ebp, ebp lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD)) { return (**a1)(a1); }
render: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1a0 MOV R14,RDI MOV RAX,qword ptr [RDI] LAB_00199be1: CALL qword ptr [RAX] LAB_00199be3: ADD RSP,0x1a0 POP RBX POP R14 POP RBP RET
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2) { /* try { // try from 00199be1 to 00199be2 has its CatchHandler @ 00199bef */ (*(code *)**(int8 **)param_1)(); return; }
17,122
plutovg_matrix_multiply
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-matrix.c
void plutovg_matrix_multiply(plutovg_matrix_t* matrix, const plutovg_matrix_t* left, const plutovg_matrix_t* right) { float a = left->a * right->a + left->b * right->c; float b = left->a * right->b + left->b * right->d; float c = left->c * right->a + left->d * right->c; float d = left->c * right->b + left->d * right->d; float e = left->e * right->a + left->f * right->c + right->e; float f = left->e * right->b + left->f * right->d + right->f; plutovg_matrix_init(matrix, a, b, c, d, e, f); }
O0
c
plutovg_matrix_multiply: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movss (%rax), %xmm0 movq -0x18(%rbp), %rax movss (%rax), %xmm2 movq -0x10(%rbp), %rax movss 0x4(%rax), %xmm1 movq -0x18(%rbp), %rax mulss 0x8(%rax), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x1c(%rbp) movq -0x10(%rbp), %rax movss (%rax), %xmm0 movq -0x18(%rbp), %rax movss 0x4(%rax), %xmm2 movq -0x10(%rbp), %rax movss 0x4(%rax), %xmm1 movq -0x18(%rbp), %rax mulss 0xc(%rax), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x20(%rbp) movq -0x10(%rbp), %rax movss 0x8(%rax), %xmm0 movq -0x18(%rbp), %rax movss (%rax), %xmm2 movq -0x10(%rbp), %rax movss 0xc(%rax), %xmm1 movq -0x18(%rbp), %rax mulss 0x8(%rax), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x24(%rbp) movq -0x10(%rbp), %rax movss 0x8(%rax), %xmm0 movq -0x18(%rbp), %rax movss 0x4(%rax), %xmm2 movq -0x10(%rbp), %rax movss 0xc(%rax), %xmm1 movq -0x18(%rbp), %rax mulss 0xc(%rax), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x28(%rbp) movq -0x10(%rbp), %rax movss 0x10(%rax), %xmm0 movq -0x18(%rbp), %rax movss (%rax), %xmm2 movq -0x10(%rbp), %rax movss 0x14(%rax), %xmm1 movq -0x18(%rbp), %rax mulss 0x8(%rax), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movq -0x18(%rbp), %rax addss 0x10(%rax), %xmm0 movss %xmm0, -0x2c(%rbp) movq -0x10(%rbp), %rax movss 0x10(%rax), %xmm0 movq -0x18(%rbp), %rax movss 0x4(%rax), %xmm2 movq -0x10(%rbp), %rax movss 0x14(%rax), %xmm1 movq -0x18(%rbp), %rax mulss 0xc(%rax), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movq -0x18(%rbp), %rax addss 0x14(%rax), %xmm0 movss %xmm0, -0x30(%rbp) movq -0x8(%rbp), %rdi movss -0x1c(%rbp), %xmm0 movss -0x20(%rbp), %xmm1 movss -0x24(%rbp), %xmm2 movss -0x28(%rbp), %xmm3 movss -0x2c(%rbp), %xmm4 movss -0x30(%rbp), %xmm5 callq 0xb8c0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
plutovg_matrix_multiply: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] movss xmm0, dword ptr [rax] mov rax, [rbp+var_18] movss xmm2, dword ptr [rax] mov rax, [rbp+var_10] movss xmm1, dword ptr [rax+4] mov rax, [rbp+var_18] mulss xmm1, dword ptr [rax+8] mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_1C], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax] mov rax, [rbp+var_18] movss xmm2, dword ptr [rax+4] mov rax, [rbp+var_10] movss xmm1, dword ptr [rax+4] mov rax, [rbp+var_18] mulss xmm1, dword ptr [rax+0Ch] mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_20], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+8] mov rax, [rbp+var_18] movss xmm2, dword ptr [rax] mov rax, [rbp+var_10] movss xmm1, dword ptr [rax+0Ch] mov rax, [rbp+var_18] mulss xmm1, dword ptr [rax+8] mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_24], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+8] mov rax, [rbp+var_18] movss xmm2, dword ptr [rax+4] mov rax, [rbp+var_10] movss xmm1, dword ptr [rax+0Ch] mov rax, [rbp+var_18] mulss xmm1, dword ptr [rax+0Ch] mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_28], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+10h] mov rax, [rbp+var_18] movss xmm2, dword ptr [rax] mov rax, [rbp+var_10] movss xmm1, dword ptr [rax+14h] mov rax, [rbp+var_18] mulss xmm1, dword ptr [rax+8] mulss xmm0, xmm2 addss xmm0, xmm1 mov rax, [rbp+var_18] addss xmm0, dword ptr [rax+10h] movss [rbp+var_2C], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+10h] mov rax, [rbp+var_18] movss xmm2, dword ptr [rax+4] mov rax, [rbp+var_10] movss xmm1, dword ptr [rax+14h] mov rax, [rbp+var_18] mulss xmm1, dword ptr [rax+0Ch] mulss xmm0, xmm2 addss xmm0, xmm1 mov rax, [rbp+var_18] addss xmm0, dword ptr [rax+14h] movss [rbp+var_30], xmm0 mov rdi, [rbp+var_8] movss xmm0, [rbp+var_1C] movss xmm1, [rbp+var_20] movss xmm2, [rbp+var_24] movss xmm3, [rbp+var_28] movss xmm4, [rbp+var_2C] movss xmm5, [rbp+var_30] call plutovg_matrix_init add rsp, 30h pop rbp retn
float * plutovg_matrix_multiply(float *a1, float *a2, float *a3) { return plutovg_matrix_init( a1, (float)(*a2 * *a3) + (float)(a2[1] * a3[2]), (float)(*a2 * a3[1]) + (float)(a2[1] * a3[3]), (float)(a2[2] * *a3) + (float)(a2[3] * a3[2]), (float)(a2[2] * a3[1]) + (float)(a2[3] * a3[3]), (float)((float)(a2[4] * *a3) + (float)(a2[5] * a3[2])) + a3[4], (float)((float)(a2[4] * a3[1]) + (float)(a2[5] * a3[3])) + a3[5]); }
plutovg_matrix_multiply: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOVSS XMM2,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x18] MULSS XMM1,dword ptr [RAX + 0x8] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x1c],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOVSS XMM2,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x18] MULSS XMM1,dword ptr [RAX + 0xc] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x20],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x18] MOVSS XMM2,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x18] MULSS XMM1,dword ptr [RAX + 0x8] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x24],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x18] MOVSS XMM2,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x18] MULSS XMM1,dword ptr [RAX + 0xc] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x28],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOVSS XMM2,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x18] MULSS XMM1,dword ptr [RAX + 0x8] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x18] ADDSS XMM0,dword ptr [RAX + 0x10] MOVSS dword ptr [RBP + -0x2c],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOVSS XMM2,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x18] MULSS XMM1,dword ptr [RAX + 0xc] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x18] ADDSS XMM0,dword ptr [RAX + 0x14] MOVSS dword ptr [RBP + -0x30],XMM0 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0x1c] MOVSS XMM1,dword ptr [RBP + -0x20] MOVSS XMM2,dword ptr [RBP + -0x24] MOVSS XMM3,dword ptr [RBP + -0x28] MOVSS XMM4,dword ptr [RBP + -0x2c] MOVSS XMM5,dword ptr [RBP + -0x30] CALL 0x0010b8c0 ADD RSP,0x30 POP RBP RET
void plutovg_matrix_multiply(int8 param_1,float *param_2,float *param_3) { plutovg_matrix_init(*param_2 * *param_3 + param_2[1] * param_3[2], *param_2 * param_3[1] + param_2[1] * param_3[3], param_2[2] * *param_3 + param_2[3] * param_3[2], param_2[2] * param_3[1] + param_2[3] * param_3[3], param_2[4] * *param_3 + param_2[5] * param_3[2] + param_3[4], param_2[4] * param_3[1] + param_2[5] * param_3[3] + param_3[5],param_1); return; }
17,123
plutovg_matrix_multiply
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-matrix.c
void plutovg_matrix_multiply(plutovg_matrix_t* matrix, const plutovg_matrix_t* left, const plutovg_matrix_t* right) { float a = left->a * right->a + left->b * right->c; float b = left->a * right->b + left->b * right->d; float c = left->c * right->a + left->d * right->c; float d = left->c * right->b + left->d * right->d; float e = left->e * right->a + left->f * right->c + right->e; float f = left->e * right->b + left->f * right->d + right->f; plutovg_matrix_init(matrix, a, b, c, d, e, f); }
O1
c
plutovg_matrix_multiply: movss (%rsi), %xmm0 movss 0x4(%rsi), %xmm5 movss 0x8(%rdx), %xmm6 movaps %xmm5, %xmm4 mulss %xmm6, %xmm4 movss (%rdx), %xmm1 movss 0x4(%rdx), %xmm3 movaps %xmm0, %xmm2 mulss %xmm1, %xmm2 addss %xmm4, %xmm2 movss 0xc(%rdx), %xmm4 mulss %xmm4, %xmm5 mulss %xmm3, %xmm0 addss %xmm5, %xmm0 movss 0x8(%rsi), %xmm5 movss 0xc(%rsi), %xmm8 movaps %xmm6, %xmm9 mulss %xmm8, %xmm9 movaps %xmm5, %xmm7 mulss %xmm1, %xmm7 addss %xmm9, %xmm7 movss 0x10(%rsi), %xmm9 movss 0x14(%rsi), %xmm10 mulss %xmm10, %xmm6 mulss %xmm9, %xmm1 addss %xmm6, %xmm1 mulss %xmm4, %xmm8 mulss %xmm3, %xmm5 addss 0x10(%rdx), %xmm1 addss %xmm8, %xmm5 mulss %xmm10, %xmm4 mulss %xmm3, %xmm9 addss %xmm4, %xmm9 addss 0x14(%rdx), %xmm9 movss %xmm2, (%rdi) movss %xmm0, 0x4(%rdi) movss %xmm7, 0x8(%rdi) movss %xmm5, 0xc(%rdi) movss %xmm1, 0x10(%rdi) movss %xmm9, 0x14(%rdi) retq
plutovg_matrix_multiply: movss xmm0, dword ptr [rsi] movss xmm5, dword ptr [rsi+4] movss xmm6, dword ptr [rdx+8] movaps xmm4, xmm5 mulss xmm4, xmm6 movss xmm1, dword ptr [rdx] movss xmm3, dword ptr [rdx+4] movaps xmm2, xmm0 mulss xmm2, xmm1 addss xmm2, xmm4 movss xmm4, dword ptr [rdx+0Ch] mulss xmm5, xmm4 mulss xmm0, xmm3 addss xmm0, xmm5 movss xmm5, dword ptr [rsi+8] movss xmm8, dword ptr [rsi+0Ch] movaps xmm9, xmm6 mulss xmm9, xmm8 movaps xmm7, xmm5 mulss xmm7, xmm1 addss xmm7, xmm9 movss xmm9, dword ptr [rsi+10h] movss xmm10, dword ptr [rsi+14h] mulss xmm6, xmm10 mulss xmm1, xmm9 addss xmm1, xmm6 mulss xmm8, xmm4 mulss xmm5, xmm3 addss xmm1, dword ptr [rdx+10h] addss xmm5, xmm8 mulss xmm4, xmm10 mulss xmm9, xmm3 addss xmm9, xmm4 addss xmm9, dword ptr [rdx+14h] movss dword ptr [rdi], xmm2 movss dword ptr [rdi+4], xmm0 movss dword ptr [rdi+8], xmm7 movss dword ptr [rdi+0Ch], xmm5 movss dword ptr [rdi+10h], xmm1 movss dword ptr [rdi+14h], xmm9 retn
void plutovg_matrix_multiply(float *a1, float *a2, float *a3) { float v3; // xmm6_4 float v4; // xmm3_4 float v5; // xmm4_4 float v6; // xmm0_4 float v7; // xmm8_4 float v8; // xmm7_4 float v9; // xmm9_4 float v10; // xmm10_4 float v11; // xmm1_4 float v12; // xmm5_4 float v13; // xmm9_4 v3 = a3[2]; v4 = a3[1]; v5 = a3[3]; v6 = (float)(*a2 * v4) + (float)(a2[1] * v5); v7 = a2[3]; v8 = (float)(a2[2] * *a3) + (float)(v3 * v7); v9 = a2[4]; v10 = a2[5]; v11 = (float)((float)(*a3 * v9) + (float)(v3 * v10)) + a3[4]; v12 = (float)(a2[2] * v4) + (float)(v7 * v5); v13 = (float)((float)(v9 * v4) + (float)(v5 * v10)) + a3[5]; *a1 = (float)(*a2 * *a3) + (float)(a2[1] * v3); a1[1] = v6; a1[2] = v8; a1[3] = v12; a1[4] = v11; a1[5] = v13; }
plutovg_matrix_multiply: MOVSS XMM0,dword ptr [RSI] MOVSS XMM5,dword ptr [RSI + 0x4] MOVSS XMM6,dword ptr [RDX + 0x8] MOVAPS XMM4,XMM5 MULSS XMM4,XMM6 MOVSS XMM1,dword ptr [RDX] MOVSS XMM3,dword ptr [RDX + 0x4] MOVAPS XMM2,XMM0 MULSS XMM2,XMM1 ADDSS XMM2,XMM4 MOVSS XMM4,dword ptr [RDX + 0xc] MULSS XMM5,XMM4 MULSS XMM0,XMM3 ADDSS XMM0,XMM5 MOVSS XMM5,dword ptr [RSI + 0x8] MOVSS XMM8,dword ptr [RSI + 0xc] MOVAPS XMM9,XMM6 MULSS XMM9,XMM8 MOVAPS XMM7,XMM5 MULSS XMM7,XMM1 ADDSS XMM7,XMM9 MOVSS XMM9,dword ptr [RSI + 0x10] MOVSS XMM10,dword ptr [RSI + 0x14] MULSS XMM6,XMM10 MULSS XMM1,XMM9 ADDSS XMM1,XMM6 MULSS XMM8,XMM4 MULSS XMM5,XMM3 ADDSS XMM1,dword ptr [RDX + 0x10] ADDSS XMM5,XMM8 MULSS XMM4,XMM10 MULSS XMM9,XMM3 ADDSS XMM9,XMM4 ADDSS XMM9,dword ptr [RDX + 0x14] MOVSS dword ptr [RDI],XMM2 MOVSS dword ptr [RDI + 0x4],XMM0 MOVSS dword ptr [RDI + 0x8],XMM7 MOVSS dword ptr [RDI + 0xc],XMM5 MOVSS dword ptr [RDI + 0x10],XMM1 MOVSS dword ptr [RDI + 0x14],XMM9 RET
void plutovg_matrix_multiply(float *param_1,float *param_2,float *param_3) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; float fVar8; float fVar9; float fVar10; float fVar11; float fVar12; fVar1 = *param_2; fVar2 = param_2[1]; fVar3 = param_3[2]; fVar4 = *param_3; fVar5 = param_3[1]; fVar6 = param_3[3]; fVar7 = param_2[2]; fVar8 = param_2[3]; fVar9 = param_2[4]; fVar10 = param_2[5]; fVar11 = param_3[4]; fVar12 = param_3[5]; *param_1 = fVar1 * fVar4 + fVar2 * fVar3; param_1[1] = fVar1 * fVar5 + fVar2 * fVar6; param_1[2] = fVar7 * fVar4 + fVar3 * fVar8; param_1[3] = fVar7 * fVar5 + fVar8 * fVar6; param_1[4] = fVar4 * fVar9 + fVar3 * fVar10 + fVar11; param_1[5] = fVar9 * fVar5 + fVar6 * fVar10 + fVar12; return; }
17,124
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&): leaq 0x94475(%rip), %rax # 0x13b2e8 addq $0x10, %rax movq %rax, (%rdi) movl $0xd, 0x8(%rdi) movq (%rsi), %rax movq %rax, 0x10(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x18(%rdi) testq %rax, %rax je 0xa6eab movq 0x960e4(%rip), %r10 # 0x13cf80 cmpb $0x0, (%r10) je 0xa6ea7 incl 0x8(%rax) jmp 0xa6eab lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x20(%rdi) movl %edx, 0x28(%rdi) movl %ecx, 0x2c(%rdi) leaq 0x94f18(%rip), %rax # 0x13bdd8 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) movups (%r9), %xmm0 movups %xmm0, 0x40(%rdi) movq 0x10(%r9), %rcx movq %rcx, 0x50(%rdi) movq %rax, 0x10(%r9) xorps %xmm0, %xmm0 movups %xmm0, (%r9) retq
_ZN5minja18MacroTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_INS_10ExpressionEEESaISJ_EE: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rdi], rax mov dword ptr [rdi+8], 0Dh mov rax, [rsi] mov [rdi+10h], rax mov rax, [rsi+8] mov [rdi+18h], rax test rax, rax jz short loc_A6EAB mov r10, cs:__libc_single_threaded_ptr cmp byte ptr [r10], 0 jz short loc_A6EA7 inc dword ptr [rax+8] jmp short loc_A6EAB loc_A6EA7: lock inc dword ptr [rax+8] loc_A6EAB: mov rax, [rsi+10h] mov [rdi+20h], rax mov [rdi+28h], edx mov [rdi+2Ch], ecx lea rax, _ZTVN5minja18MacroTemplateTokenE; `vtable for'minja::MacroTemplateToken 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 movups xmm0, xmmword ptr [r9] movups xmmword ptr [rdi+40h], xmm0 mov rcx, [r9+10h] mov [rdi+50h], rcx mov [r9+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r9], xmm0 retn
long long minja::MacroTemplateToken::MacroTemplateToken( long long a1, _QWORD *a2, int a3, int a4, __int128 *a5, long long a6) { long long v6; // rax long long result; // rax __int128 v8; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2; *(_DWORD *)(a1 + 8) = 13; *(_QWORD *)(a1 + 16) = *a2; v6 = a2[1]; *(_QWORD *)(a1 + 24) = v6; if ( v6 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v6 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v6 + 8)); } *(_QWORD *)(a1 + 32) = a2[2]; *(_DWORD *)(a1 + 40) = a3; *(_DWORD *)(a1 + 44) = a4; *(_QWORD *)a1 = &`vtable for'minja::MacroTemplateToken + 2; result = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a5 = 0LL; *(_OWORD *)(a1 + 64) = *(_OWORD *)a6; *(_QWORD *)(a1 + 80) = *(_QWORD *)(a6 + 16); *(_QWORD *)(a6 + 16) = 0LL; *(_OWORD *)a6 = 0LL; return result; }
MacroTemplateToken: LEA RAX,[0x23b2e8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV dword ptr [RDI + 0x8],0xd 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 0x001a6eab MOV R10,qword ptr [0x0023cf80] CMP byte ptr [R10],0x0 JZ 0x001a6ea7 INC dword ptr [RAX + 0x8] JMP 0x001a6eab LAB_001a6ea7: INC.LOCK dword ptr [RAX + 0x8] LAB_001a6eab: 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,[0x23bdd8] 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 MOVUPS XMM0,xmmword ptr [R9] MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOV RCX,qword ptr [R9 + 0x10] MOV qword ptr [RDI + 0x50],RCX MOV qword ptr [R9 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R9],XMM0 RET
/* minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >, std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&) */ void __thiscall minja::MacroTemplateToken::MacroTemplateToken (MacroTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4, int8 *param_5,int8 *param_6) { long lVar1; int8 uVar2; *(int ***)this = &PTR__TemplateToken_0023b2f8; *(int4 *)(this + 8) = 0xd; *(int8 *)(this + 0x10) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x18) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_0023cf80 == '\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__MacroTemplateToken_0023bde8; *(int8 *)(this + 0x38) = 0; uVar2 = param_5[1]; param_5[1] = 0; *(int8 *)(this + 0x30) = *param_5; *(int8 *)(this + 0x38) = uVar2; *param_5 = 0; uVar2 = param_6[1]; *(int8 *)(this + 0x40) = *param_6; *(int8 *)(this + 0x48) = uVar2; *(int8 *)(this + 0x50) = param_6[2]; param_6[2] = 0; *param_6 = 0; param_6[1] = 0; return; }
17,125
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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) {}
O3
cpp
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&): leaq 0x92aaf(%rip), %rax # 0x1392e8 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 0xa6871 movq 0x9471e(%rip), %r9 # 0x13af80 cmpb $0x0, (%r9) je 0xa686d incl 0x8(%rax) jmp 0xa6871 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x20(%rdi) movl %edx, 0x28(%rdi) movl %ecx, 0x2c(%rdi) leaq 0x935c2(%rip), %rax # 0x139e48 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_A6871 mov r9, cs:__libc_single_threaded_ptr cmp byte ptr [r9], 0 jz short loc_A686D inc dword ptr [rax+8] jmp short loc_A6871 loc_A686D: lock inc dword ptr [rax+8] loc_A6871: 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,[0x2392e8] 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 0x001a6871 MOV R9,qword ptr [0x0023af80] CMP byte ptr [R9],0x0 JZ 0x001a686d INC dword ptr [RAX + 0x8] JMP 0x001a6871 LAB_001a686d: INC.LOCK dword ptr [RAX + 0x8] LAB_001a6871: 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,[0x239e48] 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_002392f8; *(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_0023af80 == '\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_00239e58; *(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; }
17,126
JS_FreeContext
bluesky950520[P]quickjs/quickjs.c
void JS_FreeContext(JSContext *ctx) { JSRuntime *rt = ctx->rt; int i; if (--ctx->header.ref_count > 0) return; assert(ctx->header.ref_count == 0); #ifdef DUMP_ATOMS if (check_dump_flag(rt, DUMP_ATOMS)) JS_DumpAtoms(ctx->rt); #endif #ifdef DUMP_SHAPES if (check_dump_flag(rt, DUMP_SHAPES)) JS_DumpShapes(ctx->rt); #endif #ifdef DUMP_OBJECTS if (check_dump_flag(rt, DUMP_OBJECTS)) { struct list_head *el; JSGCObjectHeader *p; printf("JSObjects: {\n"); JS_DumpObjectHeader(ctx->rt); list_for_each(el, &rt->gc_obj_list) { p = list_entry(el, JSGCObjectHeader, link); JS_DumpGCObject(rt, p); } printf("}\n"); } #endif #ifdef DUMP_MEM if (check_dump_flag(rt, DUMP_MEM)) { JSMemoryUsage stats; JS_ComputeMemoryUsage(rt, &stats); JS_DumpMemoryUsage(stdout, &stats, rt); } #endif js_free_modules(ctx, JS_FREE_MODULE_ALL); JS_FreeValue(ctx, ctx->global_obj); JS_FreeValue(ctx, ctx->global_var_obj); JS_FreeValue(ctx, ctx->throw_type_error); JS_FreeValue(ctx, ctx->eval_obj); JS_FreeValue(ctx, ctx->array_proto_values); for(i = 0; i < JS_NATIVE_ERROR_COUNT; i++) { JS_FreeValue(ctx, ctx->native_error_proto[i]); } JS_FreeValue(ctx, ctx->error_ctor); JS_FreeValue(ctx, ctx->error_prepare_stack); for(i = 0; i < rt->class_count; i++) { JS_FreeValue(ctx, ctx->class_proto[i]); } js_free_rt(rt, ctx->class_proto); JS_FreeValue(ctx, ctx->iterator_ctor); JS_FreeValue(ctx, ctx->async_iterator_proto); JS_FreeValue(ctx, ctx->promise_ctor); JS_FreeValue(ctx, ctx->array_ctor); JS_FreeValue(ctx, ctx->regexp_ctor); JS_FreeValue(ctx, ctx->function_ctor); JS_FreeValue(ctx, ctx->function_proto); js_free_shape_null(ctx->rt, ctx->array_shape); list_del(&ctx->link); remove_gc_object(&ctx->header); js_free_rt(ctx->rt, ctx); }
O1
c
JS_FreeContext: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x18(%rdi), %r15 movl (%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rdi) cmpl $0x1, %eax jg 0x1f109 movq %rdi, %rbx leaq 0x1e0(%rdi), %r14 movq 0x1e8(%rdi), %rsi cmpq %r14, %rsi je 0x1eed6 movq 0x8(%rsi), %r12 addq $-0x8, %rsi movq %rbx, %rdi callq 0x3aa8c movq %r12, %rsi cmpq %r14, %r12 jne 0x1eebe movq 0x18(%rbx), %rdi movq 0x1a0(%rbx), %rsi movq 0x1a8(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x1b0(%rbx), %rsi movq 0x1b8(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x180(%rbx), %rsi movq 0x188(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x190(%rbx), %rsi movq 0x198(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x170(%rbx), %rsi movq 0x178(%rbx), %rdx callq 0x1ccb2 movl $0xa0, %r14d movq -0x8(%rbx,%r14), %rsi movq (%rbx,%r14), %rdx movq 0x18(%rbx), %rdi callq 0x1ccb2 addq $0x10, %r14 cmpq $0x120, %r14 # imm = 0x120 jne 0x1ef4f movq 0x18(%rbx), %rdi movq 0x118(%rbx), %rsi movq 0x120(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x128(%rbx), %rsi movq 0x130(%rbx), %rdx callq 0x1ccb2 cmpl $0x0, 0x78(%r15) jle 0x1efd2 movl $0x8, %r14d xorl %r12d, %r12d movq 0x18(%rbx), %rdi movq 0x40(%rbx), %rax movq -0x8(%rax,%r14), %rsi movq (%rax,%r14), %rdx callq 0x1ccb2 incq %r12 movslq 0x78(%r15), %rax addq $0x10, %r14 cmpq %rax, %r12 jl 0x1efac movq 0x40(%rbx), %r14 testq %r14, %r14 je 0x1f000 decq 0x28(%r15) movq %r14, %rdi callq *0x20(%r15) movq 0x30(%r15), %rcx movq 0x40(%r15), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r15) movq %r14, %rsi callq *0x10(%r15) movq 0x18(%rbx), %rdi movq 0x140(%rbx), %rsi movq 0x148(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x160(%rbx), %rsi movq 0x168(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x88(%rbx), %rsi movq 0x90(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x68(%rbx), %rsi movq 0x70(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x78(%rbx), %rsi movq 0x80(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x58(%rbx), %rsi movq 0x60(%rbx), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x48(%rbx), %rsi movq 0x50(%rbx), %rdx callq 0x1ccb2 movq 0x38(%rbx), %rsi testq %rsi, %rsi je 0x1f0a5 movq 0x18(%rbx), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jle 0x1f115 movq 0x20(%rbx), %rax movq 0x28(%rbx), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rbx) movq 0x8(%rbx), %rax movq 0x10(%rbx), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) movups %xmm0, 0x8(%rbx) testq %rbx, %rbx je 0x1f109 movq 0x18(%rbx), %r14 decq 0x28(%r14) movq %rbx, %rdi callq *0x20(%r14) movq 0x10(%r14), %rcx movq 0x30(%r14), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%r14) movq 0x40(%r14), %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq callq 0x3b05a jmp 0x1f0a5
JS_FreeContext: push r15 push r14 push r12 push rbx push rax mov r15, [rdi+18h] mov eax, [rdi] lea ecx, [rax-1] mov [rdi], ecx cmp eax, 1 jg loc_1F109 mov rbx, rdi lea r14, [rdi+1E0h] mov rsi, [rdi+1E8h] cmp rsi, r14 jz short loc_1EED6 loc_1EEBE: mov r12, [rsi+8] add rsi, 0FFFFFFFFFFFFFFF8h mov rdi, rbx call js_free_module_def mov rsi, r12 cmp r12, r14 jnz short loc_1EEBE loc_1EED6: mov rdi, [rbx+18h] mov rsi, [rbx+1A0h] mov rdx, [rbx+1A8h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+1B0h] mov rdx, [rbx+1B8h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+180h] mov rdx, [rbx+188h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+190h] mov rdx, [rbx+198h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+170h] mov rdx, [rbx+178h] call JS_FreeValueRT mov r14d, 0A0h loc_1EF4F: mov rsi, [rbx+r14-8] mov rdx, [rbx+r14] mov rdi, [rbx+18h] call JS_FreeValueRT add r14, 10h cmp r14, 120h jnz short loc_1EF4F mov rdi, [rbx+18h] mov rsi, [rbx+118h] mov rdx, [rbx+120h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+128h] mov rdx, [rbx+130h] call JS_FreeValueRT cmp dword ptr [r15+78h], 0 jle short loc_1EFD2 mov r14d, 8 xor r12d, r12d loc_1EFAC: mov rdi, [rbx+18h] mov rax, [rbx+40h] mov rsi, [rax+r14-8] mov rdx, [rax+r14] call JS_FreeValueRT inc r12 movsxd rax, dword ptr [r15+78h] add r14, 10h cmp r12, rax jl short loc_1EFAC loc_1EFD2: mov r14, [rbx+40h] test r14, r14 jz short loc_1F000 dec qword ptr [r15+28h] mov rdi, r14 call qword ptr [r15+20h] mov rcx, [r15+30h] mov rdi, [r15+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r15+30h], rcx mov rsi, r14 call qword ptr [r15+10h] loc_1F000: mov rdi, [rbx+18h] mov rsi, [rbx+140h] mov rdx, [rbx+148h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+160h] mov rdx, [rbx+168h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+88h] mov rdx, [rbx+90h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+68h] mov rdx, [rbx+70h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+78h] mov rdx, [rbx+80h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+58h] mov rdx, [rbx+60h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rbx+48h] mov rdx, [rbx+50h] call JS_FreeValueRT mov rsi, [rbx+38h] test rsi, rsi jz short loc_1F0A5 mov rdi, [rbx+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jle short loc_1F115 loc_1F0A5: mov rax, [rbx+20h] mov rcx, [rbx+28h] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+20h], xmm0 mov rax, [rbx+8] mov rcx, [rbx+10h] mov [rax+8], rcx mov [rcx], rax movups xmmword ptr [rbx+8], xmm0 test rbx, rbx jz short loc_1F109 mov r14, [rbx+18h] dec qword ptr [r14+28h] mov rdi, rbx call qword ptr [r14+20h] mov rcx, [r14+10h] mov rdx, [r14+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [r14+30h], rdx mov rdi, [r14+40h] mov rsi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp rcx loc_1F109: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_1F115: call js_free_shape0 jmp short loc_1F0A5
long long JS_FreeContext(unsigned int *a1) { long long v1; // r15 long long result; // rax unsigned int *v4; // rsi unsigned int *v5; // r12 long long i; // r14 long long v7; // r14 long long v8; // r12 long long v9; // r14 long long v10; // rax long long v11; // rdi _DWORD *v12; // rsi long long v13; // rdi int v14; // eax long long v15; // rax _QWORD *v16; // rcx long long *v17; // rcx long long v18; // r14 long long v19; // rax long long ( *v20)(_QWORD, unsigned int *); // rcx v1 = *((_QWORD *)a1 + 3); result = *a1; *a1 = result - 1; if ( (int)result <= 1 ) { v4 = (unsigned int *)*((_QWORD *)a1 + 61); if ( v4 != a1 + 120 ) { do { v5 = (unsigned int *)*((_QWORD *)v4 + 1); js_free_module_def(a1, v4 - 2); v4 = v5; } while ( v5 != a1 + 120 ); } JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 52), *((_QWORD *)a1 + 53)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 54), *((_QWORD *)a1 + 55)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 48), *((_QWORD *)a1 + 49)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 50), *((_QWORD *)a1 + 51)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 46), *((_QWORD *)a1 + 47)); for ( i = 40LL; i != 72; i += 4LL ) JS_FreeValueRT(*((_QWORD *)a1 + 3), *(_DWORD **)&a1[i - 2], *(_QWORD *)&a1[i]); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 35), *((_QWORD *)a1 + 36)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 37), *((_QWORD *)a1 + 38)); if ( *(int *)(v1 + 120) > 0 ) { v7 = 8LL; v8 = 0LL; do { JS_FreeValueRT( *((_QWORD *)a1 + 3), *(_DWORD **)(*((_QWORD *)a1 + 8) + v7 - 8), *(_QWORD *)(*((_QWORD *)a1 + 8) + v7)); ++v8; v7 += 16LL; } while ( v8 < *(int *)(v1 + 120) ); } v9 = *((_QWORD *)a1 + 8); if ( v9 ) { --*(_QWORD *)(v1 + 40); v10 = (*(long long ( **)(long long))(v1 + 32))(v9); v11 = *(_QWORD *)(v1 + 64); *(_QWORD *)(v1 + 48) = *(_QWORD *)(v1 + 48) - v10 - 8; (*(void ( **)(long long, long long))(v1 + 16))(v11, v9); } JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 40), *((_QWORD *)a1 + 41)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 44), *((_QWORD *)a1 + 45)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 17), *((_QWORD *)a1 + 18)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 13), *((_QWORD *)a1 + 14)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 15), *((_QWORD *)a1 + 16)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 11), *((_QWORD *)a1 + 12)); JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 9), *((_QWORD *)a1 + 10)); v12 = (_DWORD *)*((_QWORD *)a1 + 7); if ( v12 ) { v13 = *((_QWORD *)a1 + 3); v14 = (*v12)--; if ( v14 <= 1 ) js_free_shape0(v13, v12); } v15 = *((_QWORD *)a1 + 4); v16 = (_QWORD *)*((_QWORD *)a1 + 5); *(_QWORD *)(v15 + 8) = v16; *v16 = v15; *((_OWORD *)a1 + 2) = 0LL; result = *((_QWORD *)a1 + 1); v17 = (long long *)*((_QWORD *)a1 + 2); *(_QWORD *)(result + 8) = v17; *v17 = result; *(_OWORD *)(a1 + 2) = 0LL; if ( a1 ) { v18 = *((_QWORD *)a1 + 3); --*(_QWORD *)(v18 + 40); v19 = (*(long long ( **)(unsigned int *))(v18 + 32))(a1); v20 = *(long long ( **)(_QWORD, unsigned int *))(v18 + 16); *(_QWORD *)(v18 + 48) = *(_QWORD *)(v18 + 48) - v19 - 8; return v20(*(_QWORD *)(v18 + 64), a1); } } return result; }
JS_FreeContext: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RDI + 0x18] MOV EAX,dword ptr [RDI] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI],ECX CMP EAX,0x1 JG 0x0011f109 MOV RBX,RDI LEA R14,[RDI + 0x1e0] MOV RSI,qword ptr [RDI + 0x1e8] CMP RSI,R14 JZ 0x0011eed6 LAB_0011eebe: MOV R12,qword ptr [RSI + 0x8] ADD RSI,-0x8 MOV RDI,RBX CALL 0x0013aa8c MOV RSI,R12 CMP R12,R14 JNZ 0x0011eebe LAB_0011eed6: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x1a0] MOV RDX,qword ptr [RBX + 0x1a8] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x1b0] MOV RDX,qword ptr [RBX + 0x1b8] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x180] MOV RDX,qword ptr [RBX + 0x188] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x190] MOV RDX,qword ptr [RBX + 0x198] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x170] MOV RDX,qword ptr [RBX + 0x178] CALL 0x0011ccb2 MOV R14D,0xa0 LAB_0011ef4f: MOV RSI,qword ptr [RBX + R14*0x1 + -0x8] MOV RDX,qword ptr [RBX + R14*0x1] MOV RDI,qword ptr [RBX + 0x18] CALL 0x0011ccb2 ADD R14,0x10 CMP R14,0x120 JNZ 0x0011ef4f MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x118] MOV RDX,qword ptr [RBX + 0x120] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x128] MOV RDX,qword ptr [RBX + 0x130] CALL 0x0011ccb2 CMP dword ptr [R15 + 0x78],0x0 JLE 0x0011efd2 MOV R14D,0x8 XOR R12D,R12D LAB_0011efac: MOV RDI,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + R14*0x1 + -0x8] MOV RDX,qword ptr [RAX + R14*0x1] CALL 0x0011ccb2 INC R12 MOVSXD RAX,dword ptr [R15 + 0x78] ADD R14,0x10 CMP R12,RAX JL 0x0011efac LAB_0011efd2: MOV R14,qword ptr [RBX + 0x40] TEST R14,R14 JZ 0x0011f000 DEC qword ptr [R15 + 0x28] MOV RDI,R14 CALL qword ptr [R15 + 0x20] MOV RCX,qword ptr [R15 + 0x30] MOV RDI,qword ptr [R15 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R15 + 0x30],RCX MOV RSI,R14 CALL qword ptr [R15 + 0x10] LAB_0011f000: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x140] MOV RDX,qword ptr [RBX + 0x148] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x160] MOV RDX,qword ptr [RBX + 0x168] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x88] MOV RDX,qword ptr [RBX + 0x90] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x68] MOV RDX,qword ptr [RBX + 0x70] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x78] MOV RDX,qword ptr [RBX + 0x80] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x58] MOV RDX,qword ptr [RBX + 0x60] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] CALL 0x0011ccb2 MOV RSI,qword ptr [RBX + 0x38] TEST RSI,RSI JZ 0x0011f0a5 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JLE 0x0011f115 LAB_0011f0a5: MOV RAX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x28] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOV RAX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX MOVUPS xmmword ptr [RBX + 0x8],XMM0 TEST RBX,RBX JZ 0x0011f109 MOV R14,qword ptr [RBX + 0x18] DEC qword ptr [R14 + 0x28] MOV RDI,RBX CALL qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [R14 + 0x30],RDX MOV RDI,qword ptr [R14 + 0x40] MOV RSI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP RCX LAB_0011f109: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0011f115: CALL 0x0013b05a JMP 0x0011f0a5
void JS_FreeContext(int *param_1) { int iVar1; long lVar2; int *piVar3; int *piVar4; int8 uVar5; long *plVar6; long lVar7; long lVar8; lVar2 = *(long *)(param_1 + 6); iVar1 = *param_1; *param_1 = iVar1 + -1; if (iVar1 < 2) { piVar4 = *(int **)(param_1 + 0x7a); while (piVar4 != param_1 + 0x78) { piVar3 = *(int **)(piVar4 + 2); js_free_module_def(param_1,piVar4 + -2); piVar4 = piVar3; } JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x68), *(int8 *)(param_1 + 0x6a)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x6c), *(int8 *)(param_1 + 0x6e)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x60), *(int8 *)(param_1 + 0x62)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 100), *(int8 *)(param_1 + 0x66)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x5c), *(int8 *)(param_1 + 0x5e)); lVar7 = 0xa0; do { JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)((long)param_1 + lVar7 + -8), *(int8 *)((long)param_1 + lVar7)); lVar7 = lVar7 + 0x10; } while (lVar7 != 0x120); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x46), *(int8 *)(param_1 + 0x48)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x4a), *(int8 *)(param_1 + 0x4c)); if (0 < *(int *)(lVar2 + 0x78)) { lVar8 = 8; lVar7 = 0; do { JS_FreeValueRT(*(int8 *)(param_1 + 6), *(int8 *)(*(long *)(param_1 + 0x10) + -8 + lVar8), *(int8 *)(*(long *)(param_1 + 0x10) + lVar8)); lVar7 = lVar7 + 1; lVar8 = lVar8 + 0x10; } while (lVar7 < *(int *)(lVar2 + 0x78)); } lVar7 = *(long *)(param_1 + 0x10); if (lVar7 != 0) { *(long *)(lVar2 + 0x28) = *(long *)(lVar2 + 0x28) + -1; lVar8 = (**(code **)(lVar2 + 0x20))(lVar7); *(long *)(lVar2 + 0x30) = (*(long *)(lVar2 + 0x30) - lVar8) + -8; (**(code **)(lVar2 + 0x10))(*(int8 *)(lVar2 + 0x40),lVar7); } JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x50), *(int8 *)(param_1 + 0x52)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x58), *(int8 *)(param_1 + 0x5a)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x22), *(int8 *)(param_1 + 0x24)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x1a), *(int8 *)(param_1 + 0x1c)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x1e), *(int8 *)(param_1 + 0x20)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x16), *(int8 *)(param_1 + 0x18)); JS_FreeValueRT(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0x12), *(int8 *)(param_1 + 0x14)); piVar4 = *(int **)(param_1 + 0xe); if (piVar4 != (int *)0x0) { uVar5 = *(int8 *)(param_1 + 6); iVar1 = *piVar4; *piVar4 = iVar1 + -1; if (iVar1 < 2) { js_free_shape0(uVar5); } } lVar2 = *(long *)(param_1 + 8); plVar6 = *(long **)(param_1 + 10); *(long **)(lVar2 + 8) = plVar6; *plVar6 = lVar2; param_1[8] = 0; param_1[9] = 0; param_1[10] = 0; param_1[0xb] = 0; lVar2 = *(long *)(param_1 + 2); plVar6 = *(long **)(param_1 + 4); *(long **)(lVar2 + 8) = plVar6; *plVar6 = lVar2; param_1[2] = 0; param_1[3] = 0; param_1[4] = 0; param_1[5] = 0; if (param_1 != (int *)0x0) { lVar2 = *(long *)(param_1 + 6); *(long *)(lVar2 + 0x28) = *(long *)(lVar2 + 0x28) + -1; lVar7 = (**(code **)(lVar2 + 0x20))(param_1); lVar7 = (*(long *)(lVar2 + 0x30) - lVar7) + -8; *(long *)(lVar2 + 0x30) = lVar7; /* WARNING: Could not recover jumptable at 0x0011f107. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar2 + 0x10)) (*(int8 *)(lVar2 + 0x40),param_1,lVar7,*(code **)(lVar2 + 0x10)); return; } } return; }
17,127
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>::operator[](unsigned long) const
llama.cpp/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<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>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x8154f 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 0x20650 movq %rax, %rbx movq %r14, %rdi callq 0x7a7e6 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x9a221(%rip), %rsi # 0x11b794 leaq 0x10(%rsp), %rdi callq 0x815e5 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x80242 xorl %ebp, %ebp leaq 0xdfaa2(%rip), %rsi # 0x161040 leaq -0xac47(%rip), %rdx # 0x7695e movq %rbx, %rdi callq 0x20a50 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x815cb movq 0x20(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0x815d5 jmp 0x815dd movq %rax, %r14 movq %rbx, %rdi callq 0x20f00 movq %r14, %rdi callq 0x20af0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_8154F mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_8154F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; 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>::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_jsonISt3mapSt6vectorNSt7__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_815CB mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_815CB: test bpl, bpl jnz short loc_815D5 jmp short loc_815DD mov r14, rax loc_815D5: mov rdi, rbx; void * call ___cxa_free_exception loc_815DD: mov rdi, r14 call __Unwind_Resume
long long 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>::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<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>::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_jsonISt3mapSt6vectorNSt7__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 0x0018154f 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_0018154f: MOV EDI,0x20 CALL 0x00120650 MOV RBX,RAX MOV RDI,R14 CALL 0x0017a7e6 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0018156c: LEA RSI,[0x21b794] LEA RDI,[RSP + 0x10] CALL 0x001815e5 MOV BPL,0x1 LAB_00181580: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x00180242 XOR EBP,EBP LEA RSI,[0x261040] LEA RDX,[0x17695e] MOV RDI,RBX CALL 0x00120a50
/* 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>::operator[](unsigned long) const */ long __thiscall 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> ::operator[](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> *this,ulong param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (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> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0018156c to 0018157c has its CatchHandler @ 001815d2 */ 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 00181580 to 001815ac has its CatchHandler @ 001815ad */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__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); }
17,128
common_init()::$_0::__invoke(ggml_log_level, char const*, void*)
monkey531[P]llama/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O3
cpp
common_init()::$_0::__invoke(ggml_log_level, char const*, void*): leaq 0xb9eeb(%rip), %rax # 0xdcff0 cmpl $0x0, (%rax) js 0x23133 pushq %rbp pushq %rbx pushq %rax movq %rsi, %rbx movl %edi, %ebp callq 0x7eabf leaq 0x8d838(%rip), %rdx # 0xb0956 movq %rax, %rdi movl %ebp, %esi movq %rbx, %rcx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp jmp 0x7eb5c retq
_ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short locret_23133 push rbp push rbx push rax mov rbx, rsi mov ebp, edi call _Z15common_log_mainv; common_log_main(void) lea rdx, aSkippingToolWi+20h; "%s" mov rdi, rax mov esi, ebp mov rcx, rbx xor eax, eax add rsp, 8 pop rbx pop rbp jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) locret_23133: retn
void * common_init(void)::$_0::__invoke(int a1, int a2) { void *result; // rax int v3; // eax int v4; // r8d int v5; // r9d result = &common_log_verbosity_thold; if ( common_log_verbosity_thold >= 0 ) { v3 = common_log_main(); return (void *)common_log_add(v3, a1, (unsigned int)"%s", a2, v4, v5); } return result; }
__invoke: LEA RAX,[0x1dcff0] CMP dword ptr [RAX],0x0 JS 0x00123133 PUSH RBP PUSH RBX PUSH RAX MOV RBX,RSI MOV EBP,EDI CALL 0x0017eabf LEA RDX,[0x1b0956] MOV RDI,RAX MOV ESI,EBP MOV RCX,RBX XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP JMP 0x0017eb5c LAB_00123133: RET
/* __invoke(ggml_log_level, char const*, void*) */ void common_init()::$_0::__invoke(int4 param_1,int8 param_2) { int8 uVar1; if (-1 < common_log_verbosity_thold) { uVar1 = common_log_main(); common_log_add(uVar1,param_1,"%s",param_2); return; } return; }
17,129
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
llama.cpp/common/json.hpp
static diyfp mul(const diyfp& x, const diyfp& y) noexcept { static_assert(kPrecision == 64, "internal error"); // Computes: // f = round((x.f * y.f) / 2^q) // e = x.e + y.e + q // Emulate the 64-bit * 64-bit multiplication: // // p = u * v // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi ) // = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 ) // = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) // = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3) // = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) // = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) // // (Since Q might be larger than 2^32 - 1) // // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) // // (Q_hi + H does not overflow a 64-bit int) // // = p_lo + 2^64 p_hi const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; const std::uint64_t u_hi = x.f >> 32u; const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; const std::uint64_t v_hi = y.f >> 32u; const std::uint64_t p0 = u_lo * v_lo; const std::uint64_t p1 = u_lo * v_hi; const std::uint64_t p2 = u_hi * v_lo; const std::uint64_t p3 = u_hi * v_hi; const std::uint64_t p0_hi = p0 >> 32u; const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; const std::uint64_t p1_hi = p1 >> 32u; const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; const std::uint64_t p2_hi = p2 >> 32u; std::uint64_t Q = p0_hi + p1_lo + p2_lo; // The full product might now be computed as // // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) // p_lo = p0_lo + (Q << 32) // // But in this particular case here, the full p_lo is not required. // Effectively we only need to add the highest bit in p_lo to p_hi (and // Q_hi + 1 does not overflow). Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); return {h, x.e + y.e + 64}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&): movq (%rdi), %rax movl %eax, %ecx shrq $0x20, %rax movq (%rsi), %r8 movl %r8d, %edx shrq $0x20, %r8 movq %rdx, %r9 imulq %rcx, %r9 imulq %r8, %rcx imulq %rax, %rdx imulq %rax, %r8 shrq $0x20, %r9 movl %ecx, %r10d addq %r9, %r10 shrq $0x20, %rcx movl %edx, %eax addq %r10, %rax shrq $0x20, %rdx addq %r8, %rdx addq %rcx, %rdx subq $-0x80000000, %rax # imm = 0x80000000 shrq $0x20, %rax addq %rdx, %rax movl 0x8(%rdi), %ecx movl 0x8(%rsi), %edx addl %ecx, %edx addl $0x40, %edx retq
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_: mov rax, [rdi] mov ecx, eax shr rax, 20h mov r8, [rsi] mov edx, r8d shr r8, 20h mov r9, rdx imul r9, rcx imul rcx, r8 imul rdx, rax imul r8, rax shr r9, 20h mov r10d, ecx add r10, r9 shr rcx, 20h mov eax, edx add rax, r10 shr rdx, 20h add rdx, r8 add rdx, rcx sub rax, 0FFFFFFFF80000000h shr rax, 20h add rax, rdx mov ecx, [rdi+8] mov edx, [rsi+8] add edx, ecx add edx, 40h ; '@' retn
unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2) { long long v2; // rcx v2 = (unsigned int)*a1; return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32) + HIDWORD(*a1) * HIDWORD(*a2) + ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32) + ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32) + (unsigned int)(HIDWORD(*a2) * v2) + (unsigned int)(HIDWORD(*a1) * *a2) + 0x80000000) >> 32); }
mul: MOV RAX,qword ptr [RDI] MOV ECX,EAX SHR RAX,0x20 MOV R8,qword ptr [RSI] MOV EDX,R8D SHR R8,0x20 MOV R9,RDX IMUL R9,RCX IMUL RCX,R8 IMUL RDX,RAX IMUL R8,RAX SHR R9,0x20 MOV R10D,ECX ADD R10,R9 SHR RCX,0x20 MOV EAX,EDX ADD RAX,R10 SHR RDX,0x20 ADD RDX,R8 ADD RDX,RCX SUB RAX,-0x80000000 SHR RAX,0x20 ADD RAX,RDX MOV ECX,dword ptr [RDI + 0x8] MOV EDX,dword ptr [RSI + 0x8] ADD EDX,ECX ADD EDX,0x40 RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */ int1 [16] nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2) { ulong uVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; ulong uVar6; int1 auVar7 [16]; uVar2 = *(ulong *)param_1 & 0xffffffff; uVar1 = *(ulong *)param_1 >> 0x20; uVar4 = *(ulong *)param_2 & 0xffffffff; uVar6 = *(ulong *)param_2 >> 0x20; uVar3 = uVar2 * uVar6; uVar5 = uVar4 * uVar1; auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000 >> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20); auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40; auVar7._12_4_ = 0; return auVar7; }
17,130
evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/vm.cpp
evmc_set_option_result set_option(evmc_vm* c_vm, char const* c_name, char const* c_value) noexcept { const auto name = (c_name != nullptr) ? std::string_view{c_name} : std::string_view{}; const auto value = (c_value != nullptr) ? std::string_view{c_value} : std::string_view{}; auto& vm = *static_cast<VM*>(c_vm); if (name == "advanced") { c_vm->execute = evmone::advanced::execute; return EVMC_SET_OPTION_SUCCESS; } else if (name == "cgoto") { #if EVMONE_CGOTO_SUPPORTED if (value == "no") { vm.cgoto = false; return EVMC_SET_OPTION_SUCCESS; } return EVMC_SET_OPTION_INVALID_VALUE; #else return EVMC_SET_OPTION_INVALID_NAME; #endif } else if (name == "trace") { vm.add_tracer(create_instruction_tracer(std::clog)); return EVMC_SET_OPTION_SUCCESS; } else if (name == "histogram") { vm.add_tracer(create_histogram_tracer(std::clog)); return EVMC_SET_OPTION_SUCCESS; } else if (name == "validate_eof") { vm.validate_eof = true; return EVMC_SET_OPTION_SUCCESS; } return EVMC_SET_OPTION_INVALID_NAME; }
O2
cpp
evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx testq %rsi, %rsi je 0x2ec2c movq %r14, %rdi callq 0x22210 movq %rax, %r15 jmp 0x2ec2f xorl %r15d, %r15d testq %r12, %r12 je 0x2ec41 movq %r12, %rdi callq 0x22210 movq %rax, %r13 jmp 0x2ec44 xorl %r13d, %r13d leaq 0x47482(%rip), %rcx # 0x760cd pushq $0x8 popq %rdx movq %r15, %rdi movq %r14, %rsi callq 0x2f14e testb %al, %al je 0x2ec7a leaq 0xf06(%rip), %rax # 0x2fb6a movq %rax, 0x20(%rbx) xorl %ebx, %ebx movl %ebx, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x47455(%rip), %rcx # 0x760d6 pushq $0x5 popq %rdx movq %r15, %rdi movq %r14, %rsi callq 0x2f14e testb %al, %al je 0x2ecb2 leaq 0x47442(%rip), %rcx # 0x760dc pushq $0x2 popq %rdx movq %r13, %rdi movq %r12, %rsi callq 0x2f14e testb %al, %al je 0x2ece3 movb $0x0, 0x38(%rbx) jmp 0x2ec68 leaq 0x47426(%rip), %rcx # 0x760df pushq $0x5 popq %rdx movq %r15, %rdi movq %r14, %rsi callq 0x2f14e testb %al, %al je 0x2ece8 movq 0x8d2b6(%rip), %rsi # 0xbbf88 leaq 0x8(%rsp), %rdi callq 0x44ecb leaq 0x8(%rsp), %r14 jmp 0x2ed13 pushq $0x2 popq %rbx jmp 0x2ec6a leaq 0x473f6(%rip), %rcx # 0x760e5 pushq $0x9 popq %rdx movq %r15, %rdi movq %r14, %rsi callq 0x2f14e testb %al, %al je 0x2ed37 movq 0x8d280(%rip), %rsi # 0xbbf88 movq %rsp, %rdi callq 0x44db8 movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x2f182 movq (%r14), %rdi xorl %ebx, %ebx testq %rdi, %rdi je 0x2ec6a movq (%rdi), %rax callq *0x8(%rax) jmp 0x2ec6a leaq 0x473b1(%rip), %rcx # 0x760ef pushq $0xc popq %rdx movq %r15, %rdi movq %r14, %rsi callq 0x2f14e testb %al, %al je 0x2ed59 movb $0x1, 0x39(%rbx) jmp 0x2ec68 pushq $0x1 jmp 0x2ece5 movq %rax, %rdi callq 0x2e859 nop
_ZN6evmone12_GLOBAL__N_110set_optionEP7evmc_vmPKcS4_: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r12, rdx mov r14, rsi mov rbx, rdi test rsi, rsi jz short loc_2EC2C mov rdi, r14 call _strlen mov r15, rax jmp short loc_2EC2F loc_2EC2C: xor r15d, r15d loc_2EC2F: test r12, r12 jz short loc_2EC41 mov rdi, r12 call _strlen mov r13, rax jmp short loc_2EC44 loc_2EC41: xor r13d, r13d loc_2EC44: lea rcx, aAdvanced; "advanced" push 8 pop rdx mov rdi, r15 mov rsi, r14 call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, al jz short loc_2EC7A lea rax, _ZN6evmone8advanced7executeEP7evmc_vmPK19evmc_host_interfaceP17evmc_host_context13evmc_revisionPK12evmc_messagePKhm; evmone::advanced::execute(evmc_vm *,evmc_host_interface const*,evmc_host_context *,evmc_revision,evmc_message const*,uchar const*,ulong) mov [rbx+20h], rax loc_2EC68: xor ebx, ebx loc_2EC6A: mov eax, ebx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_2EC7A: lea rcx, aCgoto; "cgoto" push 5 pop rdx mov rdi, r15 mov rsi, r14 call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, al jz short loc_2ECB2 lea rcx, aNo; "no" push 2 pop rdx mov rdi, r13 mov rsi, r12 call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, al jz short loc_2ECE3 mov byte ptr [rbx+38h], 0 jmp short loc_2EC68 loc_2ECB2: lea rcx, aTrace; "trace" push 5 pop rdx mov rdi, r15 mov rsi, r14 call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, al jz short loc_2ECE8 mov rsi, cs:_ZSt4clog_ptr lea rdi, [rsp+38h+var_30] call _ZN6evmone25create_instruction_tracerERSo; evmone::create_instruction_tracer(std::ostream &) lea r14, [rsp+38h+var_30] jmp short loc_2ED13 loc_2ECE3: push 2 loc_2ECE5: pop rbx jmp short loc_2EC6A loc_2ECE8: lea rcx, aHistogram; "histogram" push 9 pop rdx mov rdi, r15 mov rsi, r14 call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, al jz short loc_2ED37 mov rsi, cs:_ZSt4clog_ptr mov rdi, rsp call _ZN6evmone23create_histogram_tracerERSo; evmone::create_histogram_tracer(std::ostream &) mov r14, rsp loc_2ED13: mov rdi, rbx mov rsi, r14 call _ZN6evmone2VM10add_tracerESt10unique_ptrINS_6TracerESt14default_deleteIS2_EE; evmone::VM::add_tracer(std::unique_ptr<evmone::Tracer>) mov rdi, [r14] xor ebx, ebx test rdi, rdi jz loc_2EC6A mov rax, [rdi] call qword ptr [rax+8] jmp loc_2EC6A loc_2ED37: lea rcx, aValidateEof; "validate_eof" push 0Ch pop rdx mov rdi, r15 mov rsi, r14 call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, al jz short loc_2ED59 mov byte ptr [rbx+39h], 1 jmp loc_2EC68 loc_2ED59: push 1 jmp short loc_2ECE5 mov rdi, rax call __clang_call_terminate
long long evmone::`anonymous namespace'::set_option(long long a1, long long a2, long long a3) { long long v4; // r15 long long v5; // r13 unsigned int v6; // ebx long long *v8; // r14 long long v10; // [rsp+0h] [rbp-38h] BYREF _BYTE v11[48]; // [rsp+8h] [rbp-30h] BYREF if ( a2 ) v4 = strlen(a2); else v4 = 0LL; if ( a3 ) v5 = strlen(a3); else v5 = 0LL; if ( (unsigned __int8)std::operator==<char,std::char_traits<char>>(v4, a2, 8LL, "advanced") ) { *(_QWORD *)(a1 + 32) = evmone::advanced::execute; return 0; } if ( (unsigned __int8)std::operator==<char,std::char_traits<char>>(v4, a2, 5LL, "cgoto") ) { if ( (unsigned __int8)std::operator==<char,std::char_traits<char>>(v5, a3, 2LL, "no") ) { *(_BYTE *)(a1 + 56) = 0; return 0; } return 2; } if ( (unsigned __int8)std::operator==<char,std::char_traits<char>>(v4, a2, 5LL, "trace") ) { evmone::create_instruction_tracer(v11, &std::clog); v8 = (long long *)v11; } else { if ( !(unsigned __int8)std::operator==<char,std::char_traits<char>>(v4, a2, 9LL, "histogram") ) { if ( (unsigned __int8)std::operator==<char,std::char_traits<char>>(v4, a2, 12LL, "validate_eof") ) { *(_BYTE *)(a1 + 57) = 1; return 0; } return 1; } evmone::create_histogram_tracer(&v10, &std::clog); v8 = &v10; } evmone::VM::add_tracer(a1, v8); v6 = 0; if ( *v8 ) (*(void ( **)(long long))(*(_QWORD *)*v8 + 8LL))(*v8); return v6; }
set_option: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,RDX MOV R14,RSI MOV RBX,RDI TEST RSI,RSI JZ 0x0012ec2c MOV RDI,R14 CALL 0x00122210 MOV R15,RAX JMP 0x0012ec2f LAB_0012ec2c: XOR R15D,R15D LAB_0012ec2f: TEST R12,R12 JZ 0x0012ec41 MOV RDI,R12 CALL 0x00122210 MOV R13,RAX JMP 0x0012ec44 LAB_0012ec41: XOR R13D,R13D LAB_0012ec44: LEA RCX,[0x1760cd] PUSH 0x8 POP RDX MOV RDI,R15 MOV RSI,R14 CALL 0x0012f14e TEST AL,AL JZ 0x0012ec7a LEA RAX,[0x12fb6a] MOV qword ptr [RBX + 0x20],RAX LAB_0012ec68: XOR EBX,EBX LAB_0012ec6a: MOV EAX,EBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0012ec7a: LEA RCX,[0x1760d6] PUSH 0x5 POP RDX MOV RDI,R15 MOV RSI,R14 CALL 0x0012f14e TEST AL,AL JZ 0x0012ecb2 LEA RCX,[0x1760dc] PUSH 0x2 POP RDX MOV RDI,R13 MOV RSI,R12 CALL 0x0012f14e TEST AL,AL JZ 0x0012ece3 MOV byte ptr [RBX + 0x38],0x0 JMP 0x0012ec68 LAB_0012ecb2: LEA RCX,[0x1760df] PUSH 0x5 POP RDX MOV RDI,R15 MOV RSI,R14 CALL 0x0012f14e TEST AL,AL JZ 0x0012ece8 LAB_0012eccb: MOV RSI,qword ptr [0x001bbf88] LEA RDI,[RSP + 0x8] CALL 0x00144ecb LEA R14,[RSP + 0x8] JMP 0x0012ed13 LAB_0012ece3: PUSH 0x2 LAB_0012ece5: POP RBX JMP 0x0012ec6a LAB_0012ece8: LEA RCX,[0x1760e5] PUSH 0x9 POP RDX MOV RDI,R15 MOV RSI,R14 CALL 0x0012f14e TEST AL,AL JZ 0x0012ed37 MOV RSI,qword ptr [0x001bbf88] MOV RDI,RSP CALL 0x00144db8 LAB_0012ed10: MOV R14,RSP LAB_0012ed13: MOV RDI,RBX MOV RSI,R14 CALL 0x0012f182 MOV RDI,qword ptr [R14] XOR EBX,EBX TEST RDI,RDI JZ 0x0012ec6a MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] JMP 0x0012ec6a LAB_0012ed37: LEA RCX,[0x1760ef] PUSH 0xc POP RDX MOV RDI,R15 MOV RSI,R14 CALL 0x0012f14e TEST AL,AL JZ 0x0012ed59 MOV byte ptr [RBX + 0x39],0x1 JMP 0x0012ec68 LAB_0012ed59: PUSH 0x1 JMP 0x0012ece5
/* evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*) */ int8 evmone::(anonymous_namespace)::set_option(evmc_vm *param_1,char *param_2,char *param_3) { bool bVar1; size_t sVar2; size_t sVar3; evmone *peVar4; evmone aeStack_38 [8]; evmone local_30 [8]; peVar4 = aeStack_38; if (param_2 == (char *)0x0) { sVar2 = 0; } else { sVar2 = strlen(param_2); } if (param_3 == (char *)0x0) { sVar3 = 0; } else { sVar3 = strlen(param_3); } bVar1 = std::operator==(sVar2,param_2,8,"advanced"); if (bVar1) { *(code **)(param_1 + 0x20) = advanced::execute; } else { bVar1 = std::operator==(sVar2,param_2,5,&DAT_001760d6); if (!bVar1) { bVar1 = std::operator==(sVar2,param_2,5,"trace"); if (bVar1) { /* try { // try from 0012eccb to 0012ed0f has its CatchHandler @ 0012ed5d */ create_instruction_tracer(local_30,(ostream *)PTR_clog_001bbf88); peVar4 = local_30; } else { bVar1 = std::operator==(sVar2,param_2,9,"histogram"); if (!bVar1) { bVar1 = std::operator==(sVar2,param_2,0xc,"validate_eof"); if (bVar1) { param_1[0x39] = (evmc_vm)0x1; return 0; } return 1; } create_histogram_tracer(aeStack_38,(ostream *)PTR_clog_001bbf88); } VM::add_tracer((VM *)param_1,peVar4); if (*(long **)peVar4 != (long *)0x0) { (**(code **)(**(long **)peVar4 + 8))(); return 0; } return 0; } bVar1 = std::operator==(sVar3,param_3,2,&DAT_001760dc); if (!bVar1) { return 2; } param_1[0x38] = (evmc_vm)0x0; } return 0; }
17,131
translog_check_sector_protection
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_check_sector_protection(uchar *page, TRANSLOG_FILE *file) { uint i, offset; uchar *table= page + page_overhead[page[TRANSLOG_PAGE_FLAGS]] - TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE; uint8 current= table[0]; DBUG_ENTER("translog_check_sector_protection"); for (i= 1, offset= DISK_DRIVE_SECTOR_SIZE; i < TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE; i++, offset+= DISK_DRIVE_SECTOR_SIZE) { /* TODO: add chunk counting for "suspecting" sectors (difference is more than 1-2), if difference more then present chunks then it is the problem. */ uint8 test= page[offset]; DBUG_PRINT("info", ("sector: #%u offset: %u current: %lx " "read: 0x%x stored: 0x%x%x", i, offset, (ulong) current, (uint) uint2korr(page + offset), (uint) table[i], (uint) table[i + 1])); /* 3 is minimal possible record length. So we can have "distance" between 2 sectors value more then DISK_DRIVE_SECTOR_SIZE / 3 only if it is old value, i.e. the sector was not written. */ if (((test < current) && ((uint)(0xFFL - current + test) > DISK_DRIVE_SECTOR_SIZE / 3)) || ((test >= current) && ((uint)(test - current) > DISK_DRIVE_SECTOR_SIZE / 3))) { if (translog_recover_page_up_to_sector(page, offset)) DBUG_RETURN(1); file->was_recovered= 1; DBUG_RETURN(0); } /* Restore value on the page */ page[offset]= table[i]; current= test; DBUG_PRINT("info", ("sector: #%u offset: %u current: %lx " "read: 0x%x stored: 0x%x", i, offset, (ulong) current, (uint) page[offset], (uint) table[i])); } DBUG_RETURN(0); }
O3
c
translog_check_sector_protection: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movzbl 0x6(%rdi), %ecx leaq 0xb9ab0b(%rip), %rax # 0xc09930 movl (%rax,%rcx,4), %ecx addq %rdi, %rcx addq $-0xf, %rcx movb -0x1(%rcx), %r9b movl $0x400, %r12d # imm = 0x400 movb -0x200(%r14,%r12), %dl movzbl %dl, %edi cmpb %r9b, %dil jae 0x6ee5f movl %r9d, %r8d notb %r8b movzbl %r8b, %r8d addl %edi, %r8d cmpl $0xaa, %r8d ja 0x6ee99 cmpb %r9b, %dl jb 0x6ee73 movzbl %r9b, %r8d subl %r8d, %edi cmpl $0xab, %edi jae 0x6ee99 movb (%rcx), %dil movb %dil, -0x200(%r14,%r12) incq %rcx addq $0x200, %r12 # imm = 0x200 movl %edx, %r9d cmpq $0x2200, %r12 # imm = 0x2200 jne 0x6ee39 jmp 0x6ef5b movq %rsi, -0x30(%rbp) leaq -0x200(%r12), %rbx movzbl 0x6(%r14), %ecx movsbl (%rax,%rcx,4), %r13d movzwl %r13w, %r15d movb (%r14,%r15), %al cmpw %bx, %r13w jae 0x6eefb cmpb $-0x1, %al je 0x6ef32 movq %r14, %rdi movl %r15d, %esi callq 0x6a888 movl %eax, %ecx movb $0x1, %al testw %cx, %cx je 0x6ef5d movzwl %cx, %edx addq %r15, %rdx cmpq $0x2001, %rdx # imm = 0x2001 movl $0x0, %esi cmovael %esi, %ecx addl %ecx, %r13d cmpl $0x2001, %edx # imm = 0x2001 jb 0x6eeaf jmp 0x6ef5d cmpb $-0x1, %al movq -0x30(%rbp), %rbx je 0x6ef3f movzwl %r13w, %esi movq %r14, %rdi callq 0x6a888 testw %ax, %ax je 0x6ef38 movzwl %ax, %ecx addq %rcx, %r15 cmpq %r12, %r15 ja 0x6ef38 addl %r13d, %eax movzwl %ax, %r15d cmpb $-0x1, (%r14,%r15) movl %eax, %r13d jne 0x6ef03 jmp 0x6ef3b movq -0x30(%rbp), %rbx jmp 0x6ef3f movl %r13d, %eax movzwl %ax, %r15d addq %r15, %r14 movl $0x2000, %edx # imm = 0x2000 subl %r15d, %edx movq %r14, %rdi movl $0xff, %esi callq 0x29270 movb $0x1, 0x50(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
translog_check_sector_protection: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi movzx ecx, byte ptr [rdi+6] lea rax, page_overhead mov ecx, [rax+rcx*4] add rcx, rdi add rcx, 0FFFFFFFFFFFFFFF1h mov r9b, [rcx-1] mov r12d, 400h loc_6EE39: mov dl, [r14+r12-200h] movzx edi, dl cmp dil, r9b jnb short loc_6EE5F mov r8d, r9d not r8b movzx r8d, r8b add r8d, edi cmp r8d, 0AAh ja short loc_6EE99 loc_6EE5F: cmp dl, r9b jb short loc_6EE73 movzx r8d, r9b sub edi, r8d cmp edi, 0ABh jnb short loc_6EE99 loc_6EE73: mov dil, [rcx] mov [r14+r12-200h], dil inc rcx add r12, 200h mov r9d, edx cmp r12, 2200h jnz short loc_6EE39 jmp loc_6EF5B loc_6EE99: mov [rbp+var_30], rsi lea rbx, [r12-200h] movzx ecx, byte ptr [r14+6] movsx r13d, byte ptr [rax+rcx*4] loc_6EEAF: movzx r15d, r13w mov al, [r14+r15] cmp r13w, bx jnb short loc_6EEFB cmp al, 0FFh jz short loc_6EF32 mov rdi, r14 mov esi, r15d call translog_get_total_chunk_length mov ecx, eax mov al, 1 test cx, cx jz loc_6EF5D movzx edx, cx add rdx, r15 cmp rdx, 2001h mov esi, 0 cmovnb ecx, esi add r13d, ecx cmp edx, 2001h jb short loc_6EEAF jmp short loc_6EF5D loc_6EEFB: cmp al, 0FFh mov rbx, [rbp+var_30] jz short loc_6EF3F loc_6EF03: movzx esi, r13w mov rdi, r14 call translog_get_total_chunk_length test ax, ax jz short loc_6EF38 movzx ecx, ax add r15, rcx cmp r15, r12 ja short loc_6EF38 add eax, r13d movzx r15d, ax cmp byte ptr [r14+r15], 0FFh mov r13d, eax jnz short loc_6EF03 jmp short loc_6EF3B loc_6EF32: mov rbx, [rbp+var_30] jmp short loc_6EF3F loc_6EF38: mov eax, r13d loc_6EF3B: movzx r15d, ax loc_6EF3F: add r14, r15 mov edx, 2000h sub edx, r15d mov rdi, r14 mov esi, 0FFh call _memset mov byte ptr [rbx+50h], 1 loc_6EF5B: xor eax, eax loc_6EF5D: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char translog_check_sector_protection(long long a1, long long a2) { _BYTE *v2; // rcx unsigned __int8 v3; // r9 unsigned long long v4; // r12 unsigned __int8 v5; // dl int v6; // r13d long long v7; // r15 char v8; // al int total_chunk_length; // ecx char result; // al unsigned long long v11; // rdx long long v12; // rbx int v13; // eax int v14; // eax v2 = (_BYTE *)(a1 + *((unsigned int *)&page_overhead + *(unsigned __int8 *)(a1 + 6)) - 15); v3 = *(_BYTE *)(a1 + *((unsigned int *)&page_overhead + *(unsigned __int8 *)(a1 + 6)) - 16); v4 = 1024LL; while ( 1 ) { v5 = *(_BYTE *)(a1 + v4 - 512); if ( v5 < v3 && v5 + (unsigned int)(unsigned __int8)~v3 > 0xAA ) break; if ( v5 >= v3 && v5 - (unsigned int)v3 >= 0xAB ) break; *(_BYTE *)(a1 + v4 - 512) = *v2++; v4 += 512LL; v3 = v5; if ( v4 == 8704 ) return 0; } v6 = *((char *)&page_overhead + 4 * *(unsigned __int8 *)(a1 + 6)); while ( 1 ) { v7 = (unsigned __int16)v6; v8 = *(_BYTE *)(a1 + (unsigned __int16)v6); if ( (unsigned __int16)v6 >= (unsigned __int16)(v4 - 512) ) break; if ( v8 == -1 ) { v12 = a2; goto LABEL_24; } total_chunk_length = translog_get_total_chunk_length(a1, (unsigned __int16)v6); result = 1; if ( (_WORD)total_chunk_length ) { v11 = (unsigned __int16)v6 + (unsigned long long)(unsigned __int16)total_chunk_length; if ( v11 >= 0x2001 ) total_chunk_length = 0; v6 += total_chunk_length; if ( (unsigned int)v11 < 0x2001 ) continue; } return result; } v12 = a2; if ( v8 != -1 ) { while ( 1 ) { v13 = translog_get_total_chunk_length(a1, (unsigned __int16)v6); if ( !(_WORD)v13 || (unsigned long long)(unsigned __int16)v13 + v7 > v4 ) break; v14 = v6 + v13; v7 = (unsigned __int16)v14; v6 = v14; if ( *(_BYTE *)(a1 + (unsigned __int16)v14) == 0xFF ) goto LABEL_23; } LOWORD(v14) = v6; LABEL_23: v7 = (unsigned __int16)v14; } LABEL_24: memset(v7 + a1, 255LL, (unsigned int)(0x2000 - v7)); *(_BYTE *)(v12 + 80) = 1; return 0; }
translog_check_sector_protection: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOVZX ECX,byte ptr [RDI + 0x6] LEA RAX,[0xd09930] MOV ECX,dword ptr [RAX + RCX*0x4] ADD RCX,RDI ADD RCX,-0xf MOV R9B,byte ptr [RCX + -0x1] MOV R12D,0x400 LAB_0016ee39: MOV DL,byte ptr [R14 + R12*0x1 + -0x200] MOVZX EDI,DL CMP DIL,R9B JNC 0x0016ee5f MOV R8D,R9D NOT R8B MOVZX R8D,R8B ADD R8D,EDI CMP R8D,0xaa JA 0x0016ee99 LAB_0016ee5f: CMP DL,R9B JC 0x0016ee73 MOVZX R8D,R9B SUB EDI,R8D CMP EDI,0xab JNC 0x0016ee99 LAB_0016ee73: MOV DIL,byte ptr [RCX] MOV byte ptr [R14 + R12*0x1 + -0x200],DIL INC RCX ADD R12,0x200 MOV R9D,EDX CMP R12,0x2200 JNZ 0x0016ee39 JMP 0x0016ef5b LAB_0016ee99: MOV qword ptr [RBP + -0x30],RSI LEA RBX,[R12 + -0x200] MOVZX ECX,byte ptr [R14 + 0x6] MOVSX R13D,byte ptr [RAX + RCX*0x4] LAB_0016eeaf: MOVZX R15D,R13W MOV AL,byte ptr [R14 + R15*0x1] CMP R13W,BX JNC 0x0016eefb CMP AL,0xff JZ 0x0016ef32 MOV RDI,R14 MOV ESI,R15D CALL 0x0016a888 MOV ECX,EAX MOV AL,0x1 TEST CX,CX JZ 0x0016ef5d MOVZX EDX,CX ADD RDX,R15 CMP RDX,0x2001 MOV ESI,0x0 CMOVNC ECX,ESI ADD R13D,ECX CMP EDX,0x2001 JC 0x0016eeaf JMP 0x0016ef5d LAB_0016eefb: CMP AL,0xff MOV RBX,qword ptr [RBP + -0x30] JZ 0x0016ef3f LAB_0016ef03: MOVZX ESI,R13W MOV RDI,R14 CALL 0x0016a888 TEST AX,AX JZ 0x0016ef38 MOVZX ECX,AX ADD R15,RCX CMP R15,R12 JA 0x0016ef38 ADD EAX,R13D MOVZX R15D,AX CMP byte ptr [R14 + R15*0x1],0xff MOV R13D,EAX JNZ 0x0016ef03 JMP 0x0016ef3b LAB_0016ef32: MOV RBX,qword ptr [RBP + -0x30] JMP 0x0016ef3f LAB_0016ef38: MOV EAX,R13D LAB_0016ef3b: MOVZX R15D,AX LAB_0016ef3f: ADD R14,R15 MOV EDX,0x2000 SUB EDX,R15D MOV RDI,R14 MOV ESI,0xff CALL 0x00129270 MOV byte ptr [RBX + 0x50],0x1 LAB_0016ef5b: XOR EAX,EAX LAB_0016ef5d: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 translog_check_sector_protection(long param_1,long param_2) { byte bVar1; ushort uVar2; int1 *puVar3; ulong uVar4; byte bVar5; ulong uVar6; ushort uVar7; ulong uVar8; puVar3 = (int1 *) ((ulong)*(uint *)(page_overhead + (ulong)*(byte *)(param_1 + 6) * 4) + param_1 + -0xf); uVar6 = 0x400; bVar5 = *(byte *)((ulong)*(uint *)(page_overhead + (ulong)*(byte *)(param_1 + 6) * 4) + param_1 + -0x10); while( true ) { bVar1 = *(byte *)(param_1 + -0x200 + uVar6); if (((bVar1 < bVar5) && (0xaa < (uint)(byte)~bVar5 + (uint)bVar1)) || ((bVar5 <= bVar1 && (0xaa < (uint)bVar1 - (uint)bVar5)))) break; *(int1 *)(param_1 + -0x200 + uVar6) = *puVar3; puVar3 = puVar3 + 1; uVar6 = uVar6 + 0x200; bVar5 = bVar1; if (uVar6 == 0x2200) { return 0; } } uVar7 = (ushort)(char)page_overhead[(ulong)*(byte *)(param_1 + 6) * 4]; while( true ) { uVar8 = (ulong)uVar7; if ((ushort)((short)uVar6 - 0x200U) <= uVar7) break; if (*(char *)(param_1 + uVar8) == -1) goto LAB_0016ef3f; uVar2 = translog_get_total_chunk_length(param_1,uVar8); if (uVar2 == 0) { return 1; } uVar4 = (ulong)uVar2; if (0x2000 < uVar4 + uVar8) { uVar2 = 0; } uVar7 = uVar7 + uVar2; if (0x2000 < (uint)(uVar4 + uVar8)) { return 1; } } if (*(char *)(param_1 + uVar8) != -1) { do { uVar2 = translog_get_total_chunk_length(param_1,uVar7); if ((uVar2 == 0) || (uVar6 < uVar8 + uVar2)) break; uVar7 = uVar2 + uVar7; uVar8 = (ulong)uVar7; } while (*(char *)(param_1 + uVar8) != -1); uVar8 = (ulong)uVar7; } LAB_0016ef3f: memset((void *)(param_1 + uVar8),0xff,(ulong)(0x2000 - (int)uVar8)); *(int1 *)(param_2 + 0x50) = 1; return 0; }
17,132
js_async_generator_resolve_or_reject
bluesky950520[P]quickjs/quickjs.c
static void js_async_generator_resolve_or_reject(JSContext *ctx, JSAsyncGeneratorData *s, JSValue result, int is_reject) { JSAsyncGeneratorRequest *next; JSValue ret; next = list_entry(s->queue.next, JSAsyncGeneratorRequest, link); list_del(&next->link); ret = JS_Call(ctx, next->resolving_funcs[is_reject], JS_UNDEFINED, 1, &result); JS_FreeValue(ctx, ret); JS_FreeValue(ctx, next->result); JS_FreeValue(ctx, next->promise); JS_FreeValue(ctx, next->resolving_funcs[0]); JS_FreeValue(ctx, next->resolving_funcs[1]); js_free(ctx, next); }
O3
c
js_async_generator_resolve_or_reject: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x38(%rsp), %rax movq %rdx, (%rax) movq %rcx, 0x8(%rax) movq (%rsi), %rcx movq 0x8(%rsi), %rdx movq %rdx, 0x8(%rcx) movq %rcx, (%rdx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) movl %r8d, %ecx shlq $0x4, %rcx movq 0x38(%rsi,%rcx), %rsi movq 0x40(%rbx,%rcx), %rdx movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movl $0x3, %r8d xorl %ecx, %ecx movl $0x1, %r9d callq 0x28b06 movq 0x18(%r14), %rdi cmpl $-0x9, %edx jb 0x58e0a movl (%rax), %ecx leal -0x1(%rcx), %esi movl %esi, (%rax) cmpl $0x1, %ecx jg 0x58e0a movq %rax, %rsi callq 0x219cc movq 0x18(%r14), %rdi movq 0x20(%rbx), %rdx cmpl $-0x9, %edx jb 0x58e2c movq 0x18(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x58e2c callq 0x219cc movq 0x18(%r14), %rdi movq 0x30(%rbx), %rdx cmpl $-0x9, %edx jb 0x58e4e movq 0x28(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x58e4e callq 0x219cc movq 0x18(%r14), %rdi movq 0x40(%rbx), %rdx cmpl $-0x9, %edx jb 0x58e70 movq 0x38(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x58e70 callq 0x219cc movq 0x18(%r14), %rdi movq 0x50(%rbx), %rdx cmpl $-0x9, %edx jb 0x58e8e movq 0x48(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x58e8e callq 0x219cc movq %r14, %rdi movq %rbx, %rsi callq 0x1d481 addq $0x48, %rsp popq %rbx popq %r14 retq
js_async_generator_resolve_or_reject: push r14 push rbx sub rsp, 48h mov rbx, rsi mov r14, rdi lea rax, [rsp+58h+var_20] mov [rax], rdx mov [rax+8], rcx mov rcx, [rsi] mov rdx, [rsi+8] mov [rcx+8], rdx mov [rdx], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 mov ecx, r8d shl rcx, 4 mov rsi, [rsi+rcx+38h] mov rdx, [rbx+rcx+40h] mov dword ptr [rsp+58h+var_30], 0 mov qword ptr [rsp+58h+var_30+8], 3 movups xmm0, [rsp+58h+var_30] movups [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], rax mov [rsp+58h+var_40], 2 mov r8d, 3 xor ecx, ecx mov r9d, 1 call JS_CallInternal mov rdi, [r14+18h] cmp edx, 0FFFFFFF7h jb short loc_58E0A mov ecx, [rax] lea esi, [rcx-1] mov [rax], esi cmp ecx, 1 jg short loc_58E0A mov rsi, rax call js_free_value_rt mov rdi, [r14+18h] loc_58E0A: mov rdx, [rbx+20h] cmp edx, 0FFFFFFF7h jb short loc_58E2C mov rsi, [rbx+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_58E2C call js_free_value_rt mov rdi, [r14+18h] loc_58E2C: mov rdx, [rbx+30h] cmp edx, 0FFFFFFF7h jb short loc_58E4E mov rsi, [rbx+28h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_58E4E call js_free_value_rt mov rdi, [r14+18h] loc_58E4E: mov rdx, [rbx+40h] cmp edx, 0FFFFFFF7h jb short loc_58E70 mov rsi, [rbx+38h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_58E70 call js_free_value_rt mov rdi, [r14+18h] loc_58E70: mov rdx, [rbx+50h] cmp edx, 0FFFFFFF7h jb short loc_58E8E mov rsi, [rbx+48h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_58E8E call js_free_value_rt loc_58E8E: mov rdi, r14 mov rsi, rbx call js_free add rsp, 48h pop rbx pop r14 retn
long long js_async_generator_resolve_or_reject( long long a1, long long *a2, long long a3, long long a4, unsigned int a5, double a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13) { long long v15; // rcx _QWORD *v16; // rdx _QWORD *v17; // rax unsigned int v18; // edx long long v19; // rdi int v20; // ecx long long v21; // rdx _QWORD *v22; // rsi int v23; // eax long long v24; // rdx _QWORD *v25; // rsi int v26; // eax long long v27; // rdx _QWORD *v28; // rsi int v29; // eax long long v30; // rdx _QWORD *v31; // rsi int v32; // eax __m128i v34; // [rsp+28h] [rbp-30h] _QWORD v35[4]; // [rsp+38h] [rbp-20h] BYREF v35[0] = a3; v35[1] = a4; v15 = *a2; v16 = (_QWORD *)a2[1]; *(_QWORD *)(v15 + 8) = v16; *v16 = v15; *(_OWORD *)a2 = 0LL; v34.m128i_i32[0] = 0; v34.m128i_i64[1] = 3LL; v17 = (_QWORD *)JS_CallInternal( a1, a2[2 * a5 + 7], a2[2 * a5 + 8], 0LL, 3LL, 1LL, v34, a7, a8, a9, a10, a11, a12, a13, v34.m128i_i8[0], 3, (long long)v35, 2u); v19 = *(_QWORD *)(a1 + 24); if ( v18 >= 0xFFFFFFF7 ) { v20 = (*(_DWORD *)v17)--; if ( v20 <= 1 ) { js_free_value_rt(v19, v17, v18); v19 = *(_QWORD *)(a1 + 24); } } v21 = a2[4]; if ( (unsigned int)v21 >= 0xFFFFFFF7 ) { v22 = (_QWORD *)a2[3]; v23 = (*(_DWORD *)v22)--; if ( v23 <= 1 ) { js_free_value_rt(v19, v22, v21); v19 = *(_QWORD *)(a1 + 24); } } v24 = a2[6]; if ( (unsigned int)v24 >= 0xFFFFFFF7 ) { v25 = (_QWORD *)a2[5]; v26 = (*(_DWORD *)v25)--; if ( v26 <= 1 ) { js_free_value_rt(v19, v25, v24); v19 = *(_QWORD *)(a1 + 24); } } v27 = a2[8]; if ( (unsigned int)v27 >= 0xFFFFFFF7 ) { v28 = (_QWORD *)a2[7]; v29 = (*(_DWORD *)v28)--; if ( v29 <= 1 ) { js_free_value_rt(v19, v28, v27); v19 = *(_QWORD *)(a1 + 24); } } v30 = a2[10]; if ( (unsigned int)v30 >= 0xFFFFFFF7 ) { v31 = (_QWORD *)a2[9]; v32 = (*(_DWORD *)v31)--; if ( v32 <= 1 ) js_free_value_rt(v19, v31, v30); } return js_free(a1, (long long)a2); }
js_async_generator_resolve_or_reject: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV R14,RDI LEA RAX,[RSP + 0x38] MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RDX],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV ECX,R8D SHL RCX,0x4 MOV RSI,qword ptr [RSI + RCX*0x1 + 0x38] MOV RDX,qword ptr [RBX + RCX*0x1 + 0x40] MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x18],0x2 MOV R8D,0x3 XOR ECX,ECX MOV R9D,0x1 CALL 0x00128b06 MOV RDI,qword ptr [R14 + 0x18] CMP EDX,-0x9 JC 0x00158e0a MOV ECX,dword ptr [RAX] LEA ESI,[RCX + -0x1] MOV dword ptr [RAX],ESI CMP ECX,0x1 JG 0x00158e0a MOV RSI,RAX CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00158e0a: MOV RDX,qword ptr [RBX + 0x20] CMP EDX,-0x9 JC 0x00158e2c MOV RSI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00158e2c CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00158e2c: MOV RDX,qword ptr [RBX + 0x30] CMP EDX,-0x9 JC 0x00158e4e MOV RSI,qword ptr [RBX + 0x28] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00158e4e CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00158e4e: MOV RDX,qword ptr [RBX + 0x40] CMP EDX,-0x9 JC 0x00158e70 MOV RSI,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00158e70 CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00158e70: MOV RDX,qword ptr [RBX + 0x50] CMP EDX,-0x9 JC 0x00158e8e MOV RSI,qword ptr [RBX + 0x48] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00158e8e CALL 0x001219cc LAB_00158e8e: MOV RDI,R14 MOV RSI,RBX CALL 0x0011d481 ADD RSP,0x48 POP RBX POP R14 RET
void js_async_generator_resolve_or_reject (long param_1,long *param_2,int8 param_3,int8 param_4,ulong param_5) { int iVar1; long lVar2; long *plVar3; int *piVar4; int8 uVar5; int1 auVar6 [12]; int8 local_20; int8 local_18; lVar2 = *param_2; plVar3 = (long *)param_2[1]; *(long **)(lVar2 + 8) = plVar3; *plVar3 = lVar2; *param_2 = 0; param_2[1] = 0; local_20 = param_3; local_18 = param_4; auVar6 = JS_CallInternal(param_1,param_2[(param_5 & 0xffffffff) * 2 + 7], param_2[(param_5 & 0xffffffff) * 2 + 8],0,3,1,0,3,&local_20,2); piVar4 = auVar6._0_8_; uVar5 = *(int8 *)(param_1 + 0x18); if (0xfffffff6 < auVar6._8_4_) { iVar1 = *piVar4; *piVar4 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,piVar4); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < (uint)param_2[4]) { iVar1 = *(int *)param_2[3]; *(int *)param_2[3] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < (uint)param_2[6]) { iVar1 = *(int *)param_2[5]; *(int *)param_2[5] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < (uint)param_2[8]) { iVar1 = *(int *)param_2[7]; *(int *)param_2[7] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < (uint)param_2[10]) { iVar1 = *(int *)param_2[9]; *(int *)param_2[9] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); } } js_free(param_1,param_2); return; }
17,133
my_b_printf
eloqsql/mysys/mf_iocache2.c
my_bool my_b_printf(IO_CACHE *info, const char* fmt, ...) { size_t result; va_list args; va_start(args,fmt); result=my_b_vprintf(info, fmt, args); va_end(args); return result == (size_t) -1; }
O0
c
my_b_printf: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp testb %al, %al je 0x2d888 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) movq %r9, -0xb8(%rbp) movq %r8, -0xc0(%rbp) movq %rcx, -0xc8(%rbp) movq %rdx, -0xd0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq -0xe0(%rbp), %rax movq %rax, -0x20(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x28(%rbp) movl $0x30, -0x2c(%rbp) movl $0x10, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0x2d900 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax subq $-0x1, %rax sete %al addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_b_printf: push rbp mov rbp, rsp sub rsp, 0E0h test al, al jz short loc_2D888 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_2D888: mov [rbp+var_B8], r9 mov [rbp+var_C0], r8 mov [rbp+var_C8], rcx mov [rbp+var_D0], rdx mov [rbp+var_8], rdi mov [rbp+var_10], rsi lea rax, [rbp+var_E0] mov [rbp+var_20], rax lea rax, [rbp+arg_0] mov [rbp+var_28], rax mov [rbp+var_2C], 30h ; '0' mov [rbp+var_30], 10h mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, [rbp+var_30] call my_b_vprintf mov [rbp+var_18], rax mov rax, [rbp+var_18] sub rax, 0FFFFFFFFFFFFFFFFh setz al add rsp, 0E0h pop rbp retn
bool my_b_printf( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-E0h] BYREF long long v17; // [rsp+10h] [rbp-D0h] long long v18; // [rsp+18h] [rbp-C8h] long long v19; // [rsp+20h] [rbp-C0h] long long v20; // [rsp+28h] [rbp-B8h] __m128 v21; // [rsp+30h] [rbp-B0h] __m128 v22; // [rsp+40h] [rbp-A0h] __m128 v23; // [rsp+50h] [rbp-90h] __m128 v24; // [rsp+60h] [rbp-80h] __m128 v25; // [rsp+70h] [rbp-70h] __m128 v26; // [rsp+80h] [rbp-60h] __m128 v27; // [rsp+90h] [rbp-50h] __m128 v28; // [rsp+A0h] [rbp-40h] _DWORD v29[2]; // [rsp+B0h] [rbp-30h] BYREF char *v30; // [rsp+B8h] [rbp-28h] char *v31; // [rsp+C0h] [rbp-20h] long long v32; // [rsp+D0h] [rbp-10h] long long v33; // [rsp+D8h] [rbp-8h] v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v20 = a6; v19 = a5; v18 = a4; v17 = a3; v33 = a1; v32 = a2; v31 = &v16; v30 = &a15; v29[1] = 48; v29[0] = 16; return my_b_vprintf(a1, a2, v29) == -1; }
my_b_printf: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 TEST AL,AL JZ 0x0012d888 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_0012d888: MOV qword ptr [RBP + -0xb8],R9 MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xc8],RCX MOV qword ptr [RBP + -0xd0],RDX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LEA RAX,[RBP + -0xe0] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x2c],0x30 MOV dword ptr [RBP + -0x30],0x10 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x30] CALL 0x0012d900 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,-0x1 SETZ AL ADD RSP,0xe0 POP RBP RET
int8 my_b_printf(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long lVar1; int1 local_e8 [16]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int4 local_38; int4 local_34; int1 *local_30; int1 *local_28; int8 local_18; int8 local_10; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_28 = local_e8; local_30 = &stack0x00000008; local_34 = 0x30; local_38 = 0x10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; local_18 = param_10; local_10 = param_9; lVar1 = my_b_vprintf(param_9,param_10,&local_38); return CONCAT71((int7)((ulong)(lVar1 + 1) >> 8),lVar1 + 1 == 0); }
17,134
my_b_printf
eloqsql/mysys/mf_iocache2.c
my_bool my_b_printf(IO_CACHE *info, const char* fmt, ...) { size_t result; va_list args; va_start(args,fmt); result=my_b_vprintf(info, fmt, args); va_end(args); return result == (size_t) -1; }
O3
c
my_b_printf: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp leaq -0xd0(%rbp), %r10 movq %rdx, 0x10(%r10) movq %rcx, 0x18(%r10) movq %r8, 0x20(%r10) movq %r9, 0x28(%r10) testb %al, %al je 0x2b809 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %rdx movq %r10, 0x10(%rdx) leaq 0x10(%rbp), %rax movq %rax, 0x8(%rdx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rdx) callq 0x2b83b cmpq $-0x1, %rax sete %al addq $0xd0, %rsp popq %rbp retq
my_b_printf: push rbp mov rbp, rsp sub rsp, 0D0h lea r10, [rbp+var_D0] mov [r10+10h], rdx mov [r10+18h], rcx mov [r10+20h], r8 mov [r10+28h], r9 test al, al jz short loc_2B809 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_2B809: lea rdx, [rbp+var_20] mov [rdx+10h], r10 lea rax, [rbp+arg_0] mov [rdx+8], rax mov rax, 3000000010h mov [rdx], rax call my_b_vprintf cmp rax, 0FFFFFFFFFFFFFFFFh setz al add rsp, 0D0h pop rbp retn
bool my_b_printf( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+10h] [rbp-C0h] long long v18; // [rsp+18h] [rbp-B8h] long long v19; // [rsp+20h] [rbp-B0h] long long v20; // [rsp+28h] [rbp-A8h] __m128 v21; // [rsp+30h] [rbp-A0h] __m128 v22; // [rsp+40h] [rbp-90h] __m128 v23; // [rsp+50h] [rbp-80h] __m128 v24; // [rsp+60h] [rbp-70h] __m128 v25; // [rsp+70h] [rbp-60h] __m128 v26; // [rsp+80h] [rbp-50h] __m128 v27; // [rsp+90h] [rbp-40h] __m128 v28; // [rsp+A0h] [rbp-30h] _QWORD v29[4]; // [rsp+B0h] [rbp-20h] BYREF v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v17 = a3; v18 = a4; v19 = a5; v20 = a6; v29[2] = &v16; v29[1] = &a15; v29[0] = 0x3000000010LL; return my_b_vprintf(a1, a2, v29) == -1; }
my_b_printf: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 LEA R10,[RBP + -0xd0] MOV qword ptr [R10 + 0x10],RDX MOV qword ptr [R10 + 0x18],RCX MOV qword ptr [R10 + 0x20],R8 MOV qword ptr [R10 + 0x28],R9 TEST AL,AL JZ 0x0012b809 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_0012b809: LEA RDX,[RBP + -0x20] MOV qword ptr [RDX + 0x10],R10 LEA RAX,[RBP + 0x10] MOV qword ptr [RDX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RDX],RAX CALL 0x0012b83b CMP RAX,-0x1 SETZ AL ADD RSP,0xd0 POP RBP RET
bool my_b_printf(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long lVar1; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000010; local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; lVar1 = my_b_vprintf(); return lVar1 == -1; }
17,135
my_hash_sort_utf16_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_bin(CHARSET_INFO *cs, const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { size_t lengthsp= my_ci_lengthsp(cs, (const char *) pos, len); my_hash_sort_utf16_nopad_bin(cs, pos, lengthsp, nr1, nr2); }
O3
c
my_hash_sort_utf16_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r14 movq %rsi, %r15 movq 0xb8(%rdi), %rax callq *0x18(%rax) movq (%r14), %rcx movq (%rbx), %rdx testq %rax, %rax jle 0x50001 addq %r15, %rax movl %ecx, %esi andl $0x3f, %esi addq %rdx, %rsi movzbl (%r15), %edi imulq %rsi, %rdi movq %rcx, %rsi shlq $0x8, %rsi addq %rdi, %rsi xorq %rsi, %rcx addq $0x3, %rdx incq %r15 cmpq %rax, %r15 jb 0x4ffd8 movq %rcx, (%r14) movq %rdx, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_sort_utf16_bin: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, r8 mov r14, rcx mov r15, rsi mov rax, [rdi+0B8h] call qword ptr [rax+18h] mov rcx, [r14] mov rdx, [rbx] test rax, rax jle short loc_50001 add rax, r15 loc_4FFD8: mov esi, ecx and esi, 3Fh add rsi, rdx movzx edi, byte ptr [r15] imul rdi, rsi mov rsi, rcx shl rsi, 8 add rsi, rdi xor rcx, rsi add rdx, 3 inc r15 cmp r15, rax jb short loc_4FFD8 loc_50001: mov [r14], rcx mov [rbx], rdx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_sort_utf16_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { unsigned __int8 *v7; // r15 long long result; // rax long long v9; // rcx long long v10; // rdx v7 = a2; result = (*(long long ( **)(long long))(*(_QWORD *)(a1 + 184) + 24LL))(a1); v9 = *a4; v10 = *a5; if ( result > 0 ) { result += (long long)a2; do { v9 ^= (v10 + (v9 & 0x3F)) * *v7 + (v9 << 8); v10 += 3LL; ++v7; } while ( (unsigned long long)v7 < result ); } *a4 = v9; *a5 = v10; return result; }
my_hash_sort_utf16_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RCX MOV R15,RSI MOV RAX,qword ptr [RDI + 0xb8] CALL qword ptr [RAX + 0x18] MOV RCX,qword ptr [R14] MOV RDX,qword ptr [RBX] TEST RAX,RAX JLE 0x00150001 ADD RAX,R15 LAB_0014ffd8: MOV ESI,ECX AND ESI,0x3f ADD RSI,RDX MOVZX EDI,byte ptr [R15] IMUL RDI,RSI MOV RSI,RCX SHL RSI,0x8 ADD RSI,RDI XOR RCX,RSI ADD RDX,0x3 INC R15 CMP R15,RAX JC 0x0014ffd8 LAB_00150001: MOV qword ptr [R14],RCX MOV qword ptr [RBX],RDX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_sort_utf16_bin (long param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5) { long lVar1; byte *pbVar2; ulong uVar3; long lVar4; lVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x18))(); uVar3 = *param_4; lVar4 = *param_5; if (0 < lVar1) { pbVar2 = param_2 + lVar1; do { uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4); lVar4 = lVar4 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar3; *param_5 = lVar4; return; }
17,136
my_uca_charcmp
eloqsql/strings/ctype-uca.c
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2) { uint num_level= cs->levels_for_order; int ret; uint i; for (i= 0; i != num_level; i++) { ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i); if (ret) { return ret; } } return 0; }
O0
c
my_uca_charcmp: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movzbl 0xb2(%rax), %eax movl %eax, -0x24(%rbp) movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x24(%rbp), %eax je 0xb00d3 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movl -0x2c(%rbp), %ecx callq 0xb00f0 movl %eax, -0x28(%rbp) cmpl $0x0, -0x28(%rbp) je 0xb00c6 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xb00da jmp 0xb00c8 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xb0099 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_charcmp: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] movzx eax, byte ptr [rax+0B2h] mov [rbp+var_24], eax mov [rbp+var_2C], 0 loc_B0099: mov eax, [rbp+var_2C] cmp eax, [rbp+var_24] jz short loc_B00D3 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov ecx, [rbp+var_2C] call my_uca_charcmp_onelevel mov [rbp+var_28], eax cmp [rbp+var_28], 0 jz short loc_B00C6 mov eax, [rbp+var_28] mov [rbp+var_4], eax jmp short loc_B00DA loc_B00C6: jmp short $+2 loc_B00C8: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp short loc_B0099 loc_B00D3: mov [rbp+var_4], 0 loc_B00DA: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_uca_charcmp(long long a1, long long a2, long long a3) { unsigned int i; // [rsp+4h] [rbp-2Ch] unsigned int v5; // [rsp+8h] [rbp-28h] int v6; // [rsp+Ch] [rbp-24h] v6 = *(unsigned __int8 *)(a1 + 178); for ( i = 0; i != v6; ++i ) { v5 = my_uca_charcmp_onelevel(a1, a2, a3, i); if ( v5 ) return v5; } return 0; }
my_uca_charcmp: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0xb2] MOV dword ptr [RBP + -0x24],EAX MOV dword ptr [RBP + -0x2c],0x0 LAB_001b0099: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x24] JZ 0x001b00d3 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] CALL 0x001b00f0 MOV dword ptr [RBP + -0x28],EAX CMP dword ptr [RBP + -0x28],0x0 JZ 0x001b00c6 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX JMP 0x001b00da LAB_001b00c6: JMP 0x001b00c8 LAB_001b00c8: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001b0099 LAB_001b00d3: MOV dword ptr [RBP + -0x4],0x0 LAB_001b00da: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int my_uca_charcmp(long param_1,int8 param_2,int8 param_3) { byte bVar1; int iVar2; uint local_34; bVar1 = *(byte *)(param_1 + 0xb2); local_34 = 0; while( true ) { if (local_34 == bVar1) { return 0; } iVar2 = my_uca_charcmp_onelevel(param_1,param_2,param_3,local_34); if (iVar2 != 0) break; local_34 = local_34 + 1; } return iVar2; }
17,137
ma_multi_command
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int ma_multi_command(MYSQL *mysql, enum enum_multi_status status) { NET *net= &mysql->net; switch (status) { case COM_MULTI_OFF: ma_net_clear(net); net->extension->multi_status= status; return 0; case COM_MULTI_ENABLED: if (net->extension->multi_status > COM_MULTI_DISABLED) return 1; ma_net_clear(net); net->extension->multi_status= status; return 0; case COM_MULTI_DISABLED: /* Opposite to COM_MULTI_OFF we don't clear net buffer, next command or com_nulti_end will flush entire buffer */ net->extension->multi_status= status; return 0; case COM_MULTI_END: { size_t len= net->write_pos - net->buff - NET_HEADER_SIZE; if (len < NET_HEADER_SIZE) /* don't send empty request */ { ma_net_clear(net); return 1; } net->extension->multi_status= COM_MULTI_OFF; return ma_net_flush(net); } case COM_MULTI_CANCEL: ma_net_clear(net); net->extension->multi_status= COM_MULTI_OFF; return 0; default: return 1; } }
O0
c
ma_multi_command: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movl -0x14(%rbp), %eax movq %rax, -0x30(%rbp) subq $0x4, %rax ja 0x19341 movq -0x30(%rbp), %rax leaq 0x37f8d(%rip), %rcx # 0x511d0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x20(%rbp), %rdi callq 0x47e70 movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movq 0x2a0(%rax), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x19348 movq -0x20(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x3, (%rax) jbe 0x1928d movl $0x1, -0x4(%rbp) jmp 0x19348 movq -0x20(%rbp), %rdi callq 0x47e70 movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movq 0x2a0(%rax), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x19348 movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movq 0x2a0(%rax), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x19348 movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax subq $0x4, %rax movq %rax, -0x28(%rbp) cmpq $0x4, -0x28(%rbp) jae 0x192ff movq -0x20(%rbp), %rdi callq 0x47e70 movl $0x1, -0x4(%rbp) jmp 0x19348 movq -0x20(%rbp), %rax movq 0x2a0(%rax), %rax movl $0x0, (%rax) movq -0x20(%rbp), %rdi callq 0x47ec0 movl %eax, -0x4(%rbp) jmp 0x19348 movq -0x20(%rbp), %rdi callq 0x47e70 movq -0x20(%rbp), %rax movq 0x2a0(%rax), %rax movl $0x0, (%rax) movl $0x0, -0x4(%rbp) jmp 0x19348 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_multi_command: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rax, [rbp+var_10] mov [rbp+var_20], rax mov eax, [rbp+var_14] mov [rbp+var_30], rax sub rax, 4; switch 5 cases ja def_1924A; jumptable 000000000001924A default case mov rax, [rbp+var_30] lea rcx, jpt_1924A movsxd rax, ds:(jpt_1924A - 511D0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1924C: mov rdi, [rbp+var_20]; jumptable 000000000001924A case 0 call ma_net_clear mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov rax, [rax+2A0h] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_19348 loc_19271: mov rax, [rbp+var_20]; jumptable 000000000001924A case 2 mov rax, [rax+2A0h] cmp dword ptr [rax], 3 jbe short loc_1928D mov [rbp+var_4], 1 jmp loc_19348 loc_1928D: mov rdi, [rbp+var_20] call ma_net_clear mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov rax, [rax+2A0h] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_19348 loc_192B2: mov ecx, [rbp+var_14]; jumptable 000000000001924A case 3 mov rax, [rbp+var_20] mov rax, [rax+2A0h] mov [rax], ecx mov [rbp+var_4], 0 jmp short loc_19348 loc_192CB: mov rax, [rbp+var_20]; jumptable 000000000001924A case 4 mov rax, [rax+18h] mov rcx, [rbp+var_20] mov rcx, [rcx+8] sub rax, rcx sub rax, 4 mov [rbp+var_28], rax cmp [rbp+var_28], 4 jnb short loc_192FF mov rdi, [rbp+var_20] call ma_net_clear mov [rbp+var_4], 1 jmp short loc_19348 loc_192FF: mov rax, [rbp+var_20] mov rax, [rax+2A0h] mov dword ptr [rax], 0 mov rdi, [rbp+var_20] call ma_net_flush mov [rbp+var_4], eax jmp short loc_19348 loc_1931E: mov rdi, [rbp+var_20]; jumptable 000000000001924A case 1 call ma_net_clear mov rax, [rbp+var_20] mov rax, [rax+2A0h] mov dword ptr [rax], 0 mov [rbp+var_4], 0 jmp short loc_19348 def_1924A: mov [rbp+var_4], 1; jumptable 000000000001924A default case loc_19348: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ma_multi_command(long long a1, int a2) { unsigned int v3; // [rsp+2Ch] [rbp-4h] switch ( a2 ) { case 0: goto LABEL_2; case 1: ma_net_clear(a1); **(_DWORD **)(a1 + 672) = 0; v3 = 0; break; case 2: if ( **(_DWORD **)(a1 + 672) <= 3u ) { LABEL_2: ma_net_clear(a1); **(_DWORD **)(a1 + 672) = a2; v3 = 0; } else { v3 = 1; } break; case 3: **(_DWORD **)(a1 + 672) = a2; v3 = 0; break; case 4: if ( (unsigned long long)(*(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 8) - 4LL) >= 4 ) { **(_DWORD **)(a1 + 672) = 0; v3 = ma_net_flush(a1); } else { ma_net_clear(a1); v3 = 1; } break; default: v3 = 1; break; } return v3; }
ma_multi_command: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV EAX,dword ptr [RBP + -0x14] MOV qword ptr [RBP + -0x30],RAX SUB RAX,0x4 JA 0x00119341 MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x1511d0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147e70 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00119348 caseD_2: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x3 JBE 0x0011928d MOV dword ptr [RBP + -0x4],0x1 JMP 0x00119348 LAB_0011928d: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147e70 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00119348 caseD_3: MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00119348 caseD_4: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX SUB RAX,0x4 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x4 JNC 0x001192ff MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147e70 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00119348 LAB_001192ff: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147ec0 MOV dword ptr [RBP + -0x4],EAX JMP 0x00119348 caseD_1: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147e70 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00119348 default: MOV dword ptr [RBP + -0x4],0x1 LAB_00119348: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 ma_multi_command(long param_1,int4 param_2) { int4 local_c; switch(param_2) { case 0: ma_net_clear(param_1); **(int4 **)(param_1 + 0x2a0) = param_2; local_c = 0; break; case 1: ma_net_clear(param_1); **(int4 **)(param_1 + 0x2a0) = 0; local_c = 0; break; case 2: if (**(uint **)(param_1 + 0x2a0) < 4) { ma_net_clear(param_1); **(int4 **)(param_1 + 0x2a0) = param_2; local_c = 0; } else { local_c = 1; } break; case 3: **(int4 **)(param_1 + 0x2a0) = param_2; local_c = 0; break; case 4: if ((*(long *)(param_1 + 0x18) - *(long *)(param_1 + 8)) - 4U < 4) { ma_net_clear(param_1); local_c = 1; } else { **(int4 **)(param_1 + 0x2a0) = 0; local_c = ma_net_flush(param_1); } break; default: local_c = 1; } return local_c; }
17,138
get_charsets_dir
eloqsql/mysys/charset.c
char *get_charsets_dir(char *buf) { const char *sharedir= SHAREDIR; char *res; DBUG_ENTER("get_charsets_dir"); if (charsets_dir != NULL) strmake(buf, charsets_dir, FN_REFLEN-1); else { if (test_if_hard_path(sharedir) || is_prefix(sharedir, DEFAULT_CHARSET_HOME)) strxmov(buf, sharedir, "/", CHARSET_DIR, NullS); else strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR, NullS); } res= convert_dirname(buf,buf,NullS); DBUG_PRINT("info",("charsets dir: '%s'", buf)); DBUG_RETURN(res); }
O0
c
get_charsets_dir: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) leaq 0x50b41(%rip), %rax # 0x7a6b4 movq %rax, -0x10(%rbp) leaq 0x35da22(%rip), %rax # 0x3875a0 cmpq $0x0, (%rax) je 0x29b9e movq -0x8(%rbp), %rdi leaq 0x35da11(%rip), %rax # 0x3875a0 movq (%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x778e0 jmp 0x29c18 movq -0x10(%rbp), %rdi callq 0x2f250 cmpl $0x0, %eax jne 0x29bc1 movq -0x10(%rbp), %rdi leaq 0x50b16(%rip), %rsi # 0x7a6cd callq 0x74190 cmpl $0x0, %eax je 0x29be5 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq 0x5173f(%rip), %rdx # 0x7b30f leaq 0x50b09(%rip), %rcx # 0x7a6e0 xorl %eax, %eax movl %eax, %r8d movb $0x0, %al callq 0x779c0 jmp 0x29c16 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rcx leaq 0x50ad9(%rip), %rsi # 0x7a6cd leaq 0x51714(%rip), %r8 # 0x7b30f leaq 0x50ade(%rip), %r9 # 0x7a6e0 xorl %eax, %eax movq %r8, %rdx movq $0x0, (%rsp) movb $0x0, %al callq 0x779c0 jmp 0x29c18 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x2d9e0 movq %rax, -0x18(%rbp) jmp 0x29c2f jmp 0x29c31 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_charsets_dir: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi lea rax, aHomeMonoInstal; "/home/mono/install/share" mov [rbp+var_10], rax lea rax, charsets_dir cmp qword ptr [rax], 0 jz short loc_29B9E mov rdi, [rbp+var_8] lea rax, charsets_dir mov rsi, [rax] mov edx, 1FFh call strmake jmp short loc_29C18 loc_29B9E: mov rdi, [rbp+var_10] call test_if_hard_path cmp eax, 0 jnz short loc_29BC1 mov rdi, [rbp+var_10] lea rsi, aHomeMonoInstal_0; "/home/mono/install" call is_prefix cmp eax, 0 jz short loc_29BE5 loc_29BC1: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, unk_7B30F lea rcx, aCharsets; "charsets/" xor eax, eax mov r8d, eax mov al, 0 call strxmov jmp short loc_29C16 loc_29BE5: mov rdi, [rbp+var_8] mov rcx, [rbp+var_10] lea rsi, aHomeMonoInstal_0; "/home/mono/install" lea r8, unk_7B30F lea r9, aCharsets; "charsets/" xor eax, eax mov rdx, r8 mov [rsp+30h+var_30], 0 mov al, 0 call strxmov loc_29C16: jmp short $+2 loc_29C18: mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] xor eax, eax mov edx, eax call convert_dirname mov [rbp+var_18], rax jmp short $+2 loc_29C2F: jmp short $+2 loc_29C31: mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_20] add rsp, 30h pop rbp retn
long long get_charsets_dir(long long a1) { int v1; // r9d if ( charsets_dir ) { strmake(a1, charsets_dir, 511LL); } else if ( (unsigned int)test_if_hard_path("/home/mono/install/share") || (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") ) { strxmov(a1, (unsigned int)"/home/mono/install/share", (unsigned int)&unk_7B30F, (unsigned int)"charsets/", 0, v1); } else { strxmov( a1, (unsigned int)"/home/mono/install", (unsigned int)&unk_7B30F, (unsigned int)"/home/mono/install/share", (unsigned int)&unk_7B30F, (unsigned int)"charsets/"); } return convert_dirname(a1, a1, 0LL); }
get_charsets_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI LEA RAX,[0x17a6b4] MOV qword ptr [RBP + -0x10],RAX LEA RAX,[0x4875a0] CMP qword ptr [RAX],0x0 JZ 0x00129b9e MOV RDI,qword ptr [RBP + -0x8] LEA RAX,[0x4875a0] MOV RSI,qword ptr [RAX] MOV EDX,0x1ff CALL 0x001778e0 JMP 0x00129c18 LAB_00129b9e: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012f250 CMP EAX,0x0 JNZ 0x00129bc1 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x17a6cd] CALL 0x00174190 CMP EAX,0x0 JZ 0x00129be5 LAB_00129bc1: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x17b30f] LEA RCX,[0x17a6e0] XOR EAX,EAX MOV R8D,EAX MOV AL,0x0 CALL 0x001779c0 JMP 0x00129c16 LAB_00129be5: MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] LEA RSI,[0x17a6cd] LEA R8,[0x17b30f] LEA R9,[0x17a6e0] XOR EAX,EAX MOV RDX,R8 MOV qword ptr [RSP],0x0 MOV AL,0x0 CALL 0x001779c0 LAB_00129c16: JMP 0x00129c18 LAB_00129c18: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV EDX,EAX CALL 0x0012d9e0 MOV qword ptr [RBP + -0x18],RAX JMP 0x00129c2f LAB_00129c2f: JMP 0x00129c31 LAB_00129c31: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
int8 get_charsets_dir(int8 param_1) { int iVar1; int8 uVar2; if (charsets_dir == 0) { iVar1 = test_if_hard_path("/home/mono/install/share"); if ((iVar1 == 0) && (iVar1 = is_prefix("/home/mono/install/share","/home/mono/install"), iVar1 == 0)) { strxmov(param_1,"/home/mono/install",&DAT_0017b30f,"/home/mono/install/share",&DAT_0017b30f, "charsets/",0); } else { strxmov(param_1,"/home/mono/install/share",&DAT_0017b30f,"charsets/",0); } } else { strmake(param_1,charsets_dir,0x1ff); } uVar2 = convert_dirname(param_1,param_1,0); return uVar2; }
17,139
get_charsets_dir
eloqsql/mysys/charset.c
char *get_charsets_dir(char *buf) { const char *sharedir= SHAREDIR; char *res; DBUG_ENTER("get_charsets_dir"); if (charsets_dir != NULL) strmake(buf, charsets_dir, FN_REFLEN-1); else { if (test_if_hard_path(sharedir) || is_prefix(sharedir, DEFAULT_CHARSET_HOME)) strxmov(buf, sharedir, "/", CHARSET_DIR, NullS); else strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR, NullS); } res= convert_dirname(buf,buf,NullS); DBUG_PRINT("info",("charsets dir: '%s'", buf)); DBUG_RETURN(res); }
O3
c
get_charsets_dir: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x33ea01(%rip), %rax # 0x366970 movq (%rax), %rsi testq %rsi, %rsi je 0x27f86 movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi callq 0x5a5c4 jmp 0x27fcf leaq 0x34720(%rip), %rdi # 0x5c6ad callq 0x2b142 testl %eax, %eax jne 0x27fad leaq 0x34710(%rip), %rdi # 0x5c6ad leaq 0x34722(%rip), %rsi # 0x5c6c6 callq 0x58ce0 testl %eax, %eax je 0x27fe2 leaq 0x346f9(%rip), %rsi # 0x5c6ad leaq 0x35346(%rip), %rdx # 0x5d301 leaq 0x34717(%rip), %rcx # 0x5c6d9 movq %rbx, %rdi xorl %r8d, %r8d xorl %eax, %eax callq 0x5a61c movq %rbx, %rdi movq %rbx, %rsi xorl %edx, %edx addq $0x8, %rsp popq %rbx popq %rbp jmp 0x2a2df movq $0x0, (%rsp) leaq 0x346d5(%rip), %rsi # 0x5c6c6 leaq 0x346b5(%rip), %rcx # 0x5c6ad leaq 0x35302(%rip), %rdx # 0x5d301 leaq 0x346d3(%rip), %r9 # 0x5c6d9 movq %rbx, %rdi movq %rdx, %r8 xorl %eax, %eax callq 0x5a61c jmp 0x27fcf
get_charsets_dir: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi lea rax, charsets_dir mov rsi, [rax] test rsi, rsi jz short loc_27F86 mov edx, 1FFh mov rdi, rbx call strmake jmp short loc_27FCF loc_27F86: lea rdi, aHomeMonoInstal; "/home/mono/install/share" call test_if_hard_path test eax, eax jnz short loc_27FAD lea rdi, aHomeMonoInstal; "/home/mono/install/share" lea rsi, aHomeMonoInstal_0; "/home/mono/install" call is_prefix test eax, eax jz short loc_27FE2 loc_27FAD: lea rsi, aHomeMonoInstal; "/home/mono/install/share" lea rdx, unk_5D301 lea rcx, aCharsets; "charsets/" mov rdi, rbx xor r8d, r8d xor eax, eax call strxmov loc_27FCF: mov rdi, rbx mov rsi, rbx xor edx, edx add rsp, 8 pop rbx pop rbp jmp convert_dirname loc_27FE2: mov [rsp+10h+var_10], 0 lea rsi, aHomeMonoInstal_0; "/home/mono/install" lea rcx, aHomeMonoInstal; "/home/mono/install/share" lea rdx, unk_5D301 lea r9, aCharsets; "charsets/" mov rdi, rbx mov r8, rdx xor eax, eax call strxmov jmp short loc_27FCF
long long get_charsets_dir(long long a1) { char v1; // al int v2; // r9d char v4; // [rsp+0h] [rbp-10h] v4 = v1; if ( charsets_dir ) { strmake(a1, charsets_dir, 511LL); } else if ( (unsigned int)test_if_hard_path("/home/mono/install/share") || (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") ) { strxmov( a1, (unsigned int)"/home/mono/install/share", (unsigned int)&unk_5D301, (unsigned int)"charsets/", 0, v2, v4); } else { strxmov( a1, (unsigned int)"/home/mono/install", (unsigned int)&unk_5D301, (unsigned int)"/home/mono/install/share", (unsigned int)&unk_5D301, (unsigned int)"charsets/", 0); } return convert_dirname(a1, a1, 0LL); }
get_charsets_dir: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x466970] MOV RSI,qword ptr [RAX] TEST RSI,RSI JZ 0x00127f86 MOV EDX,0x1ff MOV RDI,RBX CALL 0x0015a5c4 JMP 0x00127fcf LAB_00127f86: LEA RDI,[0x15c6ad] CALL 0x0012b142 TEST EAX,EAX JNZ 0x00127fad LEA RDI,[0x15c6ad] LEA RSI,[0x15c6c6] CALL 0x00158ce0 TEST EAX,EAX JZ 0x00127fe2 LAB_00127fad: LEA RSI,[0x15c6ad] LEA RDX,[0x15d301] LEA RCX,[0x15c6d9] MOV RDI,RBX XOR R8D,R8D XOR EAX,EAX CALL 0x0015a61c LAB_00127fcf: MOV RDI,RBX MOV RSI,RBX XOR EDX,EDX ADD RSP,0x8 POP RBX POP RBP JMP 0x0012a2df LAB_00127fe2: MOV qword ptr [RSP],0x0 LEA RSI,[0x15c6c6] LEA RCX,[0x15c6ad] LEA RDX,[0x15d301] LEA R9,[0x15c6d9] MOV RDI,RBX MOV R8,RDX XOR EAX,EAX CALL 0x0015a61c JMP 0x00127fcf
void get_charsets_dir(int8 param_1) { int iVar1; if (charsets_dir == 0) { iVar1 = test_if_hard_path("/home/mono/install/share"); if (iVar1 == 0) { iVar1 = is_prefix("/home/mono/install/share","/home/mono/install"); if (iVar1 == 0) { strxmov(param_1,"/home/mono/install",&DAT_0015d301,"/home/mono/install/share",&DAT_0015d301, "charsets/",0); goto LAB_00127fcf; } } strxmov(param_1,"/home/mono/install/share",&DAT_0015d301,"charsets/",0); } else { strmake(param_1,charsets_dir,0x1ff); } LAB_00127fcf: convert_dirname(param_1,param_1,0); return; }
17,140
ma_dynstr_append_mem
eloqsql/libmariadb/libmariadb/ma_string.c
my_bool ma_dynstr_append_mem(DYNAMIC_STRING *str, const char *append, size_t length) { char *new_ptr; if (str->length+length >= str->max_length) { size_t new_length=(str->length+length+str->alloc_increment)/ str->alloc_increment; new_length*=str->alloc_increment; if (!(new_ptr=(char*) realloc(str->str,new_length))) return TRUE; str->str=new_ptr; str->max_length=new_length; } memcpy(str->str + str->length,append,length); str->length+=length; str->str[str->length]=0; /* Safety for C programs */ return FALSE; }
O3
c
ma_dynstr_append_mem: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq (%rdi), %rcx movq 0x8(%rdi), %rdi leaq (%rdi,%rdx), %r12 cmpq 0x10(%r14), %r12 jb 0x95cca movq 0x18(%r14), %rsi addq %rsi, %r12 movq %r12, %rax xorl %edx, %edx divq %rsi subq %rdx, %r12 movq %rcx, %rdi movq %r12, %rsi callq 0x390b0 testq %rax, %rax je 0x95cf2 movq %rax, %rcx movq %rax, (%r14) movq %r12, 0x10(%r14) movq 0x8(%r14), %rdi addq %rcx, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x390a0 addq 0x8(%r14), %rbx movq %rbx, 0x8(%r14) movq (%r14), %rax movb $0x0, (%rax,%rbx) xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movb $0x1, %al jmp 0x95ce9
ma_dynstr_append_mem: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r15, rsi mov r14, rdi mov rcx, [rdi] mov rdi, [rdi+8] lea r12, [rdi+rdx] cmp r12, [r14+10h] jb short loc_95CCA mov rsi, [r14+18h] add r12, rsi mov rax, r12 xor edx, edx div rsi sub r12, rdx mov rdi, rcx mov rsi, r12 call _realloc test rax, rax jz short loc_95CF2 mov rcx, rax mov [r14], rax mov [r14+10h], r12 mov rdi, [r14+8] loc_95CCA: add rdi, rcx mov rsi, r15 mov rdx, rbx call _memcpy add rbx, [r14+8] mov [r14+8], rbx mov rax, [r14] mov byte ptr [rax+rbx], 0 xor eax, eax loc_95CE9: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_95CF2: mov al, 1 jmp short loc_95CE9
long long ma_dynstr_append_mem(long long *a1, long long a2, long long a3) { long long v5; // rcx long long v6; // rdi unsigned long long v7; // r12 long long v8; // rax long long v9; // rbx v5 = *a1; v6 = a1[1]; if ( v6 + a3 < (unsigned long long)a1[2] ) goto LABEL_4; v7 = a1[3] + v6 + a3 - (a1[3] + v6 + a3) % (unsigned long long)a1[3]; v8 = realloc(v5, v7); if ( v8 ) { v5 = v8; *a1 = v8; a1[2] = v7; v6 = a1[1]; LABEL_4: memcpy(v5 + v6, a2, a3); v9 = a1[1] + a3; a1[1] = v9; *(_BYTE *)(*a1 + v9) = 0; return 0LL; } return 1LL; }
ma_dynstr_append_mem: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RCX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] LEA R12,[RDI + RDX*0x1] CMP R12,qword ptr [R14 + 0x10] JC 0x00195cca MOV RSI,qword ptr [R14 + 0x18] ADD R12,RSI MOV RAX,R12 XOR EDX,EDX DIV RSI SUB R12,RDX MOV RDI,RCX MOV RSI,R12 CALL 0x001390b0 TEST RAX,RAX JZ 0x00195cf2 MOV RCX,RAX MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x10],R12 MOV RDI,qword ptr [R14 + 0x8] LAB_00195cca: ADD RDI,RCX MOV RSI,R15 MOV RDX,RBX CALL 0x001390a0 ADD RBX,qword ptr [R14 + 0x8] MOV qword ptr [R14 + 0x8],RBX MOV RAX,qword ptr [R14] MOV byte ptr [RAX + RBX*0x1],0x0 XOR EAX,EAX LAB_00195ce9: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00195cf2: MOV AL,0x1 JMP 0x00195ce9
int8 ma_dynstr_append_mem(long *param_1,void *param_2,size_t param_3) { void *__ptr; long lVar1; ulong uVar2; size_t __size; __ptr = (void *)*param_1; lVar1 = param_1[1]; if ((ulong)param_1[2] <= lVar1 + param_3) { uVar2 = lVar1 + param_3 + param_1[3]; __size = uVar2 - uVar2 % (ulong)param_1[3]; __ptr = realloc(__ptr,__size); if (__ptr == (void *)0x0) { return 1; } *param_1 = (long)__ptr; param_1[2] = __size; lVar1 = param_1[1]; } memcpy((void *)(lVar1 + (long)__ptr),param_2,param_3); lVar1 = param_1[1]; param_1[1] = param_3 + lVar1; *(int1 *)(*param_1 + param_3 + lVar1) = 0; return 0; }
17,141
minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!expr) throw std::runtime_error("UnaryOpExpr.expr is null"); auto e = expr->evaluate(context); switch (op) { case Op::Plus: return e; case Op::Minus: return -e; case Op::LogicalNot: return !e.to_bool(); case Op::Expansion: case Op::ExpansionDict: throw std::runtime_error("Expansion operator is only supported in function calls and collections"); } throw std::runtime_error("Unknown unary operator"); }
O3
cpp
minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x3e7e2 movq %rdi, %rbx leaq 0x8(%rsp), %rdi callq 0x3e93e movl 0x30(%r14), %eax cmpq $0x4, %rax ja 0x3e832 leaq 0x69fc5(%rip), %rcx # 0xa8668 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax xorps %xmm0, %xmm0 movups %xmm0, (%rbx) leaq 0x48(%rsp), %r15 movups -0x30(%r15), %xmm0 xorl %r12d, %r12d movq %r12, -0x28(%r15) movups %xmm0, 0x10(%rbx) movq %r12, -0x30(%r15) movups -0x20(%r15), %xmm0 movq %r12, -0x18(%r15) movups %xmm0, 0x20(%rbx) movq %r12, -0x20(%r15) movups -0x10(%r15), %xmm0 movq %r12, -0x8(%r15) movups %xmm0, 0x30(%rbx) movq %r12, -0x10(%r15) leaq 0x40(%rbx), %r14 movups (%r15), %xmm0 movups %xmm0, 0x40(%rbx) movq %r15, %rdi xorl %esi, %esi callq 0x3ecbc movb $0x0, (%r15) movq %r12, 0x8(%r15) jmp 0x3e73e leaq 0x8(%rsp), %rdi callq 0x3eb3c xorb $0x1, %al leaq 0x40(%rbx), %r14 xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) movzbl %al, %esi movq %r14, %rdi callq 0x40d6e movq %r14, %rdi movl $0x1, %esi callq 0x3ecbc jmp 0x3e75a leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3eab8 leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3ecbc movq %r14, %rdi callq 0x4b8aa movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x3e77f callq 0x30ed6 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x3e78e callq 0x30ed6 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x3e79d callq 0x30ed6 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x3e7d3 movq 0x9f7ea(%rip), %rax # 0xddf98 cmpb $0x0, (%rax) je 0x3e7be movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x3e7c8 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x3e7d3 movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x18350 movq %rax, %r14 leaq 0x6bf30(%rip), %rsi # 0xaa726 movq %rax, %rdi callq 0x18260 movq 0x9f7eb(%rip), %rsi # 0xddff0 movq 0x9f764(%rip), %rdx # 0xddf70 movq %r14, %rdi callq 0x18b50 movl $0x10, %edi callq 0x18350 movq %rax, %r14 leaq 0x6bf17(%rip), %rsi # 0xaa73f movq %rax, %rdi callq 0x18260 jmp 0x3e84e movl $0x10, %edi callq 0x18350 movq %rax, %r14 leaq 0x6bf40(%rip), %rsi # 0xaa786 movq %rax, %rdi callq 0x18260 movq 0x9f79b(%rip), %rsi # 0xddff0 movq 0x9f714(%rip), %rdx # 0xddf70 movq %r14, %rdi callq 0x18b50 jmp 0x3e868 jmp 0x3e882 movq %rax, %rbx movq %r14, %rdi callq 0x184f0 jmp 0x3e885 movq %rax, %rbx movq %r14, %rdi callq 0x184f0 jmp 0x3e88f movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x3ec30 movq %rbx, %rdi callq 0x18bc0 nop
_ZNK5minja11UnaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 58h mov r14, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_3E7E2 mov rbx, rdi lea rdi, [rsp+78h+var_70] call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov eax, [r14+30h] cmp rax, 4; switch 5 cases ja def_3E6AA; jumptable 000000000003E6AA default case lea rcx, jpt_3E6AA movsxd rax, ds:(jpt_3E6AA - 0A8668h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_3E6AC: xorps xmm0, xmm0; jumptable 000000000003E6AA case 0 movups xmmword ptr [rbx], xmm0 lea r15, [rsp+78h+var_30] movups xmm0, xmmword ptr [r15-30h] xor r12d, r12d mov [r15-28h], r12 movups xmmword ptr [rbx+10h], xmm0 mov [r15-30h], r12 movups xmm0, xmmword ptr [r15-20h] mov [r15-18h], r12 movups xmmword ptr [rbx+20h], xmm0 mov [r15-20h], r12 movups xmm0, xmmword ptr [r15-10h] mov [r15-8], r12 movups xmmword ptr [rbx+30h], xmm0 mov [r15-10h], r12 lea r14, [rbx+40h] movups xmm0, xmmword ptr [r15] movups xmmword ptr [rbx+40h], xmm0 mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r15], 0 mov [r15+8], r12 jmp short loc_3E73E loc_3E70D: lea rdi, [rsp+78h+var_70]; jumptable 000000000003E6AA case 2 call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) xor al, 1 lea r14, [rbx+40h] xorps xmm0, xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx], xmm0 movzx esi, al mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE4EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<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> &,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>::boolean_t) loc_3E73E: mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_3E75A loc_3E74D: lea rsi, [rsp+78h+var_70]; jumptable 000000000003E6AA case 1 mov rdi, rbx call _ZNK5minja5ValuengEv; minja::Value::operator-(void) loc_3E75A: lea r14, [rsp+78h+var_30] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_3E77F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3E77F: mov rdi, [rsp+78h+var_48] test rdi, rdi jz short loc_3E78E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3E78E: mov rdi, [rsp+78h+var_58] test rdi, rdi jz short loc_3E79D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3E79D: mov rdi, [rsp+78h+var_68] test rdi, rdi jz short loc_3E7D3 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_3E7BE mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_3E7C8 loc_3E7BE: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_3E7C8: cmp eax, 1 jnz short loc_3E7D3 mov rax, [rdi] call qword ptr [rax+18h] loc_3E7D3: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn loc_3E7E2: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aUnaryopexprExp; "UnaryOpExpr.expr is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_3E814: mov edi, 10h; jumptable 000000000003E6AA cases 3,4 call ___cxa_allocate_exception mov r14, rax lea rsi, aExpansionOpera; "Expansion operator is only supported in"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_3E84E def_3E6AA: mov edi, 10h; jumptable 000000000003E6AA default case call ___cxa_allocate_exception mov r14, rax lea rsi, aUnknownUnaryOp; "Unknown unary operator" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_3E84E: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_3E868 jmp short loc_3E882 loc_3E868: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_3E885 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_3E88F loc_3E882: mov rbx, rax loc_3E885: lea rdi, [rsp+78h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_3E88F: mov rdi, rbx call __Unwind_Resume
do_evaluate: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x0013e7e2 MOV RBX,RDI LEA RDI,[RSP + 0x8] CALL 0x0013e93e MOV EAX,dword ptr [R14 + 0x30] CMP RAX,0x4 JA 0x0013e832 LEA RCX,[0x1a8668] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 LEA R15,[RSP + 0x48] MOVUPS XMM0,xmmword ptr [R15 + -0x30] XOR R12D,R12D MOV qword ptr [R15 + -0x28],R12 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOV qword ptr [R15 + -0x30],R12 MOVUPS XMM0,xmmword ptr [R15 + -0x20] MOV qword ptr [R15 + -0x18],R12 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOV qword ptr [R15 + -0x20],R12 MOVUPS XMM0,xmmword ptr [R15 + -0x10] MOV qword ptr [R15 + -0x8],R12 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [R15 + -0x10],R12 LEA R14,[RBX + 0x40] MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R15 XOR ESI,ESI CALL 0x0013ecbc MOV byte ptr [R15],0x0 MOV qword ptr [R15 + 0x8],R12 JMP 0x0013e73e caseD_2: LEA RDI,[RSP + 0x8] CALL 0x0013eb3c XOR AL,0x1 LEA R14,[RBX + 0x40] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVZX ESI,AL MOV RDI,R14 CALL 0x00140d6e LAB_0013e73e: MOV RDI,R14 MOV ESI,0x1 CALL 0x0013ecbc JMP 0x0013e75a caseD_1: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0013eab8 LAB_0013e75a: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x0013ecbc MOV RDI,R14 CALL 0x0014b8aa MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x0013e77f CALL 0x00130ed6 LAB_0013e77f: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0013e78e CALL 0x00130ed6 LAB_0013e78e: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0013e79d CALL 0x00130ed6 LAB_0013e79d: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0013e7d3 MOV RAX,qword ptr [0x001ddf98] CMP byte ptr [RAX],0x0 JZ 0x0013e7be MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0013e7c8 LAB_0013e7be: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0013e7c8: CMP EAX,0x1 JNZ 0x0013e7d3 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0013e7d3: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET LAB_0013e7e2: MOV EDI,0x10 CALL 0x00118350 MOV R14,RAX LAB_0013e7ef: LEA RSI,[0x1aa726] MOV RDI,RAX CALL 0x00118260 LAB_0013e7fe: MOV RSI,qword ptr [0x001ddff0] MOV RDX,qword ptr [0x001ddf70] MOV RDI,R14 CALL 0x00118b50 caseD_3: MOV EDI,0x10 CALL 0x00118350 MOV R14,RAX LAB_0013e821: LEA RSI,[0x1aa73f] MOV RDI,RAX CALL 0x00118260 LAB_0013e830: JMP 0x0013e84e default: MOV EDI,0x10 CALL 0x00118350 MOV R14,RAX LAB_0013e83f: LEA RSI,[0x1aa786] MOV RDI,RAX CALL 0x00118260 LAB_0013e84e: MOV RSI,qword ptr [0x001ddff0] MOV RDX,qword ptr [0x001ddf70] MOV RDI,R14 CALL 0x00118b50
/* minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ UnaryOpExpr * __thiscall minja::UnaryOpExpr::do_evaluate(UnaryOpExpr *this,shared_ptr *param_1) { int *piVar1; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var3; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var4; byte bVar5; int iVar6; runtime_error *prVar7; Expression local_70 [8]; long *local_68; int8 local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_58; int8 local_50; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_48; int8 local_40; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_38; data local_30; int7 uStack_2f; int8 uStack_28; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { prVar7 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013e7ef to 0013e7fd has its CatchHandler @ 0013e875 */ std::runtime_error::runtime_error(prVar7,"UnaryOpExpr.expr is null"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar7,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70); } Expression::evaluate(local_70,*(shared_ptr **)(param_1 + 0x20)); p_Var4 = p_Stack_38; p_Var3 = p_Stack_48; p_Var2 = p_Stack_58; switch(*(int4 *)(param_1 + 0x30)) { case 0: *(int8 *)this = 0; *(int8 *)(this + 8) = 0; p_Stack_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; *(int8 *)(this + 0x10) = local_60; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) = p_Var2; local_60 = 0; p_Stack_48 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; *(int8 *)(this + 0x20) = local_50; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) = p_Var3; local_50 = 0; p_Stack_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; *(int8 *)(this + 0x30) = local_40; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) = p_Var4; local_40 = 0; *(ulong *)(this + 0x40) = CONCAT71(uStack_2f,local_30); *(int8 *)(this + 0x48) = uStack_28; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_30,0)); local_30 = (data)0x0; uStack_28 = 0; break; case 1: /* try { // try from 0013e74d to 0013e759 has its CatchHandler @ 0013e882 */ Value::operator-((Value *)this); goto LAB_0013e75a; case 2: /* try { // try from 0013e70d to 0013e716 has its CatchHandler @ 0013e866 */ bVar5 = Value::to_bool((Value *)local_70); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (this + 0x40,bVar5 ^ 1); break; case 3: case 4: prVar7 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013e821 to 0013e82f has its CatchHandler @ 0013e868 */ std::runtime_error::runtime_error (prVar7,"Expansion operator is only supported in function calls and collections"); goto LAB_0013e84e; default: prVar7 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013e83f to 0013e84d has its CatchHandler @ 0013e864 */ std::runtime_error::runtime_error(prVar7,"Unknown unary operator"); LAB_0013e84e: /* try { // try from 0013e84e to 0013e863 has its CatchHandler @ 0013e882 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar7,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant((bool)((char)this + '@')); LAB_0013e75a: nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_30,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(&local_30); if (p_Stack_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_38); } if (p_Stack_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_48); } if (p_Stack_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_58); } if (local_68 != (long *)0x0) { if (*PTR___libc_single_threaded_001ddf98 == '\0') { LOCK(); piVar1 = (int *)((long)local_68 + 0xc); iVar6 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar6 = *(int *)((long)local_68 + 0xc); *(int *)((long)local_68 + 0xc) = iVar6 + -1; } if (iVar6 == 1) { (**(code **)(*local_68 + 0x18))(); } } return this; }
17,142
get_proxy_method
bluesky950520[P]quickjs/quickjs.c
static JSProxyData *get_proxy_method(JSContext *ctx, JSValue *pmethod, JSValue obj, JSAtom name) { JSProxyData *s = JS_GetOpaque(obj, JS_CLASS_PROXY); JSValue method; /* safer to test recursion in all proxy methods */ if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); return NULL; } /* 's' should never be NULL */ if (s->is_revoked) { JS_ThrowTypeErrorRevokedProxy(ctx); return NULL; } method = JS_GetProperty(ctx, s->handler, name); if (JS_IsException(method)) return NULL; if (JS_IsNull(method)) method = JS_UNDEFINED; *pmethod = method; return s; }
O0
c
get_proxy_method: subq $0x88, %rsp movq %rdx, 0x70(%rsp) movq %rcx, 0x78(%rsp) movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movl %r8d, 0x5c(%rsp) movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi movl $0x30, %edx callq 0x38350 movq %rax, 0x50(%rsp) movq 0x68(%rsp), %rax movq 0x18(%rax), %rdi xorl %eax, %eax movl %eax, %esi callq 0x4dce0 cmpl $0x0, %eax je 0x600e5 movq 0x68(%rsp), %rdi callq 0x601e0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq $0x0, 0x80(%rsp) jmp 0x601ca movq 0x50(%rsp), %rax cmpb $0x0, 0x21(%rax) je 0x60115 movq 0x68(%rsp), %rdi callq 0x60220 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq $0x0, 0x80(%rsp) jmp 0x601ca movq 0x68(%rsp), %rdi movq 0x50(%rsp), %rax movl 0x5c(%rsp), %ecx movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x29d80 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x60170 movq $0x0, 0x80(%rsp) jmp 0x601ca movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x2e240 cmpl $0x0, %eax je 0x601a7 movl $0x0, (%rsp) movq $0x3, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x40(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x60(%rsp), %rax movq 0x40(%rsp), %rcx movq %rcx, (%rax) movq 0x48(%rsp), %rcx movq %rcx, 0x8(%rax) movq 0x50(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax addq $0x88, %rsp retq nopw (%rax,%rax)
get_proxy_method: sub rsp, 88h mov [rsp+88h+var_18], rdx mov [rsp+88h+var_10], rcx mov [rsp+88h+var_20], rdi mov [rsp+88h+var_28], rsi mov [rsp+88h+var_2C], r8d mov rdi, [rsp+88h+var_18] mov rsi, [rsp+88h+var_10] mov edx, 30h ; '0' call JS_GetOpaque mov [rsp+88h+var_38], rax mov rax, [rsp+88h+var_20] mov rdi, [rax+18h] xor eax, eax mov esi, eax call js_check_stack_overflow cmp eax, 0 jz short loc_600E5 mov rdi, [rsp+88h+var_20] call JS_ThrowStackOverflow mov [rsp+88h+var_58], rax mov [rsp+88h+var_50], rdx mov [rsp+88h+var_8], 0 jmp loc_601CA loc_600E5: mov rax, [rsp+88h+var_38] cmp byte ptr [rax+21h], 0 jz short loc_60115 mov rdi, [rsp+88h+var_20] call JS_ThrowTypeErrorRevokedProxy mov [rsp+88h+var_68], rax mov [rsp+88h+var_60], rdx mov [rsp+88h+var_8], 0 jmp loc_601CA loc_60115: mov rdi, [rsp+88h+var_20] mov rax, [rsp+88h+var_38] mov ecx, [rsp+88h+var_2C] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_GetProperty mov [rsp+88h+var_78], rax mov [rsp+88h+var_70], rdx mov rax, [rsp+88h+var_78] mov [rsp+88h+var_48], rax mov rax, [rsp+88h+var_70] mov [rsp+88h+var_40], rax mov rdi, [rsp+88h+var_48] mov rsi, [rsp+88h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_60170 mov [rsp+88h+var_8], 0 jmp short loc_601CA loc_60170: mov rdi, [rsp+88h+var_48] mov rsi, [rsp+88h+var_40] call JS_IsNull_0 cmp eax, 0 jz short loc_601A7 mov dword ptr [rsp+88h+var_88], 0 mov [rsp+88h+var_80], 3 mov rax, [rsp+88h+var_88] mov [rsp+88h+var_48], rax mov rax, [rsp+88h+var_80] mov [rsp+88h+var_40], rax loc_601A7: mov rax, [rsp+88h+var_28] mov rcx, [rsp+88h+var_48] mov [rax], rcx mov rcx, [rsp+88h+var_40] mov [rax+8], rcx mov rax, [rsp+88h+var_38] mov [rsp+88h+var_8], rax loc_601CA: mov rax, [rsp+88h+var_8] add rsp, 88h retn
long long get_proxy_method(long long a1, long long *a2, long long a3, int a4, int a5) { long long v5; // rdx long long v7; // [rsp+0h] [rbp-88h] long long Property; // [rsp+10h] [rbp-78h] long long v9; // [rsp+40h] [rbp-48h] long long v10; // [rsp+48h] [rbp-40h] long long Opaque; // [rsp+50h] [rbp-38h] Opaque = JS_GetOpaque(a3, a4, 48); if ( js_check_stack_overflow(*(_QWORD *)(a1 + 24), 0LL) ) { JS_ThrowStackOverflow(a1); return 0LL; } else if ( *(_BYTE *)(Opaque + 33) ) { JS_ThrowTypeErrorRevokedProxy(a1); return 0LL; } else { Property = JS_GetProperty(a1, *(_QWORD *)(Opaque + 16), *(_QWORD *)(Opaque + 24), a5); v9 = Property; v10 = v5; if ( JS_IsException_1(Property, v5) ) { return 0LL; } else { if ( JS_IsNull_0(Property, v10) ) { LODWORD(v7) = 0; v9 = v7; v10 = 3LL; } *a2 = v9; a2[1] = v10; return Opaque; } } }
get_proxy_method: SUB RSP,0x88 MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV dword ptr [RSP + 0x5c],R8D MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] MOV EDX,0x30 CALL 0x00138350 MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RAX + 0x18] XOR EAX,EAX MOV ESI,EAX CALL 0x0014dce0 CMP EAX,0x0 JZ 0x001600e5 MOV RDI,qword ptr [RSP + 0x68] CALL 0x001601e0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x80],0x0 JMP 0x001601ca LAB_001600e5: MOV RAX,qword ptr [RSP + 0x50] CMP byte ptr [RAX + 0x21],0x0 JZ 0x00160115 MOV RDI,qword ptr [RSP + 0x68] CALL 0x00160220 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RSP + 0x80],0x0 JMP 0x001601ca LAB_00160115: MOV RDI,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x50] MOV ECX,dword ptr [RSP + 0x5c] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x00129d80 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00160170 MOV qword ptr [RSP + 0x80],0x0 JMP 0x001601ca LAB_00160170: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x0012e240 CMP EAX,0x0 JZ 0x001601a7 MOV dword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],0x3 MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x48],RAX LAB_001601a7: MOV RAX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x80],RAX LAB_001601ca: MOV RAX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
long get_proxy_method(long param_1,int1 (*param_2) [16],int8 param_3,int8 param_4, int4 param_5) { int iVar1; int1 auVar2 [16]; uint uStack_84; long local_8; local_8 = JS_GetOpaque(param_3,param_4,0x30); iVar1 = js_check_stack_overflow(*(int8 *)(param_1 + 0x18),0); if (iVar1 == 0) { if (*(char *)(local_8 + 0x21) == '\0') { auVar2 = JS_GetProperty(param_1,*(int8 *)(local_8 + 0x10), *(int8 *)(local_8 + 0x18),param_5); iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_); if (iVar1 == 0) { iVar1 = JS_IsNull(auVar2._0_8_,auVar2._8_8_); if (iVar1 != 0) { auVar2._8_8_ = 3; auVar2._0_8_ = (ulong)uStack_84 << 0x20; } *param_2 = auVar2; } else { local_8 = 0; } } else { JS_ThrowTypeErrorRevokedProxy(param_1); local_8 = 0; } } else { JS_ThrowStackOverflow(param_1); local_8 = 0; } return local_8; }
17,143
get_proxy_method
bluesky950520[P]quickjs/quickjs.c
static JSProxyData *get_proxy_method(JSContext *ctx, JSValue *pmethod, JSValue obj, JSAtom name) { JSProxyData *s = JS_GetOpaque(obj, JS_CLASS_PROXY); JSValue method; /* safer to test recursion in all proxy methods */ if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); return NULL; } /* 's' should never be NULL */ if (s->is_revoked) { JS_ThrowTypeErrorRevokedProxy(ctx); return NULL; } method = JS_GetProperty(ctx, s->handler, name); if (JS_IsException(method)) return NULL; if (JS_IsNull(method)) method = JS_UNDEFINED; *pmethod = method; return s; }
O1
c
get_proxy_method: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdx, -0x18(%rbp) cmpl $-0x1, %ecx jne 0x3d408 movq -0x18(%rbp), %rax cmpw $0x30, 0x6(%rax) jne 0x3d408 movq 0x30(%rax), %rbx jmp 0x3d40a xorl %ebx, %ebx movq 0x18(%rdi), %rax cmpq %rbp, 0xe8(%rax) jbe 0x3d429 leaq 0x61bb8(%rip), %rsi # 0x9efd6 xorl %ebx, %ebx xorl %eax, %eax callq 0x20add jmp 0x3d49a cmpb $0x0, 0x21(%rbx) je 0x3d441 leaq 0x61bc1(%rip), %rsi # 0x9eff7 xorl %ebx, %ebx xorl %eax, %eax callq 0x22567 jmp 0x3d49a movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movl %r8d, %ecx movq %rsi, %r8 movq %rdx, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movl %edx, %ecx cmpq $0x6, %rcx jne 0x3d46b xorl %ebx, %ebx jmp 0x3d49a movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000 andq %rax, %rsi cmpl $0x2, %ecx movl $0x3, %edi cmoveq %rdi, %rdx xorl %edi, %edi cmpq $0x2, %rcx movl %eax, %eax cmovneq %rax, %rdi orq %rsi, %rdi movq %rdi, (%r14) movq %rdx, 0x8(%r14) movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
get_proxy_method: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov r14, rsi mov [rbp+var_18], rdx cmp ecx, 0FFFFFFFFh jnz short loc_3D408 mov rax, [rbp+var_18] cmp word ptr [rax+6], 30h ; '0' jnz short loc_3D408 mov rbx, [rax+30h] jmp short loc_3D40A loc_3D408: xor ebx, ebx loc_3D40A: mov rax, [rdi+18h] cmp [rax+0E8h], rbp jbe short loc_3D429 lea rsi, aMaximumCallSta; "Maximum call stack size exceeded" xor ebx, ebx xor eax, eax call JS_ThrowRangeError jmp short loc_3D49A loc_3D429: cmp byte ptr [rbx+21h], 0 jz short loc_3D441 lea rsi, aRevokedProxy; "revoked proxy" xor ebx, ebx xor eax, eax call JS_ThrowTypeError jmp short loc_3D49A loc_3D441: mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov ecx, r8d mov r8, rsi mov r9, rdx push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov ecx, edx cmp rcx, 6 jnz short loc_3D46B xor ebx, ebx jmp short loc_3D49A loc_3D46B: mov rsi, 0FFFFFFFF00000000h and rsi, rax cmp ecx, 2 mov edi, 3 cmovz rdx, rdi xor edi, edi cmp rcx, 2 mov eax, eax cmovnz rdi, rax or rdi, rsi mov [r14], rdi mov [r14+8], rdx loc_3D49A: mov rax, rbx add rsp, 10h pop rbx pop r14 pop rbp retn
long long get_proxy_method( long long a1, unsigned long long *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx unsigned long long PropertyInternal2; // rax long long v16; // rdx long long v17; // rcx long long v18; // rdi char v20; // [rsp+0h] [rbp-20h] long long savedregs; // [rsp+20h] [rbp+0h] BYREF if ( (_DWORD)a4 == -1 && *(_WORD *)(a3 + 6) == 48 ) v14 = *(_QWORD *)(a3 + 48); else v14 = 0LL; if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs ) { if ( *(_BYTE *)(v14 + 33) ) { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"revoked proxy", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); } else { PropertyInternal2 = JS_GetPropertyInternal2( a1, *(_QWORD *)(v14 + 16), *(_QWORD *)(v14 + 24), a5, *(_QWORD *)(v14 + 16), *(_QWORD *)(v14 + 24), 0LL, 0); v17 = (unsigned int)v16; if ( (unsigned int)v16 == 6LL ) { return 0LL; } else { if ( (_DWORD)v16 == 2 ) v16 = 3LL; v18 = 0LL; if ( v17 != 2 ) v18 = (unsigned int)PropertyInternal2; *a2 = PropertyInternal2 & 0xFFFFFFFF00000000LL | v18; a2[1] = v16; } } } else { v14 = 0LL; JS_ThrowRangeError( a1, (long long)"Maximum call stack size exceeded", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); } return v14; }
17,144
get_proxy_method
bluesky950520[P]quickjs/quickjs.c
static JSProxyData *get_proxy_method(JSContext *ctx, JSValue *pmethod, JSValue obj, JSAtom name) { JSProxyData *s = JS_GetOpaque(obj, JS_CLASS_PROXY); JSValue method; /* safer to test recursion in all proxy methods */ if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); return NULL; } /* 's' should never be NULL */ if (s->is_revoked) { JS_ThrowTypeErrorRevokedProxy(ctx); return NULL; } method = JS_GetProperty(ctx, s->handler, name); if (JS_IsException(method)) return NULL; if (JS_IsNull(method)) method = JS_UNDEFINED; *pmethod = method; return s; }
O2
c
get_proxy_method: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 cmpl $-0x1, %ecx jne 0x35d1d cmpw $0x30, 0x6(%rdx) jne 0x35d1d movq 0x30(%rdx), %rbx jmp 0x35d1f xorl %ebx, %ebx movq 0x18(%rdi), %rax cmpq %rbp, 0xe8(%rax) jbe 0x35d33 callq 0x35d91 jmp 0x35d58 cmpb $0x0, 0x21(%rbx) je 0x35d40 callq 0x35d9f jmp 0x35d58 movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movl %r8d, %ecx callq 0x1b043 movl %edx, %ecx cmpq $0x6, %rcx jne 0x35d62 xorl %ebx, %ebx movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000 andq %rax, %rsi cmpl $0x2, %ecx pushq $0x3 popq %rdi cmoveq %rdi, %rdx xorl %edi, %edi cmpq $0x2, %rcx movl %eax, %eax cmovneq %rax, %rdi orq %rsi, %rdi movq %rdi, (%r14) movq %rdx, 0x8(%r14) jmp 0x35d5a
get_proxy_method: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi cmp ecx, 0FFFFFFFFh jnz short loc_35D1D cmp word ptr [rdx+6], 30h ; '0' jnz short loc_35D1D mov rbx, [rdx+30h] jmp short loc_35D1F loc_35D1D: xor ebx, ebx loc_35D1F: mov rax, [rdi+18h] cmp [rax+0E8h], rbp jbe short loc_35D33 call JS_ThrowStackOverflow jmp short loc_35D58 loc_35D33: cmp byte ptr [rbx+21h], 0 jz short loc_35D40 call JS_ThrowTypeErrorRevokedProxy jmp short loc_35D58 loc_35D40: mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov ecx, r8d call JS_GetProperty mov ecx, edx cmp rcx, 6 jnz short loc_35D62 loc_35D58: xor ebx, ebx loc_35D5A: mov rax, rbx pop rbx pop r14 pop rbp retn loc_35D62: mov rsi, 0FFFFFFFF00000000h and rsi, rax cmp ecx, 2 push 3 pop rdi cmovz rdx, rdi xor edi, edi cmp rcx, 2 mov eax, eax cmovnz rdi, rax or rdi, rsi mov [r14], rdi mov [r14+8], rdx jmp short loc_35D5A
long long get_proxy_method(long long a1, unsigned long long *a2, long long a3, int a4, int a5) { long long v5; // rbx long long Property; // rax long long v7; // rdx long long v8; // rcx long long v10; // rdi long long savedregs; // [rsp+10h] [rbp+0h] BYREF if ( a4 == -1 && *(_WORD *)(a3 + 6) == 48 ) v5 = *(_QWORD *)(a3 + 48); else v5 = 0LL; if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) > (unsigned long long)&savedregs ) { JS_ThrowStackOverflow(a1); return 0LL; } if ( *(_BYTE *)(v5 + 33) ) { JS_ThrowTypeErrorRevokedProxy(); return 0LL; } Property = JS_GetProperty(a1, *(_QWORD *)(v5 + 16), *(_QWORD *)(v5 + 24), a5); v8 = (unsigned int)v7; if ( (unsigned int)v7 == 6LL ) return 0LL; if ( (_DWORD)v7 == 2 ) v7 = 3LL; v10 = 0LL; if ( v8 != 2 ) v10 = (unsigned int)Property; *a2 = Property & 0xFFFFFFFF00000000LL | v10; a2[1] = v7; return v5; }
get_proxy_method: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI CMP ECX,-0x1 JNZ 0x00135d1d CMP word ptr [RDX + 0x6],0x30 JNZ 0x00135d1d MOV RBX,qword ptr [RDX + 0x30] JMP 0x00135d1f LAB_00135d1d: XOR EBX,EBX LAB_00135d1f: MOV RAX,qword ptr [RDI + 0x18] CMP qword ptr [RAX + 0xe8],RBP JBE 0x00135d33 CALL 0x00135d91 JMP 0x00135d58 LAB_00135d33: CMP byte ptr [RBX + 0x21],0x0 JZ 0x00135d40 CALL 0x00135d9f JMP 0x00135d58 LAB_00135d40: MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV ECX,R8D CALL 0x0011b043 MOV ECX,EDX CMP RCX,0x6 JNZ 0x00135d62 LAB_00135d58: XOR EBX,EBX LAB_00135d5a: MOV RAX,RBX POP RBX POP R14 POP RBP RET LAB_00135d62: MOV RSI,-0x100000000 AND RSI,RAX CMP ECX,0x2 PUSH 0x3 POP RDI CMOVZ RDX,RDI XOR EDI,EDI CMP RCX,0x2 MOV EAX,EAX CMOVNZ RDI,RAX OR RDI,RSI MOV qword ptr [R14],RDI MOV qword ptr [R14 + 0x8],RDX JMP 0x00135d5a
long get_proxy_method(long param_1,ulong *param_2,long param_3,int param_4,int4 param_5) { ulong uVar1; ulong uVar2; long lVar3; ulong uVar4; int1 auVar5 [16]; if ((param_4 == -1) && (*(short *)(param_3 + 6) == 0x30)) { lVar3 = *(long *)(param_3 + 0x30); } else { lVar3 = 0; } if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) { JS_ThrowStackOverflow(); } else if (*(char *)(lVar3 + 0x21) == '\0') { auVar5 = JS_GetProperty(param_1,*(int8 *)(lVar3 + 0x10),*(int8 *)(lVar3 + 0x18), param_5); uVar1 = auVar5._8_8_ & 0xffffffff; if (uVar1 != 6) { uVar2 = auVar5._8_8_; if (auVar5._8_4_ == 2) { uVar2 = 3; } uVar4 = 0; if (uVar1 != 2) { uVar4 = auVar5._0_8_ & 0xffffffff; } *param_2 = uVar4 | auVar5._0_8_ & 0xffffffff00000000; param_2[1] = uVar2; return lVar3; } } else { JS_ThrowTypeErrorRevokedProxy(); } return 0; }
17,145
js_string_fromCharCode
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_fromCharCode(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int i; StringBuffer b_s, *b = &b_s; // shortcut for single argument common case if (argc == 1 && JS_VALUE_GET_TAG(argv[0]) == JS_TAG_INT) { uint16_t c16 = JS_VALUE_GET_INT(argv[0]); return js_new_string_char(ctx, c16); } string_buffer_init(ctx, b, argc); for(i = 0; i < argc; i++) { int32_t c; if (JS_ToInt32(ctx, &c, argv[i]) || string_buffer_putc16(b, c & 0xffff)) { string_buffer_free(b); return JS_EXCEPTION; } } return string_buffer_end(b); }
O0
c
js_string_fromCharCode: subq $0x78, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) leaq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) cmpl $0x1, 0x4c(%rsp) jne 0xd1425 movq 0x40(%rsp), %rax movq 0x8(%rax), %rax cmpl $0x0, %eax jne 0xd1425 movq 0x40(%rsp), %rax movl (%rax), %eax movw %ax, 0xe(%rsp) movq 0x50(%rsp), %rdi movzwl 0xe(%rsp), %esi callq 0x5f190 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) jmp 0xd14cf movq 0x50(%rsp), %rdi movq 0x10(%rsp), %rsi movl 0x4c(%rsp), %edx callq 0x4f380 movl $0x0, 0x3c(%rsp) movl 0x3c(%rsp), %eax cmpl 0x4c(%rsp), %eax jge 0xd14bb movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movslq 0x3c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x8(%rsp), %rsi callq 0x37c60 cmpl $0x0, %eax jne 0xd148f movq 0x10(%rsp), %rdi movl 0x8(%rsp), %esi andl $0xffff, %esi # imm = 0xFFFF callq 0x7d3d0 cmpl $0x0, %eax je 0xd14ac movq 0x10(%rsp), %rdi callq 0x511f0 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0xd14cf jmp 0xd14ae movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0xd1440 movq 0x10(%rsp), %rdi callq 0x4c840 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rdx addq $0x78, %rsp retq nop
js_string_fromCharCode: sub rsp, 78h mov [rsp+78h+var_20], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_28], rdi mov [rsp+78h+var_2C], ecx mov [rsp+78h+var_38], r8 lea rax, [rsp+78h+var_60] mov [rsp+78h+var_68], rax cmp [rsp+78h+var_2C], 1 jnz short loc_D1425 mov rax, [rsp+78h+var_38] mov rax, [rax+8] cmp eax, 0 jnz short loc_D1425 mov rax, [rsp+78h+var_38] mov eax, [rax] mov [rsp+78h+var_6A], ax mov rdi, [rsp+78h+var_28] movzx esi, [rsp+78h+var_6A] call js_new_string_char mov [rsp+78h+var_10], rax mov [rsp+78h+var_8], rdx jmp loc_D14CF loc_D1425: mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_68] mov edx, [rsp+78h+var_2C] call string_buffer_init mov [rsp+78h+var_3C], 0 loc_D1440: mov eax, [rsp+78h+var_3C] cmp eax, [rsp+78h+var_2C] jge short loc_D14BB mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] movsxd rcx, [rsp+78h+var_3C] shl rcx, 4 add rax, rcx mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+78h+var_70] call JS_ToInt32 cmp eax, 0 jnz short loc_D148F mov rdi, [rsp+78h+var_68] mov esi, [rsp+78h+var_70] and esi, 0FFFFh call string_buffer_putc16 cmp eax, 0 jz short loc_D14AC loc_D148F: mov rdi, [rsp+78h+var_68] call string_buffer_free mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 jmp short loc_D14CF loc_D14AC: jmp short $+2 loc_D14AE: mov eax, [rsp+78h+var_3C] add eax, 1 mov [rsp+78h+var_3C], eax jmp short loc_D1440 loc_D14BB: mov rdi, [rsp+78h+var_68] call string_buffer_end mov [rsp+78h+var_10], rax mov [rsp+78h+var_8], rdx loc_D14CF: mov rax, [rsp+78h+var_10] mov rdx, [rsp+78h+var_8] add rsp, 78h retn
long long js_string_fromCharCode(long long a1, long long a2, long long a3, signed int a4, long long a5) { long long v5; // rdx long long v6; // rdx int v8; // [rsp+8h] [rbp-70h] BYREF long long *v9; // [rsp+10h] [rbp-68h] char v10; // [rsp+18h] [rbp-60h] BYREF signed int i; // [rsp+3Ch] [rbp-3Ch] long long v12; // [rsp+40h] [rbp-38h] signed int v13; // [rsp+4Ch] [rbp-2Ch] long long v14; // [rsp+50h] [rbp-28h] long long v15; // [rsp+58h] [rbp-20h] long long v16; // [rsp+60h] [rbp-18h] long long v17; // [rsp+68h] [rbp-10h] long long v18; // [rsp+70h] [rbp-8h] v15 = a2; v16 = a3; v14 = a1; v13 = a4; v12 = a5; v9 = (long long *)&v10; if ( a4 != 1 || (unsigned int)*(_QWORD *)(v12 + 8) ) { string_buffer_init(v14, (long long)v9, v13); for ( i = 0; i < v13; ++i ) { if ( (unsigned int)JS_ToInt32(v14, (long long)&v8, *(_DWORD **)(16LL * i + v12), *(_QWORD *)(16LL * i + v12 + 8)) || (unsigned int)string_buffer_putc16((long long)v9, (unsigned __int16)v8) ) { string_buffer_free(v9); LODWORD(v17) = 0; v18 = 6LL; return v17; } } v17 = string_buffer_end((long long)v9); v18 = v6; } else { v17 = js_new_string_char(v14, *(_DWORD *)v12); v18 = v5; } return v17; }
js_string_fromCharCode: SUB RSP,0x78 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x10],RAX CMP dword ptr [RSP + 0x4c],0x1 JNZ 0x001d1425 MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0x8] CMP EAX,0x0 JNZ 0x001d1425 MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX] MOV word ptr [RSP + 0xe],AX MOV RDI,qword ptr [RSP + 0x50] MOVZX ESI,word ptr [RSP + 0xe] CALL 0x0015f190 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX JMP 0x001d14cf LAB_001d1425: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0x4c] CALL 0x0014f380 MOV dword ptr [RSP + 0x3c],0x0 LAB_001d1440: MOV EAX,dword ptr [RSP + 0x3c] CMP EAX,dword ptr [RSP + 0x4c] JGE 0x001d14bb MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOVSXD RCX,dword ptr [RSP + 0x3c] SHL RCX,0x4 ADD RAX,RCX MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] CALL 0x00137c60 CMP EAX,0x0 JNZ 0x001d148f MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0x8] AND ESI,0xffff CALL 0x0017d3d0 CMP EAX,0x0 JZ 0x001d14ac LAB_001d148f: MOV RDI,qword ptr [RSP + 0x10] CALL 0x001511f0 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x001d14cf LAB_001d14ac: JMP 0x001d14ae LAB_001d14ae: MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x001d1440 LAB_001d14bb: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0014c840 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX LAB_001d14cf: MOV RAX,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
int1 [16] js_string_fromCharCode (int8 param_1,int8 param_2,int8 param_3,int param_4,int4 *param_5) { int iVar1; int1 auVar2 [16]; uint local_70; int2 local_6a; int1 *local_68; int1 local_60 [36]; int local_3c; int4 *local_38; int local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_68 = local_60; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; if ((param_4 == 1) && ((int)*(int8 *)(param_5 + 2) == 0)) { local_6a = (int2)*param_5; auVar2 = js_new_string_char(param_1,local_6a); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } else { string_buffer_init(param_1,local_68,param_4); for (local_3c = 0; local_3c < local_2c; local_3c = local_3c + 1) { iVar1 = JS_ToInt32(local_28,&local_70,*(int8 *)(local_38 + (long)local_3c * 4), *(int8 *)((long)(local_38 + (long)local_3c * 4) + 8)); if (iVar1 != 0) { LAB_001d148f: string_buffer_free(local_68); local_10 = 0; local_8 = 6; goto LAB_001d14cf; } iVar1 = string_buffer_putc16(local_68,local_70 & 0xffff); if (iVar1 != 0) goto LAB_001d148f; } auVar2 = string_buffer_end(local_68); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } LAB_001d14cf: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
17,146
js_string_fromCharCode
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_fromCharCode(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int i; StringBuffer b_s, *b = &b_s; // shortcut for single argument common case if (argc == 1 && JS_VALUE_GET_TAG(argv[0]) == JS_TAG_INT) { uint16_t c16 = JS_VALUE_GET_INT(argv[0]); return js_new_string_char(ctx, c16); } string_buffer_init(ctx, b, argc); for(i = 0; i < argc; i++) { int32_t c; if (JS_ToInt32(ctx, &c, argv[i]) || string_buffer_putc16(b, c & 0xffff)) { string_buffer_free(b); return JS_EXCEPTION; } } return string_buffer_end(b); }
O1
c
js_string_fromCharCode: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movl %ecx, %ebp movq %rdi, %rbx cmpl $0x1, %ecx jne 0x79ca4 cmpl $0x0, 0x8(%r14) je 0x79d61 movq %rbx, 0x10(%rsp) movl %ebp, 0x24(%rsp) movl $0x0, 0x20(%rsp) movq $0x0, 0x28(%rsp) movq %rbx, %rdi movl %ebp, %esi xorl %edx, %edx callq 0x1ff5f movq %rax, 0x18(%rsp) testq %rax, %rax je 0x79d8e testl %ebp, %ebp jle 0x79d32 movl %ebp, %r13d shlq $0x4, %r13 xorl %ebp, %ebp leaq 0xc(%rsp), %r15 leaq 0x10(%rsp), %r12 movq (%r14,%rbp), %rdx movq 0x8(%r14,%rbp), %rcx movq %rdx, 0x30(%rsp) cmpl $-0x9, %ecx jb 0x79d09 movq 0x30(%rsp), %rax incl (%rax) movq %rbx, %rdi movq %r15, %rsi callq 0x26daf testl %eax, %eax jne 0x79d3e movzwl 0xc(%rsp), %esi movq %r12, %rdi callq 0x46bcb testl %eax, %eax jne 0x79d3e addq $0x10, %rbp cmpq %rbp, %r13 jne 0x79cef leaq 0x10(%rsp), %rdi callq 0x32830 jmp 0x79d6d movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x1bf85 movq $0x0, 0x18(%rsp) movl $0x6, %edx xorl %eax, %eax xorl %ecx, %ecx jmp 0x79d7a movzwl (%r14), %esi movq %rbx, %rdi callq 0x3c97a movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax orq %rcx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x0, 0x24(%rsp) movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF jmp 0x79cd8
js_string_fromCharCode: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov ebp, ecx mov rbx, rdi cmp ecx, 1 jnz short loc_79CA4 cmp dword ptr [r14+8], 0 jz loc_79D61 loc_79CA4: mov [rsp+68h+var_58], rbx mov [rsp+68h+var_44], ebp mov [rsp+68h+var_48], 0 mov [rsp+68h+var_40], 0 mov rdi, rbx mov esi, ebp xor edx, edx call js_alloc_string mov [rsp+68h+var_50], rax test rax, rax jz loc_79D8E loc_79CD8: test ebp, ebp jle short loc_79D32 mov r13d, ebp shl r13, 4 xor ebp, ebp lea r15, [rsp+68h+var_5C] lea r12, [rsp+68h+var_58] loc_79CEF: mov rdx, [r14+rbp] mov rcx, [r14+rbp+8] mov [rsp+68h+var_38], rdx cmp ecx, 0FFFFFFF7h jb short loc_79D09 mov rax, [rsp+68h+var_38] inc dword ptr [rax] loc_79D09: mov rdi, rbx mov rsi, r15 call JS_ToInt32Free test eax, eax jnz short loc_79D3E movzx esi, [rsp+68h+var_5C] mov rdi, r12 call string_buffer_putc16 test eax, eax jnz short loc_79D3E add rbp, 10h cmp r13, rbp jnz short loc_79CEF loc_79D32: lea rdi, [rsp+68h+var_58] call string_buffer_end jmp short loc_79D6D loc_79D3E: mov rdi, [rsp+68h+var_58] mov rsi, [rsp+68h+var_50] call js_free mov [rsp+68h+var_50], 0 mov edx, 6 xor eax, eax xor ecx, ecx jmp short loc_79D7A loc_79D61: movzx esi, word ptr [r14] mov rdi, rbx call js_new_string_char loc_79D6D: mov rcx, 0FFFFFFFF00000000h and rcx, rax loc_79D7A: mov eax, eax or rax, rcx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_79D8E: mov [rsp+68h+var_44], 0 mov dword ptr [rsp+68h+var_40+4], 0FFFFFFFFh jmp loc_79CD8
unsigned long long js_string_fromCharCode(long long a1, long long a2, long long a3, int a4, unsigned __int16 *a5) { long long v7; // r13 unsigned long long v8; // rbp unsigned long long v9; // rdx long long v10; // rcx long long v11; // rax unsigned long long v12; // rcx int v14; // [rsp+Ch] [rbp-5Ch] BYREF long long v15; // [rsp+10h] [rbp-58h] BYREF long long v16; // [rsp+18h] [rbp-50h] int v17; // [rsp+20h] [rbp-48h] int v18; // [rsp+24h] [rbp-44h] long long v19; // [rsp+28h] [rbp-40h] _DWORD *v20; // [rsp+30h] [rbp-38h] if ( a4 == 1 && !*((_DWORD *)a5 + 2) ) { v11 = js_new_string_char(a1, *a5); goto LABEL_15; } v15 = a1; v18 = a4; v17 = 0; v19 = 0LL; v16 = js_alloc_string(a1, (unsigned int)a4, 0); if ( !v16 ) { v18 = 0; HIDWORD(v19) = -1; } if ( a4 <= 0 ) { LABEL_12: v11 = (long long)string_buffer_end((long long)&v15); LABEL_15: v12 = v11 & 0xFFFFFFFF00000000LL; return v12 | (unsigned int)v11; } v7 = 16LL * (unsigned int)a4; v8 = 0LL; while ( 1 ) { v9 = *(_QWORD *)&a5[v8 / 2]; v10 = *(_QWORD *)&a5[v8 / 2 + 4]; v20 = (_DWORD *)v9; if ( (unsigned int)v10 >= 0xFFFFFFF7 ) ++*v20; if ( (unsigned int)JS_ToInt32Free(a1, &v14, v9, v10) || (unsigned int)string_buffer_putc16((long long)&v15, (unsigned __int16)v14) ) { break; } v8 += 16LL; if ( v7 == v8 ) goto LABEL_12; } js_free(v15, v16); v16 = 0LL; LODWORD(v11) = 0; v12 = 0LL; return v12 | (unsigned int)v11; }
js_string_fromCharCode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV EBP,ECX MOV RBX,RDI CMP ECX,0x1 JNZ 0x00179ca4 CMP dword ptr [R14 + 0x8],0x0 JZ 0x00179d61 LAB_00179ca4: MOV qword ptr [RSP + 0x10],RBX MOV dword ptr [RSP + 0x24],EBP MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x0 MOV RDI,RBX MOV ESI,EBP XOR EDX,EDX CALL 0x0011ff5f MOV qword ptr [RSP + 0x18],RAX TEST RAX,RAX JZ 0x00179d8e LAB_00179cd8: TEST EBP,EBP JLE 0x00179d32 MOV R13D,EBP SHL R13,0x4 XOR EBP,EBP LEA R15,[RSP + 0xc] LEA R12,[RSP + 0x10] LAB_00179cef: MOV RDX,qword ptr [R14 + RBP*0x1] MOV RCX,qword ptr [R14 + RBP*0x1 + 0x8] MOV qword ptr [RSP + 0x30],RDX CMP ECX,-0x9 JC 0x00179d09 MOV RAX,qword ptr [RSP + 0x30] INC dword ptr [RAX] LAB_00179d09: MOV RDI,RBX MOV RSI,R15 CALL 0x00126daf TEST EAX,EAX JNZ 0x00179d3e MOVZX ESI,word ptr [RSP + 0xc] MOV RDI,R12 CALL 0x00146bcb TEST EAX,EAX JNZ 0x00179d3e ADD RBP,0x10 CMP R13,RBP JNZ 0x00179cef LAB_00179d32: LEA RDI,[RSP + 0x10] CALL 0x00132830 JMP 0x00179d6d LAB_00179d3e: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0011bf85 MOV qword ptr [RSP + 0x18],0x0 MOV EDX,0x6 XOR EAX,EAX XOR ECX,ECX JMP 0x00179d7a LAB_00179d61: MOVZX ESI,word ptr [R14] MOV RDI,RBX CALL 0x0013c97a LAB_00179d6d: MOV RCX,-0x100000000 AND RCX,RAX LAB_00179d7a: MOV EAX,EAX OR RAX,RCX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00179d8e: MOV dword ptr [RSP + 0x24],0x0 MOV dword ptr [RSP + 0x2c],0xffffffff JMP 0x00179cd8
ulong js_string_fromCharCode (int8 param_1,int8 param_2,int8 param_3,uint param_4, int2 *param_5) { int iVar1; ulong uVar2; ulong uVar3; long lVar4; int2 local_5c [2]; int8 local_58; long local_50; int4 local_48; uint local_44; int8 local_40; int *local_38; if ((param_4 == 1) && (*(int *)(param_5 + 4) == 0)) { uVar2 = js_new_string_char(param_1,*param_5); } else { local_48 = 0; local_40 = 0; local_58 = param_1; local_44 = param_4; local_50 = js_alloc_string(param_1,param_4,0); if (local_50 == 0) { local_44 = 0; local_40 = CONCAT44(0xffffffff,(int4)local_40); } if (0 < (int)param_4) { lVar4 = 0; do { local_38 = *(int **)((long)param_5 + lVar4); if (0xfffffff6 < (uint)*(int8 *)((long)param_5 + lVar4 + 8)) { *local_38 = *local_38 + 1; } iVar1 = JS_ToInt32Free(param_1,local_5c); if (iVar1 != 0) { LAB_00179d3e: js_free(local_58,local_50); uVar2 = 0; uVar3 = 0; goto LAB_00179d7a; } iVar1 = string_buffer_putc16(&local_58,local_5c[0]); if (iVar1 != 0) goto LAB_00179d3e; lVar4 = lVar4 + 0x10; } while ((ulong)param_4 << 4 != lVar4); } uVar2 = string_buffer_end(&local_58); } uVar3 = uVar2 & 0xffffffff00000000; LAB_00179d7a: return uVar2 & 0xffffffff | uVar3; }
17,147
js_string_fromCharCode
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_fromCharCode(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int i; StringBuffer b_s, *b = &b_s; // shortcut for single argument common case if (argc == 1 && JS_VALUE_GET_TAG(argv[0]) == JS_TAG_INT) { uint16_t c16 = JS_VALUE_GET_INT(argv[0]); return js_new_string_char(ctx, c16); } string_buffer_init(ctx, b, argc); for(i = 0; i < argc; i++) { int32_t c; if (JS_ToInt32(ctx, &c, argv[i]) || string_buffer_putc16(b, c & 0xffff)) { string_buffer_free(b); return JS_EXCEPTION; } } return string_buffer_end(b); }
O3
c
js_string_fromCharCode: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r14 movl %ecx, %ebp movq %rdi, %rbx cmpl $0x1, %ecx jne 0x7c5e4 cmpl $0x0, 0x8(%r14) je 0x7c688 movq %rbx, (%rsp) movsd 0x23b0c(%rip), %xmm0 # 0xa00c0 movups %xmm0, 0x10(%rsp) movq %rbx, %rdi movl $0x1, %esi xorl %edx, %edx callq 0x20686 movq %rax, 0x8(%rsp) testq %rax, %rax jne 0x7c61b movl $0x0, 0x14(%rsp) movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF jmp 0x7c61b movq %rbx, (%rsp) movl %ebp, 0x14(%rsp) movl $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movq %rbx, %rdi movl %ebp, %esi xorl %edx, %edx callq 0x20686 movq %rax, 0x8(%rsp) testq %rax, %rax je 0x7c6b5 testl %ebp, %ebp jle 0x7c665 movl %ebp, %r13d shlq $0x4, %r13 xorl %ebp, %ebp leaq 0x24(%rsp), %r15 movq %rsp, %r12 movq (%r14,%rbp), %rdx movq 0x8(%r14,%rbp), %rcx cmpl $-0x9, %ecx jb 0x7c63c incl (%rdx) movq %rbx, %rdi movq %r15, %rsi callq 0x27408 testl %eax, %eax jne 0x7c66f movzwl 0x24(%rsp), %esi movq %r12, %rdi callq 0x4886d testl %eax, %eax jne 0x7c66f addq $0x10, %rbp cmpq %rbp, %r13 jne 0x7c62c movq %rsp, %rdi callq 0x33675 jmp 0x7c694 movq (%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x1c845 movl $0x6, %edx xorl %eax, %eax xorl %ecx, %ecx jmp 0x7c6a1 movzwl (%r14), %esi movq %rbx, %rdi callq 0x3df42 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax orq %rcx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x0, 0x14(%rsp) movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF jmp 0x7c617
js_string_fromCharCode: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, r8 mov ebp, ecx mov rbx, rdi cmp ecx, 1 jnz short loc_7C5E4 cmp dword ptr [r14+8], 0 jz loc_7C688 mov [rsp+58h+var_58], rbx movsd xmm0, cs:qword_A00C0 movups [rsp+58h+var_48], xmm0 mov rdi, rbx mov esi, 1 xor edx, edx call js_alloc_string mov [rsp+58h+var_50], rax test rax, rax jnz short loc_7C61B mov dword ptr [rsp+58h+var_48+4], 0 mov dword ptr [rsp+58h+var_48+0Ch], 0FFFFFFFFh jmp short loc_7C61B loc_7C5E4: mov [rsp+58h+var_58], rbx mov dword ptr [rsp+58h+var_48+4], ebp mov dword ptr [rsp+58h+var_48], 0 mov qword ptr [rsp+58h+var_48+8], 0 mov rdi, rbx mov esi, ebp xor edx, edx call js_alloc_string mov [rsp+58h+var_50], rax test rax, rax jz loc_7C6B5 loc_7C617: test ebp, ebp jle short loc_7C665 loc_7C61B: mov r13d, ebp shl r13, 4 xor ebp, ebp lea r15, [rsp+58h+var_34] mov r12, rsp loc_7C62C: mov rdx, [r14+rbp] mov rcx, [r14+rbp+8] cmp ecx, 0FFFFFFF7h jb short loc_7C63C inc dword ptr [rdx] loc_7C63C: mov rdi, rbx mov rsi, r15 call JS_ToInt32Free test eax, eax jnz short loc_7C66F movzx esi, [rsp+58h+var_34] mov rdi, r12 call string_buffer_putc16 test eax, eax jnz short loc_7C66F add rbp, 10h cmp r13, rbp jnz short loc_7C62C loc_7C665: mov rdi, rsp call string_buffer_end jmp short loc_7C694 loc_7C66F: mov rdi, [rsp+58h+var_58] mov rsi, [rsp+58h+var_50] call js_free mov edx, 6 xor eax, eax xor ecx, ecx jmp short loc_7C6A1 loc_7C688: movzx esi, word ptr [r14] mov rdi, rbx call js_new_string_char loc_7C694: mov rcx, 0FFFFFFFF00000000h and rcx, rax loc_7C6A1: mov eax, eax or rax, rcx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7C6B5: mov dword ptr [rsp+58h+var_48+4], 0 mov dword ptr [rsp+58h+var_48+0Ch], 0FFFFFFFFh jmp loc_7C617
unsigned long long js_string_fromCharCode(long long a1, long long a2, long long a3, int a4, unsigned __int16 *a5) { long long v7; // r13 unsigned long long v8; // rbp _DWORD *v9; // rdx long long v10; // rcx long long v11; // rax unsigned long long v12; // rcx long long v14; // [rsp+0h] [rbp-58h] BYREF long long v15; // [rsp+8h] [rbp-50h] __int128 v16; // [rsp+10h] [rbp-48h] int v17[13]; // [rsp+24h] [rbp-34h] BYREF if ( a4 == 1 ) { if ( *((_DWORD *)a5 + 2) ) { v14 = a1; v16 = 0x100000000uLL; v15 = js_alloc_string(a1, 1LL, 0); if ( !v15 ) { DWORD1(v16) = 0; HIDWORD(v16) = -1; } goto LABEL_8; } v11 = js_new_string_char(a1, *a5); LABEL_17: v12 = v11 & 0xFFFFFFFF00000000LL; return v12 | (unsigned int)v11; } v14 = a1; DWORD1(v16) = a4; LODWORD(v16) = 0; *((_QWORD *)&v16 + 1) = 0LL; v15 = js_alloc_string(a1, (unsigned int)a4, 0); if ( !v15 ) { DWORD1(v16) = 0; HIDWORD(v16) = -1; } if ( a4 <= 0 ) { LABEL_14: v11 = string_buffer_end(&v14); goto LABEL_17; } LABEL_8: v7 = 16LL * (unsigned int)a4; v8 = 0LL; while ( 1 ) { v9 = *(_DWORD **)&a5[v8 / 2]; v10 = *(_QWORD *)&a5[v8 / 2 + 4]; if ( (unsigned int)v10 >= 0xFFFFFFF7 ) ++*v9; if ( (unsigned int)JS_ToInt32Free(a1, v17, (unsigned long long)v9, v10) || (unsigned int)string_buffer_putc16((long long)&v14, LOWORD(v17[0])) ) { break; } v8 += 16LL; if ( v7 == v8 ) goto LABEL_14; } js_free(v14, v15); LODWORD(v11) = 0; v12 = 0LL; return v12 | (unsigned int)v11; }
js_string_fromCharCode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,R8 MOV EBP,ECX MOV RBX,RDI CMP ECX,0x1 JNZ 0x0017c5e4 CMP dword ptr [R14 + 0x8],0x0 JZ 0x0017c688 MOV qword ptr [RSP],RBX MOVSD XMM0,qword ptr [0x001a00c0] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOV RDI,RBX MOV ESI,0x1 XOR EDX,EDX CALL 0x00120686 MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JNZ 0x0017c61b MOV dword ptr [RSP + 0x14],0x0 MOV dword ptr [RSP + 0x1c],0xffffffff JMP 0x0017c61b LAB_0017c5e4: MOV qword ptr [RSP],RBX MOV dword ptr [RSP + 0x14],EBP MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV RDI,RBX MOV ESI,EBP XOR EDX,EDX CALL 0x00120686 MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x0017c6b5 LAB_0017c617: TEST EBP,EBP JLE 0x0017c665 LAB_0017c61b: MOV R13D,EBP SHL R13,0x4 XOR EBP,EBP LEA R15,[RSP + 0x24] MOV R12,RSP LAB_0017c62c: MOV RDX,qword ptr [R14 + RBP*0x1] MOV RCX,qword ptr [R14 + RBP*0x1 + 0x8] CMP ECX,-0x9 JC 0x0017c63c INC dword ptr [RDX] LAB_0017c63c: MOV RDI,RBX MOV RSI,R15 CALL 0x00127408 TEST EAX,EAX JNZ 0x0017c66f MOVZX ESI,word ptr [RSP + 0x24] MOV RDI,R12 CALL 0x0014886d TEST EAX,EAX JNZ 0x0017c66f ADD RBP,0x10 CMP R13,RBP JNZ 0x0017c62c LAB_0017c665: MOV RDI,RSP CALL 0x00133675 JMP 0x0017c694 LAB_0017c66f: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0011c845 MOV EDX,0x6 XOR EAX,EAX XOR ECX,ECX JMP 0x0017c6a1 LAB_0017c688: MOVZX ESI,word ptr [R14] MOV RDI,RBX CALL 0x0013df42 LAB_0017c694: MOV RCX,-0x100000000 AND RCX,RAX LAB_0017c6a1: MOV EAX,EAX OR RAX,RCX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017c6b5: MOV dword ptr [RSP + 0x14],0x0 MOV dword ptr [RSP + 0x1c],0xffffffff JMP 0x0017c617
ulong js_string_fromCharCode (int8 param_1,int8 param_2,int8 param_3,uint param_4, int2 *param_5) { int iVar1; ulong uVar2; ulong uVar3; long lVar4; int8 local_58; long local_50; ulong local_48; int8 uStack_40; int2 local_34 [2]; local_58 = param_1; if (param_4 == 1) { if (*(int *)(param_5 + 4) == 0) { uVar2 = js_new_string_char(param_1,*param_5); goto LAB_0017c694; } local_48 = DAT_001a00c0; uStack_40 = 0; local_50 = js_alloc_string(param_1,1,0); if (local_50 == 0) { local_48 = local_48 & 0xffffffff; uStack_40 = CONCAT44(0xffffffff,(int4)uStack_40); } LAB_0017c61b: lVar4 = 0; do { if (0xfffffff6 < (uint)*(int8 *)((long)param_5 + lVar4 + 8)) { **(int **)((long)param_5 + lVar4) = **(int **)((long)param_5 + lVar4) + 1; } iVar1 = JS_ToInt32Free(param_1,local_34); if (iVar1 != 0) { LAB_0017c66f: js_free(local_58,local_50); uVar2 = 0; uVar3 = 0; goto LAB_0017c6a1; } iVar1 = string_buffer_putc16(&local_58,local_34[0]); if (iVar1 != 0) goto LAB_0017c66f; lVar4 = lVar4 + 0x10; } while ((ulong)param_4 << 4 != lVar4); } else { local_48 = (ulong)param_4 << 0x20; uStack_40 = 0; local_50 = js_alloc_string(param_1,param_4,0); if (local_50 == 0) { local_48 = local_48 & 0xffffffff; uStack_40 = CONCAT44(0xffffffff,(int4)uStack_40); } if (0 < (int)param_4) goto LAB_0017c61b; } uVar2 = string_buffer_end(&local_58); LAB_0017c694: uVar3 = uVar2 & 0xffffffff00000000; LAB_0017c6a1: return uVar2 & 0xffffffff | uVar3; }
17,148
my_long10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, long int val) { char buffer[66]; register char *p, *e; long int new_val; uint sign=0; unsigned long int uval = (unsigned long int) val; e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval= (unsigned long int)0 - uval; *dst++= '-'; len--; sign= 1; } } new_val = (long) (uval / 10); *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); val = new_val; while (val != 0) { new_val=val/10; *--p = '0' + (char) (val-new_val*10); val= new_val; } len= MY_MIN(len, (size_t) (e-p)); memcpy(dst, p, len); return len+sign; }
O3
c
my_long10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r10 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb $0x0, -0x1f(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0xb593f negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r10 movl $0x1, %r14d jmp 0xb5942 xorl %r14d, %r14d leaq -0x1f(%rbp), %rbx movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD movq %r8, %rax mulq %rcx movq %rdx, %r9 shrq $0x3, %r9 imull $0xf6, %r9d, %eax addl %r8d, %eax addb $0x30, %al leaq -0x20(%rbp), %rsi movb %al, (%rsi) cmpq $0xa, %r8 jb 0xb5999 movq %r9, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r9d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi cmpq $0x9, %r9 movq %rdx, %r9 ja 0xb5975 subq %rsi, %rbx cmpq %rbx, %r10 cmovbq %r10, %rbx movq %rbx, %rdx callq 0x29080 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0xb59c9 addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x29250
my_long10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r10, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax mov [rbp+var_1F], 0 test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_B593F neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r10 mov r14d, 1 jmp short loc_B5942 loc_B593F: xor r14d, r14d loc_B5942: lea rbx, [rbp+var_1F] mov rcx, 0CCCCCCCCCCCCCCCDh mov rax, r8 mul rcx mov r9, rdx shr r9, 3 imul eax, r9d, 0F6h add eax, r8d add al, 30h ; '0' lea rsi, [rbp+var_20] mov [rsi], al cmp r8, 0Ah jb short loc_B5999 loc_B5975: mov rax, r9 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r9d add al, 30h ; '0' mov [rsi-1], al dec rsi cmp r9, 9 mov r9, rdx ja short loc_B5975 loc_B5999: sub rbx, rsi cmp r10, rbx cmovb rbx, r10 mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_B59C9 add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_B59C9: call ___stack_chk_fail
_BYTE * my_long10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r10 _BYTE *v6; // rdi long long v7; // r14 unsigned long long v8; // r9 char *v9; // rsi bool v10; // cf bool v11; // zf _BYTE *v12; // rbx char v14; // [rsp+40h] [rbp-20h] BYREF _BYTE v15[7]; // [rsp+41h] [rbp-1Fh] BYREF unsigned long long v16; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v16 = __readfsqword(0x28u); v15[0] = 0; if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v7 = 1LL; } v8 = a5 / 0xA; v9 = &v14; v14 = a5 % 0xA + 48; if ( a5 >= 0xA ) { do { *--v9 = v8 % 0xA + 48; v10 = v8 < 9; v11 = v8 == 9; v8 /= 0xAuLL; } while ( !v10 && !v11 ); } v12 = (_BYTE *)(v15 - v9); if ( (unsigned long long)v5 < v15 - v9 ) v12 = v5; memcpy(v6, v9, v12); return &v12[v7]; }
my_long10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R10,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV byte ptr [RBP + -0x1f],0x0 TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x001b593f NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R10 MOV R14D,0x1 JMP 0x001b5942 LAB_001b593f: XOR R14D,R14D LAB_001b5942: LEA RBX,[RBP + -0x1f] MOV RCX,-0x3333333333333333 MOV RAX,R8 MUL RCX MOV R9,RDX SHR R9,0x3 IMUL EAX,R9D,0xf6 ADD EAX,R8D ADD AL,0x30 LEA RSI,[RBP + -0x20] MOV byte ptr [RSI],AL CMP R8,0xa JC 0x001b5999 LAB_001b5975: MOV RAX,R9 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R9D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI CMP R9,0x9 MOV R9,RDX JA 0x001b5975 LAB_001b5999: SUB RBX,RSI CMP R10,RBX CMOVC RBX,R10 MOV RDX,RBX CALL 0x00129080 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001b59c9 ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_001b59c9: CALL 0x00129250
char * my_long10_to_str_8bit (int8 param_1,int1 *param_2,char *param_3,int param_4,ulong param_5) { ulong uVar1; ulong uVar2; char *__n; char *__src; long in_FS_OFFSET; bool bVar3; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_29[2] = 0; bVar3 = (long)param_5 < 0; if (bVar3 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 + -1; } local_29[1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = local_29 + 1; uVar2 = param_5 / 10; while (uVar1 = uVar2, 9 < param_5) { __src[-1] = (char)(uVar1 / 10) * -10 + (char)uVar1 + '0'; __src = __src + -1; uVar2 = uVar1 / 10; param_5 = uVar1; } __n = local_29 + (2 - (long)__src); if (param_3 < local_29 + (2 - (long)__src)) { __n = param_3; } memcpy(param_2,__src,(size_t)__n); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return __n + (bVar3 && param_4 < 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
17,149
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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 invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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 0x64a74(%rip), %rsi # 0x1163cb leaq 0x64a7d(%rip), %rdx # 0x1163db leaq 0x28(%rsp), %rdi callq 0x2630c leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x8923c 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 0x1e360 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1d310 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1d310 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x1d310 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0xb1a01 movq 0x78(%rsp), %rsi incq %rsi callq 0x1dc40 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb1a1c movq 0x58(%rsp), %rsi incq %rsi callq 0x1dc40 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xb1a33 movq 0x38(%rsp), %rsi incq %rsi callq 0x1dc40 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x89438 leaq 0xa5727(%rip), %rax # 0x157170 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xb1a67 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc40 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 0xb1af5 movq 0x18(%rsp), %rsi jmp 0xb1aed movq %rax, %rbx jmp 0xb1ade movq %rax, %rbx jmp 0xb1af5 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xb1ab7 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc40 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 0x1fb3f movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xb1af5 movq 0x38(%rsp), %rsi incq %rsi callq 0x1dc40 movq %rbx, %rdi callq 0x1e650 nop
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_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, aInvalidIterato; "invalid_iterator" lea rdx, aInvalidIterato+10h; "" lea rdi, [rsp+0C8h+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_B1A01 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1A01: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B1A1C mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1A1C: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_B1A33 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1A33: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_B1A67 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1A67: 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_B1AF5 mov rsi, [rsp+arg_10] jmp short loc_B1AED mov rbx, rax jmp short loc_B1ADE mov rbx, rax jmp short loc_B1AF5 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_B1AB7 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1AB7: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1 mov rbx, [r12] loc_B1ADE: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_B1AF5 mov rsi, [rsp+arg_30] loc_B1AED: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1AF5: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_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*>(v7, "invalid_iterator", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9, 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::invalid_iterator + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_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_001b1950: LEA RSI,[0x2163cb] LEA RDX,[0x2163db] LEA RDI,[RSP + 0x28] CALL 0x0012630c LAB_001b1968: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0018923c 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_001b19a7: LEA RDI,[RSP + 0x8] CALL 0x0011e360 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x0011d310 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x0011d310 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x0011d310 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x001b1a01 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011dc40 LAB_001b1a01: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001b1a1c MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011dc40 LAB_001b1a1c: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x001b1a33 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011dc40 LAB_001b1a33: MOV RDX,qword ptr [RSP + 0x8] LAB_001b1a38: MOV RDI,RBX MOV ESI,EBP CALL 0x00189438 LAB_001b1a42: LEA RAX,[0x257170] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x001b1a67 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011dc40 LAB_001b1a67: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_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 001b1950 to 001b1967 has its CatchHandler @ 001b1a95 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator",""); /* try { // try from 001b1968 to 001b1978 has its CatchHandler @ 001b1a90 */ 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 001b19a7 to 001b19e9 has its CatchHandler @ 001b1a9a */ 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 001b1a38 to 001b1a41 has its CatchHandler @ 001b1a7c */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_00257180; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
17,150
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp
void UnorderedSubset::markDuplicateEdges(Edge* edges, short* feEdges, Index const* fvIndices) const { // The edge assignment thus far does not correctly detect the presence // of all edges repeated or duplicated in the same face, e.g. for quad // with vertices {A, B, A, C} the edge AB occurs both as AB and BA. // When the face is oriented relative to corner B, we have {B, A, C, A} // and edge BA will be detected as non-manifold -- but not from corner // A or C. // // So look for repeated instances of the corner vertex in the face and // inspect its neighbors to see if they match the leading or trailing // edges. // // This is a trivial test for a quad: if the opposite vertex matches // the corner vertex, both the leading and trailing edges will be // duplicated and so can immediately be marked non-manifold. So deal // with the common case of all neighboring quads separately. if (_vdesc.commonFaceSize == 3) return; Index vCorner = fvIndices[0]; int numFaces = _vdesc.numFaces; if (_vdesc.commonFaceSize == 4) { Index const* fvOpposite = fvIndices + 2; for (int face = 0; face < numFaces; ++face, fvOpposite += 4) { if (*fvOpposite == vCorner) { edges[feEdges[2 * face]].setDuplicate(); edges[feEdges[2 * face + 1]].setDuplicate(); } } } else { Index const* fv = fvIndices; for (int face = 0; face < numFaces; ++face) { int faceSize = _vdesc.getFaceSize(face); if (faceSize == 4) { if (fv[2] == vCorner) { edges[feEdges[2 * face]].setDuplicate(); edges[feEdges[2 * face + 1]].setDuplicate(); } } else { for (int j = 2; j < (faceSize - 2); ++j) { if (fv[j] == vCorner) { if (fv[j - 1] == fv[1]) edges[feEdges[2 * face]].setDuplicate(); if (fv[j + 1] == fv[faceSize - 1]) edges[feEdges[2 * face + 1]].setDuplicate(); } } } fv += faceSize; } } }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const: movzwl 0x6(%rdi), %r9d cmpw $0x3, %r9w je 0xb0717 movl (%rcx), %eax movzwl 0x4(%rdi), %r8d cmpw $0x4, %r9w jne 0xb0718 testq %r8, %r8 je 0xb0717 shll $0x2, %r8d xorl %edi, %edi cmpl %eax, 0x8(%rcx,%rdi,4) jne 0xb070e movswq (%rdx,%rdi), %r9 shlq $0x4, %r9 movb 0xc(%rsi,%r9), %r10b andb $-0x28, %r10b orb $0x24, %r10b movb %r10b, 0xc(%rsi,%r9) movswq 0x2(%rdx,%rdi), %r9 shlq $0x4, %r9 movb 0xc(%rsi,%r9), %r10b andb $-0x28, %r10b orb $0x24, %r10b movb %r10b, 0xc(%rsi,%r9) addq $0x4, %rdi cmpq %rdi, %r8 jne 0xb06d1 retq testq %r8, %r8 je 0xb0717 pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx xorl %r9d, %r9d movzwl 0x6(%rdi), %r10d testl %r10d, %r10d jne 0xb073f movq 0x10(%rdi), %r11 movl 0x4(%r11,%r9,4), %r10d subl (%r11,%r9,4), %r10d cmpl $0x4, %r10d jne 0xb0783 cmpl %eax, 0x8(%rcx) jne 0xb07fb movswq (%rdx,%r9,4), %r11 shlq $0x4, %r11 movb 0xc(%rsi,%r11), %bl andb $-0x28, %bl orb $0x24, %bl movb %bl, 0xc(%rsi,%r11) movswq 0x2(%rdx,%r9,4), %r11 shlq $0x4, %r11 movb 0xc(%rsi,%r11), %bl andb $-0x28, %bl orb $0x24, %bl movb %bl, 0xc(%rsi,%r11) jmp 0xb07fb jle 0xb07fb leal -0x2(%r10), %r11d leal -0x1(%r10), %ebx movslq %ebx, %rbx leaq 0x1(,%r9,2), %r14 shlq $0x2, %r11 movl $0x8, %r15d cmpl %eax, (%rcx,%r15) jne 0xb07f2 movl -0x4(%rcx,%r15), %ebp cmpl 0x4(%rcx), %ebp jne 0xb07cd movswq (%rdx,%r9,4), %r12 shlq $0x4, %r12 movb 0xc(%rsi,%r12), %bpl andb $-0x28, %bpl orb $0x24, %bpl movb %bpl, 0xc(%rsi,%r12) movl 0x4(%rcx,%r15), %ebp cmpl (%rcx,%rbx,4), %ebp jne 0xb07f2 movswq (%rdx,%r14,2), %r12 shlq $0x4, %r12 movb 0xc(%rsi,%r12), %bpl andb $-0x28, %bpl orb $0x24, %bpl movb %bpl, 0xc(%rsi,%r12) addq $0x4, %r15 cmpq %r15, %r11 jne 0xb07a2 movslq %r10d, %r10 leaq (%rcx,%r10,4), %rcx incq %r9 cmpq %r8, %r9 jne 0xb0728 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset18markDuplicateEdgesEPNS2_4EdgeEPsPKi: movzx r9d, word ptr [rdi+6] cmp r9w, 3 jz short locret_B0717 mov eax, [rcx] movzx r8d, word ptr [rdi+4] cmp r9w, 4 jnz short loc_B0718 test r8, r8 jz short locret_B0717 shl r8d, 2 xor edi, edi loc_B06D1: cmp [rcx+rdi*4+8], eax jnz short loc_B070E movsx r9, word ptr [rdx+rdi] shl r9, 4 mov r10b, [rsi+r9+0Ch] and r10b, 0D8h or r10b, 24h mov [rsi+r9+0Ch], r10b movsx r9, word ptr [rdx+rdi+2] shl r9, 4 mov r10b, [rsi+r9+0Ch] and r10b, 0D8h or r10b, 24h mov [rsi+r9+0Ch], r10b loc_B070E: add rdi, 4 cmp r8, rdi jnz short loc_B06D1 locret_B0717: retn loc_B0718: test r8, r8 jz short locret_B0717 push rbp push r15 push r14 push r12 push rbx xor r9d, r9d loc_B0728: movzx r10d, word ptr [rdi+6] test r10d, r10d jnz short loc_B073F mov r11, [rdi+10h] mov r10d, [r11+r9*4+4] sub r10d, [r11+r9*4] loc_B073F: cmp r10d, 4 jnz short loc_B0783 cmp [rcx+8], eax jnz loc_B07FB movsx r11, word ptr [rdx+r9*4] shl r11, 4 mov bl, [rsi+r11+0Ch] and bl, 0D8h or bl, 24h mov [rsi+r11+0Ch], bl movsx r11, word ptr [rdx+r9*4+2] shl r11, 4 mov bl, [rsi+r11+0Ch] and bl, 0D8h or bl, 24h mov [rsi+r11+0Ch], bl jmp short loc_B07FB loc_B0783: jle short loc_B07FB lea r11d, [r10-2] lea ebx, [r10-1] movsxd rbx, ebx lea r14, ds:1[r9*2] shl r11, 2 mov r15d, 8 loc_B07A2: cmp [rcx+r15], eax jnz short loc_B07F2 mov ebp, [rcx+r15-4] cmp ebp, [rcx+4] jnz short loc_B07CD movsx r12, word ptr [rdx+r9*4] shl r12, 4 mov bpl, [rsi+r12+0Ch] and bpl, 0D8h or bpl, 24h mov [rsi+r12+0Ch], bpl loc_B07CD: mov ebp, [rcx+r15+4] cmp ebp, [rcx+rbx*4] jnz short loc_B07F2 movsx r12, word ptr [rdx+r14*2] shl r12, 4 mov bpl, [rsi+r12+0Ch] and bpl, 0D8h or bpl, 24h mov [rsi+r12+0Ch], bpl loc_B07F2: add r15, 4 cmp r11, r15 jnz short loc_B07A2 loc_B07FB: movsxd r10, r10d lea rcx, [rcx+r10*4] inc r9 cmp r9, r8 jnz loc_B0728 pop rbx pop r12 pop r14 pop r15 pop rbp retn
void OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges( OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *this, OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *a2, __int16 *a3, int *a4) { __int16 v4; // r9 int v5; // eax long long v6; // r8 long long v7; // r8 unsigned long long v8; // rdi long long v9; // r9 long long v10; // r9 int v11; // r10d long long v12; // r11 long long v13; // r11 long long v14; // r15 long long v15; // r12 long long v16; // r12 v4 = *((_WORD *)this + 3); if ( v4 != 3 ) { v5 = *a4; v6 = *((unsigned __int16 *)this + 2); if ( v4 == 4 ) { if ( *((_WORD *)this + 2) ) { v7 = (unsigned int)(4 * v6); v8 = 0LL; do { if ( a4[v8 + 2] == v5 ) { *((_BYTE *)a2 + 16 * a3[v8 / 2] + 12) = *((_BYTE *)a2 + 16 * a3[v8 / 2] + 12) & 0xD8 | 0x24; v9 = 16LL * a3[v8 / 2 + 1]; *((_BYTE *)a2 + v9 + 12) = *((_BYTE *)a2 + v9 + 12) & 0xD8 | 0x24; } v8 += 4LL; } while ( v7 != v8 ); } } else if ( *((_WORD *)this + 2) ) { v10 = 0LL; do { v11 = *((unsigned __int16 *)this + 3); if ( !*((_WORD *)this + 3) ) v11 = *(_DWORD *)(*((_QWORD *)this + 2) + 4 * v10 + 4) - *(_DWORD *)(*((_QWORD *)this + 2) + 4 * v10); if ( v11 == 4 ) { if ( a4[2] == v5 ) { v12 = 16LL * a3[2 * v10]; *((_BYTE *)a2 + v12 + 12) = *((_BYTE *)a2 + v12 + 12) & 0xD8 | 0x24; v13 = 16LL * a3[2 * v10 + 1]; *((_BYTE *)a2 + v13 + 12) = *((_BYTE *)a2 + v13 + 12) & 0xD8 | 0x24; } } else if ( v11 > 4 ) { v14 = 2LL; do { if ( a4[v14] == v5 ) { if ( a4[v14 - 1] == a4[1] ) { v15 = 16LL * a3[2 * v10]; *((_BYTE *)a2 + v15 + 12) = *((_BYTE *)a2 + v15 + 12) & 0xD8 | 0x24; } if ( a4[v14 + 1] == a4[v11 - 1] ) { v16 = 16LL * a3[2 * v10 + 1]; *((_BYTE *)a2 + v16 + 12) = *((_BYTE *)a2 + v16 + 12) & 0xD8 | 0x24; } } ++v14; } while ( v11 - 2 != v14 ); } a4 += v11; ++v10; } while ( v10 != v6 ); } } }
markDuplicateEdges: MOVZX R9D,word ptr [RDI + 0x6] CMP R9W,0x3 JZ 0x001b0717 MOV EAX,dword ptr [RCX] MOVZX R8D,word ptr [RDI + 0x4] CMP R9W,0x4 JNZ 0x001b0718 TEST R8,R8 JZ 0x001b0717 SHL R8D,0x2 XOR EDI,EDI LAB_001b06d1: CMP dword ptr [RCX + RDI*0x4 + 0x8],EAX JNZ 0x001b070e MOVSX R9,word ptr [RDX + RDI*0x1] SHL R9,0x4 MOV R10B,byte ptr [RSI + R9*0x1 + 0xc] AND R10B,0xd8 OR R10B,0x24 MOV byte ptr [RSI + R9*0x1 + 0xc],R10B MOVSX R9,word ptr [RDX + RDI*0x1 + 0x2] SHL R9,0x4 MOV R10B,byte ptr [RSI + R9*0x1 + 0xc] AND R10B,0xd8 OR R10B,0x24 MOV byte ptr [RSI + R9*0x1 + 0xc],R10B LAB_001b070e: ADD RDI,0x4 CMP R8,RDI JNZ 0x001b06d1 LAB_001b0717: RET LAB_001b0718: TEST R8,R8 JZ 0x001b0717 PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX XOR R9D,R9D LAB_001b0728: MOVZX R10D,word ptr [RDI + 0x6] TEST R10D,R10D JNZ 0x001b073f MOV R11,qword ptr [RDI + 0x10] MOV R10D,dword ptr [R11 + R9*0x4 + 0x4] SUB R10D,dword ptr [R11 + R9*0x4] LAB_001b073f: CMP R10D,0x4 JNZ 0x001b0783 CMP dword ptr [RCX + 0x8],EAX JNZ 0x001b07fb MOVSX R11,word ptr [RDX + R9*0x4] SHL R11,0x4 MOV BL,byte ptr [RSI + R11*0x1 + 0xc] AND BL,0xd8 OR BL,0x24 MOV byte ptr [RSI + R11*0x1 + 0xc],BL MOVSX R11,word ptr [RDX + R9*0x4 + 0x2] SHL R11,0x4 MOV BL,byte ptr [RSI + R11*0x1 + 0xc] AND BL,0xd8 OR BL,0x24 MOV byte ptr [RSI + R11*0x1 + 0xc],BL JMP 0x001b07fb LAB_001b0783: JLE 0x001b07fb LEA R11D,[R10 + -0x2] LEA EBX,[R10 + -0x1] MOVSXD RBX,EBX LEA R14,[0x1 + R9*0x2] SHL R11,0x2 MOV R15D,0x8 LAB_001b07a2: CMP dword ptr [RCX + R15*0x1],EAX JNZ 0x001b07f2 MOV EBP,dword ptr [RCX + R15*0x1 + -0x4] CMP EBP,dword ptr [RCX + 0x4] JNZ 0x001b07cd MOVSX R12,word ptr [RDX + R9*0x4] SHL R12,0x4 MOV BPL,byte ptr [RSI + R12*0x1 + 0xc] AND BPL,0xd8 OR BPL,0x24 MOV byte ptr [RSI + R12*0x1 + 0xc],BPL LAB_001b07cd: MOV EBP,dword ptr [RCX + R15*0x1 + 0x4] CMP EBP,dword ptr [RCX + RBX*0x4] JNZ 0x001b07f2 MOVSX R12,word ptr [RDX + R14*0x2] SHL R12,0x4 MOV BPL,byte ptr [RSI + R12*0x1 + 0xc] AND BPL,0xd8 OR BPL,0x24 MOV byte ptr [RSI + R12*0x1 + 0xc],BPL LAB_001b07f2: ADD R15,0x4 CMP R11,R15 JNZ 0x001b07a2 LAB_001b07fb: MOVSXD R10,R10D LEA RCX,[RCX + R10*0x4] INC R9 CMP R9,R8 JNZ 0x001b0728 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const */ void __thiscall OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges (UnorderedSubset *this,Edge *param_1,short *param_2,int *param_3) { ushort uVar1; int iVar2; long lVar3; ulong uVar4; long lVar5; ulong uVar6; uint uVar7; if (*(short *)(this + 6) != 3) { iVar2 = *param_3; uVar1 = *(ushort *)(this + 4); uVar4 = (ulong)uVar1; if (*(short *)(this + 6) == 4) { if (uVar4 != 0) { lVar3 = 0; do { if (param_3[lVar3 + 2] == iVar2) { lVar5 = (long)*(short *)((long)param_2 + lVar3) * 0x10; param_1[lVar5 + 0xc] = (Edge)((byte)param_1[lVar5 + 0xc] & 0xd8 | 0x24); lVar5 = (long)*(short *)((long)param_2 + lVar3 + 2) * 0x10; param_1[lVar5 + 0xc] = (Edge)((byte)param_1[lVar5 + 0xc] & 0xd8 | 0x24); } lVar3 = lVar3 + 4; } while ((ulong)uVar1 * 4 != lVar3); } } else if (uVar4 != 0) { uVar6 = 0; do { uVar7 = (uint)*(ushort *)(this + 6); if (*(ushort *)(this + 6) == 0) { uVar7 = *(int *)(*(long *)(this + 0x10) + 4 + uVar6 * 4) - *(int *)(*(long *)(this + 0x10) + uVar6 * 4); } if (uVar7 == 4) { if (param_3[2] == iVar2) { param_1[(long)param_2[uVar6 * 2] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar6 * 2] * 0x10 + 0xc] & 0xd8 | 0x24); param_1[(long)param_2[uVar6 * 2 + 1] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar6 * 2 + 1] * 0x10 + 0xc] & 0xd8 | 0x24); } } else if (4 < (int)uVar7) { lVar3 = 8; do { if (*(int *)((long)param_3 + lVar3) == iVar2) { if (*(int *)((long)param_3 + lVar3 + -4) == param_3[1]) { param_1[(long)param_2[uVar6 * 2] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar6 * 2] * 0x10 + 0xc] & 0xd8 | 0x24); } if (*(int *)((long)param_3 + lVar3 + 4) == param_3[(int)(uVar7 - 1)]) { param_1[(long)param_2[uVar6 * 2 + 1] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar6 * 2 + 1] * 0x10 + 0xc] & 0xd8 | 0x24); } } lVar3 = lVar3 + 4; } while ((ulong)(uVar7 - 2) << 2 != lVar3); } param_3 = param_3 + (int)uVar7; uVar6 = uVar6 + 1; } while (uVar6 != uVar4); return; } } return; }
17,151
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp
void UnorderedSubset::markDuplicateEdges(Edge* edges, short* feEdges, Index const* fvIndices) const { // The edge assignment thus far does not correctly detect the presence // of all edges repeated or duplicated in the same face, e.g. for quad // with vertices {A, B, A, C} the edge AB occurs both as AB and BA. // When the face is oriented relative to corner B, we have {B, A, C, A} // and edge BA will be detected as non-manifold -- but not from corner // A or C. // // So look for repeated instances of the corner vertex in the face and // inspect its neighbors to see if they match the leading or trailing // edges. // // This is a trivial test for a quad: if the opposite vertex matches // the corner vertex, both the leading and trailing edges will be // duplicated and so can immediately be marked non-manifold. So deal // with the common case of all neighboring quads separately. if (_vdesc.commonFaceSize == 3) return; Index vCorner = fvIndices[0]; int numFaces = _vdesc.numFaces; if (_vdesc.commonFaceSize == 4) { Index const* fvOpposite = fvIndices + 2; for (int face = 0; face < numFaces; ++face, fvOpposite += 4) { if (*fvOpposite == vCorner) { edges[feEdges[2 * face]].setDuplicate(); edges[feEdges[2 * face + 1]].setDuplicate(); } } } else { Index const* fv = fvIndices; for (int face = 0; face < numFaces; ++face) { int faceSize = _vdesc.getFaceSize(face); if (faceSize == 4) { if (fv[2] == vCorner) { edges[feEdges[2 * face]].setDuplicate(); edges[feEdges[2 * face + 1]].setDuplicate(); } } else { for (int j = 2; j < (faceSize - 2); ++j) { if (fv[j] == vCorner) { if (fv[j - 1] == fv[1]) edges[feEdges[2 * face]].setDuplicate(); if (fv[j + 1] == fv[faceSize - 1]) edges[feEdges[2 * face + 1]].setDuplicate(); } } } fv += faceSize; } } }
O2
cpp
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const: movzwl 0x6(%rdi), %r9d cmpw $0x3, %r9w je 0xba9d9 movl (%rcx), %eax movzwl 0x4(%rdi), %r8d cmpw $0x4, %r9w jne 0xba8d0 shll $0x2, %r8d xorl %edi, %edi cmpq %rdi, %r8 je 0xba9d9 cmpl %eax, 0x8(%rcx,%rdi,4) jne 0xba8ca movswq (%rdx,%rdi), %r9 shlq $0x4, %r9 movb 0xc(%rsi,%r9), %r10b andb $-0x28, %r10b orb $0x24, %r10b movb %r10b, 0xc(%rsi,%r9) movswq 0x2(%rdx,%rdi), %r9 shlq $0x4, %r9 movb 0xc(%rsi,%r9), %r10b andb $-0x28, %r10b orb $0x24, %r10b movb %r10b, 0xc(%rsi,%r9) addq $0x4, %rdi jmp 0xba884 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx xorl %r9d, %r9d cmpq %r8, %r9 je 0xba9cf movzwl 0x6(%rdi), %r11d testl %r11d, %r11d jne 0xba8fd movq 0x10(%rdi), %rbx movl 0x4(%rbx,%r9,4), %r11d subl (%rbx,%r9,4), %r11d cmpl $0x4, %r11d jne 0xba94b cmpl %eax, 0x8(%rcx) jne 0xba93f movswq (%rdx,%r9,4), %rbx shlq $0x4, %rbx movb 0xc(%rsi,%rbx), %bpl andb $-0x28, %bpl orb $0x24, %bpl movb %bpl, 0xc(%rsi,%rbx) movswq 0x2(%rdx,%r9,4), %rbx shlq $0x4, %rbx movb 0xc(%rsi,%rbx), %bpl andb $-0x28, %bpl orb $0x24, %bpl movb %bpl, 0xc(%rsi,%rbx) movslq %r11d, %r10 leaq (%rcx,%r10,4), %rcx incq %r9 jmp 0xba8dd leal -0x2(%r11), %ebp leaq (%r9,%r9), %rbx leal -0x1(%r11), %r14d movslq %r14d, %r14 leaq 0x1(,%r9,2), %r15 movslq %ebp, %r12 movabsq $0x2, %r13 cmpq %r12, %r13 jge 0xba93f cmpl %eax, (%rcx,%r13,4) jne 0xba9ca movl -0x4(%rcx,%r13,4), %ebp cmpl 0x4(%rcx), %ebp jne 0xba99f movswq (%rdx,%rbx,2), %rbp shlq $0x4, %rbp movb 0xc(%rsi,%rbp), %r10b andb $-0x28, %r10b orb $0x24, %r10b movb %r10b, 0xc(%rsi,%rbp) movl 0x4(%rcx,%r13,4), %r10d incq %r13 cmpl (%rcx,%r14,4), %r10d jne 0xba96f movswq (%rdx,%r15,2), %r10 shlq $0x4, %r10 movb 0xc(%rsi,%r10), %bpl andb $-0x28, %bpl orb $0x24, %bpl movb %bpl, 0xc(%rsi,%r10) jmp 0xba96f incq %r13 jmp 0xba96f popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset18markDuplicateEdgesEPNS2_4EdgeEPsPKi: movzx r9d, word ptr [rdi+6] cmp r9w, 3 jz locret_BA9D9 mov eax, [rcx] movzx r8d, word ptr [rdi+4] cmp r9w, 4 jnz short loc_BA8D0 shl r8d, 2 xor edi, edi loc_BA884: cmp r8, rdi jz locret_BA9D9 cmp [rcx+rdi*4+8], eax jnz short loc_BA8CA movsx r9, word ptr [rdx+rdi] shl r9, 4 mov r10b, [rsi+r9+0Ch] and r10b, 0D8h or r10b, 24h mov [rsi+r9+0Ch], r10b movsx r9, word ptr [rdx+rdi+2] shl r9, 4 mov r10b, [rsi+r9+0Ch] and r10b, 0D8h or r10b, 24h mov [rsi+r9+0Ch], r10b loc_BA8CA: add rdi, 4 jmp short loc_BA884 loc_BA8D0: push rbp push r15 push r14 push r13 push r12 push rbx xor r9d, r9d loc_BA8DD: cmp r9, r8 jz loc_BA9CF movzx r11d, word ptr [rdi+6] test r11d, r11d jnz short loc_BA8FD mov rbx, [rdi+10h] mov r11d, [rbx+r9*4+4] sub r11d, [rbx+r9*4] loc_BA8FD: cmp r11d, 4 jnz short loc_BA94B cmp [rcx+8], eax jnz short loc_BA93F movsx rbx, word ptr [rdx+r9*4] shl rbx, 4 mov bpl, [rsi+rbx+0Ch] and bpl, 0D8h or bpl, 24h mov [rsi+rbx+0Ch], bpl movsx rbx, word ptr [rdx+r9*4+2] shl rbx, 4 mov bpl, [rsi+rbx+0Ch] and bpl, 0D8h or bpl, 24h mov [rsi+rbx+0Ch], bpl loc_BA93F: movsxd r10, r11d lea rcx, [rcx+r10*4] inc r9 jmp short loc_BA8DD loc_BA94B: lea ebp, [r11-2] lea rbx, [r9+r9] lea r14d, [r11-1] movsxd r14, r14d lea r15, ds:1[r9*2] movsxd r12, ebp mov r13, 2 loc_BA96F: cmp r13, r12 jge short loc_BA93F cmp [rcx+r13*4], eax jnz short loc_BA9CA mov ebp, [rcx+r13*4-4] cmp ebp, [rcx+4] jnz short loc_BA99F movsx rbp, word ptr [rdx+rbx*2] shl rbp, 4 mov r10b, [rsi+rbp+0Ch] and r10b, 0D8h or r10b, 24h mov [rsi+rbp+0Ch], r10b loc_BA99F: mov r10d, [rcx+r13*4+4] inc r13 cmp r10d, [rcx+r14*4] jnz short loc_BA96F movsx r10, word ptr [rdx+r15*2] shl r10, 4 mov bpl, [rsi+r10+0Ch] and bpl, 0D8h or bpl, 24h mov [rsi+r10+0Ch], bpl jmp short loc_BA96F loc_BA9CA: inc r13 jmp short loc_BA96F loc_BA9CF: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_BA9D9: retn
void OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges( OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *this, OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *a2, __int16 *a3, int *a4) { __int16 v4; // r9 int v5; // eax long long v6; // r8 long long v7; // r8 unsigned long long i; // rdi long long v9; // r9 long long j; // r9 int v11; // r11d long long v12; // rbx long long v13; // rbx long long v14; // r13 long long v15; // rbp int v16; // r10d long long v17; // r10 v4 = *((_WORD *)this + 3); if ( v4 != 3 ) { v5 = *a4; v6 = *((unsigned __int16 *)this + 2); if ( v4 == 4 ) { v7 = (unsigned int)(4 * v6); for ( i = 0LL; v7 != i; i += 4LL ) { if ( a4[i + 2] == v5 ) { *((_BYTE *)a2 + 16 * a3[i / 2] + 12) = *((_BYTE *)a2 + 16 * a3[i / 2] + 12) & 0xD8 | 0x24; v9 = 16LL * a3[i / 2 + 1]; *((_BYTE *)a2 + v9 + 12) = *((_BYTE *)a2 + v9 + 12) & 0xD8 | 0x24; } } } else { for ( j = 0LL; j != v6; ++j ) { v11 = *((unsigned __int16 *)this + 3); if ( !*((_WORD *)this + 3) ) v11 = *(_DWORD *)(*((_QWORD *)this + 2) + 4 * j + 4) - *(_DWORD *)(*((_QWORD *)this + 2) + 4 * j); if ( v11 == 4 ) { if ( a4[2] == v5 ) { v12 = 16LL * a3[2 * j]; *((_BYTE *)a2 + v12 + 12) = *((_BYTE *)a2 + v12 + 12) & 0xD8 | 0x24; v13 = 16LL * a3[2 * j + 1]; *((_BYTE *)a2 + v13 + 12) = *((_BYTE *)a2 + v13 + 12) & 0xD8 | 0x24; } } else { v14 = 2LL; while ( v14 < v11 - 2 ) { if ( a4[v14] == v5 ) { if ( a4[v14 - 1] == a4[1] ) { v15 = 16LL * a3[2 * j]; *((_BYTE *)a2 + v15 + 12) = *((_BYTE *)a2 + v15 + 12) & 0xD8 | 0x24; } v16 = a4[++v14]; if ( v16 == a4[v11 - 1] ) { v17 = 16LL * a3[2 * j + 1]; *((_BYTE *)a2 + v17 + 12) = *((_BYTE *)a2 + v17 + 12) & 0xD8 | 0x24; } } else { ++v14; } } } a4 += v11; } } } }
markDuplicateEdges: MOVZX R9D,word ptr [RDI + 0x6] CMP R9W,0x3 JZ 0x001ba9d9 MOV EAX,dword ptr [RCX] MOVZX R8D,word ptr [RDI + 0x4] CMP R9W,0x4 JNZ 0x001ba8d0 SHL R8D,0x2 XOR EDI,EDI LAB_001ba884: CMP R8,RDI JZ 0x001ba9d9 CMP dword ptr [RCX + RDI*0x4 + 0x8],EAX JNZ 0x001ba8ca MOVSX R9,word ptr [RDX + RDI*0x1] SHL R9,0x4 MOV R10B,byte ptr [RSI + R9*0x1 + 0xc] AND R10B,0xd8 OR R10B,0x24 MOV byte ptr [RSI + R9*0x1 + 0xc],R10B MOVSX R9,word ptr [RDX + RDI*0x1 + 0x2] SHL R9,0x4 MOV R10B,byte ptr [RSI + R9*0x1 + 0xc] AND R10B,0xd8 OR R10B,0x24 MOV byte ptr [RSI + R9*0x1 + 0xc],R10B LAB_001ba8ca: ADD RDI,0x4 JMP 0x001ba884 LAB_001ba8d0: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX XOR R9D,R9D LAB_001ba8dd: CMP R9,R8 JZ 0x001ba9cf MOVZX R11D,word ptr [RDI + 0x6] TEST R11D,R11D JNZ 0x001ba8fd MOV RBX,qword ptr [RDI + 0x10] MOV R11D,dword ptr [RBX + R9*0x4 + 0x4] SUB R11D,dword ptr [RBX + R9*0x4] LAB_001ba8fd: CMP R11D,0x4 JNZ 0x001ba94b CMP dword ptr [RCX + 0x8],EAX JNZ 0x001ba93f MOVSX RBX,word ptr [RDX + R9*0x4] SHL RBX,0x4 MOV BPL,byte ptr [RSI + RBX*0x1 + 0xc] AND BPL,0xd8 OR BPL,0x24 MOV byte ptr [RSI + RBX*0x1 + 0xc],BPL MOVSX RBX,word ptr [RDX + R9*0x4 + 0x2] SHL RBX,0x4 MOV BPL,byte ptr [RSI + RBX*0x1 + 0xc] AND BPL,0xd8 OR BPL,0x24 MOV byte ptr [RSI + RBX*0x1 + 0xc],BPL LAB_001ba93f: MOVSXD R10,R11D LEA RCX,[RCX + R10*0x4] INC R9 JMP 0x001ba8dd LAB_001ba94b: LEA EBP,[R11 + -0x2] LEA RBX,[R9 + R9*0x1] LEA R14D,[R11 + -0x1] MOVSXD R14,R14D LEA R15,[0x1 + R9*0x2] MOVSXD R12,EBP MOV R13,0x2 LAB_001ba96f: CMP R13,R12 JGE 0x001ba93f CMP dword ptr [RCX + R13*0x4],EAX JNZ 0x001ba9ca MOV EBP,dword ptr [RCX + R13*0x4 + -0x4] CMP EBP,dword ptr [RCX + 0x4] JNZ 0x001ba99f MOVSX RBP,word ptr [RDX + RBX*0x2] SHL RBP,0x4 MOV R10B,byte ptr [RSI + RBP*0x1 + 0xc] AND R10B,0xd8 OR R10B,0x24 MOV byte ptr [RSI + RBP*0x1 + 0xc],R10B LAB_001ba99f: MOV R10D,dword ptr [RCX + R13*0x4 + 0x4] INC R13 CMP R10D,dword ptr [RCX + R14*0x4] JNZ 0x001ba96f MOVSX R10,word ptr [RDX + R15*0x2] SHL R10,0x4 MOV BPL,byte ptr [RSI + R10*0x1 + 0xc] AND BPL,0xd8 OR BPL,0x24 MOV byte ptr [RSI + R10*0x1 + 0xc],BPL JMP 0x001ba96f LAB_001ba9ca: INC R13 JMP 0x001ba96f LAB_001ba9cf: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_001ba9d9: RET
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const */ void __thiscall OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges (UnorderedSubset *this,Edge *param_1,short *param_2,int *param_3) { ushort uVar1; int iVar2; long lVar3; long lVar4; ulong uVar5; uint uVar6; if (*(short *)(this + 6) != 3) { iVar2 = *param_3; uVar1 = *(ushort *)(this + 4); if (*(short *)(this + 6) == 4) { for (lVar3 = 0; (ulong)uVar1 * 4 != lVar3; lVar3 = lVar3 + 4) { if (param_3[lVar3 + 2] == iVar2) { lVar4 = (long)*(short *)((long)param_2 + lVar3) * 0x10; param_1[lVar4 + 0xc] = (Edge)((byte)param_1[lVar4 + 0xc] & 0xd8 | 0x24); lVar4 = (long)*(short *)((long)param_2 + lVar3 + 2) * 0x10; param_1[lVar4 + 0xc] = (Edge)((byte)param_1[lVar4 + 0xc] & 0xd8 | 0x24); } } } else { for (uVar5 = 0; uVar5 != uVar1; uVar5 = uVar5 + 1) { uVar6 = (uint)*(ushort *)(this + 6); if (*(ushort *)(this + 6) == 0) { uVar6 = *(int *)(*(long *)(this + 0x10) + 4 + uVar5 * 4) - *(int *)(*(long *)(this + 0x10) + uVar5 * 4); } if (uVar6 == 4) { if (param_3[2] == iVar2) { param_1[(long)param_2[uVar5 * 2] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar5 * 2] * 0x10 + 0xc] & 0xd8 | 0x24); param_1[(long)param_2[uVar5 * 2 + 1] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar5 * 2 + 1] * 0x10 + 0xc] & 0xd8 | 0x24); } } else { lVar3 = 2; while (lVar3 < (int)(uVar6 - 2)) { if (param_3[lVar3] == iVar2) { if (param_3[lVar3 + -1] == param_3[1]) { param_1[(long)param_2[uVar5 * 2] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar5 * 2] * 0x10 + 0xc] & 0xd8 | 0x24); } lVar4 = lVar3 + 1; lVar3 = lVar3 + 1; if (param_3[lVar4] == param_3[(int)(uVar6 - 1)]) { param_1[(long)param_2[uVar5 * 2 + 1] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar5 * 2 + 1] * 0x10 + 0xc] & 0xd8 | 0x24); } } else { lVar3 = lVar3 + 1; } } } param_3 = param_3 + (int)uVar6; } } } return; }
17,152
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp
void UnorderedSubset::markDuplicateEdges(Edge* edges, short* feEdges, Index const* fvIndices) const { // The edge assignment thus far does not correctly detect the presence // of all edges repeated or duplicated in the same face, e.g. for quad // with vertices {A, B, A, C} the edge AB occurs both as AB and BA. // When the face is oriented relative to corner B, we have {B, A, C, A} // and edge BA will be detected as non-manifold -- but not from corner // A or C. // // So look for repeated instances of the corner vertex in the face and // inspect its neighbors to see if they match the leading or trailing // edges. // // This is a trivial test for a quad: if the opposite vertex matches // the corner vertex, both the leading and trailing edges will be // duplicated and so can immediately be marked non-manifold. So deal // with the common case of all neighboring quads separately. if (_vdesc.commonFaceSize == 3) return; Index vCorner = fvIndices[0]; int numFaces = _vdesc.numFaces; if (_vdesc.commonFaceSize == 4) { Index const* fvOpposite = fvIndices + 2; for (int face = 0; face < numFaces; ++face, fvOpposite += 4) { if (*fvOpposite == vCorner) { edges[feEdges[2 * face]].setDuplicate(); edges[feEdges[2 * face + 1]].setDuplicate(); } } } else { Index const* fv = fvIndices; for (int face = 0; face < numFaces; ++face) { int faceSize = _vdesc.getFaceSize(face); if (faceSize == 4) { if (fv[2] == vCorner) { edges[feEdges[2 * face]].setDuplicate(); edges[feEdges[2 * face + 1]].setDuplicate(); } } else { for (int j = 2; j < (faceSize - 2); ++j) { if (fv[j] == vCorner) { if (fv[j - 1] == fv[1]) edges[feEdges[2 * face]].setDuplicate(); if (fv[j + 1] == fv[faceSize - 1]) edges[feEdges[2 * face + 1]].setDuplicate(); } } } fv += faceSize; } } }
O3
cpp
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const: movzwl 0x6(%rdi), %r9d cmpw $0x3, %r9w je 0xb36f9 movl (%rcx), %eax movzwl 0x4(%rdi), %r8d cmpw $0x4, %r9w jne 0xb36fa testq %r8, %r8 je 0xb36f9 shll $0x2, %r8d xorl %edi, %edi cmpl %eax, 0x8(%rcx,%rdi,4) jne 0xb36f0 movswq (%rdx,%rdi), %r9 shlq $0x4, %r9 movb 0xc(%rsi,%r9), %r10b andb $-0x28, %r10b orb $0x24, %r10b movb %r10b, 0xc(%rsi,%r9) movswq 0x2(%rdx,%rdi), %r9 shlq $0x4, %r9 movb 0xc(%rsi,%r9), %r10b andb $-0x28, %r10b orb $0x24, %r10b movb %r10b, 0xc(%rsi,%r9) addq $0x4, %rdi cmpq %rdi, %r8 jne 0xb36b3 retq testq %r8, %r8 je 0xb36f9 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx xorl %r9d, %r9d movzwl 0x6(%rdi), %r10d testl %r10d, %r10d jne 0xb3723 movq 0x10(%rdi), %r11 movl 0x4(%r11,%r9,4), %r10d subl (%r11,%r9,4), %r10d cmpl $0x4, %r10d jne 0xb3767 cmpl %eax, 0x8(%rcx) jne 0xb37e1 movswq (%rdx,%r9,4), %r11 shlq $0x4, %r11 movb 0xc(%rsi,%r11), %bl andb $-0x28, %bl orb $0x24, %bl movb %bl, 0xc(%rsi,%r11) movswq 0x2(%rdx,%r9,4), %r11 shlq $0x4, %r11 movb 0xc(%rsi,%r11), %bl andb $-0x28, %bl orb $0x24, %bl movb %bl, 0xc(%rsi,%r11) jmp 0xb37e1 jle 0xb37e1 leal -0x2(%r10), %r11d leaq (%r9,%r9), %rbx leal -0x1(%r10), %r14d leaq 0x1(,%r9,2), %r15 movl $0x2, %r12d cmpl %eax, (%rcx,%r12,4) jne 0xb37d9 movl -0x4(%rcx,%r12,4), %ebp cmpl 0x4(%rcx), %ebp jne 0xb37ae movswq (%rdx,%rbx,2), %r13 shlq $0x4, %r13 movb 0xc(%rsi,%r13), %bpl andb $-0x28, %bpl orb $0x24, %bpl movb %bpl, 0xc(%rsi,%r13) movl 0x4(%rcx,%r12,4), %ebp incq %r12 cmpl (%rcx,%r14,4), %ebp jne 0xb37dc movswq (%rdx,%r15,2), %r13 shlq $0x4, %r13 movb 0xc(%rsi,%r13), %bpl andb $-0x28, %bpl orb $0x24, %bpl movb %bpl, 0xc(%rsi,%r13) jmp 0xb37dc incq %r12 cmpq %r11, %r12 jne 0xb3783 movslq %r10d, %r10 leaq (%rcx,%r10,4), %rcx incq %r9 cmpq %r8, %r9 jne 0xb370c popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset18markDuplicateEdgesEPNS2_4EdgeEPsPKi: movzx r9d, word ptr [rdi+6] cmp r9w, 3 jz short locret_B36F9 mov eax, [rcx] movzx r8d, word ptr [rdi+4] cmp r9w, 4 jnz short loc_B36FA test r8, r8 jz short locret_B36F9 shl r8d, 2 xor edi, edi loc_B36B3: cmp [rcx+rdi*4+8], eax jnz short loc_B36F0 movsx r9, word ptr [rdx+rdi] shl r9, 4 mov r10b, [rsi+r9+0Ch] and r10b, 0D8h or r10b, 24h mov [rsi+r9+0Ch], r10b movsx r9, word ptr [rdx+rdi+2] shl r9, 4 mov r10b, [rsi+r9+0Ch] and r10b, 0D8h or r10b, 24h mov [rsi+r9+0Ch], r10b loc_B36F0: add rdi, 4 cmp r8, rdi jnz short loc_B36B3 locret_B36F9: retn loc_B36FA: test r8, r8 jz short locret_B36F9 push rbp push r15 push r14 push r13 push r12 push rbx xor r9d, r9d loc_B370C: movzx r10d, word ptr [rdi+6] test r10d, r10d jnz short loc_B3723 mov r11, [rdi+10h] mov r10d, [r11+r9*4+4] sub r10d, [r11+r9*4] loc_B3723: cmp r10d, 4 jnz short loc_B3767 cmp [rcx+8], eax jnz loc_B37E1 movsx r11, word ptr [rdx+r9*4] shl r11, 4 mov bl, [rsi+r11+0Ch] and bl, 0D8h or bl, 24h mov [rsi+r11+0Ch], bl movsx r11, word ptr [rdx+r9*4+2] shl r11, 4 mov bl, [rsi+r11+0Ch] and bl, 0D8h or bl, 24h mov [rsi+r11+0Ch], bl jmp short loc_B37E1 loc_B3767: jle short loc_B37E1 lea r11d, [r10-2] lea rbx, [r9+r9] lea r14d, [r10-1] lea r15, ds:1[r9*2] mov r12d, 2 loc_B3783: cmp [rcx+r12*4], eax jnz short loc_B37D9 mov ebp, [rcx+r12*4-4] cmp ebp, [rcx+4] jnz short loc_B37AE movsx r13, word ptr [rdx+rbx*2] shl r13, 4 mov bpl, [rsi+r13+0Ch] and bpl, 0D8h or bpl, 24h mov [rsi+r13+0Ch], bpl loc_B37AE: mov ebp, [rcx+r12*4+4] inc r12 cmp ebp, [rcx+r14*4] jnz short loc_B37DC movsx r13, word ptr [rdx+r15*2] shl r13, 4 mov bpl, [rsi+r13+0Ch] and bpl, 0D8h or bpl, 24h mov [rsi+r13+0Ch], bpl jmp short loc_B37DC loc_B37D9: inc r12 loc_B37DC: cmp r12, r11 jnz short loc_B3783 loc_B37E1: movsxd r10, r10d lea rcx, [rcx+r10*4] inc r9 cmp r9, r8 jnz loc_B370C pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges( OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *this, OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *a2, __int16 *a3, int *a4) { __int16 v4; // r9 int v5; // eax long long v6; // r8 long long v7; // r8 unsigned long long v8; // rdi long long v9; // r9 long long v10; // r9 int v11; // r10d long long v12; // r11 long long v13; // r11 long long v14; // r12 long long v15; // r13 int v16; // ebp long long v17; // r13 v4 = *((_WORD *)this + 3); if ( v4 != 3 ) { v5 = *a4; v6 = *((unsigned __int16 *)this + 2); if ( v4 == 4 ) { if ( *((_WORD *)this + 2) ) { v7 = (unsigned int)(4 * v6); v8 = 0LL; do { if ( a4[v8 + 2] == v5 ) { *((_BYTE *)a2 + 16 * a3[v8 / 2] + 12) = *((_BYTE *)a2 + 16 * a3[v8 / 2] + 12) & 0xD8 | 0x24; v9 = 16LL * a3[v8 / 2 + 1]; *((_BYTE *)a2 + v9 + 12) = *((_BYTE *)a2 + v9 + 12) & 0xD8 | 0x24; } v8 += 4LL; } while ( v7 != v8 ); } } else if ( *((_WORD *)this + 2) ) { v10 = 0LL; do { v11 = *((unsigned __int16 *)this + 3); if ( !*((_WORD *)this + 3) ) v11 = *(_DWORD *)(*((_QWORD *)this + 2) + 4 * v10 + 4) - *(_DWORD *)(*((_QWORD *)this + 2) + 4 * v10); if ( v11 == 4 ) { if ( a4[2] == v5 ) { v12 = 16LL * a3[2 * v10]; *((_BYTE *)a2 + v12 + 12) = *((_BYTE *)a2 + v12 + 12) & 0xD8 | 0x24; v13 = 16LL * a3[2 * v10 + 1]; *((_BYTE *)a2 + v13 + 12) = *((_BYTE *)a2 + v13 + 12) & 0xD8 | 0x24; } } else if ( v11 > 4 ) { v14 = 2LL; do { if ( a4[v14] == v5 ) { if ( a4[v14 - 1] == a4[1] ) { v15 = 16LL * a3[2 * v10]; *((_BYTE *)a2 + v15 + 12) = *((_BYTE *)a2 + v15 + 12) & 0xD8 | 0x24; } v16 = a4[++v14]; if ( v16 == a4[v11 - 1] ) { v17 = 16LL * a3[2 * v10 + 1]; *((_BYTE *)a2 + v17 + 12) = *((_BYTE *)a2 + v17 + 12) & 0xD8 | 0x24; } } else { ++v14; } } while ( v14 != v11 - 2 ); } a4 += v11; ++v10; } while ( v10 != v6 ); } } }
markDuplicateEdges: MOVZX R9D,word ptr [RDI + 0x6] CMP R9W,0x3 JZ 0x001b36f9 MOV EAX,dword ptr [RCX] MOVZX R8D,word ptr [RDI + 0x4] CMP R9W,0x4 JNZ 0x001b36fa TEST R8,R8 JZ 0x001b36f9 SHL R8D,0x2 XOR EDI,EDI LAB_001b36b3: CMP dword ptr [RCX + RDI*0x4 + 0x8],EAX JNZ 0x001b36f0 MOVSX R9,word ptr [RDX + RDI*0x1] SHL R9,0x4 MOV R10B,byte ptr [RSI + R9*0x1 + 0xc] AND R10B,0xd8 OR R10B,0x24 MOV byte ptr [RSI + R9*0x1 + 0xc],R10B MOVSX R9,word ptr [RDX + RDI*0x1 + 0x2] SHL R9,0x4 MOV R10B,byte ptr [RSI + R9*0x1 + 0xc] AND R10B,0xd8 OR R10B,0x24 MOV byte ptr [RSI + R9*0x1 + 0xc],R10B LAB_001b36f0: ADD RDI,0x4 CMP R8,RDI JNZ 0x001b36b3 LAB_001b36f9: RET LAB_001b36fa: TEST R8,R8 JZ 0x001b36f9 PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX XOR R9D,R9D LAB_001b370c: MOVZX R10D,word ptr [RDI + 0x6] TEST R10D,R10D JNZ 0x001b3723 MOV R11,qword ptr [RDI + 0x10] MOV R10D,dword ptr [R11 + R9*0x4 + 0x4] SUB R10D,dword ptr [R11 + R9*0x4] LAB_001b3723: CMP R10D,0x4 JNZ 0x001b3767 CMP dword ptr [RCX + 0x8],EAX JNZ 0x001b37e1 MOVSX R11,word ptr [RDX + R9*0x4] SHL R11,0x4 MOV BL,byte ptr [RSI + R11*0x1 + 0xc] AND BL,0xd8 OR BL,0x24 MOV byte ptr [RSI + R11*0x1 + 0xc],BL MOVSX R11,word ptr [RDX + R9*0x4 + 0x2] SHL R11,0x4 MOV BL,byte ptr [RSI + R11*0x1 + 0xc] AND BL,0xd8 OR BL,0x24 MOV byte ptr [RSI + R11*0x1 + 0xc],BL JMP 0x001b37e1 LAB_001b3767: JLE 0x001b37e1 LEA R11D,[R10 + -0x2] LEA RBX,[R9 + R9*0x1] LEA R14D,[R10 + -0x1] LEA R15,[0x1 + R9*0x2] MOV R12D,0x2 LAB_001b3783: CMP dword ptr [RCX + R12*0x4],EAX JNZ 0x001b37d9 MOV EBP,dword ptr [RCX + R12*0x4 + -0x4] CMP EBP,dword ptr [RCX + 0x4] JNZ 0x001b37ae MOVSX R13,word ptr [RDX + RBX*0x2] SHL R13,0x4 MOV BPL,byte ptr [RSI + R13*0x1 + 0xc] AND BPL,0xd8 OR BPL,0x24 MOV byte ptr [RSI + R13*0x1 + 0xc],BPL LAB_001b37ae: MOV EBP,dword ptr [RCX + R12*0x4 + 0x4] INC R12 CMP EBP,dword ptr [RCX + R14*0x4] JNZ 0x001b37dc MOVSX R13,word ptr [RDX + R15*0x2] SHL R13,0x4 MOV BPL,byte ptr [RSI + R13*0x1 + 0xc] AND BPL,0xd8 OR BPL,0x24 MOV byte ptr [RSI + R13*0x1 + 0xc],BPL JMP 0x001b37dc LAB_001b37d9: INC R12 LAB_001b37dc: CMP R12,R11 JNZ 0x001b3783 LAB_001b37e1: MOVSXD R10,R10D LEA RCX,[RCX + R10*0x4] INC R9 CMP R9,R8 JNZ 0x001b370c POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const */ void __thiscall OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges (UnorderedSubset *this,Edge *param_1,short *param_2,int *param_3) { ushort uVar1; int iVar2; long lVar3; ulong uVar4; long lVar5; ulong uVar6; uint uVar7; ulong uVar8; if (*(short *)(this + 6) != 3) { iVar2 = *param_3; uVar1 = *(ushort *)(this + 4); uVar4 = (ulong)uVar1; if (*(short *)(this + 6) == 4) { if (uVar4 != 0) { lVar3 = 0; do { if (param_3[lVar3 + 2] == iVar2) { lVar5 = (long)*(short *)((long)param_2 + lVar3) * 0x10; param_1[lVar5 + 0xc] = (Edge)((byte)param_1[lVar5 + 0xc] & 0xd8 | 0x24); lVar5 = (long)*(short *)((long)param_2 + lVar3 + 2) * 0x10; param_1[lVar5 + 0xc] = (Edge)((byte)param_1[lVar5 + 0xc] & 0xd8 | 0x24); } lVar3 = lVar3 + 4; } while ((ulong)uVar1 * 4 != lVar3); } } else if (uVar4 != 0) { uVar6 = 0; do { uVar7 = (uint)*(ushort *)(this + 6); if (*(ushort *)(this + 6) == 0) { uVar7 = *(int *)(*(long *)(this + 0x10) + 4 + uVar6 * 4) - *(int *)(*(long *)(this + 0x10) + uVar6 * 4); } if (uVar7 == 4) { if (param_3[2] == iVar2) { param_1[(long)param_2[uVar6 * 2] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar6 * 2] * 0x10 + 0xc] & 0xd8 | 0x24); param_1[(long)param_2[uVar6 * 2 + 1] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar6 * 2 + 1] * 0x10 + 0xc] & 0xd8 | 0x24); } } else if (4 < (int)uVar7) { uVar8 = 2; do { if (param_3[uVar8] == iVar2) { if (param_3[uVar8 - 1] == param_3[1]) { param_1[(long)param_2[uVar6 * 2] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar6 * 2] * 0x10 + 0xc] & 0xd8 | 0x24); } if (param_3[uVar8 + 1] == param_3[uVar7 - 1]) { param_1[(long)param_2[uVar6 * 2 + 1] * 0x10 + 0xc] = (Edge)((byte)param_1[(long)param_2[uVar6 * 2 + 1] * 0x10 + 0xc] & 0xd8 | 0x24); } } uVar8 = uVar8 + 1; } while (uVar8 != uVar7 - 2); } param_3 = param_3 + (int)uVar7; uVar6 = uVar6 + 1; } while (uVar6 != uVar4); return; } } return; }
17,153
stbi__high_bit(unsigned int)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static int stbi__high_bit(unsigned int z) { int n=0; if (z == 0) return -1; if (z >= 0x10000) { n += 16; z >>= 16; } if (z >= 0x00100) { n += 8; z >>= 8; } if (z >= 0x00010) { n += 4; z >>= 4; } if (z >= 0x00004) { n += 2; z >>= 2; } if (z >= 0x00002) { n += 1;/* >>= 1;*/ } return n; }
O2
c
stbi__high_bit(unsigned int): testl %edi, %edi je 0x3f3d1 movl %edi, %eax shrl $0x10, %eax xorl %ecx, %ecx cmpl $0x10000, %edi # imm = 0x10000 setae %cl cmovbl %edi, %eax shll $0x4, %ecx leal 0x8(%rcx), %edx movl %eax, %esi shrl $0x8, %esi cmpl $0x100, %eax # imm = 0x100 cmovbl %eax, %esi cmovbl %ecx, %edx leal 0x4(%rdx), %ecx movl %esi, %edi shrl $0x4, %edi cmpl $0x10, %esi cmovbl %esi, %edi cmovbl %edx, %ecx leal 0x2(%rcx), %eax movl %edi, %edx shrl $0x2, %edx cmpl $0x4, %edi cmovbl %edi, %edx cmovbl %ecx, %eax cmpl $0x2, %edx sbbl $-0x1, %eax retq pushq $-0x1 popq %rax retq
_ZL14stbi__high_bitj: test edi, edi jz short loc_3F3D1 mov eax, edi shr eax, 10h xor ecx, ecx cmp edi, 10000h setnb cl cmovb eax, edi shl ecx, 4 lea edx, [rcx+8] mov esi, eax shr esi, 8 cmp eax, 100h cmovb esi, eax cmovb edx, ecx lea ecx, [rdx+4] mov edi, esi shr edi, 4 cmp esi, 10h cmovb edi, esi cmovb ecx, edx lea eax, [rcx+2] mov edx, edi shr edx, 2 cmp edi, 4 cmovb edx, edi cmovb eax, ecx cmp edx, 2 sbb eax, 0FFFFFFFFh retn loc_3F3D1: push 0FFFFFFFFFFFFFFFFh pop rax retn
long long stbi__high_bit(unsigned int a1) { unsigned int v1; // eax int v2; // edx unsigned int v3; // esi int v4; // ecx unsigned int v5; // edi int v6; // eax unsigned int v7; // edx if ( !a1 ) return -1LL; v1 = HIWORD(a1); if ( a1 < 0x10000 ) v1 = a1; v2 = 16 * (a1 >= 0x10000) + 8; v3 = v1 >> 8; if ( v1 < 0x100 ) { v3 = v1; v2 = 16 * (a1 >= 0x10000); } v4 = v2 + 4; v5 = v3 >> 4; if ( v3 < 0x10 ) { v5 = v3; v4 = v2; } v6 = v4 + 2; v7 = v5 >> 2; if ( v5 < 4 ) { v7 = v5; v6 = v4; } return v6 - ((unsigned int)(v7 < 2) - 1); }
stbi__high_bit: TEST EDI,EDI JZ 0x0013f3d1 MOV EAX,EDI SHR EAX,0x10 XOR ECX,ECX CMP EDI,0x10000 SETNC CL CMOVC EAX,EDI SHL ECX,0x4 LEA EDX,[RCX + 0x8] MOV ESI,EAX SHR ESI,0x8 CMP EAX,0x100 CMOVC ESI,EAX CMOVC EDX,ECX LEA ECX,[RDX + 0x4] MOV EDI,ESI SHR EDI,0x4 CMP ESI,0x10 CMOVC EDI,ESI CMOVC ECX,EDX LEA EAX,[RCX + 0x2] MOV EDX,EDI SHR EDX,0x2 CMP EDI,0x4 CMOVC EDX,EDI CMOVC EAX,ECX CMP EDX,0x2 SBB EAX,-0x1 RET LAB_0013f3d1: PUSH -0x1 POP RAX RET
/* stbi__high_bit(unsigned int) */ ulong stbi__high_bit(uint param_1) { uint uVar1; uint uVar2; int iVar3; int iVar4; if (param_1 == 0) { return 0xffffffffffffffff; } uVar2 = param_1 >> 0x10; if (0xffff >= param_1) { uVar2 = param_1; } iVar3 = (uint)(0xffff < param_1) * 0x10; iVar4 = iVar3 + 8; uVar1 = uVar2 >> 8; if (uVar2 < 0x100) { iVar4 = iVar3; uVar1 = uVar2; } iVar3 = iVar4 + 4; uVar2 = uVar1 >> 4; if (uVar1 < 0x10) { iVar3 = iVar4; uVar2 = uVar1; } iVar4 = iVar3 + 2; uVar1 = uVar2 >> 2; if (uVar2 < 4) { iVar4 = iVar3; uVar1 = uVar2; } return (ulong)((iVar4 + 1) - (uint)(uVar1 < 2)); }
17,154
patricia_node_free
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
INTERNAL void patricia_node_free(node_t* node) { if (!node) return; if (node->type == NODE_TYPE_BRANCH) { for (int i = 0; i < 16; i++) patricia_node_free(node->values.branch.children[i]); if (node->values.branch.value.data) safe_free(node->values.branch.value.data); } else if (node->type == NODE_TYPE_EXTENSION) { if (node->values.extension.path.data) safe_free(node->values.extension.path.data); patricia_node_free(node->values.extension.child); } else if (node->type == NODE_TYPE_LEAF) { if (node->values.leaf.value.data) safe_free(node->values.leaf.value.data); if (node->values.leaf.path.data) safe_free(node->values.leaf.path.data); } safe_free(node); }
O0
c
patricia_node_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x34488 jmp 0x34556 movq -0x8(%rbp), %rax cmpl $0x2, 0x30(%rax) jne 0x344dc movl $0x0, -0xc(%rbp) cmpl $0x10, -0xc(%rbp) jge 0x344bc movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movq 0x38(%rax,%rcx,8), %rdi callq 0x34470 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x34499 movq -0x8(%rbp), %rax cmpq $0x0, 0xc0(%rax) je 0x344da movq -0x8(%rbp), %rax movq 0xc0(%rax), %rdi callq 0x9dbf0 jmp 0x3454d movq -0x8(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x3450d movq -0x8(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x344fe movq -0x8(%rbp), %rax movq 0x40(%rax), %rdi callq 0x9dbf0 movq -0x8(%rbp), %rax movq 0x48(%rax), %rdi callq 0x34470 jmp 0x3454b movq -0x8(%rbp), %rax cmpl $0x0, 0x30(%rax) jne 0x34549 movq -0x8(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x3452f movq -0x8(%rbp), %rax movq 0x50(%rax), %rdi callq 0x9dbf0 movq -0x8(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x34547 movq -0x8(%rbp), %rax movq 0x40(%rax), %rdi callq 0x9dbf0 jmp 0x34549 jmp 0x3454b jmp 0x3454d movq -0x8(%rbp), %rdi callq 0x9dbf0 addq $0x10, %rsp popq %rbp retq nopl (%rax)
patricia_node_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jnz short loc_34488 jmp loc_34556 loc_34488: mov rax, [rbp+var_8] cmp dword ptr [rax+30h], 2 jnz short loc_344DC mov [rbp+var_C], 0 loc_34499: cmp [rbp+var_C], 10h jge short loc_344BC mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] mov rdi, [rax+rcx*8+38h] call patricia_node_free mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_34499 loc_344BC: mov rax, [rbp+var_8] cmp qword ptr [rax+0C0h], 0 jz short loc_344DA mov rax, [rbp+var_8] mov rdi, [rax+0C0h] call safe_free loc_344DA: jmp short loc_3454D loc_344DC: mov rax, [rbp+var_8] cmp dword ptr [rax+30h], 1 jnz short loc_3450D mov rax, [rbp+var_8] cmp qword ptr [rax+40h], 0 jz short loc_344FE mov rax, [rbp+var_8] mov rdi, [rax+40h] call safe_free loc_344FE: mov rax, [rbp+var_8] mov rdi, [rax+48h] call patricia_node_free jmp short loc_3454B loc_3450D: mov rax, [rbp+var_8] cmp dword ptr [rax+30h], 0 jnz short loc_34549 mov rax, [rbp+var_8] cmp qword ptr [rax+50h], 0 jz short loc_3452F mov rax, [rbp+var_8] mov rdi, [rax+50h] call safe_free loc_3452F: mov rax, [rbp+var_8] cmp qword ptr [rax+40h], 0 jz short loc_34547 mov rax, [rbp+var_8] mov rdi, [rax+40h] call safe_free loc_34547: jmp short $+2 loc_34549: jmp short $+2 loc_3454B: jmp short $+2 loc_3454D: mov rdi, [rbp+var_8] call safe_free loc_34556: add rsp, 10h pop rbp retn
long long patricia_node_free(long long a1) { long long result; // rax int i; // [rsp+4h] [rbp-Ch] if ( a1 ) { switch ( *(_DWORD *)(a1 + 48) ) { case 2: for ( i = 0; i < 16; ++i ) patricia_node_free(*(_QWORD *)(a1 + 8LL * i + 56)); if ( *(_QWORD *)(a1 + 192) ) safe_free(*(_QWORD *)(a1 + 192)); break; case 1: if ( *(_QWORD *)(a1 + 64) ) safe_free(*(_QWORD *)(a1 + 64)); patricia_node_free(*(_QWORD *)(a1 + 72)); break; case 0: if ( *(_QWORD *)(a1 + 80) ) safe_free(*(_QWORD *)(a1 + 80)); if ( *(_QWORD *)(a1 + 64) ) safe_free(*(_QWORD *)(a1 + 64)); break; } return safe_free(a1); } return result; }
patricia_node_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x00134488 JMP 0x00134556 LAB_00134488: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x30],0x2 JNZ 0x001344dc MOV dword ptr [RBP + -0xc],0x0 LAB_00134499: CMP dword ptr [RBP + -0xc],0x10 JGE 0x001344bc MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOV RDI,qword ptr [RAX + RCX*0x8 + 0x38] CALL 0x00134470 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00134499 LAB_001344bc: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0xc0],0x0 JZ 0x001344da MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0xc0] CALL 0x0019dbf0 LAB_001344da: JMP 0x0013454d LAB_001344dc: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x0013450d MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001344fe MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x40] CALL 0x0019dbf0 LAB_001344fe: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x48] CALL 0x00134470 JMP 0x0013454b LAB_0013450d: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x30],0x0 JNZ 0x00134549 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x50],0x0 JZ 0x0013452f MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x50] CALL 0x0019dbf0 LAB_0013452f: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00134547 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x40] CALL 0x0019dbf0 LAB_00134547: JMP 0x00134549 LAB_00134549: JMP 0x0013454b LAB_0013454b: JMP 0x0013454d LAB_0013454d: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0019dbf0 LAB_00134556: ADD RSP,0x10 POP RBP RET
void patricia_node_free(long param_1) { int4 local_14; if (param_1 != 0) { if (*(int *)(param_1 + 0x30) == 2) { for (local_14 = 0; local_14 < 0x10; local_14 = local_14 + 1) { patricia_node_free(*(int8 *)(param_1 + 0x38 + (long)local_14 * 8)); } if (*(long *)(param_1 + 0xc0) != 0) { safe_free(*(int8 *)(param_1 + 0xc0)); } } else if (*(int *)(param_1 + 0x30) == 1) { if (*(long *)(param_1 + 0x40) != 0) { safe_free(*(int8 *)(param_1 + 0x40)); } patricia_node_free(*(int8 *)(param_1 + 0x48)); } else if (*(int *)(param_1 + 0x30) == 0) { if (*(long *)(param_1 + 0x50) != 0) { safe_free(*(int8 *)(param_1 + 0x50)); } if (*(long *)(param_1 + 0x40) != 0) { safe_free(*(int8 *)(param_1 + 0x40)); } } safe_free(param_1); } return; }
17,155
patricia_node_free
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
INTERNAL void patricia_node_free(node_t* node) { if (!node) return; if (node->type == NODE_TYPE_BRANCH) { for (int i = 0; i < 16; i++) patricia_node_free(node->values.branch.children[i]); if (node->values.branch.value.data) safe_free(node->values.branch.value.data); } else if (node->type == NODE_TYPE_EXTENSION) { if (node->values.extension.path.data) safe_free(node->values.extension.path.data); patricia_node_free(node->values.extension.child); } else if (node->type == NODE_TYPE_LEAF) { if (node->values.leaf.value.data) safe_free(node->values.leaf.value.data); if (node->values.leaf.path.data) safe_free(node->values.leaf.path.data); } safe_free(node); }
O2
c
patricia_node_free: testq %rdi, %rdi je 0x2ceb1 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x30(%rdi), %eax testl %eax, %eax je 0x2cecb cmpl $0x1, %eax je 0x2ceb2 cmpl $0x2, %eax jne 0x2cef0 xorl %r14d, %r14d cmpq $0x10, %r14 je 0x2cedf movq 0x38(%rbx,%r14,8), %rdi callq 0x2ce7c incq %r14 jmp 0x2ce9c retq movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x2cec0 callq 0x4aff8 movq 0x48(%rbx), %rdi callq 0x2ce7c jmp 0x2cef0 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x2ced9 callq 0x4aff8 movq 0x40(%rbx), %rdi jmp 0x2cee6 movq 0xc0(%rbx), %rdi testq %rdi, %rdi je 0x2cef0 callq 0x4aff8 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x4aff8
patricia_node_free: test rdi, rdi jz short locret_2CEB1 push r14 push rbx push rax mov rbx, rdi mov eax, [rdi+30h] test eax, eax jz short loc_2CECB cmp eax, 1 jz short loc_2CEB2 cmp eax, 2 jnz short loc_2CEF0 xor r14d, r14d loc_2CE9C: cmp r14, 10h jz short loc_2CEDF mov rdi, [rbx+r14*8+38h] call patricia_node_free inc r14 jmp short loc_2CE9C locret_2CEB1: retn loc_2CEB2: mov rdi, [rbx+40h] test rdi, rdi jz short loc_2CEC0 call safe_free loc_2CEC0: mov rdi, [rbx+48h] call patricia_node_free jmp short loc_2CEF0 loc_2CECB: mov rdi, [rbx+50h] test rdi, rdi jz short loc_2CED9 call safe_free loc_2CED9: mov rdi, [rbx+40h] jmp short loc_2CEE6 loc_2CEDF: mov rdi, [rbx+0C0h] loc_2CEE6: test rdi, rdi jz short loc_2CEF0 call safe_free loc_2CEF0: mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp safe_free
long long patricia_node_free(long long a1) { long long result; // rax int v3; // eax long long i; // r14 long long v5; // rdi long long v6; // rdi long long v7; // rdi if ( a1 ) { v3 = *(_DWORD *)(a1 + 48); if ( v3 ) { if ( v3 == 1 ) { v5 = *(_QWORD *)(a1 + 64); if ( v5 ) safe_free(v5); patricia_node_free(*(_QWORD *)(a1 + 72)); return safe_free(a1); } if ( v3 != 2 ) return safe_free(a1); for ( i = 0LL; i != 16; ++i ) patricia_node_free(*(_QWORD *)(a1 + 8 * i + 56)); v7 = *(_QWORD *)(a1 + 192); } else { v6 = *(_QWORD *)(a1 + 80); if ( v6 ) safe_free(v6); v7 = *(_QWORD *)(a1 + 64); } if ( v7 ) safe_free(v7); return safe_free(a1); } return result; }
patricia_node_free: TEST RDI,RDI JZ 0x0012ceb1 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x30] TEST EAX,EAX JZ 0x0012cecb CMP EAX,0x1 JZ 0x0012ceb2 CMP EAX,0x2 JNZ 0x0012cef0 XOR R14D,R14D LAB_0012ce9c: CMP R14,0x10 JZ 0x0012cedf MOV RDI,qword ptr [RBX + R14*0x8 + 0x38] CALL 0x0012ce7c INC R14 JMP 0x0012ce9c LAB_0012ceb1: RET LAB_0012ceb2: MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x0012cec0 CALL 0x0014aff8 LAB_0012cec0: MOV RDI,qword ptr [RBX + 0x48] CALL 0x0012ce7c JMP 0x0012cef0 LAB_0012cecb: MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x0012ced9 CALL 0x0014aff8 LAB_0012ced9: MOV RDI,qword ptr [RBX + 0x40] JMP 0x0012cee6 LAB_0012cedf: MOV RDI,qword ptr [RBX + 0xc0] LAB_0012cee6: TEST RDI,RDI JZ 0x0012cef0 CALL 0x0014aff8 LAB_0012cef0: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0014aff8
void patricia_node_free(long param_1) { int iVar1; long lVar2; if (param_1 == 0) { return; } iVar1 = *(int *)(param_1 + 0x30); if (iVar1 == 0) { if (*(long *)(param_1 + 0x50) != 0) { safe_free(); } lVar2 = *(long *)(param_1 + 0x40); } else { if (iVar1 == 1) { if (*(long *)(param_1 + 0x40) != 0) { safe_free(); } patricia_node_free(*(int8 *)(param_1 + 0x48)); goto LAB_0012cef0; } if (iVar1 != 2) goto LAB_0012cef0; for (lVar2 = 0; lVar2 != 0x10; lVar2 = lVar2 + 1) { patricia_node_free(*(int8 *)(param_1 + 0x38 + lVar2 * 8)); } lVar2 = *(long *)(param_1 + 0xc0); } if (lVar2 != 0) { safe_free(); } LAB_0012cef0: safe_free(param_1); return; }
17,156
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double)
llama.cpp/common/json.hpp
JSON_HEDLEY_NON_NULL(1) void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) { static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3, "internal error: not enough precision"); JSON_ASSERT(std::isfinite(value)); JSON_ASSERT(value > 0); // If the neighbors (and boundaries) of 'value' are always computed for double-precision // numbers, all float's can be recovered using strtod (and strtof). However, the resulting // decimal representations are not exactly "short". // // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars) // says "value is converted to a string as if by std::sprintf in the default ("C") locale" // and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars' // does. // On the other hand, the documentation for 'std::to_chars' requires that "parsing the // representation using the corresponding std::from_chars function recovers value exactly". That // indicates that single precision floating-point numbers should be recovered using // 'std::strtof'. // // NB: If the neighbors are computed for single-precision numbers, there is a single float // (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision // value is off by 1 ulp. #if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if) const boundaries w = compute_boundaries(static_cast<double>(value)); #else const boundaries w = compute_boundaries(value); #endif grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jge 0x7e777 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0x7e793 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 leaq 0x28(%rsp), %r12 movq %r12, %rdi callq 0x7ea30 movq 0x10(%r12), %rcx movl 0x18(%r12), %r8d movups (%r12), %xmm0 movups 0x20(%r12), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x7eb89 addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x9af7a(%rip), %rdi # 0x1196f8 leaq 0x93a76(%rip), %rdx # 0x1121fb leaq 0x9c378(%rip), %rcx # 0x11ab04 movl $0x4589, %esi # imm = 0x4589 jmp 0x7e7ad leaq 0x9af5e(%rip), %rdi # 0x1196f8 leaq 0x93a5a(%rip), %rdx # 0x1121fb leaq 0x9c475(%rip), %rcx # 0x11ac1d movl $0x458a, %esi # imm = 0x458A xorl %eax, %eax callq 0x20e60
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2IdEEvPcRiS5_T_: push r15 push r14 push r12 push rbx sub rsp, 58h movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jge short loc_7E777 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jbe short loc_7E793 mov rbx, rdx mov r14, rsi mov r15, rdi lea r12, [rsp+78h+var_50] mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) mov rcx, [r12+10h] mov r8d, [r12+18h] movups xmm0, xmmword ptr [r12] movups xmm1, xmmword ptr [r12+20h] movups [rsp+78h+var_68], xmm1 movups [rsp+78h+var_78], xmm0 mov rdi, r15 mov rsi, r14 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn loc_7E777: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsfiniteVal; "std::isfinite(value)" mov esi, 4589h jmp short loc_7E7AD loc_7E793: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValue0; "value > 0" mov esi, 458Ah loc_7E7AD: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>( long long a1, long long a2, long long a3, double a4) { long long v5; // r9 char *v7; // rsi int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d _QWORD v12[3]; // [rsp+28h] [rbp-50h] BYREF unsigned int v13; // [rsp+40h] [rbp-38h] long long v14; // [rsp+48h] [rbp-30h] long long v15; // [rsp+50h] [rbp-28h] if ( (*(_QWORD *)&a4 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) { v7 = (_BYTE *)(&stru_4578 + 17); ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 17801LL, "GGML_ASSERT(%s) failed", "std::isfinite(value)"); } else { if ( a4 > 0.0 ) { nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(v12); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( a1, a2, a3, v12[2], v13, v5, v12[0], v12[1], v14, v15); } v7 = (_BYTE *)(&stru_4578 + 18); ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 17802LL, "GGML_ASSERT(%s) failed", "value > 0"); } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v7, v8, v9, v10, v11); }
grisu2<double>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JGE 0x0017e777 XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x0017e793 MOV RBX,RDX MOV R14,RSI MOV R15,RDI LEA R12,[RSP + 0x28] MOV RDI,R12 CALL 0x0017ea30 MOV RCX,qword ptr [R12 + 0x10] MOV R8D,dword ptr [R12 + 0x18] MOVUPS XMM0,xmmword ptr [R12] MOVUPS XMM1,xmmword ptr [R12 + 0x20] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0017eb89 ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET LAB_0017e777: LEA RDI,[0x2196f8] LEA RDX,[0x2121fb] LEA RCX,[0x21ab04] MOV ESI,0x4589 JMP 0x0017e7ad LAB_0017e793: LEA RDI,[0x2196f8] LEA RDX,[0x2121fb] LEA RCX,[0x21ac1d] MOV ESI,0x458a LAB_0017e7ad: XOR EAX,EAX CALL 0x00120e60
/* void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double> (char *param_1,int *param_2,int *param_3,double param_4) { char *pcVar1; int8 uVar2; int8 in_R9; int4 local_50 [2]; int4 uStack_48; int8 local_40; int4 local_38; int4 local_30; int4 uStack_28; if ((ulong)ABS(param_4) < 0x7ff0000000000000) { if (0.0 < param_4) { compute_boundaries<double>((dtoa_impl *)local_50,param_4); grisu2(param_1,param_2,param_3,local_40,local_38,in_R9,local_50[0],uStack_48,local_30, uStack_28); return; } pcVar1 = "value > 0"; uVar2 = 0x458a; } else { pcVar1 = "std::isfinite(value)"; uVar2 = 0x4589; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar2, "GGML_ASSERT(%s) failed",pcVar1); }
17,157
js_async_function_resume
bluesky950520[P]quickjs/quickjs.c
static void js_async_function_resume(JSContext *ctx, JSAsyncFunctionData *s) { JSValue func_ret, ret2; func_ret = async_func_resume(ctx, &s->func_state); if (JS_IsException(func_ret)) { JSValue error; fail: error = JS_GetException(ctx); ret2 = JS_Call(ctx, s->resolving_funcs[1], JS_UNDEFINED, 1, &error); JS_FreeValue(ctx, error); js_async_function_terminate(ctx->rt, s); JS_FreeValue(ctx, ret2); /* XXX: what to do if exception ? */ } else { JSValue value; value = s->func_state.frame.cur_sp[-1]; s->func_state.frame.cur_sp[-1] = JS_UNDEFINED; if (JS_IsUndefined(func_ret)) { /* function returned */ ret2 = JS_Call(ctx, s->resolving_funcs[0], JS_UNDEFINED, 1, &value); JS_FreeValue(ctx, ret2); /* XXX: what to do if exception ? */ JS_FreeValue(ctx, value); js_async_function_terminate(ctx->rt, s); } else { JSValue promise, resolving_funcs[2], resolving_funcs1[2]; int i, res; /* await */ JS_FreeValue(ctx, func_ret); /* not used */ promise = js_promise_resolve(ctx, ctx->promise_ctor, 1, &value, 0); JS_FreeValue(ctx, value); if (JS_IsException(promise)) goto fail; if (js_async_function_resolve_create(ctx, s, resolving_funcs)) { JS_FreeValue(ctx, promise); goto fail; } /* Note: no need to create 'thrownawayCapability' as in the spec */ for(i = 0; i < 2; i++) resolving_funcs1[i] = JS_UNDEFINED; res = perform_promise_then(ctx, promise, resolving_funcs, resolving_funcs1); JS_FreeValue(ctx, promise); for(i = 0; i < 2; i++) JS_FreeValue(ctx, resolving_funcs[i]); if (res) goto fail; } } }
O2
c
js_async_function_resume: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, %rbx addq $0x40, %rsi callq 0x3e977 movl %edx, %ecx cmpq $0x6, %rcx jne 0x4b0ba movq 0x18(%rbx), %rax movups 0xf0(%rax), %xmm0 andl $0x0, 0xf0(%rax) movq $0x4, 0xf8(%rax) leaq 0x40(%rsp), %r13 movaps %xmm0, (%r13) movq 0x28(%r14), %rsi movq 0x30(%r14), %rdx movq %r13, (%rsp) pushq $0x3 popq %r8 pushq $0x1 popq %r9 movq %rbx, %rdi xorl %ecx, %ecx callq 0x25a66 movq %rax, %r15 movq %rdx, %r12 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi callq 0x1bbce movq 0x18(%rbx), %rdi movq %r14, %rsi callq 0x4ab6b movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1bbce jmp 0x4b124 movq 0xa0(%r14), %rsi movups -0x10(%rsi), %xmm0 movaps %xmm0, 0x30(%rsp) andl $0x0, -0x10(%rsi) movq $0x3, -0x8(%rsi) cmpl $0x3, %ecx jne 0x4b133 movq 0x18(%r14), %rsi movq 0x20(%r14), %rdx leaq 0x30(%rsp), %r15 movq %r15, (%rsp) pushq $0x3 popq %r8 pushq $0x1 popq %r9 movq %rbx, %rdi xorl %ecx, %ecx callq 0x25a66 movq %rbx, %rdi movq %rax, %rsi callq 0x1bbce movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi callq 0x1bbce movq 0x18(%rbx), %rdi movq %r14, %rsi callq 0x4ab6b addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movq %rax, %rsi callq 0x1bbce movq 0x88(%rbx), %rsi movq 0x90(%rbx), %rdx leaq 0x30(%rsp), %r13 movq %rbx, %rdi movq %r13, %r8 xorl %r9d, %r9d callq 0x4b251 movq %rax, %r12 movq %rdx, %r15 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi callq 0x1bbce cmpl $0x6, %r15d je 0x4b043 pushq $0x35 popq %rbp xorl %r13d, %r13d cmpq $0x20, %r13 je 0x4b1bb movq 0x48(%rbx), %rsi movq 0x50(%rbx), %rdx movq %rbx, %rdi movl %ebp, %ecx callq 0x1ec19 movq %rax, 0x10(%rsp,%r13) movq %rdx, 0x18(%rsp,%r13) cmpl $0x6, %edx je 0x4b226 incl (%r14) movq %r14, 0x30(%rax) addq $0x10, %r13 incl %ebp jmp 0x4b185 leaq 0x50(%rsp), %r8 andl $0x0, (%r8) pushq $0x3 popq %rax movq %rax, 0x8(%r8) andl $0x0, 0x10(%r8) movq %rax, 0x18(%r8) leaq 0x10(%rsp), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x3f781 movl %eax, %ebp movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1bbce pushq $0x8 popq %r15 cmpq $0x28, %r15 je 0x4b219 movq 0x8(%rsp,%r15), %rsi movq 0x10(%rsp,%r15), %rdx movq %rbx, %rdi callq 0x1bbce addq $0x10, %r15 jmp 0x4b1fb testl %ebp, %ebp jne 0x4b043 jmp 0x4b124 cmpq $0x10, %r13 jne 0x4b23e movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %rbx, %rdi callq 0x1bbce movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1bbce jmp 0x4b043
js_async_function_resume: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi mov rbx, rdi add rsi, 40h ; '@' call async_func_resume mov ecx, edx cmp rcx, 6 jnz short loc_4B0BA loc_4B043: mov rax, [rbx+18h] movups xmm0, xmmword ptr [rax+0F0h] and dword ptr [rax+0F0h], 0 mov qword ptr [rax+0F8h], 4 lea r13, [rsp+0A8h+var_68] movaps xmmword ptr [r13+0], xmm0 mov rsi, [r14+28h] mov rdx, [r14+30h] mov [rsp+0A8h+var_A8], r13 push 3 pop r8 push 1 pop r9 mov rdi, rbx xor ecx, ecx call JS_Call mov r15, rax mov r12, rdx mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx call JS_FreeValue mov rdi, [rbx+18h] mov rsi, r14 call js_async_function_terminate mov rdi, rbx mov rsi, r15 mov rdx, r12 call JS_FreeValue jmp short loc_4B124 loc_4B0BA: mov rsi, [r14+0A0h] movups xmm0, xmmword ptr [rsi-10h] movaps [rsp+0A8h+var_78], xmm0 and dword ptr [rsi-10h], 0 mov qword ptr [rsi-8], 3 cmp ecx, 3 jnz short loc_4B133 mov rsi, [r14+18h] mov rdx, [r14+20h] lea r15, [rsp+0A8h+var_78] mov [rsp+0A8h+var_A8], r15 push 3 pop r8 push 1 pop r9 mov rdi, rbx xor ecx, ecx call JS_Call mov rdi, rbx mov rsi, rax call JS_FreeValue mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx call JS_FreeValue mov rdi, [rbx+18h] mov rsi, r14 call js_async_function_terminate loc_4B124: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4B133: mov rdi, rbx mov rsi, rax call JS_FreeValue mov rsi, [rbx+88h] mov rdx, [rbx+90h] lea r13, [rsp+0A8h+var_78] mov rdi, rbx mov r8, r13 xor r9d, r9d call js_promise_resolve mov r12, rax mov r15, rdx mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx call JS_FreeValue cmp r15d, 6 jz loc_4B043 push 35h ; '5' pop rbp xor r13d, r13d loc_4B185: cmp r13, 20h ; ' ' jz short loc_4B1BB mov rsi, [rbx+48h] mov rdx, [rbx+50h] mov rdi, rbx mov ecx, ebp call JS_NewObjectProtoClass mov [rsp+r13+0A8h+var_98], rax mov [rsp+r13+0A8h+var_90], rdx cmp edx, 6 jz short loc_4B226 inc dword ptr [r14] mov [rax+30h], r14 add r13, 10h inc ebp jmp short loc_4B185 loc_4B1BB: lea r8, [rsp+0A8h+var_58] and dword ptr [r8], 0 push 3 pop rax mov [r8+8], rax and dword ptr [r8+10h], 0 mov [r8+18h], rax lea rcx, [rsp+0A8h+var_98] mov rdi, rbx mov rsi, r12 mov rdx, r15 call perform_promise_then mov ebp, eax mov rdi, rbx mov rsi, r12 mov rdx, r15 call JS_FreeValue push 8 pop r15 loc_4B1FB: cmp r15, 28h ; '(' jz short loc_4B219 mov rsi, [rsp+r15+0A8h+var_A0] mov rdx, [rsp+r15+0A8h+var_98] mov rdi, rbx call JS_FreeValue add r15, 10h jmp short loc_4B1FB loc_4B219: test ebp, ebp jnz loc_4B043 jmp loc_4B124 loc_4B226: cmp r13, 10h jnz short loc_4B23E mov rsi, [rsp+0A8h+var_98] mov rdx, [rsp+0A8h+var_90] mov rdi, rbx call JS_FreeValue loc_4B23E: mov rdi, rbx mov rsi, r12 mov rdx, r15 call JS_FreeValue jmp loc_4B043
long long js_async_function_resume( long long *a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long v15; // rax long long v16; // rdx long long v17; // rax __int128 v18; // xmm0 long long v19; // r15 long long v20; // rdx long long v21; // r12 long long result; // rax long long v23; // rsi long long v24; // rax long long v25; // rdx long long v26; // rcx long long v27; // r12 long long v28; // rdx long long v29; // r15 unsigned int v30; // ebp long long i; // r13 long long v32; // rax long long v33; // rdx int v34; // ebp long long j; // r15 long long v36; // [rsp+8h] [rbp-A0h] long long v37; // [rsp+10h] [rbp-98h] BYREF long long v38[3]; // [rsp+18h] [rbp-90h] __int128 v39; // [rsp+30h] [rbp-78h] BYREF __int128 v40; // [rsp+40h] [rbp-68h] BYREF int v41; // [rsp+50h] [rbp-58h] BYREF long long v42; // [rsp+58h] [rbp-50h] int v43; // [rsp+60h] [rbp-48h] long long v44; // [rsp+68h] [rbp-40h] v15 = async_func_resume((long long)a1, a2 + 64, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( (unsigned int)v16 == 6LL ) goto LABEL_2; v23 = *(_QWORD *)(a2 + 160); v39 = *(_OWORD *)(v23 - 16); *(_DWORD *)(v23 - 16) = 0; *(_QWORD *)(v23 - 8) = 3LL; if ( (_DWORD)v16 == 3 ) { v24 = JS_Call((int)a1, *(_QWORD *)(a2 + 24), *(_QWORD *)(a2 + 32), 0, 3, 1, (long long)&v39); JS_FreeValue((long long)a1, v24, v25); JS_FreeValue((long long)a1, v39, *((long long *)&v39 + 1)); return js_async_function_terminate(a1[3], a2); } else { JS_FreeValue((long long)a1, v15, v16); v27 = js_promise_resolve(a1, a1[17], a1[18], v26, &v39, 0LL); v29 = v28; JS_FreeValue((long long)a1, v39, *((long long *)&v39 + 1)); if ( (_DWORD)v29 == 6 ) { LABEL_2: v17 = a1[3]; v18 = *(_OWORD *)(v17 + 240); *(_DWORD *)(v17 + 240) = 0; *(_QWORD *)(v17 + 248) = 4LL; v40 = v18; v19 = JS_Call((int)a1, *(_QWORD *)(a2 + 40), *(_QWORD *)(a2 + 48), 0, 3, 1, (long long)&v40); v21 = v20; JS_FreeValue((long long)a1, v40, *((long long *)&v40 + 1)); js_async_function_terminate(a1[3], a2); return JS_FreeValue((long long)a1, v19, v21); } v30 = 53; for ( i = 0LL; i != 4; i += 2LL ) { v32 = JS_NewObjectProtoClass((long long)a1, a1[9], a1[10], v30); v38[i - 1] = v32; v38[i] = v33; if ( (_DWORD)v33 == 6 ) { if ( i == 2 ) JS_FreeValue((long long)a1, v37, v38[0]); JS_FreeValue((long long)a1, v27, v29); goto LABEL_2; } ++*(_DWORD *)a2; *(_QWORD *)(v32 + 48) = a2; ++v30; } v41 = 0; v42 = 3LL; v43 = 0; v44 = 3LL; v34 = perform_promise_then((long long)a1, v27, v29, (long long)&v37, (long long)&v41); result = JS_FreeValue((long long)a1, v27, v29); for ( j = 1LL; j != 5; j += 2LL ) result = JS_FreeValue((long long)a1, *(long long *)((char *)&v36 + j * 8), v38[j - 1]); if ( v34 ) goto LABEL_2; } return result; }
js_async_function_resume: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV RBX,RDI ADD RSI,0x40 CALL 0x0013e977 MOV ECX,EDX CMP RCX,0x6 JNZ 0x0014b0ba LAB_0014b043: MOV RAX,qword ptr [RBX + 0x18] MOVUPS XMM0,xmmword ptr [RAX + 0xf0] AND dword ptr [RAX + 0xf0],0x0 MOV qword ptr [RAX + 0xf8],0x4 LEA R13,[RSP + 0x40] MOVAPS xmmword ptr [R13],XMM0 MOV RSI,qword ptr [R14 + 0x28] MOV RDX,qword ptr [R14 + 0x30] MOV qword ptr [RSP],R13 PUSH 0x3 POP R8 PUSH 0x1 POP R9 MOV RDI,RBX XOR ECX,ECX CALL 0x00125a66 MOV R15,RAX MOV R12,RDX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX CALL 0x0011bbce MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 CALL 0x0014ab6b MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 CALL 0x0011bbce JMP 0x0014b124 LAB_0014b0ba: MOV RSI,qword ptr [R14 + 0xa0] MOVUPS XMM0,xmmword ptr [RSI + -0x10] MOVAPS xmmword ptr [RSP + 0x30],XMM0 AND dword ptr [RSI + -0x10],0x0 MOV qword ptr [RSI + -0x8],0x3 CMP ECX,0x3 JNZ 0x0014b133 MOV RSI,qword ptr [R14 + 0x18] MOV RDX,qword ptr [R14 + 0x20] LEA R15,[RSP + 0x30] MOV qword ptr [RSP],R15 PUSH 0x3 POP R8 PUSH 0x1 POP R9 MOV RDI,RBX XOR ECX,ECX CALL 0x00125a66 MOV RDI,RBX MOV RSI,RAX CALL 0x0011bbce MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x0011bbce MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 CALL 0x0014ab6b LAB_0014b124: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014b133: MOV RDI,RBX MOV RSI,RAX CALL 0x0011bbce MOV RSI,qword ptr [RBX + 0x88] MOV RDX,qword ptr [RBX + 0x90] LEA R13,[RSP + 0x30] MOV RDI,RBX MOV R8,R13 XOR R9D,R9D CALL 0x0014b251 MOV R12,RAX MOV R15,RDX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX CALL 0x0011bbce CMP R15D,0x6 JZ 0x0014b043 PUSH 0x35 POP RBP XOR R13D,R13D LAB_0014b185: CMP R13,0x20 JZ 0x0014b1bb MOV RSI,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] MOV RDI,RBX MOV ECX,EBP CALL 0x0011ec19 MOV qword ptr [RSP + R13*0x1 + 0x10],RAX MOV qword ptr [RSP + R13*0x1 + 0x18],RDX CMP EDX,0x6 JZ 0x0014b226 INC dword ptr [R14] MOV qword ptr [RAX + 0x30],R14 ADD R13,0x10 INC EBP JMP 0x0014b185 LAB_0014b1bb: LEA R8,[RSP + 0x50] AND dword ptr [R8],0x0 PUSH 0x3 POP RAX MOV qword ptr [R8 + 0x8],RAX AND dword ptr [R8 + 0x10],0x0 MOV qword ptr [R8 + 0x18],RAX LEA RCX,[RSP + 0x10] MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 CALL 0x0013f781 MOV EBP,EAX MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 CALL 0x0011bbce PUSH 0x8 POP R15 LAB_0014b1fb: CMP R15,0x28 JZ 0x0014b219 MOV RSI,qword ptr [RSP + R15*0x1 + 0x8] MOV RDX,qword ptr [RSP + R15*0x1 + 0x10] MOV RDI,RBX CALL 0x0011bbce ADD R15,0x10 JMP 0x0014b1fb LAB_0014b219: TEST EBP,EBP JNZ 0x0014b043 JMP 0x0014b124 LAB_0014b226: CMP R13,0x10 JNZ 0x0014b23e MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RDI,RBX CALL 0x0011bbce LAB_0014b23e: MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 CALL 0x0011bbce JMP 0x0014b043
/* WARNING: Type propagation algorithm not settling */ void js_async_function_resume(long param_1,int *param_2) { int8 uVar1; int8 uVar2; int iVar3; long lVar4; int1 auVar5 [16]; long alStack_a0 [5]; int4 local_78; int4 uStack_74; int4 uStack_70; int4 uStack_6c; int4 local_68; int4 uStack_64; int4 uStack_60; int4 uStack_5c; int4 local_58; int8 local_50; int4 local_48; int8 local_40; auVar5 = async_func_resume(param_1,param_2 + 0x10); if ((auVar5._8_8_ & 0xffffffff) != 6) { lVar4 = *(long *)(param_2 + 0x28); local_78 = *(int4 *)(lVar4 + -0x10); uStack_74 = *(int4 *)(lVar4 + -0xc); uStack_70 = *(int4 *)(lVar4 + -8); uStack_6c = *(int4 *)(lVar4 + -4); *(int4 *)(lVar4 + -0x10) = 0; *(int8 *)(lVar4 + -8) = 3; if (auVar5._8_4_ == 3) { uVar1 = JS_Call(param_1,*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8),0,3,1, &local_78); JS_FreeValue(param_1,uVar1); JS_FreeValue(param_1,CONCAT44(uStack_74,local_78),CONCAT44(uStack_6c,uStack_70)); js_async_function_terminate(*(int8 *)(param_1 + 0x18),param_2); return; } JS_FreeValue(param_1,auVar5._0_8_); auVar5 = js_promise_resolve(param_1,*(int8 *)(param_1 + 0x88), *(int8 *)(param_1 + 0x90)); uVar2 = auVar5._8_8_; uVar1 = auVar5._0_8_; JS_FreeValue(param_1,CONCAT44(uStack_74,local_78),CONCAT44(uStack_6c,uStack_70)); if (auVar5._8_4_ != 6) { iVar3 = 0x35; for (lVar4 = 0; lVar4 != 0x20; lVar4 = lVar4 + 0x10) { auVar5 = JS_NewObjectProtoClass (param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50), iVar3); *(long *)((long)alStack_a0 + lVar4 + 8U) = auVar5._0_8_; *(long *)((long)alStack_a0 + lVar4 + 0x10U) = auVar5._8_8_; if (auVar5._8_4_ == 6) { if (lVar4 == 0x10) { JS_FreeValue(param_1,alStack_a0[1],alStack_a0[2]); } JS_FreeValue(param_1,uVar1,uVar2); goto LAB_0014b043; } *param_2 = *param_2 + 1; *(int **)(auVar5._0_8_ + 0x30) = param_2; iVar3 = iVar3 + 1; } local_58 = 0; local_50 = 3; local_48 = 0; local_40 = 3; iVar3 = perform_promise_then(param_1,uVar1,uVar2,alStack_a0 + 1); JS_FreeValue(param_1,uVar1,uVar2); for (lVar4 = 8; lVar4 != 0x28; lVar4 = lVar4 + 0x10) { JS_FreeValue(param_1,*(int8 *)((long)alStack_a0 + lVar4), *(int8 *)((long)alStack_a0 + lVar4 + 8U)); } if (iVar3 == 0) { return; } } } LAB_0014b043: lVar4 = *(long *)(param_1 + 0x18); local_68 = *(int4 *)(lVar4 + 0xf0); uStack_64 = *(int4 *)(lVar4 + 0xf4); uStack_60 = *(int4 *)(lVar4 + 0xf8); uStack_5c = *(int4 *)(lVar4 + 0xfc); *(int4 *)(lVar4 + 0xf0) = 0; *(int8 *)(lVar4 + 0xf8) = 4; auVar5 = JS_Call(param_1,*(int8 *)(param_2 + 10),*(int8 *)(param_2 + 0xc),0,3,1, &local_68); JS_FreeValue(param_1,CONCAT44(uStack_64,local_68),CONCAT44(uStack_5c,uStack_60)); js_async_function_terminate(*(int8 *)(param_1 + 0x18),param_2); JS_FreeValue(param_1,auVar5._0_8_,auVar5._8_8_); return; }
17,158
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_array()
monkey531[P]llama/common/json.hpp
bool end_array() { bool keep = true; if (ref_stack.back()) { keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); if (keep) { ref_stack.back()->set_parents(); } else { // discard array *ref_stack.back() = discarded; } } JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(!keep_stack.empty()); ref_stack.pop_back(); keep_stack.pop_back(); // remove discarded value if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->pop_back(); } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_array(): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rdi movq %rdi, 0x10(%rsp) movb $0x1, 0x2f(%rsp) addq $0x8, %rdi callq 0xb07b0 cmpq $0x0, (%rax) je 0xafa72 movq 0x10(%rsp), %rdi movq %rdi, %rax addq $0x80, %rax movq %rax, (%rsp) addq $0x8, %rdi callq 0xb01c0 movq 0x10(%rsp), %rdi subl $0x1, %eax movl %eax, 0xc(%rsp) addq $0x8, %rdi callq 0xb07b0 movq (%rsp), %rdi movl 0xc(%rsp), %esi movq (%rax), %rcx movl $0x3, %edx callq 0xb0160 andb $0x1, %al movb %al, 0x2f(%rsp) testb $0x1, 0x2f(%rsp) je 0xafa35 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xb07b0 movq (%rax), %rdi callq 0xb0f00 jmp 0xafa70 movq 0x10(%rsp), %rsi addq $0xa8, %rsi leaq 0x18(%rsp), %rdi callq 0xb2360 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xb07b0 movq (%rax), %rdi leaq 0x18(%rsp), %rsi callq 0xaabe0 leaq 0x18(%rsp), %rdi callq 0xa19a0 jmp 0xafa72 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xb0c00 testb $0x1, %al jne 0xafa86 jmp 0xafaa7 leaq 0x15ec11(%rip), %rdi # 0x20e69e movl $0x1bf5, %esi # imm = 0x1BF5 leaq 0x15ec4f(%rip), %rdx # 0x20e6e8 leaq 0x15fc1b(%rip), %rcx # 0x20f6bb movb $0x0, %al callq 0x59e90 movq 0x10(%rsp), %rdi addq $0x20, %rdi callq 0xb0040 testb $0x1, %al jne 0xafabb jmp 0xafadc leaq 0x15ebdc(%rip), %rdi # 0x20e69e movl $0x1bf6, %esi # imm = 0x1BF6 leaq 0x15ec1a(%rip), %rdx # 0x20e6e8 leaq 0x15fb60(%rip), %rcx # 0x20f635 movb $0x0, %al callq 0x59e90 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xb2550 movq 0x10(%rsp), %rdi addq $0x20, %rdi callq 0xb0140 testb $0x1, 0x2f(%rsp) jne 0xafb47 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xb0c00 testb $0x1, %al jne 0xafb47 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xb07b0 movq (%rax), %rdi callq 0xb0d00 testb $0x1, %al jne 0xafb2d jmp 0xafb47 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xb07b0 movq (%rax), %rax movq 0x8(%rax), %rdi callq 0xb6640 movb $0x1, %al andb $0x1, %al addq $0x38, %rsp retq
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: sub rsp, 38h mov [rsp+38h+var_8], rdi mov rdi, [rsp+38h+var_8] mov [rsp+38h+var_28], rdi mov [rsp+38h+var_9], 1 add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) cmp qword ptr [rax], 0 jz loc_AFA72 mov rdi, [rsp+38h+var_28] mov rax, rdi add rax, 80h mov [rsp+38h+var_38], rax add rdi, 8 call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::size(void) mov rdi, [rsp+38h+var_28] sub eax, 1 mov [rsp+38h+var_2C], eax add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rdi, [rsp+38h+var_38] mov esi, [rsp+38h+var_2C] mov rcx, [rax] mov edx, 3 call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &) and al, 1 mov [rsp+38h+var_9], al test [rsp+38h+var_9], 1 jz short loc_AFA35 mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rdi, [rax] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; 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>::set_parents(void) jmp short loc_AFA70 loc_AFA35: mov rsi, [rsp+38h+var_28] add rsi, 0A8h lea rdi, [rsp+38h+var_20] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rdi, [rax] lea rsi, [rsp+38h+var_20] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(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>) lea rdi, [rsp+38h+var_20] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json() loc_AFA70: jmp short $+2 loc_AFA72: mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE5emptyEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::empty(void) test al, 1 jnz short loc_AFA86 jmp short loc_AFAA7 loc_AFA86: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1BF5h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov al, 0 call _ggml_abort loc_AFAA7: mov rdi, [rsp+38h+var_28] add rdi, 20h ; ' ' call _ZNKSt6vectorIbSaIbEE5emptyEv; std::vector<bool>::empty(void) test al, 1 jnz short loc_AFABB jmp short loc_AFADC loc_AFABB: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1BF6h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov al, 0 call _ggml_abort loc_AFADC: mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE8pop_backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::pop_back(void) mov rdi, [rsp+38h+var_28] add rdi, 20h ; ' ' call _ZNSt6vectorIbSaIbEE8pop_backEv; std::vector<bool>::pop_back(void) test [rsp+38h+var_9], 1 jnz short loc_AFB47 mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE5emptyEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::empty(void) test al, 1 jnz short loc_AFB47 mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; 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>::is_array(void) test al, 1 jnz short loc_AFB2D jmp short loc_AFB47 loc_AFB2D: mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rax, [rax] mov rdi, [rax+8] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8pop_backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pop_back(void) loc_AFB47: mov al, 1 and al, 1 add rsp, 38h retn
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_array( long long a1) { _QWORD *v1; // rax int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d _QWORD *v6; // rax long long *v7; // rax _QWORD *v8; // rax long long v9; // rax int v11; // [rsp+8h] [rbp-30h] unsigned int v12; // [rsp+Ch] [rbp-2Ch] long long v13; // [rsp+10h] [rbp-28h] _DWORD v14[5]; // [rsp+18h] [rbp-20h] BYREF char v15; // [rsp+2Fh] [rbp-9h] long long v16; // [rsp+30h] [rbp-8h] v16 = a1; v13 = a1; v15 = 1; if ( *(_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8) ) { v12 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::size(a1 + 8) - 1; v1 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8); v15 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()( a1 + 128, v12, 3LL, *v1) & 1; if ( v15 ) { v6 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents(*v6); } else { 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>::basic_json( (unsigned int)v14, a1 + 168, v2, v3, v4, v5, a1 + 128, v11, a1, v14[0], v14[2]); v7 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *v7, (long long)v14); 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>::~basic_json((long long)v14); } } if ( (std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::empty(v13 + 8) & 1) != 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7157LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); if ( (std::vector<bool>::empty(v13 + 32) & 1) != 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7158LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::pop_back(v13 + 8); std::vector<bool>::pop_back(v13 + 32); if ( (v15 & 1) == 0 && (std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::empty(v13 + 8) & 1) == 0 ) { v8 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8); if ( (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>::is_array(*v8) & 1) != 0 ) { v9 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8); std::vector<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>>::pop_back(*(_QWORD *)(*(_QWORD *)v9 + 8LL)); } } return 1; }
end_array: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RDI MOV byte ptr [RSP + 0x2f],0x1 ADD RDI,0x8 CALL 0x001b07b0 CMP qword ptr [RAX],0x0 JZ 0x001afa72 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,RDI ADD RAX,0x80 MOV qword ptr [RSP],RAX ADD RDI,0x8 CALL 0x001b01c0 MOV RDI,qword ptr [RSP + 0x10] SUB EAX,0x1 MOV dword ptr [RSP + 0xc],EAX ADD RDI,0x8 CALL 0x001b07b0 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0xc] MOV RCX,qword ptr [RAX] MOV EDX,0x3 CALL 0x001b0160 AND AL,0x1 MOV byte ptr [RSP + 0x2f],AL TEST byte ptr [RSP + 0x2f],0x1 JZ 0x001afa35 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001b07b0 MOV RDI,qword ptr [RAX] CALL 0x001b0f00 JMP 0x001afa70 LAB_001afa35: MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0xa8 LEA RDI,[RSP + 0x18] CALL 0x001b2360 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001b07b0 MOV RDI,qword ptr [RAX] LEA RSI,[RSP + 0x18] CALL 0x001aabe0 LEA RDI,[RSP + 0x18] CALL 0x001a19a0 LAB_001afa70: JMP 0x001afa72 LAB_001afa72: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001b0c00 TEST AL,0x1 JNZ 0x001afa86 JMP 0x001afaa7 LAB_001afa86: LEA RDI,[0x30e69e] MOV ESI,0x1bf5 LEA RDX,[0x30e6e8] LEA RCX,[0x30f6bb] MOV AL,0x0 CALL 0x00159e90 LAB_001afaa7: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x20 CALL 0x001b0040 TEST AL,0x1 JNZ 0x001afabb JMP 0x001afadc LAB_001afabb: LEA RDI,[0x30e69e] MOV ESI,0x1bf6 LEA RDX,[0x30e6e8] LEA RCX,[0x30f635] MOV AL,0x0 CALL 0x00159e90 LAB_001afadc: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001b2550 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x20 CALL 0x001b0140 TEST byte ptr [RSP + 0x2f],0x1 JNZ 0x001afb47 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001b0c00 TEST AL,0x1 JNZ 0x001afb47 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001b07b0 MOV RDI,qword ptr [RAX] CALL 0x001b0d00 TEST AL,0x1 JNZ 0x001afb2d JMP 0x001afb47 LAB_001afb2d: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001b07b0 MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001b6640 LAB_001afb47: MOV AL,0x1 AND AL,0x1 ADD RSP,0x38 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<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>> ::end_array(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { int iVar1; long *plVar2; int8 *puVar3; ulong uVar4; 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_20 [23]; byte local_9; json_sax_dom_callback_parser<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_8; local_9 = 1; local_8 = this; plVar2 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); if (*plVar2 != 0) { iVar1 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::size((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); local_9 = std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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()((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)(this + 0x80),iVar1 + -1,3,*puVar3); local_9 = local_9 & 1; if (local_9 == 0) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_20,this + 0xa8); puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); 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> *)*puVar3,local_20); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_20); } else { std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); 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> ::set_parents(); } } uVar4 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); if ((uVar4 & 1) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1bf5, "GGML_ASSERT(%s) failed","!ref_stack.empty()"); } uVar4 = std::vector<bool,std::allocator<bool>>::empty ((vector<bool,std::allocator<bool>> *)(this + 0x20)); if ((uVar4 & 1) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1bf6, "GGML_ASSERT(%s) failed","!keep_stack.empty()"); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::pop_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); std::vector<bool,std::allocator<bool>>::pop_back ((vector<bool,std::allocator<bool>> *)(this + 0x20)); if (((local_9 & 1) == 0) && (uVar4 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)), (uVar4 & 1) == 0)) { puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar4 = 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> ::is_array((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> *)*puVar3); if ((uVar4 & 1) != 0) { plVar2 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::pop_back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(*plVar2 + 8)); } } return 1; }
17,159
make_empty_page
eloqsql/storage/maria/ma_blockrec.c
static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type, my_bool create_dir_entry) { uint block_size= info->s->block_size; DBUG_ENTER("make_empty_page"); bzero(buff, PAGE_HEADER_SIZE(info->s)); #if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind) /* We zero the rest of the block to avoid getting old memory information to disk and to allow the file to be compressed better if archived. The code does not assume the block is zeroed. */ if (page_type != BLOB_PAGE) bzero(buff+ PAGE_HEADER_SIZE(info->s), block_size - PAGE_HEADER_SIZE(info->s)); #endif buff[PAGE_TYPE_OFFSET]= (uchar) page_type; buff[DIR_COUNT_OFFSET]= (int) create_dir_entry; buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST; if (create_dir_entry) { /* Create directory entry to point to start of page with size 0 */ buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE; int2store(buff, PAGE_HEADER_SIZE(info->s)); int2store(buff+2, 0); } DBUG_VOID_RETURN; }
O3
c
make_empty_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %r15d movl %edx, %r12d movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %rax movl 0x7bc(%rax), %r13d movl 0xc18(%rax), %edx addl $0xc, %edx movq %rsi, %rdi xorl %esi, %esi callq 0x2b2f0 cmpl $0x3, %r12d je 0x4fcbb movq (%r14), %rax movl 0xc18(%rax), %eax addl $0xc, %eax leaq (%rbx,%rax), %rdi movl %r13d, %edx subl %eax, %edx xorl %esi, %esi callq 0x2b2f0 movb %r12b, 0x7(%rbx) movb %r15b, 0x8(%rbx) movb $-0x1, 0x9(%rbx) testb %r15b, %r15b je 0x4fce9 addl $-0x8, %r13d movq (%r14), %rax movl 0xc18(%rax), %eax addl $0xc, %eax movw %ax, (%rbx,%r13) movw $0x0, 0x2(%rbx,%r13) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
make_empty_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15d, ecx mov r12d, edx mov rbx, rsi mov r14, rdi mov rax, [rdi] mov r13d, [rax+7BCh] mov edx, [rax+0C18h] add edx, 0Ch mov rdi, rsi xor esi, esi call _memset cmp r12d, 3 jz short loc_4FCBB mov rax, [r14] mov eax, [rax+0C18h] add eax, 0Ch lea rdi, [rbx+rax] mov edx, r13d sub edx, eax xor esi, esi call _memset loc_4FCBB: mov [rbx+7], r12b mov [rbx+8], r15b mov byte ptr [rbx+9], 0FFh test r15b, r15b jz short loc_4FCE9 add r13d, 0FFFFFFF8h mov rax, [r14] mov eax, [rax+0C18h] add eax, 0Ch mov [rbx+r13], ax mov word ptr [rbx+r13+2], 0 loc_4FCE9: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long make_empty_page(long long a1, _BYTE *a2, int a3, char a4) { int v6; // r13d long long result; // rax long long v8; // rax v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL); result = memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12)); if ( a3 != 3 ) { v8 = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12); result = memset(&a2[v8], 0LL, (unsigned int)(v6 - v8)); } a2[7] = a3; a2[8] = a4; a2[9] = -1; if ( a4 ) { result = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12); *(_DWORD *)&a2[v6 - 8] = (unsigned __int16)(*(_WORD *)(*(_QWORD *)a1 + 3096LL) + 12); } return result; }
make_empty_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15D,ECX MOV R12D,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI] MOV R13D,dword ptr [RAX + 0x7bc] MOV EDX,dword ptr [RAX + 0xc18] ADD EDX,0xc MOV RDI,RSI XOR ESI,ESI CALL 0x0012b2f0 CMP R12D,0x3 JZ 0x0014fcbb MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0xc LEA RDI,[RBX + RAX*0x1] MOV EDX,R13D SUB EDX,EAX XOR ESI,ESI CALL 0x0012b2f0 LAB_0014fcbb: MOV byte ptr [RBX + 0x7],R12B MOV byte ptr [RBX + 0x8],R15B MOV byte ptr [RBX + 0x9],0xff TEST R15B,R15B JZ 0x0014fce9 ADD R13D,-0x8 MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0xc MOV word ptr [RBX + R13*0x1],AX MOV word ptr [RBX + R13*0x1 + 0x2],0x0 LAB_0014fce9: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4) { int iVar1; uint uVar2; ulong uVar3; iVar1 = *(int *)(*param_1 + 0x7bc); memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc)); if (param_3 != 3) { uVar2 = *(int *)(*param_1 + 0xc18) + 0xc; memset((void *)((long)param_2 + (ulong)uVar2),0,(ulong)(iVar1 - uVar2)); } *(char *)((long)param_2 + 7) = (char)param_3; *(char *)((long)param_2 + 8) = param_4; *(int1 *)((long)param_2 + 9) = 0xff; if (param_4 != '\0') { uVar3 = (ulong)(iVar1 - 8); *(short *)((long)param_2 + uVar3) = (short)*(int4 *)(*param_1 + 0xc18) + 0xc; *(int2 *)((long)param_2 + uVar3 + 2) = 0; } return; }
17,160
ftb_check_phrase_internal
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_check_phrase_internal(MYSQL_FTPARSER_PARAM *param, const char *document, int len) { FT_WORD word; MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam; const uchar *docend= (uchar*) document + len; while (ft_simple_get_word(phrase_param->cs, (uchar**) &document, docend, &word, FALSE)) { param->mysql_add_word(param, (char*) word.pos, (int)word.len, 0); if (phrase_param->match) break; } return 0; }
O3
c
ftb_check_phrase_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq -0x48(%rbp), %r14 movq %rsi, (%r14) movq 0x18(%rdi), %r13 movslq %edx, %r15 addq %rsi, %r15 leaq -0x40(%rbp), %r12 movq 0x10(%r13), %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x73bb5 testb %al, %al je 0x72b4b movq -0x40(%rbp), %rsi movl -0x30(%rbp), %edx movq %rbx, %rdi xorl %ecx, %ecx callq *0x8(%rbx) cmpl $0x0, 0x20(%r13) je 0x72b1c xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ftb_check_phrase_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rbp+var_48] mov [r14], rsi mov r13, [rdi+18h] movsxd r15, edx add r15, rsi lea r12, [rbp+var_40] loc_72B1C: mov rdi, [r13+10h] mov rsi, r14 mov rdx, r15 mov rcx, r12 xor r8d, r8d call ft_simple_get_word test al, al jz short loc_72B4B mov rsi, [rbp+var_40] mov edx, [rbp+var_30] mov rdi, rbx xor ecx, ecx call qword ptr [rbx+8] cmp dword ptr [r13+20h], 0 jz short loc_72B1C loc_72B4B: xor eax, eax add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ftb_check_phrase_internal(long long a1, long long a2, int a3) { long long v3; // r13 long long v4; // r15 long long v6; // [rsp+8h] [rbp-48h] BYREF long long v7; // [rsp+10h] [rbp-40h] BYREF unsigned int v8; // [rsp+20h] [rbp-30h] v6 = a2; v3 = *(_QWORD *)(a1 + 24); v4 = a2 + a3; do { if ( !(unsigned __int8)ft_simple_get_word(*(_QWORD *)(v3 + 16), &v6, v4, &v7, 0LL) ) break; (*(void ( **)(long long, long long, _QWORD, _QWORD))(a1 + 8))(a1, v7, v8, 0LL); } while ( !*(_DWORD *)(v3 + 32) ); return 0LL; }
ftb_check_phrase_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RBP + -0x48] MOV qword ptr [R14],RSI MOV R13,qword ptr [RDI + 0x18] MOVSXD R15,EDX ADD R15,RSI LEA R12,[RBP + -0x40] LAB_00172b1c: MOV RDI,qword ptr [R13 + 0x10] MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 XOR R8D,R8D CALL 0x00173bb5 TEST AL,AL JZ 0x00172b4b MOV RSI,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x30] MOV RDI,RBX XOR ECX,ECX CALL qword ptr [RBX + 0x8] CMP dword ptr [R13 + 0x20],0x0 JZ 0x00172b1c LAB_00172b4b: XOR EAX,EAX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ftb_check_phrase_internal(long param_1,long param_2,int param_3) { long lVar1; char cVar2; long local_50; int8 local_48 [2]; int4 local_38; lVar1 = *(long *)(param_1 + 0x18); local_50 = param_2; do { cVar2 = ft_simple_get_word(*(int8 *)(lVar1 + 0x10),&local_50,param_3 + param_2,local_48,0) ; if (cVar2 == '\0') { return 0; } (**(code **)(param_1 + 8))(param_1,local_48[0],local_38,0); } while (*(int *)(lVar1 + 0x20) == 0); return 0; }
17,161
Cache::setByte(unsigned int, unsigned char, unsigned int*)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
void Cache::setByte(uint32_t addr, uint8_t val, uint32_t *cycles) { this->referenceCounter++; this->statistics.numWrite++; // If in cache, write to it directly int blockId; if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->statistics.numHit++; this->statistics.totalCycles += this->policy.hitLatency; this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; if (cycles) *cycles = this->policy.hitLatency; return; } // Else, load the data from cache this->statistics.numMiss++; this->statistics.totalCycles += this->policy.missLatency; this->loadBlockFromLowerLevel(addr, cycles); if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; return; } else { fprintf(stderr, "Error: data not in top level cache!\n"); exit(-1); } }
O0
cpp
Cache::setByte(unsigned int, unsigned char, unsigned int*): subq $0x48, %rsp movb %dl, %al movq %rdi, 0x40(%rsp) movl %esi, 0x3c(%rsp) movb %al, 0x3b(%rsp) movq %rcx, 0x30(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x18(%rsp) movl 0x20(%rdi), %eax addl $0x1, %eax movl %eax, 0x20(%rdi) movl 0xc(%rdi), %eax addl $0x1, %eax movl %eax, 0xc(%rdi) movl 0x3c(%rsp), %esi callq 0x45a0 movl %eax, 0x2c(%rsp) cmpl $-0x1, %eax je 0x4e47 movq 0x18(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0x4920 movq 0x18(%rsp), %rdi movl %eax, 0x28(%rsp) movl 0x10(%rdi), %eax addl $0x1, %eax movl %eax, 0x10(%rdi) movl 0x48(%rdi), %eax addq 0x18(%rdi), %rax movq %rax, 0x18(%rdi) addq $0x50, %rdi movslq 0x2c(%rsp), %rsi callq 0x5620 movq 0x18(%rsp), %rdi movb $0x1, 0x1(%rax) movl 0x20(%rdi), %eax movl %eax, 0x10(%rsp) addq $0x50, %rdi movslq 0x2c(%rsp), %rsi callq 0x5620 movl 0x10(%rsp), %ecx movq 0x18(%rsp), %rdi movl %ecx, 0x10(%rax) movb 0x3b(%rsp), %al movb %al, 0x17(%rsp) addq $0x50, %rdi movslq 0x2c(%rsp), %rsi callq 0x5620 movq %rax, %rdi addq $0x18, %rdi movl 0x28(%rsp), %eax movl %eax, %esi callq 0x5640 movb 0x17(%rsp), %cl movb %cl, (%rax) cmpq $0x0, 0x30(%rsp) je 0x4e42 movq 0x18(%rsp), %rax movl 0x48(%rax), %ecx movq 0x30(%rsp), %rax movl %ecx, (%rax) jmp 0x4f26 movq 0x18(%rsp), %rdi movl 0x14(%rdi), %eax addl $0x1, %eax movl %eax, 0x14(%rdi) movl 0x4c(%rdi), %eax addq 0x18(%rdi), %rax movq %rax, 0x18(%rdi) movl 0x3c(%rsp), %esi movq 0x30(%rsp), %rdx callq 0x4960 movq 0x18(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0x45a0 movl %eax, 0x2c(%rsp) cmpl $-0x1, %eax je 0x4f04 movq 0x18(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0x4920 movq 0x18(%rsp), %rdi movl %eax, 0x24(%rsp) addq $0x50, %rdi movslq 0x2c(%rsp), %rsi callq 0x5620 movq 0x18(%rsp), %rdi movb $0x1, 0x1(%rax) movl 0x20(%rdi), %eax movl %eax, 0x8(%rsp) addq $0x50, %rdi movslq 0x2c(%rsp), %rsi callq 0x5620 movl 0x8(%rsp), %ecx movq 0x18(%rsp), %rdi movl %ecx, 0x10(%rax) movb 0x3b(%rsp), %al movb %al, 0xf(%rsp) addq $0x50, %rdi movslq 0x2c(%rsp), %rsi callq 0x5620 movq %rax, %rdi addq $0x18, %rdi movl 0x24(%rsp), %eax movl %eax, %esi callq 0x5640 movb 0xf(%rsp), %cl movb %cl, (%rax) jmp 0x4f26 movq 0x70cd(%rip), %rax # 0xbfd8 movq (%rax), %rdi leaq 0x3385(%rip), %rsi # 0x829a movb $0x0, %al callq 0x2240 movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0x21b0 addq $0x48, %rsp retq nopl (%rax,%rax)
_ZN5Cache7setByteEjhPj: sub rsp, 48h mov al, dl mov [rsp+48h+var_8], rdi mov [rsp+48h+var_C], esi mov [rsp+48h+var_D], al mov [rsp+48h+var_18], rcx mov rdi, [rsp+48h+var_8]; this mov [rsp+48h+var_30], rdi mov eax, [rdi+20h] add eax, 1 mov [rdi+20h], eax mov eax, [rdi+0Ch] add eax, 1 mov [rdi+0Ch], eax mov esi, [rsp+48h+var_C]; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) mov [rsp+48h+var_1C], eax cmp eax, 0FFFFFFFFh jz loc_4E47 mov rdi, [rsp+48h+var_30]; this mov esi, [rsp+48h+var_C]; unsigned int call _ZN5Cache9getOffsetEj; Cache::getOffset(uint) mov rdi, [rsp+48h+var_30] mov [rsp+48h+var_20], eax mov eax, [rdi+10h] add eax, 1 mov [rdi+10h], eax mov eax, [rdi+48h] add rax, [rdi+18h] mov [rdi+18h], rax add rdi, 50h ; 'P' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, [rsp+48h+var_30] mov byte ptr [rax+1], 1 mov eax, [rdi+20h] mov [rsp+48h+var_38], eax add rdi, 50h ; 'P' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov ecx, [rsp+48h+var_38] mov rdi, [rsp+48h+var_30] mov [rax+10h], ecx mov al, [rsp+48h+var_D] mov [rsp+48h+var_31], al add rdi, 50h ; 'P' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, rax add rdi, 18h mov eax, [rsp+48h+var_20] mov esi, eax call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong) mov cl, [rsp+48h+var_31] mov [rax], cl cmp [rsp+48h+var_18], 0 jz short loc_4E42 mov rax, [rsp+48h+var_30] mov ecx, [rax+48h] mov rax, [rsp+48h+var_18] mov [rax], ecx loc_4E42: jmp loc_4F26 loc_4E47: mov rdi, [rsp+48h+var_30]; this mov eax, [rdi+14h] add eax, 1 mov [rdi+14h], eax mov eax, [rdi+4Ch] add rax, [rdi+18h] mov [rdi+18h], rax mov esi, [rsp+48h+var_C]; unsigned int mov rdx, [rsp+48h+var_18]; unsigned int * call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *) mov rdi, [rsp+48h+var_30]; this mov esi, [rsp+48h+var_C]; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) mov [rsp+48h+var_1C], eax cmp eax, 0FFFFFFFFh jz short loc_4F04 mov rdi, [rsp+48h+var_30]; this mov esi, [rsp+48h+var_C]; unsigned int call _ZN5Cache9getOffsetEj; Cache::getOffset(uint) mov rdi, [rsp+48h+var_30] mov [rsp+48h+var_24], eax add rdi, 50h ; 'P' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, [rsp+48h+var_30] mov byte ptr [rax+1], 1 mov eax, [rdi+20h] mov [rsp+48h+var_40], eax add rdi, 50h ; 'P' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov ecx, [rsp+48h+var_40] mov rdi, [rsp+48h+var_30] mov [rax+10h], ecx mov al, [rsp+48h+var_D] mov [rsp+48h+var_39], al add rdi, 50h ; 'P' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, rax add rdi, 18h mov eax, [rsp+48h+var_24] mov esi, eax call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong) mov cl, [rsp+48h+var_39] mov [rax], cl jmp short loc_4F26 loc_4F04: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aErrorDataNotIn; "Error: data not in top level cache!\n" mov al, 0 call _fprintf mov edi, 0FFFFFFFFh call _exit loc_4F26: add rsp, 48h retn
unsigned int * Cache::setByte( Cache *this, unsigned int a2, char a3, unsigned int *a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { double v12; // xmm4_8 double v13; // xmm5_8 long long v14; // rax unsigned int *result; // rax long long v16; // rax int v17; // [rsp+8h] [rbp-40h] int v18; // [rsp+10h] [rbp-38h] unsigned int Offset; // [rsp+24h] [rbp-24h] unsigned int v20; // [rsp+28h] [rbp-20h] int BlockId; // [rsp+2Ch] [rbp-1Ch] int v22; // [rsp+2Ch] [rbp-1Ch] ++*((_DWORD *)this + 8); ++*((_DWORD *)this + 3); BlockId = Cache::getBlockId(this, a2); if ( BlockId == -1 ) { ++*((_DWORD *)this + 5); *((_QWORD *)this + 3) += *((unsigned int *)this + 19); Cache::loadBlockFromLowerLevel(this, a2, a4, a5, a6, a7, a8, v12, v13, a11, a12); v22 = Cache::getBlockId(this, a2); if ( v22 == -1 ) { fprintf(stderr, "Error: data not in top level cache!\n"); exit(0xFFFFFFFFLL); } Offset = Cache::getOffset(this, a2); *(_BYTE *)(std::vector<Cache::Block>::operator[]((char *)this + 80, v22) + 1) = 1; v17 = *((_DWORD *)this + 8); *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, v22) + 16) = v17; v16 = std::vector<Cache::Block>::operator[]((char *)this + 80, v22); result = (unsigned int *)std::vector<unsigned char>::operator[](v16 + 24, Offset); *(_BYTE *)result = a3; } else { v20 = Cache::getOffset(this, a2); ++*((_DWORD *)this + 4); *((_QWORD *)this + 3) += *((unsigned int *)this + 18); *(_BYTE *)(std::vector<Cache::Block>::operator[]((char *)this + 80, BlockId) + 1) = 1; v18 = *((_DWORD *)this + 8); *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, BlockId) + 16) = v18; v14 = std::vector<Cache::Block>::operator[]((char *)this + 80, BlockId); result = (unsigned int *)std::vector<unsigned char>::operator[](v14 + 24, v20); *(_BYTE *)result = a3; if ( a4 ) { result = a4; *a4 = *((_DWORD *)this + 18); } } return result; }
setByte: SUB RSP,0x48 MOV AL,DL MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ESI MOV byte ptr [RSP + 0x3b],AL MOV qword ptr [RSP + 0x30],RCX MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RDI MOV EAX,dword ptr [RDI + 0x20] ADD EAX,0x1 MOV dword ptr [RDI + 0x20],EAX MOV EAX,dword ptr [RDI + 0xc] ADD EAX,0x1 MOV dword ptr [RDI + 0xc],EAX MOV ESI,dword ptr [RSP + 0x3c] CALL 0x001045a0 MOV dword ptr [RSP + 0x2c],EAX CMP EAX,-0x1 JZ 0x00104e47 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x00104920 MOV RDI,qword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x28],EAX MOV EAX,dword ptr [RDI + 0x10] ADD EAX,0x1 MOV dword ptr [RDI + 0x10],EAX MOV EAX,dword ptr [RDI + 0x48] ADD RAX,qword ptr [RDI + 0x18] MOV qword ptr [RDI + 0x18],RAX ADD RDI,0x50 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00105620 MOV RDI,qword ptr [RSP + 0x18] MOV byte ptr [RAX + 0x1],0x1 MOV EAX,dword ptr [RDI + 0x20] MOV dword ptr [RSP + 0x10],EAX ADD RDI,0x50 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00105620 MOV ECX,dword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x10],ECX MOV AL,byte ptr [RSP + 0x3b] MOV byte ptr [RSP + 0x17],AL ADD RDI,0x50 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00105620 MOV RDI,RAX ADD RDI,0x18 MOV EAX,dword ptr [RSP + 0x28] MOV ESI,EAX CALL 0x00105640 MOV CL,byte ptr [RSP + 0x17] MOV byte ptr [RAX],CL CMP qword ptr [RSP + 0x30],0x0 JZ 0x00104e42 MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RAX + 0x48] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],ECX LAB_00104e42: JMP 0x00104f26 LAB_00104e47: MOV RDI,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RDI + 0x14] ADD EAX,0x1 MOV dword ptr [RDI + 0x14],EAX MOV EAX,dword ptr [RDI + 0x4c] ADD RAX,qword ptr [RDI + 0x18] MOV qword ptr [RDI + 0x18],RAX MOV ESI,dword ptr [RSP + 0x3c] MOV RDX,qword ptr [RSP + 0x30] CALL 0x00104960 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x001045a0 MOV dword ptr [RSP + 0x2c],EAX CMP EAX,-0x1 JZ 0x00104f04 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x00104920 MOV RDI,qword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x24],EAX ADD RDI,0x50 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00105620 MOV RDI,qword ptr [RSP + 0x18] MOV byte ptr [RAX + 0x1],0x1 MOV EAX,dword ptr [RDI + 0x20] MOV dword ptr [RSP + 0x8],EAX ADD RDI,0x50 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00105620 MOV ECX,dword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x10],ECX MOV AL,byte ptr [RSP + 0x3b] MOV byte ptr [RSP + 0xf],AL ADD RDI,0x50 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00105620 MOV RDI,RAX ADD RDI,0x18 MOV EAX,dword ptr [RSP + 0x24] MOV ESI,EAX CALL 0x00105640 MOV CL,byte ptr [RSP + 0xf] MOV byte ptr [RAX],CL JMP 0x00104f26 LAB_00104f04: MOV RAX,qword ptr [0x0010bfd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x10829a] MOV AL,0x0 CALL 0x00102240 MOV EDI,0xffffffff CALL 0x001021b0 LAB_00104f26: ADD RSP,0x48 RET
/* Cache::setByte(unsigned int, unsigned char, unsigned int*) */ void __thiscall Cache::setByte(Cache *this,uint param_1,uchar param_2,uint *param_3) { int4 uVar1; int iVar2; uint uVar3; long lVar4; uchar *puVar5; *(int *)(this + 0x20) = *(int *)(this + 0x20) + 1; *(int *)(this + 0xc) = *(int *)(this + 0xc) + 1; iVar2 = getBlockId(this,param_1); if (iVar2 == -1) { *(int *)(this + 0x14) = *(int *)(this + 0x14) + 1; *(ulong *)(this + 0x18) = (ulong)*(uint *)(this + 0x4c) + *(long *)(this + 0x18); loadBlockFromLowerLevel(this,param_1,param_3); iVar2 = getBlockId(this,param_1); if (iVar2 == -1) { fprintf(*(FILE **)PTR_stderr_0010bfd8,"Error: data not in top level cache!\n"); /* WARNING: Subroutine does not return */ exit(-1); } uVar3 = getOffset(this,param_1); lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (long)iVar2); *(int1 *)(lVar4 + 1) = 1; uVar1 = *(int4 *)(this + 0x20); lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (long)iVar2); *(int4 *)(lVar4 + 0x10) = uVar1; lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (long)iVar2); puVar5 = (uchar *)std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[] ((vector<unsigned_char,std::allocator<unsigned_char>> *) (lVar4 + 0x18),(ulong)uVar3); *puVar5 = param_2; } else { uVar3 = getOffset(this,param_1); *(int *)(this + 0x10) = *(int *)(this + 0x10) + 1; *(ulong *)(this + 0x18) = (ulong)*(uint *)(this + 0x48) + *(long *)(this + 0x18); lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (long)iVar2); *(int1 *)(lVar4 + 1) = 1; uVar1 = *(int4 *)(this + 0x20); lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (long)iVar2); *(int4 *)(lVar4 + 0x10) = uVar1; lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (long)iVar2); puVar5 = (uchar *)std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[] ((vector<unsigned_char,std::allocator<unsigned_char>> *) (lVar4 + 0x18),(ulong)uVar3); *puVar5 = param_2; if (param_3 != (uint *)0x0) { *param_3 = *(uint *)(this + 0x48); } } return; }
17,162
Cache::setByte(unsigned int, unsigned char, unsigned int*)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
void Cache::setByte(uint32_t addr, uint8_t val, uint32_t *cycles) { this->referenceCounter++; this->statistics.numWrite++; // If in cache, write to it directly int blockId; if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->statistics.numHit++; this->statistics.totalCycles += this->policy.hitLatency; this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; if (cycles) *cycles = this->policy.hitLatency; return; } // Else, load the data from cache this->statistics.numMiss++; this->statistics.totalCycles += this->policy.missLatency; this->loadBlockFromLowerLevel(addr, cycles); if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; return; } else { fprintf(stderr, "Error: data not in top level cache!\n"); exit(-1); } }
O1
cpp
Cache::setByte(unsigned int, unsigned char, unsigned int*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r15 movl %edx, %ebp movq %rdi, %rbx incl 0x20(%rdi) movl %esi, %r14d incl 0xc(%rdi) callq 0x3866 cmpl $-0x1, %eax je 0x3da9 movl 0x3c(%rbx), %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testl %esi, %esi je 0x3d64 xorl %ecx, %ecx cmpl $0x1, %esi je 0x3d64 cmpl $0x2, %esi jb 0x3d64 xorl %ecx, %ecx movl %esi, %edi shrl %edi incl %ecx cmpl $0x3, %esi movl %edi, %esi ja 0x3d59 shll %cl, %edx incl 0x10(%rbx) movl 0x48(%rbx), %ecx addq %rcx, 0x18(%rbx) notl %edx andl %r14d, %edx cltq movq 0x50(%rbx), %rcx leaq (%rax,%rax,2), %rax shlq $0x4, %rax movb $0x1, 0x1(%rcx,%rax) movl 0x20(%rbx), %esi movl %esi, 0x10(%rcx,%rax) movq 0x18(%rcx,%rax), %rax movb %bpl, (%rax,%rdx) testq %r15, %r15 je 0x3e27 movl 0x48(%rbx), %eax movl %eax, (%r15) jmp 0x3e27 incl 0x14(%rbx) movl 0x4c(%rbx), %eax addq %rax, 0x18(%rbx) movq %rbx, %rdi movl %r14d, %esi movq %r15, %rdx callq 0x3aee movq %rbx, %rdi movl %r14d, %esi callq 0x3866 cmpl $-0x1, %eax je 0x3e32 movl 0x3c(%rbx), %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testl %esi, %esi je 0x3dfd xorl %ecx, %ecx cmpl $0x1, %esi je 0x3dfd cmpl $0x2, %esi jb 0x3dfd xorl %ecx, %ecx movl %esi, %edi shrl %edi incl %ecx cmpl $0x3, %esi movl %edi, %esi ja 0x3df2 shll %cl, %edx notl %edx andl %r14d, %edx cltq movq 0x50(%rbx), %rcx leaq (%rax,%rax,2), %rax shlq $0x4, %rax movb $0x1, 0x1(%rcx,%rax) movl 0x20(%rbx), %esi movl %esi, 0x10(%rcx,%rax) movq 0x18(%rcx,%rax), %rax movb %bpl, (%rax,%rdx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2426 nop
_ZN5Cache7setByteEjhPj: push rbp push r15 push r14 push rbx push rax mov r15, rcx mov ebp, edx mov rbx, rdi inc dword ptr [rdi+20h] mov r14d, esi inc dword ptr [rdi+0Ch] call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) cmp eax, 0FFFFFFFFh jz short loc_3DA9 mov esi, [rbx+3Ch] mov edx, 0FFFFFFFFh mov ecx, 0FFFFFFFFh test esi, esi jz short loc_3D64 xor ecx, ecx cmp esi, 1 jz short loc_3D64 cmp esi, 2 jb short loc_3D64 xor ecx, ecx mov edi, esi loc_3D59: shr edi, 1 inc ecx cmp esi, 3 mov esi, edi ja short loc_3D59 loc_3D64: shl edx, cl inc dword ptr [rbx+10h] mov ecx, [rbx+48h] add [rbx+18h], rcx not edx and edx, r14d cdqe mov rcx, [rbx+50h] lea rax, [rax+rax*2] shl rax, 4 mov byte ptr [rcx+rax+1], 1 mov esi, [rbx+20h] mov [rcx+rax+10h], esi mov rax, [rcx+rax+18h] mov [rax+rdx], bpl test r15, r15 jz loc_3E27 mov eax, [rbx+48h] mov [r15], eax jmp short loc_3E27 loc_3DA9: inc dword ptr [rbx+14h] mov eax, [rbx+4Ch] add [rbx+18h], rax mov rdi, rbx; this mov esi, r14d; unsigned int mov rdx, r15; unsigned int * call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *) mov rdi, rbx; this mov esi, r14d; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) cmp eax, 0FFFFFFFFh jz short loc_3E32 mov esi, [rbx+3Ch] mov edx, 0FFFFFFFFh mov ecx, 0FFFFFFFFh test esi, esi jz short loc_3DFD xor ecx, ecx cmp esi, 1 jz short loc_3DFD cmp esi, 2 jb short loc_3DFD xor ecx, ecx mov edi, esi loc_3DF2: shr edi, 1 inc ecx cmp esi, 3 mov esi, edi ja short loc_3DF2 loc_3DFD: shl edx, cl not edx and edx, r14d cdqe mov rcx, [rbx+50h] lea rax, [rax+rax*2] shl rax, 4 mov byte ptr [rcx+rax+1], 1 mov esi, [rbx+20h] mov [rcx+rax+10h], esi mov rax, [rcx+rax+18h] mov [rax+rdx], bpl loc_3E27: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_3E32: call _ZN5Cache7setByteEjhPj_cold_1; Cache::setByte(uint,uchar,uint *) [clone]
long long Cache::setByte( Cache *this, unsigned int a2, char a3, unsigned int *a4, double a5, double a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { int BlockId; // eax double v17; // xmm4_8 double v18; // xmm5_8 unsigned int v19; // esi char v20; // cl unsigned int v21; // edi bool v22; // cc long long v23; // rdx long long v24; // rcx long long v25; // rax long long result; // rax int v27; // eax unsigned int v28; // esi char v29; // cl unsigned int v30; // edi long long v31; // rdx long long v32; // rcx long long v33; // rax ++*((_DWORD *)this + 8); ++*((_DWORD *)this + 3); BlockId = Cache::getBlockId(this, a2); if ( BlockId == -1 ) { ++*((_DWORD *)this + 5); *((_QWORD *)this + 3) += *((unsigned int *)this + 19); Cache::loadBlockFromLowerLevel((MemoryManager **)this, a2, a4, a5, a6, a7, a8, v17, v18, a11, a12); v27 = Cache::getBlockId(this, a2); if ( v27 == -1 ) Cache::setByte(this); v28 = *((_DWORD *)this + 15); v29 = -1; if ( v28 ) { v29 = 0; if ( v28 != 1 ) { v29 = 0; v30 = *((_DWORD *)this + 15); do { v30 >>= 1; ++v29; v22 = v28 <= 3; v28 = v30; } while ( !v22 ); } } v31 = a2 & ~(-1 << v29); v32 = *((_QWORD *)this + 10); v33 = 48LL * v27; *(_BYTE *)(v32 + v33 + 1) = 1; *(_DWORD *)(v32 + v33 + 16) = *((_DWORD *)this + 8); result = *(_QWORD *)(v32 + v33 + 24); *(_BYTE *)(result + v31) = a3; } else { v19 = *((_DWORD *)this + 15); v20 = -1; if ( v19 ) { v20 = 0; if ( v19 != 1 ) { v20 = 0; v21 = *((_DWORD *)this + 15); do { v21 >>= 1; ++v20; v22 = v19 <= 3; v19 = v21; } while ( !v22 ); } } ++*((_DWORD *)this + 4); *((_QWORD *)this + 3) += *((unsigned int *)this + 18); v23 = a2 & ~(-1 << v20); v24 = *((_QWORD *)this + 10); v25 = 48LL * BlockId; *(_BYTE *)(v24 + v25 + 1) = 1; *(_DWORD *)(v24 + v25 + 16) = *((_DWORD *)this + 8); result = *(_QWORD *)(v24 + v25 + 24); *(_BYTE *)(result + v23) = a3; if ( a4 ) { result = *((unsigned int *)this + 18); *a4 = result; } } return result; }
setByte: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15,RCX MOV EBP,EDX MOV RBX,RDI INC dword ptr [RDI + 0x20] MOV R14D,ESI INC dword ptr [RDI + 0xc] CALL 0x00103866 CMP EAX,-0x1 JZ 0x00103da9 MOV ESI,dword ptr [RBX + 0x3c] MOV EDX,0xffffffff MOV ECX,0xffffffff TEST ESI,ESI JZ 0x00103d64 XOR ECX,ECX CMP ESI,0x1 JZ 0x00103d64 CMP ESI,0x2 JC 0x00103d64 XOR ECX,ECX MOV EDI,ESI LAB_00103d59: SHR EDI,0x1 INC ECX CMP ESI,0x3 MOV ESI,EDI JA 0x00103d59 LAB_00103d64: SHL EDX,CL INC dword ptr [RBX + 0x10] MOV ECX,dword ptr [RBX + 0x48] ADD qword ptr [RBX + 0x18],RCX NOT EDX AND EDX,R14D CDQE MOV RCX,qword ptr [RBX + 0x50] LEA RAX,[RAX + RAX*0x2] SHL RAX,0x4 MOV byte ptr [RCX + RAX*0x1 + 0x1],0x1 MOV ESI,dword ptr [RBX + 0x20] MOV dword ptr [RCX + RAX*0x1 + 0x10],ESI MOV RAX,qword ptr [RCX + RAX*0x1 + 0x18] MOV byte ptr [RAX + RDX*0x1],BPL TEST R15,R15 JZ 0x00103e27 MOV EAX,dword ptr [RBX + 0x48] MOV dword ptr [R15],EAX JMP 0x00103e27 LAB_00103da9: INC dword ptr [RBX + 0x14] MOV EAX,dword ptr [RBX + 0x4c] ADD qword ptr [RBX + 0x18],RAX MOV RDI,RBX MOV ESI,R14D MOV RDX,R15 CALL 0x00103aee MOV RDI,RBX MOV ESI,R14D CALL 0x00103866 CMP EAX,-0x1 JZ 0x00103e32 MOV ESI,dword ptr [RBX + 0x3c] MOV EDX,0xffffffff MOV ECX,0xffffffff TEST ESI,ESI JZ 0x00103dfd XOR ECX,ECX CMP ESI,0x1 JZ 0x00103dfd CMP ESI,0x2 JC 0x00103dfd XOR ECX,ECX MOV EDI,ESI LAB_00103df2: SHR EDI,0x1 INC ECX CMP ESI,0x3 MOV ESI,EDI JA 0x00103df2 LAB_00103dfd: SHL EDX,CL NOT EDX AND EDX,R14D CDQE MOV RCX,qword ptr [RBX + 0x50] LEA RAX,[RAX + RAX*0x2] SHL RAX,0x4 MOV byte ptr [RCX + RAX*0x1 + 0x1],0x1 MOV ESI,dword ptr [RBX + 0x20] MOV dword ptr [RCX + RAX*0x1 + 0x10],ESI MOV RAX,qword ptr [RCX + RAX*0x1 + 0x18] MOV byte ptr [RAX + RDX*0x1],BPL LAB_00103e27: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00103e32: CALL 0x00102426 NOP
/* Cache::setByte(unsigned int, unsigned char, unsigned int*) */ void __thiscall Cache::setByte(Cache *this,uint param_1,uchar param_2,uint *param_3) { bool bVar1; int iVar2; long lVar3; int8 uVar4; long lVar5; byte bVar6; ulong uVar7; uint *extraout_RDX; uint uVar8; Cache *pCVar9; char *pcVar10; char *pcVar11; ulong uVar12; *(int *)(this + 0x20) = *(int *)(this + 0x20) + 1; *(int *)(this + 0xc) = *(int *)(this + 0xc) + 1; iVar2 = getBlockId(this,param_1); if (iVar2 == -1) { *(int *)(this + 0x14) = *(int *)(this + 0x14) + 1; *(ulong *)(this + 0x18) = *(long *)(this + 0x18) + (ulong)*(uint *)(this + 0x4c); loadBlockFromLowerLevel(this,param_1,param_3); pCVar9 = this; uVar8 = param_1; iVar2 = getBlockId(this,param_1); if (iVar2 == -1) { uVar4 = setByte((uint)pCVar9,(uchar)uVar8,extraout_RDX); puts("---------- Cache Info -----------"); printf("Cache Size: %d bytes\n",(ulong)*(uint *)(pCVar9 + 0x38)); printf("Block Size: %d bytes\n",(ulong)*(uint *)(pCVar9 + 0x3c)); printf("Block Num: %d\n",(ulong)*(uint *)(pCVar9 + 0x40)); printf("Associativiy: %d\n",(ulong)*(uint *)(pCVar9 + 0x44)); printf("Hit Latency: %d\n",(ulong)*(uint *)(pCVar9 + 0x48)); printf("Miss Latency: %d\n",(ulong)*(uint *)(pCVar9 + 0x4c)); if ((uVar8 != 0) && (lVar5 = *(long *)(pCVar9 + 0x50), *(long *)(pCVar9 + 0x58) != lVar5)) { lVar3 = 0; uVar12 = 0; do { pcVar10 = "invalid"; if (*(char *)(lVar5 + lVar3) != '\0') { pcVar10 = "valid"; } pcVar11 = "unmodified"; if (*(char *)(lVar5 + 1 + lVar3) != '\0') { pcVar11 = "modified"; } uVar4 = CONCAT44((int)((ulong)uVar4 >> 0x20),*(int4 *)(lVar5 + 0x10 + lVar3)); printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n",uVar12 & 0xffffffff, (ulong)*(uint *)(lVar5 + 4 + lVar3),(ulong)*(uint *)(lVar5 + 8 + lVar3),pcVar10, pcVar11,uVar4); uVar12 = uVar12 + 1; lVar5 = *(long *)(pCVar9 + 0x50); uVar7 = (*(long *)(pCVar9 + 0x58) - lVar5 >> 4) * -0x5555555555555555; lVar3 = lVar3 + 0x30; } while (uVar12 <= uVar7 && uVar7 - uVar12 != 0); } return; } uVar8 = *(uint *)(this + 0x3c); bVar6 = 0xff; if (uVar8 != 0) { bVar6 = 0; if ((uVar8 != 1) && (bVar6 = 0, 1 < uVar8)) { bVar6 = 0; do { bVar6 = bVar6 + 1; bVar1 = 3 < uVar8; uVar8 = uVar8 >> 1; } while (bVar1); } } lVar5 = *(long *)(this + 0x50); lVar3 = (long)iVar2 * 0x30; *(int1 *)(lVar5 + 1 + lVar3) = 1; *(int4 *)(lVar5 + 0x10 + lVar3) = *(int4 *)(this + 0x20); *(uchar *)(*(long *)(lVar5 + 0x18 + lVar3) + (ulong)(~(-1 << (bVar6 & 0x1f)) & param_1)) = param_2; } else { uVar8 = *(uint *)(this + 0x3c); bVar6 = 0xff; if (uVar8 != 0) { bVar6 = 0; if ((uVar8 != 1) && (bVar6 = 0, 1 < uVar8)) { bVar6 = 0; do { bVar6 = bVar6 + 1; bVar1 = 3 < uVar8; uVar8 = uVar8 >> 1; } while (bVar1); } } *(int *)(this + 0x10) = *(int *)(this + 0x10) + 1; *(ulong *)(this + 0x18) = *(long *)(this + 0x18) + (ulong)*(uint *)(this + 0x48); lVar5 = *(long *)(this + 0x50); lVar3 = (long)iVar2 * 0x30; *(int1 *)(lVar5 + 1 + lVar3) = 1; *(int4 *)(lVar5 + 0x10 + lVar3) = *(int4 *)(this + 0x20); *(uchar *)(*(long *)(lVar5 + 0x18 + lVar3) + (ulong)(~(-1 << (bVar6 & 0x1f)) & param_1)) = param_2; if (param_3 != (uint *)0x0) { *param_3 = *(uint *)(this + 0x48); } } return; }
17,163
ma_ck_write_btree
eloqsql/storage/maria/ma_write.c
static my_bool _ma_ck_write_btree(MARIA_HA *info, MARIA_KEY *key) { my_bool error; MARIA_KEYDEF *keyinfo= key->keyinfo; my_off_t *root= &info->s->state.key_root[keyinfo->key_nr]; DBUG_ENTER("_ma_ck_write_btree"); error= _ma_ck_write_btree_with_log(info, key, root, keyinfo->write_comp_flag | key->flag); if (info->ft1_to_ft2) { if (!error) error= _ma_ft_convert_to_ft2(info, key); delete_dynamic(info->ft1_to_ft2); my_free(info->ft1_to_ft2); info->ft1_to_ft2=0; } DBUG_RETURN(error); }
O3
c
ma_ck_write_btree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa28, %rsp # imm = 0xA28 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x8(%rsi), %rax movq (%rdi), %rcx movq 0x118(%rcx), %r12 movzbl 0xa5(%rax), %r13d movl 0x18(%rsi), %r15d orl 0xb4(%rax), %r15d movq $0x0, -0xa28(%rbp) movq (%r12,%r13,8), %rax movq %rax, -0xa20(%rbp) movb 0x7e7(%rcx), %al movb %al, -0xa11(%rbp) testb %al, %al je 0x566c7 movups (%r14), %xmm0 movups 0x10(%r14), %xmm1 movaps %xmm1, -0xa40(%rbp) movaps %xmm0, -0xa50(%rbp) movq (%r14), %rsi movl 0x14(%r14), %edx addl 0x10(%r14), %edx leaq -0xa10(%rbp), %rdi movl $0x9d3, %ecx # imm = 0x9D3 callq 0x2a400 leaq (%r12,%r13,8), %r12 leaq -0xa20(%rbp), %rdx movq %rbx, %rdi movq %r14, %rsi movl %r15d, %ecx callq 0x567e4 cmpb $0x0, -0xa11(%rbp) je 0x56736 testb %al, %al jne 0x56736 movaps -0xa50(%rbp), %xmm0 movaps -0xa40(%rbp), %xmm1 movups %xmm0, (%r14) movups %xmm1, 0x10(%r14) leaq -0xa10(%rbp), %rax movq %rax, (%r14) movq -0xa20(%rbp), %rcx leaq -0xa28(%rbp), %r13 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx movq %r13, %r8 callq 0x58d01 movl %eax, %r15d movq (%r13), %rsi jmp 0x56758 movzbl %al, %r15d movq -0xa20(%rbp), %rax movq %rax, (%r12) cmpb $0x0, 0x67e(%rbx) je 0x56756 movq %rbx, %rdi callq 0x41cb2 xorl %esi, %esi movq %rbx, %rdi callq 0x405f8 movq 0x8(%rbx), %rax movq $0x0, 0x90(%rax) testl %r15d, %r15d setne %r12b movq 0x320(%rbx), %rdi testq %rdi, %rdi je 0x567bb movb $0x1, %r12b testl %r15d, %r15d jne 0x5679f movq %rbx, %rdi movq %r14, %rsi callq 0x60ab5 movl %eax, %r12d movq 0x320(%rbx), %rdi callq 0x93034 movq 0x320(%rbx), %rdi callq 0xa4926 movq $0x0, 0x320(%rbx) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x567df movl %r12d, %eax addq $0xa28, %rsp # imm = 0xA28 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a240
_ma_ck_write_btree: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A28h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rsi+8] mov rcx, [rdi] mov r12, [rcx+118h] movzx r13d, byte ptr [rax+0A5h] mov r15d, [rsi+18h] or r15d, [rax+0B4h] mov [rbp+var_A28], 0 mov rax, [r12+r13*8] mov [rbp+var_A20], rax mov al, [rcx+7E7h] mov [rbp+var_A11], al test al, al jz short loc_566C7 movups xmm0, xmmword ptr [r14] movups xmm1, xmmword ptr [r14+10h] movaps [rbp+var_A40], xmm1 movaps [rbp+var_A50], xmm0 mov rsi, [r14] mov edx, [r14+14h] add edx, [r14+10h] lea rdi, [rbp+var_A10] mov ecx, 9D3h call ___memcpy_chk loc_566C7: lea r12, [r12+r13*8] lea rdx, [rbp+var_A20] mov rdi, rbx mov rsi, r14 mov ecx, r15d call _ma_ck_real_write_btree cmp [rbp+var_A11], 0 jz short loc_56736 test al, al jnz short loc_56736 movaps xmm0, [rbp+var_A50] movaps xmm1, [rbp+var_A40] movups xmmword ptr [r14], xmm0 movups xmmword ptr [r14+10h], xmm1 lea rax, [rbp+var_A10] mov [r14], rax mov rcx, [rbp+var_A20] lea r13, [rbp+var_A28] mov rdi, rbx mov rsi, r14 mov rdx, r12 mov r8, r13 call _ma_write_undo_key_insert mov r15d, eax mov rsi, [r13+0] jmp short loc_56758 loc_56736: movzx r15d, al mov rax, [rbp+var_A20] mov [r12], rax cmp byte ptr [rbx+67Eh], 0 jz short loc_56756 mov rdi, rbx call _ma_unlock_key_del loc_56756: xor esi, esi loc_56758: mov rdi, rbx call _ma_unpin_all_pages mov rax, [rbx+8] mov qword ptr [rax+90h], 0 test r15d, r15d setnz r12b mov rdi, [rbx+320h] test rdi, rdi jz short loc_567BB mov r12b, 1 test r15d, r15d jnz short loc_5679F mov rdi, rbx mov rsi, r14 call _ma_ft_convert_to_ft2 mov r12d, eax mov rdi, [rbx+320h] loc_5679F: call delete_dynamic mov rdi, [rbx+320h] call my_free mov qword ptr [rbx+320h], 0 loc_567BB: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_567DF mov eax, r12d add rsp, 0A28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_567DF: call ___stack_chk_fail
long long ma_ck_write_btree(long long a1, __int128 *a2) { long long v4; // rax long long v5; // rcx long long v6; // r12 long long v7; // r13 unsigned int v8; // r15d _QWORD *v9; // r12 unsigned __int8 v10; // al int v11; // r15d signed long long v12; // rsi long long v13; // rdi __int128 v15; // [rsp+0h] [rbp-A50h] __int128 v16; // [rsp+10h] [rbp-A40h] signed long long v17; // [rsp+28h] [rbp-A28h] BYREF long long v18; // [rsp+30h] [rbp-A20h] BYREF char v19; // [rsp+3Fh] [rbp-A11h] _BYTE v20[2528]; // [rsp+40h] [rbp-A10h] BYREF unsigned long long v21; // [rsp+A20h] [rbp-30h] v21 = __readfsqword(0x28u); v4 = *((_QWORD *)a2 + 1); v5 = *(_QWORD *)a1; v6 = *(_QWORD *)(*(_QWORD *)a1 + 280LL); v7 = *(unsigned __int8 *)(v4 + 165); v8 = *(_DWORD *)(v4 + 180) | *((_DWORD *)a2 + 6); v17 = 0LL; v18 = *(_QWORD *)(v6 + 8 * v7); v19 = *(_BYTE *)(v5 + 2023); if ( v19 ) { v16 = a2[1]; v15 = *a2; __memcpy_chk(v20, *(_QWORD *)a2, (unsigned int)(*((_DWORD *)a2 + 4) + *((_DWORD *)a2 + 5)), 2515LL); } v9 = (_QWORD *)(v6 + 8 * v7); v10 = ma_ck_real_write_btree(a1, a2, &v18, v8); if ( !v19 || v10 ) { v11 = v10; *v9 = v18; if ( *(_BYTE *)(a1 + 1662) ) ma_unlock_key_del((_BYTE *)a1); v12 = 0LL; } else { *a2 = v15; a2[1] = v16; *(_QWORD *)a2 = v20; v11 = ma_write_undo_key_insert(a1, a2, v9, v18, &v17); v12 = v17; } ma_unpin_all_pages(a1, v12); *(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL; LOBYTE(v9) = v11 != 0; v13 = *(_QWORD *)(a1 + 800); if ( v13 ) { LOBYTE(v9) = 1; if ( !v11 ) { LODWORD(v9) = ma_ft_convert_to_ft2(a1, a2); v13 = *(_QWORD *)(a1 + 800); } delete_dynamic(v13); my_free(*(_QWORD *)(a1 + 800)); *(_QWORD *)(a1 + 800) = 0LL; } return (unsigned int)v9; }
_ma_ck_write_btree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa28 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RSI + 0x8] MOV RCX,qword ptr [RDI] MOV R12,qword ptr [RCX + 0x118] MOVZX R13D,byte ptr [RAX + 0xa5] MOV R15D,dword ptr [RSI + 0x18] OR R15D,dword ptr [RAX + 0xb4] MOV qword ptr [RBP + -0xa28],0x0 MOV RAX,qword ptr [R12 + R13*0x8] MOV qword ptr [RBP + -0xa20],RAX MOV AL,byte ptr [RCX + 0x7e7] MOV byte ptr [RBP + -0xa11],AL TEST AL,AL JZ 0x001566c7 MOVUPS XMM0,xmmword ptr [R14] MOVUPS XMM1,xmmword ptr [R14 + 0x10] MOVAPS xmmword ptr [RBP + -0xa40],XMM1 MOVAPS xmmword ptr [RBP + -0xa50],XMM0 MOV RSI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x14] ADD EDX,dword ptr [R14 + 0x10] LEA RDI,[RBP + -0xa10] MOV ECX,0x9d3 CALL 0x0012a400 LAB_001566c7: LEA R12,[R12 + R13*0x8] LEA RDX,[RBP + -0xa20] MOV RDI,RBX MOV RSI,R14 MOV ECX,R15D CALL 0x001567e4 CMP byte ptr [RBP + -0xa11],0x0 JZ 0x00156736 TEST AL,AL JNZ 0x00156736 MOVAPS XMM0,xmmword ptr [RBP + -0xa50] MOVAPS XMM1,xmmword ptr [RBP + -0xa40] MOVUPS xmmword ptr [R14],XMM0 MOVUPS xmmword ptr [R14 + 0x10],XMM1 LEA RAX,[RBP + -0xa10] MOV qword ptr [R14],RAX MOV RCX,qword ptr [RBP + -0xa20] LEA R13,[RBP + -0xa28] MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 MOV R8,R13 CALL 0x00158d01 MOV R15D,EAX MOV RSI,qword ptr [R13] JMP 0x00156758 LAB_00156736: MOVZX R15D,AL MOV RAX,qword ptr [RBP + -0xa20] MOV qword ptr [R12],RAX CMP byte ptr [RBX + 0x67e],0x0 JZ 0x00156756 MOV RDI,RBX CALL 0x00141cb2 LAB_00156756: XOR ESI,ESI LAB_00156758: MOV RDI,RBX CALL 0x001405f8 MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x90],0x0 TEST R15D,R15D SETNZ R12B MOV RDI,qword ptr [RBX + 0x320] TEST RDI,RDI JZ 0x001567bb MOV R12B,0x1 TEST R15D,R15D JNZ 0x0015679f MOV RDI,RBX MOV RSI,R14 CALL 0x00160ab5 MOV R12D,EAX MOV RDI,qword ptr [RBX + 0x320] LAB_0015679f: CALL 0x00193034 MOV RDI,qword ptr [RBX + 0x320] CALL 0x001a4926 MOV qword ptr [RBX + 0x320],0x0 LAB_001567bb: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001567df MOV EAX,R12D ADD RSP,0xa28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001567df: CALL 0x0012a240
ulong _ma_ck_write_btree(long *param_1,long *param_2) { int8 *puVar1; uint uVar2; byte bVar3; uint uVar4; int8 uVar5; long lVar6; ulong uVar7; long in_FS_OFFSET; int4 local_a58; int4 uStack_a54; int4 uStack_a50; int4 uStack_a4c; int4 local_a48; int4 uStack_a44; int4 uStack_a40; int4 uStack_a3c; int8 local_a30; int8 local_a28; char local_a19; int1 local_a18 [2528]; long local_38; int7 uVar8; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar6 = *(long *)(*param_1 + 0x118); uVar7 = (ulong)*(byte *)(param_2[1] + 0xa5); uVar4 = *(uint *)(param_2 + 3); uVar2 = *(uint *)(param_2[1] + 0xb4); local_a30 = 0; local_a28 = *(int8 *)(lVar6 + uVar7 * 8); local_a19 = *(char *)(*param_1 + 0x7e7); if (local_a19 != '\0') { local_a58 = (int4)*param_2; uStack_a54 = *(int4 *)((long)param_2 + 4); uStack_a50 = (int4)param_2[1]; uStack_a4c = *(int4 *)((long)param_2 + 0xc); local_a48 = (int4)param_2[2]; uStack_a44 = *(int4 *)((long)param_2 + 0x14); uStack_a40 = (int4)param_2[3]; uStack_a3c = *(int4 *)((long)param_2 + 0x1c); __memcpy_chk(local_a18,*param_2,*(int *)((long)param_2 + 0x14) + (int)param_2[2],0x9d3); } puVar1 = (int8 *)(lVar6 + uVar7 * 8); bVar3 = _ma_ck_real_write_btree(param_1,param_2,&local_a28,uVar4 | uVar2); if ((local_a19 == '\0') || (bVar3 != 0)) { uVar4 = (uint)bVar3; *puVar1 = local_a28; if (*(char *)((long)param_1 + 0x67e) != '\0') { _ma_unlock_key_del(param_1); } uVar5 = 0; } else { *(int4 *)param_2 = local_a58; *(int4 *)((long)param_2 + 4) = uStack_a54; *(int4 *)(param_2 + 1) = uStack_a50; *(int4 *)((long)param_2 + 0xc) = uStack_a4c; *(int4 *)(param_2 + 2) = local_a48; *(int4 *)((long)param_2 + 0x14) = uStack_a44; *(int4 *)(param_2 + 3) = uStack_a40; *(int4 *)((long)param_2 + 0x1c) = uStack_a3c; *param_2 = (long)local_a18; uVar4 = _ma_write_undo_key_insert(param_1,param_2,puVar1,local_a28,&local_a30); uVar5 = local_a30; } _ma_unpin_all_pages(param_1,uVar5); *(int8 *)(param_1[1] + 0x90) = 0; uVar8 = (int7)((ulong)puVar1 >> 8); uVar7 = CONCAT71(uVar8,uVar4 != 0); lVar6 = param_1[100]; if (lVar6 != 0) { uVar7 = CONCAT71(uVar8,1); if (uVar4 == 0) { uVar4 = _ma_ft_convert_to_ft2(param_1,param_2); uVar7 = (ulong)uVar4; lVar6 = param_1[100]; } delete_dynamic(lVar6); my_free(param_1[100]); param_1[100] = 0; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar7 & 0xffffffff; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
17,164
google::protobuf::FileOptions::SharedCtor(google::protobuf::Arena*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
inline void FileOptions::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} , decltype(_impl_.uninterpreted_option_){arena} , decltype(_impl_.java_package_){} , decltype(_impl_.java_outer_classname_){} , decltype(_impl_.go_package_){} , decltype(_impl_.objc_class_prefix_){} , decltype(_impl_.csharp_namespace_){} , decltype(_impl_.swift_prefix_){} , decltype(_impl_.php_class_prefix_){} , decltype(_impl_.php_namespace_){} , decltype(_impl_.php_metadata_namespace_){} , decltype(_impl_.ruby_package_){} , decltype(_impl_.java_multiple_files_){false} , decltype(_impl_.java_generate_equals_and_hash_){false} , decltype(_impl_.java_string_check_utf8_){false} , decltype(_impl_.cc_generic_services_){false} , decltype(_impl_.java_generic_services_){false} , decltype(_impl_.py_generic_services_){false} , decltype(_impl_.php_generic_services_){false} , decltype(_impl_.deprecated_){false} , decltype(_impl_.optimize_for_){1} , decltype(_impl_.cc_enable_arenas_){true} }; _impl_.java_package_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.java_package_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.java_outer_classname_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.java_outer_classname_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.go_package_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.go_package_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.objc_class_prefix_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.objc_class_prefix_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.csharp_namespace_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.csharp_namespace_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.swift_prefix_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.swift_prefix_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.php_class_prefix_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.php_class_prefix_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.php_namespace_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.php_namespace_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.php_metadata_namespace_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.php_metadata_namespace_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.ruby_package_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.ruby_package_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING }
O0
cpp
google::protobuf::FileOptions::SharedCtor(google::protobuf::Arena*, bool): subq $0x58, %rsp movb %dl, %al movq %rdi, 0x48(%rsp) movq %rsi, 0x40(%rsp) andb $0x1, %al movb %al, 0x3f(%rsp) movq 0x48(%rsp), %rdi movq %rdi, 0x8(%rsp) addq $0x10, %rdi movq %rdi, 0x10(%rsp) movq 0x40(%rsp), %rsi callq 0x53a960 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x18(%rsp) movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq 0x18(%rsp), %rcx movl $0x0, (%rax) addq $0x4, %rax cmpq %rcx, %rax movq %rax, 0x20(%rsp) jne 0x5360d7 jmp 0x5360f7 movq 0x10(%rsp), %rax movq %rax, %rdi addq $0x1c, %rdi movl $0x0, 0x1c(%rax) callq 0x3b6830 movq 0x10(%rsp), %rdi addq $0x20, %rdi movq 0x40(%rsp), %rsi callq 0x53a980 jmp 0x536124 movq 0x10(%rsp), %rdi addq $0x38, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x40, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x48, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x50, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x58, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x60, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x68, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x70, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x78, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rdi addq $0x80, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x1914a0 movq 0x10(%rsp), %rax movq 0x8(%rsp), %rdi movb $0x0, 0x88(%rax) movb $0x0, 0x89(%rax) movb $0x0, 0x8a(%rax) movb $0x0, 0x8b(%rax) movb $0x0, 0x8c(%rax) movb $0x0, 0x8d(%rax) movb $0x0, 0x8e(%rax) movb $0x0, 0x8f(%rax) movl $0x1, 0x90(%rax) movb $0x1, 0x94(%rax) addq $0x10, %rdi addq $0x38, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x40, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x48, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x50, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x58, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x60, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x68, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x70, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x78, %rdi callq 0x3b6850 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x80, %rdi callq 0x3b6850 addq $0x58, %rsp retq movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) callq 0x469320 movq 0x30(%rsp), %rdi callq 0x198ce0 nopw %cs:(%rax,%rax) nop
_ZN6google8protobuf11FileOptions10SharedCtorEPNS0_5ArenaEb: sub rsp, 58h mov al, dl mov [rsp+58h+var_10], rdi mov [rsp+58h+var_18], rsi and al, 1 mov [rsp+58h+var_19], al mov rdi, [rsp+58h+var_10] mov [rsp+58h+var_50], rdi add rdi, 10h mov [rsp+58h+var_48], rdi mov rsi, [rsp+58h+var_18] call _ZN6google8protobuf8internal12ExtensionSetC2ENS1_16ArenaInitializedEPNS0_5ArenaE; google::protobuf::internal::ExtensionSet::ExtensionSet(google::protobuf::internal::ArenaInitialized,google::protobuf::Arena *) mov rax, [rsp+58h+var_48] add rax, 18h mov [rsp+58h+var_8], rax mov rax, [rsp+58h+var_8] mov rcx, rax add rcx, 4 mov [rsp+58h+var_40], rcx mov [rsp+58h+var_38], rax loc_5360D7: mov rax, [rsp+58h+var_38] mov rcx, [rsp+58h+var_40] mov dword ptr [rax], 0 add rax, 4 cmp rax, rcx mov [rsp+58h+var_38], rax jnz short loc_5360D7 jmp short $+2 loc_5360F7: mov rax, [rsp+58h+var_48] mov rdi, rax add rdi, 1Ch; this mov dword ptr [rax+1Ch], 0 call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void) mov rdi, [rsp+58h+var_48] add rdi, 20h ; ' ' mov rsi, [rsp+58h+var_18] call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField(google::protobuf::Arena *) jmp short $+2 loc_536124: mov rdi, [rsp+58h+var_48] add rdi, 38h ; '8' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 40h ; '@' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 48h ; 'H' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 50h ; 'P' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 58h ; 'X' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 60h ; '`' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 68h ; 'h' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 70h ; 'p' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 78h ; 'x' xor esi, esi mov edx, 8 call _memset mov rdi, [rsp+58h+var_48] add rdi, 80h xor esi, esi mov edx, 8 call _memset mov rax, [rsp+58h+var_48] mov rdi, [rsp+58h+var_50] mov byte ptr [rax+88h], 0 mov byte ptr [rax+89h], 0 mov byte ptr [rax+8Ah], 0 mov byte ptr [rax+8Bh], 0 mov byte ptr [rax+8Ch], 0 mov byte ptr [rax+8Dh], 0 mov byte ptr [rax+8Eh], 0 mov byte ptr [rax+8Fh], 0 mov dword ptr [rax+90h], 1 mov byte ptr [rax+94h], 1 add rdi, 10h add rdi, 38h ; '8'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 40h ; '@'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 48h ; 'H'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 50h ; 'P'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 58h ; 'X'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 60h ; '`'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 68h ; 'h'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 70h ; 'p'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 78h ; 'x'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) mov rdi, [rsp+58h+var_50] add rdi, 10h add rdi, 80h; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) add rsp, 58h retn mov rdi, [rsp+arg_8]; this mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax call _ZN6google8protobuf8internal12ExtensionSetD2Ev; google::protobuf::internal::ExtensionSet::~ExtensionSet() mov rdi, [rsp+arg_28] call __Unwind_Resume
google::protobuf::internal::ArenaStringPtr * google::protobuf::FileOptions::SharedCtor( google::protobuf::FileOptions *this, google::protobuf::Arena *a2) { google::protobuf::FileOptions *v3; // [rsp+20h] [rbp-38h] google::protobuf::internal::ExtensionSet::ExtensionSet((char *)this + 16, a2); v3 = (google::protobuf::FileOptions *)((char *)this + 40); do { *(_DWORD *)v3 = 0; v3 = (google::protobuf::FileOptions *)((char *)v3 + 4); } while ( v3 != (google::protobuf::FileOptions *)((char *)this + 44) ); *((_DWORD *)this + 11) = 0; google::protobuf::internal::CachedSize::CachedSize((google::protobuf::FileOptions *)((char *)this + 44)); google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField((char *)this + 48, a2); memset((char *)this + 72, 0LL, 8LL); memset((char *)this + 80, 0LL, 8LL); memset((char *)this + 88, 0LL, 8LL); memset((char *)this + 96, 0LL, 8LL); memset((char *)this + 104, 0LL, 8LL); memset((char *)this + 112, 0LL, 8LL); memset((char *)this + 120, 0LL, 8LL); memset((char *)this + 128, 0LL, 8LL); memset((char *)this + 136, 0LL, 8LL); memset((char *)this + 144, 0LL, 8LL); *((_BYTE *)this + 152) = 0; *((_BYTE *)this + 153) = 0; *((_BYTE *)this + 154) = 0; *((_BYTE *)this + 155) = 0; *((_BYTE *)this + 156) = 0; *((_BYTE *)this + 157) = 0; *((_BYTE *)this + 158) = 0; *((_BYTE *)this + 159) = 0; *((_DWORD *)this + 40) = 1; *((_BYTE *)this + 164) = 1; google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 72)); google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 80)); google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 88)); google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 96)); google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 104)); google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 112)); google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 120)); google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 128)); google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 136)); return google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::FileOptions *)((char *)this + 144)); }
IsEmpty: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x8] CALL 0x005363e0 MOV RDI,RAX CALL 0x004e47e0 AND AL,0x1 ADD RSP,0x18 RET
/* google::protobuf::internal::RepeatedFieldWrapper<double>::IsEmpty(void const*) const */ byte __thiscall google::protobuf::internal::RepeatedFieldWrapper<double>::IsEmpty (RepeatedFieldWrapper<double> *this,void *param_1) { RepeatedField<double> *this_00; byte bVar1; this_00 = (RepeatedField<double> *)GetRepeatedField(param_1); bVar1 = RepeatedField<double>::empty(this_00); return bVar1 & 1; }
17,165
Workspaces::exec()
mihussein[P]Hlemon/src/workspaces.cpp
void Workspaces::exec() { FILE *pipe = popen("bspc subscribe", "r"); if (!pipe) { std::cerr << "Failed to run bspc subscribe command." << std::endl; return; } char buffer[256]; while (fgets(buffer, sizeof(buffer), pipe)) { workspaceEvent = buffer; if (!workspaceEvent.empty() && workspaceEvent.back() == '\n') { workspaceEvent.pop_back(); } std::vector<std::string> workspaces = parseString(workspaceEvent.substr(1)); checkWorkspaceStatus(workspaces); updateLemonbar(lemonOutput()); } pclose(pipe); }
O1
cpp
Workspaces::exec(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x168, %rsp # imm = 0x168 movq %rdi, %rbx leaq 0x48fb(%rip), %rdi # 0xc510 leaq 0x4ae6(%rip), %rsi # 0xc702 callq 0x40e0 testq %rax, %rax je 0x7d46 movq %rax, %r14 leaq 0x60(%rsp), %rdi movl $0x100, %esi # imm = 0x100 movq %rax, %rdx callq 0x45b0 testq %rax, %rax je 0x7d2c leaq 0x60(%rsp), %r15 leaq 0x48(%rsp), %r13 leaq 0x8(%rsp), %rbp movq 0x8(%rbx), %r12 movq %r15, %rdi callq 0x4190 movq %rbx, %rdi xorl %esi, %esi movq %r12, %rdx movq %r15, %rcx movq %rax, %r8 callq 0x4570 movq 0x8(%rbx), %rax testq %rax, %rax je 0x7c91 movq (%rbx), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0x7c91 movq %rbx, %rdi callq 0x4460 movl $0x1, %edx leaq 0x28(%rsp), %r12 movq %r12, %rdi movq %rbx, %rsi movq $-0x1, %rcx callq 0x43a0 movq %r13, %rdi movq %r12, %rdx callq 0x7df2 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x7cd4 movq 0x38(%rsp), %rsi incq %rsi callq 0x4380 movq %rbx, %rdi movq %r13, %rsi callq 0x7f56 movq %rbp, %rdi callq 0x674a movq %rbp, %rdi callq 0x671b movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x7d0b movq 0x18(%rsp), %rsi incq %rsi callq 0x4380 movq %r13, %rdi callq 0x9580 movq %r15, %rdi movl $0x100, %esi # imm = 0x100 movq %r14, %rdx callq 0x45b0 testq %rax, %rax jne 0x7c57 movq %r14, %rdi callq 0x4500 addq $0x168, %rsp # imm = 0x168 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x829b(%rip), %rbx # 0xffe8 leaq 0x47cb(%rip), %rsi # 0xc51f movl $0x25, %edx movq %rbx, %rdi callq 0x43e0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x4340 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi addq $0x168, %rsp # imm = 0x168 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x4260 movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x7dea movq 0x38(%rsp), %rsi incq %rsi callq 0x4380 jmp 0x7dea jmp 0x7dbc movq %rax, %rbx jmp 0x7de0 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x7de0 movq 0x18(%rsp), %rsi incq %rsi callq 0x4380 leaq 0x48(%rsp), %rdi callq 0x9580 movq %rbx, %rdi callq 0x4660
_ZN10Workspaces4execEv: push rbp; __int64 push r15; int push r14; void * push r13; int push r12; __int64 push rbx; int sub rsp, 168h mov rbx, rdi lea rdi, aBspcSubscribe; "bspc subscribe" lea rsi, aMaster+5; "r" call _popen test rax, rax jz loc_7D46 mov r14, rax lea rdi, [rsp+198h+var_138] mov esi, 100h mov rdx, rax call _fgets test rax, rax jz loc_7D2C lea r15, [rsp+198h+var_138] lea r13, [rsp+198h+var_150] lea rbp, [rsp+198h+var_190] loc_7C57: mov r12, [rbx+8] mov rdi, r15 call _strlen mov rdi, rbx xor esi, esi mov rdx, r12 mov rcx, r15 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rax, [rbx+8] test rax, rax jz short loc_7C91 mov rcx, [rbx] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_7C91 mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void) loc_7C91: mov edx, 1 lea r12, [rsp+198h+var_170] mov rdi, r12 mov rsi, rbx mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, r13; int mov rdx, r12; int call _ZN10Workspaces11parseStringENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Workspaces::parseString(std::string) mov rdi, [rsp+198h+var_170]; void * lea rax, [rsp+198h+var_160] cmp rdi, rax jz short loc_7CD4 mov rsi, [rsp+198h+var_160] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7CD4: mov rdi, rbx mov rsi, r13 call _ZN10Workspaces20checkWorkspaceStatusERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; Workspaces::checkWorkspaceStatus(std::vector<std::string> const&) mov rdi, rbp; int call _Z11lemonOutputB5cxx11v; lemonOutput(void) mov rdi, rbp call _Z14updateLemonbarRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; updateLemonbar(std::string const&) mov rdi, [rsp+198h+var_190]; void * lea rax, [rsp+198h+var_180] cmp rdi, rax jz short loc_7D0B mov rsi, [rsp+198h+var_180] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7D0B: mov rdi, r13; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r15 mov esi, 100h mov rdx, r14 call _fgets test rax, rax jnz loc_7C57 loc_7D2C: mov rdi, r14 call _pclose add rsp, 168h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7D46: mov rbx, cs:_ZSt4cerr_ptr lea rsi, aFailedToRunBsp; "Failed to run bspc subscribe command." mov edx, 25h ; '%' mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx] mov rdi, [rax-18h] add rdi, rbx mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbx; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this add rsp, 168h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp __ZNSo5flushEv; std::ostream::flush(void) mov rbx, rax mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_7DEA mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7DEA jmp short $+2 loc_7DBC: mov rbx, rax jmp short loc_7DE0 mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_7DE0 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7DE0: lea rdi, [rsp+arg_40]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_7DEA: mov rdi, rbx call __Unwind_Resume
long long Workspaces::exec(Workspaces *this) { long long v1; // rax long long v2; // r14 long long v3; // r12 long long v4; // rax long long v5; // rax int v6; // ecx int v7; // r8d int v8; // r9d char v10; // al std::ostream *v11; // rax int v12; // [rsp+0h] [rbp-198h] void *v13; // [rsp+8h] [rbp-190h] BYREF int v14; // [rsp+10h] [rbp-188h] void *v15; // [rsp+18h] [rbp-180h] BYREF int v16; // [rsp+20h] [rbp-178h] void *v17; // [rsp+28h] [rbp-170h] BYREF int v18; // [rsp+30h] [rbp-168h] long long v19; // [rsp+38h] [rbp-160h] BYREF int v20; // [rsp+40h] [rbp-158h] int v21[6]; // [rsp+48h] [rbp-150h] BYREF int v22[20]; // [rsp+60h] [rbp-138h] BYREF char v23; // [rsp+B0h] [rbp-E8h] v1 = popen("bspc subscribe", "r"); if ( v1 ) { v2 = v1; while ( fgets(v22, 256LL, v2) ) { v3 = *((_QWORD *)this + 1); v4 = strlen(v22); std::string::_M_replace(this, 0LL, v3, v22, v4); v5 = *((_QWORD *)this + 1); if ( v5 && *(_BYTE *)(*(_QWORD *)this + v5 - 1) == 10 ) std::string::pop_back(this); std::string::substr(&v17, this, 1LL, -1LL); Workspaces::parseString( (int)v21, (int)this, (int)&v17, v6, v7, v8, v12, (int)v13, v14, v15, v16, (long long)v17, v18, v19, v20, v21[0], v21[2], v21[4], v22[0], v22[2], v22[4], v22[6], v22[8], v22[10], v22[12], v22[14], v22[16], v22[18], v23); if ( v17 != &v19 ) operator delete(v17, v19 + 1); Workspaces::checkWorkspaceStatus(this, v21); lemonOutput[abi:cxx11]((long long)&v13); updateLemonbar((const char **)&v13); if ( v13 != &v15 ) operator delete(v13, (unsigned long long)v15 + 1); std::vector<std::string>::~vector(v21); } return pclose(v2); } else { std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Failed to run bspc subscribe command.", 37LL); v10 = std::ios::widen((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL), 10LL); v11 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v10); return std::ostream::flush(v11); } }
exec: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x168 MOV RBX,RDI LEA RDI,[0x10c510] LEA RSI,[0x10c702] CALL 0x001040e0 TEST RAX,RAX JZ 0x00107d46 MOV R14,RAX LEA RDI,[RSP + 0x60] MOV ESI,0x100 MOV RDX,RAX CALL 0x001045b0 TEST RAX,RAX JZ 0x00107d2c LEA R15,[RSP + 0x60] LEA R13,[RSP + 0x48] LEA RBP,[RSP + 0x8] LAB_00107c57: MOV R12,qword ptr [RBX + 0x8] MOV RDI,R15 CALL 0x00104190 MOV RDI,RBX XOR ESI,ESI MOV RDX,R12 MOV RCX,R15 MOV R8,RAX CALL 0x00104570 MOV RAX,qword ptr [RBX + 0x8] TEST RAX,RAX JZ 0x00107c91 MOV RCX,qword ptr [RBX] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x00107c91 MOV RDI,RBX CALL 0x00104460 LAB_00107c91: MOV EDX,0x1 LEA R12,[RSP + 0x28] MOV RDI,R12 MOV RSI,RBX MOV RCX,-0x1 CALL 0x001043a0 LAB_00107cad: MOV RDI,R13 MOV RDX,R12 CALL 0x00107df2 MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x00107cd4 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00104380 LAB_00107cd4: MOV RDI,RBX MOV RSI,R13 CALL 0x00107f56 LAB_00107cdf: MOV RDI,RBP CALL 0x0010674a LAB_00107ce7: MOV RDI,RBP CALL 0x0010671b LAB_00107cef: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00107d0b MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00104380 LAB_00107d0b: MOV RDI,R13 CALL 0x00109580 MOV RDI,R15 MOV ESI,0x100 MOV RDX,R14 CALL 0x001045b0 TEST RAX,RAX JNZ 0x00107c57 LAB_00107d2c: MOV RDI,R14 CALL 0x00104500 ADD RSP,0x168 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00107d46: MOV RBX,qword ptr [0x0010ffe8] LEA RSI,[0x10c51f] MOV EDX,0x25 MOV RDI,RBX CALL 0x001043e0 MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBX MOV ESI,0xa CALL 0x00104340 MOVSX ESI,AL MOV RDI,RBX CALL 0x00104030 MOV RDI,RAX ADD RSP,0x168 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00104260
/* Workspaces::exec() */ void __thiscall Workspaces::exec(Workspaces *this) { char cVar1; int *puVar2; FILE *__stream; char *pcVar3; long *local_190 [2]; long local_180 [2]; long *local_170 [2]; long local_160 [2]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_150 [24]; char local_138 [264]; __stream = popen("bspc subscribe","r"); puVar2 = PTR_cerr_0010ffe8; if (__stream != (FILE *)0x0) { pcVar3 = fgets(local_138,0x100,__stream); if (pcVar3 != (char *)0x0) { do { pcVar3 = *(char **)(this + 8); strlen(local_138); std::__cxx11::string::_M_replace((ulong)this,0,pcVar3,(ulong)local_138); if ((*(long *)(this + 8) != 0) && (*(char *)(*(long *)this + -1 + *(long *)(this + 8)) == '\n')) { std::__cxx11::string::pop_back(); } std::__cxx11::string::substr((ulong)local_170,(ulong)this); /* try { // try from 00107cad to 00107cb7 has its CatchHandler @ 00107d99 */ parseString(local_150); if (local_170[0] != local_160) { operator_delete(local_170[0],local_160[0] + 1); } /* try { // try from 00107cd4 to 00107cde has its CatchHandler @ 00107dba */ checkWorkspaceStatus(this,(vector *)local_150); /* try { // try from 00107cdf to 00107ce6 has its CatchHandler @ 00107dbc */ lemonOutput_abi_cxx11_(); /* try { // try from 00107ce7 to 00107cee has its CatchHandler @ 00107dc1 */ updateLemonbar((string *)local_190); if (local_190[0] != local_180) { operator_delete(local_190[0],local_180[0] + 1); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_150); pcVar3 = fgets(local_138,0x100,__stream); } while (pcVar3 != (char *)0x0); } pclose(__stream); return; } std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_0010ffe8,"Failed to run bspc subscribe command.",0x25); cVar1 = (char)puVar2; std::ios::widen((char)*(int8 *)(*(long *)puVar2 + -0x18) + cVar1); std::ostream::put(cVar1); std::ostream::flush(); return; }
17,166
Workspaces::exec()
mihussein[P]Hlemon/src/workspaces.cpp
void Workspaces::exec() { FILE *pipe = popen("bspc subscribe", "r"); if (!pipe) { std::cerr << "Failed to run bspc subscribe command." << std::endl; return; } char buffer[256]; while (fgets(buffer, sizeof(buffer), pipe)) { workspaceEvent = buffer; if (!workspaceEvent.empty() && workspaceEvent.back() == '\n') { workspaceEvent.pop_back(); } std::vector<std::string> workspaces = parseString(workspaceEvent.substr(1)); checkWorkspaceStatus(workspaces); updateLemonbar(lemonOutput()); } pclose(pipe); }
O3
cpp
Workspaces::exec(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x168, %rsp # imm = 0x168 movq %rdi, %rbx leaq 0x4b43(%rip), %rdi # 0xc510 leaq 0x4d2e(%rip), %rsi # 0xc702 callq 0x40e0 testq %rax, %rax je 0x7afe movq %rax, %r14 leaq 0x60(%rsp), %rdi movl $0x100, %esi # imm = 0x100 movq %rax, %rdx callq 0x45b0 testq %rax, %rax je 0x7ae4 leaq 0x60(%rsp), %r15 leaq 0x48(%rsp), %r13 leaq 0x8(%rsp), %rbp movq 0x8(%rbx), %r12 movq %r15, %rdi callq 0x4190 movq %rbx, %rdi xorl %esi, %esi movq %r12, %rdx movq %r15, %rcx movq %rax, %r8 callq 0x4570 movq 0x8(%rbx), %rax testq %rax, %rax je 0x7a49 movq (%rbx), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0x7a49 movq %rbx, %rdi callq 0x4460 movl $0x1, %edx leaq 0x28(%rsp), %r12 movq %r12, %rdi movq %rbx, %rsi movq $-0x1, %rcx callq 0x43a0 movq %r13, %rdi movq %r12, %rdx callq 0x7baa movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x7a8c movq 0x38(%rsp), %rsi incq %rsi callq 0x4380 movq %rbx, %rdi movq %r13, %rsi callq 0x7d0e movq %rbp, %rdi callq 0x6506 movq %rbp, %rdi callq 0x64d7 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x7ac3 movq 0x18(%rsp), %rsi incq %rsi callq 0x4380 movq %r13, %rdi callq 0x9302 movq %r15, %rdi movl $0x100, %esi # imm = 0x100 movq %r14, %rdx callq 0x45b0 testq %rax, %rax jne 0x7a0f movq %r14, %rdi callq 0x4500 addq $0x168, %rsp # imm = 0x168 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x84e3(%rip), %rbx # 0xffe8 leaq 0x4a13(%rip), %rsi # 0xc51f movl $0x25, %edx movq %rbx, %rdi callq 0x43e0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x4340 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi addq $0x168, %rsp # imm = 0x168 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x4260 movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x7ba2 movq 0x38(%rsp), %rsi incq %rsi callq 0x4380 jmp 0x7ba2 jmp 0x7b74 movq %rax, %rbx jmp 0x7b98 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x7b98 movq 0x18(%rsp), %rsi incq %rsi callq 0x4380 leaq 0x48(%rsp), %rdi callq 0x9302 movq %rbx, %rdi callq 0x4660
_ZN10Workspaces4execEv: push rbp; __int64 push r15; int push r14; void * push r13; int push r12; __int64 push rbx; int sub rsp, 168h mov rbx, rdi lea rdi, aBspcSubscribe; "bspc subscribe" lea rsi, aMaster+5; "r" call _popen test rax, rax jz loc_7AFE mov r14, rax lea rdi, [rsp+198h+var_138] mov esi, 100h mov rdx, rax call _fgets test rax, rax jz loc_7AE4 lea r15, [rsp+198h+var_138] lea r13, [rsp+198h+var_150] lea rbp, [rsp+198h+var_190] loc_7A0F: mov r12, [rbx+8] mov rdi, r15 call _strlen mov rdi, rbx xor esi, esi mov rdx, r12 mov rcx, r15 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rax, [rbx+8] test rax, rax jz short loc_7A49 mov rcx, [rbx] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_7A49 mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void) loc_7A49: mov edx, 1 lea r12, [rsp+198h+var_170] mov rdi, r12 mov rsi, rbx mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, r13; int mov rdx, r12; int call _ZN10Workspaces11parseStringENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Workspaces::parseString(std::string) mov rdi, [rsp+198h+var_170]; void * lea rax, [rsp+198h+var_160] cmp rdi, rax jz short loc_7A8C mov rsi, [rsp+198h+var_160] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7A8C: mov rdi, rbx mov rsi, r13 call _ZN10Workspaces20checkWorkspaceStatusERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; Workspaces::checkWorkspaceStatus(std::vector<std::string> const&) mov rdi, rbp; int call _Z11lemonOutputB5cxx11v; lemonOutput(void) mov rdi, rbp call _Z14updateLemonbarRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; updateLemonbar(std::string const&) mov rdi, [rsp+198h+var_190]; void * lea rax, [rsp+198h+var_180] cmp rdi, rax jz short loc_7AC3 mov rsi, [rsp+198h+var_180] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7AC3: mov rdi, r13; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r15 mov esi, 100h mov rdx, r14 call _fgets test rax, rax jnz loc_7A0F loc_7AE4: mov rdi, r14 call _pclose add rsp, 168h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7AFE: mov rbx, cs:_ZSt4cerr_ptr lea rsi, aFailedToRunBsp; "Failed to run bspc subscribe command." mov edx, 25h ; '%' mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx] mov rdi, [rax-18h] add rdi, rbx mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbx; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this add rsp, 168h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp __ZNSo5flushEv; std::ostream::flush(void) mov rbx, rax mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_7BA2 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7BA2 jmp short $+2 loc_7B74: mov rbx, rax jmp short loc_7B98 mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_7B98 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7B98: lea rdi, [rsp+arg_40]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_7BA2: mov rdi, rbx call __Unwind_Resume
long long Workspaces::exec(Workspaces *this) { long long v1; // rax long long v2; // r14 long long v3; // r12 long long v4; // rax long long v5; // rax int v6; // ecx int v7; // r8d int v8; // r9d char v10; // al std::ostream *v11; // rax int v12; // [rsp+0h] [rbp-198h] void *v13; // [rsp+8h] [rbp-190h] BYREF int v14; // [rsp+10h] [rbp-188h] void *v15; // [rsp+18h] [rbp-180h] BYREF int v16; // [rsp+20h] [rbp-178h] void *v17; // [rsp+28h] [rbp-170h] BYREF int v18; // [rsp+30h] [rbp-168h] long long v19; // [rsp+38h] [rbp-160h] BYREF int v20; // [rsp+40h] [rbp-158h] int v21[6]; // [rsp+48h] [rbp-150h] BYREF int v22[20]; // [rsp+60h] [rbp-138h] BYREF char v23; // [rsp+B0h] [rbp-E8h] v1 = popen("bspc subscribe", "r"); if ( v1 ) { v2 = v1; while ( fgets(v22, 256LL, v2) ) { v3 = *((_QWORD *)this + 1); v4 = strlen(v22); std::string::_M_replace(this, 0LL, v3, v22, v4); v5 = *((_QWORD *)this + 1); if ( v5 && *(_BYTE *)(*(_QWORD *)this + v5 - 1) == 10 ) std::string::pop_back(this); std::string::substr(&v17, this, 1LL, -1LL); Workspaces::parseString( (int)v21, (int)this, (int)&v17, v6, v7, v8, v12, (int)v13, v14, v15, v16, (long long)v17, v18, v19, v20, v21[0], v21[2], v21[4], v22[0], v22[2], v22[4], v22[6], v22[8], v22[10], v22[12], v22[14], v22[16], v22[18], v23); if ( v17 != &v19 ) operator delete(v17, v19 + 1); Workspaces::checkWorkspaceStatus(this, v21); lemonOutput[abi:cxx11]((long long)&v13); updateLemonbar((const char **)&v13); if ( v13 != &v15 ) operator delete(v13, (unsigned long long)v15 + 1); std::vector<std::string>::~vector(v21); } return pclose(v2); } else { std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Failed to run bspc subscribe command.", 37LL); v10 = std::ios::widen((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL), 10LL); v11 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v10); return std::ostream::flush(v11); } }
exec: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x168 MOV RBX,RDI LEA RDI,[0x10c510] LEA RSI,[0x10c702] CALL 0x001040e0 TEST RAX,RAX JZ 0x00107afe MOV R14,RAX LEA RDI,[RSP + 0x60] MOV ESI,0x100 MOV RDX,RAX CALL 0x001045b0 TEST RAX,RAX JZ 0x00107ae4 LEA R15,[RSP + 0x60] LEA R13,[RSP + 0x48] LEA RBP,[RSP + 0x8] LAB_00107a0f: MOV R12,qword ptr [RBX + 0x8] MOV RDI,R15 CALL 0x00104190 MOV RDI,RBX XOR ESI,ESI MOV RDX,R12 MOV RCX,R15 MOV R8,RAX CALL 0x00104570 MOV RAX,qword ptr [RBX + 0x8] TEST RAX,RAX JZ 0x00107a49 MOV RCX,qword ptr [RBX] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x00107a49 MOV RDI,RBX CALL 0x00104460 LAB_00107a49: MOV EDX,0x1 LEA R12,[RSP + 0x28] MOV RDI,R12 MOV RSI,RBX MOV RCX,-0x1 CALL 0x001043a0 LAB_00107a65: MOV RDI,R13 MOV RDX,R12 CALL 0x00107baa MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x00107a8c MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00104380 LAB_00107a8c: MOV RDI,RBX MOV RSI,R13 CALL 0x00107d0e LAB_00107a97: MOV RDI,RBP CALL 0x00106506 LAB_00107a9f: MOV RDI,RBP CALL 0x001064d7 LAB_00107aa7: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00107ac3 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00104380 LAB_00107ac3: MOV RDI,R13 CALL 0x00109302 MOV RDI,R15 MOV ESI,0x100 MOV RDX,R14 CALL 0x001045b0 TEST RAX,RAX JNZ 0x00107a0f LAB_00107ae4: MOV RDI,R14 CALL 0x00104500 ADD RSP,0x168 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00107afe: MOV RBX,qword ptr [0x0010ffe8] LEA RSI,[0x10c51f] MOV EDX,0x25 MOV RDI,RBX CALL 0x001043e0 MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBX MOV ESI,0xa CALL 0x00104340 MOVSX ESI,AL MOV RDI,RBX CALL 0x00104030 MOV RDI,RAX ADD RSP,0x168 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00104260
/* Workspaces::exec() */ void __thiscall Workspaces::exec(Workspaces *this) { char cVar1; int *puVar2; FILE *__stream; char *pcVar3; long *local_190 [2]; long local_180 [2]; long *local_170 [2]; long local_160 [2]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_150 [24]; char local_138 [264]; __stream = popen("bspc subscribe","r"); puVar2 = PTR_cerr_0010ffe8; if (__stream != (FILE *)0x0) { pcVar3 = fgets(local_138,0x100,__stream); if (pcVar3 != (char *)0x0) { do { pcVar3 = *(char **)(this + 8); strlen(local_138); std::__cxx11::string::_M_replace((ulong)this,0,pcVar3,(ulong)local_138); if ((*(long *)(this + 8) != 0) && (*(char *)(*(long *)this + -1 + *(long *)(this + 8)) == '\n')) { std::__cxx11::string::pop_back(); } std::__cxx11::string::substr((ulong)local_170,(ulong)this); /* try { // try from 00107a65 to 00107a6f has its CatchHandler @ 00107b51 */ parseString(local_150); if (local_170[0] != local_160) { operator_delete(local_170[0],local_160[0] + 1); } /* try { // try from 00107a8c to 00107a96 has its CatchHandler @ 00107b72 */ checkWorkspaceStatus(this,(vector *)local_150); /* try { // try from 00107a97 to 00107a9e has its CatchHandler @ 00107b74 */ lemonOutput_abi_cxx11_(); /* try { // try from 00107a9f to 00107aa6 has its CatchHandler @ 00107b79 */ updateLemonbar((string *)local_190); if (local_190[0] != local_180) { operator_delete(local_190[0],local_180[0] + 1); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_150); pcVar3 = fgets(local_138,0x100,__stream); } while (pcVar3 != (char *)0x0); } pclose(__stream); return; } std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_0010ffe8,"Failed to run bspc subscribe command.",0x25); cVar1 = (char)puVar2; std::ios::widen((char)*(int8 *)(*(long *)puVar2 + -0x18) + cVar1); std::ostream::put(cVar1); std::ostream::flush(); return; }
17,167
my_xml_leave
eloqsql/strings/xml.c
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen) { char *e, *tag; size_t glen; char s[32]; char g[32]; int rc; /* Find previous '/' or beginning */ for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--); glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e); tag= e[0] == '/' ? e + 1 : e; if (str && (slen != glen || memcmp(str, tag, slen))) { mstr(s,str,sizeof(s)-1,slen); if (glen) { mstr(g, tag, sizeof(g)-1, glen); sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g); } else sprintf(p->errstr,"'</%s>' unexpected (END-OF-INPUT wanted)", s); return MY_XML_ERROR; } if (p->flags & MY_XML_FLAG_RELATIVE_NAMES) rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK; else rc= (p->leave_xml ? p->leave_xml(p, p->attr.start, p->attr.end - p->attr.start) : MY_XML_OK); *e='\0'; p->attr.end= e; return rc; }
O3
c
my_xml_leave: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x118(%rdi), %r13 movq 0x120(%rdi), %rax movq %rax, %rdx movq %rax, %r12 subq %r13, %rdx movq %rdi, -0x78(%rbp) jbe 0xd7bd4 movq %rax, %r12 cmpb $0x2f, (%r12) je 0xd7bdb decq %r12 cmpq %r13, %r12 ja 0xd7bc2 movq %r13, %r12 cmpb $0x2f, (%r12) jne 0xd7bec movq %r12, %rbx notq %rbx addq %rax, %rbx movl $0x1, %r15d jmp 0xd7bf5 subq %r12, %rax xorl %r15d, %r15d movq %rax, %rbx testq %rsi, %rsi je 0xd7cb4 addq %r12, %r15 cmpq %r14, %rbx jne 0xd7c32 movq %rsi, %rdi movq %rsi, -0x88(%rbp) movq %r15, %rsi movq %rdx, -0x80(%rbp) movq %r14, %rdx callq 0x29560 movq -0x80(%rbp), %rdx movq -0x88(%rbp), %rsi testl %eax, %eax je 0xd7cb4 cmpq $0x1f, %r14 movl $0x1f, %r12d cmovaeq %r12, %r14 leaq -0x50(%rbp), %rdi movl $0x20, %ecx movq %r14, %rdx callq 0x29410 movb $0x0, -0x50(%rbp,%r14) testq %rbx, %rbx je 0xd7ce3 cmpq $0x1f, %rbx cmovbq %rbx, %r12 leaq -0x70(%rbp), %r13 movl $0x20, %ecx movq %r13, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x29410 movb $0x0, -0x70(%rbp,%r12) movq -0x78(%rbp), %rdi addq $0x8, %rdi leaq 0x8e67(%rip), %rcx # 0xe0afb movl $0x1, %r14d leaq -0x50(%rbp), %r8 movl $0x80, %edx movl $0x1, %esi movq %r13, %r9 xorl %eax, %eax callq 0x29950 jmp 0xd7d1e movq -0x78(%rbp), %rbx testb $0x1, (%rbx) movq 0x158(%rbx), %rax jne 0xd7cd1 testq %rax, %rax je 0xd7d0f movq %rbx, %rdi movq %r13, %rsi jmp 0xd7cdc testq %rax, %rax je 0xd7d0f movq %rbx, %rdi movq %r14, %rdx callq *%rax movl %eax, %r14d jmp 0xd7d12 movq -0x78(%rbp), %rdi addq $0x8, %rdi leaq 0x8e2d(%rip), %rcx # 0xe0b1f movl $0x1, %r14d leaq -0x50(%rbp), %r8 movl $0x80, %edx movl $0x1, %esi xorl %eax, %eax callq 0x29950 jmp 0xd7d1e xorl %r14d, %r14d movb $0x0, (%r12) movq %r12, 0x120(%rbx) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xd7d3f movl %r14d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29250
my_xml_leave: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov rax, fs:28h mov [rbp+var_30], rax mov r13, [rdi+118h] mov rax, [rdi+120h] mov rdx, rax mov r12, rax sub rdx, r13 mov [rbp+var_78], rdi jbe short loc_D7BD4 mov r12, rax loc_D7BC2: cmp byte ptr [r12], 2Fh ; '/' jz short loc_D7BDB dec r12 cmp r12, r13 ja short loc_D7BC2 mov r12, r13 loc_D7BD4: cmp byte ptr [r12], 2Fh ; '/' jnz short loc_D7BEC loc_D7BDB: mov rbx, r12 not rbx add rbx, rax mov r15d, 1 jmp short loc_D7BF5 loc_D7BEC: sub rax, r12 xor r15d, r15d mov rbx, rax loc_D7BF5: test rsi, rsi jz loc_D7CB4 add r15, r12 cmp rbx, r14 jnz short loc_D7C32 mov rdi, rsi mov [rbp+var_88], rsi mov rsi, r15 mov [rbp+var_80], rdx mov rdx, r14 call _bcmp mov rdx, [rbp+var_80] mov rsi, [rbp+var_88] test eax, eax jz loc_D7CB4 loc_D7C32: cmp r14, 1Fh mov r12d, 1Fh cmovnb r14, r12 lea rdi, [rbp+var_50] mov ecx, 20h ; ' ' mov rdx, r14 call ___memcpy_chk mov [rbp+r14+var_50], 0 test rbx, rbx jz loc_D7CE3 cmp rbx, 1Fh cmovb r12, rbx lea r13, [rbp+var_70] mov ecx, 20h ; ' ' mov rdi, r13 mov rsi, r15 mov rdx, r12 call ___memcpy_chk mov [rbp+r12+var_70], 0 mov rdi, [rbp+var_78] add rdi, 8 lea rcx, aSUnexpectedSWa; "'</%s>' unexpected ('</%s>' wanted)" mov r14d, 1 lea r8, [rbp+var_50] mov edx, 80h mov esi, 1 mov r9, r13 xor eax, eax call ___sprintf_chk jmp short loc_D7D1E loc_D7CB4: mov rbx, [rbp+var_78] test byte ptr [rbx], 1 mov rax, [rbx+158h] jnz short loc_D7CD1 test rax, rax jz short loc_D7D0F mov rdi, rbx mov rsi, r13 jmp short loc_D7CDC loc_D7CD1: test rax, rax jz short loc_D7D0F mov rdi, rbx mov rdx, r14 loc_D7CDC: call rax mov r14d, eax jmp short loc_D7D12 loc_D7CE3: mov rdi, [rbp+var_78] add rdi, 8 lea rcx, aSUnexpectedEnd; "'</%s>' unexpected (END-OF-INPUT wanted"... mov r14d, 1 lea r8, [rbp+var_50] mov edx, 80h mov esi, 1 xor eax, eax call ___sprintf_chk jmp short loc_D7D1E loc_D7D0F: xor r14d, r14d loc_D7D12: mov byte ptr [r12], 0 mov [rbx+120h], r12 loc_D7D1E: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_D7D3F mov eax, r14d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D7D3F: call ___stack_chk_fail
long long my_xml_leave(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // r13 _BYTE *v5; // rax unsigned long long v6; // r12 unsigned long long v7; // rdx unsigned long long v8; // rbx long long v9; // r15 _BYTE *v10; // r15 int v11; // eax long long v12; // r12 unsigned int v13; // r14d long long ( *v14)(long long, unsigned long long, unsigned long long); // rax _BYTE *v16; // [rsp+10h] [rbp-80h] char v17[32]; // [rsp+20h] [rbp-70h] BYREF char v18[32]; // [rsp+40h] [rbp-50h] BYREF unsigned long long v19; // [rsp+60h] [rbp-30h] v19 = __readfsqword(0x28u); v4 = *(_QWORD *)(a1 + 280); v5 = *(_BYTE **)(a1 + 288); v6 = (unsigned long long)v5; v7 = (unsigned long long)&v5[-v4]; if ( (unsigned long long)v5 <= v4 ) { LABEL_6: if ( *(_BYTE *)v6 != 47 ) { v9 = 0LL; v8 = (unsigned long long)&v5[-v6]; goto LABEL_9; } } else { v6 = *(_QWORD *)(a1 + 288); while ( *(_BYTE *)v6 != 47 ) { if ( --v6 <= v4 ) { v6 = *(_QWORD *)(a1 + 280); goto LABEL_6; } } } v8 = (unsigned long long)&v5[~v6]; v9 = 1LL; LABEL_9: if ( !a2 || (v10 = (_BYTE *)(v6 + v9), v8 == a3) && (v16 = &v5[-v4], v11 = bcmp(a2, v10, a3), v7 = (unsigned long long)v16, !v11) ) { v14 = *(long long ( **)(long long, unsigned long long, unsigned long long))(a1 + 344); if ( (*(_BYTE *)a1 & 1) != 0 ) { if ( v14 ) { v7 = a3; goto LABEL_23; } } else if ( v14 ) { a2 = v4; LABEL_23: v13 = v14(a1, a2, v7); LABEL_26: *(_BYTE *)v6 = 0; *(_QWORD *)(a1 + 288) = v6; return v13; } v13 = 0; goto LABEL_26; } v12 = 31LL; if ( a3 >= 0x1F ) a3 = 31LL; __memcpy_chk(v18, a2, a3, 32LL); v18[a3] = 0; if ( v8 ) { if ( v8 < 0x1F ) v12 = v8; __memcpy_chk(v17, v10, v12, 32LL); v17[v12] = 0; v13 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "'</%s>' unexpected ('</%s>' wanted)", v18, v17); } else { v13 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "'</%s>' unexpected (END-OF-INPUT wanted)", v18); } return v13; }
my_xml_leave: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13,qword ptr [RDI + 0x118] MOV RAX,qword ptr [RDI + 0x120] MOV RDX,RAX MOV R12,RAX SUB RDX,R13 MOV qword ptr [RBP + -0x78],RDI JBE 0x001d7bd4 MOV R12,RAX LAB_001d7bc2: CMP byte ptr [R12],0x2f JZ 0x001d7bdb DEC R12 CMP R12,R13 JA 0x001d7bc2 MOV R12,R13 LAB_001d7bd4: CMP byte ptr [R12],0x2f JNZ 0x001d7bec LAB_001d7bdb: MOV RBX,R12 NOT RBX ADD RBX,RAX MOV R15D,0x1 JMP 0x001d7bf5 LAB_001d7bec: SUB RAX,R12 XOR R15D,R15D MOV RBX,RAX LAB_001d7bf5: TEST RSI,RSI JZ 0x001d7cb4 ADD R15,R12 CMP RBX,R14 JNZ 0x001d7c32 MOV RDI,RSI MOV qword ptr [RBP + -0x88],RSI MOV RSI,R15 MOV qword ptr [RBP + -0x80],RDX MOV RDX,R14 CALL 0x00129560 MOV RDX,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x88] TEST EAX,EAX JZ 0x001d7cb4 LAB_001d7c32: CMP R14,0x1f MOV R12D,0x1f CMOVNC R14,R12 LEA RDI,[RBP + -0x50] MOV ECX,0x20 MOV RDX,R14 CALL 0x00129410 MOV byte ptr [RBP + R14*0x1 + -0x50],0x0 TEST RBX,RBX JZ 0x001d7ce3 CMP RBX,0x1f CMOVC R12,RBX LEA R13,[RBP + -0x70] MOV ECX,0x20 MOV RDI,R13 MOV RSI,R15 MOV RDX,R12 CALL 0x00129410 MOV byte ptr [RBP + R12*0x1 + -0x70],0x0 MOV RDI,qword ptr [RBP + -0x78] ADD RDI,0x8 LEA RCX,[0x1e0afb] MOV R14D,0x1 LEA R8,[RBP + -0x50] MOV EDX,0x80 MOV ESI,0x1 MOV R9,R13 XOR EAX,EAX CALL 0x00129950 JMP 0x001d7d1e LAB_001d7cb4: MOV RBX,qword ptr [RBP + -0x78] TEST byte ptr [RBX],0x1 MOV RAX,qword ptr [RBX + 0x158] JNZ 0x001d7cd1 TEST RAX,RAX JZ 0x001d7d0f MOV RDI,RBX MOV RSI,R13 JMP 0x001d7cdc LAB_001d7cd1: TEST RAX,RAX JZ 0x001d7d0f MOV RDI,RBX MOV RDX,R14 LAB_001d7cdc: CALL RAX MOV R14D,EAX JMP 0x001d7d12 LAB_001d7ce3: MOV RDI,qword ptr [RBP + -0x78] ADD RDI,0x8 LEA RCX,[0x1e0b1f] MOV R14D,0x1 LEA R8,[RBP + -0x50] MOV EDX,0x80 MOV ESI,0x1 XOR EAX,EAX CALL 0x00129950 JMP 0x001d7d1e LAB_001d7d0f: XOR R14D,R14D LAB_001d7d12: MOV byte ptr [R12],0x0 MOV qword ptr [RBX + 0x120],R12 LAB_001d7d1e: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001d7d3f MOV EAX,R14D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d7d3f: CALL 0x00129250
int4 my_xml_leave(byte *param_1,char *param_2,char *param_3) { code *pcVar1; int iVar2; int4 uVar3; char *pcVar4; ulong uVar5; char *pcVar6; char *pcVar7; char *pcVar8; char *pcVar9; long lVar10; long in_FS_OFFSET; char local_78 [32]; char local_58 [32]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar7 = *(char **)(param_1 + 0x118); pcVar6 = *(char **)(param_1 + 0x120); pcVar4 = pcVar6 + -(long)pcVar7; pcVar9 = pcVar6; pcVar8 = pcVar6; if (pcVar7 <= pcVar6 && pcVar4 != (char *)0x0) { do { pcVar9 = pcVar8; if (*pcVar8 == '/') goto LAB_001d7bdb; pcVar8 = pcVar8 + -1; pcVar9 = pcVar7; } while (pcVar7 < pcVar8); } if (*pcVar9 == '/') { LAB_001d7bdb: uVar5 = ~(ulong)pcVar9; lVar10 = 1; } else { uVar5 = -(long)pcVar9; lVar10 = 0; } pcVar6 = pcVar6 + uVar5; if ((param_2 != (char *)0x0) && ((pcVar6 != param_3 || (iVar2 = bcmp(param_2,pcVar9 + lVar10,(size_t)param_3), iVar2 != 0)))) { if ((char *)0x1e < param_3) { param_3 = (char *)0x1f; } __memcpy_chk(local_58,param_2,param_3,0x20); local_58[(long)param_3] = '\0'; if (pcVar6 == (char *)0x0) { uVar3 = 1; __sprintf_chk(param_1 + 8,1,0x80,"\'</%s>\' unexpected (END-OF-INPUT wanted)",local_58); } else { pcVar7 = (char *)0x1f; if (pcVar6 < (char *)0x1f) { pcVar7 = pcVar6; } __memcpy_chk(local_78,pcVar9 + lVar10,pcVar7,0x20); local_78[(long)pcVar7] = '\0'; uVar3 = 1; __sprintf_chk(param_1 + 8,1,0x80,"\'</%s>\' unexpected (\'</%s>\' wanted)",local_58,local_78); } goto LAB_001d7d1e; } pcVar1 = *(code **)(param_1 + 0x158); if ((*param_1 & 1) == 0) { if (pcVar1 == (code *)0x0) goto LAB_001d7d0f; LAB_001d7cdc: uVar3 = (*pcVar1)(param_1,pcVar7,pcVar4); } else { pcVar4 = param_3; pcVar7 = param_2; if (pcVar1 != (code *)0x0) goto LAB_001d7cdc; LAB_001d7d0f: uVar3 = 0; } *pcVar9 = '\0'; *(char **)(param_1 + 0x120) = pcVar9; LAB_001d7d1e: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar3; }
17,168
string_format[abi:cxx11](char const*, ...)
llama.cpp/common/common.cpp
std::string string_format(const char * fmt, ...) { va_list ap; va_list ap2; va_start(ap, fmt); va_copy(ap2, ap); int size = vsnprintf(NULL, 0, fmt, ap); GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT std::vector<char> buf(size + 1); int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2); GGML_ASSERT(size2 == size); va_end(ap2); va_end(ap); return std::string(buf.data(), size); }
O3
cpp
string_format[abi:cxx11](char const*, ...): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0xf8e92 movaps %xmm0, 0x90(%rsp) movaps %xmm1, 0xa0(%rsp) movaps %xmm2, 0xb0(%rsp) movaps %xmm3, 0xc0(%rsp) movaps %xmm4, 0xd0(%rsp) movaps %xmm5, 0xe0(%rsp) movaps %xmm6, 0xf0(%rsp) movaps %xmm7, 0x100(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 leaq 0x40(%rsp), %rcx movq %rax, (%rcx) leaq 0x140(%rsp), %rax movq %rax, 0x8(%rcx) movq %rsi, 0x10(%rcx) movq %rsi, 0x30(%rsp) movq (%rcx), %rax movq %rax, 0x20(%rsp) movq 0x8(%rcx), %rax movq %rax, 0x28(%rsp) xorl %edi, %edi xorl %esi, %esi movq %r14, %rdx callq 0x22728 cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF jae 0xf8f52 movl %eax, %r15d leal 0x1(%r15), %r12d leaq 0x8(%rsp), %r13 leaq 0x7(%rsp), %rdx movq %r13, %rdi movq %r12, %rsi callq 0xd127a movq (%r13), %rdi leaq 0x20(%rsp), %rcx movq %r12, %rsi movq %r14, %rdx callq 0x22728 cmpl %r15d, %eax jne 0xf8f73 movq 0x8(%rsp), %rsi movl %r15d, %edx leaq 0x7(%rsp), %rcx movq %rbx, %rdi callq 0x21fd0 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xf8f3e movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x21190 movq %rbx, %rax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x2d558(%rip), %rdi # 0x1264b1 leaq 0x22ad5(%rip), %rdx # 0x11ba35 leaq 0x2d587(%rip), %rcx # 0x1264ee movl $0x188, %esi # imm = 0x188 xorl %eax, %eax callq 0x21fc0 leaq 0x2d537(%rip), %rdi # 0x1264b1 leaq 0x22ab4(%rip), %rdx # 0x11ba35 leaq 0x2d582(%rip), %rcx # 0x12650a movl $0x18b, %esi # imm = 0x18B xorl %eax, %eax callq 0x21fc0 jmp 0xf8f96 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xf8fb0 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x21190 movq %rbx, %rdi callq 0x21c20
_Z13string_formatB5cxx11PKcz: push r15 push r14 push r13 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi lea rsi, [rsp+138h+var_D8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_F8E92 movaps [rsp+138h+var_A8], xmm0 movaps [rsp+138h+var_98], xmm1 movaps [rsp+138h+var_88], xmm2 movaps [rsp+138h+var_78], xmm3 movaps [rsp+138h+var_68], xmm4 movaps [rsp+138h+var_58], xmm5 movaps [rsp+138h+var_48], xmm6 movaps [rsp+138h+var_38], xmm7 loc_F8E92: mov rax, 3000000010h lea rcx, [rsp+138h+var_F8] mov [rcx], rax lea rax, [rsp+138h+arg_0] mov [rcx+8], rax mov [rcx+10h], rsi mov [rsp+138h+var_108], rsi mov rax, [rcx] mov [rsp+138h+var_118], rax mov rax, [rcx+8] mov [rsp+138h+var_110], rax xor edi, edi xor esi, esi mov rdx, r14 call vsnprintf cmp eax, 7FFFFFFFh jnb short loc_F8F52 mov r15d, eax lea r12d, [r15+1] lea r13, [rsp+138h+var_130] lea rdx, [rsp+138h+var_131] mov rdi, r13 mov rsi, r12 call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&) mov rdi, [r13+0] lea rcx, [rsp+138h+var_118] mov rsi, r12 mov rdx, r14 call vsnprintf cmp eax, r15d jnz short loc_F8F73 mov rsi, [rsp+138h+var_130] mov edx, r15d lea rcx, [rsp+138h+var_131] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&) mov rdi, [rsp+138h+var_130]; void * test rdi, rdi jz short loc_F8F3E mov rsi, [rsp+138h+var_120] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F8F3E: mov rax, rbx add rsp, 110h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_F8F52: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize0SizeIntMa; "size >= 0 && size < INT_MAX" mov esi, 188h xor eax, eax call _ggml_abort loc_F8F73: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize2Size; "size2 == size" mov esi, 18Bh xor eax, eax call _ggml_abort jmp short $+2 loc_F8F96: mov rbx, rax mov rdi, [rsp+138h+var_130]; void * test rdi, rdi jz short loc_F8FB0 mov rsi, [rsp+138h+var_120] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F8FB0: mov rdi, rbx call __Unwind_Resume
long long string_format[abi:cxx11]( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { unsigned int v15; // eax unsigned int v16; // r15d signed long long v17; // r12 long long v19; // rax long long v20; // rbx char v21; // [rsp+7h] [rbp-131h] BYREF void *v22; // [rsp+8h] [rbp-130h] BYREF long long v23; // [rsp+18h] [rbp-120h] _QWORD v24[4]; // [rsp+20h] [rbp-118h] BYREF _QWORD v25[4]; // [rsp+40h] [rbp-F8h] BYREF _BYTE v26[16]; // [rsp+60h] [rbp-D8h] BYREF long long v27; // [rsp+70h] [rbp-C8h] long long v28; // [rsp+78h] [rbp-C0h] long long v29; // [rsp+80h] [rbp-B8h] long long v30; // [rsp+88h] [rbp-B0h] __m128 v31; // [rsp+90h] [rbp-A8h] __m128 v32; // [rsp+A0h] [rbp-98h] __m128 v33; // [rsp+B0h] [rbp-88h] __m128 v34; // [rsp+C0h] [rbp-78h] __m128 v35; // [rsp+D0h] [rbp-68h] __m128 v36; // [rsp+E0h] [rbp-58h] __m128 v37; // [rsp+F0h] [rbp-48h] __m128 v38; // [rsp+100h] [rbp-38h] v31 = a7; v32 = a8; v33 = a9; v34 = a10; v35 = a11; v36 = a12; v37 = a13; v38 = a14; v27 = a3; v28 = a4; v29 = a5; v30 = a6; v25[0] = 0x3000000010LL; v25[1] = &a15; v25[2] = v26; v24[2] = v26; v24[0] = 0x3000000010LL; v24[1] = &a15; v15 = vsnprintf(0LL, 0LL, a2, v25); if ( v15 >= 0x7FFFFFFF ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/common.cpp", 392LL, "GGML_ASSERT(%s) failed", "size >= 0 && size < INT_MAX"); LABEL_7: ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/common.cpp", 395LL, "GGML_ASSERT(%s) failed", "size2 == size"); v20 = v19; if ( v22 ) operator delete(v22, v23 - (_QWORD)v22); _Unwind_Resume(v20); } v16 = v15; v17 = v15 + 1; std::vector<char>::vector(&v22, v17); if ( (unsigned int)vsnprintf(v22, v17, a2, v24) != v16 ) goto LABEL_7; std::string::basic_string(a1, v22, v16, &v21); if ( v22 ) operator delete(v22, v23 - (_QWORD)v22); return a1; }
string_format[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI LEA RSI,[RSP + 0x60] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x001f8e92 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM1 MOVAPS xmmword ptr [RSP + 0xb0],XMM2 MOVAPS xmmword ptr [RSP + 0xc0],XMM3 MOVAPS xmmword ptr [RSP + 0xd0],XMM4 MOVAPS xmmword ptr [RSP + 0xe0],XMM5 MOVAPS xmmword ptr [RSP + 0xf0],XMM6 MOVAPS xmmword ptr [RSP + 0x100],XMM7 LAB_001f8e92: MOV RAX,0x3000000010 LEA RCX,[RSP + 0x40] MOV qword ptr [RCX],RAX LEA RAX,[RSP + 0x140] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RCX + 0x10],RSI MOV qword ptr [RSP + 0x30],RSI MOV RAX,qword ptr [RCX] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0x28],RAX XOR EDI,EDI XOR ESI,ESI MOV RDX,R14 CALL 0x00122728 CMP EAX,0x7fffffff JNC 0x001f8f52 MOV R15D,EAX LEA R12D,[R15 + 0x1] LEA R13,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R13 MOV RSI,R12 CALL 0x001d127a MOV RDI,qword ptr [R13] LEA RCX,[RSP + 0x20] MOV RSI,R12 MOV RDX,R14 CALL 0x00122728 CMP EAX,R15D JNZ 0x001f8f73 MOV RSI,qword ptr [RSP + 0x8] MOV EDX,R15D LAB_001f8f1a: LEA RCX,[RSP + 0x7] MOV RDI,RBX CALL 0x00121fd0 LAB_001f8f27: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001f8f3e MOV RSI,qword ptr [RSP + 0x18] SUB RSI,RDI CALL 0x00121190 LAB_001f8f3e: MOV RAX,RBX ADD RSP,0x110 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001f8f52: LEA RDI,[0x2264b1] LEA RDX,[0x21ba35] LEA RCX,[0x2264ee] MOV ESI,0x188 XOR EAX,EAX CALL 0x00121fc0 LAB_001f8f73: LEA RDI,[0x2264b1] LEA RDX,[0x21ba35] LEA RCX,[0x22650a] MOV ESI,0x18b XOR EAX,EAX CALL 0x00121fc0
/* string_format[abi:cxx11](char const*, ...) */ char * string_format_abi_cxx11_(char *param_1,...) { char in_AL; uint uVar1; uint uVar2; int8 in_RCX; int8 in_RDX; char *in_RSI; int8 in_R8; int8 in_R9; int8 in_XMM0_Qa; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; allocator local_131; char *local_130 [2]; long local_120; int8 local_118; int1 *local_110; int1 *local_108; int8 local_f8; int1 *local_f0; int1 *local_e8; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; local_108 = local_d8; if (in_AL != '\0') { local_a8 = in_XMM0_Qa; local_98 = in_XMM1_Qa; local_88 = in_XMM2_Qa; local_78 = in_XMM3_Qa; local_68 = in_XMM4_Qa; local_58 = in_XMM5_Qa; local_48 = in_XMM6_Qa; local_38 = in_XMM7_Qa; } local_f8 = 0x3000000010; local_110 = &stack0x00000008; local_118 = 0x3000000010; local_f0 = local_110; local_e8 = local_108; local_c8 = in_RDX; local_c0 = in_RCX; local_b8 = in_R8; local_b0 = in_R9; uVar1 = vsnprintf((char *)0x0,0,in_RSI,&local_f8); if (uVar1 < 0x7fffffff) { std::vector<char,std::allocator<char>>::vector((ulong)local_130,(allocator *)(ulong)(uVar1 + 1)) ; uVar2 = vsnprintf(local_130[0],(size_t)(ulong)(uVar1 + 1),in_RSI,&local_118); if (uVar2 == uVar1) { /* try { // try from 001f8f1a to 001f8f26 has its CatchHandler @ 001f8f94 */ std::__cxx11::string::string((string *)param_1,local_130[0],(ulong)uVar1,&local_131); if (local_130[0] != (char *)0x0) { operator_delete(local_130[0],local_120 - (long)local_130[0]); } return param_1; } /* try { // try from 001f8f73 to 001f8f93 has its CatchHandler @ 001f8f96 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x18b, "GGML_ASSERT(%s) failed","size2 == size"); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x188, "GGML_ASSERT(%s) failed","size >= 0 && size < INT_MAX"); }
17,169
ma_init_block_record
eloqsql/storage/maria/ma_blockrec.c
my_bool _ma_init_block_record(MARIA_HA *info) { MARIA_ROW *row= &info->cur_row, *new_row= &info->new_row; MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); uint default_extents; DBUG_ENTER("_ma_init_block_record"); if (!my_multi_malloc(PSI_INSTRUMENT_ME, flag, &row->empty_bits, share->base.pack_bytes, &row->field_lengths, share->base.max_field_lengths + 2, &row->blob_lengths, sizeof(ulong) * share->base.blobs, &row->null_field_lengths, (sizeof(uint) * (share->base.fields - share->base.blobs + EXTRA_LENGTH_FIELDS)), &row->tail_positions, (sizeof(MARIA_RECORD_POS) * (share->base.blobs + 2)), &new_row->empty_bits, share->base.pack_bytes, &new_row->field_lengths, share->base.max_field_lengths + 2, &new_row->blob_lengths, sizeof(ulong) * share->base.blobs, &new_row->null_field_lengths, (sizeof(uint) * (share->base.fields - share->base.blobs + EXTRA_LENGTH_FIELDS)), &info->log_row_parts, sizeof(*info->log_row_parts) * (TRANSLOG_INTERNAL_PARTS + 3 + share->base.fields + 3), &info->update_field_data, (share->base.fields * 4 + share->base.max_field_lengths + 1 + 4), NullS, 0)) DBUG_RETURN(1); /* Skip over bytes used to store length of field length for logging */ row->field_lengths+= 2; new_row->field_lengths+= 2; /* Reserve some initial space to avoid mallocs during execution */ default_extents= (ELEMENTS_RESERVED_FOR_MAIN_PART + 1 + (AVERAGE_BLOB_SIZE / FULL_PAGE_SIZE(share) / BLOB_SEGMENT_MIN_SIZE)); if (my_init_dynamic_array(PSI_INSTRUMENT_ME, &info->bitmap_blocks, sizeof(MARIA_BITMAP_BLOCK), default_extents, 64, flag)) goto err; info->cur_row.extents_buffer_length= default_extents * ROW_EXTENT_SIZE; if (!(info->cur_row.extents= my_malloc(PSI_INSTRUMENT_ME, info->cur_row.extents_buffer_length, flag))) goto err; info->row_base_length= share->base_length; info->row_flag= share->base.default_row_flag; /* We need to reserve 'EXTRA_LENGTH_FIELDS' number of parts in null_field_lengths to allow splitting of rows in 'find_where_to_split_row' */ row->null_field_lengths+= EXTRA_LENGTH_FIELDS; new_row->null_field_lengths+= EXTRA_LENGTH_FIELDS; DBUG_RETURN(0); err: _ma_end_block_record(info); DBUG_RETURN(1); }
O3
c
ma_init_block_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx movq (%rdi), %rsi xorl %r14d, %r14d cmpb $0x0, 0x7d9(%rsi) setne %r14b shll $0x10, %r14d orq $0x10, %r14 leaq 0xc8(%rdi), %rdx movl 0x3f4(%rsi), %ecx leaq 0xd0(%rdi), %r8 movl 0x3c8(%rsi), %r11d movl 0x3d4(%rsi), %eax leal 0x2(%rax), %r9d addq $0xe0, %rdi movq %rdi, -0x78(%rbp) movq %rsi, -0x30(%rbp) movl 0x3f0(%rsi), %r15d leal 0x8(%r11), %r10d leal (%rax,%r11,4), %eax addl $0x5, %eax movq %rax, -0x58(%rbp) subl %r15d, %r11d leal 0x2(%r15), %r12d shlq $0x3, %r15 addl $0x3, %r11d shlq $0x2, %r11 shlq $0x3, %r12 shlq $0x4, %r10 leaq 0xd8(%rbx), %rax movq %rax, -0x70(%rbp) leaq 0xa8(%rbx), %rax movq %rax, -0x68(%rbp) leaq 0x188(%rbx), %rax movq %rax, -0x60(%rbp) leaq 0x190(%rbx), %rax movq %rax, -0x50(%rbp) leaq 0x1a0(%rbx), %rax movq %rax, -0x48(%rbp) leaq 0x198(%rbx), %rax movq %rax, -0x40(%rbp) leaq 0x318(%rbx), %rax movq %rax, -0x38(%rbp) leaq 0x3c8(%rbx), %r13 xorl %edi, %edi movq %r14, %rsi xorl %eax, %eax pushq $0x0 pushq $0x0 pushq -0x58(%rbp) pushq %r13 pushq %r10 pushq -0x38(%rbp) pushq %r11 pushq -0x40(%rbp) pushq %r15 pushq -0x48(%rbp) pushq %r9 pushq -0x50(%rbp) pushq %rcx pushq -0x60(%rbp) pushq %r12 pushq -0x68(%rbp) pushq %r11 pushq -0x70(%rbp) pushq %r15 pushq -0x78(%rbp) callq 0x9c458 addq $0xa0, %rsp movb $0x1, %r15b testq %rax, %rax je 0x5bb6e addq $0x2, 0xd0(%rbx) addq $0x2, 0x190(%rbx) movq -0x30(%rbp), %r13 movl 0x7bc(%r13), %ecx subl 0xc18(%r13), %ecx addl $-0xc, %ecx movl $0x100000, %eax # imm = 0x100000 xorl %edx, %edx divl %ecx movl %eax, %r12d shrl $0x7, %r12d addl $0x5, %r12d leaq 0x2c0(%rbx), %rsi subq $0x8, %rsp xorl %edi, %edi movl $0x18, %edx xorl %ecx, %ecx movl %r12d, %r8d movl $0x40, %r9d pushq %r14 callq 0x916f4 addq $0x10, %rsp testb %al, %al je 0x5bb18 movq %rbx, %rdi callq 0x5bb80 jmp 0x5bb6e leal (,%r12,8), %esi subl %r12d, %esi movq %rsi, 0x118(%rbx) xorl %edi, %edi movq %r14, %rdx callq 0x9f97d movq %rax, 0x90(%rbx) testq %rax, %rax je 0x5bb0e movl 0x7c4(%r13), %eax movq %rax, 0x610(%rbx) movl 0x418(%r13), %eax movl %eax, 0x618(%rbx) addq $0xc, 0xd8(%rbx) addq $0xc, 0x198(%rbx) xorl %r15d, %r15d movl %r15d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_init_block_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi mov rsi, [rdi] xor r14d, r14d cmp byte ptr [rsi+7D9h], 0 setnz r14b shl r14d, 10h or r14, 10h lea rdx, [rdi+0C8h] mov ecx, [rsi+3F4h] lea r8, [rdi+0D0h] mov r11d, [rsi+3C8h] mov eax, [rsi+3D4h] lea r9d, [rax+2] add rdi, 0E0h mov [rbp+var_78], rdi mov [rbp+var_30], rsi mov r15d, [rsi+3F0h] lea r10d, [r11+8] lea eax, [rax+r11*4] add eax, 5 mov [rbp+var_58], rax sub r11d, r15d lea r12d, [r15+2] shl r15, 3 add r11d, 3 shl r11, 2 shl r12, 3 shl r10, 4 lea rax, [rbx+0D8h] mov [rbp+var_70], rax lea rax, [rbx+0A8h] mov [rbp+var_68], rax lea rax, [rbx+188h] mov [rbp+var_60], rax lea rax, [rbx+190h] mov [rbp+var_50], rax lea rax, [rbx+1A0h] mov [rbp+var_48], rax lea rax, [rbx+198h] mov [rbp+var_40], rax lea rax, [rbx+318h] mov [rbp+var_38], rax lea r13, [rbx+3C8h] xor edi, edi mov rsi, r14 xor eax, eax push 0 push 0 push [rbp+var_58] push r13 push r10 push [rbp+var_38] push r11 push [rbp+var_40] push r15 push [rbp+var_48] push r9 push [rbp+var_50] push rcx push [rbp+var_60] push r12 push [rbp+var_68] push r11 push [rbp+var_70] push r15 push [rbp+var_78] call my_multi_malloc add rsp, 0A0h mov r15b, 1 test rax, rax jz loc_5BB6E add qword ptr [rbx+0D0h], 2 add qword ptr [rbx+190h], 2 mov r13, [rbp+var_30] mov ecx, [r13+7BCh] sub ecx, [r13+0C18h] add ecx, 0FFFFFFF4h mov eax, offset xmmword_100000 xor edx, edx div ecx mov r12d, eax shr r12d, 7 add r12d, 5 lea rsi, [rbx+2C0h] sub rsp, 8 xor edi, edi mov edx, 18h xor ecx, ecx mov r8d, r12d mov r9d, 40h ; '@' push r14 call init_dynamic_array2 add rsp, 10h test al, al jz short loc_5BB18 loc_5BB0E: mov rdi, rbx call _ma_end_block_record jmp short loc_5BB6E loc_5BB18: lea esi, ds:0[r12*8] sub esi, r12d mov [rbx+118h], rsi xor edi, edi mov rdx, r14 call my_malloc mov [rbx+90h], rax test rax, rax jz short loc_5BB0E mov eax, [r13+7C4h] mov [rbx+610h], rax mov eax, [r13+418h] mov [rbx+618h], eax add qword ptr [rbx+0D8h], 0Ch add qword ptr [rbx+198h], 0Ch xor r15d, r15d loc_5BB6E: mov eax, r15d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_init_block_record(long long a1) { long long v1; // r14 int v2; // r11d int v3; // eax long long v4; // r15 long long v5; // r10 int v6; // r11d long long v7; // r12 long long v8; // rax long long v9; // r15 unsigned int v10; // r12d long long v11; // rsi long long v12; // rax long long v14; // [rsp+28h] [rbp-58h] _DWORD *v15; // [rsp+50h] [rbp-30h] v1 = ((unsigned __int8)(*(_BYTE *)(*(_QWORD *)a1 + 2009LL) != 0) << 16) | 0x10LL; v2 = *(_DWORD *)(*(_QWORD *)a1 + 968LL); v3 = *(_DWORD *)(*(_QWORD *)a1 + 980LL); v15 = *(_DWORD **)a1; v4 = *(unsigned int *)(*(_QWORD *)a1 + 1008LL); v5 = (unsigned int)(v2 + 8); v14 = (unsigned int)(v3 + 4 * v2 + 5); v6 = v2 - v4; v7 = (unsigned int)(v4 + 2); v9 = 8 * v4; v8 = my_multi_malloc( 0, v1, (int)a1 + 200, *(_DWORD *)(*(_QWORD *)a1 + 1012LL), (int)a1 + 208, v3 + 2, a1 + 224, v9, a1 + 216, 4LL * (unsigned int)(v6 + 3), a1 + 168, 8 * v7, a1 + 392, *(unsigned int *)(*(_QWORD *)a1 + 1012LL), a1 + 400, (unsigned int)(v3 + 2), a1 + 416, v9, a1 + 408, 4LL * (unsigned int)(v6 + 3), a1 + 792, 16 * v5, a1 + 968, v14, 0LL, 0LL); LOBYTE(v9) = 1; if ( v8 ) { *(_QWORD *)(a1 + 208) += 2LL; *(_QWORD *)(a1 + 400) += 2LL; v10 = (((unsigned int)&xmmword_100000 / (v15[495] - v15[774] - 12)) >> 7) + 5; if ( (unsigned __int8)init_dynamic_array2(0, (int)a1 + 704, 24, 0, v10, 64, v1) || (v11 = 7 * v10, *(_QWORD *)(a1 + 280) = v11, v12 = my_malloc(0LL, v11, v1), (*(_QWORD *)(a1 + 144) = v12) == 0LL) ) { ma_end_block_record(a1); } else { *(_QWORD *)(a1 + 1552) = (unsigned int)v15[497]; *(_DWORD *)(a1 + 1560) = v15[262]; *(_QWORD *)(a1 + 216) += 12LL; *(_QWORD *)(a1 + 408) += 12LL; LODWORD(v9) = 0; } } return (unsigned int)v9; }
_ma_init_block_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV RSI,qword ptr [RDI] XOR R14D,R14D CMP byte ptr [RSI + 0x7d9],0x0 SETNZ R14B SHL R14D,0x10 OR R14,0x10 LEA RDX,[RDI + 0xc8] MOV ECX,dword ptr [RSI + 0x3f4] LEA R8,[RDI + 0xd0] MOV R11D,dword ptr [RSI + 0x3c8] MOV EAX,dword ptr [RSI + 0x3d4] LEA R9D,[RAX + 0x2] ADD RDI,0xe0 MOV qword ptr [RBP + -0x78],RDI MOV qword ptr [RBP + -0x30],RSI MOV R15D,dword ptr [RSI + 0x3f0] LEA R10D,[R11 + 0x8] LEA EAX,[RAX + R11*0x4] ADD EAX,0x5 MOV qword ptr [RBP + -0x58],RAX SUB R11D,R15D LEA R12D,[R15 + 0x2] SHL R15,0x3 ADD R11D,0x3 SHL R11,0x2 SHL R12,0x3 SHL R10,0x4 LEA RAX,[RBX + 0xd8] MOV qword ptr [RBP + -0x70],RAX LEA RAX,[RBX + 0xa8] MOV qword ptr [RBP + -0x68],RAX LEA RAX,[RBX + 0x188] MOV qword ptr [RBP + -0x60],RAX LEA RAX,[RBX + 0x190] MOV qword ptr [RBP + -0x50],RAX LEA RAX,[RBX + 0x1a0] MOV qword ptr [RBP + -0x48],RAX LEA RAX,[RBX + 0x198] MOV qword ptr [RBP + -0x40],RAX LEA RAX,[RBX + 0x318] MOV qword ptr [RBP + -0x38],RAX LEA R13,[RBX + 0x3c8] XOR EDI,EDI MOV RSI,R14 XOR EAX,EAX PUSH 0x0 PUSH 0x0 PUSH qword ptr [RBP + -0x58] PUSH R13 PUSH R10 PUSH qword ptr [RBP + -0x38] PUSH R11 PUSH qword ptr [RBP + -0x40] PUSH R15 PUSH qword ptr [RBP + -0x48] PUSH R9 PUSH qword ptr [RBP + -0x50] PUSH RCX PUSH qword ptr [RBP + -0x60] PUSH R12 PUSH qword ptr [RBP + -0x68] PUSH R11 PUSH qword ptr [RBP + -0x70] PUSH R15 PUSH qword ptr [RBP + -0x78] CALL 0x0019c458 ADD RSP,0xa0 MOV R15B,0x1 TEST RAX,RAX JZ 0x0015bb6e ADD qword ptr [RBX + 0xd0],0x2 ADD qword ptr [RBX + 0x190],0x2 MOV R13,qword ptr [RBP + -0x30] MOV ECX,dword ptr [R13 + 0x7bc] SUB ECX,dword ptr [R13 + 0xc18] ADD ECX,-0xc MOV EAX,0x100000 XOR EDX,EDX DIV ECX MOV R12D,EAX SHR R12D,0x7 ADD R12D,0x5 LEA RSI,[RBX + 0x2c0] SUB RSP,0x8 XOR EDI,EDI MOV EDX,0x18 XOR ECX,ECX MOV R8D,R12D MOV R9D,0x40 PUSH R14 CALL 0x001916f4 ADD RSP,0x10 TEST AL,AL JZ 0x0015bb18 LAB_0015bb0e: MOV RDI,RBX CALL 0x0015bb80 JMP 0x0015bb6e LAB_0015bb18: LEA ESI,[R12*0x8] SUB ESI,R12D MOV qword ptr [RBX + 0x118],RSI XOR EDI,EDI MOV RDX,R14 CALL 0x0019f97d MOV qword ptr [RBX + 0x90],RAX TEST RAX,RAX JZ 0x0015bb0e MOV EAX,dword ptr [R13 + 0x7c4] MOV qword ptr [RBX + 0x610],RAX MOV EAX,dword ptr [R13 + 0x418] MOV dword ptr [RBX + 0x618],EAX ADD qword ptr [RBX + 0xd8],0xc ADD qword ptr [RBX + 0x198],0xc XOR R15D,R15D LAB_0015bb6e: MOV EAX,R15D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong _ma_init_block_record(long *param_1) { int iVar1; uint uVar2; long lVar3; char cVar4; ulong uVar5; long lVar6; int iVar7; ulong uVar8; long lVar9; ulong uVar10; lVar3 = *param_1; uVar8 = (ulong)(*(char *)(lVar3 + 0x7d9) != '\0') << 0x10 | 0x10; iVar1 = *(int *)(lVar3 + 0x3c8); iVar7 = *(int *)(lVar3 + 0x3d4) + 2; uVar2 = *(uint *)(lVar3 + 0x3f0); lVar9 = (ulong)uVar2 << 3; lVar6 = (ulong)((iVar1 - uVar2) + 3) << 2; lVar6 = my_multi_malloc(0,uVar8,param_1 + 0x19,*(int4 *)(lVar3 + 0x3f4),param_1 + 0x1a,iVar7 ,param_1 + 0x1c,lVar9,param_1 + 0x1b,lVar6,param_1 + 0x15, (ulong)(uVar2 + 2) << 3,param_1 + 0x31,*(int4 *)(lVar3 + 0x3f4), param_1 + 0x32,iVar7,param_1 + 0x34,lVar9,param_1 + 0x33,lVar6, param_1 + 99,(ulong)(iVar1 + 8) << 4,param_1 + 0x79, *(int *)(lVar3 + 0x3d4) + iVar1 * 4 + 5,0,0); uVar10 = CONCAT71((int7)((ulong)lVar9 >> 8),1); if (lVar6 != 0) { param_1[0x1a] = param_1[0x1a] + 2; param_1[0x32] = param_1[0x32] + 2; iVar7 = (int)(0x100000 / (ulong)((*(int *)(lVar3 + 0x7bc) - *(int *)(lVar3 + 0xc18)) - 0xc) >> 7 ) + 5; cVar4 = init_dynamic_array2(0,param_1 + 0x58,0x18,0,iVar7,0x40,uVar8); if (cVar4 == '\0') { uVar5 = (ulong)(uint)(iVar7 * 7); param_1[0x23] = uVar5; lVar6 = my_malloc(0,uVar5,uVar8); param_1[0x12] = lVar6; if (lVar6 != 0) { param_1[0xc2] = (ulong)*(uint *)(lVar3 + 0x7c4); *(int4 *)(param_1 + 0xc3) = *(int4 *)(lVar3 + 0x418); param_1[0x1b] = param_1[0x1b] + 0xc; param_1[0x33] = param_1[0x33] + 0xc; uVar10 = 0; goto LAB_0015bb6e; } } _ma_end_block_record(param_1); } LAB_0015bb6e: return uVar10 & 0xffffffff; }
17,170
maria_versioning
eloqsql/storage/maria/ma_state.c
void maria_versioning(MARIA_HA *info, my_bool versioning) { MARIA_SHARE *share= info->s; DBUG_ENTER("maria_versioning"); /* For now, this is a hack */ if (share->have_versioning) { enum thr_lock_type save_lock_type; share->lock_key_trees= versioning; /* Set up info->lock.type temporary for _ma_block_get_status() */ save_lock_type= info->lock.type; info->lock.type= versioning ? TL_WRITE_CONCURRENT_INSERT : TL_WRITE; _ma_block_get_status((void*) info, versioning); info->lock.type= save_lock_type; if (versioning) info->state= &share->state.common; else info->state= &share->state.state; /* Change global values by default */ info->state_start= info->state; /* Initial values */ } DBUG_VOID_RETURN; }
O0
c
maria_versioning: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpb $0x0, 0x7e8(%rax) je 0x45858 movb -0x9(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, 0x7e3(%rax) movq -0x8(%rbp), %rax movl 0x6d0(%rax), %eax movl %eax, -0x1c(%rbp) movsbl -0x9(%rbp), %edx movl $0xd, %ecx movl $0x8, %eax cmpl $0x0, %edx cmovnel %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x6d0(%rax) movq -0x8(%rbp), %rdi movsbl -0x9(%rbp), %esi callq 0x45590 movl -0x1c(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x6d0(%rax) cmpb $0x0, -0x9(%rbp) je 0x45838 movq -0x18(%rbp), %rcx addq $0x50, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) jmp 0x45848 movq -0x18(%rbp), %rcx addq $0x18, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x8(%rbp), %rax movq 0x20(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x60(%rax) jmp 0x4585a jmp 0x4585c addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
maria_versioning: push rbp mov rbp, rsp sub rsp, 20h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp byte ptr [rax+7E8h], 0 jz loc_45858 mov cl, [rbp+var_9] mov rax, [rbp+var_18] mov [rax+7E3h], cl mov rax, [rbp+var_8] mov eax, [rax+6D0h] mov [rbp+var_1C], eax movsx edx, [rbp+var_9] mov ecx, 0Dh mov eax, 8 cmp edx, 0 cmovnz ecx, eax mov rax, [rbp+var_8] mov [rax+6D0h], ecx mov rdi, [rbp+var_8] movsx esi, [rbp+var_9] call _ma_block_get_status mov ecx, [rbp+var_1C] mov rax, [rbp+var_8] mov [rax+6D0h], ecx cmp [rbp+var_9], 0 jz short loc_45838 mov rcx, [rbp+var_18] add rcx, 50h ; 'P' mov rax, [rbp+var_8] mov [rax+20h], rcx jmp short loc_45848 loc_45838: mov rcx, [rbp+var_18] add rcx, 18h mov rax, [rbp+var_8] mov [rax+20h], rcx loc_45848: mov rax, [rbp+var_8] mov rcx, [rax+20h] mov rax, [rbp+var_8] mov [rax+60h], rcx loc_45858: jmp short $+2 loc_4585A: jmp short $+2 loc_4585C: add rsp, 20h pop rbp retn
long long maria_versioning(long long a1, char a2) { long long result; // rax int v3; // ecx int v4; // [rsp+4h] [rbp-1Ch] long long v5; // [rsp+8h] [rbp-18h] v5 = *(_QWORD *)a1; result = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 2024LL) ) { *(_BYTE *)(v5 + 2019) = a2; v4 = *(_DWORD *)(a1 + 1744); v3 = 13; if ( a2 ) v3 = 8; *(_DWORD *)(a1 + 1744) = v3; ma_block_get_status(a1, a2); *(_DWORD *)(a1 + 1744) = v4; if ( a2 ) *(_QWORD *)(a1 + 32) = v5 + 80; else *(_QWORD *)(a1 + 32) = v5 + 24; result = a1; *(_QWORD *)(a1 + 96) = *(_QWORD *)(a1 + 32); } return result; }
maria_versioning: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x7e8],0x0 JZ 0x00145858 MOV CL,byte ptr [RBP + -0x9] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x7e3],CL MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x6d0] MOV dword ptr [RBP + -0x1c],EAX MOVSX EDX,byte ptr [RBP + -0x9] MOV ECX,0xd MOV EAX,0x8 CMP EDX,0x0 CMOVNZ ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x6d0],ECX MOV RDI,qword ptr [RBP + -0x8] MOVSX ESI,byte ptr [RBP + -0x9] CALL 0x00145590 MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x6d0],ECX CMP byte ptr [RBP + -0x9],0x0 JZ 0x00145838 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x50 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX JMP 0x00145848 LAB_00145838: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX LAB_00145848: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],RCX LAB_00145858: JMP 0x0014585a LAB_0014585a: JMP 0x0014585c LAB_0014585c: ADD RSP,0x20 POP RBP RET
void maria_versioning(long *param_1,char param_2) { long lVar1; long lVar2; int4 uVar3; lVar1 = *param_1; if (*(char *)(lVar1 + 0x7e8) != '\0') { *(char *)(lVar1 + 0x7e3) = param_2; lVar2 = param_1[0xda]; uVar3 = 0xd; if (param_2 != '\0') { uVar3 = 8; } *(int4 *)(param_1 + 0xda) = uVar3; _ma_block_get_status(param_1,(int)param_2); *(int *)(param_1 + 0xda) = (int)lVar2; if (param_2 == '\0') { param_1[4] = lVar1 + 0x18; } else { param_1[4] = lVar1 + 0x50; } param_1[0xc] = param_1[4]; } return; }
17,171
nglog::VADoRawLog(char**, unsigned long*, char const*, __va_list_tag*)
ng-log[P]ng-log/src/raw_logging.cc
inline static bool VADoRawLog(char** buf, size_t* size, const char* format, va_list ap) { #if defined(__GNUC__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wformat-nonliteral" #endif int n = std::vsnprintf(*buf, *size, format, ap); #if defined(__GNUC__) # pragma GCC diagnostic pop #endif if (n < 0 || static_cast<size_t>(n) > *size) return false; *size -= static_cast<size_t>(n); *buf += n; return true; }
O0
cpp
nglog::VADoRawLog(char**, unsigned long*, char const*, __va_list_tag*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx callq 0x9470 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jl 0x47959 movslq -0x2c(%rbp), %rax movq -0x18(%rbp), %rcx cmpq (%rcx), %rax jbe 0x4795f movb $0x0, -0x1(%rbp) jmp 0x47987 movslq -0x2c(%rbp), %rdx movq -0x18(%rbp), %rax movq (%rax), %rcx subq %rdx, %rcx movq %rcx, (%rax) movl -0x2c(%rbp), %edx movq -0x10(%rbp), %rax movq (%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, (%rax) movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5nglogL10VADoRawLogEPPcPmPKcP13__va_list_tag: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_18] mov rsi, [rax] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] call _vsnprintf mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jl short loc_47959 movsxd rax, [rbp+var_2C] mov rcx, [rbp+var_18] cmp rax, [rcx] jbe short loc_4795F loc_47959: mov [rbp+var_1], 0 jmp short loc_47987 loc_4795F: movsxd rdx, [rbp+var_2C] mov rax, [rbp+var_18] mov rcx, [rax] sub rcx, rdx mov [rax], rcx mov edx, [rbp+var_2C] mov rax, [rbp+var_10] mov rcx, [rax] movsxd rdx, edx add rcx, rdx mov [rax], rcx mov [rbp+var_1], 1 loc_47987: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char nglog::VADoRawLog(nglog *this, char **a2, unsigned long long *a3, const char *a4, __va_list_tag *a5) { int v6; // [rsp+4h] [rbp-2Ch] v6 = vsnprintf(*(_QWORD *)this, *a2, a3, a4); if ( v6 < 0 || v6 > (unsigned long long)*a2 ) return 0; *a2 -= v6; *(_QWORD *)this += v6; return 1; }
VADoRawLog: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] CALL 0x00109470 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JL 0x00147959 MOVSXD RAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX] JBE 0x0014795f LAB_00147959: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00147987 LAB_0014795f: MOVSXD RDX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] SUB RCX,RDX MOV qword ptr [RAX],RCX MOV EDX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 LAB_00147987: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x30 POP RBP RET
/* nglog::VADoRawLog(char**, unsigned long*, char const*, __va_list_tag*) */ int1 nglog::VADoRawLog(char **param_1,ulong *param_2,char *param_3,__va_list_tag *param_4) { int iVar1; int1 local_9; iVar1 = vsnprintf(*param_1,*param_2,param_3,param_4); if ((iVar1 < 0) || (*param_2 < (ulong)(long)iVar1)) { local_9 = 0; } else { *param_2 = *param_2 - (long)iVar1; *param_1 = *param_1 + iVar1; local_9 = 1; } return local_9; }
17,172
nglog::LogDestination::LogToSinks(nglog::LogSeverity, char const*, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::LogToSinks(LogSeverity severity, const char* full_filename, const char* base_filename, int line, const LogMessageTime& time, const char* message, size_t message_len) { std::shared_lock<SinkMutex> l{sink_mutex_}; if (sinks_) { for (size_t i = sinks_->size(); i-- > 0;) { (*sinks_)[i]->send(severity, full_filename, base_filename, line, time, message, message_len); } } }
O2
cpp
nglog::LogDestination::LogToSinks(nglog::LogSeverity, char const*, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, (%rsp) movq %r8, %r14 movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %r12 movl %edi, %r13d leaq 0x200f9(%rip), %rdi # 0x2ec38 movq %rdi, 0x8(%rsp) movb $0x1, 0x10(%rsp) callq 0xfc66 movq 0x200db(%rip), %rax # 0x2ec30 testq %rax, %rax je 0xeb9d movq 0x8(%rax), %rbx subq (%rax), %rbx sarq $0x3, %rbx subq $0x1, %rbx jb 0xeb9d movq 0x200be(%rip), %rax # 0x2ec30 movq (%rax), %rax movq (%rax,%rbx,8), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax movl %r13d, %esi movq %r12, %rdx movq %r15, %rcx movl %ebp, %r8d movq %r14, %r9 pushq 0x50(%rsp) pushq 0x8(%rsp) callq *%rax popq %rax popq %rcx jmp 0xeb65 leaq 0x8(%rsp), %rdi callq 0xfc56 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xfc56 movq %rbx, %rdi callq 0x7a20 nop
_ZN5nglog14LogDestination10LogToSinksENS_11LogSeverityEPKcS3_iRKNS_14LogMessageTimeES3_m: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_48], r9 mov r14, r8 mov ebp, ecx mov r15, rdx mov r12, rsi mov r13d, edi lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this mov [rsp+48h+var_40], rdi mov [rsp+48h+var_38], 1 call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rax, rax jz short loc_EB9D mov rbx, [rax+8] sub rbx, [rax] sar rbx, 3 loc_EB65: sub rbx, 1 jb short loc_EB9D mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ mov rax, [rax] mov rdi, [rax+rbx*8] mov rax, [rdi] mov rax, [rax+10h] mov esi, r13d mov rdx, r12 mov rcx, r15 mov r8d, ebp mov r9, r14 push [rsp+48h+arg_0] push [rsp+50h+var_48] call rax pop rax pop rcx jmp short loc_EB65 loc_EB9D: lea rdi, [rsp+48h+var_40] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::LogToSinks( unsigned int a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6, long long a7) { long long v10; // r12 long long i; // rbx void *v15; // [rsp+8h] [rbp-40h] BYREF char v16; // [rsp+10h] [rbp-38h] v10 = a2; v15 = &nglog::LogDestination::sink_mutex_; v16 = 1; std::__shared_mutex_pthread::lock_shared((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_); if ( nglog::LogDestination::sinks_ ) { for ( i = (long long)(*(_QWORD *)(nglog::LogDestination::sinks_ + 8) - *(_QWORD *)nglog::LogDestination::sinks_) >> 3; i-- != 0; (*(void ( **)(_QWORD, _QWORD, long long, long long, _QWORD, long long, long long, long long))(**(_QWORD **)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i) + 16LL))( *(_QWORD *)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i), a1, v10, a3, a4, a5, a6, a7) ) { a2 = a1; } } return std::shared_lock<std::shared_mutex>::~shared_lock(&v15, a2); }
LogToSinks: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP],R9 MOV R14,R8 MOV EBP,ECX MOV R15,RDX MOV R12,RSI MOV R13D,EDI LEA RDI,[0x12ec38] MOV qword ptr [RSP + 0x8],RDI MOV byte ptr [RSP + 0x10],0x1 CALL 0x0010fc66 MOV RAX,qword ptr [0x0012ec30] TEST RAX,RAX JZ 0x0010eb9d MOV RBX,qword ptr [RAX + 0x8] SUB RBX,qword ptr [RAX] SAR RBX,0x3 LAB_0010eb65: SUB RBX,0x1 JC 0x0010eb9d MOV RAX,qword ptr [0x0012ec30] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + RBX*0x8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x10] LAB_0010eb80: MOV ESI,R13D MOV RDX,R12 MOV RCX,R15 MOV R8D,EBP MOV R9,R14 PUSH qword ptr [RSP + 0x50] PUSH qword ptr [RSP + 0x8] CALL RAX POP RAX POP RCX LAB_0010eb9b: JMP 0x0010eb65 LAB_0010eb9d: LEA RDI,[RSP + 0x8] CALL 0x0010fc56 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::LogDestination::LogToSinks(nglog::LogSeverity, char const*, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long) */ void nglog::LogDestination::LogToSinks (int4 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5,int8 param_6,int8 param_7) { long *plVar1; long lVar2; bool bVar3; int1 *local_40; int1 local_38; local_40 = sink_mutex_; local_38 = 1; std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)sink_mutex_); if (sinks_ != (long *)0x0) { lVar2 = sinks_[1] - *sinks_ >> 3; while (bVar3 = lVar2 != 0, lVar2 = lVar2 + -1, bVar3) { plVar1 = *(long **)(*sinks_ + lVar2 * 8); /* try { // try from 0010eb80 to 0010eb9a has its CatchHandler @ 0010ebb6 */ (**(code **)(*plVar1 + 0x10))(plVar1,param_1,param_2,param_3,param_4,param_5,param_6,param_7); } } std::shared_lock<std::shared_mutex>::~shared_lock((shared_lock<std::shared_mutex> *)&local_40); return; }
17,173
my_end
eloqsql/mysys/my_init.c
void my_end(int infoflag) { /* this code is suboptimal to workaround a bug in Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be optimized until this compiler is not in use anymore */ FILE *info_file= DBUG_FILE; my_bool print_info= (info_file != stderr); if (!my_init_done) return; /* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer operational, so we cannot use DBUG_RETURN. */ DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d", infoflag, print_info)); if (!info_file) { info_file= stderr; print_info= 0; } if ((infoflag & MY_CHECK_ERROR) || print_info) { /* Test if some file is left open */ char ebuff[512]; uint i, open_files, open_streams; for (open_streams= open_files= i= 0 ; i < my_file_limit ; i++) { if (my_file_info[i].type == UNOPEN) continue; if (my_file_info[i].type == STREAM_BY_FOPEN || my_file_info[i].type == STREAM_BY_FDOPEN) open_streams++; else open_files++; #ifdef EXTRA_DEBUG fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i); fputc('\n', stderr); #endif } if (open_files || open_streams) { my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING), open_files, open_streams); my_message_stderr(EE_OPEN_WARNING, ebuff, ME_BELL); DBUG_PRINT("error", ("%s", ebuff)); } #ifdef CHECK_UNLIKELY end_my_likely(info_file); #endif } free_charsets(); my_error_unregister_all(); my_once_free(); if ((infoflag & MY_GIVE_INFO) || print_info) { #ifdef HAVE_GETRUSAGE struct rusage rus; #ifdef HAVE_valgrind /* Purify assumes that rus is uninitialized after getrusage call */ bzero((char*) &rus, sizeof(rus)); #endif if (!getrusage(RUSAGE_SELF, &rus)) fprintf(info_file,"\n\ User time %.2f, System time %.2f\n\ Maximum resident set size %ld, Integral resident set size %ld\n\ Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\ Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\ Voluntary context switches %ld, Involuntary context switches %ld\n", (rus.ru_utime.tv_sec * SCALE_SEC + rus.ru_utime.tv_usec / SCALE_USEC) / 100.0, (rus.ru_stime.tv_sec * SCALE_SEC + rus.ru_stime.tv_usec / SCALE_USEC) / 100.0, rus.ru_maxrss, rus.ru_idrss, rus.ru_minflt, rus.ru_majflt, rus.ru_nswap, rus.ru_inblock, rus.ru_oublock, rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); #endif #if defined(_MSC_VER) _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); _CrtCheckMemory(); #endif } my_thread_end(); my_thread_global_end(); if (!(infoflag & MY_DONT_FREE_DBUG)) DBUG_END(); /* Must be done as late as possible */ my_mutex_end(); #if defined(SAFE_MUTEX) /* Check on destroying of mutexes. A few may be left that will get cleaned up by C++ destructors */ safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr : (FILE *) 0); #endif /* defined(SAFE_MUTEX) */ #ifdef _WIN32 WSACleanup(); #endif /* At very last, delete mysys key, it is used everywhere including DBUG */ pthread_key_delete(THR_KEY_mysys); my_init_done= my_thr_key_mysys_exists= 0; }
O0
c
my_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x308, %rsp # imm = 0x308 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %edi, -0x234(%rbp) movq 0x1ba872(%rip), %rax # 0x212fe0 movq (%rax), %rax movq %rax, -0x240(%rbp) movq -0x240(%rbp), %rax movq 0x1ba85a(%rip), %rcx # 0x212fe0 cmpq (%rcx), %rax setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x241(%rbp) leaq 0x3b5aaa(%rip), %rax # 0x40e248 cmpb $0x0, (%rax) jne 0x587a8 jmp 0x58aa1 jmp 0x587aa jmp 0x587ac cmpq $0x0, -0x240(%rbp) jne 0x587ce movq 0x1ba823(%rip), %rax # 0x212fe0 movq (%rax), %rax movq %rax, -0x240(%rbp) movb $0x0, -0x241(%rbp) movl -0x234(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x587ec movsbl -0x241(%rbp), %eax cmpl $0x0, %eax je 0x5890a movl $0x0, -0x248(%rbp) movl $0x0, -0x24c(%rbp) movl $0x0, -0x250(%rbp) movl -0x248(%rbp), %eax leaq 0x1bb629(%rip), %rcx # 0x213e40 cmpl (%rcx), %eax jae 0x588ae leaq 0x1bb622(%rip), %rax # 0x213e48 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x8(%rax) jne 0x5883e jmp 0x5889a leaq 0x1bb603(%rip), %rax # 0x213e48 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x3, 0x8(%rax) je 0x58878 leaq 0x1bb5e6(%rip), %rax # 0x213e48 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x4, 0x8(%rax) jne 0x58889 movl -0x250(%rbp), %eax addl $0x1, %eax movl %eax, -0x250(%rbp) jmp 0x58898 movl -0x24c(%rbp), %eax addl $0x1, %eax movl %eax, -0x24c(%rbp) jmp 0x5889a movl -0x248(%rbp), %eax addl $0x1, %eax movl %eax, -0x248(%rbp) jmp 0x5880a cmpl $0x0, -0x24c(%rbp) jne 0x588c0 cmpl $0x0, -0x250(%rbp) je 0x58908 leaq -0x230(%rbp), %rdi leaq 0x1bba72(%rip), %rax # 0x214340 movq 0x90(%rax), %rdx movl -0x24c(%rbp), %ecx movl -0x250(%rbp), %r8d movl $0x200, %esi # imm = 0x200 movb $0x0, %al callq 0xab160 leaq -0x230(%rbp), %rsi movl $0x13, %edi movl $0x4, %edx callq 0x592c0 jmp 0x58906 jmp 0x58908 jmp 0x5890a callq 0x5fa20 callq 0x64c20 callq 0x59630 movl -0x234(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x58937 movsbl -0x241(%rbp), %eax cmpl $0x0, %eax je 0x58a5c xorl %edi, %edi leaq -0x2e0(%rbp), %rsi callq 0x261e0 cmpl $0x0, %eax jne 0x58a5a movq -0x240(%rbp), %rdi imulq $0x64, -0x2e0(%rbp), %rax movq %rax, -0x2f0(%rbp) movq -0x2d8(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rax, %rcx movq -0x2f0(%rbp), %rax addq %rcx, %rax cvtsi2sd %rax, %xmm0 movsd 0x5b2f9(%rip), %xmm1 # 0xb3c88 divsd %xmm1, %xmm0 imulq $0x64, -0x2d0(%rbp), %rax movq %rax, -0x2e8(%rbp) movq -0x2c8(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rax, %rcx movq -0x2e8(%rbp), %rax addq %rcx, %rax cvtsi2sd %rax, %xmm1 movsd 0x5b2bb(%rip), %xmm2 # 0xb3c88 divsd %xmm2, %xmm1 movq -0x2c0(%rbp), %rdx movq -0x2b0(%rbp), %rcx movq -0x2a0(%rbp), %r8 movq -0x298(%rbp), %r9 movq -0x290(%rbp), %r13 movq -0x288(%rbp), %r12 movq -0x280(%rbp), %r15 movq -0x278(%rbp), %r14 movq -0x270(%rbp), %rbx movq -0x268(%rbp), %r11 movq -0x260(%rbp), %r10 movq -0x258(%rbp), %rax leaq 0x5694a(%rip), %rsi # 0xaf376 movq %r13, (%rsp) movq %r12, 0x8(%rsp) movq %r15, 0x10(%rsp) movq %r14, 0x18(%rsp) movq %rbx, 0x20(%rsp) movq %r11, 0x28(%rsp) movq %r10, 0x30(%rsp) movq %rax, 0x38(%rsp) movb $0x2, %al callq 0x26480 jmp 0x58a5c callq 0x5a750 callq 0x5a4c0 movl -0x234(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax jne 0x58a7a jmp 0x58a76 jmp 0x58a78 jmp 0x58a7a callq 0x5af50 leaq 0x3b64be(%rip), %rax # 0x40ef44 movl (%rax), %edi callq 0x263b0 leaq 0x3b61e8(%rip), %rax # 0x40ec7c movb $0x0, (%rax) leaq 0x3b57aa(%rip), %rax # 0x40e248 movb $0x0, (%rax) movq %fs:0x28, %rax movq -0x30(%rbp), %rcx cmpq %rcx, %rax jne 0x58ac5 addq $0x308, %rsp # imm = 0x308 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x26360 nopw (%rax,%rax)
my_end: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 308h mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_234], edi mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_240], rax mov rax, [rbp+var_240] mov rcx, cs:stderr_ptr cmp rax, [rcx] setnz al and al, 1 movzx eax, al mov [rbp+var_241], al lea rax, my_init_done cmp byte ptr [rax], 0 jnz short loc_587A8 jmp loc_58AA1 loc_587A8: jmp short $+2 loc_587AA: jmp short $+2 loc_587AC: cmp [rbp+var_240], 0 jnz short loc_587CE mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_240], rax mov [rbp+var_241], 0 loc_587CE: mov eax, [rbp+var_234] and eax, 1 cmp eax, 0 jnz short loc_587EC movsx eax, [rbp+var_241] cmp eax, 0 jz loc_5890A loc_587EC: mov [rbp+var_248], 0 mov [rbp+var_24C], 0 mov [rbp+var_250], 0 loc_5880A: mov eax, [rbp+var_248] lea rcx, my_file_limit cmp eax, [rcx] jnb loc_588AE lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 0 jnz short loc_5883E jmp short loc_5889A loc_5883E: lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 3 jz short loc_58878 lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 4 jnz short loc_58889 loc_58878: mov eax, [rbp+var_250] add eax, 1 mov [rbp+var_250], eax jmp short loc_58898 loc_58889: mov eax, [rbp+var_24C] add eax, 1 mov [rbp+var_24C], eax loc_58898: jmp short $+2 loc_5889A: mov eax, [rbp+var_248] add eax, 1 mov [rbp+var_248], eax jmp loc_5880A loc_588AE: cmp [rbp+var_24C], 0 jnz short loc_588C0 cmp [rbp+var_250], 0 jz short loc_58908 loc_588C0: lea rdi, [rbp+var_230] lea rax, globerrs mov rdx, [rax+90h] mov ecx, [rbp+var_24C] mov r8d, [rbp+var_250] mov esi, 200h mov al, 0 call my_snprintf lea rsi, [rbp+var_230] mov edi, 13h mov edx, 4 call my_message_stderr jmp short $+2 loc_58906: jmp short $+2 loc_58908: jmp short $+2 loc_5890A: call free_charsets call my_error_unregister_all call my_once_free mov eax, [rbp+var_234] and eax, 2 cmp eax, 0 jnz short loc_58937 movsx eax, [rbp+var_241] cmp eax, 0 jz loc_58A5C loc_58937: xor edi, edi lea rsi, [rbp+var_2E0] call _getrusage cmp eax, 0 jnz loc_58A5A mov rdi, [rbp+var_240] imul rax, [rbp+var_2E0], 64h ; 'd' mov [rbp+var_2F0], rax mov rax, [rbp+var_2D8] mov ecx, 2710h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_2F0] add rax, rcx cvtsi2sd xmm0, rax movsd xmm1, cs:qword_B3C88 divsd xmm0, xmm1 imul rax, [rbp+var_2D0], 64h ; 'd' mov [rbp+var_2E8], rax mov rax, [rbp+var_2C8] mov ecx, 2710h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_2E8] add rax, rcx cvtsi2sd xmm1, rax movsd xmm2, cs:qword_B3C88 divsd xmm1, xmm2 mov rdx, [rbp+var_2C0] mov rcx, [rbp+var_2B0] mov r8, [rbp+var_2A0] mov r9, [rbp+var_298] mov r13, [rbp+var_290] mov r12, [rbp+var_288] mov r15, [rbp+var_280] mov r14, [rbp+var_278] mov rbx, [rbp+var_270] mov r11, [rbp+var_268] mov r10, [rbp+var_260] mov rax, [rbp+var_258] lea rsi, aUserTime2fSyst; "\nUser time %.2f, System time %.2f\nMax"... mov [rsp+330h+var_330], r13 mov [rsp+330h+var_328], r12 mov [rsp+330h+var_320], r15 mov [rsp+330h+var_318], r14 mov [rsp+330h+var_310], rbx mov [rsp+330h+var_308], r11 mov [rsp+330h+var_300], r10 mov [rsp+330h+var_2F8], rax mov al, 2 call _fprintf loc_58A5A: jmp short $+2 loc_58A5C: call my_thread_end call my_thread_global_end mov eax, [rbp+var_234] and eax, 4 cmp eax, 0 jnz short loc_58A7A jmp short $+2 loc_58A76: jmp short $+2 loc_58A78: jmp short $+2 loc_58A7A: call my_mutex_end lea rax, THR_KEY_mysys mov edi, [rax] call _pthread_key_delete lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 0 lea rax, my_init_done mov byte ptr [rax], 0 loc_58AA1: mov rax, fs:28h mov rcx, [rbp+var_30] cmp rax, rcx jnz short loc_58AC5 add rsp, 308h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_58AC5: call ___stack_chk_fail
unsigned long long my_end(int a1, long long a2, long long a3, long long a4, long long a5, int a6) { _QWORD v7[2]; // [rsp+50h] [rbp-2E0h] BYREF long long v8; // [rsp+60h] [rbp-2D0h] long long v9; // [rsp+68h] [rbp-2C8h] long long v10; // [rsp+70h] [rbp-2C0h] long long v11; // [rsp+80h] [rbp-2B0h] long long v12; // [rsp+90h] [rbp-2A0h] long long v13; // [rsp+98h] [rbp-298h] long long v14; // [rsp+A0h] [rbp-290h] long long v15; // [rsp+A8h] [rbp-288h] long long v16; // [rsp+B0h] [rbp-280h] long long v17; // [rsp+B8h] [rbp-278h] long long v18; // [rsp+C0h] [rbp-270h] long long v19; // [rsp+C8h] [rbp-268h] long long v20; // [rsp+D0h] [rbp-260h] long long v21; // [rsp+D8h] [rbp-258h] int v22; // [rsp+E0h] [rbp-250h] int v23; // [rsp+E4h] [rbp-24Ch] unsigned int v24; // [rsp+E8h] [rbp-248h] char v25; // [rsp+EFh] [rbp-241h] long long v26; // [rsp+F0h] [rbp-240h] int v27; // [rsp+FCh] [rbp-234h] _BYTE v28[512]; // [rsp+100h] [rbp-230h] BYREF unsigned long long v29; // [rsp+300h] [rbp-30h] v29 = __readfsqword(0x28u); v27 = a1; v26 = stderr; v25 = 0; if ( my_init_done ) { if ( !v26 ) { v26 = stderr; v25 = 0; } if ( (v27 & 1) != 0 ) { v24 = 0; v23 = 0; v22 = 0; while ( v24 < my_file_limit ) { if ( *((_DWORD *)my_file_info + 4 * v24 + 2) ) { if ( *((_DWORD *)my_file_info + 4 * v24 + 2) == 3 || *((_DWORD *)my_file_info + 4 * v24 + 2) == 4 ) ++v22; else ++v23; } ++v24; } if ( v23 || v22 ) { my_snprintf((unsigned int)v28, 512, (unsigned int)globerrs[18], v23, v22, a6); my_message_stderr(19LL, v28, 4LL); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ( (v27 & 2) != 0 && !(unsigned int)getrusage(0LL, v7) ) fprintf( v26, "\n" "User time %.2f, System time %.2f\n" "Maximum resident set size %ld, Integral resident set size %ld\n" "Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n" "Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n" "Voluntary context switches %ld, Involuntary context switches %ld\n", (double)(int)(v7[1] / 10000LL + 100 * LODWORD(v7[0])) / 100.0, (double)(int)(v9 / 10000 + 100 * v8) / 100.0, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21); my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = 0; } return __readfsqword(0x28u); }
my_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x308 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x234],EDI MOV RAX,qword ptr [0x00312fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x240] MOV RCX,qword ptr [0x00312fe0] CMP RAX,qword ptr [RCX] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x241],AL LEA RAX,[0x50e248] CMP byte ptr [RAX],0x0 JNZ 0x001587a8 JMP 0x00158aa1 LAB_001587a8: JMP 0x001587aa LAB_001587aa: JMP 0x001587ac LAB_001587ac: CMP qword ptr [RBP + -0x240],0x0 JNZ 0x001587ce MOV RAX,qword ptr [0x00312fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x240],RAX MOV byte ptr [RBP + -0x241],0x0 LAB_001587ce: MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001587ec MOVSX EAX,byte ptr [RBP + -0x241] CMP EAX,0x0 JZ 0x0015890a LAB_001587ec: MOV dword ptr [RBP + -0x248],0x0 MOV dword ptr [RBP + -0x24c],0x0 MOV dword ptr [RBP + -0x250],0x0 LAB_0015880a: MOV EAX,dword ptr [RBP + -0x248] LEA RCX,[0x313e40] CMP EAX,dword ptr [RCX] JNC 0x001588ae LEA RAX,[0x313e48] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x0 JNZ 0x0015883e JMP 0x0015889a LAB_0015883e: LEA RAX,[0x313e48] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x3 JZ 0x00158878 LEA RAX,[0x313e48] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x4 JNZ 0x00158889 LAB_00158878: MOV EAX,dword ptr [RBP + -0x250] ADD EAX,0x1 MOV dword ptr [RBP + -0x250],EAX JMP 0x00158898 LAB_00158889: MOV EAX,dword ptr [RBP + -0x24c] ADD EAX,0x1 MOV dword ptr [RBP + -0x24c],EAX LAB_00158898: JMP 0x0015889a LAB_0015889a: MOV EAX,dword ptr [RBP + -0x248] ADD EAX,0x1 MOV dword ptr [RBP + -0x248],EAX JMP 0x0015880a LAB_001588ae: CMP dword ptr [RBP + -0x24c],0x0 JNZ 0x001588c0 CMP dword ptr [RBP + -0x250],0x0 JZ 0x00158908 LAB_001588c0: LEA RDI,[RBP + -0x230] LEA RAX,[0x314340] MOV RDX,qword ptr [RAX + 0x90] MOV ECX,dword ptr [RBP + -0x24c] MOV R8D,dword ptr [RBP + -0x250] MOV ESI,0x200 MOV AL,0x0 CALL 0x001ab160 LEA RSI,[RBP + -0x230] MOV EDI,0x13 MOV EDX,0x4 CALL 0x001592c0 JMP 0x00158906 LAB_00158906: JMP 0x00158908 LAB_00158908: JMP 0x0015890a LAB_0015890a: CALL 0x0015fa20 CALL 0x00164c20 CALL 0x00159630 MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x2 CMP EAX,0x0 JNZ 0x00158937 MOVSX EAX,byte ptr [RBP + -0x241] CMP EAX,0x0 JZ 0x00158a5c LAB_00158937: XOR EDI,EDI LEA RSI,[RBP + -0x2e0] CALL 0x001261e0 CMP EAX,0x0 JNZ 0x00158a5a MOV RDI,qword ptr [RBP + -0x240] IMUL RAX,qword ptr [RBP + -0x2e0],0x64 MOV qword ptr [RBP + -0x2f0],RAX MOV RAX,qword ptr [RBP + -0x2d8] MOV ECX,0x2710 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x2f0] ADD RAX,RCX CVTSI2SD XMM0,RAX MOVSD XMM1,qword ptr [0x001b3c88] DIVSD XMM0,XMM1 IMUL RAX,qword ptr [RBP + -0x2d0],0x64 MOV qword ptr [RBP + -0x2e8],RAX MOV RAX,qword ptr [RBP + -0x2c8] MOV ECX,0x2710 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x2e8] ADD RAX,RCX CVTSI2SD XMM1,RAX MOVSD XMM2,qword ptr [0x001b3c88] DIVSD XMM1,XMM2 MOV RDX,qword ptr [RBP + -0x2c0] MOV RCX,qword ptr [RBP + -0x2b0] MOV R8,qword ptr [RBP + -0x2a0] MOV R9,qword ptr [RBP + -0x298] MOV R13,qword ptr [RBP + -0x290] MOV R12,qword ptr [RBP + -0x288] MOV R15,qword ptr [RBP + -0x280] MOV R14,qword ptr [RBP + -0x278] MOV RBX,qword ptr [RBP + -0x270] MOV R11,qword ptr [RBP + -0x268] MOV R10,qword ptr [RBP + -0x260] MOV RAX,qword ptr [RBP + -0x258] LEA RSI,[0x1af376] MOV qword ptr [RSP],R13 MOV qword ptr [RSP + 0x8],R12 MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0x18],R14 MOV qword ptr [RSP + 0x20],RBX MOV qword ptr [RSP + 0x28],R11 MOV qword ptr [RSP + 0x30],R10 MOV qword ptr [RSP + 0x38],RAX MOV AL,0x2 CALL 0x00126480 LAB_00158a5a: JMP 0x00158a5c LAB_00158a5c: CALL 0x0015a750 CALL 0x0015a4c0 MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x4 CMP EAX,0x0 JNZ 0x00158a7a JMP 0x00158a76 LAB_00158a76: JMP 0x00158a78 LAB_00158a78: JMP 0x00158a7a LAB_00158a7a: CALL 0x0015af50 LEA RAX,[0x50ef44] MOV EDI,dword ptr [RAX] CALL 0x001263b0 LEA RAX,[0x50ec7c] MOV byte ptr [RAX],0x0 LEA RAX,[0x50e248] MOV byte ptr [RAX],0x0 LAB_00158aa1: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,RCX JNZ 0x00158ac5 ADD RSP,0x308 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00158ac5: CALL 0x00126360
void my_end(uint param_1) { int iVar1; long in_FS_OFFSET; bool bVar2; bool bVar3; rusage local_2e8; int local_258; int local_254; uint local_250; bool local_249; FILE *local_248; uint local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_248 = *(FILE **)PTR_stderr_00312fe0; bVar2 = local_248 != *(FILE **)PTR_stderr_00312fe0; local_249 = bVar2; local_23c = param_1; if (my_init_done != '\0') { bVar3 = local_248 == (FILE *)0x0; if (bVar3) { local_248 = *(FILE **)PTR_stderr_00312fe0; } bVar3 = !bVar3; local_249 = bVar3 && bVar2; if (((param_1 & 1) != 0) || (bVar3 && bVar2)) { local_254 = 0; local_258 = 0; for (local_250 = 0; local_250 < my_file_limit; local_250 = local_250 + 1) { if (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) != 0) { if ((*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 3) || (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 4)) { local_258 = local_258 + 1; } else { local_254 = local_254 + 1; } } } if ((local_254 != 0) || (local_258 != 0)) { my_snprintf(local_238,0x200,globerrs._144_8_,local_254,local_258); my_message_stderr(0x13,local_238,4); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ((((local_23c & 2) != 0) || (local_249 != false)) && (iVar1 = getrusage(RUSAGE_SELF,&local_2e8), iVar1 == 0)) { fprintf(local_248, "\nUser time %.2f, System time %.2f\nMaximum resident set size %ld, Integral resident set size %ld\nNon-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVoluntary context switches %ld, Involuntary context switches %ld\n" ,(double)(local_2e8.ru_utime.tv_sec * 100 + local_2e8.ru_utime.tv_usec / 10000) / DAT_001b3c88, (double)(local_2e8.ru_stime.tv_sec * 100 + local_2e8.ru_stime.tv_usec / 10000) / DAT_001b3c88,local_2e8.ru_maxrss,local_2e8.ru_idrss,local_2e8.ru_minflt, local_2e8.ru_majflt,local_2e8.ru_nswap,local_2e8.ru_inblock,local_2e8.ru_oublock, local_2e8.ru_msgsnd,local_2e8.ru_msgrcv,local_2e8.ru_nsignals,local_2e8.ru_nvcsw, local_2e8.ru_nivcsw); } my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = '\0'; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
17,174
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&, unsigned int*, int*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp
void SubdivisionPlanBuilder::encodeRecursiveNode( ProtoNode const& pn, uint32_t* tree, Index* patchPoints) { tree += pn.treeOffset; NodeDescriptor* descr = reinterpret_cast<NodeDescriptor*>(tree); if (pn.hasIrregularPatch) { unsigned int level = pn.levelIndex; gatherIrregularPatchPoints(level, patchPoints + pn.firstPatchPoint); short u, v; bool irregRoot = computeSubPatchDomain(level, pn.faceIndex, u, v); descr->SetRecursive(level, u, v, pn.hasIrregularPatch); tree[1] = pn.firstPatchPoint; } else { descr->SetRecursive(pn.levelIndex, 0, 0, pn.hasIrregularPatch); tree[1] = INDEX_INVALID; } tree += 2; assert((int)pn.numChildren==4); for (int i=0; i<(int)pn.numChildren; ++i) tree[permuteWinding(i)] = getProtoNodeChild(pn, i).treeOffset; }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&, unsigned int*, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl 0x10(%rsi), %eax leaq (%rdx,%rax,4), %rbp movzwl 0xc(%rsi), %r15d testb $0x40, %r15b jne 0xa8952 shrl $0x4, %r15d andl $0x78, %r15d incl %r15d movl %r15d, (%rbp) movl $0xffffffff, 0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xa8a05 shrl $0x7, %r15d andl $0xf, %r15d xorl %edx, %edx cmpb $0x0, 0x269(%r14) cmovneq %r15, %rdx cmpl $0x0, 0x274(%r14) jle 0xa89b3 movl 0x14(%rbx), %eax leaq (%rcx,%rax,4), %rax leaq (%r15,%r15,4), %rcx movl 0x11c(%r14,%rcx,4), %ecx leaq (%rdx,%rdx,4), %rdx leaq (%r14,%rdx,4), %rdx addq $0x120, %rdx # imm = 0x120 xorl %esi, %esi movl (%rdx), %edi leal 0x1(%rdi), %r8d movl %r8d, (%rdx) addl %ecx, %edi movl %edi, (%rax,%rsi,4) incq %rsi movslq 0x274(%r14), %rdi cmpq %rdi, %rsi jl 0xa8996 movzwl (%rbx), %edx leaq 0x6(%rsp), %r12 leaq 0x4(%rsp), %r13 movq %r14, %rdi movl %r15d, %esi movq %r12, %rcx movq %r13, %r8 callq 0x38e30 movzwl (%r12), %eax movl 0xc(%rbx), %ecx movzwl (%r13), %edx shll $0x16, %edx andl $0x3ff, %eax # imm = 0x3FF shll $0xc, %eax orl %edx, %eax movzwl %r15w, %edx leal (%rax,%rdx,8), %eax shrl $0x4, %ecx andl $0x4, %ecx addl %ecx, %eax incl %eax movl %eax, (%rbp) movl 0x14(%rbx), %eax movl %eax, 0x4(%rbp) movzwl 0xc(%rbx), %eax andl $0x38, %eax cmpw $0x20, %ax jne 0xa8a6e movzwl 0xc(%rbx), %edx testb $0x38, %dl je 0xa8a5f leaq 0x1b5ae(%rip), %rax # 0xc3fd0 xorl %ecx, %ecx shrl $0x7, %edx andl $0xf, %edx incl %edx leaq (%rdx,%rdx,2), %rdx movl 0x18(%rbx,%rcx,4), %esi movq (%r14,%rdx,8), %rdx leaq (%rsi,%rsi,4), %rsi movl 0x10(%rdx,%rsi,8), %edx movzbl (%rax), %esi movl %edx, 0x8(%rbp,%rsi,4) incq %rcx movzwl 0xc(%rbx), %edx movl %edx, %esi shrl $0x3, %esi andl $0x7, %esi addq $0x4, %rax cmpq %rsi, %rcx jb 0xa8a24 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1babb(%rip), %rdi # 0xc4530 leaq 0x1b642(%rip), %rsi # 0xc40be leaq 0x1bac4(%rip), %rcx # 0xc4547 movl $0x2d6, %edx # imm = 0x2D6 callq 0x39560 nop
_ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder19encodeRecursiveNodeERKNS2_9ProtoNodeEPjPi: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi mov eax, [rsi+10h] lea rbp, [rdx+rax*4] movzx r15d, word ptr [rsi+0Ch] test r15b, 40h jnz short loc_A8952 shr r15d, 4 and r15d, 78h inc r15d mov [rbp+0], r15d mov dword ptr [rbp+4], 0FFFFFFFFh jmp loc_A8A05 loc_A8952: shr r15d, 7 and r15d, 0Fh xor edx, edx cmp byte ptr [r14+269h], 0 cmovnz rdx, r15 cmp dword ptr [r14+274h], 0 jle short loc_A89B3 mov eax, [rbx+14h] lea rax, [rcx+rax*4] lea rcx, [r15+r15*4] mov ecx, [r14+rcx*4+11Ch] lea rdx, [rdx+rdx*4] lea rdx, [r14+rdx*4] add rdx, 120h xor esi, esi loc_A8996: mov edi, [rdx] lea r8d, [rdi+1] mov [rdx], r8d add edi, ecx mov [rax+rsi*4], edi inc rsi movsxd rdi, dword ptr [r14+274h] cmp rsi, rdi jl short loc_A8996 loc_A89B3: movzx edx, word ptr [rbx]; int lea r12, [rsp+38h+var_32] lea r13, [rsp+38h+var_34] mov rdi, r14; this mov esi, r15d; int mov rcx, r12; __int16 * mov r8, r13; __int16 * call __ZNK10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder21computeSubPatchDomainEiiRsS3_; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::computeSubPatchDomain(int,int,short &,short &) movzx eax, word ptr [r12] mov ecx, [rbx+0Ch] movzx edx, word ptr [r13+0] shl edx, 16h and eax, 3FFh shl eax, 0Ch or eax, edx movzx edx, r15w lea eax, [rax+rdx*8] shr ecx, 4 and ecx, 4 add eax, ecx inc eax mov [rbp+0], eax mov eax, [rbx+14h] mov [rbp+4], eax loc_A8A05: movzx eax, word ptr [rbx+0Ch] and eax, 38h cmp ax, 20h ; ' ' jnz short loc_A8A6E movzx edx, word ptr [rbx+0Ch] test dl, 38h jz short loc_A8A5F lea rax, _ZZN10OpenSubdiv6v3_6_03TmrL14permuteWindingEtE14permuteWinding; OpenSubdiv::v3_6_0::Tmr::permuteWinding(ushort)::permuteWinding xor ecx, ecx loc_A8A24: shr edx, 7 and edx, 0Fh inc edx lea rdx, [rdx+rdx*2] mov esi, [rbx+rcx*4+18h] mov rdx, [r14+rdx*8] lea rsi, [rsi+rsi*4] mov edx, [rdx+rsi*8+10h] movzx esi, byte ptr [rax] mov [rbp+rsi*4+8], edx inc rcx movzx edx, word ptr [rbx+0Ch] mov esi, edx shr esi, 3 and esi, 7 add rax, 4 cmp rcx, rsi jb short loc_A8A24 loc_A8A5F: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A8A6E: lea rdi, aIntPnNumchildr; "(int)pn.numChildren==4" lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_160; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"... mov edx, 2D6h call ___assert_fail
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode( OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *this, unsigned __int16 *a2, long long a3, long long a4) { long long v4; // rax _DWORD *v7; // rbp unsigned int v8; // r15d long long v9; // r15 long long v10; // rdx long long v11; // rax int v12; // ecx _DWORD *v13; // rdx long long v14; // rsi int v15; // edi long long result; // rax unsigned int v17; // edx unsigned long long v18; // rcx __int16 v19[26]; // [rsp+0h] [rbp-34h] BYREF *(_DWORD *)v19 = HIDWORD(v4); v7 = (_DWORD *)(a3 + 4LL * *((unsigned int *)a2 + 4)); v8 = a2[6]; if ( (v8 & 0x40) != 0 ) { v9 = (v8 >> 7) & 0xF; v10 = 0LL; if ( *((_BYTE *)this + 617) ) v10 = v9; if ( *((int *)this + 157) > 0 ) { v11 = a4 + 4LL * *((unsigned int *)a2 + 5); v12 = *((_DWORD *)this + 5 * v9 + 71); v13 = (_DWORD *)((char *)this + 20 * v10 + 288); v14 = 0LL; do { v15 = (*v13)++; *(_DWORD *)(v11 + 4 * v14++) = v12 + v15; } while ( v14 < *((int *)this + 157) ); } OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::computeSubPatchDomain(this, v9, *a2, &v19[1], v19); *v7 = ((*((_DWORD *)a2 + 3) >> 4) & 4) + (((unsigned __int16)v19[0] << 22) | ((v19[1] & 0x3FF) << 12)) + 8 * (unsigned __int16)v9 + 1; v7[1] = *((_DWORD *)a2 + 5); } else { *v7 = ((v8 >> 4) & 0x78) + 1; v7[1] = -1; } result = a2[6] & 0x38; if ( (a2[6] & 0x38) != 0x20 ) __assert_fail( "(int)pn.numChildren==4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp", 726LL, "void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(const ProtoNode &, uint32_t *, Index *)"); v17 = a2[6]; if ( (v17 & 0x38) != 0 ) { result = (long long)&OpenSubdiv::v3_6_0::Tmr::permuteWinding(unsigned short)::permuteWinding; v18 = 0LL; do { v7[*(unsigned __int8 *)result + 2] = *(_DWORD *)(*((_QWORD *)this + 3 * ((v17 >> 7) & 0xF) + 3) + 40LL * *(unsigned int *)&a2[2 * v18++ + 12] + 16); v17 = a2[6]; result += 4LL; } while ( v18 < ((v17 >> 3) & 7) ); } return result; }
encodeRecursiveNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV EAX,dword ptr [RSI + 0x10] LEA RBP,[RDX + RAX*0x4] MOVZX R15D,word ptr [RSI + 0xc] TEST R15B,0x40 JNZ 0x001a8952 SHR R15D,0x4 AND R15D,0x78 INC R15D MOV dword ptr [RBP],R15D MOV dword ptr [RBP + 0x4],0xffffffff JMP 0x001a8a05 LAB_001a8952: SHR R15D,0x7 AND R15D,0xf XOR EDX,EDX CMP byte ptr [R14 + 0x269],0x0 CMOVNZ RDX,R15 CMP dword ptr [R14 + 0x274],0x0 JLE 0x001a89b3 MOV EAX,dword ptr [RBX + 0x14] LEA RAX,[RCX + RAX*0x4] LEA RCX,[R15 + R15*0x4] MOV ECX,dword ptr [R14 + RCX*0x4 + 0x11c] LEA RDX,[RDX + RDX*0x4] LEA RDX,[R14 + RDX*0x4] ADD RDX,0x120 XOR ESI,ESI LAB_001a8996: MOV EDI,dword ptr [RDX] LEA R8D,[RDI + 0x1] MOV dword ptr [RDX],R8D ADD EDI,ECX MOV dword ptr [RAX + RSI*0x4],EDI INC RSI MOVSXD RDI,dword ptr [R14 + 0x274] CMP RSI,RDI JL 0x001a8996 LAB_001a89b3: MOVZX EDX,word ptr [RBX] LEA R12,[RSP + 0x6] LEA R13,[RSP + 0x4] MOV RDI,R14 MOV ESI,R15D MOV RCX,R12 MOV R8,R13 CALL 0x00138e30 MOVZX EAX,word ptr [R12] MOV ECX,dword ptr [RBX + 0xc] MOVZX EDX,word ptr [R13] SHL EDX,0x16 AND EAX,0x3ff SHL EAX,0xc OR EAX,EDX MOVZX EDX,R15W LEA EAX,[RAX + RDX*0x8] SHR ECX,0x4 AND ECX,0x4 ADD EAX,ECX INC EAX MOV dword ptr [RBP],EAX MOV EAX,dword ptr [RBX + 0x14] MOV dword ptr [RBP + 0x4],EAX LAB_001a8a05: MOVZX EAX,word ptr [RBX + 0xc] AND EAX,0x38 CMP AX,0x20 JNZ 0x001a8a6e MOVZX EDX,word ptr [RBX + 0xc] TEST DL,0x38 JZ 0x001a8a5f LEA RAX,[0x1c3fd0] XOR ECX,ECX LAB_001a8a24: SHR EDX,0x7 AND EDX,0xf INC EDX LEA RDX,[RDX + RDX*0x2] MOV ESI,dword ptr [RBX + RCX*0x4 + 0x18] MOV RDX,qword ptr [R14 + RDX*0x8] LEA RSI,[RSI + RSI*0x4] MOV EDX,dword ptr [RDX + RSI*0x8 + 0x10] MOVZX ESI,byte ptr [RAX] MOV dword ptr [RBP + RSI*0x4 + 0x8],EDX INC RCX MOVZX EDX,word ptr [RBX + 0xc] MOV ESI,EDX SHR ESI,0x3 AND ESI,0x7 ADD RAX,0x4 CMP RCX,RSI JC 0x001a8a24 LAB_001a8a5f: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a8a6e: LEA RDI,[0x1c4530] LEA RSI,[0x1c40be] LEA RCX,[0x1c4547] MOV EDX,0x2d6 CALL 0x00139560
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&, unsigned int*, int*) */ void __thiscall OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode (SubdivisionPlanBuilder *this,ProtoNode *param_1,uint *param_2,int *param_3) { uint *puVar1; ushort uVar2; uint uVar3; int iVar4; int iVar5; int8 in_RAX; byte *pbVar6; ulong uVar7; long lVar8; uint uVar9; int4 local_34; local_34 = (uint)((ulong)in_RAX >> 0x30); puVar1 = param_2 + *(uint *)(param_1 + 0x10); uVar2 = *(ushort *)(param_1 + 0xc); if ((uVar2 & 0x40) == 0) { *puVar1 = (uVar2 >> 4 & 0x78) + 1; puVar1[1] = 0xffffffff; } else { uVar9 = uVar2 >> 7 & 0xf; uVar7 = 0; if (this[0x269] != (SubdivisionPlanBuilder)0x0) { uVar7 = (ulong)uVar9; } if (0 < *(int *)(this + 0x274)) { uVar3 = *(uint *)(param_1 + 0x14); iVar4 = *(int *)(this + (ulong)uVar9 * 0x14 + 0x11c); lVar8 = 0; do { iVar5 = *(int *)(this + uVar7 * 0x14 + 0x120); *(int *)(this + uVar7 * 0x14 + 0x120) = iVar5 + 1; param_3[(ulong)uVar3 + lVar8] = iVar5 + iVar4; lVar8 = lVar8 + 1; } while (lVar8 < *(int *)(this + 0x274)); } computeSubPatchDomain (this,uVar9,(uint)*(ushort *)param_1,(short *)((long)&local_34 + 2),(short *)&local_34 ); *puVar1 = ((local_34 >> 0x10 & 0x3ff) << 0xc | local_34 << 0x16) + uVar9 * 8 + (*(uint *)(param_1 + 0xc) >> 4 & 4) + 1; puVar1[1] = *(uint *)(param_1 + 0x14); } if ((*(ushort *)(param_1 + 0xc) & 0x38) == 0x20) { uVar2 = *(ushort *)(param_1 + 0xc); if ((uVar2 & 0x38) != 0) { pbVar6 = &permuteWinding(unsigned_short)::permuteWinding; uVar7 = 0; do { puVar1[(ulong)*pbVar6 + 2] = *(uint *)(*(long *)(this + (ulong)((uVar2 >> 7 & 0xf) + 1) * 0x18) + 0x10 + (ulong)*(uint *)(param_1 + uVar7 * 4 + 0x18) * 0x28); uVar7 = uVar7 + 1; uVar2 = *(ushort *)(param_1 + 0xc); pbVar6 = pbVar6 + 4; } while (uVar7 < (uVar2 >> 3 & 7)); } return; } /* WARNING: Subroutine does not return */ __assert_fail("(int)pn.numChildren==4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp" ,0x2d6, "void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(const ProtoNode &, uint32_t *, Index *)" ); }
17,175
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&, unsigned int*, int*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp
void SubdivisionPlanBuilder::encodeRecursiveNode( ProtoNode const& pn, uint32_t* tree, Index* patchPoints) { tree += pn.treeOffset; NodeDescriptor* descr = reinterpret_cast<NodeDescriptor*>(tree); if (pn.hasIrregularPatch) { unsigned int level = pn.levelIndex; gatherIrregularPatchPoints(level, patchPoints + pn.firstPatchPoint); short u, v; bool irregRoot = computeSubPatchDomain(level, pn.faceIndex, u, v); descr->SetRecursive(level, u, v, pn.hasIrregularPatch); tree[1] = pn.firstPatchPoint; } else { descr->SetRecursive(pn.levelIndex, 0, 0, pn.hasIrregularPatch); tree[1] = INDEX_INVALID; } tree += 2; assert((int)pn.numChildren==4); for (int i=0; i<(int)pn.numChildren; ++i) tree[permuteWinding(i)] = getProtoNodeChild(pn, i).treeOffset; }
O3
cpp
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&, unsigned int*, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl 0x10(%rsi), %eax leaq (%rdx,%rax,4), %rbp movzwl 0xc(%rsi), %r15d testb $0x40, %r15b jne 0xab17e shrl $0x4, %r15d andl $0x78, %r15d incl %r15d movl %r15d, (%rbp) movl $0xffffffff, 0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xab231 shrl $0x7, %r15d andl $0xf, %r15d xorl %edx, %edx cmpb $0x0, 0x269(%r14) cmovneq %r15, %rdx cmpl $0x0, 0x274(%r14) jle 0xab1df movl 0x14(%rbx), %eax leaq (%rcx,%rax,4), %rax leaq (%r15,%r15,4), %rcx movl 0x11c(%r14,%rcx,4), %ecx leaq (%rdx,%rdx,4), %rdx leaq (%r14,%rdx,4), %rdx addq $0x120, %rdx # imm = 0x120 xorl %esi, %esi movl (%rdx), %edi leal 0x1(%rdi), %r8d movl %r8d, (%rdx) addl %ecx, %edi movl %edi, (%rax,%rsi,4) incq %rsi movslq 0x274(%r14), %rdi cmpq %rdi, %rsi jl 0xab1c2 movzwl (%rbx), %edx leaq 0x6(%rsp), %r12 leaq 0x4(%rsp), %r13 movq %r14, %rdi movl %r15d, %esi movq %r12, %rcx movq %r13, %r8 callq 0x38e30 movzwl (%r12), %eax movzwl (%r13), %ecx movl 0xc(%rbx), %edx shll $0x16, %ecx andl $0x3ff, %eax # imm = 0x3FF shll $0xc, %eax orl %ecx, %eax movzwl %r15w, %ecx leal (%rax,%rcx,8), %eax shrl $0x4, %edx andl $0x4, %edx addl %edx, %eax incl %eax movl %eax, (%rbp) movl 0x14(%rbx), %eax movl %eax, 0x4(%rbp) movzwl 0xc(%rbx), %edx movl %edx, %eax andl $0x38, %eax cmpw $0x20, %ax jne 0xab293 leaq 0x1c5f9(%rip), %rax # 0xc7840 xorl %ecx, %ecx shrl $0x7, %edx andl $0xf, %edx incl %edx leaq (%rdx,%rdx,2), %rdx movl 0x18(%rbx,%rcx,4), %esi movq (%r14,%rdx,8), %rdx leaq (%rsi,%rsi,4), %rsi movl 0x10(%rdx,%rsi,8), %edx movzbl (%rax), %esi movl %edx, 0x8(%rbp,%rsi,4) incq %rcx movzwl 0xc(%rbx), %edx movl %edx, %esi shrl $0x3, %esi andl $0x7, %esi addq $0x4, %rax cmpq %rsi, %rcx jb 0xab249 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1cb06(%rip), %rdi # 0xc7da0 leaq 0x1c68d(%rip), %rsi # 0xc792e leaq 0x1cb0f(%rip), %rcx # 0xc7db7 movl $0x2d6, %edx # imm = 0x2D6 callq 0x39540
_ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder19encodeRecursiveNodeERKNS2_9ProtoNodeEPjPi: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi mov eax, [rsi+10h] lea rbp, [rdx+rax*4] movzx r15d, word ptr [rsi+0Ch] test r15b, 40h jnz short loc_AB17E shr r15d, 4 and r15d, 78h inc r15d mov [rbp+0], r15d mov dword ptr [rbp+4], 0FFFFFFFFh jmp loc_AB231 loc_AB17E: shr r15d, 7 and r15d, 0Fh xor edx, edx cmp byte ptr [r14+269h], 0 cmovnz rdx, r15 cmp dword ptr [r14+274h], 0 jle short loc_AB1DF mov eax, [rbx+14h] lea rax, [rcx+rax*4] lea rcx, [r15+r15*4] mov ecx, [r14+rcx*4+11Ch] lea rdx, [rdx+rdx*4] lea rdx, [r14+rdx*4] add rdx, 120h xor esi, esi loc_AB1C2: mov edi, [rdx] lea r8d, [rdi+1] mov [rdx], r8d add edi, ecx mov [rax+rsi*4], edi inc rsi movsxd rdi, dword ptr [r14+274h] cmp rsi, rdi jl short loc_AB1C2 loc_AB1DF: movzx edx, word ptr [rbx]; int lea r12, [rsp+38h+var_32] lea r13, [rsp+38h+var_34] mov rdi, r14; this mov esi, r15d; int mov rcx, r12; __int16 * mov r8, r13; __int16 * call __ZNK10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder21computeSubPatchDomainEiiRsS3_; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::computeSubPatchDomain(int,int,short &,short &) movzx eax, word ptr [r12] movzx ecx, word ptr [r13+0] mov edx, [rbx+0Ch] shl ecx, 16h and eax, 3FFh shl eax, 0Ch or eax, ecx movzx ecx, r15w lea eax, [rax+rcx*8] shr edx, 4 and edx, 4 add eax, edx inc eax mov [rbp+0], eax mov eax, [rbx+14h] mov [rbp+4], eax loc_AB231: movzx edx, word ptr [rbx+0Ch] mov eax, edx and eax, 38h cmp ax, 20h ; ' ' jnz short loc_AB293 lea rax, _ZZN10OpenSubdiv6v3_6_03TmrL14permuteWindingEtE14permuteWinding; OpenSubdiv::v3_6_0::Tmr::permuteWinding(ushort)::permuteWinding xor ecx, ecx loc_AB249: shr edx, 7 and edx, 0Fh inc edx lea rdx, [rdx+rdx*2] mov esi, [rbx+rcx*4+18h] mov rdx, [r14+rdx*8] lea rsi, [rsi+rsi*4] mov edx, [rdx+rsi*8+10h] movzx esi, byte ptr [rax] mov [rbp+rsi*4+8], edx inc rcx movzx edx, word ptr [rbx+0Ch] mov esi, edx shr esi, 3 and esi, 7 add rax, 4 cmp rcx, rsi jb short loc_AB249 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_AB293: lea rdi, aIntPnNumchildr; "(int)pn.numChildren==4" lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_160; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"... mov edx, 2D6h call ___assert_fail
unsigned __int8 * OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode( OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *this, unsigned __int16 *a2, long long a3, long long a4) { long long v4; // rax _DWORD *v7; // rbp unsigned int v8; // r15d long long v9; // r15 long long v10; // rdx long long v11; // rax int v12; // ecx _DWORD *v13; // rdx long long v14; // rsi int v15; // edi unsigned int v16; // edx unsigned __int8 *result; // rax unsigned long long v18; // rcx __int16 v19[26]; // [rsp+0h] [rbp-34h] BYREF *(_DWORD *)v19 = HIDWORD(v4); v7 = (_DWORD *)(a3 + 4LL * *((unsigned int *)a2 + 4)); v8 = a2[6]; if ( (v8 & 0x40) != 0 ) { v9 = (v8 >> 7) & 0xF; v10 = 0LL; if ( *((_BYTE *)this + 617) ) v10 = v9; if ( *((int *)this + 157) > 0 ) { v11 = a4 + 4LL * *((unsigned int *)a2 + 5); v12 = *((_DWORD *)this + 5 * v9 + 71); v13 = (_DWORD *)((char *)this + 20 * v10 + 288); v14 = 0LL; do { v15 = (*v13)++; *(_DWORD *)(v11 + 4 * v14++) = v12 + v15; } while ( v14 < *((int *)this + 157) ); } OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::computeSubPatchDomain(this, v9, *a2, &v19[1], v19); *v7 = ((*((_DWORD *)a2 + 3) >> 4) & 4) + (((unsigned __int16)v19[0] << 22) | ((v19[1] & 0x3FF) << 12)) + 8 * (unsigned __int16)v9 + 1; v7[1] = *((_DWORD *)a2 + 5); } else { *v7 = ((v8 >> 4) & 0x78) + 1; v7[1] = -1; } v16 = a2[6]; if ( (a2[6] & 0x38) != 0x20 ) __assert_fail( "(int)pn.numChildren==4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp", 726LL, "void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(const ProtoNode &, uint32_t *, Index *)"); result = (unsigned __int8 *)&OpenSubdiv::v3_6_0::Tmr::permuteWinding(unsigned short)::permuteWinding; v18 = 0LL; do { v7[*result + 2] = *(_DWORD *)(*((_QWORD *)this + 3 * ((v16 >> 7) & 0xF) + 3) + 40LL * *(unsigned int *)&a2[2 * v18++ + 12] + 16); v16 = a2[6]; result += 4; } while ( v18 < ((v16 >> 3) & 7) ); return result; }
encodeRecursiveNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV EAX,dword ptr [RSI + 0x10] LEA RBP,[RDX + RAX*0x4] MOVZX R15D,word ptr [RSI + 0xc] TEST R15B,0x40 JNZ 0x001ab17e SHR R15D,0x4 AND R15D,0x78 INC R15D MOV dword ptr [RBP],R15D MOV dword ptr [RBP + 0x4],0xffffffff JMP 0x001ab231 LAB_001ab17e: SHR R15D,0x7 AND R15D,0xf XOR EDX,EDX CMP byte ptr [R14 + 0x269],0x0 CMOVNZ RDX,R15 CMP dword ptr [R14 + 0x274],0x0 JLE 0x001ab1df MOV EAX,dword ptr [RBX + 0x14] LEA RAX,[RCX + RAX*0x4] LEA RCX,[R15 + R15*0x4] MOV ECX,dword ptr [R14 + RCX*0x4 + 0x11c] LEA RDX,[RDX + RDX*0x4] LEA RDX,[R14 + RDX*0x4] ADD RDX,0x120 XOR ESI,ESI LAB_001ab1c2: MOV EDI,dword ptr [RDX] LEA R8D,[RDI + 0x1] MOV dword ptr [RDX],R8D ADD EDI,ECX MOV dword ptr [RAX + RSI*0x4],EDI INC RSI MOVSXD RDI,dword ptr [R14 + 0x274] CMP RSI,RDI JL 0x001ab1c2 LAB_001ab1df: MOVZX EDX,word ptr [RBX] LEA R12,[RSP + 0x6] LEA R13,[RSP + 0x4] MOV RDI,R14 MOV ESI,R15D MOV RCX,R12 MOV R8,R13 CALL 0x00138e30 MOVZX EAX,word ptr [R12] MOVZX ECX,word ptr [R13] MOV EDX,dword ptr [RBX + 0xc] SHL ECX,0x16 AND EAX,0x3ff SHL EAX,0xc OR EAX,ECX MOVZX ECX,R15W LEA EAX,[RAX + RCX*0x8] SHR EDX,0x4 AND EDX,0x4 ADD EAX,EDX INC EAX MOV dword ptr [RBP],EAX MOV EAX,dword ptr [RBX + 0x14] MOV dword ptr [RBP + 0x4],EAX LAB_001ab231: MOVZX EDX,word ptr [RBX + 0xc] MOV EAX,EDX AND EAX,0x38 CMP AX,0x20 JNZ 0x001ab293 LEA RAX,[0x1c7840] XOR ECX,ECX LAB_001ab249: SHR EDX,0x7 AND EDX,0xf INC EDX LEA RDX,[RDX + RDX*0x2] MOV ESI,dword ptr [RBX + RCX*0x4 + 0x18] MOV RDX,qword ptr [R14 + RDX*0x8] LEA RSI,[RSI + RSI*0x4] MOV EDX,dword ptr [RDX + RSI*0x8 + 0x10] MOVZX ESI,byte ptr [RAX] MOV dword ptr [RBP + RSI*0x4 + 0x8],EDX INC RCX MOVZX EDX,word ptr [RBX + 0xc] MOV ESI,EDX SHR ESI,0x3 AND ESI,0x7 ADD RAX,0x4 CMP RCX,RSI JC 0x001ab249 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001ab293: LEA RDI,[0x1c7da0] LEA RSI,[0x1c792e] LEA RCX,[0x1c7db7] MOV EDX,0x2d6 CALL 0x00139540
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&, unsigned int*, int*) */ void __thiscall OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode (SubdivisionPlanBuilder *this,ProtoNode *param_1,uint *param_2,int *param_3) { uint *puVar1; ushort uVar2; uint uVar3; int iVar4; int iVar5; int8 in_RAX; byte *pbVar6; ulong uVar7; long lVar8; uint uVar9; int4 local_34; local_34 = (uint)((ulong)in_RAX >> 0x30); puVar1 = param_2 + *(uint *)(param_1 + 0x10); uVar2 = *(ushort *)(param_1 + 0xc); if ((uVar2 & 0x40) == 0) { *puVar1 = (uVar2 >> 4 & 0x78) + 1; puVar1[1] = 0xffffffff; } else { uVar9 = uVar2 >> 7 & 0xf; uVar7 = 0; if (this[0x269] != (SubdivisionPlanBuilder)0x0) { uVar7 = (ulong)uVar9; } if (0 < *(int *)(this + 0x274)) { uVar3 = *(uint *)(param_1 + 0x14); iVar4 = *(int *)(this + (ulong)uVar9 * 0x14 + 0x11c); lVar8 = 0; do { iVar5 = *(int *)(this + uVar7 * 0x14 + 0x120); *(int *)(this + uVar7 * 0x14 + 0x120) = iVar5 + 1; param_3[(ulong)uVar3 + lVar8] = iVar5 + iVar4; lVar8 = lVar8 + 1; } while (lVar8 < *(int *)(this + 0x274)); } computeSubPatchDomain (this,uVar9,(uint)*(ushort *)param_1,(short *)((long)&local_34 + 2),(short *)&local_34 ); *puVar1 = ((local_34 >> 0x10 & 0x3ff) << 0xc | local_34 << 0x16) + uVar9 * 8 + (*(uint *)(param_1 + 0xc) >> 4 & 4) + 1; puVar1[1] = *(uint *)(param_1 + 0x14); } uVar2 = *(ushort *)(param_1 + 0xc); if ((uVar2 & 0x38) == 0x20) { pbVar6 = &permuteWinding(unsigned_short)::permuteWinding; uVar7 = 0; do { puVar1[(ulong)*pbVar6 + 2] = *(uint *)(*(long *)(this + (ulong)((uVar2 >> 7 & 0xf) + 1) * 0x18) + 0x10 + (ulong)*(uint *)(param_1 + uVar7 * 4 + 0x18) * 0x28); uVar7 = uVar7 + 1; uVar2 = *(ushort *)(param_1 + 0xc); pbVar6 = pbVar6 + 4; } while (uVar7 < (uVar2 >> 3 & 7)); return; } /* WARNING: Subroutine does not return */ __assert_fail("(int)pn.numChildren==4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp" ,0x2d6, "void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::encodeRecursiveNode(const ProtoNode &, uint32_t *, Index *)" ); }
17,176
bool fmt::v8::detail::check_char_specs<char, fmt::v8::detail::error_handler>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/core.h
FMT_CONSTEXPR auto check_char_specs(const basic_format_specs<Char>& specs, ErrorHandler&& eh = {}) -> bool { if (specs.type && specs.type != 'c') { check_int_type_spec(specs.type, eh); return false; } if (specs.align == align::numeric || specs.sign != sign::none || specs.alt) eh.on_error("invalid format specifier for char"); return true; }
O3
c
bool fmt::v8::detail::check_char_specs<char, fmt::v8::detail::error_handler>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&): pushq %rax movzbl 0x8(%rdi), %eax testl %eax, %eax je 0x34047 cmpl $0x63, %eax jne 0x34072 movzwl 0x9(%rdi), %ecx movl %ecx, %eax andl $0xf, %eax cmpw $0x4, %ax je 0x34060 movb $0x1, %al andl $0xf0, %ecx je 0x3407c leaq 0x16ed2(%rip), %rax # 0x4af39 movq %rsi, %rdi movq %rax, %rsi callq 0x449b6 movsbl %al, %edi callq 0x3407e xorl %eax, %eax popq %rcx retq
_ZN3fmt2v86detail16check_char_specsIcNS1_13error_handlerEEEbRKNS0_18basic_format_specsIT_EEOT0_: push rax movzx eax, byte ptr [rdi+8] test eax, eax jz short loc_34047 cmp eax, 63h ; 'c' jnz short loc_34072 loc_34047: movzx ecx, word ptr [rdi+9] mov eax, ecx and eax, 0Fh cmp ax, 4 jz short loc_34060 mov al, 1 and ecx, 0F0h jz short loc_3407C loc_34060: lea rax, aInvalidFormatS_0; "invalid format specifier for char" mov rdi, rsi; this mov rsi, rax; char * call _ZN3fmt2v86detail13error_handler8on_errorEPKc; fmt::v8::detail::error_handler::on_error(char const*) loc_34072: movsx edi, al call _ZN3fmt2v86detail19check_int_type_specIRNS1_13error_handlerEEEvcOT_; fmt::v8::detail::check_int_type_spec<fmt::v8::detail::error_handler &>(char,fmt::v8::detail::error_handler &) xor eax, eax loc_3407C: pop rcx retn
char fmt::v8::detail::check_char_specs<char,fmt::v8::detail::error_handler>( long long a1, fmt::v8::detail::error_handler *a2) { int v2; // eax __int16 v3; // cx char result; // al v2 = *(unsigned __int8 *)(a1 + 8); if ( *(_BYTE *)(a1 + 8) && v2 != 99 ) { fmt::v8::detail::check_int_type_spec<fmt::v8::detail::error_handler &>((unsigned int)(char)v2); return 0; } else { v3 = *(_WORD *)(a1 + 9); if ( (v3 & 0xF) == 4 || (result = 1, (v3 & 0xF0) != 0) ) fmt::v8::detail::error_handler::on_error(a2, "invalid format specifier for char"); } return result; }
check_char_specs<char,fmt::v8::detail::error_handler>: PUSH RAX MOVZX EAX,byte ptr [RDI + 0x8] TEST EAX,EAX JZ 0x00134047 CMP EAX,0x63 JNZ 0x00134072 LAB_00134047: MOVZX ECX,word ptr [RDI + 0x9] MOV EAX,ECX AND EAX,0xf CMP AX,0x4 JZ 0x00134060 MOV AL,0x1 AND ECX,0xf0 JZ 0x0013407c LAB_00134060: LEA RAX,[0x14af39] MOV RDI,RSI MOV RSI,RAX CALL 0x001449b6 LAB_00134072: MOVSX EDI,AL CALL 0x0013407e XOR EAX,EAX LAB_0013407c: POP RCX RET
/* bool fmt::v8::detail::check_char_specs<char, fmt::v8::detail::error_handler>(fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::error_handler&&) */ bool fmt::v8::detail::check_char_specs<char,fmt::v8::detail::error_handler> (basic_format_specs *param_1,error_handler *param_2) { basic_format_specs bVar1; bool bVar2; bVar1 = param_1[8]; if ((bVar1 == (basic_format_specs)0x0) || (bVar1 == (basic_format_specs)0x63)) { if (((*(ushort *)(param_1 + 9) & 0xf) == 4) || (bVar2 = true, (*(ushort *)(param_1 + 9) & 0xf0) != 0)) { /* WARNING: Subroutine does not return */ error_handler::on_error(param_2,"invalid format specifier for char"); } } else { check_int_type_spec<fmt::v8::detail::error_handler&>((char)bVar1,param_2); bVar2 = false; } return bVar2; }
17,177
my_caseup_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->caseup_multiply == 1); while ((src < srcend) && (srcres= my_mb_wc_utf8mb4(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O3
c
my_caseup_utf8mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, -0x38(%rbp) movq %rcx, %r13 movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0xcc11d movq %rdx, %r15 movq %rsi, %r12 addq %rsi, %r15 movq -0x30(%rbp), %r13 addq %r13, -0x38(%rbp) movq 0x78(%rdi), %r14 leaq -0x40(%rbp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0xcf1ae testl %eax, %eax jle 0xcc11d movl %eax, %ebx movq -0x40(%rbp), %rsi cmpq (%r14), %rsi ja 0xcc0fe movq 0x8(%r14), %rax movq %rsi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0xcc0fe movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %esi movq %rsi, -0x40(%rbp) movq %r13, %rdx movq -0x38(%rbp), %rcx callq 0xcbe9d testl %eax, %eax jle 0xcc11d movl %ebx, %ecx addq %rcx, %r12 movl %eax, %eax addq %rax, %r13 cmpq %r15, %r12 jb 0xcc0bd subq -0x30(%rbp), %r13 movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_utf8mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], r8 mov r13, rcx mov [rbp+var_30], rcx test rdx, rdx jle short loc_CC11D mov r15, rdx mov r12, rsi add r15, rsi mov r13, [rbp+var_30] add [rbp+var_38], r13 mov r14, [rdi+78h] loc_CC0BD: lea rdi, [rbp+var_40] mov rsi, r12 mov rdx, r15 call my_mb_wc_utf8mb4_quick_0 test eax, eax jle short loc_CC11D mov ebx, eax mov rsi, [rbp+var_40] cmp rsi, [r14] ja short loc_CC0FE mov rax, [r14+8] mov rcx, rsi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_CC0FE movzx ecx, sil lea rcx, [rcx+rcx*2] mov esi, [rax+rcx*4] mov [rbp+var_40], rsi loc_CC0FE: mov rdx, r13 mov rcx, [rbp+var_38] call my_wc_mb_utf8mb4 test eax, eax jle short loc_CC11D mov ecx, ebx add r12, rcx mov eax, eax add r13, rax cmp r12, r15 jb short loc_CC0BD loc_CC11D: sub r13, [rbp+var_30] mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_caseup_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, unsigned long long a5) { _BYTE *v5; // r13 unsigned long long v6; // r12 unsigned long long v7; // r15 unsigned long long *v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rsi long long v12; // rax int v13; // eax unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF unsigned long long v16; // [rsp+8h] [rbp-38h] _BYTE *v17; // [rsp+10h] [rbp-30h] v16 = a5; v5 = a4; v17 = a4; if ( a3 > 0 ) { v6 = a2; v7 = a2 + a3; v5 = v17; v16 += (unsigned long long)v17; v8 = *(unsigned long long **)(a1 + 120); do { v9 = my_mb_wc_utf8mb4_quick_0(&v15, v6, v7); if ( v9 <= 0 ) break; v10 = v9; v11 = v15; if ( v15 <= *v8 ) { v12 = *(_QWORD *)(v8[1] + 8 * (v15 >> 8)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v15); v15 = v11; } } v13 = my_wc_mb_utf8mb4((long long)&v15, v11, v5, v16); if ( v13 <= 0 ) break; v6 += v10; v5 += (unsigned int)v13; } while ( v6 < v7 ); } return (_BYTE *)(v5 - v17); }
my_caseup_utf8mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],R8 MOV R13,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x001cc11d MOV R15,RDX MOV R12,RSI ADD R15,RSI MOV R13,qword ptr [RBP + -0x30] ADD qword ptr [RBP + -0x38],R13 MOV R14,qword ptr [RDI + 0x78] LAB_001cc0bd: LEA RDI,[RBP + -0x40] MOV RSI,R12 MOV RDX,R15 CALL 0x001cf1ae TEST EAX,EAX JLE 0x001cc11d MOV EBX,EAX MOV RSI,qword ptr [RBP + -0x40] CMP RSI,qword ptr [R14] JA 0x001cc0fe MOV RAX,qword ptr [R14 + 0x8] MOV RCX,RSI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x001cc0fe MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x40],RSI LAB_001cc0fe: MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x38] CALL 0x001cbe9d TEST EAX,EAX JLE 0x001cc11d MOV ECX,EBX ADD R12,RCX MOV EAX,EAX ADD R13,RAX CMP R12,R15 JC 0x001cc0bd LAB_001cc11d: SUB R13,qword ptr [RBP + -0x30] MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5) { ulong *puVar1; long lVar2; uint uVar3; uint uVar4; ulong uVar5; ulong local_48; long local_40; long local_38; local_38 = param_4; if (0 < param_3) { uVar5 = param_3 + param_2; local_40 = param_5 + param_4; puVar1 = *(ulong **)(param_1 + 0x78); do { uVar3 = my_mb_wc_utf8mb4_quick(&local_48,param_2,uVar5); if ((int)uVar3 < 1) break; if ((local_48 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (local_48 >> 8) * 8), lVar2 != 0)) { local_48 = (ulong)*(uint *)(lVar2 + (local_48 & 0xff) * 0xc); } uVar4 = my_wc_mb_utf8mb4(); if ((int)uVar4 < 1) break; param_2 = param_2 + uVar3; param_4 = param_4 + (ulong)uVar4; } while (param_2 < uVar5); } return param_4 - local_38; }
17,178
cpuidex
tsotchke[P]eshkol/src/core/utils/simd.c
static void cpuidex(int* eax, int* ecx, int* ebx, int* edx) { #if defined(_MSC_VER) int regs[4]; __cpuidex(regs, *eax, *ecx); *eax = regs[0]; *ebx = regs[1]; *ecx = regs[2]; *edx = regs[3]; #else __asm__ __volatile__( "cpuid" : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx) : "a"(*eax), "c"(*ecx) ); #endif }
O0
c
cpuidex: pushq %rbp movq %rsp, %rbp pushq %rbx movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %r8 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x18(%rbp), %rcx movl (%rcx), %ecx cpuid movl %eax, %r9d movq -0x38(%rbp), %rax movl %ecx, %esi movq -0x30(%rbp), %rcx movl %r9d, (%r8) movl %ebx, (%rdi) movl %esi, (%rcx) movl %edx, (%rax) popq %rbx popq %rbp retq nopw %cs:(%rax,%rax)
cpuidex: push rbp mov rbp, rsp push rbx mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov r8, [rbp+var_10] mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_18] mov ecx, [rcx] cpuid mov r9d, eax mov rax, [rbp+var_38] mov esi, ecx mov rcx, [rbp+var_30] mov [r8], r9d mov [rdi], ebx mov [rcx], esi mov [rax], edx pop rbx pop rbp retn
_DWORD * cpuidex(_DWORD *a1, _DWORD *a2, _DWORD *a3, _DWORD *a4) { int v11; // r9d _DWORD *result; // rax _RAX = (unsigned int)*a1; __asm { cpuid } v11 = _RAX; result = a4; *a1 = v11; *a3 = _RBX; *a2 = _RCX; *a4 = _RDX; return result; }
cpuidex: PUSH RBP MOV RBP,RSP PUSH RBX 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 R8,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX] CPUID MOV R9D,EAX MOV RAX,qword ptr [RBP + -0x38] MOV ESI,ECX MOV RCX,qword ptr [RBP + -0x30] MOV dword ptr [R8],R9D MOV dword ptr [RDI],EBX MOV dword ptr [RCX],ESI MOV dword ptr [RAX],EDX POP RBX POP RBP RET
void cpuidex(int *param_1,int *param_2,int *param_3,int *param_4) { int iVar1; int *piVar2; int iVar3; int iVar4; iVar1 = *param_1; if (iVar1 == 0) { piVar2 = (int *)cpuid_basic_info(0); } else if (iVar1 == 1) { piVar2 = (int *)cpuid_Version_info(1); } else if (iVar1 == 2) { piVar2 = (int *)cpuid_cache_tlb_info(2); } else if (iVar1 == 3) { piVar2 = (int *)cpuid_serial_info(3); } else if (iVar1 == 4) { piVar2 = (int *)cpuid_Deterministic_Cache_Parameters_info(4); } else if (iVar1 == 5) { piVar2 = (int *)cpuid_MONITOR_MWAIT_Features_info(5); } else if (iVar1 == 6) { piVar2 = (int *)cpuid_Thermal_Power_Management_info(6); } else if (iVar1 == 7) { piVar2 = (int *)cpuid_Extended_Feature_Enumeration_info(7); } else if (iVar1 == 9) { piVar2 = (int *)cpuid_Direct_Cache_Access_info(9); } else if (iVar1 == 10) { piVar2 = (int *)cpuid_Architectural_Performance_Monitoring_info(10); } else if (iVar1 == 0xb) { piVar2 = (int *)cpuid_Extended_Topology_info(0xb); } else if (iVar1 == 0xd) { piVar2 = (int *)cpuid_Processor_Extended_States_info(0xd); } else if (iVar1 == 0xf) { piVar2 = (int *)cpuid_Quality_of_Service_info(0xf); } else if (iVar1 == -0x7ffffffe) { piVar2 = (int *)cpuid_brand_part1_info(0x80000002); } else if (iVar1 == -0x7ffffffd) { piVar2 = (int *)cpuid_brand_part2_info(0x80000003); } else if (iVar1 == -0x7ffffffc) { piVar2 = (int *)cpuid_brand_part3_info(0x80000004); } else { piVar2 = (int *)cpuid(iVar1); } iVar1 = piVar2[1]; iVar3 = piVar2[2]; iVar4 = piVar2[3]; *param_1 = *piVar2; *param_3 = iVar1; *param_2 = iVar4; *param_4 = iVar3; return; }
17,179
bitmap_copy
eloqsql/mysys/my_bitmap.c
void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map->n_bits == map2->n_bits); end= map->last_word_ptr; while (to <= end) *to++ = *from++; }
O3
c
bitmap_copy: movq (%rdi), %rax movq 0x8(%rdi), %rcx cmpq %rcx, %rax ja 0xba60c pushq %rbp movq %rsp, %rbp movq (%rsi), %rdx movl (%rdx), %esi addq $0x4, %rdx movl %esi, (%rax) addq $0x4, %rax cmpq %rcx, %rax jbe 0xba5fa popq %rbp retq
bitmap_copy: mov rax, [rdi] mov rcx, [rdi+8] cmp rax, rcx ja short locret_BA60C push rbp mov rbp, rsp mov rdx, [rsi] loc_BA5FA: mov esi, [rdx] add rdx, 4 mov [rax], esi add rax, 4 cmp rax, rcx jbe short loc_BA5FA pop rbp locret_BA60C: retn
_DWORD * bitmap_copy(long long a1, int **a2) { _DWORD *result; // rax unsigned long long v3; // rcx int *v4; // rdx int v5; // esi result = *(_DWORD **)a1; v3 = *(_QWORD *)(a1 + 8); if ( *(_QWORD *)a1 <= v3 ) { v4 = *a2; do { v5 = *v4++; *result++ = v5; } while ( (unsigned long long)result <= v3 ); } return result; }
bitmap_copy: MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] CMP RAX,RCX JA 0x001ba60c PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RSI] LAB_001ba5fa: MOV ESI,dword ptr [RDX] ADD RDX,0x4 MOV dword ptr [RAX],ESI ADD RAX,0x4 CMP RAX,RCX JBE 0x001ba5fa POP RBP LAB_001ba60c: RET
void bitmap_copy(int8 *param_1,int8 *param_2) { int4 uVar1; int4 *puVar2; int4 *puVar3; int4 *puVar4; puVar3 = (int4 *)*param_1; puVar2 = (int4 *)param_1[1]; if (puVar3 <= puVar2) { puVar4 = (int4 *)*param_2; do { uVar1 = *puVar4; puVar4 = puVar4 + 1; *puVar3 = uVar1; puVar3 = puVar3 + 1; } while (puVar3 <= puVar2); } return; }
17,180
js_resolve_export1
bluesky950520[P]quickjs/quickjs.c
static JSResolveResultEnum js_resolve_export1(JSContext *ctx, JSModuleDef **pmodule, JSExportEntry **pme, JSModuleDef *m, JSAtom export_name, JSResolveState *s) { JSExportEntry *me; *pmodule = NULL; *pme = NULL; if (find_resolve_entry(s, m, export_name) >= 0) return JS_RESOLVE_RES_CIRCULAR; if (add_resolve_entry(ctx, s, m, export_name) < 0) return JS_RESOLVE_RES_EXCEPTION; me = find_export_entry(ctx, m, export_name); if (me) { if (me->export_type == JS_EXPORT_TYPE_LOCAL) { /* local export */ *pmodule = m; *pme = me; return JS_RESOLVE_RES_FOUND; } else { /* indirect export */ JSModuleDef *m1; m1 = m->req_module_entries[me->u.req_module_idx].module; if (me->local_name == JS_ATOM__star_) { /* export ns from */ *pmodule = m; *pme = me; return JS_RESOLVE_RES_FOUND; } else { return js_resolve_export1(ctx, pmodule, pme, m1, me->local_name, s); } } } else { if (export_name != JS_ATOM_default) { /* not found in direct or indirect exports: try star exports */ int i; for(i = 0; i < m->star_export_entries_count; i++) { JSStarExportEntry *se = &m->star_export_entries[i]; JSModuleDef *m1, *res_m; JSExportEntry *res_me; JSResolveResultEnum ret; m1 = m->req_module_entries[se->req_module_idx].module; ret = js_resolve_export1(ctx, &res_m, &res_me, m1, export_name, s); if (ret == JS_RESOLVE_RES_AMBIGUOUS || ret == JS_RESOLVE_RES_EXCEPTION) { return ret; } else if (ret == JS_RESOLVE_RES_FOUND) { if (*pme != NULL) { if (*pmodule != res_m || res_me->local_name != (*pme)->local_name) { *pmodule = NULL; *pme = NULL; return JS_RESOLVE_RES_AMBIGUOUS; } } else { *pmodule = res_m; *pme = res_me; } } } if (*pme != NULL) return JS_RESOLVE_RES_FOUND; } return JS_RESOLVE_RES_NOT_FOUND; } }
O0
c
js_resolve_export1: subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x58(%rsp) movq %rcx, 0x50(%rsp) movl %r8d, 0x4c(%rsp) movq %r9, 0x40(%rsp) movq 0x60(%rsp), %rax movq $0x0, (%rax) movq 0x58(%rsp), %rax movq $0x0, (%rax) movq 0x40(%rsp), %rdi movq 0x50(%rsp), %rsi movl 0x4c(%rsp), %edx callq 0x72a40 cmpl $0x0, %eax jl 0x727df movl $0x2, 0x74(%rsp) jmp 0x72a2d movq 0x68(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x50(%rsp), %rdx movl 0x4c(%rsp), %ecx callq 0x72ac0 cmpl $0x0, %eax jge 0x72809 movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF jmp 0x72a2d movq 0x68(%rsp), %rdi movq 0x50(%rsp), %rsi movl 0x4c(%rsp), %edx callq 0x487c0 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) je 0x728e2 movq 0x38(%rsp), %rax cmpl $0x0, 0x10(%rax) jne 0x7285f movq 0x50(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, (%rax) movq 0x38(%rsp), %rcx movq 0x58(%rsp), %rax movq %rcx, (%rax) movl $0x0, 0x74(%rsp) jmp 0x72a2d movq 0x50(%rsp), %rax movq 0x18(%rax), %rax movq 0x38(%rsp), %rcx movslq (%rcx), %rcx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax cmpl $0x7e, 0x14(%rax) jne 0x728b2 movq 0x50(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, (%rax) movq 0x38(%rsp), %rcx movq 0x58(%rsp), %rax movq %rcx, (%rax) movl $0x0, 0x74(%rsp) jmp 0x72a2d movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax movl 0x14(%rax), %r8d movq 0x40(%rsp), %r9 callq 0x72780 movl %eax, 0x74(%rsp) jmp 0x72a2d cmpl $0x16, 0x4c(%rsp) je 0x72a25 movl $0x0, 0x2c(%rsp) movl 0x2c(%rsp), %eax movq 0x50(%rsp), %rcx cmpl 0x40(%rcx), %eax jge 0x72a0e movq 0x50(%rsp), %rax movq 0x38(%rax), %rax movslq 0x2c(%rsp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x50(%rsp), %rax movq 0x18(%rax), %rax movq 0x20(%rsp), %rcx movslq (%rcx), %rcx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq %rax, 0x18(%rsp) movq 0x68(%rsp), %rdi movq 0x18(%rsp), %rcx movl 0x4c(%rsp), %r8d movq 0x40(%rsp), %r9 leaq 0x10(%rsp), %rsi leaq 0x8(%rsp), %rdx callq 0x72780 movl %eax, 0x4(%rsp) cmpl $0x3, 0x4(%rsp) je 0x72977 cmpl $-0x1, 0x4(%rsp) jne 0x72984 movl 0x4(%rsp), %eax movl %eax, 0x74(%rsp) jmp 0x72a2d cmpl $0x0, 0x4(%rsp) jne 0x729fa movq 0x58(%rsp), %rax cmpq $0x0, (%rax) je 0x729de movq 0x60(%rsp), %rax movq (%rax), %rax cmpq 0x10(%rsp), %rax jne 0x729ba movq 0x8(%rsp), %rax movl 0x14(%rax), %eax movq 0x58(%rsp), %rcx movq (%rcx), %rcx cmpl 0x14(%rcx), %eax je 0x729dc movq 0x60(%rsp), %rax movq $0x0, (%rax) movq 0x58(%rsp), %rax movq $0x0, (%rax) movl $0x3, 0x74(%rsp) jmp 0x72a2d jmp 0x729f8 movq 0x10(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, (%rax) movq 0x8(%rsp), %rcx movq 0x58(%rsp), %rax movq %rcx, (%rax) jmp 0x729fa jmp 0x729fc jmp 0x729fe movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x728f5 movq 0x58(%rsp), %rax cmpq $0x0, (%rax) je 0x72a23 movl $0x0, 0x74(%rsp) jmp 0x72a2d jmp 0x72a25 movl $0x1, 0x74(%rsp) movl 0x74(%rsp), %eax addq $0x78, %rsp retq nopw %cs:(%rax,%rax)
js_resolve_export1: sub rsp, 78h mov [rsp+78h+var_10], rdi mov [rsp+78h+var_18], rsi mov [rsp+78h+var_20], rdx mov [rsp+78h+var_28], rcx mov [rsp+78h+var_2C], r8d mov [rsp+78h+var_38], r9 mov rax, [rsp+78h+var_18] mov qword ptr [rax], 0 mov rax, [rsp+78h+var_20] mov qword ptr [rax], 0 mov rdi, [rsp+78h+var_38] mov rsi, [rsp+78h+var_28] mov edx, [rsp+78h+var_2C] call find_resolve_entry cmp eax, 0 jl short loc_727DF mov [rsp+78h+var_4], 2 jmp loc_72A2D loc_727DF: mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_38] mov rdx, [rsp+78h+var_28] mov ecx, [rsp+78h+var_2C] call add_resolve_entry cmp eax, 0 jge short loc_72809 mov [rsp+78h+var_4], 0FFFFFFFFh jmp loc_72A2D loc_72809: mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_28] mov edx, [rsp+78h+var_2C] call find_export_entry mov [rsp+78h+var_40], rax cmp [rsp+78h+var_40], 0 jz loc_728E2 mov rax, [rsp+78h+var_40] cmp dword ptr [rax+10h], 0 jnz short loc_7285F mov rcx, [rsp+78h+var_28] mov rax, [rsp+78h+var_18] mov [rax], rcx mov rcx, [rsp+78h+var_40] mov rax, [rsp+78h+var_20] mov [rax], rcx mov [rsp+78h+var_4], 0 jmp loc_72A2D loc_7285F: mov rax, [rsp+78h+var_28] mov rax, [rax+18h] mov rcx, [rsp+78h+var_40] movsxd rcx, dword ptr [rcx] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov [rsp+78h+var_48], rax mov rax, [rsp+78h+var_40] cmp dword ptr [rax+14h], 7Eh ; '~' jnz short loc_728B2 mov rcx, [rsp+78h+var_28] mov rax, [rsp+78h+var_18] mov [rax], rcx mov rcx, [rsp+78h+var_40] mov rax, [rsp+78h+var_20] mov [rax], rcx mov [rsp+78h+var_4], 0 jmp loc_72A2D loc_728B2: mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_18] mov rdx, [rsp+78h+var_20] mov rcx, [rsp+78h+var_48] mov rax, [rsp+78h+var_40] mov r8d, [rax+14h] mov r9, [rsp+78h+var_38] call js_resolve_export1 mov [rsp+78h+var_4], eax jmp loc_72A2D loc_728E2: cmp [rsp+78h+var_2C], 16h jz loc_72A25 mov [rsp+78h+var_4C], 0 loc_728F5: mov eax, [rsp+78h+var_4C] mov rcx, [rsp+78h+var_28] cmp eax, [rcx+40h] jge loc_72A0E mov rax, [rsp+78h+var_28] mov rax, [rax+38h] movsxd rcx, [rsp+78h+var_4C] shl rcx, 2 add rax, rcx mov [rsp+78h+var_58], rax mov rax, [rsp+78h+var_28] mov rax, [rax+18h] mov rcx, [rsp+78h+var_58] movsxd rcx, dword ptr [rcx] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov [rsp+78h+var_60], rax mov rdi, [rsp+78h+var_10] mov rcx, [rsp+78h+var_60] mov r8d, [rsp+78h+var_2C] mov r9, [rsp+78h+var_38] lea rsi, [rsp+78h+var_68] lea rdx, [rsp+78h+var_70] call js_resolve_export1 mov [rsp+78h+var_74], eax cmp [rsp+78h+var_74], 3 jz short loc_72977 cmp [rsp+78h+var_74], 0FFFFFFFFh jnz short loc_72984 loc_72977: mov eax, [rsp+78h+var_74] mov [rsp+78h+var_4], eax jmp loc_72A2D loc_72984: cmp [rsp+78h+var_74], 0 jnz short loc_729FA mov rax, [rsp+78h+var_20] cmp qword ptr [rax], 0 jz short loc_729DE mov rax, [rsp+78h+var_18] mov rax, [rax] cmp rax, [rsp+78h+var_68] jnz short loc_729BA mov rax, [rsp+78h+var_70] mov eax, [rax+14h] mov rcx, [rsp+78h+var_20] mov rcx, [rcx] cmp eax, [rcx+14h] jz short loc_729DC loc_729BA: mov rax, [rsp+78h+var_18] mov qword ptr [rax], 0 mov rax, [rsp+78h+var_20] mov qword ptr [rax], 0 mov [rsp+78h+var_4], 3 jmp short loc_72A2D loc_729DC: jmp short loc_729F8 loc_729DE: mov rcx, [rsp+78h+var_68] mov rax, [rsp+78h+var_18] mov [rax], rcx mov rcx, [rsp+78h+var_70] mov rax, [rsp+78h+var_20] mov [rax], rcx loc_729F8: jmp short $+2 loc_729FA: jmp short $+2 loc_729FC: jmp short $+2 loc_729FE: mov eax, [rsp+78h+var_4C] add eax, 1 mov [rsp+78h+var_4C], eax jmp loc_728F5 loc_72A0E: mov rax, [rsp+78h+var_20] cmp qword ptr [rax], 0 jz short loc_72A23 mov [rsp+78h+var_4], 0 jmp short loc_72A2D loc_72A23: jmp short $+2 loc_72A25: mov [rsp+78h+var_4], 1 loc_72A2D: mov eax, [rsp+78h+var_4] add rsp, 78h retn
long long js_resolve_export1(long long a1, _QWORD *a2, long long a3, long long a4, unsigned int a5, long long a6) { unsigned int v7; // [rsp+4h] [rbp-74h] long long v8; // [rsp+8h] [rbp-70h] BYREF long long v9; // [rsp+10h] [rbp-68h] BYREF long long v10; // [rsp+18h] [rbp-60h] int *v11; // [rsp+20h] [rbp-58h] int i; // [rsp+2Ch] [rbp-4Ch] long long v13; // [rsp+30h] [rbp-48h] int *export_entry; // [rsp+38h] [rbp-40h] long long v15; // [rsp+40h] [rbp-38h] unsigned int v16; // [rsp+4Ch] [rbp-2Ch] long long v17; // [rsp+50h] [rbp-28h] long long v18; // [rsp+58h] [rbp-20h] _QWORD *v19; // [rsp+60h] [rbp-18h] long long v20; // [rsp+68h] [rbp-10h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v15 = a6; *a2 = 0LL; *(_QWORD *)v18 = 0LL; if ( (int)find_resolve_entry(v15, v17, v16) < 0 ) { if ( (int)add_resolve_entry(v20, v15, v17, v16) >= 0 ) { export_entry = (int *)find_export_entry(v20, v17, v16); if ( export_entry ) { if ( export_entry[4] ) { v13 = *(_QWORD *)(16LL * *export_entry + *(_QWORD *)(v17 + 24) + 8); if ( export_entry[5] == 126 ) { *v19 = v17; *(_QWORD *)v18 = export_entry; return 0; } else { return (unsigned int)js_resolve_export1(v20, v19, v18, v13, (unsigned int)export_entry[5], v15); } } else { *v19 = v17; *(_QWORD *)v18 = export_entry; return 0; } } else { if ( v16 == 22 ) return 1; for ( i = 0; i < *(_DWORD *)(v17 + 64); ++i ) { v11 = (int *)(4LL * i + *(_QWORD *)(v17 + 56)); v10 = *(_QWORD *)(16LL * *v11 + *(_QWORD *)(v17 + 24) + 8); v7 = js_resolve_export1(v20, &v9, &v8, v10, v16, v15); if ( v7 == 3 || v7 == -1 ) return v7; if ( !v7 ) { if ( *(_QWORD *)v18 ) { if ( *v19 != v9 || *(_DWORD *)(v8 + 20) != *(_DWORD *)(*(_QWORD *)v18 + 20LL) ) { *v19 = 0LL; *(_QWORD *)v18 = 0LL; return 3; } } else { *v19 = v9; *(_QWORD *)v18 = v8; } } } return !*(_QWORD *)v18; } } else { return (unsigned int)-1; } } else { return 2; } }
js_resolve_export1: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x58],RDX MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],R8D MOV qword ptr [RSP + 0x40],R9 MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RAX],0x0 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x4c] CALL 0x00172a40 CMP EAX,0x0 JL 0x001727df MOV dword ptr [RSP + 0x74],0x2 JMP 0x00172a2d LAB_001727df: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x50] MOV ECX,dword ptr [RSP + 0x4c] CALL 0x00172ac0 CMP EAX,0x0 JGE 0x00172809 MOV dword ptr [RSP + 0x74],0xffffffff JMP 0x00172a2d LAB_00172809: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x4c] CALL 0x001487c0 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JZ 0x001728e2 MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX + 0x10],0x0 JNZ 0x0017285f MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x74],0x0 JMP 0x00172a2d LAB_0017285f: MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX + 0x14],0x7e JNZ 0x001728b2 MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x74],0x0 JMP 0x00172a2d LAB_001728b2: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] MOV R8D,dword ptr [RAX + 0x14] MOV R9,qword ptr [RSP + 0x40] CALL 0x00172780 MOV dword ptr [RSP + 0x74],EAX JMP 0x00172a2d LAB_001728e2: CMP dword ptr [RSP + 0x4c],0x16 JZ 0x00172a25 MOV dword ptr [RSP + 0x2c],0x0 LAB_001728f5: MOV EAX,dword ptr [RSP + 0x2c] MOV RCX,qword ptr [RSP + 0x50] CMP EAX,dword ptr [RCX + 0x40] JGE 0x00172a0e MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0x38] MOVSXD RCX,dword ptr [RSP + 0x2c] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x18] MOV R8D,dword ptr [RSP + 0x4c] MOV R9,qword ptr [RSP + 0x40] LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x8] CALL 0x00172780 MOV dword ptr [RSP + 0x4],EAX CMP dword ptr [RSP + 0x4],0x3 JZ 0x00172977 CMP dword ptr [RSP + 0x4],-0x1 JNZ 0x00172984 LAB_00172977: MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSP + 0x74],EAX JMP 0x00172a2d LAB_00172984: CMP dword ptr [RSP + 0x4],0x0 JNZ 0x001729fa MOV RAX,qword ptr [RSP + 0x58] CMP qword ptr [RAX],0x0 JZ 0x001729de MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RSP + 0x10] JNZ 0x001729ba MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x14] MOV RCX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x14] JZ 0x001729dc LAB_001729ba: MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RAX],0x0 MOV dword ptr [RSP + 0x74],0x3 JMP 0x00172a2d LAB_001729dc: JMP 0x001729f8 LAB_001729de: MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RAX],RCX LAB_001729f8: JMP 0x001729fa LAB_001729fa: JMP 0x001729fc LAB_001729fc: JMP 0x001729fe LAB_001729fe: MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x001728f5 LAB_00172a0e: MOV RAX,qword ptr [RSP + 0x58] CMP qword ptr [RAX],0x0 JZ 0x00172a23 MOV dword ptr [RSP + 0x74],0x0 JMP 0x00172a2d LAB_00172a23: JMP 0x00172a25 LAB_00172a25: MOV dword ptr [RSP + 0x74],0x1 LAB_00172a2d: MOV EAX,dword ptr [RSP + 0x74] ADD RSP,0x78 RET
int4 js_resolve_export1(int8 param_1,long *param_2,long *param_3,long param_4,int param_5, int8 param_6) { int iVar1; long local_70; long local_68; int8 local_60; int *local_58; int local_4c; int8 local_48; int *local_40; int8 local_38; int local_2c; long local_28; long *local_20; long *local_18; int8 local_10; int4 local_4; *param_2 = 0; *param_3 = 0; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; iVar1 = find_resolve_entry(param_6,param_4,param_5); if (iVar1 < 0) { iVar1 = add_resolve_entry(local_10,local_38,local_28,local_2c); if (iVar1 < 0) { local_4 = 0xffffffff; } else { local_40 = (int *)find_export_entry(local_10,local_28,local_2c); if (local_40 == (int *)0x0) { if (local_2c != 0x16) { local_40 = (int *)0x0; for (local_4c = 0; local_4c < *(int *)(local_28 + 0x40); local_4c = local_4c + 1) { local_58 = (int *)(*(long *)(local_28 + 0x38) + (long)local_4c * 4); local_60 = *(int8 *)(*(long *)(local_28 + 0x18) + (long)*local_58 * 0x10 + 8); iVar1 = js_resolve_export1(local_10,&local_68,&local_70,local_60,local_2c,local_38); if (iVar1 == 3) { return 3; } if (iVar1 == -1) { return 0xffffffff; } if (iVar1 == 0) { if (*local_20 == 0) { *local_18 = local_68; *local_20 = local_70; } else if ((*local_18 != local_68) || (*(int *)(local_70 + 0x14) != *(int *)(*local_20 + 0x14))) { *local_18 = 0; *local_20 = 0; return 3; } } } if (*local_20 != 0) { return 0; } } local_4 = 1; } else if (local_40[4] == 0) { *local_18 = local_28; *local_20 = (long)local_40; local_4 = 0; } else { local_48 = *(int8 *)(*(long *)(local_28 + 0x18) + (long)*local_40 * 0x10 + 8); if (local_40[5] == 0x7e) { *local_18 = local_28; *local_20 = (long)local_40; local_4 = 0; } else { local_4 = js_resolve_export1(local_10,local_18,local_20,local_48,local_40[5],local_38); } } } } else { local_4 = 2; } return local_4; }
17,181
js_resolve_export1
bluesky950520[P]quickjs/quickjs.c
static JSResolveResultEnum js_resolve_export1(JSContext *ctx, JSModuleDef **pmodule, JSExportEntry **pme, JSModuleDef *m, JSAtom export_name, JSResolveState *s) { JSExportEntry *me; *pmodule = NULL; *pme = NULL; if (find_resolve_entry(s, m, export_name) >= 0) return JS_RESOLVE_RES_CIRCULAR; if (add_resolve_entry(ctx, s, m, export_name) < 0) return JS_RESOLVE_RES_EXCEPTION; me = find_export_entry(ctx, m, export_name); if (me) { if (me->export_type == JS_EXPORT_TYPE_LOCAL) { /* local export */ *pmodule = m; *pme = me; return JS_RESOLVE_RES_FOUND; } else { /* indirect export */ JSModuleDef *m1; m1 = m->req_module_entries[me->u.req_module_idx].module; if (me->local_name == JS_ATOM__star_) { /* export ns from */ *pmodule = m; *pme = me; return JS_RESOLVE_RES_FOUND; } else { return js_resolve_export1(ctx, pmodule, pme, m1, me->local_name, s); } } } else { if (export_name != JS_ATOM_default) { /* not found in direct or indirect exports: try star exports */ int i; for(i = 0; i < m->star_export_entries_count; i++) { JSStarExportEntry *se = &m->star_export_entries[i]; JSModuleDef *m1, *res_m; JSExportEntry *res_me; JSResolveResultEnum ret; m1 = m->req_module_entries[se->req_module_idx].module; ret = js_resolve_export1(ctx, &res_m, &res_me, m1, export_name, s); if (ret == JS_RESOLVE_RES_AMBIGUOUS || ret == JS_RESOLVE_RES_EXCEPTION) { return ret; } else if (ret == JS_RESOLVE_RES_FOUND) { if (*pme != NULL) { if (*pmodule != res_m || res_me->local_name != (*pme)->local_name) { *pmodule = NULL; *pme = NULL; return JS_RESOLVE_RES_AMBIGUOUS; } } else { *pmodule = res_m; *pme = res_me; } } } if (*pme != NULL) return JS_RESOLVE_RES_FOUND; } return JS_RESOLVE_RES_NOT_FOUND; } }
O1
c
js_resolve_export1: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, %r14 movl %r8d, %ebp movq %rcx, %r12 movq %rdx, %rbx movq %rsi, %r15 xorl %r13d, %r13d leaq 0x8(%r9), %rcx movq %rdi, 0x10(%rsp) movq %r13, (%r15) movq %r13, (%rbx) movslq 0xc(%r14), %r8 testq %r8, %r8 jle 0x42d67 movq (%r14), %rax addq $0x8, %rax xorl %edx, %edx movb $0x1, %sil cmpq %r12, -0x8(%rax) jne 0x42d47 cmpl %ebp, (%rax) jne 0x42d47 xorl %esi, %esi movl %edx, %r9d testb %sil, %sil je 0x42d5e incq %rdx addq $0x10, %rax cmpq %rdx, %r8 jne 0x42d35 movl $0xffffffff, %r9d # imm = 0xFFFFFFFF testl %r9d, %r9d jns 0x42ef7 cmpl %r8d, 0x8(%r14) jle 0x42dea movq (%r14), %rax movslq 0xc(%r14), %r8 leal 0x1(%r8), %edx movl %edx, 0xc(%r14) shlq $0x4, %r8 movq %r12, (%rax,%r8) cmpl $0xe0, %ebp jl 0x42d9c movq 0x18(%rdi), %rdx movq 0x68(%rdx), %rdx movl %ebp, %esi movq (%rdx,%rsi,8), %rdx incl (%rdx) addq %r8, %rax movl %ebp, 0x8(%rax) movslq 0x30(%r12), %rdx testq %rdx, %rdx jle 0x42dbf movq 0x28(%r12), %rax cmpl %ebp, 0x18(%rax) je 0x42dc1 addq $0x20, %rax decq %rdx jne 0x42db1 xorl %eax, %eax testq %rax, %rax je 0x42e2d cmpl $0x0, 0x10(%rax) je 0x42e20 movl 0x14(%rax), %ebp cmpl $0x7e, %ebp je 0x42e20 movq 0x18(%r12), %rdx movslq (%rax), %rax shlq $0x4, %rax movq 0x8(%rdx,%rax), %r12 jmp 0x42d1d incl %r8d movq 0x10(%rsp), %rdi movq %r14, %rsi movl $0x10, %edx movq %rcx, 0x8(%rsp) callq 0x428db movq 0x8(%rsp), %rcx movq 0x10(%rsp), %rdi testl %eax, %eax je 0x42d6d movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x42f1c movq %r12, (%r15) movq %rax, (%rbx) xorl %eax, %eax jmp 0x42f1c cmpl $0x16, %ebp je 0x42f17 movq %rbx, 0x8(%rsp) cmpl $0x0, 0x40(%r12) jle 0x42efe xorl %r13d, %r13d movq 0x38(%r12), %rax movq 0x18(%r12), %rcx movslq (%rax,%r13,4), %rax shlq $0x4, %rax movq 0x8(%rcx,%rax), %rcx leaq 0x20(%rsp), %rsi leaq 0x18(%rsp), %rdx movl %ebp, %r8d movq %r14, %r9 callq 0x42cf4 xorl %ecx, %ecx cmpl $-0x1, %eax je 0x42ec3 cmpl $0x3, %eax movq 0x10(%rsp), %rdi je 0x42ede testl %eax, %eax jne 0x42eda movq 0x8(%rsp), %rcx movq (%rcx), %rax testq %rax, %rax je 0x42eca movq (%r15), %rcx cmpq 0x20(%rsp), %rcx jne 0x42eaf movq 0x18(%rsp), %rcx movl 0x14(%rcx), %ecx cmpl 0x14(%rax), %ecx je 0x42eda xorl %ecx, %ecx movq %rcx, (%r15) movq 0x8(%rsp), %rax movq %rcx, (%rax) movl $0x3, %eax jmp 0x42ede movq 0x10(%rsp), %rdi jmp 0x42ede movq 0x20(%rsp), %rax movq %rax, (%r15) movq 0x18(%rsp), %rax movq %rax, (%rcx) movb $0x1, %cl movl %ebx, %eax testb %cl, %cl je 0x42f11 incq %r13 movslq 0x40(%r12), %rcx movl %eax, %ebx cmpq %rcx, %r13 jl 0x42e4a jmp 0x42efe movl $0x2, %eax jmp 0x42f1c xorl %edx, %edx movq 0x8(%rsp), %rcx cmpq $0x0, (%rcx) sete %cl cmovnel %edx, %eax jmp 0x42f13 xorl %ecx, %ecx testb %cl, %cl je 0x42f1c movl $0x1, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_resolve_export1: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, r9 mov ebp, r8d mov r12, rcx mov rbx, rdx mov r15, rsi xor r13d, r13d lea rcx, [r9+8] mov [rsp+58h+var_48], rdi loc_42D1D: mov [r15], r13 mov [rbx], r13 movsxd r8, dword ptr [r14+0Ch] test r8, r8 jle short loc_42D67 mov rax, [r14] add rax, 8 xor edx, edx loc_42D35: mov sil, 1 cmp [rax-8], r12 jnz short loc_42D47 cmp [rax], ebp jnz short loc_42D47 xor esi, esi mov r9d, edx loc_42D47: test sil, sil jz short loc_42D5E inc rdx add rax, 10h cmp r8, rdx jnz short loc_42D35 mov r9d, 0FFFFFFFFh loc_42D5E: test r9d, r9d jns loc_42EF7 loc_42D67: cmp [r14+8], r8d jle short loc_42DEA loc_42D6D: mov rax, [r14] movsxd r8, dword ptr [r14+0Ch] lea edx, [r8+1] mov [r14+0Ch], edx shl r8, 4 mov [rax+r8], r12 cmp ebp, 0E0h jl short loc_42D9C mov rdx, [rdi+18h] mov rdx, [rdx+68h] mov esi, ebp mov rdx, [rdx+rsi*8] inc dword ptr [rdx] loc_42D9C: add rax, r8 mov [rax+8], ebp movsxd rdx, dword ptr [r12+30h] test rdx, rdx jle short loc_42DBF mov rax, [r12+28h] loc_42DB1: cmp [rax+18h], ebp jz short loc_42DC1 add rax, 20h ; ' ' dec rdx jnz short loc_42DB1 loc_42DBF: xor eax, eax loc_42DC1: test rax, rax jz short loc_42E2D cmp dword ptr [rax+10h], 0 jz short loc_42E20 mov ebp, [rax+14h] cmp ebp, 7Eh ; '~' jz short loc_42E20 mov rdx, [r12+18h] movsxd rax, dword ptr [rax] shl rax, 4 mov r12, [rdx+rax+8] jmp loc_42D1D loc_42DEA: inc r8d mov rdi, [rsp+58h+var_48] mov rsi, r14 mov edx, 10h mov [rsp+58h+var_50], rcx call js_realloc_array mov rcx, [rsp+58h+var_50] mov rdi, [rsp+58h+var_48] test eax, eax jz loc_42D6D mov eax, 0FFFFFFFFh jmp loc_42F1C loc_42E20: mov [r15], r12 mov [rbx], rax xor eax, eax jmp loc_42F1C loc_42E2D: cmp ebp, 16h jz loc_42F17 mov [rsp+58h+var_50], rbx cmp dword ptr [r12+40h], 0 jle loc_42EFE xor r13d, r13d loc_42E4A: mov rax, [r12+38h] mov rcx, [r12+18h] movsxd rax, dword ptr [rax+r13*4] shl rax, 4 mov rcx, [rcx+rax+8] lea rsi, [rsp+58h+var_38] lea rdx, [rsp+58h+var_40] mov r8d, ebp mov r9, r14 call js_resolve_export1 xor ecx, ecx cmp eax, 0FFFFFFFFh jz short loc_42EC3 cmp eax, 3 mov rdi, [rsp+58h+var_48] jz short loc_42EDE test eax, eax jnz short loc_42EDA mov rcx, [rsp+58h+var_50] mov rax, [rcx] test rax, rax jz short loc_42ECA mov rcx, [r15] cmp rcx, [rsp+58h+var_38] jnz short loc_42EAF mov rcx, [rsp+58h+var_40] mov ecx, [rcx+14h] cmp ecx, [rax+14h] jz short loc_42EDA loc_42EAF: xor ecx, ecx mov [r15], rcx mov rax, [rsp+58h+var_50] mov [rax], rcx mov eax, 3 jmp short loc_42EDE loc_42EC3: mov rdi, [rsp+58h+var_48] jmp short loc_42EDE loc_42ECA: mov rax, [rsp+58h+var_38] mov [r15], rax mov rax, [rsp+58h+var_40] mov [rcx], rax loc_42EDA: mov cl, 1 mov eax, ebx loc_42EDE: test cl, cl jz short loc_42F11 inc r13 movsxd rcx, dword ptr [r12+40h] mov ebx, eax cmp r13, rcx jl loc_42E4A jmp short loc_42EFE loc_42EF7: mov eax, 2 jmp short loc_42F1C loc_42EFE: xor edx, edx mov rcx, [rsp+58h+var_50] cmp qword ptr [rcx], 0 setz cl cmovnz eax, edx jmp short loc_42F13 loc_42F11: xor ecx, ecx loc_42F13: test cl, cl jz short loc_42F1C loc_42F17: mov eax, 1 loc_42F1C: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_resolve_export1(long long a1, _QWORD *a2, long long *a3, long long a4, int a5, int *a6) { int *v6; // r14 _DWORD *v11; // rcx long long v12; // r8 _DWORD *v13; // rax long long v14; // rdx char v15; // si long long v16; // rax long long v17; // r8 long long v18; // r8 _DWORD *v19; // rdx long long v20; // rdx long long result; // rax int v22; // eax long long i; // r13 char v24; // cl bool v25; // cl _DWORD *v26; // [rsp+8h] [rbp-50h] long long *v27; // [rsp+8h] [rbp-50h] long long v28; // [rsp+10h] [rbp-48h] long long v29; // [rsp+18h] [rbp-40h] BYREF long long v30[7]; // [rsp+20h] [rbp-38h] BYREF v6 = a6; v11 = a6 + 2; v28 = a1; while ( 1 ) { *a2 = 0LL; *a3 = 0LL; v12 = v6[3]; if ( v12 > 0 ) { v13 = (_DWORD *)(*(_QWORD *)v6 + 8LL); v14 = 0LL; while ( 1 ) { v15 = 1; if ( *((_QWORD *)v13 - 1) == a4 && *v13 == a5 ) { v15 = 0; LODWORD(a6) = v14; } if ( !v15 ) break; ++v14; v13 += 4; if ( v12 == v14 ) { LODWORD(a6) = -1; break; } } if ( (int)a6 >= 0 ) return 2LL; } if ( v6[2] <= (int)v12 ) { v26 = v11; v22 = js_realloc_array(v28, (long long *)v6, 0x10u, v11, (int)v12 + 1); v11 = v26; a1 = v28; if ( v22 ) return 0xFFFFFFFFLL; } v16 = *(_QWORD *)v6; v17 = v6[3]; v6[3] = v17 + 1; v18 = 16 * v17; *(_QWORD *)(v16 + v18) = a4; if ( a5 >= 224 ) { v19 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a5); ++*v19; } *(_DWORD *)(v18 + v16 + 8) = a5; v20 = *(int *)(a4 + 48); if ( v20 <= 0 ) { LABEL_18: result = 0LL; } else { result = *(_QWORD *)(a4 + 40); while ( *(_DWORD *)(result + 24) != a5 ) { result += 32LL; if ( !--v20 ) goto LABEL_18; } } if ( !result ) break; if ( !*(_DWORD *)(result + 16) || (a5 = *(_DWORD *)(result + 20), a5 == 126) ) { *a2 = a4; *a3 = result; return 0LL; } a4 = *(_QWORD *)(*(_QWORD *)(a4 + 24) + 16LL * *(int *)result + 8); } if ( a5 == 22 ) return 1LL; v27 = a3; if ( *(int *)(a4 + 64) > 0 ) { for ( i = 0LL; i < *(int *)(a4 + 64); ++i ) { result = js_resolve_export1( a1, v30, &v29, *(_QWORD *)(*(_QWORD *)(a4 + 24) + 16LL * *(int *)(*(_QWORD *)(a4 + 56) + 4 * i) + 8), (unsigned int)a5, v6); v24 = 0; if ( (_DWORD)result == -1 ) { a1 = v28; } else { a1 = v28; if ( (_DWORD)result == 3 ) goto LABEL_39; if ( !(_DWORD)result ) { if ( *v27 ) { if ( *a2 != v30[0] || *(_DWORD *)(v29 + 20) != *(_DWORD *)(*v27 + 20) ) { v24 = 0; *a2 = 0LL; *v27 = 0LL; result = 3LL; goto LABEL_39; } } else { *a2 = v30[0]; *v27 = v29; } } v24 = 1; result = (unsigned int)a3; } LABEL_39: if ( !v24 ) { v25 = 0; goto LABEL_47; } LODWORD(a3) = result; } } v25 = *v27 == 0; if ( *v27 ) result = 0LL; LABEL_47: if ( v25 ) return 1LL; return result; }
js_resolve_export1: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,R9 MOV EBP,R8D MOV R12,RCX MOV RBX,RDX MOV R15,RSI XOR R13D,R13D LEA RCX,[R9 + 0x8] MOV qword ptr [RSP + 0x10],RDI LAB_00142d1d: MOV qword ptr [R15],R13 MOV qword ptr [RBX],R13 MOVSXD R8,dword ptr [R14 + 0xc] TEST R8,R8 JLE 0x00142d67 MOV RAX,qword ptr [R14] ADD RAX,0x8 XOR EDX,EDX LAB_00142d35: MOV SIL,0x1 CMP qword ptr [RAX + -0x8],R12 JNZ 0x00142d47 CMP dword ptr [RAX],EBP JNZ 0x00142d47 XOR ESI,ESI MOV R9D,EDX LAB_00142d47: TEST SIL,SIL JZ 0x00142d5e INC RDX ADD RAX,0x10 CMP R8,RDX JNZ 0x00142d35 MOV R9D,0xffffffff LAB_00142d5e: TEST R9D,R9D JNS 0x00142ef7 LAB_00142d67: CMP dword ptr [R14 + 0x8],R8D JLE 0x00142dea LAB_00142d6d: MOV RAX,qword ptr [R14] MOVSXD R8,dword ptr [R14 + 0xc] LEA EDX,[R8 + 0x1] MOV dword ptr [R14 + 0xc],EDX SHL R8,0x4 MOV qword ptr [RAX + R8*0x1],R12 CMP EBP,0xe0 JL 0x00142d9c MOV RDX,qword ptr [RDI + 0x18] MOV RDX,qword ptr [RDX + 0x68] MOV ESI,EBP MOV RDX,qword ptr [RDX + RSI*0x8] INC dword ptr [RDX] LAB_00142d9c: ADD RAX,R8 MOV dword ptr [RAX + 0x8],EBP MOVSXD RDX,dword ptr [R12 + 0x30] TEST RDX,RDX JLE 0x00142dbf MOV RAX,qword ptr [R12 + 0x28] LAB_00142db1: CMP dword ptr [RAX + 0x18],EBP JZ 0x00142dc1 ADD RAX,0x20 DEC RDX JNZ 0x00142db1 LAB_00142dbf: XOR EAX,EAX LAB_00142dc1: TEST RAX,RAX JZ 0x00142e2d CMP dword ptr [RAX + 0x10],0x0 JZ 0x00142e20 MOV EBP,dword ptr [RAX + 0x14] CMP EBP,0x7e JZ 0x00142e20 MOV RDX,qword ptr [R12 + 0x18] MOVSXD RAX,dword ptr [RAX] SHL RAX,0x4 MOV R12,qword ptr [RDX + RAX*0x1 + 0x8] JMP 0x00142d1d LAB_00142dea: INC R8D MOV RDI,qword ptr [RSP + 0x10] MOV RSI,R14 MOV EDX,0x10 MOV qword ptr [RSP + 0x8],RCX CALL 0x001428db MOV RCX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x10] TEST EAX,EAX JZ 0x00142d6d MOV EAX,0xffffffff JMP 0x00142f1c LAB_00142e20: MOV qword ptr [R15],R12 MOV qword ptr [RBX],RAX XOR EAX,EAX JMP 0x00142f1c LAB_00142e2d: CMP EBP,0x16 JZ 0x00142f17 MOV qword ptr [RSP + 0x8],RBX CMP dword ptr [R12 + 0x40],0x0 JLE 0x00142efe XOR R13D,R13D LAB_00142e4a: MOV RAX,qword ptr [R12 + 0x38] MOV RCX,qword ptr [R12 + 0x18] MOVSXD RAX,dword ptr [RAX + R13*0x4] SHL RAX,0x4 MOV RCX,qword ptr [RCX + RAX*0x1 + 0x8] LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0x18] MOV R8D,EBP MOV R9,R14 CALL 0x00142cf4 XOR ECX,ECX CMP EAX,-0x1 JZ 0x00142ec3 CMP EAX,0x3 MOV RDI,qword ptr [RSP + 0x10] JZ 0x00142ede TEST EAX,EAX JNZ 0x00142eda MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RCX] TEST RAX,RAX JZ 0x00142eca MOV RCX,qword ptr [R15] CMP RCX,qword ptr [RSP + 0x20] JNZ 0x00142eaf MOV RCX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RCX + 0x14] CMP ECX,dword ptr [RAX + 0x14] JZ 0x00142eda LAB_00142eaf: XOR ECX,ECX MOV qword ptr [R15],RCX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV EAX,0x3 JMP 0x00142ede LAB_00142ec3: MOV RDI,qword ptr [RSP + 0x10] JMP 0x00142ede LAB_00142eca: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [R15],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RCX],RAX LAB_00142eda: MOV CL,0x1 MOV EAX,EBX LAB_00142ede: TEST CL,CL JZ 0x00142f11 INC R13 MOVSXD RCX,dword ptr [R12 + 0x40] MOV EBX,EAX CMP R13,RCX JL 0x00142e4a JMP 0x00142efe LAB_00142ef7: MOV EAX,0x2 JMP 0x00142f1c LAB_00142efe: XOR EDX,EDX MOV RCX,qword ptr [RSP + 0x8] CMP qword ptr [RCX],0x0 SETZ CL CMOVNZ EAX,EDX JMP 0x00142f13 LAB_00142f11: XOR ECX,ECX LAB_00142f13: TEST CL,CL JZ 0x00142f1c LAB_00142f17: MOV EAX,0x1 LAB_00142f1c: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong js_resolve_export1(long param_1,long *param_2,long *param_3,long param_4,uint param_5, long *param_6) { int iVar1; uint *puVar2; int *piVar3; ulong uVar4; long lVar5; long lVar6; long *plVar7; bool bVar8; long local_40; long local_38; plVar7 = param_6; do { *param_2 = 0; *param_3 = 0; iVar1 = *(int *)((long)param_6 + 0xc); if (0 < (long)iVar1) { puVar2 = (uint *)(*param_6 + 8); uVar4 = 0; do { bVar8 = true; if ((*(long *)(puVar2 + -2) == param_4) && (*puVar2 == param_5)) { bVar8 = false; plVar7 = (long *)(uVar4 & 0xffffffff); } if (!bVar8) goto LAB_00142d5e; uVar4 = uVar4 + 1; puVar2 = puVar2 + 4; } while ((long)iVar1 != uVar4); plVar7 = (long *)0xffffffff; LAB_00142d5e: if (-1 < (int)plVar7) { return 2; } } if (((int)param_6[1] <= iVar1) && (iVar1 = js_realloc_array(param_1,param_6,0x10,param_6 + 1,iVar1 + 1), iVar1 != 0)) { return 0xffffffff; } lVar5 = *param_6; iVar1 = *(int *)((long)param_6 + 0xc); *(int *)((long)param_6 + 0xc) = iVar1 + 1; lVar6 = (long)iVar1 * 0x10; *(long *)(lVar5 + lVar6) = param_4; if (0xdf < (int)param_5) { piVar3 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_5 * 8); *piVar3 = *piVar3 + 1; } *(uint *)(lVar5 + lVar6 + 8) = param_5; lVar5 = (long)*(int *)(param_4 + 0x30); if (0 < lVar5) { piVar3 = *(int **)(param_4 + 0x28); do { if (piVar3[6] == param_5) goto LAB_00142dc1; piVar3 = piVar3 + 8; lVar5 = lVar5 + -1; } while (lVar5 != 0); } piVar3 = (int *)0x0; LAB_00142dc1: if (piVar3 == (int *)0x0) { if (param_5 == 0x16) goto LAB_00142f17; uVar4 = 0; if (*(int *)(param_4 + 0x40) < 1) goto LAB_00142efe; lVar5 = 0; plVar7 = param_3; break; } if ((piVar3[4] == 0) || (param_5 = piVar3[5], param_5 == 0x7e)) { *param_2 = param_4; *param_3 = (long)piVar3; return 0; } param_4 = *(long *)(*(long *)(param_4 + 0x18) + 8 + (long)*piVar3 * 0x10); } while( true ); LAB_00142e4a: uVar4 = js_resolve_export1(param_1,&local_38,&local_40, *(int8 *) (*(long *)(param_4 + 0x18) + 8 + (long)*(int *)(*(long *)(param_4 + 0x38) + lVar5 * 4) * 0x10),param_5, param_6); bVar8 = false; iVar1 = (int)uVar4; if ((iVar1 != -1) && (iVar1 != 3)) { if (iVar1 == 0) { if (*param_3 == 0) { *param_2 = local_38; *param_3 = local_40; } else if ((*param_2 != local_38) || (*(int *)(local_40 + 0x14) != *(int *)(*param_3 + 0x14))) { bVar8 = false; *param_2 = 0; *param_3 = 0; uVar4 = 3; goto LAB_00142ede; } } bVar8 = true; uVar4 = (ulong)plVar7 & 0xffffffff; } LAB_00142ede: if (!bVar8) { bVar8 = false; goto LAB_00142f13; } lVar5 = lVar5 + 1; plVar7 = (long *)(uVar4 & 0xffffffff); if (*(int *)(param_4 + 0x40) <= lVar5) { LAB_00142efe: bVar8 = *param_3 == 0; uVar4 = uVar4 & 0xffffffff; if (!bVar8) { uVar4 = 0; } LAB_00142f13: if (bVar8) { LAB_00142f17: uVar4 = 1; } return uVar4; } goto LAB_00142e4a; }
17,182
js_resolve_export1
bluesky950520[P]quickjs/quickjs.c
static JSResolveResultEnum js_resolve_export1(JSContext *ctx, JSModuleDef **pmodule, JSExportEntry **pme, JSModuleDef *m, JSAtom export_name, JSResolveState *s) { JSExportEntry *me; *pmodule = NULL; *pme = NULL; if (find_resolve_entry(s, m, export_name) >= 0) return JS_RESOLVE_RES_CIRCULAR; if (add_resolve_entry(ctx, s, m, export_name) < 0) return JS_RESOLVE_RES_EXCEPTION; me = find_export_entry(ctx, m, export_name); if (me) { if (me->export_type == JS_EXPORT_TYPE_LOCAL) { /* local export */ *pmodule = m; *pme = me; return JS_RESOLVE_RES_FOUND; } else { /* indirect export */ JSModuleDef *m1; m1 = m->req_module_entries[me->u.req_module_idx].module; if (me->local_name == JS_ATOM__star_) { /* export ns from */ *pmodule = m; *pme = me; return JS_RESOLVE_RES_FOUND; } else { return js_resolve_export1(ctx, pmodule, pme, m1, me->local_name, s); } } } else { if (export_name != JS_ATOM_default) { /* not found in direct or indirect exports: try star exports */ int i; for(i = 0; i < m->star_export_entries_count; i++) { JSStarExportEntry *se = &m->star_export_entries[i]; JSModuleDef *m1, *res_m; JSExportEntry *res_me; JSResolveResultEnum ret; m1 = m->req_module_entries[se->req_module_idx].module; ret = js_resolve_export1(ctx, &res_m, &res_me, m1, export_name, s); if (ret == JS_RESOLVE_RES_AMBIGUOUS || ret == JS_RESOLVE_RES_EXCEPTION) { return ret; } else if (ret == JS_RESOLVE_RES_FOUND) { if (*pme != NULL) { if (*pmodule != res_m || res_me->local_name != (*pme)->local_name) { *pmodule = NULL; *pme = NULL; return JS_RESOLVE_RES_AMBIGUOUS; } } else { *pmodule = res_m; *pme = res_me; } } } if (*pme != NULL) return JS_RESOLVE_RES_FOUND; } return JS_RESOLVE_RES_NOT_FOUND; } }
O2
c
js_resolve_export1: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, %r14 movl %r8d, %ebp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r15 movq %rdi, 0x8(%rsp) leaq 0x8(%r9), %rax movq %rax, 0x20(%rsp) movl 0xc(%r9), %ebx andq $0x0, (%r15) andq $0x0, (%r13) testl %ebx, %ebx movl $0x0, %eax cmovgl %ebx, %eax shlq $0x4, %rax xorl %ecx, %ecx cmpq %rcx, %rax je 0x3a98d movq (%r14), %rdi cmpq %r12, (%rdi,%rcx) jne 0x3a987 cmpl %ebp, 0x8(%rdi,%rcx) je 0x3aa1b addq $0x10, %rcx jmp 0x3a96f incl %ebx movq 0x8(%rsp), %rdi movq %r14, %rsi pushq $0x10 popq %rdx movq 0x20(%rsp), %rcx movl %ebx, %r8d callq 0x3a573 testl %eax, %eax jne 0x3aa38 movq (%r14), %rax movslq 0xc(%r14), %rcx leal 0x1(%rcx), %ebx movl %ebx, 0xc(%r14) shlq $0x4, %rcx movq %r12, (%rax,%rcx) cmpl $0xe0, %ebp jl 0x3a9e2 movq 0x8(%rsp), %rdx movq 0x18(%rdx), %rdx movq 0x68(%rdx), %rdx movl %ebp, %esi movq (%rdx,%rsi,8), %rdx incl (%rdx) addq %rcx, %rax movl %ebp, 0x8(%rax) movq %r12, %rdi movl %ebp, %esi callq 0x28592 testq %rax, %rax je 0x3aa3c cmpl $0x0, 0x10(%rax) je 0x3aa2d movl 0x14(%rax), %ebp cmpl $0x7e, %ebp je 0x3aa2d movq 0x18(%r12), %rcx movslq (%rax), %rax shlq $0x4, %rax movq 0x8(%rcx,%rax), %r12 jmp 0x3a956 pushq $0x2 popq %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, (%r15) movq %rax, (%r13) xorl %eax, %eax jmp 0x3aa1e pushq $-0x1 jmp 0x3aa1d cmpl $0x16, %ebp jne 0x3aa45 pushq $0x1 jmp 0x3aa1d movq %r13, %rdx xorl %ebx, %ebx movslq 0x40(%r12), %rax cmpq %rax, %rbx jge 0x3aad9 movq 0x38(%r12), %rax movq 0x18(%r12), %rcx movslq (%rax,%rbx,4), %rax shlq $0x4, %rax movq 0x8(%rcx,%rax), %rcx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx movl %ebp, %r8d movq %r14, %r9 callq 0x3a927 testl %eax, %eax je 0x3aa9c cmpl $-0x1, %eax je 0x3aa1e movq %r13, %rdx cmpl $0x3, %eax jne 0x3aad1 jmp 0x3aa1e movq %r13, %rdx movq (%r13), %rax testq %rax, %rax je 0x3aac1 movq (%r15), %rcx cmpq 0x18(%rsp), %rcx jne 0x3aaea movq 0x10(%rsp), %rcx movl 0x14(%rcx), %ecx cmpl 0x14(%rax), %ecx je 0x3aad1 jmp 0x3aaea movq 0x18(%rsp), %rax movq %rax, (%r15) movq 0x10(%rsp), %rax movq %rax, (%rdx) incq %rbx jmp 0x3aa4a xorl %eax, %eax cmpq $0x0, (%rdx) jne 0x3aa1e jmp 0x3aa41 andq $0x0, (%r15) andq $0x0, (%rdx) pushq $0x3 jmp 0x3aa1d
js_resolve_export1: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, r9 mov ebp, r8d mov r12, rcx mov r13, rdx mov r15, rsi mov [rsp+58h+var_50], rdi lea rax, [r9+8] mov [rsp+58h+var_38], rax mov ebx, [r9+0Ch] loc_3A956: and qword ptr [r15], 0 and qword ptr [r13+0], 0 test ebx, ebx mov eax, 0 cmovg eax, ebx shl rax, 4 xor ecx, ecx loc_3A96F: cmp rax, rcx jz short loc_3A98D mov rdi, [r14] cmp [rdi+rcx], r12 jnz short loc_3A987 cmp [rdi+rcx+8], ebp jz loc_3AA1B loc_3A987: add rcx, 10h jmp short loc_3A96F loc_3A98D: inc ebx mov rdi, [rsp+58h+var_50] mov rsi, r14 push 10h pop rdx mov rcx, [rsp+58h+var_38] mov r8d, ebx call js_resize_array test eax, eax jnz loc_3AA38 mov rax, [r14] movsxd rcx, dword ptr [r14+0Ch] lea ebx, [rcx+1] mov [r14+0Ch], ebx shl rcx, 4 mov [rax+rcx], r12 cmp ebp, 0E0h jl short loc_3A9E2 mov rdx, [rsp+58h+var_50] mov rdx, [rdx+18h] mov rdx, [rdx+68h] mov esi, ebp mov rdx, [rdx+rsi*8] inc dword ptr [rdx] loc_3A9E2: add rax, rcx mov [rax+8], ebp mov rdi, r12 mov esi, ebp call find_export_entry test rax, rax jz short loc_3AA3C cmp dword ptr [rax+10h], 0 jz short loc_3AA2D mov ebp, [rax+14h] cmp ebp, 7Eh ; '~' jz short loc_3AA2D mov rcx, [r12+18h] movsxd rax, dword ptr [rax] shl rax, 4 mov r12, [rcx+rax+8] jmp loc_3A956 loc_3AA1B: push 2 loc_3AA1D: pop rax loc_3AA1E: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3AA2D: mov [r15], r12 mov [r13+0], rax xor eax, eax jmp short loc_3AA1E loc_3AA38: push 0FFFFFFFFFFFFFFFFh jmp short loc_3AA1D loc_3AA3C: cmp ebp, 16h jnz short loc_3AA45 loc_3AA41: push 1 jmp short loc_3AA1D loc_3AA45: mov rdx, r13 xor ebx, ebx loc_3AA4A: movsxd rax, dword ptr [r12+40h] cmp rbx, rax jge loc_3AAD9 mov rax, [r12+38h] mov rcx, [r12+18h] movsxd rax, dword ptr [rax+rbx*4] shl rax, 4 mov rcx, [rcx+rax+8] mov rdi, [rsp+58h+var_50] lea rsi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_48] mov r8d, ebp mov r9, r14 call js_resolve_export1 test eax, eax jz short loc_3AA9C cmp eax, 0FFFFFFFFh jz short loc_3AA1E mov rdx, r13 cmp eax, 3 jnz short loc_3AAD1 jmp short loc_3AA1E loc_3AA9C: mov rdx, r13 mov rax, [r13+0] test rax, rax jz short loc_3AAC1 mov rcx, [r15] cmp rcx, [rsp+58h+var_40] jnz short loc_3AAEA mov rcx, [rsp+58h+var_48] mov ecx, [rcx+14h] cmp ecx, [rax+14h] jz short loc_3AAD1 jmp short loc_3AAEA loc_3AAC1: mov rax, [rsp+58h+var_40] mov [r15], rax mov rax, [rsp+58h+var_48] mov [rdx], rax loc_3AAD1: inc rbx jmp loc_3AA4A loc_3AAD9: xor eax, eax cmp qword ptr [rdx], 0 jnz loc_3AA1E jmp loc_3AA41 loc_3AAEA: and qword ptr [r15], 0 and qword ptr [rdx], 0 push 3 jmp loc_3AA1D
long long js_resolve_export1(long long a1, long long *a2, _QWORD *a3, long long a4, int a5, long long a6) { int v10; // ebx long long v11; // rax long long v12; // rax long long i; // rcx long long v14; // rax long long v15; // rcx long long v16; // rcx _DWORD *v17; // rdx int *export_entry; // rax long long result; // rax _QWORD *v20; // rdx long long j; // rbx long long v23; // [rsp+10h] [rbp-48h] BYREF long long v24; // [rsp+18h] [rbp-40h] BYREF _DWORD *v25; // [rsp+20h] [rbp-38h] v25 = (_DWORD *)(a6 + 8); v10 = *(_DWORD *)(a6 + 12); while ( 2 ) { *a2 = 0LL; *a3 = 0LL; v11 = 0LL; if ( v10 > 0 ) v11 = (unsigned int)v10; v12 = 16 * v11; for ( i = 0LL; v12 != i; i += 16LL ) { if ( *(_QWORD *)(*(_QWORD *)a6 + i) == a4 && *(_DWORD *)(*(_QWORD *)a6 + i + 8) == a5 ) return 2LL; } if ( (unsigned int)js_resize_array(a1, a6, 16LL, v25, v10 + 1) ) return -1LL; v14 = *(_QWORD *)a6; v15 = *(int *)(a6 + 12); v10 = v15 + 1; *(_DWORD *)(a6 + 12) = v15 + 1; v16 = 16 * v15; *(_QWORD *)(v14 + v16) = a4; if ( a5 >= 224 ) { v17 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a5); ++*v17; } *(_DWORD *)(v16 + v14 + 8) = a5; export_entry = (int *)find_export_entry(a4, a5); if ( !export_entry ) { if ( a5 != 22 ) { v20 = a3; for ( j = 0LL; j < *(int *)(a4 + 64); ++j ) { result = js_resolve_export1( a1, &v24, &v23, *(_QWORD *)(*(_QWORD *)(a4 + 24) + 16LL * *(int *)(*(_QWORD *)(a4 + 56) + 4 * j) + 8), (unsigned int)a5, a6); if ( (_DWORD)result ) { if ( (_DWORD)result == -1 ) return result; v20 = a3; if ( (_DWORD)result == 3 ) return result; } else { v20 = a3; if ( *a3 ) { if ( *a2 != v24 || *(_DWORD *)(v23 + 20) != *(_DWORD *)(*a3 + 20LL) ) { *a2 = 0LL; *a3 = 0LL; return 3LL; } } else { *a2 = v24; *a3 = v23; } } } result = 0LL; if ( *v20 ) return result; } return 1LL; } if ( export_entry[4] ) { a5 = export_entry[5]; if ( a5 != 126 ) { a4 = *(_QWORD *)(*(_QWORD *)(a4 + 24) + 16LL * *export_entry + 8); continue; } } break; } *a2 = a4; *a3 = export_entry; return 0LL; }
js_resolve_export1: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,R9 MOV EBP,R8D MOV R12,RCX MOV R13,RDX MOV R15,RSI MOV qword ptr [RSP + 0x8],RDI LEA RAX,[R9 + 0x8] MOV qword ptr [RSP + 0x20],RAX MOV EBX,dword ptr [R9 + 0xc] LAB_0013a956: AND qword ptr [R15],0x0 AND qword ptr [R13],0x0 TEST EBX,EBX MOV EAX,0x0 CMOVG EAX,EBX SHL RAX,0x4 XOR ECX,ECX LAB_0013a96f: CMP RAX,RCX JZ 0x0013a98d MOV RDI,qword ptr [R14] CMP qword ptr [RDI + RCX*0x1],R12 JNZ 0x0013a987 CMP dword ptr [RDI + RCX*0x1 + 0x8],EBP JZ 0x0013aa1b LAB_0013a987: ADD RCX,0x10 JMP 0x0013a96f LAB_0013a98d: INC EBX MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R14 PUSH 0x10 POP RDX MOV RCX,qword ptr [RSP + 0x20] MOV R8D,EBX CALL 0x0013a573 TEST EAX,EAX JNZ 0x0013aa38 MOV RAX,qword ptr [R14] MOVSXD RCX,dword ptr [R14 + 0xc] LEA EBX,[RCX + 0x1] MOV dword ptr [R14 + 0xc],EBX SHL RCX,0x4 MOV qword ptr [RAX + RCX*0x1],R12 CMP EBP,0xe0 JL 0x0013a9e2 MOV RDX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RDX + 0x18] MOV RDX,qword ptr [RDX + 0x68] MOV ESI,EBP MOV RDX,qword ptr [RDX + RSI*0x8] INC dword ptr [RDX] LAB_0013a9e2: ADD RAX,RCX MOV dword ptr [RAX + 0x8],EBP MOV RDI,R12 MOV ESI,EBP CALL 0x00128592 TEST RAX,RAX JZ 0x0013aa3c CMP dword ptr [RAX + 0x10],0x0 JZ 0x0013aa2d MOV EBP,dword ptr [RAX + 0x14] CMP EBP,0x7e JZ 0x0013aa2d MOV RCX,qword ptr [R12 + 0x18] MOVSXD RAX,dword ptr [RAX] SHL RAX,0x4 MOV R12,qword ptr [RCX + RAX*0x1 + 0x8] JMP 0x0013a956 LAB_0013aa1b: PUSH 0x2 LAB_0013aa1d: POP RAX LAB_0013aa1e: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013aa2d: MOV qword ptr [R15],R12 MOV qword ptr [R13],RAX XOR EAX,EAX JMP 0x0013aa1e LAB_0013aa38: PUSH -0x1 JMP 0x0013aa1d LAB_0013aa3c: CMP EBP,0x16 JNZ 0x0013aa45 LAB_0013aa41: PUSH 0x1 JMP 0x0013aa1d LAB_0013aa45: MOV RDX,R13 XOR EBX,EBX LAB_0013aa4a: MOVSXD RAX,dword ptr [R12 + 0x40] CMP RBX,RAX JGE 0x0013aad9 MOV RAX,qword ptr [R12 + 0x38] MOV RCX,qword ptr [R12 + 0x18] MOVSXD RAX,dword ptr [RAX + RBX*0x4] SHL RAX,0x4 MOV RCX,qword ptr [RCX + RAX*0x1 + 0x8] MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] MOV R8D,EBP MOV R9,R14 CALL 0x0013a927 TEST EAX,EAX JZ 0x0013aa9c CMP EAX,-0x1 JZ 0x0013aa1e MOV RDX,R13 CMP EAX,0x3 JNZ 0x0013aad1 JMP 0x0013aa1e LAB_0013aa9c: MOV RDX,R13 MOV RAX,qword ptr [R13] TEST RAX,RAX JZ 0x0013aac1 MOV RCX,qword ptr [R15] CMP RCX,qword ptr [RSP + 0x18] JNZ 0x0013aaea MOV RCX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RCX + 0x14] CMP ECX,dword ptr [RAX + 0x14] JZ 0x0013aad1 JMP 0x0013aaea LAB_0013aac1: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [R15],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RDX],RAX LAB_0013aad1: INC RBX JMP 0x0013aa4a LAB_0013aad9: XOR EAX,EAX CMP qword ptr [RDX],0x0 JNZ 0x0013aa1e JMP 0x0013aa41 LAB_0013aaea: AND qword ptr [R15],0x0 AND qword ptr [RDX],0x0 PUSH 0x3 JMP 0x0013aa1d
int8 js_resolve_export1(long param_1,long *param_2,long *param_3,long param_4,uint param_5,long *param_6) { int iVar1; ulong uVar2; int *piVar3; int8 uVar4; long lVar5; long lVar6; uint uVar7; long local_48; long local_40; long *local_38; local_38 = param_6 + 1; uVar7 = *(uint *)((long)param_6 + 0xc); while( true ) { *param_2 = 0; *param_3 = 0; uVar2 = 0; if (0 < (int)uVar7) { uVar2 = (ulong)uVar7; } for (lVar5 = 0; uVar2 * 0x10 != lVar5; lVar5 = lVar5 + 0x10) { if ((*(long *)(*param_6 + lVar5) == param_4) && (*(uint *)(*param_6 + 8 + lVar5) == param_5)) { return 2; } } iVar1 = js_resize_array(param_1,param_6,0x10,local_38,uVar7 + 1); if (iVar1 != 0) { return 0xffffffffffffffff; } lVar5 = *param_6; iVar1 = *(int *)((long)param_6 + 0xc); uVar7 = iVar1 + 1; *(uint *)((long)param_6 + 0xc) = uVar7; lVar6 = (long)iVar1 * 0x10; *(long *)(lVar5 + lVar6) = param_4; if (0xdf < (int)param_5) { piVar3 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_5 * 8); *piVar3 = *piVar3 + 1; } *(uint *)(lVar5 + lVar6 + 8) = param_5; piVar3 = (int *)find_export_entry(param_4,param_5); if (piVar3 == (int *)0x0) break; if ((piVar3[4] == 0) || (param_5 = piVar3[5], param_5 == 0x7e)) { *param_2 = param_4; *param_3 = (long)piVar3; return 0; } param_4 = *(long *)(*(long *)(param_4 + 0x18) + 8 + (long)*piVar3 * 0x10); } if (param_5 != 0x16) { for (lVar5 = 0; lVar5 < *(int *)(param_4 + 0x40); lVar5 = lVar5 + 1) { uVar4 = js_resolve_export1(param_1,&local_40,&local_48, *(int8 *) (*(long *)(param_4 + 0x18) + 8 + (long)*(int *)(*(long *)(param_4 + 0x38) + lVar5 * 4) * 0x10), param_5,param_6); iVar1 = (int)uVar4; if (iVar1 == 0) { if (*param_3 == 0) { *param_2 = local_40; *param_3 = local_48; } else if ((*param_2 != local_40) || (*(int *)(local_48 + 0x14) != *(int *)(*param_3 + 0x14))) { *param_2 = 0; *param_3 = 0; return 3; } } else { if (iVar1 == -1) { return uVar4; } if (iVar1 == 3) { return uVar4; } } } if (*param_3 != 0) { return 0; } } return 1; }
17,183
js_resolve_export1
bluesky950520[P]quickjs/quickjs.c
static JSResolveResultEnum js_resolve_export1(JSContext *ctx, JSModuleDef **pmodule, JSExportEntry **pme, JSModuleDef *m, JSAtom export_name, JSResolveState *s) { JSExportEntry *me; *pmodule = NULL; *pme = NULL; if (find_resolve_entry(s, m, export_name) >= 0) return JS_RESOLVE_RES_CIRCULAR; if (add_resolve_entry(ctx, s, m, export_name) < 0) return JS_RESOLVE_RES_EXCEPTION; me = find_export_entry(ctx, m, export_name); if (me) { if (me->export_type == JS_EXPORT_TYPE_LOCAL) { /* local export */ *pmodule = m; *pme = me; return JS_RESOLVE_RES_FOUND; } else { /* indirect export */ JSModuleDef *m1; m1 = m->req_module_entries[me->u.req_module_idx].module; if (me->local_name == JS_ATOM__star_) { /* export ns from */ *pmodule = m; *pme = me; return JS_RESOLVE_RES_FOUND; } else { return js_resolve_export1(ctx, pmodule, pme, m1, me->local_name, s); } } } else { if (export_name != JS_ATOM_default) { /* not found in direct or indirect exports: try star exports */ int i; for(i = 0; i < m->star_export_entries_count; i++) { JSStarExportEntry *se = &m->star_export_entries[i]; JSModuleDef *m1, *res_m; JSExportEntry *res_me; JSResolveResultEnum ret; m1 = m->req_module_entries[se->req_module_idx].module; ret = js_resolve_export1(ctx, &res_m, &res_me, m1, export_name, s); if (ret == JS_RESOLVE_RES_AMBIGUOUS || ret == JS_RESOLVE_RES_EXCEPTION) { return ret; } else if (ret == JS_RESOLVE_RES_FOUND) { if (*pme != NULL) { if (*pmodule != res_m || res_me->local_name != (*pme)->local_name) { *pmodule = NULL; *pme = NULL; return JS_RESOLVE_RES_AMBIGUOUS; } } else { *pmodule = res_m; *pme = res_me; } } } if (*pme != NULL) return JS_RESOLVE_RES_FOUND; } return JS_RESOLVE_RES_NOT_FOUND; } }
O3
c
js_resolve_export1: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, %r15 movl %r8d, %ebp movq %rcx, %r12 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r13 leaq 0x8(%r9), %rcx movl 0xc(%r9), %r8d xorl %r9d, %r9d movq %r9, (%r14) movq %r9, (%rbx) testl %r8d, %r8d jle 0x4494a movq (%r15), %rax movl %r8d, %esi shlq $0x4, %rsi xorl %edx, %edx cmpq %r12, (%rax,%rdx) jne 0x44941 cmpl %ebp, 0x8(%rax,%rdx) je 0x44abc addq $0x10, %rdx cmpq %rdx, %rsi jne 0x44931 cmpl %r8d, (%rcx) jle 0x449d5 movl %r8d, %edx movq (%r15), %rax movslq %r8d, %rdi leal 0x1(%rdx), %r8d movl %r8d, 0xc(%r15) shlq $0x4, %rdi movq %r12, (%rax,%rdi) cmpl $0xe0, %ebp jl 0x44984 movq 0x18(%r13), %rdx movq 0x68(%rdx), %rdx movl %ebp, %esi movq (%rdx,%rsi,8), %rdx incl (%rdx) addq %rdi, %rax movl %ebp, 0x8(%rax) movslq 0x30(%r12), %rdx testq %rdx, %rdx jle 0x44a04 movq 0x28(%r12), %rax cmpl %ebp, 0x18(%rax) je 0x449a9 addq $0x20, %rax decq %rdx jne 0x44999 jmp 0x44a04 cmpl $0x0, 0x10(%rax) je 0x44ae3 movl 0x14(%rax), %ebp cmpl $0x7e, %ebp je 0x44ae3 movq 0x18(%r12), %rdx movslq (%rax), %rax shlq $0x4, %rax movq 0x8(%rdx,%rax), %r12 jmp 0x4491a incl %r8d movq %r13, %rdi movq %r15, %rsi movl $0x10, %edx movq %rcx, (%rsp) callq 0x444ee testl %eax, %eax jne 0x44aed movl 0xc(%r15), %r8d movq (%rsp), %rcx xorl %r9d, %r9d jmp 0x44953 cmpl $0x16, %ebp jne 0x44a13 movl $0x1, %eax jmp 0x44ac1 movq %r14, (%rsp) cmpl $0x0, 0x40(%r12) jle 0x44aaf xorl %r14d, %r14d movq 0x38(%r12), %rax movq 0x18(%r12), %rcx movslq (%rax,%r14,4), %rax shlq $0x4, %rax movq 0x8(%rcx,%rax), %rcx movq %r13, %rdi leaq 0x10(%rsp), %rsi leaq 0x8(%rsp), %rdx movl %ebp, %r8d movq %r15, %r9 callq 0x448ef testl %eax, %eax je 0x44a65 cmpl $-0x1, %eax je 0x44ac1 cmpl $0x3, %eax jne 0x44a9e jmp 0x44ac1 movq (%rbx), %rax testq %rax, %rax je 0x44a8a movq (%rsp), %rcx movq (%rcx), %rcx cmpq 0x10(%rsp), %rcx jne 0x44ad0 movq 0x8(%rsp), %rcx movl 0x14(%rcx), %ecx cmpl 0x14(%rax), %ecx je 0x44a9e jmp 0x44ad0 movq 0x10(%rsp), %rax movq (%rsp), %rcx movq %rax, (%rcx) movq 0x8(%rsp), %rax movq %rax, (%rbx) incq %r14 movslq 0x40(%r12), %rax cmpq %rax, %r14 jl 0x44a26 xorl %eax, %eax cmpq $0x0, (%rbx) jne 0x44ac1 jmp 0x44a09 movl $0x2, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %eax, %eax movq (%rsp), %rcx movq %rax, (%rcx) movq %rax, (%rbx) movl $0x3, %eax jmp 0x44ac1 movq %r12, (%r14) movq %rax, (%rbx) xorl %eax, %eax jmp 0x44ac1 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x44ac1
js_resolve_export1: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, r9 mov ebp, r8d mov r12, rcx mov rbx, rdx mov r14, rsi mov r13, rdi lea rcx, [r9+8] mov r8d, [r9+0Ch] xor r9d, r9d loc_4491A: mov [r14], r9 mov [rbx], r9 test r8d, r8d jle short loc_4494A mov rax, [r15] mov esi, r8d shl rsi, 4 xor edx, edx loc_44931: cmp [rax+rdx], r12 jnz short loc_44941 cmp [rax+rdx+8], ebp jz loc_44ABC loc_44941: add rdx, 10h cmp rsi, rdx jnz short loc_44931 loc_4494A: cmp [rcx], r8d jle loc_449D5 loc_44953: mov edx, r8d mov rax, [r15] movsxd rdi, r8d lea r8d, [rdx+1] mov [r15+0Ch], r8d shl rdi, 4 mov [rax+rdi], r12 cmp ebp, 0E0h jl short loc_44984 mov rdx, [r13+18h] mov rdx, [rdx+68h] mov esi, ebp mov rdx, [rdx+rsi*8] inc dword ptr [rdx] loc_44984: add rax, rdi mov [rax+8], ebp movsxd rdx, dword ptr [r12+30h] test rdx, rdx jle short loc_44A04 mov rax, [r12+28h] loc_44999: cmp [rax+18h], ebp jz short loc_449A9 add rax, 20h ; ' ' dec rdx jnz short loc_44999 jmp short loc_44A04 loc_449A9: cmp dword ptr [rax+10h], 0 jz loc_44AE3 mov ebp, [rax+14h] cmp ebp, 7Eh ; '~' jz loc_44AE3 mov rdx, [r12+18h] movsxd rax, dword ptr [rax] shl rax, 4 mov r12, [rdx+rax+8] jmp loc_4491A loc_449D5: inc r8d mov rdi, r13 mov rsi, r15 mov edx, 10h mov [rsp+48h+var_48], rcx call js_realloc_array test eax, eax jnz loc_44AED mov r8d, [r15+0Ch] mov rcx, [rsp+48h+var_48] xor r9d, r9d jmp loc_44953 loc_44A04: cmp ebp, 16h jnz short loc_44A13 loc_44A09: mov eax, 1 jmp loc_44AC1 loc_44A13: mov [rsp+48h+var_48], r14 cmp dword ptr [r12+40h], 0 jle loc_44AAF xor r14d, r14d loc_44A26: mov rax, [r12+38h] mov rcx, [r12+18h] movsxd rax, dword ptr [rax+r14*4] shl rax, 4 mov rcx, [rcx+rax+8] mov rdi, r13 lea rsi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_40] mov r8d, ebp mov r9, r15 call js_resolve_export1 test eax, eax jz short loc_44A65 cmp eax, 0FFFFFFFFh jz short loc_44AC1 cmp eax, 3 jnz short loc_44A9E jmp short loc_44AC1 loc_44A65: mov rax, [rbx] test rax, rax jz short loc_44A8A mov rcx, [rsp+48h+var_48] mov rcx, [rcx] cmp rcx, [rsp+48h+var_38] jnz short loc_44AD0 mov rcx, [rsp+48h+var_40] mov ecx, [rcx+14h] cmp ecx, [rax+14h] jz short loc_44A9E jmp short loc_44AD0 loc_44A8A: mov rax, [rsp+48h+var_38] mov rcx, [rsp+48h+var_48] mov [rcx], rax mov rax, [rsp+48h+var_40] mov [rbx], rax loc_44A9E: inc r14 movsxd rax, dword ptr [r12+40h] cmp r14, rax jl loc_44A26 loc_44AAF: xor eax, eax cmp qword ptr [rbx], 0 jnz short loc_44AC1 jmp loc_44A09 loc_44ABC: mov eax, 2 loc_44AC1: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44AD0: xor eax, eax mov rcx, [rsp+48h+var_48] mov [rcx], rax mov [rbx], rax mov eax, 3 jmp short loc_44AC1 loc_44AE3: mov [r14], r12 mov [rbx], rax xor eax, eax jmp short loc_44AC1 loc_44AED: mov eax, 0FFFFFFFFh jmp short loc_44AC1
long long js_resolve_export1(long long a1, _QWORD *a2, long long a3, long long a4, int a5, long long a6) { int *v11; // rcx int v12; // r8d long long v13; // rax long long v14; // rdx long long v15; // rax long long v16; // rdi long long v17; // rdi _DWORD *v18; // rdx long long v19; // rdx int *v20; // rax long long result; // rax long long v22; // r14 int *v23; // [rsp+0h] [rbp-48h] long long v24; // [rsp+8h] [rbp-40h] BYREF _QWORD v25[7]; // [rsp+10h] [rbp-38h] BYREF v11 = (int *)(a6 + 8); v12 = *(_DWORD *)(a6 + 12); while ( 1 ) { *a2 = 0LL; *(_QWORD *)a3 = 0LL; if ( v12 > 0 ) break; LABEL_7: if ( *v11 <= v12 ) { v23 = v11; if ( (unsigned int)js_realloc_array(a1, (long long *)a6, 0x10u, v11, v12 + 1) ) return 0xFFFFFFFFLL; v12 = *(_DWORD *)(a6 + 12); v11 = v23; } v15 = *(_QWORD *)a6; v16 = v12++; *(_DWORD *)(a6 + 12) = v12; v17 = 16 * v16; *(_QWORD *)(v15 + v17) = a4; if ( a5 >= 224 ) { v18 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a5); ++*v18; } *(_DWORD *)(v17 + v15 + 8) = a5; v19 = *(int *)(a4 + 48); if ( v19 <= 0 ) { LABEL_20: if ( a5 == 22 ) return 1LL; if ( *(int *)(a4 + 64) > 0 ) { v22 = 0LL; do { result = js_resolve_export1( a1, v25, &v24, *(_QWORD *)(*(_QWORD *)(a4 + 24) + 16LL * *(int *)(*(_QWORD *)(a4 + 56) + 4 * v22) + 8), (unsigned int)a5, a6); if ( (_DWORD)result ) { if ( (_DWORD)result == -1 || (_DWORD)result == 3 ) return result; } else if ( *(_QWORD *)a3 ) { if ( *a2 != v25[0] || *(_DWORD *)(v24 + 20) != *(_DWORD *)(*(_QWORD *)a3 + 20LL) ) { *a2 = 0LL; *(_QWORD *)a3 = 0LL; return 3LL; } } else { *a2 = v25[0]; *(_QWORD *)a3 = v24; } } while ( ++v22 < *(int *)(a4 + 64) ); } result = 0LL; if ( !*(_QWORD *)a3 ) return 1LL; return result; } v20 = *(int **)(a4 + 40); while ( v20[6] != a5 ) { v20 += 8; if ( !--v19 ) goto LABEL_20; } if ( !v20[4] || (a5 = v20[5], a5 == 126) ) { *a2 = a4; *(_QWORD *)a3 = v20; return 0LL; } a4 = *(_QWORD *)(*(_QWORD *)(a4 + 24) + 16LL * *v20 + 8); } v13 = *(_QWORD *)a6; v14 = 0LL; while ( *(_QWORD *)(v13 + v14) != a4 || *(_DWORD *)(v13 + v14 + 8) != a5 ) { v14 += 16LL; if ( 16LL * (unsigned int)v12 == v14 ) goto LABEL_7; } return 2LL; }
js_resolve_export1: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,R9 MOV EBP,R8D MOV R12,RCX MOV RBX,RDX MOV R14,RSI MOV R13,RDI LEA RCX,[R9 + 0x8] MOV R8D,dword ptr [R9 + 0xc] XOR R9D,R9D LAB_0014491a: MOV qword ptr [R14],R9 MOV qword ptr [RBX],R9 TEST R8D,R8D JLE 0x0014494a MOV RAX,qword ptr [R15] MOV ESI,R8D SHL RSI,0x4 XOR EDX,EDX LAB_00144931: CMP qword ptr [RAX + RDX*0x1],R12 JNZ 0x00144941 CMP dword ptr [RAX + RDX*0x1 + 0x8],EBP JZ 0x00144abc LAB_00144941: ADD RDX,0x10 CMP RSI,RDX JNZ 0x00144931 LAB_0014494a: CMP dword ptr [RCX],R8D JLE 0x001449d5 LAB_00144953: MOV EDX,R8D MOV RAX,qword ptr [R15] MOVSXD RDI,R8D LEA R8D,[RDX + 0x1] MOV dword ptr [R15 + 0xc],R8D SHL RDI,0x4 MOV qword ptr [RAX + RDI*0x1],R12 CMP EBP,0xe0 JL 0x00144984 MOV RDX,qword ptr [R13 + 0x18] MOV RDX,qword ptr [RDX + 0x68] MOV ESI,EBP MOV RDX,qword ptr [RDX + RSI*0x8] INC dword ptr [RDX] LAB_00144984: ADD RAX,RDI MOV dword ptr [RAX + 0x8],EBP MOVSXD RDX,dword ptr [R12 + 0x30] TEST RDX,RDX JLE 0x00144a04 MOV RAX,qword ptr [R12 + 0x28] LAB_00144999: CMP dword ptr [RAX + 0x18],EBP JZ 0x001449a9 ADD RAX,0x20 DEC RDX JNZ 0x00144999 JMP 0x00144a04 LAB_001449a9: CMP dword ptr [RAX + 0x10],0x0 JZ 0x00144ae3 MOV EBP,dword ptr [RAX + 0x14] CMP EBP,0x7e JZ 0x00144ae3 MOV RDX,qword ptr [R12 + 0x18] MOVSXD RAX,dword ptr [RAX] SHL RAX,0x4 MOV R12,qword ptr [RDX + RAX*0x1 + 0x8] JMP 0x0014491a LAB_001449d5: INC R8D MOV RDI,R13 MOV RSI,R15 MOV EDX,0x10 MOV qword ptr [RSP],RCX CALL 0x001444ee TEST EAX,EAX JNZ 0x00144aed MOV R8D,dword ptr [R15 + 0xc] MOV RCX,qword ptr [RSP] XOR R9D,R9D JMP 0x00144953 LAB_00144a04: CMP EBP,0x16 JNZ 0x00144a13 LAB_00144a09: MOV EAX,0x1 JMP 0x00144ac1 LAB_00144a13: MOV qword ptr [RSP],R14 CMP dword ptr [R12 + 0x40],0x0 JLE 0x00144aaf XOR R14D,R14D LAB_00144a26: MOV RAX,qword ptr [R12 + 0x38] MOV RCX,qword ptr [R12 + 0x18] MOVSXD RAX,dword ptr [RAX + R14*0x4] SHL RAX,0x4 MOV RCX,qword ptr [RCX + RAX*0x1 + 0x8] MOV RDI,R13 LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x8] MOV R8D,EBP MOV R9,R15 CALL 0x001448ef TEST EAX,EAX JZ 0x00144a65 CMP EAX,-0x1 JZ 0x00144ac1 CMP EAX,0x3 JNZ 0x00144a9e JMP 0x00144ac1 LAB_00144a65: MOV RAX,qword ptr [RBX] TEST RAX,RAX JZ 0x00144a8a MOV RCX,qword ptr [RSP] MOV RCX,qword ptr [RCX] CMP RCX,qword ptr [RSP + 0x10] JNZ 0x00144ad0 MOV RCX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RCX + 0x14] CMP ECX,dword ptr [RAX + 0x14] JZ 0x00144a9e JMP 0x00144ad0 LAB_00144a8a: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX],RAX LAB_00144a9e: INC R14 MOVSXD RAX,dword ptr [R12 + 0x40] CMP R14,RAX JL 0x00144a26 LAB_00144aaf: XOR EAX,EAX CMP qword ptr [RBX],0x0 JNZ 0x00144ac1 JMP 0x00144a09 LAB_00144abc: MOV EAX,0x2 LAB_00144ac1: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144ad0: XOR EAX,EAX MOV RCX,qword ptr [RSP] MOV qword ptr [RCX],RAX MOV qword ptr [RBX],RAX MOV EAX,0x3 JMP 0x00144ac1 LAB_00144ae3: MOV qword ptr [R14],R12 MOV qword ptr [RBX],RAX XOR EAX,EAX JMP 0x00144ac1 LAB_00144aed: MOV EAX,0xffffffff JMP 0x00144ac1
int8 js_resolve_export1(long param_1,long *param_2,long *param_3,long param_4,uint param_5,long *param_6) { int iVar1; int *piVar2; int8 uVar3; long lVar4; long lVar5; uint uVar6; long local_40; long local_38; uVar6 = *(uint *)((long)param_6 + 0xc); while( true ) { *param_2 = 0; *param_3 = 0; if (0 < (int)uVar6) { lVar4 = 0; do { if ((*(long *)(*param_6 + lVar4) == param_4) && (*(uint *)(*param_6 + 8 + lVar4) == param_5) ) { return 2; } lVar4 = lVar4 + 0x10; } while ((ulong)uVar6 << 4 != lVar4); } if ((int)param_6[1] <= (int)uVar6) { iVar1 = js_realloc_array(param_1,param_6,0x10,param_6 + 1,uVar6 + 1); if (iVar1 != 0) { return 0xffffffff; } uVar6 = *(uint *)((long)param_6 + 0xc); } lVar4 = *param_6; lVar5 = (long)(int)uVar6; uVar6 = uVar6 + 1; *(uint *)((long)param_6 + 0xc) = uVar6; *(long *)(lVar4 + lVar5 * 0x10) = param_4; if (0xdf < (int)param_5) { piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_5 * 8); *piVar2 = *piVar2 + 1; } *(uint *)(lVar4 + lVar5 * 0x10 + 8) = param_5; lVar4 = (long)*(int *)(param_4 + 0x30); if (lVar4 < 1) break; piVar2 = *(int **)(param_4 + 0x28); while (piVar2[6] != param_5) { piVar2 = piVar2 + 8; lVar4 = lVar4 + -1; if (lVar4 == 0) goto LAB_00144a04; } if ((piVar2[4] == 0) || (param_5 = piVar2[5], param_5 == 0x7e)) { *param_2 = param_4; *param_3 = (long)piVar2; return 0; } param_4 = *(long *)(*(long *)(param_4 + 0x18) + 8 + (long)*piVar2 * 0x10); } LAB_00144a04: if (param_5 != 0x16) { if (0 < *(int *)(param_4 + 0x40)) { lVar4 = 0; do { uVar3 = js_resolve_export1(param_1,&local_38,&local_40, *(int8 *) (*(long *)(param_4 + 0x18) + 8 + (long)*(int *)(*(long *)(param_4 + 0x38) + lVar4 * 4) * 0x10), param_5,param_6); iVar1 = (int)uVar3; if (iVar1 == 0) { if (*param_3 == 0) { *param_2 = local_38; *param_3 = local_40; } else if ((*param_2 != local_38) || (*(int *)(local_40 + 0x14) != *(int *)(*param_3 + 0x14))) { *param_2 = 0; *param_3 = 0; return 3; } } else { if (iVar1 == -1) { return uVar3; } if (iVar1 == 3) { return uVar3; } } lVar4 = lVar4 + 1; } while (lVar4 < *(int *)(param_4 + 0x40)); } if (*param_3 != 0) { return 0; } } return 1; }
17,184
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_name(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)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
static const char* token_type_name(const token_type t) noexcept { switch (t) { case token_type::uninitialized: return "<uninitialized>"; case token_type::literal_true: return "true literal"; case token_type::literal_false: return "false literal"; case token_type::literal_null: return "null literal"; case token_type::value_string: return "string literal"; case token_type::value_unsigned: case token_type::value_integer: case token_type::value_float: return "number literal"; case token_type::begin_array: return "'['"; case token_type::begin_object: return "'{'"; case token_type::end_array: return "']'"; case token_type::end_object: return "'}'"; case token_type::name_separator: return "':'"; case token_type::value_separator: return "','"; case token_type::parse_error: return "<parse error>"; case token_type::end_of_input: return "end of input"; case token_type::literal_or_value: return "'[', '{', or a literal"; // LCOV_EXCL_START default: // catch non-enum values return "unknown token"; // LCOV_EXCL_STOP } }
O0
cpp
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_name(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): pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movl -0xc(%rbp), %eax movq %rax, -0x18(%rbp) subq $0x10, %rax ja 0x87dc1 movq -0x18(%rbp), %rax leaq 0x4ec1(%rip), %rcx # 0x8cba4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x96ee(%rip), %rax # 0x913e1 movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96ee(%rip), %rax # 0x913f1 movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96eb(%rip), %rax # 0x913fe movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96e9(%rip), %rax # 0x9140c movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96e6(%rip), %rax # 0x91419 movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96e5(%rip), %rax # 0x91428 movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96e4(%rip), %rax # 0x91437 movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96db(%rip), %rax # 0x9143b movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96d2(%rip), %rax # 0x9143f movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96c9(%rip), %rax # 0x91443 movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96c0(%rip), %rax # 0x91447 movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96b7(%rip), %rax # 0x9144b movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96ae(%rip), %rax # 0x9144f movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96af(%rip), %rax # 0x9145d movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96af(%rip), %rax # 0x9146a movq %rax, -0x8(%rbp) jmp 0x87dcc leaq 0x96b9(%rip), %rax # 0x91481 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE: push rbp mov rbp, rsp mov [rbp+var_C], edi mov eax, [rbp+var_C] mov [rbp+var_18], rax sub rax, 10h; switch 17 cases ja def_87CEA; jumptable 0000000000087CEA default case mov rax, [rbp+var_18] lea rcx, jpt_87CEA movsxd rax, ds:(jpt_87CEA - 8CBA4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_87CEC: lea rax, aUninitialized; jumptable 0000000000087CEA case 0 mov [rbp+var_8], rax jmp loc_87DCC loc_87CFC: lea rax, aTrueLiteral; jumptable 0000000000087CEA case 1 mov [rbp+var_8], rax jmp loc_87DCC loc_87D0C: lea rax, aFalseLiteral; jumptable 0000000000087CEA case 2 mov [rbp+var_8], rax jmp loc_87DCC loc_87D1C: lea rax, aNullLiteral; jumptable 0000000000087CEA case 3 mov [rbp+var_8], rax jmp loc_87DCC loc_87D2C: lea rax, aStringLiteral; jumptable 0000000000087CEA case 4 mov [rbp+var_8], rax jmp loc_87DCC loc_87D3C: lea rax, aNumberLiteral; jumptable 0000000000087CEA cases 5-7 mov [rbp+var_8], rax jmp loc_87DCC loc_87D4C: lea rax, asc_91437; jumptable 0000000000087CEA case 8 mov [rbp+var_8], rax jmp short loc_87DCC loc_87D59: lea rax, asc_9143B; jumptable 0000000000087CEA case 9 mov [rbp+var_8], rax jmp short loc_87DCC loc_87D66: lea rax, asc_9143F; jumptable 0000000000087CEA case 10 mov [rbp+var_8], rax jmp short loc_87DCC loc_87D73: lea rax, asc_91443; jumptable 0000000000087CEA case 11 mov [rbp+var_8], rax jmp short loc_87DCC loc_87D80: lea rax, asc_91447; jumptable 0000000000087CEA case 12 mov [rbp+var_8], rax jmp short loc_87DCC loc_87D8D: lea rax, asc_9144B; jumptable 0000000000087CEA case 13 mov [rbp+var_8], rax jmp short loc_87DCC loc_87D9A: lea rax, aParseError_1; jumptable 0000000000087CEA case 14 mov [rbp+var_8], rax jmp short loc_87DCC loc_87DA7: lea rax, aEndOfInput; jumptable 0000000000087CEA case 15 mov [rbp+var_8], rax jmp short loc_87DCC loc_87DB4: lea rax, aOrALiteral; jumptable 0000000000087CEA case 16 mov [rbp+var_8], rax jmp short loc_87DCC def_87CEA: lea rax, aUnknownToken; jumptable 0000000000087CEA default case mov [rbp+var_8], rax loc_87DCC: mov rax, [rbp+var_8] pop rbp retn
const char * 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( int a1) { const char *v2; // [rsp+10h] [rbp-8h] switch ( a1 ) { case 0: v2 = "<uninitialized>"; break; case 1: v2 = "true literal"; break; case 2: v2 = "false literal"; break; case 3: v2 = "null literal"; break; case 4: v2 = "string literal"; break; case 5: case 6: case 7: v2 = "number literal"; break; case 8: v2 = "'['"; break; case 9: v2 = "'{'"; break; case 10: v2 = "']'"; break; case 11: v2 = "'}'"; break; case 12: v2 = "':'"; break; case 13: v2 = "','"; break; case 14: v2 = "<parse error>"; break; case 15: v2 = "end of input"; break; case 16: v2 = "'[', '{', or a literal"; break; default: v2 = "unknown token"; break; } return v2; }
token_type_name: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x10 JA 0x00187dc1 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x18cba4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[0x1913e1] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_1: LEA RAX,[0x1913f1] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_2: LEA RAX,[0x1913fe] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_3: LEA RAX,[0x19140c] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_4: LEA RAX,[0x191419] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_5: LEA RAX,[0x191428] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_8: LEA RAX,[0x191437] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_9: LEA RAX,[0x19143b] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_a: LEA RAX,[0x19143f] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_b: LEA RAX,[0x191443] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_c: LEA RAX,[0x191447] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_d: LEA RAX,[0x19144b] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_e: LEA RAX,[0x19144f] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_f: LEA RAX,[0x19145d] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc caseD_10: LEA RAX,[0x19146a] MOV qword ptr [RBP + -0x8],RAX JMP 0x00187dcc default: LEA RAX,[0x191481] MOV qword ptr [RBP + -0x8],RAX LAB_00187dcc: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
/* 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_name(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) */ char * 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_name(int4 param_1) { char *local_10; switch(param_1) { case 0: local_10 = "<uninitialized>"; break; case 1: local_10 = "true literal"; break; case 2: local_10 = "false literal"; break; case 3: local_10 = "null literal"; break; case 4: local_10 = "string literal"; break; case 5: case 6: case 7: local_10 = "number literal"; break; case 8: local_10 = "\'[\'"; break; case 9: local_10 = "\'{\'"; break; case 10: local_10 = "\']\'"; break; case 0xb: local_10 = "\'}\'"; break; case 0xc: local_10 = "\':\'"; break; case 0xd: local_10 = "\',\'"; break; case 0xe: local_10 = "<parse error>"; break; case 0xf: local_10 = "end of input"; break; case 0x10: local_10 = "\'[\', \'{\', or a literal"; break; default: local_10 = "unknown token"; } return local_10; }
17,185
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_name(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)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
static const char* token_type_name(const token_type t) noexcept { switch (t) { case token_type::uninitialized: return "<uninitialized>"; case token_type::literal_true: return "true literal"; case token_type::literal_false: return "false literal"; case token_type::literal_null: return "null literal"; case token_type::value_string: return "string literal"; case token_type::value_unsigned: case token_type::value_integer: case token_type::value_float: return "number literal"; case token_type::begin_array: return "'['"; case token_type::begin_object: return "'{'"; case token_type::end_array: return "']'"; case token_type::end_object: return "'}'"; case token_type::name_separator: return "':'"; case token_type::value_separator: return "','"; case token_type::parse_error: return "<parse error>"; case token_type::end_of_input: return "end of input"; case token_type::literal_or_value: return "'[', '{', or a literal"; // LCOV_EXCL_START default: // catch non-enum values return "unknown token"; // LCOV_EXCL_STOP } }
O1
cpp
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_name(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): cmpl $0x10, %edi ja 0x1fbbc movl %edi, %eax leaq 0x760c(%rip), %rcx # 0x271c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x6083(%rip), %rax # 0x25c46 retq
_ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE: cmp edi, 10h ja short loc_1FBBC mov eax, edi lea rcx, unk_271C0 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_1FBBC: lea rax, aUnknownToken; "unknown token" retn
const char * 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( unsigned int a1) { if ( a1 > 0x10 ) return "unknown token"; else return (char *)dword_271C0 + dword_271C0[a1]; }
token_type_name: CMP EDI,0x10 JA 0x0011fbbc MOV EAX,EDI LEA RCX,[0x1271c0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_0011fbbc: LEA RAX,[0x125c46] RET
/* 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_name(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) */ char * 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_name(uint param_1) { if (param_1 < 0x11) { return &DAT_001271c0 + *(int *)(&DAT_001271c0 + (ulong)param_1 * 4); } return "unknown token"; }
17,186
my_printv_error
eloqsql/mysys/my_error.c
void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) { char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printv_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O3
c
my_printv_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x208, %rsp # imm = 0x208 movq %rdx, %rbx movq %rsi, %rdx movl %edi, %r14d movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq -0x220(%rbp), %r15 movl $0x200, %esi # imm = 0x200 movq %r15, %rdi callq 0xdf879 leaq 0x2ed7b3(%rip), %rax # 0x3909c0 movl %r14d, %edi movq %r15, %rsi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0xa3235 addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a240
my_printv_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 208h mov rbx, rdx mov rdx, rsi mov r14d, edi mov rax, fs:28h mov [rbp+var_20], rax lea r15, [rbp+var_220] mov esi, 200h mov rdi, r15 call my_vsnprintf lea rax, error_handler_hook mov edi, r14d mov rsi, r15 mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_A3235 add rsp, 208h pop rbx pop r14 pop r15 pop rbp retn loc_A3235: call ___stack_chk_fail
unsigned long long my_printv_error(long long a1, long long a2) { _BYTE v3[512]; // [rsp+0h] [rbp-220h] BYREF unsigned long long v4; // [rsp+200h] [rbp-20h] v4 = __readfsqword(0x28u); my_vsnprintf(v3, 512LL, a2); error_handler_hook(); return __readfsqword(0x28u); }
my_printv_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x208 MOV RBX,RDX MOV RDX,RSI MOV R14D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA R15,[RBP + -0x220] MOV ESI,0x200 MOV RDI,R15 CALL 0x001df879 LEA RAX,[0x4909c0] MOV EDI,R14D MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001a3235 ADD RSP,0x208 POP RBX POP R14 POP R15 POP RBP RET LAB_001a3235: CALL 0x0012a240
void my_printv_error(int4 param_1,int8 param_2,int8 param_3) { long in_FS_OFFSET; int1 local_228 [512]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); my_vsnprintf(local_228,0x200,param_2); (*(code *)error_handler_hook)(param_1,local_228,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
17,187
minja::simple_function(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::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O0
cpp
minja::simple_function(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::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) movq %rcx, 0x138(%rsp) leaq 0x108(%rsp), %rdi callq 0x120060 movq $0x0, 0x100(%rsp) movq 0x140(%rsp), %rdi callq 0x54f20 movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rax cmpq 0xf8(%rsp), %rax jae 0x1622e1 movq 0x100(%rsp), %rsi movq %rsi, 0x20(%rsp) movq 0x140(%rsp), %rdi callq 0x54f40 movq %rax, %rsi leaq 0x108(%rsp), %rdi callq 0x120070 movq %rax, 0x28(%rsp) jmp 0x1622a5 movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, (%rax) movq 0x100(%rsp), %rax addq $0x1, %rax movq %rax, 0x100(%rsp) jmp 0x162262 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0x16243d leaq 0x40(%rsp), %rdi movq %rdi, 0x18(%rsp) movq 0x140(%rsp), %rsi callq 0x8d4f0 jmp 0x1622fa leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) movq 0x148(%rsp), %rsi callq 0x4f1d0 jmp 0x162313 leaq 0x78(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x108(%rsp), %rsi callq 0x120160 jmp 0x16232c leaq 0xa8(%rsp), %rdi movq 0x138(%rsp), %rsi callq 0x120190 jmp 0x162343 leaq 0xc8(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x162460 jmp 0x162357 movq 0x30(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0xe2b40 jmp 0x16236b leaq 0xc8(%rsp), %rdi callq 0xe2c70 leaq 0x40(%rsp), %rdi callq 0x162510 leaq 0x108(%rsp), %rdi callq 0x120240 movq 0x38(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0x1623f0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0x1623e6 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) callq 0x120240 movq 0x10(%rsp), %rdi callq 0x50100 movq 0x18(%rsp), %rdi callq 0x55080 jmp 0x16243d movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0x162433 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xc8(%rsp), %rdi callq 0xe2c70 leaq 0x40(%rsp), %rdi callq 0x162510 leaq 0x108(%rsp), %rdi callq 0x120240 movq 0xf0(%rsp), %rdi callq 0x4f990 nopw (%rax,%rax)
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE_0: sub rsp, 158h mov [rsp+158h+var_128], rdi mov rax, rdi mov [rsp+158h+var_120], rax mov [rsp+158h+var_8], rdi mov [rsp+158h+var_10], rsi mov [rsp+158h+var_18], rdx mov [rsp+158h+var_20], rcx lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2Ev; std::map<std::string,ulong>::map(void) mov [rsp+158h+var_58], 0 mov rdi, [rsp+158h+var_18] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov [rsp+158h+var_60], rax loc_162262: mov rax, [rsp+158h+var_58] cmp rax, [rsp+158h+var_60] jnb short loc_1622E1 mov rsi, [rsp+158h+var_58] mov [rsp+158h+var_138], rsi mov rdi, [rsp+158h+var_18] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rsp+158h+var_130], rax jmp short $+2 loc_1622A5: mov rax, [rsp+158h+var_130] mov rcx, [rsp+158h+var_138] mov [rax], rcx mov rax, [rsp+158h+var_58] add rax, 1 mov [rsp+158h+var_58], rax jmp short loc_162262 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp loc_16243D loc_1622E1: lea rdi, [rsp+158h+var_118] mov [rsp+158h+var_140], rdi mov rsi, [rsp+158h+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) jmp short $+2 loc_1622FA: lea rdi, [rsp+158h+var_100] mov [rsp+158h+var_148], rdi mov rsi, [rsp+158h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_162313: lea rdi, [rsp+158h+var_E0] mov [rsp+158h+var_150], rdi lea rsi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2ERKSC_; std::map<std::string,ulong>::map(std::map<std::string,ulong> const&) jmp short $+2 loc_16232C: lea rdi, [rsp+158h+var_B0] mov rsi, [rsp+158h+var_20] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) jmp short $+2 loc_162343: lea rdi, [rsp+158h+var_90] lea rsi, [rsp+158h+var_118] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISH_SaISH_EERKS_IFS1_S6_RS1_EEE3$_0vEEOT__0; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>(minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0 &&) jmp short $+2 loc_162357: mov rdi, [rsp+158h+var_128] lea rsi, [rsp+158h+var_90] call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) jmp short $+2 loc_16236B: lea rdi, [rsp+158h+var_90] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function() lea rdi, [rsp+158h+var_118] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() mov rax, [rsp+158h+var_120] add rsp, 158h retn mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_1623F0 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_1623E6 mov rdi, [rsp+arg_0] mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() loc_1623E6: mov rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1623F0: mov rdi, [rsp+arg_10] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_16243D mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_162433 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_C0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function() loc_162433: lea rdi, [rsp+arg_38] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() loc_16243D: lea rdi, [rsp+arg_100] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() mov rdi, [rsp+arg_E8] call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v4; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d _QWORD v14[3]; // [rsp+40h] [rbp-118h] BYREF _BYTE v15[32]; // [rsp+58h] [rbp-100h] BYREF _BYTE v16[48]; // [rsp+78h] [rbp-E0h] BYREF _BYTE v17[32]; // [rsp+A8h] [rbp-B0h] BYREF _BYTE v18[48]; // [rsp+C8h] [rbp-90h] BYREF unsigned long long v19; // [rsp+F8h] [rbp-60h] unsigned long long v20; // [rsp+100h] [rbp-58h] _BYTE v21[48]; // [rsp+108h] [rbp-50h] BYREF long long v22; // [rsp+138h] [rbp-20h] _QWORD *v23; // [rsp+140h] [rbp-18h] long long v24; // [rsp+148h] [rbp-10h] long long v25; // [rsp+150h] [rbp-8h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; std::map<std::string,unsigned long>::map((long long)v21); v20 = 0LL; v19 = std::vector<std::string>::size(v23); while ( v20 < v19 ) { v4 = std::vector<std::string>::operator[](v23, v20); *(_QWORD *)std::map<std::string,unsigned long>::operator[]((long long)v21, v4) = v20++; } std::vector<std::string>::vector(v14, v23); std::string::basic_string(v15, v24); std::map<std::string,unsigned long>::map(v16, v21); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function( (std::_Function_base *)v17, v22); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>( (unsigned int)v18, (unsigned int)v14, v5, v6, v7, v8); minja::Value::callable(a1, (long long)v18, v9, v10, v11, v12); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function((std::_Function_base *)v18); minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v14); std::map<std::string,unsigned long>::~map((long long)v21); return a1; }
_Iter_pred: MOV qword ptr [RSP + -0x10],RDI RET
/* __gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int> > const&)::$_0>::_Iter_pred(string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int> > const&)::$_0) */ void __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,std::vector<int,std::allocator<int>>const&)::$_0> ::_Iter_pred(void) { return; }
17,188
minja::simple_function(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::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O2
cpp
minja::simple_function(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::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, 0x8(%rsp) movq %rdx, %r15 movq %rsi, %r12 leaq 0x38(%rsp), %rax andl $0x0, (%rax) andq $0x0, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) andq $0x0, 0x20(%rax) movq %rdi, (%rsp) movq 0x8(%rdx), %rbp subq (%rdx), %rbp sarq $0x5, %rbp xorl %ebx, %ebx leaq 0x30(%rsp), %r13 xorl %r14d, %r14d cmpq %r14, %rbp je 0x28474 movq (%r15), %rsi addq %rbx, %rsi movq %r13, %rdi callq 0x63b20 movq %r14, (%rax) incq %r14 addq $0x20, %rbx jmp 0x28455 leaq 0x60(%rsp), %rdi movq %r15, %rsi callq 0x36ec2 leaq 0x78(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi callq 0x20910 leaq 0x98(%rsp), %r13 leaq 0x30(%rsp), %rsi movq %r13, %rdi callq 0x63f6a leaq 0xc8(%rsp), %r12 movq %r12, %rdi movq 0x8(%rsp), %rsi callq 0x63b86 xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movl $0x88, %edi callq 0x206b0 movq %rax, %r14 leaq 0x60(%rsp), %rsi movq %rax, %rdi callq 0x36ec2 leaq 0x18(%r14), %r13 movq %r13, %rdi movq %r15, %rsi callq 0x20910 leaq 0x40(%r14), %rdi leaq 0xa0(%rsp), %rsi callq 0x641e0 leaq 0x68(%r14), %rdi movq %r12, %rsi callq 0x63b86 leaq 0x10(%rsp), %rsi movq %r14, (%rsi) leaq 0x109(%rip), %rax # 0x28626 movq %rax, 0x18(%rsi) leaq 0x42c(%rip), %rax # 0x28954 movq %rax, 0x10(%rsi) movq (%rsp), %rbx movq %rbx, %rdi callq 0x51e9e leaq 0x10(%rsp), %rdi callq 0x63a40 leaq 0x60(%rsp), %rdi callq 0x285fe leaq 0x30(%rsp), %rdi callq 0x641cc movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x285a5 movq %rax, %rbx movq %r14, %rdi addq $0x38, %rdi callq 0x641cc movq %r13, %rdi callq 0x20d88 jmp 0x28589 movq %rax, %rbx movq %r14, %rdi callq 0x2301c jmp 0x28596 movq %rax, %rbx movl $0x88, %esi movq %r14, %rdi callq 0x206c0 jmp 0x285a8 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x63a40 leaq 0x60(%rsp), %rdi callq 0x285fe jmp 0x285ec movq %rax, %rbx movq %r13, %rdi callq 0x641cc jmp 0x285ce movq %rax, %rbx movq %r15, %rdi callq 0x20d88 jmp 0x285db movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x2301c jmp 0x285ec jmp 0x285e9 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x641cc movq %rbx, %rdi callq 0x20b90
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_110], rcx mov r15, rdx mov r12, rsi lea rax, [rsp+118h+var_E0] and dword ptr [rax], 0 and qword ptr [rax+8], 0 mov [rax+10h], rax mov [rax+18h], rax and qword ptr [rax+20h], 0 mov [rsp+118h+var_118], rdi mov rbp, [rdx+8] sub rbp, [rdx] sar rbp, 5 xor ebx, ebx lea r13, [rsp+118h+var_E8] xor r14d, r14d loc_28455: cmp rbp, r14 jz short loc_28474 mov rsi, [r15] add rsi, rbx mov rdi, r13 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r14 inc r14 add rbx, 20h ; ' ' jmp short loc_28455 loc_28474: lea rdi, [rsp+118h+var_B8] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea r15, [rsp+118h+var_A0] mov rdi, r15 mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea r13, [rsp+118h+var_80] lea rsi, [rsp+118h+var_E8] mov rdi, r13 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&) lea r12, [rsp+118h+var_50] mov rdi, r12 mov rsi, [rsp+118h+var_110] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) xorps xmm0, xmm0 movaps [rsp+118h+var_F8], xmm0 movaps [rsp+118h+var_108], xmm0 mov edi, 88h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax lea rsi, [rsp+118h+var_B8] mov rdi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea r13, [r14+18h] mov rdi, r13 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rdi, [r14+40h] lea rsi, [rsp+118h+var_78] call _ZNSt15_Rb_tree_headerC2EOS_; std::_Rb_tree_header::_Rb_tree_header(std::_Rb_tree_header&&) lea rdi, [r14+68h] mov rsi, r12 call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) lea rsi, [rsp+118h+var_108] mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8_; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax mov rbx, [rsp+118h+var_118] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) lea rdi, [rsp+118h+var_108]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+118h+var_B8] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() lea rdi, [rsp+118h+var_E8] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_285A5 mov rbx, rax mov rdi, r14 add rdi, 38h ; '8' call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_28589 mov rbx, rax loc_28589: mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_28596 mov rbx, rax loc_28596: mov esi, 88h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_285A8 loc_285A5: mov rbx, rax loc_285A8: lea rdi, [rsp+arg_8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+arg_58] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() jmp short loc_285EC mov rbx, rax mov rdi, r13 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() jmp short loc_285CE mov rbx, rax loc_285CE: mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_285DB mov rbx, rax loc_285DB: lea rdi, [rsp+arg_58] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_285EC jmp short $+2 loc_285E9: mov rbx, rax loc_285EC: lea rdi, [rsp+arg_28] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v5; // rbp long long v6; // rbx long long i; // r14 long long v8; // r14 int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d __int128 v15; // [rsp+10h] [rbp-108h] BYREF long long ( *v16)(); // [rsp+20h] [rbp-F8h] long long ( *v17)(); // [rsp+28h] [rbp-F0h] _BYTE v18[8]; // [rsp+30h] [rbp-E8h] BYREF int v19; // [rsp+38h] [rbp-E0h] BYREF long long v20; // [rsp+40h] [rbp-D8h] int *v21; // [rsp+48h] [rbp-D0h] int *v22; // [rsp+50h] [rbp-C8h] long long v23; // [rsp+58h] [rbp-C0h] _BYTE v24[24]; // [rsp+60h] [rbp-B8h] BYREF _BYTE v25[32]; // [rsp+78h] [rbp-A0h] BYREF _BYTE v26[8]; // [rsp+98h] [rbp-80h] BYREF _BYTE v27[40]; // [rsp+A0h] [rbp-78h] BYREF _BYTE v28[80]; // [rsp+C8h] [rbp-50h] BYREF v19 = 0; v20 = 0LL; v21 = &v19; v22 = &v19; v23 = 0LL; v5 = (long long)(a3[1] - *a3) >> 5; v6 = 0LL; for ( i = 0LL; v5 != i; ++i ) { *(_QWORD *)std::map<std::string,unsigned long>::operator[](v18, v6 + *a3) = i; v6 += 32LL; } std::vector<std::string>::vector(v24, a3); std::string::basic_string(v25, a2); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree( v26, v18); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v28, a4); v15 = 0LL; v8 = operator new(0x88uLL); std::vector<std::string>::vector(v8, v24); std::string::basic_string(v8 + 24, v25); std::_Rb_tree_header::_Rb_tree_header(v8 + 64, v27); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v8 + 104, v28); *(_QWORD *)&v15 = v8; v17 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke; v16 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager; minja::Value::callable(a1, (unsigned int)&v15, v9, v10, v11, v12, a1, a4); std::_Function_base::~_Function_base((std::_Function_base *)&v15); minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v24); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree(v18); return a1; }
simple_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RSP + 0x8],RCX MOV R15,RDX MOV R12,RSI LEA RAX,[RSP + 0x38] AND dword ptr [RAX],0x0 AND qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX AND qword ptr [RAX + 0x20],0x0 MOV qword ptr [RSP],RDI MOV RBP,qword ptr [RDX + 0x8] SUB RBP,qword ptr [RDX] SAR RBP,0x5 XOR EBX,EBX LEA R13,[RSP + 0x30] XOR R14D,R14D LAB_00128455: CMP RBP,R14 JZ 0x00128474 MOV RSI,qword ptr [R15] ADD RSI,RBX LAB_00128460: MOV RDI,R13 CALL 0x00163b20 MOV qword ptr [RAX],R14 INC R14 ADD RBX,0x20 JMP 0x00128455 LAB_00128474: LEA RDI,[RSP + 0x60] MOV RSI,R15 CALL 0x00136ec2 LEA R15,[RSP + 0x78] LAB_00128486: MOV RDI,R15 MOV RSI,R12 CALL 0x00120910 LEA R13,[RSP + 0x98] LAB_00128499: LEA RSI,[RSP + 0x30] MOV RDI,R13 CALL 0x00163f6a LEA R12,[RSP + 0xc8] LAB_001284ae: MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x8] CALL 0x00163b86 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_001284c8: MOV EDI,0x88 CALL 0x001206b0 LAB_001284d2: MOV R14,RAX LEA RSI,[RSP + 0x60] MOV RDI,RAX CALL 0x00136ec2 LEA R13,[R14 + 0x18] LAB_001284e6: MOV RDI,R13 MOV RSI,R15 CALL 0x00120910 LEA RDI,[R14 + 0x40] LEA RSI,[RSP + 0xa0] CALL 0x001641e0 LEA RDI,[R14 + 0x68] LAB_00128506: MOV RSI,R12 CALL 0x00163b86 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],R14 LEA RAX,[0x128626] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x128954] MOV qword ptr [RSI + 0x10],RAX LAB_0012852c: MOV RBX,qword ptr [RSP] MOV RDI,RBX CALL 0x00151e9e LAB_00128538: LEA RDI,[RSP + 0x10] CALL 0x00163a40 LEA RDI,[RSP + 0x60] CALL 0x001285fe LEA RDI,[RSP + 0x30] CALL 0x001641cc MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ minja * __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { long lVar1; long lVar2; long *plVar3; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00; long lVar4; long lVar5; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_108; int8 uStack_100; code *local_f8; code *pcStack_f0; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_e8 [8]; int4 local_e0 [2]; int8 local_d8; int4 *local_d0; int4 *local_c8; int8 local_c0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_b8 [24]; string local_a0 [32]; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_80 [8]; _Rb_tree_header local_78 [40]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_50 [32]; local_d0 = local_e0; local_e0[0] = 0; local_d8 = 0; local_c0 = 0; lVar1 = *(long *)(param_2 + 8); lVar2 = *(long *)param_2; lVar4 = 0; local_c8 = local_d0; for (lVar5 = 0; lVar1 - lVar2 >> 5 != lVar5; lVar5 = lVar5 + 1) { /* try { // try from 00128460 to 00128467 has its CatchHandler @ 001285e9 */ plVar3 = (long *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_e8,(string *)(*(long *)param_2 + lVar4)); *plVar3 = lVar5; lVar4 = lVar4 + 0x20; } /* try { // try from 00128474 to 00128480 has its CatchHandler @ 001285e7 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_b8,param_2); /* try { // try from 00128486 to 00128490 has its CatchHandler @ 001285d8 */ std::__cxx11::string::string(local_a0,param_1); /* try { // try from 00128499 to 001284a5 has its CatchHandler @ 001285cb */ std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::_Rb_tree(local_80,(_Rb_tree *)local_e8); /* try { // try from 001284ae to 001284ba has its CatchHandler @ 001285be */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_50,param_3); local_f8 = (code *)0x0; pcStack_f0 = (code *)0x0; local_108 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0; uStack_100 = 0; /* try { // try from 001284c8 to 001284d1 has its CatchHandler @ 001285a5 */ this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88); /* try { // try from 001284d2 to 001284e1 has its CatchHandler @ 00128593 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (this_00,(vector *)local_b8); /* try { // try from 001284e6 to 001284f0 has its CatchHandler @ 00128586 */ std::__cxx11::string::string((string *)(this_00 + 0x18),local_a0); std::_Rb_tree_header::_Rb_tree_header((_Rb_tree_header *)(this_00 + 0x40),local_78); /* try { // try from 00128506 to 0012850d has its CatchHandler @ 0012856d */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function ((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *) (this_00 + 0x68),(function *)local_50); pcStack_f0 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_invoke; local_f8 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_manager; local_108 = this_00; /* try { // try from 0012852c to 00128537 has its CatchHandler @ 0012856b */ Value::callable((function *)this); std::_Function_base::~_Function_base((_Function_base *)&local_108); simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&) ::$_0::~__0((__0 *)local_b8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)local_e8); return this; }
17,189
LefDefParser::lefiMacro::propNum(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
double lefiMacro::propNum(int index) const { char msg[160]; if (index < 0 || index >= numProperties_) { sprintf(msg, "ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d", index, numProperties_); lefiError(0, 1352, msg); return 0; } return propNums_[index]; }
O3
cpp
LefDefParser::lefiMacro::propNum(int) const: movl %esi, %edx testl %esi, %esi setns %al movl 0x124(%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x2be5f movq 0x140(%rdi), %rax movl %edx, %ecx movsd (%rax,%rcx,8), %xmm0 retq pushq %rbx subq $0xa0, %rsp leaq 0x262c1(%rip), %rsi # 0x5212f movq %rsp, %rbx movq %rbx, %rdi xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x548, %esi # imm = 0x548 movq %rbx, %rdx callq 0x27ae8 xorps %xmm0, %xmm0 addq $0xa0, %rsp popq %rbx retq
_ZNK12LefDefParser9lefiMacro7propNumEi: mov edx, esi test esi, esi setns al mov ecx, [rdi+124h] cmp ecx, esi setnle sil test al, sil jz short loc_2BE5F mov rax, [rdi+140h] mov ecx, edx movsd xmm0, qword ptr [rax+rcx*8] retn loc_2BE5F: push rbx sub rsp, 0A0h lea rsi, aErrorLefpars13_24; "ERROR (LEFPARS-1352): The index number "... mov rbx, rsp mov rdi, rbx xor eax, eax call _sprintf xor edi, edi; this mov esi, 548h; int mov rdx, rbx; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) xorps xmm0, xmm0 add rsp, 0A0h pop rbx retn
double LefDefParser::lefiMacro::propNum(LefDefParser::lefiMacro *this, signed int a2) { int v2; // ecx const char *v4; // rcx _BYTE v5[168]; // [rsp-A8h] [rbp-A8h] BYREF v2 = *((_DWORD *)this + 73); if ( v2 > a2 && a2 >= 0 ) return *(double *)(*((_QWORD *)this + 40) + 8LL * (unsigned int)a2); sprintf( v5, "ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d", a2, v2); LefDefParser::lefiError(0LL, 1352, (long long)v5, v4); return 0.0; }
propNum: MOV EDX,ESI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI + 0x124] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x0012be5f MOV RAX,qword ptr [RDI + 0x140] MOV ECX,EDX MOVSD XMM0,qword ptr [RAX + RCX*0x8] RET LAB_0012be5f: PUSH RBX SUB RSP,0xa0 LEA RSI,[0x15212f] MOV RBX,RSP MOV RDI,RBX XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x548 MOV RDX,RBX CALL 0x00127ae8 XORPS XMM0,XMM0 ADD RSP,0xa0 POP RBX RET
/* LefDefParser::lefiMacro::propNum(int) const */ int8 __thiscall LefDefParser::lefiMacro::propNum(lefiMacro *this,int param_1) { char acStack_a8 [160]; if (-1 < param_1 && param_1 < *(int *)(this + 0x124)) { return *(int8 *)(*(long *)(this + 0x140) + (ulong)(uint)param_1 * 8); } sprintf(acStack_a8, "ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d" ); lefiError(0,0x548,acStack_a8); return 0; }
17,190
get_dynamic
eloqsql/mysys/array.c
void get_dynamic(DYNAMIC_ARRAY *array, void *element, uint idx) { if (idx >= array->elements) { DBUG_PRINT("warning",("To big array idx: %d, array size is %d", idx,array->elements)); bzero(element,array->size_of_element); return; } memcpy(element,array->buffer+idx*array->size_of_element, (size_t) array->size_of_element); }
O3
c
get_dynamic: pushq %rbp movq %rsp, %rbp cmpl %edx, 0x8(%rdi) jbe 0x2c5ea movl 0x14(%rdi), %eax imull %eax, %edx addq (%rdi), %rdx movq %rsi, %rdi movq %rdx, %rsi movq %rax, %rdx popq %rbp jmp 0x24240 movl 0x14(%rdi), %edx movq %rsi, %rdi xorl %esi, %esi popq %rbp jmp 0x24180
get_dynamic: push rbp mov rbp, rsp cmp [rdi+8], edx jbe short loc_2C5EA mov eax, [rdi+14h] imul edx, eax add rdx, [rdi] mov rdi, rsi mov rsi, rdx mov rdx, rax pop rbp jmp _memcpy loc_2C5EA: mov edx, [rdi+14h] mov rdi, rsi xor esi, esi pop rbp jmp _memset
long long get_dynamic(long long a1, long long a2, unsigned int a3) { if ( *(_DWORD *)(a1 + 8) <= a3 ) return memset(a2, 0LL, *(unsigned int *)(a1 + 20)); else return memcpy(a2, *(_QWORD *)a1 + *(_DWORD *)(a1 + 20) * a3, *(unsigned int *)(a1 + 20)); }
get_dynamic: PUSH RBP MOV RBP,RSP CMP dword ptr [RDI + 0x8],EDX JBE 0x0012c5ea MOV EAX,dword ptr [RDI + 0x14] IMUL EDX,EAX ADD RDX,qword ptr [RDI] MOV RDI,RSI MOV RSI,RDX MOV RDX,RAX POP RBP JMP 0x00124240 LAB_0012c5ea: MOV EDX,dword ptr [RDI + 0x14] MOV RDI,RSI XOR ESI,ESI POP RBP JMP 0x00124180
void get_dynamic(long *param_1,void *param_2,uint param_3) { if (param_3 < *(uint *)(param_1 + 1)) { memcpy(param_2,(void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1), (ulong)*(uint *)((long)param_1 + 0x14)); return; } memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14)); return; }
17,191
resolve_charset
eloqsql/mysys/charset.c
my_bool resolve_charset(const char *cs_name, CHARSET_INFO *default_cs, CHARSET_INFO **cs, myf flags) { *cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, flags); if (*cs == NULL) { *cs= default_cs; return TRUE; } return FALSE; }
O3
c
resolve_charset: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0xc0, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %rsi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) leaq -0xc8(%rbp), %rdi movb $0x0, (%rdi) leaq -0x12f0(%rip), %rax # 0x4a002 movq %rax, 0x80(%rdi) leaq -0x12ef(%rip), %rax # 0x4a011 movq %rax, 0x88(%rdi) leaq -0x12e2(%rip), %rax # 0x4a02c movq %rax, 0x90(%rdi) leaq -0x4032(%rip), %rax # 0x472ea movq %rax, 0x98(%rdi) leaq 0x2cfbde(%rip), %rax # 0x31af08 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0x12f1(%rip), %rax # 0x4a04a movq %rax, 0xa8(%rdi) movl $0x20, %edx callq 0x4b144 movq %rax, %rcx testq %rax, %rax sete %al cmovneq %rcx, %r14 movq %r14, (%rbx) movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x4b377 addq $0xc0, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x263b0
resolve_charset: push rbp mov rbp, rsp push r14 push rbx sub rsp, 0C0h mov rbx, rdx mov r14, rsi mov rsi, rdi mov rax, fs:28h mov [rbp+var_18], rax lea rdi, [rbp+var_C8] 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 edx, 20h ; ' ' call my_charset_get_by_name mov rcx, rax test rax, rax setz al cmovnz r14, rcx mov [rbx], r14 mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_4B377 add rsp, 0C0h pop rbx pop r14 pop rbp retn loc_4B377: call ___stack_chk_fail
bool resolve_charset(long long a1, long long a2, long long *a3, long long a4) { long long v6; // rcx bool result; // al char v8[128]; // [rsp+8h] [rbp-C8h] BYREF long long ( *v9)(long long); // [rsp+88h] [rbp-48h] long long ( *v10)(unsigned long long); // [rsp+90h] [rbp-40h] long long ( *v11)(long long, unsigned long long); // [rsp+98h] [rbp-38h] long long ( *v12)(long long); // [rsp+A0h] [rbp-30h] long long ( *v13)(); // [rsp+A8h] [rbp-28h] long long ( *v14)(unsigned int *); // [rsp+B0h] [rbp-20h] unsigned long long v15; // [rsp+B8h] [rbp-18h] v15 = __readfsqword(0x28u); 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; v6 = my_charset_get_by_name((long long)v8, a1, 0x20u, a4); result = v6 == 0; if ( v6 ) a2 = v6; *a3 = a2; return result; }
resolve_charset: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0xc0 MOV RBX,RDX MOV R14,RSI MOV RSI,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0xc8] MOV byte ptr [RDI],0x0 LEA RAX,[0x14a002] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x14a011] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x14a02c] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x1472ea] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x41af08] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x14a04a] MOV qword ptr [RDI + 0xa8],RAX MOV EDX,0x20 CALL 0x0014b144 MOV RCX,RAX TEST RAX,RAX SETZ AL CMOVNZ R14,RCX MOV qword ptr [RBX],R14 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x0014b377 ADD RSP,0xc0 POP RBX POP R14 POP RBP RET LAB_0014b377: CALL 0x001263b0
bool resolve_charset(int8 param_1,long param_2,long *param_3) { long lVar1; long in_FS_OFFSET; int1 local_d0 [128]; code *local_50; code *local_48; code *local_40; code *local_38; int *local_30; code *local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_d0[0] = 0; local_50 = my_once_alloc_c; local_48 = my_malloc_c; local_40 = my_realloc_c; local_38 = my_free; local_30 = my_charset_error_reporter; local_28 = add_collation; lVar1 = my_charset_get_by_name(local_d0,param_1,0x20); if (lVar1 != 0) { param_2 = lVar1; } *param_3 = param_2; if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return lVar1 == 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
17,192
JS_NewBigInt64
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewBigInt64(JSContext *ctx, int64_t v) { JSValue val; bf_t *a; val = JS_NewBigInt(ctx); if (JS_IsException(val)) return val; a = JS_GetBigInt(val); if (bf_set_si(a, v)) { JS_FreeValue(ctx, val); return JS_ThrowOutOfMemory(ctx); } return val; }
O3
c
JS_NewBigInt64: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r12 movq %rdi, %r15 callq 0x10031 movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx je 0x28a0c movq %r14, %rdi addq $0x8, %rdi movq %r12, %rsi callq 0x87626 testl %eax, %eax je 0x28a0c cmpl $-0x9, %ebx jb 0x289fc movq 0x18(%r15), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x289fc movq %r14, %rsi movq %rbx, %rdx callq 0x219cc movq %r15, %rdi callq 0x1d44b movl $0x6, %ebx xorl %r14d, %r14d movq %r14, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
JS_NewBigInt64: push r15 push r14 push r12 push rbx push rax mov r12, rsi mov r15, rdi call JS_NewBigInt mov r14, rax mov rbx, rdx cmp ebx, 6 jz short loc_28A0C mov rdi, r14 add rdi, 8 mov rsi, r12 call bf_set_si test eax, eax jz short loc_28A0C cmp ebx, 0FFFFFFF7h jb short loc_289FC mov rdi, [r15+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_289FC mov rsi, r14 mov rdx, rbx call js_free_value_rt loc_289FC: mov rdi, r15 call JS_ThrowOutOfMemory mov ebx, 6 xor r14d, r14d loc_28A0C: mov rax, r14 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
_QWORD * JS_NewBigInt64(long long a1, long long a2) { _DWORD *v3; // rax _QWORD *v4; // r14 unsigned int v5; // edx unsigned int v6; // ebx int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // rdi int v12; // eax v3 = JS_NewBigInt(a1); v4 = v3; v6 = v5; if ( v5 != 6 && (unsigned int)bf_set_si(v3 + 2, a2) ) { if ( v6 >= 0xFFFFFFF7 ) { v11 = *(_QWORD *)(a1 + 24); v12 = *(_DWORD *)v4; v8 = *(_DWORD *)v4 - 1; *(_DWORD *)v4 = v8; if ( v12 <= 1 ) { a2 = (long long)v4; js_free_value_rt(v11, v4, v6); } } JS_ThrowOutOfMemory(a1, a2, v7, v8, v9, v10); return 0LL; } return v4; }
JS_NewBigInt64: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R12,RSI MOV R15,RDI CALL 0x00110031 MOV R14,RAX MOV RBX,RDX CMP EBX,0x6 JZ 0x00128a0c MOV RDI,R14 ADD RDI,0x8 MOV RSI,R12 CALL 0x00187626 TEST EAX,EAX JZ 0x00128a0c CMP EBX,-0x9 JC 0x001289fc MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x001289fc MOV RSI,R14 MOV RDX,RBX CALL 0x001219cc LAB_001289fc: MOV RDI,R15 CALL 0x0011d44b MOV EBX,0x6 XOR R14D,R14D LAB_00128a0c: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] JS_NewBigInt64(long param_1,int8 param_2) { int8 uVar1; int iVar2; int *piVar3; int1 auVar4 [16]; auVar4 = JS_NewBigInt(); piVar3 = auVar4._0_8_; if (auVar4._8_4_ != 6) { iVar2 = bf_set_si(piVar3 + 2,param_2); if (iVar2 != 0) { if (0xfffffff6 < auVar4._8_4_) { uVar1 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar3; *piVar3 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar1,piVar3,auVar4._8_8_); } } JS_ThrowOutOfMemory(param_1); auVar4 = ZEXT816(6) << 0x40; } } return auVar4; }
17,193
google::protobuf::DescriptorPool::Tables::~Tables()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
DescriptorPool::Tables::~Tables() { GOOGLE_DCHECK(checkpoints_.empty()); }
O3
cpp
google::protobuf::DescriptorPool::Tables::~Tables(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x210(%rdi), %rdi testq %rdi, %rdi je 0xbe4e7 callq 0x2d160 movq 0x1f8(%rbx), %rdi testq %rdi, %rdi je 0xbe4f8 callq 0x2d160 movq 0x1e0(%rbx), %rdi testq %rdi, %rdi je 0xbe509 callq 0x2d160 movq 0x1c8(%rbx), %rdi testq %rdi, %rdi je 0xbe51a callq 0x2d160 leaq 0x198(%rbx), %rdi callq 0xe1c3c leaq 0x160(%rbx), %rdi callq 0xe1c86 leaq 0x138(%rbx), %r14 movq 0x138(%rbx), %rdi testq %rdi, %rdi je 0xbe555 movq (%rdi), %r15 callq 0x2d160 movq %r15, %rdi testq %r15, %r15 jne 0xbe545 movq 0x128(%rbx), %rdi movq 0x130(%rbx), %rdx shlq $0x3, %rdx xorl %esi, %esi callq 0x2c970 xorps %xmm0, %xmm0 movups %xmm0, (%r14) movq 0x128(%rbx), %rdi leaq 0x158(%rbx), %rax cmpq %rdi, %rax je 0xbe58d callq 0x2d160 leaq 0x110(%rbx), %rdi callq 0xbe48e leaq 0xf8(%rbx), %rdi callq 0xe0058 leaq 0xc0(%rbx), %rdi callq 0xe1ce8 leaq 0x88(%rbx), %rdi callq 0xe1d7e leaq 0x50(%rbx), %rdi callq 0x2c4b0 leaq 0x18(%rbx), %rdi callq 0x2c4b0 movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x4f6b4
_ZN6google8protobuf14DescriptorPool6TablesD2Ev: push r15 push r14 push rbx mov rbx, rdi mov rdi, [rdi+210h]; void * test rdi, rdi jz short loc_BE4E7 call __ZdlPv; operator delete(void *) loc_BE4E7: mov rdi, [rbx+1F8h]; void * test rdi, rdi jz short loc_BE4F8 call __ZdlPv; operator delete(void *) loc_BE4F8: mov rdi, [rbx+1E0h]; void * test rdi, rdi jz short loc_BE509 call __ZdlPv; operator delete(void *) loc_BE509: mov rdi, [rbx+1C8h]; void * test rdi, rdi jz short loc_BE51A call __ZdlPv; operator delete(void *) loc_BE51A: lea rdi, [rbx+198h] call _ZNSt8_Rb_treeISt4pairIPKN6google8protobuf10DescriptorEiES0_IKS6_PKNS2_15FieldDescriptorEESt10_Select1stISB_ESt4lessIS6_ESaISB_EED2Ev; std::_Rb_tree<std::pair<google::protobuf::Descriptor const*,int>,std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>,std::less<std::pair<google::protobuf::Descriptor const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>>::~_Rb_tree() lea rdi, [rbx+160h] call _ZNSt10_HashtableIN6google8protobuf20stringpiece_internal11StringPieceESt4pairIKS3_PKNS1_14FileDescriptorEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ENS1_4hashIS3_EENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea r14, [rbx+138h] mov rdi, [rbx+138h]; void * test rdi, rdi jz short loc_BE555 loc_BE545: mov r15, [rdi] call __ZdlPv; operator delete(void *) mov rdi, r15 test r15, r15 jnz short loc_BE545 loc_BE555: mov rdi, [rbx+128h] mov rdx, [rbx+130h] shl rdx, 3 xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [r14], xmm0 mov rdi, [rbx+128h]; void * lea rax, [rbx+158h] cmp rax, rdi jz short loc_BE58D call __ZdlPv; operator delete(void *) loc_BE58D: lea rdi, [rbx+110h] call _ZNSt6vectorISt10unique_ptrIN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_14SourceCodeInfoENS2_20FileDescriptorTablesENS2_14MessageOptionsENS2_12FieldOptionsENS2_11EnumOptionsENS2_16EnumValueOptionsENS2_21ExtensionRangeOptionsENS2_12OneofOptionsENS2_14ServiceOptionsENS2_13MethodOptionsENS2_11FileOptionsEEEENS2_14DescriptorPool6Tables16FlatAllocDeleterEESaISQ_EED2Ev; std::vector<std::unique_ptr<google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>,google::protobuf::DescriptorPool::Tables::FlatAllocDeleter>>::~vector() lea rdi, [rbx+0F8h] call _ZNSt6vectorISt10unique_ptrIiN6google8protobuf14DescriptorPool6Tables11MiscDeleterEESaIS6_EED2Ev; std::vector<std::unique_ptr<int,google::protobuf::DescriptorPool::Tables::MiscDeleter>>::~vector() lea rdi, [rbx+0C0h] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N6google8protobuf10Descriptor13WellKnownTypeEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,google::protobuf::Descriptor::WellKnownType>,std::allocator<std::pair<std::string const,google::protobuf::Descriptor::WellKnownType>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea rdi, [rbx+88h] call _ZNSt10_HashtableIPKN6google8protobuf10DescriptorES4_SaIS4_ENSt8__detail9_IdentityESt8equal_toIS4_ESt4hashIS4_ENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<google::protobuf::Descriptor const*,google::protobuf::Descriptor const*,std::allocator<google::protobuf::Descriptor const*>,std::__detail::_Identity,std::equal_to<google::protobuf::Descriptor const*>,std::hash<google::protobuf::Descriptor const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable() lea rdi, [rbx+50h] call __ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() lea rdi, [rbx+18h] call __ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, rbx pop rbx pop r14 pop r15 jmp _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
void google::protobuf::DescriptorPool::Tables::~Tables(google::protobuf::DescriptorPool::Tables *this) { void *v2; // rdi void *v3; // rdi void *v4; // rdi void *v5; // rdi _QWORD *v6; // rdi _QWORD *v7; // r15 char *v8; // rdi v2 = (void *)*((_QWORD *)this + 66); if ( v2 ) operator delete(v2); v3 = (void *)*((_QWORD *)this + 63); if ( v3 ) operator delete(v3); v4 = (void *)*((_QWORD *)this + 60); if ( v4 ) operator delete(v4); v5 = (void *)*((_QWORD *)this + 57); if ( v5 ) operator delete(v5); std::_Rb_tree<std::pair<google::protobuf::Descriptor const*,int>,std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>,std::less<std::pair<google::protobuf::Descriptor const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>>::~_Rb_tree((char *)this + 408); std::_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable((char *)this + 352); v6 = (_QWORD *)*((_QWORD *)this + 39); if ( v6 ) { do { v7 = (_QWORD *)*v6; operator delete(v6); v6 = v7; } while ( v7 ); } memset(*((_QWORD *)this + 37), 0LL, 8LL * *((_QWORD *)this + 38)); *(_OWORD *)((char *)this + 312) = 0LL; v8 = (char *)*((_QWORD *)this + 37); if ( (char *)this + 344 != v8 ) operator delete(v8); std::vector<std::unique_ptr<google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>,google::protobuf::DescriptorPool::Tables::FlatAllocDeleter>>::~vector((char **)this + 34); std::vector<std::unique_ptr<int,google::protobuf::DescriptorPool::Tables::MiscDeleter>>::~vector((char *)this + 248); std::_Hashtable<std::string,std::pair<std::string const,google::protobuf::Descriptor::WellKnownType>,std::allocator<std::pair<std::string const,google::protobuf::Descriptor::WellKnownType>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable((char *)this + 192); std::_Hashtable<google::protobuf::Descriptor const*,google::protobuf::Descriptor const*,std::allocator<google::protobuf::Descriptor const*>,std::__detail::_Identity,std::equal_to<google::protobuf::Descriptor const*>,std::hash<google::protobuf::Descriptor const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable((char *)this + 136); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((char *)this + 80); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((char *)this + 24); std::vector<std::string>::~vector((long long)this); }
~Tables: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x210] TEST RDI,RDI JZ 0x001be4e7 CALL 0x0012d160 LAB_001be4e7: MOV RDI,qword ptr [RBX + 0x1f8] TEST RDI,RDI JZ 0x001be4f8 CALL 0x0012d160 LAB_001be4f8: MOV RDI,qword ptr [RBX + 0x1e0] TEST RDI,RDI JZ 0x001be509 CALL 0x0012d160 LAB_001be509: MOV RDI,qword ptr [RBX + 0x1c8] TEST RDI,RDI JZ 0x001be51a CALL 0x0012d160 LAB_001be51a: LEA RDI,[RBX + 0x198] CALL 0x001e1c3c LEA RDI,[RBX + 0x160] CALL 0x001e1c86 LEA R14,[RBX + 0x138] MOV RDI,qword ptr [RBX + 0x138] TEST RDI,RDI JZ 0x001be555 LAB_001be545: MOV R15,qword ptr [RDI] CALL 0x0012d160 MOV RDI,R15 TEST R15,R15 JNZ 0x001be545 LAB_001be555: MOV RDI,qword ptr [RBX + 0x128] MOV RDX,qword ptr [RBX + 0x130] SHL RDX,0x3 XOR ESI,ESI CALL 0x0012c970 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 MOV RDI,qword ptr [RBX + 0x128] LEA RAX,[RBX + 0x158] CMP RAX,RDI JZ 0x001be58d CALL 0x0012d160 LAB_001be58d: LEA RDI,[RBX + 0x110] CALL 0x001be48e LEA RDI,[RBX + 0xf8] CALL 0x001e0058 LEA RDI,[RBX + 0xc0] CALL 0x001e1ce8 LEA RDI,[RBX + 0x88] CALL 0x001e1d7e LEA RDI,[RBX + 0x50] CALL 0x0012c4b0 LEA RDI,[RBX + 0x18] CALL 0x0012c4b0 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x0014f6b4
/* google::protobuf::DescriptorPool::Tables::~Tables() */ void __thiscall google::protobuf::DescriptorPool::Tables::~Tables(Tables *this) { int8 *puVar1; int8 *puVar2; if (*(void **)(this + 0x210) != (void *)0x0) { operator_delete(*(void **)(this + 0x210)); } if (*(void **)(this + 0x1f8) != (void *)0x0) { operator_delete(*(void **)(this + 0x1f8)); } if (*(void **)(this + 0x1e0) != (void *)0x0) { operator_delete(*(void **)(this + 0x1e0)); } if (*(void **)(this + 0x1c8) != (void *)0x0) { operator_delete(*(void **)(this + 0x1c8)); } std:: _Rb_tree<std::pair<google::protobuf::Descriptor_const*,int>,std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>,std::less<std::pair<google::protobuf::Descriptor_const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>> ::~_Rb_tree((_Rb_tree<std::pair<google::protobuf::Descriptor_const*,int>,std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>,std::less<std::pair<google::protobuf::Descriptor_const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>> *)(this + 0x198)); std:: _Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable((_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(this + 0x160)); puVar2 = *(int8 **)(this + 0x138); while (puVar2 != (int8 *)0x0) { puVar1 = (int8 *)*puVar2; operator_delete(puVar2); puVar2 = puVar1; } memset(*(void **)(this + 0x128),0,*(long *)(this + 0x130) << 3); *(int8 *)(this + 0x138) = 0; *(int8 *)(this + 0x140) = 0; if (this + 0x158 != *(Tables **)(this + 0x128)) { operator_delete(*(Tables **)(this + 0x128)); } std:: vector<std::unique_ptr<google::protobuf::(anonymous_namespace)::FlatAllocation<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>,google::protobuf::DescriptorPool::Tables::FlatAllocDeleter>,std::allocator<std::unique_ptr<google::protobuf::(anonymous_namespace)::FlatAllocation<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>,google::protobuf::DescriptorPool::Tables::FlatAllocDeleter>>> ::~vector((vector<std::unique_ptr<google::protobuf::(anonymous_namespace)::FlatAllocation<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>,google::protobuf::DescriptorPool::Tables::FlatAllocDeleter>,std::allocator<std::unique_ptr<google::protobuf::(anonymous_namespace)::FlatAllocation<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>,google::protobuf::DescriptorPool::Tables::FlatAllocDeleter>>> *)(this + 0x110)); std:: vector<std::unique_ptr<int,google::protobuf::DescriptorPool::Tables::MiscDeleter>,std::allocator<std::unique_ptr<int,google::protobuf::DescriptorPool::Tables::MiscDeleter>>> ::~vector((vector<std::unique_ptr<int,google::protobuf::DescriptorPool::Tables::MiscDeleter>,std::allocator<std::unique_ptr<int,google::protobuf::DescriptorPool::Tables::MiscDeleter>>> *)(this + 0xf8)); std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::Descriptor::WellKnownType>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::Descriptor::WellKnownType>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::Descriptor::WellKnownType>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::Descriptor::WellKnownType>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(this + 0xc0)); std:: _Hashtable<google::protobuf::Descriptor_const*,google::protobuf::Descriptor_const*,std::allocator<google::protobuf::Descriptor_const*>,std::__detail::_Identity,std::equal_to<google::protobuf::Descriptor_const*>,std::hash<google::protobuf::Descriptor_const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>> ::~_Hashtable((_Hashtable<google::protobuf::Descriptor_const*,google::protobuf::Descriptor_const*,std::allocator<google::protobuf::Descriptor_const*>,std::__detail::_Identity,std::equal_to<google::protobuf::Descriptor_const*>,std::hash<google::protobuf::Descriptor_const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>> *)(this + 0x88)); std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)(this + 0x50)); std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)(this + 0x18)); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this); return; }
17,194
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O2
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x6d642 testb %al, %al je 0x74b83 movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x6d4b0 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x74ba2 movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x63320 leaq 0x41e2d(%rip), %rsi # 0xb69f3 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x58a46 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x24e10 xorl %ebp, %ebp movq 0x8b402(%rip), %rsi # 0xffff0 movq 0x8b35b(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x251b8 jmp 0x74c12 movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x74c26 jmp 0x74c2e movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_74B83 mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_74B83: mov rdi, [rbx+68h] test rdi, rdi jz short loc_74BA2 mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_74BA2: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_74C12 mov r14, rax mov bpl, 1 loc_74C12: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_74C26 jmp short loc_74C2E mov r14, rax loc_74C26: mov rdi, rbx; void * call ___cxa_free_exception loc_74C2E: mov rdi, r14 call __Unwind_Resume
long long minja::Context::at(unsigned __int8 ***this, const minja::Value *a2, __m128d a3) { unsigned __int8 **v4; // rdi void *exception; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[64]; // [rsp+28h] [rbp-40h] BYREF if ( (unsigned __int8)minja::Value::contains(this + 3, a2, a3) ) return minja::Value::at((minja::Value *)(this + 3), a2); v4 = this[13]; if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*((long long ( **)(unsigned __int8 **, const minja::Value *))*v4 + 3))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x0016d642 TEST AL,AL JZ 0x00174b83 MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x0016d4b0 LAB_00174b83: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x00174ba2 MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_00174ba2: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_00174bad: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00163320 LAB_00174bbf: LEA RSI,[0x1b69f3] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00158a46 MOV BPL,0x1 LAB_00174bd8: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00124e10 XOR EBP,EBP MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x00174ba0. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00174bad to 00174bbe has its CatchHandler @ 00174c23 */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 00174bbf to 00174bd4 has its CatchHandler @ 00174c0c */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 00174bd8 to 00174bfc has its CatchHandler @ 00174bfd */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); }
17,195
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O3
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x93284 testb %al, %al je 0x9ca4b movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x93072 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x9ca6a movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax movl $0x10, %edi callq 0x1b440 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x86334 leaq 0x55f71(%rip), %rsi # 0xf2a03 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x78ac9 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1be00 xorl %ebp, %ebp movq 0x9152e(%rip), %rsi # 0x12dfe8 movq 0x9148f(%rip), %rdx # 0x12df50 movq %rbx, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cae7 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8b0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cb02 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 testb %bpl, %bpl jne 0x9cb2c jmp 0x9cb34 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cb2c movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x9cb2c movq %rax, %r14 movq %rbx, %rdi callq 0x1b650 movq %r14, %rdi callq 0x1bf70
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_9CA4B mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_9CA4B: mov rdi, [rbx+68h] test rdi, rdi jz short loc_9CA6A mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_9CA6A: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CAE7 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CAE7: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CB02 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CB02: test bpl, bpl jnz short loc_9CB2C jmp short loc_9CB34 mov r14, rax lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CB2C mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9CB2C mov r14, rax loc_9CB2C: mov rdi, rbx; void * call ___cxa_free_exception loc_9CB34: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3) { long long v4; // rdi void *exception; // rbx _BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF if ( minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) ) return minja::Value::at((minja::Context *)((char *)this + 24), a2); v4 = *((_QWORD *)this + 13); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x00193284 TEST AL,AL JZ 0x0019ca4b MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x00193072 LAB_0019ca4b: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x0019ca6a MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_0019ca6a: MOV EDI,0x10 CALL 0x0011b440 MOV RBX,RAX LAB_0019ca77: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00186334 LAB_0019ca8b: LEA RSI,[0x1f2a03] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00178ac9 MOV BPL,0x1 LAB_0019caa4: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011be00 XOR EBP,EBP MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,RBX CALL 0x0011bef0
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x0019ca68. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019ca77 to 0019ca8a has its CatchHandler @ 0019cb29 */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 0019ca8b to 0019caa0 has its CatchHandler @ 0019cb09 */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 0019caa4 to 0019cac8 has its CatchHandler @ 0019cac9 */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); }
17,196
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::doesFVarTopologyMatch(OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple const&, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp
bool doesFVarTopologyMatch(PatchTuple const & patch, int fvcInTable) { return _patchBuilder->DoesFaceVaryingPatchMatch( patch.levelIndex, patch.faceIndex, getRefinerFVarChannel(fvcInTable)); }
O2
cpp
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::doesFVarTopologyMatch(OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple const&, int): movl %edx, %ecx movq %rdi, %rax movq 0x38(%rdi), %rdi movl (%rsi), %edx movl 0x4(%rsi), %esi testl %ecx, %ecx js 0x80b99 movl %ecx, %ecx movq 0xa8(%rax), %rax movl (%rax,%rcx,4), %ecx jmp 0x55850 pushq $-0x1 popq %rcx jmp 0x55850 nop
_ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder21doesFVarTopologyMatchERKNS2_10PatchTupleEi: mov ecx, edx mov rax, rdi mov rdi, [rdi+38h]; this mov edx, [rsi]; int mov esi, [rsi+4]; int test ecx, ecx js short loc_80B99 mov ecx, ecx mov rax, [rax+0A8h] mov ecx, [rax+rcx*4]; int jmp __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder25DoesFaceVaryingPatchMatchEiii; OpenSubdiv::v3_6_0::Far::PatchBuilder::DoesFaceVaryingPatchMatch(int,int,int) loc_80B99: push 0FFFFFFFFFFFFFFFFh pop rcx; int jmp __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder25DoesFaceVaryingPatchMatchEiii; OpenSubdiv::v3_6_0::Far::PatchBuilder::DoesFaceVaryingPatchMatch(int,int,int)
long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::doesFVarTopologyMatch(long long a1, int *a2, int a3) { OpenSubdiv::v3_6_0::Far::PatchBuilder *v5; // rdi int v6; // edx int v7; // esi v5 = *(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 56); v6 = *a2; v7 = a2[1]; if ( a3 < 0 ) return OpenSubdiv::v3_6_0::Far::PatchBuilder::DoesFaceVaryingPatchMatch(v5, v7, v6, -1); else return OpenSubdiv::v3_6_0::Far::PatchBuilder::DoesFaceVaryingPatchMatch( v5, v7, v6, *(_DWORD *)(*(_QWORD *)(a1 + 168) + 4LL * (unsigned int)a3)); }
doesFVarTopologyMatch: MOV ECX,EDX MOV RAX,RDI MOV RDI,qword ptr [RDI + 0x38] MOV EDX,dword ptr [RSI] MOV ESI,dword ptr [RSI + 0x4] TEST ECX,ECX JS 0x00180b99 MOV ECX,ECX MOV RAX,qword ptr [RAX + 0xa8] MOV ECX,dword ptr [RAX + RCX*0x4] JMP 0x00155850 LAB_00180b99: PUSH -0x1 POP RCX JMP 0x00155850
/* OpenSubdiv::v3_6_0::Far::PatchTableBuilder::doesFVarTopologyMatch(OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple const&, int) */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchTableBuilder::doesFVarTopologyMatch (PatchTableBuilder *this,PatchTuple *param_1,int param_2) { if (-1 < param_2) { PatchBuilder::DoesFaceVaryingPatchMatch (*(PatchBuilder **)(this + 0x38),*(int *)(param_1 + 4),*(int *)param_1, *(int *)(*(long *)(this + 0xa8) + (ulong)(uint)param_2 * 4)); return; } PatchBuilder::DoesFaceVaryingPatchMatch (*(PatchBuilder **)(this + 0x38),*(int *)(param_1 + 4),*(int *)param_1,-1); return; }
17,197
my_rmtree
eloqsql/mysys/my_delete.c
int my_rmtree(const char *dir, myf MyFlags) { char path[FN_REFLEN]; char sep[] = { FN_LIBCHAR, 0 }; int err = 0; uint i; MY_DIR *dir_info = my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT)); if (!dir_info) return 1; for (i = 0; i < dir_info->number_of_files; i++) { FILEINFO *file = dir_info->dir_entry + i; /* Skip "." and ".." */ if (!strcmp(file->name, ".") || !strcmp(file->name, "..")) continue; strxnmov(path, sizeof(path), dir, sep, file->name, NULL); if (!MY_S_ISDIR(file->mystat->st_mode)) { err = my_delete(path, MyFlags); #ifdef _WIN32 /* On Windows, check and possible reset readonly attribute. my_delete(), or DeleteFile does not remove theses files. */ if (err) { DWORD attr = GetFileAttributes(path); if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_READONLY)) { SetFileAttributes(path, attr &~FILE_ATTRIBUTE_READONLY); err = my_delete(path, MyFlags); } } #endif } else err = my_rmtree(path, MyFlags); if (err) break; } my_dirend(dir_info); if (!err) err = rmdir(dir); return err; }
O3
c
my_rmtree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, -0x240(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movw $0x2f, -0x232(%rbp) movl $0x4000, %esi # imm = 0x4000 movq %rdi, -0x248(%rbp) callq 0xa5df9 testq %rax, %rax je 0xa1c15 movq %rax, %r15 movl 0x8(%rax), %eax testl %eax, %eax je 0xa1bfc movl $0x8, %r14d leaq -0x230(%rbp), %rbx xorl %r12d, %r12d movq (%r15), %r13 movq -0x8(%r13,%r14), %r8 cmpb $0x2e, (%r8) jne 0xa1b85 cmpb $0x0, 0x1(%r8) je 0xa1bea cmpb $0x2e, 0x1(%r8) jne 0xa1b85 cmpb $0x0, 0x2(%r8) je 0xa1bea movl $0x200, %esi # imm = 0x200 movq %rbx, %rdi movq -0x248(%rbp), %rdx leaq -0x232(%rbp), %rcx xorl %r9d, %r9d xorl %eax, %eax callq 0xddf1c movq (%r13,%r14), %rax movl 0x18(%rax), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax movq %rbx, %rdi cmpl $0x4000, %eax # imm = 0x4000 jne 0xa1bcc movq -0x240(%rbp), %rsi callq 0xa1af9 jmp 0xa1bd8 movq -0x240(%rbp), %rsi callq 0xa1a24 movl %eax, %r13d testl %eax, %eax jne 0xa1c1d movl 0x8(%r15), %eax leaq -0x230(%rbp), %rbx incq %r12 movl %eax, %ecx addq $0x10, %r14 cmpq %rcx, %r12 jb 0xa1b62 movq %r15, %rdi callq 0xa5dc8 movq -0x248(%rbp), %rdi callq 0x2a380 movl %eax, %r13d jmp 0xa1c25 movl $0x1, %r13d jmp 0xa1c25 movq %r15, %rdi callq 0xa5dc8 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xa1c49 movl %r13d, %eax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a270 nop
my_rmtree: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov [rbp+var_240], rsi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_232], 2Fh ; '/' mov esi, 4000h mov [rbp+var_248], rdi call my_dir test rax, rax jz loc_A1C15 mov r15, rax mov eax, [rax+8] test eax, eax jz loc_A1BFC mov r14d, 8 lea rbx, [rbp+var_230] xor r12d, r12d loc_A1B62: mov r13, [r15] mov r8, [r13+r14-8] cmp byte ptr [r8], 2Eh ; '.' jnz short loc_A1B85 cmp byte ptr [r8+1], 0 jz short loc_A1BEA cmp byte ptr [r8+1], 2Eh ; '.' jnz short loc_A1B85 cmp byte ptr [r8+2], 0 jz short loc_A1BEA loc_A1B85: mov esi, 200h mov rdi, rbx mov rdx, [rbp+var_248] lea rcx, [rbp+var_232] xor r9d, r9d xor eax, eax call strxnmov mov rax, [r13+r14+0] mov eax, [rax+18h] mov ecx, 0F000h and eax, ecx mov rdi, rbx cmp eax, 4000h jnz short loc_A1BCC mov rsi, [rbp+var_240] call my_rmtree jmp short loc_A1BD8 loc_A1BCC: mov rsi, [rbp+var_240] call my_delete loc_A1BD8: mov r13d, eax test eax, eax jnz short loc_A1C1D mov eax, [r15+8] lea rbx, [rbp+var_230] loc_A1BEA: inc r12 mov ecx, eax add r14, 10h cmp r12, rcx jb loc_A1B62 loc_A1BFC: mov rdi, r15 call my_dirend mov rdi, [rbp+var_248] call _rmdir mov r13d, eax jmp short loc_A1C25 loc_A1C15: mov r13d, 1 jmp short loc_A1C25 loc_A1C1D: mov rdi, r15 call my_dirend loc_A1C25: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_A1C49 mov eax, r13d add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A1C49: call ___stack_chk_fail
long long my_rmtree(long long a1, long long a2) { long long v2; // rax long long v3; // r15 unsigned int v4; // eax long long v5; // r14 unsigned long long i; // r12 long long v7; // r13 _BYTE *v8; // r8 unsigned int v9; // eax unsigned int v10; // r13d char v12; // [rsp+0h] [rbp-250h] __int16 v13; // [rsp+1Eh] [rbp-232h] BYREF _BYTE v14[512]; // [rsp+20h] [rbp-230h] BYREF unsigned long long v15; // [rsp+220h] [rbp-30h] v15 = __readfsqword(0x28u); v13 = 47; v2 = my_dir(a1, 0x4000LL); if ( v2 ) { v3 = v2; v4 = *(_DWORD *)(v2 + 8); if ( v4 ) { v5 = 8LL; for ( i = 0LL; i < v4; ++i ) { v7 = *(_QWORD *)v3; v8 = *(_BYTE **)(*(_QWORD *)v3 + v5 - 8); if ( *v8 != 46 || v8[1] && (v8[1] != 46 || v8[2]) ) { strxnmov((unsigned int)v14, 512, a1, (unsigned int)&v13, (_DWORD)v8, 0, v12); if ( (*(_DWORD *)(*(_QWORD *)(v7 + v5) + 24LL) & 0xF000) == 0x4000 ) v9 = my_rmtree(v14, a2); else v9 = my_delete((long long)v14, a2); v10 = v9; if ( v9 ) { my_dirend(v3); return v10; } v4 = *(_DWORD *)(v3 + 8); } v5 += 16LL; } } my_dirend(v3); return (unsigned int)rmdir(a1); } else { return 1; } }
my_rmtree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV qword ptr [RBP + -0x240],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV word ptr [RBP + -0x232],0x2f MOV ESI,0x4000 MOV qword ptr [RBP + -0x248],RDI CALL 0x001a5df9 TEST RAX,RAX JZ 0x001a1c15 MOV R15,RAX MOV EAX,dword ptr [RAX + 0x8] TEST EAX,EAX JZ 0x001a1bfc MOV R14D,0x8 LEA RBX,[RBP + -0x230] XOR R12D,R12D LAB_001a1b62: MOV R13,qword ptr [R15] MOV R8,qword ptr [R13 + R14*0x1 + -0x8] CMP byte ptr [R8],0x2e JNZ 0x001a1b85 CMP byte ptr [R8 + 0x1],0x0 JZ 0x001a1bea CMP byte ptr [R8 + 0x1],0x2e JNZ 0x001a1b85 CMP byte ptr [R8 + 0x2],0x0 JZ 0x001a1bea LAB_001a1b85: MOV ESI,0x200 MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x248] LEA RCX,[RBP + -0x232] XOR R9D,R9D XOR EAX,EAX CALL 0x001ddf1c MOV RAX,qword ptr [R13 + R14*0x1] MOV EAX,dword ptr [RAX + 0x18] MOV ECX,0xf000 AND EAX,ECX MOV RDI,RBX CMP EAX,0x4000 JNZ 0x001a1bcc MOV RSI,qword ptr [RBP + -0x240] CALL 0x001a1af9 JMP 0x001a1bd8 LAB_001a1bcc: MOV RSI,qword ptr [RBP + -0x240] CALL 0x001a1a24 LAB_001a1bd8: MOV R13D,EAX TEST EAX,EAX JNZ 0x001a1c1d MOV EAX,dword ptr [R15 + 0x8] LEA RBX,[RBP + -0x230] LAB_001a1bea: INC R12 MOV ECX,EAX ADD R14,0x10 CMP R12,RCX JC 0x001a1b62 LAB_001a1bfc: MOV RDI,R15 CALL 0x001a5dc8 MOV RDI,qword ptr [RBP + -0x248] CALL 0x0012a380 MOV R13D,EAX JMP 0x001a1c25 LAB_001a1c15: MOV R13D,0x1 JMP 0x001a1c25 LAB_001a1c1d: MOV RDI,R15 CALL 0x001a5dc8 LAB_001a1c25: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001a1c49 MOV EAX,R13D ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a1c49: CALL 0x0012a270
int my_rmtree(char *param_1,int8 param_2) { long lVar1; char *pcVar2; uint uVar3; int iVar4; long *plVar5; ulong uVar6; long lVar7; long in_FS_OFFSET; int2 local_23a; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_23a = 0x2f; plVar5 = (long *)my_dir(param_1,0x4000); if (plVar5 == (long *)0x0) { iVar4 = 1; } else { uVar3 = *(uint *)(plVar5 + 1); if (uVar3 != 0) { lVar7 = 8; uVar6 = 0; do { lVar1 = *plVar5; pcVar2 = *(char **)(lVar1 + -8 + lVar7); if ((*pcVar2 != '.') || ((pcVar2[1] != '\0' && ((pcVar2[1] != '.' || (pcVar2[2] != '\0'))))) ) { strxnmov(local_238,0x200,param_1,&local_23a,pcVar2,0); if ((*(uint *)(*(long *)(lVar1 + lVar7) + 0x18) & 0xf000) == 0x4000) { iVar4 = my_rmtree(local_238,param_2); } else { iVar4 = my_delete(local_238,param_2); } if (iVar4 != 0) { my_dirend(plVar5); goto LAB_001a1c25; } uVar3 = *(uint *)(plVar5 + 1); } uVar6 = uVar6 + 1; lVar7 = lVar7 + 0x10; } while (uVar6 < uVar3); } my_dirend(plVar5); iVar4 = rmdir(param_1); } LAB_001a1c25: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
17,198
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> var_to_str<long>(long const&)
monkey531[P]llama/tests/test-backend-ops.cpp
static std::string var_to_str(const T & x) { return std::to_string(x); }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> var_to_str<long>(long const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rbx negq %rbx cmovsq %rsi, %rbx movl $0x1, %r12d cmpq $0xa, %rbx jb 0x1701b movl $0x4, %r12d movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B movq %rbx, %rcx cmpq $0x63, %rcx jbe 0x17012 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x17018 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x1701b movq %rcx, %rax mulq %rsi shrq $0xb, %rdx addl $0x4, %r12d cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x16fda addl $-0x3, %r12d jmp 0x1701b addl $-0x2, %r12d jmp 0x1701b decl %r12d shrq $0x3f, %r14 leal (%r14,%r12), %esi leaq 0x10(%r15), %rax movq %rax, (%r15) movq %r15, %rdi movl $0x2d, %edx callq 0xd6e0 addq (%r15), %r14 movq %r14, %rdi movl %r12d, %esi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x1b7c6
_ZL10var_to_strIlENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov r15, rdi mov rbx, rsi neg rbx cmovs rbx, rsi mov r12d, 1 cmp rbx, 0Ah jb short loc_1701B mov r12d, 4 mov rsi, 346DC5D63886594Bh mov rcx, rbx loc_16FDA: cmp rcx, 63h ; 'c' jbe short loc_17012 cmp rcx, 3E7h jbe short loc_17018 cmp rcx, 2710h jb short loc_1701B mov rax, rcx mul rsi shr rdx, 0Bh add r12d, 4 cmp rcx, offset loc_1869F mov rcx, rdx ja short loc_16FDA add r12d, 0FFFFFFFDh jmp short loc_1701B loc_17012: add r12d, 0FFFFFFFEh jmp short loc_1701B loc_17018: dec r12d loc_1701B: shr r14, 3Fh lea esi, [r14+r12] lea rax, [r15+10h] mov [r15], rax mov rdi, r15 mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r14, [r15] mov rdi, r14 mov esi, r12d mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
long long var_to_str<long>(_QWORD *a1, long long a2) { unsigned long long v2; // rbx unsigned int v3; // r12d unsigned long long v4; // rcx bool v5; // cc v2 = -a2; if ( a2 > 0 ) v2 = a2; v3 = 1; if ( v2 >= 0xA ) { v3 = 4; v4 = v2; while ( 1 ) { if ( v4 <= 0x63 ) { v3 -= 2; goto LABEL_12; } if ( v4 <= 0x3E7 ) break; if ( v4 < 0x2710 ) goto LABEL_12; v3 += 4; v5 = v4 <= (unsigned long long)&loc_1869F; v4 /= 0x2710uLL; if ( v5 ) { v3 -= 3; goto LABEL_12; } } --v3; } LABEL_12: *a1 = a1 + 2; std::string::_M_construct(a1, ((unsigned long long)a2 >> 63) + v3, 45LL); return std::__detail::__to_chars_10_impl<unsigned long>(*a1 + ((unsigned long long)a2 >> 63), v3, v2); }
var_to_str<long>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV R15,RDI MOV RBX,RSI NEG RBX CMOVS RBX,RSI MOV R12D,0x1 CMP RBX,0xa JC 0x0011701b MOV R12D,0x4 MOV RSI,0x346dc5d63886594b MOV RCX,RBX LAB_00116fda: CMP RCX,0x63 JBE 0x00117012 CMP RCX,0x3e7 JBE 0x00117018 CMP RCX,0x2710 JC 0x0011701b MOV RAX,RCX MUL RSI SHR RDX,0xb ADD R12D,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x00116fda ADD R12D,-0x3 JMP 0x0011701b LAB_00117012: ADD R12D,-0x2 JMP 0x0011701b LAB_00117018: DEC R12D LAB_0011701b: SHR R14,0x3f LEA ESI,[R14 + R12*0x1] LEA RAX,[R15 + 0x10] MOV qword ptr [R15],RAX MOV RDI,R15 MOV EDX,0x2d CALL 0x0010d6e0 ADD R14,qword ptr [R15] MOV RDI,R14 MOV ESI,R12D MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0011b7c6
/* std::__cxx11::string var_to_str<long>(long const&) */ void var_to_str<long>(long *param_1) { bool bVar1; uint uVar2; ulong uVar3; ulong uVar4; ulong in_RSI; uint uVar5; uVar4 = -in_RSI; if (0 < (long)in_RSI) { uVar4 = in_RSI; } uVar5 = 1; if (9 < uVar4) { uVar3 = uVar4; uVar2 = 4; do { uVar5 = uVar2; if (uVar3 < 100) { uVar5 = uVar5 - 2; goto LAB_0011701b; } if (uVar3 < 1000) { uVar5 = uVar5 - 1; goto LAB_0011701b; } if (uVar3 < 10000) goto LAB_0011701b; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; uVar2 = uVar5 + 4; } while (bVar1); uVar5 = uVar5 + 1; } LAB_0011701b: *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct((ulong)param_1,(char)uVar5 - (char)((long)in_RSI >> 0x3f)); std::__detail::__to_chars_10_impl<unsigned_long> ((char *)(*param_1 - ((long)in_RSI >> 0x3f)),uVar5,uVar4); return; }
17,199
getopt_double_limit_value
eloqsql/mysys/my_getopt.c
double getopt_double_limit_value(double num, const struct my_option *optp, my_bool *fix) { my_bool adjusted= FALSE; double old= num; double min, max; DBUG_ENTER("getopt_double_limit_value"); max= getopt_ulonglong2double(optp->max_value); min= getopt_ulonglong2double(optp->min_value); if (max && num > max) { num= max; adjusted= TRUE; } if (num < min) { num= min; adjusted= TRUE; } if (fix) *fix= adjusted; else if (adjusted) my_getopt_error_reporter(WARNING_LEVEL, "option '%s': value %g adjusted to %g", optp->name, old, num); DBUG_RETURN(num); }
O0
c
getopt_double_limit_value: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movsd %xmm0, -0x8(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb $0x0, -0x19(%rbp) movsd -0x8(%rbp), %xmm0 movsd %xmm0, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x50(%rax), %rdi callq 0x24ac0 movsd %xmm0, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rdi callq 0x24ac0 movsd %xmm0, -0x30(%rbp) movsd -0x38(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0x26dc9 jp 0x26dc9 jmp 0x26de3 movsd -0x8(%rbp), %xmm0 ucomisd -0x38(%rbp), %xmm0 jbe 0x26de3 movsd -0x38(%rbp), %xmm0 movsd %xmm0, -0x8(%rbp) movb $0x1, -0x19(%rbp) movsd -0x8(%rbp), %xmm1 movsd -0x30(%rbp), %xmm0 ucomisd %xmm1, %xmm0 jbe 0x26e01 movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x8(%rbp) movb $0x1, -0x19(%rbp) cmpq $0x0, -0x18(%rbp) je 0x26e13 movb -0x19(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, (%rax) jmp 0x26e46 cmpb $0x0, -0x19(%rbp) je 0x26e44 leaq 0x1ae430(%rip), %rax # 0x1d5250 movq (%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rdx movsd -0x28(%rbp), %xmm0 movsd -0x8(%rbp), %xmm1 movl $0x1, %edi leaq 0x586dc(%rip), %rsi # 0x7f51c movb $0x2, %al callq *%rcx jmp 0x26e46 jmp 0x26e48 movsd -0x8(%rbp), %xmm0 movsd %xmm0, -0x40(%rbp) movsd -0x40(%rbp), %xmm0 addq $0x40, %rsp popq %rbp retq nopl (%rax)
getopt_double_limit_value: push rbp mov rbp, rsp sub rsp, 40h movsd [rbp+var_8], xmm0 mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], 0 movsd xmm0, [rbp+var_8] movsd [rbp+var_28], xmm0 mov rax, [rbp+var_10] mov rdi, [rax+50h] call getopt_ulonglong2double movsd [rbp+var_38], xmm0 mov rax, [rbp+var_10] mov rdi, [rax+48h] call getopt_ulonglong2double movsd [rbp+var_30], xmm0 movsd xmm0, [rbp+var_38] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_26DC9 jp short loc_26DC9 jmp short loc_26DE3 loc_26DC9: movsd xmm0, [rbp+var_8] ucomisd xmm0, [rbp+var_38] jbe short loc_26DE3 movsd xmm0, [rbp+var_38] movsd [rbp+var_8], xmm0 mov [rbp+var_19], 1 loc_26DE3: movsd xmm1, [rbp+var_8] movsd xmm0, [rbp+var_30] ucomisd xmm0, xmm1 jbe short loc_26E01 movsd xmm0, [rbp+var_30] movsd [rbp+var_8], xmm0 mov [rbp+var_19], 1 loc_26E01: cmp [rbp+var_18], 0 jz short loc_26E13 mov cl, [rbp+var_19] mov rax, [rbp+var_18] mov [rax], cl jmp short loc_26E46 loc_26E13: cmp [rbp+var_19], 0 jz short loc_26E44 lea rax, my_getopt_error_reporter mov rcx, [rax] mov rax, [rbp+var_10] mov rdx, [rax] movsd xmm0, [rbp+var_28] movsd xmm1, [rbp+var_8] mov edi, 1 lea rsi, aOptionSValueGA; "option '%s': value %g adjusted to %g" mov al, 2 call rcx loc_26E44: jmp short $+2 loc_26E46: jmp short $+2 loc_26E48: movsd xmm0, [rbp+var_8] movsd [rbp+var_40], xmm0 movsd xmm0, [rbp+var_40] add rsp, 40h pop rbp retn
double getopt_double_limit_value(_QWORD *a1, char *a2, double a3) { double v4; // [rsp+8h] [rbp-38h] double v5; // [rsp+10h] [rbp-30h] char v7; // [rsp+27h] [rbp-19h] double v8; // [rsp+38h] [rbp-8h] v8 = a3; v7 = 0; v4 = getopt_ulonglong2double(a1[10]); v5 = getopt_ulonglong2double(a1[9]); if ( v4 != 0.0 && v8 > v4 ) { v8 = v4; v7 = 1; } if ( v5 > v8 ) { v8 = v5; v7 = 1; } if ( a2 ) { *a2 = v7; } else if ( v7 ) { my_getopt_error_reporter(1, (long long)"option '%s': value %g adjusted to %g", *a1, a3, v8); } return v8; }
getopt_double_limit_value: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOVSD qword ptr [RBP + -0x8],XMM0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],0x0 MOVSD XMM0,qword ptr [RBP + -0x8] MOVSD qword ptr [RBP + -0x28],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x50] CALL 0x00124ac0 MOVSD qword ptr [RBP + -0x38],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x48] CALL 0x00124ac0 MOVSD qword ptr [RBP + -0x30],XMM0 MOVSD XMM0,qword ptr [RBP + -0x38] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x00126dc9 JP 0x00126dc9 JMP 0x00126de3 LAB_00126dc9: MOVSD XMM0,qword ptr [RBP + -0x8] UCOMISD XMM0,qword ptr [RBP + -0x38] JBE 0x00126de3 MOVSD XMM0,qword ptr [RBP + -0x38] MOVSD qword ptr [RBP + -0x8],XMM0 MOV byte ptr [RBP + -0x19],0x1 LAB_00126de3: MOVSD XMM1,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RBP + -0x30] UCOMISD XMM0,XMM1 JBE 0x00126e01 MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD qword ptr [RBP + -0x8],XMM0 MOV byte ptr [RBP + -0x19],0x1 LAB_00126e01: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00126e13 MOV CL,byte ptr [RBP + -0x19] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL JMP 0x00126e46 LAB_00126e13: CMP byte ptr [RBP + -0x19],0x0 JZ 0x00126e44 LEA RAX,[0x2d5250] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX] MOVSD XMM0,qword ptr [RBP + -0x28] MOVSD XMM1,qword ptr [RBP + -0x8] MOV EDI,0x1 LEA RSI,[0x17f51c] MOV AL,0x2 CALL RCX LAB_00126e44: JMP 0x00126e46 LAB_00126e46: JMP 0x00126e48 LAB_00126e48: MOVSD XMM0,qword ptr [RBP + -0x8] MOVSD qword ptr [RBP + -0x40],XMM0 MOVSD XMM0,qword ptr [RBP + -0x40] ADD RSP,0x40 POP RBP RET
double getopt_double_limit_value(double param_1,int8 *param_2,char *param_3) { double dVar1; double dVar2; char local_21; double local_10; local_21 = '\0'; dVar1 = (double)getopt_ulonglong2double(param_2[10]); dVar2 = (double)getopt_ulonglong2double(param_2[9]); if (((dVar1 != 0.0) || (local_10 = param_1, NAN(dVar1))) && (local_10 = param_1, dVar1 < param_1)) { local_21 = '\x01'; local_10 = dVar1; } if (local_10 < dVar2) { local_21 = '\x01'; local_10 = dVar2; } if (param_3 == (char *)0x0) { if (local_21 != '\0') { (*(code *)my_getopt_error_reporter) (param_1,local_10,1,"option \'%s\': value %g adjusted to %g",*param_2); } } else { *param_3 = local_21; } return local_10; }