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
63,200
YogaTest_max_content_width_Test::TestBody()
yoga-mod/tests/generated/YGIntrinsicSizeTest.cpp
TEST(YogaTest, max_content_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidthMaxContent(root); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child1, 100); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child2, 25); YGNodeStyleSetHeight(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); ASSERT_FLOAT_EQ(175, YGNodeLayoutGetWidth(root)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child1)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child1)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child1)); ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child2)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child2)); ASSERT_FLOAT_EQ(25, YGNodeLayoutGetWidth(root_child2)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child2)); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); ASSERT_FLOAT_EQ(175, YGNodeLayoutGetWidth(root)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root)); ASSERT_FLOAT_EQ(125, YGNodeLayoutGetLeft(root_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); ASSERT_FLOAT_EQ(25, YGNodeLayoutGetLeft(root_child1)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child1)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child1)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child2)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child2)); ASSERT_FLOAT_EQ(25, YGNodeLayoutGetWidth(root_child2)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child2)); YGNodeFreeRecursive(root); YGConfigFree(config); }
O0
cpp
YogaTest_max_content_width_Test::TestBody(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x7047d0 movq -0x10(%rbp), %rax leaq 0x387f9c(%rip), %rcx # 0x869cf0 addq $0x10, %rcx movq %rcx, (%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN31YogaTest_max_content_width_TestC2Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call _ZN7testing4TestC2Ev; testing::Test::Test(void) mov rax, [rbp+var_10] lea rcx, _ZTV31YogaTest_max_content_width_Test; `vtable for'YogaTest_max_content_width_Test add rcx, 10h mov [rax], rcx add rsp, 10h pop rbp retn
void YogaTest_max_content_width_Test::YogaTest_max_content_width_Test(YogaTest_max_content_width_Test *this) { testing::Test::Test(this); *(_QWORD *)this = (char *)&`vtable for'YogaTest_max_content_width_Test + 16; }
~YogaTest_flex_direction_row_reverse_border_end_Test: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00804850 ADD RSP,0x10 POP RBP RET
/* YogaTest_flex_direction_row_reverse_border_end_Test::~YogaTest_flex_direction_row_reverse_border_end_Test() */ void __thiscall YogaTest_flex_direction_row_reverse_border_end_Test:: ~YogaTest_flex_direction_row_reverse_border_end_Test (YogaTest_flex_direction_row_reverse_border_end_Test *this) { testing::Test::~Test((Test *)this); return; }
63,201
mi_dispose
eloqsql/storage/myisam/mi_page.c
int _mi_dispose(register MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos, int level) { my_off_t old_link; uchar buff[8]; DBUG_ENTER("_mi_dispose"); DBUG_PRINT("enter",("pos: %ld", (long) pos)); old_link= info->s->state.key_del[keyinfo->block_size_index]; info->s->state.key_del[keyinfo->block_size_index]= pos; mi_sizestore(buff,old_link); info->s->state.changed|= STATE_NOT_SORTED_PAGES; DBUG_RETURN(key_cache_write(info->s->key_cache, info->s->kfile, &info->s->dirty_part_map, pos , level, buff, sizeof(buff), (uint) keyinfo->block_length, (int) (info->lock_type != F_UNLCK))); }
O3
c
mi_dispose: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp movl %ecx, %r8d movq %rdx, %rcx movq %fs:0x28, %rax movq %rax, -0x10(%rbp) movq (%rdi), %rax movq 0xa0(%rax), %rdx movzwl 0x18(%rsi), %r9d movq (%rdx,%r9,8), %rax movq %rcx, (%rdx,%r9,8) movq %rax, %rdx shrq $0x20, %rdx leaq -0x18(%rbp), %r9 movb %dl, 0x3(%r9) movq %rax, %rdx shrq $0x28, %rdx movb %dl, 0x2(%r9) movq %rax, %rdx shrq $0x30, %rdx movb %dl, 0x1(%r9) movq %rax, %rdx shrq $0x38, %rdx movb %dl, (%r9) movb %al, 0x7(%r9) movb %ah, -0x12(%rbp) movl %eax, %edx shrl $0x10, %edx movb %dl, 0x5(%r9) shrl $0x18, %eax movb %al, 0x4(%r9) movq (%rdi), %rax orb $0x20, 0xf0(%rax) movq (%rdi), %rdx movq 0x278(%rdx), %rax movl 0x350(%rdx), %r10d addq $0x280, %rdx # imm = 0x280 movzwl 0xe(%rsi), %r11d xorl %ebx, %ebx cmpl $0x2, 0x1f4(%rdi) setne %bl subq $0x8, %rsp movq %rax, %rdi movl %r10d, %esi pushq %rbx pushq %r11 pushq $0x8 callq 0x97ffe addq $0x20, %rsp movq %fs:0x28, %rcx cmpq -0x10(%rbp), %rcx jne 0x83861 addq $0x18, %rsp popq %rbx popq %rbp retq callq 0x29260
_mi_dispose: push rbp mov rbp, rsp push rbx sub rsp, 18h mov r8d, ecx mov rcx, rdx mov rax, fs:28h mov [rbp+var_10], rax mov rax, [rdi] mov rdx, [rax+0A0h] movzx r9d, word ptr [rsi+18h] mov rax, [rdx+r9*8] mov [rdx+r9*8], rcx mov rdx, rax shr rdx, 20h lea r9, [rbp+var_18] mov [r9+3], dl mov rdx, rax shr rdx, 28h mov [r9+2], dl mov rdx, rax shr rdx, 30h mov [r9+1], dl mov rdx, rax shr rdx, 38h mov [r9], dl mov [r9+7], al mov [rbp+var_12], ah mov edx, eax shr edx, 10h mov [r9+5], dl shr eax, 18h mov [r9+4], al mov rax, [rdi] or byte ptr [rax+0F0h], 20h mov rdx, [rdi] mov rax, [rdx+278h] mov r10d, [rdx+350h] add rdx, 280h movzx r11d, word ptr [rsi+0Eh] xor ebx, ebx cmp dword ptr [rdi+1F4h], 2 setnz bl sub rsp, 8 mov rdi, rax mov esi, r10d push rbx push r11 push 8 call key_cache_write add rsp, 20h mov rcx, fs:28h cmp rcx, [rbp+var_10] jnz short loc_83861 add rsp, 18h pop rbx pop rbp retn loc_83861: call ___stack_chk_fail
long long mi_dispose(_DWORD *a1, long long a2, long long a3, unsigned int a4) { long long v4; // r8 long long v6; // rdx long long v7; // r9 long long v8; // rax _BYTE v10[8]; // [rsp+8h] [rbp-18h] BYREF unsigned long long v11; // [rsp+10h] [rbp-10h] v4 = a4; v11 = __readfsqword(0x28u); v6 = *(_QWORD *)(*(_QWORD *)a1 + 160LL); v7 = *(unsigned __int16 *)(a2 + 24); v8 = *(_QWORD *)(v6 + 8 * v7); *(_QWORD *)(v6 + 8 * v7) = a3; v10[3] = BYTE4(v8); v10[2] = BYTE5(v8); v10[1] = BYTE6(v8); v10[0] = HIBYTE(v8); v10[6] = BYTE1(v8); v10[7] = v8; v10[5] = BYTE2(v8); v10[4] = BYTE3(v8); *(_BYTE *)(*(_QWORD *)a1 + 240LL) |= 0x20u; return key_cache_write( *(_QWORD *)(*(_QWORD *)a1 + 632LL), *(unsigned int *)(*(_QWORD *)a1 + 848LL), *(_QWORD *)a1 + 640LL, a3, v4, v10, 8LL, *(unsigned __int16 *)(a2 + 14), a1[125] != 2); }
_mi_dispose: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV R8D,ECX MOV RCX,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RAX + 0xa0] MOVZX R9D,word ptr [RSI + 0x18] MOV RAX,qword ptr [RDX + R9*0x8] MOV qword ptr [RDX + R9*0x8],RCX MOV RDX,RAX SHR RDX,0x20 LEA R9,[RBP + -0x18] MOV byte ptr [R9 + 0x3],DL MOV RDX,RAX SHR RDX,0x28 MOV byte ptr [R9 + 0x2],DL MOV RDX,RAX SHR RDX,0x30 MOV byte ptr [R9 + 0x1],DL MOV RDX,RAX SHR RDX,0x38 MOV byte ptr [R9],DL MOV byte ptr [R9 + 0x7],AL MOV byte ptr [RBP + -0x12],AH MOV EDX,EAX SHR EDX,0x10 MOV byte ptr [R9 + 0x5],DL SHR EAX,0x18 MOV byte ptr [R9 + 0x4],AL MOV RAX,qword ptr [RDI] OR byte ptr [RAX + 0xf0],0x20 MOV RDX,qword ptr [RDI] MOV RAX,qword ptr [RDX + 0x278] MOV R10D,dword ptr [RDX + 0x350] ADD RDX,0x280 MOVZX R11D,word ptr [RSI + 0xe] XOR EBX,EBX CMP dword ptr [RDI + 0x1f4],0x2 SETNZ BL SUB RSP,0x8 MOV RDI,RAX MOV ESI,R10D PUSH RBX PUSH R11 PUSH 0x8 CALL 0x00197ffe ADD RSP,0x20 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x10] JNZ 0x00183861 ADD RSP,0x18 POP RBX POP RBP RET LAB_00183861: CALL 0x00129260
void _mi_dispose(long *param_1,long param_2,int8 param_3,int4 param_4) { int8 uVar1; long lVar2; long in_FS_OFFSET; int1 local_20; int1 local_1f; int1 local_1e; int1 local_1d; int1 local_1c; int1 local_1b; int1 local_1a; int1 local_19; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = *(int8 *)(*(long *)(*param_1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8); *(int8 *)(*(long *)(*param_1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8) = param_3; local_1d = (int1)((ulong)uVar1 >> 0x20); local_1e = (int1)((ulong)uVar1 >> 0x28); local_1f = (int1)((ulong)uVar1 >> 0x30); local_20 = (int1)((ulong)uVar1 >> 0x38); local_19 = (int1)uVar1; local_1a = (int1)((ulong)uVar1 >> 8); local_1b = (int1)((ulong)uVar1 >> 0x10); local_1c = (int1)((ulong)uVar1 >> 0x18); *(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 0x20; lVar2 = *param_1; key_cache_write(*(int8 *)(lVar2 + 0x278),*(int4 *)(lVar2 + 0x350),lVar2 + 0x280, param_3,param_4,&local_20,8,*(int2 *)(param_2 + 0xe), *(int *)((long)param_1 + 500) != 2); if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
63,202
minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/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 0x9ba74 movq %rdi, %rbx leaq 0x8(%rsp), %rdi callq 0x9bbb8 movl 0x30(%r14), %eax cmpq $0x4, %rax ja 0x9bac4 leaq 0x35e7b(%rip), %rcx # 0xd17bc 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 0x60b38 movb $0x0, (%r15) movq %r12, 0x8(%r15) jmp 0x9b9dc leaq 0x8(%rsp), %rdi callq 0x64218 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 0x6a26a movq %r14, %rdi movl $0x1, %esi callq 0x60b38 jmp 0x9b9f8 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x9bd32 leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x60b38 movq %r14, %rdi callq 0x60bd8 leaq 0x40(%rsp), %rdi callq 0x56124 leaq 0x30(%rsp), %rdi callq 0x56124 leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0x56124 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0x9ba65 movq 0x6f548(%rip), %rax # 0x10af88 cmpb $0x0, (%rax) je 0x9ba50 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9ba5a movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9ba65 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 0x1d520 movq %rax, %r14 leaq 0x394c8(%rip), %rsi # 0xd4f50 movq %rax, %rdi callq 0x1d330 movq 0x6f521(%rip), %rsi # 0x10afb8 movq 0x6f4d2(%rip), %rdx # 0x10af70 movq %r14, %rdi callq 0x1d890 movl $0x10, %edi callq 0x1d520 movq %rax, %r14 leaq 0x394af(%rip), %rsi # 0xd4f69 movq %rax, %rdi callq 0x1d330 jmp 0x9bae0 movl $0x10, %edi callq 0x1d520 movq %rax, %r14 leaq 0x394d8(%rip), %rsi # 0xd4fb0 movq %rax, %rdi callq 0x1d330 movq 0x6f4d1(%rip), %rsi # 0x10afb8 movq 0x6f482(%rip), %rdx # 0x10af70 movq %r14, %rdi callq 0x1d890 jmp 0x9bafa jmp 0x9bb14 movq %rax, %rbx movq %r14, %rdi callq 0x1dc90 jmp 0x9bb17 movq %rax, %rbx movq %r14, %rdi callq 0x1dc90 jmp 0x9bb21 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5a540 movq %rbx, %rdi callq 0x1d8e0 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_9BA74 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_9B948; jumptable 000000000009B948 default case lea rcx, jpt_9B948 movsxd rax, ds:(jpt_9B948 - 0D17BCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9B94A: xorps xmm0, xmm0; jumptable 000000000009B948 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_9B9DC loc_9B9AB: lea rdi, [rsp+78h+var_70]; jumptable 000000000009B948 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_9B9DC: 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_9B9F8 loc_9B9EB: lea rsi, [rsp+78h+var_70]; jumptable 000000000009B948 case 1 mov rdi, rbx call _ZNK5minja5ValuengEv; minja::Value::operator-(void) loc_9B9F8: 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() lea rdi, [rsp+78h+var_38] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+78h+var_58] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_9BA65 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_9BA50 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9BA5A loc_9BA50: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9BA5A: cmp eax, 1 jnz short loc_9BA65 mov rax, [rdi] call qword ptr [rax+18h] loc_9BA65: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn loc_9BA74: 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:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_9BAA6: mov edi, 10h; jumptable 000000000009B948 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_9BAE0 def_9B948: mov edi, 10h; jumptable 000000000009B948 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_9BAE0: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_9BAFA jmp short loc_9BB14 loc_9BAFA: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_9BB17 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_9BB21 loc_9BB14: mov rbx, rax loc_9BB17: lea rdi, [rsp+78h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_9BB21: 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 0x0019ba74 MOV RBX,RDI LEA RDI,[RSP + 0x8] CALL 0x0019bbb8 MOV EAX,dword ptr [R14 + 0x30] CMP RAX,0x4 JA 0x0019bac4 LEA RCX,[0x1d17bc] 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 0x00160b38 MOV byte ptr [R15],0x0 MOV qword ptr [R15 + 0x8],R12 JMP 0x0019b9dc caseD_2: LEA RDI,[RSP + 0x8] CALL 0x00164218 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 0x0016a26a LAB_0019b9dc: MOV RDI,R14 MOV ESI,0x1 CALL 0x00160b38 JMP 0x0019b9f8 caseD_1: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0019bd32 LAB_0019b9f8: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x00160b38 MOV RDI,R14 CALL 0x00160bd8 LEA RDI,[RSP + 0x40] CALL 0x00156124 LEA RDI,[RSP + 0x30] CALL 0x00156124 LEA R14,[RSP + 0x20] MOV RDI,R14 CALL 0x00156124 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x0019ba65 MOV RAX,qword ptr [0x0020af88] CMP byte ptr [RAX],0x0 JZ 0x0019ba50 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019ba5a LAB_0019ba50: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019ba5a: CMP EAX,0x1 JNZ 0x0019ba65 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019ba65: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET LAB_0019ba74: MOV EDI,0x10 CALL 0x0011d520 MOV R14,RAX LAB_0019ba81: LEA RSI,[0x1d4f50] MOV RDI,RAX CALL 0x0011d330 LAB_0019ba90: MOV RSI,qword ptr [0x0020afb8] MOV RDX,qword ptr [0x0020af70] MOV RDI,R14 CALL 0x0011d890 caseD_3: MOV EDI,0x10 CALL 0x0011d520 MOV R14,RAX LAB_0019bab3: LEA RSI,[0x1d4f69] MOV RDI,RAX CALL 0x0011d330 LAB_0019bac2: JMP 0x0019bae0 default: MOV EDI,0x10 CALL 0x0011d520 MOV R14,RAX LAB_0019bad1: LEA RSI,[0x1d4fb0] MOV RDI,RAX CALL 0x0011d330 LAB_0019bae0: MOV RSI,qword ptr [0x0020afb8] MOV RDX,qword ptr [0x0020af70] MOV RDI,R14 CALL 0x0011d890
/* 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; int8 uVar2; int8 uVar3; int8 uVar4; byte bVar5; int iVar6; runtime_error *prVar7; Expression local_70 [8]; long *local_68; int8 local_60; int8 uStack_58; int8 local_50; int8 uStack_48; int8 local_40; int8 uStack_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 0019ba81 to 0019ba8f has its CatchHandler @ 0019bb07 */ std::runtime_error::runtime_error(prVar7,"UnaryOpExpr.expr is null"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar7,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70); } Expression::evaluate(local_70,*(shared_ptr **)(param_1 + 0x20)); uVar4 = uStack_38; uVar3 = uStack_48; uVar2 = uStack_58; switch(*(int4 *)(param_1 + 0x30)) { case 0: *(int8 *)this = 0; *(int8 *)(this + 8) = 0; uStack_58 = 0; *(int8 *)(this + 0x10) = local_60; *(int8 *)(this + 0x18) = uVar2; local_60 = 0; uStack_48 = 0; *(int8 *)(this + 0x20) = local_50; *(int8 *)(this + 0x28) = uVar3; local_50 = 0; uStack_38 = 0; *(int8 *)(this + 0x30) = local_40; *(int8 *)(this + 0x38) = uVar4; 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 0019b9eb to 0019b9f7 has its CatchHandler @ 0019bb14 */ Value::operator-((Value *)this); goto LAB_0019b9f8; case 2: /* try { // try from 0019b9ab to 0019b9b4 has its CatchHandler @ 0019baf8 */ 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 0019bab3 to 0019bac1 has its CatchHandler @ 0019bafa */ std::runtime_error::runtime_error (prVar7,"Expansion operator is only supported in function calls and collections"); goto LAB_0019bae0; default: prVar7 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019bad1 to 0019badf has its CatchHandler @ 0019baf6 */ std::runtime_error::runtime_error(prVar7,"Unknown unary operator"); LAB_0019bae0: /* try { // try from 0019bae0 to 0019baf5 has its CatchHandler @ 0019bb14 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar7,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70); } 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_0019b9f8: 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); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_38); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_58); if (local_68 != (long *)0x0) { if (*PTR___libc_single_threaded_0020af88 == '\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; }
63,203
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>, int, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhoodBuilder.cpp
inline void NeighborhoodBuilder::addFace(ConstIndexArray fverts, Index faceIndex, int startingEdge) { int nverts = fverts.size(); _faceVertCounts.push_back(nverts); for (int vert = 0; vert < nverts; ++vert) { LocalIndex index = (vert + startingEdge) % nverts; _faceVerts.push_back(mapToLocalIndex(fverts[index])); } _faces.push_back(faceIndex); }
O0
cpp
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>, int, int): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rsi, -0x10(%rbp) movl %edx, -0x8(%rbp) movq %rdi, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl %r8d, -0x20(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x10(%rbp), %rdi callq 0xcc250 movq -0x38(%rbp), %rdi movl %eax, -0x24(%rbp) leaq -0x24(%rbp), %rsi callq 0xc4210 movl $0x0, -0x28(%rbp) movl -0x28(%rbp), %eax cmpl -0x24(%rbp), %eax jge 0x1ca32d movl -0x28(%rbp), %eax addl -0x20(%rbp), %eax cltd idivl -0x24(%rbp) movq -0x38(%rbp), %rax movw %dx, %cx movw %cx, -0x2a(%rbp) addq $0x30, %rax movq %rax, -0x40(%rbp) movzwl -0x2a(%rbp), %esi leaq -0x10(%rbp), %rdi callq 0xcabf0 movq -0x38(%rbp), %rdi movl (%rax), %esi callq 0xc6820 movq -0x40(%rbp), %rdi movzwl %ax, %eax movl %eax, -0x30(%rbp) leaq -0x30(%rbp), %rsi callq 0xc5900 movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x1ca2d2 movq -0x38(%rbp), %rdi addq $0x18, %rdi leaq -0x1c(%rbp), %rsi callq 0xc4210 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder7addFaceENS0_3Vtr10ConstArrayIiEEii: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rsi mov [rbp+var_8], edx mov [rbp+var_18], rdi mov [rbp+var_1C], ecx mov [rbp+var_20], r8d mov rax, [rbp+var_18] mov [rbp+var_38], rax lea rdi, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void) mov rdi, [rbp+var_38] mov [rbp+var_24], eax lea rsi, [rbp+var_24] call __ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) mov [rbp+var_28], 0 loc_1CA2D2: mov eax, [rbp+var_28] cmp eax, [rbp+var_24] jge short loc_1CA32D mov eax, [rbp+var_28] add eax, [rbp+var_20] cdq idiv [rbp+var_24] mov rax, [rbp+var_38] mov cx, dx mov [rbp+var_2A], cx add rax, 30h ; '0' mov [rbp+var_40], rax movzx esi, [rbp+var_2A] lea rdi, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int) mov rdi, [rbp+var_38]; this mov esi, [rax]; int call __ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder15mapToLocalIndexEi; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::mapToLocalIndex(int) mov rdi, [rbp+var_40] movzx eax, ax mov [rbp+var_30], eax lea rsi, [rbp+var_30] call __ZNSt6vectorIiSaIiEE9push_backEOi; std::vector<int>::push_back(int &&) mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short loc_1CA2D2 loc_1CA32D: mov rdi, [rbp+var_38] add rdi, 18h lea rsi, [rbp+var_1C] call __ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) add rsp, 40h pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace( OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder *a1, long long a2, int a3, int a4, int a5) { int *v5; // rax int v7; // [rsp+10h] [rbp-30h] BYREF unsigned __int16 v8; // [rsp+16h] [rbp-2Ah] int i; // [rsp+18h] [rbp-28h] int v10; // [rsp+1Ch] [rbp-24h] BYREF int v11; // [rsp+20h] [rbp-20h] int v12; // [rsp+24h] [rbp-1Ch] BYREF OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder *v13; // [rsp+28h] [rbp-18h] long long v14; // [rsp+30h] [rbp-10h] BYREF int v15; // [rsp+38h] [rbp-8h] v14 = a2; v15 = a3; v13 = a1; v12 = a4; v11 = a5; v10 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v14); std::vector<int>::push_back(a1, &v10); for ( i = 0; i < v10; ++i ) { v8 = (v11 + i) % v10; v5 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v14, v8); v7 = (unsigned __int16)OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::mapToLocalIndex(a1, *v5); std::vector<int>::push_back((char *)a1 + 48, &v7); } return std::vector<int>::push_back((char *)a1 + 24, &v12); }
63,204
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>, int, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhoodBuilder.cpp
inline void NeighborhoodBuilder::addFace(ConstIndexArray fverts, Index faceIndex, int startingEdge) { int nverts = fverts.size(); _faceVertCounts.push_back(nverts); for (int vert = 0; vert < nverts; ++vert) { LocalIndex index = (vert + startingEdge) % nverts; _faceVerts.push_back(mapToLocalIndex(fverts[index])); } _faces.push_back(faceIndex); }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %r14d movq %rsi, %r15 movq %rdi, %rbx movl %ecx, 0xc(%rsp) movl %edx, 0x4(%rsp) movq 0x8(%rdi), %rsi cmpq 0x10(%rdi), %rsi je 0xa58f3 movl %edx, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0xa5900 leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x38ba0 movl 0x4(%rsp), %ecx testl %ecx, %ecx jle 0xa59e3 leaq 0x30(%rbx), %r12 leaq 0x48(%rbx), %rax movq %rax, 0x10(%rsp) xorl %r13d, %r13d movl $0xffff, %ebp # imm = 0xFFFF leal (%r14,%r13), %eax cltd idivl %ecx andl %ebp, %edx movl (%r15,%rdx,4), %eax movl %eax, 0x8(%rsp) movq 0x48(%rbx), %rcx movq 0x50(%rbx), %rsi movl %esi, %edx subl %ecx, %edx shrl $0x2, %edx andl %ebp, %edx setne %r8b je 0xa5976 xorl %edi, %edi cmpl %eax, (%rcx) je 0xa5971 movl %edx, %r8d decl %edx xorl %r9d, %r9d cmpq %r9, %rdx je 0xa5976 leaq 0x1(%r9), %rdi cmpl %eax, 0x4(%rcx,%r9,4) movq %rdi, %r9 jne 0xa5957 cmpq %r8, %rdi setb %r8b testb %r8b, %r8b jne 0xa59a9 cmpq 0x58(%rbx), %rsi je 0xa5988 movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x50(%rbx) jmp 0xa5997 movq 0x10(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x38ba0 movq 0x50(%rbx), %rdi subq 0x48(%rbx), %rdi shrq $0x2, %rdi addl $0xffff, %edi # imm = 0xFFFF movzwl %di, %eax movl %eax, 0x8(%rsp) movq 0x38(%rbx), %rsi cmpq 0x40(%rbx), %rsi je 0xa59c6 movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x38(%rbx) jmp 0xa59d3 movq %r12, %rdi leaq 0x8(%rsp), %rdx callq 0x3b550 incl %r13d movl 0x4(%rsp), %ecx cmpl %ecx, %r13d jl 0xa5921 movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0xa59fd movl 0xc(%rsp), %eax movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x20(%rbx) jmp 0xa5a0e addq $0x18, %rbx leaq 0xc(%rsp), %rdx movq %rbx, %rdi callq 0x38ba0 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder7addFaceENS0_3Vtr10ConstArrayIiEEii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14d, r8d mov r15, rsi mov rbx, rdi mov [rsp+48h+var_3C], ecx mov [rsp+48h+var_44], edx mov rsi, [rdi+8] cmp rsi, [rdi+10h] jz short loc_A58F3 mov [rsi], edx add rsi, 4 mov [rbx+8], rsi jmp short loc_A5900 loc_A58F3: lea rdx, [rsp+48h+var_44] mov rdi, rbx call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&) loc_A5900: mov ecx, [rsp+48h+var_44] test ecx, ecx jle loc_A59E3 lea r12, [rbx+30h] lea rax, [rbx+48h] mov [rsp+48h+var_38], rax xor r13d, r13d mov ebp, 0FFFFh loc_A5921: lea eax, [r14+r13] cdq idiv ecx and edx, ebp mov eax, [r15+rdx*4] mov [rsp+48h+var_40], eax mov rcx, [rbx+48h] mov rsi, [rbx+50h] mov edx, esi sub edx, ecx shr edx, 2 and edx, ebp setnz r8b jz short loc_A5976 xor edi, edi cmp [rcx], eax jz short loc_A5971 mov r8d, edx dec edx xor r9d, r9d loc_A5957: cmp rdx, r9 jz short loc_A5976 lea rdi, [r9+1] cmp [rcx+r9*4+4], eax mov r9, rdi jnz short loc_A5957 cmp rdi, r8 setb r8b loc_A5971: test r8b, r8b jnz short loc_A59A9 loc_A5976: cmp rsi, [rbx+58h] jz short loc_A5988 mov [rsi], eax add rsi, 4 mov [rbx+50h], rsi jmp short loc_A5997 loc_A5988: mov rdi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_40] call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&) loc_A5997: mov rdi, [rbx+50h] sub rdi, [rbx+48h] shr rdi, 2 add edi, 0FFFFh loc_A59A9: movzx eax, di mov [rsp+48h+var_40], eax mov rsi, [rbx+38h] cmp rsi, [rbx+40h] jz short loc_A59C6 mov [rsi], eax add rsi, 4 mov [rbx+38h], rsi jmp short loc_A59D3 loc_A59C6: mov rdi, r12 lea rdx, [rsp+48h+var_40] call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&) loc_A59D3: inc r13d mov ecx, [rsp+48h+var_44] cmp r13d, ecx jl loc_A5921 loc_A59E3: mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_A59FD mov eax, [rsp+48h+var_3C] mov [rsi], eax add rsi, 4 mov [rbx+20h], rsi jmp short loc_A5A0E loc_A59FD: add rbx, 18h lea rdx, [rsp+48h+var_3C] mov rdi, rbx call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&) loc_A5A0E: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace( _QWORD *a1, long long a2, int a3, unsigned int a4, int a5) { int *v8; // rsi int v9; // ecx int v10; // r13d int v11; // eax _DWORD *v12; // rcx _DWORD *v13; // rsi bool v14; // r8 unsigned long long v15; // rdi long long v16; // r9 _DWORD *v18; // rsi unsigned int *v19; // rsi long long result; // rax int v21; // [rsp+4h] [rbp-44h] BYREF int v22; // [rsp+8h] [rbp-40h] BYREF unsigned int v23; // [rsp+Ch] [rbp-3Ch] BYREF _QWORD *v24; // [rsp+10h] [rbp-38h] v23 = a4; v21 = a3; v8 = (int *)a1[1]; if ( v8 == (int *)a1[2] ) { std::vector<int>::_M_realloc_insert<int const&>(a1, v8, &v21); } else { *v8 = a3; a1[1] = v8 + 1; } v9 = v21; if ( v21 > 0 ) { v24 = a1 + 9; v10 = 0; while ( 1 ) { v11 = *(_DWORD *)(a2 + 4LL * (unsigned __int16)((a5 + v10) % v9)); v22 = v11; v12 = (_DWORD *)a1[9]; v13 = (_DWORD *)a1[10]; v14 = (unsigned __int16)((unsigned int)((_DWORD)v13 - (_DWORD)v12) >> 2) != 0; if ( !(unsigned __int16)((unsigned int)((_DWORD)v13 - (_DWORD)v12) >> 2) ) goto LABEL_13; LOWORD(v15) = 0; if ( *v12 != v11 ) break; LABEL_12: if ( !v14 ) goto LABEL_13; LABEL_17: v22 = (unsigned __int16)v15; v18 = (_DWORD *)a1[7]; if ( v18 == (_DWORD *)a1[8] ) { std::vector<int>::_M_realloc_insert<int>(a1 + 6, v18, &v22); } else { *v18 = (unsigned __int16)v15; a1[7] = v18 + 1; } ++v10; v9 = v21; if ( v10 >= v21 ) goto LABEL_21; } v16 = 0LL; while ( (unsigned __int16)(((unsigned int)a1[10] - (unsigned int)v12) >> 2) - 1 != v16 ) { v15 = v16 + 1; if ( v12[++v16] == v11 ) { v14 = v15 < (unsigned __int16)(((unsigned int)a1[10] - (unsigned int)v12) >> 2); goto LABEL_12; } } LABEL_13: if ( v13 == (_DWORD *)a1[11] ) { std::vector<int>::_M_realloc_insert<int const&>(v24, v13, &v22); } else { *v13 = v11; a1[10] = v13 + 1; } LOWORD(v15) = ((a1[10] - a1[9]) >> 2) - 1; goto LABEL_17; } LABEL_21: v19 = (unsigned int *)a1[4]; if ( v19 == (unsigned int *)a1[5] ) return std::vector<int>::_M_realloc_insert<int const&>(a1 + 3, v19, &v23); result = v23; *v19 = v23; a1[4] = v19 + 1; return result; }
addFace: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14D,R8D MOV R15,RSI MOV RBX,RDI MOV dword ptr [RSP + 0xc],ECX MOV dword ptr [RSP + 0x4],EDX MOV RSI,qword ptr [RDI + 0x8] CMP RSI,qword ptr [RDI + 0x10] JZ 0x001a58f3 MOV dword ptr [RSI],EDX ADD RSI,0x4 MOV qword ptr [RBX + 0x8],RSI JMP 0x001a5900 LAB_001a58f3: LEA RDX,[RSP + 0x4] MOV RDI,RBX CALL 0x00138ba0 LAB_001a5900: MOV ECX,dword ptr [RSP + 0x4] TEST ECX,ECX JLE 0x001a59e3 LEA R12,[RBX + 0x30] LEA RAX,[RBX + 0x48] MOV qword ptr [RSP + 0x10],RAX XOR R13D,R13D MOV EBP,0xffff LAB_001a5921: LEA EAX,[R14 + R13*0x1] CDQ IDIV ECX AND EDX,EBP MOV EAX,dword ptr [R15 + RDX*0x4] MOV dword ptr [RSP + 0x8],EAX MOV RCX,qword ptr [RBX + 0x48] MOV RSI,qword ptr [RBX + 0x50] MOV EDX,ESI SUB EDX,ECX SHR EDX,0x2 AND EDX,EBP SETNZ R8B JZ 0x001a5976 XOR EDI,EDI CMP dword ptr [RCX],EAX JZ 0x001a5971 MOV R8D,EDX DEC EDX XOR R9D,R9D LAB_001a5957: CMP RDX,R9 JZ 0x001a5976 LEA RDI,[R9 + 0x1] CMP dword ptr [RCX + R9*0x4 + 0x4],EAX MOV R9,RDI JNZ 0x001a5957 CMP RDI,R8 SETC R8B LAB_001a5971: TEST R8B,R8B JNZ 0x001a59a9 LAB_001a5976: CMP RSI,qword ptr [RBX + 0x58] JZ 0x001a5988 MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RBX + 0x50],RSI JMP 0x001a5997 LAB_001a5988: MOV RDI,qword ptr [RSP + 0x10] LEA RDX,[RSP + 0x8] CALL 0x00138ba0 LAB_001a5997: MOV RDI,qword ptr [RBX + 0x50] SUB RDI,qword ptr [RBX + 0x48] SHR RDI,0x2 ADD EDI,0xffff LAB_001a59a9: MOVZX EAX,DI MOV dword ptr [RSP + 0x8],EAX MOV RSI,qword ptr [RBX + 0x38] CMP RSI,qword ptr [RBX + 0x40] JZ 0x001a59c6 MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RBX + 0x38],RSI JMP 0x001a59d3 LAB_001a59c6: MOV RDI,R12 LEA RDX,[RSP + 0x8] CALL 0x0013b550 LAB_001a59d3: INC R13D MOV ECX,dword ptr [RSP + 0x4] CMP R13D,ECX JL 0x001a5921 LAB_001a59e3: MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x001a59fd MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RBX + 0x20],RSI JMP 0x001a5a0e LAB_001a59fd: ADD RBX,0x18 LEA RDX,[RSP + 0xc] MOV RDI,RBX CALL 0x00138ba0 LAB_001a5a0e: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>, int, int) */ void OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace (vector<int,std::allocator<int>> *param_1,long param_2,int param_3,int4 param_4 ,int param_5) { int *piVar1; uint *puVar2; uint *puVar3; int4 *puVar4; long lVar5; uint uVar6; ulong uVar7; ulong uVar8; int iVar9; bool bVar10; int local_44; uint local_40; int4 local_3c; vector<int,std::allocator<int>> *local_38; piVar1 = *(int **)(param_1 + 8); local_44 = param_3; local_3c = param_4; if (piVar1 == *(int **)(param_1 + 0x10)) { std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>(param_1,piVar1,&local_44); } else { *piVar1 = param_3; *(int **)(param_1 + 8) = piVar1 + 1; } if (0 < local_44) { local_38 = param_1 + 0x48; iVar9 = 0; do { local_40 = *(uint *)(param_2 + (ulong)((param_5 + iVar9) % local_44 & 0xffff) * 4); puVar2 = *(uint **)(param_1 + 0x48); puVar3 = *(uint **)(param_1 + 0x50); uVar6 = (uint)((int)puVar3 - (int)puVar2) >> 2 & 0xffff; bVar10 = uVar6 != 0; if (uVar6 == 0) { LAB_001a5976: if (puVar3 == *(uint **)(param_1 + 0x58)) { std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&> (local_38,puVar3,&local_40); } else { *puVar3 = local_40; *(uint **)(param_1 + 0x50) = puVar3 + 1; } uVar6 = (int)((ulong)(*(long *)(param_1 + 0x50) - *(long *)(param_1 + 0x48)) >> 2) + 0xffff; } else { uVar7 = 0; if (*puVar2 != local_40) { uVar8 = 0; do { if (uVar6 - 1 == uVar8) goto LAB_001a5976; uVar7 = uVar8 + 1; lVar5 = uVar8 + 1; uVar8 = uVar7; } while (puVar2[lVar5] != local_40); bVar10 = uVar7 < uVar6; } uVar6 = (uint)uVar7; if (!bVar10) goto LAB_001a5976; } local_40 = uVar6 & 0xffff; puVar2 = *(uint **)(param_1 + 0x38); if (puVar2 == *(uint **)(param_1 + 0x40)) { std::vector<int,std::allocator<int>>::_M_realloc_insert<int> (param_1 + 0x30,puVar2,&local_40); } else { *puVar2 = local_40; *(uint **)(param_1 + 0x38) = puVar2 + 1; } iVar9 = iVar9 + 1; } while (iVar9 < local_44); } puVar4 = *(int4 **)(param_1 + 0x20); if (puVar4 == *(int4 **)(param_1 + 0x28)) { std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&> (param_1 + 0x18,puVar4,&local_3c); } else { *puVar4 = local_3c; *(int4 **)(param_1 + 0x20) = puVar4 + 1; } return; }
63,205
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>, int, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhoodBuilder.cpp
inline void NeighborhoodBuilder::addFace(ConstIndexArray fverts, Index faceIndex, int startingEdge) { int nverts = fverts.size(); _faceVertCounts.push_back(nverts); for (int vert = 0; vert < nverts; ++vert) { LocalIndex index = (vert + startingEdge) % nverts; _faceVerts.push_back(mapToLocalIndex(fverts[index])); } _faces.push_back(faceIndex); }
O2
cpp
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %r14d movq %rsi, %r15 movq %rdi, %rbx movl %ecx, 0x14(%rsp) leaq 0x10(%rsp), %rsi movl %edx, (%rsi) callq 0x4f610 leaq 0x30(%rbx), %r12 xorl %ebp, %ebp leaq 0xc(%rsp), %r13 movl 0x10(%rsp), %ecx cmpl %ecx, %ebp jge 0xb07b8 leal (%r14,%rbp), %eax cltd idivl %ecx movzwl %dx, %eax movl (%r15,%rax,4), %esi movq %rbx, %rdi callq 0x502f0 movzwl %ax, %eax movl %eax, 0xc(%rsp) movq %r12, %rdi movq %r13, %rsi callq 0x54910 incl %ebp jmp 0xb0784 addq $0x18, %rbx leaq 0x14(%rsp), %rsi movq %rbx, %rdi callq 0x4f610 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder7addFaceENS0_3Vtr10ConstArrayIiEEii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14d, r8d mov r15, rsi mov rbx, rdi mov [rsp+48h+var_34], ecx lea rsi, [rsp+48h+var_38] mov [rsi], edx call __ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) lea r12, [rbx+30h] xor ebp, ebp lea r13, [rsp+48h+var_3C] loc_B0784: mov ecx, [rsp+48h+var_38] cmp ebp, ecx jge short loc_B07B8 lea eax, [r14+rbp] cdq idiv ecx movzx eax, dx mov esi, [r15+rax*4]; int mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder15mapToLocalIndexEi; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::mapToLocalIndex(int) movzx eax, ax mov [rsp+48h+var_3C], eax mov rdi, r12 mov rsi, r13 call __ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_; std::vector<int>::emplace_back<int>(int &&) inc ebp jmp short loc_B0784 loc_B07B8: add rbx, 18h lea rsi, [rsp+48h+var_34] mov rdi, rbx call __ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace( OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder *this, long long a2, int a3, int a4, int a5) { int i; // ebp int v8; // [rsp+Ch] [rbp-3Ch] BYREF int v9; // [rsp+10h] [rbp-38h] BYREF _DWORD v10[13]; // [rsp+14h] [rbp-34h] BYREF v10[0] = a4; v9 = a3; std::vector<int>::push_back(this, &v9); for ( i = 0; i < v9; ++i ) { v8 = (unsigned __int16)OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::mapToLocalIndex( this, *(_DWORD *)(a2 + 4LL * (unsigned __int16)((a5 + i) % v9))); std::vector<int>::emplace_back<int>((char *)this + 48, &v8); } return std::vector<int>::push_back((char *)this + 24, v10); }
addFace: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14D,R8D MOV R15,RSI MOV RBX,RDI MOV dword ptr [RSP + 0x14],ECX LEA RSI,[RSP + 0x10] MOV dword ptr [RSI],EDX CALL 0x0014f610 LEA R12,[RBX + 0x30] XOR EBP,EBP LEA R13,[RSP + 0xc] LAB_001b0784: MOV ECX,dword ptr [RSP + 0x10] CMP EBP,ECX JGE 0x001b07b8 LEA EAX,[R14 + RBP*0x1] CDQ IDIV ECX MOVZX EAX,DX MOV ESI,dword ptr [R15 + RAX*0x4] MOV RDI,RBX CALL 0x001502f0 MOVZX EAX,AX MOV dword ptr [RSP + 0xc],EAX MOV RDI,R12 MOV RSI,R13 CALL 0x00154910 INC EBP JMP 0x001b0784 LAB_001b07b8: ADD RBX,0x18 LEA RSI,[RSP + 0x14] MOV RDI,RBX CALL 0x0014f610 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>, int, int) */ void OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::addFace (vector<int,std::allocator<int>> *param_1,long param_2,int param_3,int param_4, int param_5) { ushort uVar1; int iVar2; uint local_3c; int local_38; int local_34; local_38 = param_3; local_34 = param_4; std::vector<int,std::allocator<int>>::push_back(param_1,&local_38); for (iVar2 = 0; iVar2 < local_38; iVar2 = iVar2 + 1) { uVar1 = mapToLocalIndex((NeighborhoodBuilder *)param_1, *(int *)(param_2 + ((long)(param_5 + iVar2) % (long)local_38 & 0xffffU) * 4)); local_3c = (uint)uVar1; std::vector<int,std::allocator<int>>::emplace_back<int>(param_1 + 0x30,(int *)&local_3c); } std::vector<int,std::allocator<int>>::push_back(param_1 + 0x18,&local_34); return; }
63,206
pack_dirname
eloqsql/mysys/mf_pack.c
void pack_dirname(char * to, const char *from) { int cwd_err; size_t d_length,length,UNINIT_VAR(buff_length); char * start; char buff[FN_REFLEN + 1]; DBUG_ENTER("pack_dirname"); (void) intern_filename(to,from); /* Change to intern name */ #ifdef FN_DEVCHAR if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skip device part */ start++; else #endif start=to; if (!(cwd_err= my_getwd(buff,FN_REFLEN,MYF(0)))) { buff_length= strlen(buff); d_length= (size_t) (start-to); if ((start == to || (buff_length == d_length && !memcmp(buff,start,d_length))) && *start != FN_LIBCHAR && *start) { /* Put current dir before */ bchange((uchar*) to, d_length, (uchar*) buff, buff_length, strlen(to)+1); } } if ((d_length= cleanup_dirname(to,to)) != 0) { length=0; if (home_dir) { length= strlen(home_dir); if (home_dir[length-1] == FN_LIBCHAR) length--; /* Don't test last '/' */ } if (length > 1 && length < d_length) { /* test if /xx/yy -> ~/yy */ if (memcmp(to,home_dir,length) == 0 && to[length] == FN_LIBCHAR) { to[0]=FN_HOMELIB; /* Filename begins with ~ */ (void) strmov_overlapp(to+1,to+length); } } if (! cwd_err) { /* Test if cwd is ~/... */ if (length > 1 && length < buff_length) { if (memcmp(buff,home_dir,length) == 0 && buff[length] == FN_LIBCHAR) { buff[0]=FN_HOMELIB; (void) strmov_overlapp(buff+1,buff+length); } } if (is_prefix(to,buff)) { length= strlen(buff); if (to[length]) (void) strmov_overlapp(to,to+length); /* Remove everything before */ else { to[0]= FN_CURLIB; /* Put ./ instead of cwd */ to[1]= FN_LIBCHAR; to[2]= '\0'; } } } } DBUG_PRINT("exit",("to: '%s'",to)); DBUG_VOID_RETURN; }
O0
c
pack_dirname: pushq %rbp movq %rsp, %rbp subq $0x270, %rsp # imm = 0x270 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x218(%rbp), %rdi movq -0x220(%rbp), %rsi callq 0xe8be0 movq -0x218(%rbp), %rax movq %rax, -0x248(%rbp) leaq -0x210(%rbp), %rdi movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0xf0320 movl %eax, -0x224(%rbp) cmpl $0x0, %eax jne 0xe89a7 leaq -0x210(%rbp), %rdi callq 0x2a350 movq %rax, -0x240(%rbp) movq -0x248(%rbp), %rax movq -0x218(%rbp), %rcx subq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x248(%rbp), %rax cmpq -0x218(%rbp), %rax je 0xe891b movq -0x240(%rbp), %rax cmpq -0x230(%rbp), %rax jne 0xe89a5 leaq -0x210(%rbp), %rdi movq -0x248(%rbp), %rsi movq -0x230(%rbp), %rdx callq 0x2a820 cmpl $0x0, %eax jne 0xe89a5 movq -0x248(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax je 0xe89a5 movq -0x248(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0xe89a5 movq -0x218(%rbp), %rax movq %rax, -0x268(%rbp) movq -0x230(%rbp), %rax movq %rax, -0x260(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x258(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x250(%rbp) movq -0x218(%rbp), %rdi callq 0x2a350 movq -0x268(%rbp), %rdi movq -0x260(%rbp), %rsi movq -0x258(%rbp), %rdx movq -0x250(%rbp), %rcx movq %rax, %r8 addq $0x1, %r8 callq 0x10afc0 jmp 0xe89a7 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi callq 0xe8cd0 movq %rax, -0x230(%rbp) cmpq $0x0, %rax je 0xe8bad movq $0x0, -0x238(%rbp) leaq 0xb9a0db(%rip), %rax # 0xc82ab8 cmpq $0x0, (%rax) je 0xe8a2b leaq 0xb9a0ce(%rip), %rax # 0xc82ab8 movq (%rax), %rdi callq 0x2a350 movq %rax, -0x238(%rbp) leaq 0xb9a0b8(%rip), %rax # 0xc82ab8 movq (%rax), %rax movq -0x238(%rbp), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0xe8a29 movq -0x238(%rbp), %rax addq $-0x1, %rax movq %rax, -0x238(%rbp) jmp 0xe8a2b cmpq $0x1, -0x238(%rbp) jbe 0xe8aa8 movq -0x238(%rbp), %rax cmpq -0x230(%rbp), %rax jae 0xe8aa8 movq -0x218(%rbp), %rdi leaq 0xb9a065(%rip), %rax # 0xc82ab8 movq (%rax), %rsi movq -0x238(%rbp), %rdx callq 0x2a820 cmpl $0x0, %eax jne 0xe8aa6 movq -0x218(%rbp), %rax movq -0x238(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0xe8aa6 movq -0x218(%rbp), %rax movb $0x7e, (%rax) movq -0x218(%rbp), %rdi addq $0x1, %rdi movq -0x218(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x14f920 jmp 0xe8aa8 cmpl $0x0, -0x224(%rbp) jne 0xe8bab cmpq $0x1, -0x238(%rbp) jbe 0xe8b2c movq -0x238(%rbp), %rax cmpq -0x240(%rbp), %rax jae 0xe8b2c leaq -0x210(%rbp), %rdi leaq 0xb99fdb(%rip), %rax # 0xc82ab8 movq (%rax), %rsi movq -0x238(%rbp), %rdx callq 0x2a820 cmpl $0x0, %eax jne 0xe8b2a movq -0x238(%rbp), %rax movsbl -0x210(%rbp,%rax), %eax cmpl $0x2f, %eax jne 0xe8b2a movb $0x7e, -0x210(%rbp) leaq -0x210(%rbp), %rdi addq $0x1, %rdi leaq -0x210(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x14f920 jmp 0xe8b2c movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x14a840 cmpl $0x0, %eax je 0xe8ba9 leaq -0x210(%rbp), %rdi callq 0x2a350 movq %rax, -0x238(%rbp) movq -0x218(%rbp), %rax movq -0x238(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0xe8b87 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x14f920 jmp 0xe8ba7 movq -0x218(%rbp), %rax movb $0x2e, (%rax) movq -0x218(%rbp), %rax movb $0x2f, 0x1(%rax) movq -0x218(%rbp), %rax movb $0x0, 0x2(%rax) jmp 0xe8ba9 jmp 0xe8bab jmp 0xe8bad jmp 0xe8baf jmp 0xe8bb1 jmp 0xe8bb3 jmp 0xe8bb5 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xe8bd0 addq $0x270, %rsp # imm = 0x270 popq %rbp retq callq 0x2a260 nopw %cs:(%rax,%rax)
pack_dirname: push rbp mov rbp, rsp sub rsp, 270h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rax, [rbp+var_240] mov [rbp+var_240], rax mov rdi, [rbp+var_218] mov rsi, [rbp+var_220] call intern_filename mov rax, [rbp+var_218] mov [rbp+var_248], rax lea rdi, [rbp+var_210] mov esi, 200h xor eax, eax mov edx, eax call my_getwd mov [rbp+var_224], eax cmp eax, 0 jnz loc_E89A7 lea rdi, [rbp+var_210] call _strlen mov [rbp+var_240], rax mov rax, [rbp+var_248] mov rcx, [rbp+var_218] sub rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_248] cmp rax, [rbp+var_218] jz short loc_E891B mov rax, [rbp+var_240] cmp rax, [rbp+var_230] jnz loc_E89A5 lea rdi, [rbp+var_210] mov rsi, [rbp+var_248] mov rdx, [rbp+var_230] call _memcmp cmp eax, 0 jnz loc_E89A5 loc_E891B: mov rax, [rbp+var_248] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jz short loc_E89A5 mov rax, [rbp+var_248] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_E89A5 mov rax, [rbp+var_218] mov [rbp+var_268], rax mov rax, [rbp+var_230] mov [rbp+var_260], rax lea rax, [rbp+var_210] mov [rbp+var_258], rax mov rax, [rbp+var_240] mov [rbp+var_250], rax mov rdi, [rbp+var_218] call _strlen mov rdi, [rbp+var_268] mov rsi, [rbp+var_260] mov rdx, [rbp+var_258] mov rcx, [rbp+var_250] mov r8, rax add r8, 1 call bchange loc_E89A5: jmp short $+2 loc_E89A7: mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] call cleanup_dirname mov [rbp+var_230], rax cmp rax, 0 jz loc_E8BAD mov [rbp+var_238], 0 lea rax, home_dir cmp qword ptr [rax], 0 jz short loc_E8A2B lea rax, home_dir mov rdi, [rax] call _strlen mov [rbp+var_238], rax lea rax, home_dir mov rax, [rax] mov rcx, [rbp+var_238] sub rcx, 1 movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_E8A29 mov rax, [rbp+var_238] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_238], rax loc_E8A29: jmp short $+2 loc_E8A2B: cmp [rbp+var_238], 1 jbe short loc_E8AA8 mov rax, [rbp+var_238] cmp rax, [rbp+var_230] jnb short loc_E8AA8 mov rdi, [rbp+var_218] lea rax, home_dir mov rsi, [rax] mov rdx, [rbp+var_238] call _memcmp cmp eax, 0 jnz short loc_E8AA6 mov rax, [rbp+var_218] mov rcx, [rbp+var_238] movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_E8AA6 mov rax, [rbp+var_218] mov byte ptr [rax], 7Eh ; '~' mov rdi, [rbp+var_218] add rdi, 1 mov rsi, [rbp+var_218] add rsi, [rbp+var_238] call strmov_overlapp loc_E8AA6: jmp short $+2 loc_E8AA8: cmp [rbp+var_224], 0 jnz loc_E8BAB cmp [rbp+var_238], 1 jbe short loc_E8B2C mov rax, [rbp+var_238] cmp rax, [rbp+var_240] jnb short loc_E8B2C lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] mov rdx, [rbp+var_238] call _memcmp cmp eax, 0 jnz short loc_E8B2A mov rax, [rbp+var_238] movsx eax, [rbp+rax+var_210] cmp eax, 2Fh ; '/' jnz short loc_E8B2A mov [rbp+var_210], 7Eh ; '~' lea rdi, [rbp+var_210] add rdi, 1 lea rsi, [rbp+var_210] add rsi, [rbp+var_238] call strmov_overlapp loc_E8B2A: jmp short $+2 loc_E8B2C: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call is_prefix cmp eax, 0 jz short loc_E8BA9 lea rdi, [rbp+var_210] call _strlen mov [rbp+var_238], rax mov rax, [rbp+var_218] mov rcx, [rbp+var_238] cmp byte ptr [rax+rcx], 0 jz short loc_E8B87 mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] add rsi, [rbp+var_238] call strmov_overlapp jmp short loc_E8BA7 loc_E8B87: mov rax, [rbp+var_218] mov byte ptr [rax], 2Eh ; '.' mov rax, [rbp+var_218] mov byte ptr [rax+1], 2Fh ; '/' mov rax, [rbp+var_218] mov byte ptr [rax+2], 0 loc_E8BA7: jmp short $+2 loc_E8BA9: jmp short $+2 loc_E8BAB: jmp short $+2 loc_E8BAD: jmp short $+2 loc_E8BAF: jmp short $+2 loc_E8BB1: jmp short $+2 loc_E8BB3: jmp short $+2 loc_E8BB5: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_E8BD0 add rsp, 270h pop rbp retn loc_E8BD0: call ___stack_chk_fail
unsigned long long pack_dirname(_BYTE *a1, long long a2) { long long v2; // rax unsigned long long v4; // [rsp+30h] [rbp-240h] unsigned long long v5; // [rsp+38h] [rbp-238h] long long v6; // [rsp+38h] [rbp-238h] long long v7; // [rsp+40h] [rbp-230h] unsigned long long v8; // [rsp+40h] [rbp-230h] int v9; // [rsp+4Ch] [rbp-224h] _BYTE *v10; // [rsp+58h] [rbp-218h] char v11; // [rsp+60h] [rbp-210h] BYREF _BYTE v12[527]; // [rsp+61h] [rbp-20Fh] BYREF *(_QWORD *)&v12[519] = __readfsqword(0x28u); v10 = a1; intern_filename(a1, a2); v9 = my_getwd(&v11, 512LL, 0LL); if ( !v9 ) { v4 = strlen(&v11); v7 = a1 - v10; if ( (a1 == v10 || v4 == v7 && !(unsigned int)memcmp(&v11, a1, v7)) && *a1 != 47 && *a1 ) { v2 = strlen(v10); bchange(v10, v7, &v11, v4, v2 + 1); } } v8 = cleanup_dirname(v10, v10); if ( v8 ) { v5 = 0LL; if ( home_dir ) { v5 = strlen(home_dir); if ( *(_BYTE *)(home_dir + v5 - 1) == 47 ) --v5; } if ( v5 > 1 && v5 < v8 && !(unsigned int)memcmp(v10, home_dir, v5) && v10[v5] == 47 ) { *v10 = 126; strmov_overlapp(v10 + 1, &v10[v5]); } if ( !v9 ) { if ( v5 > 1 && v5 < v4 && !(unsigned int)memcmp(&v11, home_dir, v5) && v12[v5 - 1] == 47 ) { v11 = 126; strmov_overlapp(v12, &v12[v5 - 1]); } if ( (unsigned int)is_prefix(v10, &v11) ) { v6 = strlen(&v11); if ( v10[v6] ) { strmov_overlapp(v10, &v10[v6]); } else { *v10 = 46; v10[1] = 47; v10[2] = 0; } } } } return __readfsqword(0x28u); }
pack_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x270 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x240],RAX MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x220] CALL 0x001e8be0 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x248],RAX LEA RDI,[RBP + -0x210] MOV ESI,0x200 XOR EAX,EAX MOV EDX,EAX CALL 0x001f0320 MOV dword ptr [RBP + -0x224],EAX CMP EAX,0x0 JNZ 0x001e89a7 LEA RDI,[RBP + -0x210] CALL 0x0012a350 MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x248] MOV RCX,qword ptr [RBP + -0x218] SUB RAX,RCX MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x248] CMP RAX,qword ptr [RBP + -0x218] JZ 0x001e891b MOV RAX,qword ptr [RBP + -0x240] CMP RAX,qword ptr [RBP + -0x230] JNZ 0x001e89a5 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x248] MOV RDX,qword ptr [RBP + -0x230] CALL 0x0012a820 CMP EAX,0x0 JNZ 0x001e89a5 LAB_001e891b: MOV RAX,qword ptr [RBP + -0x248] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JZ 0x001e89a5 MOV RAX,qword ptr [RBP + -0x248] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001e89a5 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x268],RAX MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x260],RAX LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x250],RAX MOV RDI,qword ptr [RBP + -0x218] CALL 0x0012a350 MOV RDI,qword ptr [RBP + -0x268] MOV RSI,qword ptr [RBP + -0x260] MOV RDX,qword ptr [RBP + -0x258] MOV RCX,qword ptr [RBP + -0x250] MOV R8,RAX ADD R8,0x1 CALL 0x0020afc0 LAB_001e89a5: JMP 0x001e89a7 LAB_001e89a7: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] CALL 0x001e8cd0 MOV qword ptr [RBP + -0x230],RAX CMP RAX,0x0 JZ 0x001e8bad MOV qword ptr [RBP + -0x238],0x0 LEA RAX,[0xd82ab8] CMP qword ptr [RAX],0x0 JZ 0x001e8a2b LEA RAX,[0xd82ab8] MOV RDI,qword ptr [RAX] CALL 0x0012a350 MOV qword ptr [RBP + -0x238],RAX LEA RAX,[0xd82ab8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x238] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x001e8a29 MOV RAX,qword ptr [RBP + -0x238] ADD RAX,-0x1 MOV qword ptr [RBP + -0x238],RAX LAB_001e8a29: JMP 0x001e8a2b LAB_001e8a2b: CMP qword ptr [RBP + -0x238],0x1 JBE 0x001e8aa8 MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x230] JNC 0x001e8aa8 MOV RDI,qword ptr [RBP + -0x218] LEA RAX,[0xd82ab8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x238] CALL 0x0012a820 CMP EAX,0x0 JNZ 0x001e8aa6 MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x001e8aa6 MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX],0x7e MOV RDI,qword ptr [RBP + -0x218] ADD RDI,0x1 MOV RSI,qword ptr [RBP + -0x218] ADD RSI,qword ptr [RBP + -0x238] CALL 0x0024f920 LAB_001e8aa6: JMP 0x001e8aa8 LAB_001e8aa8: CMP dword ptr [RBP + -0x224],0x0 JNZ 0x001e8bab CMP qword ptr [RBP + -0x238],0x1 JBE 0x001e8b2c MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x240] JNC 0x001e8b2c LEA RDI,[RBP + -0x210] LEA RAX,[0xd82ab8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x238] CALL 0x0012a820 CMP EAX,0x0 JNZ 0x001e8b2a MOV RAX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210] CMP EAX,0x2f JNZ 0x001e8b2a MOV byte ptr [RBP + -0x210],0x7e LEA RDI,[RBP + -0x210] ADD RDI,0x1 LEA RSI,[RBP + -0x210] ADD RSI,qword ptr [RBP + -0x238] CALL 0x0024f920 LAB_001e8b2a: JMP 0x001e8b2c LAB_001e8b2c: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x0024a840 CMP EAX,0x0 JZ 0x001e8ba9 LEA RDI,[RBP + -0x210] CALL 0x0012a350 MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x238] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x001e8b87 MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] ADD RSI,qword ptr [RBP + -0x238] CALL 0x0024f920 JMP 0x001e8ba7 LAB_001e8b87: MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX],0x2e MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX + 0x1],0x2f MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX + 0x2],0x0 LAB_001e8ba7: JMP 0x001e8ba9 LAB_001e8ba9: JMP 0x001e8bab LAB_001e8bab: JMP 0x001e8bad LAB_001e8bad: JMP 0x001e8baf LAB_001e8baf: JMP 0x001e8bb1 LAB_001e8bb1: JMP 0x001e8bb3 LAB_001e8bb3: JMP 0x001e8bb5 LAB_001e8bb5: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001e8bd0 ADD RSP,0x270 POP RBP RET LAB_001e8bd0: CALL 0x0012a260
/* WARNING: Removing unreachable block (ram,0x001e88e4) */ /* WARNING: Removing unreachable block (ram,0x001e88f8) */ void pack_dirname(char *param_1,int8 param_2) { int iVar1; int iVar2; size_t sVar3; ulong uVar4; long in_FS_OFFSET; ulong local_248; ulong local_240; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); intern_filename(param_1,param_2); iVar1 = my_getwd(local_218,0x200,0); if (((iVar1 == 0) && (local_248 = strlen(local_218), *param_1 != '/')) && (*param_1 != '\0')) { sVar3 = strlen(param_1); bchange(param_1,0,local_218,local_248,sVar3 + 1); } uVar4 = cleanup_dirname(param_1,param_1); if (uVar4 != 0) { local_240 = 0; if ((home_dir != (char *)0x0) && (local_240 = strlen(home_dir), home_dir[local_240 - 1] == '/')) { local_240 = local_240 - 1; } if (((1 < local_240) && (local_240 < uVar4)) && ((iVar2 = memcmp(param_1,home_dir,local_240), iVar2 == 0 && (param_1[local_240] == '/')))) { *param_1 = '~'; strmov_overlapp(param_1 + 1,param_1 + local_240); } if (iVar1 == 0) { if ((((1 < local_240) && (local_240 < local_248)) && (iVar1 = memcmp(local_218,home_dir,local_240), iVar1 == 0)) && (local_218[local_240] == '/')) { local_218[0] = '~'; strmov_overlapp(local_218 + 1,local_218 + local_240); } iVar1 = is_prefix(param_1,local_218); if (iVar1 != 0) { sVar3 = strlen(local_218); if (param_1[sVar3] == '\0') { *param_1 = '.'; param_1[1] = '/'; param_1[2] = '\0'; } else { strmov_overlapp(param_1,param_1 + sVar3); } } } } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
63,207
init_dumping_mysql_tables
eloqsql/client/mysqldump.c
static int init_dumping_mysql_tables(char *qdatabase) { DBUG_ENTER("init_dumping_mysql_tables"); if (opt_drop_database) fprintf(md_result_file, "\n/*!50106 SET @save_log_output=@@LOG_OUTPUT*/;\n" "/*M!100203 EXECUTE IMMEDIATE IF(@@LOG_OUTPUT='TABLE' AND (@@SLOW_QUERY_LOG=1 OR @@GENERAL_LOG=1)," "\"SET GLOBAL LOG_OUTPUT='NONE'\", \"DO 0\") */;\n"); DBUG_RETURN(init_dumping_tables(qdatabase)); }
O0
c
init_dumping_mysql_tables: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpb $0x0, 0x3c20fe(%rip) # 0x401821 je 0x3f73a movq 0x3c1d84(%rip), %rdi # 0x4014b0 leaq 0x9cd7d(%rip), %rsi # 0xdc4b0 movb $0x0, %al callq 0x381d0 jmp 0x3f73c movq -0x8(%rbp), %rdi callq 0x3f760 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
init_dumping_mysql_tables: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp cs:opt_drop_database, 0 jz short loc_3F73A mov rdi, cs:md_result_file lea rsi, a50106SetSaveLo; "\n/*!50106 SET @save_log_output=@@LOG_O"... mov al, 0 call _fprintf loc_3F73A: jmp short $+2 loc_3F73C: mov rdi, [rbp+var_8] call init_dumping_tables mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long init_dumping_mysql_tables(long long a1) { if ( opt_drop_database ) fprintf( md_result_file, "\n" "/*!50106 SET @save_log_output=@@LOG_OUTPUT*/;\n" "/*M!100203 EXECUTE IMMEDIATE IF(@@LOG_OUTPUT='TABLE' AND (@@SLOW_QUERY_LOG=1 OR @@GENERAL_LOG=1),\"SET GLOBAL LOG_" "OUTPUT='NONE'\", \"DO 0\") */;\n"); return (unsigned int)init_dumping_tables(a1); }
init_dumping_mysql_tables: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP byte ptr [0x00501821],0x0 JZ 0x0013f73a MOV RDI,qword ptr [0x005014b0] LEA RSI,[0x1dc4b0] MOV AL,0x0 CALL 0x001381d0 LAB_0013f73a: JMP 0x0013f73c LAB_0013f73c: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013f760 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 init_dumping_mysql_tables(int8 param_1) { int4 uVar1; if (opt_drop_database != '\0') { fprintf(md_result_file, "\n/*!50106 SET @save_log_output=@@LOG_OUTPUT*/;\n/*M!100203 EXECUTE IMMEDIATE IF(@@LOG_OUTPUT=\'TABLE\' AND (@@SLOW_QUERY_LOG=1 OR @@GENERAL_LOG=1),\"SET GLOBAL LOG_OUTPUT=\'NONE\'\", \"DO 0\") */;\n" ); } uVar1 = init_dumping_tables(param_1); return uVar1; }
63,208
multadd
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O0
c
multadd: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq %rcx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movl $0x0, -0x1c(%rbp) movslq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movl (%rax), %eax movslq -0xc(%rbp), %rcx imulq %rcx, %rax addq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax shrq $0x20, %rax movq %rax, -0x30(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x38(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x28(%rbp) movl %ecx, (%rax) movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) cmpl -0x20(%rbp), %eax jl 0x58d7a cmpq $0x0, -0x30(%rbp) je 0x58e5b movl -0x20(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0xc(%rcx), %eax jl 0x58e33 movq -0x8(%rbp), %rax movl 0x8(%rax), %edi addl $0x1, %edi movq -0x18(%rbp), %rsi callq 0x58e70 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi addq $0x10, %rdi movq -0x8(%rbp), %rsi addq $0x10, %rsi movq -0x8(%rbp), %rax movslq 0x14(%rax), %rdx shlq $0x2, %rdx addq $0x8, %rdx callq 0x360b0 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x58970 movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x30(%rbp), %rax movl %eax, %edx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x20(%rbp), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, -0x20(%rbp) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) movl -0x20(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
multadd: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_18], rcx mov rax, [rbp+var_8] mov eax, [rax+14h] mov [rbp+var_20], eax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_28], rax mov [rbp+var_1C], 0 movsxd rax, [rbp+var_10] mov [rbp+var_30], rax loc_58D7A: mov rax, [rbp+var_28] mov eax, [rax] movsxd rcx, [rbp+var_C] imul rax, rcx add rax, [rbp+var_30] mov [rbp+var_38], rax mov rax, [rbp+var_38] shr rax, 20h mov [rbp+var_30], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_38] mov ecx, eax mov rax, [rbp+var_28] mov rdx, rax add rdx, 4 mov [rbp+var_28], rdx mov [rax], ecx mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax cmp eax, [rbp+var_20] jl short loc_58D7A cmp [rbp+var_30], 0 jz loc_58E5B mov eax, [rbp+var_20] mov rcx, [rbp+var_8] cmp eax, [rcx+0Ch] jl short loc_58E33 mov rax, [rbp+var_8] mov edi, [rax+8] add edi, 1 mov rsi, [rbp+var_18] call Balloc mov [rbp+var_40], rax mov rdi, [rbp+var_40] add rdi, 10h mov rsi, [rbp+var_8] add rsi, 10h mov rax, [rbp+var_8] movsxd rdx, dword ptr [rax+14h] shl rdx, 2 add rdx, 8 call _memcpy mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call Bfree mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_58E33: mov rax, [rbp+var_30] mov edx, eax mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_20] mov esi, ecx add esi, 1 mov [rbp+var_20], esi movsxd rcx, ecx mov [rax+rcx*4], edx mov ecx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+14h], ecx loc_58E5B: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned int *v4; // rax long long v6; // [rsp+0h] [rbp-40h] unsigned long long v7; // [rsp+8h] [rbp-38h] unsigned long long v8; // [rsp+10h] [rbp-30h] unsigned int *v9; // [rsp+18h] [rbp-28h] int v10; // [rsp+20h] [rbp-20h] int v11; // [rsp+24h] [rbp-1Ch] unsigned long long v13; // [rsp+38h] [rbp-8h] v13 = a1; v10 = *(_DWORD *)(a1 + 20); v9 = *(unsigned int **)a1; v11 = 0; v8 = a3; do { v7 = v8 + a2 * (unsigned long long)*v9; v8 = HIDWORD(v7); v4 = v9++; *v4 = v7; ++v11; } while ( v11 < v10 ); if ( v8 ) { if ( v10 >= *(_DWORD *)(a1 + 12) ) { v6 = Balloc((unsigned int)(*(_DWORD *)(a1 + 8) + 1), a4); memcpy(v6 + 16, a1 + 16, 4LL * *(int *)(a1 + 20) + 8); Bfree(a1, a4); v13 = v6; } *(_DWORD *)(*(_QWORD *)v13 + 4LL * v10) = HIDWORD(v7); *(_DWORD *)(v13 + 20) = v10 + 1; } return v13; }
multadd: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV qword ptr [RBP + -0x18],RCX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x1c],0x0 MOVSXD RAX,dword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX LAB_00158d7a: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] IMUL RAX,RCX ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x20 MOV qword ptr [RBP + -0x30],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x38] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,dword ptr [RBP + -0x20] JL 0x00158d7a CMP qword ptr [RBP + -0x30],0x0 JZ 0x00158e5b MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0xc] JL 0x00158e33 MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x8] ADD EDI,0x1 MOV RSI,qword ptr [RBP + -0x18] CALL 0x00158e70 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0x10 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x10 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RDX,dword ptr [RAX + 0x14] SHL RDX,0x2 ADD RDX,0x8 CALL 0x001360b0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00158970 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_00158e33: MOV RAX,qword ptr [RBP + -0x30] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RBP + -0x20],ESI MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],EDX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],ECX LAB_00158e5b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; ulong uVar2; ulong local_38; uint *local_30; int local_24; long *local_10; iVar1 = *(int *)((long)param_1 + 0x14); local_24 = 0; local_38 = (ulong)param_3; local_30 = (uint *)*param_1; do { uVar2 = (ulong)*local_30 * (long)param_2 + local_38; local_38 = uVar2 >> 0x20; *local_30 = (uint)uVar2; local_24 = local_24 + 1; local_30 = local_30 + 1; } while (local_24 < iVar1); local_10 = param_1; if (local_38 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { local_10 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(local_10 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*local_10 + (long)iVar1 * 4) = (int)(uVar2 >> 0x20); *(int *)((long)local_10 + 0x14) = iVar1 + 1; } return local_10; }
63,209
ftparser_call_initializer
eloqsql/storage/myisam/ft_parser.c
MYSQL_FTPARSER_PARAM *ftparser_call_initializer(MI_INFO *info, uint keynr, uint paramnr) { uint32 ftparser_nr; struct st_mysql_ftparser *parser; if (!ftparser_alloc_param(info)) return 0; if (keynr == NO_SUCH_KEY) { ftparser_nr= 0; parser= &ft_default_parser; } else { ftparser_nr= info->s->keyinfo[keynr].ftkey_nr; parser= info->s->keyinfo[keynr].parser; } DBUG_ASSERT(paramnr < MAX_PARAM_NR); ftparser_nr= ftparser_nr*MAX_PARAM_NR + paramnr; if (! info->ftparser_param[ftparser_nr].mysql_add_word) { /* Note, that mysql_add_word is used here as a flag: mysql_add_word == 0 - parser is not initialized mysql_add_word != 0 - parser is initialized, or no initialization needed. */ info->ftparser_param[ftparser_nr].mysql_add_word= (int (*)(struct st_mysql_ftparser_param *, const char *, int, MYSQL_FTPARSER_BOOLEAN_INFO *)) 1; if (parser->init && parser->init(&info->ftparser_param[ftparser_nr])) return 0; } return &info->ftparser_param[ftparser_nr]; }
O3
c
ftparser_call_initializer: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r14d movl %esi, %r15d movq %rdi, %rbx callq 0x73d9b xorl %r12d, %r12d testq %rax, %rax je 0x73e98 cmpl $-0x1, %r15d je 0x73e4c movq (%rbx), %rax movq 0x218(%rax), %rax movl %r15d, %ecx imulq $0x70, %rcx, %rcx movl 0x20(%rax,%rcx), %r12d movq 0x38(%rax,%rcx), %rcx addl %r12d, %r12d jmp 0x73e53 leaq 0x3114ad(%rip), %rcx # 0x385300 addl %r14d, %r12d movq 0xd0(%rbx), %rax shlq $0x6, %r12 cmpq $0x0, 0x8(%rax,%r12) je 0x73e6e addq %r12, %rax jmp 0x73e9a addq %r12, %rax addq $0x8, %rax movq $0x1, (%rax) movq 0x10(%rcx), %rcx movq 0xd0(%rbx), %rax testq %rcx, %rcx je 0x73e69 addq %r12, %rax movq %rax, %rdi callq *%rcx testl %eax, %eax je 0x73ea3 xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0xd0(%rbx), %rax jmp 0x73e69
ftparser_call_initializer: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14d, edx mov r15d, esi mov rbx, rdi call ftparser_alloc_param xor r12d, r12d test rax, rax jz short loc_73E98 cmp r15d, 0FFFFFFFFh jz short loc_73E4C mov rax, [rbx] mov rax, [rax+218h] mov ecx, r15d imul rcx, 70h ; 'p' mov r12d, [rax+rcx+20h] mov rcx, [rax+rcx+38h] add r12d, r12d jmp short loc_73E53 loc_73E4C: lea rcx, ft_default_parser loc_73E53: add r12d, r14d mov rax, [rbx+0D0h] shl r12, 6 cmp qword ptr [rax+r12+8], 0 jz short loc_73E6E loc_73E69: add rax, r12 jmp short loc_73E9A loc_73E6E: add rax, r12 add rax, 8 mov qword ptr [rax], 1 mov rcx, [rcx+10h] mov rax, [rbx+0D0h] test rcx, rcx jz short loc_73E69 add rax, r12 mov rdi, rax call rcx test eax, eax jz short loc_73EA3 loc_73E98: xor eax, eax loc_73E9A: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_73EA3: mov rax, [rbx+0D0h] jmp short loc_73E69
long long ftparser_call_initializer(_QWORD *a1, unsigned int a2, int a3) { int v4; // r12d long long v5; // rax long long v6; // rcx int v7; // r12d _QWORD *v8; // rcx long long v9; // rax unsigned long long v10; // r12 unsigned int ( *v12)(unsigned long long); // rcx v4 = 0; if ( !ftparser_alloc_param(a1) ) return 0LL; if ( a2 == -1 ) { v8 = &ft_default_parser; } else { v5 = *(_QWORD *)(*a1 + 536LL); v6 = 112LL * a2; v7 = *(_DWORD *)(v5 + v6 + 32); v8 = *(_QWORD **)(v5 + v6 + 56); v4 = 2 * v7; } v9 = a1[26]; v10 = (unsigned long long)(unsigned int)(a3 + v4) << 6; if ( *(_QWORD *)(v9 + v10 + 8) ) return v10 + v9; *(_QWORD *)(v10 + v9 + 8) = 1LL; v12 = (unsigned int ( *)(unsigned long long))v8[2]; v9 = a1[26]; if ( !v12 ) return v10 + v9; if ( !v12(v10 + v9) ) { v9 = a1[26]; return v10 + v9; } return 0LL; }
ftparser_call_initializer: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,EDX MOV R15D,ESI MOV RBX,RDI CALL 0x00173d9b XOR R12D,R12D TEST RAX,RAX JZ 0x00173e98 CMP R15D,-0x1 JZ 0x00173e4c MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,R15D IMUL RCX,RCX,0x70 MOV R12D,dword ptr [RAX + RCX*0x1 + 0x20] MOV RCX,qword ptr [RAX + RCX*0x1 + 0x38] ADD R12D,R12D JMP 0x00173e53 LAB_00173e4c: LEA RCX,[0x485300] LAB_00173e53: ADD R12D,R14D MOV RAX,qword ptr [RBX + 0xd0] SHL R12,0x6 CMP qword ptr [RAX + R12*0x1 + 0x8],0x0 JZ 0x00173e6e LAB_00173e69: ADD RAX,R12 JMP 0x00173e9a LAB_00173e6e: ADD RAX,R12 ADD RAX,0x8 MOV qword ptr [RAX],0x1 MOV RCX,qword ptr [RCX + 0x10] MOV RAX,qword ptr [RBX + 0xd0] TEST RCX,RCX JZ 0x00173e69 ADD RAX,R12 MOV RDI,RAX CALL RCX TEST EAX,EAX JZ 0x00173ea3 LAB_00173e98: XOR EAX,EAX LAB_00173e9a: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00173ea3: MOV RAX,qword ptr [RBX + 0xd0] JMP 0x00173e69
long ftparser_call_initializer(long *param_1,uint param_2,int param_3) { int iVar1; long lVar2; int1 *puVar3; long lVar4; lVar2 = ftparser_alloc_param(); iVar1 = 0; if (lVar2 == 0) { LAB_00173e98: lVar2 = 0; } else { if (param_2 == 0xffffffff) { puVar3 = ft_default_parser; } else { puVar3 = *(int1 **)(*(long *)(*param_1 + 0x218) + 0x38 + (ulong)param_2 * 0x70); iVar1 = *(int *)(*(long *)(*param_1 + 0x218) + 0x20 + (ulong)param_2 * 0x70) * 2; } lVar2 = param_1[0x1a]; lVar4 = (ulong)(uint)(iVar1 + param_3) * 0x40; if (*(long *)(lVar2 + 8 + lVar4) == 0) { *(int8 *)(lVar2 + lVar4 + 8) = 1; lVar2 = param_1[0x1a]; if (*(code **)(puVar3 + 0x10) != (code *)0x0) { iVar1 = (**(code **)(puVar3 + 0x10))(lVar2 + lVar4); if (iVar1 != 0) goto LAB_00173e98; lVar2 = param_1[0x1a]; } } lVar2 = lVar2 + lVar4; } return lVar2; }
63,210
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O0
c
get_charset: pushq %rbp movq %rsp, %rbp subq $0x320, %rsp # imm = 0x320 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x2fc(%rbp) movq %rsi, -0x308(%rbp) movq $0x0, -0x310(%rbp) movl -0x2fc(%rbp), %eax leaq 0x1a227b(%rip), %rcx # 0x1d5dd8 movq (%rcx), %rcx cmpl (%rcx), %eax jne 0x33b7a leaq 0x1a226d(%rip), %rax # 0x1d5dd8 movq (%rax), %rax movq %rax, -0x2f8(%rbp) jmp 0x33c4c leaq 0x362313(%rip), %rdi # 0x395e94 leaq -0x548(%rip), %rsi # 0x33640 callq 0x24250 cmpl $0x800, -0x2fc(%rbp) # imm = 0x800 jae 0x33bc5 leaq -0xb8(%rbp), %rdi callq 0x32c60 movl -0x2fc(%rbp), %esi movq -0x308(%rbp), %rdx leaq -0xb8(%rbp), %rdi callq 0x33c90 movq %rax, -0x310(%rbp) cmpq $0x0, -0x310(%rbp) jne 0x33c3e movq -0x308(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x33c3e leaq -0x2d0(%rbp), %rdi callq 0x33300 movq %rax, %rdi leaq 0x4ca22(%rip), %rsi # 0x80618 callq 0x242a0 movb $0x23, -0x2f0(%rbp) movl -0x2fc(%rbp), %eax movl %eax, %edi leaq -0x2f0(%rbp), %rsi addq $0x1, %rsi movl $0xa, %edx callq 0x79ba0 leaq -0x2f0(%rbp), %rdx leaq -0x2d0(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x38de0 movq -0x310(%rbp), %rax movq %rax, -0x2f8(%rbp) movq -0x2f8(%rbp), %rax movq %rax, -0x318(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x33c7c movq -0x318(%rbp), %rax addq $0x320, %rsp # imm = 0x320 popq %rbp retq callq 0x24300 nopw %cs:(%rax,%rax)
get_charset: push rbp mov rbp, rsp sub rsp, 320h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2FC], edi mov [rbp+var_308], rsi mov [rbp+var_310], 0 mov eax, [rbp+var_2FC] lea rcx, default_charset_info mov rcx, [rcx] cmp eax, [rcx] jnz short loc_33B7A lea rax, default_charset_info mov rax, [rax] mov [rbp+var_2F8], rax jmp loc_33C4C loc_33B7A: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp [rbp+var_2FC], 800h jnb short loc_33BC5 lea rdi, [rbp+var_B8] call my_charset_loader_init_mysys mov esi, [rbp+var_2FC] mov rdx, [rbp+var_308] lea rdi, [rbp+var_B8] call get_internal_charset mov [rbp+var_310], rax loc_33BC5: cmp [rbp+var_310], 0 jnz short loc_33C3E mov rax, [rbp+var_308] and rax, 10h cmp rax, 0 jz short loc_33C3E lea rdi, [rbp+var_2D0] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov [rbp+var_2F0], 23h ; '#' mov eax, [rbp+var_2FC] mov edi, eax lea rsi, [rbp+var_2F0] add rsi, 1 mov edx, 0Ah call int10_to_str lea rdx, [rbp+var_2F0] lea rcx, [rbp+var_2D0] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_33C3E: mov rax, [rbp+var_310] mov [rbp+var_2F8], rax loc_33C4C: mov rax, [rbp+var_2F8] mov [rbp+var_318], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_33C7C mov rax, [rbp+var_318] add rsp, 320h pop rbp retn loc_33C7C: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { _BYTE *charsets_dir; // rax int v3; // r8d int v4; // r9d long long internal_charset; // [rsp+10h] [rbp-310h] char v8; // [rsp+30h] [rbp-2F0h] BYREF _BYTE v9[7]; // [rsp+31h] [rbp-2EFh] BYREF _BYTE v10[536]; // [rsp+50h] [rbp-2D0h] BYREF _BYTE v11[176]; // [rsp+268h] [rbp-B8h] BYREF unsigned long long v12; // [rsp+318h] [rbp-8h] v12 = __readfsqword(0x28u); internal_charset = 0LL; if ( a1 == *(_DWORD *)default_charset_info ) return default_charset_info; pthread_once(&charsets_initialized, init_available_charsets); if ( a1 < 0x800 ) { my_charset_loader_init_mysys((long long)v11); internal_charset = get_internal_charset(v11, a1, a2); } if ( !internal_charset && (a2 & 0x10) != 0 ) { charsets_dir = get_charsets_dir(v10); stpcpy(charsets_dir, "Index.xml"); v8 = 35; int10_to_str(a1, v9, 10LL); my_error(22, 4, (unsigned int)&v8, (unsigned int)v10, v3, v4); } return (void *)internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x320 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x2fc],EDI MOV qword ptr [RBP + -0x308],RSI MOV qword ptr [RBP + -0x310],0x0 MOV EAX,dword ptr [RBP + -0x2fc] LEA RCX,[0x2d5dd8] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX] JNZ 0x00133b7a LEA RAX,[0x2d5dd8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2f8],RAX JMP 0x00133c4c LAB_00133b7a: LEA RDI,[0x495e94] LEA RSI,[0x133640] CALL 0x00124250 CMP dword ptr [RBP + -0x2fc],0x800 JNC 0x00133bc5 LEA RDI,[RBP + -0xb8] CALL 0x00132c60 MOV ESI,dword ptr [RBP + -0x2fc] MOV RDX,qword ptr [RBP + -0x308] LEA RDI,[RBP + -0xb8] CALL 0x00133c90 MOV qword ptr [RBP + -0x310],RAX LAB_00133bc5: CMP qword ptr [RBP + -0x310],0x0 JNZ 0x00133c3e MOV RAX,qword ptr [RBP + -0x308] AND RAX,0x10 CMP RAX,0x0 JZ 0x00133c3e LEA RDI,[RBP + -0x2d0] CALL 0x00133300 MOV RDI,RAX LEA RSI,[0x180618] CALL 0x001242a0 MOV byte ptr [RBP + -0x2f0],0x23 MOV EAX,dword ptr [RBP + -0x2fc] MOV EDI,EAX LEA RSI,[RBP + -0x2f0] ADD RSI,0x1 MOV EDX,0xa CALL 0x00179ba0 LEA RDX,[RBP + -0x2f0] LEA RCX,[RBP + -0x2d0] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x00138de0 LAB_00133c3e: MOV RAX,qword ptr [RBP + -0x310] MOV qword ptr [RBP + -0x2f8],RAX LAB_00133c4c: MOV RAX,qword ptr [RBP + -0x2f8] MOV qword ptr [RBP + -0x318],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00133c7c MOV RAX,qword ptr [RBP + -0x318] ADD RSP,0x320 POP RBP RET LAB_00133c7c: CALL 0x00124300
int * get_charset(uint param_1,ulong param_2) { char *__dest; long in_FS_OFFSET; int *local_318; int *local_300; int1 local_2f8; int1 auStack_2f7 [31]; int1 local_2d8 [536]; int1 local_c0 [176]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_318 = (int *)0x0; if (param_1 == *(uint *)default_charset_info) { local_300 = default_charset_info; } else { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { my_charset_loader_init_mysys(local_c0); local_318 = (int *)get_internal_charset(local_c0,param_1,param_2); } if ((local_318 == (int *)0x0) && ((param_2 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_2d8); stpcpy(__dest,"Index.xml"); local_2f8 = 0x23; int10_to_str(param_1,auStack_2f7,10); my_error(0x16,4,&local_2f8,local_2d8); } local_300 = local_318; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_300; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
63,211
scan_tz_dir(char*, unsigned int, unsigned int)
eloqsql/sql/tztime.cc
my_bool scan_tz_dir(char * name_end, uint symlink_recursion_level, uint verbose) { MY_DIR *cur_dir; char *name_end_tmp; uint i; /* Sort directory data, to pass mtr tests on different platforms. */ if (!(cur_dir= my_dir(fullname, MYF(MY_WANT_STAT|MY_WANT_SORT)))) return 1; name_end= strmake(name_end, "/", FN_REFLEN - (name_end - fullname)); for (i= 0; i < cur_dir->number_of_files; i++) { if (cur_dir->dir_entry[i].name[0] != '.' && strcmp(cur_dir->dir_entry[i].name, "Factory")) { name_end_tmp= strmake(name_end, cur_dir->dir_entry[i].name, FN_REFLEN - (name_end - fullname)); if (MY_S_ISDIR(cur_dir->dir_entry[i].mystat->st_mode)) { my_bool is_symlink; if ((is_symlink= my_is_symlink(fullname)) && symlink_recursion_level > 0) { /* The timezone definition data in some Linux distributions (e.g. the "timezone-data-2013f" package in Gentoo) may have synlimks like: /usr/share/zoneinfo/posix/ -> /usr/share/zoneinfo/, so the same timezone files are available under two names (e.g. "CET" and "posix/CET"). We allow one level of symlink recursion for backward compatibility with earlier timezone data packages that have duplicate copies of the same timezone files inside the root directory and the "posix" subdirectory (instead of symlinking). This makes "posix/CET" still available, but helps to avoid following such symlinks infinitely: /usr/share/zoneinfo/posix/posix/posix/.../posix/ */ /* This is a normal case and not critical. only print warning if verbose mode is chosen. */ if (verbose > 0) { fflush(stdout); fprintf(stderr, "Warning: Skipping directory '%s': " "to avoid infinite symlink recursion.\n", fullname); } continue; } if (scan_tz_dir(name_end_tmp, symlink_recursion_level + is_symlink, verbose)) { my_dirend(cur_dir); return 1; } } else if (MY_S_ISREG(cur_dir->dir_entry[i].mystat->st_mode)) { init_alloc_root(PSI_INSTRUMENT_ME, &tz_storage, 32768, 0, MYF(MY_THREAD_SPECIFIC)); if (!tz_load(fullname, &tz_info, &tz_storage)) print_tz_as_sql(root_name_end + 1, &tz_info); else { /* Some systems (like Debian, openSUSE, etc) have non-timezone files: * iso3166.tab * leap-seconds.list * leapseconds * tzdata.zi * zone.tab * zone1970.tab We skip these silently unless verbose > 0. */ const char *current_ext= fn_ext(fullname); my_bool known_ext= strlen(current_ext) || !strcmp(my_basename(fullname), "leapseconds"); if (verbose > 0 || !known_ext) { fflush(stdout); fprintf(stderr, "Warning: Unable to load '%s' as time zone. Skipping it.\n", fullname); } } free_root(&tz_storage, MYF(0)); } else { fflush(stdout); fprintf(stderr, "Warning: '%s' is not regular file or directory\n", fullname); } } } my_dirend(cur_dir); return 0; }
O0
cpp
scan_tz_dir(char*, unsigned int, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) leaq 0x36b1c7(%rip), %rdi # 0x38fbd0 movl $0x6000, %esi # imm = 0x6000 callq 0x2fbc0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x24a26 movb $0x1, -0x1(%rbp) jmp 0x24d02 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax leaq 0x36b19b(%rip), %rcx # 0x38fbd0 subq %rcx, %rax movl $0x200, %edx # imm = 0x200 subq %rax, %rdx leaq 0x5fa28(%rip), %rsi # 0x8446f callq 0x7efc0 movq %rax, -0x10(%rbp) movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0x8(%rcx), %eax jae 0x24cf5 movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax movsbl (%rax), %eax cmpl $0x2e, %eax je 0x24ce5 movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi leaq 0x5c9ab(%rip), %rsi # 0x8144d callq 0x24410 cmpl $0x0, %eax je 0x24ce5 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rsi movq -0x10(%rbp), %rax leaq 0x36b0fd(%rip), %rcx # 0x38fbd0 subq %rcx, %rax movl $0x200, %edx # imm = 0x200 subq %rax, %rdx callq 0x7efc0 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movl 0x18(%rax), %eax andl $0xf000, %eax # imm = 0xF000 cmpl $0x4000, %eax # imm = 0x4000 jne 0x24b91 leaq 0x36b0ba(%rip), %rdi # 0x38fbd0 callq 0x30ca0 movb %al, -0x2d(%rbp) cmpb $0x0, %al je 0x24b61 cmpl $0x0, -0x14(%rbp) jbe 0x24b61 cmpl $0x0, -0x18(%rbp) jbe 0x24b5c movq 0x1b348b(%rip), %rax # 0x1d7fc0 movq (%rax), %rdi callq 0x24350 movq 0x1b349c(%rip), %rax # 0x1d7fe0 movq (%rax), %rdi leaq 0x5c907(%rip), %rsi # 0x81455 leaq 0x36b07b(%rip), %rdx # 0x38fbd0 movb $0x0, %al callq 0x24430 jmp 0x24ce7 movq -0x28(%rbp), %rdi movl -0x14(%rbp), %esi movsbl -0x2d(%rbp), %eax addl %eax, %esi movl -0x18(%rbp), %edx callq 0x249f0 cmpb $0x0, %al je 0x24b8c movq -0x20(%rbp), %rdi callq 0x2fb70 movb $0x1, -0x1(%rbp) jmp 0x24d02 jmp 0x24ce3 movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movl 0x18(%rax), %eax andl $0xf000, %eax # imm = 0xF000 cmpl $0x8000, %eax # imm = 0x8000 jne 0x24cb3 xorl %edi, %edi leaq 0x36afce(%rip), %rsi # 0x38fb90 movl $0x8000, %edx # imm = 0x8000 xorl %eax, %eax movl %eax, %ecx movl $0x10000, %r8d # imm = 0x10000 callq 0x2a260 leaq 0x36aff3(%rip), %rdi # 0x38fbd0 leaq 0x36af54(%rip), %rsi # 0x38fb38 leaq 0x36afa5(%rip), %rdx # 0x38fb90 callq 0x24d10 cmpb $0x0, %al jne 0x24c10 movq 0x36b1dd(%rip), %rdi # 0x38fdd8 addq $0x1, %rdi leaq 0x36af32(%rip), %rsi # 0x38fb38 callq 0x24720 jmp 0x24ca1 leaq 0x36afb9(%rip), %rdi # 0x38fbd0 callq 0x28d20 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi callq 0x24120 movq %rax, %rcx movb $0x1, %al cmpq $0x0, %rcx movb %al, -0x3a(%rbp) jne 0x24c5d leaq 0x36af92(%rip), %rdi # 0x38fbd0 callq 0x32350 movq %rax, %rdi leaq 0x5c850(%rip), %rsi # 0x8149d callq 0x24410 cmpl $0x0, %eax setne %al xorb $-0x1, %al movb %al, -0x3a(%rbp) movb -0x3a(%rbp), %al andb $0x1, %al movb %al, -0x39(%rbp) cmpl $0x0, -0x18(%rbp) ja 0x24c71 cmpb $0x0, -0x39(%rbp) jne 0x24c9f movq 0x1b3348(%rip), %rax # 0x1d7fc0 movq (%rax), %rdi callq 0x24350 movq 0x1b3359(%rip), %rax # 0x1d7fe0 movq (%rax), %rdi leaq 0x5c818(%rip), %rsi # 0x814a9 leaq 0x36af38(%rip), %rdx # 0x38fbd0 movb $0x0, %al callq 0x24430 jmp 0x24ca1 leaq 0x36aee8(%rip), %rdi # 0x38fb90 xorl %eax, %eax movl %eax, %esi callq 0x2aad0 jmp 0x24ce1 movq 0x1b3306(%rip), %rax # 0x1d7fc0 movq (%rax), %rdi callq 0x24350 movq 0x1b3317(%rip), %rax # 0x1d7fe0 movq (%rax), %rdi leaq 0x5c80f(%rip), %rsi # 0x814e2 leaq 0x36aef6(%rip), %rdx # 0x38fbd0 movb $0x0, %al callq 0x24430 jmp 0x24ce3 jmp 0x24ce5 jmp 0x24ce7 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x24a57 movq -0x20(%rbp), %rdi callq 0x2fb70 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
_Z11scan_tz_dirPcjj: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx lea rdi, fullname mov esi, 6000h call my_dir mov [rbp+var_20], rax cmp rax, 0 jnz short loc_24A26 mov [rbp+var_1], 1 jmp loc_24D02 loc_24A26: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] lea rcx, fullname sub rax, rcx mov edx, 200h sub rdx, rax lea rsi, unk_8446F call strmake mov [rbp+var_10], rax mov [rbp+var_2C], 0 loc_24A57: mov eax, [rbp+var_2C] mov rcx, [rbp+var_20] cmp eax, [rcx+8] jnb loc_24CF5 mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov rax, [rax] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jz loc_24CE5 mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov rdi, [rax] lea rsi, aFactory; "Factory" call _strcmp cmp eax, 0 jz loc_24CE5 mov rdi, [rbp+var_10] mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov rsi, [rax] mov rax, [rbp+var_10] lea rcx, fullname sub rax, rcx mov edx, 200h sub rdx, rax call strmake mov [rbp+var_28], rax mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov eax, [rax+18h] and eax, 0F000h cmp eax, 4000h jnz loc_24B91 lea rdi, fullname call my_is_symlink mov [rbp+var_2D], al cmp al, 0 jz short loc_24B61 cmp [rbp+var_14], 0 jbe short loc_24B61 cmp [rbp+var_18], 0 jbe short loc_24B5C mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aWarningSkippin; "Warning: Skipping directory '%s': to av"... lea rdx, fullname mov al, 0 call _fprintf loc_24B5C: jmp loc_24CE7 loc_24B61: mov rdi, [rbp+var_28]; char * mov esi, [rbp+var_14] movsx eax, [rbp+var_2D] add esi, eax; unsigned int mov edx, [rbp+var_18]; unsigned int call _Z11scan_tz_dirPcjj; scan_tz_dir(char *,uint,uint) cmp al, 0 jz short loc_24B8C mov rdi, [rbp+var_20] call my_dirend mov [rbp+var_1], 1 jmp loc_24D02 loc_24B8C: jmp loc_24CE3 loc_24B91: mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov eax, [rax+18h] and eax, 0F000h cmp eax, 8000h jnz loc_24CB3 xor edi, edi lea rsi, tz_storage mov edx, 8000h xor eax, eax mov ecx, eax mov r8d, 10000h call init_alloc_root lea rdi, fullname lea rsi, tz_info lea rdx, tz_storage call _ZL7tz_loadPKcP17st_time_zone_infoP11st_mem_root; tz_load(char const*,st_time_zone_info *,st_mem_root *) cmp al, 0 jnz short loc_24C10 mov rdi, cs:root_name_end add rdi, 1 lea rsi, tz_info call _Z15print_tz_as_sqlPKcPK17st_time_zone_info; print_tz_as_sql(char const*,st_time_zone_info const*) jmp loc_24CA1 loc_24C10: lea rdi, fullname call fn_ext mov [rbp+var_38], rax mov rdi, [rbp+var_38] call _strlen mov rcx, rax mov al, 1 cmp rcx, 0 mov [rbp+var_3A], al jnz short loc_24C5D lea rdi, fullname call my_basename mov rdi, rax lea rsi, aLeapseconds; "leapseconds" call _strcmp cmp eax, 0 setnz al xor al, 0FFh mov [rbp+var_3A], al loc_24C5D: mov al, [rbp+var_3A] and al, 1 mov [rbp+var_39], al cmp [rbp+var_18], 0 ja short loc_24C71 cmp [rbp+var_39], 0 jnz short loc_24C9F loc_24C71: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aWarningUnableT; "Warning: Unable to load '%s' as time zo"... lea rdx, fullname mov al, 0 call _fprintf loc_24C9F: jmp short $+2 loc_24CA1: lea rdi, tz_storage xor eax, eax mov esi, eax call free_root jmp short loc_24CE1 loc_24CB3: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aWarningSIsNotR; "Warning: '%s' is not regular file or di"... lea rdx, fullname mov al, 0 call _fprintf loc_24CE1: jmp short $+2 loc_24CE3: jmp short $+2 loc_24CE5: jmp short $+2 loc_24CE7: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_24A57 loc_24CF5: mov rdi, [rbp+var_20] call my_dirend mov [rbp+var_1], 0 loc_24D02: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char scan_tz_dir(char *a1, int a2, unsigned int a3) { long long v3; // rax char v5; // [rsp+6h] [rbp-3Ah] long long v6; // [rsp+8h] [rbp-38h] char is_symlink; // [rsp+13h] [rbp-2Dh] unsigned int i; // [rsp+14h] [rbp-2Ch] char *v9; // [rsp+18h] [rbp-28h] long long v10; // [rsp+20h] [rbp-20h] long long v12; // [rsp+30h] [rbp-10h] v10 = my_dir(fullname, 24576LL); if ( !v10 ) return 1; v12 = strmake(a1, &unk_8446F, 512 - (a1 - fullname)); for ( i = 0; i < *(_DWORD *)(v10 + 8); ++i ) { if ( **(_BYTE **)(16LL * i + *(_QWORD *)v10) != 46 && (unsigned int)strcmp(*(_QWORD *)(16LL * i + *(_QWORD *)v10), "Factory") ) { v9 = (char *)strmake(v12, *(_QWORD *)(16LL * i + *(_QWORD *)v10), 512 - (v12 - (_QWORD)fullname)); if ( (*(_DWORD *)(*(_QWORD *)(16LL * i + *(_QWORD *)v10 + 8) + 24LL) & 0xF000) == 0x4000 ) { is_symlink = my_is_symlink(fullname); if ( is_symlink && a2 ) { if ( a3 ) { fflush(stdout); fprintf(stderr, "Warning: Skipping directory '%s': to avoid infinite symlink recursion.\n", fullname); } } else if ( (unsigned __int8)scan_tz_dir(v9, is_symlink + a2, a3) ) { my_dirend(v10); return 1; } } else if ( (*(_DWORD *)(*(_QWORD *)(16LL * i + *(_QWORD *)v10 + 8) + 24LL) & 0xF000) == 0x8000 ) { init_alloc_root(0LL, &tz_storage, 0x8000LL, 0LL, 0x10000LL); if ( (unsigned __int8)tz_load(fullname, &tz_info, &tz_storage) ) { v6 = fn_ext(fullname); v5 = 1; if ( !strlen(v6) ) { v3 = my_basename(fullname); v5 = ~((unsigned int)strcmp(v3, "leapseconds") != 0); } if ( a3 || (v5 & 1) == 0 ) { fflush(stdout); fprintf(stderr, "Warning: Unable to load '%s' as time zone. Skipping it.\n", fullname); } } else { print_tz_as_sql(root_name_end + 1, (long long)&tz_info); } free_root(&tz_storage, 0LL); } else { fflush(stdout); fprintf(stderr, "Warning: '%s' is not regular file or directory\n", fullname); } } } my_dirend(v10); return 0; }
scan_tz_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX LEA RDI,[0x48fbd0] MOV ESI,0x6000 CALL 0x0012fbc0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x00124a26 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00124d02 LAB_00124a26: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x48fbd0] SUB RAX,RCX MOV EDX,0x200 SUB RDX,RAX LEA RSI,[0x18446f] CALL 0x0017efc0 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x2c],0x0 LAB_00124a57: MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x20] CMP EAX,dword ptr [RCX + 0x8] JNC 0x00124cf5 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JZ 0x00124ce5 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] LEA RSI,[0x18144d] CALL 0x00124410 CMP EAX,0x0 JZ 0x00124ce5 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x48fbd0] SUB RAX,RCX MOV EDX,0x200 SUB RDX,RAX CALL 0x0017efc0 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0xf000 CMP EAX,0x4000 JNZ 0x00124b91 LEA RDI,[0x48fbd0] CALL 0x00130ca0 MOV byte ptr [RBP + -0x2d],AL CMP AL,0x0 JZ 0x00124b61 CMP dword ptr [RBP + -0x14],0x0 JBE 0x00124b61 CMP dword ptr [RBP + -0x18],0x0 JBE 0x00124b5c MOV RAX,qword ptr [0x002d7fc0] MOV RDI,qword ptr [RAX] CALL 0x00124350 MOV RAX,qword ptr [0x002d7fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x181455] LEA RDX,[0x48fbd0] MOV AL,0x0 CALL 0x00124430 LAB_00124b5c: JMP 0x00124ce7 LAB_00124b61: MOV RDI,qword ptr [RBP + -0x28] MOV ESI,dword ptr [RBP + -0x14] MOVSX EAX,byte ptr [RBP + -0x2d] ADD ESI,EAX MOV EDX,dword ptr [RBP + -0x18] CALL 0x001249f0 CMP AL,0x0 JZ 0x00124b8c MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012fb70 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00124d02 LAB_00124b8c: JMP 0x00124ce3 LAB_00124b91: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0xf000 CMP EAX,0x8000 JNZ 0x00124cb3 XOR EDI,EDI LEA RSI,[0x48fb90] MOV EDX,0x8000 XOR EAX,EAX MOV ECX,EAX MOV R8D,0x10000 CALL 0x0012a260 LEA RDI,[0x48fbd0] LEA RSI,[0x48fb38] LEA RDX,[0x48fb90] CALL 0x00124d10 CMP AL,0x0 JNZ 0x00124c10 MOV RDI,qword ptr [0x0048fdd8] ADD RDI,0x1 LEA RSI,[0x48fb38] CALL 0x00124720 JMP 0x00124ca1 LAB_00124c10: LEA RDI,[0x48fbd0] CALL 0x00128d20 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x38] CALL 0x00124120 MOV RCX,RAX MOV AL,0x1 CMP RCX,0x0 MOV byte ptr [RBP + -0x3a],AL JNZ 0x00124c5d LEA RDI,[0x48fbd0] CALL 0x00132350 MOV RDI,RAX LEA RSI,[0x18149d] CALL 0x00124410 CMP EAX,0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x3a],AL LAB_00124c5d: MOV AL,byte ptr [RBP + -0x3a] AND AL,0x1 MOV byte ptr [RBP + -0x39],AL CMP dword ptr [RBP + -0x18],0x0 JA 0x00124c71 CMP byte ptr [RBP + -0x39],0x0 JNZ 0x00124c9f LAB_00124c71: MOV RAX,qword ptr [0x002d7fc0] MOV RDI,qword ptr [RAX] CALL 0x00124350 MOV RAX,qword ptr [0x002d7fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x1814a9] LEA RDX,[0x48fbd0] MOV AL,0x0 CALL 0x00124430 LAB_00124c9f: JMP 0x00124ca1 LAB_00124ca1: LEA RDI,[0x48fb90] XOR EAX,EAX MOV ESI,EAX CALL 0x0012aad0 JMP 0x00124ce1 LAB_00124cb3: MOV RAX,qword ptr [0x002d7fc0] MOV RDI,qword ptr [RAX] CALL 0x00124350 MOV RAX,qword ptr [0x002d7fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x1814e2] LEA RDX,[0x48fbd0] MOV AL,0x0 CALL 0x00124430 LAB_00124ce1: JMP 0x00124ce3 LAB_00124ce3: JMP 0x00124ce5 LAB_00124ce5: JMP 0x00124ce7 LAB_00124ce7: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00124a57 LAB_00124cf5: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012fb70 MOV byte ptr [RBP + -0x1],0x0 LAB_00124d02: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
/* scan_tz_dir(char*, unsigned int, unsigned int) */ int1 scan_tz_dir(char *param_1,uint param_2,uint param_3) { char cVar1; int iVar2; long *plVar3; long lVar4; char *pcVar5; size_t sVar6; bool bVar7; uint local_34; int1 local_9; plVar3 = (long *)my_dir(fullname,0x6000); if (plVar3 == (long *)0x0) { local_9 = 1; } else { lVar4 = strmake(param_1,&DAT_0018446f,0x200 - (long)(param_1 + -0x48fbd0)); for (local_34 = 0; local_34 < *(uint *)(plVar3 + 1); local_34 = local_34 + 1) { if ((**(char **)(*plVar3 + (ulong)local_34 * 0x10) != '.') && (iVar2 = strcmp(*(char **)(*plVar3 + (ulong)local_34 * 0x10),"Factory"), iVar2 != 0)) { pcVar5 = (char *)strmake(lVar4,*(int8 *)(*plVar3 + (ulong)local_34 * 0x10), 0x200 - (lVar4 + -0x48fbd0)); if ((*(uint *)(*(long *)(*plVar3 + (ulong)local_34 * 0x10 + 8) + 0x18) & 0xf000) == 0x4000) { cVar1 = my_is_symlink(fullname); if ((cVar1 == '\0') || (param_2 == 0)) { cVar1 = scan_tz_dir(pcVar5,param_2 + (int)cVar1,param_3); if (cVar1 != '\0') { my_dirend(plVar3); return 1; } } else if (param_3 != 0) { fflush(*(FILE **)PTR_stdout_002d7fc0); fprintf(*(FILE **)PTR_stderr_002d7fe0, "Warning: Skipping directory \'%s\': to avoid infinite symlink recursion.\n", fullname); } } else if ((*(uint *)(*(long *)(*plVar3 + (ulong)local_34 * 0x10 + 8) + 0x18) & 0xf000) == 0x8000) { init_alloc_root(0,tz_storage,0x8000,0,0x10000); cVar1 = tz_load(fullname,(st_time_zone_info *)tz_info,(st_mem_root *)tz_storage); if (cVar1 == '\0') { print_tz_as_sql((char *)(root_name_end + 1),(st_time_zone_info *)tz_info); } else { pcVar5 = (char *)fn_ext(fullname); sVar6 = strlen(pcVar5); bVar7 = true; if (sVar6 == 0) { pcVar5 = (char *)my_basename(fullname); iVar2 = strcmp(pcVar5,"leapseconds"); bVar7 = iVar2 == 0; } if ((param_3 != 0) || (!bVar7)) { fflush(*(FILE **)PTR_stdout_002d7fc0); fprintf(*(FILE **)PTR_stderr_002d7fe0, "Warning: Unable to load \'%s\' as time zone. Skipping it.\n",fullname); } } free_root(tz_storage,0); } else { fflush(*(FILE **)PTR_stdout_002d7fc0); fprintf(*(FILE **)PTR_stderr_002d7fe0,"Warning: \'%s\' is not regular file or directory\n" ,fullname); } } } my_dirend(plVar3); local_9 = 0; } return local_9; }
63,212
my_caseup_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_utf8mb3(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_utf8mb3_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0) { my_toupper_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O0
c
my_caseup_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x58(%rbp) jmp 0x6384a jmp 0x6384c movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x6387c movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x634e0 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x63885 jmp 0x638d8 movq -0x58(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x64650 movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x48(%rbp), %rcx callq 0x63510 movl %eax, -0x38(%rbp) cmpl $0x0, %eax jg 0x638b1 jmp 0x638d8 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x38(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x6384c movq -0x20(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_caseup_utf8mb3: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov [rbp+var_50], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_58], rax jmp short $+2 loc_6384A: jmp short $+2 loc_6384C: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_6387C mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_utf8mb3_uni mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_6387C: mov al, [rbp+var_59] test al, 1 jnz short loc_63885 jmp short loc_638D8 loc_63885: mov rdi, [rbp+var_58] lea rsi, [rbp+var_30] call my_toupper_utf8mb3 mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_48] call my_uni_utf8mb3 mov [rbp+var_38], eax cmp eax, 0 jg short loc_638B1 jmp short loc_638D8 loc_638B1: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_38] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp loc_6384C loc_638D8: mov rax, [rbp+var_20] mov rcx, [rbp+var_50] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * my_caseup_utf8mb3(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6) { bool v7; // [rsp+7h] [rbp-59h] long long v8; // [rsp+8h] [rbp-58h] unsigned long long v10; // [rsp+18h] [rbp-48h] unsigned long long v11; // [rsp+20h] [rbp-40h] int v12; // [rsp+28h] [rbp-38h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF _BYTE *v15; // [rsp+40h] [rbp-20h] long long v16; // [rsp+48h] [rbp-18h] unsigned long long v17; // [rsp+50h] [rbp-10h] long long v18; // [rsp+58h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14[1] = a5; v11 = a3 + a2; v10 = (unsigned long long)&a4[a5]; v8 = *(_QWORD *)(a1 + 120); while ( 1 ) { v7 = 0; if ( v17 < v11 ) { v13 = my_utf8mb3_uni(v18, (long long)v14, v17, v11, a5, a6); v7 = v13 > 0; } if ( !v7 ) break; my_toupper_utf8mb3(v8, v14); v12 = my_uni_utf8mb3(v18, v14[0], v15, v10); if ( v12 <= 0 ) break; v17 += v13; v15 += v12; } return (_BYTE *)(v15 - a4); }
my_caseup_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x58],RAX JMP 0x0016384a LAB_0016384a: JMP 0x0016384c LAB_0016384c: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x59],AL JNC 0x0016387c MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x001634e0 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x59],AL LAB_0016387c: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x00163885 JMP 0x001638d8 LAB_00163885: MOV RDI,qword ptr [RBP + -0x58] LEA RSI,[RBP + -0x30] CALL 0x00164650 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x48] CALL 0x00163510 MOV dword ptr [RBP + -0x38],EAX CMP EAX,0x0 JG 0x001638b1 JMP 0x001638d8 LAB_001638b1: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x0016384c LAB_001638d8: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_caseup_utf8mb3(long param_1,ulong param_2,long param_3,long param_4,long param_5) { int8 uVar1; bool bVar2; int iVar3; int local_3c; int8 local_38; long local_30; long local_28; long local_20; ulong local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (local_18 < param_2 + param_3) { local_3c = my_utf8mb3_uni(local_10,&local_38,local_18,param_2 + param_3); bVar2 = 0 < local_3c; } if (!bVar2) break; my_toupper_utf8mb3(uVar1,&local_38); iVar3 = my_uni_utf8mb3(local_10,local_38,local_28,param_4 + param_5); if (iVar3 < 1) break; local_18 = local_18 + (long)local_3c; local_28 = local_28 + iVar3; } return local_28 - param_4; }
63,213
rw_pr_unlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_unlock(rw_pr_lock_t *rwlock) { if (rwlock->active_writer) { /* We are unlocking wr-lock. */ #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif rwlock->active_writer= FALSE; if (rwlock->writers_waiting_readers) { /* Avoid expensive cond signal in case when there is no contention or it is wr-only. Note that from view point of performance it would be better to signal on the condition variable after unlocking mutex (as it reduces number of contex switches). Unfortunately this would mean that such rwlock can't be safely used by MDL subsystem, which relies on the fact that it is OK to destroy rwlock once it is in unlocked state. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } else { /* We are unlocking rd-lock. */ pthread_mutex_lock(&rwlock->lock); rwlock->active_readers--; if (rwlock->active_readers == 0 && rwlock->writers_waiting_readers) { /* If we are last reader and there are waiting writers wake them up. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } return 0; }
O0
c
rw_pr_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x60(%rax) je 0x267d0 movq -0x8(%rbp), %rax movb $0x0, 0x60(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x5c(%rax) je 0x267c5 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x24030 movq -0x8(%rbp), %rdi callq 0x241d0 jmp 0x26810 movq -0x8(%rbp), %rdi callq 0x243c0 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) jne 0x26807 movq -0x8(%rbp), %rax cmpl $0x0, 0x5c(%rax) je 0x26807 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x24030 movq -0x8(%rbp), %rdi callq 0x241d0 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
rw_pr_unlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp byte ptr [rax+60h], 0 jz short loc_267D0 mov rax, [rbp+var_8] mov byte ptr [rax+60h], 0 mov rax, [rbp+var_8] cmp dword ptr [rax+5Ch], 0 jz short loc_267C5 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_signal loc_267C5: mov rdi, [rbp+var_8] call _pthread_mutex_unlock jmp short loc_26810 loc_267D0: mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 0FFFFFFFFh mov [rax+58h], ecx mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jnz short loc_26807 mov rax, [rbp+var_8] cmp dword ptr [rax+5Ch], 0 jz short loc_26807 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_signal loc_26807: mov rdi, [rbp+var_8] call _pthread_mutex_unlock loc_26810: xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_unlock(long long a1) { if ( *(_BYTE *)(a1 + 96) ) { *(_BYTE *)(a1 + 96) = 0; if ( *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); } else { pthread_mutex_lock(a1); if ( !--*(_DWORD *)(a1 + 88) && *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); } pthread_mutex_unlock(a1); return 0LL; }
rw_pr_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x60],0x0 JZ 0x001267d0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x001267c5 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x00124030 LAB_001267c5: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001241d0 JMP 0x00126810 LAB_001267d0: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001243c0 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,-0x1 MOV dword ptr [RAX + 0x58],ECX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JNZ 0x00126807 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x00126807 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x00124030 LAB_00126807: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001241d0 LAB_00126810: XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_unlock(pthread_mutex_t *param_1) { if (*(char *)((long)param_1 + 0x60) == '\0') { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + -1; if ((*(int *)((long)param_1 + 0x58) == 0) && (*(int *)((long)param_1 + 0x5c) != 0)) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); } else { *(int1 *)((long)param_1 + 0x60) = 0; if (*(int *)((long)param_1 + 0x5c) != 0) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); } return 0; }
63,214
chess::Board::makeNullMove()
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
void makeNullMove() { prev_states_.emplace_back(key_, cr_, ep_sq_, hfm_, Piece::NONE); key_ ^= Zobrist::sideToMove(); if (ep_sq_ != Square::underlying::NO_SQ) key_ ^= Zobrist::enpassant(ep_sq_.file()); ep_sq_ = Square::underlying::NO_SQ; stm_ = ~stm_; plies_++; }
O0
cpp
chess::Board::makeNullMove(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %r8 movq %r8, -0x28(%rbp) movq %r8, %rdi addq $0x8, %rdi movq %r8, %rsi addq $0xa0, %rsi movq %r8, %rdx addq $0xa8, %rdx movq %r8, %rcx addq $0xb0, %rcx addq $0xb4, %r8 leaq 0x4a01(%rip), %r9 # 0x24728 callq 0x1ff70 callq 0x7dc0 movq %rax, %rcx movq -0x28(%rbp), %rax xorq 0xa0(%rax), %rcx movq %rcx, 0xa0(%rax) addq $0xb0, %rax movq %rax, -0x20(%rbp) leaq -0xc(%rbp), %rdi movl $0x40, %esi callq 0x5e80 movq -0x20(%rbp), %rdi leaq -0xc(%rbp), %rsi callq 0x84a0 testb $0x1, %al jne 0x1fd71 jmp 0x1fda2 movq -0x28(%rbp), %rdi addq $0xb0, %rdi callq 0x4d00 movb %al, -0xd(%rbp) movzbl -0xd(%rbp), %edi callq 0x8aa0 movq %rax, %rcx movq -0x28(%rbp), %rax xorq 0xa0(%rax), %rcx movq %rcx, 0xa0(%rax) leaq -0x14(%rbp), %rdi movl $0x40, %esi callq 0x5e80 movq -0x28(%rbp), %rdi movl -0x14(%rbp), %eax movl %eax, 0xb0(%rdi) addq $0xae, %rdi callq 0xa7e0 movb %al, %cl movq -0x28(%rbp), %rax movb %cl, -0x15(%rbp) movb -0x15(%rbp), %cl movb %cl, 0xae(%rax) movw 0xac(%rax), %cx addw $0x1, %cx movw %cx, 0xac(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5chess5Board12makeNullMoveEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov r8, [rbp+var_8] mov [rbp+var_28], r8 mov rdi, r8 add rdi, 8; this mov rsi, r8 add rsi, 0A0h mov rdx, r8 add rdx, 0A8h mov rcx, r8 add rcx, 0B0h add r8, 0B4h lea r9, _ZN5chess5Piece4NONEE; chess::Piece::NONE call _ZNSt6vectorIN5chess5Board5StateESaIS2_EE12emplace_backIJRmRNS1_14CastlingRightsERNS0_6SquareERhRKNS0_5Piece10underlyingEEEERS2_DpOT_; std::vector<chess::Board::State>::emplace_back<ulong &,chess::Board::CastlingRights &,chess::Square &,uchar &,chess::Piece::underlying const&>(ulong &,chess::Board::CastlingRights &,chess::Square &,uchar &,chess::Piece::underlying const&) call _ZN5chess7Zobrist10sideToMoveEv; chess::Zobrist::sideToMove(void) mov rcx, rax mov rax, [rbp+var_28] xor rcx, [rax+0A0h] mov [rax+0A0h], rcx add rax, 0B0h mov [rbp+var_20], rax lea rdi, [rbp+var_C] mov esi, 40h ; '@' call _ZN5chess6SquareC2ENS0_10underlyingE; chess::Square::Square(chess::Square::underlying) mov rdi, [rbp+var_20] lea rsi, [rbp+var_C] call _ZNK5chess6SquareneERKS0_; chess::Square::operator!=(chess::Square const&) test al, 1 jnz short loc_1FD71 jmp short loc_1FDA2 loc_1FD71: mov rdi, [rbp+var_28] add rdi, 0B0h; this call _ZNK5chess6Square4fileEv; chess::Square::file(void) mov [rbp+var_D], al movzx edi, [rbp+var_D] call _ZN5chess7Zobrist9enpassantENS_4FileE; chess::Zobrist::enpassant(chess::File) mov rcx, rax mov rax, [rbp+var_28] xor rcx, [rax+0A0h] mov [rax+0A0h], rcx loc_1FDA2: lea rdi, [rbp+var_14] mov esi, 40h ; '@' call _ZN5chess6SquareC2ENS0_10underlyingE; chess::Square::Square(chess::Square::underlying) mov rdi, [rbp+var_28] mov eax, [rbp+var_14] mov [rdi+0B0h], eax add rdi, 0AEh call _ZNK5chess5ColorcoEv; chess::Color::operator~(void) mov cl, al mov rax, [rbp+var_28] mov [rbp+var_15], cl mov cl, [rbp+var_15] mov [rax+0AEh], cl mov cx, [rax+0ACh] add cx, 1 mov [rax+0ACh], cx add rsp, 30h pop rbp retn
chess::Board * chess::Board::makeNullMove(chess::Board *this) { chess::Zobrist *v1; // rdi char v2; // cl chess::Board *result; // rax int v5; // [rsp+1Ch] [rbp-14h] BYREF char v6; // [rsp+23h] [rbp-Dh] int v7; // [rsp+24h] [rbp-Ch] BYREF chess::Board *v8; // [rsp+28h] [rbp-8h] v8 = this; v1 = (chess::Board *)((char *)this + 8); std::vector<chess::Board::State>::emplace_back<unsigned long &,chess::Board::CastlingRights &,chess::Square &,unsigned char &,chess::Piece::underlying const&>( v1, (char *)this + 160, (char *)this + 168, (char *)this + 176, (char *)this + 180, chess::Piece::NONE); *((_QWORD *)this + 20) ^= chess::Zobrist::sideToMove(v1); chess::Square::Square(&v7, 64); if ( chess::Square::operator!=((_DWORD *)this + 44, &v7) ) { v6 = chess::Square::file((chess::Board *)((char *)this + 176)); *((_QWORD *)this + 20) ^= chess::Zobrist::enpassant(v6); } chess::Square::Square(&v5, 64); *((_DWORD *)this + 44) = v5; v2 = chess::Color::operator~((unsigned __int8 *)this + 174); result = this; *((_BYTE *)this + 174) = v2; ++*((_WORD *)this + 86); return result; }
makeNullMove: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV R8,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],R8 MOV RDI,R8 ADD RDI,0x8 MOV RSI,R8 ADD RSI,0xa0 MOV RDX,R8 ADD RDX,0xa8 MOV RCX,R8 ADD RCX,0xb0 ADD R8,0xb4 LEA R9,[0x124728] CALL 0x0011ff70 CALL 0x00107dc0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] XOR RCX,qword ptr [RAX + 0xa0] MOV qword ptr [RAX + 0xa0],RCX ADD RAX,0xb0 MOV qword ptr [RBP + -0x20],RAX LEA RDI,[RBP + -0xc] MOV ESI,0x40 CALL 0x00105e80 MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xc] CALL 0x001084a0 TEST AL,0x1 JNZ 0x0011fd71 JMP 0x0011fda2 LAB_0011fd71: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xb0 CALL 0x00104d00 MOV byte ptr [RBP + -0xd],AL MOVZX EDI,byte ptr [RBP + -0xd] CALL 0x00108aa0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] XOR RCX,qword ptr [RAX + 0xa0] MOV qword ptr [RAX + 0xa0],RCX LAB_0011fda2: LEA RDI,[RBP + -0x14] MOV ESI,0x40 CALL 0x00105e80 MOV RDI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RDI + 0xb0],EAX ADD RDI,0xae CALL 0x0010a7e0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x15],CL MOV CL,byte ptr [RBP + -0x15] MOV byte ptr [RAX + 0xae],CL MOV CX,word ptr [RAX + 0xac] ADD CX,0x1 MOV word ptr [RAX + 0xac],CX ADD RSP,0x30 POP RBP RET
/* chess::Board::makeNullMove() */ void __thiscall chess::Board::makeNullMove(Board *this) { Board BVar1; ulong uVar2; int4 local_1c; int1 local_15; Square local_14 [4]; Board *local_10; local_10 = this; std::vector<chess::Board::State,std::allocator<chess::Board::State>>:: emplace_back<unsigned_long&,chess::Board::CastlingRights&,chess::Square&,unsigned_char&,chess::Piece::underlying_const&> ((vector<chess::Board::State,std::allocator<chess::Board::State>> *)(this + 8), (ulong *)(this + 0xa0),(CastlingRights *)(this + 0xa8),(Square *)(this + 0xb0), (uchar *)(this + 0xb4),&Piece::NONE); uVar2 = Zobrist::sideToMove(); *(ulong *)(this + 0xa0) = uVar2 ^ *(ulong *)(this + 0xa0); Square::Square(local_14,0x40); uVar2 = Square::operator!=((Square *)(this + 0xb0),local_14); if ((uVar2 & 1) != 0) { local_15 = Square::file((Square *)(this + 0xb0)); uVar2 = Zobrist::enpassant(local_15); *(ulong *)(this + 0xa0) = uVar2 ^ *(ulong *)(this + 0xa0); } Square::Square((Square *)&local_1c,0x40); *(int4 *)(this + 0xb0) = local_1c; BVar1 = (Board)Color::operator~((Color *)(this + 0xae)); this[0xae] = BVar1; *(short *)(this + 0xac) = *(short *)(this + 0xac) + 1; return; }
63,215
chess::Board::makeNullMove()
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
void makeNullMove() { prev_states_.emplace_back(key_, cr_, ep_sq_, hfm_, Piece::NONE); key_ ^= Zobrist::sideToMove(); if (ep_sq_ != Square::underlying::NO_SQ) key_ ^= Zobrist::enpassant(ep_sq_.file()); ep_sq_ = Square::underlying::NO_SQ; stm_ = ~stm_; plies_++; }
O1
cpp
chess::Board::makeNullMove(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx addq $0x8, %rdi leaq 0xa0(%rbx), %r14 leaq 0xa8(%rbx), %rdx leaq 0xb0(%rbx), %rcx leaq 0xb4(%rbx), %r8 leaq 0x5294(%rip), %r9 # 0x11df0 movq %r14, %rsi callq 0xcc56 movabsq $-0x729d95550d87af7, %rax # imm = 0xF8D626AAAF278509 xorq 0xa0(%rbx), %rax movq %rax, 0xa0(%rbx) movl 0xb0(%rbx), %ecx cmpq $0x40, %rcx je 0xcb9d andl $0x7, %ecx leaq 0x207e(%rip), %rdx # 0xec10 xorq 0x1820(%rdx,%rcx,8), %rax movq %rax, (%r14) movl $0x40, 0xb0(%rbx) movb 0xae(%rbx), %al cmpb $0x2, %al jae 0xcbc8 xorb $0x1, %al movb %al, 0xae(%rbx) incw 0xac(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x1bdd(%rip), %rdi # 0xe7ac leaq 0x4006(%rip), %rsi # 0x10bdc leaq 0x1beb(%rip), %rcx # 0xe7c8 movl $0x48, %edx callq 0x3130 nop
_ZN5chess5Board12makeNullMoveEv: push r14 push rbx push rax mov rbx, rdi add rdi, 8 lea r14, [rbx+0A0h] lea rdx, [rbx+0A8h] lea rcx, [rbx+0B0h] lea r8, [rbx+0B4h] lea r9, _ZN5chess5Piece4NONEE; chess::Piece::NONE mov rsi, r14 call _ZNSt6vectorIN5chess5Board5StateESaIS2_EE12emplace_backIJRmRNS1_14CastlingRightsERNS0_6SquareERhRKNS0_5Piece10underlyingEEEERS2_DpOT_; std::vector<chess::Board::State>::emplace_back<ulong &,chess::Board::CastlingRights &,chess::Square &,uchar &,chess::Piece::underlying const&>(ulong &,chess::Board::CastlingRights &,chess::Square &,uchar &,chess::Piece::underlying const&) mov rax, 0F8D626AAAF278509h xor rax, [rbx+0A0h] mov [rbx+0A0h], rax mov ecx, [rbx+0B0h] cmp rcx, 40h ; '@' jz short loc_CB9D and ecx, 7 lea rdx, _ZN5chess7Zobrist12RANDOM_ARRAYE; chess::Zobrist::RANDOM_ARRAY xor rax, [rdx+rcx*8+1820h] mov [r14], rax loc_CB9D: mov dword ptr [rbx+0B0h], 40h ; '@' mov al, [rbx+0AEh] cmp al, 2 jnb short loc_CBC8 xor al, 1 mov [rbx+0AEh], al inc word ptr [rbx+0ACh] add rsp, 8 pop rbx pop r14 retn loc_CBC8: lea rdi, aC0C1C1; "c == 0 || c == 1 || c == -1" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aChessColorColo; "chess::Color::Color(int)" mov edx, 48h ; 'H' call ___assert_fail
char chess::Board::makeNullMove(chess::Board *this) { long long v1; // rax unsigned long long v2; // rax long long v3; // rcx unsigned __int8 v4; // al char result; // al std::vector<chess::Board::State>::emplace_back<unsigned long &,chess::Board::CastlingRights &,chess::Square &,unsigned char &,chess::Piece::underlying const&>( (char *)this + 8, (char *)this + 160, (char *)this + 168, (char *)this + 176, (char *)this + 180, &chess::Piece::NONE, v1); v2 = *((_QWORD *)this + 20) ^ 0xF8D626AAAF278509LL; *((_QWORD *)this + 20) = v2; v3 = *((unsigned int *)this + 44); if ( v3 != 64 ) *((_QWORD *)this + 20) = chess::Zobrist::RANDOM_ARRAY[(v3 & 7) + 772] ^ v2; *((_DWORD *)this + 44) = 64; v4 = *((_BYTE *)this + 174); if ( v4 >= 2u ) __assert_fail( "c == 0 || c == 1 || c == -1", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 72LL, "chess::Color::Color(int)"); result = v4 ^ 1; *((_BYTE *)this + 174) = result; ++*((_WORD *)this + 86); return result; }
makeNullMove: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0x8 LEA R14,[RBX + 0xa0] LEA RDX,[RBX + 0xa8] LEA RCX,[RBX + 0xb0] LEA R8,[RBX + 0xb4] LEA R9,[0x111df0] MOV RSI,R14 CALL 0x0010cc56 MOV RAX,-0x729d95550d87af7 XOR RAX,qword ptr [RBX + 0xa0] MOV qword ptr [RBX + 0xa0],RAX MOV ECX,dword ptr [RBX + 0xb0] CMP RCX,0x40 JZ 0x0010cb9d AND ECX,0x7 LEA RDX,[0x10ec10] XOR RAX,qword ptr [RDX + RCX*0x8 + 0x1820] MOV qword ptr [R14],RAX LAB_0010cb9d: MOV dword ptr [RBX + 0xb0],0x40 MOV AL,byte ptr [RBX + 0xae] CMP AL,0x2 JNC 0x0010cbc8 XOR AL,0x1 MOV byte ptr [RBX + 0xae],AL INC word ptr [RBX + 0xac] ADD RSP,0x8 POP RBX POP R14 RET LAB_0010cbc8: LEA RDI,[0x10e7ac] LEA RSI,[0x110bdc] LEA RCX,[0x10e7c8] MOV EDX,0x48 CALL 0x00103130
/* chess::Board::makeNullMove() */ void __thiscall chess::Board::makeNullMove(Board *this) { ulong uVar1; std::vector<chess::Board::State,std::allocator<chess::Board::State>>:: emplace_back<unsigned_long&,chess::Board::CastlingRights&,chess::Square&,unsigned_char&,chess::Piece::underlying_const&> ((vector<chess::Board::State,std::allocator<chess::Board::State>> *)(this + 8), (ulong *)(this + 0xa0),(CastlingRights *)(this + 0xa8),this + 0xb0, (uchar *)(this + 0xb4),(underlying *)&Piece::NONE); uVar1 = *(ulong *)(this + 0xa0); *(ulong *)(this + 0xa0) = uVar1 ^ 0xf8d626aaaf278509; if (*(uint *)(this + 0xb0) != 0x40) { *(ulong *)(this + 0xa0) = uVar1 ^ 0xf8d626aaaf278509 ^ *(ulong *)(Zobrist::RANDOM_ARRAY + (ulong)(*(uint *)(this + 0xb0) & 7) * 8 + 0x1820); } *(int4 *)(this + 0xb0) = 0x40; if ((byte)this[0xae] < 2) { this[0xae] = (Board)((byte)this[0xae] ^ 1); *(short *)(this + 0xac) = *(short *)(this + 0xac) + 1; return; } /* WARNING: Subroutine does not return */ __assert_fail("c == 0 || c == 1 || c == -1", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x48,"chess::Color::Color(int)"); }
63,216
chess::Board::makeNullMove()
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
void makeNullMove() { prev_states_.emplace_back(key_, cr_, ep_sq_, hfm_, Piece::NONE); key_ ^= Zobrist::sideToMove(); if (ep_sq_ != Square::underlying::NO_SQ) key_ ^= Zobrist::enpassant(ep_sq_.file()); ep_sq_ = Square::underlying::NO_SQ; stm_ = ~stm_; plies_++; }
O2
cpp
chess::Board::makeNullMove(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx addq $0x8, %rdi leaq 0xa0(%rbx), %r14 leaq 0xa8(%rbx), %rdx leaq 0xb0(%rbx), %rcx leaq 0xb4(%rbx), %r8 leaq 0x51ba(%rip), %r9 # 0x10f70 movq %r14, %rsi callq 0xbe60 movabsq $-0x729d95550d87af7, %rax # imm = 0xF8D626AAAF278509 xorq %rax, 0xa0(%rbx) movl 0xb0(%rbx), %eax cmpl $0x40, %eax je 0xbde7 andb $0x7, %al movzbl %al, %edi callq 0x3e18 xorq %rax, (%r14) movl $0x40, 0xb0(%rbx) leaq 0xae(%rbx), %rdi callq 0x43f0 movb %al, 0xae(%rbx) incw 0xac(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5chess5Board12makeNullMoveEv: push r14 push rbx push rax mov rbx, rdi add rdi, 8 lea r14, [rbx+0A0h] lea rdx, [rbx+0A8h] lea rcx, [rbx+0B0h] lea r8, [rbx+0B4h] lea r9, _ZN5chess5Piece4NONEE; chess::Piece::NONE mov rsi, r14 call _ZNSt6vectorIN5chess5Board5StateESaIS2_EE12emplace_backIJRmRNS1_14CastlingRightsERNS0_6SquareERhRKNS0_5Piece10underlyingEEEERS2_DpOT_; std::vector<chess::Board::State>::emplace_back<ulong &,chess::Board::CastlingRights &,chess::Square &,uchar &,chess::Piece::underlying const&>(ulong &,chess::Board::CastlingRights &,chess::Square &,uchar &,chess::Piece::underlying const&) mov rax, 0F8D626AAAF278509h xor [rbx+0A0h], rax mov eax, [rbx+0B0h] cmp eax, 40h ; '@' jz short loc_BDE7 and al, 7 movzx edi, al call _ZN5chess7Zobrist9enpassantENS_4FileE; chess::Zobrist::enpassant(chess::File) xor [r14], rax loc_BDE7: mov dword ptr [rbx+0B0h], 40h ; '@' lea rdi, [rbx+0AEh] call _ZNK5chess5ColorcoEv; chess::Color::operator~(void) mov [rbx+0AEh], al inc word ptr [rbx+0ACh] add rsp, 8 pop rbx pop r14 retn
char chess::Board::makeNullMove(chess::Board *this) { long long v1; // rax int v2; // eax char result; // al std::vector<chess::Board::State>::emplace_back<unsigned long &,chess::Board::CastlingRights &,chess::Square &,unsigned char &,chess::Piece::underlying const&>( (char *)this + 8, (char *)this + 160, (char *)this + 168, (char *)this + 176, (char *)this + 180, &chess::Piece::NONE, v1); *((_QWORD *)this + 20) ^= 0xF8D626AAAF278509LL; v2 = *((_DWORD *)this + 44); if ( v2 != 64 ) *((_QWORD *)this + 20) ^= chess::Zobrist::enpassant(v2 & 7); *((_DWORD *)this + 44) = 64; result = chess::Color::operator~((unsigned __int8 *)this + 174); *((_BYTE *)this + 174) = result; ++*((_WORD *)this + 86); return result; }
makeNullMove: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0x8 LEA R14,[RBX + 0xa0] LEA RDX,[RBX + 0xa8] LEA RCX,[RBX + 0xb0] LEA R8,[RBX + 0xb4] LEA R9,[0x110f70] MOV RSI,R14 CALL 0x0010be60 MOV RAX,-0x729d95550d87af7 XOR qword ptr [RBX + 0xa0],RAX MOV EAX,dword ptr [RBX + 0xb0] CMP EAX,0x40 JZ 0x0010bde7 AND AL,0x7 MOVZX EDI,AL CALL 0x00103e18 XOR qword ptr [R14],RAX LAB_0010bde7: MOV dword ptr [RBX + 0xb0],0x40 LEA RDI,[RBX + 0xae] CALL 0x001043f0 MOV byte ptr [RBX + 0xae],AL INC word ptr [RBX + 0xac] ADD RSP,0x8 POP RBX POP R14 RET
/* chess::Board::makeNullMove() */ void __thiscall chess::Board::makeNullMove(Board *this) { Board *pBVar1; Board BVar2; ulong uVar3; pBVar1 = this + 0xa0; std::vector<chess::Board::State,std::allocator<chess::Board::State>>:: emplace_back<unsigned_long&,chess::Board::CastlingRights&,chess::Square&,unsigned_char&,chess::Piece::underlying_const&> ((vector<chess::Board::State,std::allocator<chess::Board::State>> *)(this + 8), (ulong *)pBVar1,(CastlingRights *)(this + 0xa8),(Square *)(this + 0xb0), (uchar *)(this + 0xb4),(underlying *)&Piece::NONE); *(ulong *)(this + 0xa0) = *(ulong *)(this + 0xa0) ^ 0xf8d626aaaf278509; if (*(int *)(this + 0xb0) != 0x40) { uVar3 = Zobrist::enpassant((byte)*(int *)(this + 0xb0) & 7); *(ulong *)pBVar1 = *(ulong *)pBVar1 ^ uVar3; } *(int4 *)(this + 0xb0) = 0x40; BVar2 = (Board)Color::operator~((Color *)(this + 0xae)); this[0xae] = BVar2; *(short *)(this + 0xac) = *(short *)(this + 0xac) + 1; return; }
63,217
chess::Board::makeNullMove()
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
void makeNullMove() { prev_states_.emplace_back(key_, cr_, ep_sq_, hfm_, Piece::NONE); key_ ^= Zobrist::sideToMove(); if (ep_sq_ != Square::underlying::NO_SQ) key_ ^= Zobrist::enpassant(ep_sq_.file()); ep_sq_ = Square::underlying::NO_SQ; stm_ = ~stm_; plies_++; }
O3
cpp
chess::Board::makeNullMove(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx addq $0x8, %rdi leaq 0xa0(%rbx), %r14 leaq 0xa8(%rbx), %rdx leaq 0xb0(%rbx), %rcx leaq 0xb4(%rbx), %r8 leaq 0x45aa(%rip), %r9 # 0xfdc0 movq %r14, %rsi callq 0xb910 movabsq $-0x729d95550d87af7, %rax # imm = 0xF8D626AAAF278509 xorq 0xa0(%rbx), %rax movq %rax, 0xa0(%rbx) movl 0xb0(%rbx), %ecx cmpq $0x40, %rcx je 0xb857 andl $0x7, %ecx leaq 0x1394(%rip), %rdx # 0xcbe0 xorq 0x1820(%rdx,%rcx,8), %rax movq %rax, (%r14) movl $0x40, 0xb0(%rbx) movb 0xae(%rbx), %al cmpb $0x2, %al jae 0xb882 xorb $0x1, %al movb %al, 0xae(%rbx) incw 0xac(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0xeea(%rip), %rdi # 0xc773 leaq 0x331c(%rip), %rsi # 0xebac leaq 0xef8(%rip), %rcx # 0xc78f movl $0x48, %edx callq 0x2130 nop
_ZN5chess5Board12makeNullMoveEv: push r14 push rbx push rax mov rbx, rdi add rdi, 8 lea r14, [rbx+0A0h] lea rdx, [rbx+0A8h] lea rcx, [rbx+0B0h] lea r8, [rbx+0B4h] lea r9, _ZN5chess5Piece4NONEE; chess::Piece::NONE mov rsi, r14 call _ZNSt6vectorIN5chess5Board5StateESaIS2_EE12emplace_backIJRmRNS1_14CastlingRightsERNS0_6SquareERhRKNS0_5Piece10underlyingEEEERS2_DpOT_; std::vector<chess::Board::State>::emplace_back<ulong &,chess::Board::CastlingRights &,chess::Square &,uchar &,chess::Piece::underlying const&>(ulong &,chess::Board::CastlingRights &,chess::Square &,uchar &,chess::Piece::underlying const&) mov rax, 0F8D626AAAF278509h xor rax, [rbx+0A0h] mov [rbx+0A0h], rax mov ecx, [rbx+0B0h] cmp rcx, 40h ; '@' jz short loc_B857 and ecx, 7 lea rdx, _ZN5chess7Zobrist12RANDOM_ARRAYE; chess::Zobrist::RANDOM_ARRAY xor rax, [rdx+rcx*8+1820h] mov [r14], rax loc_B857: mov dword ptr [rbx+0B0h], 40h ; '@' mov al, [rbx+0AEh] cmp al, 2 jnb short loc_B882 xor al, 1 mov [rbx+0AEh], al inc word ptr [rbx+0ACh] add rsp, 8 pop rbx pop r14 retn loc_B882: lea rdi, aC0C1C1; "c == 0 || c == 1 || c == -1" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aChessColorColo; "chess::Color::Color(int)" mov edx, 48h ; 'H' call ___assert_fail
char chess::Board::makeNullMove(chess::Board *this) { long long v1; // rax unsigned long long v2; // rax long long v3; // rcx unsigned __int8 v4; // al char result; // al std::vector<chess::Board::State>::emplace_back<unsigned long &,chess::Board::CastlingRights &,chess::Square &,unsigned char &,chess::Piece::underlying const&>( (char *)this + 8, (char *)this + 160, (char *)this + 168, (char *)this + 176, (char *)this + 180, &chess::Piece::NONE, v1); v2 = *((_QWORD *)this + 20) ^ 0xF8D626AAAF278509LL; *((_QWORD *)this + 20) = v2; v3 = *((unsigned int *)this + 44); if ( v3 != 64 ) *((_QWORD *)this + 20) = chess::Zobrist::RANDOM_ARRAY[(v3 & 7) + 772] ^ v2; *((_DWORD *)this + 44) = 64; v4 = *((_BYTE *)this + 174); if ( v4 >= 2u ) __assert_fail( "c == 0 || c == 1 || c == -1", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 72LL, "chess::Color::Color(int)"); result = v4 ^ 1; *((_BYTE *)this + 174) = result; ++*((_WORD *)this + 86); return result; }
makeNullMove: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0x8 LEA R14,[RBX + 0xa0] LEA RDX,[RBX + 0xa8] LEA RCX,[RBX + 0xb0] LEA R8,[RBX + 0xb4] LEA R9,[0x10fdc0] MOV RSI,R14 CALL 0x0010b910 MOV RAX,-0x729d95550d87af7 XOR RAX,qword ptr [RBX + 0xa0] MOV qword ptr [RBX + 0xa0],RAX MOV ECX,dword ptr [RBX + 0xb0] CMP RCX,0x40 JZ 0x0010b857 AND ECX,0x7 LEA RDX,[0x10cbe0] XOR RAX,qword ptr [RDX + RCX*0x8 + 0x1820] MOV qword ptr [R14],RAX LAB_0010b857: MOV dword ptr [RBX + 0xb0],0x40 MOV AL,byte ptr [RBX + 0xae] CMP AL,0x2 JNC 0x0010b882 XOR AL,0x1 MOV byte ptr [RBX + 0xae],AL INC word ptr [RBX + 0xac] ADD RSP,0x8 POP RBX POP R14 RET LAB_0010b882: LEA RDI,[0x10c773] LEA RSI,[0x10ebac] LEA RCX,[0x10c78f] MOV EDX,0x48 CALL 0x00102130
/* chess::Board::makeNullMove() */ void __thiscall chess::Board::makeNullMove(Board *this) { ulong uVar1; std::vector<chess::Board::State,std::allocator<chess::Board::State>>:: emplace_back<unsigned_long&,chess::Board::CastlingRights&,chess::Square&,unsigned_char&,chess::Piece::underlying_const&> ((vector<chess::Board::State,std::allocator<chess::Board::State>> *)(this + 8), (ulong *)(this + 0xa0),(CastlingRights *)(this + 0xa8),this + 0xb0, (uchar *)(this + 0xb4),(underlying *)&Piece::NONE); uVar1 = *(ulong *)(this + 0xa0); *(ulong *)(this + 0xa0) = uVar1 ^ 0xf8d626aaaf278509; if (*(uint *)(this + 0xb0) != 0x40) { *(ulong *)(this + 0xa0) = uVar1 ^ 0xf8d626aaaf278509 ^ *(ulong *)(Zobrist::RANDOM_ARRAY + (ulong)(*(uint *)(this + 0xb0) & 7) * 8 + 0x1820); } *(int4 *)(this + 0xb0) = 0x40; if ((byte)this[0xae] < 2) { this[0xae] = (Board)((byte)this[0xae] ^ 1); *(short *)(this + 0xac) = *(short *)(this + 0xac) + 1; return; } /* WARNING: Subroutine does not return */ __assert_fail("c == 0 || c == 1 || c == -1", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x48,"chess::Color::Color(int)"); }
63,218
ma_save_pack_length
eloqsql/storage/maria/ma_packrec.c
uint _ma_save_pack_length(uint version, uchar *block_buff, ulong length) { if (length < 254) { *(uchar*) block_buff= (uchar) length; return 1; } if (length <= 65535) { *(uchar*) block_buff=254; int2store(block_buff+1,(uint) length); return 3; } *(uchar*) block_buff=255; if (version == 1) /* old format */ { DBUG_ASSERT(length <= 0xFFFFFF); int3store(block_buff + 1, (ulong) length); return 4; } else { int4store(block_buff + 1, (ulong) length); return 5; } }
O0
c
ma_save_pack_length: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) cmpq $0xfe, -0x18(%rbp) jae 0x3a0b1 movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x3a150 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x3a0e5 movq -0x10(%rbp), %rax movb $-0x2, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movw %ax, %cx movq -0x20(%rbp), %rax movw %cx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x3a150 movq -0x10(%rbp), %rax movb $-0x1, (%rax) cmpl $0x1, -0x8(%rbp) jne 0x3a12f jmp 0x3a0f4 jmp 0x3a0f6 jmp 0x3a0f8 movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movl $0x4, -0x4(%rbp) jmp 0x3a150 jmp 0x3a131 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movl $0x5, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_save_pack_length: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx cmp [rbp+var_18], 0FEh jnb short loc_3A0B1 mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov [rbp+var_4], 1 jmp loc_3A150 loc_3A0B1: cmp [rbp+var_18], 0FFFFh ja short loc_3A0E5 mov rax, [rbp+var_10] mov byte ptr [rax], 0FEh mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_18] mov cx, ax mov rax, [rbp+var_20] mov [rax], cx mov [rbp+var_4], 3 jmp short loc_3A150 loc_3A0E5: mov rax, [rbp+var_10] mov byte ptr [rax], 0FFh cmp [rbp+var_8], 1 jnz short loc_3A12F jmp short $+2 loc_3A0F4: jmp short $+2 loc_3A0F6: jmp short $+2 loc_3A0F8: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_18] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_18] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov [rbp+var_4], 4 jmp short loc_3A150 loc_3A12F: jmp short $+2 loc_3A131: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_18] mov ecx, eax mov rax, [rbp+var_28] mov [rax], ecx mov [rbp+var_4], 5 loc_3A150: mov eax, [rbp+var_4] pop rbp retn
long long ma_save_pack_length(int a1, long long a2, unsigned long long a3) { if ( a3 >= 0xFE ) { if ( a3 > 0xFFFF ) { *(_BYTE *)a2 = -1; if ( a1 == 1 ) { *(_WORD *)(a2 + 1) = a3; *(_BYTE *)(a2 + 3) = BYTE2(a3); return 4; } else { *(_DWORD *)(a2 + 1) = a3; return 5; } } else { *(_BYTE *)a2 = -2; *(_WORD *)(a2 + 1) = a3; return 3; } } else { *(_BYTE *)a2 = a3; return 1; } }
_ma_save_pack_length: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX CMP qword ptr [RBP + -0x18],0xfe JNC 0x0013a0b1 MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013a150 LAB_0013a0b1: CMP qword ptr [RBP + -0x18],0xffff JA 0x0013a0e5 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xfe MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CX,AX MOV RAX,qword ptr [RBP + -0x20] MOV word ptr [RAX],CX MOV dword ptr [RBP + -0x4],0x3 JMP 0x0013a150 LAB_0013a0e5: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xff CMP dword ptr [RBP + -0x8],0x1 JNZ 0x0013a12f JMP 0x0013a0f4 LAB_0013a0f4: JMP 0x0013a0f6 LAB_0013a0f6: JMP 0x0013a0f8 LAB_0013a0f8: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV dword ptr [RBP + -0x4],0x4 JMP 0x0013a150 LAB_0013a12f: JMP 0x0013a131 LAB_0013a131: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x5 LAB_0013a150: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 _ma_save_pack_length(int param_1,int1 *param_2,ulong param_3) { int4 local_c; if (param_3 < 0xfe) { *param_2 = (char)param_3; local_c = 1; } else if (param_3 < 0x10000) { *param_2 = 0xfe; *(short *)(param_2 + 1) = (short)param_3; local_c = 3; } else { *param_2 = 0xff; if (param_1 == 1) { param_2[1] = (char)param_3; param_2[2] = (char)(param_3 >> 8); param_2[3] = (char)(param_3 >> 0x10); local_c = 4; } else { *(int *)(param_2 + 1) = (int)param_3; local_c = 5; } } return local_c; }
63,219
ma_save_pack_length
eloqsql/storage/maria/ma_packrec.c
uint _ma_save_pack_length(uint version, uchar *block_buff, ulong length) { if (length < 254) { *(uchar*) block_buff= (uchar) length; return 1; } if (length <= 65535) { *(uchar*) block_buff=254; int2store(block_buff+1,(uint) length); return 3; } *(uchar*) block_buff=255; if (version == 1) /* old format */ { DBUG_ASSERT(length <= 0xFFFFFF); int3store(block_buff + 1, (ulong) length); return 4; } else { int4store(block_buff + 1, (ulong) length); return 5; } }
O3
c
ma_save_pack_length: pushq %rbp movq %rsp, %rbp cmpq $0xfd, %rdx ja 0x3b673 movb %dl, (%rsi) movl $0x1, %eax jmp 0x3b6ad cmpq $0xffff, %rdx # imm = 0xFFFF ja 0x3b68a movb $-0x2, (%rsi) movw %dx, 0x1(%rsi) movl $0x3, %eax jmp 0x3b6ad movb $-0x1, (%rsi) cmpl $0x1, %edi jne 0x3b6a5 movb %dl, 0x1(%rsi) movb %dh, 0x2(%rsi) shrl $0x10, %edx movb %dl, 0x3(%rsi) movl $0x4, %eax jmp 0x3b6ad movl %edx, 0x1(%rsi) movl $0x5, %eax popq %rbp retq
_ma_save_pack_length: push rbp mov rbp, rsp cmp rdx, 0FDh ja short loc_3B673 mov [rsi], dl mov eax, 1 jmp short loc_3B6AD loc_3B673: cmp rdx, 0FFFFh ja short loc_3B68A mov byte ptr [rsi], 0FEh mov [rsi+1], dx mov eax, 3 jmp short loc_3B6AD loc_3B68A: mov byte ptr [rsi], 0FFh cmp edi, 1 jnz short loc_3B6A5 mov [rsi+1], dl mov [rsi+2], dh shr edx, 10h mov [rsi+3], dl mov eax, 4 jmp short loc_3B6AD loc_3B6A5: mov [rsi+1], edx mov eax, 5 loc_3B6AD: pop rbp retn
long long ma_save_pack_length(int a1, long long a2, unsigned long long a3) { if ( a3 > 0xFD ) { if ( a3 > 0xFFFF ) { *(_BYTE *)a2 = -1; if ( a1 == 1 ) { *(_WORD *)(a2 + 1) = a3; *(_BYTE *)(a2 + 3) = BYTE2(a3); return 4LL; } else { *(_DWORD *)(a2 + 1) = a3; return 5LL; } } else { *(_BYTE *)a2 = -2; *(_WORD *)(a2 + 1) = a3; return 3LL; } } else { *(_BYTE *)a2 = a3; return 1LL; } }
_ma_save_pack_length: PUSH RBP MOV RBP,RSP CMP RDX,0xfd JA 0x0013b673 MOV byte ptr [RSI],DL MOV EAX,0x1 JMP 0x0013b6ad LAB_0013b673: CMP RDX,0xffff JA 0x0013b68a MOV byte ptr [RSI],0xfe MOV word ptr [RSI + 0x1],DX MOV EAX,0x3 JMP 0x0013b6ad LAB_0013b68a: MOV byte ptr [RSI],0xff CMP EDI,0x1 JNZ 0x0013b6a5 MOV byte ptr [RSI + 0x1],DL MOV byte ptr [RSI + 0x2],DH SHR EDX,0x10 MOV byte ptr [RSI + 0x3],DL MOV EAX,0x4 JMP 0x0013b6ad LAB_0013b6a5: MOV dword ptr [RSI + 0x1],EDX MOV EAX,0x5 LAB_0013b6ad: POP RBP RET
int8 _ma_save_pack_length(int param_1,int1 *param_2,ulong param_3) { int8 uVar1; if (param_3 < 0xfe) { *param_2 = (char)param_3; uVar1 = 1; } else if (param_3 < 0x10000) { *param_2 = 0xfe; *(short *)(param_2 + 1) = (short)param_3; uVar1 = 3; } else { *param_2 = 0xff; if (param_1 == 1) { param_2[1] = (char)param_3; param_2[2] = (char)(param_3 >> 8); param_2[3] = (char)(param_3 >> 0x10); uVar1 = 4; } else { *(int *)(param_2 + 1) = (int)param_3; uVar1 = 5; } } return uVar1; }
63,220
test_returning
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
static int test_returning(MYSQL *mysql) { MYSQL_STMT *stmt= mysql_stmt_init(mysql); MYSQL_RES *result; int rc; diag("MDEV-23768 not fixed yet"); mysql_stmt_close(stmt); return SKIP; rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a int not null auto_increment primary key, b json)"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "INSERT INTO t1 (a,b) VALUES (NULL, '[incorrect json]') RETURNING a"); check_mysql_rc(rc, mysql); if (!rc) diag("should have fail"); result= mysql_store_result(mysql); mysql_free_result(result); diag("Error: %s", mysql_error(mysql)); rc= mysql_stmt_prepare(stmt, SL("INSERT INTO t1 (a,b) VALUES (NULL, '[incorrect json]') RETURNING a")); check_stmt_rc(rc, stmt); rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); rc= mysql_stmt_close(stmt); return OK; }
O0
c
test_returning: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x44950 movq %rax, -0x10(%rbp) leaq 0x4f3d3(%rip), %rdi # 0x665e3 movb $0x0, %al callq 0x2fc40 movq -0x10(%rbp), %rdi callq 0x43eb0 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
test_returning: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call mysql_stmt_init mov [rbp+var_10], rax lea rdi, aMdev23768NotFi; "MDEV-23768 not fixed yet" mov al, 0 call diag mov rdi, [rbp+var_10] call mysql_stmt_close mov eax, 0FFFFFFFFh add rsp, 20h pop rbp retn
long long test_returning(long long a1, int a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long v7; // [rsp+10h] [rbp-10h] v7 = mysql_stmt_init(a1); diag((unsigned int)"MDEV-23768 not fixed yet", a2, v2, v3, v4, v5); mysql_stmt_close(v7); return 0xFFFFFFFFLL; }
test_returning: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00144950 MOV qword ptr [RBP + -0x10],RAX LEA RDI,[0x1665e3] MOV AL,0x0 CALL 0x0012fc40 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00143eb0 MOV EAX,0xffffffff ADD RSP,0x20 POP RBP RET
int8 test_returning(int8 param_1) { int8 uVar1; uVar1 = mysql_stmt_init(param_1); diag("MDEV-23768 not fixed yet"); mysql_stmt_close(uVar1); return 0xffffffff; }
63,221
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>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
llama.cpp/common/json.hpp
bool key(string_t& val) { BasicJsonType k = BasicJsonType(val); // check callback for key const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k); key_keep_stack.push_back(keep); // add discarded value at given key and store the reference for later if (keep && ref_stack.back()) { object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); } return true; }
O3
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>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %rdi callq 0x8a2b6 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0xc(%rsp) movb $0x4, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0x87bf6 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) movl %eax, %ebp leaq 0x48(%rbx), %rdi movzbl %al, %esi callq 0x76c1e testb %bpl, %bpl je 0x87bd4 movq 0x10(%rbx), %rax cmpq $0x0, -0x8(%rax) je 0x87bd4 leaq 0xa8(%rbx), %rsi leaq 0x20(%rsp), %rdi callq 0x888f8 movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rdi movq %r14, %rsi callq 0x8a2f0 leaq 0x20(%rsp), %r14 movq %rax, %rdi movq %r14, %rsi callq 0x86816 movq %rax, 0x70(%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x846aa movq %r14, %rdi callq 0x88dc4 leaq 0x10(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x846aa movq %rbx, %rdi callq 0x88dc4 movb $0x1, %al addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x212c0 movq %rax, %rbx leaq 0x20(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x846aa movq %r14, %rdi callq 0x88dc4 jmp 0x87c1a movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x846aa movq %r14, %rdi callq 0x88dc4 movq %rbx, %rdi callq 0x20ae0 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyERSB_: push rbp push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+48h+var_3C], eax mov [rsp+48h+var_3D], 4 cmp qword ptr [rbx+90h], 0 jz loc_87BF6 lea rdi, [rbx+80h] lea rsi, [rsp+48h+var_3C] lea rdx, [rsp+48h+var_3D] lea rcx, [rsp+48h+var_38] call qword ptr [rbx+98h] mov ebp, eax lea rdi, [rbx+48h] movzx esi, al call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) test bpl, bpl jz short loc_87BD4 mov rax, [rbx+10h] cmp qword ptr [rax-8], 0 jz short loc_87BD4 lea rsi, [rbx+0A8h] lea rdi, [rsp+48h+var_28] 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 rax, [rax-8] mov rdi, [rax+8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator[](std::string const&) lea r14, [rsp+48h+var_28] mov rdi, rax 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 [rbx+70h], rax 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() loc_87BD4: lea rbx, [rsp+48h+var_38] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov al, 1 add rsp, 30h pop rbx pop r14 pop rbp retn loc_87BF6: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov rbx, rax lea r14, [rsp+48h+var_28] 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() jmp short loc_87C1A mov rbx, rax loc_87C1A: lea r14, [rsp+48h+var_38] 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, rbx call __Unwind_Resume
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>>::key( long long a1, long long a2) { unsigned __int8 v2; // bp long long v3; // rax char v5; // [rsp+Bh] [rbp-3Dh] BYREF int v6; // [rsp+Ch] [rbp-3Ch] BYREF char v7[16]; // [rsp+10h] [rbp-38h] BYREF char v8[40]; // [rsp+20h] [rbp-28h] BYREF ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(v7); v6 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v5 = 4; if ( !*(_QWORD *)(a1 + 144) ) std::__throw_bad_function_call(); v2 = (*(long long ( **)(long long, int *, char *, char *))(a1 + 152))(a1 + 128, &v6, &v5, v7); std::vector<bool>::push_back(a1 + 72, v2); if ( v2 && *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) ) { 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( v8, a1 + 168); v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[]( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) + 8LL), a2); *(_QWORD *)(a1 + 112) = 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=( v3, (long long)v8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v8); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v7); return 1; }
key: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x10] CALL 0x0018a2b6 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x4 CMP qword ptr [RBX + 0x90],0x0 JZ 0x00187bf6 LEA RDI,[RBX + 0x80] LAB_00187b56: LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] MOV EBP,EAX LEA RDI,[RBX + 0x48] MOVZX ESI,AL CALL 0x00176c1e TEST BPL,BPL JZ 0x00187bd4 MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RAX + -0x8],0x0 JZ 0x00187bd4 LEA RSI,[RBX + 0xa8] LEA RDI,[RSP + 0x20] CALL 0x001888f8 MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RDI,qword ptr [RAX + 0x8] LAB_00187ba6: MOV RSI,R14 CALL 0x0018a2f0 LEA R14,[RSP + 0x20] MOV RDI,RAX MOV RSI,R14 CALL 0x00186816 MOV qword ptr [RBX + 0x70],RAX MOV RDI,R14 XOR ESI,ESI CALL 0x001846aa MOV RDI,R14 CALL 0x00188dc4 LAB_00187bd4: LEA RBX,[RSP + 0x10] MOV RDI,RBX XOR ESI,ESI CALL 0x001846aa MOV RDI,RBX CALL 0x00188dc4 MOV AL,0x1 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00187bf6: CALL 0x001212c0
/* 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> >::key(std::__cxx11::string&) */ 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>> ::key(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,string *param_1) { bool bVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *pbVar2; int8 uVar3; int1 local_3d; int4 local_3c; data local_38 [16]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_28 [16]; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ (local_38); local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_3d = 4; if (*(long *)(this + 0x90) != 0) { /* try { // try from 00187b56 to 00187b99 has its CatchHandler @ 00187c17 */ bVar1 = (bool)(**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_3d,local_38); std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x48),bVar1); if ((bVar1 != false) && (*(long *)(*(long *)(this + 0x10) + -8) != 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_28,(basic_json *)(this + 0xa8)); /* try { // try from 00187ba6 to 00187bad has its CatchHandler @ 00187bfb */ pbVar2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator[](*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(*(long *)(*(long *)(this + 0x10) + -8) + 8),param_1); uVar3 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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=(pbVar2,(data *)local_28); *(int8 *)(this + 0x70) = uVar3; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_28,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_28); } basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_38,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); return 1; } /* WARNING: Subroutine does not return */ /* try { // try from 00187bf6 to 00187bfa has its CatchHandler @ 00187c17 */ std::__throw_bad_function_call(); }
63,222
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) { std::vector<common_chat_msg> msgs = { {"system", "You are a helpful assistant", {}}, {"user", "Hello", {}}, {"assistant", "Hi there", {}}, {"user", "How are you?", {}}, }; return common_chat_apply_template(tmpl, msgs, true, use_jinja); }
O1
cpp
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %ebp movq %rsi, %r12 movq %rdi, %r15 leaq 0x38(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7c878(%rip), %rsi # 0x117977 leaq 0x7c877(%rip), %rdx # 0x11797d leaq 0x28(%rsp), %rdi callq 0x2698a leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x7c859(%rip), %rsi # 0x11797e leaq 0x7c86d(%rip), %rdx # 0x117999 callq 0x2698a leaq 0x68(%rsp), %r14 leaq 0x80(%rsp), %rdi leaq 0x90(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x70fda(%rip), %rdx # 0x10c13a movq %rdx, %rsi callq 0x2698a leaq 0xa0(%rsp), %r14 leaq 0xb0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7c77e(%rip), %rsi # 0x117901 leaq 0x7c77b(%rip), %rdx # 0x117905 movq %r14, %rdi callq 0x2698a leaq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7c7ed(%rip), %rsi # 0x11799a leaq 0x7c7eb(%rip), %rdx # 0x11799f callq 0x2698a leaq 0xe0(%rsp), %r13 leaq 0xf8(%rsp), %rdi leaq 0x108(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x70f4f(%rip), %rdx # 0x10c13a movq %rdx, %rsi callq 0x2698a leaq 0x118(%rsp), %r14 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7c782(%rip), %rsi # 0x117990 leaq 0x7c784(%rip), %rdx # 0x117999 movq %r14, %rdi callq 0x2698a leaq 0x138(%rsp), %rdi leaq 0x148(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7c768(%rip), %rsi # 0x1179a0 leaq 0x7c769(%rip), %rdx # 0x1179a8 callq 0x2698a leaq 0x158(%rsp), %r13 leaq 0x170(%rsp), %rdi leaq 0x180(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x70ec4(%rip), %rdx # 0x10c13a movq %rdx, %rsi callq 0x2698a leaq 0x190(%rsp), %r14 leaq 0x1a0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7c668(%rip), %rsi # 0x117901 leaq 0x7c665(%rip), %rdx # 0x117905 movq %r14, %rdi callq 0x2698a leaq 0x1b0(%rsp), %rdi leaq 0x1c0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7c6e6(%rip), %rsi # 0x1179a9 leaq 0x7c6eb(%rip), %rdx # 0x1179b5 callq 0x2698a leaq 0x1d0(%rsp), %r13 leaq 0x1e8(%rsp), %rdi leaq 0x1f8(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x70e39(%rip), %rdx # 0x10c13a movq %rdx, %rsi callq 0x2698a leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0xf(%rsp), %rcx movl $0x4, %edx callq 0xa3562 movl $0x1e0, %r14d # imm = 0x1E0 leaq (%rsp,%r14), %rax addq $0x18, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x9b344 movq (%rax), %rsi incq %rsi callq 0x1dc40 leaq (%rsp,%r14), %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0xa3532 movq -0x20(%rbx), %rdi leaq (%rsp,%r14), %rax addq $-0x20, %rax cmpq %rdi, %rax je 0x9b370 movq (%rax), %rsi incq %rsi callq 0x1dc40 leaq (%rsp,%r14), %rax addq $-0x40, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x9b38c movq (%rax), %rsi incq %rsi callq 0x1dc40 addq $-0x78, %r14 jne 0x9b328 movzbl %bpl, %r8d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movl $0x1, %ecx callq 0x9a723 leaq 0x10(%rsp), %rdi callq 0xa3502 movq %r15, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0xa3502 jmp 0x9b5d0 movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0xa35aa addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x9b3e4 xorl %ebp, %ebp jmp 0x9b432 movq %rax, %r15 movq %r13, %rdi callq 0xa3532 movq 0x1b0(%rsp), %rdi movb $0x1, %bpl cmpq %rbx, %rdi je 0x9b432 movq 0x1c0(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b432 movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x9b464 movq 0x190(%rsp), %rdi leaq 0x1a0(%rsp), %rax cmpq %rax, %rdi je 0x9b464 movq 0x1a0(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b464 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x9b49f movq %rax, %r15 movq %r13, %rdi callq 0xa3532 movq 0x138(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x9b49c movq 0x148(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b49c movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x9b4d1 movq 0x118(%rsp), %rdi leaq 0x128(%rsp), %rax cmpq %rax, %rdi je 0x9b4d1 movq 0x128(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b4d1 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x9b50c movq %rax, %r15 movq %r13, %rdi callq 0xa3532 movq 0xc0(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x9b509 movq 0xd0(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b509 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x9b53e movq 0xa0(%rsp), %rdi leaq 0xb0(%rsp), %rax cmpq %rax, %rdi je 0x9b53e movq 0xb0(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b53e movq %rax, %r15 movb $0x1, %bpl xorl %ebx, %ebx testb %bl, %bl je 0x9b5a6 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x9b5a6 movq 0x38(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b5a6 movq %rax, %r15 movq %r14, %rdi callq 0xa3532 leaq 0x28(%rsp), %r14 movq 0x20(%r14), %rdi movb $0x1, %bl cmpq %r13, %rdi je 0x9b596 movq 0x58(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b596 movq %rax, %r15 movb $0x1, %bl leaq 0x28(%rsp), %r14 movb $0x1, %bpl jmp 0x9b540 movq %rax, %r15 movb $0x1, %bpl leaq 0x28(%rsp), %r14 leaq 0x28(%rsp), %rax cmpq %r14, %rax sete %al xorb $0x1, %bpl orb %al, %bpl jne 0x9b5d0 leaq 0x28(%rsp), %rbx addq $-0x78, %r14 movq %r14, %rdi callq 0xa35aa cmpq %rbx, %r14 jne 0x9b5bf movq %r15, %rdi callq 0x1e650
_Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov ebp, edx mov r12, rsi mov r15, rdi lea rax, [rsp+238h+var_200] mov [rax-10h], rax lea rsi, aSystem; "system" lea rdx, aSystem+6; "" lea rdi, [rsp+238h+var_210] 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+238h+var_1F0] lea r13, [rsp+238h+var_1E0] mov [r13-10h], r13 lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, aYouAreAHelpful+1Bh; "" 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 r14, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] lea rax, [rsp+238h+var_1A8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aSFailedToLoadI+2Ah; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_198] lea rax, [rsp+238h+var_188] mov [rax-10h], rax lea rsi, aUser_0; "user" lea rdx, aUser_0+4; "" mov rdi, r14 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+238h+var_178] lea rbx, [rsp+238h+var_168] mov [rbx-10h], rbx lea rsi, aHello; "Hello" lea rdx, aHello+5; "" 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 r13, [rsp+238h+var_158] lea rdi, [rsp+238h+var_140] lea rax, [rsp+238h+var_130] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aSFailedToLoadI+2Ah; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_120] lea rax, [rsp+238h+var_110] mov [rax-10h], rax lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, aYouAreAHelpful+1Bh; "" mov rdi, r14 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+238h+var_100] lea rbx, [rsp+238h+var_F0] mov [rbx-10h], rbx lea rsi, aHiThere; "Hi there" lea rdx, aHiThere+8; "" 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 r13, [rsp+238h+var_E0] lea rdi, [rsp+238h+var_C8] lea rax, [rsp+238h+var_B8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aSFailedToLoadI+2Ah; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_A8] lea rax, [rsp+238h+var_98] mov [rax-10h], rax lea rsi, aUser_0; "user" lea rdx, aUser_0+4; "" mov rdi, r14 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+238h+var_88] lea rbx, [rsp+238h+var_78] mov [rbx-10h], rbx lea rsi, aHowAreYou; "How are you?" lea rdx, aHowAreYou+0Ch; "" 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 r13, [rsp+238h+var_68] lea rdi, [rsp+238h+var_50] lea rax, [rsp+238h+var_40] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aSFailedToLoadI+2Ah; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] lea rcx, [rsp+238h+var_229] mov edx, 4 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&) mov r14d, 1E0h loc_9B328: lea rax, [rsp+r14+238h+var_238] add rax, 18h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_9B344 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9B344: lea rbx, [rsp+r14+238h+var_238] add rbx, 0FFFFFFFFFFFFFFF0h mov rdi, rbx call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rbx-20h]; void * lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFE0h cmp rax, rdi jz short loc_9B370 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9B370: lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFC0h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_9B38C mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9B38C: add r14, 0FFFFFFFFFFFFFF88h jnz short loc_9B328 movzx r8d, bpl lea rdx, [rsp+238h+var_228] mov rdi, r15 mov rsi, r12 mov ecx, 1 call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) lea rdi, [rsp+238h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() jmp loc_9B5D0 mov r15, rax mov ebx, 168h loc_9B3E4: lea rdi, [rsp+rbx+0] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_9B3E4 xor ebp, ebp jmp short loc_9B432 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_1A8]; void * mov bpl, 1 cmp rdi, rbx jz short loc_9B432 mov rsi, [rsp+arg_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B432 mov r15, rax mov bpl, 1 loc_9B432: test bpl, bpl jz short loc_9B464 mov rdi, [rsp+arg_188]; void * lea rax, [rsp+arg_198] cmp rdi, rax jz short loc_9B464 mov rsi, [rsp+arg_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B464 mov r15, rax mov bpl, 1 loc_9B464: xor r12d, r12d jmp short loc_9B49F mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_130]; void * mov r12b, 1 cmp rdi, rbx jz short loc_9B49C mov rsi, [rsp+arg_140] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B49C mov r15, rax mov r12b, 1 loc_9B49C: mov bpl, 1 loc_9B49F: test r12b, r12b jz short loc_9B4D1 mov rdi, [rsp+arg_110]; void * lea rax, [rsp+arg_120] cmp rdi, rax jz short loc_9B4D1 mov rsi, [rsp+arg_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B4D1 mov r15, rax mov bpl, 1 loc_9B4D1: xor r12d, r12d jmp short loc_9B50C mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_B8]; void * mov r12b, 1 cmp rdi, rbx jz short loc_9B509 mov rsi, [rsp+arg_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B509 mov r15, rax mov r12b, 1 loc_9B509: mov bpl, 1 loc_9B50C: test r12b, r12b jz short loc_9B53E mov rdi, [rsp+arg_98]; void * lea rax, [rsp+arg_A8] cmp rdi, rax jz short loc_9B53E mov rsi, [rsp+arg_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B53E mov r15, rax mov bpl, 1 loc_9B53E: xor ebx, ebx loc_9B540: test bl, bl jz short loc_9B5A6 mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_9B5A6 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B5A6 mov r15, rax mov rdi, r14 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() lea r14, [rsp+arg_20] mov rdi, [r14+20h]; void * mov bl, 1 cmp rdi, r13 jz short loc_9B596 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B596 mov r15, rax mov bl, 1 lea r14, [rsp+arg_20] loc_9B596: mov bpl, 1 jmp short loc_9B540 mov r15, rax mov bpl, 1 lea r14, [rsp+arg_20] loc_9B5A6: lea rax, [rsp+arg_20] cmp rax, r14 setz al xor bpl, 1 or bpl, al jnz short loc_9B5D0 lea rbx, [rsp+arg_20] loc_9B5BF: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_9B5BF loc_9B5D0: mov rdi, r15 call __Unwind_Resume
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, unsigned __int8 a3) { unsigned long long v5; // r14 long long *v6; // rdi _QWORD *v7; // rdi _QWORD *v8; // rax _QWORD *v9; // rax _QWORD *v10; // rdi _BYTE v12[15]; // [rsp+0h] [rbp-238h] BYREF char v13; // [rsp+Fh] [rbp-229h] BYREF long long v14[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-210h] BYREF char v16; // [rsp+38h] [rbp-200h] BYREF char *v17; // [rsp+48h] [rbp-1F0h] BYREF char v18; // [rsp+58h] [rbp-1E0h] BYREF __int128 v19; // [rsp+68h] [rbp-1D0h] long long v20; // [rsp+78h] [rbp-1C0h] char *v21; // [rsp+80h] [rbp-1B8h] BYREF char v22; // [rsp+90h] [rbp-1A8h] BYREF char *v23; // [rsp+A0h] [rbp-198h] BYREF char v24; // [rsp+B0h] [rbp-188h] BYREF char *v25; // [rsp+C0h] [rbp-178h] BYREF char v26; // [rsp+D0h] [rbp-168h] BYREF __int128 v27; // [rsp+E0h] [rbp-158h] long long v28; // [rsp+F0h] [rbp-148h] char *v29; // [rsp+F8h] [rbp-140h] BYREF char v30; // [rsp+108h] [rbp-130h] BYREF char *v31; // [rsp+118h] [rbp-120h] BYREF char v32; // [rsp+128h] [rbp-110h] BYREF char *v33; // [rsp+138h] [rbp-100h] BYREF char v34; // [rsp+148h] [rbp-F0h] BYREF __int128 v35; // [rsp+158h] [rbp-E0h] long long v36; // [rsp+168h] [rbp-D0h] char *v37; // [rsp+170h] [rbp-C8h] BYREF char v38; // [rsp+180h] [rbp-B8h] BYREF char *v39; // [rsp+190h] [rbp-A8h] BYREF char v40; // [rsp+1A0h] [rbp-98h] BYREF char *v41; // [rsp+1B0h] [rbp-88h] BYREF char v42; // [rsp+1C0h] [rbp-78h] BYREF __int128 v43; // [rsp+1D0h] [rbp-68h] long long v44; // [rsp+1E0h] [rbp-58h] char *v45; // [rsp+1E8h] [rbp-50h] BYREF char v46; // [rsp+1F8h] [rbp-40h] BYREF v15[0] = &v16; std::string::_M_construct<char const*>(v15, "system", (long long)""); v17 = &v18; std::string::_M_construct<char const*>(&v17, "You are a helpful assistant", (long long)""); v19 = 0LL; v20 = 0LL; v21 = &v22; std::string::_M_construct<char const*>(&v21, "", (long long)""); v23 = &v24; std::string::_M_construct<char const*>(&v23, "user", (long long)""); v25 = &v26; std::string::_M_construct<char const*>(&v25, "Hello", (long long)""); v27 = 0LL; v28 = 0LL; v29 = &v30; std::string::_M_construct<char const*>(&v29, "", (long long)""); v31 = &v32; std::string::_M_construct<char const*>(&v31, "assistant", (long long)""); v33 = &v34; std::string::_M_construct<char const*>(&v33, "Hi there", (long long)""); v35 = 0LL; v36 = 0LL; v37 = &v38; std::string::_M_construct<char const*>(&v37, "", (long long)""); v39 = &v40; std::string::_M_construct<char const*>(&v39, "user", (long long)""); v41 = &v42; std::string::_M_construct<char const*>(&v41, "How are you?", (long long)""); v43 = 0LL; v44 = 0LL; v45 = &v46; std::string::_M_construct<char const*>(&v45, "", (long long)""); std::vector<common_chat_msg>::vector(v14, v15, 4LL, &v13); v5 = 480LL; do { v6 = *(long long **)&v12[v5 + 8]; if ( &v14[v5 / 8 + 1] != v6 ) operator delete(v6, v14[v5 / 8 + 1] + 1); std::vector<common_tool_call>::~vector(&v12[v5 - 16]); v7 = *(_QWORD **)&v12[v5 - 48]; v8 = &v12[v5 - 32]; if ( v8 != v7 ) operator delete(v7, *v8 + 1LL); v9 = &v12[v5 - 64]; v10 = (_QWORD *)*(v9 - 2); if ( v9 != v10 ) operator delete(v10, *v9 + 1LL); v5 -= 120LL; } while ( v5 ); common_chat_apply_template[abi:cxx11](a1, a2, v14, 1u, a3); std::vector<common_chat_msg>::~vector(v14); return a1; }
common_chat_format_example[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV EBP,EDX MOV R12,RSI MOV R15,RDI LEA RAX,[RSP + 0x38] MOV qword ptr [RAX + -0x10],RAX LAB_0019b0f8: LEA RSI,[0x217977] LEA RDX,[0x21797d] LEA RDI,[RSP + 0x28] CALL 0x0012698a LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 LAB_0019b11e: LEA RSI,[0x21797e] LEA RDX,[0x217999] CALL 0x0012698a LEA R14,[RSP + 0x68] LEA RDI,[RSP + 0x80] LEA RAX,[RSP + 0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0019b159: LEA RDX,[0x20c13a] MOV RSI,RDX CALL 0x0012698a LEA R14,[RSP + 0xa0] LEA RAX,[RSP + 0xb0] MOV qword ptr [RAX + -0x10],RAX LAB_0019b17c: LEA RSI,[0x217901] LEA RDX,[0x217905] MOV RDI,R14 CALL 0x0012698a LEA RDI,[RSP + 0xc0] LEA RBX,[RSP + 0xd0] MOV qword ptr [RBX + -0x10],RBX LAB_0019b1a6: LEA RSI,[0x21799a] LEA RDX,[0x21799f] CALL 0x0012698a LEA R13,[RSP + 0xe0] LEA RDI,[RSP + 0xf8] LEA RAX,[RSP + 0x108] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0019b1e4: LEA RDX,[0x20c13a] MOV RSI,RDX CALL 0x0012698a LEA R14,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_0019b207: LEA RSI,[0x217990] LEA RDX,[0x217999] MOV RDI,R14 CALL 0x0012698a LEA RDI,[RSP + 0x138] LEA RBX,[RSP + 0x148] MOV qword ptr [RBX + -0x10],RBX LAB_0019b231: LEA RSI,[0x2179a0] LEA RDX,[0x2179a8] CALL 0x0012698a LEA R13,[RSP + 0x158] LEA RDI,[RSP + 0x170] LEA RAX,[RSP + 0x180] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0019b26f: LEA RDX,[0x20c13a] MOV RSI,RDX CALL 0x0012698a LEA R14,[RSP + 0x190] LEA RAX,[RSP + 0x1a0] MOV qword ptr [RAX + -0x10],RAX LAB_0019b292: LEA RSI,[0x217901] LEA RDX,[0x217905] MOV RDI,R14 CALL 0x0012698a LEA RDI,[RSP + 0x1b0] LEA RBX,[RSP + 0x1c0] MOV qword ptr [RBX + -0x10],RBX LAB_0019b2bc: LEA RSI,[0x2179a9] LEA RDX,[0x2179b5] CALL 0x0012698a LEA R13,[RSP + 0x1d0] LEA RDI,[RSP + 0x1e8] LEA RAX,[RSP + 0x1f8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0019b2fa: LEA RDX,[0x20c13a] MOV RSI,RDX CALL 0x0012698a LAB_0019b309: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] LEA RCX,[RSP + 0xf] MOV EDX,0x4 CALL 0x001a3562 MOV R14D,0x1e0 LAB_0019b328: LEA RAX,[RSP + R14*0x1] ADD RAX,0x18 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x0019b344 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011dc40 LAB_0019b344: LEA RBX,[RSP + R14*0x1] ADD RBX,-0x10 MOV RDI,RBX CALL 0x001a3532 MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + R14*0x1] ADD RAX,-0x20 CMP RAX,RDI JZ 0x0019b370 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011dc40 LAB_0019b370: LEA RAX,[RSP + R14*0x1] ADD RAX,-0x40 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x0019b38c MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011dc40 LAB_0019b38c: ADD R14,-0x78 JNZ 0x0019b328 LAB_0019b392: MOVZX R8D,BPL LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV ECX,0x1 CALL 0x0019a723 LAB_0019b3ab: LEA RDI,[RSP + 0x10] CALL 0x001a3502 MOV RAX,R15 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */ chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2) { long *plVar1; long *plVar2; int7 in_register_00000031; long lVar3; long alStack_288 [8]; vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8]; int8 uStack_240; int8 uStack_230; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8]; long alStack_220 [2]; int1 *local_210 [2]; int1 local_200 [16]; int1 *local_1f0 [2]; int1 local_1e0 [16]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; int1 *local_1b8 [2]; int1 local_1a8 [16]; int1 *local_198 [2]; int1 local_188 [16]; int1 *local_178 [2]; int1 local_168 [16]; int8 local_158; int8 uStack_150; int8 local_148; int1 *local_140 [2]; int1 local_130 [16]; int1 *local_120 [2]; int1 local_110 [16]; int1 *local_100 [2]; int1 local_f0 [16]; int8 local_e0; int8 uStack_d8; int8 local_d0; int1 *local_c8 [2]; int1 local_b8 [16]; int1 *local_a8 [2]; int1 local_98 [16]; int1 *local_88 [2]; int1 local_78 [16]; int8 local_68; int8 uStack_60; int8 local_58; int1 *local_50 [2]; int1 local_40 [16]; local_210[0] = local_200; /* try { // try from 0019b0f8 to 0019b10f has its CatchHandler @ 0019b59b */ uStack_240 = 0x19b110; std::__cxx11::string::_M_construct<char_const*>(local_210,"system",""); local_1f0[0] = local_1e0; /* try { // try from 0019b11e to 0019b130 has its CatchHandler @ 0019b58c */ uStack_240 = 0x19b131; std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant",""); local_1b8[0] = local_1a8; local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 0019b159 to 0019b167 has its CatchHandler @ 0019b562 */ uStack_240 = 0x19b168; std::__cxx11::string::_M_construct<char_const*>(local_1b8,""); local_198[0] = local_188; /* try { // try from 0019b17c to 0019b191 has its CatchHandler @ 0019b538 */ uStack_240 = 0x19b192; std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_00217901,&DAT_00217905); local_178[0] = local_168; /* try { // try from 0019b1a6 to 0019b1b8 has its CatchHandler @ 0019b503 */ uStack_240 = 0x19b1b9; std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello",""); local_140[0] = local_130; local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 0019b1e4 to 0019b1f2 has its CatchHandler @ 0019b4d6 */ uStack_240 = 0x19b1f3; std::__cxx11::string::_M_construct<char_const*>(local_140,""); local_120[0] = local_110; /* try { // try from 0019b207 to 0019b21c has its CatchHandler @ 0019b4cb */ uStack_240 = 0x19b21d; std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant",""); local_100[0] = local_f0; /* try { // try from 0019b231 to 0019b243 has its CatchHandler @ 0019b496 */ uStack_240 = 0x19b244; std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there",""); local_c8[0] = local_b8; local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 0019b26f to 0019b27d has its CatchHandler @ 0019b469 */ uStack_240 = 0x19b27e; std::__cxx11::string::_M_construct<char_const*>(local_c8,""); local_a8[0] = local_98; /* try { // try from 0019b292 to 0019b2a7 has its CatchHandler @ 0019b45e */ uStack_240 = 0x19b2a8; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_00217901,&DAT_00217905); local_88[0] = local_78; /* try { // try from 0019b2bc to 0019b2ce has its CatchHandler @ 0019b42c */ uStack_240 = 0x19b2cf; std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?",""); local_50[0] = local_40; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 0019b2fa to 0019b308 has its CatchHandler @ 0019b3ff */ uStack_240 = 0x19b309; std::__cxx11::string::_M_construct<char_const*>(local_50,""); /* try { // try from 0019b309 to 0019b321 has its CatchHandler @ 0019b3dc */ uStack_240 = 0x19b322; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,(long)&uStack_230 + 7); lVar3 = 0x1e0; do { if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) { uStack_240 = 0x19b344; operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1 ); } uStack_240 = 0x19b354; std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3); plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20); plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30); if (plVar1 != plVar2) { uStack_240 = 0x19b370; operator_delete(plVar2,*plVar1 + 1); } plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10); if (plVar2 != *(long **)((long)alStack_288 + lVar3)) { uStack_240 = 0x19b38c; operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1); } lVar3 = lVar3 + -0x78; } while (lVar3 != 0); /* try { // try from 0019b392 to 0019b3aa has its CatchHandler @ 0019b3ca */ uStack_240 = 0x19b3ab; common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); uStack_240 = 0x19b3b5; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
63,223
testing::internal::UnitTestImpl::UnitTestImpl(testing::UnitTest*)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
UnitTestImpl::UnitTestImpl(UnitTest* parent) : parent_(parent), GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355 /* using this in initializer */) default_global_test_part_result_reporter_(this), default_per_thread_test_part_result_reporter_(this), GTEST_DISABLE_MSC_WARNINGS_POP_() global_test_part_result_repoter_( &default_global_test_part_result_reporter_), per_thread_test_part_result_reporter_( &default_per_thread_test_part_result_reporter_), parameterized_test_registry_(), parameterized_tests_registered_(false), last_death_test_suite_(-1), current_test_suite_(nullptr), current_test_info_(nullptr), ad_hoc_test_result_(), os_stack_trace_getter_(nullptr), post_flag_parse_init_performed_(false), random_seed_(0), // Will be overridden by the flag before first use. random_(0), // Will be reseeded before first use. start_timestamp_(0), elapsed_time_(0), #if GTEST_HAS_DEATH_TEST death_test_factory_(new DefaultDeathTestFactory), #endif // Will be overridden by the flag before first use. catch_exceptions_(false) { listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter); }
O1
cpp
testing::internal::UnitTestImpl::UnitTestImpl(testing::UnitTest*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x2780a(%rip), %rax # 0x590f0 movq %rax, (%rdi) movq %rsi, 0x8(%rdi) leaq 0x20(%rdi), %rax movq %rax, 0x10(%rsp) movq %rax, 0x10(%rdi) movq $0x0, 0x18(%rdi) movb $0x0, 0x20(%rdi) leaq 0x30(%rdi), %rax leaq 0x27527(%rip), %rcx # 0x58e38 movq %rcx, 0x30(%rdi) movq %rdi, 0x38(%rdi) leaq 0x27540(%rip), %rcx # 0x58e60 movq %rcx, 0x40(%rdi) movq %rdi, 0x48(%rdi) movq %rax, 0x50(%rdi) leaq 0x58(%rdi), %r14 movq %r14, %rdi callq 0x36db8 callq 0x3f234 leaq 0x90(%rbx), %r15 movl %eax, (%r15) movl $0x10, %edi callq 0x9490 leaq 0x40(%rbx), %rcx leaq 0x28344(%rip), %rdx # 0x59ca0 movq %rdx, (%rax) movq %rcx, 0x8(%rax) movq %rax, 0x98(%rbx) leaq 0x108(%rbx), %rax xorl %ecx, %ecx movl %ecx, 0x108(%rbx) movq %rcx, 0x110(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xa0(%rbx) movups %xmm0, 0xb0(%rbx) movups %xmm0, 0xc0(%rbx) movups %xmm0, 0xd0(%rbx) movups %xmm0, 0xe0(%rbx) movups %xmm0, 0xf0(%rbx) movq %rax, 0x118(%rbx) movq %rax, 0x120(%rbx) movq %rcx, 0x128(%rbx) leaq 0x138(%rbx), %rax movl %ecx, 0x138(%rbx) movq %rcx, 0x140(%rbx) movq %rax, 0x148(%rbx) movq %rax, 0x150(%rbx) movq %rcx, 0x158(%rbx) movb $0x0, 0x160(%rbx) movl $0xffffffff, 0x164(%rbx) # imm = 0xFFFFFFFF leaq 0x178(%rbx), %r12 movups %xmm0, 0x168(%rbx) movq %r12, %rdi callq 0x36db8 xorps %xmm0, %xmm0 movups %xmm0, 0x1d0(%rbx) movups %xmm0, 0x1c0(%rbx) movups %xmm0, 0x1b0(%rbx) movl $0x0, 0x1e0(%rbx) movups %xmm0, 0x1e8(%rbx) movl $0x28, %edi callq 0x9490 leaq 0x1f8(%rbx), %rbp leaq 0x27495(%rip), %rcx # 0x58ee8 movq %rcx, (%rax) movb $0x1, 0x8(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) xorl %ecx, %ecx movq %rcx, 0x20(%rax) movq %rax, 0x1f8(%rbx) movq %rcx, 0x21c(%rbx) movups %xmm0, 0x200(%rbx) movups %xmm0, 0x209(%rbx) movups %xmm0, 0x228(%rbx) movq %rcx, 0x238(%rbx) movl $0x8, %edi callq 0x9490 leaq 0x277ee(%rip), %rcx # 0x59290 movq %rcx, (%rax) movq %rax, 0x240(%rbx) callq 0x3f318 leaq 0x248(%rbx), %r13 movl %eax, (%r13) movl $0x8, %edi callq 0x9490 leaq 0x28243(%rip), %rcx # 0x59d10 movq %rcx, (%rax) movq %rax, 0x250(%rbx) movb $0x0, 0x258(%rbx) movl $0x8, %edi callq 0x9490 leaq 0x27861(%rip), %rcx # 0x59350 movq %rcx, (%rax) movq %rbp, %rdi movq %rax, %rsi callq 0x30cd4 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, 0x8(%rsp) jmp 0x31b5c movq %rax, 0x8(%rsp) jmp 0x31b77 movq %rax, 0x8(%rsp) jmp 0x31b7f movq %rax, 0x8(%rsp) jmp 0x31c15 movq %rax, 0x8(%rsp) movq %r13, %rdi callq 0x37ec0 jmp 0x31b3f movq %rax, 0x8(%rsp) movq 0x240(%rbx), %rdi testq %rdi, %rdi je 0x31b51 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x240(%rbx) leaq 0x238(%rbx), %rdi callq 0x37f72 movq (%rbp), %rdi testq %rdi, %rdi je 0x31b77 movq (%rdi), %rax callq *0x8(%rax) movq %r12, %rdi callq 0x23a6c leaq 0xe8(%rbx), %r12 leaq 0x100(%rbx), %r13 leaq 0x130(%rbx), %rdi callq 0x399ea movq %r13, %rdi callq 0x3ae52 movq %r12, %rdi callq 0x37fa6 movq 0xd0(%rbx), %rdi testq %rdi, %rdi je 0x31bc4 movq 0xe0(%rbx), %rsi subq %rdi, %rsi callq 0x94c0 leaq 0xa0(%rbx), %r12 movq 0xb8(%rbx), %rdi testq %rdi, %rdi je 0x31be6 movq 0xc8(%rbx), %rsi subq %rdi, %rsi callq 0x94c0 movq (%r12), %rdi testq %rdi, %rdi je 0x31bfe movq 0xb0(%rbx), %rsi subq %rdi, %rsi callq 0x94c0 movq %r15, %rdi callq 0x37fee jmp 0x31c0d movq %rax, 0x8(%rsp) movq %r14, %rdi callq 0x36eae movq 0x10(%rbx), %rdi cmpq 0x10(%rsp), %rdi je 0x31c30 movq 0x10(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x94c0 movq 0x8(%rsp), %rdi callq 0x99a0
_ZN7testing8internal12UnitTestImplC2EPNS_8UnitTestE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi lea rax, off_590F0 mov [rdi], rax mov [rdi+8], rsi lea rax, [rdi+20h] mov [rsp+48h+var_38], rax mov [rdi+10h], rax mov qword ptr [rdi+18h], 0 mov byte ptr [rdi+20h], 0 lea rax, [rdi+30h] lea rcx, off_58E38 mov [rdi+30h], rcx mov [rdi+38h], rdi lea rcx, off_58E60 mov [rdi+40h], rcx mov [rdi+48h], rdi mov [rdi+50h], rax lea r14, [rdi+58h] mov rdi, r14; this call _ZN7testing8internal5MutexC2Ev; testing::internal::Mutex::Mutex(void) call _ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv; testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::CreateKey(void) lea r15, [rbx+90h] mov [r15], eax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, [rbx+40h] lea rdx, off_59CA0 mov [rax], rdx mov [rax+8], rcx mov [rbx+98h], rax lea rax, [rbx+108h] xor ecx, ecx mov [rbx+108h], ecx mov [rbx+110h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+0A0h], xmm0 movups xmmword ptr [rbx+0B0h], xmm0 movups xmmword ptr [rbx+0C0h], xmm0 movups xmmword ptr [rbx+0D0h], xmm0 movups xmmword ptr [rbx+0E0h], xmm0 movups xmmword ptr [rbx+0F0h], xmm0 mov [rbx+118h], rax mov [rbx+120h], rax mov [rbx+128h], rcx lea rax, [rbx+138h] mov [rbx+138h], ecx mov [rbx+140h], rcx mov [rbx+148h], rax mov [rbx+150h], rax mov [rbx+158h], rcx mov byte ptr [rbx+160h], 0 mov dword ptr [rbx+164h], 0FFFFFFFFh lea r12, [rbx+178h] movups xmmword ptr [rbx+168h], xmm0 mov rdi, r12; this call _ZN7testing8internal5MutexC2Ev; testing::internal::Mutex::Mutex(void) xorps xmm0, xmm0 movups xmmword ptr [rbx+1D0h], xmm0 movups xmmword ptr [rbx+1C0h], xmm0 movups xmmword ptr [rbx+1B0h], xmm0 mov dword ptr [rbx+1E0h], 0 movups xmmword ptr [rbx+1E8h], xmm0 mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) lea rbp, [rbx+1F8h] lea rcx, off_58EE8 mov [rax], rcx mov byte ptr [rax+8], 1 xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 xor ecx, ecx mov [rax+20h], rcx mov [rbx+1F8h], rax mov [rbx+21Ch], rcx movups xmmword ptr [rbx+200h], xmm0 movups xmmword ptr [rbx+209h], xmm0 movups xmmword ptr [rbx+228h], xmm0 mov [rbx+238h], rcx mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_59290 mov [rax], rcx mov [rbx+240h], rax call _ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv; testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::CreateKey(void) lea r13, [rbx+248h] mov [r13+0], eax mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_59D10 mov [rax], rcx mov [rbx+250h], rax mov byte ptr [rbx+258h], 0 mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_59350 mov [rax], rcx mov rdi, rbp; this mov rsi, rax; testing::TestEventListener * call _ZN7testing18TestEventListeners23SetDefaultResultPrinterEPNS_17TestEventListenerE; testing::TestEventListeners::SetDefaultResultPrinter(testing::TestEventListener *) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov [rsp+arg_0], rax jmp short loc_31B5C mov [rsp+arg_0], rax jmp short loc_31B77 mov [rsp+arg_0], rax jmp short loc_31B7F mov [rsp+arg_0], rax jmp loc_31C15 mov [rsp+arg_0], rax mov rdi, r13 call _ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED2Ev; testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::~ThreadLocal() jmp short loc_31B3F mov [rsp+arg_0], rax loc_31B3F: mov rdi, [rbx+240h] test rdi, rdi jz short loc_31B51 mov rax, [rdi] call qword ptr [rax+8] loc_31B51: mov qword ptr [rbx+240h], 0 loc_31B5C: lea rdi, [rbx+238h] call _ZNSt10unique_ptrIN7testing8internal24InternalRunDeathTestFlagESt14default_deleteIS2_EED2Ev; std::unique_ptr<testing::internal::InternalRunDeathTestFlag>::~unique_ptr() mov rdi, [rbp+0] test rdi, rdi jz short loc_31B77 mov rax, [rdi] call qword ptr [rax+8] loc_31B77: mov rdi, r12; this call _ZN7testing10TestResultD2Ev; testing::TestResult::~TestResult() loc_31B7F: lea r12, [rbx+0E8h] lea r13, [rbx+100h] lea rdi, [rbx+130h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree() mov rdi, r13 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7testing8internal34TypeParameterizedTestSuiteRegistry30TypeParameterizedTestSuiteInfoEESt10_Select1stISC_ESt4lessIS5_ESaISC_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>,std::_Select1st<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>,std::less<std::string>,std::allocator<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>::~_Rb_tree() mov rdi, r12; this call _ZN7testing8internal30ParameterizedTestSuiteRegistryD2Ev; testing::internal::ParameterizedTestSuiteRegistry::~ParameterizedTestSuiteRegistry() mov rdi, [rbx+0D0h]; void * test rdi, rdi jz short loc_31BC4 mov rsi, [rbx+0E0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31BC4: lea r12, [rbx+0A0h] mov rdi, [rbx+0B8h]; void * test rdi, rdi jz short loc_31BE6 mov rsi, [rbx+0C8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31BE6: mov rdi, [r12]; void * test rdi, rdi jz short loc_31BFE mov rsi, [rbx+0B0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31BFE: mov rdi, r15 call _ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED2Ev; testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::~ThreadLocal() jmp short loc_31C0D mov [rsp+arg_0], rax loc_31C0D: mov rdi, r14; this call _ZN7testing8internal5MutexD2Ev; testing::internal::Mutex::~Mutex() loc_31C15: mov rdi, [rbx+10h]; void * cmp rdi, [rsp+arg_8] jz short loc_31C30 mov rax, [rsp+arg_8] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31C30: mov rdi, [rsp+arg_0] call __Unwind_Resume
testing::TestEventListener * testing::internal::UnitTestImpl::UnitTestImpl( testing::internal::UnitTestImpl *this, testing::UnitTest *a2) { testing::internal::Mutex *v3; // rdi int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d _QWORD *v8; // rax long long v9; // rax _QWORD *v10; // rax int v11; // edx int v12; // r8d int v13; // r9d _QWORD *v14; // rax testing::TestEventListener *v15; // rax *(_QWORD *)this = off_590F0; *((_QWORD *)this + 1) = a2; *((_QWORD *)this + 2) = (char *)this + 32; *((_QWORD *)this + 3) = 0LL; *((_BYTE *)this + 32) = 0; *((_QWORD *)this + 6) = off_58E38; *((_QWORD *)this + 7) = this; *((_QWORD *)this + 8) = off_58E60; *((_QWORD *)this + 9) = this; *((_QWORD *)this + 10) = (char *)this + 48; v3 = (testing::internal::UnitTestImpl *)((char *)this + 88); testing::internal::Mutex::Mutex(v3); *((_DWORD *)this + 36) = testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::CreateKey( (_DWORD)v3, (_DWORD)a2, v4, v5, v6, v7); v8 = (_QWORD *)operator new(0x10uLL); *v8 = off_59CA0; v8[1] = (char *)this + 64; *((_QWORD *)this + 19) = v8; *((_DWORD *)this + 66) = 0; *((_QWORD *)this + 34) = 0LL; *((_OWORD *)this + 10) = 0LL; *((_OWORD *)this + 11) = 0LL; *((_OWORD *)this + 12) = 0LL; *((_OWORD *)this + 13) = 0LL; *((_OWORD *)this + 14) = 0LL; *((_OWORD *)this + 15) = 0LL; *((_QWORD *)this + 35) = (char *)this + 264; *((_QWORD *)this + 36) = (char *)this + 264; *((_QWORD *)this + 37) = 0LL; *((_DWORD *)this + 78) = 0; *((_QWORD *)this + 40) = 0LL; *((_QWORD *)this + 41) = (char *)this + 312; *((_QWORD *)this + 42) = (char *)this + 312; *((_QWORD *)this + 43) = 0LL; *((_BYTE *)this + 352) = 0; *((_DWORD *)this + 89) = -1; *(_OWORD *)((char *)this + 360) = 0LL; testing::internal::Mutex::Mutex((testing::internal::UnitTestImpl *)((char *)this + 376)); *((_OWORD *)this + 29) = 0LL; *((_OWORD *)this + 28) = 0LL; *((_OWORD *)this + 27) = 0LL; *((_DWORD *)this + 120) = 0; *(_OWORD *)((char *)this + 488) = 0LL; v9 = operator new(0x28uLL); *(_QWORD *)v9 = off_58EE8; *(_BYTE *)(v9 + 8) = 1; *(_OWORD *)(v9 + 16) = 0LL; *(_QWORD *)(v9 + 32) = 0LL; *((_QWORD *)this + 63) = v9; *(_QWORD *)((char *)this + 540) = 0LL; *((_OWORD *)this + 32) = 0LL; *(_OWORD *)((char *)this + 521) = 0LL; *(_OWORD *)((char *)this + 552) = 0LL; *((_QWORD *)this + 71) = 0LL; v10 = (_QWORD *)operator new(8uLL); *v10 = off_59290; *((_QWORD *)this + 72) = v10; *((_DWORD *)this + 146) = testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::CreateKey( 8, (_DWORD)a2, v11, (unsigned int)off_59290, v12, v13); v14 = (_QWORD *)operator new(8uLL); *v14 = off_59D10; *((_QWORD *)this + 74) = v14; *((_BYTE *)this + 600) = 0; v15 = (testing::TestEventListener *)operator new(8uLL); *(_QWORD *)v15 = off_59350; return testing::TestEventListeners::SetDefaultResultPrinter( (testing::internal::UnitTestImpl *)((char *)this + 504), v15); }
UnitTestImpl: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA RAX,[0x1590f0] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],RSI LEA RAX,[RDI + 0x20] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RDI + 0x10],RAX MOV qword ptr [RDI + 0x18],0x0 MOV byte ptr [RDI + 0x20],0x0 LEA RAX,[RDI + 0x30] LEA RCX,[0x158e38] MOV qword ptr [RDI + 0x30],RCX MOV qword ptr [RDI + 0x38],RDI LEA RCX,[0x158e60] MOV qword ptr [RDI + 0x40],RCX MOV qword ptr [RDI + 0x48],RDI MOV qword ptr [RDI + 0x50],RAX LEA R14,[RDI + 0x58] LAB_00131930: MOV RDI,R14 CALL 0x00136db8 LAB_00131938: CALL 0x0013f234 LEA R15,[RBX + 0x90] MOV dword ptr [R15],EAX MOV EDI,0x10 CALL 0x00109490 LEA RCX,[RBX + 0x40] LEA RDX,[0x159ca0] MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RBX + 0x98],RAX LEA RAX,[RBX + 0x108] XOR ECX,ECX MOV dword ptr [RBX + 0x108],ECX MOV qword ptr [RBX + 0x110],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOVUPS xmmword ptr [RBX + 0xb0],XMM0 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOVUPS xmmword ptr [RBX + 0xd0],XMM0 MOVUPS xmmword ptr [RBX + 0xe0],XMM0 MOVUPS xmmword ptr [RBX + 0xf0],XMM0 MOV qword ptr [RBX + 0x118],RAX MOV qword ptr [RBX + 0x120],RAX MOV qword ptr [RBX + 0x128],RCX LEA RAX,[RBX + 0x138] MOV dword ptr [RBX + 0x138],ECX MOV qword ptr [RBX + 0x140],RCX MOV qword ptr [RBX + 0x148],RAX MOV qword ptr [RBX + 0x150],RAX MOV qword ptr [RBX + 0x158],RCX MOV byte ptr [RBX + 0x160],0x0 MOV dword ptr [RBX + 0x164],0xffffffff LEA R12,[RBX + 0x178] MOVUPS xmmword ptr [RBX + 0x168],XMM0 LAB_00131a0a: MOV RDI,R12 CALL 0x00136db8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x1d0],XMM0 MOVUPS xmmword ptr [RBX + 0x1c0],XMM0 MOVUPS xmmword ptr [RBX + 0x1b0],XMM0 MOV dword ptr [RBX + 0x1e0],0x0 MOVUPS xmmword ptr [RBX + 0x1e8],XMM0 LAB_00131a3b: MOV EDI,0x28 CALL 0x00109490 LEA RBP,[RBX + 0x1f8] LEA RCX,[0x158ee8] MOV qword ptr [RAX],RCX MOV byte ptr [RAX + 0x8],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 XOR ECX,ECX MOV qword ptr [RAX + 0x20],RCX MOV qword ptr [RBX + 0x1f8],RAX MOV qword ptr [RBX + 0x21c],RCX MOVUPS xmmword ptr [RBX + 0x200],XMM0 MOVUPS xmmword ptr [RBX + 0x209],XMM0 MOVUPS xmmword ptr [RBX + 0x228],XMM0 MOV qword ptr [RBX + 0x238],RCX LAB_00131a91: MOV EDI,0x8 CALL 0x00109490 LEA RCX,[0x159290] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x240],RAX LAB_00131aac: CALL 0x0013f318 LEA R13,[RBX + 0x248] MOV dword ptr [R13],EAX MOV EDI,0x8 CALL 0x00109490 LEA RCX,[0x159d10] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x250],RAX MOV byte ptr [RBX + 0x258],0x0 LAB_00131ade: MOV EDI,0x8 CALL 0x00109490 LEA RCX,[0x159350] MOV qword ptr [RAX],RCX MOV RDI,RBP MOV RSI,RAX CALL 0x00130cd4 LAB_00131afd: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::UnitTestImpl::UnitTestImpl(testing::UnitTest*) */ void __thiscall testing::internal::UnitTestImpl::UnitTestImpl(UnitTestImpl *this,UnitTest *param_1) { int4 uVar1; int8 *puVar2; TestEventListener *pTVar3; *(int ***)this = &PTR__UnitTestImpl_001590f0; *(UnitTest **)(this + 8) = param_1; *(UnitTestImpl **)(this + 0x10) = this + 0x20; *(int8 *)(this + 0x18) = 0; this[0x20] = (UnitTestImpl)0x0; *(int ***)(this + 0x30) = &PTR__TestPartResultReporterInterface_00158e38; *(UnitTestImpl **)(this + 0x38) = this; *(int ***)(this + 0x40) = &PTR__TestPartResultReporterInterface_00158e60; *(UnitTestImpl **)(this + 0x48) = this; *(UnitTestImpl **)(this + 0x50) = this + 0x30; /* try { // try from 00131930 to 00131937 has its CatchHandler @ 00131b21 */ Mutex::Mutex((Mutex *)(this + 0x58)); /* try { // try from 00131938 to 00131950 has its CatchHandler @ 00131c08 */ uVar1 = ThreadLocal<testing::TestPartResultReporterInterface*>::CreateKey(); *(int4 *)(this + 0x90) = uVar1; puVar2 = (int8 *)operator_new(0x10); *puVar2 = &PTR__ValueHolderFactory_00159ca0; puVar2[1] = this + 0x40; *(int8 **)(this + 0x98) = puVar2; *(int4 *)(this + 0x108) = 0; *(int8 *)(this + 0x110) = 0; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; *(int8 *)(this + 0xf8) = 0; *(UnitTestImpl **)(this + 0x118) = this + 0x108; *(UnitTestImpl **)(this + 0x120) = this + 0x108; *(int8 *)(this + 0x128) = 0; *(int4 *)(this + 0x138) = 0; *(int8 *)(this + 0x140) = 0; *(UnitTestImpl **)(this + 0x148) = this + 0x138; *(UnitTestImpl **)(this + 0x150) = this + 0x138; *(int8 *)(this + 0x158) = 0; this[0x160] = (UnitTestImpl)0x0; *(int4 *)(this + 0x164) = 0xffffffff; *(int8 *)(this + 0x168) = 0; *(int8 *)(this + 0x170) = 0; /* try { // try from 00131a0a to 00131a11 has its CatchHandler @ 00131b1a */ Mutex::Mutex((Mutex *)(this + 0x178)); *(int8 *)(this + 0x1d0) = 0; *(int8 *)(this + 0x1d8) = 0; *(int8 *)(this + 0x1c0) = 0; *(int8 *)(this + 0x1c8) = 0; *(int8 *)(this + 0x1b0) = 0; *(int8 *)(this + 0x1b8) = 0; *(int4 *)(this + 0x1e0) = 0; *(int8 *)(this + 0x1e8) = 0; *(int8 *)(this + 0x1f0) = 0; /* try { // try from 00131a3b to 00131a44 has its CatchHandler @ 00131b13 */ puVar2 = (int8 *)operator_new(0x28); *puVar2 = &PTR__TestEventRepeater_00158ee8; *(int1 *)(puVar2 + 1) = 1; puVar2[2] = 0; puVar2[3] = 0; puVar2[4] = 0; *(int8 **)(this + 0x1f8) = puVar2; *(int8 *)(this + 0x21c) = 0; *(int8 *)(this + 0x200) = 0; *(int8 *)(this + 0x208) = 0; *(int8 *)(this + 0x209) = 0; *(int8 *)(this + 0x211) = 0; *(int8 *)(this + 0x228) = 0; *(int8 *)(this + 0x230) = 0; *(int8 *)(this + 0x238) = 0; /* try { // try from 00131a91 to 00131a9a has its CatchHandler @ 00131b0c */ puVar2 = (int8 *)operator_new(8); *puVar2 = &PTR__DeathTestFactory_00159290; *(int8 **)(this + 0x240) = puVar2; /* try { // try from 00131aac to 00131ac5 has its CatchHandler @ 00131b3a */ uVar1 = ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>> ::CreateKey(); *(int4 *)(this + 0x248) = uVar1; puVar2 = (int8 *)operator_new(8); *puVar2 = &PTR__ValueHolderFactory_00159d10; *(int8 **)(this + 0x250) = puVar2; this[600] = (UnitTestImpl)0x0; /* try { // try from 00131ade to 00131afc has its CatchHandler @ 00131b2b */ pTVar3 = (TestEventListener *)operator_new(8); *(int ***)pTVar3 = &PTR__TestEventListener_00159350; TestEventListeners::SetDefaultResultPrinter((TestEventListeners *)(this + 0x1f8),pTVar3); return; }
63,224
my_hash_init2
eloqsql/mysys/hash.c
my_bool my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size, CHARSET_INFO *charset, ulong size, size_t key_offset, size_t key_length, my_hash_get_key get_key, my_hash_function hash_function, void (*free_element)(void*), uint flags) { my_bool res; DBUG_ENTER("my_hash_init2"); DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size)); hash->records=0; hash->key_offset=key_offset; hash->key_length=key_length; hash->blength=1; hash->get_key=get_key; hash->hash_function= hash_function ? hash_function : my_hash_sort; hash->free=free_element; hash->flags=flags; hash->charset=charset; res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size, growth_size, MYF((flags & HASH_THREAD_SPECIFIC ? MY_THREAD_SPECIFIC : 0))); DBUG_RETURN(res); }
O0
c
my_hash_init2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x30(%rbp), %eax movq 0x28(%rbp), %rax movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) jmp 0x2c113 movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq $0x1, 0x10(%rax) movq 0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x50(%rax) cmpq $0x0, 0x20(%rbp) je 0x2c15f movq 0x20(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x2c16c leaq -0x126(%rip), %rax # 0x2c040 movq %rax, -0x40(%rbp) jmp 0x2c16c movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x58(%rax) movq 0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movl 0x30(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x68(%rax) movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi addq $0x28, %rsi movq -0x28(%rbp), %rax movl %eax, %r8d movl -0x14(%rbp), %r9d movl 0x30(%rbp), %edx andl $0x2, %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, %eax movl $0x10, %edx xorl %ecx, %ecx movq %rax, (%rsp) callq 0x309c0 movb %al, -0x31(%rbp) movb -0x31(%rbp), %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
my_hash_init2: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_20] mov rax, [rbp+arg_18] mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 jmp short $+2 loc_2C113: mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+arg_0] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov qword ptr [rax+10h], 1 mov rcx, [rbp+arg_8] mov rax, [rbp+var_10] mov [rax+50h], rcx cmp [rbp+arg_10], 0 jz short loc_2C15F mov rax, [rbp+arg_10] mov [rbp+var_40], rax jmp short loc_2C16C loc_2C15F: lea rax, my_hash_sort mov [rbp+var_40], rax jmp short $+2 loc_2C16C: mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+58h], rcx mov rcx, [rbp+arg_18] mov rax, [rbp+var_10] mov [rax+60h], rcx mov ecx, [rbp+arg_20] mov rax, [rbp+var_10] mov [rax+20h], ecx mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+68h], rcx mov edi, [rbp+var_4] mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov rax, [rbp+var_28] mov r8d, eax mov r9d, [rbp+var_14] mov edx, [rbp+arg_20] and edx, 2 xor eax, eax mov ecx, 10000h cmp edx, 0 cmovnz eax, ecx mov eax, eax mov edx, 10h xor ecx, ecx mov [rsp+50h+var_50], rax call init_dynamic_array2 mov [rbp+var_31], al mov al, [rbp+var_31] mov [rbp+var_41], al mov al, [rbp+var_41] add rsp, 50h pop rbp retn
long long my_hash_init2( int a1, long long a2, int a3, long long a4, int a5, long long a6, long long a7, long long a8, long long ( *a9)(long long a1, long long a2, long long a3), long long a10, int a11) { int v11; // esi unsigned int v12; // eax long long ( *v14)(long long, long long, long long); // [rsp+10h] [rbp-40h] *(_QWORD *)(a2 + 24) = 0LL; *(_QWORD *)a2 = a6; *(_QWORD *)(a2 + 8) = a7; *(_QWORD *)(a2 + 16) = 1LL; *(_QWORD *)(a2 + 80) = a8; if ( a9 ) v14 = a9; else v14 = my_hash_sort; *(_QWORD *)(a2 + 88) = v14; *(_QWORD *)(a2 + 96) = a10; *(_DWORD *)(a2 + 32) = a11; *(_QWORD *)(a2 + 104) = a4; v11 = a2 + 40; v12 = 0; if ( (a11 & 2) != 0 ) v12 = 0x10000; return init_dynamic_array2(a1, v11, 16, 0, a5, a3, v12); }
my_hash_init2: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x30] MOV RAX,qword ptr [RBP + 0x28] MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 JMP 0x0012c113 LAB_0012c113: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x1 MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x50],RCX CMP qword ptr [RBP + 0x20],0x0 JZ 0x0012c15f MOV RAX,qword ptr [RBP + 0x20] MOV qword ptr [RBP + -0x40],RAX JMP 0x0012c16c LAB_0012c15f: LEA RAX,[0x12c040] MOV qword ptr [RBP + -0x40],RAX JMP 0x0012c16c LAB_0012c16c: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x58],RCX MOV RCX,qword ptr [RBP + 0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX MOV ECX,dword ptr [RBP + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x20],ECX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x68],RCX MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV RAX,qword ptr [RBP + -0x28] MOV R8D,EAX MOV R9D,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + 0x30] AND EDX,0x2 XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV EAX,EAX MOV EDX,0x10 XOR ECX,ECX MOV qword ptr [RSP],RAX CALL 0x001309c0 MOV byte ptr [RBP + -0x31],AL MOV AL,byte ptr [RBP + -0x31] MOV byte ptr [RBP + -0x41],AL MOV AL,byte ptr [RBP + -0x41] ADD RSP,0x50 POP RBP RET
int8 my_hash_init2(int4 param_1,int8 *param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6,int8 param_7,int8 param_8, code *param_9,int8 param_10,uint param_11) { int4 uVar1; int8 uVar2; code *local_48; param_2[3] = 0; *param_2 = param_6; param_2[1] = param_7; param_2[2] = 1; param_2[10] = param_8; if (param_9 == (code *)0x0) { local_48 = my_hash_sort; } else { local_48 = param_9; } param_2[0xb] = local_48; param_2[0xc] = param_10; *(uint *)(param_2 + 4) = param_11; param_2[0xd] = param_4; uVar1 = 0; if ((param_11 & 2) != 0) { uVar1 = 0x10000; } uVar2 = init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,uVar1); return uVar2; }
63,225
ma_init_dynamic_array
eloqsql/libmariadb/libmariadb/ma_array.c
my_bool ma_init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size, uint init_alloc, uint alloc_increment CALLER_INFO_PROTO) { if (!alloc_increment) { alloc_increment=max((8192-MALLOC_OVERHEAD)/element_size,16); if (init_alloc > 8 && alloc_increment > init_alloc * 2) alloc_increment=init_alloc*2; } if (!init_alloc) init_alloc=alloc_increment; array->elements=0; array->max_element=init_alloc; array->alloc_increment=alloc_increment; array->size_of_element=element_size; if (!(array->buffer=(char*) malloc(element_size*init_alloc))) { array->max_element=0; return(TRUE); } return(FALSE); }
O3
c
ma_init_dynamic_array: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edx, %r8d movq %rdi, %rbx testl %ecx, %ecx jne 0x2f854 movl $0x10, %ecx cmpl $0x1e1, %esi # imm = 0x1E1 ja 0x2f845 movw $0x1ff8, %ax # imm = 0x1FF8 xorl %edx, %edx divw %si movzwl %ax, %ecx cmpl $0x9, %r8d jb 0x2f854 leal (%r8,%r8), %eax cmpl %eax, %ecx cmovael %eax, %ecx testl %r8d, %r8d cmovel %ecx, %r8d movl $0x0, 0x8(%rbx) movl %r8d, 0xc(%rbx) movl %ecx, 0x10(%rbx) movl %esi, 0x14(%rbx) imull %esi, %r8d movq %r8, %rdi callq 0x13600 movq %rax, (%rbx) testq %rax, %rax je 0x2f884 xorl %eax, %eax jmp 0x2f88d movl $0x0, 0xc(%rbx) movb $0x1, %al addq $0x8, %rsp popq %rbx popq %rbp retq
ma_init_dynamic_array: push rbp mov rbp, rsp push rbx push rax mov r8d, edx mov rbx, rdi test ecx, ecx jnz short loc_2F854 mov ecx, 10h cmp esi, 1E1h ja short loc_2F845 mov ax, 1FF8h xor edx, edx div si movzx ecx, ax loc_2F845: cmp r8d, 9 jb short loc_2F854 lea eax, [r8+r8] cmp ecx, eax cmovnb ecx, eax loc_2F854: test r8d, r8d cmovz r8d, ecx mov dword ptr [rbx+8], 0 mov [rbx+0Ch], r8d mov [rbx+10h], ecx mov [rbx+14h], esi imul r8d, esi mov rdi, r8 call _malloc mov [rbx], rax test rax, rax jz short loc_2F884 xor eax, eax jmp short loc_2F88D loc_2F884: mov dword ptr [rbx+0Ch], 0 mov al, 1 loc_2F88D: add rsp, 8 pop rbx pop rbp retn
long long ma_init_dynamic_array(long long a1, unsigned int a2, unsigned int a3, unsigned int a4) { unsigned int v4; // r8d long long v5; // rax v4 = a3; if ( !a4 ) { a4 = 16; if ( a2 <= 0x1E1 ) a4 = 0x1FF8u / (unsigned __int16)a2; if ( a3 >= 9 && a4 >= 2 * a3 ) a4 = 2 * a3; } if ( !a3 ) v4 = a4; *(_DWORD *)(a1 + 8) = 0; *(_DWORD *)(a1 + 12) = v4; *(_DWORD *)(a1 + 16) = a4; *(_DWORD *)(a1 + 20) = a2; v5 = malloc(a2 * v4); *(_QWORD *)a1 = v5; if ( v5 ) return 0LL; *(_DWORD *)(a1 + 12) = 0; return 1LL; }
ma_init_dynamic_array: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV R8D,EDX MOV RBX,RDI TEST ECX,ECX JNZ 0x0012f854 MOV ECX,0x10 CMP ESI,0x1e1 JA 0x0012f845 MOV AX,0x1ff8 XOR EDX,EDX DIV SI MOVZX ECX,AX LAB_0012f845: CMP R8D,0x9 JC 0x0012f854 LEA EAX,[R8 + R8*0x1] CMP ECX,EAX CMOVNC ECX,EAX LAB_0012f854: TEST R8D,R8D CMOVZ R8D,ECX MOV dword ptr [RBX + 0x8],0x0 MOV dword ptr [RBX + 0xc],R8D MOV dword ptr [RBX + 0x10],ECX MOV dword ptr [RBX + 0x14],ESI IMUL R8D,ESI MOV RDI,R8 CALL 0x00113600 MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x0012f884 XOR EAX,EAX JMP 0x0012f88d LAB_0012f884: MOV dword ptr [RBX + 0xc],0x0 MOV AL,0x1 LAB_0012f88d: ADD RSP,0x8 POP RBX POP RBP RET
bool ma_init_dynamic_array(int8 *param_1,uint param_2,uint param_3,uint param_4) { void *pvVar1; if (param_4 == 0) { param_4 = 0x10; if (param_2 < 0x1e2) { param_4 = 0x1ff8 / (param_2 & 0xffff); } if ((8 < param_3) && (param_3 * 2 <= param_4)) { param_4 = param_3 * 2; } } if (param_3 == 0) { param_3 = param_4; } *(int4 *)(param_1 + 1) = 0; *(uint *)((long)param_1 + 0xc) = param_3; *(uint *)(param_1 + 2) = param_4; *(uint *)((long)param_1 + 0x14) = param_2; pvVar1 = malloc((ulong)(param_3 * param_2)); *param_1 = pvVar1; if (pvVar1 == (void *)0x0) { *(int4 *)((long)param_1 + 0xc) = 0; } return pvVar1 == (void *)0x0; }
63,226
my_b_safe_write
eloqsql/mysys/mf_iocache.c
int my_b_safe_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { /* Sasha: We are not writing this with the ? operator to avoid hitting a possible compiler bug. At least gcc 2.95 cannot deal with several layers of ternary operators that evaluated comma(,) operator expressions inside - I do have a test case if somebody wants it */ if (info->type == SEQ_READ_APPEND) return my_b_append(info, Buffer, Count); return my_b_write(info, Buffer, Count); }
O0
c
my_b_safe_write: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x3, 0xb0(%rax) jne 0xe1db7 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xe1a60 movl %eax, -0x4(%rbp) jmp 0xe1dcb movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xe1de0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_b_safe_write: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] cmp dword ptr [rax+0B0h], 3 jnz short loc_E1DB7 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_b_append mov [rbp+var_4], eax jmp short loc_E1DCB loc_E1DB7: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_b_write_3 mov [rbp+var_4], eax loc_E1DCB: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_b_safe_write(long long a1, long long a2, unsigned long long a3) { if ( *(_DWORD *)(a1 + 176) == 3 ) return (unsigned int)my_b_append(a1, a2, a3); else return (unsigned int)my_b_write_3(a1, a2, a3); }
my_b_safe_write: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xb0],0x3 JNZ 0x001e1db7 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e1a60 MOV dword ptr [RBP + -0x4],EAX JMP 0x001e1dcb LAB_001e1db7: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e1de0 MOV dword ptr [RBP + -0x4],EAX LAB_001e1dcb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_b_safe_write(long param_1,int8 param_2,int8 param_3) { int4 local_c; if (*(int *)(param_1 + 0xb0) == 3) { local_c = my_b_append(param_1,param_2,param_3); } else { local_c = my_b_write(param_1,param_2,param_3); } return local_c; }
63,227
ImPlot3DColormapData::ImPlot3DColormapData()
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d_internal.h
ImPlot3DColormapData() { Count = 0; }
O0
c
ImPlot3DColormapData::ImPlot3DColormapData(): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x40(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) callq 0xd9d10 movq 0x40(%rsp), %rdi addq $0x10, %rdi movq %rdi, 0x48(%rsp) callq 0xda750 jmp 0xda7a5 movq 0x38(%rsp), %rdi addq $0x20, %rdi movq %rdi, 0x30(%rsp) callq 0xda750 jmp 0xda7ba movq 0x38(%rsp), %rdi addq $0x30, %rdi movq %rdi, 0x28(%rsp) callq 0xd9d10 jmp 0xda7cf movq 0x38(%rsp), %rdi addq $0x40, %rdi movq %rdi, 0x20(%rsp) callq 0xda750 jmp 0xda7e4 movq 0x38(%rsp), %rdi addq $0x50, %rdi movq %rdi, 0x18(%rsp) callq 0xda750 jmp 0xda7f9 movq 0x38(%rsp), %rdi addq $0x60, %rdi movq %rdi, 0x10(%rsp) callq 0xd8b20 jmp 0xda80e movq 0x38(%rsp), %rdi addq $0x70, %rdi movq %rdi, 0x8(%rsp) callq 0xda750 jmp 0xda823 movq 0x38(%rsp), %rdi subq $-0x80, %rdi movq %rdi, (%rsp) callq 0xdaaf0 jmp 0xda837 movq 0x38(%rsp), %rdi addq $0x90, %rdi callq 0xdaa80 jmp 0xda84a movq 0x38(%rsp), %rax movl $0x0, 0xa0(%rax) addq $0x68, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xda944 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xda93a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xda930 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xda926 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xda91c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xda912 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xda908 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xda8fe movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) callq 0xdab10 movq 0x8(%rsp), %rdi callq 0xda960 movq 0x10(%rsp), %rdi callq 0xd8b90 movq 0x18(%rsp), %rdi callq 0xda960 movq 0x20(%rsp), %rdi callq 0xda960 movq 0x28(%rsp), %rdi callq 0xd9f70 movq 0x30(%rsp), %rdi callq 0xda960 movq 0x48(%rsp), %rdi callq 0xda960 movq 0x40(%rsp), %rdi callq 0xd9f70 movq 0x58(%rsp), %rdi callq 0x13540 nopl (%rax,%rax)
_ZN20ImPlot3DColormapDataC2Ev: sub rsp, 68h mov [rsp+68h+var_8], rdi mov rdi, [rsp+68h+var_8] mov [rsp+68h+var_28], rdi mov rax, rdi mov [rsp+68h+var_30], rax call _ZN8ImVectorIjEC2Ev; ImVector<uint>::ImVector(void) mov rdi, [rsp+68h+var_28] add rdi, 10h mov [rsp+68h+var_20], rdi call _ZN8ImVectorIiEC2Ev; ImVector<int>::ImVector(void) jmp short $+2 loc_DA7A5: mov rdi, [rsp+68h+var_30] add rdi, 20h ; ' ' mov [rsp+68h+var_38], rdi call _ZN8ImVectorIiEC2Ev; ImVector<int>::ImVector(void) jmp short $+2 loc_DA7BA: mov rdi, [rsp+68h+var_30] add rdi, 30h ; '0' mov [rsp+68h+var_40], rdi call _ZN8ImVectorIjEC2Ev; ImVector<uint>::ImVector(void) jmp short $+2 loc_DA7CF: mov rdi, [rsp+68h+var_30] add rdi, 40h ; '@' mov [rsp+68h+var_48], rdi call _ZN8ImVectorIiEC2Ev; ImVector<int>::ImVector(void) jmp short $+2 loc_DA7E4: mov rdi, [rsp+68h+var_30] add rdi, 50h ; 'P' mov [rsp+68h+var_50], rdi call _ZN8ImVectorIiEC2Ev; ImVector<int>::ImVector(void) jmp short $+2 loc_DA7F9: mov rdi, [rsp+68h+var_30] add rdi, 60h ; '`'; this mov [rsp+68h+var_58], rdi call _ZN15ImGuiTextBufferC2Ev; ImGuiTextBuffer::ImGuiTextBuffer(void) jmp short $+2 loc_DA80E: mov rdi, [rsp+68h+var_30] add rdi, 70h ; 'p' mov [rsp+68h+var_60], rdi call _ZN8ImVectorIiEC2Ev; ImVector<int>::ImVector(void) jmp short $+2 loc_DA823: mov rdi, [rsp+68h+var_30] sub rdi, 0FFFFFFFFFFFFFF80h mov [rsp+68h+var_68], rdi call _ZN8ImVectorIbEC2Ev; ImVector<bool>::ImVector(void) jmp short $+2 loc_DA837: mov rdi, [rsp+68h+var_30] add rdi, 90h; this call _ZN12ImGuiStorageC2Ev; ImGuiStorage::ImGuiStorage(void) jmp short $+2 loc_DA84A: mov rax, [rsp+68h+var_30] mov dword ptr [rax+0A0h], 0 add rsp, 68h retn mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp loc_DA944 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp loc_DA93A mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp loc_DA930 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_DA926 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_DA91C mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_DA912 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_DA908 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_DA8FE mov rdi, [rsp+0] mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax call _ZN8ImVectorIbED2Ev; ImVector<bool>::~ImVector() loc_DA8FE: mov rdi, [rsp+arg_0] call _ZN8ImVectorIiED2Ev; ImVector<int>::~ImVector() loc_DA908: mov rdi, [rsp+arg_8]; this call _ZN15ImGuiTextBufferD2Ev; ImGuiTextBuffer::~ImGuiTextBuffer() loc_DA912: mov rdi, [rsp+arg_10] call _ZN8ImVectorIiED2Ev; ImVector<int>::~ImVector() loc_DA91C: mov rdi, [rsp+arg_18] call _ZN8ImVectorIiED2Ev; ImVector<int>::~ImVector() loc_DA926: mov rdi, [rsp+arg_20] call _ZN8ImVectorIjED2Ev; ImVector<uint>::~ImVector() loc_DA930: mov rdi, [rsp+arg_28] call _ZN8ImVectorIiED2Ev; ImVector<int>::~ImVector() loc_DA93A: mov rdi, [rsp+arg_40] call _ZN8ImVectorIiED2Ev; ImVector<int>::~ImVector() loc_DA944: mov rdi, [rsp+arg_38] call _ZN8ImVectorIjED2Ev; ImVector<uint>::~ImVector() mov rdi, [rsp+arg_50] call __Unwind_Resume
void ImPlot3DColormapData::ImPlot3DColormapData(ImPlot3DColormapData *this, long long a2) { long long v2; // rdx long long v3; // rcx long long v4; // r8 long long v5; // r9 ImVector<unsigned int>::ImVector((long long)this); ImVector<int>::ImVector((long long)this + 16); ImVector<int>::ImVector((long long)this + 32); ImVector<unsigned int>::ImVector((long long)this + 48); ImVector<int>::ImVector((long long)this + 64); ImVector<int>::ImVector((long long)this + 80); ImGuiTextBuffer::ImGuiTextBuffer((ImPlot3DColormapData *)((char *)this + 96)); ImVector<int>::ImVector((long long)this + 112); ImVector<bool>::ImVector((char *)this + 128, a2, v2, v3, v4, v5, (char *)this + 128); ImGuiStorage::ImGuiStorage((ImPlot3DColormapData *)((char *)this + 144)); *((_DWORD *)this + 40) = 0; }
ImPlot3DColormapData: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV RDI,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x40],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX CALL 0x001d9d10 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x10 MOV qword ptr [RSP + 0x48],RDI LAB_001da79e: CALL 0x001da750 JMP 0x001da7a5 LAB_001da7a5: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x20 MOV qword ptr [RSP + 0x30],RDI LAB_001da7b3: CALL 0x001da750 JMP 0x001da7ba LAB_001da7ba: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x30 MOV qword ptr [RSP + 0x28],RDI LAB_001da7c8: CALL 0x001d9d10 JMP 0x001da7cf LAB_001da7cf: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x40 MOV qword ptr [RSP + 0x20],RDI LAB_001da7dd: CALL 0x001da750 JMP 0x001da7e4 LAB_001da7e4: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x50 MOV qword ptr [RSP + 0x18],RDI LAB_001da7f2: CALL 0x001da750 JMP 0x001da7f9 LAB_001da7f9: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x60 MOV qword ptr [RSP + 0x10],RDI LAB_001da807: CALL 0x001d8b20 JMP 0x001da80e LAB_001da80e: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x70 MOV qword ptr [RSP + 0x8],RDI LAB_001da81c: CALL 0x001da750 JMP 0x001da823 LAB_001da823: MOV RDI,qword ptr [RSP + 0x38] SUB RDI,-0x80 MOV qword ptr [RSP],RDI LAB_001da830: CALL 0x001daaf0 JMP 0x001da837 LAB_001da837: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x90 LAB_001da843: CALL 0x001daa80 LAB_001da848: JMP 0x001da84a LAB_001da84a: MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0xa0],0x0 ADD RSP,0x68 RET
/* ImPlot3DColormapData::ImPlot3DColormapData() */ void __thiscall ImPlot3DColormapData::ImPlot3DColormapData(ImPlot3DColormapData *this) { ImVector<unsigned_int>::ImVector((ImVector<unsigned_int> *)this); /* try { // try from 001da79e to 001da7a2 has its CatchHandler @ 001da85e */ ImVector<int>::ImVector((ImVector<int> *)(this + 0x10)); /* try { // try from 001da7b3 to 001da7b7 has its CatchHandler @ 001da871 */ ImVector<int>::ImVector((ImVector<int> *)(this + 0x20)); /* try { // try from 001da7c8 to 001da7cc has its CatchHandler @ 001da884 */ ImVector<unsigned_int>::ImVector((ImVector<unsigned_int> *)(this + 0x30)); /* try { // try from 001da7dd to 001da7e1 has its CatchHandler @ 001da897 */ ImVector<int>::ImVector((ImVector<int> *)(this + 0x40)); /* try { // try from 001da7f2 to 001da7f6 has its CatchHandler @ 001da8a7 */ ImVector<int>::ImVector((ImVector<int> *)(this + 0x50)); /* try { // try from 001da807 to 001da80b has its CatchHandler @ 001da8b7 */ ImGuiTextBuffer::ImGuiTextBuffer((ImGuiTextBuffer *)(this + 0x60)); /* try { // try from 001da81c to 001da820 has its CatchHandler @ 001da8c7 */ ImVector<int>::ImVector((ImVector<int> *)(this + 0x70)); /* try { // try from 001da830 to 001da834 has its CatchHandler @ 001da8d7 */ ImVector<bool>::ImVector((ImVector<bool> *)(this + 0x80)); /* try { // try from 001da843 to 001da847 has its CatchHandler @ 001da8e7 */ ImGuiStorage::ImGuiStorage((ImGuiStorage *)(this + 0x90)); *(int4 *)(this + 0xa0) = 0; return; }
63,228
my_strnncoll_win1250ch
eloqsql/strings/ctype-win1250ch.c
static int my_strnncoll_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const uchar *s1, size_t len1, const uchar *s2, size_t len2, my_bool s2_is_prefix) { int v1, v2; const uchar *p1, * p2; int pass1 = 0, pass2 = 0; int diff; if (s2_is_prefix && len1 > len2) len1=len2; p1 = s1; p2 = s2; do { NEXT_CMP_VALUE(s1, p1, pass1, v1, (int)len1); NEXT_CMP_VALUE(s2, p2, pass2, v2, (int)len2); if ((diff = v1 - v2)) return diff; } while (v1); return 0; }
O3
c
my_strnncoll_win1250ch: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx cmpq %r8, %rdx movq %r8, %rax cmovbq %rdx, %rax testb %r9b, %r9b cmoveq %rdx, %rax movq %rax, -0x70(%rbp) movslq %eax, %rdx movq %r8, -0x78(%rbp) movslq %r8d, %r9 movl $0x1, %eax movl $0x1, %edi subq %rsi, %rdi movq %rdi, -0x60(%rbp) subq %rcx, %rax movq %rax, -0x68(%rbp) xorl %r13d, %r13d leaq 0x28a3fe(%rip), %r14 # 0x319b50 movq %rsi, %r15 movq %rcx, %r12 xorl %ebx, %ebx movq %rcx, -0x48(%rbp) movq %rsi, -0x58(%rbp) movq %r15, %rax subq %rsi, %rax cmpq %rdx, %rax jge 0x8f77a testl %r13d, %r13d je 0x8f7a8 movl $0x9, %r8d jmp 0x8f7a3 testl %r13d, %r13d sete %r8b cmpl $0x0, -0x70(%rbp) setg %dil xorl %eax, %eax testb %r8b, %dil je 0x8f86e movl $0x1, %r13d movl $0x9, %r8d movq %rsi, %r15 movq %r14, %rax jmp 0x8f7b8 xorl %r13d, %r13d movl $0x8, %r8d leaq 0x28a298(%rip), %rax # 0x319a50 movzbl (%r15), %edi movb (%rax,%rdi), %al cmpb $-0x1, %al jne 0x8f868 movq %r8, -0x50(%rbp) movq %r12, -0x38(%rbp) movl %ebx, -0x2c(%rbp) movq %r13, -0x40(%rbp) movq %r15, %r11 subq %rsi, %r11 movq -0x60(%rbp), %rax leaq (%rax,%r15), %rcx xorl %edi, %edi movq %r15, %r12 movq %rdi, %r8 shlq $0x4, %r8 leaq 0x2a6bc9(%rip), %rax # 0x3363c0 movq (%r8,%rax), %r13 movb (%r13), %r10b testb %r10b, %r10b je 0x8f82f cmpq %rdx, %r11 jge 0x8f82f incq %r13 movq %rcx, %rbx cmpb (%r15), %r10b jne 0x8f834 incq %r15 movb (%r13), %r10b testb %r10b, %r10b je 0x8f82f leaq 0x1(%rbx), %rax incq %r13 cmpq %rdx, %rbx movq %rax, %rbx jl 0x8f80f testb %r10b, %r10b je 0x8f844 incq %rdi cmpq $0x50, %rdi movq %r12, %r15 jne 0x8f7e9 movb $-0x1, %al jmp 0x8f859 leaq 0x2a6b75(%rip), %rax # 0x3363c0 addq %rax, %r8 movq -0x50(%rbp), %rax movb (%r8,%rax), %al decq %r15 movq -0x48(%rbp), %rcx movq -0x40(%rbp), %r13 movl -0x2c(%rbp), %ebx movq -0x38(%rbp), %r12 movzbl %al, %eax incq %r15 movq %r12, %rdi subq %rcx, %rdi cmpq %r9, %rdi jge 0x8f885 testl %ebx, %ebx je 0x8f8b2 movl $0x9, %r10d jmp 0x8f8ad testl %ebx, %ebx sete %dil cmpl $0x0, -0x78(%rbp) setg %r8b xorl %r10d, %r10d testb %dil, %r8b je 0x8f9ac movl $0x1, %ebx movl $0x9, %r10d movq %rcx, %r12 movq %r14, %r8 jmp 0x8f8c1 xorl %ebx, %ebx movl $0x8, %r10d leaq 0x28a18f(%rip), %r8 # 0x319a50 movzbl (%r12), %edi movb (%r8,%rdi), %dil cmpb $-0x1, %dil jne 0x8f9a5 movq %r10, -0x50(%rbp) movq %r15, -0x38(%rbp) movl %ebx, -0x2c(%rbp) movq %r13, -0x40(%rbp) movq %r12, %r14 subq %rcx, %r14 movq -0x68(%rbp), %rcx movq %r12, %r11 leaq (%rcx,%r12), %rsi xorl %r8d, %r8d movq %r8, %r15 shlq $0x4, %r15 leaq 0x2a6abb(%rip), %rcx # 0x3363c0 movq (%r15,%rcx), %rbx movb (%rbx), %r13b testb %r13b, %r13b je 0x8f940 cmpq %r9, %r14 jge 0x8f940 incq %rbx movq %rsi, %rdi movq %r11, %r10 cmpb (%r10), %r13b jne 0x8f948 incq %r10 movb (%rbx), %r13b testb %r13b, %r13b je 0x8f943 leaq 0x1(%rdi), %r12 incq %rbx cmpq %r9, %rdi movq %r12, %rdi jl 0x8f91f jmp 0x8f943 movq %r11, %r10 testb %r13b, %r13b je 0x8f973 incq %r8 cmpq $0x50, %r8 jne 0x8f8f7 movb $-0x1, %dil movq -0x48(%rbp), %rcx movq -0x58(%rbp), %rsi leaq 0x28a1ed(%rip), %r14 # 0x319b50 movq -0x40(%rbp), %r13 movl -0x2c(%rbp), %ebx movq -0x38(%rbp), %r15 movq %r11, %r12 jmp 0x8f9a5 leaq 0x2a6a46(%rip), %rcx # 0x3363c0 addq %rcx, %r15 movq -0x50(%rbp), %rcx movb (%r15,%rcx), %dil decq %r10 movq %r10, %r12 movq -0x48(%rbp), %rcx movq -0x58(%rbp), %rsi leaq 0x28a1b6(%rip), %r14 # 0x319b50 movq -0x40(%rbp), %r13 movl -0x2c(%rbp), %ebx movq -0x38(%rbp), %r15 movzbl %dil, %r10d incq %r12 testl %eax, %eax je 0x8f9b9 cmpl %r10d, %eax je 0x8f762 subl %r10d, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnncoll_win1250ch: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx cmp rdx, r8 mov rax, r8 cmovb rax, rdx test r9b, r9b cmovz rax, rdx mov [rbp+var_70], rax movsxd rdx, eax mov [rbp+var_78], r8 movsxd r9, r8d mov eax, 1 mov edi, 1 sub rdi, rsi mov [rbp+var_60], rdi sub rax, rcx mov [rbp+var_68], rax xor r13d, r13d lea r14, _sort_order_win1250ch2 mov r15, rsi mov r12, rcx xor ebx, ebx mov [rbp+var_48], rcx mov [rbp+var_58], rsi loc_8F762: mov rax, r15 sub rax, rsi cmp rax, rdx jge short loc_8F77A test r13d, r13d jz short loc_8F7A8 mov r8d, 9 jmp short loc_8F7A3 loc_8F77A: test r13d, r13d setz r8b cmp dword ptr [rbp+var_70], 0 setnle dil xor eax, eax test dil, r8b jz loc_8F86E mov r13d, 1 mov r8d, 9 mov r15, rsi loc_8F7A3: mov rax, r14 jmp short loc_8F7B8 loc_8F7A8: xor r13d, r13d mov r8d, 8 lea rax, _sort_order_win1250ch1 loc_8F7B8: movzx edi, byte ptr [r15] mov al, [rax+rdi] cmp al, 0FFh jnz loc_8F868 mov [rbp+var_50], r8 mov [rbp+var_38], r12 mov [rbp+var_2C], ebx mov [rbp+var_40], r13 mov r11, r15 sub r11, rsi mov rax, [rbp+var_60] lea rcx, [rax+r15] xor edi, edi mov r12, r15 loc_8F7E9: mov r8, rdi shl r8, 4 lea rax, doubles_0 mov r13, [r8+rax] mov r10b, [r13+0] test r10b, r10b jz short loc_8F82F cmp r11, rdx jge short loc_8F82F inc r13 mov rbx, rcx loc_8F80F: cmp r10b, [r15] jnz short loc_8F834 inc r15 mov r10b, [r13+0] test r10b, r10b jz short loc_8F82F lea rax, [rbx+1] inc r13 cmp rbx, rdx mov rbx, rax jl short loc_8F80F loc_8F82F: test r10b, r10b jz short loc_8F844 loc_8F834: inc rdi cmp rdi, 50h ; 'P' mov r15, r12 jnz short loc_8F7E9 mov al, 0FFh jmp short loc_8F859 loc_8F844: lea rax, doubles_0 add r8, rax mov rax, [rbp+var_50] mov al, [r8+rax] dec r15 loc_8F859: mov rcx, [rbp+var_48] mov r13, [rbp+var_40] mov ebx, [rbp+var_2C] mov r12, [rbp+var_38] loc_8F868: movzx eax, al inc r15 loc_8F86E: mov rdi, r12 sub rdi, rcx cmp rdi, r9 jge short loc_8F885 test ebx, ebx jz short loc_8F8B2 mov r10d, 9 jmp short loc_8F8AD loc_8F885: test ebx, ebx setz dil cmp dword ptr [rbp+var_78], 0 setnle r8b xor r10d, r10d test r8b, dil jz loc_8F9AC mov ebx, 1 mov r10d, 9 mov r12, rcx loc_8F8AD: mov r8, r14 jmp short loc_8F8C1 loc_8F8B2: xor ebx, ebx mov r10d, 8 lea r8, _sort_order_win1250ch1 loc_8F8C1: movzx edi, byte ptr [r12] mov dil, [r8+rdi] cmp dil, 0FFh jnz loc_8F9A5 mov [rbp+var_50], r10 mov [rbp+var_38], r15 mov [rbp+var_2C], ebx mov [rbp+var_40], r13 mov r14, r12 sub r14, rcx mov rcx, [rbp+var_68] mov r11, r12 lea rsi, [rcx+r12] xor r8d, r8d loc_8F8F7: mov r15, r8 shl r15, 4 lea rcx, doubles_0 mov rbx, [r15+rcx] mov r13b, [rbx] test r13b, r13b jz short loc_8F940 cmp r14, r9 jge short loc_8F940 inc rbx mov rdi, rsi mov r10, r11 loc_8F91F: cmp r13b, [r10] jnz short loc_8F948 inc r10 mov r13b, [rbx] test r13b, r13b jz short loc_8F943 lea r12, [rdi+1] inc rbx cmp rdi, r9 mov rdi, r12 jl short loc_8F91F jmp short loc_8F943 loc_8F940: mov r10, r11 loc_8F943: test r13b, r13b jz short loc_8F973 loc_8F948: inc r8 cmp r8, 50h ; 'P' jnz short loc_8F8F7 mov dil, 0FFh mov rcx, [rbp+var_48] mov rsi, [rbp+var_58] lea r14, _sort_order_win1250ch2 mov r13, [rbp+var_40] mov ebx, [rbp+var_2C] mov r15, [rbp+var_38] mov r12, r11 jmp short loc_8F9A5 loc_8F973: lea rcx, doubles_0 add r15, rcx mov rcx, [rbp+var_50] mov dil, [r15+rcx] dec r10 mov r12, r10 mov rcx, [rbp+var_48] mov rsi, [rbp+var_58] lea r14, _sort_order_win1250ch2 mov r13, [rbp+var_40] mov ebx, [rbp+var_2C] mov r15, [rbp+var_38] loc_8F9A5: movzx r10d, dil inc r12 loc_8F9AC: test eax, eax jz short loc_8F9B9 cmp eax, r10d jz loc_8F762 loc_8F9B9: sub eax, r10d pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnncoll_win1250ch( long long a1, _BYTE *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, char a6) { int v6; // eax long long v7; // rdx long long v8; // r9 long long v9; // r13 _BYTE *v10; // r15 unsigned __int8 *v11; // r12 int v12; // ebx long long v13; // r8 _BYTE *v14; // rax _BYTE *v15; // r11 _BYTE *v16; // rcx long long v17; // rdi _BYTE *v18; // r12 char *v19; // r13 char v20; // r10 char *v21; // r13 _BYTE *v22; // rbx bool v23; // cc long long v24; // r10 int v25; // r10d _BYTE *v26; // r8 unsigned __int8 v27; // di long long v28; // r8 char *v29; // rbx char v30; // r13 char *v31; // rbx unsigned __int8 *v32; // rdi _BYTE *v33; // r10 int v35; // [rsp+0h] [rbp-78h] int v36; // [rsp+8h] [rbp-70h] long long v37; // [rsp+10h] [rbp-68h] long long v38; // [rsp+18h] [rbp-60h] _BYTE *v39; // [rsp+20h] [rbp-58h] long long v40; // [rsp+28h] [rbp-50h] unsigned __int8 *v41; // [rsp+30h] [rbp-48h] long long v42; // [rsp+38h] [rbp-40h] long long v43; // [rsp+38h] [rbp-40h] unsigned __int8 *v44; // [rsp+40h] [rbp-38h] int v45; // [rsp+4Ch] [rbp-2Ch] int v46; // [rsp+4Ch] [rbp-2Ch] v6 = a5; if ( a3 < a5 ) v6 = a3; if ( !a6 ) v6 = a3; v36 = v6; v7 = v6; v35 = a5; v8 = (int)a5; v38 = 1LL - (_QWORD)a2; v37 = 1LL - (_QWORD)a4; v9 = 0LL; v10 = a2; v11 = a4; v12 = 0; v41 = a4; v39 = a2; do { if ( v10 - a2 >= v7 ) { LODWORD(v14) = 0; if ( (_DWORD)v9 != 0 || v36 <= 0 ) goto LABEL_27; v9 = 1LL; v13 = 9LL; v10 = a2; } else { if ( !(_DWORD)v9 ) { v9 = 0LL; v13 = 8LL; v14 = &sort_order_win1250ch1; goto LABEL_13; } v13 = 9LL; } v14 = &sort_order_win1250ch2; LABEL_13: LOBYTE(v14) = v14[(unsigned __int8)*v10]; if ( (_BYTE)v14 != 0xFF ) goto LABEL_26; v44 = v11; v45 = v12; v42 = v9; v15 = (_BYTE *)(v10 - a2); v16 = &v10[v38]; v17 = 0LL; v18 = v10; while ( 1 ) { v19 = (char *)*(&doubles_0 + 2 * v17); v20 = *v19; if ( *v19 && (long long)v15 < v7 ) { v21 = v19 + 1; v22 = v16; while ( v20 == *v10 ) { ++v10; v20 = *v21; if ( *v21 ) { ++v21; v23 = (long long)v22++ < v7; if ( v23 ) continue; } goto LABEL_21; } goto LABEL_22; } LABEL_21: if ( !v20 ) break; LABEL_22: ++v17; v10 = v18; if ( v17 == 80 ) { LOBYTE(v14) = -1; goto LABEL_25; } } LOBYTE(v14) = *((_BYTE *)&doubles_0 + 16 * v17 + v13); --v10; LABEL_25: a4 = v41; v9 = v42; v12 = v45; v11 = v44; LABEL_26: LODWORD(v14) = (unsigned __int8)v14; ++v10; LABEL_27: if ( v11 - a4 >= v8 ) { v25 = 0; if ( v12 != 0 || v35 <= 0 ) continue; v12 = 1; v24 = 9LL; v11 = a4; LABEL_32: v26 = &sort_order_win1250ch2; } else { if ( v12 ) { v24 = 9LL; goto LABEL_32; } v12 = 0; v24 = 8LL; v26 = &sort_order_win1250ch1; } v27 = v26[*v11]; if ( v27 != 0xFF ) goto LABEL_48; v40 = v24; v46 = v12; v43 = v9; v28 = 0LL; while ( 2 ) { v29 = (char *)*(&doubles_0 + 2 * v28); v30 = *v29; if ( *v29 && v11 - a4 < v8 ) { v31 = v29 + 1; v32 = &v11[v37]; v33 = v11; while ( v30 == *v33 ) { ++v33; v30 = *v31; if ( *v31 ) { ++v31; v23 = (long long)v32++ < v8; if ( v23 ) continue; } goto LABEL_44; } goto LABEL_45; } v33 = v11; LABEL_44: if ( v30 ) { LABEL_45: if ( ++v28 == 80 ) { v27 = -1; a4 = v41; a2 = v39; v9 = v43; v12 = v46; goto LABEL_48; } continue; } break; } v27 = *((_BYTE *)&doubles_0 + 16 * v28 + v40); v11 = v33 - 1; a4 = v41; a2 = v39; v9 = v43; v12 = v46; LABEL_48: v25 = v27; ++v11; } while ( (_DWORD)v14 && (_DWORD)v14 == v25 ); return (unsigned int)((_DWORD)v14 - v25); }
my_strnncoll_win1250ch: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX CMP RDX,R8 MOV RAX,R8 CMOVC RAX,RDX TEST R9B,R9B CMOVZ RAX,RDX MOV qword ptr [RBP + -0x70],RAX MOVSXD RDX,EAX MOV qword ptr [RBP + -0x78],R8 MOVSXD R9,R8D MOV EAX,0x1 MOV EDI,0x1 SUB RDI,RSI MOV qword ptr [RBP + -0x60],RDI SUB RAX,RCX MOV qword ptr [RBP + -0x68],RAX XOR R13D,R13D LEA R14,[0x419b50] MOV R15,RSI MOV R12,RCX XOR EBX,EBX MOV qword ptr [RBP + -0x48],RCX MOV qword ptr [RBP + -0x58],RSI LAB_0018f762: MOV RAX,R15 SUB RAX,RSI CMP RAX,RDX JGE 0x0018f77a TEST R13D,R13D JZ 0x0018f7a8 MOV R8D,0x9 JMP 0x0018f7a3 LAB_0018f77a: TEST R13D,R13D SETZ R8B CMP dword ptr [RBP + -0x70],0x0 SETG DIL XOR EAX,EAX TEST DIL,R8B JZ 0x0018f86e MOV R13D,0x1 MOV R8D,0x9 MOV R15,RSI LAB_0018f7a3: MOV RAX,R14 JMP 0x0018f7b8 LAB_0018f7a8: XOR R13D,R13D MOV R8D,0x8 LEA RAX,[0x419a50] LAB_0018f7b8: MOVZX EDI,byte ptr [R15] MOV AL,byte ptr [RAX + RDI*0x1] CMP AL,0xff JNZ 0x0018f868 MOV qword ptr [RBP + -0x50],R8 MOV qword ptr [RBP + -0x38],R12 MOV dword ptr [RBP + -0x2c],EBX MOV qword ptr [RBP + -0x40],R13 MOV R11,R15 SUB R11,RSI MOV RAX,qword ptr [RBP + -0x60] LEA RCX,[RAX + R15*0x1] XOR EDI,EDI MOV R12,R15 LAB_0018f7e9: MOV R8,RDI SHL R8,0x4 LEA RAX,[0x4363c0] MOV R13,qword ptr [R8 + RAX*0x1] MOV R10B,byte ptr [R13] TEST R10B,R10B JZ 0x0018f82f CMP R11,RDX JGE 0x0018f82f INC R13 MOV RBX,RCX LAB_0018f80f: CMP R10B,byte ptr [R15] JNZ 0x0018f834 INC R15 MOV R10B,byte ptr [R13] TEST R10B,R10B JZ 0x0018f82f LEA RAX,[RBX + 0x1] INC R13 CMP RBX,RDX MOV RBX,RAX JL 0x0018f80f LAB_0018f82f: TEST R10B,R10B JZ 0x0018f844 LAB_0018f834: INC RDI CMP RDI,0x50 MOV R15,R12 JNZ 0x0018f7e9 MOV AL,0xff JMP 0x0018f859 LAB_0018f844: LEA RAX,[0x4363c0] ADD R8,RAX MOV RAX,qword ptr [RBP + -0x50] MOV AL,byte ptr [R8 + RAX*0x1] DEC R15 LAB_0018f859: MOV RCX,qword ptr [RBP + -0x48] MOV R13,qword ptr [RBP + -0x40] MOV EBX,dword ptr [RBP + -0x2c] MOV R12,qword ptr [RBP + -0x38] LAB_0018f868: MOVZX EAX,AL INC R15 LAB_0018f86e: MOV RDI,R12 SUB RDI,RCX CMP RDI,R9 JGE 0x0018f885 TEST EBX,EBX JZ 0x0018f8b2 MOV R10D,0x9 JMP 0x0018f8ad LAB_0018f885: TEST EBX,EBX SETZ DIL CMP dword ptr [RBP + -0x78],0x0 SETG R8B XOR R10D,R10D TEST R8B,DIL JZ 0x0018f9ac MOV EBX,0x1 MOV R10D,0x9 MOV R12,RCX LAB_0018f8ad: MOV R8,R14 JMP 0x0018f8c1 LAB_0018f8b2: XOR EBX,EBX MOV R10D,0x8 LEA R8,[0x419a50] LAB_0018f8c1: MOVZX EDI,byte ptr [R12] MOV DIL,byte ptr [R8 + RDI*0x1] CMP DIL,0xff JNZ 0x0018f9a5 MOV qword ptr [RBP + -0x50],R10 MOV qword ptr [RBP + -0x38],R15 MOV dword ptr [RBP + -0x2c],EBX MOV qword ptr [RBP + -0x40],R13 MOV R14,R12 SUB R14,RCX MOV RCX,qword ptr [RBP + -0x68] MOV R11,R12 LEA RSI,[RCX + R12*0x1] XOR R8D,R8D LAB_0018f8f7: MOV R15,R8 SHL R15,0x4 LEA RCX,[0x4363c0] MOV RBX,qword ptr [R15 + RCX*0x1] MOV R13B,byte ptr [RBX] TEST R13B,R13B JZ 0x0018f940 CMP R14,R9 JGE 0x0018f940 INC RBX MOV RDI,RSI MOV R10,R11 LAB_0018f91f: CMP R13B,byte ptr [R10] JNZ 0x0018f948 INC R10 MOV R13B,byte ptr [RBX] TEST R13B,R13B JZ 0x0018f943 LEA R12,[RDI + 0x1] INC RBX CMP RDI,R9 MOV RDI,R12 JL 0x0018f91f JMP 0x0018f943 LAB_0018f940: MOV R10,R11 LAB_0018f943: TEST R13B,R13B JZ 0x0018f973 LAB_0018f948: INC R8 CMP R8,0x50 JNZ 0x0018f8f7 MOV DIL,0xff MOV RCX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x58] LEA R14,[0x419b50] MOV R13,qword ptr [RBP + -0x40] MOV EBX,dword ptr [RBP + -0x2c] MOV R15,qword ptr [RBP + -0x38] MOV R12,R11 JMP 0x0018f9a5 LAB_0018f973: LEA RCX,[0x4363c0] ADD R15,RCX MOV RCX,qword ptr [RBP + -0x50] MOV DIL,byte ptr [R15 + RCX*0x1] DEC R10 MOV R12,R10 MOV RCX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x58] LEA R14,[0x419b50] MOV R13,qword ptr [RBP + -0x40] MOV EBX,dword ptr [RBP + -0x2c] MOV R15,qword ptr [RBP + -0x38] LAB_0018f9a5: MOVZX R10D,DIL INC R12 LAB_0018f9ac: TEST EAX,EAX JZ 0x0018f9b9 CMP EAX,R10D JZ 0x0018f762 LAB_0018f9b9: SUB EAX,R10D POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int my_strnncoll_win1250ch (int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, char param_6) { bool bVar1; bool bVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; byte bVar6; int iVar7; ulong uVar9; int1 *puVar10; long lVar11; int iVar12; uint uVar13; long lVar14; byte *pbVar15; byte *pbVar16; byte *pbVar17; byte *pbVar18; uint uVar8; uVar9 = param_5; if (param_3 < param_5) { uVar9 = param_3; } if (param_6 == '\0') { uVar9 = param_3; } iVar7 = (int)uVar9; iVar12 = (int)param_5; bVar2 = false; bVar1 = false; pbVar15 = param_4; pbVar18 = param_2; do { if ((long)pbVar18 - (long)param_2 < (long)iVar7) { if (bVar2) { LAB_0018f7a3: lVar14 = 9; puVar10 = _sort_order_win1250ch2; } else { bVar2 = false; lVar14 = 8; puVar10 = _sort_order_win1250ch1; } bVar6 = puVar10[*pbVar18]; if (bVar6 == 0xff) { lVar11 = 0; do { pbVar16 = (&doubles)[lVar11 * 2]; bVar6 = *pbVar16; pbVar17 = pbVar18; pbVar5 = pbVar18 + (1 - (long)param_2); pbVar4 = pbVar18 + -(long)param_2; if (bVar6 != 0) { while (pbVar3 = pbVar5, (long)pbVar4 < (long)iVar7) { pbVar16 = pbVar16 + 1; if (bVar6 != *pbVar17) goto LAB_0018f834; pbVar17 = pbVar17 + 1; bVar6 = *pbVar16; if (bVar6 == 0) break; pbVar5 = pbVar3 + 1; pbVar4 = pbVar3; } } if (bVar6 == 0) { bVar6 = *(byte *)((long)&doubles + lVar14 + lVar11 * 0x10); pbVar18 = pbVar17 + -1; goto LAB_0018f868; } LAB_0018f834: lVar11 = lVar11 + 1; } while (lVar11 != 0x50); bVar6 = 0xff; } LAB_0018f868: uVar8 = (uint)bVar6; pbVar18 = pbVar18 + 1; } else { uVar8 = 0; if (0 < iVar7 && !bVar2) { bVar2 = true; pbVar18 = param_2; goto LAB_0018f7a3; } } if ((long)pbVar15 - (long)param_4 < (long)iVar12) { if (bVar1) { LAB_0018f8ad: lVar14 = 9; puVar10 = _sort_order_win1250ch2; } else { bVar1 = false; lVar14 = 8; puVar10 = _sort_order_win1250ch1; } bVar6 = puVar10[*pbVar15]; if (bVar6 == 0xff) { lVar11 = 0; do { pbVar16 = (&doubles)[lVar11 * 2]; bVar6 = *pbVar16; pbVar17 = pbVar15; pbVar5 = pbVar15 + (1 - (long)param_4); pbVar4 = pbVar15 + -(long)param_4; if (bVar6 != 0) { while (pbVar3 = pbVar5, (long)pbVar4 < (long)iVar12) { pbVar16 = pbVar16 + 1; if (bVar6 != *pbVar17) goto LAB_0018f948; pbVar17 = pbVar17 + 1; bVar6 = *pbVar16; if (bVar6 == 0) break; pbVar5 = pbVar3 + 1; pbVar4 = pbVar3; } } if (bVar6 == 0) { bVar6 = *(byte *)((long)&doubles + lVar14 + lVar11 * 0x10); pbVar15 = pbVar17 + -1; goto LAB_0018f9a5; } LAB_0018f948: lVar11 = lVar11 + 1; } while (lVar11 != 0x50); bVar6 = 0xff; } LAB_0018f9a5: uVar13 = (uint)bVar6; pbVar15 = pbVar15 + 1; } else { uVar13 = 0; if (0 < iVar12 && !bVar1) { bVar1 = true; pbVar15 = param_4; goto LAB_0018f8ad; } } if ((uVar8 == 0) || (uVar8 != uVar13)) { return uVar8 - uVar13; } } while( true ); }
63,229
ggml_compute_forward_map_custom3
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_map_custom3( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * a = dst->src[0]; const ggml_tensor * b = dst->src[1]; const ggml_tensor * c = dst->src[2]; struct ggml_map_custom3_op_params p; memcpy(&p, dst->op_params, sizeof(p)); p.fun(dst, a, b, c, params->ith, params->nth, p.userdata); }
O3
cpp
ggml_compute_forward_map_custom3: pushq %rax movq %rsi, %rax movq 0x64(%rsi), %r10 movq 0x98(%rsi), %rsi movq 0xa0(%rax), %rdx movq 0xa8(%rax), %rcx movl (%rdi), %r8d movl 0x4(%rdi), %r9d movq %r10, (%rsp) movq %rax, %rdi callq *0x54(%rax) popq %rax retq
ggml_compute_forward_map_custom3: push rax mov rax, rsi mov r10, [rsi+64h] mov rsi, [rsi+98h] mov rdx, [rax+0A0h] mov rcx, [rax+0A8h] mov r8d, [rdi] mov r9d, [rdi+4] mov [rsp+8+var_8], r10 mov rdi, rax call qword ptr [rax+54h] pop rax retn
long long ggml_compute_forward_map_custom3(unsigned int *a1, long long a2) { long long v3; // [rsp+0h] [rbp-8h] (*(void ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(a2 + 84))( a2, *(_QWORD *)(a2 + 152), *(_QWORD *)(a2 + 160), *(_QWORD *)(a2 + 168), *a1, a1[1], *(_QWORD *)(a2 + 100)); return v3; }
ggml_compute_forward_map_custom3: PUSH RAX MOV RAX,RSI MOV R10,qword ptr [RSI + 0x64] MOV RSI,qword ptr [RSI + 0x98] MOV RDX,qword ptr [RAX + 0xa0] MOV RCX,qword ptr [RAX + 0xa8] MOV R8D,dword ptr [RDI] MOV R9D,dword ptr [RDI + 0x4] MOV qword ptr [RSP],R10 MOV RDI,RAX CALL qword ptr [RAX + 0x54] POP RAX RET
int8 ggml_compute_forward_map_custom3(int4 *param_1,long param_2) { int8 uVar1; uVar1 = *(int8 *)(param_2 + 100); (**(code **)(param_2 + 0x54)) (param_2,*(int8 *)(param_2 + 0x98),*(int8 *)(param_2 + 0xa0), *(int8 *)(param_2 + 0xa8),*param_1,param_1[1]); return uVar1; }
63,230
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) { std::vector<common_chat_msg> msgs = { {"system", "You are a helpful assistant", {}}, {"user", "Hello", {}}, {"assistant", "Hi there", {}}, {"user", "How are you?", {}}, }; return common_chat_apply_template(tmpl, msgs, true, use_jinja); }
O1
cpp
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %ebp movq %rsi, %r12 movq %rdi, %r15 leaq 0x38(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7c48f(%rip), %rsi # 0xf320a leaq 0x7c48e(%rip), %rdx # 0xf3210 leaq 0x28(%rsp), %rdi callq 0x22630 leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x7c470(%rip), %rsi # 0xf3211 leaq 0x7c484(%rip), %rdx # 0xf322c callq 0x22630 leaq 0x68(%rsp), %r14 leaq 0x80(%rsp), %rdi leaq 0x90(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x78b50(%rip), %rdx # 0xef92c movq %rdx, %rsi callq 0x22630 leaq 0xa0(%rsp), %r14 leaq 0xb0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7c395(%rip), %rsi # 0xf3194 leaq 0x7c392(%rip), %rdx # 0xf3198 movq %r14, %rdi callq 0x22630 leaq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7c404(%rip), %rsi # 0xf322d leaq 0x7c402(%rip), %rdx # 0xf3232 callq 0x22630 leaq 0xe0(%rsp), %r13 leaq 0xf8(%rsp), %rdi leaq 0x108(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x78ac5(%rip), %rdx # 0xef92c movq %rdx, %rsi callq 0x22630 leaq 0x118(%rsp), %r14 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7c399(%rip), %rsi # 0xf3223 leaq 0x7c39b(%rip), %rdx # 0xf322c movq %r14, %rdi callq 0x22630 leaq 0x138(%rsp), %rdi leaq 0x148(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7c37f(%rip), %rsi # 0xf3233 leaq 0x7c380(%rip), %rdx # 0xf323b callq 0x22630 leaq 0x158(%rsp), %r13 leaq 0x170(%rsp), %rdi leaq 0x180(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x78a3a(%rip), %rdx # 0xef92c movq %rdx, %rsi callq 0x22630 leaq 0x190(%rsp), %r14 leaq 0x1a0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7c27f(%rip), %rsi # 0xf3194 leaq 0x7c27c(%rip), %rdx # 0xf3198 movq %r14, %rdi callq 0x22630 leaq 0x1b0(%rsp), %rdi leaq 0x1c0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7c2fd(%rip), %rsi # 0xf323c leaq 0x7c302(%rip), %rdx # 0xf3248 callq 0x22630 leaq 0x1d0(%rsp), %r13 leaq 0x1e8(%rsp), %rdi leaq 0x1f8(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x789af(%rip), %rdx # 0xef92c movq %rdx, %rsi callq 0x22630 leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0xf(%rsp), %rcx movl $0x4, %edx callq 0x7f22e movl $0x1e0, %r14d # imm = 0x1E0 leaq (%rsp,%r14), %rax addq $0x18, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x76fc0 movq (%rax), %rsi incq %rsi callq 0x1b8c0 leaq (%rsp,%r14), %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0x7f1fe movq -0x20(%rbx), %rdi leaq (%rsp,%r14), %rax addq $-0x20, %rax cmpq %rdi, %rax je 0x76fec movq (%rax), %rsi incq %rsi callq 0x1b8c0 leaq (%rsp,%r14), %rax addq $-0x40, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x77008 movq (%rax), %rsi incq %rsi callq 0x1b8c0 addq $-0x78, %r14 jne 0x76fa4 movzbl %bpl, %r8d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movl $0x1, %ecx callq 0x7639f leaq 0x10(%rsp), %rdi callq 0x7f1ce movq %r15, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x7f1ce jmp 0x7724c movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x7f276 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x77060 xorl %ebp, %ebp jmp 0x770ae movq %rax, %r15 movq %r13, %rdi callq 0x7f1fe movq 0x1b0(%rsp), %rdi movb $0x1, %bpl cmpq %rbx, %rdi je 0x770ae movq 0x1c0(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x770ae movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x770e0 movq 0x190(%rsp), %rdi leaq 0x1a0(%rsp), %rax cmpq %rax, %rdi je 0x770e0 movq 0x1a0(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x770e0 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x7711b movq %rax, %r15 movq %r13, %rdi callq 0x7f1fe movq 0x138(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x77118 movq 0x148(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x77118 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x7714d movq 0x118(%rsp), %rdi leaq 0x128(%rsp), %rax cmpq %rax, %rdi je 0x7714d movq 0x128(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x7714d movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x77188 movq %rax, %r15 movq %r13, %rdi callq 0x7f1fe movq 0xc0(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x77185 movq 0xd0(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x77185 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x771ba movq 0xa0(%rsp), %rdi leaq 0xb0(%rsp), %rax cmpq %rax, %rdi je 0x771ba movq 0xb0(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x771ba movq %rax, %r15 movb $0x1, %bpl xorl %ebx, %ebx testb %bl, %bl je 0x77222 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x77222 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x77222 movq %rax, %r15 movq %r14, %rdi callq 0x7f1fe leaq 0x28(%rsp), %r14 movq 0x20(%r14), %rdi movb $0x1, %bl cmpq %r13, %rdi je 0x77212 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x77212 movq %rax, %r15 movb $0x1, %bl leaq 0x28(%rsp), %r14 movb $0x1, %bpl jmp 0x771bc movq %rax, %r15 movb $0x1, %bpl leaq 0x28(%rsp), %r14 leaq 0x28(%rsp), %rax cmpq %r14, %rax sete %al xorb $0x1, %bpl orb %al, %bpl jne 0x7724c leaq 0x28(%rsp), %rbx addq $-0x78, %r14 movq %r14, %rdi callq 0x7f276 cmpq %rbx, %r14 jne 0x7723b movq %r15, %rdi callq 0x1bf90
_Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov ebp, edx mov r12, rsi mov r15, rdi lea rax, [rsp+238h+var_200] mov [rax-10h], rax lea rsi, aSystem; "system" lea rdx, aSystem+6; "" lea rdi, [rsp+238h+var_210] 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+238h+var_1F0] lea r13, [rsp+238h+var_1E0] mov [r13-10h], r13 lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, aYouAreAHelpful+1Bh; "" 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 r14, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] lea rax, [rsp+238h+var_1A8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_198] lea rax, [rsp+238h+var_188] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 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+238h+var_178] lea rbx, [rsp+238h+var_168] mov [rbx-10h], rbx lea rsi, aHello; "Hello" lea rdx, aHello+5; "" 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 r13, [rsp+238h+var_158] lea rdi, [rsp+238h+var_140] lea rax, [rsp+238h+var_130] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_120] lea rax, [rsp+238h+var_110] mov [rax-10h], rax lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, aYouAreAHelpful+1Bh; "" mov rdi, r14 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+238h+var_100] lea rbx, [rsp+238h+var_F0] mov [rbx-10h], rbx lea rsi, aHiThere; "Hi there" lea rdx, aHiThere+8; "" 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 r13, [rsp+238h+var_E0] lea rdi, [rsp+238h+var_C8] lea rax, [rsp+238h+var_B8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_A8] lea rax, [rsp+238h+var_98] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 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+238h+var_88] lea rbx, [rsp+238h+var_78] mov [rbx-10h], rbx lea rsi, aHowAreYou; "How are you?" lea rdx, aHowAreYou+0Ch; "" 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 r13, [rsp+238h+var_68] lea rdi, [rsp+238h+var_50] lea rax, [rsp+238h+var_40] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] lea rcx, [rsp+238h+var_229] mov edx, 4 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&) mov r14d, 1E0h loc_76FA4: lea rax, [rsp+r14+238h+var_238] add rax, 18h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_76FC0 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76FC0: lea rbx, [rsp+r14+238h+var_238] add rbx, 0FFFFFFFFFFFFFFF0h mov rdi, rbx call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rbx-20h]; void * lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFE0h cmp rax, rdi jz short loc_76FEC mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76FEC: lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFC0h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_77008 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77008: add r14, 0FFFFFFFFFFFFFF88h jnz short loc_76FA4 movzx r8d, bpl lea rdx, [rsp+238h+var_228] mov rdi, r15 mov rsi, r12 mov ecx, 1 call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) lea rdi, [rsp+238h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() jmp loc_7724C mov r15, rax mov ebx, 168h loc_77060: lea rdi, [rsp+rbx+0] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_77060 xor ebp, ebp jmp short loc_770AE mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_1A8]; void * mov bpl, 1 cmp rdi, rbx jz short loc_770AE mov rsi, [rsp+arg_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_770AE mov r15, rax mov bpl, 1 loc_770AE: test bpl, bpl jz short loc_770E0 mov rdi, [rsp+arg_188]; void * lea rax, [rsp+arg_198] cmp rdi, rax jz short loc_770E0 mov rsi, [rsp+arg_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_770E0 mov r15, rax mov bpl, 1 loc_770E0: xor r12d, r12d jmp short loc_7711B mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_130]; void * mov r12b, 1 cmp rdi, rbx jz short loc_77118 mov rsi, [rsp+arg_140] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77118 mov r15, rax mov r12b, 1 loc_77118: mov bpl, 1 loc_7711B: test r12b, r12b jz short loc_7714D mov rdi, [rsp+arg_110]; void * lea rax, [rsp+arg_120] cmp rdi, rax jz short loc_7714D mov rsi, [rsp+arg_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7714D mov r15, rax mov bpl, 1 loc_7714D: xor r12d, r12d jmp short loc_77188 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_B8]; void * mov r12b, 1 cmp rdi, rbx jz short loc_77185 mov rsi, [rsp+arg_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77185 mov r15, rax mov r12b, 1 loc_77185: mov bpl, 1 loc_77188: test r12b, r12b jz short loc_771BA mov rdi, [rsp+arg_98]; void * lea rax, [rsp+arg_A8] cmp rdi, rax jz short loc_771BA mov rsi, [rsp+arg_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_771BA mov r15, rax mov bpl, 1 loc_771BA: xor ebx, ebx loc_771BC: test bl, bl jz short loc_77222 mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_77222 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77222 mov r15, rax mov rdi, r14 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() lea r14, [rsp+arg_20] mov rdi, [r14+20h]; void * mov bl, 1 cmp rdi, r13 jz short loc_77212 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77212 mov r15, rax mov bl, 1 lea r14, [rsp+arg_20] loc_77212: mov bpl, 1 jmp short loc_771BC mov r15, rax mov bpl, 1 lea r14, [rsp+arg_20] loc_77222: lea rax, [rsp+arg_20] cmp rax, r14 setz al xor bpl, 1 or bpl, al jnz short loc_7724C lea rbx, [rsp+arg_20] loc_7723B: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_7723B loc_7724C: mov rdi, r15 call __Unwind_Resume
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, unsigned __int8 a3) { unsigned long long v5; // r14 long long *v6; // rdi _QWORD *v7; // rdi _QWORD *v8; // rax _QWORD *v9; // rax _QWORD *v10; // rdi _BYTE v12[15]; // [rsp+0h] [rbp-238h] BYREF char v13; // [rsp+Fh] [rbp-229h] BYREF long long v14[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-210h] BYREF char v16; // [rsp+38h] [rbp-200h] BYREF char *v17; // [rsp+48h] [rbp-1F0h] BYREF char v18; // [rsp+58h] [rbp-1E0h] BYREF __int128 v19; // [rsp+68h] [rbp-1D0h] long long v20; // [rsp+78h] [rbp-1C0h] char *v21; // [rsp+80h] [rbp-1B8h] BYREF char v22; // [rsp+90h] [rbp-1A8h] BYREF char *v23; // [rsp+A0h] [rbp-198h] BYREF char v24; // [rsp+B0h] [rbp-188h] BYREF char *v25; // [rsp+C0h] [rbp-178h] BYREF char v26; // [rsp+D0h] [rbp-168h] BYREF __int128 v27; // [rsp+E0h] [rbp-158h] long long v28; // [rsp+F0h] [rbp-148h] char *v29; // [rsp+F8h] [rbp-140h] BYREF char v30; // [rsp+108h] [rbp-130h] BYREF char *v31; // [rsp+118h] [rbp-120h] BYREF char v32; // [rsp+128h] [rbp-110h] BYREF char *v33; // [rsp+138h] [rbp-100h] BYREF char v34; // [rsp+148h] [rbp-F0h] BYREF __int128 v35; // [rsp+158h] [rbp-E0h] long long v36; // [rsp+168h] [rbp-D0h] char *v37; // [rsp+170h] [rbp-C8h] BYREF char v38; // [rsp+180h] [rbp-B8h] BYREF char *v39; // [rsp+190h] [rbp-A8h] BYREF char v40; // [rsp+1A0h] [rbp-98h] BYREF char *v41; // [rsp+1B0h] [rbp-88h] BYREF char v42; // [rsp+1C0h] [rbp-78h] BYREF __int128 v43; // [rsp+1D0h] [rbp-68h] long long v44; // [rsp+1E0h] [rbp-58h] char *v45; // [rsp+1E8h] [rbp-50h] BYREF char v46; // [rsp+1F8h] [rbp-40h] BYREF v15[0] = &v16; std::string::_M_construct<char const*>(v15, "system", (long long)""); v17 = &v18; std::string::_M_construct<char const*>(&v17, "You are a helpful assistant", (long long)""); v19 = 0LL; v20 = 0LL; v21 = &v22; std::string::_M_construct<char const*>(&v21, "", (long long)""); v23 = &v24; std::string::_M_construct<char const*>(&v23, "user", (long long)""); v25 = &v26; std::string::_M_construct<char const*>(&v25, "Hello", (long long)""); v27 = 0LL; v28 = 0LL; v29 = &v30; std::string::_M_construct<char const*>(&v29, "", (long long)""); v31 = &v32; std::string::_M_construct<char const*>(&v31, "assistant", (long long)""); v33 = &v34; std::string::_M_construct<char const*>(&v33, "Hi there", (long long)""); v35 = 0LL; v36 = 0LL; v37 = &v38; std::string::_M_construct<char const*>(&v37, "", (long long)""); v39 = &v40; std::string::_M_construct<char const*>(&v39, "user", (long long)""); v41 = &v42; std::string::_M_construct<char const*>(&v41, "How are you?", (long long)""); v43 = 0LL; v44 = 0LL; v45 = &v46; std::string::_M_construct<char const*>(&v45, "", (long long)""); std::vector<common_chat_msg>::vector(v14, v15, 4LL, &v13); v5 = 480LL; do { v6 = *(long long **)&v12[v5 + 8]; if ( &v14[v5 / 8 + 1] != v6 ) operator delete(v6, v14[v5 / 8 + 1] + 1); std::vector<common_tool_call>::~vector(&v12[v5 - 16]); v7 = *(_QWORD **)&v12[v5 - 48]; v8 = &v12[v5 - 32]; if ( v8 != v7 ) operator delete(v7, *v8 + 1LL); v9 = &v12[v5 - 64]; v10 = (_QWORD *)*(v9 - 2); if ( v9 != v10 ) operator delete(v10, *v9 + 1LL); v5 -= 120LL; } while ( v5 ); common_chat_apply_template[abi:cxx11](a1, a2, v14, 1u, a3); std::vector<common_chat_msg>::~vector(v14); return a1; }
common_chat_format_example[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV EBP,EDX MOV R12,RSI MOV R15,RDI LEA RAX,[RSP + 0x38] MOV qword ptr [RAX + -0x10],RAX LAB_00176d74: LEA RSI,[0x1f320a] LEA RDX,[0x1f3210] LEA RDI,[RSP + 0x28] CALL 0x00122630 LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 LAB_00176d9a: LEA RSI,[0x1f3211] LEA RDX,[0x1f322c] CALL 0x00122630 LEA R14,[RSP + 0x68] LEA RDI,[RSP + 0x80] LEA RAX,[RSP + 0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00176dd5: LEA RDX,[0x1ef92c] MOV RSI,RDX CALL 0x00122630 LEA R14,[RSP + 0xa0] LEA RAX,[RSP + 0xb0] MOV qword ptr [RAX + -0x10],RAX LAB_00176df8: LEA RSI,[0x1f3194] LEA RDX,[0x1f3198] MOV RDI,R14 CALL 0x00122630 LEA RDI,[RSP + 0xc0] LEA RBX,[RSP + 0xd0] MOV qword ptr [RBX + -0x10],RBX LAB_00176e22: LEA RSI,[0x1f322d] LEA RDX,[0x1f3232] CALL 0x00122630 LEA R13,[RSP + 0xe0] LEA RDI,[RSP + 0xf8] LEA RAX,[RSP + 0x108] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00176e60: LEA RDX,[0x1ef92c] MOV RSI,RDX CALL 0x00122630 LEA R14,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_00176e83: LEA RSI,[0x1f3223] LEA RDX,[0x1f322c] MOV RDI,R14 CALL 0x00122630 LEA RDI,[RSP + 0x138] LEA RBX,[RSP + 0x148] MOV qword ptr [RBX + -0x10],RBX LAB_00176ead: LEA RSI,[0x1f3233] LEA RDX,[0x1f323b] CALL 0x00122630 LEA R13,[RSP + 0x158] LEA RDI,[RSP + 0x170] LEA RAX,[RSP + 0x180] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00176eeb: LEA RDX,[0x1ef92c] MOV RSI,RDX CALL 0x00122630 LEA R14,[RSP + 0x190] LEA RAX,[RSP + 0x1a0] MOV qword ptr [RAX + -0x10],RAX LAB_00176f0e: LEA RSI,[0x1f3194] LEA RDX,[0x1f3198] MOV RDI,R14 CALL 0x00122630 LEA RDI,[RSP + 0x1b0] LEA RBX,[RSP + 0x1c0] MOV qword ptr [RBX + -0x10],RBX LAB_00176f38: LEA RSI,[0x1f323c] LEA RDX,[0x1f3248] CALL 0x00122630 LEA R13,[RSP + 0x1d0] LEA RDI,[RSP + 0x1e8] LEA RAX,[RSP + 0x1f8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00176f76: LEA RDX,[0x1ef92c] MOV RSI,RDX CALL 0x00122630 LAB_00176f85: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] LEA RCX,[RSP + 0xf] MOV EDX,0x4 CALL 0x0017f22e MOV R14D,0x1e0 LAB_00176fa4: LEA RAX,[RSP + R14*0x1] ADD RAX,0x18 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x00176fc0 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b8c0 LAB_00176fc0: LEA RBX,[RSP + R14*0x1] ADD RBX,-0x10 MOV RDI,RBX CALL 0x0017f1fe MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + R14*0x1] ADD RAX,-0x20 CMP RAX,RDI JZ 0x00176fec MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b8c0 LAB_00176fec: LEA RAX,[RSP + R14*0x1] ADD RAX,-0x40 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x00177008 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b8c0 LAB_00177008: ADD R14,-0x78 JNZ 0x00176fa4 LAB_0017700e: MOVZX R8D,BPL LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV ECX,0x1 CALL 0x0017639f LAB_00177027: LEA RDI,[RSP + 0x10] CALL 0x0017f1ce MOV RAX,R15 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */ chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2) { long *plVar1; long *plVar2; int7 in_register_00000031; long lVar3; long alStack_288 [8]; vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8]; int8 uStack_240; int8 uStack_230; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8]; long alStack_220 [2]; int1 *local_210 [2]; int1 local_200 [16]; int1 *local_1f0 [2]; int1 local_1e0 [16]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; int1 *local_1b8 [2]; int1 local_1a8 [16]; int1 *local_198 [2]; int1 local_188 [16]; int1 *local_178 [2]; int1 local_168 [16]; int8 local_158; int8 uStack_150; int8 local_148; int1 *local_140 [2]; int1 local_130 [16]; int1 *local_120 [2]; int1 local_110 [16]; int1 *local_100 [2]; int1 local_f0 [16]; int8 local_e0; int8 uStack_d8; int8 local_d0; int1 *local_c8 [2]; int1 local_b8 [16]; int1 *local_a8 [2]; int1 local_98 [16]; int1 *local_88 [2]; int1 local_78 [16]; int8 local_68; int8 uStack_60; int8 local_58; int1 *local_50 [2]; int1 local_40 [16]; local_210[0] = local_200; /* try { // try from 00176d74 to 00176d8b has its CatchHandler @ 00177217 */ uStack_240 = 0x176d8c; std::__cxx11::string::_M_construct<char_const*>(local_210,"system",""); local_1f0[0] = local_1e0; /* try { // try from 00176d9a to 00176dac has its CatchHandler @ 00177208 */ uStack_240 = 0x176dad; std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant",""); local_1b8[0] = local_1a8; local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 00176dd5 to 00176de3 has its CatchHandler @ 001771de */ uStack_240 = 0x176de4; std::__cxx11::string::_M_construct<char_const*>(local_1b8,""); local_198[0] = local_188; /* try { // try from 00176df8 to 00176e0d has its CatchHandler @ 001771b4 */ uStack_240 = 0x176e0e; std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001f3194,&DAT_001f3198); local_178[0] = local_168; /* try { // try from 00176e22 to 00176e34 has its CatchHandler @ 0017717f */ uStack_240 = 0x176e35; std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello",""); local_140[0] = local_130; local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 00176e60 to 00176e6e has its CatchHandler @ 00177152 */ uStack_240 = 0x176e6f; std::__cxx11::string::_M_construct<char_const*>(local_140,""); local_120[0] = local_110; /* try { // try from 00176e83 to 00176e98 has its CatchHandler @ 00177147 */ uStack_240 = 0x176e99; std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant",""); local_100[0] = local_f0; /* try { // try from 00176ead to 00176ebf has its CatchHandler @ 00177112 */ uStack_240 = 0x176ec0; std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there",""); local_c8[0] = local_b8; local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 00176eeb to 00176ef9 has its CatchHandler @ 001770e5 */ uStack_240 = 0x176efa; std::__cxx11::string::_M_construct<char_const*>(local_c8,""); local_a8[0] = local_98; /* try { // try from 00176f0e to 00176f23 has its CatchHandler @ 001770da */ uStack_240 = 0x176f24; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f3194,&DAT_001f3198); local_88[0] = local_78; /* try { // try from 00176f38 to 00176f4a has its CatchHandler @ 001770a8 */ uStack_240 = 0x176f4b; std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?",""); local_50[0] = local_40; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 00176f76 to 00176f84 has its CatchHandler @ 0017707b */ uStack_240 = 0x176f85; std::__cxx11::string::_M_construct<char_const*>(local_50,""); /* try { // try from 00176f85 to 00176f9d has its CatchHandler @ 00177058 */ uStack_240 = 0x176f9e; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,(long)&uStack_230 + 7); lVar3 = 0x1e0; do { if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) { uStack_240 = 0x176fc0; operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1 ); } uStack_240 = 0x176fd0; std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3); plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20); plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30); if (plVar1 != plVar2) { uStack_240 = 0x176fec; operator_delete(plVar2,*plVar1 + 1); } plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10); if (plVar2 != *(long **)((long)alStack_288 + lVar3)) { uStack_240 = 0x177008; operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1); } lVar3 = lVar3 + -0x78; } while (lVar3 != 0); /* try { // try from 0017700e to 00177026 has its CatchHandler @ 00177046 */ uStack_240 = 0x177027; common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); uStack_240 = 0x177031; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
63,231
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) { std::vector<common_chat_msg> msgs = { {"system", "You are a helpful assistant", {}}, {"user", "Hello", {}}, {"assistant", "Hi there", {}}, {"user", "How are you?", {}}, }; return common_chat_apply_template(tmpl, msgs, true, use_jinja); }
O3
cpp
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %r14d movq %rsi, %rbp movq %rdi, %r15 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x79e41(%rip), %rsi # 0xf11fa leaq 0x79e40(%rip), %rdx # 0xf1200 leaq 0x28(%rsp), %rbx movq %rbx, %rdi callq 0x225b4 movl %r14d, 0xc(%rsp) leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x79e19(%rip), %rsi # 0xf1201 leaq 0x79e2d(%rip), %rdx # 0xf121c callq 0x225b4 leaq 0x68(%rsp), %r14 leaq 0x80(%rsp), %rdi leaq 0x90(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x76509(%rip), %rdx # 0xed92c movq %rdx, %rsi callq 0x225b4 movq %rbp, %r12 leaq 0xa0(%rsp), %r14 leaq 0xb0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x79d3b(%rip), %rsi # 0xf1184 leaq 0x79d38(%rip), %rdx # 0xf1188 movq %r14, %rdi callq 0x225b4 leaq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x79daa(%rip), %rsi # 0xf121d leaq 0x79da8(%rip), %rdx # 0xf1222 callq 0x225b4 leaq 0xe0(%rsp), %r13 leaq 0xf8(%rsp), %rdi leaq 0x108(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x7647b(%rip), %rdx # 0xed92c movq %rdx, %rsi callq 0x225b4 leaq 0x118(%rsp), %r14 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x79d3f(%rip), %rsi # 0xf1213 leaq 0x79d41(%rip), %rdx # 0xf121c movq %r14, %rdi callq 0x225b4 leaq 0x138(%rsp), %rdi leaq 0x148(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x79d25(%rip), %rsi # 0xf1223 leaq 0x79d26(%rip), %rdx # 0xf122b callq 0x225b4 leaq 0x158(%rsp), %r13 leaq 0x170(%rsp), %rdi leaq 0x180(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x763f0(%rip), %rdx # 0xed92c movq %rdx, %rsi callq 0x225b4 leaq 0x190(%rsp), %r14 leaq 0x1a0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x79c25(%rip), %rsi # 0xf1184 leaq 0x79c22(%rip), %rdx # 0xf1188 movq %r14, %rdi callq 0x225b4 leaq 0x1b0(%rsp), %rdi leaq 0x1c0(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x79ca3(%rip), %rsi # 0xf122c leaq 0x79ca8(%rip), %rdx # 0xf1238 callq 0x225b4 leaq 0x1d0(%rsp), %r13 leaq 0x1e8(%rsp), %rdi leaq 0x1f8(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x76365(%rip), %rdx # 0xed92c movq %rdx, %rsi callq 0x225b4 leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0xb(%rsp), %rcx movl $0x4, %edx callq 0x7f1b0 movl $0x1e0, %r14d # imm = 0x1E0 leaq (%rsp,%r14), %rax addq $0x18, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x7760a movq (%rax), %rsi incq %rsi callq 0x1b8c0 leaq (%rsp,%r14), %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0x7f180 movq -0x20(%rbx), %rdi leaq (%rsp,%r14), %rax addq $-0x20, %rax cmpq %rdi, %rax je 0x77636 movq (%rax), %rsi incq %rsi callq 0x1b8c0 leaq (%rsp,%r14), %rax addq $-0x40, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x77652 movq (%rax), %rsi incq %rsi callq 0x1b8c0 addq $-0x78, %r14 jne 0x775ee movzbl 0xc(%rsp), %r8d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movl $0x1, %ecx callq 0x769f0 leaq 0x10(%rsp), %rdi callq 0x7f150 movq %r15, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x7f150 jmp 0x777d6 movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x7f1f8 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x776ac jmp 0x777d6 movq %rax, %r15 movq %r13, %rdi callq 0x7f180 movq 0x1b0(%rsp), %rdi cmpq %rbp, %rdi je 0x776f5 movq 0x1c0(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x776f5 movq %rax, %r15 movq 0x190(%rsp), %rdi leaq 0x1a0(%rsp), %rax cmpq %rax, %rdi je 0x777c5 movq 0x1a0(%rsp), %rsi jmp 0x777b8 jmp 0x777c2 movq %rax, %r15 movq %r13, %rdi callq 0x7f180 movq 0x138(%rsp), %rdi cmpq %rbp, %rdi je 0x7774d movq 0x148(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x7774d movq %rax, %r15 movq 0x118(%rsp), %rdi leaq 0x128(%rsp), %rax cmpq %rax, %rdi je 0x777c5 movq 0x128(%rsp), %rsi jmp 0x777b8 jmp 0x777c2 movq %rax, %r15 movq %r13, %rdi callq 0x7f180 movq 0xc0(%rsp), %rdi cmpq %rbp, %rdi je 0x7779b movq 0xd0(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x7779b movq %rax, %r15 movq 0xa0(%rsp), %rdi leaq 0xb0(%rsp), %rax cmpq %rax, %rdi je 0x777c5 movq 0xb0(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x777c5 movq %rax, %r15 addq $-0x78, %r14 movq %r14, %rdi callq 0x7f1f8 cmpq %rbx, %r14 jne 0x777c5 movq %r15, %rdi callq 0x1bf90 movq %rax, %r15 movq %r14, %rdi callq 0x7f180 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x77805 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x77805 movq %rax, %r15 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x777d6 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x777d6 movq %rax, %r15 jmp 0x777d6
_Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov r14d, edx mov rbp, rsi mov r15, rdi lea r13, [rsp+238h+var_200] mov [r13-10h], r13 lea rsi, aSystem; "system" lea rdx, aSystem+6; "" lea rbx, [rsp+238h+var_210] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov [rsp+238h+var_22C], r14d lea rdi, [rsp+238h+var_1F0] lea r12, [rsp+238h+var_1E0] mov [r12-10h], r12 lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, aYouAreAHelpful+1Bh; "" 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 r14, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] lea rax, [rsp+238h+var_1A8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov r12, rbp lea r14, [rsp+238h+var_198] lea rax, [rsp+238h+var_188] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 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+238h+var_178] lea rbp, [rsp+238h+var_168] mov [rbp-10h], rbp lea rsi, aHello; "Hello" lea rdx, aHello+5; "" 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 r13, [rsp+238h+var_158] lea rdi, [rsp+238h+var_140] lea rax, [rsp+238h+var_130] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_120] lea rax, [rsp+238h+var_110] mov [rax-10h], rax lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, aYouAreAHelpful+1Bh; "" mov rdi, r14 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+238h+var_100] lea rbp, [rsp+238h+var_F0] mov [rbp-10h], rbp lea rsi, aHiThere; "Hi there" lea rdx, aHiThere+8; "" 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 r13, [rsp+238h+var_E0] lea rdi, [rsp+238h+var_C8] lea rax, [rsp+238h+var_B8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_A8] lea rax, [rsp+238h+var_98] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 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+238h+var_88] lea rbp, [rsp+238h+var_78] mov [rbp-10h], rbp lea rsi, aHowAreYou; "How are you?" lea rdx, aHowAreYou+0Ch; "" 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 r13, [rsp+238h+var_68] lea rdi, [rsp+238h+var_50] lea rax, [rsp+238h+var_40] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] lea rcx, [rsp+238h+var_22D] mov edx, 4 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&) mov r14d, 1E0h loc_775EE: lea rax, [rsp+r14+238h+var_238] add rax, 18h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_7760A mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7760A: lea rbx, [rsp+r14+238h+var_238] add rbx, 0FFFFFFFFFFFFFFF0h mov rdi, rbx call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rbx-20h]; void * lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFE0h cmp rax, rdi jz short loc_77636 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77636: lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFC0h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_77652 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77652: add r14, 0FFFFFFFFFFFFFF88h jnz short loc_775EE movzx r8d, byte ptr [rsp+238h+var_22C] lea rdx, [rsp+238h+var_228] mov rdi, r15 mov rsi, r12 mov ecx, 1 call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) lea rdi, [rsp+238h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() jmp loc_777D6 mov r15, rax mov ebx, 168h loc_776AC: lea rdi, [rsp+rbx+0] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_776AC jmp loc_777D6 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_1A8]; void * cmp rdi, rbp jz short loc_776F5 mov rsi, [rsp+arg_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_776F5 mov r15, rax loc_776F5: mov rdi, [rsp+arg_188] lea rax, [rsp+arg_198] cmp rdi, rax jz loc_777C5 mov rsi, [rsp+arg_198] jmp loc_777B8 jmp loc_777C2 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_130]; void * cmp rdi, rbp jz short loc_7774D mov rsi, [rsp+arg_140] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7774D mov r15, rax loc_7774D: mov rdi, [rsp+arg_110] lea rax, [rsp+arg_120] cmp rdi, rax jz short loc_777C5 mov rsi, [rsp+arg_120] jmp short loc_777B8 jmp short loc_777C2 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_B8]; void * cmp rdi, rbp jz short loc_7779B mov rsi, [rsp+arg_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7779B mov r15, rax loc_7779B: mov rdi, [rsp+arg_98]; void * lea rax, [rsp+arg_A8] cmp rdi, rax jz short loc_777C5 mov rsi, [rsp+arg_A8] loc_777B8: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_777C5 loc_777C2: mov r15, rax loc_777C5: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_777C5 loc_777D6: mov rdi, r15 call __Unwind_Resume mov r15, rax mov rdi, r14 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_40]; void * cmp rdi, r12 jz short loc_77805 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77805 mov r15, rax loc_77805: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_777D6 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_777D6 mov r15, rax jmp short loc_777D6
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, int a3) { unsigned long long v5; // r14 long long *v6; // rdi _QWORD *v7; // rdi _QWORD *v8; // rax _QWORD *v9; // rax _QWORD *v10; // rdi _BYTE v12[11]; // [rsp+0h] [rbp-238h] BYREF char v13; // [rsp+Bh] [rbp-22Dh] BYREF int v14; // [rsp+Ch] [rbp-22Ch] long long v15[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v16[2]; // [rsp+28h] [rbp-210h] BYREF char v17; // [rsp+38h] [rbp-200h] BYREF char *v18; // [rsp+48h] [rbp-1F0h] BYREF char v19; // [rsp+58h] [rbp-1E0h] BYREF __int128 v20; // [rsp+68h] [rbp-1D0h] long long v21; // [rsp+78h] [rbp-1C0h] char *v22; // [rsp+80h] [rbp-1B8h] BYREF char v23; // [rsp+90h] [rbp-1A8h] BYREF char *v24; // [rsp+A0h] [rbp-198h] BYREF char v25; // [rsp+B0h] [rbp-188h] BYREF char *v26; // [rsp+C0h] [rbp-178h] BYREF char v27; // [rsp+D0h] [rbp-168h] BYREF __int128 v28; // [rsp+E0h] [rbp-158h] long long v29; // [rsp+F0h] [rbp-148h] char *v30; // [rsp+F8h] [rbp-140h] BYREF char v31; // [rsp+108h] [rbp-130h] BYREF char *v32; // [rsp+118h] [rbp-120h] BYREF char v33; // [rsp+128h] [rbp-110h] BYREF char *v34; // [rsp+138h] [rbp-100h] BYREF char v35; // [rsp+148h] [rbp-F0h] BYREF __int128 v36; // [rsp+158h] [rbp-E0h] long long v37; // [rsp+168h] [rbp-D0h] char *v38; // [rsp+170h] [rbp-C8h] BYREF char v39; // [rsp+180h] [rbp-B8h] BYREF char *v40; // [rsp+190h] [rbp-A8h] BYREF char v41; // [rsp+1A0h] [rbp-98h] BYREF char *v42; // [rsp+1B0h] [rbp-88h] BYREF char v43; // [rsp+1C0h] [rbp-78h] BYREF __int128 v44; // [rsp+1D0h] [rbp-68h] long long v45; // [rsp+1E0h] [rbp-58h] char *v46; // [rsp+1E8h] [rbp-50h] BYREF char v47; // [rsp+1F8h] [rbp-40h] BYREF v16[0] = &v17; std::string::_M_construct<char const*>((long long)v16, "system", (long long)""); v14 = a3; v18 = &v19; std::string::_M_construct<char const*>((long long)&v18, "You are a helpful assistant", (long long)""); v20 = 0LL; v21 = 0LL; v22 = &v23; std::string::_M_construct<char const*>((long long)&v22, "", (long long)""); v24 = &v25; std::string::_M_construct<char const*>((long long)&v24, "user", (long long)""); v26 = &v27; std::string::_M_construct<char const*>((long long)&v26, "Hello", (long long)""); v28 = 0LL; v29 = 0LL; v30 = &v31; std::string::_M_construct<char const*>((long long)&v30, "", (long long)""); v32 = &v33; std::string::_M_construct<char const*>((long long)&v32, "assistant", (long long)""); v34 = &v35; std::string::_M_construct<char const*>((long long)&v34, "Hi there", (long long)""); v36 = 0LL; v37 = 0LL; v38 = &v39; std::string::_M_construct<char const*>((long long)&v38, "", (long long)""); v40 = &v41; std::string::_M_construct<char const*>((long long)&v40, "user", (long long)""); v42 = &v43; std::string::_M_construct<char const*>((long long)&v42, "How are you?", (long long)""); v44 = 0LL; v45 = 0LL; v46 = &v47; std::string::_M_construct<char const*>((long long)&v46, "", (long long)""); std::vector<common_chat_msg>::vector(v15, v16, 4LL, &v13); v5 = 480LL; do { v6 = *(long long **)&v12[v5 + 8]; if ( &v15[v5 / 8 + 1] != v6 ) operator delete(v6, v15[v5 / 8 + 1] + 1); std::vector<common_tool_call>::~vector(&v12[v5 - 16]); v7 = *(_QWORD **)&v12[v5 - 48]; v8 = &v12[v5 - 32]; if ( v8 != v7 ) operator delete(v7, *v8 + 1LL); v9 = &v12[v5 - 64]; v10 = (_QWORD *)*(v9 - 2); if ( v9 != v10 ) operator delete(v10, *v9 + 1LL); v5 -= 120LL; } while ( v5 ); common_chat_apply_template[abi:cxx11](a1, a2, v15, 1u, (unsigned __int8)v14); std::vector<common_chat_msg>::~vector(v15); return a1; }
common_chat_format_example[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV R14D,EDX MOV RBP,RSI MOV R15,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_001773b2: LEA RSI,[0x1f11fa] LEA RDX,[0x1f1200] LEA RBX,[RSP + 0x28] MOV RDI,RBX CALL 0x001225b4 MOV dword ptr [RSP + 0xc],R14D LEA RDI,[RSP + 0x48] LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 LAB_001773e1: LEA RSI,[0x1f1201] LEA RDX,[0x1f121c] CALL 0x001225b4 LEA R14,[RSP + 0x68] LEA RDI,[RSP + 0x80] LEA RAX,[RSP + 0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0017741c: LEA RDX,[0x1ed92c] MOV RSI,RDX CALL 0x001225b4 MOV R12,RBP LEA R14,[RSP + 0xa0] LEA RAX,[RSP + 0xb0] MOV qword ptr [RAX + -0x10],RAX LAB_00177442: LEA RSI,[0x1f1184] LEA RDX,[0x1f1188] MOV RDI,R14 CALL 0x001225b4 LEA RDI,[RSP + 0xc0] LEA RBP,[RSP + 0xd0] MOV qword ptr [RBP + -0x10],RBP LAB_0017746c: LEA RSI,[0x1f121d] LEA RDX,[0x1f1222] CALL 0x001225b4 LEA R13,[RSP + 0xe0] LEA RDI,[RSP + 0xf8] LEA RAX,[RSP + 0x108] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_001774aa: LEA RDX,[0x1ed92c] MOV RSI,RDX CALL 0x001225b4 LEA R14,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_001774cd: LEA RSI,[0x1f1213] LEA RDX,[0x1f121c] MOV RDI,R14 CALL 0x001225b4 LEA RDI,[RSP + 0x138] LEA RBP,[RSP + 0x148] MOV qword ptr [RBP + -0x10],RBP LAB_001774f7: LEA RSI,[0x1f1223] LEA RDX,[0x1f122b] CALL 0x001225b4 LEA R13,[RSP + 0x158] LEA RDI,[RSP + 0x170] LEA RAX,[RSP + 0x180] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00177535: LEA RDX,[0x1ed92c] MOV RSI,RDX CALL 0x001225b4 LEA R14,[RSP + 0x190] LEA RAX,[RSP + 0x1a0] MOV qword ptr [RAX + -0x10],RAX LAB_00177558: LEA RSI,[0x1f1184] LEA RDX,[0x1f1188] MOV RDI,R14 CALL 0x001225b4 LEA RDI,[RSP + 0x1b0] LEA RBP,[RSP + 0x1c0] MOV qword ptr [RBP + -0x10],RBP LAB_00177582: LEA RSI,[0x1f122c] LEA RDX,[0x1f1238] CALL 0x001225b4 LEA R13,[RSP + 0x1d0] LEA RDI,[RSP + 0x1e8] LEA RAX,[RSP + 0x1f8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_001775c0: LEA RDX,[0x1ed92c] MOV RSI,RDX CALL 0x001225b4 LAB_001775cf: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] LEA RCX,[RSP + 0xb] MOV EDX,0x4 CALL 0x0017f1b0 MOV R14D,0x1e0 LAB_001775ee: LEA RAX,[RSP + R14*0x1] ADD RAX,0x18 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x0017760a MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b8c0 LAB_0017760a: LEA RBX,[RSP + R14*0x1] ADD RBX,-0x10 MOV RDI,RBX CALL 0x0017f180 MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + R14*0x1] ADD RAX,-0x20 CMP RAX,RDI JZ 0x00177636 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b8c0 LAB_00177636: LEA RAX,[RSP + R14*0x1] ADD RAX,-0x40 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x00177652 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b8c0 LAB_00177652: ADD R14,-0x78 JNZ 0x001775ee LAB_00177658: MOVZX R8D,byte ptr [RSP + 0xc] LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV ECX,0x1 CALL 0x001769f0 LAB_00177673: LEA RDI,[RSP + 0x10] CALL 0x0017f150 MOV RAX,R15 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */ chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2) { long *plVar1; long *plVar2; int7 in_register_00000031; long lVar3; long alStack_288 [8]; vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8]; int8 uStack_240; int8 uStack_230; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8]; long alStack_220 [2]; int1 *local_210 [2]; int1 local_200 [16]; int1 *local_1f0 [2]; int1 local_1e0 [16]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; int1 *local_1b8 [2]; int1 local_1a8 [16]; int1 *local_198 [2]; int1 local_188 [16]; int1 *local_178 [2]; int1 local_168 [16]; int8 local_158; int8 uStack_150; int8 local_148; int1 *local_140 [2]; int1 local_130 [16]; int1 *local_120 [2]; int1 local_110 [16]; int1 *local_100 [2]; int1 local_f0 [16]; int8 local_e0; int8 uStack_d8; int8 local_d0; int1 *local_c8 [2]; int1 local_b8 [16]; int1 *local_a8 [2]; int1 local_98 [16]; int1 *local_88 [2]; int1 local_78 [16]; int8 local_68; int8 uStack_60; int8 local_58; int1 *local_50 [2]; int1 local_40 [16]; local_210[0] = local_200; /* try { // try from 001773b2 to 001773cc has its CatchHandler @ 0017781e */ uStack_240 = 0x1773cd; std::__cxx11::string::_M_construct<char_const*>(local_210,"system",""); local_1f0[0] = local_1e0; /* try { // try from 001773e1 to 001773f3 has its CatchHandler @ 00177802 */ uStack_240 = 0x1773f4; std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant",""); local_1b8[0] = local_1a8; local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 0017741c to 0017742a has its CatchHandler @ 001777de */ uStack_240 = 0x17742b; std::__cxx11::string::_M_construct<char_const*>(local_1b8,""); local_198[0] = local_188; /* try { // try from 00177442 to 00177457 has its CatchHandler @ 001777c2 */ uStack_240 = 0x177458; std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001f1184,&DAT_001f1188); local_178[0] = local_168; /* try { // try from 0017746c to 0017747e has its CatchHandler @ 00177798 */ uStack_240 = 0x17747f; std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello",""); local_140[0] = local_130; local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 001774aa to 001774b8 has its CatchHandler @ 0017776e */ uStack_240 = 0x1774b9; std::__cxx11::string::_M_construct<char_const*>(local_140,""); local_120[0] = local_110; /* try { // try from 001774cd to 001774e2 has its CatchHandler @ 0017776c */ uStack_240 = 0x1774e3; std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant",""); local_100[0] = local_f0; /* try { // try from 001774f7 to 00177509 has its CatchHandler @ 0017774a */ uStack_240 = 0x17750a; std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there",""); local_c8[0] = local_b8; local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 00177535 to 00177543 has its CatchHandler @ 00177720 */ uStack_240 = 0x177544; std::__cxx11::string::_M_construct<char_const*>(local_c8,""); local_a8[0] = local_98; /* try { // try from 00177558 to 0017756d has its CatchHandler @ 0017771b */ uStack_240 = 0x17756e; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f1184,&DAT_001f1188); local_88[0] = local_78; /* try { // try from 00177582 to 00177594 has its CatchHandler @ 001776f2 */ uStack_240 = 0x177595; std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?",""); local_50[0] = local_40; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 001775c0 to 001775ce has its CatchHandler @ 001776c8 */ uStack_240 = 0x1775cf; std::__cxx11::string::_M_construct<char_const*>(local_50,""); /* try { // try from 001775cf to 001775e7 has its CatchHandler @ 001776a4 */ uStack_240 = 0x1775e8; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,(long)&uStack_230 + 3); lVar3 = 0x1e0; do { if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) { uStack_240 = 0x17760a; operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1 ); } uStack_240 = 0x17761a; std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3); plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20); plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30); if (plVar1 != plVar2) { uStack_240 = 0x177636; operator_delete(plVar2,*plVar1 + 1); } plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10); if (plVar2 != *(long **)((long)alStack_288 + lVar3)) { uStack_240 = 0x177652; operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1); } lVar3 = lVar3 + -0x78; } while (lVar3 != 0); /* try { // try from 00177658 to 00177672 has its CatchHandler @ 00177692 */ uStack_240 = 0x177673; common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); uStack_240 = 0x17767d; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
63,232
maria_ft_parse_internal
eloqsql/storage/maria/ma_ft_parser.c
static int maria_ft_parse_internal(MYSQL_FTPARSER_PARAM *param, const char *doc_arg, int doc_len) { uchar *doc= (uchar*) doc_arg; uchar *end= doc + doc_len; MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam; TREE *wtree= ft_param->wtree; FT_WORD w; DBUG_ENTER("maria_ft_parse_internal"); while (maria_ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE)) if (param->mysql_add_word(param, (char*)w.pos, w.len, 0)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
maria_ft_parse_internal: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movslq -0x1c(%rbp), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq 0x230(%rax), %rdi movq -0x30(%rbp), %rdx leaq -0x28(%rbp), %rsi leaq -0x58(%rbp), %rcx movl $0x1, %r8d callq 0x4b460 cmpb $0x0, %al je 0x4b860 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rdi movq -0x58(%rbp), %rsi movl -0x50(%rbp), %edx xorl %ecx, %ecx callq *%rax cmpl $0x0, %eax je 0x4b85e jmp 0x4b855 movl $0x1, -0x4(%rbp) jmp 0x4b869 jmp 0x4b811 jmp 0x4b862 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
maria_ft_parse_internal: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+var_28] movsxd rcx, [rbp+var_1C] add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_40], rax loc_4B811: mov rax, [rbp+var_40] mov rdi, [rax+230h] mov rdx, [rbp+var_30] lea rsi, [rbp+var_28] lea rcx, [rbp+var_58] mov r8d, 1 call maria_ft_simple_get_word cmp al, 0 jz short loc_4B860 mov rax, [rbp+var_10] mov rax, [rax+8] mov rdi, [rbp+var_10] mov rsi, [rbp+var_58] mov edx, [rbp+var_50] xor ecx, ecx call rax cmp eax, 0 jz short loc_4B85E jmp short $+2 loc_4B855: mov [rbp+var_4], 1 jmp short loc_4B869 loc_4B85E: jmp short loc_4B811 loc_4B860: jmp short $+2 loc_4B862: mov [rbp+var_4], 0 loc_4B869: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long maria_ft_parse_internal(long long a1, _BYTE *a2, int a3) { long long v4; // [rsp+8h] [rbp-58h] BYREF unsigned int v5; // [rsp+10h] [rbp-50h] long long v6; // [rsp+20h] [rbp-40h] long long *v7; // [rsp+28h] [rbp-38h] _BYTE *v8; // [rsp+30h] [rbp-30h] _BYTE *v9; // [rsp+38h] [rbp-28h] BYREF int v10; // [rsp+44h] [rbp-1Ch] _BYTE *v11; // [rsp+48h] [rbp-18h] long long v12; // [rsp+50h] [rbp-10h] v12 = a1; v11 = a2; v10 = a3; v9 = a2; v8 = &a2[a3]; v7 = *(long long **)(a1 + 24); v6 = *v7; while ( maria_ft_simple_get_word(*(_QWORD *)(v6 + 560), &v9, (unsigned long long)v8, (long long)&v4, 1) ) { if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD))(v12 + 8))(v12, v4, v5, 0LL) ) return 1; } return 0; }
maria_ft_parse_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x1c] ADD RAX,RCX 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 + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX LAB_0014b811: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x230] MOV RDX,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x28] LEA RCX,[RBP + -0x58] MOV R8D,0x1 CALL 0x0014b460 CMP AL,0x0 JZ 0x0014b860 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x58] MOV EDX,dword ptr [RBP + -0x50] XOR ECX,ECX CALL RAX CMP EAX,0x0 JZ 0x0014b85e JMP 0x0014b855 LAB_0014b855: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014b869 LAB_0014b85e: JMP 0x0014b811 LAB_0014b860: JMP 0x0014b862 LAB_0014b862: MOV dword ptr [RBP + -0x4],0x0 LAB_0014b869: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 maria_ft_parse_internal(long param_1,long param_2,int param_3) { char cVar1; int iVar2; int8 local_60; int4 local_58; long local_48; long *local_40; long local_38; long local_30; int local_24; long local_20; long local_18; local_38 = param_2 + param_3; local_40 = *(long **)(param_1 + 0x18); local_48 = *local_40; local_30 = param_2; local_24 = param_3; local_20 = param_2; local_18 = param_1; do { cVar1 = maria_ft_simple_get_word (*(int8 *)(local_48 + 0x230),&local_30,local_38,&local_60,1); if (cVar1 == '\0') { return 0; } iVar2 = (**(code **)(local_18 + 8))(local_18,local_60,local_58,0); } while (iVar2 == 0); return 1; }
63,233
translog_wait_for_buffer_free
eloqsql/storage/maria/ma_loghandler.c
static void translog_wait_for_buffer_free(struct st_translog_buffer *buffer) { TRANSLOG_ADDRESS offset= buffer->offset; TRANSLOG_FILE *file= buffer->file; uint8 ver= buffer->ver; DBUG_ENTER("translog_wait_for_buffer_free"); DBUG_PRINT("enter", ("Buffer #%u %p copies in progress: %u " "is closing %u File: %d size: %lu", (uint) buffer->buffer_no, buffer, (uint) buffer->copy_to_buffer_in_progress, (uint) buffer->is_closing_buffer, (buffer->file ? buffer->file->handler.file : -1), (ulong) buffer->size)); translog_wait_for_writers(buffer); if (offset != buffer->offset || file != buffer->file || ver != buffer->ver) DBUG_VOID_RETURN; /* the buffer if already freed */ while (buffer->file != NULL) { DBUG_PRINT("info", ("wait for writers... buffer: #%u %p", (uint) buffer->buffer_no, buffer)); mysql_cond_wait(&buffer->waiting_filling_buffer, &buffer->mutex); DBUG_PRINT("info", ("wait for writers done. buffer: #%u %p", (uint) buffer->buffer_no, buffer)); } DBUG_ASSERT(buffer->copy_to_buffer_in_progress == 0); DBUG_VOID_RETURN; }
O3
c
translog_wait_for_buffer_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x100010(%rdi), %r12 movq 0x100038(%rdi), %r14 movb 0x1000d9(%rdi), %r15b callq 0x4f038 cmpq 0x100010(%rbx), %r12 jne 0x4ff8f cmpq 0x100038(%rbx), %r14 jne 0x4ff8f cmpb 0x1000d9(%rbx), %r15b setne %al testq %r14, %r14 sete %cl orb %al, %cl je 0x4ff98 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x100040(%rbx), %r14 leaq 0x100090(%rbx), %r15 leaq 0x89eb2(%rip), %r12 # 0xd9e5f cmpq $0x0, 0x100070(%rbx) jne 0x4ffce movq %r14, %rdi movq %r15, %rsi callq 0x29430 cmpq $0x0, 0x100038(%rbx) jne 0x4ffad jmp 0x4ff8f movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x832, %ecx # imm = 0x832 callq 0x2eea0 jmp 0x4ffc2
translog_wait_for_buffer_free: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi mov r12, ds:qword_100010[rdi] mov r14, ds:qword_100038[rdi] mov r15b, ds:byte_1000D9[rdi] call translog_wait_for_writers cmp r12, ds:qword_100010[rbx] jnz short loc_4FF8F cmp r14, ds:qword_100038[rbx] jnz short loc_4FF8F cmp r15b, ds:byte_1000D9[rbx] setnz al test r14, r14 setz cl or cl, al jz short loc_4FF98 loc_4FF8F: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_4FF98: lea r14, unk_100040[rbx] lea r15, unk_100090[rbx] lea r12, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"... loc_4FFAD: cmp ds:qword_100070[rbx], 0 jnz short loc_4FFCE mov rdi, r14 mov rsi, r15 call _pthread_cond_wait loc_4FFC2: cmp ds:qword_100038[rbx], 0 jnz short loc_4FFAD jmp short loc_4FF8F loc_4FFCE: mov rdi, r14 mov rsi, r15 mov rdx, r12 mov ecx, 832h call psi_cond_wait jmp short loc_4FFC2
unsigned __int8 translog_wait_for_buffer_free(long long a1) { long long v1; // r12 long long v2; // r14 char v3; // r15 unsigned __int8 result; // al v1 = *(long long *)((char *)&qword_100010 + a1); v2 = *(long long *)((char *)&qword_100038 + a1); v3 = byte_1000D9[a1]; result = translog_wait_for_writers(a1); if ( v1 == *(long long *)((char *)&qword_100010 + a1) && v2 == *(long long *)((char *)&qword_100038 + a1) ) { result = v3 != byte_1000D9[a1]; if ( !(result | (v2 == 0)) ) { do { if ( *(long long *)((char *)&qword_100070 + a1) ) result = psi_cond_wait( (long long)&unk_100040 + a1, (long long)&unk_100090 + a1, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x832u); else result = pthread_cond_wait((char *)&unk_100040 + a1, (char *)&unk_100090 + a1); } while ( *(long long *)((char *)&qword_100038 + a1) ); } } return result; }
translog_wait_for_buffer_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI MOV R12,qword ptr [RDI + 0x100010] MOV R14,qword ptr [RDI + 0x100038] MOV R15B,byte ptr [RDI + 0x1000d9] CALL 0x0014f038 CMP R12,qword ptr [RBX + 0x100010] JNZ 0x0014ff8f CMP R14,qword ptr [RBX + 0x100038] JNZ 0x0014ff8f CMP R15B,byte ptr [RBX + 0x1000d9] SETNZ AL TEST R14,R14 SETZ CL OR CL,AL JZ 0x0014ff98 LAB_0014ff8f: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0014ff98: LEA R14,[RBX + 0x100040] LEA R15,[RBX + 0x100090] LEA R12,[0x1d9e5f] LAB_0014ffad: CMP qword ptr [RBX + 0x100070],0x0 JNZ 0x0014ffce MOV RDI,R14 MOV RSI,R15 CALL 0x00129430 LAB_0014ffc2: CMP qword ptr [RBX + 0x100038],0x0 JNZ 0x0014ffad JMP 0x0014ff8f LAB_0014ffce: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV ECX,0x832 CALL 0x0012eea0 JMP 0x0014ffc2
void translog_wait_for_buffer_free(long param_1) { pthread_cond_t *__cond; pthread_mutex_t *__mutex; char cVar1; long lVar2; long lVar3; lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7); lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f); cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1); translog_wait_for_writers(); if (((lVar2 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7)) && (lVar3 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f))) && (lVar3 != 0 && cVar1 == *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1))) { __cond = (pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1); __mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1); do { if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_align + param_1) == 0) { pthread_cond_wait(__cond,__mutex); } else { psi_cond_wait(__cond,__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x832 ); } } while (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0); } return; }
63,234
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int)
monkey531[P]llama/common/common.cpp
void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); std::unordered_map<llama_seq_id, size_t> seqs; llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] < 0) { continue; } if (seqs.find(cs_curr[j]) == seqs.end()) { if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } const size_t sz = seqs.size(); seqs[cs_curr[j]] = sz; } } if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } } printf("=== Sequence legend: "); for (const auto & it : seqs) { printf("%zu=%d, ", it.second, it.first); } printf("'+'=other sequence ids"); c_curr = view.cells; cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { const auto & it = seqs.find(cs_curr[j]); putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+'); } else { putchar('.'); } } putchar(' '); } printf("\n=== Done dumping\n"); }
O3
cpp
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %esi, 0x14(%rsp) movq %rdi, %r14 movl (%rdi), %esi movl 0x4(%rdi), %edx movl 0xc(%rdi), %ecx movl 0x8(%rdi), %r8d movl 0x10(%rdi), %r9d movl 0x14(%rdi), %eax movl %eax, (%rsp) leaq 0x77a5e(%rip), %rdi # 0xef749 movq $0x0, 0x18(%rsp) xorl %eax, %eax callq 0x1a070 leaq 0x50(%rsp), %rax movq %rax, -0x30(%rax) movq $0x1, -0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x20(%rax) movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000 movups %xmm0, -0x8(%rax) cmpl $0x0, (%r14) jle 0x77dae movq 0x20(%r14), %rbp movl 0x4(%r14), %eax leaq 0x20(%rsp), %r15 xorl %ebx, %ebx testl %eax, %eax jle 0x77d8a movq %rbp, %r12 xorl %r13d, %r13d cmpl $0x0, (%r12) js 0x77d75 movq %r15, %rdi movq %r12, %rsi callq 0xbaf80 testq %rax, %rax jne 0x77d75 movq 0x38(%rsp), %rbx leaq -0x3e(%rbx), %rax cmpq $-0x3f, %rax jb 0x77d8a movq %r15, %rdi movq %r12, %rsi callq 0xbafdc movq %rbx, (%rax) incq %r13 movslq 0x4(%r14), %rax addq $0x4, %r12 cmpq %rax, %r13 jl 0x77d41 movq 0x38(%rsp), %rbx leaq -0x3e(%rbx), %rax cmpq $-0x3f, %rax jb 0x77dae movq 0x18(%rsp), %rcx incl %ecx movslq 0x4(%r14), %rax leaq (%rbp,%rax,4), %rbp movq %rcx, 0x18(%rsp) cmpl (%r14), %ecx jl 0x77d37 leaq 0x77a1f(%rip), %rdi # 0xef7d4 xorl %eax, %eax callq 0x1a070 movq 0x30(%rsp), %rbx testq %rbx, %rbx je 0x77de6 leaq 0x77a1d(%rip), %r15 # 0xef7ea movq 0x10(%rbx), %rsi movl 0x8(%rbx), %edx movq %r15, %rdi xorl %eax, %eax callq 0x1a070 movq (%rbx), %rbx testq %rbx, %rbx jne 0x77dcd leaq 0x77a06(%rip), %rdi # 0xef7f3 xorl %eax, %eax callq 0x1a070 cmpl $0x0, (%r14) jle 0x77e96 movq 0x20(%r14), %r15 leaq 0x20(%rsp), %r12 xorl %ebp, %ebp movl %ebp, %eax cltd idivl 0x14(%rsp) testl %edx, %edx jne 0x77e24 leaq 0x77927(%rip), %rdi # 0xef742 movl %ebp, %esi xorl %eax, %eax callq 0x1a070 cmpl $0x0, 0x4(%r14) jle 0x77e79 movq %r15, %r13 xorl %ebx, %ebx cmpl $0x0, (%r13) js 0x77e58 movq %r12, %rdi movq %r13, %rsi callq 0xbaf80 testq %rax, %rax je 0x77e5f movq 0x10(%rax), %rax leaq 0x79dfe(%rip), %rcx # 0xf1c50 movsbl (%rax,%rcx), %edi jmp 0x77e64 movl $0x2e, %edi jmp 0x77e64 movl $0x2b, %edi callq 0x1ac30 incq %rbx movslq 0x4(%r14), %rax addq $0x4, %r13 cmpq %rax, %rbx jl 0x77e30 movl $0x20, %edi callq 0x1ac30 incl %ebp movslq 0x4(%r14), %rax leaq (%r15,%rax,4), %r15 cmpl (%r14), %ebp jl 0x77e09 leaq 0x79d57(%rip), %rdi # 0xf1bf4 callq 0x1ad60 leaq 0x20(%rsp), %rdi callq 0xb8c78 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x77ebf jmp 0x77ebf movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xb8c78 movq %rbx, %rdi callq 0x1af90
_Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rsp+88h+var_74], esi mov r14, rdi mov esi, [rdi] mov edx, [rdi+4] mov ecx, [rdi+0Ch] mov r8d, [rdi+8] mov r9d, [rdi+10h] mov eax, [rdi+14h] mov [rsp+88h+var_88], eax lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"... mov [rsp+88h+var_70], 0 xor eax, eax call _printf lea rax, [rsp+88h+var_38] mov [rax-30h], rax mov qword ptr [rax-28h], 1 xorps xmm0, xmm0 movups xmmword ptr [rax-20h], xmm0 mov dword ptr [rax-10h], 3F800000h movups xmmword ptr [rax-8], xmm0 cmp dword ptr [r14], 0 jle loc_77DAE mov rbp, [r14+20h] mov eax, [r14+4] lea r15, [rsp+88h+var_68] xor ebx, ebx loc_77D37: test eax, eax jle short loc_77D8A mov r12, rbp xor r13d, r13d loc_77D41: cmp dword ptr [r12], 0 js short loc_77D75 mov rdi, r15 mov rsi, r12 call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jnz short loc_77D75 mov rbx, [rsp+88h+var_50] lea rax, [rbx-3Eh] cmp rax, 0FFFFFFFFFFFFFFC1h jb short loc_77D8A mov rdi, r15 mov rsi, r12 call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&) mov [rax], rbx loc_77D75: inc r13 movsxd rax, dword ptr [r14+4] add r12, 4 cmp r13, rax jl short loc_77D41 mov rbx, [rsp+88h+var_50] loc_77D8A: lea rax, [rbx-3Eh] cmp rax, 0FFFFFFFFFFFFFFC1h jb short loc_77DAE mov rcx, [rsp+88h+var_70] inc ecx movsxd rax, dword ptr [r14+4] lea rbp, [rbp+rax*4+0] mov [rsp+88h+var_70], rcx cmp ecx, [r14] jl short loc_77D37 loc_77DAE: lea rdi, aSequenceLegend; "=== Sequence legend: " xor eax, eax call _printf mov rbx, [rsp+88h+var_58] test rbx, rbx jz short loc_77DE6 lea r15, aZuD; "%zu=%d, " loc_77DCD: mov rsi, [rbx+10h] mov edx, [rbx+8] mov rdi, r15 xor eax, eax call _printf mov rbx, [rbx] test rbx, rbx jnz short loc_77DCD loc_77DE6: lea rdi, aOtherSequenceI; "'+'=other sequence ids" xor eax, eax call _printf cmp dword ptr [r14], 0 jle loc_77E96 mov r15, [r14+20h] lea r12, [rsp+88h+var_68] xor ebp, ebp loc_77E09: mov eax, ebp cdq idiv [rsp+88h+var_74] test edx, edx jnz short loc_77E24 lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_77E24: cmp dword ptr [r14+4], 0 jle short loc_77E79 mov r13, r15 xor ebx, ebx loc_77E30: cmp dword ptr [r13+0], 0 js short loc_77E58 mov rdi, r12 mov rsi, r13 call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jz short loc_77E5F mov rax, [rax+10h] lea rcx, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... movsx edi, byte ptr [rax+rcx] jmp short loc_77E64 loc_77E58: mov edi, 2Eh ; '.' jmp short loc_77E64 loc_77E5F: mov edi, 2Bh ; '+' loc_77E64: call _putchar inc rbx movsxd rax, dword ptr [r14+4] add r13, 4 cmp rbx, rax jl short loc_77E30 loc_77E79: mov edi, 20h ; ' ' call _putchar inc ebp movsxd rax, dword ptr [r14+4] lea r15, [r15+rax*4] cmp ebp, [r14] jl loc_77E09 loc_77E96: lea rdi, aDoneDumping; "\n=== Done dumping" call _puts lea rdi, [rsp+88h+var_68] call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_77EBF jmp short $+2 loc_77EBF: mov rbx, rax lea rdi, [rsp+arg_18] call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
long long common_kv_cache_dump_view_seqs(long long a1, int a2) { int *v3; // rbp long long v4; // rax long long v5; // rbx int *v6; // r12 long long v7; // r13 long long *i; // rbx int *v9; // r15 int v10; // ebp int *v11; // r13 long long v12; // rbx long long v13; // rax long long v14; // rdi int v16; // [rsp+18h] [rbp-70h] _QWORD v17[2]; // [rsp+20h] [rbp-68h] BYREF __int128 v18; // [rsp+30h] [rbp-58h] int v19; // [rsp+40h] [rbp-48h] __int128 v20; // [rsp+48h] [rbp-40h] BYREF v16 = 0; printf( "=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large" "st empty slot=%d @ %d\n", *(_DWORD *)a1, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 20)); v17[0] = (char *)&v20 + 8; v17[1] = 1LL; v18 = 0LL; v19 = 1065353216; v20 = 0LL; if ( *(int *)a1 > 0 ) { v3 = *(int **)(a1 + 32); LODWORD(v4) = *(_DWORD *)(a1 + 4); v5 = 0LL; do { if ( (int)v4 > 0 ) { v6 = v3; v7 = 0LL; do { if ( *v6 >= 0 && !std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v17, v6) ) { v5 = *((_QWORD *)&v18 + 1); if ( (unsigned long long)(*((_QWORD *)&v18 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL ) goto LABEL_11; *(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[]( v17, v6) = v5; } ++v7; ++v6; } while ( v7 < *(int *)(a1 + 4) ); v5 = *((_QWORD *)&v18 + 1); } LABEL_11: if ( (unsigned long long)(v5 - 62) < 0xFFFFFFFFFFFFFFC1LL ) break; v4 = *(int *)(a1 + 4); v3 += v4; ++v16; } while ( v16 < *(_DWORD *)a1 ); } printf("=== Sequence legend: "); for ( i = (long long *)v18; i; i = (long long *)*i ) printf("%zu=%d, ", i[2], *((_DWORD *)i + 2)); printf("'+'=other sequence ids"); if ( *(int *)a1 > 0 ) { v9 = *(int **)(a1 + 32); v10 = 0; do { if ( !(v10 % a2) ) printf("\n%5d: ", v10); if ( *(int *)(a1 + 4) > 0 ) { v11 = v9; v12 = 0LL; do { if ( *v11 < 0 ) { v14 = 46LL; } else { v13 = std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v17, v11); if ( v13 ) v14 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v13 + 16)]; else v14 = 43LL; } putchar(v14); ++v12; ++v11; } while ( v12 < *(int *)(a1 + 4) ); } putchar(32LL); ++v10; v9 += *(int *)(a1 + 4); } while ( v10 < *(_DWORD *)a1 ); } puts("\n=== Done dumping"); return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v17); }
common_kv_cache_dump_view_seqs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RSP + 0x14],ESI MOV R14,RDI MOV ESI,dword ptr [RDI] MOV EDX,dword ptr [RDI + 0x4] MOV ECX,dword ptr [RDI + 0xc] MOV R8D,dword ptr [RDI + 0x8] MOV R9D,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x14] MOV dword ptr [RSP],EAX LEA RDI,[0x1ef749] MOV qword ptr [RSP + 0x18],0x0 XOR EAX,EAX CALL 0x0011a070 LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x30],RAX MOV qword ptr [RAX + -0x28],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV dword ptr [RAX + -0x10],0x3f800000 MOVUPS xmmword ptr [RAX + -0x8],XMM0 CMP dword ptr [R14],0x0 JLE 0x00177dae MOV RBP,qword ptr [R14 + 0x20] MOV EAX,dword ptr [R14 + 0x4] LEA R15,[RSP + 0x20] XOR EBX,EBX LAB_00177d37: TEST EAX,EAX JLE 0x00177d8a MOV R12,RBP XOR R13D,R13D LAB_00177d41: CMP dword ptr [R12],0x0 JS 0x00177d75 LAB_00177d48: MOV RDI,R15 MOV RSI,R12 CALL 0x001baf80 TEST RAX,RAX JNZ 0x00177d75 MOV RBX,qword ptr [RSP + 0x38] LEA RAX,[RBX + -0x3e] CMP RAX,-0x3f JC 0x00177d8a LAB_00177d67: MOV RDI,R15 MOV RSI,R12 CALL 0x001bafdc MOV qword ptr [RAX],RBX LAB_00177d75: INC R13 MOVSXD RAX,dword ptr [R14 + 0x4] ADD R12,0x4 CMP R13,RAX JL 0x00177d41 MOV RBX,qword ptr [RSP + 0x38] LAB_00177d8a: LEA RAX,[RBX + -0x3e] CMP RAX,-0x3f JC 0x00177dae MOV RCX,qword ptr [RSP + 0x18] INC ECX MOVSXD RAX,dword ptr [R14 + 0x4] LEA RBP,[RBP + RAX*0x4] MOV qword ptr [RSP + 0x18],RCX CMP ECX,dword ptr [R14] JL 0x00177d37 LAB_00177dae: LEA RDI,[0x1ef7d4] XOR EAX,EAX CALL 0x0011a070 MOV RBX,qword ptr [RSP + 0x30] TEST RBX,RBX JZ 0x00177de6 LEA R15,[0x1ef7ea] LAB_00177dcd: MOV RSI,qword ptr [RBX + 0x10] MOV EDX,dword ptr [RBX + 0x8] MOV RDI,R15 XOR EAX,EAX CALL 0x0011a070 MOV RBX,qword ptr [RBX] TEST RBX,RBX JNZ 0x00177dcd LAB_00177de6: LEA RDI,[0x1ef7f3] XOR EAX,EAX CALL 0x0011a070 CMP dword ptr [R14],0x0 JLE 0x00177e96 MOV R15,qword ptr [R14 + 0x20] LEA R12,[RSP + 0x20] XOR EBP,EBP LAB_00177e09: MOV EAX,EBP CDQ IDIV dword ptr [RSP + 0x14] TEST EDX,EDX JNZ 0x00177e24 LEA RDI,[0x1ef742] MOV ESI,EBP XOR EAX,EAX CALL 0x0011a070 LAB_00177e24: CMP dword ptr [R14 + 0x4],0x0 JLE 0x00177e79 MOV R13,R15 XOR EBX,EBX LAB_00177e30: CMP dword ptr [R13],0x0 JS 0x00177e58 LAB_00177e37: MOV RDI,R12 MOV RSI,R13 CALL 0x001baf80 LAB_00177e42: TEST RAX,RAX JZ 0x00177e5f MOV RAX,qword ptr [RAX + 0x10] LEA RCX,[0x1f1c50] MOVSX EDI,byte ptr [RAX + RCX*0x1] JMP 0x00177e64 LAB_00177e58: MOV EDI,0x2e JMP 0x00177e64 LAB_00177e5f: MOV EDI,0x2b LAB_00177e64: CALL 0x0011ac30 INC RBX MOVSXD RAX,dword ptr [R14 + 0x4] ADD R13,0x4 CMP RBX,RAX JL 0x00177e30 LAB_00177e79: MOV EDI,0x20 CALL 0x0011ac30 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R15,[R15 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x00177e09 LAB_00177e96: LEA RDI,[0x1f1bf4] CALL 0x0011ad60 LEA RDI,[RSP + 0x20] CALL 0x001b8c78 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */ void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2) { int8 *puVar1; long lVar2; long *plVar3; ulong uVar4; int iVar5; long lVar6; uint uVar7; int *piVar8; int *piVar9; long lVar10; int8 *local_68; int8 local_60; int8 *local_58; long lStack_50; int4 local_48; int8 local_40; int8 uStack_38; iVar5 = 0; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n" ,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc), (ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10), *(int4 *)(param_1 + 0x14)); local_68 = &uStack_38; local_60 = 1; local_58 = (int8 *)0x0; lStack_50 = 0; local_48 = 0x3f800000; local_40 = 0; uStack_38 = 0; if (0 < *(int *)param_1) { piVar8 = *(int **)(param_1 + 0x20); uVar4 = (ulong)*(uint *)(param_1 + 4); lVar6 = 0; do { if (0 < (int)uVar4) { lVar10 = 0; piVar9 = piVar8; do { /* try { // try from 00177d48 to 00177d52 has its CatchHandler @ 00177ebd */ if ((-1 < *piVar9) && (lVar2 = std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68,piVar9), lVar6 = lStack_50, lVar2 == 0)) { if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break; /* try { // try from 00177d67 to 00177d71 has its CatchHandler @ 00177ebb */ plVar3 = (long *)std::__detail:: _Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> ::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> *)&local_68,piVar9); *plVar3 = lVar6; } lVar10 = lVar10 + 1; piVar9 = piVar9 + 1; lVar6 = lStack_50; } while (lVar10 < *(int *)(param_1 + 4)); } if (lVar6 - 0x3eU < 0xffffffffffffffc1) break; iVar5 = iVar5 + 1; uVar4 = (ulong)*(int *)(param_1 + 4); piVar8 = piVar8 + uVar4; } while (iVar5 < *(int *)param_1); } printf("=== Sequence legend: "); for (puVar1 = local_58; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) { printf("%zu=%d, ",puVar1[2],(ulong)*(uint *)(puVar1 + 1)); } printf("\'+\'=other sequence ids"); if (0 < *(int *)param_1) { piVar8 = *(int **)(param_1 + 0x20); uVar7 = 0; do { if ((int)uVar7 % param_2 == 0) { printf("\n%5d: ",(ulong)uVar7); } if (0 < *(int *)(param_1 + 4)) { lVar6 = 0; piVar9 = piVar8; do { if (*piVar9 < 0) { iVar5 = 0x2e; } else { /* try { // try from 00177e37 to 00177e41 has its CatchHandler @ 00177ebf */ lVar10 = std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68,piVar9); if (lVar10 == 0) { iVar5 = 0x2b; } else { iVar5 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" [*(long *)(lVar10 + 0x10)]; } } putchar(iVar5); lVar6 = lVar6 + 1; piVar9 = piVar9 + 1; } while (lVar6 < *(int *)(param_1 + 4)); } putchar(0x20); uVar7 = uVar7 + 1; piVar8 = piVar8 + *(int *)(param_1 + 4); } while ((int)uVar7 < *(int *)param_1); } puts("\n=== Done dumping"); std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68); return; }
63,235
stbi__tga_test(stbi__context*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static int stbi__tga_test(stbi__context *s) { int res = 0; int sz, tga_color_type; stbi__get8(s); // discard Offset tga_color_type = stbi__get8(s); // color type if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed sz = stbi__get8(s); // image type if ( tga_color_type == 1 ) { // colormapped (paletted) image if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; stbi__skip(s,4); // skip image x and y origin } else { // "normal" image w/o colormap if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE stbi__skip(s,9); // skip colormap specification and image x/y origin } if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height sz = stbi__get8(s); // bits per pixel if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; res = 1; // if we got this far, everything's good and we can return 1 instead of 0 errorEnd: stbi__rewind(s); return res; }
O0
c
stbi__tga_test(stbi__context*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movl $0x0, 0xc(%rsp) movq 0x10(%rsp), %rdi callq 0x8ecc0 movq 0x10(%rsp), %rdi callq 0x8ecc0 movzbl %al, %eax movl %eax, 0x4(%rsp) cmpl $0x1, 0x4(%rsp) jle 0x8e148 jmp 0x8e273 movq 0x10(%rsp), %rdi callq 0x8ecc0 movzbl %al, %eax movl %eax, 0x8(%rsp) cmpl $0x1, 0x4(%rsp) jne 0x8e1cc cmpl $0x1, 0x8(%rsp) je 0x8e173 cmpl $0x9, 0x8(%rsp) je 0x8e173 jmp 0x8e273 movq 0x10(%rsp), %rdi movl $0x4, %esi callq 0x90b80 movq 0x10(%rsp), %rdi callq 0x8ecc0 movzbl %al, %eax movl %eax, 0x8(%rsp) cmpl $0x8, 0x8(%rsp) je 0x8e1bb cmpl $0xf, 0x8(%rsp) je 0x8e1bb cmpl $0x10, 0x8(%rsp) je 0x8e1bb cmpl $0x18, 0x8(%rsp) je 0x8e1bb cmpl $0x20, 0x8(%rsp) je 0x8e1bb jmp 0x8e273 movq 0x10(%rsp), %rdi movl $0x4, %esi callq 0x90b80 jmp 0x8e1fc cmpl $0x2, 0x8(%rsp) je 0x8e1ed cmpl $0x3, 0x8(%rsp) je 0x8e1ed cmpl $0xa, 0x8(%rsp) je 0x8e1ed cmpl $0xb, 0x8(%rsp) je 0x8e1ed jmp 0x8e273 movq 0x10(%rsp), %rdi movl $0x9, %esi callq 0x90b80 movq 0x10(%rsp), %rdi callq 0x92a80 cmpl $0x1, %eax jge 0x8e20d jmp 0x8e273 movq 0x10(%rsp), %rdi callq 0x92a80 cmpl $0x1, %eax jge 0x8e21e jmp 0x8e273 movq 0x10(%rsp), %rdi callq 0x8ecc0 movzbl %al, %eax movl %eax, 0x8(%rsp) cmpl $0x1, 0x4(%rsp) jne 0x8e246 cmpl $0x8, 0x8(%rsp) je 0x8e246 cmpl $0x10, 0x8(%rsp) je 0x8e246 jmp 0x8e273 cmpl $0x8, 0x8(%rsp) je 0x8e26b cmpl $0xf, 0x8(%rsp) je 0x8e26b cmpl $0x10, 0x8(%rsp) je 0x8e26b cmpl $0x18, 0x8(%rsp) je 0x8e26b cmpl $0x20, 0x8(%rsp) je 0x8e26b jmp 0x8e273 movl $0x1, 0xc(%rsp) movq 0x10(%rsp), %rdi callq 0x8ec80 movl 0xc(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZL14stbi__tga_testP13stbi__context: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_C], 0 mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+18h+var_14], eax cmp [rsp+18h+var_14], 1 jle short loc_8E148 jmp loc_8E273 loc_8E148: mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+18h+var_10], eax cmp [rsp+18h+var_14], 1 jnz short loc_8E1CC cmp [rsp+18h+var_10], 1 jz short loc_8E173 cmp [rsp+18h+var_10], 9 jz short loc_8E173 jmp loc_8E273 loc_8E173: mov rdi, [rsp+18h+var_8] mov esi, 4 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+18h+var_10], eax cmp [rsp+18h+var_10], 8 jz short loc_8E1BB cmp [rsp+18h+var_10], 0Fh jz short loc_8E1BB cmp [rsp+18h+var_10], 10h jz short loc_8E1BB cmp [rsp+18h+var_10], 18h jz short loc_8E1BB cmp [rsp+18h+var_10], 20h ; ' ' jz short loc_8E1BB jmp loc_8E273 loc_8E1BB: mov rdi, [rsp+18h+var_8] mov esi, 4 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) jmp short loc_8E1FC loc_8E1CC: cmp [rsp+18h+var_10], 2 jz short loc_8E1ED cmp [rsp+18h+var_10], 3 jz short loc_8E1ED cmp [rsp+18h+var_10], 0Ah jz short loc_8E1ED cmp [rsp+18h+var_10], 0Bh jz short loc_8E1ED jmp loc_8E273 loc_8E1ED: mov rdi, [rsp+18h+var_8] mov esi, 9 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) loc_8E1FC: mov rdi, [rsp+18h+var_8] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) cmp eax, 1 jge short loc_8E20D jmp short loc_8E273 loc_8E20D: mov rdi, [rsp+18h+var_8] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) cmp eax, 1 jge short loc_8E21E jmp short loc_8E273 loc_8E21E: mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+18h+var_10], eax cmp [rsp+18h+var_14], 1 jnz short loc_8E246 cmp [rsp+18h+var_10], 8 jz short loc_8E246 cmp [rsp+18h+var_10], 10h jz short loc_8E246 jmp short loc_8E273 loc_8E246: cmp [rsp+18h+var_10], 8 jz short loc_8E26B cmp [rsp+18h+var_10], 0Fh jz short loc_8E26B cmp [rsp+18h+var_10], 10h jz short loc_8E26B cmp [rsp+18h+var_10], 18h jz short loc_8E26B cmp [rsp+18h+var_10], 20h ; ' ' jz short loc_8E26B jmp short loc_8E273 loc_8E26B: mov [rsp+18h+var_C], 1 loc_8E273: mov rdi, [rsp+18h+var_8] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov eax, [rsp+18h+var_C] add rsp, 18h retn
long long stbi__tga_test(long long a1) { unsigned int v2; // [rsp+4h] [rbp-14h] int v3; // [rsp+8h] [rbp-10h] int v4; // [rsp+8h] [rbp-10h] int v5; // [rsp+8h] [rbp-10h] unsigned int v6; // [rsp+Ch] [rbp-Ch] v6 = 0; stbi__get8(a1); v2 = (unsigned __int8)stbi__get8(a1); if ( v2 > 1 ) goto LABEL_27; v3 = (unsigned __int8)stbi__get8(a1); if ( v2 == 1 ) { if ( v3 != 1 && v3 != 9 ) goto LABEL_27; stbi__skip(a1, 4LL); v4 = (unsigned __int8)stbi__get8(a1); if ( v4 != 8 && v4 != 15 && v4 != 16 && v4 != 24 && v4 != 32 ) goto LABEL_27; stbi__skip(a1, 4LL); } else { if ( v3 != 2 && v3 != 3 && v3 != 10 && v3 != 11 ) goto LABEL_27; stbi__skip(a1, 9LL); } if ( (int)stbi__get16le(a1) >= 1 && (int)stbi__get16le(a1) >= 1 ) { v5 = (unsigned __int8)stbi__get8(a1); if ( (v2 != 1 || v5 == 8 || v5 == 16) && (v5 == 8 || v5 == 15 || v5 == 16 || v5 == 24 || v5 == 32) ) v6 = 1; } LABEL_27: stbi__rewind(a1); return v6; }
stbi__tga_test: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV dword ptr [RSP + 0xc],0x0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0018ecc0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0018ecc0 MOVZX EAX,AL MOV dword ptr [RSP + 0x4],EAX CMP dword ptr [RSP + 0x4],0x1 JLE 0x0018e148 JMP 0x0018e273 LAB_0018e148: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0018ecc0 MOVZX EAX,AL MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x4],0x1 JNZ 0x0018e1cc CMP dword ptr [RSP + 0x8],0x1 JZ 0x0018e173 CMP dword ptr [RSP + 0x8],0x9 JZ 0x0018e173 JMP 0x0018e273 LAB_0018e173: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x4 CALL 0x00190b80 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0018ecc0 MOVZX EAX,AL MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x8],0x8 JZ 0x0018e1bb CMP dword ptr [RSP + 0x8],0xf JZ 0x0018e1bb CMP dword ptr [RSP + 0x8],0x10 JZ 0x0018e1bb CMP dword ptr [RSP + 0x8],0x18 JZ 0x0018e1bb CMP dword ptr [RSP + 0x8],0x20 JZ 0x0018e1bb JMP 0x0018e273 LAB_0018e1bb: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x4 CALL 0x00190b80 JMP 0x0018e1fc LAB_0018e1cc: CMP dword ptr [RSP + 0x8],0x2 JZ 0x0018e1ed CMP dword ptr [RSP + 0x8],0x3 JZ 0x0018e1ed CMP dword ptr [RSP + 0x8],0xa JZ 0x0018e1ed CMP dword ptr [RSP + 0x8],0xb JZ 0x0018e1ed JMP 0x0018e273 LAB_0018e1ed: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x9 CALL 0x00190b80 LAB_0018e1fc: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00192a80 CMP EAX,0x1 JGE 0x0018e20d JMP 0x0018e273 LAB_0018e20d: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00192a80 CMP EAX,0x1 JGE 0x0018e21e JMP 0x0018e273 LAB_0018e21e: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0018ecc0 MOVZX EAX,AL MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x4],0x1 JNZ 0x0018e246 CMP dword ptr [RSP + 0x8],0x8 JZ 0x0018e246 CMP dword ptr [RSP + 0x8],0x10 JZ 0x0018e246 JMP 0x0018e273 LAB_0018e246: CMP dword ptr [RSP + 0x8],0x8 JZ 0x0018e26b CMP dword ptr [RSP + 0x8],0xf JZ 0x0018e26b CMP dword ptr [RSP + 0x8],0x10 JZ 0x0018e26b CMP dword ptr [RSP + 0x8],0x18 JZ 0x0018e26b CMP dword ptr [RSP + 0x8],0x20 JZ 0x0018e26b JMP 0x0018e273 LAB_0018e26b: MOV dword ptr [RSP + 0xc],0x1 LAB_0018e273: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0018ec80 MOV EAX,dword ptr [RSP + 0xc] ADD RSP,0x18 RET
/* stbi__tga_test(stbi__context*) */ int4 stbi__tga_test(stbi__context *param_1) { byte bVar1; char cVar2; int iVar3; int4 local_c; local_c = 0; stbi__get8(param_1); bVar1 = stbi__get8(param_1); if (1 < bVar1) goto LAB_0018e273; cVar2 = stbi__get8(param_1); if (bVar1 == 1) { if ((cVar2 != '\x01') && (cVar2 != '\t')) goto LAB_0018e273; stbi__skip(param_1,4); cVar2 = stbi__get8(param_1); if (((cVar2 != '\b') && ((cVar2 != '\x0f' && (cVar2 != '\x10')))) && ((cVar2 != '\x18' && (cVar2 != ' ')))) goto LAB_0018e273; stbi__skip(param_1,4); } else { if ((((cVar2 != '\x02') && (cVar2 != '\x03')) && (cVar2 != '\n')) && (cVar2 != '\v')) goto LAB_0018e273; stbi__skip(param_1,9); } iVar3 = stbi__get16le(param_1); if ((((0 < iVar3) && (iVar3 = stbi__get16le(param_1), 0 < iVar3)) && ((cVar2 = stbi__get8(param_1), bVar1 != 1 || ((cVar2 == '\b' || (cVar2 == '\x10')))))) && ((cVar2 == '\b' || ((((cVar2 == '\x0f' || (cVar2 == '\x10')) || (cVar2 == '\x18')) || (cVar2 == ' ')))))) { local_c = 1; } LAB_0018e273: stbi__rewind(param_1); return local_c; }
63,236
blst_deserialize_p1_affine
corpus-core[P]colibri-stateless/src/util/crypto.c
bytes_t blst_deserialize_p1_affine(uint8_t* compressed_pubkeys, int num_public_keys, uint8_t* out) { blst_p1_affine* pubkeys = out ? (blst_p1_affine*) out : (blst_p1_affine*) safe_malloc(num_public_keys * sizeof(blst_p1_affine)); for (int i = 0; i < num_public_keys; i++) { if (blst_p1_deserialize(pubkeys + i, compressed_pubkeys + i * 48) != BLST_SUCCESS) { safe_free(pubkeys); return NULL_BYTES; } } return bytes((uint8_t*) pubkeys, num_public_keys * sizeof(blst_p1_affine)); }
O0
c
blst_deserialize_p1_affine: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x18(%rbp) movl %esi, -0x1c(%rbp) movq %rdx, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x1f5c4 movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x1f5d5 movslq -0x1c(%rbp), %rax imulq $0x60, %rax, %rdi callq 0x185a0 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x30(%rbp) movl $0x0, -0x34(%rbp) movl -0x34(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x1f639 movq -0x30(%rbp), %rdi movslq -0x34(%rbp), %rax imulq $0x60, %rax, %rax addq %rax, %rdi movq -0x18(%rbp), %rsi imull $0x30, -0x34(%rbp), %eax cltq addq %rax, %rsi callq 0x23f30 cmpl $0x0, %eax je 0x1f62c movq -0x30(%rbp), %rdi callq 0x18740 movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x1f64c jmp 0x1f62e movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0x1f5e4 movslq -0x1c(%rbp), %rax imulq $0x60, %rax, %rax movl %eax, -0x10(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x40, %rsp popq %rbp retq nopl (%rax)
blst_deserialize_p1_affine: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx cmp [rbp+var_28], 0 jz short loc_1F5C4 mov rax, [rbp+var_28] mov [rbp+var_40], rax jmp short loc_1F5D5 loc_1F5C4: movsxd rax, [rbp+var_1C] imul rdi, rax, 60h ; '`' call safe_malloc mov [rbp+var_40], rax loc_1F5D5: mov rax, [rbp+var_40] mov [rbp+var_30], rax mov [rbp+var_34], 0 loc_1F5E4: mov eax, [rbp+var_34] cmp eax, [rbp+var_1C] jge short loc_1F639 mov rdi, [rbp+var_30] movsxd rax, [rbp+var_34] imul rax, 60h ; '`' add rdi, rax mov rsi, [rbp+var_18] imul eax, [rbp+var_34], 30h ; '0' cdqe add rsi, rax call blst_p1_deserialize cmp eax, 0 jz short loc_1F62C mov rdi, [rbp+var_30] call safe_free mov [rbp+var_10], 0 mov [rbp+var_8], 0 jmp short loc_1F64C loc_1F62C: jmp short $+2 loc_1F62E: mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp short loc_1F5E4 loc_1F639: movsxd rax, [rbp+var_1C] imul rax, 60h ; '`' mov [rbp+var_10], eax mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_1F64C: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 40h pop rbp retn
long long blst_deserialize_p1_affine(long long a1, int a2, long long a3) { long long v4; // [rsp+0h] [rbp-40h] int i; // [rsp+Ch] [rbp-34h] if ( a3 ) v4 = a3; else v4 = safe_malloc(96LL * a2); for ( i = 0; i < a2; ++i ) { if ( (unsigned int)blst_p1_deserialize(96LL * i + v4, 48 * i + a1) ) { safe_free(v4); return 0; } } return (unsigned int)(96 * a2); }
blst_deserialize_p1_affine: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX CMP qword ptr [RBP + -0x28],0x0 JZ 0x0011f5c4 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX JMP 0x0011f5d5 LAB_0011f5c4: MOVSXD RAX,dword ptr [RBP + -0x1c] IMUL RDI,RAX,0x60 CALL 0x001185a0 MOV qword ptr [RBP + -0x40],RAX LAB_0011f5d5: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x34],0x0 LAB_0011f5e4: MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x1c] JGE 0x0011f639 MOV RDI,qword ptr [RBP + -0x30] MOVSXD RAX,dword ptr [RBP + -0x34] IMUL RAX,RAX,0x60 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x18] IMUL EAX,dword ptr [RBP + -0x34],0x30 CDQE ADD RSI,RAX CALL 0x00123f30 CMP EAX,0x0 JZ 0x0011f62c MOV RDI,qword ptr [RBP + -0x30] CALL 0x00118740 MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011f64c LAB_0011f62c: JMP 0x0011f62e LAB_0011f62e: MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x0011f5e4 LAB_0011f639: MOVSXD RAX,dword ptr [RBP + -0x1c] IMUL RAX,RAX,0x60 MOV dword ptr [RBP + -0x10],EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0011f64c: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int1 [16] blst_deserialize_p1_affine(long param_1,int param_2,long param_3) { int iVar1; int1 auVar2 [16]; int8 local_48; int4 local_3c; int4 local_18; int8 local_10; local_48 = param_3; if (param_3 == 0) { local_48 = safe_malloc((long)param_2 * 0x60); } local_3c = 0; do { if (param_2 <= local_3c) { local_18 = param_2 * 0x60; local_10 = local_48; LAB_0011f64c: auVar2._4_4_ = 0; auVar2._0_4_ = local_18; auVar2._8_8_ = local_10; return auVar2; } iVar1 = blst_p1_deserialize(local_48 + (long)local_3c * 0x60,param_1 + local_3c * 0x30); if (iVar1 != 0) { safe_free(local_48); local_18 = 0; local_10 = 0; goto LAB_0011f64c; } local_3c = local_3c + 1; } while( true ); }
63,237
blst_deserialize_p1_affine
corpus-core[P]colibri-stateless/src/util/crypto.c
bytes_t blst_deserialize_p1_affine(uint8_t* compressed_pubkeys, int num_public_keys, uint8_t* out) { blst_p1_affine* pubkeys = out ? (blst_p1_affine*) out : (blst_p1_affine*) safe_malloc(num_public_keys * sizeof(blst_p1_affine)); for (int i = 0; i < num_public_keys; i++) { if (blst_p1_deserialize(pubkeys + i, compressed_pubkeys + i * 48) != BLST_SUCCESS) { safe_free(pubkeys); return NULL_BYTES; } } return bytes((uint8_t*) pubkeys, num_public_keys * sizeof(blst_p1_affine)); }
O1
c
blst_deserialize_p1_affine: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movl %esi, %ebx movq %rdi, %r15 testq %rdx, %rdx jne 0x16b77 movslq %ebx, %rax shlq $0x5, %rax leaq (%rax,%rax,2), %rdi callq 0x12838 movq %rax, %r14 testl %ebx, %ebx setg %bpl jle 0x16bd2 movq %r14, %rdi movq %r15, %rsi callq 0x19aec testl %eax, %eax jne 0x16bc7 movl %ebx, %r13d leaq 0x60(%r14), %r12 addq $0x30, %r15 movl $0x1, %ebp cmpq %rbp, %r13 je 0x16bf2 movq %r12, %rdi movq %r15, %rsi callq 0x19aec incq %rbp addq $0x60, %r12 addq $0x30, %r15 testl %eax, %eax je 0x16b9e decq %rbp cmpq %r13, %rbp setb %bpl movq %r14, %rdi callq 0x128b8 xorl %r14d, %r14d shll $0x5, %ebx leal (%rbx,%rbx,2), %ecx xorl %eax, %eax testb %bpl, %bpl cmovel %ecx, %eax movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq seta %bpl jmp 0x16bd2
blst_deserialize_p1_affine: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov ebx, esi mov r15, rdi test rdx, rdx jnz short loc_16B77 movsxd rax, ebx shl rax, 5 lea rdi, [rax+rax*2] call safe_malloc mov r14, rax loc_16B77: test ebx, ebx setnle bpl jle short loc_16BD2 mov rdi, r14 mov rsi, r15 call blst_p1_deserialize test eax, eax jnz short loc_16BC7 mov r13d, ebx lea r12, [r14+60h] add r15, 30h ; '0' mov ebp, 1 loc_16B9E: cmp r13, rbp jz short loc_16BF2 mov rdi, r12 mov rsi, r15 call blst_p1_deserialize inc rbp add r12, 60h ; '`' add r15, 30h ; '0' test eax, eax jz short loc_16B9E dec rbp cmp rbp, r13 setb bpl loc_16BC7: mov rdi, r14 call safe_free xor r14d, r14d loc_16BD2: shl ebx, 5 lea ecx, [rbx+rbx*2] xor eax, eax test bpl, bpl cmovz eax, ecx mov rdx, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_16BF2: setnbe bpl jmp short loc_16BD2
long long blst_deserialize_p1_affine(long long a1, int a2, long long a3) { long long v3; // r14 bool v4; // bp long long v5; // r12 long long v6; // r15 unsigned long long v7; // rbp int v8; // eax long long result; // rax v3 = a3; if ( !a3 ) v3 = safe_malloc(96LL * a2); v4 = a2 > 0; if ( a2 > 0 ) { if ( (unsigned int)blst_p1_deserialize(v3, a1) ) { LABEL_9: safe_free(v3); } else { v5 = v3 + 96; v6 = a1 + 48; v7 = 1LL; while ( a2 != v7 ) { v8 = blst_p1_deserialize(v5, v6); ++v7; v5 += 96LL; v6 += 48LL; if ( v8 ) { v4 = v7 - 1 < (unsigned int)a2; goto LABEL_9; } } v4 = (unsigned int)a2 > v7; } } result = 0LL; if ( !v4 ) return (unsigned int)(96 * a2); return result; }
blst_deserialize_p1_affine: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV EBX,ESI MOV R15,RDI TEST RDX,RDX JNZ 0x00116b77 MOVSXD RAX,EBX SHL RAX,0x5 LEA RDI,[RAX + RAX*0x2] CALL 0x00112838 MOV R14,RAX LAB_00116b77: TEST EBX,EBX SETG BPL JLE 0x00116bd2 MOV RDI,R14 MOV RSI,R15 CALL 0x00119aec TEST EAX,EAX JNZ 0x00116bc7 MOV R13D,EBX LEA R12,[R14 + 0x60] ADD R15,0x30 MOV EBP,0x1 LAB_00116b9e: CMP R13,RBP JZ 0x00116bf2 MOV RDI,R12 MOV RSI,R15 CALL 0x00119aec INC RBP ADD R12,0x60 ADD R15,0x30 TEST EAX,EAX JZ 0x00116b9e DEC RBP CMP RBP,R13 SETC BPL LAB_00116bc7: MOV RDI,R14 CALL 0x001128b8 XOR R14D,R14D LAB_00116bd2: SHL EBX,0x5 LEA ECX,[RBX + RBX*0x2] XOR EAX,EAX TEST BPL,BPL CMOVZ EAX,ECX MOV RDX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00116bf2: SETA BPL JMP 0x00116bd2
int1 [16] blst_deserialize_p1_affine(long param_1,uint param_2,void *param_3) { int iVar1; ulong uVar2; ulong uVar3; void *pvVar4; ulong uVar5; bool bVar6; int1 auVar7 [16]; if (param_3 == (void *)0x0) { param_3 = (void *)safe_malloc((long)(int)param_2 * 0x60); } bVar6 = 0 < (int)param_2; if (0 < (int)param_2) { iVar1 = blst_p1_deserialize(param_3,param_1); if (iVar1 == 0) { uVar5 = (ulong)param_2; param_1 = param_1 + 0x30; uVar2 = 1; pvVar4 = param_3; do { uVar3 = uVar2; pvVar4 = (void *)((long)pvVar4 + 0x60); if (uVar5 == uVar3) { bVar6 = uVar3 < uVar5; goto LAB_00116bd2; } iVar1 = blst_p1_deserialize(pvVar4,param_1); param_1 = param_1 + 0x30; uVar2 = uVar3 + 1; } while (iVar1 == 0); bVar6 = uVar3 < uVar5; } safe_free(param_3); param_3 = (void *)0x0; } LAB_00116bd2: uVar2 = 0; if (!bVar6) { uVar2 = (ulong)(param_2 * 0x60); } auVar7._8_8_ = param_3; auVar7._0_8_ = uVar2; return auVar7; }
63,238
c4_state_get_pending_request
corpus-core[P]colibri-stateless/src/util/state.c
data_request_t* c4_state_get_pending_request(c4_state_t* state) { data_request_t* data_request = state->requests; while (data_request) { if (c4_state_is_pending(data_request)) return data_request; data_request = data_request->next; } return NULL; }
O0
c
c4_state_get_pending_request: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xa79a5 movq -0x18(%rbp), %rdi callq 0xa7880 testb $0x1, %al jne 0xa798d jmp 0xa7997 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xa79ad movq -0x18(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x18(%rbp) jmp 0xa7977 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
c4_state_get_pending_request: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax loc_A7977: cmp [rbp+var_18], 0 jz short loc_A79A5 mov rdi, [rbp+var_18] call c4_state_is_pending test al, 1 jnz short loc_A798D jmp short loc_A7997 loc_A798D: mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_A79AD loc_A7997: mov rax, [rbp+var_18] mov rax, [rax+50h] mov [rbp+var_18], rax jmp short loc_A7977 loc_A79A5: mov [rbp+var_8], 0 loc_A79AD: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long c4_state_get_pending_request(long long *a1) { long long i; // [rsp+8h] [rbp-18h] for ( i = *a1; i; i = *(_QWORD *)(i + 80) ) { if ( (c4_state_is_pending(i) & 1) != 0 ) return i; } return 0LL; }
c4_state_get_pending_request: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_001a7977: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001a79a5 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001a7880 TEST AL,0x1 JNZ 0x001a798d JMP 0x001a7997 LAB_001a798d: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a79ad LAB_001a7997: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x18],RAX JMP 0x001a7977 LAB_001a79a5: MOV qword ptr [RBP + -0x8],0x0 LAB_001a79ad: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long c4_state_get_pending_request(long *param_1) { ulong uVar1; long local_20; local_20 = *param_1; while( true ) { if (local_20 == 0) { return 0; } uVar1 = c4_state_is_pending(local_20); if ((uVar1 & 1) != 0) break; local_20 = *(long *)(local_20 + 0x50); } return local_20; }
63,239
File::CreateTempDir[abi:cxx11]()
Dolphin-anty/Source/Core/Common/FileUtil.cpp
std::string CreateTempDir() { #ifdef _WIN32 TCHAR temp[MAX_PATH]; if (!GetTempPath(MAX_PATH, temp)) return ""; GUID guid; if (FAILED(CoCreateGuid(&guid))) { return ""; } OLECHAR tguid[40]{}; if (!StringFromGUID2(guid, tguid, _countof(tguid))) { return ""; } std::string dir = TStrToUTF8(temp) + "/" + TStrToUTF8(tguid); if (!CreateDir(dir)) return ""; dir = ReplaceAll(dir, "\\", DIR_SEP); return dir; #else const char* base = getenv("TMPDIR") ?: "/tmp"; std::string path = std::string(base) + "/DolphinWii.XXXXXX"; if (!mkdtemp(&path[0])) return ""; return path; #endif }
O0
cpp
File::CreateTempDir[abi:cxx11](): subq $0x88, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0x80(%rsp) leaq 0x5b3c1(%rip), %rdi # 0xa0184 callq 0x94f0 movq %rax, 0x28(%rsp) cmpq $0x0, %rax je 0x44ddf movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) jmp 0x44ded leaq 0x5b3a5(%rip), %rax # 0xa018b movq %rax, 0x10(%rsp) jmp 0x44ded movq 0x10(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x37(%rsp), %rdi callq 0x9220 movq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdi leaq 0x37(%rsp), %rdx callq 0x12a40 leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rsi leaq 0x5b360(%rip), %rdx # 0xa0190 callq 0x47ad0 leaq 0x38(%rsp), %rdi callq 0x12a10 leaq 0x37(%rsp), %rdi callq 0x9d60 leaq 0x58(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x2bb30 movq %rax, %rdi callq 0x9ad0 cmpq $0x0, %rax jne 0x44e99 leaq 0x36(%rsp), %rdi callq 0x9220 movq 0x18(%rsp), %rdi leaq 0x5a912(%rip), %rsi # 0x9f78d leaq 0x36(%rsp), %rdx callq 0x12a40 leaq 0x36(%rsp), %rdi callq 0x9d60 movl $0x1, 0x30(%rsp) jmp 0x44eb0 movq 0x18(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x19d30 movl $0x1, 0x30(%rsp) leaq 0x58(%rsp), %rdi callq 0x12a10 movq 0x20(%rsp), %rax addq $0x88, %rsp retq nopw (%rax,%rax)
_ZN4File13CreateTempDirB5cxx11Ev: sub rsp, 88h mov [rsp+88h+var_70], rdi mov rax, rdi mov [rsp+88h+var_68], rax mov [rsp+88h+var_8], rdi lea rdi, aTmpdir; "TMPDIR" call _getenv mov [rsp+88h+var_60], rax cmp rax, 0 jz short loc_44DDF mov rax, [rsp+88h+var_60] mov [rsp+88h+var_78], rax jmp short loc_44DED loc_44DDF: lea rax, aTmp; "/tmp" mov [rsp+88h+var_78], rax jmp short $+2 loc_44DED: mov rax, [rsp+88h+var_78] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_10] mov [rsp+88h+var_80], rax lea rdi, [rsp+88h+var_51] call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+88h+var_80] lea rdi, [rsp+88h+var_50] lea rdx, [rsp+88h+var_51] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+88h+var_30] lea rsi, [rsp+88h+var_50] lea rdx, aDolphinwiiXxxx; "/DolphinWii.XXXXXX" call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+88h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+88h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+88h+var_30] xor eax, eax mov esi, eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov rdi, rax call _mkdtemp cmp rax, 0 jnz short loc_44E99 lea rdi, [rsp+88h+var_52] call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+88h+var_70] lea rsi, asc_9F789+4; "" lea rdx, [rsp+88h+var_52] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+88h+var_52] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rsp+88h+var_58], 1 jmp short loc_44EB0 loc_44E99: mov rdi, [rsp+88h+var_70] lea rsi, [rsp+88h+var_30] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_; std::string::basic_string(std::string&&) mov [rsp+88h+var_58], 1 loc_44EB0: lea rdi, [rsp+88h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rsp+88h+var_68] add rsp, 88h retn
_QWORD * File::CreateTempDir[abi:cxx11](_QWORD *a1) { long long v1; // rax const char *v3; // [rsp+10h] [rbp-78h] long long v4; // [rsp+28h] [rbp-60h] char v5; // [rsp+36h] [rbp-52h] BYREF char v6; // [rsp+37h] [rbp-51h] BYREF _BYTE v7[32]; // [rsp+38h] [rbp-50h] BYREF _QWORD v8[6]; // [rsp+58h] [rbp-30h] BYREF v8[5] = a1; v4 = getenv("TMPDIR"); if ( v4 ) v3 = (const char *)v4; else v3 = "/tmp"; v8[4] = v3; std::allocator<char>::allocator(&v6); std::string::basic_string<std::allocator<char>>((long long)v7, (long long)v3, (long long)&v6); std::operator+<char>(v8, v7, "/DolphinWii.XXXXXX"); std::string::~string(v7); std::allocator<char>::~allocator(&v6); v1 = std::string::operator[]((long long)v8, 0LL); if ( mkdtemp(v1) ) { std::string::basic_string(a1, v8); } else { std::allocator<char>::allocator(&v5); std::string::basic_string<std::allocator<char>>((long long)a1, (long long)"", (long long)&v5); std::allocator<char>::~allocator(&v5); } std::string::~string(v8); return a1; }
CreateTempDir[abi:cxx11]: SUB RSP,0x88 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x80],RDI LEA RDI,[0x1a0184] CALL 0x001094f0 MOV qword ptr [RSP + 0x28],RAX CMP RAX,0x0 JZ 0x00144ddf MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX JMP 0x00144ded LAB_00144ddf: LEA RAX,[0x1a018b] MOV qword ptr [RSP + 0x10],RAX JMP 0x00144ded LAB_00144ded: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x37] CALL 0x00109220 MOV RSI,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x38] LEA RDX,[RSP + 0x37] CALL 0x00112a40 LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x38] LEA RDX,[0x1a0190] CALL 0x00147ad0 LEA RDI,[RSP + 0x38] CALL 0x00112a10 LEA RDI,[RSP + 0x37] CALL 0x00109d60 LEA RDI,[RSP + 0x58] XOR EAX,EAX MOV ESI,EAX CALL 0x0012bb30 MOV RDI,RAX CALL 0x00109ad0 CMP RAX,0x0 JNZ 0x00144e99 LEA RDI,[RSP + 0x36] CALL 0x00109220 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x19f78d] LEA RDX,[RSP + 0x36] CALL 0x00112a40 LEA RDI,[RSP + 0x36] CALL 0x00109d60 MOV dword ptr [RSP + 0x30],0x1 JMP 0x00144eb0 LAB_00144e99: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x58] CALL 0x00119d30 MOV dword ptr [RSP + 0x30],0x1 LAB_00144eb0: LEA RDI,[RSP + 0x58] CALL 0x00112a10 MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x88 RET
/* File::CreateTempDir[abi:cxx11]() */ File * __thiscall File::CreateTempDir_abi_cxx11_(File *this) { char *pcVar1; char *local_78; allocator local_52; allocator local_51; string local_50 [32]; string local_30 [32]; char *local_10; File *local_8; local_8 = this; local_78 = getenv("TMPDIR"); if (local_78 == (char *)0x0) { local_78 = "/tmp"; } local_10 = local_78; std::allocator<char>::allocator(); std::__cxx11::string::string<std::allocator<char>>(local_50,local_78,&local_51); std::operator+(local_30,(char *)local_50); std::__cxx11::string::~string(local_50); std::allocator<char>::~allocator((allocator<char> *)&local_51); pcVar1 = (char *)std::__cxx11::string::operator[](local_30,0); pcVar1 = mkdtemp(pcVar1); if (pcVar1 == (char *)0x0) { std::allocator<char>::allocator(); std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_52); std::allocator<char>::~allocator((allocator<char> *)&local_52); } else { std::__cxx11::string::string((string *)this,local_30); } std::__cxx11::string::~string(local_30); return this; }
63,240
ma_alloc_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void * ma_alloc_root(MA_MEM_ROOT *mem_root, size_t Size) { #if defined(HAVE_purify) && defined(EXTRA_DEBUG) reg1 MA_USED_MEM *next; Size+=ALIGN_SIZE(sizeof(MA_USED_MEM)); if (!(next = (MA_USED_MEM*) malloc(Size))) { if (mem_root->error_handler) (*mem_root->error_handler)(); return((void *) 0); /* purecov: inspected */ } next->next=mem_root->used; mem_root->used=next; return (void *) (((char*) next)+ALIGN_SIZE(sizeof(MA_USED_MEM))); #else size_t get_size; void * point; reg1 MA_USED_MEM *next= 0; reg2 MA_USED_MEM **prev; Size= ALIGN_SIZE(Size); if ((*(prev= &mem_root->free))) { if ((*prev)->left < Size && mem_root->first_block_usage++ >= 16 && (*prev)->left < 4096) { next= *prev; *prev= next->next; next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev; next && next->left < Size; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= MAX(Size+ALIGN_SIZE(sizeof(MA_USED_MEM)), (mem_root->block_size & ~1) * (mem_root->block_num >> 2)); if (!(next = (MA_USED_MEM*) malloc(get_size))) { if (mem_root->error_handler) (*mem_root->error_handler)(); return((void *) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(MA_USED_MEM)); *prev=next; } point= (void *) ((char*) next+ (next->size-next->left)); if ((next->left-= Size) < mem_root->min_malloc) { /* Full block */ *prev=next->next; /* Remove block from list */ next->next=mem_root->used; mem_root->used=next; mem_root->first_block_usage= 0; } return(point); #endif }
O3
c
ma_alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx addq $0x7, %r14 andq $-0x8, %r14 movq (%rdi), %rax movq %rdi, %r12 testq %rax, %rax je 0x419d1 cmpq %r14, 0x8(%rax) jae 0x419b8 movl 0x2c(%rbx), %ecx leal 0x1(%rcx), %edx movl %edx, 0x2c(%rbx) cmpl $0x10, %ecx jb 0x419b8 cmpq $0xfff, 0x8(%rax) # imm = 0xFFF ja 0x419b8 movq (%rax), %rcx movq %rcx, (%rbx) movq 0x8(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) movq %rbx, %rax movq %rax, %r12 movq (%rax), %rax testq %rax, %rax je 0x419d1 movq 0x8(%rax), %rdx cmpq %r14, %rdx jb 0x419bb jmp 0x41a22 leaq 0x18(%r14), %rax movq 0x20(%rbx), %rcx andq $-0x2, %rcx movl 0x28(%rbx), %r13d movl %r13d, %r15d shrl $0x2, %r15d imulq %rcx, %r15 cmpq %r15, %rax cmovaq %rax, %r15 movq %r15, %rdi callq 0x36950 testq %rax, %rax je 0x41a54 incl %r13d movl %r13d, 0x28(%rbx) movq (%r12), %rcx movq %rcx, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r12) movq 0x8(%rax), %rdx movq 0x10(%rax), %rcx subq %rdx, %rcx addq %rax, %rcx subq %r14, %rdx movq %rdx, 0x8(%rax) cmpq 0x18(%rbx), %rdx jae 0x41a61 movq (%rax), %rdx movq %rdx, (%r12) movq 0x8(%rbx), %rdx movq %rdx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) jmp 0x41a61 movq 0x30(%rbx), %rax testq %rax, %rax je 0x41a5f callq *%rax xorl %ecx, %ecx movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_alloc_root: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h mov rax, [rdi] mov r12, rdi test rax, rax jz short loc_419D1 cmp [rax+8], r14 jnb short loc_419B8 mov ecx, [rbx+2Ch] lea edx, [rcx+1] mov [rbx+2Ch], edx cmp ecx, 10h jb short loc_419B8 cmp qword ptr [rax+8], 0FFFh ja short loc_419B8 mov rcx, [rax] mov [rbx], rcx mov rcx, [rbx+8] mov [rax], rcx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 loc_419B8: mov rax, rbx loc_419BB: mov r12, rax mov rax, [rax] test rax, rax jz short loc_419D1 mov rdx, [rax+8] cmp rdx, r14 jb short loc_419BB jmp short loc_41A22 loc_419D1: lea rax, [r14+18h] mov rcx, [rbx+20h] and rcx, 0FFFFFFFFFFFFFFFEh mov r13d, [rbx+28h] mov r15d, r13d shr r15d, 2 imul r15, rcx cmp rax, r15 cmova r15, rax mov rdi, r15 call _malloc test rax, rax jz short loc_41A54 inc r13d mov [rbx+28h], r13d mov rcx, [r12] mov [rax], rcx mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r12], rax mov rdx, [rax+8] loc_41A22: mov rcx, [rax+10h] sub rcx, rdx add rcx, rax sub rdx, r14 mov [rax+8], rdx cmp rdx, [rbx+18h] jnb short loc_41A61 mov rdx, [rax] mov [r12], rdx mov rdx, [rbx+8] mov [rax], rdx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 jmp short loc_41A61 loc_41A54: mov rax, [rbx+30h] test rax, rax jz short loc_41A5F call rax loc_41A5F: xor ecx, ecx loc_41A61: mov rax, rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char * ma_alloc_root(long long a1, long long a2) { unsigned long long v2; // r14 _QWORD *v3; // rax _QWORD *v4; // r12 unsigned int v5; // ecx _QWORD *v6; // rax unsigned long long v7; // rdx unsigned int v8; // r13d unsigned long long v9; // r15 char *v10; // rcx unsigned long long v11; // rdx void ( *v12)(unsigned long long); // rax v2 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = *(_QWORD **)a1; v4 = (_QWORD *)a1; if ( *(_QWORD *)a1 ) { if ( v3[1] < v2 ) { v5 = *(_DWORD *)(a1 + 44); *(_DWORD *)(a1 + 44) = v5 + 1; if ( v5 >= 0x10 && v3[1] <= 0xFFFuLL ) { *(_QWORD *)a1 = *v3; *v3 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v3; *(_DWORD *)(a1 + 44) = 0; } } v6 = (_QWORD *)a1; while ( 1 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( !v6 ) break; v7 = v6[1]; if ( v7 >= v2 ) goto LABEL_14; } } v8 = *(_DWORD *)(a1 + 40); v9 = (*(_QWORD *)(a1 + 32) & 0xFFFFFFFFFFFFFFFELL) * (v8 >> 2); if ( v2 + 24 > v9 ) v9 = v2 + 24; v6 = (_QWORD *)malloc(v9); if ( v6 ) { *(_DWORD *)(a1 + 40) = v8 + 1; *v6 = *v4; v6[2] = v9; v6[1] = v9 - 24; *v4 = v6; v7 = v6[1]; LABEL_14: v10 = (char *)v6 + v6[2] - v7; v11 = v7 - v2; v6[1] = v11; if ( v11 < *(_QWORD *)(a1 + 24) ) { *v4 = *v6; *v6 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 44) = 0; } } else { v12 = *(void ( **)(unsigned long long))(a1 + 48); if ( v12 ) v12(v9); return 0LL; } return v10; }
ma_alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI ADD R14,0x7 AND R14,-0x8 MOV RAX,qword ptr [RDI] MOV R12,RDI TEST RAX,RAX JZ 0x001419d1 CMP qword ptr [RAX + 0x8],R14 JNC 0x001419b8 MOV ECX,dword ptr [RBX + 0x2c] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x2c],EDX CMP ECX,0x10 JC 0x001419b8 CMP qword ptr [RAX + 0x8],0xfff JA 0x001419b8 MOV RCX,qword ptr [RAX] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 LAB_001419b8: MOV RAX,RBX LAB_001419bb: MOV R12,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001419d1 MOV RDX,qword ptr [RAX + 0x8] CMP RDX,R14 JC 0x001419bb JMP 0x00141a22 LAB_001419d1: LEA RAX,[R14 + 0x18] MOV RCX,qword ptr [RBX + 0x20] AND RCX,-0x2 MOV R13D,dword ptr [RBX + 0x28] MOV R15D,R13D SHR R15D,0x2 IMUL R15,RCX CMP RAX,R15 CMOVA R15,RAX MOV RDI,R15 CALL 0x00136950 TEST RAX,RAX JZ 0x00141a54 INC R13D MOV dword ptr [RBX + 0x28],R13D MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R12],RAX MOV RDX,qword ptr [RAX + 0x8] LAB_00141a22: MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX ADD RCX,RAX SUB RDX,R14 MOV qword ptr [RAX + 0x8],RDX CMP RDX,qword ptr [RBX + 0x18] JNC 0x00141a61 MOV RDX,qword ptr [RAX] MOV qword ptr [R12],RDX MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RDX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 JMP 0x00141a61 LAB_00141a54: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x00141a5f CALL RAX LAB_00141a5f: XOR ECX,ECX LAB_00141a61: MOV RAX,RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_alloc_root(long *param_1,long param_2) { uint uVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; ulong uVar6; ulong uVar7; uVar6 = param_2 + 7U & 0xfffffffffffffff8; plVar2 = (long *)*param_1; plVar5 = param_1; if (plVar2 == (long *)0x0) { LAB_001419d1: uVar1 = *(uint *)(param_1 + 5); uVar7 = (ulong)(uVar1 >> 2) * (param_1[4] & 0xfffffffffffffffeU); if (uVar7 < uVar6 + 0x18) { uVar7 = uVar6 + 0x18; } plVar4 = (long *)malloc(uVar7); if (plVar4 == (long *)0x0) { if ((code *)param_1[6] != (code *)0x0) { (*(code *)param_1[6])(); } return 0; } *(uint *)(param_1 + 5) = uVar1 + 1; *plVar4 = *plVar5; plVar4[2] = uVar7; plVar4[1] = uVar7 - 0x18; *plVar5 = (long)plVar4; uVar7 = plVar4[1]; } else { plVar4 = param_1; if ((((ulong)plVar2[1] < uVar6) && (uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1, 0xf < uVar1)) && ((ulong)plVar2[1] < 0x1000)) { *param_1 = *plVar2; *plVar2 = param_1[1]; param_1[1] = (long)plVar2; *(int4 *)((long)param_1 + 0x2c) = 0; } do { plVar5 = plVar4; plVar4 = (long *)*plVar5; if (plVar4 == (long *)0x0) goto LAB_001419d1; uVar7 = plVar4[1]; } while (uVar7 < uVar6); } lVar3 = plVar4[2]; plVar4[1] = uVar7 - uVar6; if (uVar7 - uVar6 < (ulong)param_1[3]) { *plVar5 = *plVar4; *plVar4 = param_1[1]; param_1[1] = (long)plVar4; *(int4 *)((long)param_1 + 0x2c) = 0; } return (lVar3 - uVar7) + (long)plVar4; }
63,241
read_next_extent
eloqsql/storage/maria/ma_blockrec.c
static uchar *read_next_extent(MARIA_HA *info, MARIA_EXTENT_CURSOR *extent, uchar **end_of_data) { MARIA_SHARE *share= info->s; uchar *buff, *data; MARIA_PINNED_PAGE page_link; enum pagecache_page_lock lock; DBUG_ENTER("read_next_extent"); if (!extent->page_count) { uint page_count; if (!--extent->extent_count) goto crashed; extent->extent+= ROW_EXTENT_SIZE; extent->page= page_korr(extent->extent); page_count= (uint2korr(extent->extent+ROW_EXTENT_PAGE_SIZE) & ~START_EXTENT_BIT); if (!page_count) goto crashed; extent->tail= page_count & TAIL_BIT; if (extent->tail) extent->tail_row_nr= page_count & ~TAIL_BIT; else extent->page_count= page_count; DBUG_PRINT("info",("New extent. Page: %lu page_count: %u tail_flag: %d", (ulong) extent->page, extent->page_count, extent->tail != 0)); } extent->first_extent= 0; lock= PAGECACHE_LOCK_LEFT_UNLOCKED; if (extent->tail) lock= extent->lock_for_tail_pages; buff= pagecache_read(share->pagecache, &info->dfile, extent->page, 0, info->buff, share->page_type, lock, &page_link.link); if (lock != PAGECACHE_LOCK_LEFT_UNLOCKED) { /* Read during UNDO */ page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; page_link.changed= buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); } if (!buff) { /* check if we tried to read over end of file (ie: bad data in record) */ if ((extent->page + 1) * share->block_size > share->state.state.data_file_length) goto crashed; DBUG_RETURN(0); } if (!extent->tail) { /* Full data page */ if ((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != BLOB_PAGE) goto crashed; extent->page++; /* point to next page */ extent->page_count--; *end_of_data= buff + share->block_size - PAGE_SUFFIX_SIZE; info->cur_row.full_page_count++; /* For maria_chk */ DBUG_RETURN(extent->data_start= buff + FULL_PAGE_HEADER_SIZE(share)); } /* Found tail */ if ((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != TAIL_PAGE) goto crashed; *(extent->tail_positions++)= ma_recordpos(extent->page, extent->tail_row_nr); info->cur_row.tail_count++; /* For maria_chk */ if (!(data= get_record_position(share, buff, extent->tail_row_nr, end_of_data))) goto crashed; extent->data_start= data; extent->page_count= 0; /* No more data in extent */ DBUG_RETURN(data); crashed: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_PRINT("error", ("wrong extent information")); DBUG_RETURN(0); }
O0
c
read_next_extent: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x20(%rax) jne 0x54a63 movq -0x18(%rbp), %rcx movl 0x28(%rcx), %eax addl $-0x1, %eax movl %eax, 0x28(%rcx) cmpl $0x0, %eax jne 0x549e4 jmp 0x54c76 movq -0x18(%rbp), %rax movq (%rax), %rcx addq $0x7, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movq (%rax), %rdi callq 0x56790 movq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax movq (%rax), %rax movzwl 0x5(%rax), %eax andl $0xffffbfff, %eax # imm = 0xFFFFBFFF movl %eax, -0x58(%rbp) cmpl $0x0, -0x58(%rbp) jne 0x54a27 jmp 0x54c76 movl -0x58(%rbp), %ecx andl $0x8000, %ecx # imm = 0x8000 movq -0x18(%rbp), %rax movl %ecx, 0x2c(%rax) movq -0x18(%rbp), %rax cmpl $0x0, 0x2c(%rax) je 0x54a53 movl -0x58(%rbp), %ecx andl $0xffff7fff, %ecx # imm = 0xFFFF7FFF movq -0x18(%rbp), %rax movl %ecx, 0x30(%rax) jmp 0x54a5d movl -0x58(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x20(%rax) jmp 0x54a5f jmp 0x54a61 jmp 0x54a63 movq -0x18(%rbp), %rax movb $0x0, 0x34(%rax) movl $0x0, -0x54(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x2c(%rax) je 0x54a86 movq -0x18(%rbp), %rax movl 0x24(%rax), %eax movl %eax, -0x54(%rbp) movq -0x28(%rbp), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x18(%rbp), %rax movq 0x18(%rax), %rdx movq -0x10(%rbp), %rax movq 0x378(%rax), %r8 movq -0x28(%rbp), %rax movl 0x7d4(%rax), %r9d movl -0x54(%rbp), %r10d leaq -0x50(%rbp), %rax xorl %ecx, %ecx movl %r10d, (%rsp) movq %rax, 0x8(%rsp) callq 0x96df0 movq %rax, -0x30(%rbp) cmpl $0x0, -0x54(%rbp) je 0x54b07 movl $0x6, -0x48(%rbp) cmpq $0x0, -0x30(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x40(%rbp) movq -0x10(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x50(%rbp), %rsi callq 0xdd8b0 cmpq $0x0, -0x30(%rbp) jne 0x54b46 movq -0x18(%rbp), %rax movq 0x18(%rax), %rax addq $0x1, %rax movq -0x28(%rbp), %rcx movl 0x7bc(%rcx), %ecx imulq %rcx, %rax movq -0x28(%rbp), %rcx cmpq 0x40(%rcx), %rax jbe 0x54b37 jmp 0x54c76 jmp 0x54b39 movq $0x0, -0x8(%rbp) jmp 0x54c94 movq -0x18(%rbp), %rax cmpl $0x0, 0x2c(%rax) jne 0x54bdc movq -0x30(%rbp), %rax movzbl 0x7(%rax), %eax andl $0x7, %eax cmpl $0x3, %eax je 0x54b69 jmp 0x54c76 movq -0x18(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax movl 0x20(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x20(%rax) movq -0x30(%rbp), %rcx movq -0x28(%rbp), %rax movl 0x7bc(%rax), %eax addq %rax, %rcx addq $-0x4, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movl 0x130(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x130(%rax) movq -0x30(%rbp), %rax movq -0x28(%rbp), %rcx movl 0xc18(%rcx), %ecx addl $0x8, %ecx movl %ecx, %ecx addq %rcx, %rax movq -0x18(%rbp), %rcx movq %rax, 0x8(%rcx) movq %rax, -0x8(%rbp) jmp 0x54c94 movq -0x30(%rbp), %rax movzbl 0x7(%rax), %eax andl $0x7, %eax cmpl $0x2, %eax je 0x54bf1 jmp 0x54c76 movq -0x18(%rbp), %rax movq 0x18(%rax), %rdi movq -0x18(%rbp), %rax movl 0x30(%rax), %esi callq 0x55b80 movq %rax, %rcx movq -0x18(%rbp), %rdx movq 0x10(%rdx), %rax movq %rax, %rsi addq $0x8, %rsi movq %rsi, 0x10(%rdx) movq %rcx, (%rax) movq -0x10(%rbp), %rax movl 0x134(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x134(%rax) movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rax movl 0x30(%rax), %edx movq -0x20(%rbp), %rcx callq 0x54dc0 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x54c55 jmp 0x54c76 movq -0x38(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x20(%rax) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x54c94 jmp 0x54c78 jmp 0x54c7a movq -0x10(%rbp), %rdi movl $0x7f, %esi callq 0x37c10 jmp 0x54c8a jmp 0x54c8c movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nop
read_next_extent: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_18] cmp dword ptr [rax+20h], 0 jnz loc_54A63 mov rcx, [rbp+var_18] mov eax, [rcx+28h] add eax, 0FFFFFFFFh mov [rcx+28h], eax cmp eax, 0 jnz short loc_549E4 jmp loc_54C76 loc_549E4: mov rax, [rbp+var_18] mov rcx, [rax] add rcx, 7 mov [rax], rcx mov rax, [rbp+var_18] mov rdi, [rax] call uint5korr_0 mov rcx, rax mov rax, [rbp+var_18] mov [rax+18h], rcx mov rax, [rbp+var_18] mov rax, [rax] movzx eax, word ptr [rax+5] and eax, 0FFFFBFFFh mov [rbp+var_58], eax cmp [rbp+var_58], 0 jnz short loc_54A27 jmp loc_54C76 loc_54A27: mov ecx, [rbp+var_58] and ecx, 8000h mov rax, [rbp+var_18] mov [rax+2Ch], ecx mov rax, [rbp+var_18] cmp dword ptr [rax+2Ch], 0 jz short loc_54A53 mov ecx, [rbp+var_58] and ecx, 0FFFF7FFFh mov rax, [rbp+var_18] mov [rax+30h], ecx jmp short loc_54A5D loc_54A53: mov ecx, [rbp+var_58] mov rax, [rbp+var_18] mov [rax+20h], ecx loc_54A5D: jmp short $+2 loc_54A5F: jmp short $+2 loc_54A61: jmp short $+2 loc_54A63: mov rax, [rbp+var_18] mov byte ptr [rax+34h], 0 mov [rbp+var_54], 0 mov rax, [rbp+var_18] cmp dword ptr [rax+2Ch], 0 jz short loc_54A86 mov rax, [rbp+var_18] mov eax, [rax+24h] mov [rbp+var_54], eax loc_54A86: mov rax, [rbp+var_28] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov rax, [rbp+var_18] mov rdx, [rax+18h] mov rax, [rbp+var_10] mov r8, [rax+378h] mov rax, [rbp+var_28] mov r9d, [rax+7D4h] mov r10d, [rbp+var_54] lea rax, [rbp+var_50] xor ecx, ecx mov [rsp+70h+var_70], r10d mov [rsp+70h+var_68], rax call pagecache_read mov [rbp+var_30], rax cmp [rbp+var_54], 0 jz short loc_54B07 mov [rbp+var_48], 6 cmp [rbp+var_30], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_40], al mov rdi, [rbp+var_10] add rdi, 2E8h lea rsi, [rbp+var_50] call insert_dynamic loc_54B07: cmp [rbp+var_30], 0 jnz short loc_54B46 mov rax, [rbp+var_18] mov rax, [rax+18h] add rax, 1 mov rcx, [rbp+var_28] mov ecx, [rcx+7BCh] imul rax, rcx mov rcx, [rbp+var_28] cmp rax, [rcx+40h] jbe short loc_54B37 jmp loc_54C76 loc_54B37: jmp short $+2 loc_54B39: mov [rbp+var_8], 0 jmp loc_54C94 loc_54B46: mov rax, [rbp+var_18] cmp dword ptr [rax+2Ch], 0 jnz loc_54BDC mov rax, [rbp+var_30] movzx eax, byte ptr [rax+7] and eax, 7 cmp eax, 3 jz short loc_54B69 jmp loc_54C76 loc_54B69: mov rax, [rbp+var_18] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx mov rax, [rbp+var_18] mov ecx, [rax+20h] add ecx, 0FFFFFFFFh mov [rax+20h], ecx mov rcx, [rbp+var_30] mov rax, [rbp+var_28] mov eax, [rax+7BCh] add rcx, rax add rcx, 0FFFFFFFFFFFFFFFCh mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_10] mov ecx, [rax+130h] add ecx, 1 mov [rax+130h], ecx mov rax, [rbp+var_30] mov rcx, [rbp+var_28] mov ecx, [rcx+0C18h] add ecx, 8 mov ecx, ecx add rax, rcx mov rcx, [rbp+var_18] mov [rcx+8], rax mov [rbp+var_8], rax jmp loc_54C94 loc_54BDC: mov rax, [rbp+var_30] movzx eax, byte ptr [rax+7] and eax, 7 cmp eax, 2 jz short loc_54BF1 jmp loc_54C76 loc_54BF1: mov rax, [rbp+var_18] mov rdi, [rax+18h] mov rax, [rbp+var_18] mov esi, [rax+30h] call ma_recordpos mov rcx, rax mov rdx, [rbp+var_18] mov rax, [rdx+10h] mov rsi, rax add rsi, 8 mov [rdx+10h], rsi mov [rax], rcx mov rax, [rbp+var_10] mov ecx, [rax+134h] add ecx, 1 mov [rax+134h], ecx mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] mov rax, [rbp+var_18] mov edx, [rax+30h] mov rcx, [rbp+var_20] call get_record_position mov [rbp+var_38], rax cmp rax, 0 jnz short loc_54C55 jmp short loc_54C76 loc_54C55: mov rcx, [rbp+var_38] mov rax, [rbp+var_18] mov [rax+8], rcx mov rax, [rbp+var_18] mov dword ptr [rax+20h], 0 mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_54C94 loc_54C76: jmp short $+2 loc_54C78: jmp short $+2 loc_54C7A: mov rdi, [rbp+var_10] mov esi, 7Fh call _ma_set_fatal_error jmp short $+2 loc_54C8A: jmp short $+2 loc_54C8C: mov [rbp+var_8], 0 loc_54C94: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long read_next_extent(_DWORD *a1, long long a2, long long a3, long long a4, long long a5, int a6) { long long v6; // rcx int v7; // eax long long v8; // rax long long v9; // rcx long long *v10; // rax int v12; // [rsp+18h] [rbp-58h] int v13; // [rsp+1Ch] [rbp-54h] char v14[8]; // [rsp+20h] [rbp-50h] BYREF int v15; // [rsp+28h] [rbp-48h] bool v16; // [rsp+30h] [rbp-40h] long long record_position; // [rsp+38h] [rbp-38h] long long v18; // [rsp+40h] [rbp-30h] long long v19; // [rsp+48h] [rbp-28h] _QWORD *v20; // [rsp+50h] [rbp-20h] long long v21; // [rsp+58h] [rbp-18h] _DWORD *v22; // [rsp+60h] [rbp-10h] v22 = a1; v21 = a2; v20 = (_QWORD *)a3; v19 = *(_QWORD *)a1; if ( !*(_DWORD *)(a2 + 32) ) { v6 = v21; v7 = *(_DWORD *)(v21 + 40) - 1; *(_DWORD *)(v21 + 40) = v7; if ( !v7 ) goto LABEL_20; *(_QWORD *)v21 += 7LL; v6 = uint5korr_0(*(_QWORD *)v21); *(_QWORD *)(v21 + 24) = v6; v12 = *(_WORD *)(*(_QWORD *)v21 + 5LL) & 0xBFFF; if ( (*(_WORD *)(*(_QWORD *)v21 + 5LL) & 0xBFFF) == 0 ) goto LABEL_20; *(_DWORD *)(v21 + 44) = *(_WORD *)(*(_QWORD *)v21 + 5LL) & 0x8000; if ( *(_DWORD *)(v21 + 44) ) *(_DWORD *)(v21 + 48) = v12 & 0xFFFF7FFF; else *(_DWORD *)(v21 + 32) = v12; } *(_BYTE *)(v21 + 52) = 0; v13 = 0; if ( *(_DWORD *)(v21 + 44) ) v13 = *(_DWORD *)(v21 + 36); v18 = pagecache_read( *(_QWORD *)(v19 + 1536), (int)v22 + 1136, *(_QWORD *)(v21 + 24), 0, *((_QWORD *)v22 + 111), *(_DWORD *)(v19 + 2004), v13, (long long)v14); if ( v13 ) { v15 = 6; v16 = v18 != 0; insert_dynamic(v22 + 186, v14); } if ( v18 ) { if ( *(_DWORD *)(v21 + 44) ) { if ( (*(_BYTE *)(v18 + 7) & 7) == 2 ) { v9 = ma_recordpos(*(_QWORD *)(v21 + 24), *(unsigned int *)(v21 + 48)); v10 = *(long long **)(v21 + 16); *(_QWORD *)(v21 + 16) = v10 + 1; *v10 = v9; ++v22[77]; record_position = get_record_position(v19, v18, *(unsigned int *)(v21 + 48), v20); if ( record_position ) { *(_QWORD *)(v21 + 8) = record_position; *(_DWORD *)(v21 + 32) = 0; return record_position; } } } else if ( (*(_BYTE *)(v18 + 7) & 7) == 3 ) { ++*(_QWORD *)(v21 + 24); --*(_DWORD *)(v21 + 32); *v20 = *(unsigned int *)(v19 + 1980) + v18 - 4; ++v22[76]; v8 = (unsigned int)(*(_DWORD *)(v19 + 3096) + 8) + v18; *(_QWORD *)(v21 + 8) = v8; return v8; } LABEL_20: ma_set_fatal_error(v22, 0x7Fu, a3, v6, a5, a6); return 0LL; } v6 = v19; if ( (unsigned long long)*(unsigned int *)(v19 + 1980) * (*(_QWORD *)(v21 + 24) + 1LL) > *(_QWORD *)(v19 + 64) ) goto LABEL_20; return 0LL; }
read_next_extent: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x20],0x0 JNZ 0x00154a63 MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RCX + 0x28] ADD EAX,-0x1 MOV dword ptr [RCX + 0x28],EAX CMP EAX,0x0 JNZ 0x001549e4 JMP 0x00154c76 LAB_001549e4: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] ADD RCX,0x7 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX] CALL 0x00156790 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,word ptr [RAX + 0x5] AND EAX,0xffffbfff MOV dword ptr [RBP + -0x58],EAX CMP dword ptr [RBP + -0x58],0x0 JNZ 0x00154a27 JMP 0x00154c76 LAB_00154a27: MOV ECX,dword ptr [RBP + -0x58] AND ECX,0x8000 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x2c],ECX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x2c],0x0 JZ 0x00154a53 MOV ECX,dword ptr [RBP + -0x58] AND ECX,0xffff7fff MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x30],ECX JMP 0x00154a5d LAB_00154a53: MOV ECX,dword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x20],ECX LAB_00154a5d: JMP 0x00154a5f LAB_00154a5f: JMP 0x00154a61 LAB_00154a61: JMP 0x00154a63 LAB_00154a63: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x34],0x0 MOV dword ptr [RBP + -0x54],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x2c],0x0 JZ 0x00154a86 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x24] MOV dword ptr [RBP + -0x54],EAX LAB_00154a86: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x378] MOV RAX,qword ptr [RBP + -0x28] MOV R9D,dword ptr [RAX + 0x7d4] MOV R10D,dword ptr [RBP + -0x54] LEA RAX,[RBP + -0x50] XOR ECX,ECX MOV dword ptr [RSP],R10D MOV qword ptr [RSP + 0x8],RAX CALL 0x00196df0 MOV qword ptr [RBP + -0x30],RAX CMP dword ptr [RBP + -0x54],0x0 JZ 0x00154b07 MOV dword ptr [RBP + -0x48],0x6 CMP qword ptr [RBP + -0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x40],AL MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2e8 LEA RSI,[RBP + -0x50] CALL 0x001dd8b0 LAB_00154b07: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x00154b46 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] ADD RAX,0x1 MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x7bc] IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RCX + 0x40] JBE 0x00154b37 JMP 0x00154c76 LAB_00154b37: JMP 0x00154b39 LAB_00154b39: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00154c94 LAB_00154b46: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x2c],0x0 JNZ 0x00154bdc MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x7] AND EAX,0x7 CMP EAX,0x3 JZ 0x00154b69 JMP 0x00154c76 LAB_00154b69: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x20] ADD ECX,-0x1 MOV dword ptr [RAX + 0x20],ECX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x7bc] ADD RCX,RAX ADD RCX,-0x4 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x130] ADD ECX,0x1 MOV dword ptr [RAX + 0x130],ECX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0xc18] ADD ECX,0x8 MOV ECX,ECX ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RBP + -0x8],RAX JMP 0x00154c94 LAB_00154bdc: MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x7] AND EAX,0x7 CMP EAX,0x2 JZ 0x00154bf1 JMP 0x00154c76 LAB_00154bf1: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RAX + 0x30] CALL 0x00155b80 MOV RCX,RAX MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RDX + 0x10] MOV RSI,RAX ADD RSI,0x8 MOV qword ptr [RDX + 0x10],RSI MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x134] ADD ECX,0x1 MOV dword ptr [RAX + 0x134],ECX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RAX + 0x30] MOV RCX,qword ptr [RBP + -0x20] CALL 0x00154dc0 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x00154c55 JMP 0x00154c76 LAB_00154c55: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x00154c94 LAB_00154c76: JMP 0x00154c78 LAB_00154c78: JMP 0x00154c7a LAB_00154c7a: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7f CALL 0x00137c10 JMP 0x00154c8a LAB_00154c8a: JMP 0x00154c8c LAB_00154c8c: MOV qword ptr [RBP + -0x8],0x0 LAB_00154c94: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
long read_next_extent(long *param_1,long *param_2,long *param_3) { int8 *puVar1; int iVar2; uint uVar3; long lVar4; ulong uVar5; int8 uVar6; int local_5c; int1 local_58 [8]; int4 local_50; int1 local_48; int8 local_40; long local_38; long local_30; long *local_28; long *local_20; long *local_18; local_30 = *param_1; local_28 = param_3; local_20 = param_2; local_18 = param_1; if ((int)param_2[4] == 0) { iVar2 = (int)param_2[5] + -1; *(int *)(param_2 + 5) = iVar2; if (iVar2 == 0) goto LAB_00154c76; *param_2 = *param_2 + 7; lVar4 = uint5korr(*param_2); local_20[3] = lVar4; uVar3 = (uint)*(ushort *)(*local_20 + 5); if ((*(ushort *)(*local_20 + 5) & 0xbfff) == 0) goto LAB_00154c76; *(uint *)((long)local_20 + 0x2c) = uVar3 & 0x8000; if (*(int *)((long)local_20 + 0x2c) == 0) { *(uint *)(local_20 + 4) = uVar3 & 0xffffbfff; } else { *(uint *)(local_20 + 6) = uVar3 & 0xffff3fff; } } *(int1 *)((long)local_20 + 0x34) = 0; local_5c = 0; if (*(int *)((long)local_20 + 0x2c) != 0) { local_5c = *(int *)((long)local_20 + 0x24); } local_38 = pagecache_read(*(int8 *)(local_30 + 0x600),local_18 + 0x8e,local_20[3],0, local_18[0x6f],*(int4 *)(local_30 + 0x7d4),local_5c,local_58); if (local_5c != 0) { local_50 = 6; local_48 = local_38 != 0; insert_dynamic(local_18 + 0x5d,local_58); } if (local_38 == 0) { uVar5 = (local_20[3] + 1) * (ulong)*(uint *)(local_30 + 0x7bc); if (uVar5 < *(ulong *)(local_30 + 0x40) || uVar5 - *(ulong *)(local_30 + 0x40) == 0) { return 0; } } else if (*(int *)((long)local_20 + 0x2c) == 0) { if ((*(byte *)(local_38 + 7) & 7) == 3) { local_20[3] = local_20[3] + 1; *(int *)(local_20 + 4) = (int)local_20[4] + -1; *local_28 = local_38 + (ulong)*(uint *)(local_30 + 0x7bc) + -4; *(int *)(local_18 + 0x26) = (int)local_18[0x26] + 1; local_38 = local_38 + (ulong)(*(int *)(local_30 + 0xc18) + 8); local_20[1] = local_38; return local_38; } } else if ((*(byte *)(local_38 + 7) & 7) == 2) { uVar6 = ma_recordpos(local_20[3],(int)local_20[6]); puVar1 = (int8 *)local_20[2]; local_20[2] = (long)(puVar1 + 1); *puVar1 = uVar6; *(int *)((long)local_18 + 0x134) = *(int *)((long)local_18 + 0x134) + 1; lVar4 = get_record_position(local_30,local_38,(int)local_20[6],local_28); if (lVar4 != 0) { local_20[1] = lVar4; *(int4 *)(local_20 + 4) = 0; return lVar4; } local_40 = 0; } LAB_00154c76: _ma_set_fatal_error(local_18,0x7f); return 0; }
63,242
flux::parser::Parser::advance()
kvthweatt[P]FluxLang/src/parser/parser.cpp
lexer::Token Parser::advance() { previous_ = current_; // Check if we're already at the end of the file if (current_.type() == lexer::TokenType::END_OF_FILE) { return previous_; } current_ = tokenizer_.nextToken(); // Debugging output for each token advanced std::cout << "Advanced to: " << current_.toString() << std::endl; // Skip error tokens while (current_.type() == lexer::TokenType::ERROR) { error(current_, current_.lexeme()); current_ = tokenizer_.nextToken(); std::cout << "Skipping error, advanced to: " << current_.toString() << std::endl; } return previous_; }
O0
cpp
flux::parser::Parser::advance(): pushq %rbp movq %rsp, %rbp subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, -0x148(%rbp) movq %rdi, %rax movq %rax, -0x140(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x138(%rbp) movq %rdi, %rsi addq $0x8, %rsi addq $0x68, %rdi callq 0x58e50 movq -0x138(%rbp), %rdi addq $0x8, %rdi callq 0x8fb0 cmpl $0x0, %eax jne 0x41860 movq -0x148(%rbp), %rdi movq -0x138(%rbp), %rsi addq $0x68, %rsi callq 0x15420 jmp 0x41a7d movq -0x138(%rbp), %rax movq (%rax), %rsi leaq -0x70(%rbp), %rdi movq %rdi, -0x170(%rbp) callq 0x12cf0 movq -0x138(%rbp), %rdi movq -0x170(%rbp), %rsi addq $0x8, %rdi movq %rdi, -0x168(%rbp) callq 0x58ea0 movq -0x170(%rbp), %rdi callq 0xa300 movq 0x5470d(%rip), %rdi # 0x95fb8 leaq 0x22080(%rip), %rsi # 0x63932 callq 0x7330 movq -0x168(%rbp), %rsi movq %rax, -0x160(%rbp) leaq -0x90(%rbp), %rdi movq %rdi, -0x158(%rbp) callq 0x17490 movq -0x160(%rbp), %rdi movq -0x158(%rbp), %rsi callq 0x7300 movq %rax, -0x150(%rbp) jmp 0x418f4 movq -0x150(%rbp), %rdi movq 0x5467e(%rip), %rsi # 0x95f80 callq 0x7360 jmp 0x41909 leaq -0x90(%rbp), %rdi callq 0x71f0 movq -0x138(%rbp), %rdi addq $0x8, %rdi callq 0x8fb0 cmpl $0x69, %eax jne 0x41a66 movq -0x138(%rbp), %rdi addq $0x8, %rdi movq %rdi, -0x190(%rbp) callq 0x2a860 movq -0x138(%rbp), %rdi movq -0x190(%rbp), %rsi movq %rax, -0xb0(%rbp) movq %rdx, -0xa8(%rbp) movq -0xb0(%rbp), %rdx movq -0xa8(%rbp), %rcx callq 0x42c90 movq -0x138(%rbp), %rax movq (%rax), %rsi leaq -0x110(%rbp), %rdi movq %rdi, -0x198(%rbp) callq 0x12cf0 movq -0x198(%rbp), %rsi movq -0x190(%rbp), %rdi callq 0x58ea0 movq -0x198(%rbp), %rdi callq 0xa300 movq 0x54601(%rip), %rdi # 0x95fb8 leaq 0x21f82(%rip), %rsi # 0x63940 callq 0x7330 movq -0x190(%rbp), %rsi movq %rax, -0x188(%rbp) leaq -0x130(%rbp), %rdi movq %rdi, -0x180(%rbp) callq 0x17490 movq -0x188(%rbp), %rdi movq -0x180(%rbp), %rsi callq 0x7300 movq %rax, -0x178(%rbp) jmp 0x41a00 movq -0x178(%rbp), %rdi movq 0x54572(%rip), %rsi # 0x95f80 callq 0x7360 jmp 0x41a15 leaq -0x130(%rbp), %rdi callq 0x71f0 jmp 0x41915 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) leaq -0x90(%rbp), %rdi callq 0x71f0 jmp 0x41a8d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) leaq -0x130(%rbp), %rdi callq 0x71f0 jmp 0x41a8d movq -0x148(%rbp), %rdi movq -0x138(%rbp), %rsi addq $0x68, %rsi callq 0x15420 movq -0x140(%rbp), %rax addq $0x1a0, %rsp # imm = 0x1A0 popq %rbp retq movq -0x98(%rbp), %rdi callq 0x75a0 nopl (%rax)
_ZN4flux6parser6Parser7advanceEv: push rbp mov rbp, rsp sub rsp, 1A0h mov [rbp+var_148], rdi mov rax, rdi mov [rbp+var_140], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] mov [rbp+var_138], rdi mov rsi, rdi add rsi, 8 add rdi, 68h ; 'h' call _ZN4flux5lexer5TokenaSERKS1_; flux::lexer::Token::operator=(flux::lexer::Token const&) mov rdi, [rbp+var_138] add rdi, 8; this call _ZNK4flux5lexer5Token4typeEv; flux::lexer::Token::type(void) cmp eax, 0 jnz short loc_41860 mov rdi, [rbp+var_148]; this mov rsi, [rbp+var_138] add rsi, 68h ; 'h'; flux::lexer::Token * call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&) jmp loc_41A7D loc_41860: mov rax, [rbp+var_138] mov rsi, [rax] lea rdi, [rbp+var_70]; this mov [rbp+var_170], rdi call _ZN4flux5lexer9Tokenizer9nextTokenEv; flux::lexer::Tokenizer::nextToken(void) mov rdi, [rbp+var_138] mov rsi, [rbp+var_170] add rdi, 8 mov [rbp+var_168], rdi call _ZN4flux5lexer5TokenaSEOS1_; flux::lexer::Token::operator=(flux::lexer::Token&&) mov rdi, [rbp+var_170]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() mov rdi, cs:_ZSt4cout_ptr lea rsi, aAdvancedTo; "Advanced to: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [rbp+var_168] mov [rbp+var_160], rax lea rdi, [rbp+var_90] mov [rbp+var_158], rdi call _ZNK4flux5lexer5Token8toStringB5cxx11Ev; flux::lexer::Token::toString(void) mov rdi, [rbp+var_160] mov rsi, [rbp+var_158] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_150], rax jmp short $+2 loc_418F4: mov rdi, [rbp+var_150] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_41909: lea rdi, [rbp+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_41915: mov rdi, [rbp+var_138] add rdi, 8; this call _ZNK4flux5lexer5Token4typeEv; flux::lexer::Token::type(void) cmp eax, 69h ; 'i' jnz loc_41A66 mov rdi, [rbp+var_138] add rdi, 8; this mov [rbp+var_190], rdi call _ZNK4flux5lexer5Token6lexemeEv; flux::lexer::Token::lexeme(void) mov rdi, [rbp+var_138] mov rsi, [rbp+var_190] mov [rbp+var_B0], rax mov [rbp+var_A8], rdx mov rdx, [rbp+var_B0] mov rcx, [rbp+var_A8] call _ZN4flux6parser6Parser5errorERKNS_5lexer5TokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(flux::lexer::Token const&,std::string_view) mov rax, [rbp+var_138] mov rsi, [rax] lea rdi, [rbp+var_110]; this mov [rbp+var_198], rdi call _ZN4flux5lexer9Tokenizer9nextTokenEv; flux::lexer::Tokenizer::nextToken(void) mov rsi, [rbp+var_198] mov rdi, [rbp+var_190] call _ZN4flux5lexer5TokenaSEOS1_; flux::lexer::Token::operator=(flux::lexer::Token&&) mov rdi, [rbp+var_198]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() mov rdi, cs:_ZSt4cout_ptr lea rsi, aSkippingErrorA; "Skipping error, advanced to: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [rbp+var_190] mov [rbp+var_188], rax lea rdi, [rbp+var_130] mov [rbp+var_180], rdi call _ZNK4flux5lexer5Token8toStringB5cxx11Ev; flux::lexer::Token::toString(void) mov rdi, [rbp+var_188] mov rsi, [rbp+var_180] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_178], rax jmp short $+2 loc_41A00: mov rdi, [rbp+var_178] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_41A15: lea rdi, [rbp+var_130] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_41915 mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax lea rdi, [rbp+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_41A8D mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax lea rdi, [rbp+var_130] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_41A8D loc_41A66: mov rdi, [rbp+var_148]; this mov rsi, [rbp+var_138] add rsi, 68h ; 'h'; flux::lexer::Token * call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&) loc_41A7D: mov rax, [rbp+var_140] add rsp, 1A0h pop rbp retn loc_41A8D: mov rdi, [rbp+var_98] call __Unwind_Resume
flux::parser::Parser * flux::parser::Parser::advance(flux::parser::Parser *this, long long a2) { long long v2; // rdx long long v4; // [rsp+18h] [rbp-188h] long long v5; // [rsp+28h] [rbp-178h] long long v6; // [rsp+40h] [rbp-160h] long long v7; // [rsp+50h] [rbp-150h] _BYTE v8[32]; // [rsp+70h] [rbp-130h] BYREF _BYTE v9[96]; // [rsp+90h] [rbp-110h] BYREF long long v10; // [rsp+F0h] [rbp-B0h] long long v11; // [rsp+F8h] [rbp-A8h] _BYTE v12[32]; // [rsp+110h] [rbp-90h] BYREF _BYTE v13[96]; // [rsp+130h] [rbp-70h] BYREF long long v14; // [rsp+190h] [rbp-10h] flux::parser::Parser *v15; // [rsp+198h] [rbp-8h] v15 = this; v14 = a2; flux::lexer::Token::operator=(a2 + 104, a2 + 8); if ( (unsigned int)flux::lexer::Token::type((flux::lexer::Token *)(a2 + 8)) ) { flux::lexer::Tokenizer::nextToken((flux::lexer::Tokenizer *)v13, *(flux::lexer::Tokenizer **)a2); flux::lexer::Token::operator=(a2 + 8, v13); flux::lexer::Token::~Token((flux::lexer::Token *)v13); v6 = std::operator<<<std::char_traits<char>>(&std::cout, "Advanced to: "); flux::lexer::Token::toString[abi:cxx11]((long long)v12, (long long *)(a2 + 8)); v7 = std::operator<<<char>(v6, v12); std::ostream::operator<<(v7, &std::endl<char,std::char_traits<char>>); std::string::~string(v12); while ( (unsigned int)flux::lexer::Token::type((flux::lexer::Token *)(a2 + 8)) == 105 ) { v10 = flux::lexer::Token::lexeme((flux::lexer::Token *)(a2 + 8)); v11 = v2; flux::parser::Parser::error(a2, a2 + 8, v10, v2); flux::lexer::Tokenizer::nextToken((flux::lexer::Tokenizer *)v9, *(flux::lexer::Tokenizer **)a2); flux::lexer::Token::operator=(a2 + 8, v9); flux::lexer::Token::~Token((flux::lexer::Token *)v9); v4 = std::operator<<<std::char_traits<char>>(&std::cout, "Skipping error, advanced to: "); flux::lexer::Token::toString[abi:cxx11]((long long)v8, (long long *)(a2 + 8)); v5 = std::operator<<<char>(v4, v8); std::ostream::operator<<(v5, &std::endl<char,std::char_traits<char>>); std::string::~string(v8); } flux::lexer::Token::Token(this, (const flux::lexer::Token *)(a2 + 104)); } else { flux::lexer::Token::Token(this, (const flux::lexer::Token *)(a2 + 104)); } return this; }
advance: PUSH RBP MOV RBP,RSP SUB RSP,0x1a0 MOV qword ptr [RBP + -0x148],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x140],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x138],RDI MOV RSI,RDI ADD RSI,0x8 ADD RDI,0x68 CALL 0x00158e50 MOV RDI,qword ptr [RBP + -0x138] ADD RDI,0x8 CALL 0x00108fb0 CMP EAX,0x0 JNZ 0x00141860 MOV RDI,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RBP + -0x138] ADD RSI,0x68 CALL 0x00115420 JMP 0x00141a7d LAB_00141860: MOV RAX,qword ptr [RBP + -0x138] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0x70] MOV qword ptr [RBP + -0x170],RDI CALL 0x00112cf0 MOV RDI,qword ptr [RBP + -0x138] MOV RSI,qword ptr [RBP + -0x170] ADD RDI,0x8 MOV qword ptr [RBP + -0x168],RDI CALL 0x00158ea0 MOV RDI,qword ptr [RBP + -0x170] CALL 0x0010a300 MOV RDI,qword ptr [0x00195fb8] LEA RSI,[0x163932] CALL 0x00107330 MOV RSI,qword ptr [RBP + -0x168] MOV qword ptr [RBP + -0x160],RAX LEA RDI,[RBP + -0x90] MOV qword ptr [RBP + -0x158],RDI CALL 0x00117490 MOV RDI,qword ptr [RBP + -0x160] MOV RSI,qword ptr [RBP + -0x158] LAB_001418e6: CALL 0x00107300 MOV qword ptr [RBP + -0x150],RAX JMP 0x001418f4 LAB_001418f4: MOV RDI,qword ptr [RBP + -0x150] MOV RSI,qword ptr [0x00195f80] CALL 0x00107360 LAB_00141907: JMP 0x00141909 LAB_00141909: LEA RDI,[RBP + -0x90] CALL 0x001071f0 LAB_00141915: MOV RDI,qword ptr [RBP + -0x138] ADD RDI,0x8 CALL 0x00108fb0 CMP EAX,0x69 JNZ 0x00141a66 MOV RDI,qword ptr [RBP + -0x138] ADD RDI,0x8 MOV qword ptr [RBP + -0x190],RDI CALL 0x0012a860 MOV RDI,qword ptr [RBP + -0x138] MOV RSI,qword ptr [RBP + -0x190] MOV qword ptr [RBP + -0xb0],RAX MOV qword ptr [RBP + -0xa8],RDX MOV RDX,qword ptr [RBP + -0xb0] MOV RCX,qword ptr [RBP + -0xa8] CALL 0x00142c90 MOV RAX,qword ptr [RBP + -0x138] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0x110] MOV qword ptr [RBP + -0x198],RDI CALL 0x00112cf0 MOV RSI,qword ptr [RBP + -0x198] MOV RDI,qword ptr [RBP + -0x190] CALL 0x00158ea0 MOV RDI,qword ptr [RBP + -0x198] CALL 0x0010a300 MOV RDI,qword ptr [0x00195fb8] LEA RSI,[0x163940] CALL 0x00107330 MOV RSI,qword ptr [RBP + -0x190] MOV qword ptr [RBP + -0x188],RAX LEA RDI,[RBP + -0x130] MOV qword ptr [RBP + -0x180],RDI CALL 0x00117490 MOV RDI,qword ptr [RBP + -0x188] MOV RSI,qword ptr [RBP + -0x180] LAB_001419f2: CALL 0x00107300 MOV qword ptr [RBP + -0x178],RAX JMP 0x00141a00 LAB_00141a00: MOV RDI,qword ptr [RBP + -0x178] MOV RSI,qword ptr [0x00195f80] CALL 0x00107360 LAB_00141a13: JMP 0x00141a15 LAB_00141a15: LEA RDI,[RBP + -0x130] CALL 0x001071f0 JMP 0x00141915 LAB_00141a66: MOV RDI,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RBP + -0x138] ADD RSI,0x68 CALL 0x00115420 LAB_00141a7d: MOV RAX,qword ptr [RBP + -0x140] ADD RSP,0x1a0 POP RBP RET
/* flux::parser::Parser::advance() */ Token * flux::parser::Parser::advance(void) { int iVar1; ostream *poVar2; long in_RSI; Token *in_RDI; Token *this; int1 auVar3 [16]; string local_138 [32]; Token local_118 [96]; int1 local_b8 [16]; string local_98 [32]; Token local_78 [112]; lexer::Token::operator=((Token *)(in_RSI + 0x68),(Token *)(in_RSI + 8)); iVar1 = lexer::Token::type((Token *)(in_RSI + 8)); if (iVar1 == 0) { lexer::Token::Token(in_RDI,(Token *)(in_RSI + 0x68)); } else { lexer::Tokenizer::nextToken(); lexer::Token::operator=((Token *)(in_RSI + 8),local_78); lexer::Token::~Token(local_78); poVar2 = std::operator<<((ostream *)PTR_cout_00195fb8,"Advanced to: "); lexer::Token::toString_abi_cxx11_(); /* try { // try from 001418e6 to 00141906 has its CatchHandler @ 00141a26 */ poVar2 = std::operator<<(poVar2,local_98); std::ostream::operator<< (poVar2,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00195f80 ); std::__cxx11::string::~string(local_98); while( true ) { iVar1 = lexer::Token::type((Token *)(in_RSI + 8)); if (iVar1 != 0x69) break; this = (Token *)(in_RSI + 8); auVar3 = lexer::Token::lexeme(this); local_b8 = auVar3; error(in_RSI,this,auVar3._0_8_,auVar3._8_8_); lexer::Tokenizer::nextToken(); lexer::Token::operator=(this,local_118); lexer::Token::~Token(local_118); poVar2 = std::operator<<((ostream *)PTR_cout_00195fb8,"Skipping error, advanced to: "); lexer::Token::toString_abi_cxx11_(); /* try { // try from 001419f2 to 00141a12 has its CatchHandler @ 00141a46 */ poVar2 = std::operator<<(poVar2,local_138); std::ostream::operator<< (poVar2,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_00195f80); std::__cxx11::string::~string(local_138); } lexer::Token::Token(in_RDI,(Token *)(in_RSI + 0x68)); } return in_RDI; }
63,243
flux::parser::Parser::advance()
kvthweatt[P]FluxLang/src/parser/parser.cpp
lexer::Token Parser::advance() { previous_ = current_; // Check if we're already at the end of the file if (current_.type() == lexer::TokenType::END_OF_FILE) { return previous_; } current_ = tokenizer_.nextToken(); // Debugging output for each token advanced std::cout << "Advanced to: " << current_.toString() << std::endl; // Skip error tokens while (current_.type() == lexer::TokenType::ERROR) { error(current_, current_.lexeme()); current_ = tokenizer_.nextToken(); std::cout << "Skipping error, advanced to: " << current_.toString() << std::endl; } return previous_; }
O1
cpp
flux::parser::Parser::advance(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, 0x8(%rsp) movups 0x8(%rsi), %xmm0 movups 0x18(%rsi), %xmm1 movups 0x28(%rsi), %xmm2 movups 0x38(%rsi), %xmm3 movups %xmm3, 0x98(%rsi) movups %xmm2, 0x88(%rsi) movups %xmm1, 0x78(%rsi) movups %xmm0, 0x68(%rsi) leaq 0xa8(%rsi), %rdi addq $0x48, %rsi movq %rsi, (%rsp) callq 0x6140 cmpl $0x0, 0x8(%r14) je 0x1400b leaq 0x8(%r14), %r12 movq (%r14), %rsi leaq 0x18(%rsp), %rbx movq %rbx, %rdi callq 0xa3d6 movl (%rbx), %eax movl %eax, 0x8(%r14) movups 0x8(%rbx), %xmm0 movups %xmm0, 0x10(%r14) movups 0x18(%rbx), %xmm0 movups 0x28(%rbx), %xmm1 movups %xmm0, 0x20(%r14) movups %xmm1, 0x30(%r14) movq 0x38(%rbx), %rax movq %rax, 0x40(%r14) leaq 0x58(%rsp), %rbx movq (%rsp), %rdi movq %rbx, %rsi callq 0x62f0 movq (%rbx), %rdi leaq 0x68(%rsp), %rax cmpq %rax, %rdi je 0x13e61 movq 0x68(%rsp), %rsi incq %rsi callq 0x6280 movq 0x27150(%rip), %rbx # 0x3afb8 leaq 0x18d03(%rip), %rsi # 0x2cb72 movl $0xd, %edx movq %rbx, %rdi callq 0x62c0 leaq 0x18(%rsp), %r13 movq %r13, %rdi movq %r12, %rsi callq 0xc98a movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi callq 0x62c0 movq %rax, %rbx movq (%rax), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x6250 movsbl %al, %esi movq %rbx, %rdi callq 0x6030 movq %rax, %rdi callq 0x61a0 leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x13ee1 movq 0x28(%rsp), %rsi incq %rsi callq 0x6280 cmpl $0x69, (%r12) jne 0x1400b leaq 0x10(%r14), %rax movq %rax, 0x10(%rsp) leaq 0x20(%r14), %r15 leaq 0x18(%rsp), %r13 movq 0x10(%r14), %rdx movq 0x18(%r14), %rcx movq %r14, %rdi movq %r12, %rbp movq %r12, %rsi callq 0x14c10 movq (%r14), %rsi movq %r13, %rdi callq 0xa3d6 movl 0x18(%rsp), %eax movl %eax, 0x8(%r14) leaq 0x20(%rsp), %rcx movups (%rcx), %xmm0 movq 0x10(%rsp), %rax movups %xmm0, (%rax) movq 0x30(%rcx), %rax movq %rax, 0x20(%r15) movups 0x10(%rcx), %xmm0 movups 0x20(%rcx), %xmm1 movups %xmm1, 0x10(%r15) movups %xmm0, (%r15) movq (%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x62f0 movq 0x58(%rsp), %rdi leaq 0x68(%rsp), %rax cmpq %rax, %rdi je 0x13f7a movq 0x68(%rsp), %rsi incq %rsi callq 0x6280 movl $0x1d, %edx movq 0x27032(%rip), %r12 # 0x3afb8 movq %r12, %rdi leaq 0x18bf0(%rip), %rsi # 0x2cb80 callq 0x62c0 movq %r13, %rbx movq %r13, %rdi movq %rbp, %rsi callq 0xc98a movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq %r12, %rdi callq 0x62c0 movq %rax, %r13 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r13, %rdi movl $0xa, %esi callq 0x6250 movsbl %al, %esi movq %r13, %rdi callq 0x6030 movq %rax, %rdi callq 0x61a0 movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x13ffb movq 0x28(%rsp), %rsi incq %rsi callq 0x6280 movq %rbp, %r12 cmpl $0x69, (%rbp) movq %rbx, %r13 je 0x13efe leaq 0x68(%r14), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups 0x20(%rax), %xmm2 movups 0x30(%rax), %xmm3 movq 0x8(%rsp), %rbx movups %xmm3, 0x30(%rbx) movups %xmm2, 0x20(%rbx) movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) leaq 0x40(%rbx), %rdi leaq 0x50(%rbx), %rax movq %rax, 0x40(%rbx) movq 0xa8(%r14), %rsi movq 0xb0(%r14), %rdx addq %rsi, %rdx callq 0x9160 movq %rbx, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi jmp 0x14081 movq %rax, %rbx movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x14093 movq 0x28(%rsp), %rsi incq %rsi callq 0x6280 movq %rbx, %rdi callq 0x6440 nop
_ZN4flux6parser6Parser7advanceEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi mov [rsp+0A8h+var_A0], rdi movups xmm0, xmmword ptr [rsi+8] movups xmm1, xmmword ptr [rsi+18h] movups xmm2, xmmword ptr [rsi+28h] movups xmm3, xmmword ptr [rsi+38h] movups xmmword ptr [rsi+98h], xmm3 movups xmmword ptr [rsi+88h], xmm2 movups xmmword ptr [rsi+78h], xmm1 movups xmmword ptr [rsi+68h], xmm0 lea rdi, [rsi+0A8h] add rsi, 48h ; 'H' mov [rsp+0A8h+var_A8], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) cmp dword ptr [r14+8], 0 jz loc_1400B lea r12, [r14+8] mov rsi, [r14] lea rbx, [rsp+0A8h+var_90] mov rdi, rbx; this call _ZN4flux5lexer9Tokenizer9nextTokenEv; flux::lexer::Tokenizer::nextToken(void) mov eax, [rbx] mov [r14+8], eax movups xmm0, xmmword ptr [rbx+8] movups xmmword ptr [r14+10h], xmm0 movups xmm0, xmmword ptr [rbx+18h] movups xmm1, xmmword ptr [rbx+28h] movups xmmword ptr [r14+20h], xmm0 movups xmmword ptr [r14+30h], xmm1 mov rax, [rbx+38h] mov [r14+40h], rax lea rbx, [rsp+0A8h+var_50] mov rdi, [rsp+0A8h+var_A8] mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbx]; void * lea rax, [rsp+0A8h+var_40] cmp rdi, rax jz short loc_13E61 mov rsi, [rsp+0A8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_13E61: mov rbx, cs:_ZSt4cout_ptr lea rsi, aAdvancedTo; "Advanced to: " mov edx, 0Dh 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) lea r13, [rsp+0A8h+var_90] mov rdi, r13 mov rsi, r12 call _ZNK4flux5lexer5Token8toStringB5cxx11Ev; flux::lexer::Token::toString(void) mov rsi, [r13+0] mov rdx, [r13+8] 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 rbx, rax mov rax, [rax] 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 call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [rsp+0A8h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_13EE1 mov rsi, [rsp+0A8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_13EE1: cmp dword ptr [r12], 69h ; 'i' jnz loc_1400B lea rax, [r14+10h] mov [rsp+0A8h+var_98], rax lea r15, [r14+20h] lea r13, [rsp+0A8h+var_90] loc_13EFE: mov rdx, [r14+10h] mov rcx, [r14+18h] mov rdi, r14 mov rbp, r12 mov rsi, r12 call _ZN4flux6parser6Parser5errorERKNS_5lexer5TokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(flux::lexer::Token const&,std::string_view) mov rsi, [r14] mov rdi, r13; this call _ZN4flux5lexer9Tokenizer9nextTokenEv; flux::lexer::Tokenizer::nextToken(void) mov eax, dword ptr [rsp+0A8h+var_90] mov [r14+8], eax lea rcx, [rsp+0A8h+var_88] movups xmm0, xmmword ptr [rcx] mov rax, [rsp+0A8h+var_98] movups xmmword ptr [rax], xmm0 mov rax, [rcx+30h] mov [r15+20h], rax movups xmm0, xmmword ptr [rcx+10h] movups xmm1, xmmword ptr [rcx+20h] movups xmmword ptr [r15+10h], xmm1 movups xmmword ptr [r15], xmm0 mov rdi, [rsp+0A8h+var_A8] lea rsi, [rsp+0A8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+0A8h+var_50]; void * lea rax, [rsp+0A8h+var_40] cmp rdi, rax jz short loc_13F7A mov rsi, [rsp+0A8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_13F7A: mov edx, 1Dh mov r12, cs:_ZSt4cout_ptr mov rdi, r12 lea rsi, aSkippingErrorA; "Skipping error, advanced to: " 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, r13 mov rdi, r13 mov rsi, rbp call _ZNK4flux5lexer5Token8toStringB5cxx11Ev; flux::lexer::Token::toString(void) mov rsi, [rsp+0A8h+var_90] mov rdx, [rsp+0A8h+var_88] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r13, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r13 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r13; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov rdi, [rsp+0A8h+var_90]; void * lea rax, [rsp+0A8h+var_80] cmp rdi, rax jz short loc_13FFB mov rsi, [rsp+0A8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_13FFB: mov r12, rbp cmp dword ptr [rbp+0], 69h ; 'i' mov r13, rbx jz loc_13EFE loc_1400B: lea rax, [r14+68h] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups xmm2, xmmword ptr [rax+20h] movups xmm3, xmmword ptr [rax+30h] mov rbx, [rsp+0A8h+var_A0] movups xmmword ptr [rbx+30h], xmm3 movups xmmword ptr [rbx+20h], xmm2 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 lea rdi, [rbx+40h] lea rax, [rbx+50h] mov [rbx+40h], rax mov rsi, [r14+0A8h] mov rdx, [r14+0B0h] 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, rbx add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_20] mov rdi, [rax-10h] jmp short loc_14081 mov rbx, rax mov rdi, [rsp+arg_10]; void * lea rax, [rsp+arg_20] loc_14081: cmp rdi, rax jz short loc_14093 mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_14093: mov rdi, rbx call __Unwind_Resume
advance: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV qword ptr [RSP + 0x8],RDI MOVUPS XMM0,xmmword ptr [RSI + 0x8] MOVUPS XMM1,xmmword ptr [RSI + 0x18] MOVUPS XMM2,xmmword ptr [RSI + 0x28] MOVUPS XMM3,xmmword ptr [RSI + 0x38] MOVUPS xmmword ptr [RSI + 0x98],XMM3 MOVUPS xmmword ptr [RSI + 0x88],XMM2 MOVUPS xmmword ptr [RSI + 0x78],XMM1 MOVUPS xmmword ptr [RSI + 0x68],XMM0 LEA RDI,[RSI + 0xa8] ADD RSI,0x48 MOV qword ptr [RSP],RSI CALL 0x00106140 CMP dword ptr [R14 + 0x8],0x0 JZ 0x0011400b LEA R12,[R14 + 0x8] MOV RSI,qword ptr [R14] LEA RBX,[RSP + 0x18] MOV RDI,RBX CALL 0x0010a3d6 MOV EAX,dword ptr [RBX] MOV dword ptr [R14 + 0x8],EAX MOVUPS XMM0,xmmword ptr [RBX + 0x8] MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RBX + 0x18] MOVUPS XMM1,xmmword ptr [RBX + 0x28] MOVUPS xmmword ptr [R14 + 0x20],XMM0 MOVUPS xmmword ptr [R14 + 0x30],XMM1 MOV RAX,qword ptr [RBX + 0x38] MOV qword ptr [R14 + 0x40],RAX LEA RBX,[RSP + 0x58] MOV RDI,qword ptr [RSP] MOV RSI,RBX CALL 0x001062f0 MOV RDI,qword ptr [RBX] LEA RAX,[RSP + 0x68] CMP RDI,RAX JZ 0x00113e61 MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x00106280 LAB_00113e61: MOV RBX,qword ptr [0x0013afb8] LEA RSI,[0x12cb72] MOV EDX,0xd MOV RDI,RBX CALL 0x001062c0 LEA R13,[RSP + 0x18] MOV RDI,R13 MOV RSI,R12 CALL 0x0010c98a MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LAB_00113e94: MOV RDI,RBX CALL 0x001062c0 MOV RBX,RAX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBX MOV ESI,0xa CALL 0x00106250 MOVSX ESI,AL MOV RDI,RBX CALL 0x00106030 MOV RDI,RAX CALL 0x001061a0 LAB_00113ec6: LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00113ee1 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x00106280 LAB_00113ee1: CMP dword ptr [R12],0x69 JNZ 0x0011400b LEA RAX,[R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LEA R15,[R14 + 0x20] LEA R13,[RSP + 0x18] LAB_00113efe: MOV RDX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [R14 + 0x18] MOV RDI,R14 MOV RBP,R12 MOV RSI,R12 CALL 0x00114c10 MOV RSI,qword ptr [R14] MOV RDI,R13 CALL 0x0010a3d6 MOV EAX,dword ptr [RSP + 0x18] MOV dword ptr [R14 + 0x8],EAX LEA RCX,[RSP + 0x20] MOVUPS XMM0,xmmword ptr [RCX] MOV RAX,qword ptr [RSP + 0x10] MOVUPS xmmword ptr [RAX],XMM0 MOV RAX,qword ptr [RCX + 0x30] MOV qword ptr [R15 + 0x20],RAX MOVUPS XMM0,xmmword ptr [RCX + 0x10] MOVUPS XMM1,xmmword ptr [RCX + 0x20] MOVUPS xmmword ptr [R15 + 0x10],XMM1 MOVUPS xmmword ptr [R15],XMM0 MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x58] CALL 0x001062f0 MOV RDI,qword ptr [RSP + 0x58] LEA RAX,[RSP + 0x68] CMP RDI,RAX JZ 0x00113f7a MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x00106280 LAB_00113f7a: MOV EDX,0x1d MOV R12,qword ptr [0x0013afb8] MOV RDI,R12 LEA RSI,[0x12cb80] CALL 0x001062c0 MOV RBX,R13 MOV RDI,R13 MOV RSI,RBP CALL 0x0010c98a MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_00113fad: MOV RDI,R12 CALL 0x001062c0 MOV R13,RAX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,R13 MOV ESI,0xa CALL 0x00106250 MOVSX ESI,AL MOV RDI,R13 CALL 0x00106030 MOV RDI,RAX CALL 0x001061a0 LAB_00113fdf: MOV RDI,qword ptr [RSP + 0x18] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x00113ffb MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x00106280 LAB_00113ffb: MOV R12,RBP CMP dword ptr [RBP],0x69 MOV R13,RBX JZ 0x00113efe LAB_0011400b: LEA RAX,[R14 + 0x68] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS XMM2,xmmword ptr [RAX + 0x20] MOVUPS XMM3,xmmword ptr [RAX + 0x30] MOV RBX,qword ptr [RSP + 0x8] MOVUPS xmmword ptr [RBX + 0x30],XMM3 MOVUPS xmmword ptr [RBX + 0x20],XMM2 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 LEA RDI,[RBX + 0x40] LEA RAX,[RBX + 0x50] MOV qword ptr [RBX + 0x40],RAX MOV RSI,qword ptr [R14 + 0xa8] MOV RDX,qword ptr [R14 + 0xb0] ADD RDX,RSI CALL 0x00109160 MOV RAX,RBX ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* flux::parser::Parser::advance() */ int4 * flux::parser::Parser::advance(void) { 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; int *puVar16; ostream *poVar17; long in_RSI; int4 *in_RDI; int4 local_90; int4 uStack_8c; long local_88; long lStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; long *local_50 [2]; long local_40 [2]; *(int8 *)(in_RSI + 0x98) = *(int8 *)(in_RSI + 0x38); *(int8 *)(in_RSI + 0xa0) = *(int8 *)(in_RSI + 0x40); *(int8 *)(in_RSI + 0x88) = *(int8 *)(in_RSI + 0x28); *(int8 *)(in_RSI + 0x90) = *(int8 *)(in_RSI + 0x30); *(int8 *)(in_RSI + 0x78) = *(int8 *)(in_RSI + 0x18); *(int8 *)(in_RSI + 0x80) = *(int8 *)(in_RSI + 0x20); *(int8 *)(in_RSI + 0x68) = *(int8 *)(in_RSI + 8); *(int8 *)(in_RSI + 0x70) = *(int8 *)(in_RSI + 0x10); std::__cxx11::string::_M_assign((string *)(in_RSI + 0xa8)); if (*(int *)(in_RSI + 8) != 0) { lexer::Tokenizer::nextToken(); *(int4 *)(in_RSI + 8) = local_90; *(long *)(in_RSI + 0x10) = local_88; *(long *)(in_RSI + 0x18) = lStack_80; *(int8 *)(in_RSI + 0x20) = local_78; *(int8 *)(in_RSI + 0x28) = uStack_70; *(int8 *)(in_RSI + 0x30) = local_68; *(int8 *)(in_RSI + 0x38) = uStack_60; *(int8 *)(in_RSI + 0x40) = local_58; std::__cxx11::string::operator=((string *)(in_RSI + 0x48),(string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } puVar16 = PTR_cout_0013afb8; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_0013afb8,"Advanced to: ",0xd); lexer::Token::toString_abi_cxx11_(); /* try { // try from 00113e94 to 00113ec5 has its CatchHandler @ 00114066 */ poVar17 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)puVar16,(char *)CONCAT44(uStack_8c,local_90),local_88); std::ios::widen((char)*(int8 *)(*(long *)poVar17 + -0x18) + (char)poVar17); std::ostream::put((char)poVar17); std::ostream::flush(); if ((long *)CONCAT44(uStack_8c,local_90) != &lStack_80) { operator_delete((long *)CONCAT44(uStack_8c,local_90),lStack_80 + 1); } if (*(int *)(in_RSI + 8) == 0x69) { do { error(); lexer::Tokenizer::nextToken(); *(int4 *)(in_RSI + 8) = local_90; *(long *)(in_RSI + 0x10) = local_88; *(long *)(in_RSI + 0x18) = lStack_80; *(int8 *)(in_RSI + 0x40) = local_58; *(int8 *)(in_RSI + 0x30) = local_68; *(int8 *)(in_RSI + 0x38) = uStack_60; *(int8 *)(in_RSI + 0x20) = local_78; *(int8 *)(in_RSI + 0x28) = uStack_70; std::__cxx11::string::operator=((string *)(in_RSI + 0x48),(string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } puVar16 = PTR_cout_0013afb8; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_0013afb8,"Skipping error, advanced to: ",0x1d); lexer::Token::toString_abi_cxx11_(); /* try { // try from 00113fad to 00113fde has its CatchHandler @ 00114074 */ poVar17 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)puVar16,(char *)CONCAT44(uStack_8c,local_90),local_88); std::ios::widen((char)*(int8 *)(*(long *)poVar17 + -0x18) + (char)poVar17); std::ostream::put((char)poVar17); std::ostream::flush(); if ((long *)CONCAT44(uStack_8c,local_90) != &lStack_80) { operator_delete((long *)CONCAT44(uStack_8c,local_90),lStack_80 + 1); } } while (*(int *)(in_RSI + 8) == 0x69); } } uVar1 = *(int4 *)(in_RSI + 0x68); uVar2 = *(int4 *)(in_RSI + 0x6c); uVar3 = *(int4 *)(in_RSI + 0x70); uVar4 = *(int4 *)(in_RSI + 0x74); uVar5 = *(int4 *)(in_RSI + 0x78); uVar6 = *(int4 *)(in_RSI + 0x7c); uVar7 = *(int4 *)(in_RSI + 0x80); uVar8 = *(int4 *)(in_RSI + 0x84); uVar9 = *(int4 *)(in_RSI + 0x88); uVar10 = *(int4 *)(in_RSI + 0x8c); uVar11 = *(int4 *)(in_RSI + 0x90); uVar12 = *(int4 *)(in_RSI + 0x94); uVar13 = *(int4 *)(in_RSI + 0x9c); uVar14 = *(int4 *)(in_RSI + 0xa0); uVar15 = *(int4 *)(in_RSI + 0xa4); in_RDI[0xc] = *(int4 *)(in_RSI + 0x98); in_RDI[0xd] = uVar13; in_RDI[0xe] = uVar14; in_RDI[0xf] = uVar15; in_RDI[8] = uVar9; in_RDI[9] = uVar10; in_RDI[10] = uVar11; in_RDI[0xb] = uVar12; in_RDI[4] = uVar5; in_RDI[5] = uVar6; in_RDI[6] = uVar7; in_RDI[7] = uVar8; *in_RDI = uVar1; in_RDI[1] = uVar2; in_RDI[2] = uVar3; in_RDI[3] = uVar4; *(int4 **)(in_RDI + 0x10) = in_RDI + 0x14; std::__cxx11::string::_M_construct<char*> (in_RDI + 0x10,*(long *)(in_RSI + 0xa8), *(long *)(in_RSI + 0xb0) + *(long *)(in_RSI + 0xa8)); return in_RDI; }
63,244
layout_values(settings_location)
untodesu[P]voxelius/game/client/settings.cc
static void layout_values(settings_location location) { ImGui::PushItemWidth(ImGui::CalcItemWidth() * 0.70f); for(const SettingValue *value : values[static_cast<unsigned int>(location)]) { value->layout(); } ImGui::PopItemWidth(); }
O3
cpp
layout_values(settings_location): pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx callq 0x10d5aa mulss 0x12d20f(%rip), %xmm0 # 0x198a38 callq 0x10d1fb movl %ebx, %eax leaq (%rax,%rax,2), %rax leaq 0x1effd5(%rip), %rcx # 0x25b810 movq (%rcx,%rax,8), %rbx movq 0x8(%rcx,%rax,8), %r14 cmpq %r14, %rbx je 0x6b858 movq (%rbx), %rdi movq (%rdi), %rax callq *0x10(%rax) addq $0x8, %rbx jmp 0x6b844 addq $0x8, %rsp popq %rbx popq %r14 jmp 0x10d53f
_ZL13layout_values17settings_location: push r14 push rbx push rax mov ebx, edi call _ZN5ImGui13CalcItemWidthEv; ImGui::CalcItemWidth(void) mulss xmm0, cs:flt_198A38; float call _ZN5ImGui13PushItemWidthEf; ImGui::PushItemWidth(float) mov eax, ebx lea rax, [rax+rax*2] lea rcx, _ZL6values; values mov rbx, [rcx+rax*8] mov r14, [rcx+rax*8+8] loc_6B844: cmp rbx, r14 jz short loc_6B858 mov rdi, [rbx]; this mov rax, [rdi] call qword ptr [rax+10h] add rbx, 8 jmp short loc_6B844 loc_6B858: add rsp, 8 pop rbx pop r14 jmp _ZN5ImGui12PopItemWidthEv; ImGui::PopItemWidth(void)
long long layout_values(ImGui *a1, float a2) { _QWORD *v2; // rbx _QWORD *v3; // r14 ImGui::CalcItemWidth(a1); ImGui::PushItemWidth(a1, a2 * 0.69999999); v2 = (_QWORD *)values[3 * (unsigned int)a1]; v3 = (_QWORD *)values[3 * (unsigned int)a1 + 1]; while ( v2 != v3 ) { a1 = (ImGui *)*v2; (*(void ( **)(_QWORD))(*(_QWORD *)*v2 + 16LL))(*v2); ++v2; } return ImGui::PopItemWidth(a1); }
layout_values: PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI CALL 0x0020d5aa MULSS XMM0,dword ptr [0x00298a38] CALL 0x0020d1fb MOV EAX,EBX LEA RAX,[RAX + RAX*0x2] LEA RCX,[0x35b810] MOV RBX,qword ptr [RCX + RAX*0x8] MOV R14,qword ptr [RCX + RAX*0x8 + 0x8] LAB_0016b844: CMP RBX,R14 JZ 0x0016b858 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] ADD RBX,0x8 JMP 0x0016b844 LAB_0016b858: ADD RSP,0x8 POP RBX POP R14 JMP 0x0020d53f
/* layout_values(settings_location) */ void layout_values(uint param_1) { int8 *puVar1; int8 *puVar2; float fVar3; fVar3 = (float)ImGui::CalcItemWidth(); ImGui::PushItemWidth(fVar3 * DAT_00298a38); puVar1 = (int8 *)(&DAT_0035b818)[(ulong)param_1 * 3]; for (puVar2 = (int8 *)(&values)[(ulong)param_1 * 3]; puVar2 != puVar1; puVar2 = puVar2 + 1) { (**(code **)(*(long *)*puVar2 + 0x10))(); } ImGui::PopItemWidth(); return; }
63,245
start_timer
eloqsql/unittest/mytap/tap.c
static ulong start_timer(void) { #if defined(_WIN32) return clock(); #else struct tms tms_tmp; return times(&tms_tmp); #endif }
O0
c
start_timer: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp leaq -0x20(%rbp), %rdi callq 0x1140 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
start_timer: push rbp mov rbp, rsp sub rsp, 20h lea rdi, [rbp+var_20] call _times add rsp, 20h pop rbp retn
long long start_timer() { _BYTE v1[32]; // [rsp+0h] [rbp-20h] BYREF return times(v1); }
start_timer: PUSH RBP MOV RBP,RSP SUB RSP,0x20 LEA RDI,[RBP + -0x20] CALL 0x00101140 ADD RSP,0x20 POP RBP RET
void start_timer(void) { tms local_28; times(&local_28); return; }
63,246
calc_record_size
eloqsql/storage/maria/ma_blockrec.c
static void calc_record_size(MARIA_HA *info, const uchar *record, MARIA_ROW *row) { MARIA_SHARE *share= info->s; uchar *field_length_data; MARIA_COLUMNDEF *column, *end_column; uint *null_field_lengths= row->null_field_lengths; ulong *blob_lengths= row->blob_lengths; DBUG_ENTER("calc_record_size"); row->normal_length= row->char_length= row->varchar_length= row->blob_length= row->extents_count= 0; /* Create empty bitmap and calculate length of each varlength/char field */ bzero(row->empty_bits, share->base.pack_bytes); field_length_data= row->field_lengths; for (column= share->columndef + share->base.fixed_not_null_fields, end_column= share->columndef + share->base.fields; column < end_column; column++, null_field_lengths++) { if ((record[column->null_pos] & column->null_bit)) { if (column->type != FIELD_BLOB) *null_field_lengths= 0; else *blob_lengths++= 0; continue; } switch (column->type) { case FIELD_CHECK: case FIELD_NORMAL: /* Fixed length field */ case FIELD_ZERO: DBUG_ASSERT(column->empty_bit == 0); /* fall through */ case FIELD_SKIP_PRESPACE: /* Not packed */ row->normal_length+= column->length; *null_field_lengths= column->length; break; case FIELD_SKIP_ZERO: /* Fixed length field */ if (memcmp(record+ column->offset, maria_zero_string, column->length) == 0) { row->empty_bits[column->empty_pos] |= column->empty_bit; *null_field_lengths= 0; } else { row->normal_length+= column->length; *null_field_lengths= column->length; } break; case FIELD_SKIP_ENDSPACE: /* CHAR */ { const uchar *pos, *end; for (pos= record + column->offset, end= pos + column->length; end > pos && end[-1] == ' '; end--) ; if (pos == end) /* If empty string */ { row->empty_bits[column->empty_pos]|= column->empty_bit; *null_field_lengths= 0; } else { uint length= (uint) (end - pos); if (column->length <= 255) *field_length_data++= (uchar) length; else { int2store(field_length_data, length); field_length_data+= 2; } row->char_length+= length; *null_field_lengths= length; } break; } case FIELD_VARCHAR: { uint length, field_length_data_length; const uchar *field_pos= record + column->offset; /* 256 is correct as this includes the length uchar */ field_length_data[0]= field_pos[0]; if (column->length <= 256) { length= (uint) (uchar) *field_pos; field_length_data_length= 1; } else { length= uint2korr(field_pos); field_length_data[1]= field_pos[1]; field_length_data_length= 2; } *null_field_lengths= length; if (!length) { row->empty_bits[column->empty_pos]|= column->empty_bit; break; } row->varchar_length+= length; *null_field_lengths= length; field_length_data+= field_length_data_length; break; } case FIELD_BLOB: { const uchar *field_pos= record + column->offset; uint size_length= column->length - portable_sizeof_char_ptr; ulong blob_length= _ma_calc_blob_length(size_length, field_pos); *blob_lengths++= blob_length; if (!blob_length) row->empty_bits[column->empty_pos]|= column->empty_bit; else { row->blob_length+= blob_length; memcpy(field_length_data, field_pos, size_length); field_length_data+= size_length; } break; } default: DBUG_ASSERT(0); } } row->field_lengths_length= (uint) (field_length_data - row->field_lengths); /* - info->row_base_length is base information we must have on a page in first extent: - flag byte (1) + is_nulls_extended (0 | 1) + null_bytes + pack_bytes + table_checksum (0 | 1) - row->min_length is minimum amount of data we must store on a page. bitmap code will ensure we get at list this much + total number of extents and one extent information - fixed_not_null_fields_length is length of fixed length fields that can't be compacted - head_length is the amount of data for the head page (ie, all fields except blobs) */ row->min_length= (info->row_base_length + (share->base.max_field_lengths ? size_to_store_key_length(row->field_lengths_length) : 0)); row->head_length= (row->min_length + share->base.fixed_not_null_fields_length + row->field_lengths_length + row->normal_length + row->char_length + row->varchar_length); row->total_length= (row->head_length + row->blob_length); if (row->total_length < share->base.min_block_length) row->total_length= share->base.min_block_length; DBUG_PRINT("exit", ("head_length: %lu total_length: %lu", (ulong) row->head_length, (ulong) row->total_length)); DBUG_VOID_RETURN; }
O3
c
calc_record_size: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r13 movq %rsi, %r15 movq %rdi, -0x68(%rbp) movq (%rdi), %rbx movq 0x48(%rdx), %rdi movq 0x58(%rdx), %r14 movq 0x60(%rdx), %r12 movl $0x0, 0xac(%rdx) xorps %xmm0, %xmm0 movups %xmm0, 0x70(%rdx) movups %xmm0, 0x80(%rdx) movl 0x3f4(%rbx), %edx xorl %esi, %esi callq 0x292a0 movq 0x50(%r13), %rsi movl 0x3c8(%rbx), %ecx movl 0x3cc(%rbx), %eax cmpl %ecx, %eax jae 0x4c27e leaq 0x70(%r13), %r9 movq %rbx, -0x60(%rbp) movq 0x588(%rbx), %rdx imulq $0x38, %rcx, %r10 addq %rdx, %r10 imulq $0x38, %rax, %rbx addq %rdx, %rbx leaq 0x96936(%rip), %r11 # 0xe296c movq %r9, -0x48(%rbp) movq %r10, -0x40(%rbp) movq %r13, -0x58(%rbp) movq %r15, -0x50(%rbp) movzwl 0xe(%rbx), %ecx movb 0x12(%rbx), %dl movl (%rbx), %eax testb %dl, (%r15,%rcx) je 0x4c06b cmpl $0x4, %eax jne 0x4c092 movq $0x0, (%r12) addq $0x8, %r12 jmp 0x4c263 cmpl $0x9, %eax ja 0x4c263 movl %eax, %eax movslq (%r11,%rax,4), %rax addq %r11, %rax jmpq *%rax movzwl 0x8(%rbx), %eax addq %rax, (%r9) movzwl 0x8(%rbx), %eax movl %eax, (%r14) jmp 0x4c263 movl $0x0, (%r14) jmp 0x4c263 movq %r12, -0x30(%rbp) movq %rsi, -0x38(%rbp) movl 0x4(%rbx), %edi addq %r15, %rdi movzwl 0x8(%rbx), %r12d leaq 0x3b2958(%rip), %rsi # 0x3fea10 movq %r12, %rdx callq 0x29560 testl %eax, %eax je 0x4c1de movq -0x48(%rbp), %r9 addq %r12, (%r9) movzwl 0x8(%rbx), %eax movl %eax, (%r14) movq -0x38(%rbp), %rsi movq -0x30(%rbp), %r12 jmp 0x4c21f movq %rsi, -0x38(%rbp) movl 0x4(%rbx), %r13d addq %r15, %r13 movzwl 0x8(%rbx), %r15d addl $-0x8, %r15d movl %r15d, %edi movq %r13, %rsi callq 0x4a0eb movq %rax, (%r12) addq $0x8, %r12 movq %r12, -0x30(%rbp) testq %rax, %rax je 0x4c1fd movq -0x58(%rbp), %rcx addq %rax, 0x88(%rcx) movl %r15d, %r15d movq -0x38(%rbp), %r12 movq %r12, %rdi movq %r13, %rsi movq %rcx, %r13 movq %r15, %rdx callq 0x29080 movq %r12, %rsi addq %r15, %rsi jmp 0x4c213 movl 0x4(%rbx), %eax movb (%r15,%rax), %cl movb %cl, (%rsi) cmpw $0x100, 0x8(%rbx) # imm = 0x100 ja 0x4c1b6 movzbl (%r15,%rax), %eax movl $0x1, %ecx jmp 0x4c1c3 movq %rsi, %r8 movl 0x4(%rbx), %eax addq %r15, %rax movzwl 0x8(%rbx), %ecx movq %rax, %rsi xorl %edi, %edi movq %rdi, %rdx leaq (%rsi,%rcx), %rdi cmpq %rax, %rdi jbe 0x4c18f leaq 0x1(%rdx), %rdi cmpb $0x20, -0x1(%rsi,%rcx) leaq -0x1(%rsi), %rsi je 0x4c174 movq %rcx, %rax subq %rdx, %rax je 0x4c23c cmpl $0xff, %ecx movq %r8, %rsi ja 0x4c251 subl %edx, %ecx movb %cl, (%rsi) incq %rsi jmp 0x4c25a movzwl (%r15,%rax), %eax movb %ah, 0x1(%rsi) movl $0x2, %ecx movl %eax, (%r14) testl %eax, %eax je 0x4c22c movl %eax, %edx addq %rdx, 0x80(%r13) movl %eax, (%r14) addq %rcx, %rsi jmp 0x4c263 movb 0x13(%rbx), %al movq 0x48(%r13), %rcx movzwl 0x10(%rbx), %edx orb %al, (%rcx,%rdx) movl $0x0, (%r14) movq -0x38(%rbp), %rsi movq -0x30(%rbp), %r12 jmp 0x4c21b movb 0x13(%rbx), %al movq -0x58(%rbp), %r13 movq 0x48(%r13), %rcx movzwl 0x10(%rbx), %edx orb %al, (%rcx,%rdx) movq -0x38(%rbp), %rsi movq -0x30(%rbp), %r12 movq -0x50(%rbp), %r15 movq -0x48(%rbp), %r9 movq -0x40(%rbp), %r10 leaq 0x96742(%rip), %r11 # 0xe296c jmp 0x4c263 movb 0x13(%rbx), %al movq 0x48(%r13), %rcx movzwl 0x10(%rbx), %edx orb %al, (%rcx,%rdx) jmp 0x4c263 movb 0x13(%rbx), %al movq 0x48(%r13), %rcx movzwl 0x10(%rbx), %edx orb %al, (%rcx,%rdx) xorl %eax, %eax movq %r8, %rsi jmp 0x4c260 subl %edx, %ecx movw %cx, (%rsi) addq $0x2, %rsi movl %eax, %ecx addq %rcx, 0x78(%r13) movl %eax, (%r14) addq $0x38, %rbx addq $0x4, %r14 cmpq %r10, %rbx jb 0x4c046 movq 0x50(%r13), %rax movq -0x60(%rbp), %rbx jmp 0x4c281 movq %rsi, %rax subq %rax, %rsi movl %esi, 0xa8(%r13) xorl %eax, %eax cmpl $0xff, %esi setae %al xorl %ecx, %ecx cmpl $0x0, 0x3d4(%rbx) leaq 0x1(%rax,%rax), %rax cmovneq %rax, %rcx movq -0x68(%rbp), %rax addq 0x610(%rax), %rcx movq %rcx, 0x68(%r13) movl 0x3d0(%rbx), %eax addq %rsi, %rax addq 0x70(%r13), %rax addq %rcx, %rax addq 0x78(%r13), %rax addq 0x80(%r13), %rax movl %eax, 0xa0(%r13) movl %eax, %eax addq 0x88(%r13), %rax movq %rax, 0x90(%r13) movq 0x3b8(%rbx), %rcx cmpq %rcx, %rax cmovbeq %rcx, %rax movq %rax, 0x90(%r13) addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
calc_record_size: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, rdx mov r15, rsi mov [rbp+var_68], rdi mov rbx, [rdi] mov rdi, [rdx+48h] mov r14, [rdx+58h] mov r12, [rdx+60h] mov dword ptr [rdx+0ACh], 0 xorps xmm0, xmm0 movups xmmword ptr [rdx+70h], xmm0 movups xmmword ptr [rdx+80h], xmm0 mov edx, [rbx+3F4h] xor esi, esi call _memset mov rsi, [r13+50h] mov ecx, [rbx+3C8h] mov eax, [rbx+3CCh] cmp eax, ecx jnb loc_4C27E lea r9, [r13+70h] mov [rbp+var_60], rbx mov rdx, [rbx+588h] imul r10, rcx, 38h ; '8' add r10, rdx imul rbx, rax, 38h ; '8' add rbx, rdx lea r11, jpt_4C07D mov [rbp+var_48], r9 mov [rbp+var_40], r10 mov [rbp+var_58], r13 mov [rbp+var_50], r15 loc_4C046: movzx ecx, word ptr [rbx+0Eh] mov dl, [rbx+12h] mov eax, [rbx] test [r15+rcx], dl jz short loc_4C06B cmp eax, 4 jnz short loc_4C092 mov qword ptr [r12], 0 add r12, 8 jmp def_4C07D; jumptable 000000000004C07D default case, cases 5,6 loc_4C06B: cmp eax, 9; switch 10 cases ja def_4C07D; jumptable 000000000004C07D default case, cases 5,6 mov eax, eax movsxd rax, ds:(jpt_4C07D - 0E296Ch)[r11+rax*4] add rax, r11 jmp rax; switch jump loc_4C07F: movzx eax, word ptr [rbx+8]; jumptable 000000000004C07D cases 0,2,7,9 add [r9], rax movzx eax, word ptr [rbx+8] mov [r14], eax jmp def_4C07D; jumptable 000000000004C07D default case, cases 5,6 loc_4C092: mov dword ptr [r14], 0 jmp def_4C07D; jumptable 000000000004C07D default case, cases 5,6 loc_4C09E: mov [rbp+var_30], r12; jumptable 000000000004C07D case 3 mov [rbp+var_38], rsi mov edi, [rbx+4] add rdi, r15 movzx r12d, word ptr [rbx+8] lea rsi, maria_zero_string mov rdx, r12 call _bcmp test eax, eax jz loc_4C1DE mov r9, [rbp+var_48] add [r9], r12 movzx eax, word ptr [rbx+8] mov [r14], eax mov rsi, [rbp+var_38] mov r12, [rbp+var_30] jmp loc_4C21F loc_4C0E3: mov [rbp+var_38], rsi; jumptable 000000000004C07D case 4 mov r13d, [rbx+4] add r13, r15 movzx r15d, word ptr [rbx+8] add r15d, 0FFFFFFF8h mov edi, r15d mov rsi, r13 call _ma_calc_blob_length mov [r12], rax add r12, 8 mov [rbp+var_30], r12 test rax, rax jz loc_4C1FD mov rcx, [rbp+var_58] add [rcx+88h], rax mov r15d, r15d mov r12, [rbp+var_38] mov rdi, r12 mov rsi, r13 mov r13, rcx mov rdx, r15 call _memcpy mov rsi, r12 add rsi, r15 jmp loc_4C213 loc_4C145: mov eax, [rbx+4]; jumptable 000000000004C07D case 8 mov cl, [r15+rax] mov [rsi], cl cmp word ptr [rbx+8], 100h ja short loc_4C1B6 movzx eax, byte ptr [r15+rax] mov ecx, 1 jmp short loc_4C1C3 loc_4C162: mov r8, rsi; jumptable 000000000004C07D case 1 mov eax, [rbx+4] add rax, r15 movzx ecx, word ptr [rbx+8] mov rsi, rax xor edi, edi loc_4C174: mov rdx, rdi lea rdi, [rsi+rcx] cmp rdi, rax jbe short loc_4C18F lea rdi, [rdx+1] cmp byte ptr [rsi+rcx-1], 20h ; ' ' lea rsi, [rsi-1] jz short loc_4C174 loc_4C18F: mov rax, rcx sub rax, rdx jz loc_4C23C cmp ecx, 0FFh mov rsi, r8 ja loc_4C251 sub ecx, edx mov [rsi], cl inc rsi jmp loc_4C25A loc_4C1B6: movzx eax, word ptr [r15+rax] mov [rsi+1], ah mov ecx, 2 loc_4C1C3: mov [r14], eax test eax, eax jz short loc_4C22C mov edx, eax add [r13+80h], rdx mov [r14], eax add rsi, rcx jmp def_4C07D; jumptable 000000000004C07D default case, cases 5,6 loc_4C1DE: mov al, [rbx+13h] mov rcx, [r13+48h] movzx edx, word ptr [rbx+10h] or [rcx+rdx], al mov dword ptr [r14], 0 mov rsi, [rbp+var_38] mov r12, [rbp+var_30] jmp short loc_4C21B loc_4C1FD: mov al, [rbx+13h] mov r13, [rbp+var_58] mov rcx, [r13+48h] movzx edx, word ptr [rbx+10h] or [rcx+rdx], al mov rsi, [rbp+var_38] loc_4C213: mov r12, [rbp+var_30] mov r15, [rbp+var_50] loc_4C21B: mov r9, [rbp+var_48] loc_4C21F: mov r10, [rbp+var_40] lea r11, jpt_4C07D jmp short def_4C07D; jumptable 000000000004C07D default case, cases 5,6 loc_4C22C: mov al, [rbx+13h] mov rcx, [r13+48h] movzx edx, word ptr [rbx+10h] or [rcx+rdx], al jmp short def_4C07D; jumptable 000000000004C07D default case, cases 5,6 loc_4C23C: mov al, [rbx+13h] mov rcx, [r13+48h] movzx edx, word ptr [rbx+10h] or [rcx+rdx], al xor eax, eax mov rsi, r8 jmp short loc_4C260 loc_4C251: sub ecx, edx mov [rsi], cx add rsi, 2 loc_4C25A: mov ecx, eax add [r13+78h], rcx loc_4C260: mov [r14], eax def_4C07D: add rbx, 38h ; '8'; jumptable 000000000004C07D default case, cases 5,6 add r14, 4 cmp rbx, r10 jb loc_4C046 mov rax, [r13+50h] mov rbx, [rbp+var_60] jmp short loc_4C281 loc_4C27E: mov rax, rsi loc_4C281: sub rsi, rax mov [r13+0A8h], esi xor eax, eax cmp esi, 0FFh setnb al xor ecx, ecx cmp dword ptr [rbx+3D4h], 0 lea rax, [rax+rax+1] cmovnz rcx, rax mov rax, [rbp+var_68] add rcx, [rax+610h] mov [r13+68h], rcx mov eax, [rbx+3D0h] add rax, rsi add rax, [r13+70h] add rax, rcx add rax, [r13+78h] add rax, [r13+80h] mov [r13+0A0h], eax mov eax, eax add rax, [r13+88h] mov [r13+90h], rax mov rcx, [rbx+3B8h] cmp rax, rcx cmovbe rax, rcx mov [r13+90h], rax add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long calc_record_size(long long *a1, long long a2, long long a3) { long long v3; // r13 long long v5; // rbx long long v6; // rdi unsigned int *v7; // r14 unsigned long long *v8; // r12 _BYTE *v9; // rsi long long v10; // rcx long long v11; // rax _QWORD *v12; // r9 long long v13; // rdx unsigned long long v14; // r10 int *v15; // rbx int v16; // eax long long v17; // r12 unsigned __int8 *v18; // r13 unsigned int v19; // r15d unsigned long long v20; // rax unsigned __int8 *v21; // rsi long long v22; // rax unsigned int v23; // eax long long v24; // rcx _WORD *v25; // r8 long long v26; // rcx long long v27; // rsi long long v28; // rdi long long v29; // rdx bool v30; // zf unsigned int v31; // eax long long v32; // rax _BYTE *v33; // rsi long long v34; // rcx long long v35; // rcx _BYTE *v36; // rax unsigned long long result; // rax long long v39; // [rsp+10h] [rbp-60h] long long v40; // [rsp+18h] [rbp-58h] long long v41; // [rsp+20h] [rbp-50h] _QWORD *v42; // [rsp+28h] [rbp-48h] unsigned long long v43; // [rsp+30h] [rbp-40h] _BYTE *v44; // [rsp+38h] [rbp-38h] unsigned long long *v45; // [rsp+40h] [rbp-30h] v3 = a3; v5 = *a1; v6 = *(_QWORD *)(a3 + 72); v7 = *(unsigned int **)(a3 + 88); v8 = *(unsigned long long **)(a3 + 96); *(_DWORD *)(a3 + 172) = 0; *(_OWORD *)(a3 + 112) = 0LL; *(_OWORD *)(a3 + 128) = 0LL; memset(v6, 0LL, *(unsigned int *)(v5 + 1012)); v9 = *(_BYTE **)(v3 + 80); v10 = *(unsigned int *)(v5 + 968); v11 = *(unsigned int *)(v5 + 972); if ( (unsigned int)v11 >= (unsigned int)v10 ) { v32 = *(_QWORD *)(v3 + 80); } else { v12 = (_QWORD *)(v3 + 112); v39 = v5; v13 = *(_QWORD *)(v5 + 1416); v14 = v13 + 56 * v10; v15 = (int *)(v13 + 56 * v11); v42 = (_QWORD *)(v3 + 112); v43 = v14; v40 = v3; v41 = a2; do { v16 = *v15; if ( (*((_BYTE *)v15 + 18) & *(_BYTE *)(a2 + *((unsigned __int16 *)v15 + 7))) != 0 ) { if ( v16 == 4 ) *v8++ = 0LL; else *v7 = 0; } else { switch ( v16 ) { case 0: case 2: case 7: case 9: *v12 += *((unsigned __int16 *)v15 + 4); *v7 = *((unsigned __int16 *)v15 + 4); break; case 1: v25 = v9; v26 = *((unsigned __int16 *)v15 + 4); v27 = a2 + (unsigned int)v15[1]; v28 = 0LL; do { v29 = v28; if ( v27 + v26 <= a2 + (unsigned long long)(unsigned int)v15[1] ) break; ++v28; v30 = *(_BYTE *)(v27 + v26 - 1) == 32; --v27; } while ( v30 ); v31 = v26 - v29; if ( v26 == v29 ) { *(_BYTE *)(*(_QWORD *)(v3 + 72) + *((unsigned __int16 *)v15 + 8)) |= *((_BYTE *)v15 + 19); v31 = 0; v9 = v25; } else { if ( (unsigned int)v26 > 0xFF ) { *v25 = v26 - v29; v9 = v25 + 1; } else { *(_BYTE *)v25 = v26 - v29; v9 = (char *)v25 + 1; } *(_QWORD *)(v3 + 120) += v31; } *v7 = v31; break; case 3: v45 = v8; v17 = *((unsigned __int16 *)v15 + 4); if ( (unsigned int)bcmp(a2 + (unsigned int)v15[1], &maria_zero_string, v17) ) { v12 = v42; *v42 += v17; *v7 = *((unsigned __int16 *)v15 + 4); v8 = v45; goto LABEL_28; } *(_BYTE *)(*(_QWORD *)(v3 + 72) + *((unsigned __int16 *)v15 + 8)) |= *((_BYTE *)v15 + 19); *v7 = 0; v8 = v45; goto LABEL_27; case 4: v44 = v9; v18 = (unsigned __int8 *)(a2 + (unsigned int)v15[1]); v19 = *((unsigned __int16 *)v15 + 4) - 8; v20 = ma_calc_blob_length(v19, v18); *v8 = v20; if ( v20 ) { *(_QWORD *)(v40 + 136) += v20; v21 = v18; v3 = v40; memcpy(v44, v21, v19); v9 = &v44[v19]; } else { v3 = v40; *(_BYTE *)(*(_QWORD *)(v40 + 72) + *((unsigned __int16 *)v15 + 8)) |= *((_BYTE *)v15 + 19); } ++v8; a2 = v41; LABEL_27: v12 = v42; LABEL_28: v14 = v43; break; case 8: v22 = (unsigned int)v15[1]; *v9 = *(_BYTE *)(a2 + v22); if ( *((_WORD *)v15 + 4) > 0x100u ) { v23 = *(unsigned __int16 *)(a2 + v22); v9[1] = BYTE1(v23); v24 = 2LL; } else { v23 = *(unsigned __int8 *)(a2 + v22); v24 = 1LL; } *v7 = v23; if ( v23 ) { *(_QWORD *)(v3 + 128) += v23; *v7 = v23; v9 += v24; } else { *(_BYTE *)(*(_QWORD *)(v3 + 72) + *((unsigned __int16 *)v15 + 8)) |= *((_BYTE *)v15 + 19); } break; default: break; } } v15 += 14; ++v7; } while ( (unsigned long long)v15 < v14 ); v32 = *(_QWORD *)(v3 + 80); v5 = v39; } v33 = &v9[-v32]; *(_DWORD *)(v3 + 168) = (_DWORD)v33; v34 = 0LL; if ( *(_DWORD *)(v5 + 980) ) v34 = 2LL * ((unsigned int)v33 >= 0xFF) + 1; v35 = a1[194] + v34; *(_QWORD *)(v3 + 104) = v35; v36 = &v33[*(unsigned int *)(v5 + 976) + *(_QWORD *)(v3 + 112) + v35 + *(_QWORD *)(v3 + 120) + *(_QWORD *)(v3 + 128)]; *(_DWORD *)(v3 + 160) = (_DWORD)v36; result = *(_QWORD *)(v3 + 136) + (unsigned int)v36; *(_QWORD *)(v3 + 144) = result; if ( result <= *(_QWORD *)(v5 + 952) ) result = *(_QWORD *)(v5 + 952); *(_QWORD *)(v3 + 144) = result; return result; }
calc_record_size: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,RDX MOV R15,RSI MOV qword ptr [RBP + -0x68],RDI MOV RBX,qword ptr [RDI] MOV RDI,qword ptr [RDX + 0x48] MOV R14,qword ptr [RDX + 0x58] MOV R12,qword ptr [RDX + 0x60] MOV dword ptr [RDX + 0xac],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDX + 0x70],XMM0 MOVUPS xmmword ptr [RDX + 0x80],XMM0 MOV EDX,dword ptr [RBX + 0x3f4] XOR ESI,ESI CALL 0x001292a0 MOV RSI,qword ptr [R13 + 0x50] MOV ECX,dword ptr [RBX + 0x3c8] MOV EAX,dword ptr [RBX + 0x3cc] CMP EAX,ECX JNC 0x0014c27e LEA R9,[R13 + 0x70] MOV qword ptr [RBP + -0x60],RBX MOV RDX,qword ptr [RBX + 0x588] IMUL R10,RCX,0x38 ADD R10,RDX IMUL RBX,RAX,0x38 ADD RBX,RDX LEA R11,[0x1e296c] MOV qword ptr [RBP + -0x48],R9 MOV qword ptr [RBP + -0x40],R10 MOV qword ptr [RBP + -0x58],R13 MOV qword ptr [RBP + -0x50],R15 LAB_0014c046: MOVZX ECX,word ptr [RBX + 0xe] MOV DL,byte ptr [RBX + 0x12] MOV EAX,dword ptr [RBX] TEST byte ptr [R15 + RCX*0x1],DL JZ 0x0014c06b CMP EAX,0x4 JNZ 0x0014c092 MOV qword ptr [R12],0x0 ADD R12,0x8 JMP 0x0014c263 LAB_0014c06b: CMP EAX,0x9 JA 0x0014c263 MOV EAX,EAX MOVSXD RAX,dword ptr [R11 + RAX*0x4] ADD RAX,R11 switchD: JMP RAX caseD_0: MOVZX EAX,word ptr [RBX + 0x8] ADD qword ptr [R9],RAX MOVZX EAX,word ptr [RBX + 0x8] MOV dword ptr [R14],EAX JMP 0x0014c263 LAB_0014c092: MOV dword ptr [R14],0x0 JMP 0x0014c263 caseD_3: MOV qword ptr [RBP + -0x30],R12 MOV qword ptr [RBP + -0x38],RSI MOV EDI,dword ptr [RBX + 0x4] ADD RDI,R15 MOVZX R12D,word ptr [RBX + 0x8] LEA RSI,[0x4fea10] MOV RDX,R12 CALL 0x00129560 TEST EAX,EAX JZ 0x0014c1de MOV R9,qword ptr [RBP + -0x48] ADD qword ptr [R9],R12 MOVZX EAX,word ptr [RBX + 0x8] MOV dword ptr [R14],EAX MOV RSI,qword ptr [RBP + -0x38] MOV R12,qword ptr [RBP + -0x30] JMP 0x0014c21f caseD_4: MOV qword ptr [RBP + -0x38],RSI MOV R13D,dword ptr [RBX + 0x4] ADD R13,R15 MOVZX R15D,word ptr [RBX + 0x8] ADD R15D,-0x8 MOV EDI,R15D MOV RSI,R13 CALL 0x0014a0eb MOV qword ptr [R12],RAX ADD R12,0x8 MOV qword ptr [RBP + -0x30],R12 TEST RAX,RAX JZ 0x0014c1fd MOV RCX,qword ptr [RBP + -0x58] ADD qword ptr [RCX + 0x88],RAX MOV R15D,R15D MOV R12,qword ptr [RBP + -0x38] MOV RDI,R12 MOV RSI,R13 MOV R13,RCX MOV RDX,R15 CALL 0x00129080 MOV RSI,R12 ADD RSI,R15 JMP 0x0014c213 caseD_8: MOV EAX,dword ptr [RBX + 0x4] MOV CL,byte ptr [R15 + RAX*0x1] MOV byte ptr [RSI],CL CMP word ptr [RBX + 0x8],0x100 JA 0x0014c1b6 MOVZX EAX,byte ptr [R15 + RAX*0x1] MOV ECX,0x1 JMP 0x0014c1c3 caseD_1: MOV R8,RSI MOV EAX,dword ptr [RBX + 0x4] ADD RAX,R15 MOVZX ECX,word ptr [RBX + 0x8] MOV RSI,RAX XOR EDI,EDI LAB_0014c174: MOV RDX,RDI LEA RDI,[RSI + RCX*0x1] CMP RDI,RAX JBE 0x0014c18f LEA RDI,[RDX + 0x1] CMP byte ptr [RSI + RCX*0x1 + -0x1],0x20 LEA RSI,[RSI + -0x1] JZ 0x0014c174 LAB_0014c18f: MOV RAX,RCX SUB RAX,RDX JZ 0x0014c23c CMP ECX,0xff MOV RSI,R8 JA 0x0014c251 SUB ECX,EDX MOV byte ptr [RSI],CL INC RSI JMP 0x0014c25a LAB_0014c1b6: MOVZX EAX,word ptr [R15 + RAX*0x1] MOV byte ptr [RSI + 0x1],AH MOV ECX,0x2 LAB_0014c1c3: MOV dword ptr [R14],EAX TEST EAX,EAX JZ 0x0014c22c MOV EDX,EAX ADD qword ptr [R13 + 0x80],RDX MOV dword ptr [R14],EAX ADD RSI,RCX JMP 0x0014c263 LAB_0014c1de: MOV AL,byte ptr [RBX + 0x13] MOV RCX,qword ptr [R13 + 0x48] MOVZX EDX,word ptr [RBX + 0x10] OR byte ptr [RCX + RDX*0x1],AL MOV dword ptr [R14],0x0 MOV RSI,qword ptr [RBP + -0x38] MOV R12,qword ptr [RBP + -0x30] JMP 0x0014c21b LAB_0014c1fd: MOV AL,byte ptr [RBX + 0x13] MOV R13,qword ptr [RBP + -0x58] MOV RCX,qword ptr [R13 + 0x48] MOVZX EDX,word ptr [RBX + 0x10] OR byte ptr [RCX + RDX*0x1],AL MOV RSI,qword ptr [RBP + -0x38] LAB_0014c213: MOV R12,qword ptr [RBP + -0x30] MOV R15,qword ptr [RBP + -0x50] LAB_0014c21b: MOV R9,qword ptr [RBP + -0x48] LAB_0014c21f: MOV R10,qword ptr [RBP + -0x40] LEA R11,[0x1e296c] JMP 0x0014c263 LAB_0014c22c: MOV AL,byte ptr [RBX + 0x13] MOV RCX,qword ptr [R13 + 0x48] MOVZX EDX,word ptr [RBX + 0x10] OR byte ptr [RCX + RDX*0x1],AL JMP 0x0014c263 LAB_0014c23c: MOV AL,byte ptr [RBX + 0x13] MOV RCX,qword ptr [R13 + 0x48] MOVZX EDX,word ptr [RBX + 0x10] OR byte ptr [RCX + RDX*0x1],AL XOR EAX,EAX MOV RSI,R8 JMP 0x0014c260 LAB_0014c251: SUB ECX,EDX MOV word ptr [RSI],CX ADD RSI,0x2 LAB_0014c25a: MOV ECX,EAX ADD qword ptr [R13 + 0x78],RCX LAB_0014c260: MOV dword ptr [R14],EAX caseD_5: ADD RBX,0x38 ADD R14,0x4 CMP RBX,R10 JC 0x0014c046 MOV RAX,qword ptr [R13 + 0x50] MOV RBX,qword ptr [RBP + -0x60] JMP 0x0014c281 LAB_0014c27e: MOV RAX,RSI LAB_0014c281: SUB RSI,RAX MOV dword ptr [R13 + 0xa8],ESI XOR EAX,EAX CMP ESI,0xff SETNC AL XOR ECX,ECX CMP dword ptr [RBX + 0x3d4],0x0 LEA RAX,[RAX + RAX*0x1 + 0x1] CMOVNZ RCX,RAX MOV RAX,qword ptr [RBP + -0x68] ADD RCX,qword ptr [RAX + 0x610] MOV qword ptr [R13 + 0x68],RCX MOV EAX,dword ptr [RBX + 0x3d0] ADD RAX,RSI ADD RAX,qword ptr [R13 + 0x70] ADD RAX,RCX ADD RAX,qword ptr [R13 + 0x78] ADD RAX,qword ptr [R13 + 0x80] MOV dword ptr [R13 + 0xa0],EAX MOV EAX,EAX ADD RAX,qword ptr [R13 + 0x88] MOV qword ptr [R13 + 0x90],RAX MOV RCX,qword ptr [RBX + 0x3b8] CMP RAX,RCX CMOVBE RAX,RCX MOV qword ptr [R13 + 0x90],RAX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void calc_record_size(long *param_1,long param_2,long param_3) { long *plVar1; byte *pbVar2; long lVar3; ushort uVar4; long lVar5; int iVar6; uint uVar7; ulong uVar8; short *psVar9; ulong uVar10; long lVar11; long lVar12; int *piVar13; uint uVar14; short *__dest; long lVar15; long *plVar16; uint *puVar17; uint uVar18; lVar5 = *param_1; puVar17 = *(uint **)(param_3 + 0x58); plVar16 = *(long **)(param_3 + 0x60); *(int4 *)(param_3 + 0xac) = 0; *(int8 *)(param_3 + 0x70) = 0; *(int8 *)(param_3 + 0x78) = 0; *(int8 *)(param_3 + 0x80) = 0; *(int8 *)(param_3 + 0x88) = 0; memset(*(void **)(param_3 + 0x48),0,(ulong)*(uint *)(lVar5 + 0x3f4)); psVar9 = *(short **)(param_3 + 0x50); uVar14 = *(uint *)(lVar5 + 0x3c8); __dest = psVar9; if (*(uint *)(lVar5 + 0x3cc) < uVar14) { plVar1 = (long *)(param_3 + 0x70); lVar12 = *(long *)(lVar5 + 0x588); piVar13 = (int *)((ulong)*(uint *)(lVar5 + 0x3cc) * 0x38 + lVar12); do { if ((*(byte *)(param_2 + (ulong)*(ushort *)((long)piVar13 + 0xe)) & *(byte *)((long)piVar13 + 0x12)) == 0) { switch(*piVar13) { case 0: case 2: case 7: case 9: *plVar1 = *plVar1 + (ulong)*(ushort *)(piVar13 + 2); *puVar17 = (uint)*(ushort *)(piVar13 + 2); break; case 1: uVar4 = *(ushort *)(piVar13 + 2); uVar8 = (ulong)uVar4; uVar10 = (ulong)(uint)piVar13[1] + param_2; lVar11 = 0; do { lVar15 = lVar11; if (uVar10 + uVar8 <= (ulong)(uint)piVar13[1] + param_2) break; lVar3 = uVar10 - 1; uVar10 = uVar10 - 1; lVar11 = lVar15 + 1; } while (*(char *)(lVar3 + uVar8) == ' '); uVar8 = uVar8 - lVar15; if (uVar8 == 0) { pbVar2 = (byte *)(*(long *)(param_3 + 0x48) + (ulong)*(ushort *)(piVar13 + 4)); *pbVar2 = *pbVar2 | *(byte *)((long)piVar13 + 0x13); uVar8 = 0; } else { if (uVar4 < 0x100) { *(char *)__dest = (char)uVar4 - (char)lVar15; __dest = (short *)((long)__dest + 1); } else { *__dest = uVar4 - (short)lVar15; __dest = __dest + 1; } *(long *)(param_3 + 0x78) = *(long *)(param_3 + 0x78) + (uVar8 & 0xffffffff); } *puVar17 = (uint)uVar8; break; case 3: uVar4 = *(ushort *)(piVar13 + 2); iVar6 = bcmp((void *)((ulong)(uint)piVar13[1] + param_2),maria_zero_string,(ulong)uVar4); if (iVar6 == 0) { pbVar2 = (byte *)(*(long *)(param_3 + 0x48) + (ulong)*(ushort *)(piVar13 + 4)); *pbVar2 = *pbVar2 | *(byte *)((long)piVar13 + 0x13); *puVar17 = 0; } else { *plVar1 = *plVar1 + (ulong)uVar4; *puVar17 = (uint)*(ushort *)(piVar13 + 2); } break; case 4: uVar7 = piVar13[1]; uVar18 = *(ushort *)(piVar13 + 2) - 8; lVar11 = _ma_calc_blob_length(uVar18,(void *)((ulong)uVar7 + param_2)); *plVar16 = lVar11; plVar16 = plVar16 + 1; if (lVar11 == 0) { pbVar2 = (byte *)(*(long *)(param_3 + 0x48) + (ulong)*(ushort *)(piVar13 + 4)); *pbVar2 = *pbVar2 | *(byte *)((long)piVar13 + 0x13); } else { *(long *)(param_3 + 0x88) = *(long *)(param_3 + 0x88) + lVar11; memcpy(__dest,(void *)((ulong)uVar7 + param_2),(ulong)uVar18); __dest = (short *)((long)__dest + (ulong)uVar18); } break; case 8: uVar10 = (ulong)(uint)piVar13[1]; *(char *)__dest = *(char *)(param_2 + uVar10); if (*(ushort *)(piVar13 + 2) < 0x101) { uVar7 = (uint)*(byte *)(param_2 + uVar10); lVar11 = 1; } else { uVar7 = (uint)*(ushort *)(param_2 + uVar10); *(char *)((long)__dest + 1) = (char)(*(ushort *)(param_2 + uVar10) >> 8); lVar11 = 2; } *puVar17 = uVar7; if (uVar7 == 0) { pbVar2 = (byte *)(*(long *)(param_3 + 0x48) + (ulong)*(ushort *)(piVar13 + 4)); *pbVar2 = *pbVar2 | *(byte *)((long)piVar13 + 0x13); } else { *(long *)(param_3 + 0x80) = *(long *)(param_3 + 0x80) + (ulong)uVar7; *puVar17 = uVar7; __dest = (short *)((long)__dest + lVar11); } } } else if (*piVar13 == 4) { *plVar16 = 0; plVar16 = plVar16 + 1; } else { *puVar17 = 0; } piVar13 = piVar13 + 0xe; puVar17 = puVar17 + 1; } while (piVar13 < (int *)((ulong)uVar14 * 0x38 + lVar12)); psVar9 = *(short **)(param_3 + 0x50); } uVar14 = (int)__dest - (int)psVar9; *(uint *)(param_3 + 0xa8) = uVar14; lVar12 = 0; if (*(int *)(lVar5 + 0x3d4) != 0) { lVar12 = (ulong)(0xfe < uVar14) * 2 + 1; } lVar11 = param_1[0xc2]; *(long *)(param_3 + 0x68) = lVar12 + lVar11; uVar14 = *(int *)(lVar5 + 0x3d0) + uVar14 + (int)*(int8 *)(param_3 + 0x70) + (int)(lVar12 + lVar11) + (int)*(int8 *)(param_3 + 0x78) + (int)*(int8 *)(param_3 + 0x80); *(uint *)(param_3 + 0xa0) = uVar14; uVar10 = (ulong)uVar14 + *(long *)(param_3 + 0x88); *(ulong *)(param_3 + 0x90) = uVar10; if (uVar10 <= *(ulong *)(lVar5 + 0x3b8)) { uVar10 = *(ulong *)(lVar5 + 0x3b8); } *(ulong *)(param_3 + 0x90) = uVar10; return; }
63,247
emit_source_loc
bluesky950520[P]quickjs/quickjs.c
static void emit_source_loc(JSParseState *s) { JSFunctionDef *fd = s->cur_func; DynBuf *bc = &fd->byte_code; dbuf_putc(bc, OP_source_loc); dbuf_put_u32(bc, s->last_line_num); dbuf_put_u32(bc, s->last_col_num); }
O1
c
emit_source_loc: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x138, %r14d # imm = 0x138 addq 0x90(%rdi), %r14 movq %r14, %rdi movl $0xc4, %esi callq 0x1a8bc movl 0x8(%rbx), %eax movq %rsp, %rsi movl %eax, (%rsi) movl $0x4, %edx movq %r14, %rdi callq 0x1a80e movl 0xc(%rbx), %eax leaq 0x4(%rsp), %rsi movl %eax, (%rsi) movl $0x4, %edx movq %r14, %rdi callq 0x1a80e addq $0x8, %rsp popq %rbx popq %r14 retq
emit_source_loc: push r14 push rbx push rax mov rbx, rdi mov r14d, 138h add r14, [rdi+90h] mov rdi, r14 mov esi, 0C4h call dbuf_putc mov eax, [rbx+8] mov rsi, rsp mov [rsi], eax mov edx, 4 mov rdi, r14 call dbuf_put mov eax, [rbx+0Ch] lea rsi, [rsp+18h+var_14] mov [rsi], eax mov edx, 4 mov rdi, r14 call dbuf_put add rsp, 8 pop rbx pop r14 retn
long long emit_source_loc(long long a1) { long long v1; // rax _QWORD *v2; // r14 _QWORD v4[3]; // [rsp-4h] [rbp-18h] BYREF v4[0] = v1; v2 = (_QWORD *)(*(_QWORD *)(a1 + 144) + 312LL); dbuf_putc(v2, 196); LODWORD(v4[0]) = *(_DWORD *)(a1 + 8); dbuf_put(v2, (long long)v4, 4LL); HIDWORD(v4[0]) = *(_DWORD *)(a1 + 12); return dbuf_put(v2, (long long)v4 + 4, 4LL); }
emit_source_loc: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,0x138 ADD R14,qword ptr [RDI + 0x90] MOV RDI,R14 MOV ESI,0xc4 CALL 0x0011a8bc MOV EAX,dword ptr [RBX + 0x8] MOV RSI,RSP MOV dword ptr [RSI],EAX MOV EDX,0x4 MOV RDI,R14 CALL 0x0011a80e MOV EAX,dword ptr [RBX + 0xc] LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],EAX MOV EDX,0x4 MOV RDI,R14 CALL 0x0011a80e ADD RSP,0x8 POP RBX POP R14 RET
void emit_source_loc(long param_1) { int8 in_RAX; long lVar1; int4 local_18; int4 local_14; local_14 = (int4)((ulong)in_RAX >> 0x20); lVar1 = *(long *)(param_1 + 0x90) + 0x138; dbuf_putc(lVar1,0xc4); _local_18 = CONCAT44(local_14,*(int4 *)(param_1 + 8)); dbuf_put(lVar1,&local_18,4); _local_18 = CONCAT44(*(int4 *)(param_1 + 0xc),local_18); dbuf_put(lVar1,&local_14,4); return; }
63,248
emit_source_loc
bluesky950520[P]quickjs/quickjs.c
static void emit_source_loc(JSParseState *s) { JSFunctionDef *fd = s->cur_func; DynBuf *bc = &fd->byte_code; dbuf_putc(bc, OP_source_loc); dbuf_put_u32(bc, s->last_line_num); dbuf_put_u32(bc, s->last_col_num); }
O3
c
emit_source_loc: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x138, %r14d # imm = 0x138 addq 0x90(%rdi), %r14 movq %r14, %rdi movl $0xc4, %esi callq 0x1b1c5 movl 0x8(%rbx), %eax movq %rsp, %rsi movl %eax, (%rsi) movl $0x4, %edx movq %r14, %rdi callq 0x1b116 movl 0xc(%rbx), %eax leaq 0x4(%rsp), %rsi movl %eax, (%rsi) movl $0x4, %edx movq %r14, %rdi callq 0x1b116 addq $0x8, %rsp popq %rbx popq %r14 retq
emit_source_loc: push r14 push rbx push rax mov rbx, rdi mov r14d, 138h add r14, [rdi+90h] mov rdi, r14 mov esi, 0C4h call dbuf_putc mov eax, [rbx+8] mov rsi, rsp mov [rsi], eax mov edx, 4 mov rdi, r14 call dbuf_put mov eax, [rbx+0Ch] lea rsi, [rsp+18h+var_14] mov [rsi], eax mov edx, 4 mov rdi, r14 call dbuf_put add rsp, 8 pop rbx pop r14 retn
long long emit_source_loc(long long a1) { long long v1; // rax _QWORD *v2; // r14 _QWORD v4[3]; // [rsp-4h] [rbp-18h] BYREF v4[0] = v1; v2 = (_QWORD *)(*(_QWORD *)(a1 + 144) + 312LL); dbuf_putc(v2, 196); LODWORD(v4[0]) = *(_DWORD *)(a1 + 8); dbuf_put(v2, (long long)v4, 4LL); HIDWORD(v4[0]) = *(_DWORD *)(a1 + 12); return dbuf_put(v2, (long long)v4 + 4, 4LL); }
emit_source_loc: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,0x138 ADD R14,qword ptr [RDI + 0x90] MOV RDI,R14 MOV ESI,0xc4 CALL 0x0011b1c5 MOV EAX,dword ptr [RBX + 0x8] MOV RSI,RSP MOV dword ptr [RSI],EAX MOV EDX,0x4 MOV RDI,R14 CALL 0x0011b116 MOV EAX,dword ptr [RBX + 0xc] LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],EAX MOV EDX,0x4 MOV RDI,R14 CALL 0x0011b116 ADD RSP,0x8 POP RBX POP R14 RET
void emit_source_loc(long param_1) { int8 in_RAX; long lVar1; int4 local_18; int4 local_14; local_14 = (int4)((ulong)in_RAX >> 0x20); lVar1 = *(long *)(param_1 + 0x90) + 0x138; dbuf_putc(lVar1,0xc4); _local_18 = CONCAT44(local_14,*(int4 *)(param_1 + 8)); dbuf_put(lVar1,&local_18,4); _local_18 = CONCAT44(*(int4 *)(param_1 + 0xc),local_18); dbuf_put(lVar1,&local_14,4); return; }
63,249
my_hash_first
eloqsql/mysys/hash.c
uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; DBUG_ASSERT(my_hash_inited(hash)); res= my_hash_first_from_hash_value(hash, hash->hash_function(hash->charset, key, length ? length : hash->key_length), key, length, current_record); return res; }
O0
c
my_hash_first: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) jmp 0x2cdfa movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x18(%rbp) je 0x2ce33 movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x2ce3f movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x50(%rbp) movq -0x40(%rbp), %rax movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rdx callq *%rax movq -0x48(%rbp), %rdi movl %eax, %esi movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 callq 0x2cec0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_first: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx jmp short $+2 loc_2CDFA: mov rax, [rbp+var_8] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+68h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax cmp [rbp+var_18], 0 jz short loc_2CE33 mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_2CE3F loc_2CE33: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_50], rax loc_2CE3F: mov rax, [rbp+var_40] mov rsi, [rbp+var_30] mov rdi, [rbp+var_38] mov rdx, [rbp+var_50] call rax mov rdi, [rbp+var_48] mov esi, eax mov rdx, [rbp+var_10] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] call my_hash_first_from_hash_value mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 50h pop rbp retn
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4) { unsigned int v4; // eax long long ( *v6)(long long, long long, long long); // [rsp+10h] [rbp-40h] long long v7; // [rsp+18h] [rbp-38h] v6 = (long long ( *)(long long, long long, long long))a1[11]; v7 = a1[13]; if ( a3 ) v4 = v6(v7, a2, a3); else v4 = v6(v7, a2, a1[1]); return my_hash_first_from_hash_value(a1, v4, a2, a3, a4); }
my_hash_first: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX JMP 0x0012cdfa LAB_0012cdfa: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0012ce33 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x0012ce3f LAB_0012ce33: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x50],RAX LAB_0012ce3f: MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x50] CALL RAX MOV RDI,qword ptr [RBP + -0x48] MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] CALL 0x0012cec0 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x50 POP RBP RET
int8 my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4) { int4 uVar1; int8 uVar2; int8 local_58; local_58 = param_3; if (param_3 == 0) { local_58 = *(long *)(param_1 + 8); } uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,local_58); uVar2 = my_hash_first_from_hash_value(param_1,uVar1,param_2,param_3,param_4); return uVar2; }
63,250
evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_create<(evmone::Opcode)245>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&)
corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp
const Instruction* op_create(const Instruction* instr, AdvancedExecutionState& state) noexcept { const auto gas_left_correction = state.current_block_cost - instr->arg.number; state.gas_left += gas_left_correction; const auto status = instr::impl<Op>(state); if (status != EVMC_SUCCESS) return state.exit(status); if ((state.gas_left -= gas_left_correction) < 0) return state.exit(EVMC_OUT_OF_GAS); return ++instr; }
O1
cpp
evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_create<(evmone::Opcode)245>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movl 0x230(%rsi), %r15d subq 0x8(%rdi), %r15 movq 0x220(%rsi), %rsi addq %r15, %rsi movq %rsi, 0x220(%r14) movq 0x228(%r14), %rdi movq %r14, %rdx callq 0x4beba movq %rdx, 0x220(%r14) addq $-0x60, 0x228(%r14) testl %eax, %eax je 0x5215a movl %eax, 0x78(%r14) xorl %ebx, %ebx jmp 0x5216a subq %r15, %rdx movq %rdx, 0x220(%r14) js 0x52173 addq $0x10, %rbx movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movl $0x3, 0x78(%r14) jmp 0x52156
_ZN6evmone8advanced12_GLOBAL__N_19op_createILNS_6OpcodeE245EEEPKNS0_11InstructionES6_RNS0_22AdvancedExecutionStateE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov r15d, [rsi+230h] sub r15, [rdi+8] mov rsi, [rsi+220h] add rsi, r15 mov [r14+220h], rsi mov rdi, [r14+228h] mov rdx, r14 call _ZN6evmone5instr4core11create_implILNS_6OpcodeE245EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateE; evmone::instr::core::create_impl<(evmone::Opcode)245>(evmone::StackTop,long,evmone::ExecutionState &) mov [r14+220h], rdx add qword ptr [r14+228h], 0FFFFFFFFFFFFFFA0h test eax, eax jz short loc_5215A mov [r14+78h], eax loc_52156: xor ebx, ebx jmp short loc_5216A loc_5215A: sub rdx, r15 mov [r14+220h], rdx js short loc_52173 add rbx, 10h loc_5216A: mov rax, rbx pop rbx pop r14 pop r15 retn loc_52173: mov dword ptr [r14+78h], 3 jmp short loc_52156
long long evmone::advanced::`anonymous namespace'::op_create<(evmone::Opcode)245>(long long a1, long long a2) { long long v3; // r15 evmone *v4; // rsi int v5; // eax long long v6; // rdx long long v8; // rdx v3 = *(unsigned int *)(a2 + 560) - *(_QWORD *)(a1 + 8); v4 = (evmone *)(v3 + *(_QWORD *)(a2 + 544)); *(_QWORD *)(a2 + 544) = v4; v5 = evmone::instr::core::create_impl<(evmone::Opcode)245>(*(unsigned __int128 **)(a2 + 552), v4, a2); *(_QWORD *)(a2 + 544) = v6; *(_QWORD *)(a2 + 552) -= 96LL; if ( v5 ) { *(_DWORD *)(a2 + 120) = v5; } else { v8 = v6 - v3; *(_QWORD *)(a2 + 544) = v8; if ( v8 >= 0 ) return a1 + 16; *(_DWORD *)(a2 + 120) = 3; } return 0LL; }
op_create<(evmone::Opcode)245>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV R15D,dword ptr [RSI + 0x230] SUB R15,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RSI + 0x220] ADD RSI,R15 MOV qword ptr [R14 + 0x220],RSI MOV RDI,qword ptr [R14 + 0x228] MOV RDX,R14 CALL 0x0014beba MOV qword ptr [R14 + 0x220],RDX ADD qword ptr [R14 + 0x228],-0x60 TEST EAX,EAX JZ 0x0015215a MOV dword ptr [R14 + 0x78],EAX LAB_00152156: XOR EBX,EBX JMP 0x0015216a LAB_0015215a: SUB RDX,R15 MOV qword ptr [R14 + 0x220],RDX JS 0x00152173 ADD RBX,0x10 LAB_0015216a: MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_00152173: MOV dword ptr [R14 + 0x78],0x3 JMP 0x00152156
/* evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_create<(evmone::Opcode)245>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) */ Instruction * evmone::advanced::(anonymous_namespace)::op_create<(evmone::Opcode)245> (Instruction *param_1,AdvancedExecutionState *param_2) { uint uVar1; int iVar2; long extraout_RDX; long lVar3; long lVar4; uVar1 = *(uint *)(param_2 + 0x230); lVar3 = *(long *)(param_1 + 8); lVar4 = *(long *)(param_2 + 0x220) + ((ulong)uVar1 - lVar3); *(long *)(param_2 + 0x220) = lVar4; iVar2 = instr::core::create_impl<(evmone::Opcode)245> (*(int8 *)(param_2 + 0x228),lVar4,param_2); *(long *)(param_2 + 0x220) = extraout_RDX; *(long *)(param_2 + 0x228) = *(long *)(param_2 + 0x228) + -0x60; if (iVar2 == 0) { lVar3 = extraout_RDX - ((ulong)uVar1 - lVar3); *(long *)(param_2 + 0x220) = lVar3; if (-1 < lVar3) { return param_1 + 0x10; } *(int4 *)(param_2 + 0x78) = 3; } else { *(int *)(param_2 + 0x78) = iVar2; } return (Instruction *)0x0; }
63,251
mysql_close_slow_part
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void mysql_close_slow_part(MYSQL *mysql) { if (mysql->net.pvio) { free_old_query(mysql); mysql->status=MYSQL_STATUS_READY; /* Force command */ mysql->options.reconnect=0; if (mysql->net.pvio && mysql->net.buff) ma_simple_command(mysql, COM_QUIT,NullS,0,1,0); end_server(mysql); } /* there is an ongoing async operation */ else if (mysql->options.extension && mysql->options.extension->async_context) { if (mysql->options.extension->async_context->pending_gai_res) { freeaddrinfo(mysql->options.extension->async_context->pending_gai_res); mysql->options.extension->async_context->pending_gai_res = 0; } if (mysql->options.extension->async_context->pvio) { ma_pvio_close(mysql->options.extension->async_context->pvio); mysql->options.extension->async_context->pvio = 0; } } }
O0
c
mysql_close_slow_part: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x78db8 movq -0x8(%rbp), %rdi callq 0x78e80 movq -0x8(%rbp), %rax movl $0x0, 0x488(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x43b(%rax) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x78daa movq -0x8(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x78daa movq -0x8(%rbp), %rdi movl $0x1, %r8d xorl %eax, %eax movl %eax, %r9d movl %r8d, %esi movq %r9, %rdx movq %r9, %rcx callq 0x71b30 movq -0x8(%rbp), %rdi callq 0x70c90 jmp 0x78e6e movq -0x8(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x78e6c movq -0x8(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x78e6c movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax cmpq $0x0, 0x30(%rax) je 0x78e25 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq 0x30(%rax), %rdi callq 0x3b780 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax cmpq $0x0, 0x18(%rax) je 0x78e6a movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq 0x18(%rax), %rdi callq 0x7e880 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq $0x0, 0x18(%rax) jmp 0x78e6c jmp 0x78e6e addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_close_slow_part: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_78DB8 mov rdi, [rbp+var_8] call free_old_query mov rax, [rbp+var_8] mov dword ptr [rax+488h], 0 mov rax, [rbp+var_8] mov byte ptr [rax+43Bh], 0 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_78DAA mov rax, [rbp+var_8] cmp qword ptr [rax+8], 0 jz short loc_78DAA mov rdi, [rbp+var_8] mov r8d, 1 xor eax, eax mov r9d, eax mov esi, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command loc_78DAA: mov rdi, [rbp+var_8] call end_server jmp loc_78E6E loc_78DB8: mov rax, [rbp+var_8] cmp qword ptr [rax+480h], 0 jz loc_78E6C mov rax, [rbp+var_8] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz loc_78E6C mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] cmp qword ptr [rax+30h], 0 jz short loc_78E25 mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] mov rdi, [rax+30h] call _freeaddrinfo mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] mov qword ptr [rax+30h], 0 loc_78E25: mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] cmp qword ptr [rax+18h], 0 jz short loc_78E6A mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] mov rdi, [rax+18h] call ma_pvio_close mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] mov qword ptr [rax+18h], 0 loc_78E6A: jmp short $+2 loc_78E6C: jmp short $+2 loc_78E6E: add rsp, 10h pop rbp retn
long long mysql_close_slow_part(long long a1) { long long result; // rax if ( *(_QWORD *)a1 ) { free_old_query(a1); *(_DWORD *)(a1 + 1160) = 0; *(_BYTE *)(a1 + 1083) = 0; if ( *(_QWORD *)a1 ) { if ( *(_QWORD *)(a1 + 8) ) ma_simple_command(a1, 1u, 0LL, 0LL, 1, 0LL); } return end_server((_QWORD *)a1); } else { result = a1; if ( *(_QWORD *)(a1 + 1152) ) { result = *(_QWORD *)(a1 + 1152); if ( *(_QWORD *)(result + 40) ) { if ( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL) ) { freeaddrinfo(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL)); *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL) = 0LL; } result = *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL); if ( *(_QWORD *)(result + 24) ) { ma_pvio_close(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 24LL)); result = *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL); *(_QWORD *)(result + 24) = 0LL; } } } } return result; }
mysql_close_slow_part: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x00178db8 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00178e80 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x488],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x43b],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x00178daa MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00178daa MOV RDI,qword ptr [RBP + -0x8] MOV R8D,0x1 XOR EAX,EAX MOV R9D,EAX MOV ESI,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x00171b30 LAB_00178daa: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00170c90 JMP 0x00178e6e LAB_00178db8: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00178e6c MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x00178e6c MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] CMP qword ptr [RAX + 0x30],0x0 JZ 0x00178e25 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RAX + 0x30] CALL 0x0013b780 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x30],0x0 LAB_00178e25: 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 0x00178e6a MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0017e880 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x18],0x0 LAB_00178e6a: JMP 0x00178e6c LAB_00178e6c: JMP 0x00178e6e LAB_00178e6e: ADD RSP,0x10 POP RBP RET
void mysql_close_slow_part(long *param_1) { if (*param_1 == 0) { if ((param_1[0x90] != 0) && (*(long *)(param_1[0x90] + 0x28) != 0)) { if (*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x30) != 0) { freeaddrinfo(*(addrinfo **)(*(long *)(param_1[0x90] + 0x28) + 0x30)); *(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x30) = 0; } if (*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x18) != 0) { ma_pvio_close(*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18)); *(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18) = 0; } } } else { free_old_query(param_1); *(int4 *)(param_1 + 0x91) = 0; *(int1 *)((long)param_1 + 0x43b) = 0; if ((*param_1 != 0) && (param_1[1] != 0)) { ma_simple_command(param_1,1,0,0); } end_server(param_1); } return; }
63,252
traverse(std::vector<int, std::allocator<int>>) (.destroy)
corofx/examples/yield.cpp
auto traverse(std::vector<int> xs) -> task<void, yield> { for (auto x : xs) { if (not co_await yield{x}) break; } co_return {}; }
O3
cpp
traverse(std::vector<int, std::allocator<int>>) (.destroy): endbr64 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpb $0x1, 0x68(%rdi) jne 0x16b4 movq 0x38(%rbx), %rdi testq %rdi, %rdi je 0x16b4 callq *0x8(%rdi) movq 0x48(%rbx), %rdi testq %rdi, %rdi je 0x16c9 movq 0x58(%rbx), %rsi subq %rdi, %rsi callq 0x1220 movl $0x70, %esi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x1220 endbr64 movq %rax, %rdi callq 0x1a77
_Z8traverseSt6vectorIiSaIiEE_destroy: endbr64 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi cmp byte ptr [rdi+68h], 1 jnz short loc_16B4 mov rdi, [rbx+38h] test rdi, rdi jz short loc_16B4 call qword ptr [rdi+8] loc_16B4: mov rdi, [rbx+48h]; void * test rdi, rdi jz short loc_16C9 mov rsi, [rbx+58h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_16C9: mov esi, 70h ; 'p'; unsigned __int64 mov rdi, rbx; void * add rsp, 8 pop rbx pop rbp jmp __ZdlPvm; operator delete(void *,ulong) endbr64 mov rdi, rax call __clang_call_terminate
void traverse(_QWORD *a1) { long long v2; // rdi void *v3; // rdi if ( *((_BYTE *)a1 + 104) == 1 ) { v2 = a1[7]; if ( v2 ) (*(void ( **)(long long))(v2 + 8))(v2); } v3 = (void *)a1[9]; if ( v3 ) operator delete(v3, a1[11] - (_QWORD)v3); operator delete(a1, 0x70uLL); }
traverse: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CMP byte ptr [RDI + 0x68],0x1 JNZ 0x001016b4 MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JZ 0x001016b4 LAB_001016b1: CALL qword ptr [RDI + 0x8] LAB_001016b4: MOV RDI,qword ptr [RBX + 0x48] TEST RDI,RDI JZ 0x001016c9 MOV RSI,qword ptr [RBX + 0x58] SUB RSI,RDI CALL 0x00101220 LAB_001016c9: MOV ESI,0x70 MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00101220
/* traverse(std::vector<int, std::allocator<int> >) [clone .destroy] */ void traverse(void *param_1) { void *pvVar1; if ((*(char *)((long)param_1 + 0x68) == '\x01') && (*(long *)((long)param_1 + 0x38) != 0)) { /* try { // try from 001016b1 to 001016b3 has its CatchHandler @ 001016dc */ (**(code **)(*(long *)((long)param_1 + 0x38) + 8))(); } pvVar1 = *(void **)((long)param_1 + 0x48); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)((long)param_1 + 0x58) - (long)pvVar1); } operator_delete(param_1,0x70); return; }
63,253
mi_unique_hash
eloqsql/storage/myisam/mi_unique.c
ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const uchar *record) { const uchar *pos, *end; ha_checksum crc= 0; ulong seed1=0, seed2= 4; HA_KEYSEG *keyseg; for (keyseg=def->seg ; keyseg < def->end ; keyseg++) { enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type; uint length=keyseg->length; if (keyseg->null_bit) { if (record[keyseg->null_pos] & keyseg->null_bit) { /* Change crc in a way different from an empty string or 0. (This is an optimisation; The code will work even if this isn't done) */ crc=((crc << 8) + 511+ (crc >> (8*sizeof(ha_checksum)-8))); continue; } } pos= record+keyseg->start; if (keyseg->flag & HA_VAR_LENGTH_PART) { uint pack_length= keyseg->bit_start; uint tmp_length= (pack_length == 1 ? (uint) *(uchar*) pos : uint2korr(pos)); pos+= pack_length; /* Skip VARCHAR length */ set_if_smaller(length,tmp_length); } else if (keyseg->flag & HA_BLOB_PART) { uint tmp_length=_mi_calc_blob_length(keyseg->bit_start,pos); memcpy((char**) &pos, pos+keyseg->bit_start, sizeof(char*)); if (!length || length > tmp_length) length=tmp_length; /* The whole blob */ } end= pos+length; if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 || type == HA_KEYTYPE_VARTEXT2) { my_ci_hash_sort(keyseg->charset, (const uchar*) pos, length, &seed1, &seed2); crc^= seed1; } else while (pos != end) crc=((crc << 8) + (((uchar) *(uchar*) pos++))) + (crc >> (8*sizeof(ha_checksum)-8)); } return crc; }
O0
c
mi_unique_hash: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x24(%rbp) movq $0x0, -0x30(%rbp) movq $0x4, -0x38(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0xc4e08 movq -0x40(%rbp), %rax movzbl 0x18(%rax), %eax movl %eax, -0x44(%rbp) movq -0x40(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x48(%rbp) movq -0x40(%rbp), %rax cmpb $0x0, 0x19(%rax) je 0xc4cb0 movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx movl 0xc(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x40(%rbp), %rcx movzbl 0x19(%rcx), %ecx andl %ecx, %eax cmpl $0x0, %eax je 0xc4cae movl -0x24(%rbp), %eax shll $0x8, %eax addl $0x1ff, %eax # imm = 0x1FF movl -0x24(%rbp), %ecx shrl $0x18, %ecx addl %ecx, %eax movl %eax, -0x24(%rbp) jmp 0xc4df7 jmp 0xc4cb0 movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x40(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xc4d21 movq -0x40(%rbp), %rax movzbl 0x1a(%rax), %eax movl %eax, -0x4c(%rbp) cmpl $0x1, -0x4c(%rbp) jne 0xc4cef movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x58(%rbp) jmp 0xc4cf9 movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x50(%rbp) movl -0x4c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movl -0x48(%rbp), %eax cmpl -0x50(%rbp), %eax jbe 0xc4d1d movl -0x50(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0xc4d1f jmp 0xc4d74 movq -0x40(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0xc4d72 movq -0x40(%rbp), %rax movzbl 0x1a(%rax), %edi movq -0x18(%rbp), %rsi callq 0xab0c0 movl %eax, -0x54(%rbp) movq -0x18(%rbp), %rax movq -0x40(%rbp), %rcx movzbl 0x1a(%rcx), %ecx movslq %ecx, %rcx movq (%rax,%rcx), %rax movq %rax, -0x18(%rbp) cmpl $0x0, -0x48(%rbp) je 0xc4d6a movl -0x48(%rbp), %eax cmpl -0x54(%rbp), %eax jbe 0xc4d70 movl -0x54(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0xc4d72 jmp 0xc4d74 movq -0x18(%rbp), %rax movl -0x48(%rbp), %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) cmpl $0x1, -0x44(%rbp) je 0xc4d94 cmpl $0xf, -0x44(%rbp) je 0xc4d94 cmpl $0x11, -0x44(%rbp) jne 0xc4dc0 movq -0x40(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movl -0x48(%rbp), %eax movl %eax, %edx leaq -0x30(%rbp), %rcx leaq -0x38(%rbp), %r8 callq 0xc4e20 movq -0x30(%rbp), %rcx movl -0x24(%rbp), %eax xorq %rcx, %rax movl %eax, -0x24(%rbp) jmp 0xc4df5 jmp 0xc4dc2 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0xc4df3 movl -0x24(%rbp), %eax shll $0x8, %eax movq -0x18(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rbp) movzbl (%rcx), %ecx addl %ecx, %eax movl -0x24(%rbp), %ecx shrl $0x18, %ecx addl %ecx, %eax movl %eax, -0x24(%rbp) jmp 0xc4dc2 jmp 0xc4df5 jmp 0xc4df7 movq -0x40(%rbp), %rax addq $0x20, %rax movq %rax, -0x40(%rbp) jmp 0xc4c43 movl -0x24(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mi_unique_hash: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_24], 0 mov [rbp+var_30], 0 mov [rbp+var_38], 4 mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_40], rax loc_C4C43: mov rax, [rbp+var_40] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jnb loc_C4E08 mov rax, [rbp+var_40] movzx eax, byte ptr [rax+18h] mov [rbp+var_44], eax mov rax, [rbp+var_40] movzx eax, word ptr [rax+14h] mov [rbp+var_48], eax mov rax, [rbp+var_40] cmp byte ptr [rax+19h], 0 jz short loc_C4CB0 mov rax, [rbp+var_10] mov rcx, [rbp+var_40] mov ecx, [rcx+0Ch] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx+19h] and eax, ecx cmp eax, 0 jz short loc_C4CAE mov eax, [rbp+var_24] shl eax, 8 add eax, 1FFh mov ecx, [rbp+var_24] shr ecx, 18h add eax, ecx mov [rbp+var_24], eax jmp loc_C4DF7 loc_C4CAE: jmp short $+2 loc_C4CB0: mov rax, [rbp+var_10] mov rcx, [rbp+var_40] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_40] movzx eax, word ptr [rax+12h] and eax, 8 cmp eax, 0 jz short loc_C4D21 mov rax, [rbp+var_40] movzx eax, byte ptr [rax+1Ah] mov [rbp+var_4C], eax cmp [rbp+var_4C], 1 jnz short loc_C4CEF mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov [rbp+var_58], eax jmp short loc_C4CF9 loc_C4CEF: mov rax, [rbp+var_18] movzx eax, word ptr [rax] mov [rbp+var_58], eax loc_C4CF9: mov eax, [rbp+var_58] mov [rbp+var_50], eax mov ecx, [rbp+var_4C] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax mov eax, [rbp+var_48] cmp eax, [rbp+var_50] jbe short loc_C4D1D mov eax, [rbp+var_50] mov [rbp+var_48], eax loc_C4D1D: jmp short $+2 loc_C4D1F: jmp short loc_C4D74 loc_C4D21: mov rax, [rbp+var_40] movzx eax, word ptr [rax+12h] and eax, 20h cmp eax, 0 jz short loc_C4D72 mov rax, [rbp+var_40] movzx edi, byte ptr [rax+1Ah] mov rsi, [rbp+var_18] call _mi_calc_blob_length mov [rbp+var_54], eax mov rax, [rbp+var_18] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx+1Ah] movsxd rcx, ecx mov rax, [rax+rcx] mov [rbp+var_18], rax cmp [rbp+var_48], 0 jz short loc_C4D6A mov eax, [rbp+var_48] cmp eax, [rbp+var_54] jbe short loc_C4D70 loc_C4D6A: mov eax, [rbp+var_54] mov [rbp+var_48], eax loc_C4D70: jmp short $+2 loc_C4D72: jmp short $+2 loc_C4D74: mov rax, [rbp+var_18] mov ecx, [rbp+var_48] add rax, rcx mov [rbp+var_20], rax cmp [rbp+var_44], 1 jz short loc_C4D94 cmp [rbp+var_44], 0Fh jz short loc_C4D94 cmp [rbp+var_44], 11h jnz short loc_C4DC0 loc_C4D94: mov rax, [rbp+var_40] mov rdi, [rax] mov rsi, [rbp+var_18] mov eax, [rbp+var_48] mov edx, eax lea rcx, [rbp+var_30] lea r8, [rbp+var_38] call my_ci_hash_sort_0 mov rcx, [rbp+var_30] mov eax, [rbp+var_24] xor rax, rcx mov [rbp+var_24], eax jmp short loc_C4DF5 loc_C4DC0: jmp short $+2 loc_C4DC2: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz short loc_C4DF3 mov eax, [rbp+var_24] shl eax, 8 mov rcx, [rbp+var_18] mov rdx, rcx add rdx, 1 mov [rbp+var_18], rdx movzx ecx, byte ptr [rcx] add eax, ecx mov ecx, [rbp+var_24] shr ecx, 18h add eax, ecx mov [rbp+var_24], eax jmp short loc_C4DC2 loc_C4DF3: jmp short $+2 loc_C4DF5: jmp short $+2 loc_C4DF7: mov rax, [rbp+var_40] add rax, 20h ; ' ' mov [rbp+var_40], rax jmp loc_C4C43 loc_C4E08: mov eax, [rbp+var_24] add rsp, 60h pop rbp retn
long long mi_unique_hash(long long a1, long long a2) { unsigned __int8 *v2; // rcx unsigned int v4; // [rsp+8h] [rbp-58h] unsigned int v5; // [rsp+Ch] [rbp-54h] unsigned int v6; // [rsp+18h] [rbp-48h] int v7; // [rsp+1Ch] [rbp-44h] unsigned long long i; // [rsp+20h] [rbp-40h] long long v9; // [rsp+28h] [rbp-38h] BYREF long long v10; // [rsp+30h] [rbp-30h] BYREF unsigned int v11; // [rsp+3Ch] [rbp-24h] unsigned __int8 *v12; // [rsp+40h] [rbp-20h] unsigned __int8 *v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] long long v15; // [rsp+58h] [rbp-8h] v15 = a1; v14 = a2; v11 = 0; v10 = 0LL; v9 = 4LL; for ( i = *(_QWORD *)(a1 + 8); i < *(_QWORD *)(v15 + 16); i += 32LL ) { v7 = *(unsigned __int8 *)(i + 24); v6 = *(unsigned __int16 *)(i + 20); if ( *(_BYTE *)(i + 25) && (*(_BYTE *)(i + 25) & *(_BYTE *)(v14 + *(unsigned int *)(i + 12))) != 0 ) { v11 = HIBYTE(v11) + (v11 << 8) + 511; } else { v13 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + v14); if ( (*(_WORD *)(i + 18) & 8) != 0 ) { if ( *(_BYTE *)(i + 26) == 1 ) v4 = *v13; else v4 = *(unsigned __int16 *)v13; v13 += *(unsigned __int8 *)(i + 26); if ( v6 > v4 ) v6 = v4; } else if ( (*(_WORD *)(i + 18) & 0x20) != 0 ) { v5 = mi_calc_blob_length(*(unsigned __int8 *)(i + 26), v13); v13 = *(unsigned __int8 **)&v13[*(unsigned __int8 *)(i + 26)]; if ( !v6 || v6 > v5 ) v6 = v5; } v12 = &v13[v6]; if ( v7 == 1 || v7 == 15 || v7 == 17 ) { my_ci_hash_sort_0(*(_QWORD *)i, v13, v6, &v10, &v9); v11 ^= v10; } else { while ( v13 != v12 ) { v2 = v13++; v11 = HIBYTE(v11) + *v2 + (v11 << 8); } } } } return v11; }
mi_unique_hash: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x24],0x0 MOV qword ptr [RBP + -0x30],0x0 MOV qword ptr [RBP + -0x38],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX LAB_001c4c43: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JNC 0x001c4e08 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x18] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x40] CMP byte ptr [RAX + 0x19],0x0 JZ 0x001c4cb0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0xc] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RCX + 0x19] AND EAX,ECX CMP EAX,0x0 JZ 0x001c4cae MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x8 ADD EAX,0x1ff MOV ECX,dword ptr [RBP + -0x24] SHR ECX,0x18 ADD EAX,ECX MOV dword ptr [RBP + -0x24],EAX JMP 0x001c4df7 LAB_001c4cae: JMP 0x001c4cb0 LAB_001c4cb0: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x8 CMP EAX,0x0 JZ 0x001c4d21 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x1a] MOV dword ptr [RBP + -0x4c],EAX CMP dword ptr [RBP + -0x4c],0x1 JNZ 0x001c4cef MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x58],EAX JMP 0x001c4cf9 LAB_001c4cef: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x58],EAX LAB_001c4cf9: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x50],EAX MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x50] JBE 0x001c4d1d MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x48],EAX LAB_001c4d1d: JMP 0x001c4d1f LAB_001c4d1f: JMP 0x001c4d74 LAB_001c4d21: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x20 CMP EAX,0x0 JZ 0x001c4d72 MOV RAX,qword ptr [RBP + -0x40] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001ab0c0 MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RCX + 0x1a] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x18],RAX CMP dword ptr [RBP + -0x48],0x0 JZ 0x001c4d6a MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x54] JBE 0x001c4d70 LAB_001c4d6a: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x48],EAX LAB_001c4d70: JMP 0x001c4d72 LAB_001c4d72: JMP 0x001c4d74 LAB_001c4d74: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x48] ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x44],0x1 JZ 0x001c4d94 CMP dword ptr [RBP + -0x44],0xf JZ 0x001c4d94 CMP dword ptr [RBP + -0x44],0x11 JNZ 0x001c4dc0 LAB_001c4d94: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x48] MOV EDX,EAX LEA RCX,[RBP + -0x30] LEA R8,[RBP + -0x38] CALL 0x001c4e20 MOV RCX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x24] XOR RAX,RCX MOV dword ptr [RBP + -0x24],EAX JMP 0x001c4df5 LAB_001c4dc0: JMP 0x001c4dc2 LAB_001c4dc2: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x001c4df3 MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x18] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x18],RDX MOVZX ECX,byte ptr [RCX] ADD EAX,ECX MOV ECX,dword ptr [RBP + -0x24] SHR ECX,0x18 ADD EAX,ECX MOV dword ptr [RBP + -0x24],EAX JMP 0x001c4dc2 LAB_001c4df3: JMP 0x001c4df5 LAB_001c4df5: JMP 0x001c4df7 LAB_001c4df7: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x20 MOV qword ptr [RBP + -0x40],RAX JMP 0x001c4c43 LAB_001c4e08: MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x60 POP RBP RET
uint mi_unique_hash(long param_1,long param_2) { char cVar1; uint uVar2; uint local_60; uint local_50; int8 *local_48; int8 local_40; int8 local_38; uint local_2c; ushort *local_28; ushort *local_20; long local_18; long local_10; local_2c = 0; local_38 = 0; local_40 = 4; local_18 = param_2; local_10 = param_1; for (local_48 = *(int8 **)(param_1 + 8); local_48 < *(int8 **)(local_10 + 0x10); local_48 = local_48 + 4) { cVar1 = *(char *)(local_48 + 3); local_50 = (uint)*(ushort *)((long)local_48 + 0x14); if ((*(char *)((long)local_48 + 0x19) == '\0') || ((*(byte *)(local_18 + (ulong)*(uint *)((long)local_48 + 0xc)) & *(byte *)((long)local_48 + 0x19)) == 0)) { local_20 = (ushort *)(local_18 + (ulong)*(uint *)(local_48 + 1)); if ((*(ushort *)((long)local_48 + 0x12) & 8) == 0) { if ((*(ushort *)((long)local_48 + 0x12) & 0x20) != 0) { uVar2 = _mi_calc_blob_length(*(int1 *)((long)local_48 + 0x1a),local_20); local_20 = *(ushort **) ((long)local_20 + (long)(int)(uint)*(byte *)((long)local_48 + 0x1a)); if ((local_50 == 0) || (uVar2 < local_50)) { local_50 = uVar2; } } } else { if (*(byte *)((long)local_48 + 0x1a) == 1) { local_60 = (uint)(byte)*local_20; } else { local_60 = (uint)*local_20; } local_20 = (ushort *)((long)local_20 + (ulong)(uint)*(byte *)((long)local_48 + 0x1a)); if (local_60 < local_50) { local_50 = local_60; } } local_28 = (ushort *)((long)local_20 + (ulong)local_50); if (((cVar1 == '\x01') || (cVar1 == '\x0f')) || (cVar1 == '\x11')) { my_ci_hash_sort(*local_48,local_20,local_50,&local_38,&local_40); local_2c = local_2c ^ (uint)local_38; } else { for (; local_20 != local_28; local_20 = (ushort *)((long)local_20 + 1)) { local_2c = local_2c * 0x100 + (uint)(byte)*local_20 + (local_2c >> 0x18); } } } else { local_2c = local_2c * 0x100 + 0x1ff + (local_2c >> 0x18); } } return local_2c; }
63,254
ftxui::(anonymous namespace)::CheckStdinReady(int)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
int CheckStdinReady(int usec_timeout) { timeval tv = {0, usec_timeout}; fd_set fds; FD_ZERO(&fds); // NOLINT FD_SET(STDIN_FILENO, &fds); // NOLINT select(STDIN_FILENO + 1, &fds, nullptr, nullptr, &tv); // NOLINT return FD_ISSET(STDIN_FILENO, &fds); // NOLINT }
O0
cpp
ftxui::(anonymous namespace)::CheckStdinReady(int): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movl %edi, -0x4(%rbp) movq $0x0, -0x18(%rbp) movslq -0x4(%rbp), %rax movq %rax, -0x10(%rbp) leaq -0x98(%rbp), %rax movq %rax, -0xa8(%rbp) movl $0x0, -0x9c(%rbp) movl -0x9c(%rbp), %eax cmpq $0x10, %rax jae 0x66068 movq -0xa8(%rbp), %rax movl -0x9c(%rbp), %ecx movq $0x0, (%rax,%rcx,8) movl -0x9c(%rbp), %eax addl $0x1, %eax movl %eax, -0x9c(%rbp) jmp 0x66036 jmp 0x6606a movq -0x98(%rbp), %rax orq $0x1, %rax movq %rax, -0x98(%rbp) movl $0x1, %edi leaq -0x98(%rbp), %rsi xorl %eax, %eax movl %eax, %ecx leaq -0x18(%rbp), %r8 movq %rcx, %rdx callq 0xd550 movq -0x98(%rbp), %rax andq $0x1, %rax cmpq $0x0, %rax setne %al andb $0x1, %al movzbl %al, %eax addq $0xb0, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN5ftxui12_GLOBAL__N_115CheckStdinReadyEi: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_4], edi mov [rbp+var_18], 0 movsxd rax, [rbp+var_4] mov [rbp+var_10], rax lea rax, [rbp+var_98] mov [rbp+var_A8], rax mov [rbp+var_9C], 0 loc_66036: mov eax, [rbp+var_9C] cmp rax, 10h jnb short loc_66068 mov rax, [rbp+var_A8] mov ecx, [rbp+var_9C] mov qword ptr [rax+rcx*8], 0 mov eax, [rbp+var_9C] add eax, 1 mov [rbp+var_9C], eax jmp short loc_66036 loc_66068: jmp short $+2 loc_6606A: mov rax, [rbp+var_98] or rax, 1 mov [rbp+var_98], rax mov edi, 1 lea rsi, [rbp+var_98] xor eax, eax mov ecx, eax lea r8, [rbp+var_18] mov rdx, rcx call _select mov rax, [rbp+var_98] and rax, 1 cmp rax, 0 setnz al and al, 1 movzx eax, al add rsp, 0B0h pop rbp retn
_BOOL8 ftxui::`anonymous namespace'::CheckStdinReady(ftxui::_anonymous_namespace_ *this) { unsigned int i; // [rsp+14h] [rbp-9Ch] _QWORD v3[16]; // [rsp+18h] [rbp-98h] BYREF _QWORD v4[2]; // [rsp+98h] [rbp-18h] BYREF int v5; // [rsp+ACh] [rbp-4h] v5 = (int)this; v4[0] = 0LL; v4[1] = (int)this; for ( i = 0; i < 0x10uLL; ++i ) v3[i] = 0LL; v3[0] |= 1uLL; select(1LL, v3, 0LL, 0LL, v4); return (v3[0] & 1) != 0LL; }
CheckStdinReady: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x18],0x0 MOVSXD RAX,dword ptr [RBP + -0x4] MOV qword ptr [RBP + -0x10],RAX LEA RAX,[RBP + -0x98] MOV qword ptr [RBP + -0xa8],RAX MOV dword ptr [RBP + -0x9c],0x0 LAB_00166036: MOV EAX,dword ptr [RBP + -0x9c] CMP RAX,0x10 JNC 0x00166068 MOV RAX,qword ptr [RBP + -0xa8] MOV ECX,dword ptr [RBP + -0x9c] MOV qword ptr [RAX + RCX*0x8],0x0 MOV EAX,dword ptr [RBP + -0x9c] ADD EAX,0x1 MOV dword ptr [RBP + -0x9c],EAX JMP 0x00166036 LAB_00166068: JMP 0x0016606a LAB_0016606a: MOV RAX,qword ptr [RBP + -0x98] OR RAX,0x1 MOV qword ptr [RBP + -0x98],RAX MOV EDI,0x1 LEA RSI,[RBP + -0x98] XOR EAX,EAX MOV ECX,EAX LEA R8,[RBP + -0x18] MOV RDX,RCX CALL 0x0010d550 MOV RAX,qword ptr [RBP + -0x98] AND RAX,0x1 CMP RAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL ADD RSP,0xb0 POP RBP RET
/* ftxui::(anonymous namespace)::CheckStdinReady(int) */ bool ftxui::(anonymous_namespace)::CheckStdinReady(int param_1) { uint local_a4; fd_set local_a0; timeval local_20; int local_c; local_20.tv_sec = 0; local_20.tv_usec = (__suseconds_t)param_1; for (local_a4 = 0; local_a4 < 0x10; local_a4 = local_a4 + 1) { local_a0.fds_bits[local_a4] = 0; } local_a0.fds_bits[0] = local_a0.fds_bits[0] | 1; local_c = param_1; ::select(1,&local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_20); return (local_a0.fds_bits[0] & 1U) != 0; }
63,255
bf_add_epsilon
bluesky950520[P]quickjs/libbf.c
static int bf_add_epsilon(bf_t *r, const bf_t *a, slimb_t e, int e_sign, limb_t prec, int flags) { bf_t T_s, *T = &T_s; int ret; /* small argument case: result = 1 + epsilon * sign(x) */ bf_init(a->ctx, T); bf_set_ui(T, 1); T->sign = e_sign; T->expn += e; ret = bf_add(r, r, T, prec, flags); bf_delete(T); return ret; }
O0
c
bf_add_epsilon: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) movl %r9d, 0x3c(%rsp) leaq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x58(%rsp), %rax movq (%rax), %rdi movq 0x8(%rsp), %rsi callq 0xec260 movq 0x8(%rsp), %rdi movl $0x1, %esi callq 0xec390 movl 0x4c(%rsp), %ecx movq 0x8(%rsp), %rax movl %ecx, 0x8(%rax) movq 0x50(%rsp), %rcx movq 0x8(%rsp), %rax addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) movq 0x60(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x8(%rsp), %rdx movq 0x40(%rsp), %rcx movl 0x3c(%rsp), %r8d callq 0xf0460 movl %eax, 0x4(%rsp) movq 0x8(%rsp), %rdi callq 0xef6c0 movl 0x4(%rsp), %eax addq $0x68, %rsp retq nop
bf_add_epsilon: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_1C], ecx mov [rsp+68h+var_28], r8 mov [rsp+68h+var_2C], r9d lea rax, [rsp+68h+var_58] mov [rsp+68h+var_60], rax mov rax, [rsp+68h+var_10] mov rdi, [rax] mov rsi, [rsp+68h+var_60] call bf_init mov rdi, [rsp+68h+var_60] mov esi, 1 call bf_set_ui mov ecx, [rsp+68h+var_1C] mov rax, [rsp+68h+var_60] mov [rax+8], ecx mov rcx, [rsp+68h+var_18] mov rax, [rsp+68h+var_60] add rcx, [rax+10h] mov [rax+10h], rcx mov rdi, [rsp+68h+var_8] mov rsi, [rsp+68h+var_8] mov rdx, [rsp+68h+var_60] mov rcx, [rsp+68h+var_28] mov r8d, [rsp+68h+var_2C] call bf_add mov [rsp+68h+var_64], eax mov rdi, [rsp+68h+var_60] call bf_delete_0 mov eax, [rsp+68h+var_64] add rsp, 68h retn
long long bf_add_epsilon(long long a1, long long *a2, long long a3, int a4, long long a5, unsigned int a6) { long long v6; // rsi long long v7; // rdx long long v8; // rcx long long v9; // r8 long long v10; // r9 unsigned int v12; // [rsp+4h] [rbp-64h] long long v13; // [rsp+10h] [rbp-58h] BYREF int v14; // [rsp+18h] [rbp-50h] long long v15; // [rsp+20h] [rbp-48h] unsigned int v16; // [rsp+3Ch] [rbp-2Ch] long long v17; // [rsp+40h] [rbp-28h] int v18; // [rsp+4Ch] [rbp-1Ch] long long v19; // [rsp+50h] [rbp-18h] long long *v20; // [rsp+58h] [rbp-10h] long long v21; // [rsp+60h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = a5; v16 = a6; bf_init(*a2, (long long)&v13); bf_set_ui((long long)&v13, 1LL); v14 = v18; v15 += v19; v6 = v21; v12 = bf_add(v21, v21, (long long)&v13, v17, v16); bf_delete_0(&v13, v6, v7, v8, v9, v10); return v12; }
bf_add_epsilon: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 MOV dword ptr [RSP + 0x3c],R9D LEA RAX,[RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x8] CALL 0x001ec260 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1 CALL 0x001ec390 MOV ECX,dword ptr [RSP + 0x4c] MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x8],ECX MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x8] ADD RCX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x40] MOV R8D,dword ptr [RSP + 0x3c] CALL 0x001f0460 MOV dword ptr [RSP + 0x4],EAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x001ef6c0 MOV EAX,dword ptr [RSP + 0x4] ADD RSP,0x68 RET
int4 bf_add_epsilon(int8 param_1,int8 *param_2,long param_3,int4 param_4, int8 param_5,int4 param_6) { int4 uVar1; int1 local_58 [8]; int4 local_50; long local_48; int4 local_2c; int8 local_28; int4 local_1c; long local_18; int8 *local_10; int8 local_8; local_2c = param_6; local_28 = param_5; local_1c = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; bf_init(*param_2,local_58); bf_set_ui(local_58,1); local_50 = local_1c; local_48 = local_18 + local_48; uVar1 = bf_add(local_8,local_8,local_58,local_28,local_2c); bf_delete(local_58); return uVar1; }
63,256
bf_add_epsilon
bluesky950520[P]quickjs/libbf.c
static int bf_add_epsilon(bf_t *r, const bf_t *a, slimb_t e, int e_sign, limb_t prec, int flags) { bf_t T_s, *T = &T_s; int ret; /* small argument case: result = 1 + epsilon * sign(x) */ bf_init(a->ctx, T); bf_set_ui(T, 1); T->sign = e_sign; T->expn += e; ret = bf_add(r, r, T, prec, flags); bf_delete(T); return ret; }
O2
c
bf_add_epsilon: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r9d, %ebx movq %r8, %r14 movl %ecx, %ebp movq %rdx, %r15 movq %rdi, %r12 movq (%rsi), %rax movq %rsp, %r13 movq %rax, (%r13) andl $0x0, 0x8(%r13) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r13) pushq $0x1 popq %rsi movq %r13, %rdi callq 0x73106 movl %ebp, 0x8(%r13) addq %r15, 0x10(%r13) movq %r12, %rdi movq %r12, %rsi movq %r13, %rdx movq %r14, %rcx movl %ebx, %r8d callq 0x757f9 movl %eax, %ebx movq %r13, %rdi callq 0x7500e movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_add_epsilon: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, r9d mov r14, r8 mov ebp, ecx mov r15, rdx mov r12, rdi mov rax, [rsi] mov r13, rsp mov [r13+0], rax and dword ptr [r13+8], 0 mov rax, 8000000000000000h mov [r13+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r13+18h], xmm0 push 1 pop rsi mov rdi, r13 call bf_set_ui mov [r13+8], ebp add [r13+10h], r15 mov rdi, r12 mov rsi, r12 mov rdx, r13 mov rcx, r14 mov r8d, ebx call bf_add mov ebx, eax mov rdi, r13 call bf_delete_0 mov eax, ebx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_add_epsilon(long long a1, long long *a2, long long a3, int a4, long long a5, unsigned int a6) { unsigned int v10; // ebx long long v12; // [rsp+0h] [rbp-58h] BYREF int v13; // [rsp+8h] [rbp-50h] unsigned long long v14; // [rsp+10h] [rbp-48h] __int128 v15; // [rsp+18h] [rbp-40h] v12 = *a2; v13 = 0; v14 = 0x8000000000000000LL; v15 = 0LL; bf_set_ui((long long)&v12, 1uLL); v13 = a4; v14 += a3; v10 = bf_add(a1, a1, (long long)&v12, a5, a6); bf_delete_0(&v12); return v10; }
bf_add_epsilon: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,R9D MOV R14,R8 MOV EBP,ECX MOV R15,RDX MOV R12,RDI MOV RAX,qword ptr [RSI] MOV R13,RSP MOV qword ptr [R13],RAX AND dword ptr [R13 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R13 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R13 + 0x18],XMM0 PUSH 0x1 POP RSI MOV RDI,R13 CALL 0x00173106 MOV dword ptr [R13 + 0x8],EBP ADD qword ptr [R13 + 0x10],R15 MOV RDI,R12 MOV RSI,R12 MOV RDX,R13 MOV RCX,R14 MOV R8D,EBX CALL 0x001757f9 MOV EBX,EAX MOV RDI,R13 CALL 0x0017500e MOV EAX,EBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 bf_add_epsilon(int8 param_1,int8 *param_2,long param_3,int4 param_4, int8 param_5,int4 param_6) { int4 uVar1; int8 local_58; int4 local_50; long local_48; int8 local_40; int8 uStack_38; local_58 = *param_2; local_50 = 0; local_48 = -0x8000000000000000; local_40 = 0; uStack_38 = 0; bf_set_ui(&local_58,1); local_48 = local_48 + param_3; local_50 = param_4; uVar1 = bf_add(param_1,param_1,&local_58,param_5,param_6); bf_delete(&local_58); return uVar1; }
63,257
ggml_compute_forward_silu_back
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_silu_back( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_silu_back_f32(params, dst); } break; case GGML_TYPE_F16: { ggml_compute_forward_silu_back_f16(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
cpp
ggml_compute_forward_silu_back: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x98(%rax), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movl (%rax), %eax movl %eax, 0xc(%rsp) testl %eax, %eax je 0x8ecbb jmp 0x8ecb0 movl 0xc(%rsp), %eax subl $0x1, %eax je 0x8eccc jmp 0x8ecdd movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x8ed00 jmp 0x8ecf7 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x8ee40 jmp 0x8ecf7 leaq 0x269b4(%rip), %rdi # 0xb5698 movl $0xc1e, %esi # imm = 0xC1E leaq 0x1cda4(%rip), %rdx # 0xaba94 movb $0x0, %al callq 0x10660 addq $0x28, %rsp retq nopl (%rax)
ggml_compute_forward_silu_back: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_10] mov rax, [rax+98h] mov [rsp+28h+var_18], rax mov rax, [rsp+28h+var_18] mov eax, [rax] mov [rsp+28h+var_1C], eax test eax, eax jz short loc_8ECBB jmp short $+2 loc_8ECB0: mov eax, [rsp+28h+var_1C] sub eax, 1 jz short loc_8ECCC jmp short loc_8ECDD loc_8ECBB: mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] call _ZL34ggml_compute_forward_silu_back_f32PK19ggml_compute_paramsP11ggml_tensor; ggml_compute_forward_silu_back_f32(ggml_compute_params const*,ggml_tensor *) jmp short loc_8ECF7 loc_8ECCC: mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] call _ZL34ggml_compute_forward_silu_back_f16PK19ggml_compute_paramsP11ggml_tensor; ggml_compute_forward_silu_back_f16(ggml_compute_params const*,ggml_tensor *) jmp short loc_8ECF7 loc_8ECDD: lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C1Eh lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_8ECF7: add rsp, 28h retn
double ggml_compute_forward_silu_back(long long a1, long long a2) { double result; // xmm0_8 int v3; // [rsp+Ch] [rbp-1Ch] v3 = **(_DWORD **)(a2 + 152); if ( v3 ) { if ( v3 == 1 ) ggml_compute_forward_silu_back_f16(a1, a2); else return ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 3102LL, "fatal error"); } else { ggml_compute_forward_silu_back_f32(a1, a2); } return result; }
ggml_compute_forward_silu_back: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc],EAX TEST EAX,EAX JZ 0x0018ecbb JMP 0x0018ecb0 LAB_0018ecb0: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x1 JZ 0x0018eccc JMP 0x0018ecdd LAB_0018ecbb: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0018ed00 JMP 0x0018ecf7 LAB_0018eccc: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0018ee40 JMP 0x0018ecf7 LAB_0018ecdd: LEA RDI,[0x1b5698] MOV ESI,0xc1e LEA RDX,[0x1aba94] MOV AL,0x0 CALL 0x00110660 LAB_0018ecf7: ADD RSP,0x28 RET
void ggml_compute_forward_silu_back(ggml_compute_params *param_1,ggml_tensor *param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_silu_back_f32(param_1,param_2); } else if (**(int **)(param_2 + 0x98) == 1) { ggml_compute_forward_silu_back_f16(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp" ,0xc1e,"fatal error"); } return; }
63,258
ggml_compute_forward_silu_back
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_silu_back( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_silu_back_f32(params, dst); } break; case GGML_TYPE_F16: { ggml_compute_forward_silu_back_f16(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O1
cpp
ggml_compute_forward_silu_back: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq 0x98(%rsi), %r13 movl (%r13), %eax cmpl $0x1, %eax je 0x38121 testl %eax, %eax jne 0x3827b movq 0xa0(%r14), %r12 movslq (%rdi), %r15 movl 0x4(%rdi), %ebx movq 0x10(%r12), %rax movq %rax, 0x10(%rsp) movq %r12, %rdi callq 0xaa40 movq %rax, %rcx addl %ebx, %eax decl %eax cltd idivl %ebx cltq imulq %rax, %r15 addl %r15d, %eax cmpl %ecx, %eax cmovgel %ecx, %eax cmpl %eax, %r15d jge 0x3826c movq 0x38(%r14), %rbx movq 0x38(%r12), %rcx movq 0x38(%r13), %rbp movq %r12, %rdx movq 0x10(%rsp), %r12 andl $0x7fffffff, %r12d # imm = 0x7FFFFFFF cltq movq %rax, 0x18(%rsp) movq %rbx, 0x8(%rsp) imulq %r15, %rbx addq 0xf8(%r14), %rbx movq %rbp, 0x20(%rsp) imulq %r15, %rbp addq 0xf8(%r13), %rbp movq %rcx, 0x28(%rsp) movq %rcx, %r13 imulq %r15, %r13 addq 0xf8(%rdx), %r13 cmpl $0x0, 0x10(%rsp) jle 0x38103 xorl %r14d, %r14d vmovss (%r13,%r14,4), %xmm0 vmovaps %xmm0, 0x40(%rsp) vmovss (%rbp,%r14,4), %xmm1 vmovss %xmm1, 0x30(%rsp) vxorps 0x11d15(%rip){1to4}, %xmm0, %xmm0 # 0x49de0 callq 0xaeb0 vmovss 0x10fc8(%rip), %xmm2 # 0x490a0 vaddss %xmm2, %xmm0, %xmm0 vdivss %xmm0, %xmm2, %xmm0 vmulss 0x30(%rsp), %xmm0, %xmm1 vsubss %xmm0, %xmm2, %xmm0 vfmadd132ss 0x40(%rsp), %xmm2, %xmm0 # xmm0 = (xmm0 * mem) + xmm2 vmulss %xmm0, %xmm1, %xmm0 vmovss %xmm0, (%rbx,%r14,4) incq %r14 cmpq %r14, %r12 jne 0x380a7 incq %r15 addq 0x8(%rsp), %rbx addq 0x20(%rsp), %rbp addq 0x28(%rsp), %r13 cmpq 0x18(%rsp), %r15 jne 0x3809d jmp 0x3826c movq 0xa0(%r14), %r12 movslq (%rdi), %r15 movl 0x4(%rdi), %ebx movq 0x10(%r12), %rax movq %rax, 0x8(%rsp) movq %r12, %rdi callq 0xaa40 movq %rax, %rcx addl %ebx, %eax decl %eax cltd idivl %ebx cltq imulq %rax, %r15 addl %r15d, %eax cmpl %ecx, %eax cmovgel %ecx, %eax cmpl %eax, %r15d jge 0x3826c movq 0x38(%r14), %rbp movq 0x38(%r12), %rdx movq 0x38(%r13), %rsi movq 0x8(%rsp), %rcx movl %ecx, %ebx andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movq %rbp, 0x28(%rsp) movq %rbp, %rdi imulq %r15, %rdi addq 0xf8(%r14), %rdi movq %rsi, 0x18(%rsp) imulq %r15, %rsi addq 0xf8(%r13), %rsi movq %rdx, 0x20(%rsp) movq %rdx, %r8 imulq %r15, %r8 addq 0xf8(%r12), %r8 cltq movq %rax, 0x50(%rsp) movq 0x23da0(%rip), %rbp # 0x5bf60 movq %r15, 0x10(%rsp) cmpl $0x0, 0x8(%rsp) jle 0x3824a xorl %r15d, %r15d movzwl (%r8,%r15,2), %eax movzwl (%rsi,%r15,2), %r9d movq %r9, 0x40(%rsp) vmovss (%rbp,%rax,4), %xmm0 vmovaps %xmm0, 0x30(%rsp) vxorps 0x11bec(%rip){1to4}, %xmm0, %xmm0 # 0x49de0 movq %rdi, %r14 movq %rsi, %r13 movq %r8, %r12 callq 0xaeb0 vmovss 0x10e96(%rip), %xmm2 # 0x490a0 movq %r12, %r8 movq %r13, %rsi movq %r14, %rdi vaddss %xmm2, %xmm0, %xmm0 vdivss %xmm0, %xmm2, %xmm0 movq 0x40(%rsp), %rax vmulss (%rbp,%rax,4), %xmm0, %xmm1 vsubss %xmm0, %xmm2, %xmm0 vfmadd132ss 0x30(%rsp), %xmm2, %xmm0 # xmm0 = (xmm0 * mem) + xmm2 vmulss %xmm0, %xmm1, %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%r14,%r15,2) incq %r15 cmpq %r15, %rbx jne 0x381cf movq 0x10(%rsp), %r15 incq %r15 addq 0x28(%rsp), %rdi addq 0x18(%rsp), %rsi addq 0x20(%rsp), %r8 cmpq 0x50(%rsp), %r15 jne 0x381c0 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1b81e(%rip), %rdi # 0x53aa0 leaq 0x113f7(%rip), %rdx # 0x49680 movl $0xc1e, %esi # imm = 0xC1E xorl %eax, %eax callq 0xaf40
ggml_compute_forward_silu_back: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rsi mov r13, [rsi+98h] mov eax, [r13+0] cmp eax, 1 jz loc_38121 test eax, eax jnz loc_3827B mov r12, [r14+0A0h] movsxd r15, dword ptr [rdi] mov ebx, [rdi+4] mov rax, [r12+10h] mov [rsp+88h+var_78], rax mov rdi, r12 call _ggml_nrows mov rcx, rax add eax, ebx dec eax cdq idiv ebx cdqe imul r15, rax add eax, r15d cmp eax, ecx cmovge eax, ecx cmp r15d, eax jge loc_3826C mov rbx, [r14+38h] mov rcx, [r12+38h] mov rbp, [r13+38h] mov rdx, r12 mov r12, [rsp+88h+var_78] and r12d, 7FFFFFFFh cdqe mov [rsp+88h+var_70], rax mov [rsp+88h+var_80], rbx imul rbx, r15 add rbx, [r14+0F8h] mov [rsp+88h+var_68], rbp imul rbp, r15 add rbp, [r13+0F8h] mov [rsp+88h+var_60], rcx mov r13, rcx imul r13, r15 add r13, [rdx+0F8h] loc_3809D: cmp dword ptr [rsp+88h+var_78], 0 jle short loc_38103 xor r14d, r14d loc_380A7: vmovss xmm0, dword ptr [r13+r14*4+0] vmovaps [rsp+88h+var_48], xmm0 vmovss xmm1, dword ptr [rbp+r14*4+0] vmovss dword ptr [rsp+88h+var_58], xmm1 vxorps xmm0, xmm0, dword ptr cs:xmmword_49DE0 call _expf vmovss xmm2, cs:dword_490A0 vaddss xmm0, xmm0, xmm2 vdivss xmm0, xmm2, xmm0 vmulss xmm1, xmm0, dword ptr [rsp+88h+var_58] vsubss xmm0, xmm2, xmm0 vfmadd132ss xmm0, xmm2, dword ptr [rsp+88h+var_48] vmulss xmm0, xmm1, xmm0 vmovss dword ptr [rbx+r14*4], xmm0 inc r14 cmp r12, r14 jnz short loc_380A7 loc_38103: inc r15 add rbx, [rsp+88h+var_80] add rbp, [rsp+88h+var_68] add r13, [rsp+88h+var_60] cmp r15, [rsp+88h+var_70] jnz short loc_3809D jmp loc_3826C loc_38121: mov r12, [r14+0A0h] movsxd r15, dword ptr [rdi] mov ebx, [rdi+4] mov rax, [r12+10h] mov [rsp+88h+var_80], rax mov rdi, r12 call _ggml_nrows mov rcx, rax add eax, ebx dec eax cdq idiv ebx cdqe imul r15, rax add eax, r15d cmp eax, ecx cmovge eax, ecx cmp r15d, eax jge loc_3826C mov rbp, [r14+38h] mov rdx, [r12+38h] mov rsi, [r13+38h] mov rcx, [rsp+88h+var_80] mov ebx, ecx and ebx, 7FFFFFFFh mov [rsp+88h+var_60], rbp mov rdi, rbp imul rdi, r15 add rdi, [r14+0F8h] mov [rsp+88h+var_70], rsi imul rsi, r15 add rsi, [r13+0F8h] mov [rsp+88h+var_68], rdx mov r8, rdx imul r8, r15 add r8, [r12+0F8h] cdqe mov [rsp+88h+var_38], rax mov rbp, cs:ggml_table_f32_f16_ptr loc_381C0: mov [rsp+88h+var_78], r15 cmp dword ptr [rsp+88h+var_80], 0 jle short loc_3824A xor r15d, r15d loc_381CF: movzx eax, word ptr [r8+r15*2] movzx r9d, word ptr [rsi+r15*2] mov qword ptr [rsp+88h+var_48], r9 vmovss xmm0, dword ptr [rbp+rax*4+0] vmovaps [rsp+88h+var_58], xmm0 vxorps xmm0, xmm0, dword ptr cs:xmmword_49DE0 mov r14, rdi mov r13, rsi mov r12, r8 call _expf vmovss xmm2, cs:dword_490A0 mov r8, r12 mov rsi, r13 mov rdi, r14 vaddss xmm0, xmm0, xmm2 vdivss xmm0, xmm2, xmm0 mov rax, qword ptr [rsp+88h+var_48] vmulss xmm1, xmm0, dword ptr [rbp+rax*4+0] vsubss xmm0, xmm2, xmm0 vfmadd132ss xmm0, xmm2, dword ptr [rsp+88h+var_58] vmulss xmm0, xmm1, xmm0 vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [r14+r15*2], xmm0, 0 inc r15 cmp rbx, r15 jnz short loc_381CF loc_3824A: mov r15, [rsp+88h+var_78] inc r15 add rdi, [rsp+88h+var_60] add rsi, [rsp+88h+var_70] add r8, [rsp+88h+var_68] cmp r15, [rsp+88h+var_38] jnz loc_381C0 loc_3826C: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3827B: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 0C1Eh xor eax, eax call _ggml_abort
void ggml_compute_forward_silu_back(int *a1, _QWORD *a2) { long long v2; // r13 _QWORD *v3; // r12 long long v4; // r15 int v5; // ebx int v6; // ecx int v7; // eax long long v8; // r15 int v9; // eax _QWORD *v24; // r12 long long v25; // r15 int v26; // ebx int v27; // ecx int v28; // eax long long v29; // r15 int v30; // eax long long v31; // rdi long long v32; // rsi long long v33; // r8 long long v40; // r12 long long v49; // [rsp+8h] [rbp-80h] long long v50; // [rsp+8h] [rbp-80h] long long v51; // [rsp+10h] [rbp-78h] long long v52; // [rsp+10h] [rbp-78h] long long v53; // [rsp+18h] [rbp-70h] long long v54; // [rsp+18h] [rbp-70h] long long v55; // [rsp+20h] [rbp-68h] long long v56; // [rsp+20h] [rbp-68h] long long v57; // [rsp+28h] [rbp-60h] long long v58; // [rsp+28h] [rbp-60h] long long v62; // [rsp+50h] [rbp-38h] v2 = a2[19]; if ( *(_DWORD *)v2 == 1 ) { v24 = (_QWORD *)a2[20]; v25 = *a1; v26 = a1[1]; v50 = v24[2]; v27 = ggml_nrows(v24); v28 = (v26 + v27 - 1) / v26; v29 = v28 * v25; v30 = v29 + v28; if ( v30 >= v27 ) v30 = v27; if ( (int)v29 < v30 ) { v58 = a2[7]; v31 = a2[31] + v29 * v58; v54 = *(_QWORD *)(v2 + 56); v32 = *(_QWORD *)(v2 + 248) + v29 * v54; v56 = v24[7]; v33 = v24[31] + v29 * v56; v62 = v30; _RBP = &ggml_table_f32_f16; do { v52 = v29; if ( (int)v50 > 0 ) { _R15 = 0LL; do { _RAX = *(unsigned __int16 *)(v33 + 2 * _R15); __asm { vmovss xmm0, dword ptr [rbp+rax*4+0] vmovaps [rsp+88h+var_58], xmm0 vxorps xmm0, xmm0, dword ptr cs:xmmword_49DE0 } _R14 = v31; v40 = v33; *(double *)&_XMM0 = expf(*(double *)&_XMM0); __asm { vmovss xmm2, cs:dword_490A0 } v33 = v40; __asm { vaddss xmm0, xmm0, xmm2 vdivss xmm0, xmm2, xmm0 vmulss xmm1, xmm0, dword ptr [rbp+rax*4+0] vsubss xmm0, xmm2, xmm0 vfmadd132ss xmm0, xmm2, dword ptr [rsp+88h+var_58] vmulss xmm0, xmm1, xmm0 vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [r14+r15*2], xmm0, 0 } ++_R15; } while ( (v50 & 0x7FFFFFFF) != _R15 ); } v29 = v52 + 1; v31 += v58; v32 += v54; v33 += v56; } while ( v52 + 1 != v62 ); } } else if ( *(_DWORD *)v2 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 3102LL, "fatal error"); ggml_compute_forward_norm(); } else { v3 = (_QWORD *)a2[20]; v4 = *a1; v5 = a1[1]; v51 = v3[2]; v6 = ggml_nrows(v3); v7 = (v5 + v6 - 1) / v5; v8 = v7 * v4; v9 = v8 + v7; if ( v9 >= v6 ) v9 = v6; if ( (int)v8 < v9 ) { v53 = v9; v49 = a2[7]; _RBX = a2[31] + v8 * v49; v55 = *(_QWORD *)(v2 + 56); _RBP = *(_QWORD *)(v2 + 248) + v8 * v55; v57 = v3[7]; _R13 = v3[31] + v8 * v57; do { if ( (int)v51 > 0 ) { _R14 = 0LL; do { __asm { vmovss xmm0, dword ptr [r13+r14*4+0] vmovaps [rsp+88h+var_48], xmm0 vmovss xmm1, dword ptr [rbp+r14*4+0] vmovss dword ptr [rsp+88h+var_58], xmm1 vxorps xmm0, xmm0, dword ptr cs:xmmword_49DE0 } *(double *)&_XMM0 = expf(*(double *)&_XMM0); __asm { vmovss xmm2, cs:dword_490A0 vaddss xmm0, xmm0, xmm2 vdivss xmm0, xmm2, xmm0 vmulss xmm1, xmm0, dword ptr [rsp+88h+var_58] vsubss xmm0, xmm2, xmm0 vfmadd132ss xmm0, xmm2, dword ptr [rsp+88h+var_48] vmulss xmm0, xmm1, xmm0 vmovss dword ptr [rbx+r14*4], xmm0 } ++_R14; } while ( (v51 & 0x7FFFFFFF) != _R14 ); } ++v8; _RBX += v49; _RBP += v55; _R13 += v57; } while ( v8 != v53 ); } } }
ggml_compute_forward_silu_back: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV R13,qword ptr [RSI + 0x98] MOV EAX,dword ptr [R13] CMP EAX,0x1 JZ 0x00138121 TEST EAX,EAX JNZ 0x0013827b MOV R12,qword ptr [R14 + 0xa0] MOVSXD R15,dword ptr [RDI] MOV EBX,dword ptr [RDI + 0x4] MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOV RDI,R12 CALL 0x0010aa40 MOV RCX,RAX ADD EAX,EBX DEC EAX CDQ IDIV EBX CDQE IMUL R15,RAX ADD EAX,R15D CMP EAX,ECX CMOVGE EAX,ECX CMP R15D,EAX JGE 0x0013826c MOV RBX,qword ptr [R14 + 0x38] MOV RCX,qword ptr [R12 + 0x38] MOV RBP,qword ptr [R13 + 0x38] MOV RDX,R12 MOV R12,qword ptr [RSP + 0x10] AND R12D,0x7fffffff CDQE MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x8],RBX IMUL RBX,R15 ADD RBX,qword ptr [R14 + 0xf8] MOV qword ptr [RSP + 0x20],RBP IMUL RBP,R15 ADD RBP,qword ptr [R13 + 0xf8] MOV qword ptr [RSP + 0x28],RCX MOV R13,RCX IMUL R13,R15 ADD R13,qword ptr [RDX + 0xf8] LAB_0013809d: CMP dword ptr [RSP + 0x10],0x0 JLE 0x00138103 XOR R14D,R14D LAB_001380a7: VMOVSS XMM0,dword ptr [R13 + R14*0x4] VMOVAPS xmmword ptr [RSP + 0x40],XMM0 VMOVSS XMM1,dword ptr [RBP + R14*0x4] VMOVSS dword ptr [RSP + 0x30],XMM1 VXORPS XMM0,XMM0,dword ptr [0x00149de0] CALL 0x0010aeb0 VMOVSS XMM2,dword ptr [0x001490a0] VADDSS XMM0,XMM0,XMM2 VDIVSS XMM0,XMM2,XMM0 VMULSS XMM1,XMM0,dword ptr [RSP + 0x30] VSUBSS XMM0,XMM2,XMM0 VFMADD132SS XMM0,XMM2,dword ptr [RSP + 0x40] VMULSS XMM0,XMM1,XMM0 VMOVSS dword ptr [RBX + R14*0x4],XMM0 INC R14 CMP R12,R14 JNZ 0x001380a7 LAB_00138103: INC R15 ADD RBX,qword ptr [RSP + 0x8] ADD RBP,qword ptr [RSP + 0x20] ADD R13,qword ptr [RSP + 0x28] CMP R15,qword ptr [RSP + 0x18] JNZ 0x0013809d JMP 0x0013826c LAB_00138121: MOV R12,qword ptr [R14 + 0xa0] MOVSXD R15,dword ptr [RDI] MOV EBX,dword ptr [RDI + 0x4] MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RDI,R12 CALL 0x0010aa40 MOV RCX,RAX ADD EAX,EBX DEC EAX CDQ IDIV EBX CDQE IMUL R15,RAX ADD EAX,R15D CMP EAX,ECX CMOVGE EAX,ECX CMP R15D,EAX JGE 0x0013826c MOV RBP,qword ptr [R14 + 0x38] MOV RDX,qword ptr [R12 + 0x38] MOV RSI,qword ptr [R13 + 0x38] MOV RCX,qword ptr [RSP + 0x8] MOV EBX,ECX AND EBX,0x7fffffff MOV qword ptr [RSP + 0x28],RBP MOV RDI,RBP IMUL RDI,R15 ADD RDI,qword ptr [R14 + 0xf8] MOV qword ptr [RSP + 0x18],RSI IMUL RSI,R15 ADD RSI,qword ptr [R13 + 0xf8] MOV qword ptr [RSP + 0x20],RDX MOV R8,RDX IMUL R8,R15 ADD R8,qword ptr [R12 + 0xf8] CDQE MOV qword ptr [RSP + 0x50],RAX MOV RBP,qword ptr [0x0015bf60] LAB_001381c0: MOV qword ptr [RSP + 0x10],R15 CMP dword ptr [RSP + 0x8],0x0 JLE 0x0013824a XOR R15D,R15D LAB_001381cf: MOVZX EAX,word ptr [R8 + R15*0x2] MOVZX R9D,word ptr [RSI + R15*0x2] MOV qword ptr [RSP + 0x40],R9 VMOVSS XMM0,dword ptr [RBP + RAX*0x4] VMOVAPS xmmword ptr [RSP + 0x30],XMM0 VXORPS XMM0,XMM0,dword ptr [0x00149de0] MOV R14,RDI MOV R13,RSI MOV R12,R8 CALL 0x0010aeb0 VMOVSS XMM2,dword ptr [0x001490a0] MOV R8,R12 MOV RSI,R13 MOV RDI,R14 VADDSS XMM0,XMM0,XMM2 VDIVSS XMM0,XMM2,XMM0 MOV RAX,qword ptr [RSP + 0x40] VMULSS XMM1,XMM0,dword ptr [RBP + RAX*0x4] VSUBSS XMM0,XMM2,XMM0 VFMADD132SS XMM0,XMM2,dword ptr [RSP + 0x30] VMULSS XMM0,XMM1,XMM0 VCVTPS2PH XMM0,XMM0,0x0 VPEXTRW word ptr [R14 + R15*0x2],XMM0,0x0 INC R15 CMP RBX,R15 JNZ 0x001381cf LAB_0013824a: MOV R15,qword ptr [RSP + 0x10] INC R15 ADD RDI,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RSP + 0x18] ADD R8,qword ptr [RSP + 0x20] CMP R15,qword ptr [RSP + 0x50] JNZ 0x001381c0 LAB_0013826c: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013827b: LEA RDI,[0x153aa0] LEA RDX,[0x149680] MOV ESI,0xc1e XOR EAX,EAX CALL 0x0010af40
void ggml_compute_forward_silu_back(int *param_1,long param_2) { uint uVar1; ushort uVar2; int iVar3; int *piVar4; int8 uVar5; long lVar6; long lVar7; int1 auVar8 [16]; int *puVar9; int iVar10; int iVar11; uint uVar12; long lVar13; long lVar14; long lVar15; long lVar16; ulong uVar17; long lVar18; int1 auVar19 [16]; float fVar20; float fVar21; piVar4 = *(int **)(param_2 + 0x98); if (*piVar4 == 1) { lVar16 = *(long *)(param_2 + 0xa0); iVar3 = *param_1; iVar11 = param_1[1]; uVar5 = *(int8 *)(lVar16 + 0x10); iVar10 = ggml_nrows(lVar16); puVar9 = PTR_ggml_table_f32_f16_0015bf60; iVar11 = (iVar10 + iVar11 + -1) / iVar11; lVar18 = (long)iVar3 * (long)iVar11; iVar11 = iVar11 + (int)lVar18; if (iVar10 <= iVar11) { iVar11 = iVar10; } if ((int)lVar18 < iVar11) { lVar6 = *(long *)(lVar16 + 0x38); lVar7 = *(long *)(piVar4 + 0xe); uVar12 = (uint)uVar5; lVar15 = lVar7 * lVar18 + *(long *)(piVar4 + 0x3e); lVar16 = lVar6 * lVar18 + *(long *)(lVar16 + 0xf8); do { if (0 < (int)uVar12) { uVar17 = 0; do { uVar2 = *(ushort *)(lVar15 + uVar17 * 2); uVar1 = *(uint *)(puVar9 + (ulong)*(ushort *)(lVar16 + uVar17 * 2) * 4); auVar19._4_4_ = DAT_00149de0; auVar19._0_4_ = DAT_00149de0; auVar19._8_4_ = DAT_00149de0; auVar19._12_4_ = DAT_00149de0; auVar19 = vxorps_avx512vl(ZEXT416(uVar1),auVar19); fVar21 = expf(auVar19._0_4_); fVar21 = DAT_001490a0 / (fVar21 + DAT_001490a0); auVar19 = vfmadd132ss_fma(ZEXT416((uint)(DAT_001490a0 - fVar21)), ZEXT416((uint)DAT_001490a0),ZEXT416(uVar1)); auVar19 = vcvtps2ph_f16c(ZEXT416((uint)(fVar21 * *(float *)(puVar9 + (ulong)uVar2 * 4) * auVar19._0_4_)),0); vpextrw_avx(auVar19,0); uVar17 = uVar17 + 1; } while ((uVar12 & 0x7fffffff) != uVar17); } lVar18 = lVar18 + 1; lVar15 = lVar15 + lVar7; lVar16 = lVar16 + lVar6; } while (lVar18 != iVar11); } } else { if (*piVar4 != 0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp" ,0xc1e,"fatal error"); } lVar16 = *(long *)(param_2 + 0xa0); iVar3 = *param_1; iVar11 = param_1[1]; uVar5 = *(int8 *)(lVar16 + 0x10); iVar10 = ggml_nrows(lVar16); iVar11 = (iVar10 + iVar11 + -1) / iVar11; lVar18 = (long)iVar3 * (long)iVar11; iVar11 = iVar11 + (int)lVar18; if (iVar10 <= iVar11) { iVar11 = iVar10; } if ((int)lVar18 < iVar11) { lVar6 = *(long *)(param_2 + 0x38); lVar7 = *(long *)(lVar16 + 0x38); lVar15 = *(long *)(piVar4 + 0xe); uVar12 = (uint)uVar5; lVar13 = lVar6 * lVar18 + *(long *)(param_2 + 0xf8); lVar14 = lVar15 * lVar18 + *(long *)(piVar4 + 0x3e); lVar16 = lVar7 * lVar18 + *(long *)(lVar16 + 0xf8); do { if (0 < (int)uVar12) { uVar17 = 0; do { uVar1 = *(uint *)(lVar16 + uVar17 * 4); fVar21 = *(float *)(lVar14 + uVar17 * 4); auVar8._4_4_ = DAT_00149de0; auVar8._0_4_ = DAT_00149de0; auVar8._8_4_ = DAT_00149de0; auVar8._12_4_ = DAT_00149de0; auVar19 = vxorps_avx512vl(ZEXT416(uVar1),auVar8); fVar20 = expf(auVar19._0_4_); fVar20 = DAT_001490a0 / (fVar20 + DAT_001490a0); auVar19 = vfmadd132ss_fma(ZEXT416((uint)(DAT_001490a0 - fVar20)), ZEXT416((uint)DAT_001490a0),ZEXT416(uVar1)); *(float *)(lVar13 + uVar17 * 4) = fVar20 * fVar21 * auVar19._0_4_; uVar17 = uVar17 + 1; } while ((uVar12 & 0x7fffffff) != uVar17); } lVar18 = lVar18 + 1; lVar13 = lVar13 + lVar6; lVar14 = lVar14 + lVar15; lVar16 = lVar16 + lVar7; } while (lVar18 != iVar11); } } return; }
63,259
rtree_get_req
eloqsql/storage/myisam/rt_index.c
static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length, my_off_t page, int level) { uchar *k; uchar *last; uint nod_flag; int res; uchar *page_buf; uint k_len; uint *saved_key = (uint*) (info->rtree_recursion_state) + level; if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length))) return -1; if (!_mi_fetch_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf, 0)) goto err1; nod_flag = mi_test_if_nod(page_buf); k_len = keyinfo->keylength - info->s->base.rec_reflength; if(info->rtree_recursion_depth >= level) { k = page_buf + *saved_key; if (!nod_flag) { /* Only leaf pages contain data references. */ /* Need to check next key with data reference. */ k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag); } } else { k = rt_PAGE_FIRST_KEY(page_buf, nod_flag); } last = rt_PAGE_END(page_buf); for (; k < last; k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag)) { if (nod_flag) { /* this is an internal node in the tree */ switch ((res = rtree_get_req(info, keyinfo, key_length, _mi_kpos(nod_flag, k), level + 1))) { case 0: /* found - exit from recursion */ *saved_key = (uint) (k - page_buf); goto ok; case 1: /* not found - continue searching */ info->rtree_recursion_depth = level; break; default: case -1: /* error */ goto err1; } } else { /* this is a leaf */ uchar *after_key = rt_PAGE_NEXT_KEY(k, k_len, nod_flag); info->lastpos = _mi_dpos(info, 0, after_key); info->lastkey_length = k_len + info->s->base.rec_reflength; memcpy(info->lastkey, k, info->lastkey_length); info->rtree_recursion_depth = level; *saved_key = (uint) (k - page_buf); if (after_key < last) { info->int_keypos = (uchar*)saved_key; memcpy(info->buff, page_buf, keyinfo->block_length); info->int_maxpos = rt_PAGE_END(info->buff); info->buff_used = 0; } else { info->buff_used = 1; } res = 0; goto ok; } } info->lastpos = HA_OFFSET_ERROR; my_errno = HA_ERR_KEY_NOT_FOUND; res = 1; ok: my_afree((uchar*)page_buf); return res; err1: my_afree((uchar*)page_buf); info->lastpos = HA_OFFSET_ERROR; return -1; }
O3
c
rtree_get_req: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rcx, -0x38(%rbp) movslq %ecx, %r14 shlq $0x2, %r14 addq 0x3b8(%rdi), %r14 movzwl 0xe(%rsi), %eax movq %rsp, %r15 addl $0xf, %eax andl $-0x10, %eax subq %rax, %r15 movq %r15, %rsp movq %rsi, -0x50(%rbp) movl $0x3, %ecx movq %r15, %r8 xorl %r9d, %r9d callq 0x84424 testq %rax, %rax je 0x8a81e movzbl (%r15), %ecx movq (%rbx), %rax movq %rcx, %rsi testb %cl, %cl movl $0x0, %edi jns 0x8a70b movl 0x17c(%rax), %edi movq -0x50(%rbp), %rcx movzwl 0x12(%rcx), %ecx movl 0x178(%rax), %eax movl %ecx, %r8d subl %eax, %ecx movq %rcx, -0x40(%rbp) movl %edi, %r13d movq -0x38(%rbp), %rcx cmpl %ecx, 0x3c0(%rbx) movq %rbx, -0x48(%rbp) jge 0x8a73f leaq (%r15,%r13), %rdx addq $0x2, %rdx jmp 0x8a752 movl (%r14), %edx addq %r15, %rdx testl %edi, %edi jne 0x8a752 movl -0x40(%rbp), %ecx addq %rax, %rcx addq %rcx, %rdx movq %r14, -0x60(%rbp) movzbl 0x1(%r15), %ecx andl $0x7f, %esi shll $0x8, %esi orq %rcx, %rsi movq %r15, -0x68(%rbp) addq %r15, %rsi movq %rsi, -0x78(%rbp) cmpq %rsi, %rdx jae 0x8a7ec movq -0x38(%rbp), %rcx incl %ecx movl %ecx, -0x58(%rbp) movl -0x40(%rbp), %ecx movq %rcx, -0x70(%rbp) movl %edx, %r15d subl -0x68(%rbp), %r15d addl %edi, %r8d subl %eax, %r8d movl %r8d, -0x54(%rbp) movq %rdx, %r14 movq %rdx, -0x80(%rbp) movq -0x48(%rbp), %rbx testl %edi, %edi je 0x8a854 movl %edi, %r12d movq %r14, %rsi callq 0x84d9e movq %rbx, %rdi movq -0x50(%rbp), %rsi movq %rax, %rdx movl -0x58(%rbp), %ecx callq 0x8a68f cmpl $0x1, %eax jne 0x8a80e movq -0x38(%rbp), %rax movl %eax, 0x3c0(%rbx) addq -0x70(%rbp), %r14 addq %r13, %r14 addl -0x54(%rbp), %r15d cmpq -0x78(%rbp), %r14 movq -0x80(%rbp), %rdx movl %r12d, %edi jb 0x8a7a0 movq -0x48(%rbp), %rax movq $-0x1, 0x170(%rax) callq 0xa2412 movl $0x78, (%rax) movl $0x1, %r13d jmp 0x8a82f testl %eax, %eax movq -0x60(%rbp), %rax jne 0x8a81e movl %r15d, (%rax) xorl %r13d, %r13d jmp 0x8a82f movq $-0x1, 0x170(%rbx) movl $0xffffffff, %r13d # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x8a91a movl %r13d, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x70(%rbp), %rcx addq %rdx, %rcx movq -0x48(%rbp), %rbx movq (%rbx), %rax movl 0x178(%rax), %r14d addq %rcx, %r14 xorl %r13d, %r13d movq %rbx, %rdi movq %rdx, %r15 xorl %esi, %esi movq %r14, %rdx callq 0x84e7d movq %rax, 0x170(%rbx) movq (%rbx), %rax movq 0x108(%rbx), %rdi movq -0x40(%rbp), %rdx addl 0x178(%rax), %edx movl %edx, 0x1d8(%rbx) movq %r15, %rsi callq 0x29080 movq -0x38(%rbp), %rax movl %eax, 0x3c0(%rbx) movq -0x68(%rbp), %rsi subl %esi, %r15d movq -0x60(%rbp), %rax movl %r15d, (%rax) cmpq -0x78(%rbp), %r14 jae 0x8a90e movq %rax, 0x128(%rbx) movq 0x100(%rbx), %rdi movq -0x50(%rbp), %rax movzwl 0xe(%rax), %edx callq 0x29080 movq 0x100(%rbx), %rax movzbl 0x1(%rax), %ecx movzbl (%rax), %edx andl $0x7f, %edx shll $0x8, %edx orq %rcx, %rdx addq %rax, %rdx movq %rdx, 0x130(%rbx) movb $0x0, 0x33d(%rbx) jmp 0x8a82f movb $0x1, 0x33d(%rbx) jmp 0x8a82f callq 0x29260
rtree_get_req: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_38], rcx movsxd r14, ecx shl r14, 2 add r14, [rdi+3B8h] movzx eax, word ptr [rsi+0Eh] mov r15, rsp add eax, 0Fh and eax, 0FFFFFFF0h sub r15, rax mov rsp, r15 mov [rbp+var_50], rsi mov ecx, 3 mov r8, r15 xor r9d, r9d call _mi_fetch_keypage test rax, rax jz loc_8A81E movzx ecx, byte ptr [r15] mov rax, [rbx] mov rsi, rcx test cl, cl mov edi, 0 jns short loc_8A70B mov edi, [rax+17Ch] loc_8A70B: mov rcx, [rbp+var_50] movzx ecx, word ptr [rcx+12h] mov eax, [rax+178h] mov r8d, ecx sub ecx, eax mov [rbp+var_40], rcx mov r13d, edi mov rcx, [rbp+var_38] cmp [rbx+3C0h], ecx mov [rbp+var_48], rbx jge short loc_8A73F lea rdx, [r15+r13] add rdx, 2 jmp short loc_8A752 loc_8A73F: mov edx, [r14] add rdx, r15 test edi, edi jnz short loc_8A752 mov ecx, dword ptr [rbp+var_40] add rcx, rax add rdx, rcx loc_8A752: mov [rbp+var_60], r14 movzx ecx, byte ptr [r15+1] and esi, 7Fh shl esi, 8 or rsi, rcx mov [rbp+var_68], r15 add rsi, r15 mov [rbp+var_78], rsi cmp rdx, rsi jnb short loc_8A7EC mov rcx, [rbp+var_38] inc ecx mov [rbp+var_58], ecx mov ecx, dword ptr [rbp+var_40] mov [rbp+var_70], rcx mov r15d, edx sub r15d, dword ptr [rbp+var_68] add r8d, edi sub r8d, eax mov [rbp+var_54], r8d mov r14, rdx mov [rbp+var_80], rdx mov rbx, [rbp+var_48] loc_8A7A0: test edi, edi jz loc_8A854 mov r12d, edi mov rsi, r14 call _mi_kpos mov rdi, rbx mov rsi, [rbp+var_50] mov rdx, rax mov ecx, [rbp+var_58] call rtree_get_req cmp eax, 1 jnz short loc_8A80E mov rax, [rbp+var_38] mov [rbx+3C0h], eax add r14, [rbp+var_70] add r14, r13 add r15d, [rbp+var_54] cmp r14, [rbp+var_78] mov rdx, [rbp+var_80] mov edi, r12d jb short loc_8A7A0 loc_8A7EC: mov rax, [rbp+var_48] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov r13d, 1 jmp short loc_8A82F loc_8A80E: test eax, eax mov rax, [rbp+var_60] jnz short loc_8A81E mov [rax], r15d xor r13d, r13d jmp short loc_8A82F loc_8A81E: mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh mov r13d, 0FFFFFFFFh loc_8A82F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_8A91A mov eax, r13d lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8A854: mov rcx, [rbp+var_70] add rcx, rdx mov rbx, [rbp+var_48] mov rax, [rbx] mov r14d, [rax+178h] add r14, rcx xor r13d, r13d mov rdi, rbx mov r15, rdx xor esi, esi mov rdx, r14 call _mi_dpos mov [rbx+170h], rax mov rax, [rbx] mov rdi, [rbx+108h] mov rdx, [rbp+var_40] add edx, [rax+178h] mov [rbx+1D8h], edx mov rsi, r15 call _memcpy mov rax, [rbp+var_38] mov [rbx+3C0h], eax mov rsi, [rbp+var_68] sub r15d, esi mov rax, [rbp+var_60] mov [rax], r15d cmp r14, [rbp+var_78] jnb short loc_8A90E mov [rbx+128h], rax mov rdi, [rbx+100h] mov rax, [rbp+var_50] movzx edx, word ptr [rax+0Eh] call _memcpy mov rax, [rbx+100h] movzx ecx, byte ptr [rax+1] movzx edx, byte ptr [rax] and edx, 7Fh shl edx, 8 or rdx, rcx add rdx, rax mov [rbx+130h], rdx mov byte ptr [rbx+33Dh], 0 jmp loc_8A82F loc_8A90E: mov byte ptr [rbx+33Dh], 1 jmp loc_8A82F loc_8A91A: call ___stack_chk_fail
long long rtree_get_req(long long *a1, long long a2, long long a3, long long a4) { long long *v4; // rbx unsigned int *v5; // r14 char *v6; // r15 long long v7; // rax char v8; // si long long v9; // rdi long long v10; // rax int v11; // r8d bool v12; // cc unsigned long long v13; // rdx long long v14; // rcx int v15; // r15d unsigned long long v16; // r14 unsigned long long v17; // rax int req; // eax unsigned int v19; // r13d long long *v21; // rbx unsigned long long v22; // r14 unsigned long long v23; // r15 long long v24; // rdi long long v25; // rdx char *v26; // rsi _DWORD *v27; // rax unsigned long long v28; // [rsp+0h] [rbp-80h] BYREF char *v29; // [rsp+8h] [rbp-78h] long long v30; // [rsp+10h] [rbp-70h] char *v31; // [rsp+18h] [rbp-68h] _DWORD *v32; // [rsp+20h] [rbp-60h] unsigned int v33; // [rsp+28h] [rbp-58h] int v34; // [rsp+2Ch] [rbp-54h] long long v35; // [rsp+30h] [rbp-50h] long long *v36; // [rsp+38h] [rbp-48h] long long v37; // [rsp+40h] [rbp-40h] long long v38; // [rsp+48h] [rbp-38h] unsigned long long v39; // [rsp+50h] [rbp-30h] v4 = a1; v39 = __readfsqword(0x28u); v38 = a4; v5 = (unsigned int *)(a1[119] + 4LL * (int)a4); v6 = (char *)&v28 - ((*(unsigned __int16 *)(a2 + 14) + 15) & 0xFFFFFFF0); v35 = a2; if ( mi_fetch_keypage(a1, a2, a3) ) { v7 = *a1; v8 = *v6; v9 = 0LL; if ( *v6 < 0 ) v9 = *(unsigned int *)(v7 + 380); v10 = *(unsigned int *)(v7 + 376); v11 = *(unsigned __int16 *)(v35 + 18); v37 = (unsigned int)(v11 - v10); v12 = *((_DWORD *)v4 + 240) < (int)v38; v36 = v4; if ( v12 ) { v13 = (unsigned long long)&v6[(unsigned int)v9 + 2]; } else { v13 = (unsigned long long)&v6[*v5]; if ( !(_DWORD)v9 ) v13 += v10 + (unsigned int)v37; } v32 = v5; v14 = (unsigned __int8)v6[1]; v31 = v6; v29 = &v6[v14 | ((unsigned __int8)(v8 & 0x7F) << 8)]; if ( v13 >= (unsigned long long)v29 ) { LABEL_13: v36[46] = -1LL; *(_DWORD *)my_thread_var(v9) = 120; return 1; } else { v33 = v38 + 1; v30 = (unsigned int)v37; v15 = v13 - (_DWORD)v31; v34 = v9 + v11 - v10; v16 = v13; v28 = v13; v4 = v36; while ( 1 ) { if ( !(_DWORD)v9 ) { v21 = v36; v22 = v13 + v30 + *(unsigned int *)(*v36 + 376); v19 = 0; v23 = v13; v21[46] = mi_dpos(v36, 0, v22); v24 = v21[33]; v25 = (unsigned int)(*(_DWORD *)(*v21 + 376) + v37); *((_DWORD *)v21 + 118) = v25; memcpy(v24, v23, v25); *((_DWORD *)v21 + 240) = v38; v26 = v31; v27 = v32; *v32 = v23 - (_DWORD)v31; if ( v22 >= (unsigned long long)v29 ) { *((_BYTE *)v21 + 829) = 1; } else { v21[37] = (long long)v27; memcpy(v21[32], v26, *(unsigned __int16 *)(v35 + 14)); v21[38] = v21[32] + (*(unsigned __int8 *)(v21[32] + 1) | (unsigned long long)((unsigned __int8)(*(_BYTE *)v21[32] & 0x7F) << 8)); *((_BYTE *)v21 + 829) = 0; } return v19; } v17 = mi_kpos(v9, v16); req = rtree_get_req(v4, v35, v17, v33); if ( req != 1 ) break; *((_DWORD *)v4 + 240) = v38; v16 += (unsigned int)v9 + v30; v15 += v34; v13 = v28; v9 = (unsigned int)v9; if ( v16 >= (unsigned long long)v29 ) goto LABEL_13; } if ( req ) goto LABEL_16; *v32 = v15; return 0; } } else { LABEL_16: v4[46] = -1LL; return (unsigned int)-1; } }
rtree_get_req: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],RCX MOVSXD R14,ECX SHL R14,0x2 ADD R14,qword ptr [RDI + 0x3b8] MOVZX EAX,word ptr [RSI + 0xe] MOV R15,RSP ADD EAX,0xf AND EAX,0xfffffff0 SUB R15,RAX MOV RSP,R15 MOV qword ptr [RBP + -0x50],RSI MOV ECX,0x3 MOV R8,R15 XOR R9D,R9D CALL 0x00184424 TEST RAX,RAX JZ 0x0018a81e MOVZX ECX,byte ptr [R15] MOV RAX,qword ptr [RBX] MOV RSI,RCX TEST CL,CL MOV EDI,0x0 JNS 0x0018a70b MOV EDI,dword ptr [RAX + 0x17c] LAB_0018a70b: MOV RCX,qword ptr [RBP + -0x50] MOVZX ECX,word ptr [RCX + 0x12] MOV EAX,dword ptr [RAX + 0x178] MOV R8D,ECX SUB ECX,EAX MOV qword ptr [RBP + -0x40],RCX MOV R13D,EDI MOV RCX,qword ptr [RBP + -0x38] CMP dword ptr [RBX + 0x3c0],ECX MOV qword ptr [RBP + -0x48],RBX JGE 0x0018a73f LEA RDX,[R15 + R13*0x1] ADD RDX,0x2 JMP 0x0018a752 LAB_0018a73f: MOV EDX,dword ptr [R14] ADD RDX,R15 TEST EDI,EDI JNZ 0x0018a752 MOV ECX,dword ptr [RBP + -0x40] ADD RCX,RAX ADD RDX,RCX LAB_0018a752: MOV qword ptr [RBP + -0x60],R14 MOVZX ECX,byte ptr [R15 + 0x1] AND ESI,0x7f SHL ESI,0x8 OR RSI,RCX MOV qword ptr [RBP + -0x68],R15 ADD RSI,R15 MOV qword ptr [RBP + -0x78],RSI CMP RDX,RSI JNC 0x0018a7ec MOV RCX,qword ptr [RBP + -0x38] INC ECX MOV dword ptr [RBP + -0x58],ECX MOV ECX,dword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x70],RCX MOV R15D,EDX SUB R15D,dword ptr [RBP + -0x68] ADD R8D,EDI SUB R8D,EAX MOV dword ptr [RBP + -0x54],R8D MOV R14,RDX MOV qword ptr [RBP + -0x80],RDX MOV RBX,qword ptr [RBP + -0x48] LAB_0018a7a0: TEST EDI,EDI JZ 0x0018a854 MOV R12D,EDI MOV RSI,R14 CALL 0x00184d9e MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x50] MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x58] CALL 0x0018a68f CMP EAX,0x1 JNZ 0x0018a80e MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RBX + 0x3c0],EAX ADD R14,qword ptr [RBP + -0x70] ADD R14,R13 ADD R15D,dword ptr [RBP + -0x54] CMP R14,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x80] MOV EDI,R12D JC 0x0018a7a0 LAB_0018a7ec: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x170],-0x1 CALL 0x001a2412 MOV dword ptr [RAX],0x78 MOV R13D,0x1 JMP 0x0018a82f LAB_0018a80e: TEST EAX,EAX MOV RAX,qword ptr [RBP + -0x60] JNZ 0x0018a81e MOV dword ptr [RAX],R15D XOR R13D,R13D JMP 0x0018a82f LAB_0018a81e: MOV qword ptr [RBX + 0x170],-0x1 MOV R13D,0xffffffff LAB_0018a82f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0018a91a MOV EAX,R13D LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018a854: MOV RCX,qword ptr [RBP + -0x70] ADD RCX,RDX MOV RBX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBX] MOV R14D,dword ptr [RAX + 0x178] ADD R14,RCX XOR R13D,R13D MOV RDI,RBX MOV R15,RDX XOR ESI,ESI MOV RDX,R14 CALL 0x00184e7d MOV qword ptr [RBX + 0x170],RAX MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RBX + 0x108] MOV RDX,qword ptr [RBP + -0x40] ADD EDX,dword ptr [RAX + 0x178] MOV dword ptr [RBX + 0x1d8],EDX MOV RSI,R15 CALL 0x00129080 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RBX + 0x3c0],EAX MOV RSI,qword ptr [RBP + -0x68] SUB R15D,ESI MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],R15D CMP R14,qword ptr [RBP + -0x78] JNC 0x0018a90e MOV qword ptr [RBX + 0x128],RAX MOV RDI,qword ptr [RBX + 0x100] MOV RAX,qword ptr [RBP + -0x50] MOVZX EDX,word ptr [RAX + 0xe] CALL 0x00129080 MOV RAX,qword ptr [RBX + 0x100] MOVZX ECX,byte ptr [RAX + 0x1] MOVZX EDX,byte ptr [RAX] AND EDX,0x7f SHL EDX,0x8 OR RDX,RCX ADD RDX,RAX MOV qword ptr [RBX + 0x130],RDX MOV byte ptr [RBX + 0x33d],0x0 JMP 0x0018a82f LAB_0018a90e: MOV byte ptr [RBX + 0x33d],0x1 JMP 0x0018a82f LAB_0018a91a: CALL 0x00129260
int8 rtree_get_req(long *param_1,long param_2,int8 param_3,int8 param_4) { ushort uVar1; void *pvVar2; long lVar3; long *plVar4; int iVar5; long lVar6; int8 uVar7; int4 *puVar8; uint uVar9; byte *pbVar10; int iVar11; ulong uVar12; uint *puVar13; byte *pbVar14; uint uVar15; byte *pbVar16; long in_FS_OFFSET; int8 uStack_90; int8 local_88; byte *local_80; ulong local_78; byte *local_70; uint *local_68; int local_60; int local_5c; long local_58; long *local_50; ulong local_48; int8 local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); puVar13 = (uint *)((long)(int)param_4 * 4 + param_1[0x77]); lVar3 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0xf & 0xfffffff0); pbVar16 = (byte *)((long)&local_88 + lVar3); local_58 = param_2; local_40 = param_4; *(int8 *)((long)&uStack_90 + lVar3) = 0x18a6e9; lVar6 = _mi_fetch_keypage(); if (lVar6 == 0) { LAB_0018a81e: param_1[0x2e] = -1; uVar7 = 0xffffffff; } else { uVar12 = 0; if ((char)*pbVar16 < '\0') { uVar12 = (ulong)*(uint *)(*param_1 + 0x17c); } uVar9 = *(uint *)(*param_1 + 0x178); local_48 = (ulong)(*(ushort *)(local_58 + 0x12) - uVar9); iVar11 = (int)uVar12; local_50 = param_1; if ((int)param_1[0x78] < (int)local_40) { pbVar10 = pbVar16 + uVar12 + 2; } else { pbVar10 = pbVar16 + *puVar13; if (iVar11 == 0) { pbVar10 = pbVar10 + local_48 + uVar9; } } local_68 = puVar13; local_80 = pbVar16 + ((ulong)((*pbVar16 & 0x7f) << 8) | (ulong)*(byte *)((long)&local_88 + lVar3 + 1)); local_70 = pbVar16; if (pbVar10 < local_80) { local_60 = (int)local_40 + 1; local_70._0_4_ = (int)pbVar16; uVar15 = (int)pbVar10 - (int)local_70; local_5c = ((uint)*(ushort *)(local_58 + 0x12) + iVar11) - uVar9; local_88 = pbVar10; local_78 = local_48; do { plVar4 = local_50; pbVar16 = local_88; if (iVar11 == 0) { pbVar14 = local_88 + *(uint *)(*local_50 + 0x178) + local_78; uVar7 = 0; *(int8 *)((long)&uStack_90 + lVar3) = 0x18a87f; lVar6 = _mi_dpos(plVar4,0,pbVar14); plVar4[0x2e] = lVar6; pvVar2 = (void *)plVar4[0x21]; uVar9 = (int)local_48 + *(int *)(*plVar4 + 0x178); *(uint *)(plVar4 + 0x3b) = uVar9; *(int8 *)((long)&uStack_90 + lVar3) = 0x18a8a8; memcpy(pvVar2,pbVar16,(ulong)uVar9); pbVar10 = local_70; *(int *)(plVar4 + 0x78) = (int)local_40; *local_68 = (int)pbVar16 - (int)local_70; if (pbVar14 < local_80) { plVar4[0x25] = (long)local_68; pvVar2 = (void *)plVar4[0x20]; uVar1 = *(ushort *)(local_58 + 0xe); *(int8 *)((long)&uStack_90 + lVar3) = 0x18a8e1; memcpy(pvVar2,pbVar10,(ulong)uVar1); pbVar16 = (byte *)plVar4[0x20]; plVar4[0x26] = (long)(pbVar16 + ((ulong)((*pbVar16 & 0x7f) << 8) | (ulong)pbVar16[1])); *(int1 *)((long)plVar4 + 0x33d) = 0; } else { *(int1 *)((long)plVar4 + 0x33d) = 1; } goto LAB_0018a82f; } *(int8 *)((long)&uStack_90 + lVar3) = 0x18a7b3; uVar7 = _mi_kpos(uVar12,pbVar10); lVar6 = local_58; iVar5 = local_60; *(int8 *)((long)&uStack_90 + lVar3) = 0x18a7c5; iVar5 = rtree_get_req(param_1,lVar6,uVar7,iVar5); if (iVar5 != 1) { if (iVar5 != 0) goto LAB_0018a81e; *local_68 = uVar15; uVar7 = 0; goto LAB_0018a82f; } *(int *)(param_1 + 0x78) = (int)local_40; pbVar10 = pbVar10 + uVar12 + local_78; uVar15 = uVar15 + local_5c; } while (pbVar10 < local_80); } local_50[0x2e] = -1; *(int8 *)((long)&uStack_90 + lVar3) = 0x18a800; puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x78; uVar7 = 1; } LAB_0018a82f: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar7; } /* WARNING: Subroutine does not return */ *(code **)((long)&uStack_90 + lVar3) = rtree_get_next; __stack_chk_fail(); }
63,260
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const
llama.cpp/common/minja/minja.hpp
T get(const std::string & key, T default_value) const { if (!contains(key)) return default_value; return at(key).get<T>(); }
O3
cpp
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %r14 movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movq %rsi, %rdi movq %rdx, %rsi callq 0x78f6c testb %al, %al je 0x7bc0e leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %r12, %rsi callq 0x729ee movq %r15, %rdi movq %r14, %rsi callq 0x775c6 movq %rbx, %rdi movq %rax, %rsi callq 0x75e92 leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x732fc movq %r14, %rdi callq 0x300e0 leaq 0x40(%rsp), %rdi callq 0x34564 leaq 0x30(%rsp), %rdi callq 0x34564 leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0x34564 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0x7bc6e movq 0x84392(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0x7bc59 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7bc63 leaq 0x10(%rbx), %rdi movq %rdi, (%rbx) movq (%r14), %rax leaq 0x10(%r14), %r15 cmpq %r15, %rax je 0x7bc32 movq %rax, (%rbx) movq 0x10(%r14), %rax movq %rax, 0x10(%rbx) movq 0x8(%r14), %r12 jmp 0x7bc43 movq 0x8(%r14), %r12 leaq 0x1(%r12), %rdx movq %r15, %rsi callq 0x1c0b0 movq %r12, 0x8(%rbx) movq %r15, (%r14) movq $0x0, 0x8(%r14) movb $0x0, 0x10(%r14) jmp 0x7bc6e movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x7bc6e movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x6cc36 movq %rbx, %rdi callq 0x1c7d0
_ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_: push r15 push r14 push r12 push rbx sub rsp, 58h mov r14, rcx mov r12, rdx mov r15, rsi mov rbx, rdi mov rdi, rsi mov rsi, rdx call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) test al, al jz short loc_7BC0E lea r14, [rsp+78h+var_70] mov rdi, r14 mov rsi, r12 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r15; this mov rsi, r14; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rbx mov rsi, rax call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) 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() lea rdi, [rsp+78h+var_38] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+78h+var_58] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_7BC6E mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_7BC59 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_7BC63 loc_7BC0E: lea rdi, [rbx+10h] mov [rbx], rdi mov rax, [r14] lea r15, [r14+10h] cmp rax, r15 jz short loc_7BC32 mov [rbx], rax mov rax, [r14+10h] mov [rbx+10h], rax mov r12, [r14+8] jmp short loc_7BC43 loc_7BC32: mov r12, [r14+8] lea rdx, [r12+1] mov rsi, r15 call _memcpy loc_7BC43: mov [rbx+8], r12 mov [r14], r15 mov qword ptr [r14+8], 0 mov byte ptr [r14+10h], 0 jmp short loc_7BC6E loc_7BC59: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7BC63: cmp eax, 1 jnz short loc_7BC6E mov rax, [rdi] call qword ptr [rax+18h] loc_7BC6E: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Value::get<std::string>(_QWORD *a1, minja::Value *a2, __m128d a3, long long a4, _QWORD *a5) { _QWORD *v7; // rax long long v8; // rdi signed __int32 v9; // eax _QWORD *v10; // rdi long long v11; // r12 __int128 v13; // [rsp+8h] [rbp-70h] BYREF volatile signed __int32 *v14; // [rsp+20h] [rbp-58h] BYREF volatile signed __int32 *v15; // [rsp+30h] [rbp-48h] BYREF volatile signed __int32 *v16; // [rsp+40h] [rbp-38h] BYREF char v17[48]; // [rsp+48h] [rbp-30h] BYREF if ( minja::Value::contains((long long)a2, a3) ) { minja::Value::Value(&v13); v7 = (_QWORD *)minja::Value::at(a2, (const minja::Value *)&v13); minja::Value::get<std::string>((long long)a1, v7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v17); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v17); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v16); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v14); v8 = *((_QWORD *)&v13 + 1); if ( *((_QWORD *)&v13 + 1) ) { if ( _libc_single_threaded ) { v9 = *(_DWORD *)(*((_QWORD *)&v13 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v13 + 1) + 12LL) = v9 - 1; } else { v9 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v13 + 1) + 12LL), 0xFFFFFFFF); } if ( v9 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL); } } else { v10 = a1 + 2; *a1 = a1 + 2; if ( (_QWORD *)*a5 == a5 + 2 ) { v11 = a5[1]; memcpy(v10, a5 + 2, v11 + 1); } else { *a1 = *a5; a1[2] = a5[2]; v11 = a5[1]; } a1[1] = v11; *a5 = a5 + 2; a5[1] = 0LL; *((_BYTE *)a5 + 16) = 0; } return a1; }
get<std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RCX MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RSI MOV RSI,RDX CALL 0x00178f6c TEST AL,AL JZ 0x0017bc0e LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,R12 CALL 0x001729ee LAB_0017bba0: MOV RDI,R15 MOV RSI,R14 CALL 0x001775c6 MOV RDI,RBX MOV RSI,RAX CALL 0x00175e92 LAB_0017bbb6: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x001732fc MOV RDI,R14 CALL 0x001300e0 LEA RDI,[RSP + 0x40] CALL 0x00134564 LEA RDI,[RSP + 0x30] CALL 0x00134564 LEA R14,[RSP + 0x20] MOV RDI,R14 CALL 0x00134564 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x0017bc6e MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x0017bc59 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017bc63 LAB_0017bc0e: LEA RDI,[RBX + 0x10] MOV qword ptr [RBX],RDI MOV RAX,qword ptr [R14] LEA R15,[R14 + 0x10] CMP RAX,R15 JZ 0x0017bc32 MOV qword ptr [RBX],RAX MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RBX + 0x10],RAX MOV R12,qword ptr [R14 + 0x8] JMP 0x0017bc43 LAB_0017bc32: MOV R12,qword ptr [R14 + 0x8] LEA RDX,[R12 + 0x1] MOV RSI,R15 CALL 0x0011c0b0 LAB_0017bc43: MOV qword ptr [RBX + 0x8],R12 MOV qword ptr [R14],R15 MOV qword ptr [R14 + 0x8],0x0 MOV byte ptr [R14 + 0x10],0x0 JMP 0x0017bc6e LAB_0017bc59: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017bc63: CMP EAX,0x1 JNZ 0x0017bc6e MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0017bc6e: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >(std::__cxx11::string const&, std::__cxx11::string) const */ int8 * minja::Value::get<std::__cxx11::string> (int8 *param_1,Value *param_2,string *param_3,int8 *param_4) { int8 *__src; int *piVar1; char cVar2; int iVar3; long lVar4; Value local_70 [8]; long *local_68; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_38 [8]; data local_30 [16]; cVar2 = contains(param_2,param_3); if (cVar2 == '\0') { *param_1 = param_1 + 2; __src = param_4 + 2; if ((int8 *)*param_4 == __src) { lVar4 = param_4[1]; memcpy(param_1 + 2,__src,lVar4 + 1); } else { *param_1 = (void *)*param_4; param_1[2] = param_4[2]; lVar4 = param_4[1]; } param_1[1] = lVar4; *param_4 = __src; param_4[1] = 0; *(int1 *)(param_4 + 2) = 0; } else { Value(local_70,param_3); /* try { // try from 0017bba0 to 0017bbb5 has its CatchHandler @ 0017bc7d */ at(param_2,local_70); get<std::__cxx11::string>(); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::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); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_38); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); if (local_68 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_68 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_68 + 0xc); *(int *)((long)local_68 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_68 + 0x18))(); } } } return param_1; }
63,261
my_longlong10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *e; long long_val; uint sign= 0; ulonglong uval = (ulonglong)val; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; *dst++= '-'; len--; sign= 1; } } e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (uval == 0) { *--p= '0'; len= 1; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p = '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p = (char) ('0' + (long_val - quo*10)); long_val= quo; } len= MY_MIN(len, (size_t) (e-p)); cnv: memcpy(dst, p, len); return len+sign; }
O0
c
my_longlong10_to_str_8bit: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movq %rdx, -0x68(%rbp) movl %ecx, -0x6c(%rbp) movq %r8, -0x78(%rbp) movl $0x0, -0x94(%rbp) movq -0x78(%rbp), %rax movq %rax, -0xa0(%rbp) cmpl $0x0, -0x6c(%rbp) jge 0xa3597 cmpq $0x0, -0x78(%rbp) jge 0xa3595 xorl %eax, %eax subq -0xa0(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movb $0x2d, (%rax) movq -0x68(%rbp), %rax addq $-0x1, %rax movq %rax, -0x68(%rbp) movl $0x1, -0x94(%rbp) jmp 0xa3597 leaq -0x50(%rbp), %rax addq $0x40, %rax movq %rax, -0x80(%rbp) movq %rax, -0x88(%rbp) movq -0x80(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xa0(%rbp) jne 0xa35db movq -0x80(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x80(%rbp) movb $0x30, -0x1(%rax) movq $0x1, -0x68(%rbp) jmp 0xa36fb jmp 0xa35dd movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0xa0(%rbp) jbe 0xa364d movq -0xa0(%rbp), %rax movl $0xa, %ecx xorl %edx, %edx divq %rcx movq %rax, -0xa8(%rbp) movq -0xa0(%rbp), %rax imulq $0xa, -0xa8(%rbp), %rcx subq %rcx, %rax movl %eax, -0xac(%rbp) movl -0xac(%rbp), %eax addl $0x30, %eax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xa8(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xa35dd movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) cmpq $0x0, -0x90(%rbp) je 0xa36b7 movq -0x90(%rbp), %rax movl $0xa, %ecx cqto idivq %rcx movq %rax, -0xb8(%rbp) movq -0x90(%rbp), %rax imulq $0xa, -0xb8(%rbp), %rcx subq %rcx, %rax addq $0x30, %rax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xb8(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xa365b movq -0x68(%rbp), %rax movq -0x88(%rbp), %rcx movq -0x80(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax jae 0xa36db movq -0x68(%rbp), %rax movq %rax, -0xc0(%rbp) jmp 0xa36f0 movq -0x88(%rbp), %rax movq -0x80(%rbp), %rcx subq %rcx, %rax movq %rax, -0xc0(%rbp) movq -0xc0(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x68(%rbp), %rdx callq 0x28290 movq -0x68(%rbp), %rax movl -0x94(%rbp), %ecx addq %rcx, %rax movq %rax, -0xc8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xa3742 movq -0xc8(%rbp), %rax addq $0xd0, %rsp popq %rbp retq callq 0x28390 nopw (%rax,%rax)
my_longlong10_to_str_8bit: push rbp mov rbp, rsp sub rsp, 0D0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_68], rdx mov [rbp+var_6C], ecx mov [rbp+var_78], r8 mov [rbp+var_94], 0 mov rax, [rbp+var_78] mov [rbp+var_A0], rax cmp [rbp+var_6C], 0 jge short loc_A3597 cmp [rbp+var_78], 0 jge short loc_A3595 xor eax, eax sub rax, [rbp+var_A0] mov [rbp+var_A0], rax mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx mov byte ptr [rax], 2Dh ; '-' mov rax, [rbp+var_68] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_68], rax mov [rbp+var_94], 1 loc_A3595: jmp short $+2 loc_A3597: lea rax, [rbp+var_50] add rax, 40h ; '@' mov [rbp+var_80], rax mov [rbp+var_88], rax mov rax, [rbp+var_80] mov byte ptr [rax], 0 cmp [rbp+var_A0], 0 jnz short loc_A35DB mov rax, [rbp+var_80] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rcx mov byte ptr [rax-1], 30h ; '0' mov [rbp+var_68], 1 jmp loc_A36FB loc_A35DB: jmp short $+2 loc_A35DD: mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_A0], rax jbe short loc_A364D mov rax, [rbp+var_A0] mov ecx, 0Ah xor edx, edx div rcx mov [rbp+var_A8], rax mov rax, [rbp+var_A0] imul rcx, [rbp+var_A8], 0Ah sub rax, rcx mov [rbp+var_AC], eax mov eax, [rbp+var_AC] add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_A8] mov [rbp+var_A0], rax jmp short loc_A35DD loc_A364D: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_A365B: cmp [rbp+var_90], 0 jz short loc_A36B7 mov rax, [rbp+var_90] mov ecx, 0Ah cqo idiv rcx mov [rbp+var_B8], rax mov rax, [rbp+var_90] imul rcx, [rbp+var_B8], 0Ah sub rax, rcx add rax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_B8] mov [rbp+var_90], rax jmp short loc_A365B loc_A36B7: mov rax, [rbp+var_68] mov rcx, [rbp+var_88] mov rdx, [rbp+var_80] sub rcx, rdx cmp rax, rcx jnb short loc_A36DB mov rax, [rbp+var_68] mov [rbp+var_C0], rax jmp short loc_A36F0 loc_A36DB: mov rax, [rbp+var_88] mov rcx, [rbp+var_80] sub rax, rcx mov [rbp+var_C0], rax loc_A36F0: mov rax, [rbp+var_C0] mov [rbp+var_68], rax loc_A36FB: mov rdi, [rbp+var_60] mov rsi, [rbp+var_80] mov rdx, [rbp+var_68] call _memcpy mov rax, [rbp+var_68] mov ecx, [rbp+var_94] add rax, rcx mov [rbp+var_C8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_A3742 mov rax, [rbp+var_C8] add rsp, 0D0h pop rbp retn loc_A3742: call ___stack_chk_fail
long long my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, long long a5) { char *v5; // rax char *v6; // rax _BYTE *v8; // [rsp+10h] [rbp-C0h] unsigned long long v9; // [rsp+30h] [rbp-A0h] unsigned int v10; // [rsp+3Ch] [rbp-94h] signed long long i; // [rsp+40h] [rbp-90h] char *v12; // [rsp+50h] [rbp-80h] _BYTE *v13; // [rsp+68h] [rbp-68h] long long v14; // [rsp+68h] [rbp-68h] _BYTE *v15; // [rsp+70h] [rbp-60h] char v16; // [rsp+BFh] [rbp-11h] BYREF _BYTE v17[8]; // [rsp+C0h] [rbp-10h] BYREF unsigned long long v18; // [rsp+C8h] [rbp-8h] v18 = __readfsqword(0x28u); v15 = a2; v13 = a3; v10 = 0; v9 = a5; if ( a4 < 0 && a5 < 0 ) { v9 = -a5; v15 = a2 + 1; *a2 = 45; v13 = a3 - 1; v10 = 1; } v12 = v17; v17[0] = 0; if ( v9 ) { while ( v9 > 0x7FFFFFFFFFFFFFFFLL ) { v5 = v12--; *(v5 - 1) = v9 % 0xA + 48; v9 /= 0xAuLL; } for ( i = v9; i; i /= 10LL ) { v6 = v12--; *(v6 - 1) = i % 10 + 48; } if ( (unsigned long long)v13 >= v17 - v12 ) v8 = (_BYTE *)(v17 - v12); else v8 = v13; v14 = (long long)v8; } else { v12 = &v16; v16 = 48; v14 = 1LL; } memcpy(v15, v12, v14); return v10 + v14; }
my_longlong10_to_str_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x68],RDX MOV dword ptr [RBP + -0x6c],ECX MOV qword ptr [RBP + -0x78],R8 MOV dword ptr [RBP + -0x94],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xa0],RAX CMP dword ptr [RBP + -0x6c],0x0 JGE 0x001a3597 CMP qword ptr [RBP + -0x78],0x0 JGE 0x001a3595 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOV byte ptr [RAX],0x2d MOV RAX,qword ptr [RBP + -0x68] ADD RAX,-0x1 MOV qword ptr [RBP + -0x68],RAX MOV dword ptr [RBP + -0x94],0x1 LAB_001a3595: JMP 0x001a3597 LAB_001a3597: LEA RAX,[RBP + -0x50] ADD RAX,0x40 MOV qword ptr [RBP + -0x80],RAX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xa0],0x0 JNZ 0x001a35db MOV RAX,qword ptr [RBP + -0x80] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x80],RCX MOV byte ptr [RAX + -0x1],0x30 MOV qword ptr [RBP + -0x68],0x1 JMP 0x001a36fb LAB_001a35db: JMP 0x001a35dd LAB_001a35dd: MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0xa0],RAX JBE 0x001a364d MOV RAX,qword ptr [RBP + -0xa0] MOV ECX,0xa XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa0] IMUL RCX,qword ptr [RBP + -0xa8],0xa SUB RAX,RCX MOV dword ptr [RBP + -0xac],EAX MOV EAX,dword ptr [RBP + -0xac] ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001a35dd LAB_001a364d: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001a365b: CMP qword ptr [RBP + -0x90],0x0 JZ 0x001a36b7 MOV RAX,qword ptr [RBP + -0x90] MOV ECX,0xa CQO IDIV RCX MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x90] IMUL RCX,qword ptr [RBP + -0xb8],0xa SUB RAX,RCX ADD RAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0x90],RAX JMP 0x001a365b LAB_001a36b7: MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x88] MOV RDX,qword ptr [RBP + -0x80] SUB RCX,RDX CMP RAX,RCX JNC 0x001a36db MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0xc0],RAX JMP 0x001a36f0 LAB_001a36db: MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x80] SUB RAX,RCX MOV qword ptr [RBP + -0xc0],RAX LAB_001a36f0: MOV RAX,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0x68],RAX LAB_001a36fb: MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x68] CALL 0x00128290 MOV RAX,qword ptr [RBP + -0x68] MOV ECX,dword ptr [RBP + -0x94] ADD RAX,RCX MOV qword ptr [RBP + -0xc8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001a3742 MOV RAX,qword ptr [RBP + -0xc8] ADD RSP,0xd0 POP RBP RET LAB_001a3742: CALL 0x00128390
long my_longlong10_to_str_8bit (int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5) { char *pcVar1; long in_FS_OFFSET; ulong local_c8; ulong local_a8; uint local_9c; ulong local_98; char *local_88; size_t local_70; int1 *local_68; char local_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_9c = 0; local_a8 = param_5; local_70 = param_3; local_68 = param_2; if (param_4 < 0) { if ((long)param_5 < 0) { local_a8 = -param_5; local_68 = param_2 + 1; *param_2 = 0x2d; local_70 = param_3 - 1; } local_9c = (uint)((long)param_5 < 0); } pcVar1 = local_19 + 1; local_19[1] = 0; local_88 = pcVar1; if (local_a8 == 0) { local_88 = local_19; local_19[0] = '0'; local_70 = 1; } else { while (0x7fffffffffffffff < local_a8) { local_88[-1] = (char)local_a8 + (char)(local_a8 / 10) * -10 + '0'; local_a8 = local_a8 / 10; local_88 = local_88 + -1; } local_98 = local_a8; while (local_98 != 0) { local_88[-1] = (char)local_98 + (char)((long)local_98 / 10) * -10 + '0'; local_98 = (long)local_98 / 10; local_88 = local_88 + -1; } if (local_70 < (ulong)((long)pcVar1 - (long)local_88)) { local_c8 = local_70; } else { local_c8 = (long)pcVar1 - (long)local_88; } local_70 = local_c8; } memcpy(local_68,local_88,local_70); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_70 + local_9c; }
63,262
LefDefParser::defiGeometries::points(int, int*, int*) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiMisc.cpp
void defiGeometries::points(int index, int* x, int* y) const { char msg[160]; if ((index < 0) || (index >= numPoints_)) { sprintf (msg, "ERROR (LEFPARS-6070): The index number %d given for GEOMETRY POINTS is invalid.\nValid index is from 0 to %d", index, numPoints_); defiError(0, 6070, msg, defData); return; } *x = x_[index]; *y = y_[index]; return; }
O3
cpp
LefDefParser::defiGeometries::points(int, int*, int*) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %r8d movq %rdi, %rbx testl %esi, %esi setns %sil movl (%rdi), %eax cmpl %r8d, %eax setg %dil testb %dil, %sil je 0x1bcf5 movq 0x8(%rbx), %rax movl %r8d, %esi movl (%rax,%rsi,4), %eax movl %eax, (%rdx) movq 0x10(%rbx), %rax movl (%rax,%rsi,4), %eax movl %eax, (%rcx) jmp 0x1bd21 leaq 0x28bee(%rip), %rsi # 0x448ea movq %rsp, %r14 movq %r14, %rdi movl %r8d, %edx movl %eax, %ecx xorl %eax, %eax callq 0x7060 movq 0x18(%rbx), %rcx xorl %edi, %edi movl $0x17b6, %esi # imm = 0x17B6 movq %r14, %rdx callq 0x1bb18 addq $0xa8, %rsp popq %rbx popq %r14 retq
_ZNK12LefDefParser14defiGeometries6pointsEiPiS1_: push r14 push rbx sub rsp, 0A8h mov r8d, esi mov rbx, rdi test esi, esi setns sil mov eax, [rdi] cmp eax, r8d setnle dil test sil, dil jz short loc_1BCF5 mov rax, [rbx+8] mov esi, r8d mov eax, [rax+rsi*4] mov [rdx], eax mov rax, [rbx+10h] mov eax, [rax+rsi*4] mov [rcx], eax jmp short loc_1BD21 loc_1BCF5: lea rsi, aErrorLefpars60; "ERROR (LEFPARS-6070): The index number "... mov r14, rsp mov rdi, r14 mov edx, r8d mov ecx, eax xor eax, eax call _sprintf mov rcx, [rbx+18h]; LefDefParser::defrData * xor edi, edi; this mov esi, 17B6h; int mov rdx, r14; char * call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) loc_1BD21: add rsp, 0A8h pop rbx pop r14 retn
long long LefDefParser::defiGeometries::points( LefDefParser::defiGeometries *this, unsigned int a2, int *a3, int *a4) { long long result; // rax LefDefParser::defrData *v5; // r8 char v6[184]; // [rsp+0h] [rbp-B8h] BYREF if ( *(_DWORD *)this > (int)a2 && (a2 & 0x80000000) == 0 ) { *a3 = *(_DWORD *)(*((_QWORD *)this + 1) + 4LL * a2); result = *(unsigned int *)(*((_QWORD *)this + 2) + 4LL * a2); *a4 = result; } else { sprintf( v6, "ERROR (LEFPARS-6070): The index number %d given for GEOMETRY POINTS is invalid.\nValid index is from 0 to %d", a2, *(_DWORD *)this); return LefDefParser::defiError(0LL, 6070, v6, *((LefDefParser::defrData **)this + 3), v5); } return result; }
points: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV R8D,ESI MOV RBX,RDI TEST ESI,ESI SETNS SIL MOV EAX,dword ptr [RDI] CMP EAX,R8D SETG DIL TEST SIL,DIL JZ 0x0011bcf5 MOV RAX,qword ptr [RBX + 0x8] MOV ESI,R8D MOV EAX,dword ptr [RAX + RSI*0x4] MOV dword ptr [RDX],EAX MOV RAX,qword ptr [RBX + 0x10] MOV EAX,dword ptr [RAX + RSI*0x4] MOV dword ptr [RCX],EAX JMP 0x0011bd21 LAB_0011bcf5: LEA RSI,[0x1448ea] MOV R14,RSP MOV RDI,R14 MOV EDX,R8D MOV ECX,EAX XOR EAX,EAX CALL 0x00107060 MOV RCX,qword ptr [RBX + 0x18] XOR EDI,EDI MOV ESI,0x17b6 MOV RDX,R14 CALL 0x0011bb18 LAB_0011bd21: ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::defiGeometries::points(int, int*, int*) const */ void __thiscall LefDefParser::defiGeometries::points(defiGeometries *this,int param_1,int *param_2,int *param_3) { char acStack_b8 [168]; if (param_1 < 0 || (int)*(uint *)this <= param_1) { sprintf(acStack_b8, "ERROR (LEFPARS-6070): The index number %d given for GEOMETRY POINTS is invalid.\nValid index is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)this); defiError(0,0x17b6,acStack_b8,*(defrData **)(this + 0x18)); } else { *param_2 = *(int *)(*(long *)(this + 8) + (ulong)(uint)param_1 * 4); *param_3 = *(int *)(*(long *)(this + 0x10) + (ulong)(uint)param_1 * 4); } return; }
63,263
nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::SetLogSymlink(LogSeverity severity, const char* symlink_basename) { CHECK_GE(severity, 0); CHECK_LT(severity, NUM_SEVERITIES); std::lock_guard<std::mutex> l{log_mutex}; log_destination(severity)->fileobject_.SetSymlinkBasename(symlink_basename); }
O3
cpp
nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movl %edi, 0x4(%rsp) movl $0x0, 0x18(%rsp) testl %edi, %edi js 0x11804 movl $0x4, 0x18(%rsp) cmpl $0x3, %edi jg 0x11833 leaq 0x2e58e(%rip), %rdi # 0x3fcd8 callq 0x7820 testl %eax, %eax jne 0x1188e movl 0x4(%rsp), %r14d leaq 0x1f4bd(%rip), %r12 # 0x30c20 movq (%r12,%r14,8), %r15 testq %r15, %r15 jne 0x117ad movl $0xd0, %edi callq 0x7530 movq %rax, %r15 movq %rax, %rdi movl %r14d, %esi xorl %edx, %edx callq 0xa07c leaq (%r12,%r14,8), %r14 leaq 0x18(%rsp), %r12 movq $0x0, (%r12) movq %r14, %rdi movq %r15, %rsi callq 0x12466 movq %r12, %rdi callq 0x10f8c movq (%r14), %r15 leaq 0x8(%r15), %r14 movq %r14, %rdi callq 0x7820 testl %eax, %eax jne 0x11895 movq 0x60(%r15), %r12 addq $0x58, %r15 movq %rbx, %rdi callq 0x7200 movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx movq %rbx, %rcx movq %rax, %r8 callq 0x7890 movq %r14, %rdi callq 0x73e0 leaq 0x2e4e5(%rip), %rdi # 0x3fcd8 callq 0x73e0 addq $0x78, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x125db(%rip), %rcx # 0x23de6 leaq 0x8(%rsp), %r14 leaq 0x4(%rsp), %rsi leaq 0x18(%rsp), %rdx movq %r14, %rdi callq 0x124f7 movq (%r14), %rax testq %rax, %rax jne 0x1189c movl 0x4(%rsp), %edi jmp 0x11732 leaq 0x125ba(%rip), %rcx # 0x23df4 leaq 0x8(%rsp), %r14 leaq 0x4(%rsp), %rsi leaq 0x18(%rsp), %rdx movq %r14, %rdi callq 0x124f7 movq (%r14), %rax testq %rax, %rax je 0x11743 movq $0x0, 0x8(%rsp) leaq 0x10(%rsp), %rcx movq %rax, (%rcx) leaq 0x11fe5(%rip), %rsi # 0x2385a leaq 0x18(%rsp), %rdi movl $0x292, %edx # imm = 0x292 callq 0xe830 leaq 0x18(%rsp), %rdi callq 0xe836 movl %eax, %edi callq 0x7350 movl %eax, %edi callq 0x7350 movq $0x0, 0x8(%rsp) leaq 0x10(%rsp), %rcx movq %rax, (%rcx) leaq 0x11fa6(%rip), %rsi # 0x2385a leaq 0x18(%rsp), %rdi movl $0x291, %edx # imm = 0x291 callq 0xe830 leaq 0x18(%rsp), %rdi callq 0xe836 jmp 0x118cf movq %rax, %rbx movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x118e6 leaq 0x10(%rsp), %rdi callq 0x9dca movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0x1192a leaq 0x8(%rsp), %rdi callq 0x9dca jmp 0x1192a movq %rax, %rbx movl $0xd0, %esi movq %r15, %rdi callq 0x7540 jmp 0x1191e movq %rax, %rbx movq %r14, %rdi callq 0x73e0 jmp 0x1191e movq %rax, %rbx leaq 0x2e3b3(%rip), %rdi # 0x3fcd8 callq 0x73e0 movq %rbx, %rdi callq 0x7990
_ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc: push r15 push r14 push r12 push rbx sub rsp, 78h mov rbx, rsi mov [rsp+98h+var_94], edi mov [rsp+98h+var_80], 0 test edi, edi js loc_11804 loc_11732: mov [rsp+98h+var_80], 4 cmp edi, 3 jg loc_11833 loc_11743: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_1188E mov r14d, [rsp+98h+var_94] lea r12, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ mov r15, [r12+r14*8] test r15, r15 jnz short loc_117AD mov edi, 0D0h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov esi, r14d xor edx, edx call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*) lea r14, [r12+r14*8] lea r12, [rsp+98h+var_80] mov qword ptr [r12], 0 mov rdi, r14 mov rsi, r15 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, r12 call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() mov r15, [r14] loc_117AD: lea r14, [r15+8] mov rdi, r14 call _pthread_mutex_lock test eax, eax jnz loc_11895 mov r12, [r15+60h] add r15, 58h ; 'X' mov rdi, rbx call _strlen mov rdi, r15 xor esi, esi mov rdx, r12 mov rcx, rbx mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rdi, r14 call _pthread_mutex_unlock lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock add rsp, 78h pop rbx pop r12 pop r14 pop r15 retn loc_11804: lea rcx, aSeverity0; "severity >= 0" lea r14, [rsp+98h+var_90] lea rsi, [rsp+98h+var_94] lea rdx, [rsp+98h+var_80] mov rdi, r14 call _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*) mov rax, [r14] test rax, rax jnz short loc_1189C mov edi, [rsp+98h+var_94] jmp loc_11732 loc_11833: lea rcx, aSeverityNumSev; "severity < NUM_SEVERITIES" lea r14, [rsp+98h+var_90] lea rsi, [rsp+98h+var_94] lea rdx, [rsp+98h+var_80] mov rdi, r14 call _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*) mov rax, [r14] test rax, rax jz loc_11743 mov [rsp+98h+var_90], 0 lea rcx, [rsp+98h+var_88] mov [rcx], rax lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+98h+var_80] mov edx, 292h call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&) lea rdi, [rsp+98h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_1188E: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) loc_11895: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) loc_1189C: mov [rsp+98h+var_90], 0 lea rcx, [rsp+98h+var_88] mov [rcx], rax lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+98h+var_80] mov edx, 291h call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&) lea rdi, [rsp+98h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() jmp short $+2 loc_118CF: mov rbx, rax mov rsi, [rsp+98h+var_88] test rsi, rsi jz short loc_118E6 lea rdi, [rsp+98h+var_88] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_118E6: mov rsi, [rsp+98h+var_90] test rsi, rsi jz short loc_1192A lea rdi, [rsp+98h+var_90] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) jmp short loc_1192A mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1191E mov rbx, rax mov rdi, r14 call _pthread_mutex_unlock jmp short loc_1191E mov rbx, rax loc_1191E: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock loc_1192A: mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::SetLogSymlink(int a1, long long a2) { int v2; // eax long long v3; // r14 long long v4; // r15 long long v5; // r15 long long *v6; // r14 int v7; // eax long long v8; // r12 long long v9; // rax _QWORD *v11; // rax _QWORD *v12; // rax unsigned int v13; // [rsp+4h] [rbp-94h] BYREF _QWORD *v14; // [rsp+8h] [rbp-90h] BYREF _QWORD *v15; // [rsp+10h] [rbp-88h] BYREF nglog::LogDestination *v16[16]; // [rsp+18h] [rbp-80h] BYREF v13 = a1; LODWORD(v16[0]) = 0; if ( a1 < 0 ) { nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(&v14, &v13, v16, "severity >= 0"); v11 = v14; if ( v14 ) { v14 = 0LL; v15 = v11; nglog::LogMessageFatal::LogMessageFatal( v16, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 657, &v15); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v16); } a1 = v13; } LODWORD(v16[0]) = 4; if ( a1 > 3 ) { nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(&v14, &v13, v16, "severity < NUM_SEVERITIES"); v12 = v14; if ( v14 ) { v14 = 0LL; v15 = v12; nglog::LogMessageFatal::LogMessageFatal( v16, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 658, &v15); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v16); } } v2 = pthread_mutex_lock(&nglog::log_mutex); if ( v2 ) std::__throw_system_error(v2); v3 = v13; v4 = nglog::LogDestination::log_destinations_[v13]; if ( !v4 ) { v5 = operator new(0xD0uLL); nglog::LogDestination::LogDestination(v5, v3, 0LL); v6 = &nglog::LogDestination::log_destinations_[v3]; v16[0] = 0LL; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v6, v5); std::unique_ptr<nglog::LogDestination>::~unique_ptr(v16); v4 = *v6; } v7 = pthread_mutex_lock(v4 + 8); if ( v7 ) std::__throw_system_error(v7); v8 = *(_QWORD *)(v4 + 96); v9 = strlen(a2); std::string::_M_replace(v4 + 88, 0LL, v8, a2, v9); pthread_mutex_unlock(v4 + 8); return pthread_mutex_unlock(&nglog::log_mutex); }
SetLogSymlink: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RSI MOV dword ptr [RSP + 0x4],EDI MOV dword ptr [RSP + 0x18],0x0 TEST EDI,EDI JS 0x00111804 LAB_00111732: MOV dword ptr [RSP + 0x18],0x4 CMP EDI,0x3 JG 0x00111833 LAB_00111743: LEA RDI,[0x13fcd8] CALL 0x00107820 TEST EAX,EAX JNZ 0x0011188e MOV R14D,dword ptr [RSP + 0x4] LEA R12,[0x130c20] MOV R15,qword ptr [R12 + R14*0x8] TEST R15,R15 JNZ 0x001117ad LAB_0011176c: MOV EDI,0xd0 CALL 0x00107530 LAB_00111776: MOV R15,RAX MOV RDI,RAX MOV ESI,R14D XOR EDX,EDX CALL 0x0010a07c LEA R14,[R12 + R14*0x8] LEA R12,[RSP + 0x18] MOV qword ptr [R12],0x0 MOV RDI,R14 MOV RSI,R15 CALL 0x00112466 MOV RDI,R12 CALL 0x00110f8c MOV R15,qword ptr [R14] LAB_001117ad: LEA R14,[R15 + 0x8] MOV RDI,R14 CALL 0x00107820 TEST EAX,EAX JNZ 0x00111895 MOV R12,qword ptr [R15 + 0x60] ADD R15,0x58 MOV RDI,RBX CALL 0x00107200 LAB_001117d1: MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 MOV RCX,RBX MOV R8,RAX CALL 0x00107890 LAB_001117e4: MOV RDI,R14 CALL 0x001073e0 LEA RDI,[0x13fcd8] CALL 0x001073e0 ADD RSP,0x78 POP RBX POP R12 POP R14 POP R15 RET LAB_00111804: LEA RCX,[0x123de6] LEA R14,[RSP + 0x8] LEA RSI,[RSP + 0x4] LEA RDX,[RSP + 0x18] MOV RDI,R14 CALL 0x001124f7 MOV RAX,qword ptr [R14] TEST RAX,RAX JNZ 0x0011189c MOV EDI,dword ptr [RSP + 0x4] JMP 0x00111732 LAB_00111833: LEA RCX,[0x123df4] LEA R14,[RSP + 0x8] LEA RSI,[RSP + 0x4] LEA RDX,[RSP + 0x18] MOV RDI,R14 CALL 0x001124f7 MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x00111743 MOV qword ptr [RSP + 0x8],0x0 LEA RCX,[RSP + 0x10] MOV qword ptr [RCX],RAX LAB_0011186e: LEA RSI,[0x12385a] LEA RDI,[RSP + 0x18] MOV EDX,0x292 CALL 0x0010e830 LEA RDI,[RSP + 0x18] CALL 0x0010e836 LAB_0011188e: MOV EDI,EAX CALL 0x00107350 LAB_00111895: MOV EDI,EAX CALL 0x00107350 LAB_0011189c: MOV qword ptr [RSP + 0x8],0x0 LEA RCX,[RSP + 0x10] MOV qword ptr [RCX],RAX LAB_001118ad: LEA RSI,[0x12385a] LEA RDI,[RSP + 0x18] MOV EDX,0x291 CALL 0x0010e830 LEA RDI,[RSP + 0x18] CALL 0x0010e836 LAB_001118cd: JMP 0x001118cf LAB_001118cf: MOV RBX,RAX MOV RSI,qword ptr [RSP + 0x10] TEST RSI,RSI JZ 0x001118e6 LEA RDI,[RSP + 0x10] CALL 0x00109dca LAB_001118e6: MOV RSI,qword ptr [RSP + 0x8] TEST RSI,RSI JZ 0x0011192a LEA RDI,[RSP + 0x8] CALL 0x00109dca JMP 0x0011192a LAB_0011192a: MOV RDI,RBX CALL 0x00107990
/* nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*) */ void nglog::LogDestination::SetLogSymlink(uint param_1,char *param_2) { char *pcVar1; string *psVar2; int iVar3; LogDestination *pLVar4; int8 uVar5; ulong uVar6; long lVar7; uint local_94; string *local_90; string *local_88; ulong local_80 [12]; local_80[0] = local_80[0] & 0xffffffff00000000; local_94 = param_1; if (((int)param_1 < 0) && (internal::MakeCheckOpString<nglog::LogSeverity,int> ((internal *)&local_90,(LogSeverity *)&local_94,(int *)local_80,"severity >= 0"), psVar2 = local_90, local_90 != (string *)0x0)) { local_90 = (string *)0x0; local_88 = psVar2; /* try { // try from 001118ad to 001118cc has its CatchHandler @ 001118cd */ LogMessageFatal::LogMessageFatal ((LogMessageFatal *)local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x291, (CheckOpString *)&local_88); uVar5 = LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_80); /* catch() { ... } // from try @ 001118ad with catch @ 001118cd */ /* catch() { ... } // from try @ 0011186e with catch @ 001118cf */ if (local_88 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_88,local_88); } if (local_90 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_90,local_90); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar5); } local_80[0] = CONCAT44(local_80[0]._4_4_,4); if (((int)local_94 < 4) || (internal::MakeCheckOpString<nglog::LogSeverity,int> ((internal *)&local_90,(LogSeverity *)&local_94,(int *)local_80, "severity < NUM_SEVERITIES"), psVar2 = local_90, local_90 == (string *)0x0)) { iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar3 == 0) { uVar6 = (ulong)local_94; lVar7 = (&log_destinations_)[uVar6]; if (lVar7 == 0) { /* try { // try from 0011176c to 00111775 has its CatchHandler @ 0011191b */ pLVar4 = (LogDestination *)operator_new(0xd0); /* try { // try from 00111776 to 00111785 has its CatchHandler @ 001118fc */ LogDestination(pLVar4,uVar6,0); local_80[0] = 0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>:: reset((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) (&log_destinations_ + uVar6),pLVar4); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>:: ~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) local_80); lVar7 = *(long *)(&log_destinations_ + uVar6); } iVar3 = pthread_mutex_lock((pthread_mutex_t *)(lVar7 + 8)); if (iVar3 != 0) { /* try { // try from 00111895 to 0011189b has its CatchHandler @ 0011191b */ /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); } pcVar1 = *(char **)(lVar7 + 0x60); strlen(param_2); /* try { // try from 001117d1 to 001117e3 has its CatchHandler @ 0011190e */ std::__cxx11::string::_M_replace(lVar7 + 0x58,0,pcVar1,(ulong)param_2); pthread_mutex_unlock((pthread_mutex_t *)(lVar7 + 8)); pthread_mutex_unlock((pthread_mutex_t *)log_mutex); return; } } else { local_90 = (string *)0x0; local_88 = psVar2; /* try { // try from 0011186e to 0011188d has its CatchHandler @ 001118cf */ LogMessageFatal::LogMessageFatal ((LogMessageFatal *)local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x292, (CheckOpString *)&local_88); iVar3 = LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_80); } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); }
63,264
get_store_length
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t get_store_length(size_t length) { #define MAX_STORE_SIZE 9 unsigned char buffer[MAX_STORE_SIZE], *p; /* We just store the length and subtract offset of our buffer to determine the length */ p= mysql_net_store_length(buffer, length); return p - buffer; }
O0
c
get_store_length: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq -0x20(%rbp), %rsi leaq -0x11(%rbp), %rdi movq %rdi, -0x38(%rbp) callq 0x40f10 movq -0x38(%rbp), %rcx movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3b209 movq -0x30(%rbp), %rax addq $0x40, %rsp popq %rbp retq callq 0x144c0 nop
get_store_length: push rbp mov rbp, rsp sub rsp, 40h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov rsi, [rbp+var_20] lea rdi, [rbp+var_11] mov [rbp+var_38], rdi call mysql_net_store_length mov rcx, [rbp+var_38] mov [rbp+var_28], rax mov rax, [rbp+var_28] sub rax, rcx mov [rbp+var_30], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3B209 mov rax, [rbp+var_30] add rsp, 40h pop rbp retn loc_3B209: call ___stack_chk_fail
long long get_store_length(long long a1) { _BYTE v2[9]; // [rsp+2Fh] [rbp-11h] BYREF unsigned long long v3; // [rsp+38h] [rbp-8h] v3 = __readfsqword(0x28u); return mysql_net_store_length(v2, a1) - (_QWORD)v2; }
mysql_use_result: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x2f8],0x0 JNZ 0x0013b1d7 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013b368 LAB_0013b1d7: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x488],0x1 JZ 0x0013b256 JMP 0x0013b1e6 LAB_0013b1e6: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7de MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x184ca0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00114210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x184cb0] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00114210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013b368 LAB_0013b256: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x37c] MOV ESI,EAX SHL RSI,0x3 ADD RSI,0x88 MOV EDI,0x1 CALL 0x001142c0 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0013b28e MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013b368 LAB_0013b28e: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x88 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x70],RCX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x37c] ADD EAX,0x1 MOV EAX,EAX MOV EDI,EAX SHL RDI,0x3 CALL 0x001145b0 MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX + 0x60],RAX CMP RAX,0x0 JNZ 0x0013b2df MOV RDI,qword ptr [RBP + -0x18] CALL 0x00114520 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013b368 LAB_0013b2df: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x2f8] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x300 MOV EDX,0x38 CALL 0x00114360 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x37c] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xc],0x0 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x78],RCX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x68],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x2f8],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x488],0x2 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_0013b368: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
void * mysql_use_result(long param_1) { void *pvVar1; int8 local_10; if (*(long *)(param_1 + 0x2f8) == 0) { local_10 = (void *)0x0; } else if (*(int *)(param_1 + 0x488) == 1) { local_10 = calloc(1,(ulong)*(uint *)(param_1 + 0x37c) * 8 + 0x88); if (local_10 == (void *)0x0) { local_10 = (void *)0x0; } else { *(long *)((long)local_10 + 0x70) = (long)local_10 + 0x88; pvVar1 = malloc((ulong)(*(int *)(param_1 + 0x37c) + 1) << 3); *(void **)((long)local_10 + 0x60) = pvVar1; if (pvVar1 == (void *)0x0) { free(local_10); local_10 = (void *)0x0; } else { *(int8 *)((long)local_10 + 0x10) = *(int8 *)(param_1 + 0x2f8); memcpy((void *)((long)local_10 + 0x28),(void *)(param_1 + 0x300),0x38); *(int4 *)((long)local_10 + 8) = *(int4 *)(param_1 + 0x37c); *(int4 *)((long)local_10 + 0xc) = 0; *(long *)((long)local_10 + 0x78) = param_1; *(int8 *)((long)local_10 + 0x68) = 0; *(int8 *)(param_1 + 0x2f8) = 0; *(int4 *)(param_1 + 0x488) = 2; } } } else { *(int4 *)(param_1 + 0x90) = 0x7de; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; strncpy((char *)(param_1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_00184d20,0x1ff); *(int1 *)(param_1 + 0x296) = 0; local_10 = (void *)0x0; } return local_10; }
63,265
bfdec_mul
bluesky950520[P]quickjs/libbf.c
int bfdec_mul(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags) { int ret, r_sign; if (a->len < b->len) { const bfdec_t *tmp = a; a = b; b = tmp; } r_sign = a->sign ^ b->sign; /* here b->len <= a->len */ if (b->len == 0) { if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { bfdec_set_nan(r); ret = 0; } else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_INF) { if ((a->expn == BF_EXP_INF && b->expn == BF_EXP_ZERO) || (a->expn == BF_EXP_ZERO && b->expn == BF_EXP_INF)) { bfdec_set_nan(r); ret = BF_ST_INVALID_OP; } else { bfdec_set_inf(r, r_sign); ret = 0; } } else { bfdec_set_zero(r, r_sign); ret = 0; } } else { bfdec_t tmp, *r1 = NULL; limb_t a_len, b_len; limb_t *a_tab, *b_tab; a_len = a->len; b_len = b->len; a_tab = a->tab; b_tab = b->tab; if (r == a || r == b) { bfdec_init(r->ctx, &tmp); r1 = r; r = &tmp; } if (bfdec_resize(r, a_len + b_len)) { bfdec_set_nan(r); ret = BF_ST_MEM_ERROR; goto done; } mp_mul_basecase_dec(r->tab, a_tab, a_len, b_tab, b_len); r->sign = r_sign; r->expn = a->expn + b->expn; ret = bfdec_normalize_and_round(r, prec, flags); done: if (r == &tmp) bfdec_move(r1, &tmp); } return ret; }
O0
c
bfdec_mul: subq $0x88, %rsp movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x68(%rsp) movl %r8d, 0x64(%rsp) movq 0x78(%rsp), %rax movq 0x18(%rax), %rax movq 0x70(%rsp), %rcx cmpq 0x18(%rcx), %rax jae 0xf3ec5 movq 0x78(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x78(%rsp), %rax movl 0x8(%rax), %eax movq 0x70(%rsp), %rcx xorl 0x8(%rcx), %eax movl %eax, 0x5c(%rsp) movq 0x70(%rsp), %rax cmpq $0x0, 0x18(%rax) jne 0xf4001 movq 0x78(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) je 0xf3f13 movq 0x70(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) jne 0xf3f2d movq 0x80(%rsp), %rdi callq 0xf3cc0 movl $0x0, 0x60(%rsp) jmp 0xf3ffc movq 0x78(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) je 0xf3f5b movq 0x70(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jne 0xf3fe1 movq 0x78(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jne 0xf3f85 movq 0x70(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) je 0xf3faf movq 0x78(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) jne 0xf3fc6 movq 0x70(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jne 0xf3fc6 movq 0x80(%rsp), %rdi callq 0xf3cc0 movl $0x1, 0x60(%rsp) jmp 0xf3fdf movq 0x80(%rsp), %rdi movl 0x5c(%rsp), %esi callq 0xf4160 movl $0x0, 0x60(%rsp) jmp 0xf3ffa movq 0x80(%rsp), %rdi movl 0x5c(%rsp), %esi callq 0xf4180 movl $0x0, 0x60(%rsp) jmp 0xf3ffc jmp 0xf414c movq $0x0, 0x20(%rsp) movq 0x78(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x18(%rsp) movq 0x70(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x10(%rsp) movq 0x78(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x8(%rsp) movq 0x70(%rsp), %rax movq 0x20(%rax), %rax movq %rax, (%rsp) movq 0x80(%rsp), %rax cmpq 0x78(%rsp), %rax je 0xf405f movq 0x80(%rsp), %rax cmpq 0x70(%rsp), %rax jne 0xf408e movq 0x80(%rsp), %rax movq (%rax), %rdi leaq 0x28(%rsp), %rsi callq 0xf41a0 movq 0x80(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x28(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rdi movq 0x18(%rsp), %rsi addq 0x10(%rsp), %rsi callq 0xf3560 cmpl $0x0, %eax je 0xf40c1 movq 0x80(%rsp), %rdi callq 0xf3cc0 movl $0x20, 0x60(%rsp) jmp 0xf412c movq 0x80(%rsp), %rax movq 0x20(%rax), %rdi movq 0x8(%rsp), %rsi movq 0x18(%rsp), %rdx movq (%rsp), %rcx movq 0x10(%rsp), %r8 callq 0xf2200 movl 0x5c(%rsp), %ecx movq 0x80(%rsp), %rax movl %ecx, 0x8(%rax) movq 0x78(%rsp), %rax movq 0x10(%rax), %rcx movq 0x70(%rsp), %rax addq 0x10(%rax), %rcx movq 0x80(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x80(%rsp), %rdi movq 0x68(%rsp), %rsi movl 0x64(%rsp), %edx callq 0xf3410 movl %eax, 0x60(%rsp) leaq 0x28(%rsp), %rax cmpq %rax, 0x80(%rsp) jne 0xf414a movq 0x20(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0xf41d0 jmp 0xf414c movl 0x60(%rsp), %eax addq $0x88, %rsp retq nopl (%rax,%rax)
bfdec_mul: sub rsp, 88h mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_20], rcx mov [rsp+88h+var_24], r8d mov rax, [rsp+88h+var_10] mov rax, [rax+18h] mov rcx, [rsp+88h+var_18] cmp rax, [rcx+18h] jnb short loc_F3EC5 mov rax, [rsp+88h+var_10] mov [rsp+88h+var_38], rax mov rax, [rsp+88h+var_18] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_38] mov [rsp+88h+var_18], rax loc_F3EC5: mov rax, [rsp+88h+var_10] mov eax, [rax+8] mov rcx, [rsp+88h+var_18] xor eax, [rcx+8] mov [rsp+88h+var_2C], eax mov rax, [rsp+88h+var_18] cmp qword ptr [rax+18h], 0 jnz loc_F4001 mov rax, [rsp+88h+var_10] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jz short loc_F3F13 mov rax, [rsp+88h+var_18] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jnz short loc_F3F2D loc_F3F13: mov rdi, [rsp+88h+var_8] call bfdec_set_nan mov [rsp+88h+var_28], 0 jmp loc_F3FFC loc_F3F2D: mov rax, [rsp+88h+var_10] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jz short loc_F3F5B mov rax, [rsp+88h+var_18] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jnz loc_F3FE1 loc_F3F5B: mov rax, [rsp+88h+var_10] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jnz short loc_F3F85 mov rax, [rsp+88h+var_18] mov rcx, 8000000000000000h cmp [rax+10h], rcx jz short loc_F3FAF loc_F3F85: mov rax, [rsp+88h+var_10] mov rcx, 8000000000000000h cmp [rax+10h], rcx jnz short loc_F3FC6 mov rax, [rsp+88h+var_18] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jnz short loc_F3FC6 loc_F3FAF: mov rdi, [rsp+88h+var_8] call bfdec_set_nan mov [rsp+88h+var_28], 1 jmp short loc_F3FDF loc_F3FC6: mov rdi, [rsp+88h+var_8] mov esi, [rsp+88h+var_2C] call bfdec_set_inf mov [rsp+88h+var_28], 0 loc_F3FDF: jmp short loc_F3FFA loc_F3FE1: mov rdi, [rsp+88h+var_8] mov esi, [rsp+88h+var_2C] call bfdec_set_zero mov [rsp+88h+var_28], 0 loc_F3FFA: jmp short $+2 loc_F3FFC: jmp loc_F414C loc_F4001: mov [rsp+88h+var_68], 0 mov rax, [rsp+88h+var_10] mov rax, [rax+18h] mov [rsp+88h+var_70], rax mov rax, [rsp+88h+var_18] mov rax, [rax+18h] mov [rsp+88h+var_78], rax mov rax, [rsp+88h+var_10] mov rax, [rax+20h] mov [rsp+88h+var_80], rax mov rax, [rsp+88h+var_18] mov rax, [rax+20h] mov [rsp+88h+var_88], rax mov rax, [rsp+88h+var_8] cmp rax, [rsp+88h+var_10] jz short loc_F405F mov rax, [rsp+88h+var_8] cmp rax, [rsp+88h+var_18] jnz short loc_F408E loc_F405F: mov rax, [rsp+88h+var_8] mov rdi, [rax] lea rsi, [rsp+88h+var_60] call bfdec_init mov rax, [rsp+88h+var_8] mov [rsp+88h+var_68], rax lea rax, [rsp+88h+var_60] mov [rsp+88h+var_8], rax loc_F408E: mov rdi, [rsp+88h+var_8] mov rsi, [rsp+88h+var_70] add rsi, [rsp+88h+var_78] call bfdec_resize cmp eax, 0 jz short loc_F40C1 mov rdi, [rsp+88h+var_8] call bfdec_set_nan mov [rsp+88h+var_28], 20h ; ' ' jmp short loc_F412C loc_F40C1: mov rax, [rsp+88h+var_8] mov rdi, [rax+20h] mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_70] mov rcx, [rsp+88h+var_88] mov r8, [rsp+88h+var_78] call mp_mul_basecase_dec mov ecx, [rsp+88h+var_2C] mov rax, [rsp+88h+var_8] mov [rax+8], ecx mov rax, [rsp+88h+var_10] mov rcx, [rax+10h] mov rax, [rsp+88h+var_18] add rcx, [rax+10h] mov rax, [rsp+88h+var_8] mov [rax+10h], rcx mov rdi, [rsp+88h+var_8] mov rsi, [rsp+88h+var_20] mov edx, [rsp+88h+var_24] call bfdec_normalize_and_round mov [rsp+88h+var_28], eax loc_F412C: lea rax, [rsp+88h+var_60] cmp [rsp+88h+var_8], rax jnz short loc_F414A mov rdi, [rsp+88h+var_68] lea rsi, [rsp+88h+var_60] call bfdec_move loc_F414A: jmp short $+2 loc_F414C: mov eax, [rsp+88h+var_28] add rsp, 88h retn
long long bfdec_mul(_QWORD *a1, long long a2, long long a3, long long a4, unsigned int a5) { unsigned long long *v6; // [rsp+0h] [rbp-88h] long long v7; // [rsp+8h] [rbp-80h] long long v8; // [rsp+10h] [rbp-78h] long long v9; // [rsp+18h] [rbp-70h] _QWORD *v10; // [rsp+20h] [rbp-68h] _BYTE v11[40]; // [rsp+28h] [rbp-60h] BYREF long long v12; // [rsp+50h] [rbp-38h] unsigned int v13; // [rsp+5Ch] [rbp-2Ch] unsigned int v14; // [rsp+60h] [rbp-28h] unsigned int v15; // [rsp+64h] [rbp-24h] long long v16; // [rsp+68h] [rbp-20h] long long v17; // [rsp+70h] [rbp-18h] long long v18; // [rsp+78h] [rbp-10h] _QWORD *v19; // [rsp+80h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; if ( *(_QWORD *)(a2 + 24) < *(_QWORD *)(a3 + 24) ) { v12 = v18; v18 = v17; v17 = v12; } v13 = *(_DWORD *)(v17 + 8) ^ *(_DWORD *)(v18 + 8); if ( *(_QWORD *)(v17 + 24) ) { v10 = 0LL; v9 = *(_QWORD *)(v18 + 24); v8 = *(_QWORD *)(v17 + 24); v7 = *(_QWORD *)(v18 + 32); v6 = *(unsigned long long **)(v17 + 32); if ( v19 == (_QWORD *)v18 || v19 == (_QWORD *)v17 ) { bfdec_init(*v19, v11); v10 = v19; v19 = v11; } if ( (unsigned int)bfdec_resize(v19, v8 + v9) ) { bfdec_set_nan((long long)v19); v14 = 32; } else { mp_mul_basecase_dec(v19[4], v7, v9, v6, v8); *((_DWORD *)v19 + 2) = v13; v19[2] = *(_QWORD *)(v17 + 16) + *(_QWORD *)(v18 + 16); v14 = bfdec_normalize_and_round(v19, v16, v15); } if ( v19 == (_QWORD *)v11 ) bfdec_move(v10, v11); } else if ( *(_QWORD *)(v18 + 16) == 0x7FFFFFFFFFFFFFFFLL || *(_QWORD *)(v17 + 16) == 0x7FFFFFFFFFFFFFFFLL ) { bfdec_set_nan((long long)v19); return 0; } else if ( *(_QWORD *)(v18 + 16) == 0x7FFFFFFFFFFFFFFELL || *(_QWORD *)(v17 + 16) == 0x7FFFFFFFFFFFFFFELL ) { if ( *(_QWORD *)(v18 + 16) == 0x7FFFFFFFFFFFFFFELL && *(_QWORD *)(v17 + 16) == 0x8000000000000000LL || *(_QWORD *)(v18 + 16) == 0x8000000000000000LL && *(_QWORD *)(v17 + 16) == 0x7FFFFFFFFFFFFFFELL ) { bfdec_set_nan((long long)v19); return 1; } else { bfdec_set_inf(v19, v13); return 0; } } else { bfdec_set_zero(v19, v13); return 0; } return v14; }
bfdec_mul: SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x68],RCX MOV dword ptr [RSP + 0x64],R8D MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x70] CMP RAX,qword ptr [RCX + 0x18] JNC 0x001f3ec5 MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x70],RAX LAB_001f3ec5: MOV RAX,qword ptr [RSP + 0x78] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x70] XOR EAX,dword ptr [RCX + 0x8] MOV dword ptr [RSP + 0x5c],EAX MOV RAX,qword ptr [RSP + 0x70] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x001f4001 MOV RAX,qword ptr [RSP + 0x78] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JZ 0x001f3f13 MOV RAX,qword ptr [RSP + 0x70] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f3f2d LAB_001f3f13: MOV RDI,qword ptr [RSP + 0x80] CALL 0x001f3cc0 MOV dword ptr [RSP + 0x60],0x0 JMP 0x001f3ffc LAB_001f3f2d: MOV RAX,qword ptr [RSP + 0x78] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JZ 0x001f3f5b MOV RAX,qword ptr [RSP + 0x70] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f3fe1 LAB_001f3f5b: MOV RAX,qword ptr [RSP + 0x78] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f3f85 MOV RAX,qword ptr [RSP + 0x70] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JZ 0x001f3faf LAB_001f3f85: MOV RAX,qword ptr [RSP + 0x78] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f3fc6 MOV RAX,qword ptr [RSP + 0x70] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f3fc6 LAB_001f3faf: MOV RDI,qword ptr [RSP + 0x80] CALL 0x001f3cc0 MOV dword ptr [RSP + 0x60],0x1 JMP 0x001f3fdf LAB_001f3fc6: MOV RDI,qword ptr [RSP + 0x80] MOV ESI,dword ptr [RSP + 0x5c] CALL 0x001f4160 MOV dword ptr [RSP + 0x60],0x0 LAB_001f3fdf: JMP 0x001f3ffa LAB_001f3fe1: MOV RDI,qword ptr [RSP + 0x80] MOV ESI,dword ptr [RSP + 0x5c] CALL 0x001f4180 MOV dword ptr [RSP + 0x60],0x0 LAB_001f3ffa: JMP 0x001f3ffc LAB_001f3ffc: JMP 0x001f414c LAB_001f4001: MOV qword ptr [RSP + 0x20],0x0 MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RSP + 0x78] JZ 0x001f405f MOV RAX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RSP + 0x70] JNZ 0x001f408e LAB_001f405f: MOV RAX,qword ptr [RSP + 0x80] MOV RDI,qword ptr [RAX] LEA RSI,[RSP + 0x28] CALL 0x001f41a0 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RSP + 0x28] MOV qword ptr [RSP + 0x80],RAX LAB_001f408e: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x18] ADD RSI,qword ptr [RSP + 0x10] CALL 0x001f3560 CMP EAX,0x0 JZ 0x001f40c1 MOV RDI,qword ptr [RSP + 0x80] CALL 0x001f3cc0 MOV dword ptr [RSP + 0x60],0x20 JMP 0x001f412c LAB_001f40c1: MOV RAX,qword ptr [RSP + 0x80] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP] MOV R8,qword ptr [RSP + 0x10] CALL 0x001f2200 MOV ECX,dword ptr [RSP + 0x5c] MOV RAX,qword ptr [RSP + 0x80] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RSP + 0x70] ADD RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x68] MOV EDX,dword ptr [RSP + 0x64] CALL 0x001f3410 MOV dword ptr [RSP + 0x60],EAX LAB_001f412c: LEA RAX,[RSP + 0x28] CMP qword ptr [RSP + 0x80],RAX JNZ 0x001f414a MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x28] CALL 0x001f41d0 LAB_001f414a: JMP 0x001f414c LAB_001f414c: MOV EAX,dword ptr [RSP + 0x60] ADD RSP,0x88 RET
int4 bfdec_mul(int8 *param_1,int8 *param_2,int8 *param_3,int8 param_4, int4 param_5) { long lVar1; long lVar2; int8 uVar3; int8 uVar4; int iVar5; int8 *local_68; int8 local_60 [5]; int8 *local_38; uint local_2c; int4 local_28; int4 local_24; int8 local_20; int8 *local_18; int8 *local_10; int8 *local_8; local_18 = param_3; local_10 = param_2; if ((ulong)param_2[3] < (ulong)param_3[3]) { local_38 = param_2; local_18 = param_2; local_10 = param_3; } local_2c = *(uint *)(local_10 + 1) ^ *(uint *)(local_18 + 1); local_24 = param_5; local_20 = param_4; local_8 = param_1; if (local_18[3] == 0) { if ((local_10[2] == 0x7fffffffffffffff) || (local_18[2] == 0x7fffffffffffffff)) { bfdec_set_nan(param_1); local_28 = 0; } else if ((local_10[2] == 0x7ffffffffffffffe) || (local_18[2] == 0x7ffffffffffffffe)) { if (((local_10[2] == 0x7ffffffffffffffe) && (local_18[2] == -0x8000000000000000)) || ((local_10[2] == -0x8000000000000000 && (local_18[2] == 0x7ffffffffffffffe)))) { bfdec_set_nan(param_1); local_28 = 1; } else { bfdec_set_inf(param_1,local_2c); local_28 = 0; } } else { bfdec_set_zero(param_1,local_2c); local_28 = 0; } } else { local_68 = (int8 *)0x0; lVar1 = local_10[3]; lVar2 = local_18[3]; uVar3 = local_10[4]; uVar4 = local_18[4]; if ((param_1 == local_10) || (param_1 == local_18)) { bfdec_init(*param_1,local_60); local_68 = local_8; local_8 = local_60; } iVar5 = bfdec_resize(local_8,lVar1 + lVar2); if (iVar5 == 0) { mp_mul_basecase_dec(local_8[4],uVar3,lVar1,uVar4,lVar2); *(uint *)(local_8 + 1) = local_2c; local_8[2] = local_10[2] + local_18[2]; local_28 = bfdec_normalize_and_round(local_8,local_20,local_24); } else { bfdec_set_nan(local_8); local_28 = 0x20; } if (local_8 == local_60) { bfdec_move(local_68,local_60); } } return local_28; }
63,266
bfdec_mul
bluesky950520[P]quickjs/libbf.c
int bfdec_mul(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags) { int ret, r_sign; if (a->len < b->len) { const bfdec_t *tmp = a; a = b; b = tmp; } r_sign = a->sign ^ b->sign; /* here b->len <= a->len */ if (b->len == 0) { if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { bfdec_set_nan(r); ret = 0; } else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_INF) { if ((a->expn == BF_EXP_INF && b->expn == BF_EXP_ZERO) || (a->expn == BF_EXP_ZERO && b->expn == BF_EXP_INF)) { bfdec_set_nan(r); ret = BF_ST_INVALID_OP; } else { bfdec_set_inf(r, r_sign); ret = 0; } } else { bfdec_set_zero(r, r_sign); ret = 0; } } else { bfdec_t tmp, *r1 = NULL; limb_t a_len, b_len; limb_t *a_tab, *b_tab; a_len = a->len; b_len = b->len; a_tab = a->tab; b_tab = b->tab; if (r == a || r == b) { bfdec_init(r->ctx, &tmp); r1 = r; r = &tmp; } if (bfdec_resize(r, a_len + b_len)) { bfdec_set_nan(r); ret = BF_ST_MEM_ERROR; goto done; } mp_mul_basecase_dec(r->tab, a_tab, a_len, b_tab, b_len); r->sign = r_sign; r->expn = a->expn + b->expn; ret = bfdec_normalize_and_round(r, prec, flags); done: if (r == &tmp) bfdec_move(r1, &tmp); } return ret; }
O1
c
bfdec_mul: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, %r15 movq %rdi, %rbx movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF movq 0x18(%rsi), %rax cmpq 0x18(%rdx), %rax movq %rdx, %rbp cmovbq %rsi, %rbp cmovbq %rdx, %r15 movl 0x8(%rbp), %r10d xorl 0x8(%r15), %r10d movq 0x18(%rbp), %r12 leaq 0x8(%rdi), %r14 leaq 0x10(%rdi), %r11 leaq 0x18(%rdi), %r13 testq %r12, %r12 je 0x8eed5 movq %rcx, 0x38(%rsp) movq 0x18(%r15), %rdx cmpq %rbx, %r15 setne %al cmpq %rbx, %rbp setne %cl testb %cl, %al movl %r10d, 0x1c(%rsp) movl %r8d, 0x18(%rsp) jne 0x8ef2a leaq 0x48(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x50(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x58(%rsp), %r13 movq (%rbx), %rax movq %rax, -0x18(%r13) movl $0x0, -0x10(%r13) leaq 0x1(%r9), %rax movq %rax, -0x8(%r13) xorps %xmm0, %xmm0 movups %xmm0, (%r13) movq %rbx, 0x20(%rsp) leaq 0x40(%rsp), %rbx jmp 0x8ef3d movq 0x10(%r15), %rax cmpq %r9, %rax je 0x8eeeb movq 0x10(%rbp), %rcx cmpq %r9, %rcx jne 0x8f048 cmpq $0x0, (%r13) je 0x8ef19 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx movq %r11, %r15 movq %r9, %r12 callq *0x8(%rax) movq %r12, %r9 movq %r15, %r11 movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %r9, (%r11) movl $0x0, (%r14) xorl %ebp, %ebp jmp 0x8f037 movq %r11, 0x8(%rsp) movq %r14, 0x10(%rsp) movq $0x0, 0x20(%rsp) movq 0x20(%r15), %rax movq %rax, 0x28(%rsp) movq 0x20(%rbp), %rax movq %rax, 0x30(%rsp) leaq (%rdx,%r12), %rsi movq %rbx, %rdi movq %rdx, %r14 callq 0x84a70 testl %eax, %eax je 0x8efa8 cmpq $0x0, (%r13) je 0x8ef84 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, (%r13) movq 0x8(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF movq %rcx, (%rax) movq 0x10(%rsp), %rax movl $0x0, (%rax) movl $0x20, %ebp jmp 0x8efef movq 0x20(%rbx), %rdi movq 0x28(%rsp), %rsi movq %r14, %rdx movq 0x30(%rsp), %rcx movq %r12, %r8 callq 0x8db9a movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx movl %ecx, (%rax) movq 0x10(%rbp), %rax addq 0x10(%r15), %rax movq 0x8(%rsp), %rcx movq %rax, (%rcx) movq %rbx, %rdi movq 0x38(%rsp), %rsi movl 0x18(%rsp), %edx callq 0x8e94d movl %eax, %ebp leaq 0x40(%rsp), %rax cmpq %rax, %rbx setne %cl movq 0x20(%rsp), %rbx cmpq %rax, %rbx sete %al orb %cl, %al jne 0x8f037 movq 0x20(%rbx), %rsi testq %rsi, %rsi je 0x8f01d movq (%rbx), %rax movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x60(%rsp), %rax movq %rax, 0x20(%rbx) movups 0x40(%rsp), %xmm0 movups 0x50(%rsp), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) movl %ebp, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, %r15 leaq -0x1(%r9), %r14 cmpq %r14, %rax setne %dl cmpq %r14, %rcx setne %sil testb %sil, %dl jne 0x8f0bb movq %rcx, %rdx xorq %r14, %rdx movq %rax, %rsi xorq %r14, %rsi leaq 0x1(%r9), %rdi xorq %rdi, %rcx xorq %rdi, %rax orq %rdx, %rax sete %dl orq %rsi, %rcx movq (%r13), %rax je 0x8f0fd testb %dl, %dl jne 0x8f0fd testq %rax, %rax je 0x8f0b6 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx movq %r11, %r12 movl %r10d, %ebp callq *0x8(%rax) movl %ebp, %r10d movq %r12, %r11 movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %r14, (%r11) jmp 0x8f0f5 cmpq $0x0, (%r13) je 0x8f0ef movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx movq %r11, %r14 movq %r9, %r12 movl %r10d, %ebp callq *0x8(%rax) movl %ebp, %r10d movq %r12, %r9 movq %r14, %r11 movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) incq %r9 movq %r9, (%r11) movl %r10d, (%r15) jmp 0x8ef23 testq %rax, %rax je 0x8f129 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx movq %r11, %r14 movq %r9, %r12 callq *0x8(%rax) movq %r12, %r9 movq %r14, %r11 movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %r9, (%r11) movl $0x0, (%r15) movl $0x1, %ebp jmp 0x8f037
bfdec_mul: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r15, rsi mov rbx, rdi mov r9, 7FFFFFFFFFFFFFFFh mov rax, [rsi+18h] cmp rax, [rdx+18h] mov rbp, rdx cmovb rbp, rsi cmovb r15, rdx mov r10d, [rbp+8] xor r10d, [r15+8] mov r12, [rbp+18h] lea r14, [rdi+8] lea r11, [rdi+10h] lea r13, [rdi+18h] test r12, r12 jz short loc_8EED5 mov [rsp+98h+var_60], rcx mov rdx, [r15+18h] cmp r15, rbx setnz al cmp rbp, rbx setnz cl test al, cl mov [rsp+98h+var_7C], r10d mov [rsp+98h+var_80], r8d jnz loc_8EF2A lea rax, [rsp+98h+var_58+8] mov [rsp+98h+var_88], rax lea rax, [rsp+98h+var_48] mov [rsp+98h+var_90], rax lea r13, [rsp+98h+var_48+8] mov rax, [rbx] mov [r13-18h], rax mov dword ptr [r13-10h], 0 lea rax, [r9+1] mov [r13-8], rax xorps xmm0, xmm0 movups xmmword ptr [r13+0], xmm0 mov [rsp+98h+var_78], rbx lea rbx, [rsp+98h+var_58] jmp short loc_8EF3D loc_8EED5: mov rax, [r15+10h] cmp rax, r9 jz short loc_8EEEB mov rcx, [rbp+10h] cmp rcx, r9 jnz loc_8F048 loc_8EEEB: cmp qword ptr [r13+0], 0 jz short loc_8EF19 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx mov r15, r11 mov r12, r9 call qword ptr [rax+8] mov r9, r12 mov r11, r15 mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8EF19: mov [r11], r9 mov dword ptr [r14], 0 loc_8EF23: xor ebp, ebp jmp loc_8F037 loc_8EF2A: mov [rsp+98h+var_90], r11 mov [rsp+98h+var_88], r14 mov [rsp+98h+var_78], 0 loc_8EF3D: mov rax, [r15+20h] mov [rsp+98h+var_70], rax mov rax, [rbp+20h] mov [rsp+98h+var_68], rax lea rsi, [rdx+r12] mov rdi, rbx mov r14, rdx call bf_resize test eax, eax jz short loc_8EFA8 cmp qword ptr [r13+0], 0 jz short loc_8EF84 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [r13+0], 0 loc_8EF84: mov rax, [rsp+98h+var_90] mov rcx, 7FFFFFFFFFFFFFFFh mov [rax], rcx mov rax, [rsp+98h+var_88] mov dword ptr [rax], 0 mov ebp, 20h ; ' ' jmp short loc_8EFEF loc_8EFA8: mov rdi, [rbx+20h] mov rsi, [rsp+98h+var_70] mov rdx, r14 mov rcx, [rsp+98h+var_68] mov r8, r12 call mp_mul_basecase_dec mov rax, [rsp+98h+var_88] mov ecx, [rsp+98h+var_7C] mov [rax], ecx mov rax, [rbp+10h] add rax, [r15+10h] mov rcx, [rsp+98h+var_90] mov [rcx], rax mov rdi, rbx mov rsi, [rsp+98h+var_60] mov edx, [rsp+98h+var_80] call bfdec_normalize_and_round mov ebp, eax loc_8EFEF: lea rax, [rsp+98h+var_58] cmp rbx, rax setnz cl mov rbx, [rsp+98h+var_78] cmp rbx, rax setz al or al, cl jnz short loc_8F037 mov rsi, [rbx+20h] test rsi, rsi jz short loc_8F01D mov rax, [rbx] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8F01D: mov rax, [rsp+98h+var_38] mov [rbx+20h], rax movups xmm0, [rsp+98h+var_58] movups xmm1, [rsp+98h+var_48] movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 loc_8F037: mov eax, ebp add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8F048: mov r15, r14 lea r14, [r9-1] cmp rax, r14 setnz dl cmp rcx, r14 setnz sil test dl, sil jnz short loc_8F0BB mov rdx, rcx xor rdx, r14 mov rsi, rax xor rsi, r14 lea rdi, [r9+1] xor rcx, rdi xor rax, rdi or rax, rdx setz dl or rcx, rsi mov rax, [r13+0] jz short loc_8F0FD test dl, dl jnz short loc_8F0FD test rax, rax jz short loc_8F0B6 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx mov r12, r11 mov ebp, r10d call qword ptr [rax+8] mov r10d, ebp mov r11, r12 mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8F0B6: mov [r11], r14 jmp short loc_8F0F5 loc_8F0BB: cmp qword ptr [r13+0], 0 jz short loc_8F0EF mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx mov r14, r11 mov r12, r9 mov ebp, r10d call qword ptr [rax+8] mov r10d, ebp mov r9, r12 mov r11, r14 mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8F0EF: inc r9 mov [r11], r9 loc_8F0F5: mov [r15], r10d jmp loc_8EF23 loc_8F0FD: test rax, rax jz short loc_8F129 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx mov r14, r11 mov r12, r9 call qword ptr [rax+8] mov r9, r12 mov r11, r14 mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8F129: mov [r11], r9 mov dword ptr [r15], 0 mov ebp, 1 jmp loc_8F037
long long bfdec_mul(_QWORD **a1, long long a2, long long a3, long long a4, long long a5) { _QWORD **v5; // r15 __int128 *v6; // rbx _QWORD **v7; // rbp int v8; // r10d long long v9; // r12 _QWORD *v10; // r11 long long *v11; // r13 long long v12; // rdx unsigned long long v13; // rax unsigned long long v14; // rcx long long v15; // rax unsigned int v16; // ebp long long v17; // r14 long long v18; // rsi __int128 v19; // xmm0 int *v21; // r15 bool v22; // dl unsigned long long v23; // rcx long long v24; // rax int v25; // ebp long long v26; // rax int v27; // ebp long long v28; // rax long long v29; // rax _QWORD *v30; // [rsp+8h] [rbp-90h] int *v31; // [rsp+10h] [rbp-88h] unsigned int v32; // [rsp+18h] [rbp-80h] int v33; // [rsp+1Ch] [rbp-7Ch] __int128 *v34; // [rsp+20h] [rbp-78h] long long v35; // [rsp+28h] [rbp-70h] unsigned long long *v36; // [rsp+30h] [rbp-68h] __int128 v38; // [rsp+40h] [rbp-58h] BYREF _BYTE v39[72]; // [rsp+50h] [rbp-48h] BYREF v5 = (_QWORD **)a2; v6 = (__int128 *)a1; v7 = (_QWORD **)a3; if ( *(_QWORD *)(a2 + 24) < *(_QWORD *)(a3 + 24) ) { v7 = (_QWORD **)a2; v5 = (_QWORD **)a3; } v8 = *((_DWORD *)v5 + 2) ^ *((_DWORD *)v7 + 2); v9 = (long long)v7[3]; v10 = a1 + 2; v11 = (long long *)(a1 + 3); if ( v9 ) { v12 = (long long)v5[3]; v33 = *((_DWORD *)v5 + 2) ^ *((_DWORD *)v7 + 2); v32 = a5; if ( v7 != a1 && v5 != a1 ) { v30 = a1 + 2; v31 = (int *)(a1 + 1); v34 = 0LL; } else { v31 = (int *)&v38 + 2; v30 = v39; v11 = (long long *)&v39[8]; *(_QWORD *)&v38 = *a1; DWORD2(v38) = 0; *(_QWORD *)v39 = 0x8000000000000000LL; *(_OWORD *)&v39[8] = 0LL; v34 = (__int128 *)a1; v6 = &v38; } v35 = (long long)v5[4]; v36 = v7[4]; v17 = v12; if ( (unsigned int)bf_resize((long long)v6, v12 + v9) ) { if ( *v11 ) { *((_QWORD *)v6 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)v6 + 8LL))( **(_QWORD **)v6, *((_QWORD *)v6 + 4), 0LL); *v11 = 0LL; } *v30 = 0x7FFFFFFFFFFFFFFFLL; *v31 = 0; v16 = 32; } else { mp_mul_basecase_dec(*((_QWORD *)v6 + 4), v35, v17, v36, v9); *v31 = v33; *v30 = (char *)v7[2] + (_QWORD)v5[2]; v16 = bfdec_normalize_and_round((_QWORD **)v6, a4, v32); } if ( v6 == &v38 && v34 != &v38 ) { v18 = *((_QWORD *)v34 + 4); if ( v18 ) (*(void ( **)(_QWORD, long long, _QWORD))(*(_QWORD *)v34 + 8LL))(**(_QWORD **)v34, v18, 0LL); *((_QWORD *)v34 + 4) = *(_QWORD *)&v39[16]; v19 = v38; v34[1] = *(_OWORD *)v39; *v34 = v19; } return v16; } v13 = (unsigned long long)v5[2]; if ( v13 == 0x7FFFFFFFFFFFFFFFLL || (v14 = (unsigned long long)v7[2], v14 == 0x7FFFFFFFFFFFFFFFLL) ) { if ( *v11 ) { v15 = ((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL); v10 = a1 + 2; a1[4] = (_QWORD *)v15; a1[3] = 0LL; } *v10 = 0x7FFFFFFFFFFFFFFFLL; *((_DWORD *)a1 + 2) = 0; return 0; } v21 = (int *)(a1 + 1); if ( v14 != 0x7FFFFFFFFFFFFFFELL && v13 != 0x7FFFFFFFFFFFFFFELL ) { if ( *v11 ) { v27 = v8; v28 = ((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL); v8 = v27; v10 = a1 + 2; a1[4] = (_QWORD *)v28; a1[3] = 0LL; } *v10 = 0x8000000000000000LL; goto LABEL_32; } v22 = (v14 ^ 0x7FFFFFFFFFFFFFFELL | v13 ^ 0x8000000000000000LL) == 0; v23 = v13 ^ 0x7FFFFFFFFFFFFFFELL | v14 ^ 0x8000000000000000LL; v24 = *v11; if ( v23 && !v22 ) { if ( v24 ) { v25 = v8; v26 = ((long long ( *)(_QWORD, _QWORD *, _QWORD, unsigned long long, long long, long long))(*a1)[1])( **a1, a1[4], 0LL, v23, a5, 0x7FFFFFFFFFFFFFFFLL); v8 = v25; v10 = a1 + 2; a1[4] = (_QWORD *)v26; a1[3] = 0LL; } *v10 = 0x7FFFFFFFFFFFFFFELL; LABEL_32: *v21 = v8; return 0; } if ( v24 ) { v29 = ((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL); v10 = a1 + 2; a1[4] = (_QWORD *)v29; a1[3] = 0LL; } *v10 = 0x7FFFFFFFFFFFFFFFLL; *v21 = 0; return 1; }
63,267
JS_NewStringLen
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewStringLen(JSContext *ctx, const char *buf, size_t buf_len) { JSString *str; size_t len; int kind; if (buf_len <= 0) { return JS_AtomToString(ctx, JS_ATOM_empty_string); } /* Compute string kind and length: 7-bit, 8-bit, 16-bit, 16-bit UTF-16 */ kind = utf8_scan(buf, buf_len, &len); if (len > JS_STRING_LEN_MAX) return JS_ThrowRangeError(ctx, "invalid string length"); switch (kind) { case UTF8_PLAIN_ASCII: str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; break; case UTF8_NON_ASCII: /* buf contains non-ASCII code-points, but limited to 8-bit values */ str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; utf8_decode_buf8(str->u.str8, len + 1, buf, buf_len); break; default: // This causes a potential problem in JS_ThrowError if message is invalid //if (kind & UTF8_HAS_ERRORS) // return JS_ThrowRangeError(ctx, "invalid UTF-8 sequence"); str = js_alloc_string(ctx, len, 1); if (!str) return JS_EXCEPTION; utf8_decode_buf16(str->u.str16, len, buf, buf_len); break; } return JS_MKPTR(JS_TAG_STRING, str); }
O0
c
JS_NewStringLen: subq $0x48, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) ja 0x282a9 movq 0x30(%rsp), %rdi movl $0x2f, %esi callq 0x29000 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0x2842b movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi leaq 0x10(%rsp), %rdx callq 0x1ee90 movl %eax, 0xc(%rsp) cmpq $0x3fffffff, 0x10(%rsp) # imm = 0x3FFFFFFF jbe 0x282ee movq 0x30(%rsp), %rdi leaq 0xe56f6(%rip), %rsi # 0x10d9ce movb $0x0, %al callq 0x29670 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0x2842b movl 0xc(%rsp), %eax movl %eax, 0x8(%rsp) testl %eax, %eax je 0x2830a jmp 0x282fc movl 0x8(%rsp), %eax subl $0x1, %eax je 0x2836c jmp 0x283c5 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rax movl %eax, %esi xorl %edx, %edx callq 0x29760 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x28340 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x2842b movq 0x18(%rsp), %rdi addq $0x18, %rdi movq 0x28(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0xe5b0 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movb $0x0, 0x18(%rax,%rcx) jmp 0x28418 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rax movl %eax, %esi xorl %edx, %edx callq 0x29760 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x283a2 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x2842b movq 0x18(%rsp), %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi addq $0x1, %rsi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0x1f020 jmp 0x28418 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rax movl %eax, %esi movl $0x1, %edx callq 0x29760 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x283fb movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x2842b movq 0x18(%rsp), %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0x1f120 movq 0x18(%rsp), %rax movq %rax, 0x38(%rsp) movq $-0x7, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x48, %rsp retq nopw (%rax,%rax)
JS_NewStringLen: sub rsp, 48h mov [rsp+48h+var_18], rdi mov [rsp+48h+var_20], rsi mov [rsp+48h+var_28], rdx cmp [rsp+48h+var_28], 0 ja short loc_282A9 mov rdi, [rsp+48h+var_18] mov esi, 2Fh ; '/' call JS_AtomToString mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx jmp loc_2842B loc_282A9: mov rdi, [rsp+48h+var_20] mov rsi, [rsp+48h+var_28] lea rdx, [rsp+48h+var_38] call utf8_scan mov [rsp+48h+var_3C], eax cmp [rsp+48h+var_38], 3FFFFFFFh jbe short loc_282EE mov rdi, [rsp+48h+var_18] lea rsi, aInvalidStringL; "invalid string length" mov al, 0 call JS_ThrowRangeError mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx jmp loc_2842B loc_282EE: mov eax, [rsp+48h+var_3C] mov [rsp+48h+var_40], eax test eax, eax jz short loc_2830A jmp short $+2 loc_282FC: mov eax, [rsp+48h+var_40] sub eax, 1 jz short loc_2836C jmp loc_283C5 loc_2830A: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_38] mov esi, eax xor edx, edx call js_alloc_string mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jnz short loc_28340 mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp loc_2842B loc_28340: mov rdi, [rsp+48h+var_30] add rdi, 18h mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_38] call _memcpy mov rax, [rsp+48h+var_30] mov rcx, [rsp+48h+var_38] mov byte ptr [rax+rcx+18h], 0 jmp loc_28418 loc_2836C: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_38] mov esi, eax xor edx, edx call js_alloc_string mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jnz short loc_283A2 mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp loc_2842B loc_283A2: mov rdi, [rsp+48h+var_30] add rdi, 18h mov rsi, [rsp+48h+var_38] add rsi, 1 mov rdx, [rsp+48h+var_20] mov rcx, [rsp+48h+var_28] call utf8_decode_buf8 jmp short loc_28418 loc_283C5: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_38] mov esi, eax mov edx, 1 call js_alloc_string mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jnz short loc_283FB mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp short loc_2842B loc_283FB: mov rdi, [rsp+48h+var_30] add rdi, 18h mov rsi, [rsp+48h+var_38] mov rdx, [rsp+48h+var_20] mov rcx, [rsp+48h+var_28] call utf8_decode_buf16 loc_28418: mov rax, [rsp+48h+var_30] mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], 0FFFFFFFFFFFFFFF9h loc_2842B: mov rax, [rsp+48h+var_10] mov rdx, [rsp+48h+var_8] add rsp, 48h retn
long long JS_NewStringLen(long long a1, unsigned __int8 *a2, unsigned __int8 *a3) { long long v3; // rdx int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rdx long long v9; // rax int v11; // [rsp+Ch] [rbp-3Ch] unsigned long long v12; // [rsp+10h] [rbp-38h] BYREF long long v13; // [rsp+18h] [rbp-30h] unsigned __int8 *v14; // [rsp+20h] [rbp-28h] unsigned __int8 *v15; // [rsp+28h] [rbp-20h] long long v16; // [rsp+30h] [rbp-18h] long long v17; // [rsp+38h] [rbp-10h] long long v18; // [rsp+40h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; if ( a3 ) { v11 = utf8_scan(v15, (unsigned long long)v14, &v12); if ( v12 <= 0x3FFFFFFF ) { if ( v11 ) { if ( v11 == 1 ) { v13 = js_alloc_string(v16, (unsigned int)v12, 0LL); if ( !v13 ) { LODWORD(v17) = 0; v18 = 6LL; return v17; } utf8_decode_buf8(v13 + 24, v12 + 1, v15, (long long)v14); } else { v9 = js_alloc_string(v16, (unsigned int)v12, 1LL); v13 = v9; if ( !v9 ) { LODWORD(v17) = 0; v18 = 6LL; return v17; } utf8_decode_buf16(v13 + 24, v12, v15, v14); } } else { v13 = js_alloc_string(v16, (unsigned int)v12, 0LL); if ( !v13 ) { LODWORD(v17) = 0; v18 = 6LL; return v17; } memcpy(v13 + 24, v15, v12); *(_BYTE *)(v13 + v12 + 24) = 0; } v17 = v13; v18 = -7LL; return v17; } v17 = JS_ThrowRangeError(v16, (unsigned int)"invalid string length", v4, v5, v6, v7); v18 = v8; } else { v17 = JS_AtomToString(v16, 47LL); v18 = v3; } return v17; }
JS_NewStringLen: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX CMP qword ptr [RSP + 0x20],0x0 JA 0x001282a9 MOV RDI,qword ptr [RSP + 0x30] MOV ESI,0x2f CALL 0x00129000 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x0012842b LAB_001282a9: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] LEA RDX,[RSP + 0x10] CALL 0x0011ee90 MOV dword ptr [RSP + 0xc],EAX CMP qword ptr [RSP + 0x10],0x3fffffff JBE 0x001282ee MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[0x20d9ce] MOV AL,0x0 CALL 0x00129670 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x0012842b LAB_001282ee: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x8],EAX TEST EAX,EAX JZ 0x0012830a JMP 0x001282fc LAB_001282fc: MOV EAX,dword ptr [RSP + 0x8] SUB EAX,0x1 JZ 0x0012836c JMP 0x001283c5 LAB_0012830a: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,EAX XOR EDX,EDX CALL 0x00129760 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x00128340 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0012842b LAB_00128340: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0010e5b0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 JMP 0x00128418 LAB_0012836c: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,EAX XOR EDX,EDX CALL 0x00129760 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001283a2 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0012842b LAB_001283a2: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x1 MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] CALL 0x0011f020 JMP 0x00128418 LAB_001283c5: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,EAX MOV EDX,0x1 CALL 0x00129760 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001283fb MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0012842b LAB_001283fb: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] CALL 0x0011f120 LAB_00128418: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],-0x7 LAB_0012842b: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
int1 [16] JS_NewStringLen(int8 param_1,void *param_2,long param_3) { int iVar1; int1 auVar2 [16]; ulong local_38; long local_30; long local_28; void *local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_3 == 0) { auVar2 = JS_AtomToString(param_1,0x2f); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } else { iVar1 = utf8_scan(param_2,param_3,&local_38); if (local_38 < 0x40000000) { if (iVar1 == 0) { local_30 = js_alloc_string(local_18,local_38 & 0xffffffff,0); if (local_30 == 0) { local_10 = 0; local_8 = 6; goto LAB_0012842b; } memcpy((void *)(local_30 + 0x18),local_20,local_38); *(int1 *)(local_30 + 0x18 + local_38) = 0; } else if (iVar1 == 1) { local_30 = js_alloc_string(local_18,local_38 & 0xffffffff,0); if (local_30 == 0) { local_10 = 0; local_8 = 6; goto LAB_0012842b; } utf8_decode_buf8(local_30 + 0x18,local_38 + 1,local_20,local_28); } else { local_30 = js_alloc_string(local_18,local_38 & 0xffffffff,1); if (local_30 == 0) { local_10 = 0; local_8 = 6; goto LAB_0012842b; } utf8_decode_buf16(local_30 + 0x18,local_38,local_20,local_28); } local_10 = (int4)local_30; uStack_c = (int4)((ulong)local_30 >> 0x20); local_8 = 0xfffffffffffffff9; } else { auVar2 = JS_ThrowRangeError(local_18,"invalid string length"); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } } LAB_0012842b: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
63,268
JS_NewStringLen
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewStringLen(JSContext *ctx, const char *buf, size_t buf_len) { JSString *str; size_t len; int kind; if (buf_len <= 0) { return JS_AtomToString(ctx, JS_ATOM_empty_string); } /* Compute string kind and length: 7-bit, 8-bit, 16-bit, 16-bit UTF-16 */ kind = utf8_scan(buf, buf_len, &len); if (len > JS_STRING_LEN_MAX) return JS_ThrowRangeError(ctx, "invalid string length"); switch (kind) { case UTF8_PLAIN_ASCII: str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; break; case UTF8_NON_ASCII: /* buf contains non-ASCII code-points, but limited to 8-bit values */ str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; utf8_decode_buf8(str->u.str8, len + 1, buf, buf_len); break; default: // This causes a potential problem in JS_ThrowError if message is invalid //if (kind & UTF8_HAS_ERRORS) // return JS_ThrowRangeError(ctx, "invalid UTF-8 sequence"); str = js_alloc_string(ctx, len, 1); if (!str) return JS_EXCEPTION; utf8_decode_buf16(str->u.str16, len, buf, buf_len); break; } return JS_MKPTR(JS_TAG_STRING, str); }
O1
c
JS_NewStringLen: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r15 testq %rdx, %rdx je 0x1ff5f movq %rdx, %r14 movq %rsi, %rbx leaq 0x10(%rsp), %r12 movq %rsi, %rdi movq %rdx, %rsi movq %r12, %rdx callq 0x1b872 movq (%r12), %rsi cmpq $0x40000000, %rsi # imm = 0x40000000 jb 0x1ff7a leaq 0x7ea27(%rip), %rsi # 0x9e96e movq %r15, %rdi xorl %eax, %eax callq 0x20add movq $0x0, 0x8(%rsp) jmp 0x20022 movq 0x18(%r15), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %rax incl (%rax) movq %rax, 0x8(%rsp) jmp 0x20011 movq %r15, %rdi cmpl $0x1, %eax je 0x1ffb8 testl %eax, %eax jne 0x1ffe3 xorl %edx, %edx callq 0x20b73 testq %rax, %rax je 0x2001a movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %r14 movq %rbx, %rsi movq %r14, %rdx callq 0xe5b0 movb $0x0, 0x18(%r15,%r14) jmp 0x2000c xorl %edx, %edx callq 0x20b73 testq %rax, %rax je 0x2001a movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi incq %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x1b927 jmp 0x2000c movl $0x1, %edx callq 0x20b73 testq %rax, %rax je 0x2001a movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x1b97d movq %r15, 0x8(%rsp) movq $-0x7, %rdx jmp 0x20027 movl $0x0, 0x8(%rsp) movl $0x6, %edx movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
JS_NewStringLen: push r15 push r14 push r12 push rbx sub rsp, 18h mov r15, rdi test rdx, rdx jz short loc_1FF5F mov r14, rdx mov rbx, rsi lea r12, [rsp+38h+var_28] mov rdi, rsi mov rsi, rdx mov rdx, r12 call utf8_scan mov rsi, [r12] cmp rsi, 40000000h jb short loc_1FF7A lea rsi, aInvalidStringL; "invalid string length" mov rdi, r15 xor eax, eax call JS_ThrowRangeError mov [rsp+38h+var_30], 0 jmp loc_20022 loc_1FF5F: mov rax, [r15+18h] mov rax, [rax+68h] mov rax, [rax+178h] inc dword ptr [rax] mov [rsp+38h+var_30], rax jmp loc_20011 loc_1FF7A: mov rdi, r15 cmp eax, 1 jz short loc_1FFB8 test eax, eax jnz short loc_1FFE3 xor edx, edx call js_alloc_string test rax, rax jz loc_2001A mov r15, rax mov rdi, rax add rdi, 18h mov r14, [rsp+38h+var_28] mov rsi, rbx mov rdx, r14 call _memcpy mov byte ptr [r15+r14+18h], 0 jmp short loc_2000C loc_1FFB8: xor edx, edx call js_alloc_string test rax, rax jz short loc_2001A mov r15, rax mov rdi, rax add rdi, 18h mov rsi, [rsp+38h+var_28] inc rsi mov rdx, rbx mov rcx, r14 call utf8_decode_buf8 jmp short loc_2000C loc_1FFE3: mov edx, 1 call js_alloc_string test rax, rax jz short loc_2001A mov r15, rax mov rdi, rax add rdi, 18h mov rsi, [rsp+38h+var_28] loc_20001: mov rdx, rbx mov rcx, r14 call utf8_decode_buf16 loc_2000C: mov [rsp+38h+var_30], r15 loc_20011: mov rdx, 0FFFFFFFFFFFFFFF9h jmp short loc_20027 loc_2001A: mov dword ptr [rsp+38h+var_30], 0 loc_20022: mov edx, 6 loc_20027: mov rax, [rsp+38h+var_30] add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
_DWORD * JS_NewStringLen(long long a1, char *a2, long long a3) { int v4; // eax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d _DWORD *v9; // rax long long v10; // rax long long v11; // r15 unsigned long long v12; // r14 long long v13; // rax long long v14; // rax long long v16; // [rsp+8h] [rbp-30h] unsigned long long v17[5]; // [rsp+10h] [rbp-28h] BYREF if ( !a3 ) { v9 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*v9; return v9; } v4 = utf8_scan(a2, a3, (long long *)v17); if ( v17[0] < 0x40000000 ) { if ( v4 == 1 ) { v13 = js_alloc_string(a1, v17[0], 0LL); if ( v13 ) { v11 = v13; utf8_decode_buf8(v13 + 24, v17[0] + 1, a2, a3); return (_DWORD *)v11; } } else if ( v4 ) { v14 = js_alloc_string(a1, v17[0], 1LL); if ( v14 ) { v11 = v14; utf8_decode_buf16(v14 + 24, v17[0], a2, a3); return (_DWORD *)v11; } } else { v10 = js_alloc_string(a1, v17[0], 0LL); if ( v10 ) { v11 = v10; v12 = v17[0]; memcpy(v10 + 24, a2, v17[0]); *(_BYTE *)(v11 + v12 + 24) = 0; return (_DWORD *)v11; } } LODWORD(v16) = 0; return (_DWORD *)v16; } JS_ThrowRangeError(a1, (unsigned int)"invalid string length", v5, v6, v7, v8); return 0LL; }
63,269
JS_NewStringLen
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewStringLen(JSContext *ctx, const char *buf, size_t buf_len) { JSString *str; size_t len; int kind; if (buf_len <= 0) { return JS_AtomToString(ctx, JS_ATOM_empty_string); } /* Compute string kind and length: 7-bit, 8-bit, 16-bit, 16-bit UTF-16 */ kind = utf8_scan(buf, buf_len, &len); if (len > JS_STRING_LEN_MAX) return JS_ThrowRangeError(ctx, "invalid string length"); switch (kind) { case UTF8_PLAIN_ASCII: str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; break; case UTF8_NON_ASCII: /* buf contains non-ASCII code-points, but limited to 8-bit values */ str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; utf8_decode_buf8(str->u.str8, len + 1, buf, buf_len); break; default: // This causes a potential problem in JS_ThrowError if message is invalid //if (kind & UTF8_HAS_ERRORS) // return JS_ThrowRangeError(ctx, "invalid UTF-8 sequence"); str = js_alloc_string(ctx, len, 1); if (!str) return JS_EXCEPTION; utf8_decode_buf16(str->u.str16, len, buf, buf_len); break; } return JS_MKPTR(JS_TAG_STRING, str); }
O2
c
JS_NewStringLen: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r15 testq %rdx, %rdx je 0x1a33f movq %rdx, %r14 movq %rsi, %rbx leaq 0x10(%rsp), %r12 movq %rsi, %rdi movq %rdx, %rsi movq %r12, %rdx callq 0x160c9 movq (%r12), %rsi cmpq $0x40000000, %rsi # imm = 0x40000000 jb 0x1a354 leaq 0x6b594(%rip), %rsi # 0x858be movq %r15, %rdi xorl %eax, %eax callq 0x1acb3 andq $0x0, 0x8(%rsp) jmp 0x1a3f8 pushq $0x2f popq %rsi movq %r15, %rdi callq 0x1a990 movq %rax, 0x8(%rsp) jmp 0x1a3fb cmpl $0x1, %eax je 0x1a392 testl %eax, %eax jne 0x1a3c0 movq %r15, %rdi xorl %edx, %edx callq 0x1ad45 testq %rax, %rax je 0x1a3f3 movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %r14 movq %rbx, %rsi movq %r14, %rdx callq 0xe5c0 movb $0x0, 0x18(%r15,%r14) jmp 0x1a3ea movq %r15, %rdi xorl %edx, %edx callq 0x1ad45 testq %rax, %rax je 0x1a3f3 movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi incq %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x161a9 jmp 0x1a3ea pushq $0x1 popq %rdx movq %r15, %rdi callq 0x1ad45 testq %rax, %rax je 0x1a3f3 movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x161f8 movq %r15, 0x8(%rsp) pushq $-0x7 jmp 0x1a3fa andl $0x0, 0x8(%rsp) pushq $0x6 popq %rdx movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
JS_NewStringLen: push r15 push r14 push r12 push rbx sub rsp, 18h mov r15, rdi test rdx, rdx jz short loc_1A33F mov r14, rdx mov rbx, rsi lea r12, [rsp+38h+var_28] mov rdi, rsi mov rsi, rdx mov rdx, r12 call utf8_scan mov rsi, [r12] cmp rsi, 40000000h jb short loc_1A354 lea rsi, aInvalidStringL; "invalid string length" mov rdi, r15 xor eax, eax call JS_ThrowRangeError and [rsp+38h+var_30], 0 jmp loc_1A3F8 loc_1A33F: push 2Fh ; '/' pop rsi mov rdi, r15 call JS_AtomToString mov [rsp+38h+var_30], rax jmp loc_1A3FB loc_1A354: cmp eax, 1 jz short loc_1A392 test eax, eax jnz short loc_1A3C0 mov rdi, r15 xor edx, edx call js_alloc_string test rax, rax jz loc_1A3F3 mov r15, rax mov rdi, rax add rdi, 18h mov r14, [rsp+38h+var_28] mov rsi, rbx mov rdx, r14 call _memcpy mov byte ptr [r15+r14+18h], 0 jmp short loc_1A3EA loc_1A392: mov rdi, r15 xor edx, edx call js_alloc_string test rax, rax jz short loc_1A3F3 mov r15, rax mov rdi, rax add rdi, 18h mov rsi, [rsp+38h+var_28] inc rsi mov rdx, rbx mov rcx, r14 call utf8_decode_buf8 jmp short loc_1A3EA loc_1A3C0: push 1 pop rdx mov rdi, r15 call js_alloc_string test rax, rax jz short loc_1A3F3 mov r15, rax mov rdi, rax add rdi, 18h mov rsi, [rsp+38h+var_28] mov rdx, rbx mov rcx, r14 call utf8_decode_buf16 loc_1A3EA: mov [rsp+38h+var_30], r15 push 0FFFFFFFFFFFFFFF9h jmp short loc_1A3FA loc_1A3F3: and dword ptr [rsp+38h+var_30], 0 loc_1A3F8: push 6 loc_1A3FA: pop rdx loc_1A3FB: mov rax, [rsp+38h+var_30] add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long JS_NewStringLen(long long a1, char *a2, long long a3) { int v4; // eax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rax long long v10; // r15 unsigned long long v11; // r14 long long v12; // rax long long v13; // rax long long v15; // [rsp+8h] [rbp-30h] unsigned long long v16[5]; // [rsp+10h] [rbp-28h] BYREF if ( !a3 ) return JS_AtomToString(a1, 47LL); v4 = utf8_scan(a2, a3, v16); if ( v16[0] < 0x40000000 ) { if ( v4 == 1 ) { v12 = js_alloc_string(a1, v16[0], 0LL); if ( v12 ) { v10 = v12; utf8_decode_buf8(v12 + 24, v16[0] + 1, a2, a3); return v10; } } else if ( v4 ) { v13 = js_alloc_string(a1, v16[0], 1LL); if ( v13 ) { v10 = v13; utf8_decode_buf16(v13 + 24, v16[0], a2, a3); return v10; } } else { v9 = js_alloc_string(a1, v16[0], 0LL); if ( v9 ) { v10 = v9; v11 = v16[0]; memcpy(v9 + 24, a2, v16[0]); *(_BYTE *)(v10 + v11 + 24) = 0; return v10; } } LODWORD(v15) = 0; return v15; } JS_ThrowRangeError(a1, (unsigned int)"invalid string length", v5, v6, v7, v8); return 0LL; }
JS_NewStringLen: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDI TEST RDX,RDX JZ 0x0011a33f MOV R14,RDX MOV RBX,RSI LEA R12,[RSP + 0x10] MOV RDI,RSI MOV RSI,RDX MOV RDX,R12 CALL 0x001160c9 MOV RSI,qword ptr [R12] CMP RSI,0x40000000 JC 0x0011a354 LEA RSI,[0x1858be] MOV RDI,R15 XOR EAX,EAX CALL 0x0011acb3 AND qword ptr [RSP + 0x8],0x0 JMP 0x0011a3f8 LAB_0011a33f: PUSH 0x2f POP RSI MOV RDI,R15 CALL 0x0011a990 MOV qword ptr [RSP + 0x8],RAX JMP 0x0011a3fb LAB_0011a354: CMP EAX,0x1 JZ 0x0011a392 TEST EAX,EAX JNZ 0x0011a3c0 MOV RDI,R15 XOR EDX,EDX CALL 0x0011ad45 TEST RAX,RAX JZ 0x0011a3f3 MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV R14,qword ptr [RSP + 0x10] MOV RSI,RBX MOV RDX,R14 CALL 0x0010e5c0 MOV byte ptr [R15 + R14*0x1 + 0x18],0x0 JMP 0x0011a3ea LAB_0011a392: MOV RDI,R15 XOR EDX,EDX CALL 0x0011ad45 TEST RAX,RAX JZ 0x0011a3f3 MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] INC RSI MOV RDX,RBX MOV RCX,R14 CALL 0x001161a9 JMP 0x0011a3ea LAB_0011a3c0: PUSH 0x1 POP RDX MOV RDI,R15 CALL 0x0011ad45 TEST RAX,RAX JZ 0x0011a3f3 MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBX MOV RCX,R14 CALL 0x001161f8 LAB_0011a3ea: MOV qword ptr [RSP + 0x8],R15 PUSH -0x7 JMP 0x0011a3fa LAB_0011a3f3: AND dword ptr [RSP + 0x8],0x0 LAB_0011a3f8: PUSH 0x6 LAB_0011a3fa: POP RDX LAB_0011a3fb: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
ulong JS_NewStringLen(int8 param_1,void *param_2,long param_3) { int iVar1; ulong uVar2; ulong local_30; ulong local_28; if (param_3 == 0) { local_30 = JS_AtomToString(param_1,0x2f); } else { iVar1 = utf8_scan(param_2,param_3,&local_28); if (local_28 < 0x40000000) { if (iVar1 == 1) { uVar2 = js_alloc_string(param_1,local_28,0); if (uVar2 != 0) { utf8_decode_buf8(uVar2 + 0x18,local_28 + 1,param_2,param_3); return uVar2; } } else if (iVar1 == 0) { uVar2 = js_alloc_string(param_1,local_28,0); if (uVar2 != 0) { memcpy((void *)(uVar2 + 0x18),param_2,local_28); *(int1 *)(uVar2 + 0x18 + local_28) = 0; return uVar2; } } else { uVar2 = js_alloc_string(param_1,local_28,1); if (uVar2 != 0) { utf8_decode_buf16(uVar2 + 0x18,local_28,param_2,param_3); return uVar2; } } local_30 = local_30 & 0xffffffff00000000; } else { JS_ThrowRangeError(param_1,"invalid string length"); local_30 = 0; } } return local_30; }
63,270
add_directory
eloqsql/mysys/my_default.c
static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs) { char buf[FN_REFLEN]; size_t len; char *p; my_bool err __attribute__((unused)); len= normalize_dirname(buf, dir); if (!(p= strmake_root(alloc, buf, len))) return 1; /* Failure */ /* Should never fail if DEFAULT_DIRS_SIZE is correct size */ err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE); DBUG_ASSERT(err == FALSE); return 0; }
O3
c
add_directory: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x208, %rsp # imm = 0x208 movq %rdx, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq -0x220(%rbp), %r15 movq %r15, %rdi callq 0x270cb movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x27929 testq %rax, %rax je 0x266e3 movl $0x8, %edx movq %rax, %rdi movq %rbx, %rsi callq 0x273ac xorl %eax, %eax jmp 0x266e8 movl $0x1, %eax movq %fs:0x28, %rcx cmpq -0x20(%rbp), %rcx jne 0x26705 addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x24350 nop
add_directory: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 208h mov rbx, rdx mov r14, rdi mov rax, fs:28h mov [rbp+var_20], rax lea r15, [rbp+var_220] mov rdi, r15 call normalize_dirname mov rdi, r14 mov rsi, r15 mov rdx, rax call strmake_root test rax, rax jz short loc_266E3 mov edx, 8 mov rdi, rax mov rsi, rbx call array_append_string_unique xor eax, eax jmp short loc_266E8 loc_266E3: mov eax, 1 loc_266E8: mov rcx, fs:28h cmp rcx, [rbp+var_20] jnz short loc_26705 add rsp, 208h pop rbx pop r14 pop r15 pop rbp retn loc_26705: call ___stack_chk_fail
long long add_directory(long long a1, long long a2, long long a3) { long long v4; // rax long long v5; // rax _BYTE v7[512]; // [rsp+0h] [rbp-220h] BYREF unsigned long long v8; // [rsp+200h] [rbp-20h] v8 = __readfsqword(0x28u); v4 = normalize_dirname(v7); v5 = strmake_root(a1, v7, v4); if ( !v5 ) return 1LL; array_append_string_unique(v5, a3, 8LL); return 0LL; }
add_directory: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x208 MOV RBX,RDX MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA R15,[RBP + -0x220] MOV RDI,R15 CALL 0x001270cb MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x00127929 TEST RAX,RAX JZ 0x001266e3 MOV EDX,0x8 MOV RDI,RAX MOV RSI,RBX CALL 0x001273ac XOR EAX,EAX JMP 0x001266e8 LAB_001266e3: MOV EAX,0x1 LAB_001266e8: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x20] JNZ 0x00126705 ADD RSP,0x208 POP RBX POP R14 POP R15 POP RBP RET LAB_00126705: CALL 0x00124350
bool add_directory(int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; long lVar2; long in_FS_OFFSET; int1 local_228 [512]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = normalize_dirname(local_228); lVar2 = strmake_root(param_1,local_228,uVar1); if (lVar2 != 0) { array_append_string_unique(lVar2,param_3,8); } if (*(long *)(in_FS_OFFSET + 0x28) != local_28) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar2 == 0; }
63,271
ast_node_type_to_string
tsotchke[P]eshkol/src/frontend/ast/core/ast_core.c
const char* ast_node_type_to_string(AstNodeType type) { switch (type) { case AST_LITERAL_NUMBER: return "NUMBER"; case AST_LITERAL_BOOLEAN: return "BOOLEAN"; case AST_LITERAL_CHARACTER: return "CHARACTER"; case AST_LITERAL_STRING: return "STRING"; case AST_LITERAL_VECTOR: return "VECTOR"; case AST_LITERAL_NIL: return "NIL"; case AST_IDENTIFIER: return "IDENTIFIER"; case AST_DEFINE: return "DEFINE"; case AST_LAMBDA: return "LAMBDA"; case AST_IF: return "IF"; case AST_BEGIN: return "BEGIN"; case AST_QUOTE: return "QUOTE"; case AST_SET: return "SET!"; case AST_LET: return "LET"; case AST_LETREC: return "LETREC"; case AST_LETSTAR: return "LET*"; case AST_AND: return "AND"; case AST_OR: return "OR"; case AST_COND: return "COND"; case AST_CASE: return "CASE"; case AST_DO: return "DO"; case AST_DELAY: return "DELAY"; case AST_QUASIQUOTE: return "QUASIQUOTE"; case AST_UNQUOTE: return "UNQUOTE"; case AST_UNQUOTE_SPLICING: return "UNQUOTE-SPLICING"; case AST_CALL: return "CALL"; case AST_SEQUENCE: return "SEQUENCE"; case AST_FUNCTION_DEF: return "FUNCTION-DEF"; case AST_VARIABLE_DEF: return "VARIABLE-DEF"; case AST_TYPE_DECLARATION: return "TYPE-DECLARATION"; case AST_PROGRAM: return "PROGRAM"; case AST_ERROR: return "ERROR"; case AST_BINDING_PAIR: return "BINDING-PAIR"; case AST_COND_CLAUSE: return "COND-CLAUSE"; case AST_CASE_CLAUSE: return "CASE-CLAUSE"; default: return "UNKNOWN"; } }
O3
c
ast_node_type_to_string: cmpl $0x22, %edi ja 0xa6d9 movl %edi, %eax leaq 0x11caf(%rip), %rcx # 0x1c380 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0xfc75(%rip), %rax # 0x1a355 retq nopl (%rax)
ast_node_type_to_string: cmp edi, 22h ; '"' ja short loc_A6D9 mov eax, edi lea rcx, unk_1C380 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_A6D9: lea rax, aUnknown_0; "UNKNOWN" retn
const char * ast_node_type_to_string(unsigned int a1) { if ( a1 > 0x22 ) return "UNKNOWN"; else return (char *)dword_1C380 + dword_1C380[a1]; }
ast_node_type_to_string: CMP EDI,0x22 JA 0x0010a6d9 MOV EAX,EDI LEA RCX,[0x11c380] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_0010a6d9: LEA RAX,[0x11a355] RET
char * ast_node_type_to_string(uint param_1) { if (param_1 < 0x23) { return &DAT_0011c380 + *(int *)(&DAT_0011c380 + (ulong)param_1 * 4); } return "UNKNOWN"; }
63,272
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O3
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x220, %rsp # imm = 0x220 movq %rcx, %r15 movl %edx, %r12d movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq 0x3456ae(%rip), %rdi # 0x36d940 leaq -0x9ae(%rip), %rsi # 0x278eb callq 0x24280 movq %rbx, %rdi movl %r12d, %esi movq %r15, %rdx callq 0x27ad6 testl %eax, %eax je 0x282c2 movq %r14, %rdi movl %eax, %esi movq %r15, %rdx callq 0x27d7a movq %rax, %r14 jmp 0x282c5 xorl %r14d, %r14d testq %r14, %r14 setne %al testb $0x10, %r15b sete %cl orb %al, %cl jne 0x2830f leaq -0x240(%rbp), %r15 movq %r15, %rdi callq 0x276ab movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movl $0x4, %esi movl $0x16, %edi movq %rbx, %rdx movq %r15, %rcx xorl %eax, %eax callq 0x2a2fb movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x28331 movq %r14, %rax addq $0x220, %rsp # imm = 0x220 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x24340
my_charset_get_by_name: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 220h mov r15, rcx mov r12d, edx mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_28], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, rbx mov esi, r12d mov rdx, r15 call get_charset_number test eax, eax jz short loc_282C2 mov rdi, r14 mov esi, eax mov rdx, r15 call get_internal_charset mov r14, rax jmp short loc_282C5 loc_282C2: xor r14d, r14d loc_282C5: test r14, r14 setnz al test r15b, 10h setz cl or cl, al jnz short loc_2830F lea r15, [rbp+var_240] mov rdi, r15 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov esi, 4 mov edi, 16h mov rdx, rbx mov rcx, r15 xor eax, eax call my_error loc_2830F: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_28331 mov rax, r14 add rsp, 220h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_28331: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { unsigned int charset_number; // eax long long internal_charset; // r14 int v8; // r8d int v9; // r9d _BYTE v11[536]; // [rsp+0h] [rbp-240h] BYREF unsigned long long v12; // [rsp+218h] [rbp-28h] v12 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( internal_charset == 0 && (a4 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v11), "Index.xml"); my_error(22, 4, a2, (unsigned int)v11, v8, v9); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x220 MOV R15,RCX MOV R12D,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[0x46d940] LEA RSI,[0x1278eb] CALL 0x00124280 MOV RDI,RBX MOV ESI,R12D MOV RDX,R15 CALL 0x00127ad6 TEST EAX,EAX JZ 0x001282c2 MOV RDI,R14 MOV ESI,EAX MOV RDX,R15 CALL 0x00127d7a MOV R14,RAX JMP 0x001282c5 LAB_001282c2: XOR R14D,R14D LAB_001282c5: TEST R14,R14 SETNZ AL TEST R15B,0x10 SETZ CL OR CL,AL JNZ 0x0012830f LEA R15,[RBP + -0x240] MOV RDI,R15 CALL 0x001276ab MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV ESI,0x4 MOV EDI,0x16 MOV RDX,RBX MOV RCX,R15 XOR EAX,EAX CALL 0x0012a2fb LAB_0012830f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x00128331 MOV RAX,R14 ADD RSP,0x220 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00128331: CALL 0x00124340
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; long lVar2; int8 *puVar3; long in_FS_OFFSET; int1 local_248 [536]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { lVar2 = 0; } else { lVar2 = get_internal_charset(param_1,iVar1,param_4); } if ((param_4 & 0x10) != 0 && lVar2 == 0) { puVar3 = (int8 *)get_charsets_dir(local_248); *puVar3 = 0x6d782e7865646e49; *(int2 *)(puVar3 + 1) = 0x6c; my_error(0x16,4,param_2,local_248); } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return lVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
63,273
set_prealloc_root
eloqsql/mysys/my_alloc.c
void set_prealloc_root(MEM_ROOT *root, char *ptr) { USED_MEM *next; for (next=root->used; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } for (next=root->free ; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } }
O0
c
set_prealloc_root: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x694f8 movq -0x18(%rbp), %rax cmpq -0x10(%rbp), %rax ja 0x694e9 movq -0x18(%rbp), %rax movq -0x18(%rbp), %rcx addq 0x10(%rcx), %rax cmpq -0x10(%rbp), %rax jbe 0x694e9 movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) jmp 0x69543 jmp 0x694eb movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0x694b8 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x69543 movq -0x18(%rbp), %rax cmpq -0x10(%rbp), %rax ja 0x69534 movq -0x18(%rbp), %rax movq -0x18(%rbp), %rcx addq 0x10(%rcx), %rax cmpq -0x10(%rbp), %rax jbe 0x69534 movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) jmp 0x69543 jmp 0x69536 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0x69503 popq %rbp retq nopw %cs:(%rax,%rax)
set_prealloc_root: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax loc_694B8: cmp [rbp+var_18], 0 jz short loc_694F8 mov rax, [rbp+var_18] cmp rax, [rbp+var_10] ja short loc_694E9 mov rax, [rbp+var_18] mov rcx, [rbp+var_18] add rax, [rcx+10h] cmp rax, [rbp+var_10] jbe short loc_694E9 mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+10h], rcx jmp short loc_69543 loc_694E9: jmp short $+2 loc_694EB: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax jmp short loc_694B8 loc_694F8: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax loc_69503: cmp [rbp+var_18], 0 jz short loc_69543 mov rax, [rbp+var_18] cmp rax, [rbp+var_10] ja short loc_69534 mov rax, [rbp+var_18] mov rcx, [rbp+var_18] add rax, [rcx+10h] cmp rax, [rbp+var_10] jbe short loc_69534 mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+10h], rcx jmp short loc_69543 loc_69534: jmp short $+2 loc_69536: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax jmp short loc_69503 loc_69543: pop rbp retn
_QWORD * set_prealloc_root(_QWORD *a1, unsigned long long a2) { _QWORD *result; // rax _QWORD *i; // [rsp+0h] [rbp-18h] _QWORD *j; // [rsp+0h] [rbp-18h] for ( i = (_QWORD *)a1[1]; i; i = (_QWORD *)*i ) { if ( (unsigned long long)i <= a2 && (unsigned long long)i + i[2] > a2 ) { result = a1; a1[2] = i; return result; } } result = (_QWORD *)*a1; for ( j = (_QWORD *)*a1; j; j = (_QWORD *)*j ) { if ( (unsigned long long)j <= a2 && (unsigned long long)j + j[2] > a2 ) { result = a1; a1[2] = j; return result; } result = (_QWORD *)*j; } return result; }
set_prealloc_root: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX LAB_001694b8: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001694f8 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x10] JA 0x001694e9 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RCX + 0x10] CMP RAX,qword ptr [RBP + -0x10] JBE 0x001694e9 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x00169543 LAB_001694e9: JMP 0x001694eb LAB_001694eb: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x001694b8 LAB_001694f8: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_00169503: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00169543 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x10] JA 0x00169534 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RCX + 0x10] CMP RAX,qword ptr [RBP + -0x10] JBE 0x00169534 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x00169543 LAB_00169534: JMP 0x00169536 LAB_00169536: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x00169503 LAB_00169543: POP RBP RET
void set_prealloc_root(int8 *param_1,int8 *param_2) { int8 *local_20; local_20 = (int8 *)param_1[1]; while( true ) { if (local_20 == (int8 *)0x0) { local_20 = (int8 *)*param_1; while( true ) { if (local_20 == (int8 *)0x0) { return; } if ((local_20 <= param_2) && (param_2 < (int8 *)((long)local_20 + local_20[2]))) break; local_20 = (int8 *)*local_20; } param_1[2] = local_20; return; } if ((local_20 <= param_2) && (param_2 < (int8 *)((long)local_20 + local_20[2]))) break; local_20 = (int8 *)*local_20; } param_1[2] = local_20; return; }
63,274
void mcp::logger::log_impl<char const (&) [36], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [36], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
hkr04[P]cpp-mcp/include/mcp_logger.h
void log_impl(std::stringstream& ss, T&& arg, Args&&... args) { ss << std::forward<T>(arg); log_impl(ss, std::forward<Args>(args)...); }
O1
c
void mcp::logger::log_impl<char const (&) [36], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [36], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 leaq 0x10(%rsi), %r15 movq %rdx, %rdi callq 0x8230 movq %r15, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x8630 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq %r15, %rdi popq %rbx popq %r14 popq %r15 jmp 0x8630 nop
_ZN3mcp6logger8log_implIRA30_KcJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvRNS5_18basic_stringstreamIcS8_S9_EEOT_DpOT0_: push r15 push r14 push rbx mov rbx, rcx mov r14, rdx lea r15, [rsi+10h] mov rdi, rdx call _strlen mov rdi, r15 mov rsi, r14 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, r15 pop rbx pop r14 pop r15 jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
long long mcp::logger::log_impl<char const(&)[30],std::string &>( long long a1, long long a2, long long a3, _QWORD *a4) { long long v6; // rax v6 = strlen(a3); std::__ostream_insert<char,std::char_traits<char>>(a2 + 16, a3, v6); return std::__ostream_insert<char,std::char_traits<char>>(a2 + 16, *a4, a4[1]); }
log_impl<char_const(&)[30],std::__cxx11::string&>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R14,RDX LEA R15,[RSI + 0x10] MOV RDI,RDX CALL 0x00108230 MOV RDI,R15 MOV RSI,R14 MOV RDX,RAX CALL 0x00108630 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RDI,R15 POP RBX POP R14 POP R15 JMP 0x00108630
/* void mcp::logger::log_impl<char const (&) [30], std::__cxx11::string&>(std::__cxx11::stringstream&, char const (&) [30], std::__cxx11::string&) */ void __thiscall mcp::logger::log_impl<char_const(&)[30],std::__cxx11::string&> (logger *this,stringstream *param_1,char *param_2,string *param_3) { size_t sVar1; sVar1 = strlen(param_2); std::__ostream_insert<char,std::char_traits<char>>((ostream *)(param_1 + 0x10),param_2,sVar1); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(param_1 + 0x10),*(char **)param_3,*(long *)(param_3 + 8)); return; }
63,275
my_strnncoll_latin1_de
eloqsql/strings/ctype-latin1.c
static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool b_is_prefix) { const uchar *a_end= a + a_length; const uchar *b_end= b + b_length; uchar a_char, a_extend= 0, b_char, b_extend= 0; while ((a < a_end || a_extend) && (b < b_end || b_extend)) { if (a_extend) { a_char=a_extend; a_extend=0; } else { a_extend=combo2map[*a]; a_char=combo1map[*a++]; } if (b_extend) { b_char=b_extend; b_extend=0; } else { b_extend=combo2map[*b]; b_char=combo1map[*b++]; } if (a_char != b_char) return (int) a_char - (int) b_char; } /* A simple test of string lengths won't work -- we test to see which string ran out first */ return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) : (b < b_end || b_extend) ? -1 : 0); }
O3
c
my_strnncoll_latin1_de: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx addq %rsi, %rdx addq %rcx, %r8 xorl %r10d, %r10d leaq 0x16f128(%rip), %rax # 0x1da4d0 leaq 0x16f021(%rip), %rdi # 0x1da3d0 xorl %r11d, %r11d cmpq %r8, %rcx setb %r14b testb %r11b, %r11b setne %bl orb %r14b, %bl cmpq %rdx, %rsi jb 0x6b3cc testb %r10b, %r10b je 0x6b416 testb %bl, %bl je 0x6b41d testb %r10b, %r10b je 0x6b3dd movl %r10d, %ebx xorl %r10d, %r10d jmp 0x6b3ea movzbl (%rsi), %ebx movb (%rbx,%rax), %r10b incq %rsi movb (%rbx,%rdi), %bl testb %r11b, %r11b je 0x6b3f7 movl %r11d, %r14d xorl %r11d, %r11d jmp 0x6b406 movzbl (%rcx), %r14d movb (%r14,%rax), %r11b incq %rcx movb (%r14,%rdi), %r14b cmpb %r14b, %bl je 0x6b3b2 movzbl %r14b, %ecx movzbl %bl, %eax subl %ecx, %eax jmp 0x6b425 movzbl %bl, %eax negl %eax jmp 0x6b425 xorl %eax, %eax testb %r9b, %r9b sete %al popq %rbx popq %r14 popq %rbp retq
my_strnncoll_latin1_de: push rbp mov rbp, rsp push r14 push rbx add rdx, rsi add r8, rcx xor r10d, r10d lea rax, combo2map lea rdi, combo1map xor r11d, r11d loc_6B3B2: cmp rcx, r8 setb r14b test r11b, r11b setnz bl or bl, r14b cmp rsi, rdx jb short loc_6B3CC test r10b, r10b jz short loc_6B416 loc_6B3CC: test bl, bl jz short loc_6B41D test r10b, r10b jz short loc_6B3DD mov ebx, r10d xor r10d, r10d jmp short loc_6B3EA loc_6B3DD: movzx ebx, byte ptr [rsi] mov r10b, [rbx+rax] inc rsi mov bl, [rbx+rdi] loc_6B3EA: test r11b, r11b jz short loc_6B3F7 mov r14d, r11d xor r11d, r11d jmp short loc_6B406 loc_6B3F7: movzx r14d, byte ptr [rcx] mov r11b, [r14+rax] inc rcx mov r14b, [r14+rdi] loc_6B406: cmp bl, r14b jz short loc_6B3B2 movzx ecx, r14b movzx eax, bl sub eax, ecx jmp short loc_6B425 loc_6B416: movzx eax, bl neg eax jmp short loc_6B425 loc_6B41D: xor eax, eax test r9b, r9b setz al loc_6B425: pop rbx pop r14 pop rbp retn
long long my_strnncoll_latin1_de( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, char a6) { unsigned __int8 *v6; // rdx unsigned __int8 *v7; // r8 unsigned __int8 v8; // r10 unsigned __int8 v9; // r11 bool v10; // bl unsigned __int8 v11; // bl long long v12; // rbx unsigned __int8 v13; // r14 long long v14; // r14 v6 = &a2[a3]; v7 = &a4[a5]; v8 = 0; v9 = 0; while ( 1 ) { v10 = a4 < v7 || v9 != 0; if ( a2 >= v6 && !v8 ) return (unsigned int)-v10; if ( !v10 ) break; if ( v8 ) { v11 = v8; v8 = 0; } else { v12 = *a2; v8 = combo2map[v12]; ++a2; v11 = combo1map[v12]; } if ( v9 ) { v13 = v9; v9 = 0; } else { v14 = *a4; v9 = combo2map[v14]; ++a4; v13 = combo1map[v14]; } if ( v11 != v13 ) return v11 - (unsigned int)v13; } return a6 == 0; }
my_strnncoll_latin1_de: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX ADD RDX,RSI ADD R8,RCX XOR R10D,R10D LEA RAX,[0x2da4d0] LEA RDI,[0x2da3d0] XOR R11D,R11D LAB_0016b3b2: CMP RCX,R8 SETC R14B TEST R11B,R11B SETNZ BL OR BL,R14B CMP RSI,RDX JC 0x0016b3cc TEST R10B,R10B JZ 0x0016b416 LAB_0016b3cc: TEST BL,BL JZ 0x0016b41d TEST R10B,R10B JZ 0x0016b3dd MOV EBX,R10D XOR R10D,R10D JMP 0x0016b3ea LAB_0016b3dd: MOVZX EBX,byte ptr [RSI] MOV R10B,byte ptr [RBX + RAX*0x1] INC RSI MOV BL,byte ptr [RBX + RDI*0x1] LAB_0016b3ea: TEST R11B,R11B JZ 0x0016b3f7 MOV R14D,R11D XOR R11D,R11D JMP 0x0016b406 LAB_0016b3f7: MOVZX R14D,byte ptr [RCX] MOV R11B,byte ptr [R14 + RAX*0x1] INC RCX MOV R14B,byte ptr [R14 + RDI*0x1] LAB_0016b406: CMP BL,R14B JZ 0x0016b3b2 MOVZX ECX,R14B MOVZX EAX,BL SUB EAX,ECX JMP 0x0016b425 LAB_0016b416: MOVZX EAX,BL NEG EAX JMP 0x0016b425 LAB_0016b41d: XOR EAX,EAX TEST R9B,R9B SETZ AL LAB_0016b425: POP RBX POP R14 POP RBP RET
uint my_strnncoll_latin1_de (int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5, char param_6) { byte *pbVar1; byte bVar2; byte *pbVar3; byte bVar4; byte bVar5; byte bVar6; pbVar1 = param_2 + param_3; pbVar3 = param_4 + param_5; bVar4 = 0; bVar5 = 0; do { if ((pbVar1 <= param_2) && (bVar4 == 0)) { return -(uint)(bVar5 != 0 || param_4 < pbVar3); } if (bVar5 == 0 && param_4 >= pbVar3) { return (uint)(param_6 == '\0'); } if (bVar4 == 0) { bVar2 = *param_2; bVar4 = combo2map[bVar2]; param_2 = param_2 + 1; bVar2 = combo1map[bVar2]; } else { bVar2 = bVar4; bVar4 = 0; } if (bVar5 == 0) { bVar6 = *param_4; bVar5 = combo2map[bVar6]; param_4 = param_4 + 1; bVar6 = combo1map[bVar6]; } else { bVar6 = bVar5; bVar5 = 0; } } while (bVar2 == bVar6); return (uint)bVar2 - (uint)bVar6; }
63,276
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) { std::vector<std::string> rules; for (size_t i = 0; i < alt_schemas.size(); i++) { rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i))); } return string_join(rules, " | "); }
O0
cpp
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0x130(%rsp) movq %rsi, 0x128(%rsp) movq %rdx, 0x120(%rsp) movq %rcx, 0x118(%rsp) movq 0x128(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x100(%rsp), %rdi callq 0x6cd90 movq $0x0, 0xf8(%rsp) movq 0xf8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x118(%rsp), %rdi callq 0xe8910 movq %rax, %rcx movq 0x20(%rsp), %rax cmpq %rcx, %rax jae 0x1bacc2 movq 0x118(%rsp), %rdi movq 0xf8(%rsp), %rsi callq 0x1bf3e0 movq %rax, 0x10(%rsp) movq 0x120(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x5e500 movq 0x18(%rsp), %rsi movb %al, %cl leaq 0x69978(%rip), %rax # 0x2244c7 leaq 0x6137b(%rip), %rdx # 0x21bed1 testb %cl, %cl cmovneq %rax, %rdx leaq 0x98(%rsp), %rdi callq 0x785d0 jmp 0x1bab6b movq 0xf8(%rsp), %rsi leaq 0x68(%rsp), %rdi callq 0xe8010 jmp 0x1bab7f leaq 0xb8(%rsp), %rdi leaq 0x98(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0xc7d00 jmp 0x1bab9b movq 0x10(%rsp), %rdx movq 0x38(%rsp), %rsi leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rcx callq 0x1b7230 jmp 0x1babbc leaq 0x100(%rsp), %rdi leaq 0xd8(%rsp), %rsi callq 0x1086d0 jmp 0x1babd3 leaq 0xd8(%rsp), %rdi callq 0x5f5d8 leaq 0xb8(%rsp), %rdi callq 0x5f5d8 leaq 0x68(%rsp), %rdi callq 0x5f5d8 leaq 0x98(%rsp), %rdi callq 0x5f5d8 movq 0xf8(%rsp), %rax addq $0x1, %rax movq %rax, 0xf8(%rsp) jmp 0x1baaea movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1bad6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1bacb0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1baca6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1bac99 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0xd8(%rsp), %rdi callq 0x5f5d8 leaq 0xb8(%rsp), %rdi callq 0x5f5d8 leaq 0x68(%rsp), %rdi callq 0x5f5d8 leaq 0x98(%rsp), %rdi callq 0x5f5d8 jmp 0x1bad6e leaq 0x47(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x5f150 movq 0x8(%rsp), %rdx leaq 0x699a1(%rip), %rsi # 0x22467e leaq 0x48(%rsp), %rdi callq 0x6b630 jmp 0x1bace9 movq 0x28(%rsp), %rdi leaq 0x100(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0xfd760 jmp 0x1bad02 leaq 0x48(%rsp), %rdi callq 0x5f5d8 leaq 0x47(%rsp), %rdi callq 0x5f5b0 leaq 0x100(%rsp), %rdi callq 0x699d0 movq 0x30(%rsp), %rax addq $0x138, %rsp # imm = 0x138 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1bad64 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x48(%rsp), %rdi callq 0x5f5d8 leaq 0x47(%rsp), %rdi callq 0x5f5b0 leaq 0x100(%rsp), %rdi callq 0x699d0 movq 0x90(%rsp), %rdi callq 0x5ebf0 nopl (%rax,%rax)
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE: sub rsp, 138h mov [rsp+138h+var_110], rdi mov rax, rdi mov [rsp+138h+var_108], rax mov [rsp+138h+var_8], rdi mov [rsp+138h+var_10], rsi mov [rsp+138h+var_18], rdx mov [rsp+138h+var_20], rcx mov rax, [rsp+138h+var_10] mov [rsp+138h+var_100], rax lea rdi, [rsp+138h+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov [rsp+138h+var_40], 0 loc_1BAAEA: mov rax, [rsp+138h+var_40] mov [rsp+138h+var_118], rax mov rdi, [rsp+138h+var_20] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_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>>::size(void) mov rcx, rax mov rax, [rsp+138h+var_118] cmp rax, rcx jnb loc_1BACC2 mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_40] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; 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>>::operator[](ulong) mov qword ptr [rsp+138h+var_128], rax; int mov rdi, [rsp+138h+var_18] mov [rsp+138h+var_120], rdi; __int64 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) mov rsi, [rsp+138h+var_120]; int mov cl, al; int lea rax, aAlternative; "alternative-" lea rdx, asc_21BED0+1; "-" test cl, cl cmovnz rdx, rax; int lea rdi, [rsp+138h+var_A0]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_1BAB6B: mov rsi, [rsp+138h+var_40]; unsigned __int64 lea rdi, [rsp+138h+var_D0]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_1BAB7F: lea rdi, [rsp+138h+var_80] lea rsi, [rsp+138h+var_A0] lea rdx, [rsp+138h+var_D0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_1BAB9B: mov rdx, qword ptr [rsp+138h+var_128] mov rsi, [rsp+138h+var_100] lea rdi, [rsp+138h+var_60] lea rcx, [rsp+138h+var_80] call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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&,std::string const&) jmp short $+2 loc_1BABBC: lea rdi, [rsp+138h+var_38] lea rsi, [rsp+138h+var_60] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) jmp short $+2 loc_1BABD3: lea rdi, [rsp+138h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+138h+var_40] add rax, 1 mov [rsp+138h+var_40], rax jmp loc_1BAAEA mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp loc_1BAD6E mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1BACB0 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1BACA6 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1BAC99 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1BAC99: lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1BACA6: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1BACB0: lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_1BAD6E loc_1BACC2: lea rdi, [rsp+138h+var_F1] mov [rsp+138h+var_130], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+138h+var_130] lea rsi, asc_22467D+1; " | " lea rdi, [rsp+138h+var_F0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1BACE9: mov rdi, [rsp+138h+var_110] lea rsi, [rsp+138h+var_38] lea rdx, [rsp+138h+var_F0] call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) jmp short $+2 loc_1BAD02: lea rdi, [rsp+138h+var_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_F1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+138h+var_38]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, [rsp+138h+var_108] add rsp, 138h retn mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1BAD64 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1BAD64: lea rdi, [rsp+arg_3F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_1BAD6E: lea rdi, [rsp+arg_F8]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rsp+arg_88] call __Unwind_Resume
long long SchemaConverter::_generate_union_rule(long long a1, _BYTE *a2, long long a3, _QWORD *a4) { char v4; // al char *v5; // rdx long long v6; // rdx long long v7; // rcx long long v8; // r8 long long v9; // r9 long long v11; // [rsp+10h] [rbp-128h] long long v12; // [rsp+18h] [rbp-120h] unsigned long long v13; // [rsp+20h] [rbp-118h] long long v14; // [rsp+38h] [rbp-100h] char v15; // [rsp+47h] [rbp-F1h] BYREF _BYTE v16[32]; // [rsp+48h] [rbp-F0h] BYREF _BYTE v17[48]; // [rsp+68h] [rbp-D0h] BYREF int v18[8]; // [rsp+98h] [rbp-A0h] BYREF _BYTE v19[32]; // [rsp+B8h] [rbp-80h] BYREF _BYTE v20[32]; // [rsp+D8h] [rbp-60h] BYREF unsigned long long i; // [rsp+F8h] [rbp-40h] long long v22[3]; // [rsp+100h] [rbp-38h] BYREF _QWORD *v23; // [rsp+118h] [rbp-20h] long long v24; // [rsp+120h] [rbp-18h] _BYTE *v25; // [rsp+128h] [rbp-10h] long long v26; // [rsp+130h] [rbp-8h] v26 = a1; v25 = a2; v24 = a3; v23 = a4; v14 = (long long)a2; std::vector<std::string>::vector((long long)v22); for ( i = 0LL; ; ++i ) { v13 = i; if ( v13 >= 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>>::size(v23) ) break; v11 = 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>>::operator[]( v23, i); v12 = v24; v4 = std::string::empty(v24); v5 = "-"; if ( v4 ) v5 = "alternative-"; std::operator+<char>((long long)v18, v12, (long long)v5); std::to_string((std::__cxx11 *)v17, i); std::operator+<char>((long long)v19, (long long)v18, (long long)v17); SchemaConverter::visit((long long)v20, v14, v11, (long long)v19); a2 = v20; std::vector<std::string>::push_back((long long)v22, (long long)v20, v6, v7, v8, v9); std::string::~string(v20); std::string::~string(v19); std::string::~string(v17); std::string::~string(v18); } std::allocator<char>::allocator(&v15, a2); std::string::basic_string<std::allocator<char>>((long long)v16, (long long)" | ", (long long)&v15); string_join(a1, v22, (long long)v16); std::string::~string(v16); std::allocator<char>::~allocator(&v15); std::vector<std::string>::~vector(v22); return a1; }
63,277
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) { std::vector<std::string> rules; for (size_t i = 0; i < alt_schemas.size(); i++) { rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i))); } return string_join(rules, " | "); }
O2
cpp
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rcx, %r14 movq %rdx, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdi, 0x8(%rsp) xorps %xmm0, %xmm0 leaq 0x20(%rsp), %rax movaps %xmm0, (%rax) andq $0x0, 0x10(%rax) xorl %r13d, %r13d xorl %ebp, %ebp movq (%r14), %rbx movq 0x8(%r14), %rax subq %rbx, %rax sarq $0x4, %rax cmpq %rax, %rbp jae 0x949e9 movq 0x18(%rsp), %rsi cmpq $0x0, 0x8(%rsi) leaq 0x2106d(%rip), %rdx # 0xb59c1 leaq 0x29178(%rip), %rax # 0xbdad3 cmoveq %rax, %rdx leaq 0x58(%rsp), %rdi callq 0x2dc8a leaq 0x78(%rsp), %r12 movq %r12, %rdi movq %rbp, %rsi callq 0x52081 leaq 0x98(%rsp), %r15 movq %r15, %rdi leaq 0x58(%rsp), %rsi movq %r12, %rdx callq 0x49fc3 addq %r13, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi movq 0x10(%rsp), %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x92a88 leaq 0x20(%rsp), %rdi movq %r12, %rsi callq 0x4b314 movq %r12, %rdi callq 0x25258 movq %r15, %rdi callq 0x25258 leaq 0x78(%rsp), %rdi callq 0x25258 leaq 0x58(%rsp), %rdi callq 0x25258 incq %rbp addq $0x10, %r13 jmp 0x9492c leaq 0x2929a(%rip), %rsi # 0xbdc8a leaq 0x38(%rsp), %rdi leaq 0x98(%rsp), %rdx callq 0x2a75e leaq 0x20(%rsp), %rsi leaq 0x38(%rsp), %rdx movq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x588b6 leaq 0x38(%rsp), %rdi callq 0x25258 leaq 0x20(%rsp), %rdi callq 0x29c48 movq %rbx, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x38(%rsp), %rdi jmp 0x94a86 jmp 0x94a8d movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x25258 jmp 0x94a60 movq %rax, %rbx leaq 0x98(%rsp), %rdi callq 0x25258 jmp 0x94a77 movq %rax, %rbx jmp 0x94a81 movq %rax, %rbx leaq 0x78(%rsp), %rdi callq 0x25258 leaq 0x58(%rsp), %rdi callq 0x25258 jmp 0x94a90 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x29c48 movq %rbx, %rdi callq 0x24fe0
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rcx mov [rsp+0E8h+var_D0], rdx mov [rsp+0E8h+var_D8], rsi mov [rsp+0E8h+var_E0], rdi xorps xmm0, xmm0 lea rax, [rsp+0E8h+var_C8] movaps xmmword ptr [rax], xmm0 and qword ptr [rax+10h], 0 xor r13d, r13d xor ebp, ebp loc_9492C: mov rbx, [r14] mov rax, [r14+8] sub rax, rbx sar rax, 4 cmp rbp, rax jnb loc_949E9 mov rsi, [rsp+0E8h+var_D0] cmp qword ptr [rsi+8], 0 lea rdx, asc_B59C0+1; "-" lea rax, aAlternative; "alternative-" cmovz rdx, rax lea rdi, [rsp+0E8h+var_90] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea r12, [rsp+0E8h+var_70] mov rdi, r12; this mov rsi, rbp; unsigned __int64 call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea r15, [rsp+0E8h+var_50] mov rdi, r15 lea rsi, [rsp+0E8h+var_90] mov rdx, r12 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) add rbx, r13 lea r12, [rsp+0E8h+var_B0] mov rdi, r12 mov rsi, [rsp+0E8h+var_D8] mov rdx, rbx mov rcx, r15 call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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&,std::string const&) lea rdi, [rsp+0E8h+var_C8] mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc rbp add r13, 10h jmp loc_9492C loc_949E9: lea rsi, asc_BDC89+1; " | " lea rdi, [rsp+0E8h+var_B0] lea rdx, [rsp+0E8h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+0E8h+var_C8] lea rdx, [rsp+0E8h+var_B0] mov rbx, [rsp+0E8h+var_E0] mov rdi, rbx call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) lea rdi, [rsp+0E8h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_C8]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_30] jmp short loc_94A86 jmp short loc_94A8D mov rbx, rax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_94A60 mov rbx, rax loc_94A60: lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_94A77 mov rbx, rax jmp short loc_94A81 mov rbx, rax loc_94A77: lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_94A81: lea rdi, [rsp+arg_50]; void * loc_94A86: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_94A90 loc_94A8D: mov rbx, rax loc_94A90: lea rdi, [rsp+arg_18]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4) { long long v5; // r13 unsigned long long i; // rbp long long v7; // rbx char *v8; // rdx __int128 v11; // [rsp+20h] [rbp-C8h] BYREF long long v12; // [rsp+30h] [rbp-B8h] _QWORD v13[4]; // [rsp+38h] [rbp-B0h] BYREF _QWORD v14[4]; // [rsp+58h] [rbp-90h] BYREF _QWORD v15[4]; // [rsp+78h] [rbp-70h] BYREF _BYTE v16[80]; // [rsp+98h] [rbp-50h] BYREF v11 = 0LL; v12 = 0LL; v5 = 0LL; for ( i = 0LL; ; ++i ) { v7 = *a4; if ( i >= (a4[1] - *a4) >> 4 ) break; v8 = "-"; if ( !*(_QWORD *)(a3 + 8) ) v8 = "alternative-"; std::operator+<char>((long long)v14, a3, (long long)v8); std::to_string((std::__cxx11 *)v15, i); std::operator+<char>((long long)v16, v14, v15); SchemaConverter::visit(v13, a2, (unsigned __int8 *)(v5 + v7), (long long)v16, (__m128d)0LL); std::vector<std::string>::emplace_back<std::string>((long long)&v11, (long long)v13); std::string::~string(v13); std::string::~string(v16); std::string::~string(v15); std::string::~string(v14); v5 += 16LL; } std::string::basic_string<std::allocator<char>>(v13, (long long)" | "); string_join(a1, (long long *)&v11, (long long)v13); std::string::~string(v13); std::vector<std::string>::~vector((void **)&v11); return a1; }
_generate_union_rule: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RCX MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDI XORPS XMM0,XMM0 LEA RAX,[RSP + 0x20] MOVAPS xmmword ptr [RAX],XMM0 AND qword ptr [RAX + 0x10],0x0 XOR R13D,R13D XOR EBP,EBP LAB_0019492c: MOV RBX,qword ptr [R14] MOV RAX,qword ptr [R14 + 0x8] SUB RAX,RBX SAR RAX,0x4 CMP RBP,RAX JNC 0x001949e9 MOV RSI,qword ptr [RSP + 0x18] CMP qword ptr [RSI + 0x8],0x0 LEA RDX,[0x1b59c1] LEA RAX,[0x1bdad3] CMOVZ RDX,RAX LAB_0019495f: LEA RDI,[RSP + 0x58] CALL 0x0012dc8a LAB_00194969: LEA R12,[RSP + 0x78] MOV RDI,R12 MOV RSI,RBP CALL 0x00152081 LAB_00194979: LEA R15,[RSP + 0x98] MOV RDI,R15 LEA RSI,[RSP + 0x58] MOV RDX,R12 CALL 0x00149fc3 LAB_00194991: ADD RBX,R13 LEA R12,[RSP + 0x38] MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBX MOV RCX,R15 CALL 0x00192a88 LAB_001949ac: LEA RDI,[RSP + 0x20] MOV RSI,R12 CALL 0x0014b314 MOV RDI,R12 CALL 0x00125258 MOV RDI,R15 CALL 0x00125258 LEA RDI,[RSP + 0x78] CALL 0x00125258 LEA RDI,[RSP + 0x58] CALL 0x00125258 INC RBP ADD R13,0x10 JMP 0x0019492c LAB_001949e9: LEA RSI,[0x1bdc8a] LEA RDI,[RSP + 0x38] LEA RDX,[RSP + 0x98] CALL 0x0012a75e LAB_00194a02: LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0x38] MOV RBX,qword ptr [RSP + 0x8] MOV RDI,RBX CALL 0x001588b6 LAB_00194a19: LEA RDI,[RSP + 0x38] CALL 0x00125258 LEA RDI,[RSP + 0x20] CALL 0x00129c48 MOV RAX,RBX ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&, 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> > > const&) */ string * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2) { long *in_RCX; char *in_RDX; ulong uVar1; int8 local_c8; int8 uStack_c0; int8 local_b8; string local_b0 [32]; string local_90 [32]; __cxx11 local_70 [32]; string local_50 [32]; local_c8 = 0; uStack_c0 = 0; local_b8 = 0; for (uVar1 = 0; uVar1 < (ulong)(in_RCX[1] - *in_RCX >> 4); uVar1 = uVar1 + 1) { /* try { // try from 0019495f to 00194968 has its CatchHandler @ 00194a8d */ std::operator+(local_90,in_RDX); /* try { // try from 00194969 to 00194978 has its CatchHandler @ 00194a6f */ std::__cxx11::to_string(local_70,uVar1); /* try { // try from 00194979 to 00194990 has its CatchHandler @ 00194a74 */ std::operator+(local_50,local_90); /* try { // try from 00194991 to 001949ab has its CatchHandler @ 00194a5d */ visit(local_b0,(string *)param_2); /* try { // try from 001949ac to 001949b8 has its CatchHandler @ 00194a4e */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8, local_b0); std::__cxx11::string::~string(local_b0); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)local_70); std::__cxx11::string::~string(local_90); } /* try { // try from 001949e9 to 00194a01 has its CatchHandler @ 00194a4c */ std::__cxx11::string::string<std::allocator<char>>(local_b0," | ",(allocator *)local_50); /* try { // try from 00194a02 to 00194a18 has its CatchHandler @ 00194a42 */ string_join((vector *)param_1,(string *)&local_c8); std::__cxx11::string::~string(local_b0); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8); return param_1; }
63,278
Stats::takeDamage(float)
GhostEscape/src/raw/stats.cpp
void Stats::takeDamage(float damage) { if (is_invincible_) return; health_ -= damage; if (health_ < 0) { health_ = 0; is_alive_ = false; } is_invincible_ = true; invincible_timer_ = 0.0f; }
O0
cpp
Stats::takeDamage(float): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movss %xmm0, -0xc(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) testb $0x1, 0x79(%rax) je 0x1797d jmp 0x179bd movq -0x18(%rbp), %rax movss -0xc(%rbp), %xmm1 movss 0x58(%rax), %xmm0 subss %xmm1, %xmm0 movss %xmm0, 0x58(%rax) xorps %xmm0, %xmm0 ucomiss 0x58(%rax), %xmm0 jbe 0x179ad movq -0x18(%rbp), %rax xorps %xmm0, %xmm0 movss %xmm0, 0x58(%rax) movb $0x0, 0x78(%rax) movq -0x18(%rbp), %rax movb $0x1, 0x79(%rax) xorps %xmm0, %xmm0 movss %xmm0, 0x74(%rax) popq %rbp retq nop
_ZN5Stats10takeDamageEf: push rbp mov rbp, rsp mov [rbp+var_8], rdi movss [rbp+var_C], xmm0 mov rax, [rbp+var_8] mov [rbp+var_18], rax test byte ptr [rax+79h], 1 jz short loc_1797D jmp short loc_179BD loc_1797D: mov rax, [rbp+var_18] movss xmm1, [rbp+var_C] movss xmm0, dword ptr [rax+58h] subss xmm0, xmm1 movss dword ptr [rax+58h], xmm0 xorps xmm0, xmm0 ucomiss xmm0, dword ptr [rax+58h] jbe short loc_179AD mov rax, [rbp+var_18] xorps xmm0, xmm0 movss dword ptr [rax+58h], xmm0 mov byte ptr [rax+78h], 0 loc_179AD: mov rax, [rbp+var_18] mov byte ptr [rax+79h], 1 xorps xmm0, xmm0 movss dword ptr [rax+74h], xmm0 loc_179BD: pop rbp retn
Stats * Stats::takeDamage(Stats *this, float a2) { Stats *result; // rax result = this; if ( (*((_BYTE *)this + 121) & 1) == 0 ) { *((float *)this + 22) = *((float *)this + 22) - a2; if ( *((float *)this + 22) < 0.0 ) { *((_DWORD *)this + 22) = 0; *((_BYTE *)this + 120) = 0; } result = this; *((_BYTE *)this + 121) = 1; *((_DWORD *)this + 29) = 0; } return result; }
takeDamage: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOVSS dword ptr [RBP + -0xc],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX TEST byte ptr [RAX + 0x79],0x1 JZ 0x0011797d JMP 0x001179bd LAB_0011797d: MOV RAX,qword ptr [RBP + -0x18] MOVSS XMM1,dword ptr [RBP + -0xc] MOVSS XMM0,dword ptr [RAX + 0x58] SUBSS XMM0,XMM1 MOVSS dword ptr [RAX + 0x58],XMM0 XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RAX + 0x58] JBE 0x001179ad MOV RAX,qword ptr [RBP + -0x18] XORPS XMM0,XMM0 MOVSS dword ptr [RAX + 0x58],XMM0 MOV byte ptr [RAX + 0x78],0x0 LAB_001179ad: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x79],0x1 XORPS XMM0,XMM0 MOVSS dword ptr [RAX + 0x74],XMM0 LAB_001179bd: POP RBP RET
/* Stats::takeDamage(float) */ void __thiscall Stats::takeDamage(Stats *this,float param_1) { if (((byte)this[0x79] & 1) == 0) { *(float *)(this + 0x58) = *(float *)(this + 0x58) - param_1; if (*(float *)(this + 0x58) <= 0.0 && *(float *)(this + 0x58) != 0.0) { *(int4 *)(this + 0x58) = 0; this[0x78] = (Stats)0x0; } this[0x79] = (Stats)0x1; *(int4 *)(this + 0x74) = 0; } return; }
63,279
my_hash_delete
eloqsql/mysys/hash.c
my_bool my_hash_delete(HASH *hash, uchar *record) { uint pos2,idx,empty_index; my_hash_value_type pos_hashnr, lastpos_hashnr; size_t blength; HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; DBUG_ENTER("my_hash_delete"); if (!hash->records) DBUG_RETURN(1); blength=hash->blength; data=dynamic_element(&hash->array,0,HASH_LINK*); /* Search after record with key */ pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) DBUG_RETURN(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos[0]= empty[0]; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr= lastpos->hash_nr; /* pos is where lastpos should be */ pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr= pos->hash_nr; /* pos3 is where the pos should be */ pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1); if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: (void) pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); DBUG_RETURN(0); }
O0
c
my_hash_delete: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x2c699 jmp 0x2c690 movb $0x1, -0x1(%rbp) jmp 0x2ca12 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2ca20 movl %eax, %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x2bea0 movl %eax, %ecx movq -0x70(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq $0x0, -0x50(%rbp) movq -0x58(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax je 0x2c735 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax cmpl $-0x1, (%rax) jne 0x2c71e jmp 0x2c715 movb $0x1, -0x1(%rbp) jmp 0x2ca12 movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) jmp 0x2c6f4 movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rax addq $-0x1, %rax movq %rax, 0x18(%rcx) movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx shrq %rcx cmpq %rcx, %rax jae 0x2c764 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx shrq %rcx movq %rcx, 0x10(%rax) movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x24(%rbp) cmpq $0x0, -0x50(%rbp) je 0x2c7aa movq -0x58(%rbp), %rax movl (%rax), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) jmp 0x2c7e5 movq -0x58(%rbp), %rax cmpl $-0x1, (%rax) je 0x2c7e3 movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movl (%rcx), %ecx movl %ecx, -0x24(%rbp) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x58(%rbp), %rax movq -0x68(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x2c7e5 movq -0x68(%rbp), %rax cmpq -0x48(%rbp), %rax jne 0x2c7f4 jmp 0x2c9e6 movq -0x48(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x2c(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x2c(%rbp), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x2bea0 movl %eax, %ecx movq -0x78(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax cmpq -0x68(%rbp), %rax jne 0x2c856 movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x2c9e6 movq -0x58(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x28(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x28(%rbp), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x2bea0 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax cmpq -0x60(%rbp), %rax je 0x2c8fc movq -0x68(%rbp), %rax movq -0x58(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x58(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x24(%rbp), %ecx callq 0x2c630 jmp 0x2c9e6 movl -0x2c(%rbp), %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx addq $0x1, %rdx callq 0x2bea0 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x84(%rbp) movl -0x28(%rbp), %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx addq $0x1, %rdx callq 0x2bea0 movl %eax, %ecx movl -0x84(%rbp), %eax cmpl %ecx, %eax jne 0x2c9ab movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax je 0x2c997 movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x24(%rbp), %ecx callq 0x2c630 jmp 0x2c9e6 movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x20(%rbp) jmp 0x2c9b2 movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movq -0x58(%rbp), %rax movl (%rax), %ecx callq 0x2c630 movl -0x24(%rbp), %ecx movq -0x58(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rdi addq $0x28, %rdi callq 0x30760 movq -0x10(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x2ca0c movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax jmp 0x2ca0e movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x90, %rsp popq %rbp retq nop
my_hash_delete: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jnz short loc_2C699 jmp short $+2 loc_2C690: mov [rbp+var_1], 1 jmp loc_2CA12 loc_2C699: mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_70], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rec_hashnr mov edi, eax mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_70] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov [rbp+var_50], 0 loc_2C6F4: mov rax, [rbp+var_58] mov rax, [rax+8] cmp rax, [rbp+var_18] jz short loc_2C735 mov rax, [rbp+var_58] mov [rbp+var_50], rax mov rax, [rbp+var_58] cmp dword ptr [rax], 0FFFFFFFFh jnz short loc_2C71E jmp short $+2 loc_2C715: mov [rbp+var_1], 1 jmp loc_2CA12 loc_2C71E: mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov [rbp+var_58], rax jmp short loc_2C6F4 loc_2C735: mov rcx, [rbp+var_10] mov rax, [rcx+18h] add rax, 0FFFFFFFFFFFFFFFFh mov [rcx+18h], rax mov rcx, [rbp+var_10] mov rcx, [rcx+10h] shr rcx, 1 cmp rax, rcx jnb short loc_2C764 mov rax, [rbp+var_10] mov rcx, [rax+10h] shr rcx, 1 mov [rax+10h], rcx loc_2C764: mov rax, [rbp+var_40] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] shl rcx, 4 add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_58] mov [rbp+var_68], rax mov rax, [rbp+var_68] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov [rbp+var_24], eax cmp [rbp+var_50], 0 jz short loc_2C7AA mov rax, [rbp+var_58] mov ecx, [rax] mov rax, [rbp+var_50] mov [rax], ecx jmp short loc_2C7E5 loc_2C7AA: mov rax, [rbp+var_58] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_2C7E3 mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov ecx, [rcx] mov [rbp+var_24], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_58] mov rcx, [rbp+var_68] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx loc_2C7E3: jmp short $+2 loc_2C7E5: mov rax, [rbp+var_68] cmp rax, [rbp+var_48] jnz short loc_2C7F4 jmp loc_2C9E6 loc_2C7F4: mov rax, [rbp+var_48] mov eax, [rax+4] mov [rbp+var_2C], eax mov rax, [rbp+var_40] mov [rbp+var_78], rax mov edi, [rbp+var_2C] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_78] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_58] cmp rax, [rbp+var_68] jnz short loc_2C856 mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx jmp loc_2C9E6 loc_2C856: mov rax, [rbp+var_58] mov eax, [rax+4] mov [rbp+var_28], eax mov rax, [rbp+var_40] mov [rbp+var_80], rax mov edi, [rbp+var_28] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_80] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_58] cmp rax, [rbp+var_60] jz short loc_2C8FC mov rax, [rbp+var_68] mov rcx, [rbp+var_58] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rax, [rbp+var_58] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_60] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_24] call movelink jmp loc_2C9E6 loc_2C8FC: mov edi, [rbp+var_2C] mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] add rdx, 1 call my_hash_mask mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov [rbp+var_84], eax mov edi, [rbp+var_28] mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] add rdx, 1 call my_hash_mask mov ecx, eax mov eax, [rbp+var_84] cmp eax, ecx jnz short loc_2C9AB mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jz short loc_2C997 mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov rax, [rbp+var_48] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_24] call movelink jmp short loc_2C9E6 loc_2C997: mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov [rbp+var_20], eax jmp short loc_2C9B2 loc_2C9AB: mov [rbp+var_20], 0FFFFFFFFh loc_2C9B2: mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov esi, [rbp+var_20] mov edx, [rbp+var_24] mov rax, [rbp+var_58] mov ecx, [rax] call movelink mov ecx, [rbp+var_24] mov rax, [rbp+var_58] mov [rax], ecx loc_2C9E6: mov rdi, [rbp+var_10] add rdi, 28h ; '(' call pop_dynamic mov rax, [rbp+var_10] cmp qword ptr [rax+60h], 0 jz short loc_2CA0C mov rax, [rbp+var_10] mov rax, [rax+60h] mov rdi, [rbp+var_18] call rax loc_2CA0C: jmp short $+2 loc_2CA0E: mov [rbp+var_1], 0 loc_2CA12: mov al, [rbp+var_1] add rsp, 90h pop rbp retn
char my_hash_delete(long long a1, long long a2) { unsigned int v2; // eax unsigned long long v3; // rax _QWORD *v5; // [rsp+28h] [rbp-68h] long long v6; // [rsp+30h] [rbp-60h] unsigned int *v7; // [rsp+38h] [rbp-58h] long long v8; // [rsp+38h] [rbp-58h] _DWORD *v9; // [rsp+40h] [rbp-50h] long long v10; // [rsp+48h] [rbp-48h] long long v11; // [rsp+50h] [rbp-40h] unsigned long long v12; // [rsp+58h] [rbp-38h] unsigned int v13; // [rsp+64h] [rbp-2Ch] unsigned int v14; // [rsp+68h] [rbp-28h] unsigned int v15; // [rsp+6Ch] [rbp-24h] int v16; // [rsp+70h] [rbp-20h] int v17; // [rsp+74h] [rbp-1Ch] if ( !*(_QWORD *)(a1 + 24) ) return 1; v12 = *(_QWORD *)(a1 + 16); v11 = *(_QWORD *)(a1 + 40); v2 = rec_hashnr(a1, a2); v7 = (unsigned int *)(16LL * (unsigned int)my_hash_mask(v2, v12, *(_QWORD *)(a1 + 24)) + v11); v9 = 0LL; while ( *((_QWORD *)v7 + 1) != a2 ) { v9 = v7; if ( *v7 == -1 ) return 1; v7 = (unsigned int *)(16LL * *v7 + v11); } v3 = *(_QWORD *)(a1 + 24) - 1LL; *(_QWORD *)(a1 + 24) = v3; if ( v3 < *(_QWORD *)(a1 + 16) >> 1 ) *(_QWORD *)(a1 + 16) >>= 1; v10 = 16LL * *(_QWORD *)(a1 + 24) + v11; v5 = v7; v15 = ((long long)v7 - v11) >> 4; if ( v9 ) { *v9 = *v7; } else if ( *v7 != -1 ) { v15 = *v7; v5 = (_QWORD *)(16LL * *v7 + v11); *(_QWORD *)v7 = *v5; *((_QWORD *)v7 + 1) = v5[1]; } if ( v5 != (_QWORD *)v10 ) { v13 = *(_DWORD *)(v10 + 4); v8 = 16LL * (unsigned int)my_hash_mask(v13, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11; if ( (_QWORD *)v8 == v5 ) { *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); } else { v14 = *(_DWORD *)(v8 + 4); v6 = 16LL * (unsigned int)my_hash_mask(v14, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11; if ( v8 == v6 ) { v17 = my_hash_mask(v13, v12, *(_QWORD *)(a1 + 24) + 1LL); if ( v17 == (unsigned int)my_hash_mask(v14, v12, *(_QWORD *)(a1 + 24) + 1LL) ) { if ( v17 != *(_QWORD *)(a1 + 24) ) { *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); movelink(v11, (v10 - v11) >> 4, (v8 - v11) >> 4, v15); goto LABEL_25; } v16 = (v8 - v11) >> 4; } else { v16 = -1; } *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); movelink(v11, v16, v15, *(_DWORD *)v8); *(_DWORD *)v8 = v15; goto LABEL_25; } *v5 = *(_QWORD *)v8; v5[1] = *(_QWORD *)(v8 + 8); *(_QWORD *)v8 = *(_QWORD *)v10; *(_QWORD *)(v8 + 8) = *(_QWORD *)(v10 + 8); movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v15); } } LABEL_25: pop_dynamic(a1 + 40); if ( *(_QWORD *)(a1 + 96) ) (*(void ( **)(long long))(a1 + 96))(a2); return 0; }
my_hash_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0012c699 JMP 0x0012c690 LAB_0012c690: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ca12 LAB_0012c699: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012ca20 MOV EDI,EAX MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012bea0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x50],0x0 LAB_0012c6f4: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JZ 0x0012c735 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] CMP dword ptr [RAX],-0x1 JNZ 0x0012c71e JMP 0x0012c715 LAB_0012c715: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ca12 LAB_0012c71e: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX JMP 0x0012c6f4 LAB_0012c735: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RCX + 0x18] ADD RAX,-0x1 MOV qword ptr [RCX + 0x18],RAX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] SHR RCX,0x1 CMP RAX,RCX JNC 0x0012c764 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] SHR RCX,0x1 MOV qword ptr [RAX + 0x10],RCX LAB_0012c764: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x24],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0012c7aa MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX JMP 0x0012c7e5 LAB_0012c7aa: MOV RAX,qword ptr [RBP + -0x58] CMP dword ptr [RAX],-0x1 JZ 0x0012c7e3 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RCX] MOV dword ptr [RBP + -0x24],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX LAB_0012c7e3: JMP 0x0012c7e5 LAB_0012c7e5: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x48] JNZ 0x0012c7f4 JMP 0x0012c9e6 LAB_0012c7f4: MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x78],RAX MOV EDI,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012bea0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x68] JNZ 0x0012c856 MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX JMP 0x0012c9e6 LAB_0012c856: MOV RAX,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x80],RAX MOV EDI,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012bea0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x60] JZ 0x0012c8fc MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x24] CALL 0x0012c630 JMP 0x0012c9e6 LAB_0012c8fc: MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] ADD RDX,0x1 CALL 0x0012bea0 MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x84],EAX MOV EDI,dword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] ADD RDX,0x1 CALL 0x0012bea0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x84] CMP EAX,ECX JNZ 0x0012c9ab MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JZ 0x0012c997 MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x24] CALL 0x0012c630 JMP 0x0012c9e6 LAB_0012c997: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x20],EAX JMP 0x0012c9b2 LAB_0012c9ab: MOV dword ptr [RBP + -0x20],0xffffffff LAB_0012c9b2: MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RAX] CALL 0x0012c630 MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX],ECX LAB_0012c9e6: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 CALL 0x00130760 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x60],0x0 JZ 0x0012ca0c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV RDI,qword ptr [RBP + -0x18] CALL RAX LAB_0012ca0c: JMP 0x0012ca0e LAB_0012ca0e: MOV byte ptr [RBP + -0x1],0x0 LAB_0012ca12: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x90 POP RBP RET
int1 my_hash_delete(long param_1,long param_2) { int8 uVar1; long lVar2; int4 uVar3; uint uVar4; uint uVar5; uint uVar6; ulong uVar7; uint *puVar8; uint *puVar9; uint *puVar10; uint *local_70; uint *local_60; uint *local_58; uint local_2c; int4 local_28; if (*(long *)(param_1 + 0x18) == 0) { return 1; } uVar1 = *(int8 *)(param_1 + 0x10); lVar2 = *(long *)(param_1 + 0x28); uVar3 = rec_hashnr(param_1,param_2); uVar4 = my_hash_mask(uVar3,uVar1,*(int8 *)(param_1 + 0x18)); local_58 = (uint *)0x0; while (local_60 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_60 + 2) != param_2) { local_58 = local_60; if (*local_60 == 0xffffffff) { return 1; } uVar4 = *local_60; } uVar7 = *(long *)(param_1 + 0x18) - 1; *(ulong *)(param_1 + 0x18) = uVar7; if (uVar7 < *(ulong *)(param_1 + 0x10) >> 1) { *(ulong *)(param_1 + 0x10) = *(ulong *)(param_1 + 0x10) >> 1; } puVar8 = (uint *)(lVar2 + *(long *)(param_1 + 0x18) * 0x10); local_70 = local_60; local_2c = (uint)((long)local_60 - lVar2 >> 4); if (local_58 == (uint *)0x0) { if (*local_60 != 0xffffffff) { local_2c = *local_60; local_70 = (uint *)(lVar2 + (ulong)local_2c * 0x10); *(int8 *)local_60 = *(int8 *)local_70; *(int8 *)(local_60 + 2) = *(int8 *)(local_70 + 2); } } else { *local_58 = *local_60; } if (local_70 != puVar8) { uVar4 = puVar8[1]; uVar5 = my_hash_mask(uVar4,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18)); puVar9 = (uint *)(lVar2 + (ulong)uVar5 * 0x10); if (puVar9 == local_70) { *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); } else { uVar5 = puVar9[1]; uVar6 = my_hash_mask(uVar5,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18)); puVar10 = (uint *)(lVar2 + (ulong)uVar6 * 0x10); if (puVar9 == puVar10) { uVar4 = my_hash_mask(uVar4,uVar1,*(long *)(param_1 + 0x18) + 1); uVar5 = my_hash_mask(uVar5,uVar1,*(long *)(param_1 + 0x18) + 1); if (uVar4 == uVar5) { if ((ulong)uVar4 != *(ulong *)(param_1 + 0x18)) { *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff, (long)puVar9 - lVar2 >> 4 & 0xffffffff,local_2c); goto LAB_0012c9e6; } local_28 = (int4)((long)puVar9 - lVar2 >> 4); } else { local_28 = 0xffffffff; } *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,local_28,local_2c,*puVar9); *puVar9 = local_2c; } else { *(int8 *)local_70 = *(int8 *)puVar9; *(int8 *)(local_70 + 2) = *(int8 *)(puVar9 + 2); *(int8 *)puVar9 = *(int8 *)puVar8; *(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff, (long)puVar10 - lVar2 >> 4 & 0xffffffff,local_2c); } } } LAB_0012c9e6: pop_dynamic(param_1 + 0x28); if (*(long *)(param_1 + 0x60) != 0) { (**(code **)(param_1 + 0x60))(param_2); } return 0; }
63,280
my_hash_delete
eloqsql/mysys/hash.c
my_bool my_hash_delete(HASH *hash, uchar *record) { uint pos2,idx,empty_index; my_hash_value_type pos_hashnr, lastpos_hashnr; size_t blength; HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; DBUG_ENTER("my_hash_delete"); if (!hash->records) DBUG_RETURN(1); blength=hash->blength; data=dynamic_element(&hash->array,0,HASH_LINK*); /* Search after record with key */ pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) DBUG_RETURN(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos[0]= empty[0]; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr= lastpos->hash_nr; /* pos is where lastpos should be */ pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr= pos->hash_nr; /* pos3 is where the pos should be */ pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1); if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: (void) pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); DBUG_RETURN(0); }
O3
c
my_hash_delete: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movb $0x1, %r15b cmpq $0x0, 0x18(%rdi) je 0x29a9e movq %rsi, %rbx movq %rdi, %r14 movq 0x10(%rdi), %rax movq %rax, -0x38(%rbp) movq 0x28(%rdi), %r13 movq 0x50(%rdi), %rax testq %rax, %rax je 0x2989f leaq -0x58(%rbp), %r12 movq %rbx, %rdi movq %r12, %rsi xorl %edx, %edx callq *%rax movq %rax, %rsi movq (%r12), %rdx jmp 0x298ad movq 0x8(%r14), %rdx movq %rdx, -0x58(%rbp) movq (%r14), %rsi addq %rbx, %rsi movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movq 0x68(%r14), %rdi callq *0x58(%r14) movq 0x18(%r14), %rcx movq -0x38(%rbp), %r9 leaq (%r9,%r12), %r10 movl %r10d, %edx andl %eax, %edx shrq %r9 decl %r9d andl %r9d, %eax cmpq %rcx, %rdx cmovbl %edx, %eax movq %rax, %rdx shlq $0x4, %rdx leaq (%rdx,%r13), %rsi cmpq %rbx, 0x8(%r13,%rdx) je 0x2990f movl (%rsi), %eax cmpq %r12, %rax je 0x29a9e movq %rsi, %rdx movq %rax, %rdi shlq $0x4, %rdi leaq (%rdi,%r13), %rsi cmpq %rbx, 0x8(%r13,%rdi) jne 0x298ed jmp 0x29911 xorl %edx, %edx decq %rcx movq %rcx, 0x18(%r14) movq 0x10(%r14), %rdi shrq %rdi cmpq %rdi, %rcx jae 0x29928 movq %rdi, 0x10(%r14) movq %rcx, %r8 shlq $0x4, %r8 addq %r13, %r8 movl (%rsi), %edi testq %rdx, %rdx je 0x2993d movl %edi, (%rdx) jmp 0x29958 cmpl $-0x1, %edi je 0x29958 movq %rdi, %rax shlq $0x4, %rax movups (%r13,%rax), %xmm0 movups %xmm0, (%rsi) leaq (%rax,%r13), %rsi movl %edi, %eax leaq 0x28(%r14), %rdi cmpq %r8, %rsi je 0x29a88 movq %r10, -0x50(%rbp) movq %r9, -0x38(%rbp) movl 0x4(%r8), %r11d movq 0x10(%r14), %r9 movq 0x18(%r14), %r15 addq %r9, %r12 movl %r12d, %edx andl %r11d, %edx shrq %r9 decl %r9d movl %r9d, %r10d andl %r11d, %r10d cmpq %r15, %rdx cmovbl %edx, %r10d movq %r10, %rdx shlq $0x4, %rdx addq %r13, %rdx cmpq %rsi, %rdx je 0x29a31 movq %rdi, -0x30(%rbp) movl 0x4(%rdx), %edi andl %edi, %r12d andl %edi, %r9d cmpq %r15, %r12 cmovbl %r12d, %r9d cmpl %r9d, %r10d jne 0x29a3a movq %r15, -0x48(%rbp) leaq 0x1(%r15), %r9 movq %r9, -0x40(%rbp) movq -0x50(%rbp), %r9 movl %r9d, %r12d andl %r11d, %r12d movq -0x38(%rbp), %r15 andl %r15d, %r11d cmpq -0x40(%rbp), %r12 cmovbl %r12d, %r11d andl %edi, %r9d andl %r15d, %edi cmpq -0x40(%rbp), %r9 cmovbl %r9d, %edi movl $0xffffffff, %r9d # imm = 0xFFFFFFFF cmpl %edi, %r11d jne 0x29a0b movl %r11d, %edi cmpq %rdi, -0x48(%rbp) jne 0x29a65 movl %r10d, %r9d movups (%r8), %xmm0 movups %xmm0, (%rsi) movl (%rdx), %ecx movl %eax, %edi movl %edi, %esi shlq $0x4, %rsi movl (%r13,%rsi), %edi cmpl %r9d, %edi jne 0x29a16 addq %rsi, %r13 movl %ecx, (%r13) movl %eax, (%rdx) jmp 0x29a84 movups (%r8), %xmm0 movups %xmm0, (%rsi) jmp 0x29a88 movups (%rdx), %xmm0 movups %xmm0, (%rsi) movups (%r8), %xmm0 movups %xmm0, (%rdx) movq -0x30(%rbp), %rdi movl %r9d, %ecx shlq $0x4, %rcx movl (%r13,%rcx), %r9d cmpl %r10d, %r9d jne 0x29a4b addq %rcx, %r13 movl %eax, (%r13) jmp 0x29a88 movups (%r8), %xmm0 movups %xmm0, (%rsi) movl %r10d, %edx shlq $0x4, %rdx movl (%r13,%rdx), %r10d cmpl %ecx, %r10d jne 0x29a6c addq %rdx, %r13 movl %eax, (%r13) movq -0x30(%rbp), %rdi callq 0x2bff3 movq 0x60(%r14), %rax testq %rax, %rax je 0x29a9b movq %rbx, %rdi callq *%rax xorl %r15d, %r15d movl %r15d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_delete: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15b, 1 cmp qword ptr [rdi+18h], 0 jz loc_29A9E mov rbx, rsi mov r14, rdi mov rax, [rdi+10h] mov [rbp+var_38], rax mov r13, [rdi+28h] mov rax, [rdi+50h] test rax, rax jz short loc_2989F lea r12, [rbp+var_58] mov rdi, rbx mov rsi, r12 xor edx, edx call rax mov rsi, rax mov rdx, [r12] jmp short loc_298AD loc_2989F: mov rdx, [r14+8] mov [rbp+var_58], rdx mov rsi, [r14] add rsi, rbx loc_298AD: mov r12d, 0FFFFFFFFh mov rdi, [r14+68h] call qword ptr [r14+58h] mov rcx, [r14+18h] mov r9, [rbp+var_38] lea r10, [r9+r12] mov edx, r10d and edx, eax shr r9, 1 dec r9d and eax, r9d cmp rdx, rcx cmovb eax, edx mov rdx, rax shl rdx, 4 lea rsi, [rdx+r13] cmp [r13+rdx+8], rbx jz short loc_2990F loc_298ED: mov eax, [rsi] cmp rax, r12 jz loc_29A9E mov rdx, rsi mov rdi, rax shl rdi, 4 lea rsi, [rdi+r13] cmp [r13+rdi+8], rbx jnz short loc_298ED jmp short loc_29911 loc_2990F: xor edx, edx loc_29911: dec rcx mov [r14+18h], rcx mov rdi, [r14+10h] shr rdi, 1 cmp rcx, rdi jnb short loc_29928 mov [r14+10h], rdi loc_29928: mov r8, rcx shl r8, 4 add r8, r13 mov edi, [rsi] test rdx, rdx jz short loc_2993D mov [rdx], edi jmp short loc_29958 loc_2993D: cmp edi, 0FFFFFFFFh jz short loc_29958 mov rax, rdi shl rax, 4 movups xmm0, xmmword ptr [r13+rax+0] movups xmmword ptr [rsi], xmm0 lea rsi, [rax+r13] mov eax, edi loc_29958: lea rdi, [r14+28h] cmp rsi, r8 jz loc_29A88 mov [rbp+var_50], r10 mov [rbp+var_38], r9 mov r11d, [r8+4] mov r9, [r14+10h] mov r15, [r14+18h] add r12, r9 mov edx, r12d and edx, r11d shr r9, 1 dec r9d mov r10d, r9d and r10d, r11d cmp rdx, r15 cmovb r10d, edx mov rdx, r10 shl rdx, 4 add rdx, r13 cmp rdx, rsi jz loc_29A31 mov [rbp+var_30], rdi mov edi, [rdx+4] and r12d, edi and r9d, edi cmp r12, r15 cmovb r9d, r12d cmp r10d, r9d jnz short loc_29A3A mov [rbp+var_48], r15 lea r9, [r15+1] mov [rbp+var_40], r9 mov r9, [rbp+var_50] mov r12d, r9d and r12d, r11d mov r15, [rbp+var_38] and r11d, r15d cmp r12, [rbp+var_40] cmovb r11d, r12d and r9d, edi and edi, r15d cmp r9, [rbp+var_40] cmovb edi, r9d mov r9d, 0FFFFFFFFh cmp r11d, edi jnz short loc_29A0B mov edi, r11d cmp [rbp+var_48], rdi jnz short loc_29A65 mov r9d, r10d loc_29A0B: movups xmm0, xmmword ptr [r8] movups xmmword ptr [rsi], xmm0 mov ecx, [rdx] mov edi, eax loc_29A16: mov esi, edi shl rsi, 4 mov edi, [r13+rsi+0] cmp edi, r9d jnz short loc_29A16 add r13, rsi mov [r13+0], ecx mov [rdx], eax jmp short loc_29A84 loc_29A31: movups xmm0, xmmword ptr [r8] movups xmmword ptr [rsi], xmm0 jmp short loc_29A88 loc_29A3A: movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rsi], xmm0 movups xmm0, xmmword ptr [r8] movups xmmword ptr [rdx], xmm0 mov rdi, [rbp+var_30] loc_29A4B: mov ecx, r9d shl rcx, 4 mov r9d, [r13+rcx+0] cmp r9d, r10d jnz short loc_29A4B add r13, rcx mov [r13+0], eax jmp short loc_29A88 loc_29A65: movups xmm0, xmmword ptr [r8] movups xmmword ptr [rsi], xmm0 loc_29A6C: mov edx, r10d shl rdx, 4 mov r10d, [r13+rdx+0] cmp r10d, ecx jnz short loc_29A6C add r13, rdx mov [r13+0], eax loc_29A84: mov rdi, [rbp+var_30] loc_29A88: call pop_dynamic mov rax, [r14+60h] test rax, rax jz short loc_29A9B mov rdi, rbx call rax loc_29A9B: xor r15d, r15d loc_29A9E: mov eax, r15d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_hash_delete(long long a1, long long a2) { unsigned int v2; // r15d long long v5; // r13 long long ( *v6)(long long, long long *, _QWORD); // rax long long v7; // rsi long long v8; // rdx int v9; // eax unsigned long long v10; // rcx unsigned long long v11; // r10 unsigned long long v12; // rdx unsigned long long v13; // r9 long long v14; // rax unsigned int *v15; // rsi unsigned int *v16; // rdx unsigned long long v17; // rcx unsigned long long v18; // rdi unsigned int *v19; // r8 long long v20; // rdi long long v21; // rdi unsigned int v22; // r11d unsigned long long v23; // r9 unsigned long long v24; // r15 int v25; // r12d unsigned long long v26; // rdx int v27; // r9d long long v28; // r10 unsigned int *v29; // rdx unsigned int v30; // edi unsigned long long v31; // r12 unsigned int v32; // r9d unsigned long long v33; // r12 int v34; // r11d unsigned long long v35; // r9 int v36; // edi int v37; // r9d unsigned int v38; // edi long long v39; // rsi long long v40; // rcx long long v41; // rdx void ( *v42)(long long); // rax long long v44; // [rsp+8h] [rbp-58h] BYREF unsigned long long v45; // [rsp+10h] [rbp-50h] unsigned long long v46; // [rsp+18h] [rbp-48h] unsigned long long v47; // [rsp+20h] [rbp-40h] unsigned long long v48; // [rsp+28h] [rbp-38h] long long v49; // [rsp+30h] [rbp-30h] LOBYTE(v2) = 1; if ( !*(_QWORD *)(a1 + 24) ) return v2; v48 = *(_QWORD *)(a1 + 16); v5 = *(_QWORD *)(a1 + 40); v6 = *(long long ( **)(long long, long long *, _QWORD))(a1 + 80); if ( v6 ) { v7 = v6(a2, &v44, 0LL); v8 = v44; } else { v8 = *(_QWORD *)(a1 + 8); v44 = v8; v7 = a2 + *(_QWORD *)a1; } v9 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), v7, v8); v10 = *(_QWORD *)(a1 + 24); v11 = v48 + 0xFFFFFFFF; v12 = v9 & (unsigned int)(v48 - 1); v13 = (unsigned int)(v48 >> 1) - 1; v14 = (unsigned int)v13 & v9; if ( v12 < v10 ) v14 = (unsigned int)v12; v15 = (unsigned int *)(16 * v14 + v5); if ( *((_QWORD *)v15 + 1) == a2 ) { v16 = 0LL; LABEL_12: v17 = v10 - 1; *(_QWORD *)(a1 + 24) = v17; v18 = *(_QWORD *)(a1 + 16) >> 1; if ( v17 < v18 ) *(_QWORD *)(a1 + 16) = v18; v19 = (unsigned int *)(v5 + 16 * v17); v20 = *v15; if ( v16 ) { *v16 = v20; } else if ( (_DWORD)v20 != -1 ) { *(_OWORD *)v15 = *(_OWORD *)(v5 + 16 * v20); v15 = (unsigned int *)(16 * v20 + v5); LODWORD(v14) = v20; } v21 = a1 + 40; if ( v15 == v19 ) goto LABEL_43; v45 = v11; v48 = v13; v22 = v19[1]; v23 = *(_QWORD *)(a1 + 16); v24 = *(_QWORD *)(a1 + 24); v25 = v23 - 1; v26 = v22 & ((_DWORD)v23 - 1); v27 = (v23 >> 1) - 1; v28 = v22 & v27; if ( v26 < v24 ) v28 = (unsigned int)v26; v29 = (unsigned int *)(v5 + 16 * v28); if ( v29 == v15 ) { *(_OWORD *)v15 = *(_OWORD *)v19; LABEL_43: pop_dynamic(v21); v42 = *(void ( **)(long long))(a1 + 96); if ( v42 ) v42(a2); return 0; } v49 = a1 + 40; v30 = v29[1]; v31 = v30 & v25; v32 = v30 & v27; if ( v31 < v24 ) v32 = v31; if ( (_DWORD)v28 != v32 ) { *(_OWORD *)v15 = *(_OWORD *)v29; *(_OWORD *)v29 = *(_OWORD *)v19; v21 = v49; do { v40 = 16LL * v32; v32 = *(_DWORD *)(v5 + v40); } while ( v32 != (_DWORD)v28 ); *(_DWORD *)(v40 + v5) = v14; goto LABEL_43; } v46 = v24; v47 = v24 + 1; v33 = v22 & (unsigned int)v45; v34 = v48 & v22; if ( v33 < v24 + 1 ) v34 = v33; v35 = v30 & (unsigned int)v45; v36 = v48 & v30; if ( v35 < v47 ) v36 = v35; v37 = -1; if ( v34 == v36 ) { if ( v46 != v34 ) { *(_OWORD *)v15 = *(_OWORD *)v19; do { v41 = 16LL * (unsigned int)v28; LODWORD(v28) = *(_DWORD *)(v5 + v41); } while ( (_DWORD)v28 != (_DWORD)v17 ); *(_DWORD *)(v41 + v5) = v14; goto LABEL_42; } v37 = v28; } *(_OWORD *)v15 = *(_OWORD *)v19; v38 = v14; do { v39 = 16LL * v38; v38 = *(_DWORD *)(v5 + v39); } while ( v38 != v37 ); *(_DWORD *)(v39 + v5) = *v29; *v29 = v14; LABEL_42: v21 = v49; goto LABEL_43; } while ( 1 ) { v14 = *v15; if ( v14 == 0xFFFFFFFFLL ) return v2; v16 = v15; v15 = (unsigned int *)(16 * v14 + v5); if ( *((_QWORD *)v15 + 1) == a2 ) goto LABEL_12; } }
my_hash_delete: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15B,0x1 CMP qword ptr [RDI + 0x18],0x0 JZ 0x00129a9e MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV R13,qword ptr [RDI + 0x28] MOV RAX,qword ptr [RDI + 0x50] TEST RAX,RAX JZ 0x0012989f LEA R12,[RBP + -0x58] MOV RDI,RBX MOV RSI,R12 XOR EDX,EDX CALL RAX MOV RSI,RAX MOV RDX,qword ptr [R12] JMP 0x001298ad LAB_0012989f: MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RBP + -0x58],RDX MOV RSI,qword ptr [R14] ADD RSI,RBX LAB_001298ad: MOV R12D,0xffffffff MOV RDI,qword ptr [R14 + 0x68] CALL qword ptr [R14 + 0x58] MOV RCX,qword ptr [R14 + 0x18] MOV R9,qword ptr [RBP + -0x38] LEA R10,[R9 + R12*0x1] MOV EDX,R10D AND EDX,EAX SHR R9,0x1 DEC R9D AND EAX,R9D CMP RDX,RCX CMOVC EAX,EDX MOV RDX,RAX SHL RDX,0x4 LEA RSI,[RDX + R13*0x1] CMP qword ptr [R13 + RDX*0x1 + 0x8],RBX JZ 0x0012990f LAB_001298ed: MOV EAX,dword ptr [RSI] CMP RAX,R12 JZ 0x00129a9e MOV RDX,RSI MOV RDI,RAX SHL RDI,0x4 LEA RSI,[RDI + R13*0x1] CMP qword ptr [R13 + RDI*0x1 + 0x8],RBX JNZ 0x001298ed JMP 0x00129911 LAB_0012990f: XOR EDX,EDX LAB_00129911: DEC RCX MOV qword ptr [R14 + 0x18],RCX MOV RDI,qword ptr [R14 + 0x10] SHR RDI,0x1 CMP RCX,RDI JNC 0x00129928 MOV qword ptr [R14 + 0x10],RDI LAB_00129928: MOV R8,RCX SHL R8,0x4 ADD R8,R13 MOV EDI,dword ptr [RSI] TEST RDX,RDX JZ 0x0012993d MOV dword ptr [RDX],EDI JMP 0x00129958 LAB_0012993d: CMP EDI,-0x1 JZ 0x00129958 MOV RAX,RDI SHL RAX,0x4 MOVUPS XMM0,xmmword ptr [R13 + RAX*0x1] MOVUPS xmmword ptr [RSI],XMM0 LEA RSI,[RAX + R13*0x1] MOV EAX,EDI LAB_00129958: LEA RDI,[R14 + 0x28] CMP RSI,R8 JZ 0x00129a88 MOV qword ptr [RBP + -0x50],R10 MOV qword ptr [RBP + -0x38],R9 MOV R11D,dword ptr [R8 + 0x4] MOV R9,qword ptr [R14 + 0x10] MOV R15,qword ptr [R14 + 0x18] ADD R12,R9 MOV EDX,R12D AND EDX,R11D SHR R9,0x1 DEC R9D MOV R10D,R9D AND R10D,R11D CMP RDX,R15 CMOVC R10D,EDX MOV RDX,R10 SHL RDX,0x4 ADD RDX,R13 CMP RDX,RSI JZ 0x00129a31 MOV qword ptr [RBP + -0x30],RDI MOV EDI,dword ptr [RDX + 0x4] AND R12D,EDI AND R9D,EDI CMP R12,R15 CMOVC R9D,R12D CMP R10D,R9D JNZ 0x00129a3a MOV qword ptr [RBP + -0x48],R15 LEA R9,[R15 + 0x1] MOV qword ptr [RBP + -0x40],R9 MOV R9,qword ptr [RBP + -0x50] MOV R12D,R9D AND R12D,R11D MOV R15,qword ptr [RBP + -0x38] AND R11D,R15D CMP R12,qword ptr [RBP + -0x40] CMOVC R11D,R12D AND R9D,EDI AND EDI,R15D CMP R9,qword ptr [RBP + -0x40] CMOVC EDI,R9D MOV R9D,0xffffffff CMP R11D,EDI JNZ 0x00129a0b MOV EDI,R11D CMP qword ptr [RBP + -0x48],RDI JNZ 0x00129a65 MOV R9D,R10D LAB_00129a0b: MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSI],XMM0 MOV ECX,dword ptr [RDX] MOV EDI,EAX LAB_00129a16: MOV ESI,EDI SHL RSI,0x4 MOV EDI,dword ptr [R13 + RSI*0x1] CMP EDI,R9D JNZ 0x00129a16 ADD R13,RSI MOV dword ptr [R13],ECX MOV dword ptr [RDX],EAX JMP 0x00129a84 LAB_00129a31: MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSI],XMM0 JMP 0x00129a88 LAB_00129a3a: MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RSI],XMM0 MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RDX],XMM0 MOV RDI,qword ptr [RBP + -0x30] LAB_00129a4b: MOV ECX,R9D SHL RCX,0x4 MOV R9D,dword ptr [R13 + RCX*0x1] CMP R9D,R10D JNZ 0x00129a4b ADD R13,RCX MOV dword ptr [R13],EAX JMP 0x00129a88 LAB_00129a65: MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSI],XMM0 LAB_00129a6c: MOV EDX,R10D SHL RDX,0x4 MOV R10D,dword ptr [R13 + RDX*0x1] CMP R10D,ECX JNZ 0x00129a6c ADD R13,RDX MOV dword ptr [R13],EAX LAB_00129a84: MOV RDI,qword ptr [RBP + -0x30] LAB_00129a88: CALL 0x0012bff3 MOV RAX,qword ptr [R14 + 0x60] TEST RAX,RAX JZ 0x00129a9b MOV RDI,RBX CALL RAX LAB_00129a9b: XOR R15D,R15D LAB_00129a9e: MOV EAX,R15D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_hash_delete(long *param_1,long param_2) { long *plVar1; long lVar2; uint uVar3; int8 uVar4; uint uVar5; uint uVar6; long lVar7; ulong uVar8; ulong uVar9; uint uVar10; uint uVar11; uint *puVar12; uint *puVar13; uint *puVar14; uint uVar15; uint uVar16; ulong uVar18; uint uVar19; ulong uVar20; int8 unaff_R15; long local_60; long local_58; ulong local_50; ulong local_48; ulong local_40; long *local_38; ulong uVar17; uVar9 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1); if (param_1[3] != 0) { local_40 = param_1[2]; lVar2 = param_1[5]; if ((code *)param_1[10] == (code *)0x0) { local_60 = param_1[1]; lVar7 = *param_1 + param_2; } else { lVar7 = (*(code *)param_1[10])(param_2,&local_60,0); } uVar5 = (*(code *)param_1[0xb])(param_1[0xd],lVar7,local_60); lVar7 = local_40 + 0xffffffff; uVar10 = (uint)lVar7; uVar15 = (int)(local_40 >> 1) - 1; uVar17 = (ulong)uVar15; uVar8 = (ulong)(uVar5 & uVar15); if ((ulong)(uVar10 & uVar5) < (ulong)param_1[3]) { uVar8 = (ulong)(uVar10 & uVar5); } puVar13 = (uint *)(uVar8 * 0x10 + lVar2); if (*(long *)(lVar2 + 8 + uVar8 * 0x10) == param_2) { puVar12 = (uint *)0x0; } else { do { puVar12 = puVar13; uVar8 = (ulong)*puVar12; if (uVar8 == 0xffffffff) goto LAB_00129a9e; puVar13 = (uint *)(uVar8 * 0x10 + lVar2); } while (*(long *)(lVar2 + 8 + uVar8 * 0x10) != param_2); } uVar9 = param_1[3] - 1; param_1[3] = uVar9; if (uVar9 < (ulong)param_1[2] >> 1) { param_1[2] = (ulong)param_1[2] >> 1; } puVar14 = (uint *)(uVar9 * 0x10 + lVar2); uVar5 = *puVar13; uVar6 = (uint)uVar8; if (puVar12 == (uint *)0x0) { if (uVar5 != 0xffffffff) { puVar12 = (uint *)(lVar2 + (ulong)uVar5 * 0x10); uVar6 = puVar12[1]; uVar3 = puVar12[2]; uVar11 = puVar12[3]; *puVar13 = *puVar12; puVar13[1] = uVar6; puVar13[2] = uVar3; puVar13[3] = uVar11; puVar13 = (uint *)((ulong)uVar5 * 0x10 + lVar2); uVar6 = uVar5; } } else { *puVar12 = uVar5; } plVar1 = param_1 + 5; if (puVar13 != puVar14) { uVar5 = puVar14[1]; uVar8 = param_1[3]; uVar19 = (int)param_1[2] - 1; uVar11 = uVar19 & uVar5; uVar16 = (int)((ulong)param_1[2] >> 1) - 1; uVar3 = uVar16 & uVar5; if (uVar11 < uVar8) { uVar3 = uVar11; } uVar18 = (ulong)uVar3; puVar12 = (uint *)(uVar18 * 0x10 + lVar2); local_58 = lVar7; local_40 = uVar17; if (puVar12 == puVar13) { uVar5 = puVar14[1]; uVar10 = puVar14[2]; uVar15 = puVar14[3]; *puVar13 = *puVar14; puVar13[1] = uVar5; puVar13[2] = uVar10; puVar13[3] = uVar15; } else { uVar11 = puVar12[1]; uVar20 = (ulong)(uVar19 & uVar11); uVar17 = (ulong)(uVar16 & uVar11); if (uVar20 < uVar8) { uVar17 = uVar20; } local_38 = plVar1; if (uVar3 == (uint)uVar17) { local_48 = uVar8 + 1; uVar16 = uVar5 & uVar15; if ((uVar10 & uVar5) < local_48) { uVar16 = uVar10 & uVar5; } uVar5 = uVar11 & uVar15; if ((uVar10 & uVar11) < local_48) { uVar5 = uVar10 & uVar11; } uVar10 = 0xffffffff; local_50 = uVar8; if ((uVar16 == uVar5) && (uVar10 = uVar3, uVar8 != uVar16)) { uVar5 = puVar14[1]; uVar10 = puVar14[2]; uVar15 = puVar14[3]; *puVar13 = *puVar14; puVar13[1] = uVar5; puVar13[2] = uVar10; puVar13[3] = uVar15; do { lVar7 = uVar18 * 0x10; uVar5 = *(uint *)(lVar2 + lVar7); uVar18 = (ulong)uVar5; } while (uVar5 != (uint)uVar9); *(uint *)(lVar2 + lVar7) = uVar6; } else { uVar5 = puVar14[1]; uVar15 = puVar14[2]; uVar3 = puVar14[3]; *puVar13 = *puVar14; puVar13[1] = uVar5; puVar13[2] = uVar15; puVar13[3] = uVar3; uVar5 = uVar6; do { uVar9 = (ulong)uVar5; uVar5 = *(uint *)(lVar2 + uVar9 * 0x10); } while (uVar5 != uVar10); *(uint *)(lVar2 + uVar9 * 0x10) = *puVar12; *puVar12 = uVar6; } } else { uVar4 = *(int8 *)(puVar12 + 2); *(int8 *)puVar13 = *(int8 *)puVar12; *(int8 *)(puVar13 + 2) = uVar4; uVar5 = puVar14[1]; uVar10 = puVar14[2]; uVar15 = puVar14[3]; *puVar12 = *puVar14; puVar12[1] = uVar5; puVar12[2] = uVar10; puVar12[3] = uVar15; do { lVar7 = uVar17 * 0x10; uVar5 = *(uint *)(lVar2 + lVar7); uVar17 = (ulong)uVar5; } while (uVar5 != uVar3); *(uint *)(lVar2 + lVar7) = uVar6; } } } pop_dynamic(plVar1); if ((code *)param_1[0xc] != (code *)0x0) { (*(code *)param_1[0xc])(param_2); } uVar9 = 0; } LAB_00129a9e: return uVar9 & 0xffffffff; }
63,281
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&)
monkey531[P]llama/common/minja.hpp
Value(const std::shared_ptr<CallableType> & callable) : object_(std::make_shared<ObjectType>()), callable_(callable) {}
O1
cpp
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movq $0x0, 0x20(%rdi) movl $0x30, %edi callq 0x18690 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x857a5(%rip), %rcx # 0xdf458 addq $0x10, %rcx movq %rcx, (%rax) movq %rax, %rcx addq $0x10, %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq $0x0, 0x20(%rax) movq %rax, 0x28(%rbx) movq %rcx, 0x20(%rbx) movq (%r14), %rax movq %rax, 0x30(%rbx) movq 0x8(%r14), %rax movq %rax, 0x38(%rbx) testq %rax, %rax je 0x59d01 movq 0x872a5(%rip), %rcx # 0xe0f98 cmpb $0x0, (%rcx) je 0x59cfd incl 0x8(%rax) jmp 0x59d01 lock incl 0x8(%rax) leaq 0x40(%rbx), %r14 movb $0x0, 0x40(%rbx) movq $0x0, 0x48(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x3f802 movq %r14, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3f802 movq %rax, %r14 movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x59d43 callq 0x319fe movq %rbx, %rdi callq 0x41852 movq %r14, %rdi callq 0x18bc0 nop
_ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+20h], 0 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx mov rcx, rax add rcx, 10h xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov qword ptr [rax+20h], 0 mov [rbx+28h], rax mov [rbx+20h], rcx mov rax, [r14] mov [rbx+30h], rax mov rax, [r14+8] mov [rbx+38h], rax test rax, rax jz short loc_59D01 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_59CFD inc dword ptr [rax+8] jmp short loc_59D01 loc_59CFD: lock inc dword ptr [rax+8] loc_59D01: lea r14, [rbx+40h] mov byte ptr [rbx+40h], 0 mov qword ptr [rbx+48h], 0 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) mov rdi, r14 mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _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 r14, rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_59D43 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_59D43: mov rdi, rbx call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this() mov rdi, r14 call __Unwind_Resume
long long minja::Value::Value(long long a1, _QWORD *a2) { long long v2; // rax long long result; // rax *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 32) = 0LL; v2 = operator new(0x30uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 32) = 0LL; *(_QWORD *)(a1 + 40) = v2; *(_QWORD *)(a1 + 32) = v2 + 16; *(_QWORD *)(a1 + 48) = *a2; result = a2[1]; *(_QWORD *)(a1 + 56) = result; if ( result ) { if ( _libc_single_threaded ) ++*(_DWORD *)(result + 8); else _InterlockedIncrement((volatile signed __int32 *)(result + 8)); } *(_BYTE *)(a1 + 64) = 0; *(_QWORD *)(a1 + 72) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); return result; }
Value: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],0x0 LAB_00159c94: MOV EDI,0x30 CALL 0x00118690 LAB_00159c9e: MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1df458] ADD RCX,0x10 MOV qword ptr [RAX],RCX MOV RCX,RAX ADD RCX,0x10 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x20],RCX MOV RAX,qword ptr [R14] MOV qword ptr [RBX + 0x30],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x38],RAX TEST RAX,RAX JZ 0x00159d01 MOV RCX,qword ptr [0x001e0f98] CMP byte ptr [RCX],0x0 JZ 0x00159cfd INC dword ptr [RAX + 0x8] JMP 0x00159d01 LAB_00159cfd: INC.LOCK dword ptr [RAX + 0x8] LAB_00159d01: LEA R14,[RBX + 0x40] MOV byte ptr [RBX + 0x40],0x0 MOV qword ptr [RBX + 0x48],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013f802 MOV RDI,R14 MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x0013f802
/* minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> > const&) */ void __thiscall minja::Value::Value(Value *this,shared_ptr *param_1) { long lVar1; int8 *puVar2; bool bVar3; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x20) = 0; /* try { // try from 00159c94 to 00159c9d has its CatchHandler @ 00159d32 */ puVar2 = (int8 *)operator_new(0x30); puVar2[1] = 0x100000001; *puVar2 = &PTR___Sp_counted_ptr_inplace_001df468; puVar2[2] = 0; puVar2[3] = 0; puVar2[4] = 0; *(int8 **)(this + 0x28) = puVar2; *(int8 **)(this + 0x20) = puVar2 + 2; *(int8 *)(this + 0x30) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x38) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001e0f98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } bVar3 = (bool)((char)this + '@'); this[0x40] = (Value)0x0; *(int8 *)(this + 0x48) = 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> ::assert_invariant(bVar3); 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(bVar3); return; }
63,282
mi_indexes_are_disabled
eloqsql/storage/myisam/mi_open.c
int mi_indexes_are_disabled(MI_INFO *info) { MYISAM_SHARE *share= info->s; /* No keys or all are enabled. keys is the number of keys. Left shifted gives us only one bit set. When decreased by one, gives us all all bits up to this one set and it gets unset. */ if (!share->base.keys || (mi_is_all_keys_active(share->state.key_map, share->base.keys))) return 0; /* All are disabled */ if (mi_is_any_key_active(share->state.key_map)) return 1; /* We have keys. Some enabled, some disabled. Don't check for any non-unique disabled but return directly 2 */ return 2; }
O3
c
mi_indexes_are_disabled: pushq %rbp movq %rsp, %rbp movq (%rdi), %rdx movl 0x180(%rdx), %ecx xorl %eax, %eax testq %rcx, %rcx je 0x8098c movq 0xc0(%rdx), %rdx movq $-0x1, %rsi movq $-0x1, %rdi shlq %cl, %rdi cmpl $0x40, %ecx notq %rdi cmovaeq %rsi, %rdi cmpq %rdi, %rdx je 0x8098c xorl %eax, %eax cmpq $0x1, %rdx adcl $0x1, %eax popq %rbp retq nop
mi_indexes_are_disabled: push rbp mov rbp, rsp mov rdx, [rdi] mov ecx, [rdx+180h] xor eax, eax test rcx, rcx jz short loc_8098C mov rdx, [rdx+0C0h] mov rsi, 0FFFFFFFFFFFFFFFFh mov rdi, 0FFFFFFFFFFFFFFFFh shl rdi, cl cmp ecx, 40h ; '@' not rdi cmovnb rdi, rsi cmp rdx, rdi jz short loc_8098C xor eax, eax cmp rdx, 1 adc eax, 1 loc_8098C: pop rbp retn
long long mi_indexes_are_disabled(long long a1) { unsigned int v1; // ecx long long result; // rax long long v3; // rdx long long v4; // rdi v1 = *(_DWORD *)(*(_QWORD *)a1 + 384LL); result = 0LL; if ( v1 ) { v3 = *(_QWORD *)(*(_QWORD *)a1 + 192LL); v4 = ~(-1LL << v1); if ( v1 >= 0x40 ) v4 = -1LL; if ( v3 != v4 ) return (unsigned int)(v3 == 0) + 1; } return result; }
mi_indexes_are_disabled: PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RDI] MOV ECX,dword ptr [RDX + 0x180] XOR EAX,EAX TEST RCX,RCX JZ 0x0018098c MOV RDX,qword ptr [RDX + 0xc0] MOV RSI,-0x1 MOV RDI,-0x1 SHL RDI,CL CMP ECX,0x40 NOT RDI CMOVNC RDI,RSI CMP RDX,RDI JZ 0x0018098c XOR EAX,EAX CMP RDX,0x1 ADC EAX,0x1 LAB_0018098c: POP RBP RET
char mi_indexes_are_disabled(long *param_1) { uint uVar1; ulong uVar2; char cVar3; ulong uVar4; uVar1 = *(uint *)(*param_1 + 0x180); cVar3 = '\0'; if (uVar1 != 0) { uVar2 = *(ulong *)(*param_1 + 0xc0); uVar4 = ~(-1L << ((byte)uVar1 & 0x3f)); if (0x3f < uVar1) { uVar4 = 0xffffffffffffffff; } if (uVar2 != uVar4) { cVar3 = (uVar2 == 0) + '\x01'; } } return cVar3; }
63,283
link_block
eloqsql/mysys/mf_keycache.c
static void link_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, my_bool hot, my_bool at_end) { BLOCK_LINK *ins; BLOCK_LINK **pins; DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(!block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); if (!hot && keycache->waiting_for_block.last_thread) { /* Signal that in the LRU warm sub-chain an available block has appeared */ struct st_my_thread_var *last_thread= keycache->waiting_for_block.last_thread; struct st_my_thread_var *first_thread= last_thread->next; struct st_my_thread_var *next_thread= first_thread; HASH_LINK *hash_link= (HASH_LINK *) first_thread->keycache_link; struct st_my_thread_var *thread; do { thread= next_thread; next_thread= thread->next; /* We notify about the event all threads that ask for the same page as the first thread in the queue */ if ((HASH_LINK *) thread->keycache_link == hash_link) { KEYCACHE_DBUG_PRINT("link_block: signal", ("thread %ld", (ulong) thread->id)); keycache_pthread_cond_signal(&thread->suspend); unlink_from_queue(&keycache->waiting_for_block, thread); block->requests++; } } while (thread != last_thread); hash_link->block= block; /* NOTE: We assigned the block to the hash_link and signalled the requesting thread(s). But it is possible that other threads runs first. These threads see the hash_link assigned to a block which is assigned to another hash_link and not marked BLOCK_IN_SWITCH. This can be a problem for functions that do not select the block via its hash_link: flush and free. They do only see a block which is in a "normal" state and don't know that it will be evicted soon. We cannot set BLOCK_IN_SWITCH here because only one of the requesting threads must handle the eviction. All others must wait for it to complete. If we set the flag here, the threads would not know who is in charge of the eviction. Without the flag, the first thread takes the stick and sets the flag. But we need to note in the block that is has been selected for eviction. It must not be freed. The evicting thread will not expect the block in the free list. Before freeing we could also check if block->requests > 1. But I think including another flag in the check of block->status is slightly more efficient and probably easier to read. */ block->status|= BLOCK_IN_EVICTION; KEYCACHE_THREAD_TRACE("link_block: after signaling"); #if defined(KEYCACHE_DEBUG) KEYCACHE_DBUG_PRINT("link_block", ("linked,unlinked block %u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), block->status, block->requests, keycache->blocks_available)); #endif return; } pins= hot ? &keycache->used_ins : &keycache->used_last; ins= *pins; if (ins) { ins->next_used->prev_used= &block->next_used; block->next_used= ins->next_used; block->prev_used= &ins->next_used; ins->next_used= block; if (at_end) *pins= block; } else { /* The LRU ring is empty. Let the block point to itself. */ keycache->used_last= keycache->used_ins= block->next_used= block; block->prev_used= &block->next_used; } KEYCACHE_THREAD_TRACE("link_block"); #if defined(KEYCACHE_DEBUG) keycache->blocks_available++; KEYCACHE_DBUG_PRINT("link_block", ("linked block %u:%1u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), at_end, block->status, block->requests, keycache->blocks_available)); KEYCACHE_DBUG_ASSERT((ulong) keycache->blocks_available <= keycache->blocks_used); #endif }
O3
c
link_block: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r12 testb %dl, %dl je 0x992cc leaq 0xb8(%r12), %r9 leaq 0xb0(%r12), %r10 xorl %r8d, %r8d testb %dl, %dl setne %r8b movq %r9, %rax cmoveq %r10, %rax movq 0xb0(%r12,%r8,8), %rdx testq %rdx, %rdx je 0x9938e movq (%rdx), %rdi movq %r14, 0x8(%rdi) movq (%rdx), %rdi movq %rdi, (%r14) movq %rdx, 0x8(%r14) movq %r14, (%rdx) testb %cl, %cl je 0x993a6 movq %r14, (%rax) jmp 0x993a6 movq 0x120(%r12), %r15 testq %r15, %r15 je 0x99277 movq 0x88(%r15), %r13 movq 0xa8(%r13), %rax movq %rax, -0x30(%rbp) movq 0x88(%r13), %rbx cmpq %rax, 0xa8(%r13) jne 0x9936b movq 0x38(%r13), %rdi testq %rdi, %rdi jne 0x99379 leaq 0x8(%r13), %rdi callq 0x295d0 movq 0x88(%r13), %rax cmpq %r13, %rax je 0x9934e movq 0x90(%r13), %rcx movq %rcx, 0x90(%rax) movq 0x88(%r13), %rax movq %rax, (%rcx) cmpq %r13, 0x120(%r12) jne 0x99358 movq 0x90(%r13), %rax movq $-0x88, %rcx addq %rcx, %rax jmp 0x99350 xorl %eax, %eax movq %rax, 0x120(%r12) movq $0x0, 0x88(%r13) incl 0x38(%r14) movq -0x30(%rbp), %rax cmpq %r15, %r13 movq %rbx, %r13 jne 0x992eb jmp 0x9939d leaq 0x2ecc90(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x170(%rax) jmp 0x99304 movq %r14, (%r14) movq %r14, (%r9) movq %r14, (%r10) movq %r14, 0x8(%r14) jmp 0x993a6 movq %r14, 0x10(%rax) orb $-0x80, 0x50(%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
link_block_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov r12, rdi test dl, dl jz short loc_992CC loc_99277: lea r9, [r12+0B8h] lea r10, [r12+0B0h] xor r8d, r8d test dl, dl setnz r8b mov rax, r9 cmovz rax, r10 mov rdx, [r12+r8*8+0B0h] test rdx, rdx jz loc_9938E mov rdi, [rdx] mov [rdi+8], r14 mov rdi, [rdx] mov [r14], rdi mov [r14+8], rdx mov [rdx], r14 test cl, cl jz loc_993A6 mov [rax], r14 jmp loc_993A6 loc_992CC: mov r15, [r12+120h] test r15, r15 jz short loc_99277 mov r13, [r15+88h] mov rax, [r13+0A8h] mov [rbp+var_30], rax loc_992EB: mov rbx, [r13+88h] cmp [r13+0A8h], rax jnz short loc_9936B mov rdi, [r13+38h] test rdi, rdi jnz short loc_99379 loc_99304: lea rdi, [r13+8] call _pthread_cond_signal mov rax, [r13+88h] cmp rax, r13 jz short loc_9934E mov rcx, [r13+90h] mov [rax+90h], rcx mov rax, [r13+88h] mov [rcx], rax cmp [r12+120h], r13 jnz short loc_99358 mov rax, [r13+90h] mov rcx, 0FFFFFFFFFFFFFF78h add rax, rcx jmp short loc_99350 loc_9934E: xor eax, eax loc_99350: mov [r12+120h], rax loc_99358: mov qword ptr [r13+88h], 0 inc dword ptr [r14+38h] mov rax, [rbp+var_30] loc_9936B: cmp r13, r15 mov r13, rbx jnz loc_992EB jmp short loc_9939D loc_99379: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp loc_99304 loc_9938E: mov [r14], r14 mov [r9], r14 mov [r10], r14 mov [r14+8], r14 jmp short loc_993A6 loc_9939D: mov [rax+10h], r14 or byte ptr [r14+50h], 80h loc_993A6: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * link_block_0(_QWORD *a1, long long a2, char a3, char a4) { _QWORD *result; // rax long long v5; // rdx _QWORD *v6; // r15 _QWORD *v7; // r13 _QWORD *v8; // rbx _QWORD *v9; // rax _QWORD *v10; // rcx long long v11; // rax bool v12; // zf _QWORD *v13; // [rsp+0h] [rbp-30h] if ( !a3 ) { v6 = (_QWORD *)a1[36]; if ( v6 ) { v7 = (_QWORD *)v6[17]; result = (_QWORD *)v7[21]; v13 = result; while ( 1 ) { v8 = (_QWORD *)v7[17]; if ( (_QWORD *)v7[21] == result ) break; LABEL_18: v12 = v7 == v6; v7 = v8; if ( v12 ) { result[2] = a2; *(_BYTE *)(a2 + 80) |= 0x80u; return result; } } if ( v7[7] ) PSI_server[46](); pthread_cond_signal(v7 + 1); v9 = (_QWORD *)v7[17]; if ( v9 == v7 ) { v11 = 0LL; } else { v10 = (_QWORD *)v7[18]; v9[18] = v10; *v10 = v7[17]; if ( (_QWORD *)a1[36] != v7 ) { LABEL_17: v7[17] = 0LL; ++*(_DWORD *)(a2 + 56); result = v13; goto LABEL_18; } v11 = v7[18] - 136LL; } a1[36] = v11; goto LABEL_17; } } result = a1 + 23; if ( !a3 ) result = a1 + 22; v5 = a1[(a3 != 0) + 22]; if ( v5 ) { *(_QWORD *)(*(_QWORD *)v5 + 8LL) = a2; *(_QWORD *)a2 = *(_QWORD *)v5; *(_QWORD *)(a2 + 8) = v5; *(_QWORD *)v5 = a2; if ( a4 ) *result = a2; } else { *(_QWORD *)a2 = a2; a1[23] = a2; a1[22] = a2; *(_QWORD *)(a2 + 8) = a2; } return result; }
link_block: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV R12,RDI TEST DL,DL JZ 0x001992cc LAB_00199277: LEA R9,[R12 + 0xb8] LEA R10,[R12 + 0xb0] XOR R8D,R8D TEST DL,DL SETNZ R8B MOV RAX,R9 CMOVZ RAX,R10 MOV RDX,qword ptr [R12 + R8*0x8 + 0xb0] TEST RDX,RDX JZ 0x0019938e MOV RDI,qword ptr [RDX] MOV qword ptr [RDI + 0x8],R14 MOV RDI,qword ptr [RDX] MOV qword ptr [R14],RDI MOV qword ptr [R14 + 0x8],RDX MOV qword ptr [RDX],R14 TEST CL,CL JZ 0x001993a6 MOV qword ptr [RAX],R14 JMP 0x001993a6 LAB_001992cc: MOV R15,qword ptr [R12 + 0x120] TEST R15,R15 JZ 0x00199277 MOV R13,qword ptr [R15 + 0x88] MOV RAX,qword ptr [R13 + 0xa8] MOV qword ptr [RBP + -0x30],RAX LAB_001992eb: MOV RBX,qword ptr [R13 + 0x88] CMP qword ptr [R13 + 0xa8],RAX JNZ 0x0019936b MOV RDI,qword ptr [R13 + 0x38] TEST RDI,RDI JNZ 0x00199379 LAB_00199304: LEA RDI,[R13 + 0x8] CALL 0x001295d0 MOV RAX,qword ptr [R13 + 0x88] CMP RAX,R13 JZ 0x0019934e MOV RCX,qword ptr [R13 + 0x90] MOV qword ptr [RAX + 0x90],RCX MOV RAX,qword ptr [R13 + 0x88] MOV qword ptr [RCX],RAX CMP qword ptr [R12 + 0x120],R13 JNZ 0x00199358 MOV RAX,qword ptr [R13 + 0x90] MOV RCX,-0x88 ADD RAX,RCX JMP 0x00199350 LAB_0019934e: XOR EAX,EAX LAB_00199350: MOV qword ptr [R12 + 0x120],RAX LAB_00199358: MOV qword ptr [R13 + 0x88],0x0 INC dword ptr [R14 + 0x38] MOV RAX,qword ptr [RBP + -0x30] LAB_0019936b: CMP R13,R15 MOV R13,RBX JNZ 0x001992eb JMP 0x0019939d LAB_00199379: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x00199304 LAB_0019938e: MOV qword ptr [R14],R14 MOV qword ptr [R9],R14 MOV qword ptr [R10],R14 MOV qword ptr [R14 + 0x8],R14 JMP 0x001993a6 LAB_0019939d: MOV qword ptr [RAX + 0x10],R14 OR byte ptr [R14 + 0x50],0x80 LAB_001993a6: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void link_block(long param_1,long *param_2,char param_3,char param_4) { long *plVar1; long lVar2; long lVar3; long lVar4; int8 *puVar5; long lVar6; long lVar7; bool bVar8; if ((param_3 == '\0') && (lVar2 = *(long *)(param_1 + 0x120), lVar2 != 0)) { lVar3 = *(long *)(*(long *)(lVar2 + 0x88) + 0xa8); lVar7 = *(long *)(lVar2 + 0x88); do { lVar4 = *(long *)(lVar7 + 0x88); if (*(long *)(lVar7 + 0xa8) == lVar3) { if (*(long *)(lVar7 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar7 + 8)); if (*(long *)(lVar7 + 0x88) == lVar7) { lVar6 = 0; LAB_00199350: *(long *)(param_1 + 0x120) = lVar6; } else { puVar5 = *(int8 **)(lVar7 + 0x90); *(int8 **)(*(long *)(lVar7 + 0x88) + 0x90) = puVar5; *puVar5 = *(int8 *)(lVar7 + 0x88); if (*(long *)(param_1 + 0x120) == lVar7) { lVar6 = *(long *)(lVar7 + 0x90) + -0x88; goto LAB_00199350; } } *(int8 *)(lVar7 + 0x88) = 0; *(int *)(param_2 + 7) = (int)param_2[7] + 1; } bVar8 = lVar7 != lVar2; lVar7 = lVar4; } while (bVar8); *(long **)(lVar3 + 0x10) = param_2; *(byte *)(param_2 + 10) = *(byte *)(param_2 + 10) | 0x80; } else { puVar5 = (int8 *)(param_1 + 0xb8); if (param_3 == '\0') { puVar5 = (int8 *)(param_1 + 0xb0); } plVar1 = *(long **)(param_1 + 0xb0 + (ulong)(param_3 != '\0') * 8); if (plVar1 == (long *)0x0) { *param_2 = (long)param_2; *(int8 *)(param_1 + 0xb8) = param_2; *(int8 *)(param_1 + 0xb0) = param_2; param_2[1] = (long)param_2; } else { *(long **)(*plVar1 + 8) = param_2; *param_2 = *plVar1; param_2[1] = (long)plVar1; *plVar1 = (long)param_2; if (param_4 != '\0') { *puVar5 = param_2; } } } return; }
63,284
Buffered_log::print()
eloqsql/sql/mysqld.cc
void Buffered_log::print() { /* Since messages are buffered, they can be printed out of order with other entries in the log. Add "Buffered xxx" to the message text to prevent confusion. */ switch(m_level) { case ERROR_LEVEL: sql_print_error("Buffered error: %s", m_message.c_ptr_safe()); break; case WARNING_LEVEL: sql_print_warning("Buffered warning: %s", m_message.c_ptr_safe()); break; case INFORMATION_LEVEL: /* Messages printed as "information" still end up in the mysqld *error* log, but with a [Note] tag instead of an [ERROR] tag. While this is probably fine for a human reading the log, it is upsetting existing automated scripts used to parse logs, because such scripts are likely to not already handle [Note] properly. INFORMATION_LEVEL messages are simply silenced, on purpose, to avoid un needed verbosity. */ break; } }
O0
cpp
Buffered_log::print(): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movl (%rax), %eax movl %eax, -0xc(%rbp) testl %eax, %eax je 0x88f5c3 jmp 0x88f5af movl -0xc(%rbp), %eax subl $0x1, %eax je 0x88f5f3 jmp 0x88f5b9 movl -0xc(%rbp), %eax subl $0x2, %eax je 0x88f623 jmp 0x88f625 movq -0x18(%rbp), %rdi addq $0x8, %rdi addq $0x8, %rdi callq 0x8540f0 movq %rax, %rcx leaq 0xb7d27f(%rip), %rdi # 0x140c85d movl $0x4ee, %esi # imm = 0x4EE leaq 0xb7d2aa(%rip), %rdx # 0x140c894 movb $0x0, %al callq 0x83a410 jmp 0x88f625 movq -0x18(%rbp), %rdi addq $0x8, %rdi addq $0x8, %rdi callq 0x8540f0 movq %rax, %rcx leaq 0xb7d24f(%rip), %rdi # 0x140c85d movl $0x4f1, %esi # imm = 0x4F1 leaq 0xb7d28d(%rip), %rdx # 0x140c8a7 movb $0x0, %al callq 0x84cd00 jmp 0x88f625 jmp 0x88f625 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN12Buffered_log5printEv: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov eax, [rax] mov [rbp+var_C], eax test eax, eax jz short loc_88F5C3 jmp short $+2 loc_88F5AF: mov eax, [rbp+var_C] sub eax, 1 jz short loc_88F5F3 jmp short $+2 loc_88F5B9: mov eax, [rbp+var_C] sub eax, 2 jz short loc_88F623 jmp short loc_88F625 loc_88F5C3: mov rdi, [rbp+var_18] add rdi, 8 add rdi, 8; this call _ZN13Binary_string10c_ptr_safeEv; Binary_string::c_ptr_safe(void) mov rcx, rax lea rdi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4EEh; int lea rdx, aBufferedErrorS; "Buffered error: %s" mov al, 0 call _Z16glog_print_errorPKciS0_z; glog_print_error(char const*,int,char const*,...) jmp short loc_88F625 loc_88F5F3: mov rdi, [rbp+var_18] add rdi, 8 add rdi, 8; this call _ZN13Binary_string10c_ptr_safeEv; Binary_string::c_ptr_safe(void) mov rcx, rax lea rdi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4F1h; int lea rdx, aBufferedWarnin; "Buffered warning: %s" mov al, 0 call _Z18glog_print_warningPKciS0_z; glog_print_warning(char const*,int,char const*,...) jmp short loc_88F625 loc_88F623: jmp short $+2 loc_88F625: add rsp, 20h pop rbp retn
__va_list_tag * Buffered_log::print(Buffered_log *this) { const char *v2; // rax const char *v3; // rax int v4; // [rsp+14h] [rbp-Ch] v4 = *(_DWORD *)this; if ( *(_DWORD *)this ) { if ( v4 == 1 ) { v3 = (const char *)Binary_string::c_ptr_safe((Buffered_log *)((char *)this + 16)); return glog_print_warning( "/workspace/llm4binary/github2025/eloqsql/sql/mysqld.cc", 0x4F1u, "Buffered warning: %s", v3); } else { return (__va_list_tag *)(unsigned int)(v4 - 2); } } else { v2 = (const char *)Binary_string::c_ptr_safe((Buffered_log *)((char *)this + 16)); return glog_print_error("/workspace/llm4binary/github2025/eloqsql/sql/mysqld.cc", 0x4EEu, "Buffered error: %s", v2); } }
__cxx_global_var_init.10: PUSH RBP MOV RBP,RSP LEA RDI,[0x1e5a0e4] XOR EAX,EAX MOV ESI,EAX CALL 0x008fd550 POP RBP RET
void __cxx_global_var_init_10(void) { time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_NONE,0); return; }
63,285
my_thread_init_thr_mutex
eloqsql/mysys/my_thr_init.c
static void my_thread_init_thr_mutex(struct st_my_thread_var *var) { mysql_mutex_init(key_my_thread_var_mutex, &var->mutex, MY_MUTEX_INIT_FAST); mysql_cond_init(key_my_thread_var_suspend, &var->suspend, NULL); }
O3
c
my_thread_init_thr_mutex: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x35b35d(%rip), %rax # 0x3be768 movl (%rax), %edi leaq 0x40(%rbx), %r14 leaq 0x2daa90(%rip), %r15 # 0x33dea8 movq (%r15), %rax movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x80(%rbx) movq %r14, 0x78(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) leaq 0x35c006(%rip), %rsi # 0x3bf440 movq %r14, %rdi callq 0x36400 leaq 0x35b363(%rip), %rax # 0x3be7ac movl (%rax), %edi leaq 0x8(%rbx), %r14 movq (%r15), %rax movq %r14, %rsi callq *0x60(%rax) movq %rax, 0x38(%rbx) movq %r14, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x36430
my_thread_init_thr_mutex: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi lea rax, key_my_thread_var_mutex mov edi, [rax] lea r14, [rbx+40h] lea r15, PSI_server mov rax, [r15] mov rsi, r14 call qword ptr [rax+40h] mov [rbx+80h], rax mov [rbx+78h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+68h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r14 call _pthread_mutex_init lea rax, key_my_thread_var_suspend mov edi, [rax] lea r14, [rbx+8] mov rax, [r15] mov rsi, r14 call qword ptr [rax+60h] mov [rbx+38h], rax mov rdi, r14 xor esi, esi add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_cond_init
long long my_thread_init_thr_mutex(long long a1) { *(_QWORD *)(a1 + 128) = (*((long long ( **)(_QWORD, long long))PSI_server + 8))( key_my_thread_var_mutex, a1 + 64); *(_QWORD *)(a1 + 120) = a1 + 64; *(_OWORD *)(a1 + 104) = 0LL; pthread_mutex_init(a1 + 64, &my_fast_mutexattr); *(_QWORD *)(a1 + 56) = (*((long long ( **)(_QWORD, long long))PSI_server + 12))( key_my_thread_var_suspend, a1 + 8); return pthread_cond_init(a1 + 8, 0LL); }
my_thread_init_thr_mutex: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x4be768] MOV EDI,dword ptr [RAX] LEA R14,[RBX + 0x40] LEA R15,[0x43dea8] MOV RAX,qword ptr [R15] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x80],RAX MOV qword ptr [RBX + 0x78],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 LEA RSI,[0x4bf440] MOV RDI,R14 CALL 0x00136400 LEA RAX,[0x4be7ac] MOV EDI,dword ptr [RAX] LEA R14,[RBX + 0x8] MOV RAX,qword ptr [R15] MOV RSI,R14 CALL qword ptr [RAX + 0x60] MOV qword ptr [RBX + 0x38],RAX MOV RDI,R14 XOR ESI,ESI ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00136430
void my_thread_init_thr_mutex(long param_1) { pthread_mutex_t *__mutex; int8 uVar1; __mutex = (pthread_mutex_t *)(param_1 + 0x40); uVar1 = (**(code **)(PSI_server + 0x40))(key_my_thread_var_mutex,__mutex); *(int8 *)(param_1 + 0x80) = uVar1; *(pthread_mutex_t **)(param_1 + 0x78) = __mutex; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); uVar1 = (**(code **)(PSI_server + 0x60))(key_my_thread_var_suspend); *(int8 *)(param_1 + 0x38) = uVar1; pthread_cond_init((pthread_cond_t *)(param_1 + 8),(pthread_condattr_t *)0x0); return; }
63,286
blst_p1_to_affine
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e1.c
void blst_p1_to_affine(POINTonE1_affine *out, const POINTonE1 *a) { POINTonE1_to_affine(out, a); }
O3
c
blst_p1_to_affine: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x98, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsi), %rdi leaq 0x26ffb(%rip), %rsi # 0x3fb48 movl $0x30, %edx callq 0x2ff80 testq %rax, %rax jne 0x18b71 leaq -0xa8(%rbp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x18a4a movq %r15, %r14 movl $0xc, %ecx movq %rbx, %rdi movq %r14, %rsi rep movsq (%rsi), %es:(%rdi) addq $0x98, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
blst_p1_to_affine: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 98h mov r14, rsi mov rbx, rdi lea rdi, [rsi+60h] lea rsi, BLS12_381_Rx mov edx, 30h ; '0' call vec_is_equal_16x test rax, rax jnz short loc_18B71 lea r15, [rbp+var_A8] mov rdi, r15 mov rsi, r14 call POINTonE1_from_Jacobian mov r14, r15 loc_18B71: mov ecx, 0Ch mov rdi, rbx mov rsi, r14 rep movsq add rsp, 98h pop rbx pop r14 pop r15 pop rbp retn
long long blst_p1_to_affine(void *a1, long long a2) { _BYTE *v2; // r14 long long result; // rax _BYTE v4[168]; // [rsp+8h] [rbp-A8h] BYREF v2 = (_BYTE *)a2; result = vec_is_equal_16x(a2 + 96, &BLS12_381_Rx, 48LL); if ( !result ) { result = POINTonE1_from_Jacobian((long long)v4, a2); v2 = v4; } qmemcpy(a1, v2, 0x60uLL); return result; }
blst_p1_to_affine: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x98 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSI + 0x60] LEA RSI,[0x13fb48] MOV EDX,0x30 CALL 0x0012ff80 TEST RAX,RAX JNZ 0x00118b71 LEA R15,[RBP + -0xa8] MOV RDI,R15 MOV RSI,R14 CALL 0x00118a4a MOV R14,R15 LAB_00118b71: MOV ECX,0xc MOV RDI,RBX MOV RSI,R14 MOVSQ.REP RDI,RSI ADD RSP,0x98 POP RBX POP R14 POP R15 POP RBP RET
void blst_p1_to_affine(int8 *param_1,int8 *param_2) { long lVar1; int8 *puVar2; byte bVar3; int8 local_b0 [18]; bVar3 = 0; lVar1 = vec_is_equal_16x(param_2 + 0xc,&BLS12_381_Rx,0x30); puVar2 = param_2; if (lVar1 == 0) { puVar2 = local_b0; POINTonE1_from_Jacobian(puVar2,param_2); } for (lVar1 = 0xc; lVar1 != 0; lVar1 = lVar1 + -1) { *param_1 = *puVar2; puVar2 = puVar2 + (ulong)bVar3 * -2 + 1; param_1 = param_1 + (ulong)bVar3 * -2 + 1; } return; }
63,287
google::protobuf::io::Tokenizer::ConsumeLineComment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/tokenizer.cc
void Tokenizer::ConsumeLineComment(std::string* content) { if (content != NULL) RecordTo(content); while (current_char_ != '\0' && current_char_ != '\n') { NextChar(); } TryConsume('\n'); if (content != NULL) StopRecording(); }
O3
cpp
google::protobuf::io::Tokenizer::ConsumeLineComment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx testq %rsi, %rsi je 0x71004 movq %r14, 0xa8(%rbx) movl 0x94(%rbx), %eax movl %eax, 0xb0(%rbx) movzbl 0x80(%rbx), %eax testl %eax, %eax je 0x71023 movq %rbx, %rdi cmpl $0xa, %eax je 0x7101e callq 0x70640 jmp 0x71004 callq 0x70640 testq %r14, %r14 je 0x71069 movl 0x94(%rbx), %eax movslq 0xb0(%rbx), %rcx cmpl %ecx, %eax je 0x71054 movq 0xa8(%rbx), %rdi movq %rcx, %rsi addq 0x88(%rbx), %rsi subl %ecx, %eax movslq %eax, %rdx callq 0x13c5a movq $0x0, 0xa8(%rbx) movl $0xffffffff, 0xb0(%rbx) # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN6google8protobuf2io9Tokenizer18ConsumeLineCommentEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi test rsi, rsi jz short loc_71004 mov [rbx+0A8h], r14 mov eax, [rbx+94h] mov [rbx+0B0h], eax loc_71004: movzx eax, byte ptr [rbx+80h] test eax, eax jz short loc_71023 mov rdi, rbx; this cmp eax, 0Ah jz short loc_7101E call _ZN6google8protobuf2io9Tokenizer8NextCharEv; google::protobuf::io::Tokenizer::NextChar(void) jmp short loc_71004 loc_7101E: call _ZN6google8protobuf2io9Tokenizer8NextCharEv; google::protobuf::io::Tokenizer::NextChar(void) loc_71023: test r14, r14 jz short loc_71069 mov eax, [rbx+94h] movsxd rcx, dword ptr [rbx+0B0h] cmp eax, ecx jz short loc_71054 mov rdi, [rbx+0A8h] mov rsi, rcx add rsi, [rbx+88h] sub eax, ecx movsxd rdx, eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) loc_71054: mov qword ptr [rbx+0A8h], 0 mov dword ptr [rbx+0B0h], 0FFFFFFFFh loc_71069: add rsp, 8 pop rbx pop r14 retn
void google::protobuf::io::Tokenizer::ConsumeLineComment(google::protobuf::io::Tokenizer *this, long long a2) { int v2; // eax long long v3; // rcx if ( a2 ) { *((_QWORD *)this + 21) = a2; *((_DWORD *)this + 44) = *((_DWORD *)this + 37); } while ( *((_BYTE *)this + 128) ) { if ( *((_BYTE *)this + 128) == 10 ) { google::protobuf::io::Tokenizer::NextChar(this); break; } google::protobuf::io::Tokenizer::NextChar(this); } if ( a2 ) { v2 = *((_DWORD *)this + 37); v3 = *((int *)this + 44); if ( v2 != (_DWORD)v3 ) std::string::append(*((_QWORD **)this + 21), (_BYTE *)(*((_QWORD *)this + 17) + v3), v2 - (int)v3); *((_QWORD *)this + 21) = 0LL; *((_DWORD *)this + 44) = -1; } }
ConsumeLineComment: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI TEST RSI,RSI JZ 0x00171004 MOV qword ptr [RBX + 0xa8],R14 MOV EAX,dword ptr [RBX + 0x94] MOV dword ptr [RBX + 0xb0],EAX LAB_00171004: MOVZX EAX,byte ptr [RBX + 0x80] TEST EAX,EAX JZ 0x00171023 MOV RDI,RBX CMP EAX,0xa JZ 0x0017101e CALL 0x00170640 JMP 0x00171004 LAB_0017101e: CALL 0x00170640 LAB_00171023: TEST R14,R14 JZ 0x00171069 MOV EAX,dword ptr [RBX + 0x94] MOVSXD RCX,dword ptr [RBX + 0xb0] CMP EAX,ECX JZ 0x00171054 MOV RDI,qword ptr [RBX + 0xa8] MOV RSI,RCX ADD RSI,qword ptr [RBX + 0x88] SUB EAX,ECX MOVSXD RDX,EAX CALL 0x00113c5a LAB_00171054: MOV qword ptr [RBX + 0xa8],0x0 MOV dword ptr [RBX + 0xb0],0xffffffff LAB_00171069: ADD RSP,0x8 POP RBX POP R14 RET
/* google::protobuf::io::Tokenizer::ConsumeLineComment(std::__cxx11::string*) */ void __thiscall google::protobuf::io::Tokenizer::ConsumeLineComment(Tokenizer *this,string *param_1) { int iVar1; if (param_1 != (string *)0x0) { *(string **)(this + 0xa8) = param_1; *(int4 *)(this + 0xb0) = *(int4 *)(this + 0x94); } do { if (this[0x80] == (Tokenizer)0x0) { LAB_00171023: if (param_1 != (string *)0x0) { iVar1 = *(int *)(this + 0xb0); if (*(int *)(this + 0x94) != iVar1) { std::__cxx11::string::append (*(string **)(this + 0xa8),(char *)((long)iVar1 + *(long *)(this + 0x88)), (long)(*(int *)(this + 0x94) - iVar1)); } *(int8 *)(this + 0xa8) = 0; *(int4 *)(this + 0xb0) = 0xffffffff; } return; } if (this[0x80] == (Tokenizer)0xa) { NextChar(this); goto LAB_00171023; } NextChar(this); } while( true ); }
63,288
stbi__refill_buffer(stbi__context*)
SDL3Lite/dependencies/stb_image.h
static void stbi__refill_buffer(stbi__context *s) { int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen); s->callback_already_read += (int) (s->img_buffer - s->img_buffer_original); if (n == 0) { // at end of file, treat same as if from memory, but need to handle case // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file s->read_from_callbacks = 0; s->img_buffer = s->buffer_start; s->img_buffer_end = s->buffer_start+1; *s->img_buffer = 0; } else { s->img_buffer = s->buffer_start; s->img_buffer_end = s->buffer_start + n; } }
O0
c
stbi__refill_buffer(stbi__context*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x8(%rbp), %rcx movq 0x28(%rcx), %rdi movq -0x8(%rbp), %rsi addq $0x38, %rsi movq -0x8(%rbp), %rcx movl 0x34(%rcx), %edx callq *%rax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movq 0xc0(%rax), %rax movq -0x8(%rbp), %rcx movq 0xd0(%rcx), %rcx subq %rcx, %rax movl %eax, %ecx movq -0x8(%rbp), %rax addl 0xb8(%rax), %ecx movl %ecx, 0xb8(%rax) cmpl $0x0, -0xc(%rbp) jne 0x31ac6 movq -0x8(%rbp), %rax movl $0x0, 0x30(%rax) movq -0x8(%rbp), %rcx addq $0x38, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xc0(%rax) movq -0x8(%rbp), %rcx addq $0x38, %rcx addq $0x1, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xc8(%rax) movq -0x8(%rbp), %rax movq 0xc0(%rax), %rax movb $0x0, (%rax) jmp 0x31af3 movq -0x8(%rbp), %rcx addq $0x38, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xc0(%rax) movq -0x8(%rbp), %rcx addq $0x38, %rcx movslq -0xc(%rbp), %rax addq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xc8(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZL19stbi__refill_bufferP13stbi__context: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rbp+var_8] mov rdi, [rcx+28h] mov rsi, [rbp+var_8] add rsi, 38h ; '8' mov rcx, [rbp+var_8] mov edx, [rcx+34h] call rax mov [rbp+var_C], eax mov rax, [rbp+var_8] mov rax, [rax+0C0h] mov rcx, [rbp+var_8] mov rcx, [rcx+0D0h] sub rax, rcx mov ecx, eax mov rax, [rbp+var_8] add ecx, [rax+0B8h] mov [rax+0B8h], ecx cmp [rbp+var_C], 0 jnz short loc_31AC6 mov rax, [rbp+var_8] mov dword ptr [rax+30h], 0 mov rcx, [rbp+var_8] add rcx, 38h ; '8' mov rax, [rbp+var_8] mov [rax+0C0h], rcx mov rcx, [rbp+var_8] add rcx, 38h ; '8' add rcx, 1 mov rax, [rbp+var_8] mov [rax+0C8h], rcx mov rax, [rbp+var_8] mov rax, [rax+0C0h] mov byte ptr [rax], 0 jmp short loc_31AF3 loc_31AC6: mov rcx, [rbp+var_8] add rcx, 38h ; '8' mov rax, [rbp+var_8] mov [rax+0C0h], rcx mov rcx, [rbp+var_8] add rcx, 38h ; '8' movsxd rax, [rbp+var_C] add rcx, rax mov rax, [rbp+var_8] mov [rax+0C8h], rcx loc_31AF3: add rsp, 10h pop rbp retn
_BYTE * stbi__refill_buffer(long long a1) { _BYTE *result; // rax int v2; // [rsp+4h] [rbp-Ch] v2 = (*(long long ( **)(_QWORD, long long, _QWORD))(a1 + 16))( *(_QWORD *)(a1 + 40), a1 + 56, *(unsigned int *)(a1 + 52)); *(_DWORD *)(a1 + 184) += *(_QWORD *)(a1 + 192) - *(_QWORD *)(a1 + 208); if ( v2 ) { *(_QWORD *)(a1 + 192) = a1 + 56; result = (_BYTE *)a1; *(_QWORD *)(a1 + 200) = v2 + a1 + 56; } else { *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 192) = a1 + 56; *(_QWORD *)(a1 + 200) = a1 + 57; result = *(_BYTE **)(a1 + 192); *result = 0; } return result; }
stbi__refill_buffer: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x28] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x38 MOV RCX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RCX + 0x34] CALL RAX MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xc0] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0xd0] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] ADD ECX,dword ptr [RAX + 0xb8] MOV dword ptr [RAX + 0xb8],ECX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x00131ac6 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x30],0x0 MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x38 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc0],RCX MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x38 ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xc0] MOV byte ptr [RAX],0x0 JMP 0x00131af3 LAB_00131ac6: MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x38 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc0],RCX MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x38 MOVSXD RAX,dword ptr [RBP + -0xc] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc8],RCX LAB_00131af3: ADD RSP,0x10 POP RBP RET
/* stbi__refill_buffer(stbi__context*) */ void stbi__refill_buffer(stbi__context *param_1) { int iVar1; iVar1 = (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x28),param_1 + 0x38,*(int4 *)(param_1 + 0x34)) ; *(int *)(param_1 + 0xb8) = ((int)*(int8 *)(param_1 + 0xc0) - (int)*(int8 *)(param_1 + 0xd0)) + *(int *)(param_1 + 0xb8); if (iVar1 == 0) { *(int4 *)(param_1 + 0x30) = 0; *(stbi__context **)(param_1 + 0xc0) = param_1 + 0x38; *(stbi__context **)(param_1 + 200) = param_1 + 0x39; **(int1 **)(param_1 + 0xc0) = 0; } else { *(stbi__context **)(param_1 + 0xc0) = param_1 + 0x38; *(stbi__context **)(param_1 + 200) = param_1 + (long)iVar1 + 0x38; } return; }
63,289
stbi__refill_buffer(stbi__context*)
SDL3Lite/dependencies/stb_image.h
static void stbi__refill_buffer(stbi__context *s) { int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen); s->callback_already_read += (int) (s->img_buffer - s->img_buffer_original); if (n == 0) { // at end of file, treat same as if from memory, but need to handle case // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file s->read_from_callbacks = 0; s->img_buffer = s->buffer_start; s->img_buffer_end = s->buffer_start+1; *s->img_buffer = 0; } else { s->img_buffer = s->buffer_start; s->img_buffer_end = s->buffer_start + n; } }
O3
c
stbi__refill_buffer(stbi__context*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movq 0x10(%rsp), %rcx movq 0x28(%rcx), %rdi movq 0x10(%rsp), %rsi addq $0x38, %rsi movq 0x10(%rsp), %rcx movl 0x34(%rcx), %edx callq *%rax movl %eax, 0xc(%rsp) movq 0x10(%rsp), %rax movq 0xc0(%rax), %rax movq 0x10(%rsp), %rcx movq 0xd0(%rcx), %rcx subq %rcx, %rax movl %eax, %ecx movq 0x10(%rsp), %rax addl 0xb8(%rax), %ecx movl %ecx, 0xb8(%rax) cmpl $0x0, 0xc(%rsp) jne 0x32162 movq 0x10(%rsp), %rax movl $0x0, 0x30(%rax) movq 0x10(%rsp), %rcx addq $0x38, %rcx movq 0x10(%rsp), %rax movq %rcx, 0xc0(%rax) movq 0x10(%rsp), %rcx addq $0x38, %rcx addq $0x1, %rcx movq 0x10(%rsp), %rax movq %rcx, 0xc8(%rax) movq 0x10(%rsp), %rax movq 0xc0(%rax), %rax movb $0x0, (%rax) jmp 0x32194 movq 0x10(%rsp), %rcx addq $0x38, %rcx movq 0x10(%rsp), %rax movq %rcx, 0xc0(%rax) movq 0x10(%rsp), %rcx addq $0x38, %rcx movslq 0xc(%rsp), %rax addq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0xc8(%rax) addq $0x18, %rsp retq nopl (%rax)
_ZL19stbi__refill_bufferP13stbi__context: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov rax, [rax+10h] mov rcx, [rsp+18h+var_8] mov rdi, [rcx+28h] mov rsi, [rsp+18h+var_8] add rsi, 38h ; '8' mov rcx, [rsp+18h+var_8] mov edx, [rcx+34h] call rax mov [rsp+18h+var_C], eax mov rax, [rsp+18h+var_8] mov rax, [rax+0C0h] mov rcx, [rsp+18h+var_8] mov rcx, [rcx+0D0h] sub rax, rcx mov ecx, eax mov rax, [rsp+18h+var_8] add ecx, [rax+0B8h] mov [rax+0B8h], ecx cmp [rsp+18h+var_C], 0 jnz short loc_32162 mov rax, [rsp+18h+var_8] mov dword ptr [rax+30h], 0 mov rcx, [rsp+18h+var_8] add rcx, 38h ; '8' mov rax, [rsp+18h+var_8] mov [rax+0C0h], rcx mov rcx, [rsp+18h+var_8] add rcx, 38h ; '8' add rcx, 1 mov rax, [rsp+18h+var_8] mov [rax+0C8h], rcx mov rax, [rsp+18h+var_8] mov rax, [rax+0C0h] mov byte ptr [rax], 0 jmp short loc_32194 loc_32162: mov rcx, [rsp+18h+var_8] add rcx, 38h ; '8' mov rax, [rsp+18h+var_8] mov [rax+0C0h], rcx mov rcx, [rsp+18h+var_8] add rcx, 38h ; '8' movsxd rax, [rsp+18h+var_C] add rcx, rax mov rax, [rsp+18h+var_8] mov [rax+0C8h], rcx loc_32194: add rsp, 18h retn
_BYTE * stbi__refill_buffer(long long a1) { _BYTE *result; // rax int v2; // [rsp+Ch] [rbp-Ch] v2 = (*(long long ( **)(_QWORD, long long, _QWORD))(a1 + 16))( *(_QWORD *)(a1 + 40), a1 + 56, *(unsigned int *)(a1 + 52)); *(_DWORD *)(a1 + 184) += *(_QWORD *)(a1 + 192) - *(_QWORD *)(a1 + 208); if ( v2 ) { *(_QWORD *)(a1 + 192) = a1 + 56; result = (_BYTE *)a1; *(_QWORD *)(a1 + 200) = v2 + a1 + 56; } else { *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 192) = a1 + 56; *(_QWORD *)(a1 + 200) = a1 + 57; result = *(_BYTE **)(a1 + 192); *result = 0; } return result; }
stbi__refill_buffer: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RCX + 0x28] MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x38 MOV RCX,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RCX + 0x34] CALL RAX MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0xc0] MOV RCX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RCX + 0xd0] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x10] ADD ECX,dword ptr [RAX + 0xb8] MOV dword ptr [RAX + 0xb8],ECX CMP dword ptr [RSP + 0xc],0x0 JNZ 0x00132162 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x30],0x0 MOV RCX,qword ptr [RSP + 0x10] ADD RCX,0x38 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xc0],RCX MOV RCX,qword ptr [RSP + 0x10] ADD RCX,0x38 ADD RCX,0x1 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xc8],RCX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0xc0] MOV byte ptr [RAX],0x0 JMP 0x00132194 LAB_00132162: MOV RCX,qword ptr [RSP + 0x10] ADD RCX,0x38 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xc0],RCX MOV RCX,qword ptr [RSP + 0x10] ADD RCX,0x38 MOVSXD RAX,dword ptr [RSP + 0xc] ADD RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xc8],RCX LAB_00132194: ADD RSP,0x18 RET
/* stbi__refill_buffer(stbi__context*) */ void stbi__refill_buffer(stbi__context *param_1) { int iVar1; iVar1 = (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x28),param_1 + 0x38,*(int4 *)(param_1 + 0x34)) ; *(int *)(param_1 + 0xb8) = ((int)*(int8 *)(param_1 + 0xc0) - (int)*(int8 *)(param_1 + 0xd0)) + *(int *)(param_1 + 0xb8); if (iVar1 == 0) { *(int4 *)(param_1 + 0x30) = 0; *(stbi__context **)(param_1 + 0xc0) = param_1 + 0x38; *(stbi__context **)(param_1 + 200) = param_1 + 0x39; **(int1 **)(param_1 + 0xc0) = 0; } else { *(stbi__context **)(param_1 + 0xc0) = param_1 + 0x38; *(stbi__context **)(param_1 + 200) = param_1 + (long)iVar1 + 0x38; } return; }
63,290
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
monkey531[P]llama/common/json.hpp
void push_back(basic_json&& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (move semantics) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(std::move(val)); set_parent(m_data.m_value.array->back(), old_capacity); // if val is moved from, basic_json move constructor marks it null, so we do not call the destructor }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x88d1f movb $0x2, (%r14) callq 0x3dae0 movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3d9a6 jmp 0x88d24 cmpl $0x2, %eax jne 0x88d38 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x41daa pushq $0x20 popq %rdi callq 0x23470 movq %rax, %rbx movq %r14, %rdi callq 0x43488 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x2c9c0(%rip), %rsi # 0xb571a leaq 0x10(%rsp), %rdi callq 0x6344b movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x4333c xorl %ebp, %ebp leaq 0x731c3(%rip), %rsi # 0xfbf48 leaq -0x48d74(%rip), %rdx # 0x40018 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241e8 testb %bpl, %bpl jne 0x88dab jmp 0x88db3 movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 movq %r14, %rdi callq 0x23fb0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_88D1F mov byte ptr [r14], 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<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>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_88D24 loc_88D1F: cmp eax, 2 jnz short loc_88D38 loc_88D24: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; 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>>::emplace_back<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> &&) loc_88D38: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_88DAB jmp short loc_88DB3 mov r14, rax loc_88DAB: mov rdi, rbx; void * call ___cxa_free_exception loc_88DB3: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; *(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<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>>>(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return 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>>::emplace_back<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>>( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x00188d1f MOV byte ptr [R14],0x2 CALL 0x0013dae0 MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013d9a6 JMP 0x00188d24 LAB_00188d1f: CMP EAX,0x2 JNZ 0x00188d38 LAB_00188d24: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x00141daa LAB_00188d38: PUSH 0x20 POP RDI CALL 0x00123470 MOV RBX,RAX MOV RDI,R14 CALL 0x00143488 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00188d53: LEA RSI,[0x1b571a] LEA RDI,[RSP + 0x10] CALL 0x0016344b MOV BPL,0x1 LAB_00188d67: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x0014333c XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x140018] MOV RDI,RBX CALL 0x00123f30
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(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>&&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { vector *pvVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; pvVar1 = create<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>>>> (); *(vector **)(this + 8) = pvVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00188d53 to 00188d63 has its CatchHandler @ 00188da8 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 00188d67 to 00188d93 has its CatchHandler @ 00188d94 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>> :: emplace_back<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>> (*(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),param_1); return; }
63,291
lunasvg::parseSelector(std::basic_string_view<char, std::char_traits<char>>&, std::vector<lunasvg::SimpleSelector, std::allocator<lunasvg::SimpleSelector>>&)
dmazzella[P]pylunasvg/lunasvg/source/svgparser.cpp
static bool parseSelector(std::string_view& input, Selector& selector) { auto combinator = SimpleSelector::Combinator::None; do { bool failed = false; SimpleSelector simpleSelector(combinator); if(!parseSimpleSelector(input, simpleSelector, failed)) return !failed && (combinator == SimpleSelector::Combinator::Descendant); selector.push_back(std::move(simpleSelector)); } while(parseCombinator(input, combinator)); return true; }
O0
cpp
lunasvg::parseSelector(std::basic_string_view<char, std::char_traits<char>>&, std::vector<lunasvg::SimpleSelector, std::allocator<lunasvg::SimpleSelector>>&): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movb $0x0, -0x1d(%rbp) movl -0x1c(%rbp), %esi leaq -0x58(%rbp), %rdi movq %rdi, -0x78(%rbp) callq 0x402e0 movq -0x78(%rbp), %rsi movq -0x10(%rbp), %rdi leaq -0x1d(%rbp), %rdx callq 0x3d4e0 movb %al, -0x69(%rbp) jmp 0x3d434 movb -0x69(%rbp), %al testb $0x1, %al jne 0x3d47a jmp 0x3d43d xorl %eax, %eax testb $0x1, -0x1d(%rbp) movb %al, -0x79(%rbp) jne 0x3d452 cmpl $0x1, -0x1c(%rbp) sete %al movb %al, -0x79(%rbp) movb -0x79(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) movl $0x1, -0x68(%rbp) jmp 0x3d490 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) leaq -0x58(%rbp), %rdi callq 0x40350 jmp 0x3d4cd movq -0x18(%rbp), %rdi leaq -0x58(%rbp), %rsi callq 0x40320 jmp 0x3d489 movl $0x0, -0x68(%rbp) leaq -0x58(%rbp), %rdi callq 0x40350 movl -0x68(%rbp), %eax testl %eax, %eax je 0x3d4a4 jmp 0x3d4a2 jmp 0x3d4bf jmp 0x3d4a6 movq -0x10(%rbp), %rdi leaq -0x1c(%rbp), %rsi callq 0x3d610 testb $0x1, %al jne 0x3d40a movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x80, %rsp popq %rbp retq movq -0x60(%rbp), %rdi callq 0xb6c0 nopw %cs:(%rax,%rax)
_ZN7lunasvgL13parseSelectorERSt17basic_string_viewIcSt11char_traitsIcEERSt6vectorINS_14SimpleSelectorESaIS6_EE: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], 0 loc_3D40A: mov [rbp+var_1D], 0 mov esi, [rbp+var_1C] lea rdi, [rbp+var_58] mov [rbp+var_78], rdi call _ZN7lunasvg14SimpleSelectorC2ENS0_10CombinatorE; lunasvg::SimpleSelector::SimpleSelector(lunasvg::SimpleSelector::Combinator) mov rsi, [rbp+var_78] mov rdi, [rbp+var_10] lea rdx, [rbp+var_1D] call _ZN7lunasvgL19parseSimpleSelectorERSt17basic_string_viewIcSt11char_traitsIcEERNS_14SimpleSelectorERb; lunasvg::parseSimpleSelector(std::string_view &,lunasvg::SimpleSelector &,bool &) mov [rbp+var_69], al jmp short $+2 loc_3D434: mov al, [rbp+var_69] test al, 1 jnz short loc_3D47A jmp short $+2 loc_3D43D: xor eax, eax test [rbp+var_1D], 1 mov [rbp+var_79], al jnz short loc_3D452 cmp [rbp+var_1C], 1 setz al mov [rbp+var_79], al loc_3D452: mov al, [rbp+var_79] and al, 1 mov [rbp+var_1], al mov [rbp+var_68], 1 jmp short loc_3D490 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax lea rdi, [rbp+var_58]; this call _ZN7lunasvg14SimpleSelectorD2Ev; lunasvg::SimpleSelector::~SimpleSelector() jmp short loc_3D4CD loc_3D47A: mov rdi, [rbp+var_18] lea rsi, [rbp+var_58] call _ZNSt6vectorIN7lunasvg14SimpleSelectorESaIS1_EE9push_backEOS1_; std::vector<lunasvg::SimpleSelector>::push_back(lunasvg::SimpleSelector&&) jmp short $+2 loc_3D489: mov [rbp+var_68], 0 loc_3D490: lea rdi, [rbp+var_58]; this call _ZN7lunasvg14SimpleSelectorD2Ev; lunasvg::SimpleSelector::~SimpleSelector() mov eax, [rbp+var_68] test eax, eax jz short loc_3D4A4 jmp short $+2 loc_3D4A2: jmp short loc_3D4BF loc_3D4A4: jmp short $+2 loc_3D4A6: mov rdi, [rbp+var_10] lea rsi, [rbp+var_1C] call _ZN7lunasvgL15parseCombinatorERSt17basic_string_viewIcSt11char_traitsIcEERNS_14SimpleSelector10CombinatorE; lunasvg::parseCombinator(std::string_view &,lunasvg::SimpleSelector::Combinator &) test al, 1 jnz loc_3D40A mov [rbp+var_1], 1 loc_3D4BF: mov al, [rbp+var_1] and al, 1 add rsp, 80h pop rbp retn loc_3D4CD: mov rdi, [rbp+var_60] call __Unwind_Resume
char lunasvg::parseSelector(long long a1, long long a2) { bool v3; // [rsp+7h] [rbp-79h] int v4; // [rsp+18h] [rbp-68h] _BYTE v5[59]; // [rsp+28h] [rbp-58h] BYREF char v6; // [rsp+63h] [rbp-1Dh] BYREF unsigned int v7; // [rsp+64h] [rbp-1Ch] BYREF long long v8; // [rsp+68h] [rbp-18h] long long v9; // [rsp+70h] [rbp-10h] char v10; // [rsp+7Fh] [rbp-1h] v9 = a1; v8 = a2; v7 = 0; while ( 1 ) { v6 = 0; lunasvg::SimpleSelector::SimpleSelector(v5, v7); if ( (lunasvg::parseSimpleSelector(v9, v5, &v6) & 1) != 0 ) { std::vector<lunasvg::SimpleSelector>::push_back(v8, v5); v4 = 0; } else { v3 = 0; if ( (v6 & 1) == 0 ) v3 = v7 == 1; v10 = v3; v4 = 1; } lunasvg::SimpleSelector::~SimpleSelector((lunasvg::SimpleSelector *)v5); if ( v4 ) break; if ( (lunasvg::parseCombinator(v9, &v7) & 1) == 0 ) { v10 = 1; return v10 & 1; } } return v10 & 1; }
parseSelector: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],0x0 LAB_0013d40a: MOV byte ptr [RBP + -0x1d],0x0 MOV ESI,dword ptr [RBP + -0x1c] LEA RDI,[RBP + -0x58] MOV qword ptr [RBP + -0x78],RDI CALL 0x001402e0 MOV RSI,qword ptr [RBP + -0x78] MOV RDI,qword ptr [RBP + -0x10] LAB_0013d426: LEA RDX,[RBP + -0x1d] CALL 0x0013d4e0 MOV byte ptr [RBP + -0x69],AL JMP 0x0013d434 LAB_0013d434: MOV AL,byte ptr [RBP + -0x69] TEST AL,0x1 JNZ 0x0013d47a JMP 0x0013d43d LAB_0013d43d: XOR EAX,EAX TEST byte ptr [RBP + -0x1d],0x1 MOV byte ptr [RBP + -0x79],AL JNZ 0x0013d452 CMP dword ptr [RBP + -0x1c],0x1 SETZ AL MOV byte ptr [RBP + -0x79],AL LAB_0013d452: MOV AL,byte ptr [RBP + -0x79] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL MOV dword ptr [RBP + -0x68],0x1 JMP 0x0013d490 LAB_0013d47a: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x58] CALL 0x00140320 LAB_0013d487: JMP 0x0013d489 LAB_0013d489: MOV dword ptr [RBP + -0x68],0x0 LAB_0013d490: LEA RDI,[RBP + -0x58] CALL 0x00140350 MOV EAX,dword ptr [RBP + -0x68] TEST EAX,EAX JZ 0x0013d4a4 JMP 0x0013d4a2 LAB_0013d4a2: JMP 0x0013d4bf LAB_0013d4a4: JMP 0x0013d4a6 LAB_0013d4a6: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x1c] CALL 0x0013d610 TEST AL,0x1 JNZ 0x0013d40a MOV byte ptr [RBP + -0x1],0x1 LAB_0013d4bf: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x80 POP RBP RET
/* lunasvg::parseSelector(std::basic_string_view<char, std::char_traits<char> >&, std::vector<lunasvg::SimpleSelector, std::allocator<lunasvg::SimpleSelector> >&) */ ulong lunasvg::parseSelector(basic_string_view *param_1,vector *param_2) { byte bVar1; ulong uVar2; bool bVar3; bool local_81; SimpleSelector local_60 [59]; bool local_25; int local_24; vector *local_20; basic_string_view *local_18; bool local_9; local_24 = 0; local_20 = param_2; local_18 = param_1; do { local_25 = false; SimpleSelector::SimpleSelector(local_60,local_24); /* try { // try from 0013d426 to 0013d486 has its CatchHandler @ 0013d463 */ bVar1 = parseSimpleSelector(local_18,local_60,&local_25); bVar3 = (bVar1 & 1) != 0; if (bVar3) { std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>::push_back ((vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>> *)local_20 ,local_60); } else { local_81 = (local_25 & 1U) == 0 && local_24 == 1; local_9 = local_81; } SimpleSelector::~SimpleSelector(local_60); uVar2 = 0; if (!bVar3) goto LAB_0013d4bf; uVar2 = parseCombinator(local_18,(Combinator *)&local_24); } while ((uVar2 & 1) != 0); local_9 = true; LAB_0013d4bf: return CONCAT71((int7)(uVar2 >> 8),local_9) & 0xffffffffffffff01; }
63,292
ma_check_print_info
eloqsql/storage/maria/ma_check_standalone.h
void _ma_check_print_info(HA_CHECK *param __attribute__((unused)), const char *fmt,...) { va_list args; DBUG_ENTER("_ma_check_print_info"); DBUG_PRINT("enter", ("format: %s", fmt)); va_start(args,fmt); vfprintf(stdout, fmt, args); fputc('\n',stdout); va_end(args); DBUG_VOID_RETURN; }
O0
c
ma_check_print_info: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp testb %al, %al je 0x2d768 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) jmp 0x2d78e leaq -0x30(%rbp), %rax leaq -0xe0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) movq 0x297817(%rip), %rax # 0x2c4fd0 movq (%rax), %rdi movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0x29780 movq 0x297800(%rip), %rax # 0x2c4fd0 movq (%rax), %rsi movl $0xa, %edi callq 0x29630 leaq -0x30(%rbp), %rax jmp 0x2d7e3 addq $0xe0, %rsp popq %rbp retq nopl (%rax)
_ma_check_print_info: push rbp mov rbp, rsp sub rsp, 0E0h test al, al jz short loc_2D768 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_2D768: 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 jmp short $+2 loc_2D78E: lea rax, [rbp+var_30] lea rcx, [rbp+var_E0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h mov rax, cs:stdout_ptr mov rdi, [rax] mov rsi, [rbp+var_10] lea rdx, [rbp+var_30] call _vfprintf mov rax, cs:stdout_ptr mov rsi, [rax] mov edi, 0Ah call _fputc lea rax, [rbp+var_30] jmp short $+2 loc_2D7E3: add rsp, 0E0h pop rbp retn
_DWORD * ma_check_print_info( 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; vfprintf(stdout, a2, v29); fputc(10LL, stdout); return v29; }
_ma_check_print_info: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 TEST AL,AL JZ 0x0012d768 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_0012d768: 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 JMP 0x0012d78e LAB_0012d78e: LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0xe0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 MOV RAX,qword ptr [0x003c4fd0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x30] CALL 0x00129780 MOV RAX,qword ptr [0x003c4fd0] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x00129630 LEA RAX,[RBP + -0x30] JMP 0x0012d7e3 LAB_0012d7e3: ADD RSP,0xe0 POP RBP RET
int4 * _ma_check_print_info (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,char *param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; 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; char *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; vfprintf(*(FILE **)PTR_stdout_003c4fd0,param_10,&local_38); fputc(10,*(FILE **)PTR_stdout_003c4fd0); return &local_38; }
63,293
ma_pvio_tls_compare_fp
eloqsql/libmariadb/libmariadb/ma_tls.c
static my_bool ma_pvio_tls_compare_fp(const char *cert_fp, unsigned int cert_fp_len, const char *fp, unsigned int fp_len) { char *p= (char *)fp, *c; /* check length */ if (cert_fp_len != 20) return 1; /* We support two formats: 2 digits hex numbers, separated by colons (length=59) 20 * 2 digits hex numbers without separators (length = 40) */ if (fp_len != (strchr(fp, ':') ? 59 : 40)) return 1; for(c= (char *)cert_fp; c < cert_fp + cert_fp_len; c++) { signed char d1, d2; if (*p == ':') p++; if (p - fp > (int)fp_len -1) return 1; if ((d1 = ma_hex2int(*p)) == - 1 || (d2 = ma_hex2int(*(p+1))) == -1 || (char)(d1 * 16 + d2) != *c) return 1; p+= 2; } return 0; }
O3
c
ma_pvio_tls_compare_fp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movb $0x1, %bl cmpl $0x14, %esi jne 0x250ef movl %ecx, %r14d movq %rdx, %r15 movq %rdi, %r12 movq %rdx, %rdi movl $0x3a, %esi callq 0x171d0 testq %rax, %rax movl $0x28, %eax movl $0x3b, %ecx cmovel %eax, %ecx cmpl %r14d, %ecx jne 0x250ef decl %r14d xorl %eax, %eax movq %r15, %rdx xorl %ecx, %ecx cmpb $0x3a, (%rdx) sete %cl addq %rdx, %rcx movq %rcx, %rdx subq %r15, %rdx cmpq %r14, %rdx jg 0x250ef movb (%rcx), %sil leal -0x30(%rsi), %edx cmpb $0xa, %dl jb 0x250a2 leal -0x41(%rsi), %edx cmpb $0x5, %dl ja 0x25094 addb $-0x37, %sil jmp 0x250a0 leal -0x67(%rsi), %edx cmpb $-0x6, %dl jb 0x250ef addb $-0x57, %sil movl %esi, %edx movb 0x1(%rcx), %sil leal -0x30(%rsi), %edi cmpb $0xa, %dil jb 0x250cd leal -0x41(%rsi), %edi cmpb $0x5, %dil ja 0x250be addb $-0x37, %sil jmp 0x250cb leal -0x67(%rsi), %edi cmpb $-0x6, %dil jb 0x250ef addb $-0x57, %sil movl %esi, %edi shlb $0x4, %dl addb %dil, %dl cmpb (%r12,%rax), %dl jne 0x250ef addq $0x2, %rcx incq %rax movq %rcx, %rdx cmpq $0x14, %rax jne 0x25065 xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
ma_pvio_tls_compare_fp: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov bl, 1 cmp esi, 14h jnz loc_250EF mov r14d, ecx mov r15, rdx mov r12, rdi mov rdi, rdx mov esi, 3Ah ; ':' call _strchr test rax, rax mov eax, 28h ; '(' mov ecx, 3Bh ; ';' cmovz ecx, eax cmp ecx, r14d jnz loc_250EF dec r14d xor eax, eax mov rdx, r15 loc_25065: xor ecx, ecx cmp byte ptr [rdx], 3Ah ; ':' setz cl add rcx, rdx mov rdx, rcx sub rdx, r15 cmp rdx, r14 jg short loc_250EF mov sil, [rcx] lea edx, [rsi-30h] cmp dl, 0Ah jb short loc_250A2 lea edx, [rsi-41h] cmp dl, 5 ja short loc_25094 add sil, 0C9h jmp short loc_250A0 loc_25094: lea edx, [rsi-67h] cmp dl, 0FAh jb short loc_250EF add sil, 0A9h loc_250A0: mov edx, esi loc_250A2: mov sil, [rcx+1] lea edi, [rsi-30h] cmp dil, 0Ah jb short loc_250CD lea edi, [rsi-41h] cmp dil, 5 ja short loc_250BE add sil, 0C9h jmp short loc_250CB loc_250BE: lea edi, [rsi-67h] cmp dil, 0FAh jb short loc_250EF add sil, 0A9h loc_250CB: mov edi, esi loc_250CD: shl dl, 4 add dl, dil cmp dl, [r12+rax] jnz short loc_250EF add rcx, 2 inc rax mov rdx, rcx cmp rax, 14h jnz loc_25065 xor ebx, ebx loc_250EF: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ma_pvio_tls_compare_fp(long long a1, int a2, _BYTE *a3, int a4) { unsigned int v4; // ebx long long v8; // rax int v9; // ecx long long v10; // r14 long long v11; // rax _BYTE *v12; // rdx char *v13; // rcx char v14; // si unsigned __int8 v15; // dl unsigned __int8 v16; // si char v17; // si char v18; // di char v19; // si LOBYTE(v4) = 1; if ( a2 == 20 ) { v8 = strchr(a3, 58LL); v9 = 59; if ( !v8 ) v9 = 40; if ( v9 == a4 ) { v10 = (unsigned int)(a4 - 1); v11 = 0LL; v12 = a3; while ( 1 ) { v13 = &v12[*v12 == 58]; if ( v13 - a3 > v10 ) break; v14 = *v13; v15 = *v13 - 48; if ( v15 >= 0xAu ) { if ( (unsigned __int8)(v14 - 65) > 5u ) { if ( (unsigned __int8)(v14 - 103) < 0xFAu ) return v4; v16 = v14 - 87; } else { v16 = v14 - 55; } v15 = v16; } v17 = v13[1]; v18 = v17 - 48; if ( (unsigned __int8)(v17 - 48) >= 0xAu ) { if ( (unsigned __int8)(v17 - 65) > 5u ) { if ( (unsigned __int8)(v17 - 103) < 0xFAu ) return v4; v19 = v17 - 87; } else { v19 = v17 - 55; } v18 = v19; } if ( v18 + 16 * v15 != *(_BYTE *)(a1 + v11) ) break; ++v11; v12 = v13 + 2; if ( v11 == 20 ) return 0; } } } return v4; }
ma_pvio_tls_compare_fp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV BL,0x1 CMP ESI,0x14 JNZ 0x001250ef MOV R14D,ECX MOV R15,RDX MOV R12,RDI MOV RDI,RDX MOV ESI,0x3a CALL 0x001171d0 TEST RAX,RAX MOV EAX,0x28 MOV ECX,0x3b CMOVZ ECX,EAX CMP ECX,R14D JNZ 0x001250ef DEC R14D XOR EAX,EAX MOV RDX,R15 LAB_00125065: XOR ECX,ECX CMP byte ptr [RDX],0x3a SETZ CL ADD RCX,RDX MOV RDX,RCX SUB RDX,R15 CMP RDX,R14 JG 0x001250ef MOV SIL,byte ptr [RCX] LEA EDX,[RSI + -0x30] CMP DL,0xa JC 0x001250a2 LEA EDX,[RSI + -0x41] CMP DL,0x5 JA 0x00125094 ADD SIL,0xc9 JMP 0x001250a0 LAB_00125094: LEA EDX,[RSI + -0x67] CMP DL,0xfa JC 0x001250ef ADD SIL,0xa9 LAB_001250a0: MOV EDX,ESI LAB_001250a2: MOV SIL,byte ptr [RCX + 0x1] LEA EDI,[RSI + -0x30] CMP DIL,0xa JC 0x001250cd LEA EDI,[RSI + -0x41] CMP DIL,0x5 JA 0x001250be ADD SIL,0xc9 JMP 0x001250cb LAB_001250be: LEA EDI,[RSI + -0x67] CMP DIL,0xfa JC 0x001250ef ADD SIL,0xa9 LAB_001250cb: MOV EDI,ESI LAB_001250cd: SHL DL,0x4 ADD DL,DIL CMP DL,byte ptr [R12 + RAX*0x1] JNZ 0x001250ef ADD RCX,0x2 INC RAX MOV RDX,RCX CMP RAX,0x14 JNZ 0x00125065 XOR EBX,EBX LAB_001250ef: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
ulong ma_pvio_tls_compare_fp(long param_1,int param_2,char *param_3,int param_4) { char cVar1; char *pcVar2; long lVar3; int iVar4; int8 unaff_RBX; ulong uVar5; byte bVar6; byte bVar7; uVar5 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1); if (param_2 == 0x14) { pcVar2 = strchr(param_3,0x3a); iVar4 = 0x3b; if (pcVar2 == (char *)0x0) { iVar4 = 0x28; } if (iVar4 == param_4) { lVar3 = 0; pcVar2 = param_3; do { pcVar2 = pcVar2 + (*pcVar2 == ':'); if ((long)(ulong)(param_4 - 1) < (long)pcVar2 - (long)param_3) goto LAB_001250ef; cVar1 = *pcVar2; bVar6 = cVar1 - 0x30; if (9 < bVar6) { if ((byte)(cVar1 + 0xbfU) < 6) { bVar6 = cVar1 - 0x37; } else { if ((byte)(cVar1 + 0x99U) < 0xfa) goto LAB_001250ef; bVar6 = cVar1 + 0xa9; } } cVar1 = pcVar2[1]; bVar7 = cVar1 - 0x30; if (9 < bVar7) { if ((byte)(cVar1 + 0xbfU) < 6) { bVar7 = cVar1 - 0x37; } else { if ((byte)(cVar1 + 0x99U) < 0xfa) goto LAB_001250ef; bVar7 = cVar1 + 0xa9; } } if ((byte)(bVar6 * '\x10' + bVar7) != *(char *)(param_1 + lVar3)) goto LAB_001250ef; pcVar2 = pcVar2 + 2; lVar3 = lVar3 + 1; } while (lVar3 != 0x14); uVar5 = 0; } } LAB_001250ef: return uVar5 & 0xffffffff; }
63,294
plutovg_canvas_text_extents
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c
float plutovg_canvas_text_extents(plutovg_canvas_t* canvas, const void* text, int length, plutovg_text_encoding_t encoding, plutovg_rect_t* extents) { plutovg_state_t* state = canvas->state; if(state->font_face && state->font_size > 0.f) { return plutovg_font_face_text_extents(state->font_face, state->font_size, text, length, encoding, extents); } if(extents) { extents->x = 0.f; extents->y = 0.f; extents->w = 0.f; extents->h = 0.f; } return 0.f; }
O1
c
plutovg_canvas_text_extents: movq 0x18(%rdi), %rax movq 0x8(%rax), %rdi testq %rdi, %rdi je 0x4588 movss 0x88(%rax), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 ja 0x5a12 testq %r8, %r8 je 0x4594 xorps %xmm0, %xmm0 movups %xmm0, (%r8) xorps %xmm0, %xmm0 retq
plutovg_canvas_text_extents: mov rax, [rdi+18h] mov rdi, [rax+8] test rdi, rdi jz short loc_4588 movss xmm0, dword ptr [rax+88h] xorps xmm1, xmm1 ucomiss xmm0, xmm1 ja plutovg_font_face_text_extents loc_4588: test r8, r8 jz short loc_4594 xorps xmm0, xmm0 movups xmmword ptr [r8], xmm0 loc_4594: xorps xmm0, xmm0 retn
long long plutovg_canvas_text_extents(long long a1, long long a2, long long a3, long long a4, _OWORD *a5) { long long result; // rax result = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(result + 8) && *(float *)(result + 136) > 0.0 ) return plutovg_font_face_text_extents(); if ( a5 ) *a5 = 0LL; return result; }
plutovg_canvas_text_extents: MOV RAX,qword ptr [RDI + 0x18] MOV RDI,qword ptr [RAX + 0x8] TEST RDI,RDI JZ 0x00104588 MOVSS XMM0,dword ptr [RAX + 0x88] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JA 0x00105a12 LAB_00104588: TEST R8,R8 JZ 0x00104594 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R8],XMM0 LAB_00104594: XORPS XMM0,XMM0 RET
float plutovg_canvas_text_extents(long param_1) { float fVar1; float fVar2; ushort uVar3; long lVar4; int4 uVar5; long lVar6; float *pfVar7; float *in_R8; bool bVar8; float fVar9; float fVar10; float fVar11; float fVar12; float fVar13; float fStack_60; float fStack_5c; float fStack_58; float fStack_54; float fStack_50; float fStack_4c; int1 auStack_48 [8]; int iStack_40; int iStack_38; lVar4 = *(long *)(*(long *)(param_1 + 0x18) + 8); if ((lVar4 != 0) && (fVar1 = *(float *)(*(long *)(param_1 + 0x18) + 0x88), 0.0 < fVar1)) { plutovg_text_iterator_init(auStack_48); if (iStack_38 < iStack_40) { fVar9 = 0.0; pfVar7 = (float *)0x0; do { uVar5 = plutovg_text_iterator_next(auStack_48); if (in_R8 == (float *)0x0) { uVar3 = *(ushort *)(*(long *)(lVar4 + 0x28) + 0x12 + (long)*(int *)(lVar4 + 0x3c)); fStack_5c = fVar1 / (float)(ushort)(uVar3 << 8 | uVar3 >> 8); lVar6 = plutovg_font_face_get_glyph(lVar4,uVar5); fStack_60 = (float)*(int *)(lVar6 + 0x10) * fStack_5c; } else { plutovg_font_face_get_glyph_metrics(fVar1,lVar4,uVar5,&fStack_60,0,&fStack_58); fStack_58 = fStack_58 + fVar9; if (pfVar7 == (float *)0x0) { *(ulong *)in_R8 = CONCAT44(fStack_54,fStack_58); *(ulong *)(in_R8 + 2) = CONCAT44(fStack_4c,fStack_50); pfVar7 = in_R8; } else { fVar11 = *pfVar7; fVar2 = pfVar7[1]; fVar12 = fVar11; if (fStack_58 <= fVar11) { fVar12 = fStack_58; } fVar13 = fVar2; if (fStack_54 <= fVar2) { fVar13 = fStack_54; } fVar10 = fVar11 + pfVar7[2]; if (fVar11 + pfVar7[2] <= fStack_58 + fStack_50) { fVar10 = fStack_58 + fStack_50; } fVar11 = fVar2 + pfVar7[3]; if (fVar2 + pfVar7[3] <= fStack_54 + fStack_4c) { fVar11 = fStack_54 + fStack_4c; } *pfVar7 = fVar12; pfVar7[1] = fVar13; pfVar7[2] = fVar10 - fVar12; pfVar7[3] = fVar11 - fVar13; } } fVar9 = fVar9 + fStack_60; } while (iStack_38 < iStack_40); bVar8 = pfVar7 != (float *)0x0; } else { fVar9 = 0.0; bVar8 = false; } if (in_R8 != (float *)0x0 && !bVar8) { in_R8[0] = 0.0; in_R8[1] = 0.0; in_R8[2] = 0.0; in_R8[3] = 0.0; } return fVar9; } if (in_R8 != (float *)0x0) { in_R8[0] = 0.0; in_R8[1] = 0.0; in_R8[2] = 0.0; in_R8[3] = 0.0; } return 0.0; }
63,295
LefDefParser::lefwMacroOrigin(double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwMacroOrigin(double xl, double yl) { // optional if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_MACRO_START && lefwState != LEFW_MACRO) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " ORIGIN %.11g %.11g ;\n", xl, yl); else fprintf(lefwFile, " ORIGIN %.11g %.11g ;\n", xl, yl); lefwLines++; lefwState = LEFW_MACRO; return LEFW_OK; }
O0
cpp
LefDefParser::lefwMacroOrigin(double, double): subq $0x18, %rsp movsd %xmm0, 0x8(%rsp) movsd %xmm1, (%rsp) leaq 0x13eba(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x1ef59 movl $0x1, 0x14(%rsp) jmp 0x1f00f leaq 0x140f4(%rip), %rax # 0x33054 cmpl $0x0, (%rax) jne 0x1ef72 movl $0x2, 0x14(%rsp) jmp 0x1f00f leaq 0x140d7(%rip), %rax # 0x33050 cmpl $0x9, (%rax) je 0x1ef94 leaq 0x140cb(%rip), %rax # 0x33050 cmpl $0x21, (%rax) je 0x1ef94 movl $0x2, 0x14(%rsp) jmp 0x1f00f cmpl $0x0, 0x14151(%rip) # 0x330ec je 0x1efc2 leaq 0x13e5c(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 movsd (%rsp), %xmm1 leaq 0xbf91(%rip), %rsi # 0x2af4a movb $0x2, %al callq 0x289b0 jmp 0x1efe5 leaq 0x13e37(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 movsd (%rsp), %xmm1 leaq 0xbf6c(%rip), %rsi # 0x2af4a movb $0x2, %al callq 0x1100 leaq 0x14060(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x14054(%rip), %rax # 0x3304c movl %ecx, (%rax) leaq 0x1404f(%rip), %rax # 0x33050 movl $0x21, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopl (%rax,%rax)
_ZN12LefDefParser15lefwMacroOriginEdd: sub rsp, 18h movsd [rsp+18h+var_10], xmm0 movsd [rsp+18h+var_18], xmm1 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_1EF59 mov [rsp+18h+var_4], 1 jmp loc_1F00F loc_1EF59: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_1EF72 mov [rsp+18h+var_4], 2 jmp loc_1F00F loc_1EF72: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 9 jz short loc_1EF94 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 21h ; '!' jz short loc_1EF94 mov [rsp+18h+var_4], 2 jmp short loc_1F00F loc_1EF94: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_1EFC2 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] movsd xmm1, [rsp+18h+var_18] lea rsi, aOrigin11g11g+2; " ORIGIN %.11g %.11g ;\n" mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1EFE5 loc_1EFC2: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] movsd xmm1, [rsp+18h+var_18] lea rsi, aOrigin11g11g+2; " ORIGIN %.11g %.11g ;\n" mov al, 2 call _fprintf loc_1EFE5: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 21h ; '!' mov [rsp+18h+var_4], 0 loc_1F00F: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwMacroOrigin( LefDefParser *this, double a2, double a3, long long a4, int a5, int a6, int a7, int a8) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwState == 9 || LefDefParser::lefwState == 33 ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" ORIGIN %.11g %.11g ;\n", a5, a6, a7, a8); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ORIGIN %.11g %.11g ;\n", a2, a3); ++LefDefParser::lefwLines; LefDefParser::lefwState = 33; return 0; } else { return 2; } } else { return 2; } } else { return 1; } }
lefwMacroOrigin: SUB RSP,0x18 MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD qword ptr [RSP],XMM1 LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x0011ef59 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0011f00f LAB_0011ef59: LEA RAX,[0x133054] CMP dword ptr [RAX],0x0 JNZ 0x0011ef72 MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011f00f LAB_0011ef72: LEA RAX,[0x133050] CMP dword ptr [RAX],0x9 JZ 0x0011ef94 LEA RAX,[0x133050] CMP dword ptr [RAX],0x21 JZ 0x0011ef94 MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011f00f LAB_0011ef94: CMP dword ptr [0x001330ec],0x0 JZ 0x0011efc2 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [RSP] LEA RSI,[0x12af4a] MOV AL,0x2 CALL 0x001289b0 JMP 0x0011efe5 LAB_0011efc2: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [RSP] LEA RSI,[0x12af4a] MOV AL,0x2 CALL 0x00101100 LAB_0011efe5: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX LEA RAX,[0x133050] MOV dword ptr [RAX],0x21 MOV dword ptr [RSP + 0x14],0x0 LAB_0011f00f: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwMacroOrigin(double, double) */ int4 LefDefParser::lefwMacroOrigin(double param_1,double param_2) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if ((lefwState == 9) || (lefwState == 0x21)) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," ORIGIN %.11g %.11g ;\n",param_1,param_2); } else { encPrint(lefwFile," ORIGIN %.11g %.11g ;\n",param_1,param_2); } lefwLines = lefwLines + 1; lefwState = 0x21; local_4 = 0; } else { local_4 = 2; } return local_4; }
63,296
LefDefParser::lefwDividerChar(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwDividerChar(const char *dividerChar) { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_INIT && lefwState < LEFW_END) return LEFW_BAD_ORDER; // not of the ENDs if (lefwSynArray[LEFW_DIVIDERCHAR]) return LEFW_ALREADY_DEFINED; if (dividerChar && dividerChar != 0 && *dividerChar != 0) { if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "DIVIDERCHAR \"%s\" ;\n", dividerChar); else fprintf(lefwFile, "DIVIDERCHAR \"%s\" ;\n", dividerChar); } lefwLines++; lefwSynArray[LEFW_DIVIDERCHAR] = 1; return LEFW_OK; }
O0
cpp
LefDefParser::lefwDividerChar(char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) leaq 0xacad0(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x18793 movl $0x1, 0x14(%rsp) jmp 0x1887a leaq 0xacd0a(%rip), %rax # 0xc54a4 cmpl $0x0, (%rax) jne 0x187ac movl $0x2, 0x14(%rsp) jmp 0x1887a leaq 0xacced(%rip), %rax # 0xc54a0 cmpl $0x1, (%rax) je 0x187d1 leaq 0xacce1(%rip), %rax # 0xc54a0 cmpl $0x4f, (%rax) jge 0x187d1 movl $0x2, 0x14(%rsp) jmp 0x1887a leaq 0xaca88(%rip), %rax # 0xc5260 cmpl $0x0, 0x64(%rax) je 0x187eb movl $0x4, 0x14(%rsp) jmp 0x1887a cmpq $0x0, 0x8(%rsp) je 0x1884f cmpq $0x0, 0x8(%rsp) je 0x1884f movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x1884f cmpl $0x0, 0xacd2d(%rip) # 0xc553c je 0x18830 leaq 0xaca38(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x79fe1(%rip), %rsi # 0x92808 movb $0x0, %al callq 0x8bf50 jmp 0x1884d leaq 0xaca19(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x79fc2(%rip), %rsi # 0x92808 movb $0x0, %al callq 0x2370 jmp 0x1884f leaq 0xacc46(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0xacc3a(%rip), %rax # 0xc549c movl %ecx, (%rax) leaq 0xac9f5(%rip), %rax # 0xc5260 movl $0x1, 0x64(%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser15lefwDividerCharEPKc: sub rsp, 18h mov [rsp+18h+var_10], rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_18793 mov [rsp+18h+var_4], 1 jmp loc_1887A loc_18793: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_187AC mov [rsp+18h+var_4], 2 jmp loc_1887A loc_187AC: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1 jz short loc_187D1 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 4Fh ; 'O' jge short loc_187D1 mov [rsp+18h+var_4], 2 jmp loc_1887A loc_187D1: lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray cmp dword ptr [rax+64h], 0 jz short loc_187EB mov [rsp+18h+var_4], 4 jmp loc_1887A loc_187EB: cmp [rsp+18h+var_10], 0 jz short loc_1884F cmp [rsp+18h+var_10], 0 jz short loc_1884F mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_1884F cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_18830 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aDividercharS; "DIVIDERCHAR \"%s\" ;\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1884D loc_18830: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aDividercharS; "DIVIDERCHAR \"%s\" ;\n" mov al, 0 call _fprintf loc_1884D: jmp short $+2 loc_1884F: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov dword ptr [rax+64h], 1 mov [rsp+18h+var_4], 0 loc_1887A: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwDividerChar( LefDefParser *this, const char *a2, long long a3, int a4, int a5, int a6) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwState == 1 || LefDefParser::lefwState >= 79 ) { if ( LefDefParser::lefwSynArray[25] ) { return 4; } else { if ( this && *(_BYTE *)this ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"DIVIDERCHAR \"%s\" ;\n", (_DWORD)this, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "DIVIDERCHAR \"%s\" ;\n", (const char *)this); } ++LefDefParser::lefwLines; LefDefParser::lefwSynArray[25] = 1; return 0; } } else { return 2; } } else { return 2; } } else { return 1; } }
lefwDividerChar: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x00118793 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0011887a LAB_00118793: LEA RAX,[0x1c54a4] CMP dword ptr [RAX],0x0 JNZ 0x001187ac MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011887a LAB_001187ac: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x1 JZ 0x001187d1 LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x4f JGE 0x001187d1 MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011887a LAB_001187d1: LEA RAX,[0x1c5260] CMP dword ptr [RAX + 0x64],0x0 JZ 0x001187eb MOV dword ptr [RSP + 0x14],0x4 JMP 0x0011887a LAB_001187eb: CMP qword ptr [RSP + 0x8],0x0 JZ 0x0011884f CMP qword ptr [RSP + 0x8],0x0 JZ 0x0011884f MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0011884f CMP dword ptr [0x001c553c],0x0 JZ 0x00118830 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x192808] MOV AL,0x0 CALL 0x0018bf50 JMP 0x0011884d LAB_00118830: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x192808] MOV AL,0x0 CALL 0x00102370 LAB_0011884d: JMP 0x0011884f LAB_0011884f: LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX LEA RAX,[0x1c5260] MOV dword ptr [RAX + 0x64],0x1 MOV dword ptr [RSP + 0x14],0x0 LAB_0011887a: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwDividerChar(char const*) */ int4 LefDefParser::lefwDividerChar(char *param_1) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if ((lefwState == 1) || (0x4e < lefwState)) { if (lefwSynArray._100_4_ == 0) { if (((param_1 != (char *)0x0) && (param_1 != (char *)0x0)) && (*param_1 != '\0')) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,"DIVIDERCHAR \"%s\" ;\n",param_1); } else { encPrint(lefwFile,"DIVIDERCHAR \"%s\" ;\n",param_1); } } lefwLines = lefwLines + 1; lefwSynArray._100_4_ = 1; local_4 = 0; } else { local_4 = 4; } } else { local_4 = 2; } return local_4; }
63,297
js_object___defineGetter__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object___defineGetter__(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue obj; JSValue prop, value, get, set; int ret, flags; JSAtom atom; prop = argv[0]; value = argv[1]; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) return JS_EXCEPTION; if (check_function(ctx, value)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } flags = JS_PROP_THROW | JS_PROP_HAS_ENUMERABLE | JS_PROP_ENUMERABLE | JS_PROP_HAS_CONFIGURABLE | JS_PROP_CONFIGURABLE; if (magic) { get = JS_UNDEFINED; set = value; flags |= JS_PROP_HAS_SET; } else { get = value; set = JS_UNDEFINED; flags |= JS_PROP_HAS_GET; } ret = JS_DefineProperty(ctx, obj, atom, JS_UNDEFINED, get, set, flags); JS_FreeValue(ctx, obj); JS_FreeAtom(ctx, atom); if (ret < 0) { return JS_EXCEPTION; } else { return JS_UNDEFINED; } }
O1
c
js_object___defineGetter__: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %r9d, 0x3c(%rsp) movq %rdi, %rbx movq (%r8), %r15 movq 0x8(%r8), %rax movq %rax, 0x50(%rsp) movq 0x10(%r8), %rbp movq 0x18(%r8), %r12 callq 0x261c9 movq %rdx, %r14 movl $0x6, %r13d cmpl $0x6, %r14d je 0x70bd9 movq %rax, 0x30(%rsp) movq %rbx, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x4099d testl %eax, %eax je 0x70b20 movq 0x18(%rbx), %rdi movq 0x30(%rsp), %rsi movq %r14, %rdx callq 0x1ccb2 jmp 0x70bd9 movq %rbx, %rdi movq %r15, %rsi movq 0x50(%rsp), %rdx callq 0x2347f testl %eax, %eax je 0x70b0a cmpl $0x0, 0x3c(%rsp) je 0x70b58 movl $0x0, 0x40(%rsp) movq $0x3, 0x48(%rsp) movq %rbp, 0x58(%rsp) movl $0x5505, %ecx # imm = 0x5505 jmp 0x70b75 movq %rbp, 0x40(%rsp) movq %r12, 0x48(%rsp) movl $0x0, 0x58(%rsp) movl $0x4d05, %ecx # imm = 0x4D05 movl $0x3, %r12d movq %r12, 0x60(%rsp) movups 0x58(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x40(%rsp), %xmm0 movups %xmm0, (%rsp) movl %ecx, 0x20(%rsp) movl $0x3, %r9d movq %rbx, %rdi movq 0x30(%rsp), %r12 movq %r12, %rsi movq %r14, %rdx movl %eax, %ebp movl %eax, %ecx xorl %r8d, %r8d callq 0x248a5 movl %eax, %r15d movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r14, %rdx callq 0x1ccb2 movq %rbx, %rdi movl %ebp, %esi callq 0x1fbc4 shrl $0x1f, %r15d leaq (%r15,%r15,2), %r13 addq $0x3, %r13 xorl %eax, %eax movq %r13, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_object___defineGetter__: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_5C], r9d mov rbx, rdi mov r15, [r8] mov rax, [r8+8] mov [rsp+98h+var_48], rax mov rbp, [r8+10h] mov r12, [r8+18h] call JS_ToObject mov r14, rdx mov r13d, 6 cmp r14d, 6 jz loc_70BD9 mov [rsp+98h+var_68], rax mov rdi, rbx mov rsi, rbp mov rdx, r12 call check_function test eax, eax jz short loc_70B20 loc_70B0A: mov rdi, [rbx+18h] mov rsi, [rsp+98h+var_68] mov rdx, r14 call JS_FreeValueRT jmp loc_70BD9 loc_70B20: mov rdi, rbx mov rsi, r15 mov rdx, [rsp+98h+var_48] call JS_ValueToAtom test eax, eax jz short loc_70B0A cmp [rsp+98h+var_5C], 0 jz short loc_70B58 mov dword ptr [rsp+98h+var_58], 0 mov qword ptr [rsp+98h+var_58+8], 3 mov qword ptr [rsp+98h+var_40], rbp mov ecx, 5505h jmp short loc_70B75 loc_70B58: mov qword ptr [rsp+98h+var_58], rbp mov qword ptr [rsp+98h+var_58+8], r12 mov dword ptr [rsp+98h+var_40], 0 mov ecx, 4D05h mov r12d, 3 loc_70B75: mov qword ptr [rsp+98h+var_40+8], r12 movups xmm0, [rsp+98h+var_40] movups [rsp+98h+var_88], xmm0 movups xmm0, [rsp+98h+var_58] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_78], ecx mov r9d, 3 mov rdi, rbx mov r12, [rsp+98h+var_68] mov rsi, r12 mov rdx, r14 mov ebp, eax mov ecx, eax xor r8d, r8d call JS_DefineProperty mov r15d, eax mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r14 call JS_FreeValueRT mov rdi, rbx mov esi, ebp call JS_FreeAtom shr r15d, 1Fh lea r13, [r15+r15*2] add r13, 3 loc_70BD9: xor eax, eax mov rdx, r13 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_object___defineGetter__( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // r15 long long v15; // rbp long long v16; // r12 _DWORD *v17; // rax double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // rdx long long v21; // r14 unsigned int v22; // eax __m128 v23; // xmm4 __m128 v24; // xmm5 unsigned int v25; // ecx int v26; // ebp _DWORD *v28; // [rsp+30h] [rbp-68h] int v29; // [rsp+3Ch] [rbp-5Ch] __m128 v30; // [rsp+40h] [rbp-58h] long long v31; // [rsp+50h] [rbp-48h] _DWORD *v32; // [rsp+58h] [rbp-40h] v29 = a6; v14 = *a5; v31 = a5[1]; v15 = a5[2]; v16 = a5[3]; v17 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v21 = v20; if ( (_DWORD)v20 != 6 ) { v28 = v17; if ( (unsigned int)check_function(a1, v15, v16, a7, a8, a9, a10, v18, v19, a13, a14) || (v22 = JS_ValueToAtom(a1, v14, v31)) == 0 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v28, v21); } else { if ( v29 ) { v30.m128_i32[0] = 0; v30.m128_u64[1] = 3LL; v32 = (_DWORD *)v15; v25 = 21765; } else { v30.m128_u64[0] = v15; v30.m128_u64[1] = v16; LODWORD(v32) = 0; v25 = 19717; v16 = 3LL; } v26 = v22; JS_DefineProperty( a1, (unsigned long long)v28, v21, v22, 0LL, 3LL, v30, a8, a9, a10, v23, v24, a13, a14, v30.m128_u64[0], v30.m128_i64[1], v32, v16, v25); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v28, v21); JS_FreeAtom(a1, v26); } } return 0LL; }
js_object___defineGetter__: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0x3c],R9D MOV RBX,RDI MOV R15,qword ptr [R8] MOV RAX,qword ptr [R8 + 0x8] MOV qword ptr [RSP + 0x50],RAX MOV RBP,qword ptr [R8 + 0x10] MOV R12,qword ptr [R8 + 0x18] CALL 0x001261c9 MOV R14,RDX MOV R13D,0x6 CMP R14D,0x6 JZ 0x00170bd9 MOV qword ptr [RSP + 0x30],RAX MOV RDI,RBX MOV RSI,RBP MOV RDX,R12 CALL 0x0014099d TEST EAX,EAX JZ 0x00170b20 LAB_00170b0a: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,R14 CALL 0x0011ccb2 JMP 0x00170bd9 LAB_00170b20: MOV RDI,RBX MOV RSI,R15 MOV RDX,qword ptr [RSP + 0x50] CALL 0x0012347f TEST EAX,EAX JZ 0x00170b0a CMP dword ptr [RSP + 0x3c],0x0 JZ 0x00170b58 MOV dword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x48],0x3 MOV qword ptr [RSP + 0x58],RBP MOV ECX,0x5505 JMP 0x00170b75 LAB_00170b58: MOV qword ptr [RSP + 0x40],RBP MOV qword ptr [RSP + 0x48],R12 MOV dword ptr [RSP + 0x58],0x0 MOV ECX,0x4d05 MOV R12D,0x3 LAB_00170b75: MOV qword ptr [RSP + 0x60],R12 MOVUPS XMM0,xmmword ptr [RSP + 0x58] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],ECX MOV R9D,0x3 MOV RDI,RBX MOV R12,qword ptr [RSP + 0x30] MOV RSI,R12 MOV RDX,R14 MOV EBP,EAX MOV ECX,EAX XOR R8D,R8D CALL 0x001248a5 MOV R15D,EAX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R14 CALL 0x0011ccb2 MOV RDI,RBX MOV ESI,EBP CALL 0x0011fbc4 SHR R15D,0x1f LEA R13,[R15 + R15*0x2] ADD R13,0x3 LAB_00170bd9: XOR EAX,EAX MOV RDX,R13 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_object___defineGetter__(long param_1) { int8 uVar1; ulong uVar2; int8 uVar3; int iVar4; uint uVar5; int4 uVar6; int8 *in_R8; int in_R9D; int8 uVar7; ulong uVar8; int1 auVar9 [16]; ulong local_58; int8 uStack_50; ulong local_40; uVar7 = *in_R8; uVar1 = in_R8[1]; uVar2 = in_R8[2]; uVar3 = in_R8[3]; auVar9 = JS_ToObject(); auVar9._8_8_ = auVar9._8_8_; auVar9._0_8_ = auVar9._0_8_; uVar8 = 6; if (auVar9._8_4_ != 6) { iVar4 = check_function(param_1,uVar2,uVar3); if (iVar4 == 0) { iVar4 = JS_ValueToAtom(param_1,uVar7,uVar1); if (iVar4 != 0) { if (in_R9D == 0) { local_40 = local_40 & 0xffffffff00000000; uVar6 = 0x4d05; uVar7 = 3; local_58 = uVar2; uStack_50 = uVar3; } else { local_58 = 0; uStack_50 = 3; uVar6 = 0x5505; uVar7 = uVar3; local_40 = uVar2; } uVar5 = JS_DefineProperty(param_1,auVar9._0_8_,auVar9._8_8_,iVar4,0,3,(int4)local_58, (int4)uStack_50,local_40,uVar7,uVar6); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_); JS_FreeAtom(param_1,iVar4); uVar8 = (ulong)(uVar5 >> 0x1f) * 3 + 3; goto LAB_00170bd9; } } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_); } LAB_00170bd9: auVar9._8_8_ = 0; auVar9._0_8_ = uVar8; return auVar9 << 0x40; }
63,298
js_object___defineGetter__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object___defineGetter__(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue obj; JSValue prop, value, get, set; int ret, flags; JSAtom atom; prop = argv[0]; value = argv[1]; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) return JS_EXCEPTION; if (check_function(ctx, value)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } flags = JS_PROP_THROW | JS_PROP_HAS_ENUMERABLE | JS_PROP_ENUMERABLE | JS_PROP_HAS_CONFIGURABLE | JS_PROP_CONFIGURABLE; if (magic) { get = JS_UNDEFINED; set = value; flags |= JS_PROP_HAS_SET; } else { get = value; set = JS_UNDEFINED; flags |= JS_PROP_HAS_GET; } ret = JS_DefineProperty(ctx, obj, atom, JS_UNDEFINED, get, set, flags); JS_FreeValue(ctx, obj); JS_FreeAtom(ctx, atom); if (ret < 0) { return JS_EXCEPTION; } else { return JS_UNDEFINED; } }
O3
c
js_object___defineGetter__: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %r9d, 0x44(%rsp) movq %rdi, %r15 movq (%r8), %r14 movq 0x8(%r8), %rbx movq 0x10(%r8), %rbp movq 0x18(%r8), %r13 callq 0x268d8 movl $0x6, %r12d cmpl $0x6, %edx je 0x73242 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq %r15, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x42327 testl %eax, %eax je 0x73171 movq 0x38(%rsp), %rdx cmpl $-0x9, %edx jb 0x73242 movq 0x18(%r15), %rdi movq 0x30(%rsp), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x73242 callq 0x20d90 jmp 0x73242 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x23ad1 testl %eax, %eax je 0x73256 movl %eax, %r14d cmpl $0x0, 0x44(%rsp) je 0x731ae movl $0x0, 0x48(%rsp) movq $0x3, 0x50(%rsp) movq %rbp, 0x58(%rsp) movl $0x5505, %eax # imm = 0x5505 jmp 0x731cb movq %rbp, 0x48(%rsp) movq %r13, 0x50(%rsp) movl $0x0, 0x58(%rsp) movl $0x4d05, %eax # imm = 0x4D05 movl $0x3, %r13d movq %r13, 0x60(%rsp) movups 0x58(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) movl %eax, 0x20(%rsp) movl $0x3, %r9d movq %r15, %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rbx movq %rbx, %rdx movl %r14d, %ecx xorl %r8d, %r8d callq 0x24e8c movq 0x30(%rsp), %rsi movq %rbx, %rdx movl %eax, %ebx cmpl $-0x9, %edx jb 0x7322c movq 0x18(%r15), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x7322c callq 0x20d90 movq %r15, %rdi movl %r14d, %esi callq 0x202f5 shrl $0x1f, %ebx leaq (%rbx,%rbx,2), %r12 addq $0x3, %r12 xorl %eax, %eax movq %r12, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $-0x9, 0x38(%rsp) jb 0x73242 movq 0x18(%r15), %rdi movq 0x30(%rsp), %rdx movl (%rdx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rdx) cmpl $0x1, %eax jg 0x73242 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx jmp 0x73167
js_object___defineGetter__: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_54], r9d mov r15, rdi mov r14, [r8] mov rbx, [r8+8] mov rbp, [r8+10h] mov r13, [r8+18h] call JS_ToObject mov r12d, 6 cmp edx, 6 jz loc_73242 mov [rsp+98h+var_68], rax mov [rsp+98h+var_60], rdx mov rdi, r15 mov rsi, rbp mov rdx, r13 call check_function test eax, eax jz short loc_73171 mov rdx, [rsp+98h+var_60] cmp edx, 0FFFFFFF7h jb loc_73242 mov rdi, [r15+18h] mov rsi, [rsp+98h+var_68] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg loc_73242 loc_73167: call js_free_value_rt jmp loc_73242 loc_73171: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_ValueToAtom test eax, eax jz loc_73256 mov r14d, eax cmp [rsp+98h+var_54], 0 jz short loc_731AE mov dword ptr [rsp+98h+var_50], 0 mov qword ptr [rsp+98h+var_50+8], 3 mov qword ptr [rsp+98h+var_40], rbp mov eax, 5505h jmp short loc_731CB loc_731AE: mov qword ptr [rsp+98h+var_50], rbp mov qword ptr [rsp+98h+var_50+8], r13 mov dword ptr [rsp+98h+var_40], 0 mov eax, 4D05h mov r13d, 3 loc_731CB: mov qword ptr [rsp+98h+var_40+8], r13 movups xmm0, [rsp+98h+var_40] movups [rsp+98h+var_88], xmm0 movups xmm0, [rsp+98h+var_50] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_78], eax mov r9d, 3 mov rdi, r15 mov rsi, [rsp+98h+var_68] mov rbx, [rsp+98h+var_60] mov rdx, rbx mov ecx, r14d xor r8d, r8d call JS_DefineProperty mov rsi, [rsp+98h+var_68] mov rdx, rbx mov ebx, eax cmp edx, 0FFFFFFF7h jb short loc_7322C mov rdi, [r15+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_7322C call js_free_value_rt loc_7322C: mov rdi, r15 mov esi, r14d call JS_FreeAtom shr ebx, 1Fh lea r12, [rbx+rbx*2] add r12, 3 loc_73242: xor eax, eax mov rdx, r12 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_73256: cmp dword ptr [rsp+98h+var_60], 0FFFFFFF7h jb short loc_73242 mov rdi, [r15+18h] mov rdx, [rsp+98h+var_68] mov eax, [rdx] lea ecx, [rax-1] mov [rdx], ecx cmp eax, 1 jg short loc_73242 mov rsi, [rsp+98h+var_68] mov rdx, [rsp+98h+var_60] jmp loc_73167
long long js_object___defineGetter__( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v15; // r14 long long v16; // rbx long long v17; // rbp long long v18; // r13 long long v19; // rax long long v20; // rdx long long v21; // rcx long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 long long v26; // r8 long long v27; // r9 long long v28; // rdx long long v29; // rdi _QWORD *v30; // rsi int v31; // eax long long v32; // rcx unsigned int v33; // eax __m128 v34; // xmm4 __m128 v35; // xmm5 unsigned int v36; // r14d unsigned int v37; // eax long long v38; // r8 long long v39; // r9 long long v40; // rdi int v41; // eax long long v42; // rcx int v44; // eax _QWORD *v45; // [rsp+30h] [rbp-68h] long long v46; // [rsp+38h] [rbp-60h] int v47; // [rsp+44h] [rbp-54h] __m128 v48; // [rsp+48h] [rbp-50h] long long v49; // [rsp+58h] [rbp-40h] v47 = a6; v15 = *a5; v16 = a5[1]; v17 = a5[2]; v18 = a5[3]; v19 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( (_DWORD)v20 != 6 ) { v45 = (_QWORD *)v19; v46 = v20; if ( (unsigned int)check_function(a1, v17, v18, v21, v22, v23, a7, a8, a9, a10, v24, v25, a13, a14) ) { v28 = v46; if ( (unsigned int)v46 >= 0xFFFFFFF7 ) { v29 = *(_QWORD *)(a1 + 24); v30 = v45; v31 = *(_DWORD *)v45; v32 = (unsigned int)(*(_DWORD *)v45 - 1); *(_DWORD *)v45 = v32; if ( v31 <= 1 ) goto LABEL_5; } } else { v33 = JS_ValueToAtom(a1, v15, v16); if ( v33 ) { v36 = v33; if ( v47 ) { v48.m128_i32[0] = 0; v48.m128_u64[1] = 3LL; v49 = v17; v37 = 21765; } else { v48.m128_u64[0] = v17; v48.m128_u64[1] = v18; LODWORD(v49) = 0; v37 = 19717; v18 = 3LL; } JS_DefineProperty( a1, (long long)v45, v46, v36, 0LL, 3LL, v48, a8, a9, a10, v34, v35, a13, a14, *(double *)v48.m128_u64, v48.m128_i64[1], v49, v18, v37); if ( (unsigned int)v46 >= 0xFFFFFFF7 ) { v40 = *(_QWORD *)(a1 + 24); v41 = *(_DWORD *)v45; v42 = (unsigned int)(*(_DWORD *)v45 - 1); *(_DWORD *)v45 = v42; if ( v41 <= 1 ) js_free_value_rt(v40, v45, v46, v42, v38, v39); } JS_FreeAtom(a1, v36); } else if ( (unsigned int)v46 >= 0xFFFFFFF7 ) { v29 = *(_QWORD *)(a1 + 24); v44 = *(_DWORD *)v45; v32 = (unsigned int)(*(_DWORD *)v45 - 1); *(_DWORD *)v45 = v32; if ( v44 <= 1 ) { v30 = v45; v28 = v46; LABEL_5: js_free_value_rt(v29, v30, v28, v32, v26, v27); } } } } return 0LL; }
js_object___defineGetter__: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0x44],R9D MOV R15,RDI MOV R14,qword ptr [R8] MOV RBX,qword ptr [R8 + 0x8] MOV RBP,qword ptr [R8 + 0x10] MOV R13,qword ptr [R8 + 0x18] CALL 0x001268d8 MOV R12D,0x6 CMP EDX,0x6 JZ 0x00173242 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RDI,R15 MOV RSI,RBP MOV RDX,R13 CALL 0x00142327 TEST EAX,EAX JZ 0x00173171 MOV RDX,qword ptr [RSP + 0x38] CMP EDX,-0x9 JC 0x00173242 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00173242 LAB_00173167: CALL 0x00120d90 JMP 0x00173242 LAB_00173171: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00123ad1 TEST EAX,EAX JZ 0x00173256 MOV R14D,EAX CMP dword ptr [RSP + 0x44],0x0 JZ 0x001731ae MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x3 MOV qword ptr [RSP + 0x58],RBP MOV EAX,0x5505 JMP 0x001731cb LAB_001731ae: MOV qword ptr [RSP + 0x48],RBP MOV qword ptr [RSP + 0x50],R13 MOV dword ptr [RSP + 0x58],0x0 MOV EAX,0x4d05 MOV R13D,0x3 LAB_001731cb: MOV qword ptr [RSP + 0x60],R13 MOVUPS XMM0,xmmword ptr [RSP + 0x58] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],EAX MOV R9D,0x3 MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x30] MOV RBX,qword ptr [RSP + 0x38] MOV RDX,RBX MOV ECX,R14D XOR R8D,R8D CALL 0x00124e8c MOV RSI,qword ptr [RSP + 0x30] MOV RDX,RBX MOV EBX,EAX CMP EDX,-0x9 JC 0x0017322c MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0017322c CALL 0x00120d90 LAB_0017322c: MOV RDI,R15 MOV ESI,R14D CALL 0x001202f5 SHR EBX,0x1f LEA R12,[RBX + RBX*0x2] ADD R12,0x3 LAB_00173242: XOR EAX,EAX MOV RDX,R12 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00173256: CMP dword ptr [RSP + 0x38],-0x9 JC 0x00173242 MOV RDI,qword ptr [R15 + 0x18] MOV RDX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RDX] LEA ECX,[RAX + -0x1] MOV dword ptr [RDX],ECX CMP EAX,0x1 JG 0x00173242 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] JMP 0x00173167
int1 [16] js_object___defineGetter__(long param_1) { int iVar1; int8 uVar2; ulong uVar3; int8 uVar4; int iVar5; int4 uVar6; uint uVar7; uint uVar8; int8 *in_R8; int in_R9D; ulong uVar9; int8 uVar10; int1 auVar11 [16]; ulong local_50; int8 uStack_48; ulong local_40; uVar10 = *in_R8; uVar2 = in_R8[1]; uVar3 = in_R8[2]; uVar4 = in_R8[3]; auVar11 = JS_ToObject(); auVar11._0_8_ = auVar11._0_8_; uVar9 = 6; uVar8 = auVar11._8_4_; if (uVar8 == 6) goto LAB_00173242; iVar5 = check_function(param_1,uVar3,uVar4); if (iVar5 == 0) { iVar5 = JS_ValueToAtom(param_1,uVar10,uVar2); if (iVar5 != 0) { if (in_R9D == 0) { local_40 = local_40 & 0xffffffff00000000; uVar6 = 0x4d05; uVar10 = 3; local_50 = uVar3; uStack_48 = uVar4; } else { local_50 = 0; uStack_48 = 3; uVar6 = 0x5505; uVar10 = uVar4; local_40 = uVar3; } uVar7 = JS_DefineProperty(param_1,auVar11._0_8_,auVar11._8_8_,iVar5,0,3,(int4)local_50, (int4)uStack_48,local_40,uVar10,uVar6); if (0xfffffff6 < uVar8) { uVar10 = *(int8 *)(param_1 + 0x18); iVar1 = *auVar11._0_8_; *auVar11._0_8_ = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar10); } } JS_FreeAtom(param_1,iVar5); uVar9 = (ulong)(uVar7 >> 0x1f) * 3 + 3; goto LAB_00173242; } if (uVar8 < 0xfffffff7) goto LAB_00173242; uVar10 = *(int8 *)(param_1 + 0x18); iVar5 = *auVar11._0_8_; *auVar11._0_8_ = iVar5 + -1; } else { if (uVar8 < 0xfffffff7) goto LAB_00173242; uVar10 = *(int8 *)(param_1 + 0x18); iVar5 = *auVar11._0_8_; *auVar11._0_8_ = iVar5 + -1; } if (iVar5 < 2) { js_free_value_rt(uVar10,auVar11._0_8_,auVar11._8_8_); } LAB_00173242: auVar11._8_8_ = 0; auVar11._0_8_ = uVar9; return auVar11 << 0x40; }
63,299
set_default_charset
eloqsql/libmariadb/libmariadb/mariadb_charset.c
my_bool set_default_charset(uint cs, myf flags __attribute__((unused))) { MARIADB_CHARSET_INFO *new_charset; new_charset = mysql_get_charset_by_nr(cs); if (!new_charset) { return(TRUE); /* error */ } ma_default_charset_info = new_charset; return(FALSE); }
O0
c
set_default_charset: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl -0x8(%rbp), %edi callq 0x614a0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x61567 movb $0x1, -0x1(%rbp) jmp 0x61579 movq -0x18(%rbp), %rcx leaq 0x217e6(%rip), %rax # 0x82d58 movq %rcx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
set_default_charset: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], edi mov [rbp+var_C], esi mov edi, [rbp+var_8] call mysql_get_charset_by_nr mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_61567 mov [rbp+var_1], 1 jmp short loc_61579 loc_61567: mov rcx, [rbp+var_18] lea rax, ma_default_charset_info mov [rax], rcx mov [rbp+var_1], 0 loc_61579: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char set_default_charset(int a1) { char *charset_by_nr; // [rsp+8h] [rbp-18h] charset_by_nr = mysql_get_charset_by_nr(a1); if ( !charset_by_nr ) return 1; ma_default_charset_info = charset_by_nr; return 0; }
set_default_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],ESI MOV EDI,dword ptr [RBP + -0x8] CALL 0x001614a0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00161567 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00161579 LAB_00161567: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x182d58] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_00161579: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int8 set_default_charset(int4 param_1) { long lVar1; int8 *puVar2; bool local_9; lVar1 = mysql_get_charset_by_nr(param_1); if (lVar1 != 0) { puVar2 = &ma_default_charset_info; ma_default_charset_info = lVar1; } else { puVar2 = (int8 *)0x0; } local_9 = lVar1 == 0; return CONCAT71((int7)((ulong)puVar2 >> 8),local_9); }