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
53,000
ggml_div_impl
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
static struct ggml_tensor * ggml_div_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, bool inplace) { GGML_ASSERT(ggml_can_repeat(b, a)); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); result->op = GGML_OP_DIV; result->src[0] = a; result->src[1] = b; return result; }
O3
c
ggml_div_impl: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rdx, %rdi callq 0x175c0 testb %al, %al je 0x1b1e3 testb %bpl, %bpl je 0x1b1a9 movq %r15, %rdi movq %r14, %rsi callq 0x16260 jmp 0x1b1c3 movl (%r14), %esi leaq 0x10(%r14), %rcx movq %r15, %rdi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1a57f movl $0x7, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x31429(%rip), %rdi # 0x4c613 leaq 0x31474(%rip), %rdx # 0x4c665 leaq 0x3168c(%rip), %rcx # 0x4c884 movl $0x806, %esi # imm = 0x806 xorl %eax, %eax callq 0x17cd0
ggml_div_impl: push rbp push r15 push r14 push rbx push rax mov ebp, ecx mov rbx, rdx mov r14, rsi mov r15, rdi mov rdi, rdx call _ggml_can_repeat test al, al jz short loc_1B1E3 test bpl, bpl jz short loc_1B1A9 mov rdi, r15 mov rsi, r14 call _ggml_view_tensor jmp short loc_1B1C3 loc_1B1A9: mov esi, [r14] lea rcx, [r14+10h] mov rdi, r15 mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_1B1C3: mov dword ptr [rax+50h], 7 mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_1B1E3: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatB; "ggml_can_repeat(b, a)" mov esi, 806h xor eax, eax call _ggml_abort
long long ggml_div_impl(long long a1, long long *a2, _QWORD *a3, char a4, double a5) { int v7; // r8d int v8; // r9d long long result; // rax if ( !ggml_can_repeat(a3, a2) ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2054, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"ggml_can_repeat(b, a)", v7, v8); if ( a4 ) result = ggml_view_tensor(a1, (long long)a2, a5); else result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, a2 + 2, 0LL, 0LL, a5); *(_DWORD *)(result + 80) = 7; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_div_impl: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ECX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RDI,RDX CALL 0x001175c0 TEST AL,AL JZ 0x0011b1e3 TEST BPL,BPL JZ 0x0011b1a9 MOV RDI,R15 MOV RSI,R14 CALL 0x00116260 JMP 0x0011b1c3 LAB_0011b1a9: MOV ESI,dword ptr [R14] LEA RCX,[R14 + 0x10] MOV RDI,R15 MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011a57f LAB_0011b1c3: MOV dword ptr [RAX + 0x50],0x7 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0011b1e3: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c884] MOV ESI,0x806 XOR EAX,EAX CALL 0x00117cd0
void ggml_div_impl(int8 param_1,int4 *param_2,int8 param_3,char param_4) { char cVar1; long lVar2; cVar1 = ggml_can_repeat(param_3); if (cVar1 != '\0') { if (param_4 == '\0') { lVar2 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0); } else { lVar2 = ggml_view_tensor(param_1,param_2); } *(int4 *)(lVar2 + 0x50) = 7; *(int4 **)(lVar2 + 0x98) = param_2; *(int8 *)(lVar2 + 0xa0) = param_3; return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x806,"GGML_ASSERT(%s) failed","ggml_can_repeat(b, a)"); }
53,001
ring_buffer<int>::push_back(int const&)
monkey531[P]llama/common/sampling.cpp
void push_back(const T & value) { if (sz == capacity) { // advance the start when buffer is full first = (first + 1) % capacity; } else { sz++; } data[pos] = value; pos = (pos + 1) % capacity; }
O2
cpp
ring_buffer<int>::push_back(int const&): movq (%rdi), %rcx movq 0x8(%rdi), %r8 cmpq %rcx, %r8 jne 0x9840e movq 0x10(%rdi), %rax incq %rax xorl %edx, %edx divq %r8 movq %rdx, 0x10(%rdi) jmp 0x98415 incq %r8 movq %r8, 0x8(%rdi) movl (%rsi), %edx movq 0x18(%rdi), %rax movq 0x20(%rdi), %rsi movl %edx, (%rsi,%rax,4) incq %rax xorl %edx, %edx divq %rcx movq %rdx, 0x18(%rdi) retq nop
_ZN11ring_bufferIiE9push_backERKi: mov rcx, [rdi] mov r8, [rdi+8] cmp r8, rcx jnz short loc_9840E mov rax, [rdi+10h] inc rax xor edx, edx div r8 mov [rdi+10h], rdx jmp short loc_98415 loc_9840E: inc r8 mov [rdi+8], r8 loc_98415: mov edx, [rsi] mov rax, [rdi+18h] mov rsi, [rdi+20h] mov [rsi+rax*4], edx inc rax xor edx, edx div rcx mov [rdi+18h], rdx retn
unsigned long long ring_buffer<int>::push_back(unsigned long long *a1, _DWORD *a2) { unsigned long long v2; // rcx unsigned long long v3; // r8 unsigned long long v4; // rax unsigned long long result; // rax unsigned long long v6; // rtt v2 = *a1; v3 = a1[1]; if ( v3 == *a1 ) a1[2] = (a1[2] + 1) % v3; else a1[1] = v3 + 1; v4 = a1[3]; *(_DWORD *)(a1[4] + 4 * v4) = *a2; v6 = v4 + 1; result = (v4 + 1) / v2; a1[3] = v6 % v2; return result; }
push_back: MOV RCX,qword ptr [RDI] MOV R8,qword ptr [RDI + 0x8] CMP R8,RCX JNZ 0x0019840e MOV RAX,qword ptr [RDI + 0x10] INC RAX XOR EDX,EDX DIV R8 MOV qword ptr [RDI + 0x10],RDX JMP 0x00198415 LAB_0019840e: INC R8 MOV qword ptr [RDI + 0x8],R8 LAB_00198415: MOV EDX,dword ptr [RSI] MOV RAX,qword ptr [RDI + 0x18] MOV RSI,qword ptr [RDI + 0x20] MOV dword ptr [RSI + RAX*0x4],EDX INC RAX XOR EDX,EDX DIV RCX MOV qword ptr [RDI + 0x18],RDX RET
/* ring_buffer<int>::push_back(int const&) */ ulong __thiscall ring_buffer<int>::push_back(ring_buffer<int> *this,int *param_1) { ulong uVar1; long lVar2; ulong uVar3; uVar1 = *(ulong *)this; uVar3 = *(ulong *)(this + 8); if (uVar3 == uVar1) { *(ulong *)(this + 0x10) = (*(long *)(this + 0x10) + 1U) % uVar3; } else { *(ulong *)(this + 8) = uVar3 + 1; } lVar2 = *(long *)(this + 0x18); *(int *)(*(long *)(this + 0x20) + lVar2 * 4) = *param_1; uVar3 = lVar2 + 1; *(ulong *)(this + 0x18) = uVar3 % uVar1; return uVar3 / uVar1; }
53,002
ma_apply_redo_purge_row_head_or_tail
eloqsql/storage/maria/ma_blockrec.c
uint _ma_apply_redo_purge_row_head_or_tail(MARIA_HA *info, LSN lsn, uint page_type, const uchar *header) { MARIA_SHARE *share= info->s; pgcache_page_no_t page; uint rownr, empty_space; uchar *buff; int result; uint error; MARIA_PINNED_PAGE page_link; DBUG_ENTER("_ma_apply_redo_purge_row_head_or_tail"); page= page_korr(header); rownr= dirpos_korr(header+PAGE_STORE_SIZE); DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u", (ulong) ma_recordpos(page, rownr), (ulong) page, rownr)); share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); if (!(buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE, &page_link.link))) goto err; if (lsn_korr(buff) >= lsn) { /* Already applied Note that in case the page is not anymore a head or tail page a future redo will fix the bitmap. */ check_skipped_lsn(info, lsn_korr(buff), 1, page); if ((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type) { empty_space= uint2korr(buff+EMPTY_SPACE_OFFSET); if (!enough_free_entries_on_page(share, buff)) empty_space= 0; /* Page is full */ if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space)) goto err; } pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); DBUG_RETURN(0); } DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == (uchar) page_type); if (delete_dir_entry(share, buff, rownr, &empty_space) < 0) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; page_link.changed= 1; push_dynamic(&info->pinned_pages, (void*) &page_link); result= 0; if (!enough_free_entries_on_page(share, buff)) empty_space= 0; /* Page is full */ /* This will work even if the page was marked as UNALLOCATED_PAGE */ if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space)) result= my_errno; DBUG_RETURN(result); err: error= my_errno; pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); _ma_mark_file_crashed(share); DBUG_ASSERT(!maria_assert_if_crashed_table); DBUG_RETURN((my_errno= error)); }
O0
c
ma_apply_redo_purge_row_head_or_tail: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rdi callq 0x56790 movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movzbl 0x5(%rax), %eax movl %eax, -0x3c(%rbp) jmp 0x56def movq -0x30(%rbp), %rax movl 0x170(%rax), %ecx orl $0x181, %ecx # imm = 0x181 movl %ecx, 0x170(%rax) movq -0x30(%rbp), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x38(%rbp), %rdx leaq -0x68(%rbp), %rax xorl %ecx, %ecx xorl %r8d, %r8d movl $0x1, %r9d movl $0x4, (%rsp) movq %rax, 0x8(%rsp) callq 0x96df0 movq %rax, -0x48(%rbp) cmpq $0x0, %rax jne 0x56e4e jmp 0x57010 movq -0x48(%rbp), %rax movzbl (%rax), %eax movq -0x48(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x48(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x48(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax cmpq -0x18(%rbp), %rax jl 0x56f6e movq -0x10(%rbp), %rdi movq -0x48(%rbp), %rax movzbl (%rax), %eax movq -0x48(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x48(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movl %eax, %esi shlq $0x20, %rsi movq -0x48(%rbp), %rax movl 0x3(%rax), %eax orq %rax, %rsi movq -0x38(%rbp), %rcx movl $0x1, %edx callq 0x8dc50 movq -0x48(%rbp), %rax movzbl 0x7(%rax), %eax andl $0x7, %eax cmpl -0x1c(%rbp), %eax jne 0x56f2b movq -0x48(%rbp), %rax movzwl 0xa(%rax), %eax movl %eax, -0x40(%rbp) movq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x50dc0 cmpb $0x0, %al jne 0x56f01 movl $0x0, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi cmpl $0x1, -0x1c(%rbp) sete %al andb $0x1, %al movzbl %al, %eax movl -0x40(%rbp), %ecx movsbl %al, %edx callq 0x60a00 cmpb $0x0, %al je 0x56f29 jmp 0x57010 jmp 0x56f2b movq -0x30(%rbp), %rax movq 0x600(%rax), %rdi movq -0x68(%rbp), %rsi movl $0x6, %edx movl $0x3, %ecx xorl %eax, %eax movl %eax, %r9d xorl %eax, %eax movq %r9, %r8 movl $0x0, (%rsp) movl $0x0, 0x8(%rsp) callq 0x96b90 movl $0x0, -0x4(%rbp) jmp 0x57074 jmp 0x56f70 jmp 0x56f72 movq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi movl -0x3c(%rbp), %edx leaq -0x40(%rbp), %rcx callq 0x57080 cmpl $0x0, %eax jge 0x56f9b movq -0x10(%rbp), %rdi movl $0x7f, %esi callq 0x37c10 jmp 0x57010 movl $0x6, -0x60(%rbp) movb $0x1, -0x58(%rbp) movq -0x10(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x68(%rbp), %rsi callq 0xdd8b0 movl $0x0, -0x4c(%rbp) movq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x50dc0 cmpb $0x0, %al jne 0x56fd9 movl $0x0, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi cmpl $0x1, -0x1c(%rbp) sete %al andb $0x1, %al movzbl %al, %eax movl -0x40(%rbp), %ecx movsbl %al, %edx callq 0x60a00 cmpb $0x0, %al je 0x57006 callq 0xfc990 movl (%rax), %eax movl %eax, -0x4c(%rbp) jmp 0x57008 movl -0x4c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x57074 callq 0xfc990 movl (%rax), %eax movl %eax, -0x50(%rbp) movq -0x30(%rbp), %rax movq 0x600(%rax), %rdi movq -0x68(%rbp), %rsi movl $0x6, %edx movl $0x3, %ecx xorl %eax, %eax movl %eax, %r9d xorl %eax, %eax movq %r9, %r8 movl $0x0, (%rsp) movl $0x0, 0x8(%rsp) callq 0x96b90 movq -0x30(%rbp), %rdi callq 0x44570 jmp 0x5705c jmp 0x5705e movl -0x50(%rbp), %eax movl %eax, -0x6c(%rbp) callq 0xfc990 movq %rax, %rcx movl -0x6c(%rbp), %eax movl %eax, (%rcx) movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq
_ma_apply_redo_purge_row_head_or_tail: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rdi, [rbp+var_28] call uint5korr_0 mov [rbp+var_38], rax mov rax, [rbp+var_28] movzx eax, byte ptr [rax+5] mov [rbp+var_3C], eax jmp short $+2 loc_56DEF: mov rax, [rbp+var_30] mov ecx, [rax+170h] or ecx, 181h mov [rax+170h], ecx mov rax, [rbp+var_30] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov rdx, [rbp+var_38] lea rax, [rbp+var_68] xor ecx, ecx xor r8d, r8d mov r9d, 1 mov [rsp+80h+var_80], 4 mov [rsp+80h+var_78], rax call pagecache_read mov [rbp+var_48], rax cmp rax, 0 jnz short loc_56E4E jmp loc_57010 loc_56E4E: mov rax, [rbp+var_48] movzx eax, byte ptr [rax] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_48] mov ecx, [rcx+3] or rax, rcx cmp rax, [rbp+var_18] jl loc_56F6E mov rdi, [rbp+var_10] mov rax, [rbp+var_48] movzx eax, byte ptr [rax] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax mov esi, eax shl rsi, 20h mov rax, [rbp+var_48] mov eax, [rax+3] or rsi, rax mov rcx, [rbp+var_38] mov edx, 1 call check_skipped_lsn mov rax, [rbp+var_48] movzx eax, byte ptr [rax+7] and eax, 7 cmp eax, [rbp+var_1C] jnz short loc_56F2B mov rax, [rbp+var_48] movzx eax, word ptr [rax+0Ah] mov [rbp+var_40], eax mov rdi, [rbp+var_30] mov rsi, [rbp+var_48] call enough_free_entries_on_page cmp al, 0 jnz short loc_56F01 mov [rbp+var_40], 0 loc_56F01: mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] cmp [rbp+var_1C], 1 setz al and al, 1 movzx eax, al mov ecx, [rbp+var_40] movsx edx, al call _ma_bitmap_set cmp al, 0 jz short loc_56F29 jmp loc_57010 loc_56F29: jmp short $+2 loc_56F2B: mov rax, [rbp+var_30] mov rdi, [rax+600h] mov rsi, [rbp+var_68] mov edx, 6 mov ecx, 3 xor eax, eax mov r9d, eax xor eax, eax mov r8, r9 mov [rsp+80h+var_80], 0 mov dword ptr [rsp+80h+var_78], 0 call pagecache_unlock_by_link mov [rbp+var_4], 0 jmp loc_57074 loc_56F6E: jmp short $+2 loc_56F70: jmp short $+2 loc_56F72: mov rdi, [rbp+var_30] mov rsi, [rbp+var_48] mov edx, [rbp+var_3C] lea rcx, [rbp+var_40] call delete_dir_entry cmp eax, 0 jge short loc_56F9B mov rdi, [rbp+var_10] mov esi, 7Fh call _ma_set_fatal_error jmp short loc_57010 loc_56F9B: mov [rbp+var_60], 6 mov [rbp+var_58], 1 mov rdi, [rbp+var_10] add rdi, 2E8h lea rsi, [rbp+var_68] call insert_dynamic mov [rbp+var_4C], 0 mov rdi, [rbp+var_30] mov rsi, [rbp+var_48] call enough_free_entries_on_page cmp al, 0 jnz short loc_56FD9 mov [rbp+var_40], 0 loc_56FD9: mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] cmp [rbp+var_1C], 1 setz al and al, 1 movzx eax, al mov ecx, [rbp+var_40] movsx edx, al call _ma_bitmap_set cmp al, 0 jz short loc_57006 call _my_thread_var mov eax, [rax] mov [rbp+var_4C], eax loc_57006: jmp short $+2 loc_57008: mov eax, [rbp+var_4C] mov [rbp+var_4], eax jmp short loc_57074 loc_57010: call _my_thread_var mov eax, [rax] mov [rbp+var_50], eax mov rax, [rbp+var_30] mov rdi, [rax+600h] mov rsi, [rbp+var_68] mov edx, 6 mov ecx, 3 xor eax, eax mov r9d, eax xor eax, eax mov r8, r9 mov [rsp+80h+var_80], 0 mov dword ptr [rsp+80h+var_78], 0 call pagecache_unlock_by_link mov rdi, [rbp+var_30] call _ma_mark_file_crashed jmp short $+2 loc_5705C: jmp short $+2 loc_5705E: mov eax, [rbp+var_50] mov [rbp+var_6C], eax call _my_thread_var mov rcx, rax mov eax, [rbp+var_6C] mov [rcx], eax mov [rbp+var_4], eax loc_57074: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long ma_apply_redo_purge_row_head_or_tail(_DWORD *a1, signed long long a2, int a3, unsigned int *a4) { _DWORD *v4; // rdi const char *v5; // rsi long long v6; // rdx long long v7; // rcx long long v8; // r8 int v9; // r9d _DWORD *v10; // rdi const char *v11; // rsi const char *v12; // rsi long long v13; // rdi unsigned int v15; // [rsp+14h] [rbp-6Ch] const char *v16; // [rsp+18h] [rbp-68h] BYREF int v17; // [rsp+20h] [rbp-60h] char v18; // [rsp+28h] [rbp-58h] unsigned int v19; // [rsp+30h] [rbp-50h] unsigned int v20; // [rsp+34h] [rbp-4Ch] _BYTE *v21; // [rsp+38h] [rbp-48h] unsigned int v22; // [rsp+40h] [rbp-40h] BYREF unsigned int v23; // [rsp+44h] [rbp-3Ch] unsigned long long v24; // [rsp+48h] [rbp-38h] long long v25; // [rsp+50h] [rbp-30h] unsigned int *v26; // [rsp+58h] [rbp-28h] int v27; // [rsp+64h] [rbp-1Ch] signed long long v28; // [rsp+68h] [rbp-18h] _DWORD *v29; // [rsp+70h] [rbp-10h] v29 = a1; v28 = a2; v27 = a3; v26 = a4; v25 = *(_QWORD *)a1; v24 = uint5korr_0(a4); v23 = *((unsigned __int8 *)v26 + 5); *(_DWORD *)(v25 + 368) |= 0x181u; v4 = *(_DWORD **)(v25 + 1536); v5 = (const char *)(v29 + 284); v21 = (_BYTE *)pagecache_read((_DWORD)v4, (int)v29 + 1136, v24, 0, 0, 1, 4, (long long)&v16); if ( !v21 ) goto LABEL_15; if ( (long long)(*(unsigned int *)(v21 + 3) | ((unsigned long long)(((unsigned __int8)v21[2] << 16) | (unsigned int)*(unsigned __int16 *)v21) << 32)) >= v28 ) { check_skipped_lsn( v29, *(unsigned int *)(v21 + 3) | ((unsigned long long)(((unsigned __int8)v21[2] << 16) | (unsigned int)*(unsigned __int16 *)v21) << 32), 1LL, v24); if ( (v21[7] & 7) != v27 ) goto LABEL_7; v22 = *((unsigned __int16 *)v21 + 5); if ( !enough_free_entries_on_page(v25, v21) ) v22 = 0; v4 = v29; v5 = (const char *)v24; if ( !(unsigned __int8)ma_bitmap_set(v29, v24, v27 == 1, v22) ) { LABEL_7: pagecache_unlock_by_link(*(_QWORD *)(v25 + 1536), (_DWORD)v16, 6, 3, 0, 0, 0, 0); return 0; } LABEL_15: v19 = *(_DWORD *)my_thread_var(v4, v5); v12 = v16; pagecache_unlock_by_link(*(_QWORD *)(v25 + 1536), (_DWORD)v16, 6, 3, 0, 0, 0, 0); v13 = v25; ma_mark_file_crashed(v25); v15 = v19; *(_DWORD *)my_thread_var(v13, v12) = v15; return v15; } if ( (int)delete_dir_entry(v25, v21, v23, &v22) < 0 ) { v4 = v29; v5 = (_BYTE *)(&dword_7C + 3); ma_set_fatal_error(v29, 0x7Fu, v6, v7, v8, v9); goto LABEL_15; } v17 = 6; v18 = 1; insert_dynamic(v29 + 186, &v16); v20 = 0; if ( !enough_free_entries_on_page(v25, v21) ) v22 = 0; v10 = v29; v11 = (const char *)v24; if ( (unsigned __int8)ma_bitmap_set(v29, v24, v27 == 1, v22) ) return *(unsigned int *)my_thread_var(v10, v11); return v20; }
_ma_apply_redo_purge_row_head_or_tail: 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],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x00156790 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x5] MOV dword ptr [RBP + -0x3c],EAX JMP 0x00156def LAB_00156def: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x181 MOV dword ptr [RAX + 0x170],ECX MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x38] LEA RAX,[RBP + -0x68] XOR ECX,ECX XOR R8D,R8D MOV R9D,0x1 MOV dword ptr [RSP],0x4 MOV qword ptr [RSP + 0x8],RAX CALL 0x00196df0 MOV qword ptr [RBP + -0x48],RAX CMP RAX,0x0 JNZ 0x00156e4e JMP 0x00157010 LAB_00156e4e: MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX CMP RAX,qword ptr [RBP + -0x18] JL 0x00156f6e MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV ESI,EAX SHL RSI,0x20 MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x3] OR RSI,RAX MOV RCX,qword ptr [RBP + -0x38] MOV EDX,0x1 CALL 0x0018dc50 MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX + 0x7] AND EAX,0x7 CMP EAX,dword ptr [RBP + -0x1c] JNZ 0x00156f2b MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0xa] MOV dword ptr [RBP + -0x40],EAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x48] CALL 0x00150dc0 CMP AL,0x0 JNZ 0x00156f01 MOV dword ptr [RBP + -0x40],0x0 LAB_00156f01: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] CMP dword ptr [RBP + -0x1c],0x1 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV ECX,dword ptr [RBP + -0x40] MOVSX EDX,AL CALL 0x00160a00 CMP AL,0x0 JZ 0x00156f29 JMP 0x00157010 LAB_00156f29: JMP 0x00156f2b LAB_00156f2b: MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x68] MOV EDX,0x6 MOV ECX,0x3 XOR EAX,EAX MOV R9D,EAX XOR EAX,EAX MOV R8,R9 MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x0 CALL 0x00196b90 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00157074 LAB_00156f6e: JMP 0x00156f70 LAB_00156f70: JMP 0x00156f72 LAB_00156f72: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x3c] LEA RCX,[RBP + -0x40] CALL 0x00157080 CMP EAX,0x0 JGE 0x00156f9b MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7f CALL 0x00137c10 JMP 0x00157010 LAB_00156f9b: MOV dword ptr [RBP + -0x60],0x6 MOV byte ptr [RBP + -0x58],0x1 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2e8 LEA RSI,[RBP + -0x68] CALL 0x001dd8b0 MOV dword ptr [RBP + -0x4c],0x0 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x48] CALL 0x00150dc0 CMP AL,0x0 JNZ 0x00156fd9 MOV dword ptr [RBP + -0x40],0x0 LAB_00156fd9: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] CMP dword ptr [RBP + -0x1c],0x1 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV ECX,dword ptr [RBP + -0x40] MOVSX EDX,AL CALL 0x00160a00 CMP AL,0x0 JZ 0x00157006 CALL 0x001fc990 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4c],EAX LAB_00157006: JMP 0x00157008 LAB_00157008: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00157074 LAB_00157010: CALL 0x001fc990 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x68] MOV EDX,0x6 MOV ECX,0x3 XOR EAX,EAX MOV R9D,EAX XOR EAX,EAX MOV R8,R9 MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x0 CALL 0x00196b90 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00144570 JMP 0x0015705c LAB_0015705c: JMP 0x0015705e LAB_0015705e: MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x6c],EAX CALL 0x001fc990 MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RCX],EAX MOV dword ptr [RBP + -0x4],EAX LAB_00157074: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 _ma_apply_redo_purge_row_head_or_tail(long *param_1,long param_2,uint param_3,long param_4) { int4 uVar1; char cVar2; int iVar3; int4 *puVar4; int8 *puVar5; int8 local_70; int4 local_68; int1 local_60; int4 local_58; int4 local_54; int3 *local_50; uint local_48; uint local_44; int8 local_40; long local_38; long local_30; uint local_24; long local_20; long *local_18; local_38 = *param_1; local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; local_40 = uint5korr(param_4); local_44 = (uint)*(byte *)(local_30 + 5); *(uint *)(local_38 + 0x170) = *(uint *)(local_38 + 0x170) | 0x181; puVar5 = &local_70; local_50 = (int3 *) pagecache_read(*(int8 *)(local_38 + 0x600),local_18 + 0x8e,local_40,0,0,1,4, puVar5); if (local_50 != (int3 *)0x0) { if (local_20 <= (long)(ulong)CONCAT34(*local_50,*(int4 *)((long)local_50 + 3))) { check_skipped_lsn(local_18,(ulong)CONCAT34(*local_50,*(int4 *)((long)local_50 + 3)),1, local_40); if ((*(byte *)((long)local_50 + 7) & 7) == local_24) { local_48 = (uint)*(ushort *)((long)local_50 + 10); cVar2 = enough_free_entries_on_page(local_38,local_50); if (cVar2 == '\0') { local_48 = 0; } cVar2 = _ma_bitmap_set(local_18,local_40,local_24 == 1,local_48); if (cVar2 != '\0') goto LAB_00157010; } pagecache_unlock_by_link (*(int8 *)(local_38 + 0x600),local_70,6,3,0,0,0, (ulong)puVar5 & 0xffffffff00000000); return 0; } iVar3 = delete_dir_entry(local_38,local_50,local_44,&local_48); if (-1 < iVar3) { local_68 = 6; local_60 = 1; insert_dynamic(local_18 + 0x5d,&local_70); local_54 = 0; cVar2 = enough_free_entries_on_page(local_38,local_50); if (cVar2 == '\0') { local_48 = 0; } cVar2 = _ma_bitmap_set(local_18,local_40,local_24 == 1,local_48); if (cVar2 != '\0') { puVar4 = (int4 *)_my_thread_var(); local_54 = *puVar4; } return local_54; } _ma_set_fatal_error(local_18,0x7f); } LAB_00157010: puVar4 = (int4 *)_my_thread_var(); local_58 = *puVar4; pagecache_unlock_by_link (*(int8 *)(local_38 + 0x600),local_70,6,3,0,0,0,(ulong)puVar5 & 0xffffffff00000000 ); _ma_mark_file_crashed(local_38); uVar1 = local_58; puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar1; return uVar1; }
53,003
ggml_compute_bf16_to_fp32
Yangxiaoz[P]GGML-Tutorial/ggml/src/./ggml-impl.h
static inline float ggml_compute_bf16_to_fp32(ggml_bf16_t h) { union { float f; uint32_t i; } u; u.i = (uint32_t)h.bits << 16; return u.f; }
O0
c
ggml_compute_bf16_to_fp32: pushq %rbp movq %rsp, %rbp movw %di, %ax movw %ax, -0x2(%rbp) movzwl -0x2(%rbp), %eax shll $0x10, %eax movl %eax, -0x8(%rbp) vmovss -0x8(%rbp), %xmm0 popq %rbp retq nopl (%rax)
ggml_compute_bf16_to_fp32: push rbp mov rbp, rsp mov ax, di mov [rbp+var_2], ax movzx eax, [rbp+var_2] shl eax, 10h mov [rbp+var_8], eax vmovss xmm0, [rbp+var_8] pop rbp retn
__int128 __usercall ggml_compute_bf16_to_fp32@<xmm0>(unsigned __int16 a1@<di>) { __int128 result; // xmm0 int v2; // [rsp+0h] [rbp-8h] v2 = a1 << 16; __asm { vmovss xmm0, [rbp+var_8] } return result; }
ggml_compute_bf16_to_fp32: PUSH RBP MOV RBP,RSP MOV AX,DI MOV word ptr [RBP + -0x2],AX MOVZX EAX,word ptr [RBP + -0x2] SHL EAX,0x10 MOV dword ptr [RBP + -0x8],EAX VMOVSS XMM0,dword ptr [RBP + -0x8] POP RBP RET
long ggml_compute_bf16_to_fp32(ushort param_1) { return (ulong)param_1 << 0x10; }
53,004
glfwPlatformGetMonitorPos
untodesu[P]riteg/build_O2/_deps/glfw-src/src/x11_monitor.c
void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) { if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken) { XRRScreenResources* sr; XRRCrtcInfo* ci; sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root); ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc); if (xpos) *xpos = ci->x; if (ypos) *ypos = ci->y; XRRFreeCrtcInfo(ci); XRRFreeScreenResources(sr); } }
O2
c
glfwPlatformGetMonitorPos: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx leaq 0x7e885(%rip), %rax # 0x9b648 cmpl $0x0, 0x20570(%rax) je 0x1ce49 cmpl $0x0, 0x20594(%rax) jne 0x1ce49 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r12 movq 0x1fec0(%rax), %rdi movq 0x1fed0(%rax), %rsi movq %rax, %r13 callq *0x205e8(%rax) movq %rax, %r15 movq 0x1fec0(%r13), %rdi movq 0x90(%r12), %rdx movq %rax, %rsi movq %r13, %r12 callq *0x205d0(%r13) testq %r14, %r14 je 0x1ce1f movl 0x8(%rax), %ecx movl %ecx, (%r14) testq %rbx, %rbx je 0x1ce29 movl 0xc(%rax), %ecx movl %ecx, (%rbx) movq %rax, %rdi callq *0x205a0(%r12) movq %r15, %rdi movq %r12, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *0x205b8(%rax) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_glfwPlatformGetMonitorPos: push r15 push r14 push r13 push r12 push rbx lea rax, _glfw cmp dword ptr [rax+20570h], 0 jz short loc_1CE49 cmp dword ptr [rax+20594h], 0 jnz short loc_1CE49 mov rbx, rdx mov r14, rsi mov r12, rdi mov rdi, [rax+1FEC0h] mov rsi, [rax+1FED0h] mov r13, rax call qword ptr ds:loc_205E8[rax] mov r15, rax mov rdi, [r13+1FEC0h] mov rdx, [r12+90h] mov rsi, rax mov r12, r13 call qword ptr [r13+205D0h] test r14, r14 jz short loc_1CE1F mov ecx, [rax+8] mov [r14], ecx loc_1CE1F: test rbx, rbx jz short loc_1CE29 mov ecx, [rax+0Ch] mov [rbx], ecx loc_1CE29: mov rdi, rax call qword ptr ds:loc_205A0[r12] mov rdi, r15 mov rax, r12 pop rbx pop r12 pop r13 pop r14 pop r15 jmp qword ptr [rax+205B8h] loc_1CE49: pop rbx pop r12 pop r13 pop r14 pop r15 retn
_DWORD * glfwPlatformGetMonitorPos(long long a1, _DWORD *a2, _DWORD *a3) { _DWORD *result; // rax long long v5; // r15 long long v6; // rax result = glfw; if ( glfw[33116] && !glfw[33125] ) { v5 = (*(long long ( **)(_QWORD, _QWORD))((char *)&loc_205E8 + (_QWORD)glfw))( *(_QWORD *)&glfw[32688], *(_QWORD *)&glfw[32692]); v6 = (*(long long ( **)(_QWORD, long long, _QWORD))&glfw[33140])( *(_QWORD *)&glfw[32688], v5, *(_QWORD *)(a1 + 144)); if ( a2 ) *a2 = *(_DWORD *)(v6 + 8); if ( a3 ) *a3 = *(_DWORD *)(v6 + 12); (*(void ( **)(long long))((char *)&loc_205A0 + (_QWORD)glfw))(v6); return (_DWORD *)(*(long long ( **)(long long))&glfw[33134])(v5); } return result; }
_glfwPlatformGetMonitorPos: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX LEA RAX,[0x19b648] CMP dword ptr [RAX + 0x20570],0x0 JZ 0x0011ce49 CMP dword ptr [RAX + 0x20594],0x0 JNZ 0x0011ce49 MOV RBX,RDX MOV R14,RSI MOV R12,RDI MOV RDI,qword ptr [RAX + 0x1fec0] MOV RSI,qword ptr [RAX + 0x1fed0] MOV R13,RAX CALL qword ptr [RAX + 0x205e8] MOV R15,RAX MOV RDI,qword ptr [R13 + 0x1fec0] MOV RDX,qword ptr [R12 + 0x90] MOV RSI,RAX MOV R12,R13 CALL qword ptr [R13 + 0x205d0] TEST R14,R14 JZ 0x0011ce1f MOV ECX,dword ptr [RAX + 0x8] MOV dword ptr [R14],ECX LAB_0011ce1f: TEST RBX,RBX JZ 0x0011ce29 MOV ECX,dword ptr [RAX + 0xc] MOV dword ptr [RBX],ECX LAB_0011ce29: MOV RDI,RAX CALL qword ptr [R12 + 0x205a0] MOV RDI,R15 MOV RAX,R12 POP RBX POP R12 POP R13 POP R14 POP R15 JMP qword ptr [RAX + 0x205b8] LAB_0011ce49: POP RBX POP R12 POP R13 POP R14 POP R15 RET
void _glfwPlatformGetMonitorPos(long param_1,int4 *param_2,int4 *param_3) { int8 uVar1; long lVar2; if ((DAT_001bbbb8 != 0) && (DAT_001bbbdc == 0)) { uVar1 = (*DAT_001bbc30)(DAT_001bb508,DAT_001bb518); lVar2 = (*DAT_001bbc18)(DAT_001bb508,uVar1,*(int8 *)(param_1 + 0x90)); if (param_2 != (int4 *)0x0) { *param_2 = *(int4 *)(lVar2 + 8); } if (param_3 != (int4 *)0x0) { *param_3 = *(int4 *)(lVar2 + 0xc); } (*DAT_001bbbe8)(lVar2); /* WARNING: Could not recover jumptable at 0x0011ce43. Too many branches */ /* WARNING: Treating indirect jump as call */ (*DAT_001bbc00)(uVar1); return; } return; }
53,005
mysql_stmt_send_long_data_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_send_long_data_start(my_bool *ret, MYSQL_STMT *stmt, unsigned int param_number, const char *data, unsigned long length) { MK_ASYNC_START_BODY( mysql_stmt_send_long_data, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; parms.param_number= param_number; parms.data= data; parms.length= length; }, TRUE, r_my_bool, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_send_long_data(stmt, param_number, data, length); return 0; }) }
O0
c
mysql_stmt_send_long_data_start: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x3ed2e movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0x2d100 movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) jmp 0x3ee52 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x58(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x40(%rbp), %rdi addq $0x38, %rdi leaq 0xe6(%rip), %rsi # 0x3ee60 leaq -0x60(%rbp), %rdx callq 0x3ffc0 movl %eax, -0x34(%rbp) movq -0x40(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x40(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x34(%rbp) jle 0x3edb2 movq -0x40(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x40(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x3ee52 cmpl $0x0, -0x34(%rbp) jge 0x3ee3e jmp 0x3edbe movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x220fa(%rip), %rax # 0x60ee0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x220d8(%rip), %rax # 0x60ef0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movb $0x1, (%rax) jmp 0x3ee4b movq -0x40(%rbp), %rax movb 0x8(%rax), %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_stmt_send_long_data_start: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_3ED2E mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call mysql_stmt_send_long_data mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov [rbp+var_4], 0 jmp loc_3EE52 loc_3ED2E: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov [rbp+var_60], rax mov eax, [rbp+var_1C] mov [rbp+var_58], eax mov rax, [rbp+var_28] mov [rbp+var_50], rax mov rax, [rbp+var_30] mov [rbp+var_48], rax mov rax, [rbp+var_40] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_40] add rdi, 38h ; '8' lea rsi, mysql_stmt_send_long_data_start_internal lea rdx, [rbp+var_60] call my_context_spawn mov [rbp+var_34], eax mov rax, [rbp+var_40] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_40] mov byte ptr [rax+14h], 0 cmp [rbp+var_34], 0 jle short loc_3EDB2 mov rax, [rbp+var_40] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_40] mov eax, [rax] mov [rbp+var_4], eax jmp loc_3EE52 loc_3EDB2: cmp [rbp+var_34], 0 jge loc_3EE3E jmp short $+2 loc_3EDBE: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov byte ptr [rax], 1 jmp short loc_3EE4B loc_3EE3E: mov rax, [rbp+var_40] mov cl, [rax+8] mov rax, [rbp+var_10] mov [rax], cl loc_3EE4B: mov [rbp+var_4], 0 loc_3EE52: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mysql_stmt_send_long_data_start(char *a1, long long a2, unsigned int a3, long long a4, long long a5) { long long v6; // [rsp+0h] [rbp-60h] BYREF unsigned int v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+10h] [rbp-50h] long long v9; // [rsp+18h] [rbp-48h] _BYTE *v10; // [rsp+20h] [rbp-40h] int v11; // [rsp+2Ch] [rbp-34h] long long v12; // [rsp+30h] [rbp-30h] long long v13; // [rsp+38h] [rbp-28h] unsigned int v14; // [rsp+44h] [rbp-1Ch] long long v15; // [rsp+48h] [rbp-18h] char *v16; // [rsp+50h] [rbp-10h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; if ( *(_QWORD *)(a2 + 56) ) { v10 = *(_BYTE **)(*(_QWORD *)(*(_QWORD *)(v15 + 56) + 1152LL) + 40LL); v6 = v15; v7 = v14; v8 = v13; v9 = v12; v10[20] = 1; v11 = my_context_spawn(v10 + 56, mysql_stmt_send_long_data_start_internal, &v6); v10[21] = 0; v10[20] = 0; if ( v11 <= 0 ) { if ( v11 >= 0 ) { *v16 = v10[8]; } else { *(_DWORD *)(*(_QWORD *)(v15 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v15 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v15 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v15 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v15 + 56) + 662LL) = 0; *v16 = 1; } return 0; } else { v10[21] = 1; return *(unsigned int *)v10; } } else { *v16 = mysql_stmt_send_long_data(v15, v14, v13, v12); return 0; } }
mysql_stmt_send_long_data_start: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0013ed2e MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x0012d100 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013ee52 LAB_0013ed2e: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x58],EAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0x38 LEA RSI,[0x13ee60] LEA RDX,[RBP + -0x60] CALL 0x0013ffc0 MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x34],0x0 JLE 0x0013edb2 MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013ee52 LAB_0013edb2: CMP dword ptr [RBP + -0x34],0x0 JGE 0x0013ee3e JMP 0x0013edbe LAB_0013edbe: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x160ee0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x160ef0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x1 JMP 0x0013ee4b LAB_0013ee3e: MOV RAX,qword ptr [RBP + -0x40] MOV CL,byte ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL LAB_0013ee4b: MOV dword ptr [RBP + -0x4],0x0 LAB_0013ee52: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 mysql_stmt_send_long_data_start (int1 *param_1,long param_2,int4 param_3,int8 param_4,int8 param_5 ) { int1 uVar1; long local_68; int4 local_60; int8 local_58; int8 local_50; int4 *local_48; int local_3c; int8 local_38; int8 local_30; int4 local_24; long local_20; int1 *local_18; int4 local_c; local_38 = param_5; local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_send_long_data(param_2,param_3,param_4,param_5); *local_18 = uVar1; local_c = 0; } else { local_48 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_48 + 5) = 1; local_68 = param_2; local_60 = param_3; local_58 = param_4; local_50 = param_5; local_3c = my_context_spawn(local_48 + 0xe,mysql_stmt_send_long_data_start_internal,&local_68); *(int1 *)((long)local_48 + 0x15) = 0; *(int1 *)(local_48 + 5) = 0; if (local_3c < 1) { if (local_3c < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00160f30, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = *(int1 *)(local_48 + 2); } local_c = 0; } else { *(int1 *)((long)local_48 + 0x15) = 1; local_c = *local_48; } } return local_c; }
53,006
stbi__pnm_getinteger
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static int stbi__pnm_getinteger(stbi__context *s, char *c) { int value = 0; while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { value = value*10 + (*c - '0'); *c = (char) stbi__get8(s); if((value > 214748364) || (value == 214748364 && *c > '7')) return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); } return value; }
O3
c
stbi__pnm_getinteger: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %r15 xorl %ebx, %ebx cmpq $0x0, 0x10(%r15) je 0x38efc movq 0x28(%r15), %rdi callq *0x20(%r15) testl %eax, %eax je 0x38f0c cmpl $0x0, 0x30(%r15) je 0x38f5e movq 0xc0(%r15), %rax cmpq 0xc8(%r15), %rax jae 0x38f5e movzbl (%r14), %eax leal -0x3a(%rax), %ecx cmpb $-0xa, %cl jb 0x38f5e leal (%rbx,%rbx,4), %ecx leal (%rax,%rcx,2), %ebx addl $-0x30, %ebx movq %r15, %rdi callq 0x35752 movb %al, (%r14) cmpl $0xccccccc, %ebx # imm = 0xCCCCCCC jg 0x38f42 sete %cl cmpb $0x38, %al setge %al andb %cl, %al cmpb $0x1, %al jne 0x38ee2 movq %fs:0x0, %rax leaq 0xf4e1(%rip), %rcx # 0x48436 movq %rcx, -0x8(%rax) xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq
stbi__pnm_getinteger: push r15 push r14 push rbx mov r14, rsi mov r15, rdi xor ebx, ebx loc_38EE2: cmp qword ptr [r15+10h], 0 jz short loc_38EFC mov rdi, [r15+28h] call qword ptr [r15+20h] test eax, eax jz short loc_38F0C cmp dword ptr [r15+30h], 0 jz short loc_38F5E loc_38EFC: mov rax, [r15+0C0h] cmp rax, [r15+0C8h] jnb short loc_38F5E loc_38F0C: movzx eax, byte ptr [r14] lea ecx, [rax-3Ah] cmp cl, 0F6h jb short loc_38F5E lea ecx, [rbx+rbx*4] lea ebx, [rax+rcx*2] add ebx, 0FFFFFFD0h mov rdi, r15 call stbi__get8 mov [r14], al cmp ebx, 0CCCCCCCh jg short loc_38F42 setz cl cmp al, 38h ; '8' setnl al and al, cl cmp al, 1 jnz short loc_38EE2 loc_38F42: mov rax, fs:0 lea rcx, aIntegerParseOv; "integer parse overflow" mov [rax-8], rcx xor ebx, ebx loc_38F5E: mov eax, ebx pop rbx pop r14 pop r15 retn
long long stbi__pnm_getinteger(long long a1, char *a2) { unsigned int v2; // ebx int v3; // eax char v4; // al v2 = 0; do { if ( *(_QWORD *)(a1 + 16) ) { if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) ) goto LABEL_6; if ( !*(_DWORD *)(a1 + 48) ) return v2; } if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) ) return v2; LABEL_6: v3 = (unsigned __int8)*a2; if ( (unsigned __int8)(v3 - 58) < 0xF6u ) return v2; v2 = v3 + 10 * v2 - 48; v4 = stbi__get8(a1); *a2 = v4; } while ( (int)v2 <= 214748364 && (v2 != 214748364 || v4 < 56) ); *(_QWORD *)(__readfsqword(0) - 8) = "integer parse overflow"; return 0; }
stbi__pnm_getinteger: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV R15,RDI XOR EBX,EBX LAB_00138ee2: CMP qword ptr [R15 + 0x10],0x0 JZ 0x00138efc MOV RDI,qword ptr [R15 + 0x28] CALL qword ptr [R15 + 0x20] TEST EAX,EAX JZ 0x00138f0c CMP dword ptr [R15 + 0x30],0x0 JZ 0x00138f5e LAB_00138efc: MOV RAX,qword ptr [R15 + 0xc0] CMP RAX,qword ptr [R15 + 0xc8] JNC 0x00138f5e LAB_00138f0c: MOVZX EAX,byte ptr [R14] LEA ECX,[RAX + -0x3a] CMP CL,0xf6 JC 0x00138f5e LEA ECX,[RBX + RBX*0x4] LEA EBX,[RAX + RCX*0x2] ADD EBX,-0x30 MOV RDI,R15 CALL 0x00135752 MOV byte ptr [R14],AL CMP EBX,0xccccccc JG 0x00138f42 SETZ CL CMP AL,0x38 SETGE AL AND AL,CL CMP AL,0x1 JNZ 0x00138ee2 LAB_00138f42: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x148436] MOV qword ptr [RAX + -0x8],RCX XOR EBX,EBX LAB_00138f5e: MOV EAX,EBX POP RBX POP R14 POP R15 RET
int stbi__pnm_getinteger(long param_1,byte *param_2) { byte bVar1; int iVar2; int iVar3; long *in_FS_OFFSET; iVar3 = 0; do { if (*(long *)(param_1 + 0x10) == 0) { LAB_00138efc: if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) { return iVar3; } } else { iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28)); if (iVar2 != 0) { if (*(int *)(param_1 + 0x30) == 0) { return iVar3; } goto LAB_00138efc; } } if ((byte)(*param_2 - 0x3a) < 0xf6) { return iVar3; } iVar3 = (uint)*param_2 + iVar3 * 10 + -0x30; bVar1 = stbi__get8(param_1); *param_2 = bVar1; if ((0xccccccc < iVar3) || ('7' < (char)bVar1 && iVar3 == 0xccccccc)) { *(char **)(*in_FS_OFFSET + -8) = "integer parse overflow"; return 0; } } while( true ); }
53,007
wait_for_lock
eloqsql/mysys/thr_lock.c
static enum enum_thr_lock_result wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, my_bool in_wait_list, ulong lock_wait_timeout) { struct st_my_thread_var *thread_var= my_thread_var; mysql_cond_t *cond= &thread_var->suspend; struct timespec wait_timeout; enum enum_thr_lock_result result= THR_LOCK_ABORTED; PSI_stage_info old_stage; my_bool use_wait_callbacks= FALSE; DBUG_ENTER("wait_for_lock"); /* One can use this to signal when a thread is going to wait for a lock. See debug_sync.cc. Beware of waiting for a signal here. The lock has acquired its mutex. While waiting on a signal here, the locking thread could not acquire the mutex to release the lock. One could lock up the table completely. In detail it works so: When thr_lock() tries to acquire a table lock, it locks the lock->mutex, checks if it can have the lock, and if not, it calls wait_for_lock(). Here it unlocks the table lock while waiting on a condition. The sync point is located before this wait for condition. If we have a waiting action here, we hold the the table locks mutex all the time. Any attempt to look at the table lock by another thread blocks it immediately on lock->mutex. This can easily become an unexpected and unobvious blockage. So be warned: Do not request a WAIT_FOR action for the 'wait_for_lock' sync point unless you really know what you do. */ DEBUG_SYNC_C("wait_for_lock"); if (!in_wait_list) { (*wait->last)=data; /* Wait for lock */ data->prev= wait->last; wait->last= &data->next; } statistic_increment(locks_waited, &THR_LOCK_lock); /* Set up control struct to allow others to abort locks */ thread_var->current_mutex= &data->lock->mutex; thread_var->current_cond= cond; data->cond= cond; proc_info_hook(NULL, &stage_waiting_for_table_level_lock, &old_stage, __func__, __FILE__, __LINE__); /* Since before_lock_wait potentially can create more threads to scheduler work for, we don't want to call the before_lock_wait callback unless it will really start to wait. For similar reasons, we do not want to call before_lock_wait and after_lock_wait for each lap around the loop, so we restrict ourselves to call it before_lock_wait once before starting to wait and once after the thread has exited the wait loop. */ if ((!thread_var->abort || in_wait_list) && before_lock_wait) { use_wait_callbacks= TRUE; (*before_lock_wait)(); } set_timespec(wait_timeout, lock_wait_timeout); while (!thread_var->abort || in_wait_list) { int rc= mysql_cond_timedwait(cond, &data->lock->mutex, &wait_timeout); /* We must break the wait if one of the following occurs: - the connection has been aborted (!thread_var->abort), but this is not a delayed insert thread (in_wait_list). For a delayed insert thread the proper action at shutdown is, apparently, to acquire the lock and complete the insert. - the lock has been granted (data->cond is set to NULL by the granter), or the waiting has been aborted (additionally data->type is set to TL_UNLOCK). - the wait has timed out (rc == ETIMEDOUT) Order of checks below is important to not report about timeout if the predicate is true. */ if (data->cond == 0) { DBUG_PRINT("thr_lock", ("lock granted/aborted")); break; } if (rc == ETIMEDOUT || rc == ETIME) { /* purecov: begin inspected */ DBUG_PRINT("thr_lock", ("lock timed out")); result= THR_LOCK_WAIT_TIMEOUT; break; /* purecov: end */ } } /* We call the after_lock_wait callback once the wait loop has finished. */ if (after_lock_wait && use_wait_callbacks) (*after_lock_wait)(); DBUG_PRINT("thr_lock", ("aborted: %d in_wait_list: %d", thread_var->abort, in_wait_list)); if (data->cond || data->type == TL_UNLOCK) { if (data->cond) /* aborted or timed out */ { if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else wait->last=data->prev; data->type= TL_UNLOCK; /* No lock */ check_locks(data->lock, "killed or timed out wait_for_lock", data->type, 1); wake_up_waiters(data->lock); } else { DBUG_PRINT("thr_lock", ("lock aborted")); check_locks(data->lock, "aborted wait_for_lock", data->type, 0); } } else { result= THR_LOCK_SUCCESS; if (data->lock->get_status && (*data->lock->get_status)(data->status_param, data->type == TL_WRITE_CONCURRENT_INSERT)) result= THR_LOCK_ABORTED; check_locks(data->lock,"got wait_for_lock", data->type, 0); } mysql_mutex_unlock(&data->lock->mutex); /* The following must be done after unlock of lock->mutex */ mysql_mutex_lock(&thread_var->mutex); thread_var->current_mutex= 0; thread_var->current_cond= 0; mysql_mutex_unlock(&thread_var->mutex); proc_info_hook(NULL, &old_stage, NULL, __func__, __FILE__, __LINE__); DBUG_RETURN(result); }
O0
c
wait_for_lock: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movq %rcx, -0x20(%rbp) callq 0x86110 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x8, %rax movq %rax, -0x30(%rbp) movl $0x1, -0x44(%rbp) movb $0x0, -0x61(%rbp) jmp 0x892de cmpb $0x0, -0x11(%rbp) jne 0x89313 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) leaq 0x377496(%rip), %rax # 0x4007b0 movq (%rax), %rcx addq $0x1, %rcx leaq 0x377488(%rip), %rax # 0x4007b0 movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx addq $0x18, %rcx movq -0x28(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x30(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) xorl %eax, %eax movl %eax, %edi leaq 0x1b3420(%rip), %rsi # 0x23c788 leaq -0x60(%rbp), %rdx leaq 0x54817(%rip), %rcx # 0xddb8a leaq 0x5477b(%rip), %r8 # 0xddaf5 movl $0x219, %r9d # imm = 0x219 leaq 0x1b3779(%rip), %rax # 0x23cb00 callq *(%rax) movq -0x28(%rbp), %rax movl 0xe0(%rax), %eax cmpl $0x0, %eax je 0x893a1 movsbl -0x11(%rbp), %eax cmpl $0x0, %eax je 0x893b5 cmpq $0x0, 0x37740f(%rip) # 0x4007b8 je 0x893b5 movb $0x1, -0x61(%rbp) callq *0x377403(%rip) # 0x4007b8 jmp 0x893b7 callq 0x80210 movq %rax, -0x78(%rbp) imulq $0x3e8, -0x78(%rbp), %rax # imm = 0x3E8 imulq $0x3b9aca00, -0x20(%rbp), %rcx # imm = 0x3B9ACA00 addq %rcx, %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rax, -0x40(%rbp) movq -0x70(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rdx, -0x38(%rbp) jmp 0x893fd movq -0x28(%rbp), %rax movl 0xe0(%rax), %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x7d(%rbp) je 0x8941e movsbl -0x11(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x7d(%rbp) movb -0x7d(%rbp), %al testb $0x1, %al jne 0x89427 jmp 0x8947c movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x18(%rax), %rsi addq $0x18, %rsi leaq -0x40(%rbp), %rdx leaq 0x546b3(%rip), %rcx # 0xddaf5 movl $0x22e, %r8d # imm = 0x22E callq 0x89e30 movl %eax, -0x7c(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x20(%rax) jne 0x89461 jmp 0x8945d jmp 0x8945f jmp 0x8947c cmpl $0x6e, -0x7c(%rbp) je 0x8946d cmpl $0x3e, -0x7c(%rbp) jne 0x8947a jmp 0x8946f jmp 0x89471 movl $0x2, -0x44(%rbp) jmp 0x8947c jmp 0x893fd cmpq $0x0, 0x37733c(%rip) # 0x4007c0 je 0x89495 movsbl -0x61(%rbp), %eax cmpl $0x0, %eax je 0x89495 callq *0x37732b(%rip) # 0x4007c0 jmp 0x89497 jmp 0x89499 movq -0x10(%rbp), %rax cmpq $0x0, 0x20(%rax) jne 0x894ae movq -0x10(%rbp), %rax cmpl $0x0, 0x40(%rax) jne 0x8951a movq -0x10(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x89512 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x894e8 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0x894f8 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x40(%rax) movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi callq 0x87d10 jmp 0x89518 jmp 0x89514 jmp 0x89516 jmp 0x89518 jmp 0x89571 movl $0x0, -0x44(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax cmpq $0x0, 0xb0(%rax) je 0x8956f movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq 0xb0(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi movq -0x10(%rbp), %rcx cmpl $0x8, 0x40(%rcx) sete %cl andb $0x1, %cl movzbl %cl, %ecx movsbl %cl, %esi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0x8956f movl $0x1, -0x44(%rbp) jmp 0x89571 movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi addq $0x18, %rdi callq 0x879c0 movq -0x28(%rbp), %rdi addq $0x40, %rdi leaq 0x54564(%rip), %rsi # 0xddaf5 movl $0x274, %edx # imm = 0x274 callq 0x87950 movq -0x28(%rbp), %rax movq $0x0, 0x98(%rax) movq -0x28(%rbp), %rax movq $0x0, 0xa0(%rax) movq -0x28(%rbp), %rdi addq $0x40, %rdi callq 0x879c0 xorl %eax, %eax movl %eax, %edx leaq -0x60(%rbp), %rsi leaq 0x545b5(%rip), %rcx # 0xddb8a leaq 0x54519(%rip), %r8 # 0xddaf5 movl $0x279, %r9d # imm = 0x279 leaq 0x1b3517(%rip), %rax # 0x23cb00 movq %rdx, %rdi callq *(%rax) movl -0x44(%rbp), %eax movl %eax, -0x84(%rbp) movl -0x84(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
wait_for_lock: push rbp mov rbp, rsp sub rsp, 90h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov [rbp+var_20], rcx call _my_thread_var mov [rbp+var_28], rax mov rax, [rbp+var_28] add rax, 8 mov [rbp+var_30], rax mov [rbp+var_44], 1 mov [rbp+var_61], 0 jmp short $+2 loc_892DE: cmp [rbp+var_11], 0 jnz short loc_89313 mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax+8] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+8] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_8] mov [rax+8], rcx loc_89313: lea rax, locks_waited mov rcx, [rax] add rcx, 1 lea rax, locks_waited mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax+18h] add rcx, 18h mov rax, [rbp+var_28] mov [rax+98h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_28] mov [rax+0A0h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+20h], rcx xor eax, eax mov edi, eax lea rsi, stage_waiting_for_table_level_lock lea rdx, [rbp+var_60] lea rcx, aUnknown_0; "<unknown>" lea r8, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 219h lea rax, proc_info_hook call qword ptr [rax] mov rax, [rbp+var_28] mov eax, [rax+0E0h] cmp eax, 0 jz short loc_893A1 movsx eax, [rbp+var_11] cmp eax, 0 jz short loc_893B5 loc_893A1: cmp cs:before_lock_wait, 0 jz short loc_893B5 mov [rbp+var_61], 1 call cs:before_lock_wait loc_893B5: jmp short $+2 loc_893B7: call my_hrtime mov [rbp+var_78], rax imul rax, [rbp+var_78], 3E8h imul rcx, [rbp+var_20], 3B9ACA00h add rax, rcx mov [rbp+var_70], rax mov rax, [rbp+var_70] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_40], rax mov rax, [rbp+var_70] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_38], rdx jmp short $+2 loc_893FD: mov rax, [rbp+var_28] mov ecx, [rax+0E0h] mov al, 1 cmp ecx, 0 mov [rbp+var_7D], al jz short loc_8941E movsx eax, [rbp+var_11] cmp eax, 0 setnz al mov [rbp+var_7D], al loc_8941E: mov al, [rbp+var_7D] test al, 1 jnz short loc_89427 jmp short loc_8947C loc_89427: mov rdi, [rbp+var_30] mov rax, [rbp+var_10] mov rsi, [rax+18h] add rsi, 18h lea rdx, [rbp+var_40] lea rcx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov r8d, 22Eh call inline_mysql_cond_timedwait_0 mov [rbp+var_7C], eax mov rax, [rbp+var_10] cmp qword ptr [rax+20h], 0 jnz short loc_89461 jmp short $+2 loc_8945D: jmp short $+2 loc_8945F: jmp short loc_8947C loc_89461: cmp [rbp+var_7C], 6Eh ; 'n' jz short loc_8946D cmp [rbp+var_7C], 3Eh ; '>' jnz short loc_8947A loc_8946D: jmp short $+2 loc_8946F: jmp short $+2 loc_89471: mov [rbp+var_44], 2 jmp short loc_8947C loc_8947A: jmp short loc_893FD loc_8947C: cmp cs:after_lock_wait, 0 jz short loc_89495 movsx eax, [rbp+var_61] cmp eax, 0 jz short loc_89495 call cs:after_lock_wait loc_89495: jmp short $+2 loc_89497: jmp short $+2 loc_89499: mov rax, [rbp+var_10] cmp qword ptr [rax+20h], 0 jnz short loc_894AE mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0 jnz short loc_8951A loc_894AE: mov rax, [rbp+var_10] cmp qword ptr [rax+20h], 0 jz short loc_89512 mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_894E8 mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_894F8 loc_894E8: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax+8], rcx loc_894F8: mov rax, [rbp+var_10] mov dword ptr [rax+40h], 0 mov rax, [rbp+var_10] mov rdi, [rax+18h] call wake_up_waiters jmp short loc_89518 loc_89512: jmp short $+2 loc_89514: jmp short $+2 loc_89516: jmp short $+2 loc_89518: jmp short loc_89571 loc_8951A: mov [rbp+var_44], 0 mov rax, [rbp+var_10] mov rax, [rax+18h] cmp qword ptr [rax+0B0h], 0 jz short loc_8956F mov rax, [rbp+var_10] mov rax, [rax+18h] mov rax, [rax+0B0h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] mov rcx, [rbp+var_10] cmp dword ptr [rcx+40h], 8 setz cl and cl, 1 movzx ecx, cl movsx esi, cl call rax movsx eax, al cmp eax, 0 jz short loc_8956F mov [rbp+var_44], 1 loc_8956F: jmp short $+2 loc_89571: mov rax, [rbp+var_10] mov rdi, [rax+18h] add rdi, 18h call inline_mysql_mutex_unlock_12 mov rdi, [rbp+var_28] add rdi, 40h ; '@' lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 274h call inline_mysql_mutex_lock_12 mov rax, [rbp+var_28] mov qword ptr [rax+98h], 0 mov rax, [rbp+var_28] mov qword ptr [rax+0A0h], 0 mov rdi, [rbp+var_28] add rdi, 40h ; '@' call inline_mysql_mutex_unlock_12 xor eax, eax mov edx, eax lea rsi, [rbp+var_60] lea rcx, aUnknown_0; "<unknown>" lea r8, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 279h lea rax, proc_info_hook mov rdi, rdx call qword ptr [rax] mov eax, [rbp+var_44] mov [rbp+var_84], eax mov eax, [rbp+var_84] add rsp, 90h pop rbp retn
long long wait_for_lock(long long a1, const char *a2, char a3, long long a4) { long long v4; // rax bool v6; // [rsp+13h] [rbp-7Dh] int v7; // [rsp+14h] [rbp-7Ch] unsigned long long v8; // [rsp+20h] [rbp-70h] char v9; // [rsp+2Fh] [rbp-61h] unsigned int v10; // [rsp+4Ch] [rbp-44h] _QWORD v11[2]; // [rsp+50h] [rbp-40h] BYREF long long v12; // [rsp+60h] [rbp-30h] long long v13; // [rsp+68h] [rbp-28h] long long v14; // [rsp+70h] [rbp-20h] char v15; // [rsp+7Fh] [rbp-11h] const char *v16; // [rsp+80h] [rbp-10h] long long v17; // [rsp+88h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = my_thread_var(a1, a2); v12 = v13 + 8; v10 = 1; v9 = 0; if ( !v15 ) { **(_QWORD **)(v17 + 8) = v16; *((_QWORD *)v16 + 2) = *(_QWORD *)(v17 + 8); *(_QWORD *)(v17 + 8) = v16 + 8; } ++locks_waited; *(_QWORD *)(v13 + 152) = *((_QWORD *)v16 + 3) + 24LL; *(_QWORD *)(v13 + 160) = v12; *((_QWORD *)v16 + 4) = v12; proc_info_hook(); if ( (!*(_DWORD *)(v13 + 224) || v15) && before_lock_wait ) { v9 = 1; before_lock_wait(0LL, &stage_waiting_for_table_level_lock); } v8 = 1000000000 * v14 + 1000 * my_hrtime(); v11[0] = v8 / 0x3B9ACA00; v11[1] = v8 % 0x3B9ACA00; while ( 1 ) { v6 = 1; if ( *(_DWORD *)(v13 + 224) ) v6 = v15 != 0; if ( !v6 ) break; v7 = inline_mysql_cond_timedwait_0( v12, *((_QWORD *)v16 + 3) + 24LL, v11, "/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 558LL); if ( !*((_QWORD *)v16 + 4) ) break; if ( v7 == 110 || v7 == 62 ) { v10 = 2; break; } } if ( after_lock_wait && v9 ) after_lock_wait(); if ( !*((_QWORD *)v16 + 4) && *((_DWORD *)v16 + 16) ) { v10 = 0; if ( *(_QWORD *)(*((_QWORD *)v16 + 3) + 176LL) ) v10 = (*(unsigned __int8 ( **)(_QWORD, bool))(*((_QWORD *)v16 + 3) + 176LL))( *((_QWORD *)v16 + 5), *((_DWORD *)v16 + 16) == 8) != 0; } else if ( *((_QWORD *)v16 + 4) ) { v4 = *((_QWORD *)v16 + 1); **((_QWORD **)v16 + 2) = v4; if ( v4 ) *(_QWORD *)(*((_QWORD *)v16 + 1) + 16LL) = *((_QWORD *)v16 + 2); else *(_QWORD *)(v17 + 8) = *((_QWORD *)v16 + 2); *((_DWORD *)v16 + 16) = 0; wake_up_waiters(*((_QWORD *)v16 + 3)); } inline_mysql_mutex_unlock_12(*((_QWORD *)v16 + 3) + 24LL); inline_mysql_mutex_lock_12(v13 + 64, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x274u); *(_QWORD *)(v13 + 152) = 0LL; *(_QWORD *)(v13 + 160) = 0LL; inline_mysql_mutex_unlock_12(v13 + 64); proc_info_hook(); return v10; }
wait_for_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV qword ptr [RBP + -0x20],RCX CALL 0x00186110 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x8 MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x44],0x1 MOV byte ptr [RBP + -0x61],0x0 JMP 0x001892de LAB_001892de: CMP byte ptr [RBP + -0x11],0x0 JNZ 0x00189313 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX LAB_00189313: LEA RAX,[0x5007b0] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x5007b0] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0xa0],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x33c788] LEA RDX,[RBP + -0x60] LEA RCX,[0x1ddb8a] LEA R8,[0x1ddaf5] MOV R9D,0x219 LEA RAX,[0x33cb00] CALL qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0xe0] CMP EAX,0x0 JZ 0x001893a1 MOVSX EAX,byte ptr [RBP + -0x11] CMP EAX,0x0 JZ 0x001893b5 LAB_001893a1: CMP qword ptr [0x005007b8],0x0 JZ 0x001893b5 MOV byte ptr [RBP + -0x61],0x1 CALL qword ptr [0x005007b8] LAB_001893b5: JMP 0x001893b7 LAB_001893b7: CALL 0x00180210 MOV qword ptr [RBP + -0x78],RAX IMUL RAX,qword ptr [RBP + -0x78],0x3e8 IMUL RCX,qword ptr [RBP + -0x20],0x3b9aca00 ADD RAX,RCX MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x38],RDX JMP 0x001893fd LAB_001893fd: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0xe0] MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x7d],AL JZ 0x0018941e MOVSX EAX,byte ptr [RBP + -0x11] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x7d],AL LAB_0018941e: MOV AL,byte ptr [RBP + -0x7d] TEST AL,0x1 JNZ 0x00189427 JMP 0x0018947c LAB_00189427: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x18] ADD RSI,0x18 LEA RDX,[RBP + -0x40] LEA RCX,[0x1ddaf5] MOV R8D,0x22e CALL 0x00189e30 MOV dword ptr [RBP + -0x7c],EAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x00189461 JMP 0x0018945d LAB_0018945d: JMP 0x0018945f LAB_0018945f: JMP 0x0018947c LAB_00189461: CMP dword ptr [RBP + -0x7c],0x6e JZ 0x0018946d CMP dword ptr [RBP + -0x7c],0x3e JNZ 0x0018947a LAB_0018946d: JMP 0x0018946f LAB_0018946f: JMP 0x00189471 LAB_00189471: MOV dword ptr [RBP + -0x44],0x2 JMP 0x0018947c LAB_0018947a: JMP 0x001893fd LAB_0018947c: CMP qword ptr [0x005007c0],0x0 JZ 0x00189495 MOVSX EAX,byte ptr [RBP + -0x61] CMP EAX,0x0 JZ 0x00189495 CALL qword ptr [0x005007c0] LAB_00189495: JMP 0x00189497 LAB_00189497: JMP 0x00189499 LAB_00189499: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x001894ae MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x0 JNZ 0x0018951a LAB_001894ae: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00189512 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001894e8 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001894f8 LAB_001894e8: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX LAB_001894f8: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] CALL 0x00187d10 JMP 0x00189518 LAB_00189512: JMP 0x00189514 LAB_00189514: JMP 0x00189516 LAB_00189516: JMP 0x00189518 LAB_00189518: JMP 0x00189571 LAB_0018951a: MOV dword ptr [RBP + -0x44],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] CMP qword ptr [RAX + 0xb0],0x0 JZ 0x0018956f MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0xb0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] MOV RCX,qword ptr [RBP + -0x10] CMP dword ptr [RCX + 0x40],0x8 SETZ CL AND CL,0x1 MOVZX ECX,CL MOVSX ESI,CL CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x0018956f MOV dword ptr [RBP + -0x44],0x1 LAB_0018956f: JMP 0x00189571 LAB_00189571: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] ADD RDI,0x18 CALL 0x001879c0 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x40 LEA RSI,[0x1ddaf5] MOV EDX,0x274 CALL 0x00187950 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x98],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0xa0],0x0 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x40 CALL 0x001879c0 XOR EAX,EAX MOV EDX,EAX LEA RSI,[RBP + -0x60] LEA RCX,[0x1ddb8a] LEA R8,[0x1ddaf5] MOV R9D,0x279 LEA RAX,[0x33cb00] MOV RDI,RDX CALL qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x84],EAX MOV EAX,dword ptr [RBP + -0x84] ADD RSP,0x90 POP RBP RET
int4 wait_for_lock(long param_1,long param_2,char param_3,long param_4) { char cVar1; int iVar2; long lVar3; ulong uVar4; ulong extraout_RDX; ulong extraout_RDX_00; bool bVar5; int1 local_68 [28]; int4 local_4c; ulong local_48; ulong local_40; long local_38; long local_30; long local_28; char local_19; long local_18; long local_10; local_28 = param_4; local_19 = param_3; local_18 = param_2; local_10 = param_1; local_30 = _my_thread_var(); local_38 = local_30 + 8; local_4c = 1; bVar5 = false; if (local_19 == '\0') { **(long **)(local_10 + 8) = local_18; *(int8 *)(local_18 + 0x10) = *(int8 *)(local_10 + 8); *(long *)(local_10 + 8) = local_18 + 8; } locks_waited = locks_waited + 1; *(long *)(local_30 + 0x98) = *(long *)(local_18 + 0x18) + 0x18; *(long *)(local_30 + 0xa0) = local_38; *(long *)(local_18 + 0x20) = local_38; (*(code *)proc_info_hook) (0,stage_waiting_for_table_level_lock,local_68,"<unknown>", "/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x219); if (((*(int *)(local_30 + 0xe0) == 0) || (local_19 != '\0')) && (before_lock_wait != (code *)0x0)) { bVar5 = true; (*before_lock_wait)(); } lVar3 = my_hrtime(); uVar4 = lVar3 * 1000 + local_28 * 1000000000; local_48 = uVar4 / 1000000000; uVar4 = uVar4 % 1000000000; local_40 = uVar4; do { if ((*(int *)(local_30 + 0xe0) != 0 && local_19 == '\0') || (iVar2 = inline_mysql_cond_timedwait (local_38,*(long *)(local_18 + 0x18) + 0x18,&local_48, "/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x22e), uVar4 = extraout_RDX, *(long *)(local_18 + 0x20) == 0)) goto LAB_0018947c; } while ((iVar2 != 0x6e) && (iVar2 != 0x3e)); local_4c = 2; LAB_0018947c: if ((after_lock_wait != (code *)0x0) && (bVar5)) { (*after_lock_wait)(); uVar4 = extraout_RDX_00; } if ((*(long *)(local_18 + 0x20) == 0) && (*(int *)(local_18 + 0x40) != 0)) { local_4c = 0; if ((*(long *)(*(long *)(local_18 + 0x18) + 0xb0) != 0) && (bVar5 = *(int *)(local_18 + 0x40) == 8, cVar1 = (**(code **)(*(long *)(local_18 + 0x18) + 0xb0)) (*(int8 *)(local_18 + 0x28),bVar5,uVar4,bVar5), cVar1 != '\0')) { local_4c = 1; } } else if (*(long *)(local_18 + 0x20) != 0) { lVar3 = *(long *)(local_18 + 8); **(long **)(local_18 + 0x10) = lVar3; if (lVar3 == 0) { *(int8 *)(local_10 + 8) = *(int8 *)(local_18 + 0x10); } else { *(int8 *)(*(long *)(local_18 + 8) + 0x10) = *(int8 *)(local_18 + 0x10); } *(int4 *)(local_18 + 0x40) = 0; wake_up_waiters(*(int8 *)(local_18 + 0x18)); } inline_mysql_mutex_unlock(*(long *)(local_18 + 0x18) + 0x18); inline_mysql_mutex_lock (local_30 + 0x40,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x274); *(int8 *)(local_30 + 0x98) = 0; *(int8 *)(local_30 + 0xa0) = 0; inline_mysql_mutex_unlock(local_30 + 0x40); (*(code *)proc_info_hook) (0,local_68,0,"<unknown>","/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x279); return local_4c; }
53,008
wait_for_lock
eloqsql/mysys/thr_lock.c
static enum enum_thr_lock_result wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, my_bool in_wait_list, ulong lock_wait_timeout) { struct st_my_thread_var *thread_var= my_thread_var; mysql_cond_t *cond= &thread_var->suspend; struct timespec wait_timeout; enum enum_thr_lock_result result= THR_LOCK_ABORTED; PSI_stage_info old_stage; my_bool use_wait_callbacks= FALSE; DBUG_ENTER("wait_for_lock"); /* One can use this to signal when a thread is going to wait for a lock. See debug_sync.cc. Beware of waiting for a signal here. The lock has acquired its mutex. While waiting on a signal here, the locking thread could not acquire the mutex to release the lock. One could lock up the table completely. In detail it works so: When thr_lock() tries to acquire a table lock, it locks the lock->mutex, checks if it can have the lock, and if not, it calls wait_for_lock(). Here it unlocks the table lock while waiting on a condition. The sync point is located before this wait for condition. If we have a waiting action here, we hold the the table locks mutex all the time. Any attempt to look at the table lock by another thread blocks it immediately on lock->mutex. This can easily become an unexpected and unobvious blockage. So be warned: Do not request a WAIT_FOR action for the 'wait_for_lock' sync point unless you really know what you do. */ DEBUG_SYNC_C("wait_for_lock"); if (!in_wait_list) { (*wait->last)=data; /* Wait for lock */ data->prev= wait->last; wait->last= &data->next; } statistic_increment(locks_waited, &THR_LOCK_lock); /* Set up control struct to allow others to abort locks */ thread_var->current_mutex= &data->lock->mutex; thread_var->current_cond= cond; data->cond= cond; proc_info_hook(NULL, &stage_waiting_for_table_level_lock, &old_stage, __func__, __FILE__, __LINE__); /* Since before_lock_wait potentially can create more threads to scheduler work for, we don't want to call the before_lock_wait callback unless it will really start to wait. For similar reasons, we do not want to call before_lock_wait and after_lock_wait for each lap around the loop, so we restrict ourselves to call it before_lock_wait once before starting to wait and once after the thread has exited the wait loop. */ if ((!thread_var->abort || in_wait_list) && before_lock_wait) { use_wait_callbacks= TRUE; (*before_lock_wait)(); } set_timespec(wait_timeout, lock_wait_timeout); while (!thread_var->abort || in_wait_list) { int rc= mysql_cond_timedwait(cond, &data->lock->mutex, &wait_timeout); /* We must break the wait if one of the following occurs: - the connection has been aborted (!thread_var->abort), but this is not a delayed insert thread (in_wait_list). For a delayed insert thread the proper action at shutdown is, apparently, to acquire the lock and complete the insert. - the lock has been granted (data->cond is set to NULL by the granter), or the waiting has been aborted (additionally data->type is set to TL_UNLOCK). - the wait has timed out (rc == ETIMEDOUT) Order of checks below is important to not report about timeout if the predicate is true. */ if (data->cond == 0) { DBUG_PRINT("thr_lock", ("lock granted/aborted")); break; } if (rc == ETIMEDOUT || rc == ETIME) { /* purecov: begin inspected */ DBUG_PRINT("thr_lock", ("lock timed out")); result= THR_LOCK_WAIT_TIMEOUT; break; /* purecov: end */ } } /* We call the after_lock_wait callback once the wait loop has finished. */ if (after_lock_wait && use_wait_callbacks) (*after_lock_wait)(); DBUG_PRINT("thr_lock", ("aborted: %d in_wait_list: %d", thread_var->abort, in_wait_list)); if (data->cond || data->type == TL_UNLOCK) { if (data->cond) /* aborted or timed out */ { if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else wait->last=data->prev; data->type= TL_UNLOCK; /* No lock */ check_locks(data->lock, "killed or timed out wait_for_lock", data->type, 1); wake_up_waiters(data->lock); } else { DBUG_PRINT("thr_lock", ("lock aborted")); check_locks(data->lock, "aborted wait_for_lock", data->type, 0); } } else { result= THR_LOCK_SUCCESS; if (data->lock->get_status && (*data->lock->get_status)(data->status_param, data->type == TL_WRITE_CONCURRENT_INSERT)) result= THR_LOCK_ABORTED; check_locks(data->lock,"got wait_for_lock", data->type, 0); } mysql_mutex_unlock(&data->lock->mutex); /* The following must be done after unlock of lock->mutex */ mysql_mutex_lock(&thread_var->mutex); thread_var->current_mutex= 0; thread_var->current_cond= 0; mysql_mutex_unlock(&thread_var->mutex); proc_info_hook(NULL, &old_stage, NULL, __func__, __FILE__, __LINE__); DBUG_RETURN(result); }
O3
c
wait_for_lock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r15 movl %edx, %ebx movq %rsi, %r14 movq %rdi, -0x38(%rbp) callq 0x5ecfe movq %rax, %r13 movq %rax, -0x40(%rbp) leaq 0x8(%rax), %r12 testb %bl, %bl jne 0x60be1 movq -0x38(%rbp), %rcx movq 0x8(%rcx), %rax movq %r14, (%rax) movq 0x8(%rcx), %rax movq %rax, 0x10(%r14) leaq 0x8(%r14), %rax movq %rax, 0x8(%rcx) leaq 0x355f28(%rip), %rax # 0x3b6b10 incq (%rax) movq 0x18(%r14), %rax addq $0x18, %rax movq %rax, 0x98(%r13) movq %r12, 0xa0(%r13) movq %r12, 0x20(%r14) leaq 0x2d2d94(%rip), %rax # 0x3339a0 leaq 0x2d2a15(%rip), %rsi # 0x333628 leaq 0x36060(%rip), %rcx # 0x96c7a leaq 0x35fc4(%rip), %r8 # 0x96be5 leaq -0x68(%rbp), %rdx xorl %edi, %edi movl $0x219, %r9d # imm = 0x219 callq *(%rax) cmpl $0x0, 0xe0(%r13) sete %al testb %bl, %bl setne %cl orb %al, %cl movq 0x355ed0(%rip), %rax # 0x3b6b18 testq %rax, %rax setne %dl andb %cl, %dl movb %dl, -0x29(%rbp) cmpb $0x1, %dl jne 0x60c5a callq *%rax callq 0x5b814 imulq $0x3e8, %rax, %rax # imm = 0x3E8 imulq $0x3b9aca00, %r15, %rcx # imm = 0x3B9ACA00 addq %rax, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx leaq -0x50(%rbp), %rsi movq %rdx, (%rsi) imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00 subq %rax, %rcx movq %rcx, 0x8(%rsi) movl 0xe0(%r13), %eax movl $0x1, %r15d testb %bl, %bl jne 0x60cb2 testl %eax, %eax jne 0x60d01 movq 0x18(%r14), %rsi addq $0x18, %rsi cmpq $0x0, 0x38(%r13) jne 0x60ce6 movq %r12, %rdi leaq -0x50(%rbp), %rdx callq 0x285d0 cmpq $0x0, 0x20(%r14) je 0x60d01 movl $0x2, %r15d cmpl $0x6e, %eax je 0x60d01 cmpl $0x3e, %eax jne 0x60c9d jmp 0x60d01 movq %r12, %rdi leaq -0x50(%rbp), %rdx leaq 0x35ef1(%rip), %rcx # 0x96be5 movl $0x22e, %r8d # imm = 0x22E callq 0x2a2a7 jmp 0x60ccd movq 0x355e18(%rip), %rax # 0x3b6b20 testq %rax, %rax sete %cl movb -0x29(%rbp), %dl xorb $0x1, %dl orb %cl, %dl jne 0x60d1a callq *%rax cmpq $0x0, 0x20(%r14) je 0x60df5 movq 0x8(%r14), %rax movq 0x10(%r14), %rcx movq %rax, (%rcx) movq -0x38(%rbp), %rdx addq $0x8, %rdx leaq 0x10(%rax), %rcx testq %rax, %rax cmoveq %rdx, %rcx movq 0x10(%r14), %rax movq %rax, (%rcx) movl $0x0, 0x40(%r14) movq 0x18(%r14), %rdi callq 0x5fa2d movq 0x18(%r14), %rbx movq 0x58(%rbx), %rdi addq $0x18, %rbx testq %rdi, %rdi jne 0x60e36 movq %rbx, %rdi callq 0x28280 movq -0x40(%rbp), %rbx addq $0x40, %rbx cmpq $0x0, 0x80(%r13) jne 0x60e4b movq %rbx, %rdi callq 0x28570 xorl %eax, %eax movq %rax, 0x98(%r13) movq %rax, 0xa0(%r13) movq 0x80(%r13), %rdi testq %rdi, %rdi jne 0x60e64 movq %rbx, %rdi callq 0x28280 leaq 0x35eb5(%rip), %rcx # 0x96c7a leaq 0x35e19(%rip), %r8 # 0x96be5 leaq -0x68(%rbp), %rsi xorl %edi, %edi xorl %edx, %edx movl $0x279, %r9d # imm = 0x279 leaq 0x2d2bbf(%rip), %rax # 0x3339a0 callq *(%rax) movl %r15d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x40(%r14), %eax testl %eax, %eax je 0x60d5b movq 0x18(%r14), %rcx movq 0xb0(%rcx), %rcx testq %rcx, %rcx je 0x60e2e movq 0x28(%r14), %rdi xorl %esi, %esi cmpl $0x8, %eax sete %sil callq *%rcx xorl %r15d, %r15d testb %al, %al setne %r15b jmp 0x60d5b xorl %r15d, %r15d jmp 0x60d5b leaq 0x2d3023(%rip), %rax # 0x333e60 movq (%rax), %rax callq *0x160(%rax) jmp 0x60d70 leaq 0x35d93(%rip), %rsi # 0x96be5 movq %rbx, %rdi movl $0x274, %edx # imm = 0x274 callq 0x29f26 jmp 0x60d96 leaq 0x2d2ff5(%rip), %rax # 0x333e60 movq (%rax), %rax callq *0x160(%rax) jmp 0x60db6
wait_for_lock: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rcx mov ebx, edx mov r14, rsi mov [rbp+var_38], rdi call _my_thread_var mov r13, rax mov [rbp+var_40], rax lea r12, [rax+8] test bl, bl jnz short loc_60BE1 mov rcx, [rbp+var_38] mov rax, [rcx+8] mov [rax], r14 mov rax, [rcx+8] mov [r14+10h], rax lea rax, [r14+8] mov [rcx+8], rax loc_60BE1: lea rax, locks_waited inc qword ptr [rax] mov rax, [r14+18h] add rax, 18h mov [r13+98h], rax mov [r13+0A0h], r12 mov [r14+20h], r12 lea rax, proc_info_hook lea rsi, stage_waiting_for_table_level_lock lea rcx, aUnknown_0; "<unknown>" lea r8, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, [rbp+var_68] xor edi, edi mov r9d, 219h call qword ptr [rax] cmp dword ptr [r13+0E0h], 0 setz al test bl, bl setnz cl or cl, al mov rax, cs:before_lock_wait test rax, rax setnz dl and dl, cl mov [rbp+var_29], dl cmp dl, 1 jnz short loc_60C5A call rax ; before_lock_wait loc_60C5A: call my_hrtime imul rax, 3E8h imul rcx, r15, 3B9ACA00h add rcx, rax mov rax, rcx shr rax, 9 mov rdx, 44B82FA09B5A53h mul rdx shr rdx, 0Bh lea rsi, [rbp+var_50] mov [rsi], rdx imul rax, rdx, 3B9ACA00h sub rcx, rax mov [rsi+8], rcx loc_60C9D: mov eax, [r13+0E0h] mov r15d, 1 test bl, bl jnz short loc_60CB2 test eax, eax jnz short loc_60D01 loc_60CB2: mov rsi, [r14+18h] add rsi, 18h cmp qword ptr [r13+38h], 0 jnz short loc_60CE6 mov rdi, r12 lea rdx, [rbp+var_50] call _pthread_cond_timedwait loc_60CCD: cmp qword ptr [r14+20h], 0 jz short loc_60D01 mov r15d, 2 cmp eax, 6Eh ; 'n' jz short loc_60D01 cmp eax, 3Eh ; '>' jnz short loc_60C9D jmp short loc_60D01 loc_60CE6: mov rdi, r12 lea rdx, [rbp+var_50] lea rcx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov r8d, 22Eh call psi_cond_timedwait jmp short loc_60CCD loc_60D01: mov rax, cs:after_lock_wait test rax, rax setz cl mov dl, [rbp+var_29] xor dl, 1 or dl, cl jnz short loc_60D1A call rax ; after_lock_wait loc_60D1A: cmp qword ptr [r14+20h], 0 jz loc_60DF5 mov rax, [r14+8] mov rcx, [r14+10h] mov [rcx], rax mov rdx, [rbp+var_38] add rdx, 8 lea rcx, [rax+10h] test rax, rax cmovz rcx, rdx mov rax, [r14+10h] mov [rcx], rax mov dword ptr [r14+40h], 0 mov rdi, [r14+18h] call wake_up_waiters loc_60D5B: mov rbx, [r14+18h] mov rdi, [rbx+58h] add rbx, 18h test rdi, rdi jnz loc_60E36 loc_60D70: mov rdi, rbx call _pthread_mutex_unlock mov rbx, [rbp+var_40] add rbx, 40h ; '@' cmp qword ptr [r13+80h], 0 jnz loc_60E4B mov rdi, rbx call _pthread_mutex_lock loc_60D96: xor eax, eax mov [r13+98h], rax mov [r13+0A0h], rax mov rdi, [r13+80h] test rdi, rdi jnz loc_60E64 loc_60DB6: mov rdi, rbx call _pthread_mutex_unlock lea rcx, aUnknown_0; "<unknown>" lea r8, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... lea rsi, [rbp+var_68] xor edi, edi xor edx, edx mov r9d, 279h lea rax, proc_info_hook call qword ptr [rax] mov eax, r15d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_60DF5: mov eax, [r14+40h] test eax, eax jz loc_60D5B mov rcx, [r14+18h] mov rcx, [rcx+0B0h] test rcx, rcx jz short loc_60E2E mov rdi, [r14+28h] xor esi, esi cmp eax, 8 setz sil call rcx xor r15d, r15d test al, al setnz r15b jmp loc_60D5B loc_60E2E: xor r15d, r15d jmp loc_60D5B loc_60E36: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_60D70 loc_60E4B: lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 274h call psi_mutex_lock jmp loc_60D96 loc_60E64: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_60DB6
long long wait_for_lock(long long a1, long long a2, char a3, long long a4) { long long v7; // r13 long long v8; // r12 long long v9; // rcx long long v10; // rdi unsigned long long v11; // rcx unsigned int v12; // r15d long long v13; // rsi int v14; // eax long long v15; // rax _QWORD *v16; // rcx long long v17; // rbx long long v18; // rdi long long v19; // rbx long long v20; // rbx int v22; // eax unsigned __int8 ( *v23)(_QWORD, bool); // rcx _QWORD v24[2]; // [rsp+20h] [rbp-50h] BYREF long long v25; // [rsp+30h] [rbp-40h] long long v26; // [rsp+38h] [rbp-38h] bool v27; // [rsp+47h] [rbp-29h] v26 = a1; v7 = my_thread_var(a1, (const char *)a2); v25 = v7; v8 = v7 + 8; if ( !a3 ) { v9 = v26; **(_QWORD **)(v26 + 8) = a2; *(_QWORD *)(a2 + 16) = *(_QWORD *)(v9 + 8); *(_QWORD *)(v9 + 8) = a2 + 8; } ++locks_waited; *(_QWORD *)(v7 + 152) = *(_QWORD *)(a2 + 24) + 24LL; *(_QWORD *)(v7 + 160) = v8; *(_QWORD *)(a2 + 32) = v8; v10 = 0LL; proc_info_hook(); v27 = (*(_DWORD *)(v7 + 224) == 0 || a3 != 0) && before_lock_wait != 0; if ( v27 ) ((void ( *)(_QWORD, void *))before_lock_wait)(0LL, &stage_waiting_for_table_level_lock); v11 = 1000 * my_hrtime() + 1000000000 * a4; v24[0] = v11 / 0x3B9ACA00; v24[1] = v11 % 0x3B9ACA00; do { v12 = 1; if ( !a3 && *(_DWORD *)(v7 + 224) ) break; v13 = *(_QWORD *)(a2 + 24) + 24LL; v10 = v7 + 8; v14 = *(_QWORD *)(v7 + 56) ? psi_cond_timedwait( v8, v13, (long long)v24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x22Eu) : pthread_cond_timedwait(v8, v13, v24); if ( !*(_QWORD *)(a2 + 32) ) break; v12 = 2; if ( v14 == 110 ) break; } while ( v14 != 62 ); if ( after_lock_wait != 0 && v27 ) ((void ( *)(long long))after_lock_wait)(v10); if ( *(_QWORD *)(a2 + 32) ) { v15 = *(_QWORD *)(a2 + 8); **(_QWORD **)(a2 + 16) = v15; v16 = (_QWORD *)(v15 + 16); if ( !v15 ) v16 = (_QWORD *)(v26 + 8); *v16 = *(_QWORD *)(a2 + 16); *(_DWORD *)(a2 + 64) = 0; wake_up_waiters(*(_QWORD *)(a2 + 24)); } else { v22 = *(_DWORD *)(a2 + 64); if ( v22 ) { v23 = *(unsigned __int8 ( **)(_QWORD, bool))(*(_QWORD *)(a2 + 24) + 176LL); if ( v23 ) v12 = v23(*(_QWORD *)(a2 + 40), v22 == 8) != 0; else v12 = 0; } } v17 = *(_QWORD *)(a2 + 24); v18 = *(_QWORD *)(v17 + 88); v19 = v17 + 24; if ( v18 ) PSI_server[44](); pthread_mutex_unlock(v19); v20 = v25 + 64; if ( *(_QWORD *)(v7 + 128) ) psi_mutex_lock(v25 + 64, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x274u); else pthread_mutex_lock(v25 + 64); *(_QWORD *)(v7 + 152) = 0LL; *(_QWORD *)(v7 + 160) = 0LL; if ( *(_QWORD *)(v7 + 128) ) PSI_server[44](); pthread_mutex_unlock(v20); proc_info_hook(); return v12; }
wait_for_lock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RCX MOV EBX,EDX MOV R14,RSI MOV qword ptr [RBP + -0x38],RDI CALL 0x0015ecfe MOV R13,RAX MOV qword ptr [RBP + -0x40],RAX LEA R12,[RAX + 0x8] TEST BL,BL JNZ 0x00160be1 MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RCX + 0x8] MOV qword ptr [RAX],R14 MOV RAX,qword ptr [RCX + 0x8] MOV qword ptr [R14 + 0x10],RAX LEA RAX,[R14 + 0x8] MOV qword ptr [RCX + 0x8],RAX LAB_00160be1: LEA RAX,[0x4b6b10] INC qword ptr [RAX] MOV RAX,qword ptr [R14 + 0x18] ADD RAX,0x18 MOV qword ptr [R13 + 0x98],RAX MOV qword ptr [R13 + 0xa0],R12 MOV qword ptr [R14 + 0x20],R12 LEA RAX,[0x4339a0] LEA RSI,[0x433628] LEA RCX,[0x196c7a] LEA R8,[0x196be5] LEA RDX,[RBP + -0x68] XOR EDI,EDI MOV R9D,0x219 CALL qword ptr [RAX] CMP dword ptr [R13 + 0xe0],0x0 SETZ AL TEST BL,BL SETNZ CL OR CL,AL MOV RAX,qword ptr [0x004b6b18] TEST RAX,RAX SETNZ DL AND DL,CL MOV byte ptr [RBP + -0x29],DL CMP DL,0x1 JNZ 0x00160c5a CALL RAX LAB_00160c5a: CALL 0x0015b814 IMUL RAX,RAX,0x3e8 IMUL RCX,R15,0x3b9aca00 ADD RCX,RAX MOV RAX,RCX SHR RAX,0x9 MOV RDX,0x44b82fa09b5a53 MUL RDX SHR RDX,0xb LEA RSI,[RBP + -0x50] MOV qword ptr [RSI],RDX IMUL RAX,RDX,0x3b9aca00 SUB RCX,RAX MOV qword ptr [RSI + 0x8],RCX LAB_00160c9d: MOV EAX,dword ptr [R13 + 0xe0] MOV R15D,0x1 TEST BL,BL JNZ 0x00160cb2 TEST EAX,EAX JNZ 0x00160d01 LAB_00160cb2: MOV RSI,qword ptr [R14 + 0x18] ADD RSI,0x18 CMP qword ptr [R13 + 0x38],0x0 JNZ 0x00160ce6 MOV RDI,R12 LEA RDX,[RBP + -0x50] CALL 0x001285d0 LAB_00160ccd: CMP qword ptr [R14 + 0x20],0x0 JZ 0x00160d01 MOV R15D,0x2 CMP EAX,0x6e JZ 0x00160d01 CMP EAX,0x3e JNZ 0x00160c9d JMP 0x00160d01 LAB_00160ce6: MOV RDI,R12 LEA RDX,[RBP + -0x50] LEA RCX,[0x196be5] MOV R8D,0x22e CALL 0x0012a2a7 JMP 0x00160ccd LAB_00160d01: MOV RAX,qword ptr [0x004b6b20] TEST RAX,RAX SETZ CL MOV DL,byte ptr [RBP + -0x29] XOR DL,0x1 OR DL,CL JNZ 0x00160d1a CALL RAX LAB_00160d1a: CMP qword ptr [R14 + 0x20],0x0 JZ 0x00160df5 MOV RAX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [R14 + 0x10] MOV qword ptr [RCX],RAX MOV RDX,qword ptr [RBP + -0x38] ADD RDX,0x8 LEA RCX,[RAX + 0x10] TEST RAX,RAX CMOVZ RCX,RDX MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RCX],RAX MOV dword ptr [R14 + 0x40],0x0 MOV RDI,qword ptr [R14 + 0x18] CALL 0x0015fa2d LAB_00160d5b: MOV RBX,qword ptr [R14 + 0x18] MOV RDI,qword ptr [RBX + 0x58] ADD RBX,0x18 TEST RDI,RDI JNZ 0x00160e36 LAB_00160d70: MOV RDI,RBX CALL 0x00128280 MOV RBX,qword ptr [RBP + -0x40] ADD RBX,0x40 CMP qword ptr [R13 + 0x80],0x0 JNZ 0x00160e4b MOV RDI,RBX CALL 0x00128570 LAB_00160d96: XOR EAX,EAX MOV qword ptr [R13 + 0x98],RAX MOV qword ptr [R13 + 0xa0],RAX MOV RDI,qword ptr [R13 + 0x80] TEST RDI,RDI JNZ 0x00160e64 LAB_00160db6: MOV RDI,RBX CALL 0x00128280 LEA RCX,[0x196c7a] LEA R8,[0x196be5] LEA RSI,[RBP + -0x68] XOR EDI,EDI XOR EDX,EDX MOV R9D,0x279 LEA RAX,[0x4339a0] CALL qword ptr [RAX] MOV EAX,R15D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00160df5: MOV EAX,dword ptr [R14 + 0x40] TEST EAX,EAX JZ 0x00160d5b MOV RCX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RCX + 0xb0] TEST RCX,RCX JZ 0x00160e2e MOV RDI,qword ptr [R14 + 0x28] XOR ESI,ESI CMP EAX,0x8 SETZ SIL CALL RCX XOR R15D,R15D TEST AL,AL SETNZ R15B JMP 0x00160d5b LAB_00160e2e: XOR R15D,R15D JMP 0x00160d5b LAB_00160e36: LEA RAX,[0x433e60] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00160d70 LAB_00160e4b: LEA RSI,[0x196be5] MOV RDI,RBX MOV EDX,0x274 CALL 0x00129f26 JMP 0x00160d96 LAB_00160e64: LEA RAX,[0x433e60] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00160db6
int1 wait_for_lock(long param_1,long param_2,char param_3,long param_4) { pthread_cond_t *__cond; code *pcVar1; char cVar2; int iVar3; long lVar4; long lVar5; int8 *puVar6; pthread_mutex_t *ppVar7; bool bVar8; int1 uVar9; int1 local_70 [24]; timespec local_58; long local_48; long local_40; char local_31; local_40 = param_1; lVar4 = _my_thread_var(); __cond = (pthread_cond_t *)(lVar4 + 8); if (param_3 == '\0') { **(long **)(local_40 + 8) = param_2; *(int8 *)(param_2 + 0x10) = *(int8 *)(local_40 + 8); *(long *)(local_40 + 8) = param_2 + 8; } locks_waited = locks_waited + 1; *(long *)(lVar4 + 0x98) = *(long *)(param_2 + 0x18) + 0x18; *(pthread_cond_t **)(lVar4 + 0xa0) = __cond; *(pthread_cond_t **)(param_2 + 0x20) = __cond; local_48 = lVar4; (*(code *)proc_info_hook) (0,stage_waiting_for_table_level_lock,local_70,"<unknown>", "/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x219); bVar8 = *(int *)(lVar4 + 0xe0) == 0; local_31 = before_lock_wait != (code *)0x0 && (param_3 != '\0' || bVar8); if (before_lock_wait != (code *)0x0 && (param_3 != '\0' || bVar8)) { (*before_lock_wait)(); } lVar5 = my_hrtime(); local_58.tv_nsec = param_4 * 1000000000 + lVar5 * 1000; local_58.tv_sec = (ulong)local_58.tv_nsec / 1000000000; local_58.tv_nsec = (ulong)local_58.tv_nsec % 1000000000; while( true ) { uVar9 = 1; if ((param_3 == '\0') && (*(int *)(lVar4 + 0xe0) != 0)) break; ppVar7 = (pthread_mutex_t *)(*(long *)(param_2 + 0x18) + 0x18); if (*(long *)(lVar4 + 0x38) == 0) { iVar3 = pthread_cond_timedwait(__cond,ppVar7,&local_58); } else { iVar3 = psi_cond_timedwait(__cond,ppVar7,&local_58, "/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x22e); } if (((*(long *)(param_2 + 0x20) == 0) || (uVar9 = 2, iVar3 == 0x6e)) || (iVar3 == 0x3e)) break; } if (local_31 == '\x01' && after_lock_wait != (code *)0x0) { (*after_lock_wait)(); } if (*(long *)(param_2 + 0x20) == 0) { if (*(int *)(param_2 + 0x40) != 0) { pcVar1 = *(code **)(*(long *)(param_2 + 0x18) + 0xb0); if (pcVar1 == (code *)0x0) { uVar9 = 0; } else { cVar2 = (*pcVar1)(*(int8 *)(param_2 + 0x28),*(int *)(param_2 + 0x40) == 8); uVar9 = cVar2 != '\0'; } } } else { lVar5 = *(long *)(param_2 + 8); **(long **)(param_2 + 0x10) = lVar5; puVar6 = (int8 *)(lVar5 + 0x10); if (lVar5 == 0) { puVar6 = (int8 *)(local_40 + 8); } *puVar6 = *(int8 *)(param_2 + 0x10); *(int4 *)(param_2 + 0x40) = 0; wake_up_waiters(*(int8 *)(param_2 + 0x18)); } lVar5 = *(long *)(param_2 + 0x18); if (*(long *)(lVar5 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(lVar5 + 0x18)); ppVar7 = (pthread_mutex_t *)(local_48 + 0x40); if (*(long *)(lVar4 + 0x80) == 0) { pthread_mutex_lock(ppVar7); } else { psi_mutex_lock(ppVar7,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x274); } *(int8 *)(lVar4 + 0x98) = 0; *(int8 *)(lVar4 + 0xa0) = 0; if (*(long *)(lVar4 + 0x80) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar7); (*(code *)proc_info_hook) (0,local_70,0,"<unknown>","/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x279); return uVar9; }
53,009
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [10], 0>(char const (&) [10])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [10], 0>(char const (&) [10]): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x94347 movq %r14, %rdi movq %rbx, %rsi callq 0x3968e testb %al, %al jne 0x94344 addq $0x30, %r14 jmp 0x94326 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_94326: mov rax, [r15+8] cmp r14, rax jz short loc_94347 mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_94344 add r14, 30h ; '0' jmp short loc_94326 loc_94344: mov rax, r14 loc_94347: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_00194326: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x00194347 MOV RDI,R14 MOV RSI,RBX CALL 0x0013968e TEST AL,AL JNZ 0x00194344 ADD R14,0x30 JMP 0x00194326 LAB_00194344: MOV RAX,R14 LAB_00194347: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
53,010
psi_prlock_rdlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait) (&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line); int result= rw_pr_rdlock(&that->m_prlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); return result; }
O0
c
psi_prlock_rdlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1a93ce(%rip), %rax # 0x1d08d8 movq (%rax), %rax movq 0x1a0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x68(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi xorl %edx, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x27c00 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x2755d leaq 0x1a938e(%rip), %rax # 0x1d08d8 movq (%rax), %rax movq 0x1a8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_prlock_rdlock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1A0h] mov rcx, [rbp+var_8] mov rsi, [rcx+68h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] xor edx, edx call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call rw_pr_rdlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_2755D lea rax, PSI_server mov rax, [rax] mov rax, [rax+1A8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_2755D: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_prlock_rdlock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[52])( v6, *(_QWORD *)(a1 + 104), 0LL, a2, a3); v4 = rw_pr_rdlock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[53])(v5, v4); return v4; }
psi_prlock_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x2d08d8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x68] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] XOR EDX,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00127c00 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0012755d LEA RAX,[0x2d08d8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_0012755d: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_prlock_rdlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1a0)) (local_50,*(int8 *)(param_1 + 0x68),0,param_2,param_3); uVar1 = rw_pr_rdlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1a8))(lVar2,uVar1); } return uVar1; }
53,011
write_hook_for_undo_key_insert
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_undo_key_insert(enum translog_record_type type, TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { struct st_msg_to_write_hook_for_undo_key *msg= (struct st_msg_to_write_hook_for_undo_key *) hook_arg; MARIA_SHARE *share= tbl_info->s; if (msg->auto_increment > 0) { /* Only reason to set it here is to have a mutex protect from checkpoint reading at the same time (would see a corrupted value). The purpose of the following code is to set auto_increment if the row has a with auto_increment value higher than the current one. We also want to be able to restore the old value, in case of rollback, if no one else has tried to set the value. The logic used is that we only restore the auto_increment value if tbl_info->last_auto_increment == share->last_auto_increment when it's time to do the rollback. */ DBUG_PRINT("info",("auto_inc: %lu new auto_inc: %lu", (ulong)share->state.auto_increment, (ulong)msg->auto_increment)); if (share->state.auto_increment < msg->auto_increment) { /* Remember the original value, in case of rollback */ tbl_info->last_auto_increment= share->last_auto_increment= share->state.auto_increment; share->state.auto_increment= msg->auto_increment; } else { /* If the current value would have affected the original auto_increment value, set it to an impossible value so that it's not restored on rollback */ if (msg->auto_increment > share->last_auto_increment) share->last_auto_increment= ~(ulonglong) 0; } } return write_hook_for_undo_key(type, trn, tbl_info, lsn, hook_arg); }
O0
c
write_hook_for_undo_key_insert: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, 0x18(%rax) jbe 0x424c0 jmp 0x4244b jmp 0x4244d movq -0x38(%rbp), %rax movq 0xd8(%rax), %rax movq -0x30(%rbp), %rcx cmpq 0x18(%rcx), %rax jae 0x42498 movq -0x38(%rbp), %rax movq 0xd8(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x610(%rax) movq -0x18(%rbp), %rax movq %rcx, 0x3e8(%rax) movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, 0xd8(%rax) jmp 0x424be movq -0x30(%rbp), %rax movq 0x18(%rax), %rax movq -0x38(%rbp), %rcx cmpq 0x610(%rcx), %rax jbe 0x424bc movq -0x38(%rbp), %rax movq $-0x1, 0x610(%rax) jmp 0x424be jmp 0x424c0 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x42380 addq $0x40, %rsp popq %rbp retq nop
write_hook_for_undo_key_insert: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_30] cmp qword ptr [rax+18h], 0 jbe short loc_424C0 jmp short $+2 loc_4244B: jmp short $+2 loc_4244D: mov rax, [rbp+var_38] mov rax, [rax+0D8h] mov rcx, [rbp+var_30] cmp rax, [rcx+18h] jnb short loc_42498 mov rax, [rbp+var_38] mov rcx, [rax+0D8h] mov rax, [rbp+var_38] mov [rax+610h], rcx mov rax, [rbp+var_18] mov [rax+3E8h], rcx mov rax, [rbp+var_30] mov rcx, [rax+18h] mov rax, [rbp+var_38] mov [rax+0D8h], rcx jmp short loc_424BE loc_42498: mov rax, [rbp+var_30] mov rax, [rax+18h] mov rcx, [rbp+var_38] cmp rax, [rcx+610h] jbe short loc_424BC mov rax, [rbp+var_38] mov qword ptr [rax+610h], 0FFFFFFFFFFFFFFFFh loc_424BC: jmp short $+2 loc_424BE: jmp short $+2 loc_424C0: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call write_hook_for_undo_key add rsp, 40h pop rbp retn
long long write_hook_for_undo_key_insert(unsigned int a1, long long a2, long long *a3, long long a4, long long a5) { long long v5; // rcx long long v7; // [rsp+8h] [rbp-38h] v7 = *a3; if ( *(_QWORD *)(a5 + 24) ) { if ( *(_QWORD *)(v7 + 216) >= *(_QWORD *)(a5 + 24) ) { if ( *(_QWORD *)(a5 + 24) > *(_QWORD *)(v7 + 1552) ) *(_QWORD *)(v7 + 1552) = -1LL; } else { v5 = *(_QWORD *)(v7 + 216); *(_QWORD *)(v7 + 1552) = v5; a3[125] = v5; *(_QWORD *)(v7 + 216) = *(_QWORD *)(a5 + 24); } } return write_hook_for_undo_key(a1, a2, (long long)a3, a4, a5); }
write_hook_for_undo_key_insert: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x18],0x0 JBE 0x001424c0 JMP 0x0014244b LAB_0014244b: JMP 0x0014244d LAB_0014244d: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0xd8] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RCX + 0x18] JNC 0x00142498 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0xd8] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x610],RCX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x3e8],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0xd8],RCX JMP 0x001424be LAB_00142498: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RCX + 0x610] JBE 0x001424bc MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x610],-0x1 LAB_001424bc: JMP 0x001424be LAB_001424be: JMP 0x001424c0 LAB_001424c0: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x00142380 ADD RSP,0x40 POP RBP RET
void write_hook_for_undo_key_insert (int4 param_1,int8 param_2,long *param_3,int8 param_4,long param_5) { long lVar1; lVar1 = *param_3; if (*(long *)(param_5 + 0x18) != 0) { if (*(ulong *)(lVar1 + 0xd8) < *(ulong *)(param_5 + 0x18)) { *(long *)(lVar1 + 0x610) = *(long *)(lVar1 + 0xd8); param_3[0x7d] = *(long *)(lVar1 + 0xd8); *(int8 *)(lVar1 + 0xd8) = *(int8 *)(param_5 + 0x18); } else if (*(ulong *)(lVar1 + 0x610) < *(ulong *)(param_5 + 0x18)) { *(int8 *)(lVar1 + 0x610) = 0xffffffffffffffff; } } write_hook_for_undo_key(param_1,param_2,param_3,param_4,param_5); return; }
53,012
ma_rec_unpack
eloqsql/storage/maria/ma_dynrec.c
size_t _ma_rec_unpack(register MARIA_HA *info, register uchar *to, uchar *from, size_t found_length) { uint flag,bit,length,min_pack_length, column_length; enum en_fieldtype type; uchar *from_end,*to_end,*packpos; reg3 MARIA_COLUMNDEF *column, *end_column; DBUG_ENTER("_ma_rec_unpack"); to_end=to + info->s->base.reclength; from_end=from+found_length; flag= (uchar) *from; bit=1; packpos=from; if (found_length < info->s->base.min_pack_length) goto err; from+= info->s->base.pack_bytes; min_pack_length= info->s->base.min_pack_length - info->s->base.pack_bytes; if ((length= info->s->base.null_bytes)) { memcpy(to, from, length); from+= length; to+= length; min_pack_length-= length; } for (column= info->s->columndef, end_column= column + info->s->base.fields; column < end_column ; to+= column_length, column++) { column_length= column->length; if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL && (type != FIELD_CHECK)) { if (type == FIELD_VARCHAR) { uint pack_length= HA_VARCHAR_PACKLENGTH(column_length-1); if (pack_length == 1) { length= (uint) *(uchar*) from; if (length > column_length-1) goto err; *to= *from++; } else { get_key_length(length, from); if (length > column_length-2) goto err; int2store(to,length); } if (from+length > from_end) goto err; memcpy(to+pack_length, from, length); MEM_UNDEFINED(to+pack_length + length, column_length - length - pack_length); from+= length; min_pack_length--; continue; } if (flag & bit) { if (type == FIELD_BLOB || type == FIELD_SKIP_ZERO) bzero(to, column_length); else if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE) { if (column->length > 255 && *from & 128) { if (from + 1 >= from_end) goto err; length= (*from & 127)+ ((uint) (uchar) *(from+1) << 7); from+=2; } else { if (from == from_end) goto err; length= (uchar) *from++; } min_pack_length--; if (length >= column_length || min_pack_length + length > (uint) (from_end - from)) goto err; if (type == FIELD_SKIP_ENDSPACE) { memcpy(to, from, (size_t) length); bfill(to+length, column_length-length, ' '); } else { bfill(to, column_length-length, ' '); memcpy(to+column_length-length, from, (size_t) length); } from+=length; } } else if (type == FIELD_BLOB) { uint size_length=column_length- portable_sizeof_char_ptr; ulong blob_length= _ma_calc_blob_length(size_length,from); ulong from_left= (ulong) (from_end - from); if (from_left < size_length || from_left - size_length < blob_length || from_left - size_length - blob_length < min_pack_length) goto err; memcpy(to, from, (size_t) size_length); from+=size_length; memcpy(to+size_length,(uchar*) &from,sizeof(char*)); from+=blob_length; } else { if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE) min_pack_length--; if (min_pack_length + column_length > (uint) (from_end - from)) goto err; memcpy(to, from, (size_t) column_length); from+=column_length; } if ((bit= bit << 1) >= 256) { flag= (uchar) *++packpos; bit=1; } } else { if (min_pack_length > (uint) (from_end - from)) goto err; min_pack_length-=column_length; memcpy(to, from, (size_t) column_length); from+=column_length; } } if (info->s->calc_checksum) info->cur_row.checksum= (uint) (uchar) *from++; if (to == to_end && from == from_end && (bit == 1 || !(flag & ~(bit-1)))) DBUG_RETURN(found_length); err: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_PRINT("error",("to_end: %p -> %p from_end: %p -> %p", to, to_end, from, from_end)); DBUG_DUMP("from", info->rec_buff, info->s->base.min_pack_length); DBUG_RETURN(MY_FILE_ERROR); }
O3
c
ma_rec_unpack: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, -0x58(%rbp) movq %rdi, -0x50(%rbp) movq (%rdi), %rax movq 0x3a8(%rax), %r12 movq %rcx, -0x68(%rbp) cmpq %rcx, %r12 jbe 0x69254 movq -0x50(%rbp), %rdi movl $0x7f, %esi callq 0x5cab0 movq $-0x1, -0x68(%rbp) movq -0x68(%rbp), %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rsi, %r15 movq 0x398(%rax), %r14 addq %rsi, %r14 movq -0x58(%rbp), %rdx movzbl (%rdx), %ecx movl %ecx, -0x44(%rbp) movl 0x3f4(%rax), %r13d movl 0x3fc(%rax), %ebx subl %r13d, %r12d addq %rdx, %r13 testq %rbx, %rbx je 0x692a1 movq %r15, %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x2a0b0 addq %rbx, %r13 addq %rbx, %r15 subl %ebx, %r12d movq -0x50(%rbp), %rax movq (%rax), %rax movq -0x68(%rbp), %rcx movq -0x58(%rbp), %rdx addq %rdx, %rcx movq %rcx, -0x38(%rbp) movl 0x3c8(%rax), %ecx testq %rcx, %rcx je 0x695b7 movq %r14, -0x70(%rbp) movq 0x588(%rax), %rbx imulq $0x38, %rcx, %rax addq %rbx, %rax movq %rax, -0x78(%rbp) movl $0x1, -0x2c(%rbp) movzwl 0x8(%rbx), %r14d movl (%rbx), %eax testl %eax, %eax je 0x69329 cmpl $0x9, %eax je 0x69329 cmpl $0x8, %eax jne 0x69352 leal -0x1(%r14), %edx cmpl $0x100, %edx # imm = 0x100 movl $0x2, %edi sbbq $0x0, %rdi movb (%r13), %cl movzbl %cl, %eax cmpl $0xff, %edx ja 0x69374 cmpl %eax, %edx jb 0x6922b incq %r13 movb %cl, (%r15) movq %r13, %rsi jmp 0x69466 movq -0x38(%rbp), %rax subl %r13d, %eax cmpl %eax, %r12d ja 0x6922b subl %r14d, %r12d movq %r15, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x2a0b0 addq %r14, %r13 jmp 0x69580 movl -0x2c(%rbp), %ecx testl %ecx, -0x44(%rbp) je 0x69385 leal -0x3(%rax), %ecx cmpl $0x1, %ecx ja 0x693b5 movq %r15, %rdi xorl %esi, %esi movq %r14, %rdx callq 0x2a2e0 jmp 0x69556 cmpb $-0x1, %cl je 0x69441 incq %r13 jmp 0x69451 cmpl $0x4, %eax jne 0x69486 leal -0x9(%r14), %eax cmpl $0x3, %eax ja 0x69504 leaq 0x9c34a(%rip), %rcx # 0x1056ec movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movzbl (%r13), %r8d jmp 0x69507 cmpl $0x2, %eax ja 0x69556 cmpl $0x100, %r14d # imm = 0x100 jb 0x693d4 movzbl (%r13), %ecx testb %cl, %cl js 0x69593 cmpq -0x38(%rbp), %r13 je 0x6922b movzbl (%r13), %esi incq %r13 movl %r14d, %r8d subl %esi, %r8d jbe 0x6922b decl %r12d leal (%rsi,%r12), %ecx movq -0x38(%rbp), %rdx subl %r13d, %edx cmpl %edx, %ecx ja 0x6922b cmpl $0x1, %eax jne 0x694b8 movl %esi, %edx movq %rdx, -0x40(%rbp) movq %r15, %rdi movq %r13, %rsi movq %r8, -0x60(%rbp) callq 0x2a0b0 movq -0x40(%rbp), %rax leaq (%r15,%rax), %rdi movl $0x20, %esi movq -0x60(%rbp), %rdx callq 0x2a2e0 jmp 0x69552 movzwl 0x1(%r13), %eax rolw $0x8, %ax movzwl %ax, %eax addq $0x3, %r13 movq %r13, %rsi movl %r14d, %ecx addl $-0x2, %ecx cmpl %ecx, %eax ja 0x6922b movw %ax, (%r15) movl %eax, %edx leaq (%rsi,%rdx), %r13 cmpq -0x38(%rbp), %r13 ja 0x6922b addq %r15, %rdi callq 0x2a0b0 decl %r12d jmp 0x69580 cmpl $0x3, %eax sbbl $0x0, %r12d movl %r14d, %eax addl %r12d, %eax movq -0x38(%rbp), %rcx subl %r13d, %ecx cmpl %ecx, %eax ja 0x6922b movq %r15, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x2a0b0 addq %r14, %r13 jmp 0x69556 movq %r15, %rdi movq %rsi, -0x40(%rbp) movl $0x20, %esi movq %r8, %rdx callq 0x2a2e0 leaq (%r15,%r14), %rdi movl -0x40(%rbp), %edx subq %rdx, %rdi movq %r13, %rsi movq %rdx, -0x40(%rbp) callq 0x2a0b0 jmp 0x69552 movzwl (%r13), %eax movzbl 0x2(%r13), %r8d shll $0x10, %r8d orq %rax, %r8 jmp 0x69507 movl (%r13), %r8d jmp 0x69507 movzwl (%r13), %r8d jmp 0x69507 xorl %r8d, %r8d movl %r14d, %ecx addl $-0x8, %ecx movq -0x38(%rbp), %rax subq %r13, %rax movl %ecx, %edx subq %rdx, %rax jb 0x6922b subq %r8, %rax jb 0x6922b movl %r12d, %ecx cmpq %rcx, %rax jb 0x6922b movq %r15, %rdi movq %r13, %rsi movq %r8, -0x40(%rbp) movq %rdx, -0x60(%rbp) callq 0x2a0b0 movq -0x60(%rbp), %rax addq %rax, %r13 movq %r13, (%r15,%rax) addq -0x40(%rbp), %r13 movl -0x2c(%rbp), %eax addl %eax, %eax cmpl $0x100, %eax # imm = 0x100 jae 0x69567 movl %eax, -0x2c(%rbp) jmp 0x69580 movq -0x58(%rbp), %rcx movzbl 0x1(%rcx), %eax movl %eax, -0x44(%rbp) incq %rcx movq %rcx, -0x58(%rbp) movl $0x1, -0x2c(%rbp) addq %r14, %r15 addq $0x38, %rbx cmpq -0x78(%rbp), %rbx jb 0x692dc jmp 0x695c0 leaq 0x1(%r13), %rdx cmpq -0x38(%rbp), %rdx jae 0x6922b andl $0x7f, %ecx movzbl 0x1(%r13), %esi shll $0x7, %esi orl %ecx, %esi addq $0x2, %r13 jmp 0x693e6 movl $0x1, -0x2c(%rbp) jmp 0x695cb movq -0x50(%rbp), %rax movq (%rax), %rax movq -0x70(%rbp), %r14 cmpq $0x0, 0x6a8(%rax) je 0x695e7 movzbl (%r13), %eax incq %r13 movq -0x50(%rbp), %rcx movl %eax, 0xb0(%rcx) cmpq %r14, %r15 jne 0x6922b cmpq -0x38(%rbp), %r13 jne 0x6922b movl -0x2c(%rbp), %eax cmpl $0x1, %eax je 0x69241 negl %eax testl %eax, -0x44(%rbp) jne 0x6922b jmp 0x69241
_ma_rec_unpack: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_58], rdx mov [rbp+var_50], rdi mov rax, [rdi] mov r12, [rax+3A8h] mov [rbp+var_68], rcx cmp r12, rcx jbe short loc_69254 loc_6922B: mov rdi, [rbp+var_50] mov esi, 7Fh call _ma_set_fatal_error mov [rbp+var_68], 0FFFFFFFFFFFFFFFFh loc_69241: mov rax, [rbp+var_68] add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_69254: mov r15, rsi mov r14, [rax+398h] add r14, rsi mov rdx, [rbp+var_58] movzx ecx, byte ptr [rdx] mov [rbp+var_44], ecx mov r13d, [rax+3F4h] mov ebx, [rax+3FCh] sub r12d, r13d add r13, rdx test rbx, rbx jz short loc_692A1 mov rdi, r15 mov rsi, r13 mov rdx, rbx call _memcpy add r13, rbx add r15, rbx sub r12d, ebx mov rax, [rbp+var_50] mov rax, [rax] loc_692A1: mov rcx, [rbp+var_68] mov rdx, [rbp+var_58] add rcx, rdx mov [rbp+var_38], rcx mov ecx, [rax+3C8h] test rcx, rcx jz loc_695B7 mov [rbp+var_70], r14 mov rbx, [rax+588h] imul rax, rcx, 38h ; '8' add rax, rbx mov [rbp+var_78], rax mov [rbp+var_2C], 1 loc_692DC: movzx r14d, word ptr [rbx+8] mov eax, [rbx] test eax, eax jz short loc_69329 cmp eax, 9 jz short loc_69329 cmp eax, 8 jnz short loc_69352 lea edx, [r14-1] cmp edx, 100h mov edi, 2 sbb rdi, 0 mov cl, [r13+0] movzx eax, cl cmp edx, 0FFh ja short loc_69374 cmp edx, eax jb loc_6922B inc r13 mov [r15], cl mov rsi, r13 jmp loc_69466 loc_69329: mov rax, [rbp+var_38] sub eax, r13d cmp r12d, eax ja loc_6922B sub r12d, r14d mov rdi, r15 mov rsi, r13 mov rdx, r14 call _memcpy add r13, r14 jmp loc_69580 loc_69352: mov ecx, [rbp+var_2C] test [rbp+var_44], ecx jz short loc_69385 lea ecx, [rax-3] cmp ecx, 1 ja short loc_693B5 mov rdi, r15 xor esi, esi mov rdx, r14 call _memset jmp loc_69556 loc_69374: cmp cl, 0FFh jz loc_69441 inc r13 jmp loc_69451 loc_69385: cmp eax, 4 jnz loc_69486 lea eax, [r14-9]; switch 4 cases cmp eax, 3 ja def_693A9; jumptable 00000000000693A9 default case lea rcx, jpt_693A9 movsxd rax, ds:(jpt_693A9 - 1056ECh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_693AB: movzx r8d, byte ptr [r13+0]; jumptable 00000000000693A9 case 9 jmp loc_69507 loc_693B5: cmp eax, 2 ja loc_69556 cmp r14d, 100h jb short loc_693D4 movzx ecx, byte ptr [r13+0] test cl, cl js loc_69593 loc_693D4: cmp r13, [rbp+var_38] jz loc_6922B movzx esi, byte ptr [r13+0] inc r13 loc_693E6: mov r8d, r14d sub r8d, esi jbe loc_6922B dec r12d lea ecx, [rsi+r12] mov rdx, [rbp+var_38] sub edx, r13d cmp ecx, edx ja loc_6922B cmp eax, 1 jnz loc_694B8 mov edx, esi mov [rbp+var_40], rdx mov rdi, r15 mov rsi, r13 mov [rbp+var_60], r8 call _memcpy mov rax, [rbp+var_40] lea rdi, [r15+rax] mov esi, 20h ; ' ' mov rdx, [rbp+var_60] call _memset jmp loc_69552 loc_69441: movzx eax, word ptr [r13+1] rol ax, 8 movzx eax, ax add r13, 3 loc_69451: mov rsi, r13 mov ecx, r14d add ecx, 0FFFFFFFEh cmp eax, ecx ja loc_6922B mov [r15], ax loc_69466: mov edx, eax lea r13, [rsi+rdx] cmp r13, [rbp+var_38] ja loc_6922B add rdi, r15 call _memcpy dec r12d jmp loc_69580 loc_69486: cmp eax, 3 sbb r12d, 0 mov eax, r14d add eax, r12d mov rcx, [rbp+var_38] sub ecx, r13d cmp eax, ecx ja loc_6922B mov rdi, r15 mov rsi, r13 mov rdx, r14 call _memcpy add r13, r14 jmp loc_69556 loc_694B8: mov rdi, r15 mov [rbp+var_40], rsi mov esi, 20h ; ' ' mov rdx, r8 call _memset lea rdi, [r15+r14] mov edx, dword ptr [rbp+var_40] sub rdi, rdx mov rsi, r13 mov [rbp+var_40], rdx call _memcpy jmp short loc_69552 loc_694E4: movzx eax, word ptr [r13+0]; jumptable 00000000000693A9 case 11 movzx r8d, byte ptr [r13+2] shl r8d, 10h or r8, rax jmp short loc_69507 loc_694F7: mov r8d, [r13+0]; jumptable 00000000000693A9 case 12 jmp short loc_69507 loc_694FD: movzx r8d, word ptr [r13+0]; jumptable 00000000000693A9 case 10 jmp short loc_69507 def_693A9: xor r8d, r8d; jumptable 00000000000693A9 default case loc_69507: mov ecx, r14d add ecx, 0FFFFFFF8h mov rax, [rbp+var_38] sub rax, r13 mov edx, ecx sub rax, rdx jb loc_6922B sub rax, r8 jb loc_6922B mov ecx, r12d cmp rax, rcx jb loc_6922B mov rdi, r15 mov rsi, r13 mov [rbp+var_40], r8 mov [rbp+var_60], rdx call _memcpy mov rax, [rbp+var_60] add r13, rax mov [r15+rax], r13 loc_69552: add r13, [rbp+var_40] loc_69556: mov eax, [rbp+var_2C] add eax, eax cmp eax, 100h jnb short loc_69567 mov [rbp+var_2C], eax jmp short loc_69580 loc_69567: mov rcx, [rbp+var_58] movzx eax, byte ptr [rcx+1] mov [rbp+var_44], eax inc rcx mov [rbp+var_58], rcx mov [rbp+var_2C], 1 loc_69580: add r15, r14 add rbx, 38h ; '8' cmp rbx, [rbp+var_78] jb loc_692DC jmp short loc_695C0 loc_69593: lea rdx, [r13+1] cmp rdx, [rbp+var_38] jnb loc_6922B and ecx, 7Fh movzx esi, byte ptr [r13+1] shl esi, 7 or esi, ecx add r13, 2 jmp loc_693E6 loc_695B7: mov [rbp+var_2C], 1 jmp short loc_695CB loc_695C0: mov rax, [rbp+var_50] mov rax, [rax] mov r14, [rbp+var_70] loc_695CB: cmp qword ptr [rax+6A8h], 0 jz short loc_695E7 movzx eax, byte ptr [r13+0] inc r13 mov rcx, [rbp+var_50] mov [rcx+0B0h], eax loc_695E7: cmp r15, r14 jnz loc_6922B cmp r13, [rbp+var_38] jnz loc_6922B mov eax, [rbp+var_2C] cmp eax, 1 jz loc_69241 neg eax test [rbp+var_44], eax jnz loc_6922B jmp loc_69241
long long ma_rec_unpack(_DWORD *a1, _WORD *a2, long long a3, unsigned long long a4, unsigned long long a5, int a6) { long long v6; // rax unsigned long long v7; // r12 _WORD *v9; // r15 _WORD *v10; // r14 long long v11; // r13 long long v12; // rbx unsigned int v13; // r12d unsigned __int8 *v14; // r13 unsigned long long v15; // rbx long long v16; // r14 unsigned int v17; // eax long long v18; // rdi unsigned int v19; // eax unsigned __int8 *v20; // rsi unsigned __int8 *v21; // r13 unsigned int v22; // esi unsigned __int8 *v23; // r13 unsigned long long v24; // rax bool v25; // cf unsigned long long v26; // rax long long v27; // rax int v28; // eax unsigned long long v29; // [rsp+8h] [rbp-78h] _WORD *v30; // [rsp+10h] [rbp-70h] unsigned long long v31; // [rsp+18h] [rbp-68h] long long v32; // [rsp+28h] [rbp-58h] int v34; // [rsp+3Ch] [rbp-44h] unsigned long long v35; // [rsp+40h] [rbp-40h] unsigned long long v36; // [rsp+48h] [rbp-38h] int v37; // [rsp+54h] [rbp-2Ch] v32 = a3; v6 = *(_QWORD *)a1; v7 = *(_QWORD *)(*(_QWORD *)a1 + 936LL); v31 = a4; if ( v7 > a4 ) { LABEL_2: ma_set_fatal_error(a1, 127, a3, a4, a5, a6); return -1LL; } v9 = a2; v10 = (_WORD *)((char *)a2 + *(_QWORD *)(v6 + 920)); v34 = *(unsigned __int8 *)a3; v11 = *(unsigned int *)(v6 + 1012); v12 = *(unsigned int *)(v6 + 1020); v13 = v7 - v11; v14 = (unsigned __int8 *)(a3 + v11); if ( *(_DWORD *)(v6 + 1020) ) { memcpy(a2, v14, *(unsigned int *)(v6 + 1020)); v14 += v12; v9 = (_WORD *)((char *)a2 + v12); v13 -= v12; v6 = *(_QWORD *)a1; } a3 = v32; v36 = v32 + v31; a4 = *(unsigned int *)(v6 + 968); if ( *(_DWORD *)(v6 + 968) ) { v30 = v10; v15 = *(_QWORD *)(v6 + 1416); v29 = v15 + 56 * a4; v37 = 1; while ( 1 ) { v16 = *(unsigned __int16 *)(v15 + 8); v17 = *(_DWORD *)v15; if ( !*(_DWORD *)v15 || v17 == 9 ) { if ( v13 > (int)v36 - (int)v14 ) goto LABEL_2; v13 -= v16; memcpy(v9, v14, *(unsigned __int16 *)(v15 + 8)); v14 += v16; goto LABEL_53; } if ( v17 == 8 ) { a3 = (unsigned int)(v16 - 1); v18 = 2LL - ((unsigned int)a3 < 0x100); LOBYTE(a4) = *v14; v19 = *v14; if ( (unsigned int)a3 > 0xFF ) { if ( (_BYTE)a4 == 0xFF ) { v19 = (unsigned __int16)__ROL2__(*(_WORD *)(v14 + 1), 8); v21 = v14 + 3; } else { v21 = v14 + 1; } v20 = v21; a4 = (unsigned int)(v16 - 2); if ( v19 > (unsigned int)a4 ) goto LABEL_2; *v9 = v19; } else { if ( (unsigned int)a3 < v19 ) goto LABEL_2; *(_BYTE *)v9 = a4; v20 = v14 + 1; } a3 = v19; v14 = &v20[v19]; if ( (unsigned long long)v14 > v36 ) goto LABEL_2; memcpy((char *)v9 + v18, v20, v19); --v13; goto LABEL_53; } if ( (v37 & v34) == 0 ) break; a4 = v17 - 3; if ( (unsigned int)a4 <= 1 ) { memset(v9, 0LL, *(unsigned __int16 *)(v15 + 8)); goto LABEL_50; } if ( v17 <= 2 ) { if ( (unsigned int)v16 >= 0x100 && (a4 = *v14, (a4 & 0x80u) != 0LL) ) { a3 = (long long)(v14 + 1); if ( (unsigned long long)(v14 + 1) >= v36 ) goto LABEL_2; a4 &= 0x7Fu; v22 = a4 | (v14[1] << 7); v23 = v14 + 2; } else { if ( v14 == (unsigned __int8 *)v36 ) goto LABEL_2; v22 = *v14; v23 = v14 + 1; } a5 = (unsigned int)v16 - v22; if ( (unsigned int)v16 <= v22 ) goto LABEL_2; --v13; a4 = v22 + v13; a3 = (unsigned int)(v36 - (_DWORD)v23); if ( (unsigned int)a4 > (unsigned int)a3 ) goto LABEL_2; if ( v17 == 1 ) { v35 = v22; memcpy(v9, v23, v22); memset((char *)v9 + v22, 32LL, (unsigned int)v16 - v22); } else { memset(v9, 32LL, a5); v35 = v22; memcpy((char *)v9 + v16 - (unsigned int)v35, v23, (unsigned int)v35); } LABEL_49: v14 = &v23[v35]; } LABEL_50: if ( (unsigned int)(2 * v37) >= 0x100 ) { v34 = *(unsigned __int8 *)(v32 + 1); a4 = ++v32; v37 = 1; } else { v37 *= 2; } LABEL_53: v9 = (_WORD *)((char *)v9 + v16); v15 += 56LL; if ( v15 >= v29 ) { v6 = *(_QWORD *)a1; v10 = v30; goto LABEL_58; } } if ( v17 != 4 ) { v13 = (__PAIR64__(v13, v17) - 3) >> 32; a4 = (unsigned int)(v36 - (_DWORD)v14); if ( v13 + (unsigned int)v16 > (unsigned int)a4 ) goto LABEL_2; memcpy(v9, v14, *(unsigned __int16 *)(v15 + 8)); v14 += v16; goto LABEL_50; } switch ( *(_WORD *)(v15 + 8) ) { case 9: a5 = *v14; break; case 0xA: a5 = *(unsigned __int16 *)v14; break; case 0xB: a5 = *(unsigned __int16 *)v14 | (unsigned long long)(v14[2] << 16); break; case 0xC: a5 = *(unsigned int *)v14; break; default: a5 = 0LL; break; } a4 = (unsigned int)(v16 - 8); a3 = a4; v24 = v36 - (_QWORD)v14 - a4; if ( v36 - (unsigned long long)v14 < a4 ) goto LABEL_2; v25 = v24 < a5; v26 = v24 - a5; if ( v25 ) goto LABEL_2; a4 = v13; if ( v26 < v13 ) goto LABEL_2; v35 = a5; memcpy(v9, v14, a3); v27 = (unsigned int)(v16 - 8); v23 = &v14[v27]; *(_QWORD *)((char *)v9 + v27) = v23; goto LABEL_49; } v37 = 1; LABEL_58: if ( *(_QWORD *)(v6 + 1704) ) { v28 = *v14++; a4 = (unsigned long long)a1; a1[44] = v28; } if ( v9 != v10 || v14 != (unsigned __int8 *)v36 || v37 != 1 && (-v37 & v34) != 0 ) goto LABEL_2; return v31; }
_ma_rec_unpack: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x58],RDX MOV qword ptr [RBP + -0x50],RDI MOV RAX,qword ptr [RDI] MOV R12,qword ptr [RAX + 0x3a8] MOV qword ptr [RBP + -0x68],RCX CMP R12,RCX JBE 0x00169254 LAB_0016922b: MOV RDI,qword ptr [RBP + -0x50] MOV ESI,0x7f CALL 0x0015cab0 MOV qword ptr [RBP + -0x68],-0x1 LAB_00169241: MOV RAX,qword ptr [RBP + -0x68] ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00169254: MOV R15,RSI MOV R14,qword ptr [RAX + 0x398] ADD R14,RSI MOV RDX,qword ptr [RBP + -0x58] MOVZX ECX,byte ptr [RDX] MOV dword ptr [RBP + -0x44],ECX MOV R13D,dword ptr [RAX + 0x3f4] MOV EBX,dword ptr [RAX + 0x3fc] SUB R12D,R13D ADD R13,RDX TEST RBX,RBX JZ 0x001692a1 MOV RDI,R15 MOV RSI,R13 MOV RDX,RBX CALL 0x0012a0b0 ADD R13,RBX ADD R15,RBX SUB R12D,EBX MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX] LAB_001692a1: MOV RCX,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x58] ADD RCX,RDX MOV qword ptr [RBP + -0x38],RCX MOV ECX,dword ptr [RAX + 0x3c8] TEST RCX,RCX JZ 0x001695b7 MOV qword ptr [RBP + -0x70],R14 MOV RBX,qword ptr [RAX + 0x588] IMUL RAX,RCX,0x38 ADD RAX,RBX MOV qword ptr [RBP + -0x78],RAX MOV dword ptr [RBP + -0x2c],0x1 LAB_001692dc: MOVZX R14D,word ptr [RBX + 0x8] MOV EAX,dword ptr [RBX] TEST EAX,EAX JZ 0x00169329 CMP EAX,0x9 JZ 0x00169329 CMP EAX,0x8 JNZ 0x00169352 LEA EDX,[R14 + -0x1] CMP EDX,0x100 MOV EDI,0x2 SBB RDI,0x0 MOV CL,byte ptr [R13] MOVZX EAX,CL CMP EDX,0xff JA 0x00169374 CMP EDX,EAX JC 0x0016922b INC R13 MOV byte ptr [R15],CL MOV RSI,R13 JMP 0x00169466 LAB_00169329: MOV RAX,qword ptr [RBP + -0x38] SUB EAX,R13D CMP R12D,EAX JA 0x0016922b SUB R12D,R14D MOV RDI,R15 MOV RSI,R13 MOV RDX,R14 CALL 0x0012a0b0 ADD R13,R14 JMP 0x00169580 LAB_00169352: MOV ECX,dword ptr [RBP + -0x2c] TEST dword ptr [RBP + -0x44],ECX JZ 0x00169385 LEA ECX,[RAX + -0x3] CMP ECX,0x1 JA 0x001693b5 MOV RDI,R15 XOR ESI,ESI MOV RDX,R14 CALL 0x0012a2e0 JMP 0x00169556 LAB_00169374: CMP CL,0xff JZ 0x00169441 INC R13 JMP 0x00169451 LAB_00169385: CMP EAX,0x4 JNZ 0x00169486 LEA EAX,[R14 + -0x9] CMP EAX,0x3 JA 0x00169504 LEA RCX,[0x2056ec] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_9: MOVZX R8D,byte ptr [R13] JMP 0x00169507 LAB_001693b5: CMP EAX,0x2 JA 0x00169556 CMP R14D,0x100 JC 0x001693d4 MOVZX ECX,byte ptr [R13] TEST CL,CL JS 0x00169593 LAB_001693d4: CMP R13,qword ptr [RBP + -0x38] JZ 0x0016922b MOVZX ESI,byte ptr [R13] INC R13 LAB_001693e6: MOV R8D,R14D SUB R8D,ESI JBE 0x0016922b DEC R12D LEA ECX,[RSI + R12*0x1] MOV RDX,qword ptr [RBP + -0x38] SUB EDX,R13D CMP ECX,EDX JA 0x0016922b CMP EAX,0x1 JNZ 0x001694b8 MOV EDX,ESI MOV qword ptr [RBP + -0x40],RDX MOV RDI,R15 MOV RSI,R13 MOV qword ptr [RBP + -0x60],R8 CALL 0x0012a0b0 MOV RAX,qword ptr [RBP + -0x40] LEA RDI,[R15 + RAX*0x1] MOV ESI,0x20 MOV RDX,qword ptr [RBP + -0x60] CALL 0x0012a2e0 JMP 0x00169552 LAB_00169441: MOVZX EAX,word ptr [R13 + 0x1] ROL AX,0x8 MOVZX EAX,AX ADD R13,0x3 LAB_00169451: MOV RSI,R13 MOV ECX,R14D ADD ECX,-0x2 CMP EAX,ECX JA 0x0016922b MOV word ptr [R15],AX LAB_00169466: MOV EDX,EAX LEA R13,[RSI + RDX*0x1] CMP R13,qword ptr [RBP + -0x38] JA 0x0016922b ADD RDI,R15 CALL 0x0012a0b0 DEC R12D JMP 0x00169580 LAB_00169486: CMP EAX,0x3 SBB R12D,0x0 MOV EAX,R14D ADD EAX,R12D MOV RCX,qword ptr [RBP + -0x38] SUB ECX,R13D CMP EAX,ECX JA 0x0016922b MOV RDI,R15 MOV RSI,R13 MOV RDX,R14 CALL 0x0012a0b0 ADD R13,R14 JMP 0x00169556 LAB_001694b8: MOV RDI,R15 MOV qword ptr [RBP + -0x40],RSI MOV ESI,0x20 MOV RDX,R8 CALL 0x0012a2e0 LEA RDI,[R15 + R14*0x1] MOV EDX,dword ptr [RBP + -0x40] SUB RDI,RDX MOV RSI,R13 MOV qword ptr [RBP + -0x40],RDX CALL 0x0012a0b0 JMP 0x00169552 caseD_b: MOVZX EAX,word ptr [R13] MOVZX R8D,byte ptr [R13 + 0x2] SHL R8D,0x10 OR R8,RAX JMP 0x00169507 caseD_c: MOV R8D,dword ptr [R13] JMP 0x00169507 caseD_a: MOVZX R8D,word ptr [R13] JMP 0x00169507 default: XOR R8D,R8D LAB_00169507: MOV ECX,R14D ADD ECX,-0x8 MOV RAX,qword ptr [RBP + -0x38] SUB RAX,R13 MOV EDX,ECX SUB RAX,RDX JC 0x0016922b SUB RAX,R8 JC 0x0016922b MOV ECX,R12D CMP RAX,RCX JC 0x0016922b MOV RDI,R15 MOV RSI,R13 MOV qword ptr [RBP + -0x40],R8 MOV qword ptr [RBP + -0x60],RDX CALL 0x0012a0b0 MOV RAX,qword ptr [RBP + -0x60] ADD R13,RAX MOV qword ptr [R15 + RAX*0x1],R13 LAB_00169552: ADD R13,qword ptr [RBP + -0x40] LAB_00169556: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,EAX CMP EAX,0x100 JNC 0x00169567 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00169580 LAB_00169567: MOV RCX,qword ptr [RBP + -0x58] MOVZX EAX,byte ptr [RCX + 0x1] MOV dword ptr [RBP + -0x44],EAX INC RCX MOV qword ptr [RBP + -0x58],RCX MOV dword ptr [RBP + -0x2c],0x1 LAB_00169580: ADD R15,R14 ADD RBX,0x38 CMP RBX,qword ptr [RBP + -0x78] JC 0x001692dc JMP 0x001695c0 LAB_00169593: LEA RDX,[R13 + 0x1] CMP RDX,qword ptr [RBP + -0x38] JNC 0x0016922b AND ECX,0x7f MOVZX ESI,byte ptr [R13 + 0x1] SHL ESI,0x7 OR ESI,ECX ADD R13,0x2 JMP 0x001693e6 LAB_001695b7: MOV dword ptr [RBP + -0x2c],0x1 JMP 0x001695cb LAB_001695c0: MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX] MOV R14,qword ptr [RBP + -0x70] LAB_001695cb: CMP qword ptr [RAX + 0x6a8],0x0 JZ 0x001695e7 MOVZX EAX,byte ptr [R13] INC R13 MOV RCX,qword ptr [RBP + -0x50] MOV dword ptr [RCX + 0xb0],EAX LAB_001695e7: CMP R15,R14 JNZ 0x0016922b CMP R13,qword ptr [RBP + -0x38] JNZ 0x0016922b MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,0x1 JZ 0x00169241 NEG EAX TEST dword ptr [RBP + -0x44],EAX JNZ 0x0016922b JMP 0x00169241
ulong _ma_rec_unpack(long *param_1,byte *param_2,byte *param_3,ulong param_4) { byte bVar1; ushort uVar2; int iVar3; uint uVar4; uint *puVar5; ulong uVar6; long lVar7; uint *puVar8; uint uVar9; ulong __n; ulong uVar10; uint *puVar11; uint uVar12; uint uVar13; uint *__src; byte *__src_00; ushort *__src_01; byte *pbVar14; byte *local_60; uint local_4c; size_t local_48; uint local_34; lVar7 = *param_1; if (*(ulong *)(lVar7 + 0x3a8) <= param_4) { pbVar14 = param_2 + *(long *)(lVar7 + 0x398); local_4c = (uint)*param_3; uVar4 = *(uint *)(lVar7 + 0x3fc); uVar10 = (ulong)uVar4; uVar13 = (int)*(ulong *)(lVar7 + 0x3a8) - *(uint *)(lVar7 + 0x3f4); __src = (uint *)(param_3 + *(uint *)(lVar7 + 0x3f4)); if (uVar10 != 0) { memcpy(param_2,__src,uVar10); __src = (uint *)((long)__src + uVar10); param_2 = param_2 + uVar10; uVar13 = uVar13 - uVar4; lVar7 = *param_1; } puVar8 = (uint *)(param_3 + param_4); if ((ulong)*(uint *)(lVar7 + 0x3c8) == 0) { local_34 = 1; } else { puVar11 = *(uint **)(lVar7 + 0x588); puVar5 = puVar11 + (ulong)*(uint *)(lVar7 + 0x3c8) * 0xe; local_34 = 1; local_60 = param_3; do { uVar2 = (ushort)puVar11[2]; uVar10 = (ulong)uVar2; uVar4 = *puVar11; iVar3 = (int)puVar8; if ((uVar4 == 0) || (uVar4 == 9)) { if ((uint)(iVar3 - (int)__src) < uVar13) goto LAB_0016922b; uVar13 = uVar13 - uVar2; memcpy(param_2,__src,uVar10); __src = (uint *)((long)__src + uVar10); } else if (uVar4 == 8) { uVar9 = uVar2 - 1; bVar1 = (byte)*__src; uVar4 = (uint)bVar1; if (uVar9 < 0x100) { if (uVar9 < bVar1) goto LAB_0016922b; __src_00 = (byte *)((long)__src + 1); *param_2 = bVar1; } else { if (bVar1 == 0xff) { uVar4 = (uint)(ushort)(*(ushort *)((long)__src + 1) << 8 | *(ushort *)((long)__src + 1) >> 8); __src_00 = (byte *)((long)__src + 3); } else { __src_00 = (byte *)((long)__src + 1); } if (uVar2 - 2 < uVar4) goto LAB_0016922b; *(short *)param_2 = (short)uVar4; } __src = (uint *)(__src_00 + uVar4); if (puVar8 < __src) goto LAB_0016922b; memcpy(param_2 + (2 - (ulong)(uVar9 < 0x100)),__src_00,(ulong)uVar4); uVar13 = uVar13 - 1; } else { if ((local_4c & local_34) == 0) { if (uVar4 == 4) { switch(uVar2) { case 9: local_48 = (size_t)(byte)*__src; break; case 10: local_48 = (size_t)(ushort)*__src; break; case 0xb: local_48 = (size_t)(uint3)*__src; break; case 0xc: local_48 = (size_t)*__src; break; default: local_48 = 0; } __n = (ulong)(uVar2 - 8); uVar6 = ((long)puVar8 - (long)__src) - __n; if ((((ulong)((long)puVar8 - (long)__src) < __n) || (uVar6 < local_48)) || (uVar6 - local_48 < (ulong)uVar13)) goto LAB_0016922b; memcpy(param_2,__src,__n); __src_01 = (ushort *)((long)__src + __n); *(ushort **)(param_2 + __n) = __src_01; LAB_00169552: __src = (uint *)((long)__src_01 + local_48); } else { uVar13 = uVar13 - (uVar4 < 3); if ((uint)(iVar3 - (int)__src) < uVar2 + uVar13) goto LAB_0016922b; memcpy(param_2,__src,uVar10); __src = (uint *)((long)__src + uVar10); } } else if (uVar4 - 3 < 2) { memset(param_2,0,uVar10); } else if (uVar4 < 3) { if ((uVar2 < 0x100) || (-1 < (char)(byte)*__src)) { if (__src == puVar8) goto LAB_0016922b; local_48 = (size_t)(byte)*__src; __src_01 = (ushort *)((long)__src + 1); } else { if (puVar8 <= (uint *)((long)__src + 1U)) goto LAB_0016922b; local_48 = (size_t)((uint)*(byte *)((long)__src + 1) << 7 | (byte)*__src & 0x7f); __src_01 = (ushort *)((long)__src + 2); } uVar9 = (uint)local_48; uVar12 = uVar2 - uVar9; if ((uVar9 <= uVar2 && uVar12 != 0) && (uVar13 = uVar13 - 1, uVar9 + uVar13 <= (uint)(iVar3 - (int)__src_01))) { if (uVar4 == 1) { memcpy(param_2,__src_01,local_48); memset(param_2 + local_48,0x20,(ulong)uVar12); } else { memset(param_2,0x20,(ulong)uVar12); memcpy(param_2 + (uVar10 - local_48),__src_01,local_48); } goto LAB_00169552; } goto LAB_0016922b; } local_34 = local_34 * 2; if (0xff < local_34) { local_4c = (uint)local_60[1]; local_60 = local_60 + 1; local_34 = 1; } } param_2 = param_2 + uVar10; puVar11 = puVar11 + 0xe; } while (puVar11 < puVar5); lVar7 = *param_1; } if (*(long *)(lVar7 + 0x6a8) != 0) { uVar4 = *__src; __src = (uint *)((long)__src + 1); *(uint *)(param_1 + 0x16) = (uint)(byte)uVar4; } if ((param_2 == pbVar14) && (__src == puVar8)) { if (local_34 == 1) { return param_4; } if ((local_4c & -local_34) == 0) { return param_4; } } } LAB_0016922b: _ma_set_fatal_error(param_1,0x7f); return 0xffffffffffffffff; }
53,013
minja::Parser::parseVarNames[abi:cxx11]()
monkey531[P]llama/common/minja.hpp
std::vector<std::string> parseVarNames() { static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)"); std::vector<std::string> group; if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names"); std::vector<std::string> varnames; std::istringstream iss(group[1]); std::string varname; while (std::getline(iss, varname, ',')) { varnames.push_back(strip(varname)); } return varnames; }
O3
cpp
minja::Parser::parseVarNames[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 movq %rsi, %r14 movq %rdi, %rbx leaq 0xa9768(%rip), %rax # 0x12d1d0 movb (%rax), %al testb %al, %al je 0x83bd7 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) leaq 0xa9727(%rip), %rdx # 0x12d1b0 leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x83408 leaq 0x20(%rsp), %r14 movaps (%r14), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) leaq 0x60(%rsp), %rdi xorps %xmm0, %xmm0 movaps %xmm0, (%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movaps %xmm0, (%r14) movq %rax, 0x10(%r14) callq 0x216e8 movq (%rsp), %r15 movq 0x8(%rsp), %r12 movq %r14, %rdi callq 0x216e8 cmpq %r12, %r15 je 0x83c2e xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq (%rsp), %rsi addq $0x20, %rsi leaq 0x60(%rsp), %rdi movl $0x8, %edx callq 0x1aee0 leaq 0x30(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) leaq 0x50(%rsp), %rbp leaq 0x60(%rsp), %r14 leaq 0x20(%rsp), %r15 leaq 0x40(%rsp), %r12 movq %r14, %rdi movq %r15, %rsi movl $0x2c, %edx callq 0x1b080 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x83b85 movq %r12, %rdi movq %r15, %rsi callq 0x77d13 movq %rbx, %rdi movq %r12, %rsi callq 0x55852 movq 0x40(%rsp), %rdi cmpq %rbp, %rdi je 0x83b38 movq 0x50(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x83b38 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x83b9c movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8d0 movq 0xa83b5(%rip), %rsi # 0x12bf58 leaq 0x60(%rsp), %rdi callq 0x1acb0 leaq 0xd8(%rsp), %rdi callq 0x1a2c0 movq %rsp, %rdi callq 0x216e8 movq %rbx, %rax addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa95f2(%rip), %rdi # 0x12d1d0 callq 0x1b020 testl %eax, %eax je 0x83a72 leaq 0xa95be(%rip), %rdi # 0x12d1b0 leaq 0x6cda3(%rip), %rsi # 0xf099c movl $0x10, %edx callq 0x62528 leaq -0x213de(%rip), %rdi # 0x6282c leaq 0xa959f(%rip), %rsi # 0x12d1b0 leaq 0xa8cc0(%rip), %rdx # 0x12c8d8 callq 0x1a7a0 leaq 0xa95ac(%rip), %rdi # 0x12d1d0 callq 0x1a5d0 jmp 0x83a72 movl $0x10, %edi callq 0x1a450 movq %rax, %rbx leaq 0x6cd8c(%rip), %rsi # 0xf09ce movq %rax, %rdi callq 0x1a330 movq 0xa839f(%rip), %rsi # 0x12bff0 movq 0xa8308(%rip), %rdx # 0x12bf60 movq %rbx, %rdi callq 0x1af40 movq %rax, %r14 leaq 0xa9566(%rip), %rdi # 0x12d1d0 callq 0x1a5c0 jmp 0x83cf0 jmp 0x83c85 movq %rax, %r14 movq %rbx, %rdi callq 0x1a680 jmp 0x83ce8 movq %rax, %r14 jmp 0x83ce0 movq %rax, %r14 jmp 0x83ce8 movq %rax, %r14 movq 0x40(%rsp), %rdi cmpq %rbp, %rdi je 0x83cab movq 0x50(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x83cab jmp 0x83ca8 movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x83cc2 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8d0 movq 0xa828f(%rip), %rsi # 0x12bf58 leaq 0x60(%rsp), %rdi callq 0x1acb0 leaq 0xd8(%rsp), %rdi callq 0x1a2c0 movq %rbx, %rdi callq 0x216e8 movq %rsp, %rdi callq 0x216e8 movq %r14, %rdi callq 0x1afc0
_ZN5minja6Parser13parseVarNamesB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1E8h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex mov al, [rax] test al, al jz loc_83BD7 loc_83A72: xorps xmm0, xmm0 movaps xmmword ptr [rsp+218h+var_218], xmm0; int mov qword ptr [rsp+218h+var_208], 0; int lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; int lea rdi, [rsp+218h+var_1F8]; int mov rsi, r14; int mov ecx, 1; int call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea r14, [rsp+218h+var_1F8] movaps xmm0, xmmword ptr [r14] movaps xmmword ptr [rsp+218h+var_218], xmm0 mov rax, [r14+10h] mov qword ptr [rsp+218h+var_208], rax lea rdi, [rsp+218h+var_1B8] xorps xmm0, xmm0 movaps xmmword ptr [rdi], xmm0 xor eax, eax mov [rdi+10h], rax movaps xmmword ptr [r14], xmm0 mov [r14+10h], rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov r15, qword ptr [rsp+218h+var_218] mov r12, qword ptr [rsp+218h+var_218+8] mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() cmp r15, r12 jz loc_83C2E xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov rsi, qword ptr [rsp+218h+var_218] add rsi, 20h ; ' ' lea rdi, [rsp+218h+var_1B8] mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea r13, [rsp+218h+var_1E8] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 lea rbp, [rsp+218h+var_1C8] lea r14, [rsp+218h+var_1B8] lea r15, [rsp+218h+var_1F8] lea r12, [rsp+218h+var_1D8] loc_83B38: mov rdi, r14 mov rsi, r15 mov edx, 2Ch ; ',' call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_83B85 mov rdi, r12 mov rsi, r15 call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&) mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+218h+var_1D8]; void * cmp rdi, rbp jz short loc_83B38 mov rsi, [rsp+218h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_83B38 loc_83B85: mov rdi, [rsp+218h+var_1F8]; void * cmp rdi, r13 jz short loc_83B9C mov rsi, [rsp+218h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_83B9C: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+218h+var_140]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 1E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_83BD7: lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_83A72 lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_83A72 loc_83C2E: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpectedVariab; "Expected variable names" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_83CF0 jmp short loc_83C85 mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_83CE8 mov r14, rax jmp short loc_83CE0 loc_83C85: mov r14, rax jmp short loc_83CE8 mov r14, rax mov rdi, [rsp+218h+var_1D8]; void * cmp rdi, rbp jz short loc_83CAB mov rsi, [rsp+218h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_83CAB jmp short $+2 loc_83CA8: mov r14, rax loc_83CAB: mov rdi, [rsp+218h+var_1F8]; void * cmp rdi, r13 jz short loc_83CC2 mov rsi, [rsp+218h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_83CC2: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+218h+var_140]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_83CE0: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_83CE8: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_83CF0: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2) { _QWORD *v2; // rax std::runtime_error *exception; // rbx int v5[4]; // [rsp+0h] [rbp-218h] BYREF int v6[2]; // [rsp+10h] [rbp-208h] __int128 v7; // [rsp+20h] [rbp-1F8h] BYREF _QWORD v8[2]; // [rsp+30h] [rbp-1E8h] BYREF void *v9[2]; // [rsp+40h] [rbp-1D8h] BYREF long long v10; // [rsp+50h] [rbp-1C8h] BYREF __int128 v11; // [rsp+60h] [rbp-1B8h] BYREF long long v12; // [rsp+70h] [rbp-1A8h] _BYTE v13[320]; // [rsp+D8h] [rbp-140h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], (long long)"((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]); } minja::Parser::consumeTokenGroups( (long long)&v7, a2, (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], 1u); *(_OWORD *)v5 = v7; *(_QWORD *)v6 = v8[0]; v11 = 0LL; v12 = 0LL; v7 = 0LL; v8[0] = 0LL; std::vector<std::string>::~vector((long long)&v11); std::vector<std::string>::~vector((long long)&v7); if ( *(_QWORD *)v5 == *(_QWORD *)&v5[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected variable names"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::istringstream::basic_istringstream(&v11, *(_QWORD *)v5 + 32LL, 8LL); *(_QWORD *)&v7 = v8; *((_QWORD *)&v7 + 1) = 0LL; LOBYTE(v8[0]) = 0; while ( 1 ) { v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&v11, &v7, 44LL); if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 ) break; minja::strip(v9, (long long)&v7); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != &v10 ) operator delete(v9[0], v10 + 1); } if ( (_QWORD *)v7 != v8 ) operator delete((void *)v7, v8[0] + 1LL); std::istringstream::~istringstream(&v11, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v13); std::vector<std::string>::~vector((long long)v5); return a1; }
parseVarNames[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1e8 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x22d1d0] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00183bd7 LAB_00183a72: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_00183a82: LEA RDX,[0x22d1b0] LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV ECX,0x1 CALL 0x00183408 LEA R14,[RSP + 0x20] MOVAPS XMM0,xmmword ptr [R14] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x60] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI],XMM0 XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOVAPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x10],RAX CALL 0x001216e8 MOV R15,qword ptr [RSP] MOV R12,qword ptr [RSP + 0x8] MOV RDI,R14 CALL 0x001216e8 CMP R15,R12 JZ 0x00183c2e XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV RSI,qword ptr [RSP] ADD RSI,0x20 LAB_00183aff: LEA RDI,[RSP + 0x60] MOV EDX,0x8 CALL 0x0011aee0 LEA R13,[RSP + 0x30] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 LEA RBP,[RSP + 0x50] LEA R14,[RSP + 0x60] LEA R15,[RSP + 0x20] LEA R12,[RSP + 0x40] LAB_00183b38: MOV RDI,R14 MOV RSI,R15 MOV EDX,0x2c CALL 0x0011b080 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x00183b85 LAB_00183b56: MOV RDI,R12 MOV RSI,R15 CALL 0x00177d13 LAB_00183b61: MOV RDI,RBX MOV RSI,R12 CALL 0x00155852 MOV RDI,qword ptr [RSP + 0x40] CMP RDI,RBP JZ 0x00183b38 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011a8d0 JMP 0x00183b38 LAB_00183b85: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R13 JZ 0x00183b9c MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8d0 LAB_00183b9c: MOV RSI,qword ptr [0x0022bf58] LEA RDI,[RSP + 0x60] CALL 0x0011acb0 LEA RDI,[RSP + 0xd8] CALL 0x0011a2c0 MOV RDI,RSP CALL 0x001216e8 MOV RAX,RBX ADD RSP,0x1e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00183bd7: LEA RDI,[0x22d1d0] CALL 0x0011b020 TEST EAX,EAX JZ 0x00183a72 LAB_00183beb: LEA RDI,[0x22d1b0] LEA RSI,[0x1f099c] MOV EDX,0x10 CALL 0x00162528 LAB_00183c03: LEA RDI,[0x16282c] LEA RSI,[0x22d1b0] LEA RDX,[0x22c8d8] CALL 0x0011a7a0 LEA RDI,[0x22d1d0] CALL 0x0011a5d0 JMP 0x00183a72 LAB_00183c2e: MOV EDI,0x10 CALL 0x0011a450 MOV RBX,RAX LAB_00183c3b: LEA RSI,[0x1f09ce] MOV RDI,RAX CALL 0x0011a330 LAB_00183c4a: MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,RBX CALL 0x0011af40
/* minja::Parser::parseVarNames[abi:cxx11]() */ void minja::Parser::parseVarNames_abi_cxx11_(void) { ulong *puVar1; ulong *puVar2; int iVar3; istream *piVar4; runtime_error *this; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI; ulong *local_218; ulong *puStack_210; ulong local_208; ulong *local_1f8; ulong *puStack_1f0; ulong local_1e8 [2]; long *local_1d8 [2]; long local_1c8 [2]; int8 local_1b8; int8 uStack_1b0; int8 local_1a8; ios_base local_140 [272]; if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 00183beb to 00183c02 has its CatchHandler @ 00183c60 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_, "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); } } local_218 = (ulong *)0x0; puStack_210 = (ulong *)0x0; local_208 = 0; /* try { // try from 00183a82 to 00183a9a has its CatchHandler @ 00183c85 */ consumeTokenGroups(&local_1f8); local_218 = local_1f8; puStack_210 = puStack_1f0; local_208 = local_1e8[0]; local_1b8 = 0; uStack_1b0 = 0; local_1a8 = 0; local_1f8 = (ulong *)0x0; puStack_1f0 = (ulong *)0x0; local_1e8[0] = 0; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1b8); puVar2 = puStack_210; puVar1 = local_218; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1f8); if (puVar1 != puVar2) { *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; *(int8 *)(in_RDI + 0x10) = 0; /* try { // try from 00183aff to 00183b0d has its CatchHandler @ 00183c80 */ std::__cxx11::istringstream::istringstream((istringstream *)&local_1b8,local_218 + 4,8); puStack_1f0 = (ulong *)0x0; local_1e8[0] = local_1e8[0] & 0xffffffffffffff00; local_1f8 = local_1e8; while( true ) { /* try { // try from 00183b38 to 00183b47 has its CatchHandler @ 00183ca8 */ piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)&local_1b8,(string *)&local_1f8,','); if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 00183b56 to 00183b60 has its CatchHandler @ 00183ca6 */ strip((minja *)local_1d8,(string *)&local_1f8); /* try { // try from 00183b61 to 00183b6b has its CatchHandler @ 00183c8a */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1d8); if (local_1d8[0] != local_1c8) { operator_delete(local_1d8[0],local_1c8[0] + 1); } } if (local_1f8 != local_1e8) { operator_delete(local_1f8,local_1e8[0] + 1); } std::__cxx11::istringstream::~istringstream((istringstream *)&local_1b8); std::ios_base::~ios_base(local_140); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_218); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00183c3b to 00183c49 has its CatchHandler @ 00183c73 */ std::runtime_error::runtime_error(this,"Expected variable names"); /* try { // try from 00183c4a to 00183c5f has its CatchHandler @ 00183c71 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); }
53,014
safe_lexcstrdup_root
eloqsql/mysys/my_alloc.c
LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str) { LEX_CSTRING res; if (str.length) res.str= strmake_root(root, str.str, str.length); else res.str= (const char *)""; res.length= str.length; return res; }
O0
c
safe_lexcstrdup_root: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rsi, -0x20(%rbp) movq %rdx, -0x18(%rbp) movq %rdi, -0x28(%rbp) cmpq $0x0, -0x18(%rbp) je 0x69d92 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x69cb0 movq %rax, -0x10(%rbp) jmp 0x69d9d leaq 0x4a181(%rip), %rax # 0xb3f1a movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movq -0x8(%rbp), %rdx addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
safe_lexcstrdup_root: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_20], rsi mov [rbp+var_18], rdx mov [rbp+var_28], rdi cmp [rbp+var_18], 0 jz short loc_69D92 mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] mov rdx, [rbp+var_18] call strmake_root mov [rbp+var_10], rax jmp short loc_69D9D loc_69D92: lea rax, asc_B3F16+4; "" mov [rbp+var_10], rax loc_69D9D: mov rax, [rbp+var_18] mov [rbp+var_8], rax mov rax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 30h pop rbp retn
char * safe_lexcstrdup_root(_QWORD **a1, long long a2, long long a3) { if ( a3 ) return strmake_root(a1, a2, a3); else return ""; }
safe_lexcstrdup_root: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x28],RDI CMP qword ptr [RBP + -0x18],0x0 JZ 0x00169d92 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00169cb0 MOV qword ptr [RBP + -0x10],RAX JMP 0x00169d9d LAB_00169d92: LEA RAX,[0x1b3f1a] MOV qword ptr [RBP + -0x10],RAX LAB_00169d9d: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3) { int1 auVar1 [16]; int *local_18; if (param_3 == 0) { local_18 = &DAT_001b3f1a; } else { local_18 = (int *)strmake_root(param_1,param_2,param_3); } auVar1._8_8_ = param_3; auVar1._0_8_ = local_18; return auVar1; }
53,015
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&)
monkey531[P]llama/common/json.hpp
static std::string position_string(const position_t& pos) { return concat(" at line ", std::to_string(pos.lines_read + 1), ", column ", std::to_string(pos.chars_read_current_line)); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %rsi incq %rsi leaq 0x28(%rsp), %rdi callq 0x4159b movq 0x8(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x4159b leaq 0x6bc82(%rip), %rsi # 0xaffaf leaq 0x6bc85(%rip), %rcx # 0xaffb9 leaq 0x28(%rsp), %rdx leaq 0x8(%rsp), %r8 movq %rbx, %rdi callq 0x44524 leaq 0x8(%rsp), %rdi callq 0x241d8 leaq 0x28(%rsp), %rdi callq 0x241d8 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x241d8 jmp 0x44377 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x241d8 movq %rbx, %rdi callq 0x23fa0 nop
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE: push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov rsi, [rsi+10h] inc rsi; unsigned __int64 lea rdi, [rsp+58h+var_30]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) mov rsi, [r14+8]; unsigned __int64 lea rdi, [rsp+58h+var_50]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aAtLine; " at line " lea rcx, aColumn; ", column " lea rdx, [rsp+58h+var_30] lea r8, [rsp+58h+var_50] mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_SB_S8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>(char const(&)[10],std::string,char const(&)[10],std::string &&) lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+58h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 48h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_44377 mov rbx, rax loc_44377: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](long long a1, long long a2) { _BYTE v3[32]; // [rsp+8h] [rbp-50h] BYREF _BYTE v4[48]; // [rsp+28h] [rbp-30h] BYREF std::to_string((std::__cxx11 *)v4, *(_QWORD *)(a2 + 16) + 1LL); std::to_string((std::__cxx11 *)v3, *(_QWORD *)(a2 + 8)); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>( a1, " at line ", v4, ", column ", v3); std::string::~string(v3); std::string::~string(v4); return a1; }
position_string[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x10] INC RSI LEA RDI,[RSP + 0x28] CALL 0x0014159b MOV RSI,qword ptr [R14 + 0x8] LAB_0014431c: LEA RDI,[RSP + 0x8] CALL 0x0014159b LAB_00144326: LEA RSI,[0x1affaf] LEA RCX,[0x1affb9] LEA RDX,[RSP + 0x28] LEA R8,[RSP + 0x8] MOV RDI,RBX CALL 0x00144524 LAB_00144346: LEA RDI,[RSP + 0x8] CALL 0x001241d8 LEA RDI,[RSP + 0x28] CALL 0x001241d8 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&) */ parse_error * __thiscall nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_ (parse_error *this,position_t *param_1) { __cxx11 local_50 [32]; __cxx11 local_30 [32]; std::__cxx11::to_string(local_30,*(long *)(param_1 + 0x10) + 1); /* try { // try from 0014431c to 00144325 has its CatchHandler @ 00144374 */ std::__cxx11::to_string(local_50,*(ulong *)(param_1 + 8)); /* try { // try from 00144326 to 00144345 has its CatchHandler @ 00144365 */ concat<std::__cxx11::string,char_const(&)[10],std::__cxx11::string,char_const(&)[10],std::__cxx11::string> ((detail *)this," at line ",(string *)local_30,", column ",(string *)local_50); std::__cxx11::string::~string((string *)local_50); std::__cxx11::string::~string((string *)local_30); return this; }
53,016
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/common.cpp
void common_batch_add( struct llama_batch & batch, llama_token id, llama_pos pos, const std::vector<llama_seq_id> & seq_ids, bool logits) { GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded"); batch.token [batch.n_tokens] = id; batch.pos [batch.n_tokens] = pos; batch.n_seq_id[batch.n_tokens] = seq_ids.size(); for (size_t i = 0; i < seq_ids.size(); ++i) { batch.seq_id[batch.n_tokens][i] = seq_ids[i]; } batch.logits [batch.n_tokens] = logits; batch.n_tokens++; }
O3
cpp
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool): pushq %rax movq 0x28(%rdi), %rax movslq (%rdi), %r9 cmpq $0x0, (%rax,%r9,8) je 0x9914f movq 0x8(%rdi), %r10 movl %esi, (%r10,%r9,4) movq 0x18(%rdi), %rsi movslq (%rdi), %r9 movl %edx, (%rsi,%r9,4) movq (%rcx), %rdx movq 0x8(%rcx), %rsi movq %rsi, %rcx subq %rdx, %rcx sarq $0x2, %rcx movq 0x20(%rdi), %r9 movslq (%rdi), %r10 movl %ecx, (%r9,%r10,4) cmpq %rdx, %rsi je 0x99140 cmpq $0x1, %rcx adcq $0x0, %rcx xorl %esi, %esi movl (%rdx,%rsi,4), %r9d movslq (%rdi), %r10 movq (%rax,%r10,8), %r10 movl %r9d, (%r10,%rsi,4) incq %rsi cmpq %rsi, %rcx jne 0x99129 movq 0x30(%rdi), %rax movslq (%rdi), %rcx movb %r8b, (%rax,%rcx) incl (%rdi) popq %rax retq leaq 0x7b107(%rip), %rdi # 0x11425d leaq 0x71916(%rip), %rdx # 0x10aa73 leaq 0x7b713(%rip), %rcx # 0x114877 movl $0x655, %esi # imm = 0x655 xorl %eax, %eax callq 0x1e500
_Z16common_batch_addR11llama_batchiiRKSt6vectorIiSaIiEEb: push rax mov rax, [rdi+28h] movsxd r9, dword ptr [rdi] cmp qword ptr [rax+r9*8], 0 jz short loc_9914F mov r10, [rdi+8] mov [r10+r9*4], esi mov rsi, [rdi+18h] movsxd r9, dword ptr [rdi] mov [rsi+r9*4], edx mov rdx, [rcx] mov rsi, [rcx+8] mov rcx, rsi sub rcx, rdx sar rcx, 2 mov r9, [rdi+20h] movsxd r10, dword ptr [rdi] mov [r9+r10*4], ecx cmp rsi, rdx jz short loc_99140 cmp rcx, 1 adc rcx, 0 xor esi, esi loc_99129: mov r9d, [rdx+rsi*4] movsxd r10, dword ptr [rdi] mov r10, [rax+r10*8] mov [r10+rsi*4], r9d inc rsi cmp rcx, rsi jnz short loc_99129 loc_99140: mov rax, [rdi+30h] movsxd rcx, dword ptr [rdi] mov [rax+rcx], r8b inc dword ptr [rdi] pop rax retn loc_9914F: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBatchSeqIdBatc; "batch.seq_id[batch.n_tokens] && \"llama"... mov esi, 655h xor eax, eax call _ggml_abort
long long common_batch_add(int *a1, int a2, int a3, long long *a4, char a5) { long long v5; // rax long long v6; // rax long long v7; // r9 long long v8; // rdx long long v9; // rsi long long v10; // rcx long long v11; // rcx long long v12; // rsi long long v14; // [rsp-8h] [rbp-8h] v14 = v5; v6 = *((_QWORD *)a1 + 5); v7 = *a1; if ( *(_QWORD *)(v6 + 8 * v7) ) { *(_DWORD *)(*((_QWORD *)a1 + 1) + 4 * v7) = a2; *(_DWORD *)(*((_QWORD *)a1 + 3) + 4LL * *a1) = a3; v8 = *a4; v9 = a4[1]; v10 = (v9 - *a4) >> 2; *(_DWORD *)(*((_QWORD *)a1 + 4) + 4LL * *a1) = v10; if ( v9 != v8 ) { v11 = (v10 == 0) + v10; v12 = 0LL; do { *(_DWORD *)(*(_QWORD *)(v6 + 8LL * *a1) + 4 * v12) = *(_DWORD *)(v8 + 4 * v12); ++v12; } while ( v11 != v12 ); } *(_BYTE *)(*((_QWORD *)a1 + 6) + (*a1)++) = a5; return v14; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 1621LL, "GGML_ASSERT(%s) failed", "batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\""); return common_lcp(); } }
common_batch_add: PUSH RAX MOV RAX,qword ptr [RDI + 0x28] MOVSXD R9,dword ptr [RDI] CMP qword ptr [RAX + R9*0x8],0x0 JZ 0x0019914f MOV R10,qword ptr [RDI + 0x8] MOV dword ptr [R10 + R9*0x4],ESI MOV RSI,qword ptr [RDI + 0x18] MOVSXD R9,dword ptr [RDI] MOV dword ptr [RSI + R9*0x4],EDX MOV RDX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x8] MOV RCX,RSI SUB RCX,RDX SAR RCX,0x2 MOV R9,qword ptr [RDI + 0x20] MOVSXD R10,dword ptr [RDI] MOV dword ptr [R9 + R10*0x4],ECX CMP RSI,RDX JZ 0x00199140 CMP RCX,0x1 ADC RCX,0x0 XOR ESI,ESI LAB_00199129: MOV R9D,dword ptr [RDX + RSI*0x4] MOVSXD R10,dword ptr [RDI] MOV R10,qword ptr [RAX + R10*0x8] MOV dword ptr [R10 + RSI*0x4],R9D INC RSI CMP RCX,RSI JNZ 0x00199129 LAB_00199140: MOV RAX,qword ptr [RDI + 0x30] MOVSXD RCX,dword ptr [RDI] MOV byte ptr [RAX + RCX*0x1],R8B INC dword ptr [RDI] POP RAX RET LAB_0019914f: LEA RDI,[0x21425d] LEA RDX,[0x20aa73] LEA RCX,[0x214877] MOV ESI,0x655 XOR EAX,EAX CALL 0x0011e500
/* common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int> > const&, bool) */ int8 common_batch_add(llama_batch *param_1,int param_2,int param_3,vector *param_4,bool param_5) { long lVar1; long lVar2; int8 in_RAX; long lVar3; long lVar4; lVar1 = *(long *)(param_1 + 0x28); if (*(long *)(lVar1 + (long)*(int *)param_1 * 8) != 0) { *(int *)(*(long *)(param_1 + 8) + (long)*(int *)param_1 * 4) = param_2; *(int *)(*(long *)(param_1 + 0x18) + (long)*(int *)param_1 * 4) = param_3; lVar2 = *(long *)param_4; lVar4 = *(long *)(param_4 + 8); lVar3 = lVar4 - lVar2 >> 2; *(int *)(*(long *)(param_1 + 0x20) + (long)*(int *)param_1 * 4) = (int)lVar3; if (lVar4 != lVar2) { lVar4 = 0; do { *(int4 *)(*(long *)(lVar1 + (long)*(int *)param_1 * 8) + lVar4 * 4) = *(int4 *)(lVar2 + lVar4 * 4); lVar4 = lVar4 + 1; } while (lVar3 + (ulong)(lVar3 == 0) != lVar4); } *(bool *)(*(long *)(param_1 + 0x30) + (long)*(int *)param_1) = param_5; *(int *)param_1 = *(int *)param_1 + 1; return in_RAX; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x655, "GGML_ASSERT(%s) failed", "batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\""); }
53,017
fn_format
eloqsql/mysys/mf_format.c
char * fn_format(char * to, const char *name, const char *dir, const char *extension, uint flag) { char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos; const char *ext; reg1 size_t length; size_t dev_length; DBUG_ENTER("fn_format"); DBUG_ASSERT(name != NULL); DBUG_ASSERT(extension != NULL); DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d", name,dir,extension,flag)); /* Copy and skip directory */ name+=(length=dirname_part(dev, (startpos=(char *) name), &dev_length)); if (length == 0 || (flag & MY_REPLACE_DIR)) { /* Use given directory */ convert_dirname(dev,dir,NullS); /* Fix to this OS */ } else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev)) { /* Put 'dir' before the given path */ strmake_buf(buff, dev); pos=convert_dirname(dev,dir,NullS); strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev)); } if (flag & MY_PACK_FILENAME) pack_dirname(dev,dev); /* Put in ./.. and ~/.. */ if (flag & MY_UNPACK_FILENAME) (void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */ if (!(flag & MY_APPEND_EXT) && (pos= (char*) strchr(name,FN_EXTCHAR)) != NullS) { if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */ { length=strlength(name); /* Use old extension */ ext = ""; } else { length= (size_t) (pos-(char*) name); /* Change extension */ ext= extension; } } else { length=strlength(name); /* No ext, use the now one */ ext=extension; } if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN ) { /* To long path, return original or NULL */ size_t tmp_length; if (flag & MY_SAFE_PATH) DBUG_RETURN(NullS); tmp_length= strlength(startpos); DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %u",dev,ext, (uint) length)); (void) strmake(to,startpos,MY_MIN(tmp_length,FN_REFLEN-1)); } else { if (to == startpos) { bmove(buff,(uchar*) name,length); /* Save name for last copy */ name=buff; } pos=strmake(strmov(to,dev),name,length); (void) strmov(pos,ext); /* Don't convert extension */ } if (flag & MY_RETURN_REAL_PATH) (void) my_realpath(to, to, MYF(0)); else if (flag & MY_RESOLVE_SYMLINKS) { strmov(buff,to); (void) my_readlink(to, buff, MYF(0)); } DBUG_RETURN(to); }
O3
c
fn_format: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x428, %rsp # imm = 0x428 movl %r8d, %r14d movq %rcx, -0x438(%rbp) movq %rdx, %r12 movq %rsi, %r15 movq %rdi, -0x440(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x230(%rbp), %rdi leaq -0x448(%rbp), %rdx callq 0x94479 movq %rax, %r13 testq %rax, %rax setne %al testb $0x1, %r14b sete %cl testb %al, %cl je 0x945eb testb %r14b, %r14b jns 0x945fc leaq -0x230(%rbp), %rdi callq 0x9e306 testl %eax, %eax jne 0x945fc leaq -0x430(%rbp), %rdi leaq -0x230(%rbp), %rsi movl $0x1ff, %ebx # imm = 0x1FF movl $0x1ff, %edx # imm = 0x1FF callq 0xd6d28 leaq -0x230(%rbp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x944cb movl %eax, %ecx leaq -0x230(%rbp), %rdx subl %edx, %ecx movslq %ecx, %rcx subq %rcx, %rbx movq %rax, %rdi leaq -0x430(%rbp), %rsi movq %rbx, %rdx callq 0xd6d28 jmp 0x945fc leaq -0x230(%rbp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x944cb testb $0x8, %r14b je 0x94611 leaq -0x230(%rbp), %rdi movq %rdi, %rsi callq 0x9aa80 testb $0x4, %r14b je 0x94626 leaq -0x230(%rbp), %rdi movq %rdi, %rsi callq 0x9b006 addq %r15, %r13 btl $0x8, %r14d jb 0x9468b movq %r13, %rdi movl $0x2e, %esi callq 0x29440 testq %rax, %rax je 0x9468b movq %rax, %r12 testb $0x2, %r14b jne 0x946e8 movb (%r13), %al movq %r13, %rcx movq %r13, %r12 cmpb $0x20, %al je 0x94676 movzbl %al, %eax testl %eax, %eax je 0x946d7 movzbl 0x1(%r12), %eax incq %r12 testl %eax, %eax je 0x946c7 cmpl $0x20, %eax jne 0x94664 movq %r12, %rdx movb 0x1(%rdx), %al incq %rdx cmpb $0x20, %al je 0x94679 movq %r12, %rcx movq %rdx, %r12 jmp 0x94659 movb (%r13), %al movq %r13, %rcx movq %r13, %r12 cmpb $0x20, %al je 0x946b2 movzbl %al, %eax testl %eax, %eax je 0x946e5 movzbl 0x1(%r12), %eax incq %r12 testl %eax, %eax je 0x946e8 cmpl $0x20, %eax jne 0x946a0 movq %r12, %rdx movb 0x1(%rdx), %al incq %rdx cmpb $0x20, %al je 0x946b5 movq %r12, %rcx movq %rdx, %r12 jmp 0x94695 leaq 0x4b444(%rip), %rax # 0xdfb12 movq %rax, -0x438(%rbp) jmp 0x946e8 leaq 0x4b434(%rip), %rax # 0xdfb12 movq %rax, -0x438(%rbp) movq %rcx, %r12 subq %r13, %r12 leaq -0x230(%rbp), %rdi callq 0x29350 movq %rax, %rbx movq -0x438(%rbp), %rdi callq 0x29350 cmpq $0xff, %r12 ja 0x94778 addq %r12, %rbx addq %rax, %rbx cmpq $0x200, %rbx # imm = 0x200 jae 0x94778 movq -0x440(%rbp), %rax cmpq %r15, %rax movq %rax, %r15 jne 0x9474a leaq -0x430(%rbp), %rbx movl $0x200, %ecx # imm = 0x200 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x294c0 movq %rbx, %r13 leaq -0x230(%rbp), %rsi movq %r15, %rdi callq 0x29780 movq %rax, %rdi movq %r13, %rsi movq %r12, %rdx callq 0xd6d28 movq %rax, %rdi movq -0x438(%rbp), %rsi callq 0x29360 jmp 0x947e2 testb $0x40, %r14b jne 0x947b9 movb (%r15), %cl movq %r15, %rdx movq %r15, %rax cmpb $0x20, %cl je 0x947a3 movzbl %cl, %ecx testl %ecx, %ecx je 0x947c1 movzbl 0x1(%rax), %ecx incq %rax testl %ecx, %ecx je 0x947be cmpl $0x20, %ecx jne 0x94793 movq %rax, %rsi movb 0x1(%rsi), %cl incq %rsi cmpb $0x20, %cl je 0x947a6 movq %rax, %rdx movq %rsi, %rax jmp 0x94787 xorl %r15d, %r15d jmp 0x9481c movq %rax, %rdx subq %r15, %rdx movl $0x1ff, %eax # imm = 0x1FF cmpq %rax, %rdx cmovaeq %rax, %rdx movq -0x440(%rbp), %rdi movq %r15, %rsi movq %rdi, %r15 callq 0xd6d28 testb $0x20, %r14b jne 0x9480f testb $0x10, %r14b je 0x9481c leaq -0x430(%rbp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x29360 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0xa0818 jmp 0x9481c movq %r15, %rdi movq %r15, %rsi xorl %edx, %edx callq 0xa0975 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x94840 movq %r15, %rax addq $0x428, %rsp # imm = 0x428 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
fn_format: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 428h mov r14d, r8d mov [rbp+var_438], rcx mov r12, rdx mov r15, rsi mov [rbp+var_440], rdi mov rax, fs:28h mov [rbp+var_30], rax lea rdi, [rbp+var_230] lea rdx, [rbp+var_448] call dirname_part mov r13, rax test rax, rax setnz al test r14b, 1 setz cl test cl, al jz short loc_945EB test r14b, r14b jns short loc_945FC lea rdi, [rbp+var_230] call test_if_hard_path test eax, eax jnz short loc_945FC lea rdi, [rbp+var_430] lea rsi, [rbp+var_230] mov ebx, 1FFh mov edx, 1FFh call strmake lea rdi, [rbp+var_230] mov rsi, r12 xor edx, edx call convert_dirname mov ecx, eax lea rdx, [rbp+var_230] sub ecx, edx movsxd rcx, ecx sub rbx, rcx mov rdi, rax lea rsi, [rbp+var_430] mov rdx, rbx call strmake jmp short loc_945FC loc_945EB: lea rdi, [rbp+var_230] mov rsi, r12 xor edx, edx call convert_dirname loc_945FC: test r14b, 8 jz short loc_94611 lea rdi, [rbp+var_230] mov rsi, rdi call pack_dirname loc_94611: test r14b, 4 jz short loc_94626 lea rdi, [rbp+var_230] mov rsi, rdi call unpack_dirname loc_94626: add r13, r15 bt r14d, 8 jb short loc_9468B mov rdi, r13 mov esi, 2Eh ; '.' call _strchr test rax, rax jz short loc_9468B mov r12, rax test r14b, 2 jnz loc_946E8 mov al, [r13+0] mov rcx, r13 mov r12, r13 loc_94659: cmp al, 20h ; ' ' jz short loc_94676 movzx eax, al test eax, eax jz short loc_946D7 loc_94664: movzx eax, byte ptr [r12+1] inc r12 test eax, eax jz short loc_946C7 cmp eax, 20h ; ' ' jnz short loc_94664 loc_94676: mov rdx, r12 loc_94679: mov al, [rdx+1] inc rdx cmp al, 20h ; ' ' jz short loc_94679 mov rcx, r12 mov r12, rdx jmp short loc_94659 loc_9468B: mov al, [r13+0] mov rcx, r13 mov r12, r13 loc_94695: cmp al, 20h ; ' ' jz short loc_946B2 movzx eax, al test eax, eax jz short loc_946E5 loc_946A0: movzx eax, byte ptr [r12+1] inc r12 test eax, eax jz short loc_946E8 cmp eax, 20h ; ' ' jnz short loc_946A0 loc_946B2: mov rdx, r12 loc_946B5: mov al, [rdx+1] inc rdx cmp al, 20h ; ' ' jz short loc_946B5 mov rcx, r12 mov r12, rdx jmp short loc_94695 loc_946C7: lea rax, asc_DFB0E+4; "" mov [rbp+var_438], rax jmp short loc_946E8 loc_946D7: lea rax, asc_DFB0E+4; "" mov [rbp+var_438], rax loc_946E5: mov r12, rcx loc_946E8: sub r12, r13 lea rdi, [rbp+var_230] call _strlen mov rbx, rax mov rdi, [rbp+var_438] call _strlen cmp r12, 0FFh ja short loc_94778 add rbx, r12 add rbx, rax cmp rbx, 200h jnb short loc_94778 mov rax, [rbp+var_440] cmp rax, r15 mov r15, rax jnz short loc_9474A lea rbx, [rbp+var_430] mov ecx, 200h mov rdi, rbx mov rsi, r13 mov rdx, r12 call ___memmove_chk mov r13, rbx loc_9474A: lea rsi, [rbp+var_230] mov rdi, r15 call _stpcpy mov rdi, rax mov rsi, r13 mov rdx, r12 call strmake mov rdi, rax mov rsi, [rbp+var_438] call _strcpy jmp short loc_947E2 loc_94778: test r14b, 40h jnz short loc_947B9 mov cl, [r15] mov rdx, r15 mov rax, r15 loc_94787: cmp cl, 20h ; ' ' jz short loc_947A3 movzx ecx, cl test ecx, ecx jz short loc_947C1 loc_94793: movzx ecx, byte ptr [rax+1] inc rax test ecx, ecx jz short loc_947BE cmp ecx, 20h ; ' ' jnz short loc_94793 loc_947A3: mov rsi, rax loc_947A6: mov cl, [rsi+1] inc rsi cmp cl, 20h ; ' ' jz short loc_947A6 mov rdx, rax mov rax, rsi jmp short loc_94787 loc_947B9: xor r15d, r15d jmp short loc_9481C loc_947BE: mov rdx, rax loc_947C1: sub rdx, r15 mov eax, 1FFh cmp rdx, rax cmovnb rdx, rax mov rdi, [rbp+var_440] mov rsi, r15 mov r15, rdi call strmake loc_947E2: test r14b, 20h jnz short loc_9480F test r14b, 10h jz short loc_9481C lea rbx, [rbp+var_430] mov rdi, rbx mov rsi, r15 call _strcpy mov rdi, r15 mov rsi, rbx xor edx, edx call my_readlink jmp short loc_9481C loc_9480F: mov rdi, r15 mov rsi, r15 xor edx, edx call my_realpath loc_9481C: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_94840 mov rax, r15 add rsp, 428h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_94840: call ___stack_chk_fail
_BYTE * fn_format(_BYTE *a1, _BYTE *a2, long long a3, char *a4, __int16 a5) { long long v8; // r13 _WORD *v9; // rax _BYTE *v10; // r13 long long v11; // rax _BYTE *v12; // r12 char v13; // al _BYTE *v14; // rcx int v15; // eax _BYTE *v16; // rdx char v17; // al int v18; // eax _BYTE *v19; // rdx unsigned long long v20; // r12 long long v21; // rbx long long v22; // rax _BYTE *v23; // r15 long long v24; // rax long long v25; // rax char v26; // cl _BYTE *v27; // rdx _BYTE *v28; // rax int v29; // ecx _BYTE *v30; // rsi unsigned long long v31; // rdx _BYTE *v32; // rsi long long v34; // [rsp+8h] [rbp-448h] BYREF _BYTE *v35; // [rsp+10h] [rbp-440h] char *v36; // [rsp+18h] [rbp-438h] _BYTE v37[512]; // [rsp+20h] [rbp-430h] BYREF _WORD v38[256]; // [rsp+220h] [rbp-230h] BYREF unsigned long long v39; // [rsp+420h] [rbp-30h] long long savedregs; // [rsp+450h] [rbp+0h] BYREF v36 = a4; v35 = a1; v39 = __readfsqword(0x28u); v8 = dirname_part((long long)v38, a2, &v34); if ( v8 != 0 && (a5 & 1) == 0 ) { if ( (a5 & 0x80u) != 0 && !(unsigned int)test_if_hard_path(v38) ) { strmake(v37, v38, 511LL); v9 = convert_dirname(v38, a3, 0LL); strmake(v9, v37, 511LL - (int)((_DWORD)v9 - ((unsigned int)&savedregs - 560))); } } else { convert_dirname(v38, a3, 0LL); } if ( (a5 & 8) != 0 ) pack_dirname(v38, v38); if ( (a5 & 4) != 0 ) unpack_dirname(v38, v38); v10 = &a2[v8]; if ( (a5 & 0x100) == 0 ) { v11 = strchr(v10, 46LL); if ( v11 ) { v12 = (_BYTE *)v11; if ( (a5 & 2) != 0 ) goto LABEL_32; v13 = *v10; v14 = v10; v12 = v10; while ( v13 == 32 ) { LABEL_18: v16 = v12; do v13 = *++v16; while ( v13 == 32 ); v14 = v12; v12 = v16; } if ( v13 ) { while ( 1 ) { v15 = (unsigned __int8)*++v12; if ( !v15 ) break; if ( v15 == 32 ) goto LABEL_18; } v36 = ""; goto LABEL_32; } v36 = ""; LABEL_31: v12 = v14; goto LABEL_32; } } v17 = *v10; v14 = v10; v12 = v10; while ( v17 == 32 ) { LABEL_26: v19 = v12; do v17 = *++v19; while ( v17 == 32 ); v14 = v12; v12 = v19; } if ( !v17 ) goto LABEL_31; while ( 1 ) { v18 = (unsigned __int8)*++v12; if ( !v18 ) break; if ( v18 == 32 ) goto LABEL_26; } LABEL_32: v20 = v12 - v10; v21 = strlen(v38); v22 = strlen(v36); if ( v20 > 0xFF || v22 + v20 + v21 >= 0x200 ) { if ( (a5 & 0x40) != 0 ) return 0LL; v26 = *a2; v27 = a2; v28 = a2; while ( v26 == 32 ) { LABEL_43: v30 = v28; do v26 = *++v30; while ( v26 == 32 ); v27 = v28; v28 = v30; } if ( v26 ) { while ( 1 ) { v29 = (unsigned __int8)*++v28; if ( !v29 ) break; if ( v29 == 32 ) goto LABEL_43; } v27 = v28; } v31 = v27 - a2; if ( v31 >= 0x1FF ) v31 = 511LL; v32 = a2; v23 = v35; strmake(v35, v32, v31); } else { v23 = v35; if ( v35 == a2 ) { __memmove_chk(v37, v10, v20, 512LL); v10 = v37; } v24 = stpcpy(v23, v38); v25 = strmake(v24, v10, v20); strcpy(v25, v36); } if ( (a5 & 0x20) != 0 ) { my_realpath(v23, v23, 0LL); } else if ( (a5 & 0x10) != 0 ) { strcpy(v37, v23); my_readlink(v23, v37, 0LL); } return v23; }
fn_format: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x428 MOV R14D,R8D MOV qword ptr [RBP + -0x438],RCX MOV R12,RDX MOV R15,RSI MOV qword ptr [RBP + -0x440],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x230] LEA RDX,[RBP + -0x448] CALL 0x00194479 MOV R13,RAX TEST RAX,RAX SETNZ AL TEST R14B,0x1 SETZ CL TEST CL,AL JZ 0x001945eb TEST R14B,R14B JNS 0x001945fc LEA RDI,[RBP + -0x230] CALL 0x0019e306 TEST EAX,EAX JNZ 0x001945fc LEA RDI,[RBP + -0x430] LEA RSI,[RBP + -0x230] MOV EBX,0x1ff MOV EDX,0x1ff CALL 0x001d6d28 LEA RDI,[RBP + -0x230] MOV RSI,R12 XOR EDX,EDX CALL 0x001944cb MOV ECX,EAX LEA RDX,[RBP + -0x230] SUB ECX,EDX MOVSXD RCX,ECX SUB RBX,RCX MOV RDI,RAX LEA RSI,[RBP + -0x430] MOV RDX,RBX CALL 0x001d6d28 JMP 0x001945fc LAB_001945eb: LEA RDI,[RBP + -0x230] MOV RSI,R12 XOR EDX,EDX CALL 0x001944cb LAB_001945fc: TEST R14B,0x8 JZ 0x00194611 LEA RDI,[RBP + -0x230] MOV RSI,RDI CALL 0x0019aa80 LAB_00194611: TEST R14B,0x4 JZ 0x00194626 LEA RDI,[RBP + -0x230] MOV RSI,RDI CALL 0x0019b006 LAB_00194626: ADD R13,R15 BT R14D,0x8 JC 0x0019468b MOV RDI,R13 MOV ESI,0x2e CALL 0x00129440 TEST RAX,RAX JZ 0x0019468b MOV R12,RAX TEST R14B,0x2 JNZ 0x001946e8 MOV AL,byte ptr [R13] MOV RCX,R13 MOV R12,R13 LAB_00194659: CMP AL,0x20 JZ 0x00194676 MOVZX EAX,AL TEST EAX,EAX JZ 0x001946d7 LAB_00194664: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 TEST EAX,EAX JZ 0x001946c7 CMP EAX,0x20 JNZ 0x00194664 LAB_00194676: MOV RDX,R12 LAB_00194679: MOV AL,byte ptr [RDX + 0x1] INC RDX CMP AL,0x20 JZ 0x00194679 MOV RCX,R12 MOV R12,RDX JMP 0x00194659 LAB_0019468b: MOV AL,byte ptr [R13] MOV RCX,R13 MOV R12,R13 LAB_00194695: CMP AL,0x20 JZ 0x001946b2 MOVZX EAX,AL TEST EAX,EAX JZ 0x001946e5 LAB_001946a0: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 TEST EAX,EAX JZ 0x001946e8 CMP EAX,0x20 JNZ 0x001946a0 LAB_001946b2: MOV RDX,R12 LAB_001946b5: MOV AL,byte ptr [RDX + 0x1] INC RDX CMP AL,0x20 JZ 0x001946b5 MOV RCX,R12 MOV R12,RDX JMP 0x00194695 LAB_001946c7: LEA RAX,[0x1dfb12] MOV qword ptr [RBP + -0x438],RAX JMP 0x001946e8 LAB_001946d7: LEA RAX,[0x1dfb12] MOV qword ptr [RBP + -0x438],RAX LAB_001946e5: MOV R12,RCX LAB_001946e8: SUB R12,R13 LEA RDI,[RBP + -0x230] CALL 0x00129350 MOV RBX,RAX MOV RDI,qword ptr [RBP + -0x438] CALL 0x00129350 CMP R12,0xff JA 0x00194778 ADD RBX,R12 ADD RBX,RAX CMP RBX,0x200 JNC 0x00194778 MOV RAX,qword ptr [RBP + -0x440] CMP RAX,R15 MOV R15,RAX JNZ 0x0019474a LEA RBX,[RBP + -0x430] MOV ECX,0x200 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x001294c0 MOV R13,RBX LAB_0019474a: LEA RSI,[RBP + -0x230] MOV RDI,R15 CALL 0x00129780 MOV RDI,RAX MOV RSI,R13 MOV RDX,R12 CALL 0x001d6d28 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x438] CALL 0x00129360 JMP 0x001947e2 LAB_00194778: TEST R14B,0x40 JNZ 0x001947b9 MOV CL,byte ptr [R15] MOV RDX,R15 MOV RAX,R15 LAB_00194787: CMP CL,0x20 JZ 0x001947a3 MOVZX ECX,CL TEST ECX,ECX JZ 0x001947c1 LAB_00194793: MOVZX ECX,byte ptr [RAX + 0x1] INC RAX TEST ECX,ECX JZ 0x001947be CMP ECX,0x20 JNZ 0x00194793 LAB_001947a3: MOV RSI,RAX LAB_001947a6: MOV CL,byte ptr [RSI + 0x1] INC RSI CMP CL,0x20 JZ 0x001947a6 MOV RDX,RAX MOV RAX,RSI JMP 0x00194787 LAB_001947b9: XOR R15D,R15D JMP 0x0019481c LAB_001947be: MOV RDX,RAX LAB_001947c1: SUB RDX,R15 MOV EAX,0x1ff CMP RDX,RAX CMOVNC RDX,RAX MOV RDI,qword ptr [RBP + -0x440] MOV RSI,R15 MOV R15,RDI CALL 0x001d6d28 LAB_001947e2: TEST R14B,0x20 JNZ 0x0019480f TEST R14B,0x10 JZ 0x0019481c LEA RBX,[RBP + -0x430] MOV RDI,RBX MOV RSI,R15 CALL 0x00129360 MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX CALL 0x001a0818 JMP 0x0019481c LAB_0019480f: MOV RDI,R15 MOV RSI,R15 XOR EDX,EDX CALL 0x001a0975 LAB_0019481c: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00194840 MOV RAX,R15 ADD RSP,0x428 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00194840: CALL 0x00129270
char * fn_format(char *param_1,char *param_2,int8 param_3,char *param_4,uint param_5) { char *pcVar1; char *pcVar2; char cVar3; int iVar4; long lVar5; int8 uVar6; char *pcVar7; size_t sVar8; size_t sVar9; char *pcVar10; ulong uVar11; char *pcVar12; long in_FS_OFFSET; int1 local_450 [8]; char *local_448; char *local_440; char local_438 [512]; char local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_448 = param_1; local_440 = param_4; lVar5 = dirname_part(local_238,param_2,local_450); if ((param_5 & 1) == 0 && lVar5 != 0) { if (((char)param_5 < '\0') && (iVar4 = test_if_hard_path(local_238), iVar4 == 0)) { strmake(local_438,local_238,0x1ff); uVar6 = convert_dirname(local_238,param_3,0); strmake(uVar6,local_438,0x1ff - (long)((int)uVar6 - (int)local_238)); } } else { convert_dirname(local_238,param_3,0); } if ((param_5 & 8) != 0) { pack_dirname(local_238,local_238); } if ((param_5 & 4) != 0) { unpack_dirname(local_238,local_238); } pcVar12 = param_2 + lVar5; if (((param_5 >> 8 & 1) != 0) || (pcVar7 = strchr(pcVar12,0x2e), pcVar7 == (char *)0x0)) { cVar3 = *pcVar12; pcVar7 = pcVar12; pcVar10 = pcVar12; do { pcVar2 = pcVar10; if (cVar3 != ' ') { if (cVar3 == '\0') goto LAB_001946e8; do { pcVar1 = pcVar10 + 1; pcVar10 = pcVar10 + 1; pcVar7 = pcVar10; if (*pcVar1 == '\0') goto LAB_001946e8; pcVar2 = pcVar10; } while (*pcVar1 != ' '); } do { pcVar7 = pcVar2; cVar3 = pcVar10[1]; pcVar10 = pcVar10 + 1; pcVar2 = pcVar7; } while (cVar3 == ' '); } while( true ); } if ((param_5 & 2) == 0) { cVar3 = *pcVar12; pcVar7 = pcVar12; pcVar10 = pcVar12; do { pcVar2 = pcVar10; if (cVar3 != ' ') { if (cVar3 == '\0') { local_440 = ""; break; } do { pcVar7 = pcVar10 + 1; pcVar10 = pcVar10 + 1; if (*pcVar7 == '\0') { local_440 = ""; pcVar7 = pcVar10; goto LAB_001946e8; } pcVar2 = pcVar10; } while (*pcVar7 != ' '); } do { pcVar7 = pcVar2; cVar3 = pcVar10[1]; pcVar10 = pcVar10 + 1; pcVar2 = pcVar7; } while (cVar3 == ' '); } while( true ); } LAB_001946e8: uVar11 = (long)pcVar7 - (long)pcVar12; sVar8 = strlen(local_238); sVar9 = strlen(local_440); pcVar7 = local_448; if ((0xff < uVar11) || (0x1ff < sVar8 + uVar11 + sVar9)) { if ((param_5 & 0x40) == 0) { cVar3 = *param_2; pcVar12 = param_2; pcVar10 = param_2; do { pcVar2 = pcVar12; if (cVar3 != ' ') { if (cVar3 == '\0') goto LAB_001947c1; do { pcVar1 = pcVar12 + 1; pcVar12 = pcVar12 + 1; pcVar10 = pcVar12; if (*pcVar1 == '\0') goto LAB_001947c1; pcVar2 = pcVar12; } while (*pcVar1 != ' '); } do { pcVar10 = pcVar2; cVar3 = pcVar12[1]; pcVar12 = pcVar12 + 1; pcVar2 = pcVar10; } while (cVar3 == ' '); } while( true ); } pcVar7 = (char *)0x0; goto LAB_0019481c; } pcVar10 = pcVar12; if (local_448 == param_2) { pcVar10 = local_438; __memmove_chk(pcVar10,pcVar12,uVar11,0x200); } pcVar12 = stpcpy(pcVar7,local_238); pcVar12 = (char *)strmake(pcVar12,pcVar10,uVar11); strcpy(pcVar12,local_440); LAB_001947e2: if ((param_5 & 0x20) == 0) { if ((param_5 & 0x10) != 0) { strcpy(local_438,pcVar7); my_readlink(pcVar7,local_438,0); } } else { my_realpath(pcVar7,pcVar7,0); } LAB_0019481c: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return pcVar7; LAB_001947c1: uVar11 = (long)pcVar10 - (long)param_2; if (0x1fe < uVar11) { uVar11 = 0x1ff; } strmake(local_448,param_2,uVar11); goto LAB_001947e2; }
53,018
getTimezoneOffset
bluesky950520[P]quickjs/quickjs.c
static int getTimezoneOffset(int64_t time) { #if defined(_WIN32) DWORD r; TIME_ZONE_INFORMATION t; r = GetTimeZoneInformation(&t); if (r == TIME_ZONE_ID_INVALID) return 0; if (r == TIME_ZONE_ID_DAYLIGHT) return (int)(t.Bias + t.DaylightBias); return (int)t.Bias; #else time_t ti; struct tm tm; time /= 1000; /* convert to seconds */ if (sizeof(time_t) == 4) { /* on 32-bit systems, we need to clamp the time value to the range of `time_t`. This is better than truncating values to 32 bits and hopefully provides the same result as 64-bit implementation of localtime_r. */ if ((time_t)-1 < 0) { if (time < INT32_MIN) { time = INT32_MIN; } else if (time > INT32_MAX) { time = INT32_MAX; } } else { if (time < 0) { time = 0; } else if (time > UINT32_MAX) { time = UINT32_MAX; } } } ti = time; localtime_r(&ti, &tm); #ifdef NO_TM_GMTOFF struct tm gmt; gmtime_r(&ti, &gmt); /* disable DST adjustment on the local tm struct */ tm.tm_isdst = 0; return (int)difftime(mktime(&gmt), mktime(&tm)) / 60; #else return -tm.tm_gmtoff / 60; #endif /* NO_TM_GMTOFF */ #endif }
O0
c
getTimezoneOffset: subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rax movl $0x3e8, %ecx # imm = 0x3E8 cqto idivq %rcx movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x38(%rsp), %rdi movq %rsp, %rsi callq 0xe0f0 xorl %eax, %eax subq 0x28(%rsp), %rax movl $0x3c, %ecx cqto idivq %rcx addq $0x48, %rsp retq nopw (%rax,%rax)
getTimezoneOffset: sub rsp, 48h mov [rsp+48h+var_8], rdi mov rax, [rsp+48h+var_8] mov ecx, 3E8h cqo idiv rcx mov [rsp+48h+var_8], rax mov rax, [rsp+48h+var_8] mov [rsp+48h+var_10], rax lea rdi, [rsp+48h+var_10] mov rsi, rsp call _localtime_r xor eax, eax sub rax, [rsp+48h+var_20] mov ecx, 3Ch ; '<' cqo idiv rcx add rsp, 48h retn
long long getTimezoneOffset(long long a1) { _QWORD v2[7]; // [rsp+0h] [rbp-48h] BYREF _QWORD v3[2]; // [rsp+38h] [rbp-10h] BYREF v3[1] = a1 / 1000; v3[0] = a1 / 1000; localtime_r(v3, v2, a1 % 1000); return -v2[5] / 60LL; }
getTimezoneOffset: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RAX,qword ptr [RSP + 0x40] MOV ECX,0x3e8 CQO IDIV RCX MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0x38] MOV RSI,RSP CALL 0x0010e0f0 XOR EAX,EAX SUB RAX,qword ptr [RSP + 0x28] MOV ECX,0x3c CQO IDIV RCX ADD RSP,0x48 RET
long getTimezoneOffset(long param_1) { tm tStack_48; long local_10; long local_8; local_10 = param_1 / 1000; local_8 = local_10; localtime_r(&local_10,&tStack_48); return -tStack_48.tm_gmtoff / 0x3c; }
53,019
getTimezoneOffset
bluesky950520[P]quickjs/quickjs.c
static int getTimezoneOffset(int64_t time) { #if defined(_WIN32) DWORD r; TIME_ZONE_INFORMATION t; r = GetTimeZoneInformation(&t); if (r == TIME_ZONE_ID_INVALID) return 0; if (r == TIME_ZONE_ID_DAYLIGHT) return (int)(t.Bias + t.DaylightBias); return (int)t.Bias; #else time_t ti; struct tm tm; time /= 1000; /* convert to seconds */ if (sizeof(time_t) == 4) { /* on 32-bit systems, we need to clamp the time value to the range of `time_t`. This is better than truncating values to 32 bits and hopefully provides the same result as 64-bit implementation of localtime_r. */ if ((time_t)-1 < 0) { if (time < INT32_MIN) { time = INT32_MIN; } else if (time > INT32_MAX) { time = INT32_MAX; } } else { if (time < 0) { time = 0; } else if (time > UINT32_MAX) { time = UINT32_MAX; } } } ti = time; localtime_r(&ti, &tm); #ifdef NO_TM_GMTOFF struct tm gmt; gmtime_r(&ti, &gmt); /* disable DST adjustment on the local tm struct */ tm.tm_isdst = 0; return (int)difftime(mktime(&gmt), mktime(&tm)) / 60; #else return -tm.tm_gmtoff / 60; #endif /* NO_TM_GMTOFF */ #endif }
O2
c
getTimezoneOffset: pushq %rbx subq $0x40, %rsp movq %rdi, %rax movl $0x3e8, %ecx # imm = 0x3E8 cqto idivq %rcx movq %rsp, %rdi movq %rax, (%rdi) leaq 0x8(%rsp), %rbx movq %rbx, %rsi callq 0xe100 movq 0x28(%rbx), %rax pushq $-0x3c popq %rcx cqto idivq %rcx addq $0x40, %rsp popq %rbx retq
getTimezoneOffset: push rbx sub rsp, 40h mov rax, rdi mov ecx, 3E8h cqo idiv rcx mov rdi, rsp mov [rdi], rax lea rbx, [rsp+48h+var_40] mov rsi, rbx call _localtime_r mov rax, [rbx+28h] push 0FFFFFFFFFFFFFFC4h pop rcx cqo idiv rcx add rsp, 40h pop rbx retn
long long getTimezoneOffset(long long a1) { long long v2; // [rsp+0h] [rbp-48h] BYREF char v3; // [rsp+8h] [rbp-40h] BYREF long long v4; // [rsp+30h] [rbp-18h] v2 = a1 / 1000; localtime_r(&v2, &v3, a1 % 1000); return v4 / -60; }
getTimezoneOffset: PUSH RBX SUB RSP,0x40 MOV RAX,RDI MOV ECX,0x3e8 CQO IDIV RCX MOV RDI,RSP MOV qword ptr [RDI],RAX LEA RBX,[RSP + 0x8] MOV RSI,RBX CALL 0x0010e100 MOV RAX,qword ptr [RBX + 0x28] PUSH -0x3c POP RCX CQO IDIV RCX ADD RSP,0x40 POP RBX RET
long getTimezoneOffset(long param_1) { long local_48; tm local_40; local_48 = param_1 / 1000; localtime_r(&local_48,&local_40); return local_40.tm_gmtoff / -0x3c; }
53,020
wqueue_add_to_queue
eloqsql/mysys/wqueue.c
void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread) { struct st_my_thread_var *last; if (!(last= wqueue->last_thread)) thread->next= thread; else { thread->next= last->next; last->next= thread; } #ifndef DBUG_OFF thread->prev= NULL; /* force segfault if used */ #endif wqueue->last_thread= thread; }
O3
c
wqueue_add_to_queue: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax testq %rax, %rax je 0xad2e1 movq 0x88(%rax), %rcx addq $0x88, %rax movq %rcx, 0x88(%rsi) jmp 0xad2e8 leaq 0x88(%rsi), %rax movq %rsi, (%rax) movq %rsi, (%rdi) popq %rbp retq
wqueue_add_to_queue: push rbp mov rbp, rsp mov rax, [rdi] test rax, rax jz short loc_AD2E1 mov rcx, [rax+88h] add rax, 88h mov [rsi+88h], rcx jmp short loc_AD2E8 loc_AD2E1: lea rax, [rsi+88h] loc_AD2E8: mov [rax], rsi mov [rdi], rsi pop rbp retn
_QWORD * wqueue_add_to_queue(long long *a1, long long a2) { long long v2; // rax long long v3; // rcx _QWORD *result; // rax v2 = *a1; if ( *a1 ) { v3 = *(_QWORD *)(v2 + 136); result = (_QWORD *)(v2 + 136); *(_QWORD *)(a2 + 136) = v3; } else { result = (_QWORD *)(a2 + 136); } *result = a2; *a1 = a2; return result; }
wqueue_add_to_queue: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001ad2e1 MOV RCX,qword ptr [RAX + 0x88] ADD RAX,0x88 MOV qword ptr [RSI + 0x88],RCX JMP 0x001ad2e8 LAB_001ad2e1: LEA RAX,[RSI + 0x88] LAB_001ad2e8: MOV qword ptr [RAX],RSI MOV qword ptr [RDI],RSI POP RBP RET
void wqueue_add_to_queue(long *param_1,long param_2) { long lVar1; long *plVar2; lVar1 = *param_1; if (lVar1 == 0) { plVar2 = (long *)(param_2 + 0x88); } else { plVar2 = (long *)(lVar1 + 0x88); *(int8 *)(param_2 + 0x88) = *(int8 *)(lVar1 + 0x88); } *plVar2 = param_2; *param_1 = param_2; return; }
53,021
skip
eloqsql/libmariadb/unittest/mytap/tap.c
void skip(int how_many, char const *const fmt, ...) { char reason[80]; if (fmt && *fmt) { va_list ap; va_start(ap, fmt); vsnprintf(reason, sizeof(reason), fmt, ap); va_end(ap); } else reason[0] = '\0'; while (how_many-- > 0) { va_list ap; memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */ vemit_tap(1, NULL, ap); emit_dir("skip", reason); emit_endl(); } }
O0
c
skip: pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 testb %al, %al je 0x300f7 movaps %xmm0, -0x130(%rbp) movaps %xmm1, -0x120(%rbp) movaps %xmm2, -0x110(%rbp) movaps %xmm3, -0x100(%rbp) movaps %xmm4, -0xf0(%rbp) movaps %xmm5, -0xe0(%rbp) movaps %xmm6, -0xd0(%rbp) movaps %xmm7, -0xc0(%rbp) movq %r9, -0x138(%rbp) movq %r8, -0x140(%rbp) movq %rcx, -0x148(%rbp) movq %rdx, -0x150(%rbp) movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x64(%rbp) movq %rsi, -0x70(%rbp) cmpq $0x0, -0x70(%rbp) je 0x30183 movq -0x70(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x30183 leaq -0x90(%rbp), %rax leaq -0x160(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) leaq -0x60(%rbp), %rdi movq -0x70(%rbp), %rdx leaq -0x90(%rbp), %rcx movl $0x50, %esi callq 0x142b0 leaq -0x90(%rbp), %rax jmp 0x30187 movb $0x0, -0x60(%rbp) jmp 0x30189 movl -0x64(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x64(%rbp) cmpl $0x0, %eax jle 0x301d8 leaq -0xb0(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x14260 leaq -0xb0(%rbp), %rdx movl $0x1, %edi xorl %eax, %eax movl %eax, %esi callq 0x2ffa0 leaq -0x60(%rbp), %rsi leaq 0x3a977(%rip), %rdi # 0x6ab43 callq 0x30070 callq 0x30360 jmp 0x30189 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x301f3 addq $0x160, %rsp # imm = 0x160 popq %rbp retq callq 0x144c0 nopl (%rax,%rax)
skip: push rbp mov rbp, rsp sub rsp, 160h test al, al jz short loc_300F7 movaps [rbp+var_130], xmm0 movaps [rbp+var_120], xmm1 movaps [rbp+var_110], xmm2 movaps [rbp+var_100], xmm3 movaps [rbp+var_F0], xmm4 movaps [rbp+var_E0], xmm5 movaps [rbp+var_D0], xmm6 movaps [rbp+var_C0], xmm7 loc_300F7: mov [rbp+var_138], r9 mov [rbp+var_140], r8 mov [rbp+var_148], rcx mov [rbp+var_150], rdx mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_64], edi mov [rbp+var_70], rsi cmp [rbp+var_70], 0 jz short loc_30183 mov rax, [rbp+var_70] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_30183 lea rax, [rbp+var_90] lea rcx, [rbp+var_160] 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 lea rdi, [rbp+var_60] mov rdx, [rbp+var_70] lea rcx, [rbp+var_90] mov esi, 50h ; 'P' call _vsnprintf lea rax, [rbp+var_90] jmp short loc_30187 loc_30183: mov [rbp+var_60], 0 loc_30187: jmp short $+2 loc_30189: mov eax, [rbp+var_64] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_64], ecx cmp eax, 0 jle short loc_301D8 lea rdi, [rbp+var_B0] xor esi, esi mov edx, 18h call _memset lea rdx, [rbp+var_B0] mov edi, 1 xor eax, eax mov esi, eax call vemit_tap lea rsi, [rbp+var_60] lea rdi, aSkip; "skip" call emit_dir call emit_endl jmp short loc_30189 loc_301D8: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_301F3 add rsp, 160h pop rbp retn loc_301F3: call ___stack_chk_fail
unsigned long long skip(int a1, _BYTE *a2, ...) { int v2; // eax _BYTE v4[32]; // [rsp+B0h] [rbp-B0h] BYREF va_list va; // [rsp+D0h] [rbp-90h] BYREF _BYTE *v6; // [rsp+F0h] [rbp-70h] int v7; // [rsp+FCh] [rbp-64h] char v8[88]; // [rsp+100h] [rbp-60h] BYREF unsigned long long v9; // [rsp+158h] [rbp-8h] v9 = __readfsqword(0x28u); v7 = a1; v6 = a2; if ( a2 && *v6 ) { va_start(va, a2); vsnprintf(v8, 80LL, v6, va); } else { v8[0] = 0; } while ( 1 ) { v2 = v7--; if ( v2 <= 0 ) break; memset(v4, 0LL, 24LL); vemit_tap(1, 0LL, (long long)v4); emit_dir("skip", v8); emit_endl(); } return __readfsqword(0x28u); }
skip: PUSH RBP MOV RBP,RSP SUB RSP,0x160 TEST AL,AL JZ 0x001300f7 MOVAPS xmmword ptr [RBP + -0x130],XMM0 MOVAPS xmmword ptr [RBP + -0x120],XMM1 MOVAPS xmmword ptr [RBP + -0x110],XMM2 MOVAPS xmmword ptr [RBP + -0x100],XMM3 MOVAPS xmmword ptr [RBP + -0xf0],XMM4 MOVAPS xmmword ptr [RBP + -0xe0],XMM5 MOVAPS xmmword ptr [RBP + -0xd0],XMM6 MOVAPS xmmword ptr [RBP + -0xc0],XMM7 LAB_001300f7: MOV qword ptr [RBP + -0x138],R9 MOV qword ptr [RBP + -0x140],R8 MOV qword ptr [RBP + -0x148],RCX MOV qword ptr [RBP + -0x150],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x64],EDI MOV qword ptr [RBP + -0x70],RSI CMP qword ptr [RBP + -0x70],0x0 JZ 0x00130183 MOV RAX,qword ptr [RBP + -0x70] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00130183 LEA RAX,[RBP + -0x90] LEA RCX,[RBP + -0x160] 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 LEA RDI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0x70] LEA RCX,[RBP + -0x90] MOV ESI,0x50 CALL 0x001142b0 LEA RAX,[RBP + -0x90] JMP 0x00130187 LAB_00130183: MOV byte ptr [RBP + -0x60],0x0 LAB_00130187: JMP 0x00130189 LAB_00130189: MOV EAX,dword ptr [RBP + -0x64] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x64],ECX CMP EAX,0x0 JLE 0x001301d8 LEA RDI,[RBP + -0xb0] XOR ESI,ESI MOV EDX,0x18 CALL 0x00114260 LEA RDX,[RBP + -0xb0] MOV EDI,0x1 XOR EAX,EAX MOV ESI,EAX CALL 0x0012ffa0 LEA RSI,[RBP + -0x60] LEA RDI,[0x16ab43] CALL 0x00130070 CALL 0x00130360 JMP 0x00130189 LAB_001301d8: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001301f3 ADD RSP,0x160 POP RBP RET LAB_001301f3: CALL 0x001144c0
void skip(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { char in_AL; long in_FS_OFFSET; int1 local_168 [16]; int8 local_158; int8 local_150; int8 local_148; int8 local_140; int8 local_138; int8 local_128; int8 local_118; int8 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int1 local_b8 [32]; int4 local_98; int4 local_94; int1 *local_90; int1 *local_88; char *local_78; int local_6c; char local_68 [88]; long local_10; if (in_AL != '\0') { local_138 = param_1; local_128 = param_2; local_118 = param_3; local_108 = param_4; local_f8 = param_5; local_e8 = param_6; local_d8 = param_7; local_c8 = param_8; } local_10 = *(long *)(in_FS_OFFSET + 0x28); local_158 = param_11; local_150 = param_12; local_148 = param_13; local_140 = param_14; local_78 = param_10; local_6c = param_9; if ((param_10 == (char *)0x0) || (*param_10 == '\0')) { local_68[0] = '\0'; } else { local_88 = local_168; local_90 = &stack0x00000008; local_94 = 0x30; local_98 = 0x10; vsnprintf(local_68,0x50,param_10,&local_98); } while (0 < local_6c) { local_6c = local_6c + -1; memset(local_b8,0,0x18); vemit_tap(1,0,local_b8); emit_dir(&DAT_0016ab43); emit_endl(); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { local_6c = local_6c + -1; /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
53,022
google::protobuf::internal::ThreadSafeArena::Reset()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.cc
uint64_t ThreadSafeArena::Reset() { // Have to do this in a first pass, because some of the destructors might // refer to memory in other blocks. CleanupList(); // Discard all blocks except the special block (if present). size_t space_allocated = 0; auto mem = Free(&space_allocated); arena_stats_.RecordReset(); AllocationPolicy* policy = alloc_policy_.get(); if (policy) { auto saved_policy = *policy; if (alloc_policy_.is_user_owned_initial_block()) { space_allocated += mem.size; } else { GetDeallocator(alloc_policy_.get(), &space_allocated)(mem); mem.ptr = nullptr; mem.size = 0; } ArenaMetricsCollector* collector = saved_policy.metrics_collector; if (collector) collector->OnReset(space_allocated); InitializeWithPolicy(mem.ptr, mem.size, saved_policy); } else { GOOGLE_DCHECK(!alloc_policy_.should_record_allocs()); // Nullptr policy if (alloc_policy_.is_user_owned_initial_block()) { space_allocated += mem.size; InitializeFrom(mem.ptr, mem.size); } else { GetDeallocator(alloc_policy_.get(), &space_allocated)(mem); Init(); } } return space_allocated; }
O0
cpp
google::protobuf::internal::ThreadSafeArena::Reset(): subq $0x168, %rsp # imm = 0x168 movq %rdi, 0x160(%rsp) movq 0x160(%rsp), %rdi movq %rdi, 0x50(%rsp) callq 0x180740 movq 0x50(%rsp), %rdi movq $0x0, 0x158(%rsp) leaq 0x158(%rsp), %rsi callq 0x180760 movq 0x50(%rsp), %rdi movq %rax, 0x148(%rsp) movq %rdx, 0x150(%rsp) addq $0x20, %rdi callq 0x182090 movq 0x50(%rsp), %rdi addq $0x8, %rdi callq 0x181f80 movq %rax, 0x140(%rsp) cmpq $0x0, 0x140(%rsp) je 0x180a29 movq 0x140(%rsp), %rsi leaq 0x118(%rsp), %rdi movl $0x28, %edx callq 0x13390 movq 0x50(%rsp), %rdi addq $0x8, %rdi callq 0x181fa0 testb $0x1, %al jne 0x1808f0 jmp 0x18090a movq 0x150(%rsp), %rax addq 0x158(%rsp), %rax movq %rax, 0x158(%rsp) jmp 0x180985 movq 0x50(%rsp), %rdi addq $0x8, %rdi callq 0x181f80 movq %rax, %rsi leaq 0x108(%rsp), %rdi leaq 0x158(%rsp), %rdx callq 0x181fc0 movq 0x148(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x150(%rsp), %rax movq %rax, 0x100(%rsp) movq 0xf8(%rsp), %rsi movq 0x100(%rsp), %rdx leaq 0x108(%rsp), %rdi callq 0x182020 movq $0x0, 0x148(%rsp) movq $0x0, 0x150(%rsp) movq 0x138(%rsp), %rax movq %rax, 0xf0(%rsp) cmpq $0x0, 0xf0(%rsp) je 0x1809b6 movq 0xf0(%rsp), %rdi movq 0x158(%rsp), %rsi movq (%rdi), %rax callq *0x8(%rax) movq 0x148(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x150(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0xc8(%rsp), %rdi leaq 0x118(%rsp), %rsi movl $0x28, %edx callq 0x13390 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0xe8(%rsp), %rcx movq %rsp, %rax movq %rcx, 0x20(%rax) movups 0xc8(%rsp), %xmm0 movups 0xd8(%rsp), %xmm1 movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) callq 0x1801e0 jmp 0x180b9a jmp 0x180a2b xorl %eax, %eax testb $0x1, %al jne 0x180a36 jmp 0x180af5 movq 0x50(%rsp), %rdi addq $0x8, %rdi callq 0x1820a0 movb $0x0, 0x8f(%rsp) testb $0x1, %al jne 0x180a52 jmp 0x180aa8 leaq 0x75da7(%rip), %rdx # 0x1f6800 leaq 0x90(%rsp), %rdi movq %rdi, 0x30(%rsp) movl $0x3, %esi movl $0x18d, %ecx # imm = 0x18D callq 0x237e0 movq 0x30(%rsp), %rdi movb $0x1, 0x8f(%rsp) leaq 0x75eef(%rip), %rsi # 0x1f6978 callq 0x230a0 movq %rax, 0x38(%rsp) jmp 0x180a95 movq 0x38(%rsp), %rsi leaq 0x7b(%rsp), %rdi callq 0x23250 jmp 0x180aa6 jmp 0x180aa8 testb $0x1, 0x8f(%rsp) jne 0x180ab4 jmp 0x180ac1 leaq 0x90(%rsp), %rdi callq 0x23820 jmp 0x180a2b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) testb $0x1, 0x8f(%rsp) jne 0x180ae3 jmp 0x180af0 leaq 0x90(%rsp), %rdi callq 0x23820 jmp 0x180baa movq 0x50(%rsp), %rdi addq $0x8, %rdi callq 0x181fa0 testb $0x1, %al jne 0x180b09 jmp 0x180b3d movq 0x50(%rsp), %rdi movq 0x150(%rsp), %rax addq 0x158(%rsp), %rax movq %rax, 0x158(%rsp) movq 0x148(%rsp), %rsi movq 0x150(%rsp), %rdx callq 0x17fdb0 jmp 0x180b98 movq 0x50(%rsp), %rdi addq $0x8, %rdi callq 0x181f80 movq %rax, %rsi leaq 0x68(%rsp), %rdi leaq 0x158(%rsp), %rdx callq 0x181fc0 movq 0x148(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x150(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx leaq 0x68(%rsp), %rdi callq 0x182020 movq 0x50(%rsp), %rdi callq 0x17ffc0 jmp 0x180b9a movq 0x158(%rsp), %rax addq $0x168, %rsp # imm = 0x168 retq movq 0x80(%rsp), %rdi callq 0x13750 nopw (%rax,%rax)
_ZN6google8protobuf8internal15ThreadSafeArena5ResetEv: sub rsp, 168h mov [rsp+168h+var_8], rdi mov rdi, [rsp+168h+var_8]; this mov [rsp+168h+var_118], rdi call _ZN6google8protobuf8internal15ThreadSafeArena11CleanupListEv; google::protobuf::internal::ThreadSafeArena::CleanupList(void) mov rdi, [rsp+168h+var_118]; this mov [rsp+168h+var_10], 0 lea rsi, [rsp+168h+var_10]; unsigned __int64 * call _ZN6google8protobuf8internal15ThreadSafeArena4FreeEPm; google::protobuf::internal::ThreadSafeArena::Free(ulong *) mov rdi, [rsp+168h+var_118] mov [rsp+168h+var_20], rax mov [rsp+168h+var_18], rdx add rdi, 20h ; ' '; this call _ZN6google8protobuf8internal26ThreadSafeArenaStatsHandle11RecordResetEv; google::protobuf::internal::ThreadSafeArenaStatsHandle::RecordReset(void) mov rdi, [rsp+168h+var_118] add rdi, 8; this call _ZN6google8protobuf8internal25TaggedAllocationPolicyPtr3getEv; google::protobuf::internal::TaggedAllocationPolicyPtr::get(void) mov [rsp+168h+var_28], rax cmp [rsp+168h+var_28], 0 jz loc_180A29 mov rsi, [rsp+168h+var_28] lea rdi, [rsp+168h+var_50] mov edx, 28h ; '(' call _memcpy mov rdi, [rsp+168h+var_118] add rdi, 8; this call _ZNK6google8protobuf8internal25TaggedAllocationPolicyPtr27is_user_owned_initial_blockEv; google::protobuf::internal::TaggedAllocationPolicyPtr::is_user_owned_initial_block(void) test al, 1 jnz short loc_1808F0 jmp short loc_18090A loc_1808F0: mov rax, [rsp+168h+var_18] add rax, [rsp+168h+var_10] mov [rsp+168h+var_10], rax jmp short loc_180985 loc_18090A: mov rdi, [rsp+168h+var_118] add rdi, 8; this call _ZN6google8protobuf8internal25TaggedAllocationPolicyPtr3getEv; google::protobuf::internal::TaggedAllocationPolicyPtr::get(void) mov rsi, rax; google::protobuf::internal::AllocationPolicy * lea rdi, [rsp+168h+var_60]; this lea rdx, [rsp+168h+var_10]; unsigned __int64 * call _ZN6google8protobuf8internal14GetDeallocatorC2EPKNS1_16AllocationPolicyEPm; google::protobuf::internal::GetDeallocator::GetDeallocator(google::protobuf::internal::AllocationPolicy const*,ulong *) mov rax, [rsp+168h+var_20] mov [rsp+168h+var_70], rax mov rax, [rsp+168h+var_18] mov [rsp+168h+var_68], rax mov rsi, [rsp+168h+var_70] mov rdx, [rsp+168h+var_68] lea rdi, [rsp+168h+var_60] call _ZNK6google8protobuf8internal14GetDeallocatorclENS1_11SerialArena6MemoryE; google::protobuf::internal::GetDeallocator::operator()(google::protobuf::internal::SerialArena::Memory) mov [rsp+168h+var_20], 0 mov [rsp+168h+var_18], 0 loc_180985: mov rax, [rsp+168h+var_30] mov [rsp+168h+var_78], rax cmp [rsp+168h+var_78], 0 jz short loc_1809B6 mov rdi, [rsp+168h+var_78] mov rsi, [rsp+168h+var_10] mov rax, [rdi] call qword ptr [rax+8] loc_1809B6: mov rax, [rsp+168h+var_20] mov [rsp+168h+var_128], rax mov rax, [rsp+168h+var_18] mov [rsp+168h+var_120], rax lea rdi, [rsp+168h+var_A0] lea rsi, [rsp+168h+var_50] mov edx, 28h ; '(' call _memcpy mov rdi, [rsp+168h+var_118] mov rsi, [rsp+168h+var_128] mov rdx, [rsp+168h+var_120] mov rcx, [rsp+168h+var_80] mov rax, rsp mov [rax+20h], rcx movups xmm0, [rsp+168h+var_A0] movups xmm1, [rsp+168h+var_90] movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 call _ZN6google8protobuf8internal15ThreadSafeArena20InitializeWithPolicyEPvmNS1_16AllocationPolicyE; google::protobuf::internal::ThreadSafeArena::InitializeWithPolicy(void *,ulong,google::protobuf::internal::AllocationPolicy) jmp loc_180B9A loc_180A29: jmp short $+2 loc_180A2B: xor eax, eax test al, 1 jnz short loc_180A36 jmp loc_180AF5 loc_180A36: mov rdi, [rsp+168h+var_118] add rdi, 8; this call _ZNK6google8protobuf8internal25TaggedAllocationPolicyPtr20should_record_allocsEv; google::protobuf::internal::TaggedAllocationPolicyPtr::should_record_allocs(void) mov [rsp+168h+var_D9], 0 test al, 1 jnz short loc_180A52 jmp short loc_180AA8 loc_180A52: lea rdx, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+168h+var_D8] mov [rsp+168h+var_138], rdi mov esi, 3 mov ecx, 18Dh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+168h+var_138] mov [rsp+168h+var_D9], 1 lea rsi, aCheckFailedAll_1; "CHECK failed: !alloc_policy_.should_rec"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+168h+var_130], rax jmp short $+2 loc_180A95: mov rsi, [rsp+168h+var_130] lea rdi, [rsp+168h+var_ED] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_180AA6: jmp short $+2 loc_180AA8: test [rsp+168h+var_D9], 1 jnz short loc_180AB4 jmp short loc_180AC1 loc_180AB4: lea rdi, [rsp+168h+var_D8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_180AC1: jmp loc_180A2B mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax test [rsp+arg_87], 1 jnz short loc_180AE3 jmp short loc_180AF0 loc_180AE3: lea rdi, [rsp+arg_88]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_180AF0: jmp loc_180BAA loc_180AF5: mov rdi, [rsp+168h+var_118] add rdi, 8; this call _ZNK6google8protobuf8internal25TaggedAllocationPolicyPtr27is_user_owned_initial_blockEv; google::protobuf::internal::TaggedAllocationPolicyPtr::is_user_owned_initial_block(void) test al, 1 jnz short loc_180B09 jmp short loc_180B3D loc_180B09: mov rdi, [rsp+168h+var_118]; this mov rax, [rsp+168h+var_18] add rax, [rsp+168h+var_10] mov [rsp+168h+var_10], rax mov rsi, [rsp+168h+var_20]; void * mov rdx, [rsp+168h+var_18]; unsigned __int64 call _ZN6google8protobuf8internal15ThreadSafeArena14InitializeFromEPvm; google::protobuf::internal::ThreadSafeArena::InitializeFrom(void *,ulong) jmp short loc_180B98 loc_180B3D: mov rdi, [rsp+168h+var_118] add rdi, 8; this call _ZN6google8protobuf8internal25TaggedAllocationPolicyPtr3getEv; google::protobuf::internal::TaggedAllocationPolicyPtr::get(void) mov rsi, rax; google::protobuf::internal::AllocationPolicy * lea rdi, [rsp+168h+var_100]; this lea rdx, [rsp+168h+var_10]; unsigned __int64 * call _ZN6google8protobuf8internal14GetDeallocatorC2EPKNS1_16AllocationPolicyEPm; google::protobuf::internal::GetDeallocator::GetDeallocator(google::protobuf::internal::AllocationPolicy const*,ulong *) mov rax, [rsp+168h+var_20] mov [rsp+168h+var_110], rax mov rax, [rsp+168h+var_18] mov [rsp+168h+var_108], rax mov rsi, [rsp+168h+var_110] mov rdx, [rsp+168h+var_108] lea rdi, [rsp+168h+var_100] call _ZNK6google8protobuf8internal14GetDeallocatorclENS1_11SerialArena6MemoryE; google::protobuf::internal::GetDeallocator::operator()(google::protobuf::internal::SerialArena::Memory) mov rdi, [rsp+168h+var_118]; this call _ZN6google8protobuf8internal15ThreadSafeArena4InitEv; google::protobuf::internal::ThreadSafeArena::Init(void) loc_180B98: jmp short $+2 loc_180B9A: mov rax, [rsp+168h+var_10] add rsp, 168h retn loc_180BAA: mov rdi, [rsp+arg_78] call __Unwind_Resume
unsigned long long google::protobuf::internal::ThreadSafeArena::Reset( google::protobuf::internal::ThreadSafeArena *this) { unsigned long long v1; // rdx const google::protobuf::internal::AllocationPolicy *v2; // rax long long v3; // r8 long long v4; // r9 const google::protobuf::internal::AllocationPolicy *v5; // rax void *v7; // [rsp+40h] [rbp-128h] unsigned long long v8; // [rsp+48h] [rbp-120h] _BYTE v9[19]; // [rsp+68h] [rbp-100h] BYREF char v10; // [rsp+C8h] [rbp-A0h] BYREF long long v11; // [rsp+D0h] [rbp-98h] long long v12; // [rsp+D8h] [rbp-90h] long long v13; // [rsp+E0h] [rbp-88h] google::protobuf::internal::ArenaMetricsCollector *v14; // [rsp+E8h] [rbp-80h] long long v15; // [rsp+F0h] [rbp-78h] void *v16; // [rsp+F8h] [rbp-70h] unsigned long long v17; // [rsp+100h] [rbp-68h] _BYTE v18[16]; // [rsp+108h] [rbp-60h] BYREF _BYTE v19[32]; // [rsp+118h] [rbp-50h] BYREF long long v20; // [rsp+138h] [rbp-30h] long long v21; // [rsp+140h] [rbp-28h] void *v22; // [rsp+148h] [rbp-20h] unsigned long long v23; // [rsp+150h] [rbp-18h] unsigned long long v24[2]; // [rsp+158h] [rbp-10h] BYREF v24[1] = (unsigned long long)this; google::protobuf::internal::ThreadSafeArena::CleanupList(this); v24[0] = 0LL; v22 = (void *)google::protobuf::internal::ThreadSafeArena::Free(this, v24); v23 = v1; google::protobuf::internal::ThreadSafeArenaStatsHandle::RecordReset((google::protobuf::internal::ThreadSafeArena *)((char *)this + 32)); v21 = google::protobuf::internal::TaggedAllocationPolicyPtr::get((google::protobuf::internal::ThreadSafeArena *)((char *)this + 8)); if ( v21 ) { memcpy(v19, v21, 40LL); if ( (google::protobuf::internal::TaggedAllocationPolicyPtr::is_user_owned_initial_block((google::protobuf::internal::ThreadSafeArena *)((char *)this + 8)) & 1) != 0 ) { v24[0] += v23; } else { v2 = (const google::protobuf::internal::AllocationPolicy *)google::protobuf::internal::TaggedAllocationPolicyPtr::get((google::protobuf::internal::ThreadSafeArena *)((char *)this + 8)); google::protobuf::internal::GetDeallocator::GetDeallocator( (google::protobuf::internal::GetDeallocator *)v18, v2, v24); v16 = v22; v17 = v23; google::protobuf::internal::GetDeallocator::operator()(v18, v22, v23); v22 = 0LL; v23 = 0LL; } v15 = v20; if ( v20 ) (*(void ( **)(long long, unsigned long long))(*(_QWORD *)v15 + 8LL))(v15, v24[0]); v7 = v22; v8 = v23; memcpy(&v10, v19, 40LL); google::protobuf::internal::ThreadSafeArena::InitializeWithPolicy( (long long)this, v7, v8, (long long)v14, v3, v4, v10, v11, v12, v13, v14); } else if ( (google::protobuf::internal::TaggedAllocationPolicyPtr::is_user_owned_initial_block((google::protobuf::internal::ThreadSafeArena *)((char *)this + 8)) & 1) != 0 ) { v24[0] += v23; google::protobuf::internal::ThreadSafeArena::InitializeFrom(this, v22, v23); } else { v5 = (const google::protobuf::internal::AllocationPolicy *)google::protobuf::internal::TaggedAllocationPolicyPtr::get((google::protobuf::internal::ThreadSafeArena *)((char *)this + 8)); google::protobuf::internal::GetDeallocator::GetDeallocator( (google::protobuf::internal::GetDeallocator *)v9, v5, v24); google::protobuf::internal::GetDeallocator::operator()(v9, v22, v23); google::protobuf::internal::ThreadSafeArena::Init(this); } return v24[0]; }
Mutable: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV dword ptr [RSP + 0xc],ESI MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0xc] CALL 0x00180860 ADD RSP,0x18 RET
/* google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::Mutable(int) */ void __thiscall google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::Mutable (RepeatedPtrField<google::protobuf::DescriptorProto> *this,int param_1) { internal::RepeatedPtrFieldBase:: Mutable<google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::TypeHandler> ((RepeatedPtrFieldBase *)this,param_1); return; }
53,023
google::protobuf::MessageOptions::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void MessageOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { auto* const _this = static_cast<MessageOptions*>(&to_msg); auto& from = static_cast<const MessageOptions&>(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MessageOptions) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_); cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x0000000fu) { if (cached_has_bits & 0x00000001u) { _this->_impl_.message_set_wire_format_ = from._impl_.message_set_wire_format_; } if (cached_has_bits & 0x00000002u) { _this->_impl_.no_standard_descriptor_accessor_ = from._impl_.no_standard_descriptor_accessor_; } if (cached_has_bits & 0x00000004u) { _this->_impl_.deprecated_ = from._impl_.deprecated_; } if (cached_has_bits & 0x00000008u) { _this->_impl_.map_entry_ = from._impl_.map_entry_; } _this->_impl_._has_bits_[0] |= cached_has_bits; } _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_); _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); }
O0
cpp
google::protobuf::MessageOptions::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x98(%rsp) movq %rsi, 0x90(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x80(%rsp) xorl %eax, %eax testb $0x1, %al jne 0xc1882 jmp 0xc192c movq 0x80(%rsp), %rax movq 0x88(%rsp), %rcx movb $0x0, 0x47(%rsp) cmpq %rcx, %rax je 0xc189e jmp 0xc18ee leaq 0x12f08b(%rip), %rdx # 0x1f0930 leaq 0x48(%rsp), %rdi movq %rdi, 0x18(%rsp) movl $0x3, %esi movl $0x1d8e, %ecx # imm = 0x1D8E callq 0x237e0 movq 0x18(%rsp), %rdi movb $0x1, 0x47(%rsp) leaq 0x12f0cb(%rip), %rsi # 0x1f099a callq 0x230a0 movq %rax, 0x20(%rsp) jmp 0xc18db movq 0x20(%rsp), %rsi leaq 0x33(%rsp), %rdi callq 0x23250 jmp 0xc18ec jmp 0xc18ee testb $0x1, 0x47(%rsp) jne 0xc18f7 jmp 0xc1901 leaq 0x48(%rsp), %rdi callq 0x23820 jmp 0xc1877 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) testb $0x1, 0x47(%rsp) jne 0xc191d jmp 0xc1927 leaq 0x48(%rsp), %rdi callq 0x23820 jmp 0xc1ba6 movl $0x0, 0x2c(%rsp) movq 0x88(%rsp), %rdi addq $0x10, %rdi addq $0x20, %rdi movq 0x80(%rsp), %rsi addq $0x10, %rsi addq $0x20, %rsi callq 0xd6e60 movq 0x80(%rsp), %rax addq $0x10, %rax addq $0x18, %rax movq %rax, 0xf0(%rsp) movl $0x0, 0xec(%rsp) movq 0xf0(%rsp), %rax movslq 0xec(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %eax andl $0xf, %eax cmpl $0x0, %eax je 0xc1a74 movl 0x2c(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xc19c8 movq 0x80(%rsp), %rax movb 0x48(%rax), %cl movq 0x88(%rsp), %rax andb $0x1, %cl movb %cl, 0x48(%rax) movl 0x2c(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xc19ed movq 0x80(%rsp), %rax movb 0x49(%rax), %cl movq 0x88(%rsp), %rax andb $0x1, %cl movb %cl, 0x49(%rax) movl 0x2c(%rsp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0xc1a12 movq 0x80(%rsp), %rax movb 0x4a(%rax), %cl movq 0x88(%rsp), %rax andb $0x1, %cl movb %cl, 0x4a(%rax) movl 0x2c(%rsp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xc1a37 movq 0x80(%rsp), %rax movb 0x4b(%rax), %cl movq 0x88(%rsp), %rax andb $0x1, %cl movb %cl, 0x4b(%rax) movl 0x2c(%rsp), %edx movq 0x88(%rsp), %rax addq $0x10, %rax addq $0x18, %rax movq %rax, 0xe0(%rsp) movl $0x0, 0xdc(%rsp) movq 0xe0(%rsp), %rax movslq 0xdc(%rsp), %rcx orl (%rax,%rcx,4), %edx movl %edx, (%rax,%rcx,4) movq 0x88(%rsp), %rax addq $0x10, %rax movq %rax, 0x8(%rsp) callq 0x810d0 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x80(%rsp), %rdx addq $0x10, %rdx callq 0x198570 movq 0x88(%rsp), %rcx addq $0x8, %rcx movq 0x80(%rsp), %rax addq $0x8, %rax movq %rcx, 0xa8(%rsp) movq %rax, 0xa0(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x100(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xc1b9e movq 0xa0(%rsp), %rax movq %rax, 0xc0(%rsp) movq $0x0, 0xb8(%rsp) movq 0xc0(%rsp), %rax movq %rax, (%rsp) movq %rax, 0xd0(%rsp) movq 0xd0(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0xf8(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xc1b7d movq (%rsp), %rdi callq 0x9cd40 addq $0x8, %rax movq %rax, 0xc8(%rsp) jmp 0xc1b8c callq *0xb8(%rsp) movq %rax, 0xc8(%rsp) movq 0x10(%rsp), %rdi movq 0xc8(%rsp), %rsi callq 0xe0920 addq $0x108, %rsp # imm = 0x108 retq movq 0x38(%rsp), %rdi callq 0x13750
_ZN6google8protobuf14MessageOptions9MergeImplERNS0_7MessageERKS2_: sub rsp, 108h mov [rsp+108h+var_70], rdi mov [rsp+108h+var_78], rsi mov rax, [rsp+108h+var_70] mov [rsp+108h+var_80], rax mov rax, [rsp+108h+var_78] mov [rsp+108h+var_88], rax loc_C1877: xor eax, eax test al, 1 jnz short loc_C1882 jmp loc_C192C loc_C1882: mov rax, [rsp+108h+var_88] mov rcx, [rsp+108h+var_80] mov [rsp+108h+var_C1], 0 cmp rax, rcx jz short loc_C189E jmp short loc_C18EE loc_C189E: lea rdx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+108h+var_C0] mov [rsp+108h+var_F0], rdi mov esi, 3 mov ecx, 1D8Eh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+108h+var_F0] mov [rsp+108h+var_C1], 1 lea rsi, aCheckFailedFro; "CHECK failed: (&from) != (_this): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+108h+var_E8], rax jmp short $+2 loc_C18DB: mov rsi, [rsp+108h+var_E8] lea rdi, [rsp+108h+var_D5] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_C18EC: jmp short $+2 loc_C18EE: test [rsp+108h+var_C1], 1 jnz short loc_C18F7 jmp short loc_C1901 loc_C18F7: lea rdi, [rsp+108h+var_C0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_C1901: jmp loc_C1877 mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax test [rsp+arg_3F], 1 jnz short loc_C191D jmp short loc_C1927 loc_C191D: lea rdi, [rsp+arg_40]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_C1927: jmp loc_C1BA6 loc_C192C: mov [rsp+108h+var_DC], 0 mov rdi, [rsp+108h+var_80] add rdi, 10h add rdi, 20h ; ' '; this mov rsi, [rsp+108h+var_88] add rsi, 10h add rsi, 20h ; ' ' call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE9MergeFromERKS3_; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::MergeFrom(google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption> const&) mov rax, [rsp+108h+var_88] add rax, 10h add rax, 18h mov [rsp+108h+var_18], rax mov [rsp+108h+var_1C], 0 mov rax, [rsp+108h+var_18] movsxd rcx, [rsp+108h+var_1C] mov eax, [rax+rcx*4] mov [rsp+108h+var_DC], eax mov eax, [rsp+108h+var_DC] and eax, 0Fh cmp eax, 0 jz loc_C1A74 mov eax, [rsp+108h+var_DC] and eax, 1 cmp eax, 0 jz short loc_C19C8 mov rax, [rsp+108h+var_88] mov cl, [rax+48h] mov rax, [rsp+108h+var_80] and cl, 1 mov [rax+48h], cl loc_C19C8: mov eax, [rsp+108h+var_DC] and eax, 2 cmp eax, 0 jz short loc_C19ED mov rax, [rsp+108h+var_88] mov cl, [rax+49h] mov rax, [rsp+108h+var_80] and cl, 1 mov [rax+49h], cl loc_C19ED: mov eax, [rsp+108h+var_DC] and eax, 4 cmp eax, 0 jz short loc_C1A12 mov rax, [rsp+108h+var_88] mov cl, [rax+4Ah] mov rax, [rsp+108h+var_80] and cl, 1 mov [rax+4Ah], cl loc_C1A12: mov eax, [rsp+108h+var_DC] and eax, 8 cmp eax, 0 jz short loc_C1A37 mov rax, [rsp+108h+var_88] mov cl, [rax+4Bh] mov rax, [rsp+108h+var_80] and cl, 1 mov [rax+4Bh], cl loc_C1A37: mov edx, [rsp+108h+var_DC] mov rax, [rsp+108h+var_80] add rax, 10h add rax, 18h mov [rsp+108h+var_28], rax mov [rsp+108h+var_2C], 0 mov rax, [rsp+108h+var_28] movsxd rcx, [rsp+108h+var_2C] or edx, [rax+rcx*4] mov [rax+rcx*4], edx loc_C1A74: mov rax, [rsp+108h+var_80] add rax, 10h mov [rsp+108h+var_100], rax call _ZN6google8protobuf14MessageOptions25internal_default_instanceEv; google::protobuf::MessageOptions::internal_default_instance(void) mov rdi, [rsp+108h+var_100]; this mov rsi, rax; google::protobuf::MessageLite * mov rdx, [rsp+108h+var_88] add rdx, 10h; google::protobuf::internal::ExtensionSet * call _ZN6google8protobuf8internal12ExtensionSet9MergeFromEPKNS0_11MessageLiteERKS2_; google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*,google::protobuf::internal::ExtensionSet const&) mov rcx, [rsp+108h+var_80] add rcx, 8 mov rax, [rsp+108h+var_88] add rax, 8 mov [rsp+108h+var_60], rcx mov [rsp+108h+var_68], rax mov rax, [rsp+108h+var_60] mov [rsp+108h+var_F8], rax mov rax, [rsp+108h+var_68] mov [rsp+108h+var_58], rax mov rax, [rsp+108h+var_58] mov [rsp+108h+var_8], rax mov rax, [rsp+108h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz loc_C1B9E mov rax, [rsp+108h+var_68] mov [rsp+108h+var_48], rax mov [rsp+108h+var_50], 0 mov rax, [rsp+108h+var_48] mov [rsp+108h+var_108], rax mov [rsp+108h+var_38], rax mov rax, [rsp+108h+var_38] mov [rsp+108h+var_10], rax mov rax, [rsp+108h+var_10] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_C1B7D mov rdi, [rsp+108h+var_108] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov qword ptr [rsp+108h+var_40], rax jmp short loc_C1B8C loc_C1B7D: call [rsp+108h+var_50] mov qword ptr [rsp+108h+var_40], rax loc_C1B8C: mov rdi, [rsp+108h+var_F8]; void * mov rsi, qword ptr [rsp+108h+var_40]; int call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&) loc_C1B9E: add rsp, 108h retn loc_C1BA6: mov rdi, [rsp+arg_30] call __Unwind_Resume
long long google::protobuf::MessageOptions::MergeImpl( google::protobuf::MessageOptions *this, google::protobuf::Message *a2, const google::protobuf::Message *a3) { google::protobuf::MessageOptions *v3; // rdi void ( ***v4)(google::protobuf::MessageOptions *__hidden); // rax long long result; // rax int v6; // [rsp+2Ch] [rbp-DCh] _QWORD *v8; // [rsp+A0h] [rbp-68h] int v9[2]; // [rsp+C8h] [rbp-40h] v3 = (google::protobuf::MessageOptions *)((char *)this + 48); google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::MergeFrom( (char *)this + 48, (char *)a2 + 48, a3); v6 = *((_DWORD *)a2 + 10); if ( (v6 & 0xF) != 0 ) { if ( (v6 & 1) != 0 ) *((_BYTE *)this + 72) = *((_BYTE *)a2 + 72) & 1; if ( (v6 & 2) != 0 ) *((_BYTE *)this + 73) = *((_BYTE *)a2 + 73) & 1; if ( (v6 & 4) != 0 ) *((_BYTE *)this + 74) = *((_BYTE *)a2 + 74) & 1; if ( (v6 & 8) != 0 ) *((_BYTE *)this + 75) = *((_BYTE *)a2 + 75) & 1; *((_DWORD *)this + 10) |= v6; } v4 = google::protobuf::MessageOptions::internal_default_instance(v3); google::protobuf::internal::ExtensionSet::MergeFrom( (google::protobuf::MessageOptions *)((char *)this + 16), (const google::protobuf::MessageLite *)v4, (google::protobuf::Message *)((char *)a2 + 16)); v8 = (_QWORD *)((char *)a2 + 8); result = *((_QWORD *)a2 + 1) & 1LL; if ( result ) { if ( (*v8 & 1LL) != 0 ) *(_QWORD *)v9 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(v8) + 8; else v9[0] = ((long long ( *)(char *))dword_0)((char *)this + 16); return google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>( (char *)this + 8, v9[0]); } return result; }
MergeImpl: SUB RSP,0x108 MOV qword ptr [RSP + 0x98],RDI MOV qword ptr [RSP + 0x90],RSI MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x80],RAX LAB_001c1877: XOR EAX,EAX TEST AL,0x1 JNZ 0x001c1882 JMP 0x001c192c LAB_001c1882: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x88] MOV byte ptr [RSP + 0x47],0x0 CMP RAX,RCX JZ 0x001c189e JMP 0x001c18ee LAB_001c189e: LEA RDX,[0x2f0930] LEA RDI,[RSP + 0x48] MOV qword ptr [RSP + 0x18],RDI MOV ESI,0x3 MOV ECX,0x1d8e CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x18] MOV byte ptr [RSP + 0x47],0x1 LAB_001c18c8: LEA RSI,[0x2f099a] CALL 0x001230a0 MOV qword ptr [RSP + 0x20],RAX JMP 0x001c18db LAB_001c18db: MOV RSI,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0x33] CALL 0x00123250 LAB_001c18ea: JMP 0x001c18ec LAB_001c18ec: JMP 0x001c18ee LAB_001c18ee: TEST byte ptr [RSP + 0x47],0x1 JNZ 0x001c18f7 JMP 0x001c1901 LAB_001c18f7: LEA RDI,[RSP + 0x48] CALL 0x00123820 LAB_001c1901: JMP 0x001c1877 LAB_001c192c: MOV dword ptr [RSP + 0x2c],0x0 MOV RDI,qword ptr [RSP + 0x88] ADD RDI,0x10 ADD RDI,0x20 MOV RSI,qword ptr [RSP + 0x80] ADD RSI,0x10 ADD RSI,0x20 CALL 0x001d6e60 MOV RAX,qword ptr [RSP + 0x80] ADD RAX,0x10 ADD RAX,0x18 MOV qword ptr [RSP + 0xf0],RAX MOV dword ptr [RSP + 0xec],0x0 MOV RAX,qword ptr [RSP + 0xf0] MOVSXD RCX,dword ptr [RSP + 0xec] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x2c] AND EAX,0xf CMP EAX,0x0 JZ 0x001c1a74 MOV EAX,dword ptr [RSP + 0x2c] AND EAX,0x1 CMP EAX,0x0 JZ 0x001c19c8 MOV RAX,qword ptr [RSP + 0x80] MOV CL,byte ptr [RAX + 0x48] MOV RAX,qword ptr [RSP + 0x88] AND CL,0x1 MOV byte ptr [RAX + 0x48],CL LAB_001c19c8: MOV EAX,dword ptr [RSP + 0x2c] AND EAX,0x2 CMP EAX,0x0 JZ 0x001c19ed MOV RAX,qword ptr [RSP + 0x80] MOV CL,byte ptr [RAX + 0x49] MOV RAX,qword ptr [RSP + 0x88] AND CL,0x1 MOV byte ptr [RAX + 0x49],CL LAB_001c19ed: MOV EAX,dword ptr [RSP + 0x2c] AND EAX,0x4 CMP EAX,0x0 JZ 0x001c1a12 MOV RAX,qword ptr [RSP + 0x80] MOV CL,byte ptr [RAX + 0x4a] MOV RAX,qword ptr [RSP + 0x88] AND CL,0x1 MOV byte ptr [RAX + 0x4a],CL LAB_001c1a12: MOV EAX,dword ptr [RSP + 0x2c] AND EAX,0x8 CMP EAX,0x0 JZ 0x001c1a37 MOV RAX,qword ptr [RSP + 0x80] MOV CL,byte ptr [RAX + 0x4b] MOV RAX,qword ptr [RSP + 0x88] AND CL,0x1 MOV byte ptr [RAX + 0x4b],CL LAB_001c1a37: MOV EDX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x88] ADD RAX,0x10 ADD RAX,0x18 MOV qword ptr [RSP + 0xe0],RAX MOV dword ptr [RSP + 0xdc],0x0 MOV RAX,qword ptr [RSP + 0xe0] MOVSXD RCX,dword ptr [RSP + 0xdc] OR EDX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RAX + RCX*0x4],EDX LAB_001c1a74: MOV RAX,qword ptr [RSP + 0x88] ADD RAX,0x10 MOV qword ptr [RSP + 0x8],RAX CALL 0x001810d0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x80] ADD RDX,0x10 CALL 0x00298570 MOV RCX,qword ptr [RSP + 0x88] ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x80] ADD RAX,0x8 MOV qword ptr [RSP + 0xa8],RCX MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001c1b9e MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xc0],RAX MOV qword ptr [RSP + 0xb8],0x0 MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0xf8] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001c1b7d MOV RDI,qword ptr [RSP] CALL 0x0019cd40 ADD RAX,0x8 MOV qword ptr [RSP + 0xc8],RAX JMP 0x001c1b8c LAB_001c1b7d: CALL qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0xc8],RAX LAB_001c1b8c: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0xc8] CALL 0x001e0920 LAB_001c1b9e: ADD RSP,0x108 RET
/* WARNING: Removing unreachable block (ram,0x001c1882) */ /* WARNING: Removing unreachable block (ram,0x001c189e) */ /* WARNING: Removing unreachable block (ram,0x001c189c) */ /* WARNING: Removing unreachable block (ram,0x001c18ee) */ /* WARNING: Removing unreachable block (ram,0x001c18f7) */ /* WARNING: Removing unreachable block (ram,0x001c18f5) */ /* WARNING: Removing unreachable block (ram,0x001c1901) */ /* google::protobuf::MessageOptions::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&) */ void google::protobuf::MessageOptions::MergeImpl(Message *param_1,Message *param_2) { uint uVar1; MessageLite *pMVar2; InternalMetadata *this; UnknownFieldSet *local_40; RepeatedPtrField<google::protobuf::UninterpretedOption>::MergeFrom ((RepeatedPtrField<google::protobuf::UninterpretedOption> *)(param_1 + 0x30), (RepeatedPtrField *)(param_2 + 0x30)); uVar1 = *(uint *)(param_2 + 0x28); if ((uVar1 & 0xf) != 0) { if ((uVar1 & 1) != 0) { param_1[0x48] = (Message)((byte)param_2[0x48] & 1); } if ((uVar1 & 2) != 0) { param_1[0x49] = (Message)((byte)param_2[0x49] & 1); } if ((uVar1 & 4) != 0) { param_1[0x4a] = (Message)((byte)param_2[0x4a] & 1); } if ((uVar1 & 8) != 0) { param_1[0x4b] = (Message)((byte)param_2[0x4b] & 1); } *(uint *)(param_1 + 0x28) = uVar1 | *(uint *)(param_1 + 0x28); } pMVar2 = (MessageLite *)internal_default_instance(); internal::ExtensionSet::MergeFrom ((ExtensionSet *)(param_1 + 0x10),pMVar2,(ExtensionSet *)(param_2 + 0x10)); this = (InternalMetadata *)(param_2 + 8); if ((*(ulong *)this & 1) != 0) { if ((*(ulong *)this & 1) == 0) { local_40 = (UnknownFieldSet *)(*(code *)0x0)(); } else { local_40 = (UnknownFieldSet *) internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> (this); local_40 = (UnknownFieldSet *)((Container *)local_40 + 8); } internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(param_1 + 8),local_40); } return; }
53,024
VSmileJoy::RunCycles(int)
sp1187[P]veesem/src/core/vsmile/vsmile_joy.cc
void VSmileJoy::RunCycles(int cycles) { if (!tx_busy_) { if (idle_timer_.Tick(cycles)) { QueueTx(0x55); } } if (tx_starting_) { if (tx_start_timer_.Tick(cycles)) { tx_starting_ = false; StartTx(); } } if (!rts_ && !cts_ && !tx_starting_ && !tx_busy_) { // Waiting if (rts_timeout_timer_.Tick(cycles)) { assert(tx_buffer_read_ != tx_buffer_write_); assert(!tx_busy_); joy_send_.SetRts(true); rts_ = true; if (joy_active_) { current_ = {}; current_updated_ = false; probe_history_[0] = 0; probe_history_[1] = 0; idle_timer_.Reset(); } joy_active_ = false; // Reset send buffer tx_buffer_read_ = 0; tx_buffer_write_ = 0; tx_starting_ = false; QueueTx(0x55); } } if (joy_active_ && current_updated_) { QueueJoyUpdates(); } }
O0
cpp
VSmileJoy::RunCycles(int): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) testb $0x1, 0x4e(%rax) jne 0x10663 movq -0x20(%rbp), %rdi addq $0x20, %rdi movl -0xc(%rbp), %esi callq 0x110c0 testb $0x1, %al jne 0x10653 jmp 0x10661 movq -0x20(%rbp), %rdi movl $0x55, %esi callq 0x107e0 jmp 0x10663 movq -0x20(%rbp), %rax testb $0x1, 0x50(%rax) je 0x10692 movq -0x20(%rbp), %rdi addq $0x28, %rdi movl -0xc(%rbp), %esi callq 0x11110 testb $0x1, %al jne 0x10683 jmp 0x10690 movq -0x20(%rbp), %rdi movb $0x0, 0x50(%rdi) callq 0x108e0 jmp 0x10692 movq -0x20(%rbp), %rax testb $0x1, 0x4d(%rax) jne 0x107bc movq -0x20(%rbp), %rax testb $0x1, 0x4c(%rax) jne 0x107bc movq -0x20(%rbp), %rax testb $0x1, 0x50(%rax) jne 0x107bc movq -0x20(%rbp), %rax testb $0x1, 0x4e(%rax) jne 0x107bc movq -0x20(%rbp), %rdi addq $0x24, %rdi movl -0xc(%rbp), %esi callq 0x11160 testb $0x1, %al jne 0x106e3 jmp 0x107ba movq -0x20(%rbp), %rcx movl 0x40(%rcx), %eax cmpl 0x3c(%rcx), %eax je 0x106f1 jmp 0x10710 leaq 0xe2261(%rip), %rdi # 0xf2959 leaq 0xe227e(%rip), %rsi # 0xf297d movl $0x30, %edx leaq 0xe2290(%rip), %rcx # 0xf299b callq 0x71b0 movq -0x20(%rbp), %rax movb 0x4e(%rax), %al xorb $-0x1, %al testb $0x1, %al jne 0x1071f jmp 0x10721 jmp 0x10740 leaq 0xe2292(%rip), %rdi # 0xf29ba leaq 0xe224e(%rip), %rsi # 0xf297d movl $0x31, %edx leaq 0xe2260(%rip), %rcx # 0xf299b callq 0x71b0 movq -0x20(%rbp), %rax movq (%rax), %rdi movq (%rdi), %rax movl $0x1, %esi callq *0x10(%rax) movq -0x20(%rbp), %rax movb $0x1, 0x4d(%rax) testb $0x1, 0x4f(%rax) je 0x10796 leaq -0x18(%rbp), %rdi callq 0xeb70 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq %rax, 0x8(%rdi) movb -0x10(%rbp), %al movb %al, 0x10(%rdi) movb $0x0, 0x51(%rdi) movl $0x0, 0x44(%rdi) movl $0x0, 0x48(%rdi) addq $0x20, %rdi callq 0x11060 movq -0x20(%rbp), %rdi movb $0x0, 0x4f(%rdi) movl $0x0, 0x40(%rdi) movl $0x0, 0x3c(%rdi) movb $0x0, 0x50(%rdi) movl $0x55, %esi callq 0x107e0 jmp 0x107bc movq -0x20(%rbp), %rax testb $0x1, 0x4f(%rax) je 0x107d9 movq -0x20(%rbp), %rax testb $0x1, 0x51(%rax) je 0x107d9 movq -0x20(%rbp), %rdi callq 0x109a0 addq $0x20, %rsp popq %rbp retq nop
_ZN9VSmileJoy9RunCyclesEi: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov [rbp+var_20], rax test byte ptr [rax+4Eh], 1 jnz short loc_10663 mov rdi, [rbp+var_20] add rdi, 20h ; ' ' mov esi, [rbp+var_C] call _ZN11SimpleClockILi27000000ELi1EE4TickEi; SimpleClock<27000000,1>::Tick(int) test al, 1 jnz short loc_10653 jmp short loc_10661 loc_10653: mov rdi, [rbp+var_20]; this mov esi, 55h ; 'U'; unsigned __int8 call _ZN9VSmileJoy7QueueTxEh; VSmileJoy::QueueTx(uchar) loc_10661: jmp short $+2 loc_10663: mov rax, [rbp+var_20] test byte ptr [rax+50h], 1 jz short loc_10692 mov rdi, [rbp+var_20] add rdi, 28h ; '(' mov esi, [rbp+var_C] call _ZN11SimpleClockILi97200ELi1EE4TickEi; SimpleClock<97200,1>::Tick(int) test al, 1 jnz short loc_10683 jmp short loc_10690 loc_10683: mov rdi, [rbp+var_20]; this mov byte ptr [rdi+50h], 0 call _ZN9VSmileJoy7StartTxEv; VSmileJoy::StartTx(void) loc_10690: jmp short $+2 loc_10692: mov rax, [rbp+var_20] test byte ptr [rax+4Dh], 1 jnz loc_107BC mov rax, [rbp+var_20] test byte ptr [rax+4Ch], 1 jnz loc_107BC mov rax, [rbp+var_20] test byte ptr [rax+50h], 1 jnz loc_107BC mov rax, [rbp+var_20] test byte ptr [rax+4Eh], 1 jnz loc_107BC mov rdi, [rbp+var_20] add rdi, 24h ; '$' mov esi, [rbp+var_C] call _ZN11SimpleClockILi13500000ELi1EE4TickEi; SimpleClock<13500000,1>::Tick(int) test al, 1 jnz short loc_106E3 jmp loc_107BA loc_106E3: mov rcx, [rbp+var_20] mov eax, [rcx+40h] cmp eax, [rcx+3Ch] jz short loc_106F1 jmp short loc_10710 loc_106F1: lea rdi, aTxBufferReadTx; "tx_buffer_read_ != tx_buffer_write_" lea rsi, aSrcCoreVsmileV; "src/core/vsmile/vsmile_joy.cc" mov edx, 30h ; '0' lea rcx, aVoidVsmilejoyR; "void VSmileJoy::RunCycles(int)" call ___assert_fail loc_10710: mov rax, [rbp+var_20] mov al, [rax+4Eh] xor al, 0FFh test al, 1 jnz short loc_1071F jmp short loc_10721 loc_1071F: jmp short loc_10740 loc_10721: lea rdi, aTxBusy; "!tx_busy_" lea rsi, aSrcCoreVsmileV; "src/core/vsmile/vsmile_joy.cc" mov edx, 31h ; '1' lea rcx, aVoidVsmilejoyR; "void VSmileJoy::RunCycles(int)" call ___assert_fail loc_10740: mov rax, [rbp+var_20] mov rdi, [rax] mov rax, [rdi] mov esi, 1 call qword ptr [rax+10h] mov rax, [rbp+var_20] mov byte ptr [rax+4Dh], 1 test byte ptr [rax+4Fh], 1 jz short loc_10796 lea rdi, [rbp+var_18]; this call _ZN9VSmileJoy8JoyInputC2Ev; VSmileJoy::JoyInput::JoyInput(void) mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov [rdi+8], rax mov al, [rbp+var_10] mov [rdi+10h], al mov byte ptr [rdi+51h], 0 mov dword ptr [rdi+44h], 0 mov dword ptr [rdi+48h], 0 add rdi, 20h ; ' ' call _ZN11SimpleClockILi27000000ELi1EE5ResetEv; SimpleClock<27000000,1>::Reset(void) loc_10796: mov rdi, [rbp+var_20]; this mov byte ptr [rdi+4Fh], 0 mov dword ptr [rdi+40h], 0 mov dword ptr [rdi+3Ch], 0 mov byte ptr [rdi+50h], 0 mov esi, 55h ; 'U'; unsigned __int8 call _ZN9VSmileJoy7QueueTxEh; VSmileJoy::QueueTx(uchar) loc_107BA: jmp short $+2 loc_107BC: mov rax, [rbp+var_20] test byte ptr [rax+4Fh], 1 jz short loc_107D9 mov rax, [rbp+var_20] test byte ptr [rax+51h], 1 jz short loc_107D9 mov rdi, [rbp+var_20]; this call _ZN9VSmileJoy15QueueJoyUpdatesEv; VSmileJoy::QueueJoyUpdates(void) loc_107D9: add rsp, 20h pop rbp retn
VSmileJoy * VSmileJoy::RunCycles(VSmileJoy *this, unsigned int a2) { VSmileJoy *result; // rax long long v3; // [rsp+8h] [rbp-18h] BYREF char v4; // [rsp+10h] [rbp-10h] unsigned int v5; // [rsp+14h] [rbp-Ch] VSmileJoy *v6; // [rsp+18h] [rbp-8h] v6 = this; v5 = a2; if ( (*((_BYTE *)this + 78) & 1) == 0 && (SimpleClock<27000000,1>::Tick((char *)this + 32, v5) & 1) != 0 ) VSmileJoy::QueueTx(this, 0x55u); if ( (*((_BYTE *)this + 80) & 1) != 0 && (SimpleClock<97200,1>::Tick((char *)this + 40, v5) & 1) != 0 ) { *((_BYTE *)this + 80) = 0; VSmileJoy::StartTx(this); } if ( (*((_BYTE *)this + 77) & 1) == 0 && (*((_BYTE *)this + 76) & 1) == 0 && (*((_BYTE *)this + 80) & 1) == 0 && (*((_BYTE *)this + 78) & 1) == 0 && (SimpleClock<13500000,1>::Tick((char *)this + 36, v5) & 1) != 0 ) { if ( *((_DWORD *)this + 16) == *((_DWORD *)this + 15) ) __assert_fail( "tx_buffer_read_ != tx_buffer_write_", "src/core/vsmile/vsmile_joy.cc", 48LL, "void VSmileJoy::RunCycles(int)"); if ( (*((_BYTE *)this + 78) & 1) != 0 ) __assert_fail("!tx_busy_", "src/core/vsmile/vsmile_joy.cc", 49LL, "void VSmileJoy::RunCycles(int)"); (*(void ( **)(_QWORD, long long))(**(_QWORD **)this + 16LL))(*(_QWORD *)this, 1LL); *((_BYTE *)this + 77) = 1; if ( (*((_BYTE *)this + 79) & 1) != 0 ) { VSmileJoy::JoyInput::JoyInput((VSmileJoy::JoyInput *)&v3); *((_QWORD *)this + 1) = v3; *((_BYTE *)this + 16) = v4; *((_BYTE *)this + 81) = 0; *((_DWORD *)this + 17) = 0; *((_DWORD *)this + 18) = 0; SimpleClock<27000000,1>::Reset((char *)this + 32); } *((_BYTE *)this + 79) = 0; *((_DWORD *)this + 16) = 0; *((_DWORD *)this + 15) = 0; *((_BYTE *)this + 80) = 0; VSmileJoy::QueueTx(this, 0x55u); } result = this; if ( (*((_BYTE *)this + 79) & 1) != 0 ) { result = this; if ( (*((_BYTE *)this + 81) & 1) != 0 ) return (VSmileJoy *)VSmileJoy::QueueJoyUpdates(this); } return result; }
RunCycles: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX TEST byte ptr [RAX + 0x4e],0x1 JNZ 0x00110663 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x20 MOV ESI,dword ptr [RBP + -0xc] CALL 0x001110c0 TEST AL,0x1 JNZ 0x00110653 JMP 0x00110661 LAB_00110653: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x55 CALL 0x001107e0 LAB_00110661: JMP 0x00110663 LAB_00110663: MOV RAX,qword ptr [RBP + -0x20] TEST byte ptr [RAX + 0x50],0x1 JZ 0x00110692 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x28 MOV ESI,dword ptr [RBP + -0xc] CALL 0x00111110 TEST AL,0x1 JNZ 0x00110683 JMP 0x00110690 LAB_00110683: MOV RDI,qword ptr [RBP + -0x20] MOV byte ptr [RDI + 0x50],0x0 CALL 0x001108e0 LAB_00110690: JMP 0x00110692 LAB_00110692: MOV RAX,qword ptr [RBP + -0x20] TEST byte ptr [RAX + 0x4d],0x1 JNZ 0x001107bc MOV RAX,qword ptr [RBP + -0x20] TEST byte ptr [RAX + 0x4c],0x1 JNZ 0x001107bc MOV RAX,qword ptr [RBP + -0x20] TEST byte ptr [RAX + 0x50],0x1 JNZ 0x001107bc MOV RAX,qword ptr [RBP + -0x20] TEST byte ptr [RAX + 0x4e],0x1 JNZ 0x001107bc MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x24 MOV ESI,dword ptr [RBP + -0xc] CALL 0x00111160 TEST AL,0x1 JNZ 0x001106e3 JMP 0x001107ba LAB_001106e3: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RCX + 0x40] CMP EAX,dword ptr [RCX + 0x3c] JZ 0x001106f1 JMP 0x00110710 LAB_001106f1: LEA RDI,[0x1f2959] LEA RSI,[0x1f297d] MOV EDX,0x30 LEA RCX,[0x1f299b] CALL 0x001071b0 LAB_00110710: MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x4e] XOR AL,0xff TEST AL,0x1 JNZ 0x0011071f JMP 0x00110721 LAB_0011071f: JMP 0x00110740 LAB_00110721: LEA RDI,[0x1f29ba] LEA RSI,[0x1f297d] MOV EDX,0x31 LEA RCX,[0x1f299b] CALL 0x001071b0 LAB_00110740: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RDI] MOV ESI,0x1 CALL qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x4d],0x1 TEST byte ptr [RAX + 0x4f],0x1 JZ 0x00110796 LEA RDI,[RBP + -0x18] CALL 0x0010eb70 MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RDI + 0x8],RAX MOV AL,byte ptr [RBP + -0x10] MOV byte ptr [RDI + 0x10],AL MOV byte ptr [RDI + 0x51],0x0 MOV dword ptr [RDI + 0x44],0x0 MOV dword ptr [RDI + 0x48],0x0 ADD RDI,0x20 CALL 0x00111060 LAB_00110796: MOV RDI,qword ptr [RBP + -0x20] MOV byte ptr [RDI + 0x4f],0x0 MOV dword ptr [RDI + 0x40],0x0 MOV dword ptr [RDI + 0x3c],0x0 MOV byte ptr [RDI + 0x50],0x0 MOV ESI,0x55 CALL 0x001107e0 LAB_001107ba: JMP 0x001107bc LAB_001107bc: MOV RAX,qword ptr [RBP + -0x20] TEST byte ptr [RAX + 0x4f],0x1 JZ 0x001107d9 MOV RAX,qword ptr [RBP + -0x20] TEST byte ptr [RAX + 0x51],0x1 JZ 0x001107d9 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001109a0 LAB_001107d9: ADD RSP,0x20 POP RBP RET
/* VSmileJoy::RunCycles(int) */ void __thiscall VSmileJoy::RunCycles(VSmileJoy *this,int param_1) { ulong uVar1; int8 local_20; VSmileJoy local_18; int local_14; VSmileJoy *local_10; local_14 = param_1; local_10 = this; if ((((byte)this[0x4e] & 1) == 0) && (uVar1 = SimpleClock<27000000,1>::Tick((SimpleClock<27000000,1> *)(this + 0x20),param_1), (uVar1 & 1) != 0)) { QueueTx(this,'U'); } if ((((byte)this[0x50] & 1) != 0) && (uVar1 = SimpleClock<97200,1>::Tick((SimpleClock<97200,1> *)(this + 0x28),local_14), (uVar1 & 1) != 0)) { this[0x50] = (VSmileJoy)0x0; StartTx(this); } if ((((((byte)this[0x4d] & 1) == 0) && (((byte)this[0x4c] & 1) == 0)) && (((byte)this[0x50] & 1) == 0)) && ((((byte)this[0x4e] & 1) == 0 && (uVar1 = SimpleClock<13500000,1>::Tick((SimpleClock<13500000,1> *)(this + 0x24),local_14), (uVar1 & 1) != 0)))) { if (*(int *)(this + 0x40) == *(int *)(this + 0x3c)) { /* WARNING: Subroutine does not return */ __assert_fail("tx_buffer_read_ != tx_buffer_write_","src/core/vsmile/vsmile_joy.cc",0x30, "void VSmileJoy::RunCycles(int)"); } if ((((byte)this[0x4e] ^ 0xff) & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("!tx_busy_","src/core/vsmile/vsmile_joy.cc",0x31, "void VSmileJoy::RunCycles(int)"); } (**(code **)(**(long **)this + 0x10))(*(long **)this,1); this[0x4d] = (VSmileJoy)0x1; if (((byte)this[0x4f] & 1) != 0) { JoyInput::JoyInput((JoyInput *)&local_20); *(int8 *)(this + 8) = local_20; this[0x10] = local_18; this[0x51] = (VSmileJoy)0x0; *(int4 *)(this + 0x44) = 0; *(int4 *)(this + 0x48) = 0; SimpleClock<27000000,1>::Reset((SimpleClock<27000000,1> *)(this + 0x20)); } this[0x4f] = (VSmileJoy)0x0; *(int4 *)(this + 0x40) = 0; *(int4 *)(this + 0x3c) = 0; this[0x50] = (VSmileJoy)0x0; QueueTx(this,'U'); } if ((((byte)this[0x4f] & 1) != 0) && (((byte)this[0x51] & 1) != 0)) { QueueJoyUpdates(this); } return; }
53,025
mi_ft_parserecord
eloqsql/storage/myisam/ft_update.c
FT_WORD *_mi_ft_parserecord(MI_INFO *info, uint keynr, const uchar *record, MEM_ROOT *mem_root) { TREE ptree; MYSQL_FTPARSER_PARAM *param; DBUG_ENTER("_mi_ft_parserecord"); if (! (param= ftparser_call_initializer(info, keynr, 0))) DBUG_RETURN(NULL); bzero((char*) &ptree, sizeof(ptree)); param->flags= 0; if (_mi_ft_parse(&ptree, info, keynr, record, param, mem_root)) DBUG_RETURN(NULL); DBUG_RETURN(ft_linearize(&ptree, mem_root)); }
O0
c
mi_ft_parserecord: pushq %rbp movq %rsp, %rbp subq $0x2d0, %rsp # imm = 0x2D0 movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi xorl %edx, %edx callq 0xa7810 movq %rax, -0x2c8(%rbp) cmpq $0x0, %rax jne 0xa7e01 jmp 0xa7df7 movq $0x0, -0x8(%rbp) jmp 0xa7e6b leaq -0x2c0(%rbp), %rdi xorl %esi, %esi movl $0x298, %edx # imm = 0x298 callq 0x2a2a0 movq -0x2c8(%rbp), %rax movl $0x0, 0x34(%rax) movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movq -0x2c8(%rbp), %r8 movq -0x28(%rbp), %r9 leaq -0x2c0(%rbp), %rdi callq 0xa7ce0 cmpl $0x0, %eax je 0xa7e55 jmp 0xa7e4b movq $0x0, -0x8(%rbp) jmp 0xa7e6b jmp 0xa7e57 movq -0x28(%rbp), %rsi leaq -0x2c0(%rbp), %rdi callq 0xa6a10 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x2d0, %rsp # imm = 0x2D0 popq %rbp retq nopl (%rax,%rax)
_mi_ft_parserecord: push rbp mov rbp, rsp sub rsp, 2D0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov esi, [rbp+var_14] xor edx, edx call ftparser_call_initializer mov [rbp+var_2C8], rax cmp rax, 0 jnz short loc_A7E01 jmp short $+2 loc_A7DF7: mov [rbp+var_8], 0 jmp short loc_A7E6B loc_A7E01: lea rdi, [rbp+var_2C0] xor esi, esi mov edx, 298h call _memset mov rax, [rbp+var_2C8] mov dword ptr [rax+34h], 0 mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov r8, [rbp+var_2C8] mov r9, [rbp+var_28] lea rdi, [rbp+var_2C0] call _mi_ft_parse cmp eax, 0 jz short loc_A7E55 jmp short $+2 loc_A7E4B: mov [rbp+var_8], 0 jmp short loc_A7E6B loc_A7E55: jmp short $+2 loc_A7E57: mov rsi, [rbp+var_28] lea rdi, [rbp+var_2C0] call ft_linearize mov [rbp+var_8], rax loc_A7E6B: mov rax, [rbp+var_8] add rsp, 2D0h pop rbp retn
long long mi_ft_parserecord(_QWORD *a1, unsigned int a2, long long a3, long long a4) { unsigned long long v5; // [rsp+8h] [rbp-2C8h] _QWORD v6[83]; // [rsp+10h] [rbp-2C0h] BYREF long long v7; // [rsp+2A8h] [rbp-28h] long long v8; // [rsp+2B0h] [rbp-20h] unsigned int v9; // [rsp+2BCh] [rbp-14h] _QWORD *v10; // [rsp+2C0h] [rbp-10h] v10 = a1; v9 = a2; v8 = a3; v7 = a4; v5 = ftparser_call_initializer(a1, a2, 0); if ( !v5 ) return 0LL; memset(v6, 0LL, sizeof(v6)); *(_DWORD *)(v5 + 52) = 0; if ( (unsigned int)mi_ft_parse(v6, (long long)v10, v9, v8, (_QWORD *)v5, v7) ) return 0LL; else return ft_linearize((long long)v6, v7); }
_mi_ft_parserecord: PUSH RBP MOV RBP,RSP SUB RSP,0x2d0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] XOR EDX,EDX CALL 0x001a7810 MOV qword ptr [RBP + -0x2c8],RAX CMP RAX,0x0 JNZ 0x001a7e01 JMP 0x001a7df7 LAB_001a7df7: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a7e6b LAB_001a7e01: LEA RDI,[RBP + -0x2c0] XOR ESI,ESI MOV EDX,0x298 CALL 0x0012a2a0 MOV RAX,qword ptr [RBP + -0x2c8] MOV dword ptr [RAX + 0x34],0x0 MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x2c8] MOV R9,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x2c0] CALL 0x001a7ce0 CMP EAX,0x0 JZ 0x001a7e55 JMP 0x001a7e4b LAB_001a7e4b: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a7e6b LAB_001a7e55: JMP 0x001a7e57 LAB_001a7e57: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x2c0] CALL 0x001a6a10 MOV qword ptr [RBP + -0x8],RAX LAB_001a7e6b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x2d0 POP RBP RET
int8 _mi_ft_parserecord(int8 param_1,int4 param_2,int8 param_3,int8 param_4) { int iVar1; long lVar2; int1 local_2c8 [664]; int8 local_30; int8 local_28; int4 local_1c; int8 local_18; int8 local_10; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; lVar2 = ftparser_call_initializer(param_1,param_2,0); if (lVar2 == 0) { local_10 = 0; } else { memset(local_2c8,0,0x298); *(int4 *)(lVar2 + 0x34) = 0; iVar1 = _mi_ft_parse(local_2c8,local_18,local_1c,local_28,lVar2,local_30); if (iVar1 == 0) { local_10 = ft_linearize(local_2c8,local_30); } else { local_10 = 0; } } return local_10; }
53,026
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_index_for_index(unsigned long, moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*&) const
angrymouse[P]emittra/include/concurrentqueue.h
inline size_t get_block_index_index_for_index(index_t index, BlockIndexHeader*& localBlockIndex) const { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX debug::DebugLock lock(mutex); #endif index &= ~static_cast<index_t>(BLOCK_SIZE - 1); localBlockIndex = blockIndex.load(std::memory_order_acquire); auto tail = localBlockIndex->tail.load(std::memory_order_acquire); auto tailBase = localBlockIndex->index[tail]->key.load(std::memory_order_relaxed); assert(tailBase != INVALID_BLOCK_BASE); // Note: Must use division instead of shift because the index may wrap around, causing a negative // offset, whose negativity we want to preserve auto offset = static_cast<size_t>(static_cast<typename std::make_signed<index_t>::type>(index - tailBase) / static_cast<typename std::make_signed<index_t>::type>(BLOCK_SIZE)); size_t idx = (tail + offset) & (localBlockIndex->capacity - 1); assert(localBlockIndex->index[idx]->key.load(std::memory_order_relaxed) == index && localBlockIndex->index[idx]->value.load(std::memory_order_relaxed) != nullptr); return idx; }
O0
c
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_index_for_index(unsigned long, moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*&) const: subq $0x88, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rax andq $-0x20, %rax movq %rax, 0x48(%rsp) addq $0x60, %rdi movl $0x2, %esi callq 0x17d90 movq %rax, %rcx movq 0x40(%rsp), %rax movq %rcx, (%rax) movq 0x40(%rsp), %rax movq (%rax), %rax addq $0x8, %rax movq %rax, 0x80(%rsp) movl $0x2, 0x7c(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x10(%rsp) movl 0x7c(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x6420 movl %eax, 0x78(%rsp) movl 0x7c(%rsp), %eax movl %eax, 0x1c(%rsp) decl %eax subl $0x2, %eax jb 0x17fa8 jmp 0x17f8e movl 0x1c(%rsp), %eax subl $0x5, %eax je 0x17fb7 jmp 0x17f99 movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x70(%rsp) jmp 0x17fc4 movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x70(%rsp) jmp 0x17fc4 movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq 0x38(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x68(%rsp) movl $0x0, 0x64(%rsp) movq 0x68(%rsp), %rax movq %rax, (%rsp) movl 0x64(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x6420 movl %eax, 0x60(%rsp) movl 0x64(%rsp), %eax movl %eax, 0xc(%rsp) decl %eax subl $0x2, %eax jb 0x18035 jmp 0x1801c movl 0xc(%rsp), %eax subl $0x5, %eax je 0x18043 jmp 0x18027 movq (%rsp), %rax movq (%rax), %rax movq %rax, 0x58(%rsp) jmp 0x1804f movq (%rsp), %rax movq (%rax), %rax movq %rax, 0x58(%rsp) jmp 0x1804f movq (%rsp), %rax movq (%rax), %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x48(%rsp), %rax subq 0x30(%rsp), %rax movl $0x20, %ecx cqto idivq %rcx movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rax addq 0x28(%rsp), %rax movq 0x40(%rsp), %rcx movq (%rcx), %rcx movq (%rcx), %rcx subq $0x1, %rcx andq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x88, %rsp retq
_ZNK10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer31get_block_index_index_for_indexEmRPNS6_16BlockIndexHeaderE: sub rsp, 88h mov [rsp+88h+var_38], rdi mov [rsp+88h+var_40], rsi mov [rsp+88h+var_48], rdx mov rdi, [rsp+88h+var_38] mov rax, [rsp+88h+var_40] and rax, 0FFFFFFFFFFFFFFE0h mov [rsp+88h+var_40], rax add rdi, 60h ; '`' mov esi, 2 call _ZNKSt6atomicIPN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS0_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer16BlockIndexHeaderEE4loadESt12memory_order; std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader *>::load(std::memory_order) mov rcx, rax mov rax, [rsp+88h+var_48] mov [rax], rcx mov rax, [rsp+88h+var_48] mov rax, [rax] add rax, 8 mov [rsp+88h+var_8], rax mov [rsp+88h+var_C], 2 mov rax, [rsp+88h+var_8] mov [rsp+88h+var_78], rax mov edi, [rsp+88h+var_C] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+88h+var_10], eax mov eax, [rsp+88h+var_C] mov [rsp+88h+var_6C], eax dec eax sub eax, 2 jb short loc_17FA8 jmp short $+2 loc_17F8E: mov eax, [rsp+88h+var_6C] sub eax, 5 jz short loc_17FB7 jmp short $+2 loc_17F99: mov rax, [rsp+88h+var_78] mov rax, [rax] mov [rsp+88h+var_18], rax jmp short loc_17FC4 loc_17FA8: mov rax, [rsp+88h+var_78] mov rax, [rax] mov [rsp+88h+var_18], rax jmp short loc_17FC4 loc_17FB7: mov rax, [rsp+88h+var_78] mov rax, [rax] mov [rsp+88h+var_18], rax loc_17FC4: mov rax, [rsp+88h+var_18] mov [rsp+88h+var_50], rax mov rax, [rsp+88h+var_48] mov rax, [rax] mov rax, [rax+18h] mov rcx, [rsp+88h+var_50] mov rax, [rax+rcx*8] mov [rsp+88h+var_20], rax mov [rsp+88h+var_24], 0 mov rax, [rsp+88h+var_20] mov [rsp+88h+var_88], rax mov edi, [rsp+88h+var_24] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+88h+var_28], eax mov eax, [rsp+88h+var_24] mov [rsp+88h+var_7C], eax dec eax sub eax, 2 jb short loc_18035 jmp short $+2 loc_1801C: mov eax, [rsp+88h+var_7C] sub eax, 5 jz short loc_18043 jmp short $+2 loc_18027: mov rax, [rsp+88h+var_88] mov rax, [rax] mov [rsp+88h+var_30], rax jmp short loc_1804F loc_18035: mov rax, [rsp+88h+var_88] mov rax, [rax] mov [rsp+88h+var_30], rax jmp short loc_1804F loc_18043: mov rax, [rsp+88h+var_88] mov rax, [rax] mov [rsp+88h+var_30], rax loc_1804F: mov rax, [rsp+88h+var_30] mov [rsp+88h+var_58], rax mov rax, [rsp+88h+var_40] sub rax, [rsp+88h+var_58] mov ecx, 20h ; ' ' cqo idiv rcx mov [rsp+88h+var_60], rax mov rax, [rsp+88h+var_50] add rax, [rsp+88h+var_60] mov rcx, [rsp+88h+var_48] mov rcx, [rcx] mov rcx, [rcx] sub rcx, 1 and rax, rcx mov [rsp+88h+var_68], rax mov rax, [rsp+88h+var_68] add rsp, 88h retn
long long moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_index_for_index( long long a1, long long a2, long long a3) { _QWORD *v4; // [rsp+0h] [rbp-88h] long long *v5; // [rsp+10h] [rbp-78h] long long v7; // [rsp+70h] [rbp-18h] *(_QWORD *)a3 = std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader *>::load( a1 + 96, 2u); v5 = (long long *)(*(_QWORD *)a3 + 8LL); std::operator&(2u, 0xFFFF); v7 = *v5; v4 = *(_QWORD **)(*(_QWORD *)(*(_QWORD *)a3 + 24LL) + 8 * *v5); std::operator&(0, 0xFFFF); return (**(_QWORD **)a3 - 1LL) & ((long long)((a2 & 0xFFFFFFFFFFFFFFE0LL) - *v4) / 32 + v7); }
get_block_index_index_for_index: SUB RSP,0x88 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x48] AND RAX,-0x20 MOV qword ptr [RSP + 0x48],RAX ADD RDI,0x60 MOV ESI,0x2 CALL 0x00117d90 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX] ADD RAX,0x8 MOV qword ptr [RSP + 0x80],RAX MOV dword ptr [RSP + 0x7c],0x2 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x10],RAX MOV EDI,dword ptr [RSP + 0x7c] MOV ESI,0xffff CALL 0x00106420 MOV dword ptr [RSP + 0x78],EAX MOV EAX,dword ptr [RSP + 0x7c] MOV dword ptr [RSP + 0x1c],EAX DEC EAX SUB EAX,0x2 JC 0x00117fa8 JMP 0x00117f8e LAB_00117f8e: MOV EAX,dword ptr [RSP + 0x1c] SUB EAX,0x5 JZ 0x00117fb7 JMP 0x00117f99 LAB_00117f99: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x70],RAX JMP 0x00117fc4 LAB_00117fa8: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x70],RAX JMP 0x00117fc4 LAB_00117fb7: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x70],RAX LAB_00117fc4: MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x68],RAX MOV dword ptr [RSP + 0x64],0x0 MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP],RAX MOV EDI,dword ptr [RSP + 0x64] MOV ESI,0xffff CALL 0x00106420 MOV dword ptr [RSP + 0x60],EAX MOV EAX,dword ptr [RSP + 0x64] MOV dword ptr [RSP + 0xc],EAX DEC EAX SUB EAX,0x2 JC 0x00118035 JMP 0x0011801c LAB_0011801c: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x5 JZ 0x00118043 JMP 0x00118027 LAB_00118027: MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x58],RAX JMP 0x0011804f LAB_00118035: MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x58],RAX JMP 0x0011804f LAB_00118043: MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x58],RAX LAB_0011804f: MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x48] SUB RAX,qword ptr [RSP + 0x30] MOV ECX,0x20 CQO IDIV RCX MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x38] ADD RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX] SUB RCX,0x1 AND RAX,RCX MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x88 RET
/* WARNING: Removing unreachable block (ram,0x00118043) */ /* WARNING: Removing unreachable block (ram,0x00117f8c) */ /* WARNING: Removing unreachable block (ram,0x00117f97) */ /* WARNING: Removing unreachable block (ram,0x00117fb7) */ /* WARNING: Removing unreachable block (ram,0x00118035) */ /* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_index_for_index(unsigned long, moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*&) const */ ulong __thiscall moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::ImplicitProducer::get_block_index_index_for_index (ImplicitProducer *this,ulong param_1,BlockIndexHeader **param_2) { long lVar1; long *plVar2; BlockIndexHeader *pBVar3; pBVar3 = (BlockIndexHeader *) std:: atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*> ::load((atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*> *)(this + 0x60),2); *param_2 = pBVar3; pBVar3 = *param_2; std::operator&(2,0xffff); lVar1 = *(long *)(pBVar3 + 8); plVar2 = *(long **)(*(long *)(*param_2 + 0x18) + lVar1 * 8); std::operator&(0,0xffff); return lVar1 + (long)((param_1 & 0xffffffffffffffe0) - *plVar2) / 0x20 & *(long *)*param_2 - 1U; }
53,027
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_index_for_index(unsigned long, moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*&) const
angrymouse[P]emittra/include/concurrentqueue.h
inline size_t get_block_index_index_for_index(index_t index, BlockIndexHeader*& localBlockIndex) const { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX debug::DebugLock lock(mutex); #endif index &= ~static_cast<index_t>(BLOCK_SIZE - 1); localBlockIndex = blockIndex.load(std::memory_order_acquire); auto tail = localBlockIndex->tail.load(std::memory_order_acquire); auto tailBase = localBlockIndex->index[tail]->key.load(std::memory_order_relaxed); assert(tailBase != INVALID_BLOCK_BASE); // Note: Must use division instead of shift because the index may wrap around, causing a negative // offset, whose negativity we want to preserve auto offset = static_cast<size_t>(static_cast<typename std::make_signed<index_t>::type>(index - tailBase) / static_cast<typename std::make_signed<index_t>::type>(BLOCK_SIZE)); size_t idx = (tail + offset) & (localBlockIndex->capacity - 1); assert(localBlockIndex->index[idx]->key.load(std::memory_order_relaxed) == index && localBlockIndex->index[idx]->value.load(std::memory_order_relaxed) != nullptr); return idx; }
O2
c
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_index_for_index(unsigned long, moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*&) const: movq %rsi, %rax andq $-0x20, %rax movq 0x60(%rdi), %rcx movq %rcx, (%rdx) movq 0x8(%rcx), %rcx movq (%rdx), %rsi movq 0x18(%rsi), %rdx movq (%rdx,%rcx,8), %rdx movq (%rdx), %rdx subq %rdx, %rax pushq $0x20 popq %rdi cqto idivq %rdi addq %rcx, %rax movq (%rsi), %rcx decq %rcx andq %rcx, %rax retq
_ZNK10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer31get_block_index_index_for_indexEmRPNS6_16BlockIndexHeaderE: mov rax, rsi and rax, 0FFFFFFFFFFFFFFE0h mov rcx, [rdi+60h] mov [rdx], rcx mov rcx, [rcx+8] mov rsi, [rdx] mov rdx, [rsi+18h] mov rdx, [rdx+rcx*8] mov rdx, [rdx] sub rax, rdx push 20h ; ' ' pop rdi cqo idiv rdi add rax, rcx mov rcx, [rsi] dec rcx and rax, rcx retn
long long moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_index_for_index( long long a1, long long a2, long long a3) { long long v3; // rcx v3 = *(_QWORD *)(a1 + 96); *(_QWORD *)a3 = v3; return (**(_QWORD **)a3 - 1LL) & (*(_QWORD *)(v3 + 8) + (long long)((a2 & 0xFFFFFFFFFFFFFFE0LL) - **(_QWORD **)(*(_QWORD *)(*(_QWORD *)a3 + 24LL) + 8LL * *(_QWORD *)(v3 + 8))) / 32); }
get_block_index_index_for_index: MOV RAX,RSI AND RAX,-0x20 MOV RCX,qword ptr [RDI + 0x60] MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RCX + 0x8] MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RSI + 0x18] MOV RDX,qword ptr [RDX + RCX*0x8] MOV RDX,qword ptr [RDX] SUB RAX,RDX PUSH 0x20 POP RDI CQO IDIV RDI ADD RAX,RCX MOV RCX,qword ptr [RSI] DEC RCX AND RAX,RCX RET
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_index_for_index(unsigned long, moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*&) const */ ulong __thiscall moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::ImplicitProducer::get_block_index_index_for_index (ImplicitProducer *this,ulong param_1,BlockIndexHeader **param_2) { BlockIndexHeader *pBVar1; long lVar2; pBVar1 = *(BlockIndexHeader **)(this + 0x60); *param_2 = pBVar1; lVar2 = *(long *)(pBVar1 + 8); return (long)((param_1 & 0xffffffffffffffe0) - **(long **)(*(long *)(*param_2 + 0x18) + lVar2 * 8) ) / 0x20 + lVar2 & *(long *)*param_2 - 1U; }
53,028
test_conv_transpose_1d::vars[abi:cxx11]()
monkey531[P]llama/tests/test-backend-ops.cpp
std::string vars() override { return VARS_TO_STR5(ne_input, ne_kernel, s0, p0, d0); }
O2
cpp
test_conv_transpose_1d::vars[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx subq $0x220, %rsp # imm = 0x220 movq %rsi, %r14 movq %rdi, %rbx addq $0x38, %rsi leaq 0x200(%rsp), %r15 movq %r15, %rdi callq 0x18e53 leaq 0x11213(%rip), %rsi # 0x30dc8 leaq 0x100(%rsp), %rdi movq %r15, %rdx callq 0x1ca87 leaq 0x111ab(%rip), %rdx # 0x30d77 leaq 0x120(%rsp), %rdi leaq 0x100(%rsp), %rsi callq 0x1cff2 leaq 0x58(%r14), %rsi leaq 0xc0(%rsp), %rdi callq 0x18e53 leaq 0x11212(%rip), %rsi # 0x30e0b leaq 0xe0(%rsp), %rdi leaq 0xc0(%rsp), %rdx callq 0x1ca87 leaq 0x140(%rsp), %rdi leaq 0x120(%rsp), %rsi leaq 0xe0(%rsp), %rdx callq 0x1cf8b leaq 0x11145(%rip), %rdx # 0x30d77 leaq 0x160(%rsp), %rdi leaq 0x140(%rsp), %rsi callq 0x1cff2 leaq 0x78(%r14), %rsi leaq 0x80(%rsp), %rdi callq 0x18f03 leaq 0x1117b(%rip), %rsi # 0x30dda leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rdx callq 0x1ca87 leaq 0x180(%rsp), %rdi leaq 0x160(%rsp), %rsi leaq 0xa0(%rsp), %rdx callq 0x1cf8b leaq 0x110df(%rip), %rdx # 0x30d77 leaq 0x1a0(%rsp), %rdi leaq 0x180(%rsp), %rsi callq 0x1cff2 leaq 0x7c(%r14), %rsi leaq 0x40(%rsp), %rdi callq 0x18f03 leaq 0x11120(%rip), %rsi # 0x30de2 leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rdx callq 0x1ca87 leaq 0x1c0(%rsp), %rdi leaq 0x1a0(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x1cf8b leaq 0x11085(%rip), %rdx # 0x30d77 leaq 0x1e0(%rsp), %rdi leaq 0x1c0(%rsp), %rsi callq 0x1cff2 subq $-0x80, %r14 movq %rsp, %rdi movq %r14, %rsi callq 0x18f03 leaq 0x110f9(%rip), %rsi # 0x30e16 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x1ca87 leaq 0x1e0(%rsp), %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi callq 0x1cf8b leaq 0x20(%rsp), %rdi callq 0xf280 movq %rsp, %rdi callq 0xf280 leaq 0x1e0(%rsp), %rdi callq 0xf280 leaq 0x1c0(%rsp), %rdi callq 0xf280 leaq 0x60(%rsp), %rdi callq 0xf280 leaq 0x40(%rsp), %rdi callq 0xf280 leaq 0x1a0(%rsp), %rdi callq 0xf280 leaq 0x180(%rsp), %rdi callq 0xf280 leaq 0xa0(%rsp), %rdi callq 0xf280 leaq 0x80(%rsp), %rdi callq 0xf280 leaq 0x160(%rsp), %rdi callq 0xf280 leaq 0x140(%rsp), %rdi callq 0xf280 leaq 0xe0(%rsp), %rdi callq 0xf280 leaq 0xc0(%rsp), %rdi callq 0xf280 leaq 0x120(%rsp), %rdi callq 0xf280 leaq 0x100(%rsp), %rdi callq 0xf280 leaq 0x200(%rsp), %rdi callq 0xf280 movq %rbx, %rax addq $0x220, %rsp # imm = 0x220 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xf280 jmp 0x1fe30 movq %rax, %rbx movq %rsp, %rdi callq 0xf280 jmp 0x1fe3d movq %rax, %rbx leaq 0x1e0(%rsp), %rdi callq 0xf280 jmp 0x1fe4f movq %rax, %rbx leaq 0x1c0(%rsp), %rdi callq 0xf280 jmp 0x1fe61 movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0xf280 leaq 0x40(%rsp), %rdi callq 0xf280 leaq 0x1a0(%rsp), %rdi callq 0xf280 leaq 0x180(%rsp), %rdi callq 0xf280 leaq 0xa0(%rsp), %rdi callq 0xf280 leaq 0x80(%rsp), %rdi callq 0xf280 leaq 0x160(%rsp), %rdi callq 0xf280 leaq 0x140(%rsp), %rdi callq 0xf280 leaq 0xe0(%rsp), %rdi callq 0xf280 leaq 0xc0(%rsp), %rdi callq 0xf280 leaq 0x120(%rsp), %rdi callq 0xf280 leaq 0x100(%rsp), %rdi callq 0xf280 leaq 0x200(%rsp), %rdi callq 0xf280 movq %rbx, %rdi callq 0xfb30 movq %rax, %rbx jmp 0x1fe6b movq %rax, %rbx jmp 0x1fe75 movq %rax, %rbx jmp 0x1fe82 movq %rax, %rbx jmp 0x1fe8f movq %rax, %rbx jmp 0x1fe9c movq %rax, %rbx jmp 0x1fea9 movq %rax, %rbx jmp 0x1feb6 movq %rax, %rbx jmp 0x1fec3 movq %rax, %rbx jmp 0x1fed0 movq %rax, %rbx jmp 0x1fedd movq %rax, %rbx jmp 0x1feea movq %rax, %rbx jmp 0x1fef7 nop
_ZN22test_conv_transpose_1d4varsB5cxx11Ev: push r15 push r14 push rbx sub rsp, 220h mov r14, rsi mov rbx, rdi add rsi, 38h ; '8' lea r15, [rsp+238h+var_38] mov rdi, r15 call _ZL10var_to_strIlLm4EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt5arrayIT_XT0_EE; var_to_str<long,4ul>(std::array<long,4ul> const&) lea rsi, aNeInput; "ne_input=" lea rdi, [rsp+238h+var_138] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, asc_30D77; "," lea rdi, [rsp+238h+var_118] lea rsi, [rsp+238h+var_138] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, [r14+58h] lea rdi, [rsp+238h+var_178] call _ZL10var_to_strIlLm4EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt5arrayIT_XT0_EE; var_to_str<long,4ul>(std::array<long,4ul> const&) lea rsi, aNeKernel; "ne_kernel=" lea rdi, [rsp+238h+var_158] lea rdx, [rsp+238h+var_178] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+238h+var_F8] lea rsi, [rsp+238h+var_118] lea rdx, [rsp+238h+var_158] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_30D77; "," lea rdi, [rsp+238h+var_D8] lea rsi, [rsp+238h+var_F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, [r14+78h] lea rdi, [rsp+238h+var_1B8] call _ZL10var_to_strIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<int>(int const&) lea rsi, aS0; "s0=" lea rdi, [rsp+238h+var_198] lea rdx, [rsp+238h+var_1B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+238h+var_B8] lea rsi, [rsp+238h+var_D8] lea rdx, [rsp+238h+var_198] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_30D77; "," lea rdi, [rsp+238h+var_98] lea rsi, [rsp+238h+var_B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, [r14+7Ch] lea rdi, [rsp+238h+var_1F8] call _ZL10var_to_strIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<int>(int const&) lea rsi, aP0; "p0=" lea rdi, [rsp+238h+var_1D8] lea rdx, [rsp+238h+var_1F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+238h+var_78] lea rsi, [rsp+238h+var_98] lea rdx, [rsp+238h+var_1D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_30D77; "," lea rdi, [rsp+238h+var_58] lea rsi, [rsp+238h+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) sub r14, 0FFFFFFFFFFFFFF80h mov rdi, rsp mov rsi, r14 call _ZL10var_to_strIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<int>(int const&) lea rsi, aD0; "d0=" lea rdi, [rsp+238h+var_218] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rsi, [rsp+238h+var_58] lea rdx, [rsp+238h+var_218] mov rdi, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdi, [rsp+238h+var_218] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_1D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_1F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_198] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_1B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_158] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_178] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_138] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 220h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1FE30 mov rbx, rax loc_1FE30: mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1FE3D mov rbx, rax loc_1FE3D: lea rdi, [rsp+arg_1D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1FE4F mov rbx, rax loc_1FE4F: lea rdi, [rsp+arg_1B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1FE61 mov rbx, rax loc_1FE61: lea rdi, [rsp+arg_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FE6B: lea rdi, [rsp+arg_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FE75: lea rdi, [rsp+arg_198] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FE82: lea rdi, [rsp+arg_178] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FE8F: lea rdi, [rsp+arg_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FE9C: lea rdi, [rsp+arg_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FEA9: lea rdi, [rsp+arg_158] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FEB6: lea rdi, [rsp+arg_138] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FEC3: lea rdi, [rsp+arg_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FED0: lea rdi, [rsp+arg_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FEDD: lea rdi, [rsp+arg_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FEEA: lea rdi, [rsp+arg_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1FEF7: lea rdi, [rsp+arg_1F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume mov rbx, rax jmp loc_1FE6B mov rbx, rax jmp loc_1FE75 mov rbx, rax jmp loc_1FE82 mov rbx, rax jmp loc_1FE8F mov rbx, rax jmp loc_1FE9C mov rbx, rax jmp loc_1FEA9 mov rbx, rax jmp loc_1FEB6 mov rbx, rax jmp loc_1FEC3 mov rbx, rax jmp loc_1FED0 mov rbx, rax jmp short loc_1FEDD mov rbx, rax jmp short loc_1FEEA mov rbx, rax jmp short loc_1FEF7
long long test_conv_transpose_1d::vars[abi:cxx11](long long a1, int *a2) { _BYTE v3[32]; // [rsp+0h] [rbp-238h] BYREF _QWORD v4[4]; // [rsp+20h] [rbp-218h] BYREF _BYTE v5[32]; // [rsp+40h] [rbp-1F8h] BYREF _QWORD v6[4]; // [rsp+60h] [rbp-1D8h] BYREF _BYTE v7[32]; // [rsp+80h] [rbp-1B8h] BYREF _QWORD v8[4]; // [rsp+A0h] [rbp-198h] BYREF _BYTE v9[32]; // [rsp+C0h] [rbp-178h] BYREF _QWORD v10[4]; // [rsp+E0h] [rbp-158h] BYREF _BYTE v11[32]; // [rsp+100h] [rbp-138h] BYREF _QWORD v12[4]; // [rsp+120h] [rbp-118h] BYREF _BYTE v13[32]; // [rsp+140h] [rbp-F8h] BYREF _QWORD v14[4]; // [rsp+160h] [rbp-D8h] BYREF _BYTE v15[32]; // [rsp+180h] [rbp-B8h] BYREF _QWORD v16[4]; // [rsp+1A0h] [rbp-98h] BYREF _BYTE v17[32]; // [rsp+1C0h] [rbp-78h] BYREF _QWORD v18[4]; // [rsp+1E0h] [rbp-58h] BYREF _BYTE v19[56]; // [rsp+200h] [rbp-38h] BYREF var_to_str<long,4ul>((long long)v19, (long long)(a2 + 14)); std::operator+<char>((long long)v11, (long long)"ne_input=", (long long)v19); std::operator+<char>((long long)v12, (long long)v11, (long long)","); var_to_str<long,4ul>((long long)v9, (long long)(a2 + 22)); std::operator+<char>((long long)v10, (long long)"ne_kernel=", (long long)v9); std::operator+<char>((long long)v13, v12, v10); std::operator+<char>((long long)v14, (long long)v13, (long long)","); var_to_str<int>((std::__cxx11 *)v7, a2 + 30); std::operator+<char>((long long)v8, (long long)"s0=", (long long)v7); std::operator+<char>((long long)v15, v14, v8); std::operator+<char>((long long)v16, (long long)v15, (long long)","); var_to_str<int>((std::__cxx11 *)v5, a2 + 31); std::operator+<char>((long long)v6, (long long)"p0=", (long long)v5); std::operator+<char>((long long)v17, v16, v6); std::operator+<char>((long long)v18, (long long)v17, (long long)","); var_to_str<int>((std::__cxx11 *)v3, a2 + 32); std::operator+<char>((long long)v4, (long long)"d0=", (long long)v3); std::operator+<char>(a1, v18, v4); std::string::~string(v4); std::string::~string(v3); std::string::~string(v18); std::string::~string(v17); std::string::~string(v6); std::string::~string(v5); std::string::~string(v16); std::string::~string(v15); std::string::~string(v8); std::string::~string(v7); std::string::~string(v14); std::string::~string(v13); std::string::~string(v10); std::string::~string(v9); std::string::~string(v12); std::string::~string(v11); std::string::~string(v19); return a1; }
vars[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x220 MOV R14,RSI MOV RBX,RDI ADD RSI,0x38 LEA R15,[RSP + 0x200] MOV RDI,R15 CALL 0x00118e53 LAB_0011fbae: LEA RSI,[0x130dc8] LEA RDI,[RSP + 0x100] MOV RDX,R15 CALL 0x0011ca87 LAB_0011fbc5: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x120] LEA RSI,[RSP + 0x100] CALL 0x0011cff2 LEA RSI,[R14 + 0x58] LAB_0011fbe5: LEA RDI,[RSP + 0xc0] CALL 0x00118e53 LAB_0011fbf2: LEA RSI,[0x130e0b] LEA RDI,[RSP + 0xe0] LEA RDX,[RSP + 0xc0] CALL 0x0011ca87 LAB_0011fc0e: LEA RDI,[RSP + 0x140] LEA RSI,[RSP + 0x120] LEA RDX,[RSP + 0xe0] CALL 0x0011cf8b LAB_0011fc2b: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x160] LEA RSI,[RSP + 0x140] CALL 0x0011cff2 LEA RSI,[R14 + 0x78] LAB_0011fc4b: LEA RDI,[RSP + 0x80] CALL 0x00118f03 LAB_0011fc58: LEA RSI,[0x130dda] LEA RDI,[RSP + 0xa0] LEA RDX,[RSP + 0x80] CALL 0x0011ca87 LAB_0011fc74: LEA RDI,[RSP + 0x180] LEA RSI,[RSP + 0x160] LEA RDX,[RSP + 0xa0] CALL 0x0011cf8b LAB_0011fc91: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x1a0] LEA RSI,[RSP + 0x180] CALL 0x0011cff2 LEA RSI,[R14 + 0x7c] LAB_0011fcb1: LEA RDI,[RSP + 0x40] CALL 0x00118f03 LAB_0011fcbb: LEA RSI,[0x130de2] LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x40] CALL 0x0011ca87 LAB_0011fcd1: LEA RDI,[RSP + 0x1c0] LEA RSI,[RSP + 0x1a0] LEA RDX,[RSP + 0x60] CALL 0x0011cf8b LAB_0011fceb: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x1e0] LEA RSI,[RSP + 0x1c0] CALL 0x0011cff2 SUB R14,-0x80 LAB_0011fd0b: MOV RDI,RSP MOV RSI,R14 CALL 0x00118f03 LAB_0011fd16: LEA RSI,[0x130e16] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0011ca87 LAB_0011fd2a: LEA RSI,[RSP + 0x1e0] LEA RDX,[RSP + 0x20] MOV RDI,RBX CALL 0x0011cf8b LAB_0011fd3f: LEA RDI,[RSP + 0x20] CALL 0x0010f280 MOV RDI,RSP CALL 0x0010f280 LEA RDI,[RSP + 0x1e0] CALL 0x0010f280 LEA RDI,[RSP + 0x1c0] CALL 0x0010f280 LEA RDI,[RSP + 0x60] CALL 0x0010f280 LEA RDI,[RSP + 0x40] CALL 0x0010f280 LEA RDI,[RSP + 0x1a0] CALL 0x0010f280 LEA RDI,[RSP + 0x180] CALL 0x0010f280 LEA RDI,[RSP + 0xa0] CALL 0x0010f280 LEA RDI,[RSP + 0x80] CALL 0x0010f280 LEA RDI,[RSP + 0x160] CALL 0x0010f280 LEA RDI,[RSP + 0x140] CALL 0x0010f280 LEA RDI,[RSP + 0xe0] CALL 0x0010f280 LEA RDI,[RSP + 0xc0] CALL 0x0010f280 LEA RDI,[RSP + 0x120] CALL 0x0010f280 LEA RDI,[RSP + 0x100] CALL 0x0010f280 LEA RDI,[RSP + 0x200] CALL 0x0010f280 MOV RAX,RBX ADD RSP,0x220 POP RBX POP R14 POP R15 RET
/* test_conv_transpose_1d::vars[abi:cxx11]() */ test_conv_transpose_1d * __thiscall test_conv_transpose_1d::vars_abi_cxx11_(test_conv_transpose_1d *this) { string asStack_238 [32]; string local_218 [32]; string local_1f8 [32]; string local_1d8 [32]; string local_1b8 [32]; string local_198 [32]; string local_178 [32]; string local_158 [32]; string local_138 [32]; string local_118 [32]; string local_f8 [32]; string local_d8 [32]; string local_b8 [32]; string local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [32]; var_to_str<long,4ul>(local_38); /* try { // try from 0011fbae to 0011fbc4 has its CatchHandler @ 0011ff5e */ std::operator+((char *)local_138,(string *)"ne_input="); /* try { // try from 0011fbc5 to 0011fbe0 has its CatchHandler @ 0011ff59 */ std::operator+(local_118,(char *)local_138); /* try { // try from 0011fbe5 to 0011fbf1 has its CatchHandler @ 0011ff54 */ var_to_str<long,4ul>(local_178); /* try { // try from 0011fbf2 to 0011fc0d has its CatchHandler @ 0011ff4c */ std::operator+((char *)local_158,(string *)"ne_kernel="); /* try { // try from 0011fc0e to 0011fc2a has its CatchHandler @ 0011ff44 */ std::operator+(local_f8,local_118); /* try { // try from 0011fc2b to 0011fc46 has its CatchHandler @ 0011ff3c */ std::operator+(local_d8,(char *)local_f8); /* try { // try from 0011fc4b to 0011fc57 has its CatchHandler @ 0011ff34 */ var_to_str<int>((int *)local_1b8); /* try { // try from 0011fc58 to 0011fc73 has its CatchHandler @ 0011ff2c */ std::operator+((char *)local_198,(string *)&DAT_00130dda); /* try { // try from 0011fc74 to 0011fc90 has its CatchHandler @ 0011ff24 */ std::operator+(local_b8,local_d8); /* try { // try from 0011fc91 to 0011fcac has its CatchHandler @ 0011ff1c */ std::operator+(local_98,(char *)local_b8); /* try { // try from 0011fcb1 to 0011fcba has its CatchHandler @ 0011ff14 */ var_to_str<int>((int *)local_1f8); /* try { // try from 0011fcbb to 0011fcd0 has its CatchHandler @ 0011ff0c */ std::operator+((char *)local_1d8,(string *)&DAT_00130de2); /* try { // try from 0011fcd1 to 0011fcea has its CatchHandler @ 0011fe5e */ std::operator+(local_78,local_98); /* try { // try from 0011fceb to 0011fd06 has its CatchHandler @ 0011fe4c */ std::operator+(local_58,(char *)local_78); /* try { // try from 0011fd0b to 0011fd15 has its CatchHandler @ 0011fe3a */ var_to_str<int>((int *)asStack_238); /* try { // try from 0011fd16 to 0011fd29 has its CatchHandler @ 0011fe2d */ std::operator+((char *)local_218,(string *)&DAT_00130e16); /* try { // try from 0011fd2a to 0011fd3e has its CatchHandler @ 0011fe1e */ std::operator+((string *)this,local_58); std::__cxx11::string::~string(local_218); std::__cxx11::string::~string(asStack_238); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_1d8); std::__cxx11::string::~string(local_1f8); std::__cxx11::string::~string(local_98); std::__cxx11::string::~string(local_b8); std::__cxx11::string::~string(local_198); std::__cxx11::string::~string(local_1b8); std::__cxx11::string::~string(local_d8); std::__cxx11::string::~string(local_f8); std::__cxx11::string::~string(local_158); std::__cxx11::string::~string(local_178); std::__cxx11::string::~string(local_118); std::__cxx11::string::~string(local_138); std::__cxx11::string::~string(local_38); return this; }
53,029
init_state_maps
eloqsql/mysys/charset.c
static my_bool init_state_maps(struct charset_info_st *cs) { uint i; uchar *state_map; uchar *ident_map; if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME)))) return 1; cs->ident_map= ident_map= state_map + 256; /* Fill state_map with states to get a faster parser */ for (i=0; i < 256 ; i++) { if (my_isalpha(cs,i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isdigit(cs,i)) state_map[i]=(uchar) MY_LEX_NUMBER_IDENT; else if (is_multi_byte_ident(cs, i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isspace(cs,i)) state_map[i]=(uchar) MY_LEX_SKIP; else state_map[i]=(uchar) MY_LEX_CHAR; } state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL; state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT; state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON; state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR; state_map[0]=(uchar) MY_LEX_EOL; state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE; state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT; state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT; state_map[(uchar)'@']= (uchar) MY_LEX_USER_END; state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER; state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER; state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT; state_map[(uchar)',']= (uchar) MY_LEX_COMMA; state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER; /* Create a second map to make it faster to find identifiers */ for (i=0; i < 256 ; i++) { ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT || state_map[i] == MY_LEX_NUMBER_IDENT); } /* Special handling of hex and binary strings */ state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX; state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN; state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR; return 0; }
O3
c
init_state_maps: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movl $0x200, %edi # imm = 0x200 movl $0x10, %esi callq 0x456b0 movq %rax, 0x80(%r14) testq %rax, %rax je 0x49ad6 movq %rax, %rbx movq %rax, %r13 addq $0x100, %r13 # imm = 0x100 movq %r13, 0x88(%r14) xorl %r15d, %r15d leaq -0x29(%rbp), %r12 movq 0x40(%r14), %rax movzbl 0x1(%rax,%r15), %eax testb $0x3, %al je 0x499e2 movb $0x2, (%rbx,%r15) jmp 0x49a21 testb $0x4, %al jne 0x49a1c movb %r15b, -0x29(%rbp) movq 0xb8(%r14), %rax movq %r14, %rdi movq %r12, %rsi leaq -0x28(%rbp), %rdx callq *0xc0(%rax) addl $0x64, %eax cmpl $-0x6, %eax jae 0x499db movq 0x40(%r14), %rax testb $0x8, 0x1(%rax,%r15) jne 0x49a2f movb $0x1, (%rbx,%r15) jmp 0x49a21 movb $0xe, (%rbx,%r15) incq %r15 cmpq $0x100, %r15 # imm = 0x100 jne 0x499cd jmp 0x49a36 movb $0x1a, (%rbx,%r15) jmp 0x49a21 movw $0x1b02, 0x5f(%rbx) # imm = 0x1B02 movb $0x8, 0x3e(%rbx) movb $0x11, 0x7c(%rbx) movw $0xa11, 0x26(%rbx) # imm = 0xA11 movl $0x8091617, 0x3a(%rbx) # imm = 0x8091617 movb $0x12, (%rbx) movb $0x13, 0x5c(%rbx) movb $0x15, 0x2a(%rbx) movl $0x20b2108, 0x21(%rbx) # imm = 0x20B2108 movl $0x14102224, 0x2c(%rbx) # imm = 0x14102224 movw $0x1823, 0x3f(%rbx) # imm = 0x1823 movq $-0x100, %rax movdqa 0x37201(%rip), %xmm0 # 0x80c80 movdqa 0x37209(%rip), %xmm1 # 0x80c90 movdqa 0x37211(%rip), %xmm2 # 0x80ca0 movdqu (%r13,%rax), %xmm3 movdqa %xmm3, %xmm4 pcmpeqb %xmm0, %xmm4 pcmpeqb %xmm1, %xmm3 por %xmm4, %xmm3 pand %xmm2, %xmm3 movdqu %xmm3, 0x100(%r13,%rax) addq $0x10, %rax jne 0x49a8f movb $0x1e, %al movb %al, 0x58(%rbx) movb %al, 0x78(%rbx) movb $0x1f, %al movb %al, 0x42(%rbx) movb %al, 0x62(%rbx) movb $0x20, %al movb %al, 0x4e(%rbx) movb %al, 0x6e(%rbx) xorl %eax, %eax jmp 0x49ad8 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_state_maps: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi mov edi, 200h mov esi, 10h call my_once_alloc mov [r14+80h], rax test rax, rax jz loc_49AD6 mov rbx, rax mov r13, rax add r13, 100h mov [r14+88h], r13 xor r15d, r15d lea r12, [rbp+var_29] loc_499CD: mov rax, [r14+40h] movzx eax, byte ptr [rax+r15+1] test al, 3 jz short loc_499E2 loc_499DB: mov byte ptr [rbx+r15], 2 jmp short loc_49A21 loc_499E2: test al, 4 jnz short loc_49A1C mov [rbp+var_29], r15b mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r12 lea rdx, [rbp+var_28] call qword ptr [rax+0C0h] add eax, 64h ; 'd' cmp eax, 0FFFFFFFAh jnb short loc_499DB mov rax, [r14+40h] test byte ptr [rax+r15+1], 8 jnz short loc_49A2F mov byte ptr [rbx+r15], 1 jmp short loc_49A21 loc_49A1C: mov byte ptr [rbx+r15], 0Eh loc_49A21: inc r15 cmp r15, 100h jnz short loc_499CD jmp short loc_49A36 loc_49A2F: mov byte ptr [rbx+r15], 1Ah jmp short loc_49A21 loc_49A36: mov word ptr [rbx+5Fh], 1B02h mov byte ptr [rbx+3Eh], 8 mov byte ptr [rbx+7Ch], 11h mov word ptr [rbx+26h], 0A11h mov dword ptr [rbx+3Ah], 8091617h mov byte ptr [rbx], 12h mov byte ptr [rbx+5Ch], 13h mov byte ptr [rbx+2Ah], 15h mov dword ptr [rbx+21h], 20B2108h mov dword ptr [rbx+2Ch], 14102224h mov word ptr [rbx+3Fh], 1823h mov rax, 0FFFFFFFFFFFFFF00h movdqa xmm0, cs:xmmword_80C80 movdqa xmm1, cs:xmmword_80C90 movdqa xmm2, cs:xmmword_80CA0 loc_49A8F: movdqu xmm3, xmmword ptr [r13+rax+0] movdqa xmm4, xmm3 pcmpeqb xmm4, xmm0 pcmpeqb xmm3, xmm1 por xmm3, xmm4 pand xmm3, xmm2 movdqu xmmword ptr [r13+rax+100h], xmm3 add rax, 10h jnz short loc_49A8F mov al, 1Eh mov [rbx+58h], al mov [rbx+78h], al mov al, 1Fh mov [rbx+42h], al mov [rbx+62h], al mov al, 20h ; ' ' mov [rbx+4Eh], al mov [rbx+6Eh], al xor eax, eax jmp short loc_49AD8 loc_49AD6: mov al, 1 loc_49AD8: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_state_maps(_QWORD *a1) { long long v1; // rax long long v2; // rax long long v3; // rbx long long v4; // r13 long long i; // r15 char v6; // al long long v7; // rax __m128i si128; // xmm0 __m128i v9; // xmm1 __m128i v10; // xmm2 __m128i v11; // xmm3 char v13; // [rsp+1h] [rbp-29h] BYREF _BYTE v14[40]; // [rsp+2h] [rbp-28h] BYREF v13 = HIBYTE(v1); v2 = my_once_alloc(512LL, 16); a1[16] = v2; if ( !v2 ) return 1LL; v3 = v2; v4 = v2 + 256; a1[17] = v2 + 256; for ( i = 0LL; i != 256; ++i ) { v6 = *(_BYTE *)(a1[8] + i + 1); if ( (v6 & 3) != 0 ) { LABEL_4: *(_BYTE *)(v3 + i) = 2; continue; } if ( (v6 & 4) != 0 ) { *(_BYTE *)(v3 + i) = 14; } else { v13 = i; if ( (*(unsigned int ( **)(_QWORD *, char *, _BYTE *))(a1[23] + 192LL))(a1, &v13, v14) + 100 >= 0xFFFFFFFA ) goto LABEL_4; if ( (*(_BYTE *)(a1[8] + i + 1) & 8) != 0 ) *(_BYTE *)(v3 + i) = 26; else *(_BYTE *)(v3 + i) = 1; } } *(_WORD *)(v3 + 95) = 6914; *(_BYTE *)(v3 + 62) = 8; *(_BYTE *)(v3 + 124) = 17; *(_WORD *)(v3 + 38) = 2577; *(_DWORD *)(v3 + 58) = 134813207; *(_BYTE *)v3 = 18; *(_BYTE *)(v3 + 92) = 19; *(_BYTE *)(v3 + 42) = 21; *(_DWORD *)(v3 + 33) = 34283784; *(_DWORD *)(v3 + 44) = 336601636; *(_WORD *)(v3 + 63) = 6179; v7 = -256LL; si128 = _mm_load_si128((const __m128i *)&xmmword_80C80); v9 = _mm_load_si128((const __m128i *)&xmmword_80C90); v10 = _mm_load_si128((const __m128i *)&xmmword_80CA0); do { v11 = _mm_loadu_si128((const __m128i *)(v4 + v7)); *(__m128i *)(v4 + v7 + 256) = _mm_and_si128(_mm_or_si128(_mm_cmpeq_epi8(v11, v9), _mm_cmpeq_epi8(v11, si128)), v10); v7 += 16LL; } while ( v7 ); *(_BYTE *)(v3 + 88) = 30; *(_BYTE *)(v3 + 120) = 30; *(_BYTE *)(v3 + 66) = 31; *(_BYTE *)(v3 + 98) = 31; *(_BYTE *)(v3 + 78) = 32; *(_BYTE *)(v3 + 110) = 32; return 0LL; }
init_state_maps: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV EDI,0x200 MOV ESI,0x10 CALL 0x001456b0 MOV qword ptr [R14 + 0x80],RAX TEST RAX,RAX JZ 0x00149ad6 MOV RBX,RAX MOV R13,RAX ADD R13,0x100 MOV qword ptr [R14 + 0x88],R13 XOR R15D,R15D LEA R12,[RBP + -0x29] LAB_001499cd: MOV RAX,qword ptr [R14 + 0x40] MOVZX EAX,byte ptr [RAX + R15*0x1 + 0x1] TEST AL,0x3 JZ 0x001499e2 LAB_001499db: MOV byte ptr [RBX + R15*0x1],0x2 JMP 0x00149a21 LAB_001499e2: TEST AL,0x4 JNZ 0x00149a1c MOV byte ptr [RBP + -0x29],R15B MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R12 LEA RDX,[RBP + -0x28] CALL qword ptr [RAX + 0xc0] ADD EAX,0x64 CMP EAX,-0x6 JNC 0x001499db MOV RAX,qword ptr [R14 + 0x40] TEST byte ptr [RAX + R15*0x1 + 0x1],0x8 JNZ 0x00149a2f MOV byte ptr [RBX + R15*0x1],0x1 JMP 0x00149a21 LAB_00149a1c: MOV byte ptr [RBX + R15*0x1],0xe LAB_00149a21: INC R15 CMP R15,0x100 JNZ 0x001499cd JMP 0x00149a36 LAB_00149a2f: MOV byte ptr [RBX + R15*0x1],0x1a JMP 0x00149a21 LAB_00149a36: MOV word ptr [RBX + 0x5f],0x1b02 MOV byte ptr [RBX + 0x3e],0x8 MOV byte ptr [RBX + 0x7c],0x11 MOV word ptr [RBX + 0x26],0xa11 MOV dword ptr [RBX + 0x3a],0x8091617 MOV byte ptr [RBX],0x12 MOV byte ptr [RBX + 0x5c],0x13 MOV byte ptr [RBX + 0x2a],0x15 MOV dword ptr [RBX + 0x21],0x20b2108 MOV dword ptr [RBX + 0x2c],0x14102224 MOV word ptr [RBX + 0x3f],0x1823 MOV RAX,-0x100 MOVDQA XMM0,xmmword ptr [0x00180c80] MOVDQA XMM1,xmmword ptr [0x00180c90] MOVDQA XMM2,xmmword ptr [0x00180ca0] LAB_00149a8f: MOVDQU XMM3,xmmword ptr [R13 + RAX*0x1] MOVDQA XMM4,XMM3 PCMPEQB XMM4,XMM0 PCMPEQB XMM3,XMM1 POR XMM3,XMM4 PAND XMM3,XMM2 MOVDQU xmmword ptr [R13 + RAX*0x1 + 0x100],XMM3 ADD RAX,0x10 JNZ 0x00149a8f MOV AL,0x1e MOV byte ptr [RBX + 0x58],AL MOV byte ptr [RBX + 0x78],AL MOV AL,0x1f MOV byte ptr [RBX + 0x42],AL MOV byte ptr [RBX + 0x62],AL MOV AL,0x20 MOV byte ptr [RBX + 0x4e],AL MOV byte ptr [RBX + 0x6e],AL XOR EAX,EAX JMP 0x00149ad8 LAB_00149ad6: MOV AL,0x1 LAB_00149ad8: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 init_state_maps(long param_1) { char *pcVar1; byte *pbVar2; byte bVar3; char cVar4; char cVar5; char cVar6; char cVar7; char cVar8; char cVar9; char cVar10; char cVar11; char cVar12; char cVar13; char cVar14; char cVar15; char cVar16; char cVar17; char cVar18; char cVar19; char cVar20; char cVar21; char cVar22; char cVar23; char cVar24; char cVar25; char cVar26; char cVar27; char cVar28; char cVar29; char cVar30; char cVar31; char cVar32; char cVar33; char cVar34; char cVar35; char cVar36; char cVar37; char cVar38; char cVar39; char cVar40; char cVar41; char cVar42; char cVar43; char cVar44; char cVar45; char cVar46; char cVar47; char cVar48; char cVar49; char cVar50; byte bVar51; byte bVar52; byte bVar53; byte bVar54; byte bVar55; byte bVar56; byte bVar57; byte bVar58; byte bVar59; byte bVar60; byte bVar61; byte bVar62; byte bVar63; byte bVar64; byte bVar65; int iVar66; int8 in_RAX; int1 *puVar67; int8 uVar68; long lVar69; int8 uStack_38; uStack_38 = in_RAX; puVar67 = (int1 *)my_once_alloc(0x200,0x10); *(int1 **)(param_1 + 0x80) = puVar67; if (puVar67 == (int1 *)0x0) { uVar68 = 1; } else { *(int1 **)(param_1 + 0x88) = puVar67 + 0x100; lVar69 = 0; do { bVar3 = *(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69); if ((bVar3 & 3) == 0) { if ((bVar3 & 4) == 0) { uStack_38 = CONCAT17((char)lVar69,(int7)uStack_38); iVar66 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,(long)&uStack_38 + 7,&stack0xffffffffffffffd0); if (0xfffffff9 < iVar66 + 100U) goto LAB_001499db; if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69) & 8) == 0) { puVar67[lVar69] = 1; } else { puVar67[lVar69] = 0x1a; } } else { puVar67[lVar69] = 0xe; } } else { LAB_001499db: puVar67[lVar69] = 2; } lVar69 = lVar69 + 1; } while (lVar69 != 0x100); *(int2 *)(puVar67 + 0x5f) = 0x1b02; puVar67[0x3e] = 8; puVar67[0x7c] = 0x11; *(int2 *)(puVar67 + 0x26) = 0xa11; *(int4 *)(puVar67 + 0x3a) = 0x8091617; *puVar67 = 0x12; puVar67[0x5c] = 0x13; puVar67[0x2a] = 0x15; *(int4 *)(puVar67 + 0x21) = 0x20b2108; *(int4 *)(puVar67 + 0x2c) = 0x14102224; *(int2 *)(puVar67 + 0x3f) = 0x1823; bVar65 = UNK_00180caf; bVar64 = UNK_00180cae; bVar63 = UNK_00180cad; bVar62 = UNK_00180cac; bVar61 = UNK_00180cab; bVar60 = UNK_00180caa; bVar59 = UNK_00180ca9; bVar58 = UNK_00180ca8; bVar57 = UNK_00180ca7; bVar56 = UNK_00180ca6; bVar55 = UNK_00180ca5; bVar54 = UNK_00180ca4; bVar53 = UNK_00180ca3; bVar52 = UNK_00180ca2; bVar51 = UNK_00180ca1; bVar3 = DAT_00180ca0; cVar50 = UNK_00180c9f; cVar49 = UNK_00180c9e; cVar48 = UNK_00180c9d; cVar47 = UNK_00180c9c; cVar46 = UNK_00180c9b; cVar45 = UNK_00180c9a; cVar44 = UNK_00180c99; cVar43 = UNK_00180c98; cVar42 = UNK_00180c97; cVar41 = UNK_00180c96; cVar40 = UNK_00180c95; cVar39 = UNK_00180c94; cVar38 = UNK_00180c93; cVar37 = UNK_00180c92; cVar36 = UNK_00180c91; cVar35 = DAT_00180c90; cVar34 = UNK_00180c8f; cVar33 = UNK_00180c8e; cVar32 = UNK_00180c8d; cVar31 = UNK_00180c8c; cVar30 = UNK_00180c8b; cVar29 = UNK_00180c8a; cVar28 = UNK_00180c89; cVar27 = UNK_00180c88; cVar26 = UNK_00180c87; cVar25 = UNK_00180c86; cVar24 = UNK_00180c85; cVar23 = UNK_00180c84; cVar22 = UNK_00180c83; cVar21 = UNK_00180c82; cVar20 = UNK_00180c81; cVar19 = DAT_00180c80; lVar69 = -0x100; do { pcVar1 = puVar67 + 0x100 + lVar69; cVar4 = pcVar1[1]; cVar5 = pcVar1[2]; cVar6 = pcVar1[3]; cVar7 = pcVar1[4]; cVar8 = pcVar1[5]; cVar9 = pcVar1[6]; cVar10 = pcVar1[7]; cVar11 = pcVar1[8]; cVar12 = pcVar1[9]; cVar13 = pcVar1[10]; cVar14 = pcVar1[0xb]; cVar15 = pcVar1[0xc]; cVar16 = pcVar1[0xd]; cVar17 = pcVar1[0xe]; cVar18 = pcVar1[0xf]; pbVar2 = puVar67 + lVar69 + 0x200; *pbVar2 = (-(*pcVar1 == cVar35) | -(*pcVar1 == cVar19)) & bVar3; pbVar2[1] = (-(cVar4 == cVar36) | -(cVar4 == cVar20)) & bVar51; pbVar2[2] = (-(cVar5 == cVar37) | -(cVar5 == cVar21)) & bVar52; pbVar2[3] = (-(cVar6 == cVar38) | -(cVar6 == cVar22)) & bVar53; pbVar2[4] = (-(cVar7 == cVar39) | -(cVar7 == cVar23)) & bVar54; pbVar2[5] = (-(cVar8 == cVar40) | -(cVar8 == cVar24)) & bVar55; pbVar2[6] = (-(cVar9 == cVar41) | -(cVar9 == cVar25)) & bVar56; pbVar2[7] = (-(cVar10 == cVar42) | -(cVar10 == cVar26)) & bVar57; pbVar2[8] = (-(cVar11 == cVar43) | -(cVar11 == cVar27)) & bVar58; pbVar2[9] = (-(cVar12 == cVar44) | -(cVar12 == cVar28)) & bVar59; pbVar2[10] = (-(cVar13 == cVar45) | -(cVar13 == cVar29)) & bVar60; pbVar2[0xb] = (-(cVar14 == cVar46) | -(cVar14 == cVar30)) & bVar61; pbVar2[0xc] = (-(cVar15 == cVar47) | -(cVar15 == cVar31)) & bVar62; pbVar2[0xd] = (-(cVar16 == cVar48) | -(cVar16 == cVar32)) & bVar63; pbVar2[0xe] = (-(cVar17 == cVar49) | -(cVar17 == cVar33)) & bVar64; pbVar2[0xf] = (-(cVar18 == cVar50) | -(cVar18 == cVar34)) & bVar65; lVar69 = lVar69 + 0x10; } while (lVar69 != 0); puVar67[0x58] = 0x1e; puVar67[0x78] = 0x1e; puVar67[0x42] = 0x1f; puVar67[0x62] = 0x1f; puVar67[0x4e] = 0x20; puVar67[0x6e] = 0x20; uVar68 = 0; } return uVar68; }
53,030
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::decode(unsigned char&, unsigned int&, unsigned char)
monkey531[P]llama/common/json.hpp
static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept { static const std::array<std::uint8_t, 400> utf8d = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8 } }; JSON_ASSERT(byte < utf8d.size()); const std::uint8_t type = utf8d[byte]; codep = (state != UTF8_ACCEPT) ? (byte & 0x3fu) | (codep << 6u) : (0xFFu >> type) & (byte); const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type); JSON_ASSERT(index < utf8d.size()); state = utf8d[index]; return state; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::decode(unsigned char&, unsigned int&, unsigned char): pushq %rax movl %edx, %ecx leaq 0x36431(%rip), %rax # 0xc3bf9 movzbl (%rax,%rcx), %ecx cmpb $0x0, (%rdi) je 0x8d7e2 andb $0x3f, %dl movzbl %dl, %r8d movl (%rsi), %edx shll $0x6, %edx orl %r8d, %edx jmp 0x8d7f1 movl $0xff, %r8d shrl %cl, %r8d movzbl %dl, %edx andl %r8d, %edx movl %edx, (%rsi) movzbl (%rdi), %edx shll $0x4, %edx movl %ecx, %ecx addq %rdx, %rcx addq $0x100, %rcx # imm = 0x100 cmpq $0x190, %rcx # imm = 0x190 jae 0x8d815 movb (%rax,%rcx), %al movb %al, (%rdi) popq %rcx retq leaq 0x314ef(%rip), %rdi # 0xbed0b leaq 0x2dd8e(%rip), %rdx # 0xbb5b1 leaq 0x33f59(%rip), %rcx # 0xc1783 movl $0x49fb, %esi # imm = 0x49FB xorl %eax, %eax callq 0x1ace0 movq %rax, %rdi callq 0x2542a
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjh: push rax mov ecx, edx lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjhE5utf8d; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::decode(uchar &,uint &,uchar)::utf8d movzx ecx, byte ptr [rax+rcx] cmp byte ptr [rdi], 0 jz short loc_8D7E2 and dl, 3Fh movzx r8d, dl mov edx, [rsi] shl edx, 6 or edx, r8d jmp short loc_8D7F1 loc_8D7E2: mov r8d, 0FFh shr r8d, cl movzx edx, dl and edx, r8d loc_8D7F1: mov [rsi], edx movzx edx, byte ptr [rdi] shl edx, 4 mov ecx, ecx add rcx, rdx add rcx, 100h cmp rcx, 190h jnb short loc_8D815 mov al, [rax+rcx] mov [rdi], al pop rcx retn loc_8D815: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIndexUtf8dSize; "index < utf8d.size()" mov esi, 49FBh xor eax, eax call _ggml_abort mov rdi, rax call __clang_call_terminate
unsigned __int8 nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode( unsigned __int8 *a1, unsigned int *a2, int a3) { unsigned int v3; // ecx unsigned int v4; // edx unsigned long long v5; // rcx unsigned __int8 result; // al void *v7; // rax v3 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[a3]; if ( *a1 ) v4 = a3 & 0x3F | (*a2 << 6); else v4 = (0xFFu >> v3) & (unsigned __int8)a3; *a2 = v4; v5 = 16 * (unsigned int)*a1 + (unsigned long long)v3 + 256; if ( v5 >= 0x190 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 18939LL, "GGML_ASSERT(%s) failed", "index < utf8d.size()"); _clang_call_terminate(v7); } result = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[v5]; *a1 = result; return result; }
decode: PUSH RAX MOV ECX,EDX LEA RAX,[0x1c3bf9] MOVZX ECX,byte ptr [RAX + RCX*0x1] CMP byte ptr [RDI],0x0 JZ 0x0018d7e2 AND DL,0x3f MOVZX R8D,DL MOV EDX,dword ptr [RSI] SHL EDX,0x6 OR EDX,R8D JMP 0x0018d7f1 LAB_0018d7e2: MOV R8D,0xff SHR R8D,CL MOVZX EDX,DL AND EDX,R8D LAB_0018d7f1: MOV dword ptr [RSI],EDX MOVZX EDX,byte ptr [RDI] SHL EDX,0x4 MOV ECX,ECX ADD RCX,RDX ADD RCX,0x100 CMP RCX,0x190 JNC 0x0018d815 MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RDI],AL POP RCX RET LAB_0018d815: LEA RDI,[0x1bed0b] LEA RDX,[0x1bb5b1] LEA RCX,[0x1c1783] MOV ESI,0x49fb XOR EAX,EAX CALL 0x0011ace0
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::decode(unsigned char&, unsigned int&, unsigned char) */ void nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::decode(uchar *param_1,uint *param_2,uchar param_3) { byte bVar1; long lVar2; uint uVar3; int7 in_register_00000011; bVar1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d [CONCAT71(in_register_00000011,param_3) & 0xffffffff]; if (*param_1 == '\0') { uVar3 = (uint)param_3 & 0xffU >> (bVar1 & 0x1f); } else { uVar3 = *param_2 << 6 | (uint)(param_3 & 0x3f); } *param_2 = uVar3; lVar2 = (ulong)bVar1 + (ulong)*param_1 * 0x10; if (lVar2 + 0x100U < 400) { *param_1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d[lVar2 + 0x100]; return; } /* try { // try from 0018d815 to 0018d835 has its CatchHandler @ 0018d836 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x49fb, "GGML_ASSERT(%s) failed","index < utf8d.size()"); }
53,031
reset_file
eloqsql/storage/maria/unittest/ma_pagecache_consist.c
void reset_file(PAGECACHE_FILE file, char *file_name) { flush_pagecache_blocks(&pagecache, &file1, FLUSH_RELEASE); if (my_close(file1.file, MYF(0)) != 0) { diag("Got error during %s closing from close() (errno: %d)\n", file_name, errno); exit(1); } my_delete(file_name, MYF(0)); if ((file.file= my_open(file_name, O_CREAT | O_TRUNC | O_RDWR, MYF(0))) == -1) { diag("Got error during %s creation from open() (errno: %d)\n", file_name, errno); exit(1); } }
O3
c
reset_file: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x3cc03d(%rip), %rdi # 0x3fc3b0 leaq 0x3cc256(%rip), %rsi # 0x3fc5d0 movl $0x1, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3407c movl 0x3cc251(%rip), %edi # 0x3fc5e0 xorl %esi, %esi callq 0xa046d testl %eax, %eax jne 0x303bf movq %rbx, %rdi xorl %esi, %esi callq 0x9de48 movq %rbx, %rdi movl $0x242, %esi # imm = 0x242 xorl %edx, %edx callq 0xa02c8 cmpl $-0x1, %eax je 0x303cf addq $0x8, %rsp popq %rbx popq %rbp retq callq 0x297b0 movl (%rax), %edx leaq 0xa8e70(%rip), %rdi # 0xd923d jmp 0x303dd callq 0x297b0 movl (%rax), %edx leaq 0xa8e96(%rip), %rdi # 0xd9273 movq %rbx, %rsi xorl %eax, %eax callq 0x90fcf movl $0x1, %edi callq 0x29540
reset_file: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi lea rdi, pagecache lea rsi, file1 mov edx, 1 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter mov edi, cs:dword_3FC5E0 xor esi, esi call my_close test eax, eax jnz short loc_303BF mov rdi, rbx xor esi, esi call my_delete mov rdi, rbx mov esi, 242h xor edx, edx call my_open cmp eax, 0FFFFFFFFh jz short loc_303CF add rsp, 8 pop rbx pop rbp retn loc_303BF: call ___errno_location mov edx, [rax] lea rdi, aGotErrorDuring; "Got error during %s closing from close("... jmp short loc_303DD loc_303CF: call ___errno_location mov edx, [rax] lea rdi, aGotErrorDuring_0; "Got error during %s creation from open("... loc_303DD: mov rsi, rbx xor eax, eax call diag mov edi, 1 call _exit
long long reset_file(long long a1) { long long v1; // rax long long v3; // rdi long long result; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d const char *v9; // rdi long long v10; // [rsp-8h] [rbp-10h] v10 = v1; flush_pagecache_blocks_with_filter(&pagecache, &file1, 1LL, 0LL, 0LL); v3 = (unsigned int)dword_3FC5E0; if ( (unsigned int)my_close((unsigned int)dword_3FC5E0, 0LL) ) { v5 = *(_DWORD *)__errno_location(v3); v9 = "Got error during %s closing from close() (errno: %d)\n"; goto LABEL_6; } my_delete(a1, 0LL); result = my_open(a1, 578LL, 0LL); if ( (_DWORD)result == -1 ) { v5 = *(_DWORD *)__errno_location(a1); v9 = "Got error during %s creation from open() (errno: %d)\n"; LABEL_6: diag((_DWORD)v9, a1, v5, v6, v7, v8, v10); exit(1LL); } return result; }
reset_file: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI LEA RDI,[0x4fc3b0] LEA RSI,[0x4fc5d0] MOV EDX,0x1 XOR ECX,ECX XOR R8D,R8D CALL 0x0013407c MOV EDI,dword ptr [0x004fc5e0] XOR ESI,ESI CALL 0x001a046d TEST EAX,EAX JNZ 0x001303bf MOV RDI,RBX XOR ESI,ESI CALL 0x0019de48 MOV RDI,RBX MOV ESI,0x242 XOR EDX,EDX CALL 0x001a02c8 CMP EAX,-0x1 JZ 0x001303cf ADD RSP,0x8 POP RBX POP RBP RET LAB_001303bf: CALL 0x001297b0 MOV EDX,dword ptr [RAX] LEA RDI,[0x1d923d] JMP 0x001303dd LAB_001303cf: CALL 0x001297b0 MOV EDX,dword ptr [RAX] LEA RDI,[0x1d9273] LAB_001303dd: MOV RSI,RBX XOR EAX,EAX CALL 0x00190fcf MOV EDI,0x1 CALL 0x00129540
void reset_file(int8 param_1) { int iVar1; int *piVar2; char *pcVar3; flush_pagecache_blocks_with_filter(pagecache,file1,1,0,0); iVar1 = my_close(file1._16_4_,0); if (iVar1 == 0) { my_delete(param_1,0); iVar1 = my_open(param_1,0x242,0); if (iVar1 != -1) { return; } piVar2 = __errno_location(); iVar1 = *piVar2; pcVar3 = "Got error during %s creation from open() (errno: %d)\n"; } else { piVar2 = __errno_location(); iVar1 = *piVar2; pcVar3 = "Got error during %s closing from close() (errno: %d)\n"; } diag(pcVar3,param_1,iVar1); /* WARNING: Subroutine does not return */ exit(1); }
53,032
LefDefParser::defwBlockagesPlacement()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwBlockagesPlacement() { defwFunc = DEFW_BLOCKAGE_PLACE; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_BLOCKAGE_START && ((defwState == DEFW_BLOCKAGE_LAYER) || (defwState == DEFW_BLOCKAGE_PLACE))) return DEFW_BAD_DATA; if (defwState == DEFW_BLOCKAGE_RECT) fprintf(defwFile, " ;\n"); // end the previous rectangle fprintf(defwFile, " - PLACEMENT\n"); defwCounter--; defwLines++; defwState = DEFW_BLOCKAGE_PLACE; defwBlockageHasSP = 0; return DEFW_OK; }
O0
cpp
LefDefParser::defwBlockagesPlacement(): pushq %rax leaq 0xbe90(%rip), %rax # 0x2b168 movl $0x2d, (%rax) leaq 0xbe73(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x1f2f8 movl $0x1, 0x4(%rsp) jmp 0x1f3ae leaq 0xbe65(%rip), %rax # 0x2b164 cmpl $0x2b, (%rax) je 0x1f329 leaq 0xbe59(%rip), %rax # 0x2b164 cmpl $0x2c, (%rax) je 0x1f31c leaq 0xbe4d(%rip), %rax # 0x2b164 cmpl $0x2d, (%rax) jne 0x1f329 movl $0x3, 0x4(%rsp) jmp 0x1f3ae leaq 0xbe34(%rip), %rax # 0x2b164 cmpl $0x2e, (%rax) jne 0x1f34d leaq 0xbe1c(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0x4b0c(%rip), %rsi # 0x23e52 movb $0x0, %al callq 0x10f0 leaq 0xbe04(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0x5dd6(%rip), %rsi # 0x25134 movb $0x0, %al callq 0x10f0 leaq 0xbe0c(%rip), %rax # 0x2b178 movl (%rax), %ecx addl $-0x1, %ecx leaq 0xbe00(%rip), %rax # 0x2b178 movl %ecx, (%rax) leaq 0xbddf(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0xbdd3(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0xbdce(%rip), %rax # 0x2b164 movl $0x2d, (%rax) movl $0x0, 0xbdfa(%rip) # 0x2b1a0 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax popq %rcx retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser22defwBlockagesPlacementEv: push rax lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 2Dh ; '-' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_1F2F8 mov [rsp+8+var_4], 1 jmp loc_1F3AE loc_1F2F8: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Bh ; '+' jz short loc_1F329 lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Ch ; ',' jz short loc_1F31C lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Dh ; '-' jnz short loc_1F329 loc_1F31C: mov [rsp+8+var_4], 3 jmp loc_1F3AE loc_1F329: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Eh ; '.' jnz short loc_1F34D lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aDividercharS+10h; " ;\n" mov al, 0 call _fprintf loc_1F34D: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aPlacement; " - PLACEMENT\n" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov ecx, [rax] add ecx, 0FFFFFFFFh lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov [rax], ecx lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 2Dh ; '-' mov cs:_ZN12LefDefParserL17defwBlockageHasSPE, 0; LefDefParser::defwBlockageHasSP mov [rsp+8+var_4], 0 loc_1F3AE: mov eax, [rsp+8+var_4] pop rcx retn
long long LefDefParser::defwBlockagesPlacement(LefDefParser *this) { LefDefParser::defwFunc = 45; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState != 43 && (LefDefParser::defwState == 44 || LefDefParser::defwState == 45) ) { return 3; } else { if ( LefDefParser::defwState == 46 ) fprintf(LefDefParser::defwFile, " ;\n"); fprintf(LefDefParser::defwFile, " - PLACEMENT\n"); --LefDefParser::defwCounter; ++LefDefParser::defwLines; LefDefParser::defwState = 45; LefDefParser::defwBlockageHasSP = 0; return 0; } } else { return 1; } }
defwBlockagesPlacement: PUSH RAX LEA RAX,[0x12b168] MOV dword ptr [RAX],0x2d LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x0011f2f8 MOV dword ptr [RSP + 0x4],0x1 JMP 0x0011f3ae LAB_0011f2f8: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2b JZ 0x0011f329 LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2c JZ 0x0011f31c LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2d JNZ 0x0011f329 LAB_0011f31c: MOV dword ptr [RSP + 0x4],0x3 JMP 0x0011f3ae LAB_0011f329: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2e JNZ 0x0011f34d LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x123e52] MOV AL,0x0 CALL 0x001010f0 LAB_0011f34d: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x125134] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b178] MOV ECX,dword ptr [RAX] ADD ECX,-0x1 LEA RAX,[0x12b178] MOV dword ptr [RAX],ECX LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LEA RAX,[0x12b164] MOV dword ptr [RAX],0x2d MOV dword ptr [0x0012b1a0],0x0 MOV dword ptr [RSP + 0x4],0x0 LAB_0011f3ae: MOV EAX,dword ptr [RSP + 0x4] POP RCX RET
/* LefDefParser::defwBlockagesPlacement() */ int4 LefDefParser::defwBlockagesPlacement(void) { int4 local_4; defwFunc = 0x2d; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if ((defwState == 0x2b) || ((defwState != 0x2c && (defwState != 0x2d)))) { if (defwState == 0x2e) { fprintf(defwFile," ;\n"); } fprintf(defwFile," - PLACEMENT\n"); defwCounter = defwCounter + -1; defwLines = defwLines + 1; defwState = 0x2d; defwBlockageHasSP = 0; local_4 = 0; } else { local_4 = 3; } return local_4; }
53,033
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
monkey531[P]llama/common/./minja.hpp
T get(const std::string & key, T default_value) const { if (!contains(key)) return default_value; return at(key).get<T>(); }
O0
cpp
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const: subq $0xa8, %rsp movb %dl, %al movq %rdi, 0x98(%rsp) movq %rsi, 0x90(%rsp) andb $0x1, %al movb %al, 0x8f(%rsp) movq 0x98(%rsp), %rdi movq %rdi, 0x20(%rsp) movq 0x90(%rsp), %rsi callq 0xc3ac0 testb $0x1, %al jne 0xd8722 movb 0x8f(%rsp), %al andb $0x1, %al movb %al, 0xa7(%rsp) jmp 0xd8792 movq 0x90(%rsp), %rsi leaq 0x38(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x9b3f0 movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0xc3c50 movq %rax, 0x18(%rsp) jmp 0xd874f movq 0x18(%rsp), %rdi callq 0xb8010 movb %al, 0xf(%rsp) jmp 0xd875f movb 0xf(%rsp), %al andb $0x1, %al movb %al, 0xa7(%rsp) leaq 0x38(%rsp), %rdi callq 0x9b080 jmp 0xd8792 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x38(%rsp), %rdi callq 0x9b080 jmp 0xd87a3 movb 0xa7(%rsp), %al andb $0x1, %al addq $0xa8, %rsp retq movq 0x30(%rsp), %rdi callq 0x52ae0 nopl (%rax)
_ZNK5minja5Value3getIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_: sub rsp, 0A8h mov al, dl mov [rsp+0A8h+var_10], rdi mov [rsp+0A8h+var_18], rsi and al, 1 mov [rsp+0A8h+var_19], al mov rdi, [rsp+0A8h+var_10] mov [rsp+0A8h+var_88], rdi mov rsi, [rsp+0A8h+var_18] call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) test al, 1 jnz short loc_D8722 mov al, [rsp+0A8h+var_19] and al, 1 mov [rsp+0A8h+var_1], al jmp short loc_D8792 loc_D8722: mov rsi, [rsp+0A8h+var_18] lea rdi, [rsp+0A8h+var_70] mov [rsp+0A8h+var_98], rdi call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+0A8h+var_88]; this mov rsi, [rsp+0A8h+var_98]; minja::Value * call _ZNK5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov [rsp+0A8h+var_90], rax jmp short $+2 loc_D874F: mov rdi, [rsp+0A8h+var_90] call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) mov [rsp+0A8h+var_99], al jmp short $+2 loc_D875F: mov al, [rsp+0A8h+var_99] and al, 1 mov [rsp+0A8h+var_1], al lea rdi, [rsp+0A8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_D8792 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_30]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_D87A3 loc_D8792: mov al, [rsp+0A8h+var_1] and al, 1 add rsp, 0A8h retn loc_D87A3: mov rdi, [rsp+arg_28] call __Unwind_Resume
char minja::Value::get<bool>(minja::Value *a1, long long a2, char a3) { minja::Value *v4; // [rsp+18h] [rbp-90h] _BYTE v5[87]; // [rsp+38h] [rbp-70h] BYREF char v6; // [rsp+8Fh] [rbp-19h] long long v7; // [rsp+90h] [rbp-18h] minja::Value *v8; // [rsp+98h] [rbp-10h] char v9; // [rsp+A7h] [rbp-1h] v8 = a1; v7 = a2; v6 = a3 & 1; if ( minja::Value::contains((long long)a1, a2) ) { minja::Value::Value((int)v5, v7); v4 = (minja::Value *)minja::Value::at(a1, (const minja::Value *)v5); v9 = minja::Value::get<bool>(v4) & 1; minja::Value::~Value((minja::Value *)v5); } else { v9 = v6; } return v9 & 1; }
get<bool>: SUB RSP,0xa8 MOV AL,DL MOV qword ptr [RSP + 0x98],RDI MOV qword ptr [RSP + 0x90],RSI AND AL,0x1 MOV byte ptr [RSP + 0x8f],AL MOV RDI,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x20],RDI MOV RSI,qword ptr [RSP + 0x90] CALL 0x001c3ac0 TEST AL,0x1 JNZ 0x001d8722 MOV AL,byte ptr [RSP + 0x8f] AND AL,0x1 MOV byte ptr [RSP + 0xa7],AL JMP 0x001d8792 LAB_001d8722: MOV RSI,qword ptr [RSP + 0x90] LEA RDI,[RSP + 0x38] MOV qword ptr [RSP + 0x10],RDI CALL 0x0019b3f0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x10] LAB_001d8743: CALL 0x001c3c50 MOV qword ptr [RSP + 0x18],RAX JMP 0x001d874f LAB_001d874f: MOV RDI,qword ptr [RSP + 0x18] CALL 0x001b8010 LAB_001d8759: MOV byte ptr [RSP + 0xf],AL JMP 0x001d875f LAB_001d875f: MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 MOV byte ptr [RSP + 0xa7],AL LEA RDI,[RSP + 0x38] CALL 0x0019b080 JMP 0x001d8792 LAB_001d8792: MOV AL,byte ptr [RSP + 0xa7] AND AL,0x1 ADD RSP,0xa8 RET
/* bool minja::Value::get<bool>(std::__cxx11::string const&, bool) const */ bool __thiscall minja::Value::get<bool>(Value *this,string *param_1,bool param_2) { Value *this_00; byte bVar1; Value local_70 [87]; byte local_19; string *local_18; Value *local_10; byte local_1; local_19 = param_2; local_18 = param_1; local_10 = this; bVar1 = contains(this,param_1); if ((bVar1 & 1) == 0) { local_1 = local_19 & 1; } else { Value(local_70,local_18); /* try { // try from 001d8743 to 001d8758 has its CatchHandler @ 001d8778 */ this_00 = (Value *)at(this,local_70); local_1 = get<bool>(this_00); ~Value(local_70); } return (bool)(local_1 & 1); }
53,034
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
monkey531[P]llama/common/./minja.hpp
T get(const std::string & key, T default_value) const { if (!contains(key)) return default_value; return at(key).get<T>(); }
O1
cpp
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) 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 0x4078e testb %al, %al je 0x432e8 leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %r12, %rsi callq 0x32908 movq %r15, %rdi movq %r14, %rsi callq 0x3e052 movq %rbx, %rdi movq %rax, %rsi callq 0x3da5a leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x2968c movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x432a9 callq 0x34304 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x432b8 callq 0x34304 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x432c7 callq 0x34304 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x4333c movq 0xa7cb8(%rip), %rax # 0xeaf90 cmpb $0x0, (%rax) je 0x43327 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x43331 leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq (%r14), %rdx leaq 0x10(%r14), %rax cmpq %rax, %rdx je 0x43307 movq %rdx, (%rbx) movq (%rax), %rcx movq %rcx, 0x10(%rbx) jmp 0x4330d movups (%rax), %xmm0 movups %xmm0, (%rcx) movq 0x8(%r14), %rcx movq %rcx, 0x8(%rbx) movq %rax, (%r14) movq $0x0, 0x8(%r14) movb $0x0, 0x10(%r14) jmp 0x4333c movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x4333c 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 0x32700 movq %rbx, %rdi callq 0x19e00
_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 loc_432E8 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 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_432A9 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_432A9: mov rdi, [rsp+78h+var_48] test rdi, rdi jz short loc_432B8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_432B8: mov rdi, [rsp+78h+var_58] test rdi, rdi jz short loc_432C7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_432C7: mov rdi, [rsp+78h+var_68] test rdi, rdi jz short loc_4333C mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_43327 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_43331 loc_432E8: lea rcx, [rbx+10h] mov [rbx], rcx mov rdx, [r14] lea rax, [r14+10h] cmp rdx, rax jz short loc_43307 mov [rbx], rdx mov rcx, [rax] mov [rbx+10h], rcx jmp short loc_4330D loc_43307: movups xmm0, xmmword ptr [rax] movups xmmword ptr [rcx], xmm0 loc_4330D: mov rcx, [r14+8] mov [rbx+8], rcx mov [r14], rax mov qword ptr [r14+8], 0 mov byte ptr [r14+10h], 0 jmp short loc_4333C loc_43327: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_43331: cmp eax, 1 jnz short loc_4333C mov rax, [rdi] call qword ptr [rax+18h] loc_4333C: 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
long long minja::Value::get<std::string>(long long a1, minja::Value *a2, long long a3, long long a4, __m128d a5) { _QWORD *v8; // rsi long long v9; // rdi signed __int32 v10; // eax _OWORD *v11; // rax __int128 v13; // [rsp+8h] [rbp-70h] BYREF volatile signed __int32 *v14; // [rsp+20h] [rbp-58h] volatile signed __int32 *v15; // [rsp+30h] [rbp-48h] volatile signed __int32 *v16; // [rsp+40h] [rbp-38h] _BYTE v17[48]; // [rsp+48h] [rbp-30h] BYREF if ( minja::Value::contains((long long)a2, a3, a5) ) { minja::Value::Value(&v13, a3); v8 = (_QWORD *)minja::Value::at(a2, (const minja::Value *)&v13); minja::Value::get<std::string>(a1, 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(v17); if ( v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); v9 = *((_QWORD *)&v13 + 1); if ( *((_QWORD *)&v13 + 1) ) { if ( _libc_single_threaded ) { v10 = *(_DWORD *)(*((_QWORD *)&v13 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v13 + 1) + 12LL) = v10 - 1; } else { v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v13 + 1) + 12LL), 0xFFFFFFFF); } if ( v10 == 1 ) (*(void ( **)(long long))(*(_QWORD *)v9 + 24LL))(v9); } } else { *(_QWORD *)a1 = a1 + 16; v11 = (_OWORD *)(a4 + 16); if ( *(_QWORD *)a4 == a4 + 16 ) { *(_OWORD *)(a1 + 16) = *v11; } else { *(_QWORD *)a1 = *(_QWORD *)a4; *(_QWORD *)(a1 + 16) = *(_QWORD *)v11; } *(_QWORD *)(a1 + 8) = *(_QWORD *)(a4 + 8); *(_QWORD *)a4 = v11; *(_QWORD *)(a4 + 8) = 0LL; *(_BYTE *)(a4 + 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 0x0014078e TEST AL,AL JZ 0x001432e8 LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,R12 CALL 0x00132908 LAB_00143278: MOV RDI,R15 MOV RSI,R14 CALL 0x0013e052 MOV RDI,RBX MOV RSI,RAX CALL 0x0013da5a LAB_0014328e: LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x0012968c MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x001432a9 CALL 0x00134304 LAB_001432a9: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x001432b8 CALL 0x00134304 LAB_001432b8: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001432c7 CALL 0x00134304 LAB_001432c7: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0014333c MOV RAX,qword ptr [0x001eaf90] CMP byte ptr [RAX],0x0 JZ 0x00143327 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00143331 LAB_001432e8: LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOV RDX,qword ptr [R14] LEA RAX,[R14 + 0x10] CMP RDX,RAX JZ 0x00143307 MOV qword ptr [RBX],RDX MOV RCX,qword ptr [RAX] MOV qword ptr [RBX + 0x10],RCX JMP 0x0014330d LAB_00143307: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RCX],XMM0 LAB_0014330d: MOV RCX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x8],0x0 MOV byte ptr [R14 + 0x10],0x0 JMP 0x0014333c LAB_00143327: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00143331: CMP EAX,0x1 JNZ 0x0014333c MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0014333c: 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 */ long * minja::Value::get<std::__cxx11::string> (long *param_1,Value *param_2,string *param_3,int8 *param_4) { long *plVar1; int *piVar2; long lVar3; char cVar4; int iVar5; Value local_70 [8]; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; data local_30 [16]; cVar4 = contains(param_2,param_3); if (cVar4 == '\0') { *param_1 = (long)(param_1 + 2); plVar1 = param_4 + 2; if ((long *)*param_4 == plVar1) { lVar3 = param_4[3]; param_1[2] = *plVar1; param_1[3] = lVar3; } else { *param_1 = (long)*param_4; param_1[2] = *plVar1; } param_1[1] = param_4[1]; *param_4 = plVar1; param_4[1] = 0; *(int1 *)(param_4 + 2) = 0; } else { Value(local_70,param_3); /* try { // try from 00143278 to 0014328d has its CatchHandler @ 0014334b */ 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> ::data::~data(local_30); if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (long *)0x0) { if (*PTR___libc_single_threaded_001eaf90 == '\0') { LOCK(); piVar2 = (int *)((long)local_68 + 0xc); iVar5 = *piVar2; *piVar2 = *piVar2 + -1; UNLOCK(); } else { iVar5 = *(int *)((long)local_68 + 0xc); *(int *)((long)local_68 + 0xc) = iVar5 + -1; } if (iVar5 == 1) { (**(code **)(*local_68 + 0x18))(); } } } return param_1; }
53,035
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
monkey531[P]llama/common/./minja.hpp
T get(const std::string & key, T default_value) const { if (!contains(key)) return default_value; return at(key).get<T>(); }
O2
cpp
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi movq %rdx, %rsi callq 0x3f246 testb %al, %al je 0x41052 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x32a68 movq %r14, %rdi movq %r12, %rsi callq 0x3cc52 movq %rbx, %rdi movq %rax, %rsi callq 0x3c692 leaq 0x8(%rsp), %rdi callq 0x328fa jmp 0x4105d movq %rbx, %rdi movq %r12, %rsi callq 0x21a70 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x328fa movq %rbx, %rdi callq 0x21e50
_ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_: push r15 push r14 push r12 push rbx sub rsp, 58h mov r12, rcx mov r15, rdx mov r14, 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_41052 lea r12, [rsp+78h+var_70] mov rdi, r12 mov rsi, r15 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r14; this mov rsi, r12; 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 rdi, [rsp+78h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_4105D loc_41052: mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_; std::string::basic_string(std::string&&) loc_4105D: 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
long long minja::Value::get<std::string>(long long a1, minja::Value *a2, long long a3, long long a4) { minja::Value *v5; // rax _OWORD v7[7]; // [rsp+8h] [rbp-70h] BYREF if ( minja::Value::contains((long long)a2) ) { minja::Value::Value(v7); v5 = (minja::Value *)minja::Value::at(a2, (const minja::Value *)v7); minja::Value::get<std::string>(a1, v5); minja::Value::~Value((minja::Value *)v7); } else { std::string::basic_string(a1, a4); } return a1; }
get<std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R12,RCX MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RDI,RSI MOV RSI,RDX CALL 0x0013f246 TEST AL,AL JZ 0x00141052 LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 CALL 0x00132a68 LAB_00141030: MOV RDI,R14 MOV RSI,R12 CALL 0x0013cc52 MOV RDI,RBX MOV RSI,RAX CALL 0x0013c692 LAB_00141046: LEA RDI,[RSP + 0x8] CALL 0x001328fa JMP 0x0014105d LAB_00141052: MOV RDI,RBX MOV RSI,R12 CALL 0x00121a70 LAB_0014105d: 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 */ string * minja::Value::get<std::__cxx11::string> (string *param_1,string *param_2,string *param_3,string *param_4) { char cVar1; Value local_70 [80]; cVar1 = contains(param_2); if (cVar1 == '\0') { std::__cxx11::string::string(param_1,param_4); } else { Value(local_70,param_3); /* try { // try from 00141030 to 00141045 has its CatchHandler @ 0014106c */ at((Value *)param_2,local_70); get<std::__cxx11::string>(); ~Value(local_70); } return param_1; }
53,036
ma_rec_pack
eloqsql/storage/maria/ma_dynrec.c
uint _ma_rec_pack(MARIA_HA *info, register uchar *to, register const uchar *from) { uint length,new_length,flag,bit,i; const uchar *pos,*end; uchar *startpos,*packpos; enum en_fieldtype type; reg3 MARIA_COLUMNDEF *column; MARIA_BLOB *blob; DBUG_ENTER("_ma_rec_pack"); flag= 0; bit= 1; startpos= packpos=to; to+= info->s->base.pack_bytes; blob= info->blobs; column= info->s->columndef; if (info->s->base.null_bytes) { memcpy(to, from, info->s->base.null_bytes); from+= info->s->base.null_bytes; to+= info->s->base.null_bytes; } for (i=info->s->base.fields ; i-- > 0; from+= length, column++) { length=(uint) column->length; if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL) { if (type == FIELD_BLOB) { if (!blob->length) flag|=bit; else { char *temp_pos; size_t tmp_length=length-portable_sizeof_char_ptr; memcpy(to,from,tmp_length); memcpy(&temp_pos,from+tmp_length,sizeof(char*)); memcpy(to+tmp_length,temp_pos,(size_t) blob->length); to+=tmp_length+blob->length; } blob++; } else if (type == FIELD_SKIP_ZERO) { if (memcmp(from, maria_zero_string, length) == 0) flag|=bit; else { memcpy(to, from, (size_t) length); to+=length; } } else if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE) { pos= from; end= from + length; if (type == FIELD_SKIP_ENDSPACE) { /* Pack trailing spaces */ while (end > from && *(end-1) == ' ') end--; } else { /* Pack pref-spaces */ while (pos < end && *pos == ' ') pos++; } new_length=(uint) (end-pos); if (new_length + 1 + MY_TEST(column->length > 255 && new_length > 127) < length) { if (column->length > 255 && new_length > 127) { to[0]= (uchar) ((new_length & 127) + 128); to[1]= (uchar) (new_length >> 7); to+=2; } else *to++= (uchar) new_length; memcpy(to, pos, (size_t) new_length); to+=new_length; flag|=bit; } else { memcpy(to,from,(size_t) length); to+=length; } } else if (type == FIELD_VARCHAR) { uint pack_length= HA_VARCHAR_PACKLENGTH(column->length -1); uint tmp_length; if (pack_length == 1) { tmp_length= (uint) *from; *to++= *from; } else { tmp_length= uint2korr(from); store_key_length_inc(to,tmp_length); } if (tmp_length > column->length) { my_errno= HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(0); } memcpy(to, from+pack_length,tmp_length); to+= tmp_length; continue; } else { memcpy(to,from,(size_t) length); to+=length; continue; /* Normal field */ } if ((bit= bit << 1) >= 256) { *packpos++ = (uchar) flag; bit=1; flag=0; } } else { memcpy(to,from,(size_t) length); to+=length; } } if (bit != 1) *packpos= (uchar) flag; if (info->s->calc_checksum) *to++= (uchar) info->cur_row.checksum; DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos))); DBUG_RETURN((uint) (to-startpos)); }
O3
c
ma_rec_pack: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r12 movq %rsi, %rbx movq (%rdi), %rax movl 0x3f4(%rax), %r14d movl 0x3fc(%rax), %edx addq %rsi, %r14 movq 0x288(%rdi), %rcx movq %rcx, -0x58(%rbp) movq 0x588(%rax), %r15 testq %rdx, %rdx movq %rdi, -0x60(%rbp) je 0x471a0 movq %rdi, %r13 movq %r14, %rdi movq %r12, %rsi callq 0x29080 movq (%r13), %rax movl 0x3fc(%rax), %ecx addq %rcx, %r12 addq %rcx, %r14 movq %r14, %rcx movl 0x3c8(%rax), %r14d testl %r14d, %r14d je 0x47466 movq %rbx, -0x48(%rbp) movq %rbx, -0x40(%rbp) movl $0x1, -0x2c(%rbp) movl $0x0, -0x30(%rbp) movq %rcx, %rbx decl %r14d movzwl 0x8(%r15), %r8d movl (%r15), %ecx testl %ecx, %ecx je 0x472bd cmpl $0x3, %ecx je 0x4724a cmpl $0x4, %ecx jne 0x47279 movq -0x58(%rbp), %rcx cmpq $0x0, 0x10(%rcx) je 0x472e1 movl %r14d, -0x34(%rbp) movq %rcx, %r14 movq %rbx, %r13 leal -0x8(%r8), %ebx movq %r13, %rdi movq %r12, %rsi movq %rbx, %rdx movq %r8, -0x50(%rbp) callq 0x29080 movq (%r12,%rbx), %rsi leaq (%rbx,%r13), %rdi movq 0x10(%r14), %rdx callq 0x29080 movq -0x50(%rbp), %r8 addq 0x10(%r14), %rbx addq %rbx, %r13 movq %r13, %rbx movq %r14, %rcx movl -0x34(%rbp), %r14d movl -0x2c(%rbp), %eax jmp 0x472e7 movq %r12, %rdi leaq 0x3b5c0c(%rip), %rsi # 0x3fce60 movq %r8, %rdx movq %r8, %r13 callq 0x29570 testl %eax, %eax je 0x472d6 movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x29080 addq %r13, %rbx movl -0x2c(%rbp), %eax jmp 0x472dc cmpl $0x2, %ecx ja 0x472a8 leaq (%r12,%r8), %rax cmpl $0x1, %ecx jne 0x47314 movq %rax, %rcx cmpq %r12, %rax jbe 0x4729d leaq -0x1(%rcx), %rax cmpb $0x20, -0x1(%rcx) je 0x4728b movq %r12, %rsi movq %rcx, %rax jmp 0x47348 cmpl $0x8, %ecx jne 0x472bd cmpl $0x100, %r8d # imm = 0x100 ja 0x4732b movzbl (%r12), %eax jmp 0x4733b movq %rbx, %rdi movq %r12, %rsi movq %r8, %rdx movq %r8, %r13 callq 0x29080 movq %r13, %r8 addq %r13, %rbx jmp 0x472ff movl -0x2c(%rbp), %eax orl %eax, -0x30(%rbp) movq %r13, %r8 jmp 0x472ef movl -0x2c(%rbp), %eax orl %eax, -0x30(%rbp) addq $0x18, %rcx movq %rcx, -0x58(%rbp) addl %eax, %eax cmpl $0xff, %eax ja 0x47424 movl %eax, -0x2c(%rbp) addq %r8, %r12 addq $0x38, %r15 testl %r14d, %r14d jne 0x471cc jmp 0x47450 movq %r12, %rsi testq %r8, %r8 je 0x47345 cmpb $0x20, (%rsi) jne 0x47348 incq %rsi cmpq %rax, %rsi jb 0x4731c jmp 0x47348 movzwl (%r12), %eax cmpl $0xfe, %eax ja 0x473cf movb %al, (%rbx) incq %rbx jmp 0x473dc movq %r12, %rsi subq %rsi, %rax cmpl $0x100, %r8d # imm = 0x100 setae %dl cmpl $0x7f, %eax seta %cl andb %dl, %cl movzbl %cl, %edx addl %eax, %edx incl %edx cmpl %r8d, %edx jae 0x473b0 movq %rbx, %rdi movl $0x1, %ebx testb %cl, %cl movq %r8, -0x50(%rbp) movl %eax, %ecx je 0x4738b orb $-0x80, %cl movl %eax, %edx shrl $0x7, %edx movb %dl, 0x1(%rdi) movl $0x2, %ebx addq %rdi, %rbx movb %cl, (%rdi) movl %eax, %r13d movq %rbx, %rdi movq %r13, %rdx callq 0x29080 addq %r13, %rbx movl -0x2c(%rbp), %eax orl %eax, -0x30(%rbp) movq -0x50(%rbp), %r8 jmp 0x472ef movq %rbx, %rdi movq %r12, %rsi movq %r8, %rdx movq %r8, %r13 callq 0x29080 movq %r13, %r8 addq %r13, %rbx movl -0x2c(%rbp), %eax jmp 0x472ef movb $-0x1, (%rbx) movb %al, 0x2(%rbx) movb %ah, 0x1(%rbx) addq $0x3, %rbx movzwl 0x8(%r15), %ecx cmpl %ecx, %eax ja 0x47496 cmpl $0x101, %r8d # imm = 0x101 movq %r12, %rsi sbbq $0x0, %rsi addq $0x2, %rsi movl %r14d, -0x34(%rbp) movq %rbx, %r13 movl %eax, %ebx movq %r13, %rdi movq %rbx, %rdx movq %r8, %r14 callq 0x29080 movq %r14, %r8 addq %rbx, %r13 movq %r13, %rbx movl -0x34(%rbp), %r14d jmp 0x472ff movq %rbx, %rcx movq -0x48(%rbp), %rax movl -0x30(%rbp), %edx movb %dl, (%rax) incq %rax movq %rax, -0x48(%rbp) movl %r8d, %eax addq %rax, %r12 addq $0x38, %r15 testl %r14d, %r14d movq -0x40(%rbp), %rbx jne 0x471bb jmp 0x47466 movq %rbx, %rcx cmpl $0x1, -0x2c(%rbp) je 0x47462 movq -0x48(%rbp), %rax movl -0x30(%rbp), %edx movb %dl, (%rax) movq -0x40(%rbp), %rbx movq -0x60(%rbp), %rdx movq (%rdx), %rax cmpq $0x0, 0x6a8(%rax) je 0x47482 movb 0xb0(%rdx), %al movb %al, (%rcx) incq %rcx subl %ebx, %ecx movq %rcx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xa1c92 movl $0x7f, (%rax) xorl %eax, %eax jmp 0x47487
_ma_rec_pack: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rdx mov rbx, rsi mov rax, [rdi] mov r14d, [rax+3F4h] mov edx, [rax+3FCh] add r14, rsi mov rcx, [rdi+288h] mov [rbp+var_58], rcx mov r15, [rax+588h] test rdx, rdx mov [rbp+var_60], rdi jz short loc_471A0 mov r13, rdi mov rdi, r14 mov rsi, r12 call _memcpy mov rax, [r13+0] mov ecx, [rax+3FCh] add r12, rcx add r14, rcx loc_471A0: mov rcx, r14 mov r14d, [rax+3C8h] test r14d, r14d jz loc_47466 mov [rbp+var_48], rbx mov [rbp+var_40], rbx loc_471BB: mov [rbp+var_2C], 1 mov [rbp+var_30], 0 mov rbx, rcx loc_471CC: dec r14d movzx r8d, word ptr [r15+8] mov ecx, [r15] test ecx, ecx jz loc_472BD cmp ecx, 3 jz short loc_4724A cmp ecx, 4 jnz loc_47279 mov rcx, [rbp+var_58] cmp qword ptr [rcx+10h], 0 jz loc_472E1 mov [rbp+var_34], r14d mov r14, rcx mov r13, rbx lea ebx, [r8-8] mov rdi, r13 mov rsi, r12 mov rdx, rbx mov [rbp+var_50], r8 call _memcpy mov rsi, [r12+rbx] lea rdi, [rbx+r13] mov rdx, [r14+10h] call _memcpy mov r8, [rbp+var_50] add rbx, [r14+10h] add r13, rbx mov rbx, r13 mov rcx, r14 mov r14d, [rbp+var_34] mov eax, [rbp+var_2C] jmp loc_472E7 loc_4724A: mov rdi, r12 lea rsi, maria_zero_string mov rdx, r8 mov r13, r8 call _bcmp test eax, eax jz short loc_472D6 mov rdi, rbx mov rsi, r12 mov rdx, r13 call _memcpy add rbx, r13 mov eax, [rbp+var_2C] jmp short loc_472DC loc_47279: cmp ecx, 2 ja short loc_472A8 lea rax, [r12+r8] cmp ecx, 1 jnz loc_47314 loc_4728B: mov rcx, rax cmp rax, r12 jbe short loc_4729D lea rax, [rcx-1] cmp byte ptr [rcx-1], 20h ; ' ' jz short loc_4728B loc_4729D: mov rsi, r12 mov rax, rcx jmp loc_47348 loc_472A8: cmp ecx, 8 jnz short loc_472BD cmp r8d, 100h ja short loc_4732B movzx eax, byte ptr [r12] jmp short loc_4733B loc_472BD: mov rdi, rbx mov rsi, r12 mov rdx, r8 mov r13, r8 call _memcpy mov r8, r13 add rbx, r13 jmp short loc_472FF loc_472D6: mov eax, [rbp+var_2C] or [rbp+var_30], eax loc_472DC: mov r8, r13 jmp short loc_472EF loc_472E1: mov eax, [rbp+var_2C] or [rbp+var_30], eax loc_472E7: add rcx, 18h mov [rbp+var_58], rcx loc_472EF: add eax, eax cmp eax, 0FFh ja loc_47424 mov [rbp+var_2C], eax loc_472FF: add r12, r8 add r15, 38h ; '8' test r14d, r14d jnz loc_471CC jmp loc_47450 loc_47314: mov rsi, r12 test r8, r8 jz short loc_47345 loc_4731C: cmp byte ptr [rsi], 20h ; ' ' jnz short loc_47348 inc rsi cmp rsi, rax jb short loc_4731C jmp short loc_47348 loc_4732B: movzx eax, word ptr [r12] cmp eax, 0FEh ja loc_473CF loc_4733B: mov [rbx], al inc rbx jmp loc_473DC loc_47345: mov rsi, r12 loc_47348: sub rax, rsi cmp r8d, 100h setnb dl cmp eax, 7Fh setnbe cl and cl, dl movzx edx, cl add edx, eax inc edx cmp edx, r8d jnb short loc_473B0 mov rdi, rbx mov ebx, 1 test cl, cl mov [rbp+var_50], r8 mov ecx, eax jz short loc_4738B or cl, 80h mov edx, eax shr edx, 7 mov [rdi+1], dl mov ebx, 2 loc_4738B: add rbx, rdi mov [rdi], cl mov r13d, eax mov rdi, rbx mov rdx, r13 call _memcpy add rbx, r13 mov eax, [rbp+var_2C] or [rbp+var_30], eax mov r8, [rbp+var_50] jmp loc_472EF loc_473B0: mov rdi, rbx mov rsi, r12 mov rdx, r8 mov r13, r8 call _memcpy mov r8, r13 add rbx, r13 mov eax, [rbp+var_2C] jmp loc_472EF loc_473CF: mov byte ptr [rbx], 0FFh mov [rbx+2], al mov [rbx+1], ah add rbx, 3 loc_473DC: movzx ecx, word ptr [r15+8] cmp eax, ecx ja loc_47496 cmp r8d, 101h mov rsi, r12 sbb rsi, 0 add rsi, 2 mov [rbp+var_34], r14d mov r13, rbx mov ebx, eax mov rdi, r13 mov rdx, rbx mov r14, r8 call _memcpy mov r8, r14 add r13, rbx mov rbx, r13 mov r14d, [rbp+var_34] jmp loc_472FF loc_47424: mov rcx, rbx mov rax, [rbp+var_48] mov edx, [rbp+var_30] mov [rax], dl inc rax mov [rbp+var_48], rax mov eax, r8d add r12, rax add r15, 38h ; '8' test r14d, r14d mov rbx, [rbp+var_40] jnz loc_471BB jmp short loc_47466 loc_47450: mov rcx, rbx cmp [rbp+var_2C], 1 jz short loc_47462 mov rax, [rbp+var_48] mov edx, [rbp+var_30] mov [rax], dl loc_47462: mov rbx, [rbp+var_40] loc_47466: mov rdx, [rbp+var_60] mov rax, [rdx] cmp qword ptr [rax+6A8h], 0 jz short loc_47482 mov al, [rdx+0B0h] mov [rcx], al inc rcx loc_47482: sub ecx, ebx mov rax, rcx loc_47487: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_47496: call _my_thread_var mov dword ptr [rax], 7Fh xor eax, eax jmp short loc_47487
long long ma_rec_pack(unsigned __int8 *a1, _BYTE *a2, unsigned __int8 *a3) { int v4; // ebx long long v5; // rax long long v6; // rdx unsigned __int8 *v7; // r14 long long v8; // r15 unsigned __int8 *v9; // r13 long long v10; // rcx unsigned __int8 *v11; // rcx int v12; // r14d unsigned __int8 *v13; // rbx long long v14; // r8 unsigned int v15; // ecx long long v16; // rcx unsigned __int8 *v17; // r13 long long v18; // rbx int v19; // eax long long v20; // r13 unsigned __int8 *v21; // rax unsigned __int8 *v22; // rcx unsigned __int8 *v23; // rsi unsigned int v24; // eax long long v25; // r13 unsigned int v26; // eax unsigned __int8 *v27; // rbx unsigned int v28; // eax bool v29; // cl unsigned __int8 *v30; // rdi long long v31; // rbx bool v32; // zf unsigned __int8 v33; // cl long long v34; // r13 long long v35; // r13 unsigned __int8 *v36; // r13 long long v37; // rbx long long v38; // r14 unsigned __int8 *v40; // [rsp+0h] [rbp-60h] long long v41; // [rsp+8h] [rbp-58h] long long v42; // [rsp+10h] [rbp-50h] long long v43; // [rsp+10h] [rbp-50h] _BYTE *v44; // [rsp+18h] [rbp-48h] int v45; // [rsp+20h] [rbp-40h] int v46; // [rsp+2Ch] [rbp-34h] int v47; // [rsp+30h] [rbp-30h] int v48; // [rsp+34h] [rbp-2Ch] v4 = (int)a2; v5 = *(_QWORD *)a1; v6 = *(unsigned int *)(*(_QWORD *)a1 + 1020LL); v7 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 1012LL)]; v41 = *((_QWORD *)a1 + 81); v8 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL); v40 = a1; if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) ) { v9 = a1; a1 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 1012LL)]; memcpy(v7, a3, v6); v5 = *(_QWORD *)v9; v10 = *(unsigned int *)(*(_QWORD *)v9 + 1020LL); a3 += v10; v7 += v10; } v11 = v7; v12 = *(_DWORD *)(v5 + 968); if ( v12 ) { v44 = a2; v45 = (int)a2; LABEL_5: v48 = 1; v47 = 0; v13 = v11; while ( 1 ) { --v12; v14 = *(unsigned __int16 *)(v8 + 8); v15 = *(_DWORD *)v8; if ( !*(_DWORD *)v8 ) goto LABEL_21; if ( v15 == 3 ) { a1 = a3; v20 = *(unsigned __int16 *)(v8 + 8); if ( (unsigned int)bcmp(a3, &maria_zero_string, v20) ) { a1 = v13; memcpy(v13, a3, v20); v13 += v20; v19 = v48; } else { v19 = v48; v47 |= v48; } v14 = v20; } else if ( v15 == 4 ) { v16 = v41; if ( *(_QWORD *)(v41 + 16) ) { v17 = v13; v18 = (unsigned int)(v14 - 8); v42 = *(unsigned __int16 *)(v8 + 8); memcpy(v17, a3, v18); a1 = &v17[v18]; memcpy(&v17[v18], *(_QWORD *)&a3[v18], *(_QWORD *)(v41 + 16)); v14 = v42; v13 = &v17[*(_QWORD *)(v41 + 16) + v18]; v16 = v41; v19 = v48; } else { v19 = v48; v47 |= v48; } v41 = v16 + 24; } else { if ( v15 > 2 ) { if ( v15 == 8 ) { if ( (unsigned int)v14 <= 0x100 ) { v24 = *a3; goto LABEL_35; } v24 = *(unsigned __int16 *)a3; if ( v24 > 0xFE ) { *v13 = -1; v13[2] = v24; v13[1] = BYTE1(v24); v27 = v13 + 3; } else { LABEL_35: *v13 = v24; v27 = v13 + 1; } if ( v24 > *(unsigned __int16 *)(v8 + 8) ) { *(_DWORD *)my_thread_var(a1) = 127; return 0LL; } v46 = v12; v36 = v27; v37 = v24; a1 = v36; v38 = v14; memcpy(v36, &a3[-((unsigned int)v14 < 0x101) + 2], v24); v14 = v38; v13 = &v36[v37]; v12 = v46; goto LABEL_28; } LABEL_21: a1 = v13; v25 = *(unsigned __int16 *)(v8 + 8); memcpy(v13, a3, v25); v14 = v25; v13 += v25; goto LABEL_28; } v21 = &a3[v14]; if ( v15 == 1 ) { do { v22 = v21; if ( v21 <= a3 ) break; --v21; } while ( *(v22 - 1) == 32 ); v23 = a3; LODWORD(v21) = (_DWORD)v22; } else { v23 = a3; if ( *(_WORD *)(v8 + 8) ) { do { if ( *v23 != 32 ) break; ++v23; } while ( v23 < v21 ); } else { v23 = a3; } } v28 = (_DWORD)v21 - (_DWORD)v23; v29 = (unsigned int)v14 >= 0x100 && v28 > 0x7F; if ( v28 + v29 + 1 >= (unsigned int)v14 ) { a1 = v13; v35 = *(unsigned __int16 *)(v8 + 8); memcpy(v13, a3, v35); v14 = v35; v13 += v35; v19 = v48; } else { v30 = v13; v31 = 1LL; v32 = !v29; v43 = *(unsigned __int16 *)(v8 + 8); v33 = v28; if ( !v32 ) { v33 = v28 | 0x80; v30[1] = v28 >> 7; v31 = 2LL; } *v30 = v33; v34 = v28; a1 = &v30[v31]; memcpy(a1, v23, v28); v13 = &a1[v34]; v19 = v48; v47 |= v48; v14 = v43; } } v26 = 2 * v19; if ( v26 > 0xFF ) { v11 = v13; *v44++ = v47; a3 += (unsigned int)v14; v8 += 56LL; v4 = v45; if ( v12 ) goto LABEL_5; break; } v48 = v26; LABEL_28: a3 += v14; v8 += 56LL; if ( !v12 ) { v11 = v13; if ( v48 != 1 ) *v44 = v47; v4 = v45; break; } } } if ( *(_QWORD *)(*(_QWORD *)v40 + 1704LL) ) { *v11 = v40[176]; LODWORD(v11) = (_DWORD)v11 + 1; } return (unsigned int)((_DWORD)v11 - v4); }
_ma_rec_pack: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RDX MOV RBX,RSI MOV RAX,qword ptr [RDI] MOV R14D,dword ptr [RAX + 0x3f4] MOV EDX,dword ptr [RAX + 0x3fc] ADD R14,RSI MOV RCX,qword ptr [RDI + 0x288] MOV qword ptr [RBP + -0x58],RCX MOV R15,qword ptr [RAX + 0x588] TEST RDX,RDX MOV qword ptr [RBP + -0x60],RDI JZ 0x001471a0 MOV R13,RDI MOV RDI,R14 MOV RSI,R12 CALL 0x00129080 MOV RAX,qword ptr [R13] MOV ECX,dword ptr [RAX + 0x3fc] ADD R12,RCX ADD R14,RCX LAB_001471a0: MOV RCX,R14 MOV R14D,dword ptr [RAX + 0x3c8] TEST R14D,R14D JZ 0x00147466 MOV qword ptr [RBP + -0x48],RBX MOV qword ptr [RBP + -0x40],RBX LAB_001471bb: MOV dword ptr [RBP + -0x2c],0x1 MOV dword ptr [RBP + -0x30],0x0 MOV RBX,RCX LAB_001471cc: DEC R14D MOVZX R8D,word ptr [R15 + 0x8] MOV ECX,dword ptr [R15] TEST ECX,ECX JZ 0x001472bd CMP ECX,0x3 JZ 0x0014724a CMP ECX,0x4 JNZ 0x00147279 MOV RCX,qword ptr [RBP + -0x58] CMP qword ptr [RCX + 0x10],0x0 JZ 0x001472e1 MOV dword ptr [RBP + -0x34],R14D MOV R14,RCX MOV R13,RBX LEA EBX,[R8 + -0x8] MOV RDI,R13 MOV RSI,R12 MOV RDX,RBX MOV qword ptr [RBP + -0x50],R8 CALL 0x00129080 MOV RSI,qword ptr [R12 + RBX*0x1] LEA RDI,[RBX + R13*0x1] MOV RDX,qword ptr [R14 + 0x10] CALL 0x00129080 MOV R8,qword ptr [RBP + -0x50] ADD RBX,qword ptr [R14 + 0x10] ADD R13,RBX MOV RBX,R13 MOV RCX,R14 MOV R14D,dword ptr [RBP + -0x34] MOV EAX,dword ptr [RBP + -0x2c] JMP 0x001472e7 LAB_0014724a: MOV RDI,R12 LEA RSI,[0x4fce60] MOV RDX,R8 MOV R13,R8 CALL 0x00129570 TEST EAX,EAX JZ 0x001472d6 MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x00129080 ADD RBX,R13 MOV EAX,dword ptr [RBP + -0x2c] JMP 0x001472dc LAB_00147279: CMP ECX,0x2 JA 0x001472a8 LEA RAX,[R12 + R8*0x1] CMP ECX,0x1 JNZ 0x00147314 LAB_0014728b: MOV RCX,RAX CMP RAX,R12 JBE 0x0014729d LEA RAX,[RCX + -0x1] CMP byte ptr [RCX + -0x1],0x20 JZ 0x0014728b LAB_0014729d: MOV RSI,R12 MOV RAX,RCX JMP 0x00147348 LAB_001472a8: CMP ECX,0x8 JNZ 0x001472bd CMP R8D,0x100 JA 0x0014732b MOVZX EAX,byte ptr [R12] JMP 0x0014733b LAB_001472bd: MOV RDI,RBX MOV RSI,R12 MOV RDX,R8 MOV R13,R8 CALL 0x00129080 MOV R8,R13 ADD RBX,R13 JMP 0x001472ff LAB_001472d6: MOV EAX,dword ptr [RBP + -0x2c] OR dword ptr [RBP + -0x30],EAX LAB_001472dc: MOV R8,R13 JMP 0x001472ef LAB_001472e1: MOV EAX,dword ptr [RBP + -0x2c] OR dword ptr [RBP + -0x30],EAX LAB_001472e7: ADD RCX,0x18 MOV qword ptr [RBP + -0x58],RCX LAB_001472ef: ADD EAX,EAX CMP EAX,0xff JA 0x00147424 MOV dword ptr [RBP + -0x2c],EAX LAB_001472ff: ADD R12,R8 ADD R15,0x38 TEST R14D,R14D JNZ 0x001471cc JMP 0x00147450 LAB_00147314: MOV RSI,R12 TEST R8,R8 JZ 0x00147345 LAB_0014731c: CMP byte ptr [RSI],0x20 JNZ 0x00147348 INC RSI CMP RSI,RAX JC 0x0014731c JMP 0x00147348 LAB_0014732b: MOVZX EAX,word ptr [R12] CMP EAX,0xfe JA 0x001473cf LAB_0014733b: MOV byte ptr [RBX],AL INC RBX JMP 0x001473dc LAB_00147345: MOV RSI,R12 LAB_00147348: SUB RAX,RSI CMP R8D,0x100 SETNC DL CMP EAX,0x7f SETA CL AND CL,DL MOVZX EDX,CL ADD EDX,EAX INC EDX CMP EDX,R8D JNC 0x001473b0 MOV RDI,RBX MOV EBX,0x1 TEST CL,CL MOV qword ptr [RBP + -0x50],R8 MOV ECX,EAX JZ 0x0014738b OR CL,0x80 MOV EDX,EAX SHR EDX,0x7 MOV byte ptr [RDI + 0x1],DL MOV EBX,0x2 LAB_0014738b: ADD RBX,RDI MOV byte ptr [RDI],CL MOV R13D,EAX MOV RDI,RBX MOV RDX,R13 CALL 0x00129080 ADD RBX,R13 MOV EAX,dword ptr [RBP + -0x2c] OR dword ptr [RBP + -0x30],EAX MOV R8,qword ptr [RBP + -0x50] JMP 0x001472ef LAB_001473b0: MOV RDI,RBX MOV RSI,R12 MOV RDX,R8 MOV R13,R8 CALL 0x00129080 MOV R8,R13 ADD RBX,R13 MOV EAX,dword ptr [RBP + -0x2c] JMP 0x001472ef LAB_001473cf: MOV byte ptr [RBX],0xff MOV byte ptr [RBX + 0x2],AL MOV byte ptr [RBX + 0x1],AH ADD RBX,0x3 LAB_001473dc: MOVZX ECX,word ptr [R15 + 0x8] CMP EAX,ECX JA 0x00147496 CMP R8D,0x101 MOV RSI,R12 SBB RSI,0x0 ADD RSI,0x2 MOV dword ptr [RBP + -0x34],R14D MOV R13,RBX MOV EBX,EAX MOV RDI,R13 MOV RDX,RBX MOV R14,R8 CALL 0x00129080 MOV R8,R14 ADD R13,RBX MOV RBX,R13 MOV R14D,dword ptr [RBP + -0x34] JMP 0x001472ff LAB_00147424: MOV RCX,RBX MOV RAX,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x30] MOV byte ptr [RAX],DL INC RAX MOV qword ptr [RBP + -0x48],RAX MOV EAX,R8D ADD R12,RAX ADD R15,0x38 TEST R14D,R14D MOV RBX,qword ptr [RBP + -0x40] JNZ 0x001471bb JMP 0x00147466 LAB_00147450: MOV RCX,RBX CMP dword ptr [RBP + -0x2c],0x1 JZ 0x00147462 MOV RAX,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x30] MOV byte ptr [RAX],DL LAB_00147462: MOV RBX,qword ptr [RBP + -0x40] LAB_00147466: MOV RDX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RDX] CMP qword ptr [RAX + 0x6a8],0x0 JZ 0x00147482 MOV AL,byte ptr [RDX + 0xb0] MOV byte ptr [RCX],AL INC RCX LAB_00147482: SUB ECX,EBX MOV RAX,RCX LAB_00147487: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00147496: CALL 0x001a1c92 MOV dword ptr [RAX],0x7f XOR EAX,EAX JMP 0x00147487
int _ma_rec_pack(long *param_1,int1 *param_2,ushort *param_3) { ushort uVar1; ushort uVar2; ushort *puVar3; int iVar4; uint uVar5; ulong uVar6; int1 *puVar8; int4 *puVar9; byte bVar10; long lVar11; ushort *puVar12; uint uVar13; ulong __n; int iVar14; byte *pbVar15; uint *puVar16; long local_60; uint local_38; uint local_34; ushort *puVar7; lVar11 = *param_1; pbVar15 = param_2 + *(uint *)(lVar11 + 0x3f4); local_60 = param_1[0x51]; puVar16 = *(uint **)(lVar11 + 0x588); if ((ulong)*(uint *)(lVar11 + 0x3fc) != 0) { memcpy(pbVar15,param_3,(ulong)*(uint *)(lVar11 + 0x3fc)); lVar11 = *param_1; param_3 = (ushort *)((long)param_3 + (ulong)*(uint *)(lVar11 + 0x3fc)); pbVar15 = pbVar15 + *(uint *)(lVar11 + 0x3fc); } iVar14 = *(int *)(lVar11 + 0x3c8); puVar8 = param_2; joined_r0x001471ad: if (iVar14 == 0) { LAB_00147466: if (*(long *)(*param_1 + 0x6a8) != 0) { *pbVar15 = *(byte *)(param_1 + 0x16); pbVar15 = pbVar15 + 1; } return (int)pbVar15 - (int)param_2; } local_34 = 1; local_38 = 0; do { iVar14 = iVar14 + -1; uVar1 = (ushort)puVar16[2]; __n = (ulong)uVar1; uVar5 = *puVar16; if (uVar5 == 0) { LAB_001472bd: memcpy(pbVar15,param_3,__n); pbVar15 = pbVar15 + __n; } else { if (uVar5 == 3) { iVar4 = bcmp(param_3,maria_zero_string,__n); if (iVar4 == 0) { local_38 = local_38 | local_34; } else { memcpy(pbVar15,param_3,__n); pbVar15 = pbVar15 + __n; } } else if (uVar5 == 4) { if (*(long *)(local_60 + 0x10) == 0) { local_38 = local_38 | local_34; } else { uVar6 = (ulong)(uVar1 - 8); memcpy(pbVar15,param_3,uVar6); memcpy(pbVar15 + uVar6,*(void **)((long)param_3 + uVar6),*(size_t *)(local_60 + 0x10)); pbVar15 = pbVar15 + uVar6 + *(long *)(local_60 + 0x10); } local_60 = local_60 + 0x18; } else { if (2 < uVar5) { if (uVar5 != 8) goto LAB_001472bd; if (uVar1 < 0x101) { uVar5 = (uint)(byte)*param_3; LAB_0014733b: uVar13 = uVar5; *pbVar15 = (byte)uVar13; pbVar15 = pbVar15 + 1; } else { uVar2 = *param_3; uVar13 = (uint)uVar2; uVar5 = (uint)uVar2; if (uVar2 < 0xff) goto LAB_0014733b; *pbVar15 = 0xff; pbVar15[2] = (byte)uVar2; pbVar15[1] = (byte)(uVar2 >> 8); pbVar15 = pbVar15 + 3; } if ((ushort)puVar16[2] < uVar13) { puVar9 = (int4 *)_my_thread_var(); *puVar9 = 0x7f; return 0; } memcpy(pbVar15,(byte *)((long)param_3 + (2 - (ulong)(uVar1 < 0x101))),(ulong)uVar13); pbVar15 = pbVar15 + uVar13; goto LAB_001472ff; } puVar7 = (ushort *)((long)param_3 + __n); puVar3 = puVar7; puVar12 = param_3; if (uVar5 == 1) { do { puVar7 = puVar3; if (puVar7 <= param_3) break; puVar3 = (ushort *)((long)puVar7 + -1); } while (*(byte *)((long)puVar7 + -1) == 0x20); } else if (__n != 0) { do { if ((byte)*puVar12 != 0x20) break; puVar12 = (ushort *)((long)puVar12 + 1); } while (puVar12 < puVar7); } uVar6 = (long)puVar7 - (long)puVar12; uVar13 = (uint)uVar1; uVar5 = (uint)uVar6; if ((0x7f < uVar5 && 0xff < uVar13) + uVar5 + 1 < uVar13) { lVar11 = 1; bVar10 = (byte)uVar6; if (0x7f < uVar5 && 0xff < uVar13) { bVar10 = bVar10 | 0x80; pbVar15[1] = (byte)(uVar6 >> 7); lVar11 = 2; } *pbVar15 = bVar10; memcpy(pbVar15 + lVar11,puVar12,uVar6 & 0xffffffff); pbVar15 = pbVar15 + lVar11 + (uVar6 & 0xffffffff); local_38 = local_38 | local_34; } else { memcpy(pbVar15,param_3,__n); pbVar15 = pbVar15 + __n; } } local_34 = local_34 * 2; if (0xff < local_34) break; } LAB_001472ff: param_3 = (ushort *)((long)param_3 + __n); puVar16 = puVar16 + 0xe; if (iVar14 == 0) { if (local_34 != 1) { *puVar8 = (char)local_38; } goto LAB_00147466; } } while( true ); *puVar8 = (char)local_38; puVar8 = puVar8 + 1; param_3 = (ushort *)((long)param_3 + __n); puVar16 = puVar16 + 0xe; goto joined_r0x001471ad; }
53,037
coro::detail::when_all_task<void> coro::detail::make_when_all_task<coro::task<void>, void>(coro::task<void>) (.resume)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_all.hpp
static auto make_when_all_task(awaitable a) -> when_all_task<return_type> { if constexpr (std::is_void_v<return_type>) { co_await static_cast<awaitable&&>(a); co_return; } else { co_yield co_await static_cast<awaitable&&>(a); } }
O3
cpp
coro::detail::when_all_task<void> coro::detail::make_when_all_task<coro::task<void>, void>(coro::task<void>) (.resume): pushq %rbx movq %rdi, %rbx cmpq $0x0, 0x18(%rdi) je 0x48e0 leaq 0x18(%rbx), %rdi callq 0x3280 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x48ec callq *0x8(%rdi) movl $0x38, %esi movq %rbx, %rdi popq %rbx jmp 0x32d0 movq %rax, %rdi callq 0x4bee
_ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy: push rbx mov rbx, rdi cmp qword ptr [rdi+18h], 0 jz short loc_48E0 lea rdi, [rbx+18h]; this call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void) loc_48E0: mov rdi, [rbx+28h] test rdi, rdi jz short loc_48EC call qword ptr [rdi+8] loc_48EC: mov esi, 38h ; '8'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong) mov rdi, rax call __clang_call_terminate
void ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy( _QWORD *a1) { long long v2; // rdi if ( a1[3] ) std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)(a1 + 3)); v2 = a1[5]; if ( v2 ) (*(void (**)(void))(v2 + 8))(); operator delete(a1, 0x38uLL); }
_ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET_.destroy: PUSH RBX MOV RBX,RDI CMP qword ptr [RDI + 0x18],0x0 JZ 0x001048e0 LEA RDI,[RBX + 0x18] CALL 0x00103280 LAB_001048e0: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x001048ec LAB_001048e9: CALL qword ptr [RDI + 0x8] LAB_001048ec: MOV ESI,0x38 MOV RDI,RBX POP RBX JMP 0x001032d0
void _ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy (void *param_1) { if (*(long *)((long)param_1 + 0x18) != 0) { std::__exception_ptr::exception_ptr::_M_release(); } if (*(long *)((long)param_1 + 0x28) != 0) { /* try { // try from 001048e9 to 001048eb has its CatchHandler @ 001048fa */ (**(code **)(*(long *)((long)param_1 + 0x28) + 8))(); } operator_delete(param_1,0x38); return; }
53,038
maria_page_crc_check_index
eloqsql/storage/maria/ma_pagecrc.c
my_bool maria_page_crc_check_index(int res, PAGECACHE_IO_HOOK_ARGS *args) { uchar *page= args->page; pgcache_page_no_t page_no= args->pageno; MARIA_SHARE *share= (MARIA_SHARE *)args->data; uint length= _ma_get_page_used(share, page); if (res) return 1; if (length > share->block_size - CRC_SIZE) { DBUG_PRINT("error", ("Wrong page length: %u", length)); my_errno= HA_ERR_WRONG_CRC; return 1; } return maria_page_crc_check(page, (uint32) page_no, share, MARIA_NO_CRC_NORMAL_PAGE, length); }
O3
c
maria_page_crc_check_index: testl %edi, %edi jne 0x41021 movq (%rsi), %rdi movq 0x10(%rsi), %rdx movl 0x744(%rdx), %eax movzwl -0x2(%rdi,%rax), %eax rolw $0x8, %ax movzwl %ax, %r8d movl 0x7bc(%rdx), %eax addl $-0x4, %eax cmpl %eax, %r8d jbe 0x41024 pushq %rbp movq %rsp, %rbp callq 0xa8156 movl $0xb0, (%rax) popq %rbp movb $0x1, %al retq movl 0x8(%rsi), %esi movl $0xffffffff, %ecx # imm = 0xFFFFFFFF jmp 0x40e80
maria_page_crc_check_index: test edi, edi jnz short loc_41021 mov rdi, [rsi] mov rdx, [rsi+10h] mov eax, [rdx+744h] movzx eax, word ptr [rdi+rax-2] rol ax, 8 movzx r8d, ax mov eax, [rdx+7BCh] add eax, 0FFFFFFFCh cmp r8d, eax jbe short loc_41024 push rbp mov rbp, rsp call _my_thread_var mov dword ptr [rax], 0B0h pop rbp loc_41021: mov al, 1 retn loc_41024: mov esi, [rsi+8] mov ecx, 0FFFFFFFFh jmp maria_page_crc_check
char maria_page_crc_check_index(int a1, long long a2) { long long v2; // rdi long long v3; // rdx unsigned int v4; // r8d if ( a1 ) return 1; v2 = *(_QWORD *)a2; v3 = *(_QWORD *)(a2 + 16); v4 = (unsigned __int16)__ROL2__(*(_WORD *)(*(_QWORD *)a2 + *(unsigned int *)(v3 + 1860) - 2LL), 8); if ( v4 > *(_DWORD *)(v3 + 1980) - 4 ) { *(_DWORD *)my_thread_var(v2) = 176; return 1; } return maria_page_crc_check(v2, *(_DWORD *)(a2 + 8), v3, -1, v4); }
maria_page_crc_check_index: TEST EDI,EDI JNZ 0x00141021 MOV RDI,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x10] MOV EAX,dword ptr [RDX + 0x744] MOVZX EAX,word ptr [RDI + RAX*0x1 + -0x2] ROL AX,0x8 MOVZX R8D,AX MOV EAX,dword ptr [RDX + 0x7bc] ADD EAX,-0x4 CMP R8D,EAX JBE 0x00141024 PUSH RBP MOV RBP,RSP CALL 0x001a8156 MOV dword ptr [RAX],0xb0 POP RBP LAB_00141021: MOV AL,0x1 RET LAB_00141024: MOV ESI,dword ptr [RSI + 0x8] MOV ECX,0xffffffff JMP 0x00140e80
int8 maria_page_crc_check_index(int param_1,long *param_2) { ushort uVar1; long lVar2; int4 *puVar3; int8 uVar4; if (param_1 == 0) { lVar2 = param_2[2]; uVar1 = *(ushort *)(*param_2 + -2 + (ulong)*(uint *)(lVar2 + 0x744)); if ((uint)(ushort)(uVar1 << 8 | uVar1 >> 8) <= *(int *)(lVar2 + 0x7bc) - 4U) { uVar4 = maria_page_crc_check(*param_2,(int)param_2[1],lVar2,0xffffffff); return uVar4; } puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0xb0; } return 1; }
53,039
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object()
llama.cpp/common/json.hpp
bool end_object() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_object()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x8c842 movq -0x8(%rax), %rcx cmpb $0x1, (%rcx) jne 0x8c85e addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x8d64f(%rip), %rdi # 0x119e98 leaq 0x8d683(%rip), %rdx # 0x119ed3 leaq 0x8e634(%rip), %rcx # 0x11ae8b movl $0x1aeb, %esi # imm = 0x1AEB jmp 0x8c878 leaq 0x8d633(%rip), %rdi # 0x119e98 leaq 0x8d667(%rip), %rdx # 0x119ed3 leaq 0x8e5c6(%rip), %rcx # 0x11ae39 movl $0x1aec, %esi # imm = 0x1AEC xorl %eax, %eax callq 0x20e70 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_8C842 mov rcx, [rax-8] cmp byte ptr [rcx], 1 jnz short loc_8C85E add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_8C842: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1AEBh jmp short loc_8C878 loc_8C85E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs+20h; "ref_stack.back()->is_object()" mov esi, 1AECh loc_8C878: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_object( long long a1) { long long v1; // rax long long v3; // rsi v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6891LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 6891LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 1 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6892LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 6892LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_object()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v3); }
end_object: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x0018c842 MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x1 JNZ 0x0018c85e ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_0018c842: LEA RDI,[0x219e98] LEA RDX,[0x219ed3] LEA RCX,[0x21ae8b] MOV ESI,0x1aeb JMP 0x0018c878 LAB_0018c85e: LEA RDI,[0x219e98] LEA RDX,[0x219ed3] LEA RCX,[0x21ae39] MOV ESI,0x1aec LAB_0018c878: XOR EAX,EAX CALL 0x00120e70
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_object() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_object(json_sax_dom_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) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1aeb; } else { if (**(char **)(lVar1 + -8) == '\x01') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_object()"; uVar3 = 0x1aec; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
53,040
serial_cpp::Serial::SerialImpl::writeLock()
ami-iit[P]serial_cpp/src/impl/unix.cc
void Serial::SerialImpl::writeLock () { int result = pthread_mutex_lock(&this->write_mutex); if (result) { THROW (IOException, result); } }
O2
cpp
serial_cpp::Serial::SerialImpl::writeLock(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp addq $0x90, %rdi callq 0x3400 testl %eax, %eax jne 0x7085 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl %eax, %ebp pushq $0x58 popq %rdi callq 0x3170 movq %rax, %rbx leaq 0x228e(%rip), %rsi # 0x9327 leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x3dfe movb $0x1, %r15b leaq 0x8(%rsp), %rsi movq %rbx, %rdi movl $0x42f, %edx # imm = 0x42F movl %ebp, %ecx callq 0x73ea xorl %r15d, %r15d leaq 0x6c2f(%rip), %rsi # 0xdcf8 leaq 0x2f0(%rip), %rdx # 0x73c0 movq %rbx, %rdi callq 0x34a0 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x3140 testb %r15b, %r15b jne 0x70ef jmp 0x70f7 movq %rax, %r14 movq %rbx, %rdi callq 0x31f0 movq %r14, %rdi callq 0x34d0 nop
_ZN10serial_cpp6Serial10SerialImpl9writeLockEv: push rbp push r15 push r14 push rbx sub rsp, 28h add rdi, 90h call _pthread_mutex_lock test eax, eax jnz short loc_7085 add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_7085: mov ebp, eax push 58h ; 'X' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+48h+var_40] lea rdx, [rsp+48h+var_41] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov r15b, 1 lea rsi, [rsp+48h+var_40] mov rdi, rbx mov edx, 42Fh mov ecx, ebp call _ZN10serial_cpp11IOExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii; serial_cpp::IOException::IOException(std::string,int,int) xor r15d, r15d lea rsi, _ZTIN10serial_cpp11IOExceptionE; lptinfo lea rdx, _ZN10serial_cpp11IOExceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r15b, r15b jnz short loc_70EF jmp short loc_70F7 mov r14, rax loc_70EF: mov rdi, rbx; void * call ___cxa_free_exception loc_70F7: mov rdi, r14 call __Unwind_Resume
long long serial_cpp::Serial::SerialImpl::writeLock(serial_cpp::Serial::SerialImpl *this) { long long result; // rax int v2; // ebp void *exception; // rbx int v4; // r8d int v5; // r9d _QWORD v6[8]; // [rsp+8h] [rbp-40h] BYREF result = pthread_mutex_lock((char *)this + 144); if ( (_DWORD)result ) { v2 = result; exception = __cxa_allocate_exception(0x58uLL); std::string::basic_string<std::allocator<char>>( v6, (long long)"/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc"); serial_cpp::IOException::IOException((_DWORD)exception, (unsigned int)v6, 1071, v2, v4, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'serial_cpp::IOException, serial_cpp::IOException::~IOException); } return result; }
writeLock: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 ADD RDI,0x90 CALL 0x00103400 TEST EAX,EAX JNZ 0x00107085 ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00107085: MOV EBP,EAX PUSH 0x58 POP RDI CALL 0x00103170 MOV RBX,RAX LAB_00107092: LEA RSI,[0x109327] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x00103dfe MOV R15B,0x1 LAB_001070ab: LEA RSI,[RSP + 0x8] MOV RDI,RBX MOV EDX,0x42f MOV ECX,EBP CALL 0x001073ea XOR R15D,R15D LEA RSI,[0x10dcf8] LEA RDX,[0x1073c0] MOV RDI,RBX CALL 0x001034a0
/* serial_cpp::Serial::SerialImpl::writeLock() */ void __thiscall serial_cpp::Serial::SerialImpl::writeLock(SerialImpl *this) { IOException *pIVar1; int iVar2; allocator local_41; string local_40 [32]; iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x90)); if (iVar2 == 0) { return; } pIVar1 = (IOException *)__cxa_allocate_exception(0x58); /* try { // try from 00107092 to 001070a7 has its CatchHandler @ 001070ec */ std::__cxx11::string::string<std::allocator<char>> (local_40, "/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc", &local_41); /* try { // try from 001070ab to 001070d7 has its CatchHandler @ 001070d8 */ IOException::IOException(pIVar1,local_40,0x42f,iVar2); /* WARNING: Subroutine does not return */ __cxa_throw(pIVar1,&IOException::typeinfo,IOException::~IOException); }
53,041
serial_cpp::Serial::SerialImpl::writeLock()
ami-iit[P]serial_cpp/src/impl/unix.cc
void Serial::SerialImpl::writeLock () { int result = pthread_mutex_lock(&this->write_mutex); if (result) { THROW (IOException, result); } }
O3
cpp
serial_cpp::Serial::SerialImpl::writeLock(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp addq $0x90, %rdi callq 0x3410 testl %eax, %eax jne 0x7d2d addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %eax, %ebp movl $0x58, %edi callq 0x3150 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x35eb(%rip), %rsi # 0xb337 leaq 0x3631(%rip), %rdx # 0xb384 movq %rsp, %rdi callq 0x42e0 movb $0x1, %r12b movq %rsp, %rsi movq %rbx, %rdi movl $0x42f, %edx # imm = 0x42F movl %ebp, %ecx callq 0x8238 xorl %r12d, %r12d leaq 0x7f6e(%rip), %rsi # 0xfce8 leaq 0x46f(%rip), %rdx # 0x81f0 movq %rbx, %rdi callq 0x34c0 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x7da2 movq 0x10(%rsp), %rsi incq %rsi callq 0x32c0 testb %r12b, %r12b jne 0x7dac jmp 0x7db4 movq %rax, %r14 movq %rbx, %rdi callq 0x31e0 movq %r14, %rdi callq 0x34f0
_ZN10serial_cpp6Serial10SerialImpl9writeLockEv: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h add rdi, 90h call _pthread_mutex_lock test eax, eax jnz short loc_7D2D add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_7D2D: mov ebp, eax mov edi, 58h ; 'X'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_38] mov [r15-10h], r15 lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aWorkspaceLlm4b+4Dh; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov r12b, 1 mov rsi, rsp mov rdi, rbx mov edx, 42Fh mov ecx, ebp call _ZN10serial_cpp11IOExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii; serial_cpp::IOException::IOException(std::string,int,int) xor r12d, r12d lea rsi, _ZTIN10serial_cpp11IOExceptionE; lptinfo lea rdx, _ZN10serial_cpp11IOExceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+48h+var_48]; void * cmp rdi, r15 jz short loc_7DA2 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7DA2: test r12b, r12b jnz short loc_7DAC jmp short loc_7DB4 mov r14, rax loc_7DAC: mov rdi, rbx; void * call ___cxa_free_exception loc_7DB4: mov rdi, r14 call __Unwind_Resume
long long serial_cpp::Serial::SerialImpl::writeLock(serial_cpp::Serial::SerialImpl *this) { long long result; // rax int v2; // ebp void *exception; // rbx int v4; // r8d int v5; // r9d void *v6[2]; // [rsp+0h] [rbp-48h] BYREF long long v7; // [rsp+10h] [rbp-38h] BYREF result = pthread_mutex_lock((char *)this + 144); if ( (_DWORD)result ) { v2 = result; exception = __cxa_allocate_exception(0x58uLL); v6[0] = &v7; std::string::_M_construct<char const*>( (long long)v6, "/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc", (long long)""); serial_cpp::IOException::IOException((_DWORD)exception, (unsigned int)v6, 1071, v2, v4, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'serial_cpp::IOException, serial_cpp::IOException::~IOException); } return result; }
writeLock: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 ADD RDI,0x90 CALL 0x00103410 TEST EAX,EAX JNZ 0x00107d2d ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00107d2d: MOV EBP,EAX MOV EDI,0x58 CALL 0x00103150 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_00107d45: LEA RSI,[0x10b337] LEA RDX,[0x10b384] MOV RDI,RSP CALL 0x001042e0 MOV R12B,0x1 LAB_00107d5e: MOV RSI,RSP MOV RDI,RBX MOV EDX,0x42f MOV ECX,EBP CALL 0x00108238 XOR R12D,R12D LEA RSI,[0x10fce8] LEA RDX,[0x1081f0] MOV RDI,RBX CALL 0x001034c0
/* serial_cpp::Serial::SerialImpl::writeLock() */ void __thiscall serial_cpp::Serial::SerialImpl::writeLock(SerialImpl *this) { IOException *pIVar1; int iVar2; int1 *local_48 [2]; int1 local_38 [16]; iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x90)); if (iVar2 == 0) { return; } pIVar1 = (IOException *)__cxa_allocate_exception(0x58); local_48[0] = local_38; /* try { // try from 00107d45 to 00107d5a has its CatchHandler @ 00107da9 */ std::__cxx11::string::_M_construct<char_const*> (local_48, "/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc",""); /* try { // try from 00107d5e to 00107d88 has its CatchHandler @ 00107d89 */ IOException::IOException(pIVar1,local_48,0x42f,iVar2); /* WARNING: Subroutine does not return */ __cxa_throw(pIVar1,&IOException::typeinfo,IOException::~IOException); }
53,042
uf_space_endspace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_endspace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill((uchar*) to,(end-to),' '); else { if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); } else decode_bytes(rec,bit_buff,to,end); } }
O0
c
uf_space_endspace_selected: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbc867 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbc88b jmp 0xbc8a9 movq -0x10(%rbp), %rdi callq 0xbbca0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbc8a9 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x2a2a0 jmp 0xbc9e7 movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbc8db movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbc903 jmp 0xbc9d0 movq -0x10(%rbp), %rdi callq 0xbbca0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbc9d0 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbc946 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x20a1a2(%rip), %rcx # 0x2c6ae0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xbc959 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xba450 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0xbc97b movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xbc9e7 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xbc9ae movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d xorl %eax, %eax subq %r8, %rax addq %rax, %rcx callq 0xbc3b0 movq -0x20(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2a0 jmp 0xbc9e5 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbc3b0 jmp 0xbc9e7 addq $0x30, %rsp popq %rbp retq nopl (%rax)
uf_space_endspace_selected_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BC867 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BC88B jmp short loc_BC8A9 loc_BC867: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BC8A9 loc_BC88B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax mov esi, 20h ; ' ' call _memset jmp loc_BC9E7 loc_BC8A9: mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BC8DB mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BC903 jmp loc_BC9D0 loc_BC8DB: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz loc_BC9D0 loc_BC903: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BC946 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_BC959 loc_BC946: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_BC959: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_BC97B mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_BC9E7 loc_BC97B: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_BC9AE mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax xor eax, eax sub rax, r8 add rcx, rax call decode_bytes_0 loc_BC9AE: mov rdi, [rbp+var_20] mov eax, [rbp+var_24] mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset jmp short loc_BC9E5 loc_BC9D0: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes_0 loc_BC9E5: jmp short $+2 loc_BC9E7: add rsp, 30h pop rbp retn
long long uf_space_endspace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx long long result; // rax int v7; // eax int v8; // ecx unsigned int v9; // eax int v10; // ecx unsigned int bits_0; // [rsp+8h] [rbp-28h] if ( !a2[1] ) { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) goto LABEL_6; return memset(a3, 32LL, a4 - a3); } v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) != 0 ) return memset(a3, 32LL, a4 - a3); LABEL_6: if ( a2[1] ) { v7 = *a2; v8 = a2[1] - 1; a2[1] = v8; if ( ((1 << v8) & v7) == 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } else { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v9 = *a2; v10 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v10; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v9 >> v10); } if ( &a3[bits_0] <= a4 ) { if ( &a3[bits_0] != a4 ) decode_bytes_0(a1, (long long)a2, a3, &a4[-bits_0]); return memset(&a4[-bits_0], 32LL, bits_0); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_space_endspace_selected: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bc867 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bc88b JMP 0x001bc8a9 LAB_001bc867: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bbca0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bc8a9 LAB_001bc88b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x0012a2a0 JMP 0x001bc9e7 LAB_001bc8a9: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bc8db MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bc903 JMP 0x001bc9d0 LAB_001bc8db: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bbca0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bc9d0 LAB_001bc903: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bc946 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3c6ae0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001bc959 LAB_001bc946: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001ba450 MOV dword ptr [RBP + -0x28],EAX LAB_001bc959: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001bc97b MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001bc9e7 LAB_001bc97b: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001bc9ae MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX XOR EAX,EAX SUB RAX,R8 ADD RCX,RAX CALL 0x001bc3b0 LAB_001bc9ae: MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2a0 JMP 0x001bc9e5 LAB_001bc9d0: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001bc3b0 LAB_001bc9e5: JMP 0x001bc9e7 LAB_001bc9e7: ADD RSP,0x30 POP RBP RET
void uf_space_endspace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { decode_bytes(param_1,param_2,param_3,param_4); } else { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,param_3,param_4 - local_30); } memset((void *)(param_4 - local_30),0x20,(ulong)local_30); } } } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
53,043
mi_copy_status
eloqsql/storage/myisam/mi_locking.c
void mi_copy_status(void* to,void *from) { MI_INFO *info= (MI_INFO*) to; DBUG_ENTER("mi_copy_status"); info->state= &((MI_INFO*) from)->save_state; DBUG_PRINT("info",("key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); DBUG_VOID_RETURN; }
O3
c
mi_copy_status: pushq %rbp movq %rsp, %rbp addq $0x10, %rsi movq %rsi, 0x8(%rdi) popq %rbp retq
mi_copy_status: push rbp mov rbp, rsp add rsi, 10h mov [rdi+8], rsi pop rbp retn
void mi_copy_status(long long a1, long long a2) { *(_QWORD *)(a1 + 8) = a2 + 16; }
mi_copy_status: PUSH RBP MOV RBP,RSP ADD RSI,0x10 MOV qword ptr [RDI + 0x8],RSI POP RBP RET
void mi_copy_status(long param_1,long param_2) { *(long *)(param_1 + 8) = param_2 + 0x10; return; }
53,044
Game::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
GhostEscape/src/core/game.cpp
void Game::init(std::string title, int width, int height) { screen_size_ = glm::vec2(width, height); // SDL3初始化 if (!SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO)){ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL初始化失败: %s\n", SDL_GetError()); } // 不需要进行SDL_image初始化 // SDL3_Mixer初始化 if (Mix_Init(MIX_INIT_MP3 | MIX_INIT_OGG) != (MIX_INIT_MP3 | MIX_INIT_OGG)){ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Mixer初始化失败: %s\n", SDL_GetError()); } if (!Mix_OpenAudio(0, NULL)){ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Mixer打开音频失败: %s\n", SDL_GetError()); } Mix_AllocateChannels(16); // 分配16个音频通道 Mix_VolumeMusic(MIX_MAX_VOLUME / 4); // 设置音乐音量 Mix_Volume(-1, MIX_MAX_VOLUME / 4); // 设置音效音量 // SDL3_TTF初始化 if (!TTF_Init()){ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_TTF初始化失败: %s\n", SDL_GetError()); } // 创建窗口与渲染器 SDL_CreateWindowAndRenderer(title.c_str(), width, height, SDL_WINDOW_RESIZABLE, &window_, &renderer_); if (!window_ || !renderer_){ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "创建窗口或渲染器失败: %s\n", SDL_GetError()); } // 设置窗口逻辑分辨率 SDL_SetRenderLogicalPresentation(renderer_, width, height, SDL_LOGICAL_PRESENTATION_LETTERBOX); ttf_engine_ = TTF_CreateRendererTextEngine(renderer_); // 计算帧延迟 frame_delay_ = 1000000000 / FPS_; // 创建资源管理器 asset_store_ = new AssetStore(renderer_); // 创建场景 current_scene_ = new SceneTitle(); current_scene_->init(); }
O3
cpp
Game::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r14d cvtsi2ss %edx, %xmm0 movl %ecx, %r15d cvtsi2ss %ecx, %xmm1 movq %rsi, %r12 movq %rdi, %rbx movss %xmm0, 0x8(%rdi) movss %xmm1, 0xc(%rdi) movl $0x30, %edi callq 0x5220 testb %al, %al jne 0x5c2f callq 0x54e0 leaq 0xa58d(%rip), %rsi # 0x101b0 xorl %edi, %edi movq %rax, %rdx xorl %eax, %eax callq 0x5610 movl $0x18, %edi callq 0x55b0 cmpl $0x18, %eax je 0x5c56 callq 0x54e0 leaq 0xa57e(%rip), %rsi # 0x101c8 xorl %edi, %edi movq %rax, %rdx xorl %eax, %eax callq 0x5610 xorl %edi, %edi xorl %esi, %esi callq 0x5120 testb %al, %al jne 0x5c7b callq 0x54e0 leaq 0xa577(%rip), %rsi # 0x101e6 xorl %edi, %edi movq %rax, %rdx xorl %eax, %eax callq 0x5610 movl $0x10, %edi callq 0x5190 movl $0x20, %edi callq 0x5560 movl $0xffffffff, %edi # imm = 0xFFFFFFFF movl $0x20, %esi callq 0x5240 callq 0x52a0 testb %al, %al jne 0x5cbf callq 0x54e0 leaq 0xa554(%rip), %rsi # 0x10207 xorl %edi, %edi movq %rax, %rdx xorl %eax, %eax callq 0x5610 movq (%r12), %rdi leaq 0x50(%rbx), %r8 leaq 0x58(%rbx), %r12 movl $0x20, %ecx movl %r14d, %esi movl %r15d, %edx movq %r12, %r9 callq 0x5690 cmpq $0x0, 0x50(%rbx) sete %al movq 0x58(%rbx), %rdi testq %rdi, %rdi sete %cl orb %al, %cl cmpb $0x1, %cl jne 0x5d13 callq 0x54e0 leaq 0xa520(%rip), %rsi # 0x10223 xorl %edi, %edi movq %rax, %rdx xorl %eax, %eax callq 0x5610 movq (%r12), %rdi movl %r14d, %esi movl %r15d, %edx movl $0x2, %ecx callq 0x5470 movq 0x58(%rbx), %rdi callq 0x5330 movq %rax, 0x60(%rbx) movl $0x3b9aca00, %eax # imm = 0x3B9ACA00 xorl %edx, %edx divq 0x30(%rbx) movq %rax, 0x38(%rbx) movl $0xe8, %edi callq 0x53b0 movq 0x58(%rbx), %rcx leaq 0x38(%rax), %rdx movq %rdx, 0x8(%rax) movl $0x1, %edx movq %rdx, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rax) movl $0x3f800000, %esi # imm = 0x3F800000 movl %esi, 0x28(%rax) movups %xmm0, 0x30(%rax) leaq 0x70(%rax), %rdi movq %rdi, 0x40(%rax) movq %rdx, 0x48(%rax) movups %xmm0, 0x50(%rax) movl %esi, 0x60(%rax) movups %xmm0, 0x68(%rax) leaq 0xa8(%rax), %rdi movq %rdi, 0x78(%rax) movq %rdx, 0x80(%rax) movups %xmm0, 0x88(%rax) movl %esi, 0x98(%rax) movups %xmm0, 0xa0(%rax) leaq 0xe0(%rax), %rdi movq %rdi, 0xb0(%rax) movq %rdx, 0xb8(%rax) movups %xmm0, 0xc0(%rax) movl %esi, 0xd0(%rax) movups %xmm0, 0xd8(%rax) movq %rcx, (%rax) movq %rax, (%rbx) movl $0xd0, %edi callq 0x53b0 movq %rax, %r14 movl $0xd0, %edx movq %rax, %rdi xorl %esi, %esi callq 0x5230 leaq 0xf2b0(%rip), %rax # 0x150b0 addq $0x10, %rax movq %rax, (%r14) callq 0x66dc movq %rax, 0x10(%r14) xorps %xmm1, %xmm1 movups %xmm1, 0x18(%r14) movups %xmm1, 0x28(%r14) movups %xmm1, 0x38(%r14) movw $0x1, 0x48(%r14) movups %xmm1, 0x4c(%r14) movups %xmm1, 0x60(%r14) movups %xmm1, 0x70(%r14) movups %xmm1, 0x80(%r14) movb $0x0, 0x90(%r14) leaq 0xfe09(%rip), %rax # 0x15c58 leaq 0x10(%rax), %rcx movq %rcx, (%r14) movaps 0xa263(%rip), %xmm0 # 0x100c0 movups %xmm0, 0x94(%r14) movups %xmm1, 0xa4(%r14) movups %xmm1, 0xb4(%r14) movups %xmm1, 0xc0(%r14) movq %r14, 0x20(%rbx) movq %r14, %rdi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmpq *0x20(%rax) movq %rax, %rbx movl $0xd0, %esi movq %r14, %rdi callq 0x53d0 movq %rbx, %rdi callq 0x5600 nop
_ZN4Game4initENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14d, edx cvtsi2ss xmm0, edx mov r15d, ecx cvtsi2ss xmm1, ecx mov r12, rsi mov rbx, rdi movss dword ptr [rdi+8], xmm0 movss dword ptr [rdi+0Ch], xmm1 mov edi, 30h ; '0' call _SDL_Init test al, al jnz short loc_5C2F call _SDL_GetError lea rsi, unk_101B0 xor edi, edi mov rdx, rax xor eax, eax call _SDL_LogError loc_5C2F: mov edi, 18h call _Mix_Init cmp eax, 18h jz short loc_5C56 call _SDL_GetError lea rsi, unk_101C8 xor edi, edi mov rdx, rax xor eax, eax call _SDL_LogError loc_5C56: xor edi, edi xor esi, esi call _Mix_OpenAudio test al, al jnz short loc_5C7B call _SDL_GetError lea rsi, unk_101E6 xor edi, edi mov rdx, rax xor eax, eax call _SDL_LogError loc_5C7B: mov edi, 10h call _Mix_AllocateChannels mov edi, 20h ; ' ' call _Mix_VolumeMusic mov edi, 0FFFFFFFFh mov esi, 20h ; ' ' call _Mix_Volume call _TTF_Init test al, al jnz short loc_5CBF call _SDL_GetError lea rsi, unk_10207 xor edi, edi mov rdx, rax xor eax, eax call _SDL_LogError loc_5CBF: mov rdi, [r12] lea r8, [rbx+50h] lea r12, [rbx+58h] mov ecx, 20h ; ' ' mov esi, r14d mov edx, r15d mov r9, r12 call _SDL_CreateWindowAndRenderer cmp qword ptr [rbx+50h], 0 setz al mov rdi, [rbx+58h] test rdi, rdi setz cl or cl, al cmp cl, 1 jnz short loc_5D13 call _SDL_GetError lea rsi, unk_10223 xor edi, edi mov rdx, rax xor eax, eax call _SDL_LogError mov rdi, [r12] loc_5D13: mov esi, r14d mov edx, r15d mov ecx, 2 call _SDL_SetRenderLogicalPresentation mov rdi, [rbx+58h] call _TTF_CreateRendererTextEngine mov [rbx+60h], rax mov eax, 3B9ACA00h xor edx, edx div qword ptr [rbx+30h] mov [rbx+38h], rax mov edi, 0E8h; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, [rbx+58h] lea rdx, [rax+38h] mov [rax+8], rdx mov edx, 1 mov [rax+10h], rdx xorps xmm0, xmm0 movups xmmword ptr [rax+18h], xmm0 mov esi, 3F800000h mov [rax+28h], esi movups xmmword ptr [rax+30h], xmm0 lea rdi, [rax+70h] mov [rax+40h], rdi mov [rax+48h], rdx movups xmmword ptr [rax+50h], xmm0 mov [rax+60h], esi movups xmmword ptr [rax+68h], xmm0 lea rdi, [rax+0A8h] mov [rax+78h], rdi mov [rax+80h], rdx movups xmmword ptr [rax+88h], xmm0 mov [rax+98h], esi movups xmmword ptr [rax+0A0h], xmm0 lea rdi, [rax+0E0h] mov [rax+0B0h], rdi mov [rax+0B8h], rdx movups xmmword ptr [rax+0C0h], xmm0 mov [rax+0D0h], esi movups xmmword ptr [rax+0D8h], xmm0 mov [rax], rcx mov [rbx], rax mov edi, 0D0h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov edx, 0D0h mov rdi, rax; this xor esi, esi call _memset lea rax, _ZTV6Object; `vtable for'Object add rax, 10h mov [r14], rax call _ZN4Game11GetInstanceEv; Game::GetInstance(void) mov [r14+10h], rax xorps xmm1, xmm1 movups xmmword ptr [r14+18h], xmm1 movups xmmword ptr [r14+28h], xmm1 movups xmmword ptr [r14+38h], xmm1 mov word ptr [r14+48h], 1 movups xmmword ptr [r14+4Ch], xmm1 movups xmmword ptr [r14+60h], xmm1 movups xmmword ptr [r14+70h], xmm1 movups xmmword ptr [r14+80h], xmm1 mov byte ptr [r14+90h], 0 lea rax, _ZTV10SceneTitle; `vtable for'SceneTitle lea rcx, [rax+10h] mov [r14], rcx movaps xmm0, cs:xmmword_100C0 movups xmmword ptr [r14+94h], xmm0 movups xmmword ptr [r14+0A4h], xmm1 movups xmmword ptr [r14+0B4h], xmm1 movups xmmword ptr [r14+0C0h], xmm1 mov [rbx+20h], r14 mov rdi, r14 pop rbx pop r12 pop r14 pop r15 pop rbp jmp qword ptr [rax+20h] mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, rbx call __Unwind_Resume
long long Game::init(long long a1, _QWORD *a2, unsigned int a3, unsigned int a4) { long long Error; // rax long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // rdi long long v12; // rax long long v13; // rax long long v14; // rcx long long v15; // rdi *(float *)(a1 + 8) = (float)(int)a3; *(float *)(a1 + 12) = (float)(int)a4; if ( !(unsigned __int8)SDL_Init(48LL) ) { Error = SDL_GetError(); SDL_LogError(0LL, &unk_101B0, Error); } if ( (unsigned int)Mix_Init(24LL) != 24 ) { v8 = SDL_GetError(); SDL_LogError(0LL, &unk_101C8, v8); } if ( !(unsigned __int8)Mix_OpenAudio(0LL, 0LL) ) { v9 = SDL_GetError(); SDL_LogError(0LL, &unk_101E6, v9); } Mix_AllocateChannels(16LL); Mix_VolumeMusic(32LL); Mix_Volume(0xFFFFFFFFLL, 32LL); if ( !(unsigned __int8)TTF_Init() ) { v10 = SDL_GetError(); SDL_LogError(0LL, &unk_10207, v10); } SDL_CreateWindowAndRenderer(*a2, a3, a4, 32LL, a1 + 80, a1 + 88); v11 = *(_QWORD *)(a1 + 88); if ( *(_QWORD *)(a1 + 80) == 0LL || v11 == 0 ) { v12 = SDL_GetError(); SDL_LogError(0LL, &unk_10223, v12); v11 = *(_QWORD *)(a1 + 88); } SDL_SetRenderLogicalPresentation(v11, a3, a4, 2LL); *(_QWORD *)(a1 + 96) = TTF_CreateRendererTextEngine(*(_QWORD *)(a1 + 88)); *(_QWORD *)(a1 + 56) = 0x3B9ACA00uLL / *(_QWORD *)(a1 + 48); v13 = operator new(0xE8uLL); v14 = *(_QWORD *)(a1 + 88); *(_QWORD *)(v13 + 8) = v13 + 56; *(_QWORD *)(v13 + 16) = 1LL; *(_OWORD *)(v13 + 24) = 0LL; *(_DWORD *)(v13 + 40) = 1065353216; *(_OWORD *)(v13 + 48) = 0LL; *(_QWORD *)(v13 + 64) = v13 + 112; *(_QWORD *)(v13 + 72) = 1LL; *(_OWORD *)(v13 + 80) = 0LL; *(_DWORD *)(v13 + 96) = 1065353216; *(_OWORD *)(v13 + 104) = 0LL; *(_QWORD *)(v13 + 120) = v13 + 168; *(_QWORD *)(v13 + 128) = 1LL; *(_OWORD *)(v13 + 136) = 0LL; *(_DWORD *)(v13 + 152) = 1065353216; *(_OWORD *)(v13 + 160) = 0LL; *(_QWORD *)(v13 + 176) = v13 + 224; *(_QWORD *)(v13 + 184) = 1LL; *(_OWORD *)(v13 + 192) = 0LL; *(_DWORD *)(v13 + 208) = 1065353216; *(_OWORD *)(v13 + 216) = 0LL; *(_QWORD *)v13 = v14; *(_QWORD *)a1 = v13; v15 = operator new(0xD0uLL); memset(v15, 0LL, 208LL); *(_QWORD *)v15 = &`vtable for'Object + 2; *(_QWORD *)(v15 + 16) = Game::GetInstance((Game *)v15); *(_OWORD *)(v15 + 24) = 0LL; *(_OWORD *)(v15 + 40) = 0LL; *(_OWORD *)(v15 + 56) = 0LL; *(_WORD *)(v15 + 72) = 1; *(_OWORD *)(v15 + 76) = 0LL; *(_OWORD *)(v15 + 96) = 0LL; *(_OWORD *)(v15 + 112) = 0LL; *(_OWORD *)(v15 + 128) = 0LL; *(_BYTE *)(v15 + 144) = 0; *(_QWORD *)v15 = &`vtable for'SceneTitle + 2; *(_OWORD *)(v15 + 148) = xmmword_100C0; *(_OWORD *)(v15 + 164) = 0LL; *(_OWORD *)(v15 + 180) = 0LL; *(_OWORD *)(v15 + 192) = 0LL; *(_QWORD *)(a1 + 32) = v15; return ((long long ( *)(long long))*(&`vtable for'SceneTitle + 4))(v15); }
init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,EDX CVTSI2SS XMM0,EDX MOV R15D,ECX CVTSI2SS XMM1,ECX MOV R12,RSI MOV RBX,RDI MOVSS dword ptr [RDI + 0x8],XMM0 MOVSS dword ptr [RDI + 0xc],XMM1 MOV EDI,0x30 CALL 0x00105220 TEST AL,AL JNZ 0x00105c2f CALL 0x001054e0 LEA RSI,[0x1101b0] XOR EDI,EDI MOV RDX,RAX XOR EAX,EAX CALL 0x00105610 LAB_00105c2f: MOV EDI,0x18 CALL 0x001055b0 CMP EAX,0x18 JZ 0x00105c56 CALL 0x001054e0 LEA RSI,[0x1101c8] XOR EDI,EDI MOV RDX,RAX XOR EAX,EAX CALL 0x00105610 LAB_00105c56: XOR EDI,EDI XOR ESI,ESI CALL 0x00105120 TEST AL,AL JNZ 0x00105c7b CALL 0x001054e0 LEA RSI,[0x1101e6] XOR EDI,EDI MOV RDX,RAX XOR EAX,EAX CALL 0x00105610 LAB_00105c7b: MOV EDI,0x10 CALL 0x00105190 MOV EDI,0x20 CALL 0x00105560 MOV EDI,0xffffffff MOV ESI,0x20 CALL 0x00105240 CALL 0x001052a0 TEST AL,AL JNZ 0x00105cbf CALL 0x001054e0 LEA RSI,[0x110207] XOR EDI,EDI MOV RDX,RAX XOR EAX,EAX CALL 0x00105610 LAB_00105cbf: MOV RDI,qword ptr [R12] LEA R8,[RBX + 0x50] LEA R12,[RBX + 0x58] MOV ECX,0x20 MOV ESI,R14D MOV EDX,R15D MOV R9,R12 CALL 0x00105690 CMP qword ptr [RBX + 0x50],0x0 SETZ AL MOV RDI,qword ptr [RBX + 0x58] TEST RDI,RDI SETZ CL OR CL,AL CMP CL,0x1 JNZ 0x00105d13 CALL 0x001054e0 LEA RSI,[0x110223] XOR EDI,EDI MOV RDX,RAX XOR EAX,EAX CALL 0x00105610 MOV RDI,qword ptr [R12] LAB_00105d13: MOV ESI,R14D MOV EDX,R15D MOV ECX,0x2 CALL 0x00105470 MOV RDI,qword ptr [RBX + 0x58] CALL 0x00105330 MOV qword ptr [RBX + 0x60],RAX MOV EAX,0x3b9aca00 XOR EDX,EDX DIV qword ptr [RBX + 0x30] MOV qword ptr [RBX + 0x38],RAX MOV EDI,0xe8 CALL 0x001053b0 MOV RCX,qword ptr [RBX + 0x58] LEA RDX,[RAX + 0x38] MOV qword ptr [RAX + 0x8],RDX MOV EDX,0x1 MOV qword ptr [RAX + 0x10],RDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x18],XMM0 MOV ESI,0x3f800000 MOV dword ptr [RAX + 0x28],ESI MOVUPS xmmword ptr [RAX + 0x30],XMM0 LEA RDI,[RAX + 0x70] MOV qword ptr [RAX + 0x40],RDI MOV qword ptr [RAX + 0x48],RDX MOVUPS xmmword ptr [RAX + 0x50],XMM0 MOV dword ptr [RAX + 0x60],ESI MOVUPS xmmword ptr [RAX + 0x68],XMM0 LEA RDI,[RAX + 0xa8] MOV qword ptr [RAX + 0x78],RDI MOV qword ptr [RAX + 0x80],RDX MOVUPS xmmword ptr [RAX + 0x88],XMM0 MOV dword ptr [RAX + 0x98],ESI MOVUPS xmmword ptr [RAX + 0xa0],XMM0 LEA RDI,[RAX + 0xe0] MOV qword ptr [RAX + 0xb0],RDI MOV qword ptr [RAX + 0xb8],RDX MOVUPS xmmword ptr [RAX + 0xc0],XMM0 MOV dword ptr [RAX + 0xd0],ESI MOVUPS xmmword ptr [RAX + 0xd8],XMM0 MOV qword ptr [RAX],RCX MOV qword ptr [RBX],RAX MOV EDI,0xd0 CALL 0x001053b0 MOV R14,RAX MOV EDX,0xd0 MOV RDI,RAX XOR ESI,ESI CALL 0x00105230 LEA RAX,[0x1150b0] ADD RAX,0x10 MOV qword ptr [R14],RAX LAB_00105e07: CALL 0x001066dc LAB_00105e0c: MOV qword ptr [R14 + 0x10],RAX XORPS XMM1,XMM1 MOVUPS xmmword ptr [R14 + 0x18],XMM1 MOVUPS xmmword ptr [R14 + 0x28],XMM1 MOVUPS xmmword ptr [R14 + 0x38],XMM1 MOV word ptr [R14 + 0x48],0x1 MOVUPS xmmword ptr [R14 + 0x4c],XMM1 MOVUPS xmmword ptr [R14 + 0x60],XMM1 MOVUPS xmmword ptr [R14 + 0x70],XMM1 MOVUPS xmmword ptr [R14 + 0x80],XMM1 MOV byte ptr [R14 + 0x90],0x0 LEA RAX,[0x115c58] LEA RCX,[RAX + 0x10] MOV qword ptr [R14],RCX MOVAPS XMM0,xmmword ptr [0x001100c0] MOVUPS xmmword ptr [R14 + 0x94],XMM0 MOVUPS xmmword ptr [R14 + 0xa4],XMM1 MOVUPS xmmword ptr [R14 + 0xb4],XMM1 MOVUPS xmmword ptr [R14 + 0xc0],XMM1 MOV qword ptr [RBX + 0x20],R14 MOV RDI,R14 POP RBX POP R12 POP R14 POP R15 POP RBP JMP qword ptr [RAX + 0x20]
/* WARNING: Switch with 1 destination removed at 0x00105e8c */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* Game::init(std::__cxx11::string, int, int) */ void __thiscall Game::init(Game *this,int8 *param_2,int param_3,int param_4) { uint uVar1; int1 auVar2 [16]; uint uVar3; int4 uVar4; int4 uVar5; int4 uVar6; uint uVar7; char cVar8; int iVar9; int8 uVar10; int8 *puVar11; long *__s; long lVar12; uint uVar13; ulong uVar14; long *__src; uint uVar15; int8 uVar16; int8 uVar17; int8 uVar18; long *plStack_b0; long lStack_a8; long alStack_a0 [2]; long *aplStack_90 [2]; long alStack_80 [2]; long *aplStack_70 [2]; long alStack_60 [2]; long *aplStack_50 [2]; long alStack_40 [2]; int8 uStack_30; *(float *)(this + 8) = (float)param_3; *(float *)(this + 0xc) = (float)param_4; uStack_30 = 0x105c13; cVar8 = SDL_Init(0x30); if (cVar8 == '\0') { uStack_30 = 0x105c1c; uVar10 = SDL_GetError(); uStack_30 = 0x105c2f; SDL_LogError(0,&DAT_001101b0,uVar10); } uStack_30 = 0x105c39; iVar9 = Mix_Init(0x18); if (iVar9 != 0x18) { uStack_30 = 0x105c43; uVar10 = SDL_GetError(); uStack_30 = 0x105c56; SDL_LogError(0,&DAT_001101c8,uVar10); } uStack_30 = 0x105c5f; cVar8 = Mix_OpenAudio(0,0); if (cVar8 == '\0') { uStack_30 = 0x105c68; uVar10 = SDL_GetError(); uStack_30 = 0x105c7b; SDL_LogError(0,&DAT_001101e6,uVar10); } uStack_30 = 0x105c85; Mix_AllocateChannels(0x10); uStack_30 = 0x105c8f; Mix_VolumeMusic(0x20); uStack_30 = 0x105c9e; Mix_Volume(0xffffffff,0x20); uStack_30 = 0x105ca3; cVar8 = TTF_Init(); if (cVar8 == '\0') { uStack_30 = 0x105cac; uVar10 = SDL_GetError(); uStack_30 = 0x105cbf; SDL_LogError(0,&DAT_00110207,uVar10); } uStack_30 = 0x105cde; SDL_CreateWindowAndRenderer(*param_2,param_3,param_4,0x20,this + 0x50,this + 0x58); lVar12 = *(long *)(this + 0x58); if (lVar12 == 0 || *(long *)(this + 0x50) == 0) { uStack_30 = 0x105cfc; uVar10 = SDL_GetError(); uStack_30 = 0x105d0f; SDL_LogError(0,&DAT_00110223,uVar10); lVar12 = *(long *)(this + 0x58); } uStack_30 = 0x105d23; SDL_SetRenderLogicalPresentation(lVar12,param_3,param_4,2); uStack_30 = 0x105d2c; uVar10 = TTF_CreateRendererTextEngine(*(int8 *)(this + 0x58)); *(int8 *)(this + 0x60) = uVar10; auVar2._8_8_ = 0; auVar2._0_8_ = *(ulong *)(this + 0x30); *(long *)(this + 0x38) = SUB168((ZEXT816(0) << 0x40 | ZEXT816(1000000000)) / auVar2,0); uStack_30 = 0x105d49; puVar11 = (int8 *)operator_new(0xe8); uVar10 = *(int8 *)(this + 0x58); puVar11[1] = puVar11 + 7; puVar11[2] = 1; puVar11[3] = 0; puVar11[4] = 0; *(int4 *)(puVar11 + 5) = 0x3f800000; puVar11[6] = 0; puVar11[7] = 0; puVar11[8] = puVar11 + 0xe; puVar11[9] = 1; puVar11[10] = 0; puVar11[0xb] = 0; *(int4 *)(puVar11 + 0xc) = 0x3f800000; puVar11[0xd] = 0; puVar11[0xe] = 0; puVar11[0xf] = puVar11 + 0x15; puVar11[0x10] = 1; puVar11[0x11] = 0; puVar11[0x12] = 0; *(int4 *)(puVar11 + 0x13) = 0x3f800000; puVar11[0x14] = 0; puVar11[0x15] = 0; puVar11[0x16] = puVar11 + 0x1c; puVar11[0x17] = 1; puVar11[0x18] = 0; puVar11[0x19] = 0; *(int4 *)(puVar11 + 0x1a) = 0x3f800000; puVar11[0x1b] = 0; puVar11[0x1c] = 0; *puVar11 = uVar10; *(int8 **)this = puVar11; uStack_30 = 0x105de7; __s = (long *)operator_new(0xd0); uStack_30 = 0x105df9; memset(__s,0,0xd0); *__s = (long)&PTR__Object_001150c0; /* try { // try from 00105e07 to 00105e0b has its CatchHandler @ 00105e8f */ uStack_30 = 0x105e0c; lVar12 = GetInstance(); __s[2] = lVar12; __s[3] = 0; __s[4] = 0; __s[5] = 0; __s[6] = 0; __s[7] = 0; __s[8] = 0; *(int2 *)(__s + 9) = 1; *(int8 *)((long)__s + 0x4c) = 0; *(int8 *)((long)__s + 0x54) = 0; __s[0xc] = 0; __s[0xd] = 0; __s[0xe] = 0; __s[0xf] = 0; __s[0x10] = 0; __s[0x11] = 0; *(int1 *)(__s + 0x12) = 0; *__s = (long)&PTR__Scene_00115c68; uVar6 = _UNK_001100cc; uVar5 = _UNK_001100c8; uVar4 = _UNK_001100c4; *(int4 *)((long)__s + 0x94) = _DAT_001100c0; *(int4 *)(__s + 0x13) = uVar4; *(int4 *)((long)__s + 0x9c) = uVar5; *(int4 *)(__s + 0x14) = uVar6; *(int8 *)((long)__s + 0xa4) = 0; *(int8 *)((long)__s + 0xac) = 0; *(int8 *)((long)__s + 0xb4) = 0; *(int8 *)((long)__s + 0xbc) = 0; __s[0x18] = 0; __s[0x19] = 0; *(long **)(this + 0x20) = __s; plStack_b0 = alStack_a0; std::__cxx11::string::_M_construct<char_const*>(&plStack_b0,"assets/score.dat",""); (**(code **)(*__s + 0x50))(__s,&plStack_b0); if (plStack_b0 != alStack_a0) { operator_delete(plStack_b0,alStack_a0[0] + 1); } SDL_HideCursor(); puVar11 = (int8 *)__s[2]; plStack_b0 = alStack_a0; std::__cxx11::string::_M_construct<char_const*>(&plStack_b0,"assets/bgm/Spooky music.mp3",""); uVar10 = AssetStore::getMusic((AssetStore *)*puVar11,(string *)&plStack_b0); Mix_PlayMusic(uVar10,0xffffffff); if (plStack_b0 != alStack_a0) { operator_delete(plStack_b0,alStack_a0[0] + 1); } uVar10 = *(int8 *)(__s[2] + 8); uVar18 = 0; plStack_b0 = alStack_a0; std::__cxx11::string::_M_construct<char_const*>(&plStack_b0,&DAT_001105da,&DAT_001105e9); uVar16 = *(int8 *)(__s[2] + 8); uVar17 = 0; aplStack_70[0] = alStack_60; std::__cxx11::string::_M_construct<char_const*> (aplStack_70,"assets/font/VonwaonBitmap-16px.ttf",""); aplStack_50[0] = alStack_40; std::__cxx11::string::_M_construct<char_const*>(aplStack_50,"assets/UI/Textfield_01.png",""); HUDText::addHUDTextChild ((float)uVar16 * DAT_00110020,DAT_00110020 * (float)uVar10,DAT_00110020, (float)((ulong)uVar16 >> 0x20) * DAT_00110020 + _DAT_0011006c,__s,&plStack_b0, aplStack_70,0x40,aplStack_50,5,uVar16,uVar17,uVar10,uVar18); if (aplStack_50[0] != alStack_40) { operator_delete(aplStack_50[0],alStack_40[0] + 1); } if (aplStack_70[0] != alStack_60) { operator_delete(aplStack_70[0],alStack_60[0] + 1); } if (plStack_b0 != alStack_a0) { operator_delete(plStack_b0,alStack_a0[0] + 1); } uVar1 = *(uint *)(__s[2] + 0x48); uVar3 = -uVar1; if (0 < (int)uVar1) { uVar3 = uVar1; } uVar15 = 1; if (9 < uVar3) { uVar14 = (ulong)uVar3; uVar7 = 4; do { uVar15 = uVar7; uVar13 = (uint)uVar14; if (uVar13 < 100) { uVar15 = uVar15 - 2; goto LAB_0010df39; } if (uVar13 < 1000) { uVar15 = uVar15 - 1; goto LAB_0010df39; } if (uVar13 < 10000) goto LAB_0010df39; uVar14 = uVar14 / 10000; uVar7 = uVar15 + 4; } while (99999 < uVar13); uVar15 = uVar15 + 1; } LAB_0010df39: aplStack_70[0] = alStack_60; std::__cxx11::string::_M_construct((ulong)aplStack_70,(char)uVar15 - (char)((int)uVar1 >> 0x1f)); std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((ulong)(uVar1 >> 0x1f) + (long)aplStack_70[0]),uVar15,uVar3); puVar11 = (int8 *)std::__cxx11::string::replace((ulong)aplStack_70,0,(char *)0x0,0x110628); plStack_b0 = (long *)*puVar11; __src = puVar11 + 2; if (plStack_b0 == __src) { lVar12 = puVar11[1]; plStack_b0 = alStack_a0; memcpy(alStack_a0,__src,lVar12 + 1); } else { alStack_a0[0] = puVar11[2]; lVar12 = puVar11[1]; } *puVar11 = __src; puVar11[1] = 0; *(int1 *)(puVar11 + 2) = 0; lStack_a8 = lVar12; if (aplStack_70[0] != alStack_60) { operator_delete(aplStack_70[0],alStack_60[0] + 1); } uVar10 = *(int8 *)(__s[2] + 8); aplStack_70[0] = alStack_60; std::__cxx11::string::_M_construct<char_const*> (aplStack_70,"assets/font/VonwaonBitmap-16px.ttf",""); aplStack_50[0] = alStack_40; std::__cxx11::string::_M_construct<char_const*>(aplStack_50,"assets/UI/Textfield_01.png",""); HUDText::addHUDTextChild ((float)uVar10 * DAT_00110020 + 0.0,(int)DAT_00110150, (float)((ulong)uVar10 >> 0x20) * DAT_00110020 + DAT_0011004c,__s,&plStack_b0, aplStack_70,0x20,aplStack_50,5); if (aplStack_50[0] != alStack_40) { operator_delete(aplStack_50[0],alStack_40[0] + 1); } if (aplStack_70[0] != alStack_60) { operator_delete(aplStack_70[0],alStack_60[0] + 1); } uVar10 = *(int8 *)(__s[2] + 8); aplStack_70[0] = alStack_60; std::__cxx11::string::_M_construct<char_const*>(aplStack_70,"assets/UI/A_Start1.png",""); aplStack_50[0] = alStack_40; std::__cxx11::string::_M_construct<char_const*>(aplStack_50,"assets/UI/A_Start2.png",""); aplStack_90[0] = alStack_80; std::__cxx11::string::_M_construct<char_const*>(aplStack_90,"assets/UI/A_Start3.png",""); lVar12 = HUDButton::addHUDButtonChild ((float)uVar10 * DAT_00110020 + _DAT_00110070,DAT_00110040, (float)((ulong)uVar10 >> 0x20) * DAT_00110020 + DAT_00110074,__s,aplStack_70, aplStack_50,aplStack_90,5); __s[0x15] = lVar12; if (aplStack_90[0] != alStack_80) { operator_delete(aplStack_90[0],alStack_80[0] + 1); } if (aplStack_50[0] != alStack_40) { operator_delete(aplStack_50[0],alStack_40[0] + 1); } if (aplStack_70[0] != alStack_60) { operator_delete(aplStack_70[0],alStack_60[0] + 1); } uVar10 = *(int8 *)(__s[2] + 8); aplStack_70[0] = alStack_60; std::__cxx11::string::_M_construct<char_const*>(aplStack_70,"assets/UI/A_Credits1.png",""); aplStack_50[0] = alStack_40; std::__cxx11::string::_M_construct<char_const*>(aplStack_50,"assets/UI/A_Credits2.png",""); aplStack_90[0] = alStack_80; std::__cxx11::string::_M_construct<char_const*>(aplStack_90,"assets/UI/A_Credits3.png",""); lVar12 = HUDButton::addHUDButtonChild ((float)uVar10 * DAT_00110020 + 0.0,DAT_00110040, (float)((ulong)uVar10 >> 0x20) * DAT_00110020 + DAT_00110074,__s,aplStack_70, aplStack_50,aplStack_90,5); __s[0x16] = lVar12; if (aplStack_90[0] != alStack_80) { operator_delete(aplStack_90[0],alStack_80[0] + 1); } if (aplStack_50[0] != alStack_40) { operator_delete(aplStack_50[0],alStack_40[0] + 1); } if (aplStack_70[0] != alStack_60) { operator_delete(aplStack_70[0],alStack_60[0] + 1); } uVar10 = *(int8 *)(__s[2] + 8); aplStack_70[0] = alStack_60; std::__cxx11::string::_M_construct<char_const*>(aplStack_70,"assets/UI/A_Quit1.png",""); aplStack_50[0] = alStack_40; std::__cxx11::string::_M_construct<char_const*>(aplStack_50,"assets/UI/A_Quit2.png",""); aplStack_90[0] = alStack_80; std::__cxx11::string::_M_construct<char_const*>(aplStack_90,"assets/UI/A_Quit3.png",""); lVar12 = HUDButton::addHUDButtonChild ((float)uVar10 * DAT_00110020 + DAT_00110074,DAT_00110040, (float)((ulong)uVar10 >> 0x20) * DAT_00110020 + DAT_00110074,__s,aplStack_70, aplStack_50,aplStack_90,5); __s[0x17] = lVar12; if (aplStack_90[0] != alStack_80) { operator_delete(aplStack_90[0],alStack_80[0] + 1); } if (aplStack_50[0] != alStack_40) { operator_delete(aplStack_50[0],alStack_40[0] + 1); } if (aplStack_70[0] != alStack_60) { operator_delete(aplStack_70[0],alStack_60[0] + 1); } aplStack_50[0] = alStack_40; std::__cxx11::string::_M_construct<char_const*>(aplStack_50,"assets/credits.txt",""); loadTextFile((string *)aplStack_70); if (aplStack_50[0] != alStack_40) { operator_delete(aplStack_50[0],alStack_40[0] + 1); } uVar10 = *(int8 *)(__s[2] + 8); aplStack_50[0] = alStack_40; std::__cxx11::string::_M_construct<char_const*> (aplStack_50,"assets/font/VonwaonBitmap-16px.ttf",""); aplStack_90[0] = alStack_80; std::__cxx11::string::_M_construct<char_const*>(aplStack_90,"assets/UI/Textfield_01.png",""); lVar12 = HUDText::addHUDTextChild ((float)uVar10 * DAT_00110020,_DAT_00110160, (float)((ulong)uVar10 >> 0x20) * DAT_00110020,__s,aplStack_70,aplStack_50,0x10 ,aplStack_90,5); __s[0x18] = lVar12; if (aplStack_90[0] != alStack_80) { operator_delete(aplStack_90[0],alStack_80[0] + 1); } if (aplStack_50[0] != alStack_40) { operator_delete(aplStack_50[0],alStack_40[0] + 1); } HUDText::setBgSizeByText((HUDText *)__s[0x18],DAT_00110078); *(int1 *)(__s[0x18] + 0x48) = 0; aplStack_50[0] = alStack_40; std::__cxx11::string::_M_construct<char_const*>(aplStack_50,"assets/UI/pointer_c_shaded.png",""); aplStack_90[0] = alStack_80; std::__cxx11::string::_M_construct<char_const*>(aplStack_90,"assets/UI/pointer_c_shaded.png",""); lVar12 = UIMouse::addUIMouseChild(DAT_00110004,__s,aplStack_50,aplStack_90,1); __s[0x19] = lVar12; if (aplStack_90[0] != alStack_80) { operator_delete(aplStack_90[0],alStack_80[0] + 1); } if (aplStack_50[0] != alStack_40) { operator_delete(aplStack_50[0],alStack_40[0] + 1); } if (aplStack_70[0] != alStack_60) { operator_delete(aplStack_70[0],alStack_60[0] + 1); } if (plStack_b0 != alStack_a0) { operator_delete(plStack_b0,alStack_a0[0] + 1); } return; }
53,045
js_os_ttyGetWinSize
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_ttyGetWinSize(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int fd; struct winsize ws; JSValue obj; if (JS_ToInt32(ctx, &fd, argv[0])) return JS_EXCEPTION; if (ioctl(fd, TIOCGWINSZ, &ws) == 0 && ws.ws_col >= 4 && ws.ws_row >= 4) { obj = JS_NewArray(ctx); if (JS_IsException(obj)) return obj; JS_DefinePropertyValueUint32(ctx, obj, 0, JS_NewInt32(ctx, ws.ws_col), JS_PROP_C_W_E); JS_DefinePropertyValueUint32(ctx, obj, 1, JS_NewInt32(ctx, ws.ws_row), JS_PROP_C_W_E); return obj; } else { return JS_NULL; } }
O2
c
js_os_ttyGetWinSize: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %r15 movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x1c(%rsp), %rsi callq 0x25187 testl %eax, %eax je 0x17390 pushq $0x6 popq %r14 xorl %ebx, %ebx xorl %ecx, %ecx jmp 0x17424 movl 0x1c(%rsp), %edi xorl %ebx, %ebx leaq 0x14(%rsp), %rdx movl $0x5413, %esi # imm = 0x5413 xorl %eax, %eax callq 0xe3b0 pushq $0x2 popq %r14 testl %eax, %eax jne 0x17389 cmpw $0x4, 0x16(%rsp) jb 0x17389 cmpw $0x4, 0x14(%rsp) movl $0x0, %ecx jb 0x17424 movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000 movq %r15, %rdi callq 0x1ee6b movq %rax, %rbx movq %rdx, %r14 cmpl $0x6, %r14d je 0x1741e movzwl 0x16(%rsp), %r8d pushq $0x7 popq %rbp movl %ebp, (%rsp) movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx xorl %ecx, %ecx xorl %r9d, %r9d callq 0x24522 movzwl 0x14(%rsp), %r8d movl %ebp, (%rsp) pushq $0x1 popq %rcx movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx xorl %r9d, %r9d callq 0x24522 movq %rbx, %rcx andq %r12, %rcx movl %ebx, %eax orq %rcx, %rax movq %r14, %rdx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
js_os_ttyGetWinSize: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov r15, rdi mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+48h+var_2C] call JS_ToInt32 test eax, eax jz short loc_17390 push 6 pop r14 xor ebx, ebx loc_17389: xor ecx, ecx jmp loc_17424 loc_17390: mov edi, [rsp+48h+var_2C] xor ebx, ebx lea rdx, [rsp+48h+var_34] mov esi, 5413h xor eax, eax call _ioctl push 2 pop r14 test eax, eax jnz short loc_17389 cmp [rsp+48h+var_32], 4 jb short loc_17389 cmp [rsp+48h+var_34], 4 mov ecx, 0 jb short loc_17424 mov r12, 0FFFFFFFF00000000h mov rdi, r15 call JS_NewArray mov rbx, rax mov r14, rdx cmp r14d, 6 jz short loc_1741E movzx r8d, [rsp+48h+var_32] push 7 pop rbp mov [rsp+48h+var_48], ebp mov rdi, r15 mov rsi, rbx mov rdx, r14 xor ecx, ecx xor r9d, r9d call JS_DefinePropertyValueUint32 movzx r8d, [rsp+48h+var_34] mov [rsp+48h+var_48], ebp push 1 pop rcx mov rdi, r15 mov rsi, rbx mov rdx, r14 xor r9d, r9d call JS_DefinePropertyValueUint32 loc_1741E: mov rcx, rbx and rcx, r12 loc_17424: mov eax, ebx or rax, rcx mov rdx, r14 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn
unsigned long long js_os_ttyGetWinSize(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v5; // rbx unsigned long long v6; // rcx long long v7; // rax int v8; // edx int v9; // r14d unsigned __int16 v11; // [rsp+14h] [rbp-34h] BYREF unsigned __int16 v12; // [rsp+16h] [rbp-32h] _DWORD v13[11]; // [rsp+1Ch] [rbp-2Ch] BYREF if ( (unsigned int)JS_ToInt32(a1, v13, *a5, a5[1]) ) { LODWORD(v5) = 0; LABEL_3: v6 = 0LL; return v6 | (unsigned int)v5; } LODWORD(v5) = 0; if ( (unsigned int)ioctl(v13[0], 21523LL, &v11) || v12 < 4u ) goto LABEL_3; v6 = 0LL; if ( v11 >= 4u ) { v7 = JS_NewArray(a1); v5 = v7; v9 = v8; if ( v8 != 6 ) { JS_DefinePropertyValueUint32(a1, v7, v8, 0, v12, 0, 7); JS_DefinePropertyValueUint32(a1, v5, v9, 1, v11, 0, 7); } v6 = v5 & 0xFFFFFFFF00000000LL; } return v6 | (unsigned int)v5; }
js_os_ttyGetWinSize: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R15,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RSI,[RSP + 0x1c] CALL 0x00125187 TEST EAX,EAX JZ 0x00117390 PUSH 0x6 POP R14 XOR EBX,EBX LAB_00117389: XOR ECX,ECX JMP 0x00117424 LAB_00117390: MOV EDI,dword ptr [RSP + 0x1c] XOR EBX,EBX LEA RDX,[RSP + 0x14] MOV ESI,0x5413 XOR EAX,EAX CALL 0x0010e3b0 PUSH 0x2 POP R14 TEST EAX,EAX JNZ 0x00117389 CMP word ptr [RSP + 0x16],0x4 JC 0x00117389 CMP word ptr [RSP + 0x14],0x4 MOV ECX,0x0 JC 0x00117424 MOV R12,-0x100000000 MOV RDI,R15 CALL 0x0011ee6b MOV RBX,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x0011741e MOVZX R8D,word ptr [RSP + 0x16] PUSH 0x7 POP RBP MOV dword ptr [RSP],EBP MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 XOR ECX,ECX XOR R9D,R9D CALL 0x00124522 MOVZX R8D,word ptr [RSP + 0x14] MOV dword ptr [RSP],EBP PUSH 0x1 POP RCX MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 XOR R9D,R9D CALL 0x00124522 LAB_0011741e: MOV RCX,RBX AND RCX,R12 LAB_00117424: MOV EAX,EBX OR RAX,RCX MOV RDX,R14 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int1 [16] js_os_ttyGetWinSize(int8 param_1) { int iVar1; ulong uVar2; int8 *in_R8; int1 auVar3 [16]; int1 auVar4 [16]; ulong uStackY_50; ushort local_34; ushort local_32; int local_2c; iVar1 = JS_ToInt32(param_1,&local_2c,*in_R8,in_R8[1]); if (iVar1 == 0) { iVar1 = ioctl(local_2c,0x5413,&local_34); uStackY_50 = 2; auVar3 = ZEXT816(2) << 0x40; if ((iVar1 == 0) && (uStackY_50 = 2, 3 < local_32)) { uVar2 = 0; if (3 < local_34) { auVar3 = JS_NewArray(param_1); uVar2 = auVar3._0_8_; if (auVar3._8_4_ != 6) { JS_DefinePropertyValueUint32(param_1,uVar2,auVar3._8_8_,0,local_32,0,7); JS_DefinePropertyValueUint32(param_1,uVar2,auVar3._8_8_,1,local_34,0,7); } uVar2 = uVar2 & 0xffffffff00000000; } goto LAB_00117424; } } else { uStackY_50 = 6; } auVar3._8_8_ = 0; auVar3._0_8_ = uStackY_50; auVar3 = auVar3 << 0x40; uVar2 = 0; LAB_00117424: auVar4._0_8_ = auVar3._0_8_ & 0xffffffff | uVar2; auVar4._8_8_ = auVar3._8_8_; return auVar4; }
53,046
elf_file::read_binfile(std::shared_ptr<std::iostream>)
msxemulator/build_O3/_deps/picotool-src/elf/elf_file.cpp
std::vector<uint8_t> elf_file::read_binfile(std::shared_ptr<std::iostream> in) { std::vector<uint8_t> data; in->exceptions(std::iostream::failbit | std::iostream::badbit); in->seekg(0, in->end); data.resize(in->tellg()); in->seekg(0, in->beg); in->read(reinterpret_cast<char *>(&data[0]), data.size()); return data; }
O3
cpp
elf_file::read_binfile(std::shared_ptr<std::iostream>): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq (%rsi), %rax movq (%rax), %rcx movq -0x18(%rcx), %rcx leaq (%rax,%rcx), %rdi movl $0x5, 0x1c(%rax,%rcx) movl 0x20(%rax,%rcx), %esi callq 0xf780 movq (%r14), %rdi xorl %esi, %esi movl $0x2, %edx callq 0xf5e0 movq (%r14), %rdi callq 0xf7b0 movq %rbx, %rdi movq %rax, %rsi callq 0x76b5e movq (%r14), %rdi xorl %esi, %esi xorl %edx, %edx callq 0xf5e0 movq (%r14), %rdi movq (%rbx), %rsi movq 0x8(%rbx), %rdx subq %rsi, %rdx callq 0xf590 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq jmp 0xa1db2 movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0xa1dc9 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0xf470 movq %r14, %rdi callq 0xf7d0 nop
_ZN8elf_file12read_binfileESt10shared_ptrISdE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rax, [rsi] mov rcx, [rax] mov rcx, [rcx-18h] lea rdi, [rax+rcx] mov dword ptr [rax+rcx+1Ch], 5 mov esi, [rax+rcx+20h] call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) mov rdi, [r14] xor esi, esi mov edx, 2 call __ZNSi5seekgElSt12_Ios_Seekdir; std::istream::seekg(long,std::_Ios_Seekdir) mov rdi, [r14]; this call __ZNSi5tellgEv; std::istream::tellg(void) mov rdi, rbx mov rsi, rax call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong) mov rdi, [r14] xor esi, esi xor edx, edx call __ZNSi5seekgElSt12_Ios_Seekdir; std::istream::seekg(long,std::_Ios_Seekdir) mov rdi, [r14]; this mov rsi, [rbx]; char * mov rdx, [rbx+8] sub rdx, rsi; __int64 call __ZNSi4readEPcl; std::istream::read(char *,long) mov rax, rbx add rsp, 8 pop rbx pop r14 retn jmp short $+2 loc_A1DB2: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_A1DC9 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1DC9: mov rdi, r14 call __Unwind_Resume
_QWORD * elf_file::read_binfile(_QWORD *a1, std::istream **a2) { char *v3; // rdi unsigned long long v4; // rax *(_OWORD *)a1 = 0LL; a1[2] = 0LL; v3 = (char *)*a2 + *(_QWORD *)(*(_QWORD *)*a2 - 24LL); *((_DWORD *)v3 + 7) = 5; std::ios::clear(v3, *((unsigned int *)v3 + 8)); std::istream::seekg(*a2, 0LL, 2LL); v4 = std::istream::tellg(*a2); std::vector<unsigned char>::resize(a1, v4); std::istream::seekg(*a2, 0LL, 0LL); std::istream::read(*a2, (char *)*a1, a1[1] - *a1); return a1; }
read_binfile: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] LEA RDI,[RAX + RCX*0x1] MOV dword ptr [RAX + RCX*0x1 + 0x1c],0x5 MOV ESI,dword ptr [RAX + RCX*0x1 + 0x20] LAB_001a1d60: CALL 0x0010f780 MOV RDI,qword ptr [R14] XOR ESI,ESI MOV EDX,0x2 CALL 0x0010f5e0 MOV RDI,qword ptr [R14] LAB_001a1d77: CALL 0x0010f7b0 MOV RDI,RBX MOV RSI,RAX CALL 0x00176b5e MOV RDI,qword ptr [R14] LAB_001a1d8a: XOR ESI,ESI XOR EDX,EDX CALL 0x0010f5e0 MOV RDI,qword ptr [R14] MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] SUB RDX,RSI CALL 0x0010f590 LAB_001a1da5: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* elf_file::read_binfile(std::shared_ptr<std::iostream >) */ elf_file * __thiscall elf_file::read_binfile(elf_file *this,long *param_2) { long *plVar1; long lVar2; ulong uVar3; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; plVar1 = (long *)*param_2; lVar2 = *(long *)(*plVar1 + -0x18); *(int4 *)((long)plVar1 + lVar2 + 0x1c) = 5; /* try { // try from 001a1d60 to 001a1d73 has its CatchHandler @ 001a1db2 */ std::ios::clear((long)plVar1 + lVar2,*(int4 *)((long)plVar1 + lVar2 + 0x20)); std::istream::seekg(*param_2,0,2); /* try { // try from 001a1d77 to 001a1d86 has its CatchHandler @ 001a1db0 */ uVar3 = std::istream::tellg(); std::vector<unsigned_char,std::allocator<unsigned_char>>::resize ((vector<unsigned_char,std::allocator<unsigned_char>> *)this,uVar3); /* try { // try from 001a1d8a to 001a1da4 has its CatchHandler @ 001a1db2 */ std::istream::seekg(*param_2,0,0); std::istream::read((char *)*param_2,*(long *)this); return this; }
53,047
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
monkey531[P]llama/common/minja.hpp
json parseNumber(CharIterator& it, const CharIterator& end) { auto before = it; consumeSpaces(); auto start = it; bool hasDecimal = false; bool hasExponent = false; if (it != end && (*it == '-' || *it == '+')) ++it; while (it != end) { if (std::isdigit(*it)) { ++it; } else if (*it == '.') { if (hasDecimal) throw std::runtime_error("Multiple decimal points"); hasDecimal = true; ++it; } else if (it != start && (*it == 'e' || *it == 'E')) { if (hasExponent) throw std::runtime_error("Multiple exponents"); hasExponent = true; ++it; } else { break; } } if (start == it) { it = before; return json(); // No valid characters found } std::string str(start, it); try { return json::parse(str); } catch (json::parse_error& e) { throw std::runtime_error("Failed to parse number: '" + str + "' (" + std::string(e.what()) + ")"); return json(); } }
O0
cpp
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&): subq $0x1a8, %rsp # imm = 0x1A8 movq %rdi, 0x48(%rsp) movq %rdi, %rax movq %rax, 0x50(%rsp) movq %rdi, 0x1a0(%rsp) movq %rsi, 0x198(%rsp) movq %rdx, 0x190(%rsp) movq %rcx, 0x188(%rsp) movq 0x198(%rsp), %rdi movq 0x190(%rsp), %rax movq (%rax), %rax movq %rax, 0x180(%rsp) movl $0x1, %esi callq 0x118510 movq 0x190(%rsp), %rax movq (%rax), %rax movq %rax, 0x178(%rsp) movb $0x0, 0x177(%rsp) movb $0x0, 0x176(%rsp) movq 0x190(%rsp), %rdi movq 0x188(%rsp), %rsi callq 0xaf570 testb $0x1, %al jne 0x125997 jmp 0x1259ce movq 0x190(%rsp), %rdi callq 0xaf5c0 movsbl (%rax), %eax cmpl $0x2d, %eax je 0x1259c1 movq 0x190(%rsp), %rdi callq 0xaf5c0 movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x1259ce movq 0x190(%rsp), %rdi callq 0xaf670 jmp 0x1259d0 movq 0x190(%rsp), %rdi movq 0x188(%rsp), %rsi callq 0xaf570 testb $0x1, %al jne 0x1259ee jmp 0x125b87 movq 0x190(%rsp), %rdi callq 0xaf5c0 movsbl (%rax), %edi callq 0x5c900 cmpl $0x0, %eax je 0x125a1a movq 0x190(%rsp), %rdi callq 0xaf670 jmp 0x125b82 movq 0x190(%rsp), %rdi callq 0xaf5c0 movsbl (%rax), %eax cmpl $0x2e, %eax jne 0x125ab5 testb $0x1, 0x177(%rsp) je 0x125a9b movl $0x10, %edi callq 0x5c740 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x40(%rsp) leaq 0xf4468(%rip), %rsi # 0x219ec1 callq 0x5c4e0 jmp 0x125a60 movq 0x40(%rsp), %rdi movq 0x18753c(%rip), %rsi # 0x2acfa8 movq 0x1874fd(%rip), %rdx # 0x2acf70 callq 0x5cbf0 movq 0x40(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) callq 0x5d110 jmp 0x125efd movb $0x1, 0x177(%rsp) movq 0x190(%rsp), %rdi callq 0xaf670 jmp 0x125b80 movq 0x190(%rsp), %rdi leaq 0x178(%rsp), %rsi callq 0xaf570 testb $0x1, %al jne 0x125ad3 jmp 0x125b7c movq 0x190(%rsp), %rdi callq 0xaf5c0 movsbl (%rax), %eax cmpl $0x65, %eax je 0x125afd movq 0x190(%rsp), %rdi callq 0xaf5c0 movsbl (%rax), %eax cmpl $0x45, %eax jne 0x125b7c testb $0x1, 0x176(%rsp) je 0x125b65 movl $0x10, %edi callq 0x5c740 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x38(%rsp) leaq 0xf43b6(%rip), %rsi # 0x219ed9 callq 0x5c4e0 jmp 0x125b2a movq 0x38(%rsp), %rdi movq 0x187472(%rip), %rsi # 0x2acfa8 movq 0x187433(%rip), %rdx # 0x2acf70 callq 0x5cbf0 movq 0x38(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) callq 0x5d110 jmp 0x125efd movb $0x1, 0x176(%rsp) movq 0x190(%rsp), %rdi callq 0xaf670 jmp 0x125b7e jmp 0x125b87 jmp 0x125b80 jmp 0x125b82 jmp 0x1259d0 movq 0x190(%rsp), %rsi leaq 0x178(%rsp), %rdi callq 0xeae50 testb $0x1, %al jne 0x125ba2 jmp 0x125bc8 movq 0x48(%rsp), %rdi movq 0x190(%rsp), %rax movq 0x180(%rsp), %rcx movq %rcx, (%rax) xorl %eax, %eax movl %eax, %esi callq 0xaa460 jmp 0x125ef0 movq 0x178(%rsp), %rax movq %rax, 0x138(%rsp) movq 0x190(%rsp), %rax movq (%rax), %rax movq %rax, 0x130(%rsp) leaq 0x12f(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x5d2b0 movq 0x30(%rsp), %rcx movq 0x138(%rsp), %rsi movq 0x130(%rsp), %rdx leaq 0x140(%rsp), %rdi callq 0xf17b0 jmp 0x125c21 leaq 0x12f(%rsp), %rdi callq 0x5d830 xorl %eax, %eax movl %eax, 0x2c(%rsp) movl %eax, %esi leaq 0x108(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xaa3e0 movq 0x48(%rsp), %rdi movq 0x20(%rsp), %rdx movl 0x2c(%rsp), %r8d leaq 0x140(%rsp), %rsi movl $0x1, %ecx callq 0x127840 jmp 0x125c6b leaq 0x108(%rsp), %rdi callq 0xaa450 leaq 0x140(%rsp), %rdi callq 0x5d858 jmp 0x125ef0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) leaq 0x12f(%rsp), %rdi callq 0x5d830 jmp 0x125efd movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) leaq 0x108(%rsp), %rdi callq 0xaa450 movl 0x164(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0x125ee1 movq 0x168(%rsp), %rdi callq 0x5c0f0 movq %rax, 0x100(%rsp) movb $0x1, 0x5e(%rsp) movl $0x10, %edi callq 0x5c740 movq %rax, 0x18(%rsp) leaq 0xf41d7(%rip), %rsi # 0x219eec leaq 0x80(%rsp), %rdi leaq 0x140(%rsp), %rdx callq 0x987e0 jmp 0x125d2c leaq 0xf41d3(%rip), %rdx # 0x219f06 leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x96330 jmp 0x125d4a movq 0x100(%rsp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq %rax, 0x8(%rsp) leaq 0x5f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x5d2b0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x60(%rsp), %rdi callq 0x65f10 jmp 0x125d85 leaq 0xc0(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x6f5f0 jmp 0x125da1 leaq 0xf8737(%rip), %rdx # 0x21e4df leaq 0xe0(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0x96330 jmp 0x125dbf movq 0x18(%rsp), %rdi leaq 0xe0(%rsp), %rsi callq 0x5c540 jmp 0x125dd3 movq 0x18(%rsp), %rdi movb $0x0, 0x5e(%rsp) movq 0x1871c4(%rip), %rsi # 0x2acfa8 movq 0x187185(%rip), %rdx # 0x2acf70 callq 0x5cbf0 jmp 0x125f12 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) jmp 0x125ec5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) jmp 0x125eb8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) jmp 0x125ea1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) jmp 0x125e97 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) jmp 0x125e8a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x168(%rsp) movl %eax, 0x164(%rsp) leaq 0xe0(%rsp), %rdi callq 0x5d858 leaq 0xc0(%rsp), %rdi callq 0x5d858 leaq 0x60(%rsp), %rdi callq 0x5d858 leaq 0x5f(%rsp), %rdi callq 0x5d830 leaq 0xa0(%rsp), %rdi callq 0x5d858 leaq 0x80(%rsp), %rdi callq 0x5d858 testb $0x1, 0x5e(%rsp) jne 0x125ece jmp 0x125ed8 movq 0x18(%rsp), %rdi callq 0x5d110 callq 0x5cf20 jmp 0x125edf jmp 0x125ee1 leaq 0x140(%rsp), %rdi callq 0x5d858 jmp 0x125efd movq 0x50(%rsp), %rax addq $0x1a8, %rsp # imm = 0x1A8 retq movq 0x168(%rsp), %rdi callq 0x5ccd0 movq %rax, %rdi callq 0x679c0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_: sub rsp, 1A8h mov [rsp+1A8h+var_160], rdi mov rax, rdi mov [rsp+1A8h+var_158], rax mov [rsp+1A8h+var_8], rdi mov [rsp+1A8h+var_10], rsi mov [rsp+1A8h+var_18], rdx mov [rsp+1A8h+var_20], rcx mov rdi, [rsp+1A8h+var_10] mov rax, [rsp+1A8h+var_18] mov rax, [rax] mov [rsp+1A8h+var_28], rax mov esi, 1 call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) mov rax, [rsp+1A8h+var_18] mov rax, [rax] mov [rsp+1A8h+var_30], rax mov [rsp+1A8h+var_31], 0 mov [rsp+1A8h+var_32], 0 mov rdi, [rsp+1A8h+var_18] mov rsi, [rsp+1A8h+var_20] call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_125997 jmp short loc_1259CE loc_125997: mov rdi, [rsp+1A8h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jz short loc_1259C1 mov rdi, [rsp+1A8h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_1259CE loc_1259C1: mov rdi, [rsp+1A8h+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) loc_1259CE: jmp short $+2 loc_1259D0: mov rdi, [rsp+1A8h+var_18] mov rsi, [rsp+1A8h+var_20] call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_1259EE jmp loc_125B87 loc_1259EE: mov rdi, [rsp+1A8h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx edi, byte ptr [rax] call _isdigit cmp eax, 0 jz short loc_125A1A mov rdi, [rsp+1A8h+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) jmp loc_125B82 loc_125A1A: mov rdi, [rsp+1A8h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_125AB5 test [rsp+1A8h+var_31], 1 jz short loc_125A9B mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+1A8h+var_168], rax lea rsi, aMultipleDecima; "Multiple decimal points" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_125A60: mov rdi, [rsp+1A8h+var_168]; void * mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+1A8h+var_168]; void * mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax call ___cxa_free_exception jmp loc_125EFD loc_125A9B: mov [rsp+1A8h+var_31], 1 mov rdi, [rsp+1A8h+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) jmp loc_125B80 loc_125AB5: mov rdi, [rsp+1A8h+var_18] lea rsi, [rsp+1A8h+var_30] call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_125AD3 jmp loc_125B7C loc_125AD3: mov rdi, [rsp+1A8h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] cmp eax, 65h ; 'e' jz short loc_125AFD mov rdi, [rsp+1A8h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] cmp eax, 45h ; 'E' jnz short loc_125B7C loc_125AFD: test [rsp+1A8h+var_32], 1 jz short loc_125B65 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+1A8h+var_170], rax lea rsi, aMultipleExpone; "Multiple exponents" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_125B2A: mov rdi, [rsp+1A8h+var_170]; void * mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+1A8h+var_170]; void * mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax call ___cxa_free_exception jmp loc_125EFD loc_125B65: mov [rsp+1A8h+var_32], 1 mov rdi, [rsp+1A8h+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) jmp short loc_125B7E loc_125B7C: jmp short loc_125B87 loc_125B7E: jmp short $+2 loc_125B80: jmp short $+2 loc_125B82: jmp loc_1259D0 loc_125B87: mov rsi, [rsp+1A8h+var_18] lea rdi, [rsp+1A8h+var_30] call _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator==<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_125BA2 jmp short loc_125BC8 loc_125BA2: mov rdi, [rsp+1A8h+var_160] mov rax, [rsp+1A8h+var_18] mov rcx, [rsp+1A8h+var_28] mov [rax], rcx xor eax, eax mov esi, eax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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(decltype(nullptr)) jmp loc_125EF0 loc_125BC8: mov rax, [rsp+1A8h+var_30] mov [rsp+1A8h+var_70], rax mov rax, [rsp+1A8h+var_18] mov rax, [rax] mov [rsp+1A8h+var_78], rax lea rdi, [rsp+1A8h+var_79] mov [rsp+1A8h+var_178], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rcx, [rsp+1A8h+var_178] mov rsi, [rsp+1A8h+var_70] mov rdx, [rsp+1A8h+var_78] lea rdi, [rsp+1A8h+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IN9__gnu_cxx17__normal_iteratorIPKcS4_EEvEET_SB_RKS3_; std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<char> const&) jmp short $+2 loc_125C21: lea rdi, [rsp+1A8h+var_79] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() xor eax, eax mov [rsp+1A8h+var_17C], eax mov esi, eax lea rdi, [rsp+1A8h+var_A0] mov [rsp+1A8h+var_188], rdi call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2EDn; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(decltype(nullptr)) mov rdi, [rsp+1A8h+var_160] mov rdx, [rsp+1A8h+var_188] mov r8d, [rsp+1A8h+var_17C] lea rsi, [rsp+1A8h+var_68] mov ecx, 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string&>(std::string&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) jmp short $+2 loc_125C6B: lea rdi, [rsp+1A8h+var_A0] call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::~function() lea rdi, [rsp+1A8h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_125EF0 mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax lea rdi, [rsp+1A8h+var_79] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_125EFD mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax lea rdi, [rsp+1A8h+var_A0] call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::~function() mov eax, [rsp+1A8h+var_44] mov ecx, 1 cmp eax, ecx jnz loc_125EE1 mov rdi, [rsp+1A8h+var_40]; void * call ___cxa_begin_catch mov [rsp+1A8h+var_A8], rax mov [rsp+1A8h+var_14A], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov [rsp+1A8h+var_190], rax; int lea rsi, aFailedToParseN; "Failed to parse number: '" lea rdi, [rsp+1A8h+var_128]; int lea rdx, [rsp+1A8h+var_68]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) jmp short $+2 loc_125D2C: lea rdx, asc_219F06; "' (" lea rdi, [rsp+1A8h+var_108] lea rsi, [rsp+1A8h+var_128] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_125D4A: mov rdi, [rsp+1A8h+var_A8] mov rax, [rdi] mov rax, [rax+10h] call rax mov [rsp+1A8h+var_1A0], rax lea rdi, [rsp+1A8h+var_149] mov [rsp+1A8h+var_198], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+1A8h+var_1A0] mov rdx, [rsp+1A8h+var_198] lea rdi, [rsp+1A8h+var_148] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_125D85: lea rdi, [rsp+1A8h+var_E8] lea rsi, [rsp+1A8h+var_108] lea rdx, [rsp+1A8h+var_148] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_125DA1: lea rdx, a09401910201912+51h; ")" lea rdi, [rsp+1A8h+var_C8] lea rsi, [rsp+1A8h+var_E8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_125DBF: mov rdi, [rsp+1A8h+var_190] lea rsi, [rsp+1A8h+var_C8] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_125DD3: mov rdi, [rsp+1A8h+var_190]; void * mov [rsp+1A8h+var_14A], 0 mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_125F12 mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax jmp loc_125EC5 mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax jmp loc_125EB8 mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax jmp short loc_125EA1 mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax jmp short loc_125E97 mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax jmp short loc_125E8A mov rcx, rax mov eax, edx mov [rsp+1A8h+var_40], rcx mov [rsp+1A8h+var_44], eax lea rdi, [rsp+1A8h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_125E8A: lea rdi, [rsp+1A8h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_125E97: lea rdi, [rsp+1A8h+var_148]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_125EA1: lea rdi, [rsp+1A8h+var_149] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+1A8h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_125EB8: lea rdi, [rsp+1A8h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_125EC5: test [rsp+1A8h+var_14A], 1 jnz short loc_125ECE jmp short loc_125ED8 loc_125ECE: mov rdi, [rsp+1A8h+var_190]; void * call ___cxa_free_exception loc_125ED8: call ___cxa_end_catch jmp short $+2 loc_125EDF: jmp short $+2 loc_125EE1: lea rdi, [rsp+1A8h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_125EFD loc_125EF0: mov rax, [rsp+1A8h+var_158] add rsp, 1A8h retn loc_125EFD: mov rdi, [rsp+1A8h+var_40] call __Unwind_Resume mov rdi, rax call __clang_call_terminate loc_125F12: nop word ptr [rax+rax+00000000h] nop dword ptr [rax+00h]
long long minja::Parser::parseNumber(long long a1, long long a2, long long *a3, long long a4) { char *v4; // rax int v5; // r9d std::runtime_error *v7; // [rsp+38h] [rbp-170h] std::runtime_error *exception; // [rsp+40h] [rbp-168h] _BYTE v9[39]; // [rsp+108h] [rbp-A0h] BYREF char v10; // [rsp+12Fh] [rbp-79h] BYREF long long v11; // [rsp+130h] [rbp-78h] long long v12; // [rsp+138h] [rbp-70h] int v13[9]; // [rsp+140h] [rbp-68h] BYREF char v14; // [rsp+176h] [rbp-32h] char v15; // [rsp+177h] [rbp-31h] long long v16; // [rsp+178h] [rbp-30h] BYREF long long v17; // [rsp+180h] [rbp-28h] long long v18; // [rsp+188h] [rbp-20h] long long *v19; // [rsp+190h] [rbp-18h] long long v20; // [rsp+198h] [rbp-10h] long long v21; // [rsp+1A0h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = *a3; minja::Parser::consumeSpaces(a2, 1); v16 = *v19; v15 = 0; v14 = 0; if ( __gnu_cxx::operator!=<char const*,std::string>((long long)v19, v18) && (*(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)v19) == 45 || *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)v19) == 43) ) { __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v19); } while ( __gnu_cxx::operator!=<char const*,std::string>((long long)v19, v18) ) { v4 = (char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)v19); if ( (unsigned int)isdigit((unsigned int)*v4) ) { __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v19); } else if ( *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)v19) == 46 ) { if ( (v15 & 1) != 0 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple decimal points"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v15 = 1; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v19); } else { if ( !__gnu_cxx::operator!=<char const*,std::string>((long long)v19, (long long)&v16) || *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)v19) != 101 && *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)v19) != 69 ) { break; } if ( (v14 & 1) != 0 ) { v7 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v7, "Multiple exponents"); __cxa_throw( v7, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v14 = 1; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v19); } } if ( __gnu_cxx::operator==<char const*,std::string>((long long)&v16, (long long)v19) ) { *v19 = 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>::basic_json(a1); } else { v12 = v16; v11 = *v19; std::allocator<char>::allocator(); std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>( (long long)v13, v12, v11, (long long)&v10); std::allocator<char>::~allocator(&v10); std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function((std::_Function_base *)v9); 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>::parse<std::string&>( a1, (unsigned int)v13, (unsigned int)v9, 1, 0, v5); std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::~function((std::_Function_base *)v9); std::string::~string(v13); } return a1; }
53,048
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
monkey531[P]llama/common/minja.hpp
json parseNumber(CharIterator& it, const CharIterator& end) { auto before = it; consumeSpaces(); auto start = it; bool hasDecimal = false; bool hasExponent = false; if (it != end && (*it == '-' || *it == '+')) ++it; while (it != end) { if (std::isdigit(*it)) { ++it; } else if (*it == '.') { if (hasDecimal) throw std::runtime_error("Multiple decimal points"); hasDecimal = true; ++it; } else if (it != start && (*it == 'e' || *it == 'E')) { if (hasExponent) throw std::runtime_error("Multiple exponents"); hasExponent = true; ++it; } else { break; } } if (start == it) { it = before; return json(); // No valid characters found } std::string str(start, it); try { return json::parse(str); } catch (json::parse_error& e) { throw std::runtime_error("Failed to parse number: '" + str + "' (" + std::string(e.what()) + ")"); return json(); } }
O1
cpp
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %r14 movq %rdi, %rbx movq (%rdx), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsi), %rbp movq 0x20(%rsi), %r13 cmpq %rbp, %r13 je 0x8f88d movq %rsi, %r12 movsbl (%r13), %edi callq 0x1b0c0 testl %eax, %eax je 0x8f88d incq %r13 movq %r13, 0x20(%r12) cmpq %rbp, %r13 jne 0x8f872 movq (%r14), %rsi cmpq %rsi, (%r15) je 0x8f8a9 movzbl (%rsi), %eax cmpl $0x2d, %eax je 0x8f8a2 cmpl $0x2b, %eax jne 0x8f8a9 leaq 0x1(%rsi), %rax movq %rax, (%r14) movq (%r14), %rdx cmpq (%r15), %rdx je 0x8f8f9 xorl %eax, %eax xorl %ecx, %ecx movsbl (%rdx), %edi leal -0x30(%rdi), %r8d cmpl $0xa, %r8d jb 0x8f8ee movzbl %dil, %edi cmpl $0x2e, %edi jne 0x8f8d6 testb $0x1, %al movb $0x1, %al je 0x8f8ee jmp 0x8f9ac cmpq %rsi, %rdx je 0x8f8f9 orl $0x20, %edi cmpl $0x65, %edi jne 0x8f8f9 testb $0x1, %cl movb $0x1, %cl jne 0x8f9ca incq %rdx movq %rdx, (%r14) cmpq (%r15), %rdx jne 0x8f8b5 cmpq %rsi, %rdx je 0x8f96a leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x10(%rsp), %rdi callq 0x739e2 xorps %xmm0, %xmm0 leaq 0x70(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x10(%rsp), %rsi movq %rbx, %rdi movl $0x1, %ecx xorl %r8d, %r8d callq 0x90242 movq 0x80(%rsp), %rax testq %rax, %rax je 0x8f951 leaq 0x70(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x8f997 movq 0x20(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x8f997 movq 0x8(%rsp), %rax movq %rax, (%r14) movb $0x0, (%rbx) movq $0x0, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x5bbb4 movq %rbx, %rdi movl $0x1, %esi callq 0x5bbb4 movq %rbx, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b4d0 movq %rax, %rbx leaq 0x65b13(%rip), %rsi # 0xf54d3 movq %rax, %rdi callq 0x1b370 jmp 0x8f9e6 movl $0x10, %edi callq 0x1b4d0 movq %rax, %rbx leaq 0x65b0d(%rip), %rsi # 0xf54eb movq %rax, %rdi callq 0x1b370 movq 0xa25fb(%rip), %rsi # 0x131fe8 movq 0xa255c(%rip), %rdx # 0x131f50 movq %rbx, %rdi callq 0x1c1c0 jmp 0x8fc5c movq %rdx, %rbx movq %rax, %r14 movq 0x80(%rsp), %rax testq %rax, %rax je 0x8fa23 leaq 0x70(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax cmpl $0x1, %ebx jne 0x8fc41 movq %r14, %rdi callq 0x1b3e0 movq %rax, %r14 movl $0x10, %edi callq 0x1b4d0 movq %rax, %rbx leaq 0x65ab3(%rip), %rsi # 0xf54fe leaq 0xb8(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x57c87 leaq 0x65ab4(%rip), %rsi # 0xf5518 leaq 0xb8(%rsp), %rdi callq 0x1c3e0 leaq 0x40(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x8fa94 movups (%rcx), %xmm0 movups %xmm0, (%r12) jmp 0x8faa1 movq %rdx, 0x30(%rsp) movq (%rcx), %rdx movq %rdx, 0x40(%rsp) movq 0x8(%rax), %rdx movq %rdx, 0x38(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) leaq 0x98(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %rax, %rsi callq 0x562da leaq 0xd8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x98(%rsp), %rdx callq 0x7c40c leaq 0x6a00b(%rip), %rsi # 0xf9b03 leaq 0xd8(%rsp), %rdi callq 0x1c3e0 leaq 0x60(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x8fb27 movups (%rcx), %xmm0 movups %xmm0, (%r13) jmp 0x8fb34 movq %rdx, 0x50(%rsp) movq (%rcx), %rdx movq %rdx, 0x60(%rsp) movq 0x8(%rax), %rdx leaq 0x50(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movb $0x1, %bpl movq %rbx, %rdi callq 0x1c0a0 xorl %ebp, %ebp movq 0xa2484(%rip), %rsi # 0x131fe8 movq 0xa23e5(%rip), %rdx # 0x131f50 movq %rbx, %rdi callq 0x1c1c0 movq %rax, %r14 movq 0x50(%rsp), %rdi cmpq %r13, %rdi je 0x8fb95 movq 0x60(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x8fb95 movq %rax, %r14 movb $0x1, %bpl leaq 0xe8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8fbbe movq 0xe8(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x8fbbe movq %rax, %r14 movb $0x1, %bpl leaq 0xa8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8fbe7 movq 0xa8(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x8fbe7 movq %rax, %r14 movb $0x1, %bpl movq 0x30(%rsp), %rdi cmpq %r12, %rdi je 0x8fc06 movq 0x40(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x8fc06 movq %rax, %r14 movb $0x1, %bpl leaq 0xc8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8fc2f movq 0xc8(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x8fc2f movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x8fc3c movq %rbx, %rdi callq 0x1b760 callq 0x1c0e0 movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x8fc76 movq 0x20(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x8fc76 jmp 0x8fc5c movq %rax, %rdi callq 0x2447b movq %rax, %r14 jmp 0x8fc76 jmp 0x8fc6b movq %rax, %r14 movq %rbx, %rdi callq 0x1b760 movq %r14, %rdi callq 0x1c250
_ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r14, rdx mov rbx, rdi mov rax, [rdx] mov [rsp+128h+var_120], rax mov rbp, [rsi+18h] mov r13, [rsi+20h] cmp r13, rbp jz short loc_8F88D mov r12, rsi loc_8F872: movsx edi, byte ptr [r13+0] call _isspace test eax, eax jz short loc_8F88D inc r13 mov [r12+20h], r13 cmp r13, rbp jnz short loc_8F872 loc_8F88D: mov rsi, [r14] cmp [r15], rsi jz short loc_8F8A9 movzx eax, byte ptr [rsi] cmp eax, 2Dh ; '-' jz short loc_8F8A2 cmp eax, 2Bh ; '+' jnz short loc_8F8A9 loc_8F8A2: lea rax, [rsi+1] mov [r14], rax loc_8F8A9: mov rdx, [r14] cmp rdx, [r15] jz short loc_8F8F9 xor eax, eax xor ecx, ecx loc_8F8B5: movsx edi, byte ptr [rdx] lea r8d, [rdi-30h] cmp r8d, 0Ah jb short loc_8F8EE movzx edi, dil cmp edi, 2Eh ; '.' jnz short loc_8F8D6 test al, 1 mov al, 1 jz short loc_8F8EE jmp loc_8F9AC loc_8F8D6: cmp rdx, rsi jz short loc_8F8F9 or edi, 20h cmp edi, 65h ; 'e' jnz short loc_8F8F9 test cl, 1 mov cl, 1 jnz loc_8F9CA loc_8F8EE: inc rdx mov [r14], rdx cmp rdx, [r15] jnz short loc_8F8B5 loc_8F8F9: cmp rdx, rsi jz short loc_8F96A lea r15, [rsp+128h+var_108] mov [r15-10h], r15 lea rdi, [rsp+128h+var_118] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) xorps xmm0, xmm0 lea rdx, [rsp+128h+var_B8] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rsi, [rsp+128h+var_118] mov rdi, rbx mov ecx, 1 xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string&>(std::string&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) mov rax, [rsp+128h+var_A8] test rax, rax jz short loc_8F951 lea rdi, [rsp+128h+var_B8] mov rsi, rdi mov edx, 3 call rax loc_8F951: mov rdi, [rsp+128h+var_118]; void * cmp rdi, r15 jz short loc_8F997 mov rsi, [rsp+128h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8F997 loc_8F96A: mov rax, [rsp+128h+var_120] mov [r14], rax mov byte ptr [rbx], 0 mov qword ptr [rbx+8], 0 mov rdi, rbx 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, rbx 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) loc_8F997: mov rax, rbx add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8F9AC: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMultipleDecima; "Multiple decimal points" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_8F9E6 loc_8F9CA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMultipleExpone; "Multiple exponents" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_8F9E6: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_8FC5C mov rbx, rdx mov r14, rax mov rax, [rsp+128h+var_A8] test rax, rax jz short loc_8FA23 lea rdi, [rsp+128h+var_B8] mov rsi, rdi mov edx, 3 call rax loc_8FA23: cmp ebx, 1 jnz loc_8FC41 mov rdi, r14; void * call ___cxa_begin_catch mov r14, rax mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToParseN; "Failed to parse number: '" lea rdi, [rsp+128h+var_70] lea rdx, [rsp+128h+var_118] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, asc_F5518; "' (" lea rdi, [rsp+128h+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+128h+var_E8] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_8FA94 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 jmp short loc_8FAA1 loc_8FA94: mov [rsp+128h+var_F8], rdx mov rdx, [rcx] mov [rsp+128h+var_E8], rdx loc_8FAA1: mov rdx, [rax+8] mov [rsp+128h+var_F0], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rax, [r14] mov rdi, r14 call qword ptr [rax+10h] lea rdi, [rsp+128h+var_90] lea rdx, [rsp+128h+var_121] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+128h+var_50] lea rsi, [rsp+128h+var_F8] lea rdx, [rsp+128h+var_90] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, a09401910201912+51h; ")" lea rdi, [rsp+128h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+128h+var_C8] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_8FB27 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 jmp short loc_8FB34 loc_8FB27: mov [rsp+128h+var_D8], rdx mov rdx, [rcx] mov [rsp+128h+var_C8], rdx loc_8FB34: mov rdx, [rax+8] lea rsi, [rsp+128h+var_D8] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov bpl, 1 mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+128h+var_D8]; void * cmp rdi, r13 jz short loc_8FB95 mov rsi, [rsp+128h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8FB95 mov r14, rax mov bpl, 1 loc_8FB95: lea rax, [rsp+128h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8FBBE mov rsi, [rsp+128h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8FBBE mov r14, rax mov bpl, 1 loc_8FBBE: lea rax, [rsp+128h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8FBE7 mov rsi, [rsp+128h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8FBE7 mov r14, rax mov bpl, 1 loc_8FBE7: mov rdi, [rsp+128h+var_F8]; void * cmp rdi, r12 jz short loc_8FC06 mov rsi, [rsp+128h+var_E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8FC06 mov r14, rax mov bpl, 1 loc_8FC06: lea rax, [rsp+128h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8FC2F mov rsi, [rsp+128h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8FC2F mov r14, rax mov bpl, 1 loc_8FC2F: test bpl, bpl jz short loc_8FC3C mov rdi, rbx; void * call ___cxa_free_exception loc_8FC3C: call ___cxa_end_catch loc_8FC41: mov rdi, [rsp+128h+var_118]; void * cmp rdi, r15 jz short loc_8FC76 mov rsi, [rsp+128h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8FC76 jmp short $+2 loc_8FC5C: mov rdi, rax call __clang_call_terminate mov r14, rax jmp short loc_8FC76 jmp short $+2 loc_8FC6B: mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception loc_8FC76: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseNumber(long long a1, long long a2, char **a3, char **a4) { char *v7; // rbp char *i; // r13 char *v9; // rsi int v10; // eax char *v11; // rdx char v12; // al char v13; // cl int v14; // edi bool v15; // zf std::runtime_error *exception; // rbx char *v18; // [rsp+8h] [rbp-120h] void *v19[2]; // [rsp+10h] [rbp-118h] BYREF _QWORD v20[2]; // [rsp+20h] [rbp-108h] BYREF __int128 v21; // [rsp+70h] [rbp-B8h] BYREF __int128 v22; // [rsp+80h] [rbp-A8h] v18 = *a3; v7 = *(char **)(a2 + 24); for ( i = *(char **)(a2 + 32); i != v7; *(_QWORD *)(a2 + 32) = ++i ) { if ( !(unsigned int)isspace((unsigned int)*i) ) break; } v9 = *a3; if ( *a4 != *a3 ) { v10 = (unsigned __int8)*v9; if ( v10 == 45 || v10 == 43 ) *a3 = v9 + 1; } v11 = *a3; if ( *a3 != *a4 ) { v12 = 0; v13 = 0; do { v14 = *v11; if ( (unsigned int)(v14 - 48) >= 0xA ) { if ( (unsigned __int8)v14 == 46 ) { v15 = (v12 & 1) == 0; v12 = 1; if ( !v15 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple decimal points"); goto LABEL_26; } } else { if ( v11 == v9 || ((unsigned __int8)v14 | 0x20) != 0x65 ) break; v15 = (v13 & 1) == 0; v13 = 1; if ( !v15 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple exponents"); LABEL_26: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } } *a3 = ++v11; } while ( v11 != *a4 ); } if ( v11 == v9 ) { *a3 = v18; *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 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); 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); } else { v19[0] = v20; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(v19, v9, (long long)v11); v22 = 0LL; v21 = 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>::parse<std::string&>( a1, v19, &v21, 1LL, 0LL); if ( (_QWORD)v22 ) ((void ( *)(__int128 *, __int128 *, long long))v22)(&v21, &v21, 3LL); if ( v19[0] != v20 ) operator delete(v19[0], v20[0] + 1LL); } return a1; }
parseNumber: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R14,RDX MOV RBX,RDI MOV RAX,qword ptr [RDX] MOV qword ptr [RSP + 0x8],RAX MOV RBP,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] CMP R13,RBP JZ 0x0018f88d MOV R12,RSI LAB_0018f872: MOVSX EDI,byte ptr [R13] CALL 0x0011b0c0 TEST EAX,EAX JZ 0x0018f88d INC R13 MOV qword ptr [R12 + 0x20],R13 CMP R13,RBP JNZ 0x0018f872 LAB_0018f88d: MOV RSI,qword ptr [R14] CMP qword ptr [R15],RSI JZ 0x0018f8a9 MOVZX EAX,byte ptr [RSI] CMP EAX,0x2d JZ 0x0018f8a2 CMP EAX,0x2b JNZ 0x0018f8a9 LAB_0018f8a2: LEA RAX,[RSI + 0x1] MOV qword ptr [R14],RAX LAB_0018f8a9: MOV RDX,qword ptr [R14] CMP RDX,qword ptr [R15] JZ 0x0018f8f9 XOR EAX,EAX XOR ECX,ECX LAB_0018f8b5: MOVSX EDI,byte ptr [RDX] LEA R8D,[RDI + -0x30] CMP R8D,0xa JC 0x0018f8ee MOVZX EDI,DIL CMP EDI,0x2e JNZ 0x0018f8d6 TEST AL,0x1 MOV AL,0x1 JZ 0x0018f8ee JMP 0x0018f9ac LAB_0018f8d6: CMP RDX,RSI JZ 0x0018f8f9 OR EDI,0x20 CMP EDI,0x65 JNZ 0x0018f8f9 TEST CL,0x1 MOV CL,0x1 JNZ 0x0018f9ca LAB_0018f8ee: INC RDX MOV qword ptr [R14],RDX CMP RDX,qword ptr [R15] JNZ 0x0018f8b5 LAB_0018f8f9: CMP RDX,RSI JZ 0x0018f96a LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 LAB_0018f907: LEA RDI,[RSP + 0x10] CALL 0x001739e2 XORPS XMM0,XMM0 LEA RDX,[RSP + 0x70] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_0018f920: LEA RSI,[RSP + 0x10] MOV RDI,RBX MOV ECX,0x1 XOR R8D,R8D CALL 0x00190242 MOV RAX,qword ptr [RSP + 0x80] TEST RAX,RAX JZ 0x0018f951 LAB_0018f942: LEA RDI,[RSP + 0x70] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0018f951: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R15 JZ 0x0018f997 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011ba60 JMP 0x0018f997 LAB_0018f96a: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [R14],RAX MOV byte ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x0015bbb4 MOV RDI,RBX MOV ESI,0x1 CALL 0x0015bbb4 LAB_0018f997: MOV RAX,RBX ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018f9ac: MOV EDI,0x10 CALL 0x0011b4d0 MOV RBX,RAX LAB_0018f9b9: LEA RSI,[0x1f54d3] MOV RDI,RAX CALL 0x0011b370 LAB_0018f9c8: JMP 0x0018f9e6 LAB_0018f9ca: MOV EDI,0x10 CALL 0x0011b4d0 MOV RBX,RAX LAB_0018f9d7: LEA RSI,[0x1f54eb] MOV RDI,RAX CALL 0x0011b370 LAB_0018f9e6: MOV RSI,qword ptr [0x00231fe8] MOV RDX,qword ptr [0x00231f50] MOV RDI,RBX CALL 0x0011c1c0
/* minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > const&) */ __normal_iterator * minja::Parser::parseNumber(__normal_iterator *param_1,__normal_iterator *param_2) { byte bVar1; long lVar2; char *pcVar3; byte *pbVar4; bool bVar5; bool bVar6; bool bVar7; int iVar8; runtime_error *this; bool bVar9; int8 *in_RCX; long *in_RDX; byte *pbVar10; char *pcVar11; long *local_118 [2]; long local_108 [10]; int8 local_b8; int8 uStack_b0; code *local_a8; int8 uStack_a0; lVar2 = *in_RDX; pcVar3 = *(char **)(param_2 + 0x18); pcVar11 = *(char **)(param_2 + 0x20); while ((pcVar11 != pcVar3 && (iVar8 = isspace((int)*pcVar11), iVar8 != 0))) { pcVar11 = pcVar11 + 1; *(char **)(param_2 + 0x20) = pcVar11; } pbVar4 = (byte *)*in_RDX; if (((byte *)*in_RCX != pbVar4) && ((*pbVar4 == 0x2d || (*pbVar4 == 0x2b)))) { *in_RDX = (long)(pbVar4 + 1); } pbVar10 = (byte *)*in_RDX; if (pbVar10 != (byte *)*in_RCX) { bVar7 = false; bVar9 = false; do { bVar1 = *pbVar10; bVar5 = bVar7; bVar6 = bVar9; if (9 < (int)(char)bVar1 - 0x30U) { if (bVar1 == 0x2e) { bVar5 = true; if (bVar7) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018f9b9 to 0018f9c7 has its CatchHandler @ 0018fc6b */ std::runtime_error::runtime_error(this,"Multiple decimal points"); LAB_0018f9e6: /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00231fe8,PTR__runtime_error_00231f50); } } else { if ((pbVar10 == pbVar4) || ((bVar1 | 0x20) != 0x65)) break; bVar6 = true; if (bVar9) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018f9d7 to 0018f9e5 has its CatchHandler @ 0018fc69 */ std::runtime_error::runtime_error(this,"Multiple exponents"); goto LAB_0018f9e6; } } } bVar9 = bVar6; bVar7 = bVar5; pbVar10 = pbVar10 + 1; *in_RDX = (long)pbVar10; } while (pbVar10 != (byte *)*in_RCX); } if (pbVar10 == pbVar4) { *in_RDX = lVar2; *param_1 = 0; *(int8 *)(param_1 + 8) = 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(SUB81(param_1,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(SUB81(param_1,0)); } else { /* try { // try from 0018f907 to 0018f910 has its CatchHandler @ 0018fc64 */ local_118[0] = local_108; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>(local_118); local_a8 = (code *)0x0; uStack_a0 = 0; local_b8 = 0; uStack_b0 = 0; /* try { // try from 0018f920 to 0018f934 has its CatchHandler @ 0018fa01 */ 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> ::parse<std::__cxx11::string&> ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1,local_118,&local_b8,1,0); if (local_a8 != (code *)0x0) { /* try { // try from 0018f942 to 0018f950 has its CatchHandler @ 0018f9fc */ (*local_a8)(&local_b8,&local_b8,3); } if (local_118[0] != local_108) { operator_delete(local_118[0],local_108[0] + 1); } } return param_1; }
53,049
pagecache_file_set_null_hooks
eloqsql/storage/maria/ma_pagecache.c
void pagecache_file_set_null_hooks(PAGECACHE_FILE *file) { file->pre_read_hook= null_pre_hook; file->post_read_hook= null_post_read_hook; file->pre_write_hook= null_pre_hook; file->post_write_hook= null_post_write_hook; file->flush_log_callback= null_pre_hook; file->callback_data= NULL; file->head_blocks= file->big_block_size= 0; }
O0
c
pagecache_file_set_null_hooks: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax leaq 0x6d(%rip), %rcx # 0x3e060 movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rax leaq 0x6e(%rip), %rcx # 0x3e070 movq %rcx, 0x20(%rax) movq -0x8(%rbp), %rax leaq 0x4f(%rip), %rcx # 0x3e060 movq %rcx, 0x28(%rax) movq -0x8(%rbp), %rax leaq 0x70(%rip), %rcx # 0x3e090 movq %rcx, 0x30(%rax) movq -0x8(%rbp), %rax leaq 0x31(%rip), %rcx # 0x3e060 movq %rcx, 0x38(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x40(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax movq $0x0, (%rax) popq %rbp retq nopl (%rax,%rax)
pagecache_file_set_null_hooks: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+18h], rcx mov rax, [rbp+var_8] lea rcx, null_post_read_hook mov [rax+20h], rcx mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+28h], rcx mov rax, [rbp+var_8] lea rcx, null_post_write_hook mov [rax+30h], rcx mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+38h], rcx mov rax, [rbp+var_8] mov qword ptr [rax+40h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] mov qword ptr [rax], 0 pop rbp retn
_QWORD * pagecache_file_set_null_hooks(_QWORD *a1) { _QWORD *result; // rax a1[3] = null_pre_hook; a1[4] = null_post_read_hook; a1[5] = null_pre_hook; a1[6] = null_post_write_hook; a1[7] = null_pre_hook; a1[8] = 0LL; a1[1] = 0LL; result = a1; *a1 = 0LL; return result; }
pagecache_file_set_null_hooks: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x13e060] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x13e070] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x13e060] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x13e090] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x13e060] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 POP RBP RET
void pagecache_file_set_null_hooks(int8 *param_1) { param_1[3] = null_pre_hook; param_1[4] = null_post_read_hook; param_1[5] = null_pre_hook; param_1[6] = null_post_write_hook; param_1[7] = null_pre_hook; param_1[8] = 0; param_1[1] = 0; *param_1 = 0; return; }
53,050
writeFluidGeomInteraction
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_passive.c
void writeFluidGeomInteraction (mjtNum* geom_fluid_coefs, const mjtNum* geom_fluid_coef, const mjtNum* blunt_drag_coef, const mjtNum* slender_drag_coef, const mjtNum* ang_drag_coef, const mjtNum* kutta_lift_coef, const mjtNum* magnus_lift_coef, const mjtNum virtual_mass[3], const mjtNum virtual_inertia[3]) { int i = 0; geom_fluid_coefs[i++] = geom_fluid_coef[0]; geom_fluid_coefs[i++] = blunt_drag_coef[0]; geom_fluid_coefs[i++] = slender_drag_coef[0]; geom_fluid_coefs[i++] = ang_drag_coef[0]; geom_fluid_coefs[i++] = kutta_lift_coef[0]; geom_fluid_coefs[i++] = magnus_lift_coef[0]; geom_fluid_coefs[i++] = virtual_mass[0]; geom_fluid_coefs[i++] = virtual_mass[1]; geom_fluid_coefs[i++] = virtual_mass[2]; geom_fluid_coefs[i++] = virtual_inertia[0]; geom_fluid_coefs[i++] = virtual_inertia[1]; geom_fluid_coefs[i++] = virtual_inertia[2]; if (i != mjNFLUID) { mjERROR("wrong number of entries."); } }
O3
c
writeFluidGeomInteraction: movq 0x18(%rsp), %rax movq 0x10(%rsp), %r10 movq 0x8(%rsp), %r11 vmovsd (%rsi), %xmm0 vmovsd %xmm0, (%rdi) vmovsd (%rdx), %xmm0 vmovsd %xmm0, 0x8(%rdi) vmovsd (%rcx), %xmm0 vmovsd %xmm0, 0x10(%rdi) vmovsd (%r8), %xmm0 vmovsd %xmm0, 0x18(%rdi) vmovsd (%r9), %xmm0 vmovsd %xmm0, 0x20(%rdi) vmovsd (%r11), %xmm0 vmovsd %xmm0, 0x28(%rdi) vmovsd (%r10), %xmm0 vmovsd %xmm0, 0x30(%rdi) vmovsd 0x8(%r10), %xmm0 vmovsd %xmm0, 0x38(%rdi) vmovsd 0x10(%r10), %xmm0 vmovsd %xmm0, 0x40(%rdi) vmovsd (%rax), %xmm0 vmovsd %xmm0, 0x48(%rdi) vmovsd 0x8(%rax), %xmm0 vmovsd %xmm0, 0x50(%rdi) vmovsd 0x10(%rax), %xmm0 vmovsd %xmm0, 0x58(%rdi) retq
writeFluidGeomInteraction: mov rax, [rsp+arg_10] mov r10, [rsp+arg_8] mov r11, [rsp+arg_0] vmovsd xmm0, qword ptr [rsi] vmovsd qword ptr [rdi], xmm0 vmovsd xmm0, qword ptr [rdx] vmovsd qword ptr [rdi+8], xmm0 vmovsd xmm0, qword ptr [rcx] vmovsd qword ptr [rdi+10h], xmm0 vmovsd xmm0, qword ptr [r8] vmovsd qword ptr [rdi+18h], xmm0 vmovsd xmm0, qword ptr [r9] vmovsd qword ptr [rdi+20h], xmm0 vmovsd xmm0, qword ptr [r11] vmovsd qword ptr [rdi+28h], xmm0 vmovsd xmm0, qword ptr [r10] vmovsd qword ptr [rdi+30h], xmm0 vmovsd xmm0, qword ptr [r10+8] vmovsd qword ptr [rdi+38h], xmm0 vmovsd xmm0, qword ptr [r10+10h] vmovsd qword ptr [rdi+40h], xmm0 vmovsd xmm0, qword ptr [rax] vmovsd qword ptr [rdi+48h], xmm0 vmovsd xmm0, qword ptr [rax+8] vmovsd qword ptr [rdi+50h], xmm0 vmovsd xmm0, qword ptr [rax+10h] vmovsd qword ptr [rdi+58h], xmm0 retn
long long writeFluidGeomInteraction( long long _RDI, long long _RSI, long long _RDX, long long _RCX, long long _R8, long long _R9, long long a7, long long a8, long long a9) { long long result; // rax result = a9; _R10 = a8; _R11 = a7; __asm { vmovsd xmm0, qword ptr [rsi] vmovsd qword ptr [rdi], xmm0 vmovsd xmm0, qword ptr [rdx] vmovsd qword ptr [rdi+8], xmm0 vmovsd xmm0, qword ptr [rcx] vmovsd qword ptr [rdi+10h], xmm0 vmovsd xmm0, qword ptr [r8] vmovsd qword ptr [rdi+18h], xmm0 vmovsd xmm0, qword ptr [r9] vmovsd qword ptr [rdi+20h], xmm0 vmovsd xmm0, qword ptr [r11] vmovsd qword ptr [rdi+28h], xmm0 vmovsd xmm0, qword ptr [r10] vmovsd qword ptr [rdi+30h], xmm0 vmovsd xmm0, qword ptr [r10+8] vmovsd qword ptr [rdi+38h], xmm0 vmovsd xmm0, qword ptr [r10+10h] vmovsd qword ptr [rdi+40h], xmm0 vmovsd xmm0, qword ptr [rax] vmovsd qword ptr [rdi+48h], xmm0 vmovsd xmm0, qword ptr [rax+8] vmovsd qword ptr [rdi+50h], xmm0 vmovsd xmm0, qword ptr [rax+10h] vmovsd qword ptr [rdi+58h], xmm0 } return result; }
writeFluidGeomInteraction: MOV RAX,qword ptr [RSP + 0x18] MOV R10,qword ptr [RSP + 0x10] MOV R11,qword ptr [RSP + 0x8] VMOVSD XMM0,qword ptr [RSI] VMOVSD qword ptr [RDI],XMM0 VMOVSD XMM0,qword ptr [RDX] VMOVSD qword ptr [RDI + 0x8],XMM0 VMOVSD XMM0,qword ptr [RCX] VMOVSD qword ptr [RDI + 0x10],XMM0 VMOVSD XMM0,qword ptr [R8] VMOVSD qword ptr [RDI + 0x18],XMM0 VMOVSD XMM0,qword ptr [R9] VMOVSD qword ptr [RDI + 0x20],XMM0 VMOVSD XMM0,qword ptr [R11] VMOVSD qword ptr [RDI + 0x28],XMM0 VMOVSD XMM0,qword ptr [R10] VMOVSD qword ptr [RDI + 0x30],XMM0 VMOVSD XMM0,qword ptr [R10 + 0x8] VMOVSD qword ptr [RDI + 0x38],XMM0 VMOVSD XMM0,qword ptr [R10 + 0x10] VMOVSD qword ptr [RDI + 0x40],XMM0 VMOVSD XMM0,qword ptr [RAX] VMOVSD qword ptr [RDI + 0x48],XMM0 VMOVSD XMM0,qword ptr [RAX + 0x8] VMOVSD qword ptr [RDI + 0x50],XMM0 VMOVSD XMM0,qword ptr [RAX + 0x10] VMOVSD qword ptr [RDI + 0x58],XMM0 RET
void writeFluidGeomInteraction (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) { *param_1 = *param_2; param_1[1] = *param_3; param_1[2] = *param_4; param_1[3] = *param_5; param_1[4] = *param_6; param_1[5] = *param_7; param_1[6] = *param_8; param_1[7] = param_8[1]; param_1[8] = param_8[2]; param_1[9] = *param_9; param_1[10] = param_9[1]; param_1[0xb] = param_9[2]; return; }
53,051
PFS_engine_table::find_engine_table_share(char const*)
eloqsql/storage/perfschema/pfs_engine_table.cc
const PFS_engine_table_share* PFS_engine_table::find_engine_table_share(const char *name) { DBUG_ENTER("PFS_engine_table::find_table_share"); PFS_engine_table_share **current; for (current= &all_shares[0]; (*current) != NULL; current++) { if (compare_table_names(name, (*current)->m_name.str) == 0) DBUG_RETURN(*current); } DBUG_RETURN(NULL); }
O0
cpp
PFS_engine_table::find_engine_table_share(char const*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0x90287d(%rip), %rax # 0x15b77f0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0xcb4fb8 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq (%rax), %rax movq (%rax), %rsi callq 0xcb4fd0 cmpl $0x0, %eax jne 0xcb4fa8 jmp 0xcb4f9b movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x8(%rbp) jmp 0xcb4fc2 jmp 0xcb4faa movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xcb4f77 jmp 0xcb4fba movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
_ZN16PFS_engine_table23find_engine_table_shareEPKc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, _ZL10all_shares; all_shares mov [rbp+var_18], rax loc_CB4F77: mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_CB4FB8 mov rdi, [rbp+var_10]; char * mov rax, [rbp+var_18] mov rax, [rax] mov rsi, [rax]; char * call _ZL19compare_table_namesPKcS0_; compare_table_names(char const*,char const*) cmp eax, 0 jnz short loc_CB4FA8 jmp short $+2 loc_CB4F9B: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_8], rax jmp short loc_CB4FC2 loc_CB4FA8: jmp short $+2 loc_CB4FAA: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_CB4F77 loc_CB4FB8: jmp short $+2 loc_CB4FBA: mov [rbp+var_8], 0 loc_CB4FC2: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
const char ** PFS_engine_table::find_engine_table_share(PFS_engine_table *this, const char *a2) { const char ***i; // [rsp+8h] [rbp-18h] for ( i = (const char ***)all_shares; *i; ++i ) { if ( !(unsigned int)compare_table_names((const char *)this, **i) ) return *i; } return 0LL; }
inline_mysql_mutex_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00cb4fac MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00d1e040 MOV dword ptr [RBP + -0x4],EAX JMP 0x00cb4fb8 LAB_00cb4fac: MOV RDI,qword ptr [RBP + -0x10] CALL 0x005335c0 MOV dword ptr [RBP + -0x4],EAX LAB_00cb4fb8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int inline_mysql_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3) { int4 local_c; if (*(long *)((long)param_1 + 0x40) == 0) { local_c = pthread_mutex_lock(param_1); } else { local_c = psi_mutex_lock(param_1,param_2,param_3); } return local_c; }
53,052
MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int)
eloqsql/mysys_ssl/my_crypt.cc
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen, const uchar *iv, uint ivlen) { compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_nopad)); this->key= key; this->klen= klen; this->source_tail_len= 0; if (ivlen) memcpy(oiv, iv, ivlen); DBUG_ASSERT(ivlen == 0 || ivlen == sizeof(oiv)); int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen); EVP_CIPHER_CTX_set_padding(ctx, 0); return res; }
O3
cpp
MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movq %rcx, %r12 movl %edx, %r15d movq %rsi, %r13 movq %rdi, %rbx movl 0x10(%rbp), %eax movq %rcx, 0xd0(%rdi) movl %r8d, 0xd8(%rdi) andl $0x0, 0xdc(%rdi) testl %eax, %eax je 0x2fbf2 leaq 0xe0(%rbx), %rdi movl %eax, %edx movq %r14, %rsi callq 0x2a0a0 testq %r13, %r13 je 0x2fc41 movq 0xc8(%rbx), %rdi movq %r13, %rsi xorl %edx, %edx movq %r12, %rcx movq %r14, %r8 movl %r15d, %r9d callq 0x2a720 cmpl $0x1, %eax pushq $-0x65 popq %r14 movl $0x0, %eax cmovel %eax, %r14d movq 0xc8(%rbx), %rdi xorl %esi, %esi callq 0x2a390 movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $-0x66 popq %r14 jmp 0x2fc21
_ZN11MyCTX_nopad4initEPK13evp_cipher_stiPKhjS4_j: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r9 mov r12, rcx mov r15d, edx mov r13, rsi mov rbx, rdi mov eax, [rbp+arg_0] mov [rdi+0D0h], rcx mov [rdi+0D8h], r8d and dword ptr [rdi+0DCh], 0 test eax, eax jz short loc_2FBF2 lea rdi, [rbx+0E0h] mov edx, eax mov rsi, r14 call _memcpy loc_2FBF2: test r13, r13 jz short loc_2FC41 mov rdi, [rbx+0C8h] mov rsi, r13 xor edx, edx mov rcx, r12 mov r8, r14 mov r9d, r15d call _EVP_CipherInit_ex cmp eax, 1 push 0FFFFFFFFFFFFFF9Bh pop r14 mov eax, 0 cmovz r14d, eax loc_2FC21: mov rdi, [rbx+0C8h] xor esi, esi call _EVP_CIPHER_CTX_set_padding mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2FC41: push 0FFFFFFFFFFFFFF9Ah pop r14 jmp short loc_2FC21
long long MyCTX_nopad::init( long long a1, long long a2, unsigned int a3, long long a4, int a5, long long a6, unsigned int a7) { long long v7; // rax bool v11; // zf unsigned int v12; // r14d long long v14; // [rsp-8h] [rbp-30h] v14 = v7; *(_QWORD *)(a1 + 208) = a4; *(_DWORD *)(a1 + 216) = a5; *(_DWORD *)(a1 + 220) = 0; if ( a7 ) memcpy(a1 + 224, a6, a7); if ( a2 ) { v11 = (unsigned int)EVP_CipherInit_ex(*(_QWORD *)(a1 + 200), a2, 0LL, a4, a6, a3, v14) == 1; v12 = -101; if ( v11 ) v12 = 0; } else { v12 = -102; } EVP_CIPHER_CTX_set_padding(*(_QWORD *)(a1 + 200), 0LL); return v12; }
init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV R12,RCX MOV R15D,EDX MOV R13,RSI MOV RBX,RDI MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RDI + 0xd0],RCX MOV dword ptr [RDI + 0xd8],R8D AND dword ptr [RDI + 0xdc],0x0 TEST EAX,EAX JZ 0x0012fbf2 LEA RDI,[RBX + 0xe0] MOV EDX,EAX MOV RSI,R14 CALL 0x0012a0a0 LAB_0012fbf2: TEST R13,R13 JZ 0x0012fc41 MOV RDI,qword ptr [RBX + 0xc8] MOV RSI,R13 XOR EDX,EDX MOV RCX,R12 MOV R8,R14 MOV R9D,R15D CALL 0x0012a720 CMP EAX,0x1 PUSH -0x65 POP R14 MOV EAX,0x0 CMOVZ R14D,EAX LAB_0012fc21: MOV RDI,qword ptr [RBX + 0xc8] XOR ESI,ESI CALL 0x0012a390 MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012fc41: PUSH -0x66 POP R14 JMP 0x0012fc21
/* MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int) */ int4 __thiscall MyCTX_nopad::init(MyCTX_nopad *this,evp_cipher_st *param_1,int param_2,uchar *param_3,uint param_4, uchar *param_5,uint param_6) { int iVar1; int4 uVar2; *(uchar **)(this + 0xd0) = param_3; *(uint *)(this + 0xd8) = param_4; *(int4 *)(this + 0xdc) = 0; if (param_6 != 0) { memcpy(this + 0xe0,param_5,(ulong)param_6); } if (param_1 == (evp_cipher_st *)0x0) { uVar2 = 0xffffff9a; } else { iVar1 = EVP_CipherInit_ex(*(EVP_CIPHER_CTX **)(this + 200),param_1,(ENGINE *)0x0,param_3,param_5 ,param_2); uVar2 = 0xffffff9b; if (iVar1 == 1) { uVar2 = 0; } } EVP_CIPHER_CTX_set_padding(*(EVP_CIPHER_CTX **)(this + 200),0); return uVar2; }
53,053
seal_template_obj
bluesky950520[P]quickjs/quickjs.c
static int seal_template_obj(JSContext *ctx, JSValue obj) { JSObject *p; JSShapeProperty *prs; p = JS_VALUE_GET_OBJ(obj); prs = find_own_property1(p, JS_ATOM_length); if (prs) { if (js_update_property_flags(ctx, p, &prs, prs->flags & ~(JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE))) return -1; } p->extensible = FALSE; return 0; }
O1
c
seal_template_obj: pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq 0x18(%rsi), %rax movl 0x20(%rax), %ecx notl %ecx orl $-0x33, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx testl %edx, %edx je 0x6997e addq $0x40, %rax xorl %ecx, %ecx movl $0x3ffffff, %esi # imm = 0x3FFFFFF movl %edx, %edx leaq (%rax,%rdx,8), %rdx addq $-0x8, %rdx cmpl $0x32, 0x4(%rdx) je 0x69979 movl (%rdx), %edx andl %esi, %edx jne 0x69961 jmp 0x69980 movq %rdx, %rcx jmp 0x69980 xorl %ecx, %ecx movq %rcx, 0x8(%rsp) testq %rcx, %rcx je 0x699a3 movl (%rcx), %ecx shrl $0x1a, %ecx andl $-0x4, %ecx leaq 0x8(%rsp), %rdx movq %rbx, %rsi callq 0x25b5a testl %eax, %eax jne 0x699a7 andb $-0x2, 0x5(%rbx) addq $0x10, %rsp popq %rbx retq
seal_template_obj: push rbx sub rsp, 10h mov rbx, rsi mov rax, [rsi+18h] mov ecx, [rax+20h] not ecx or ecx, 0FFFFFFCDh movsxd rcx, ecx mov edx, [rax+rcx*4] test edx, edx jz short loc_6997E add rax, 40h ; '@' xor ecx, ecx mov esi, 3FFFFFFh loc_69961: mov edx, edx lea rdx, [rax+rdx*8] add rdx, 0FFFFFFFFFFFFFFF8h cmp dword ptr [rdx+4], 32h ; '2' jz short loc_69979 mov edx, [rdx] and edx, esi jnz short loc_69961 jmp short loc_69980 loc_69979: mov rcx, rdx jmp short loc_69980 loc_6997E: xor ecx, ecx loc_69980: mov [rsp+18h+var_10], rcx test rcx, rcx jz short loc_699A3 mov ecx, [rcx] shr ecx, 1Ah and ecx, 0FFFFFFFCh lea rdx, [rsp+18h+var_10] mov rsi, rbx call js_update_property_flags test eax, eax jnz short loc_699A7 loc_699A3: and byte ptr [rbx+5], 0FEh loc_699A7: add rsp, 10h pop rbx retn
long long seal_template_obj(long long a1, long long a2) { long long result; // rax unsigned int v3; // edx _DWORD *v4; // rcx _DWORD *v5; // rdx _DWORD *v6; // [rsp+8h] [rbp-10h] BYREF result = *(_QWORD *)(a2 + 24); v3 = *(_DWORD *)(result + 4LL * (int)(~*(_BYTE *)(result + 32) | 0xFFFFFFCD)); if ( v3 ) { result += 64LL; v4 = 0LL; while ( 1 ) { v5 = (_DWORD *)(result + 8LL * v3 - 8); if ( v5[1] == 50 ) break; v3 = *v5 & 0x3FFFFFF; if ( !v3 ) goto LABEL_8; } v4 = v5; } else { v4 = 0LL; } LABEL_8: v6 = v4; if ( !v4 || (result = js_update_property_flags(a1, a2, &v6, (*v4 >> 26) & 0xFFFFFFFC), !(_DWORD)result) ) *(_BYTE *)(a2 + 5) &= ~1u; return result; }
seal_template_obj: PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV RAX,qword ptr [RSI + 0x18] MOV ECX,dword ptr [RAX + 0x20] NOT ECX OR ECX,0xffffffcd MOVSXD RCX,ECX MOV EDX,dword ptr [RAX + RCX*0x4] TEST EDX,EDX JZ 0x0016997e ADD RAX,0x40 XOR ECX,ECX MOV ESI,0x3ffffff LAB_00169961: MOV EDX,EDX LEA RDX,[RAX + RDX*0x8] ADD RDX,-0x8 CMP dword ptr [RDX + 0x4],0x32 JZ 0x00169979 MOV EDX,dword ptr [RDX] AND EDX,ESI JNZ 0x00169961 JMP 0x00169980 LAB_00169979: MOV RCX,RDX JMP 0x00169980 LAB_0016997e: XOR ECX,ECX LAB_00169980: MOV qword ptr [RSP + 0x8],RCX TEST RCX,RCX JZ 0x001699a3 MOV ECX,dword ptr [RCX] SHR ECX,0x1a AND ECX,0xfffffffc LEA RDX,[RSP + 0x8] MOV RSI,RBX CALL 0x00125b5a TEST EAX,EAX JNZ 0x001699a7 LAB_001699a3: AND byte ptr [RBX + 0x5],0xfe LAB_001699a7: ADD RSP,0x10 POP RBX RET
void seal_template_obj(int8 param_1,long param_2) { long lVar1; long lVar2; int iVar3; uint uVar4; uint *local_10; lVar2 = *(long *)(param_2 + 0x18); uVar4 = *(uint *)(lVar2 + (long)(int)(~*(uint *)(lVar2 + 0x20) | 0xffffffcd) * 4); if (uVar4 == 0) { local_10 = (uint *)0x0; } else { do { lVar1 = lVar2 + 0x40 + (ulong)uVar4 * 8; local_10 = (uint *)(lVar1 + -8); if (*(int *)(lVar1 + -4) == 0x32) break; uVar4 = *local_10 & 0x3ffffff; local_10 = (uint *)0x0; } while (uVar4 != 0); } if ((local_10 == (uint *)0x0) || (iVar3 = js_update_property_flags(param_1,param_2,&local_10,*local_10 >> 0x1a & 0xfffffffc), iVar3 == 0)) { *(byte *)(param_2 + 5) = *(byte *)(param_2 + 5) & 0xfe; } return; }
53,054
seal_template_obj
bluesky950520[P]quickjs/quickjs.c
static int seal_template_obj(JSContext *ctx, JSValue obj) { JSObject *p; JSShapeProperty *prs; p = JS_VALUE_GET_OBJ(obj); prs = find_own_property1(p, JS_ATOM_length); if (prs) { if (js_update_property_flags(ctx, p, &prs, prs->flags & ~(JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE))) return -1; } p->extensible = FALSE; return 0; }
O3
c
seal_template_obj: pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq 0x18(%rsi), %rax movl 0x20(%rax), %ecx notl %ecx orl $-0x33, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx testl %edx, %edx je 0x6bba0 addq $0x40, %rax movl $0x3ffffff, %ecx # imm = 0x3FFFFFF movl %edx, %edx leaq (%rax,%rdx,8), %rdx addq $-0x8, %rdx cmpl $0x32, 0x4(%rdx) je 0x6bb7d movl (%rdx), %edx andl %ecx, %edx jne 0x6bb65 jmp 0x6bba0 movq %rdx, 0x8(%rsp) testq %rdx, %rdx je 0x6bba0 movl (%rdx), %ecx shrl $0x1a, %ecx andl $-0x4, %ecx leaq 0x8(%rsp), %rdx movq %rbx, %rsi callq 0x261c4 testl %eax, %eax jne 0x6bba4 andb $-0x2, 0x5(%rbx) addq $0x10, %rsp popq %rbx retq
seal_template_obj: push rbx sub rsp, 10h mov rbx, rsi mov rax, [rsi+18h] mov ecx, [rax+20h] not ecx or ecx, 0FFFFFFCDh movsxd rcx, ecx mov edx, [rax+rcx*4] test edx, edx jz short loc_6BBA0 add rax, 40h ; '@' mov ecx, 3FFFFFFh loc_6BB65: mov edx, edx lea rdx, [rax+rdx*8] add rdx, 0FFFFFFFFFFFFFFF8h cmp dword ptr [rdx+4], 32h ; '2' jz short loc_6BB7D mov edx, [rdx] and edx, ecx jnz short loc_6BB65 jmp short loc_6BBA0 loc_6BB7D: mov [rsp+18h+var_10], rdx test rdx, rdx jz short loc_6BBA0 mov ecx, [rdx] shr ecx, 1Ah and ecx, 0FFFFFFFCh lea rdx, [rsp+18h+var_10] mov rsi, rbx call js_update_property_flags test eax, eax jnz short loc_6BBA4 loc_6BBA0: and byte ptr [rbx+5], 0FEh loc_6BBA4: add rsp, 10h pop rbx retn
long long seal_template_obj(long long a1, long long a2) { long long result; // rax unsigned int v3; // edx _DWORD *v4; // rdx _DWORD *v5; // [rsp+8h] [rbp-10h] BYREF result = *(_QWORD *)(a2 + 24); v3 = *(_DWORD *)(result + 4LL * (int)(~*(_BYTE *)(result + 32) | 0xFFFFFFCD)); if ( !v3 ) goto LABEL_8; result += 64LL; while ( 1 ) { v4 = (_DWORD *)(result + 8LL * v3 - 8); if ( v4[1] == 50 ) break; v3 = *v4 & 0x3FFFFFF; if ( !v3 ) goto LABEL_8; } v5 = v4; if ( !v4 || (result = js_update_property_flags(a1, a2, &v5, (*v4 >> 26) & 0xFFFFFFFC), !(_DWORD)result) ) LABEL_8: *(_BYTE *)(a2 + 5) &= ~1u; return result; }
seal_template_obj: PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV RAX,qword ptr [RSI + 0x18] MOV ECX,dword ptr [RAX + 0x20] NOT ECX OR ECX,0xffffffcd MOVSXD RCX,ECX MOV EDX,dword ptr [RAX + RCX*0x4] TEST EDX,EDX JZ 0x0016bba0 ADD RAX,0x40 MOV ECX,0x3ffffff LAB_0016bb65: MOV EDX,EDX LEA RDX,[RAX + RDX*0x8] ADD RDX,-0x8 CMP dword ptr [RDX + 0x4],0x32 JZ 0x0016bb7d MOV EDX,dword ptr [RDX] AND EDX,ECX JNZ 0x0016bb65 JMP 0x0016bba0 LAB_0016bb7d: MOV qword ptr [RSP + 0x8],RDX TEST RDX,RDX JZ 0x0016bba0 MOV ECX,dword ptr [RDX] SHR ECX,0x1a AND ECX,0xfffffffc LEA RDX,[RSP + 0x8] MOV RSI,RBX CALL 0x001261c4 TEST EAX,EAX JNZ 0x0016bba4 LAB_0016bba0: AND byte ptr [RBX + 0x5],0xfe LAB_0016bba4: ADD RSP,0x10 POP RBX RET
void seal_template_obj(int8 param_1,long param_2) { long lVar1; long lVar2; int iVar3; uint uVar4; uint *local_10; lVar2 = *(long *)(param_2 + 0x18); uVar4 = *(uint *)(lVar2 + (long)(int)(~*(uint *)(lVar2 + 0x20) | 0xffffffcd) * 4); if (uVar4 != 0) { do { lVar1 = lVar2 + 0x40 + (ulong)uVar4 * 8; local_10 = (uint *)(lVar1 + -8); if (*(int *)(lVar1 + -4) == 0x32) { if ((local_10 != (uint *)0x0) && (iVar3 = js_update_property_flags (param_1,param_2,&local_10,*local_10 >> 0x1a & 0xfffffffc), iVar3 != 0 )) { return; } break; } uVar4 = *local_10 & 0x3ffffff; } while (uVar4 != 0); } *(byte *)(param_2 + 5) = *(byte *)(param_2 + 5) & 0xfe; return; }
53,055
mariadb_read_options
eloqsql/libmariadb/libmariadb/ma_default.c
my_bool _mariadb_read_options(MYSQL *mysql, const char *config_dir, const char *config_file, const char *group, unsigned int recursion) { int i= 0, exts, errors= 0; char filename[FN_REFLEN + 1]; unsigned int recursion_stop= 64; #ifndef _WIN32 char *env; #endif if (recursion >= recursion_stop) return 1; if (config_file && config_file[0]) return _mariadb_read_options_from_file(mysql, config_file, group, recursion); if (config_dir && config_dir[0]) { for (exts= 0; ini_exts[exts]; exts++) { snprintf(filename, FN_REFLEN, "%s%cmy.%s", config_dir, FN_LIBCHAR, ini_exts[exts]); if (!access(filename, R_OK)) errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion); } return errors; } for (i=0; i < MAX_CONFIG_DIRS && configuration_dirs[i]; i++) { for (exts= 0; ini_exts[exts]; exts++) { snprintf(filename, FN_REFLEN, "%s%cmy.%s", configuration_dirs[i], FN_LIBCHAR, ini_exts[exts]); if (!access(filename, R_OK)) errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion); } } #ifndef _WIN32 /* special case: .my.cnf in Home directory */ if ((env= getenv("HOME"))) { for (exts= 0; ini_exts[exts]; exts++) { snprintf(filename, FN_REFLEN, "%s%c.my.%s", env, FN_LIBCHAR, ini_exts[exts]); if (!access(filename, R_OK)) errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion); } } #endif return errors; }
O3
c
mariadb_read_options: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %rcx, -0x258(%rbp) movq %rdi, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movb $0x1, %r12b movl %r8d, -0x244(%rbp) cmpl $0x3f, %r8d jbe 0x32780 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x32963 movl %r12d, %eax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rsi, %r9 testq %rdx, %rdx je 0x327cd cmpb $0x0, (%rdx) je 0x327cd movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x32963 movq -0x250(%rbp), %rdi movq %rdx, %rsi movq -0x258(%rbp), %rdx movl -0x244(%rbp), %ecx addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x32968 testq %r9, %r9 je 0x3284b cmpb $0x0, (%r9) je 0x3284b leaq 0x5bd2(%rip), %r10 # 0x383b1 leaq 0x5b86(%rip), %r8 # 0x3836c xorl %r12d, %r12d leaq -0x240(%rbp), %r14 movl $0x200, %esi # imm = 0x200 movl $0x201, %ecx # imm = 0x201 movq %r14, %rdi movl $0x1, %edx xorl %eax, %eax pushq %r10 pushq $0x2f callq 0x132c0 addq $0x10, %rsp movq %r14, %rdi movl $0x4, %esi callq 0x13760 testl %eax, %eax jne 0x32758 leaq -0x240(%rbp), %rsi movq -0x250(%rbp), %rdi movq -0x258(%rbp), %rdx movl -0x244(%rbp), %ecx callq 0x32968 jmp 0x3295b xorl %r12d, %r12d leaq 0x1a14b(%rip), %r15 # 0x4c9a0 leaq 0x5b10(%rip), %r13 # 0x3836c leaq -0x240(%rbp), %r14 xorl %ebx, %ebx movq (%r15), %rax movq (%rax,%rbx,8), %r9 testq %r9, %r9 je 0x328d5 movl $0x200, %esi # imm = 0x200 movl $0x201, %ecx # imm = 0x201 movq %r14, %rdi movl $0x1, %edx movq %r13, %r8 xorl %eax, %eax leaq 0x5b22(%rip), %r10 # 0x383b1 pushq %r10 pushq $0x2f callq 0x132c0 addq $0x10, %rsp movq %r14, %rdi movl $0x4, %esi callq 0x13760 testl %eax, %eax jne 0x328cc movq -0x250(%rbp), %rdi movq %r14, %rsi movq -0x258(%rbp), %rdx movl -0x244(%rbp), %ecx callq 0x32968 addb %al, %r12b incq %rbx cmpq $0x6, %rbx jne 0x32865 leaq 0x5a80(%rip), %rdi # 0x3835c callq 0x13590 testq %rax, %rax je 0x32758 leaq 0x5a85(%rip), %r8 # 0x38376 leaq -0x240(%rbp), %r14 movl $0x200, %esi # imm = 0x200 movl $0x201, %ecx # imm = 0x201 movq %r14, %rdi movl $0x1, %edx movq %rax, %r9 xorl %eax, %eax leaq 0x5a9b(%rip), %r10 # 0x383b1 pushq %r10 pushq $0x2f callq 0x132c0 addq $0x10, %rsp movq %r14, %rdi movl $0x4, %esi callq 0x13760 testl %eax, %eax jne 0x32758 leaq -0x240(%rbp), %rsi movq -0x250(%rbp), %rdi movq -0x258(%rbp), %rdx movl -0x244(%rbp), %ecx callq 0x32968 addb %r12b, %al movl %eax, %r12d jmp 0x32758 callq 0x13500
_mariadb_read_options: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 238h mov [rbp+var_258], rcx mov [rbp+var_250], rdi mov rax, fs:28h mov [rbp+var_30], rax mov r12b, 1 mov [rbp+var_244], r8d cmp r8d, 3Fh ; '?' jbe short loc_32780 loc_32758: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_32963 mov eax, r12d add rsp, 238h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_32780: mov r9, rsi test rdx, rdx jz short loc_327CD cmp byte ptr [rdx], 0 jz short loc_327CD mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_32963 mov rdi, [rbp+var_250] mov rsi, rdx mov rdx, [rbp+var_258] mov ecx, [rbp+var_244] add rsp, 238h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _mariadb_read_options_from_file loc_327CD: test r9, r9 jz short loc_3284B cmp byte ptr [r9], 0 jz short loc_3284B lea r10, aCnf; "cnf" lea r8, aSCmyS; "%s%cmy.%s" xor r12d, r12d lea r14, [rbp+var_240] mov esi, 200h mov ecx, 201h mov rdi, r14 mov edx, 1 xor eax, eax push r10 push 2Fh ; '/' call ___snprintf_chk add rsp, 10h mov rdi, r14 mov esi, 4 call _access test eax, eax jnz loc_32758 lea rsi, [rbp+var_240] mov rdi, [rbp+var_250] mov rdx, [rbp+var_258] mov ecx, [rbp+var_244] call _mariadb_read_options_from_file jmp loc_3295B loc_3284B: xor r12d, r12d lea r15, configuration_dirs lea r13, aSCmyS; "%s%cmy.%s" lea r14, [rbp+var_240] xor ebx, ebx loc_32865: mov rax, [r15] mov r9, [rax+rbx*8] test r9, r9 jz short loc_328D5 mov esi, 200h mov ecx, 201h mov rdi, r14 mov edx, 1 mov r8, r13 xor eax, eax lea r10, aCnf; "cnf" push r10 push 2Fh ; '/' call ___snprintf_chk add rsp, 10h mov rdi, r14 mov esi, 4 call _access test eax, eax jnz short loc_328CC mov rdi, [rbp+var_250] mov rsi, r14 mov rdx, [rbp+var_258] mov ecx, [rbp+var_244] call _mariadb_read_options_from_file add r12b, al loc_328CC: inc rbx cmp rbx, 6 jnz short loc_32865 loc_328D5: lea rdi, aMariadbHome+8; "HOME" call _getenv test rax, rax jz loc_32758 lea r8, aSCMyS; "%s%c.my.%s" lea r14, [rbp+var_240] mov esi, 200h mov ecx, 201h mov rdi, r14 mov edx, 1 mov r9, rax xor eax, eax lea r10, aCnf; "cnf" push r10 push 2Fh ; '/' call ___snprintf_chk add rsp, 10h mov rdi, r14 mov esi, 4 call _access test eax, eax jnz loc_32758 lea rsi, [rbp+var_240] mov rdi, [rbp+var_250] mov rdx, [rbp+var_258] mov ecx, [rbp+var_244] call _mariadb_read_options_from_file add al, r12b loc_3295B: mov r12d, eax jmp loc_32758 loc_32963: call ___stack_chk_fail
long long mariadb_read_options(long long a1, const char *a2, _BYTE *a3, long long a4, unsigned int a5) { unsigned int v5; // r12d double v7; // xmm0_8 unsigned int options_from_file; // eax long long i; // rbx const char *v10; // r9 double v11; // xmm0_8 const char *v12; // rax double v13; // xmm0_8 _BYTE v16[528]; // [rsp+20h] [rbp-240h] BYREF unsigned long long v17; // [rsp+230h] [rbp-30h] v17 = __readfsqword(0x28u); LOBYTE(v5) = 1; if ( a5 > 0x3F ) return v5; if ( !a3 || !*a3 ) { if ( a2 && *a2 ) { v5 = 0; v7 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%cmy.%s", a2, 47LL, "cnf"); if ( (unsigned int)access(v16, 4LL, v7) ) return v5; return (unsigned int)mariadb_read_options_from_file(a1, v16, a4, a5); } else { v5 = 0; for ( i = 0LL; i != 6; ++i ) { v10 = *(const char **)(configuration_dirs + 8 * i); if ( !v10 ) break; v11 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%cmy.%s", v10, 47LL, "cnf"); if ( !(unsigned int)access(v16, 4LL, v11) ) LOBYTE(v5) = mariadb_read_options_from_file(a1, v16, a4, a5) + v5; } v12 = (const char *)getenv("HOME"); if ( !v12 ) return v5; v13 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%c.my.%s", v12, 47LL, "cnf"); if ( (unsigned int)access(v16, 4LL, v13) ) return v5; options_from_file = mariadb_read_options_from_file(a1, v16, a4, a5); LOBYTE(options_from_file) = v5 + options_from_file; } return options_from_file; } return mariadb_read_options_from_file(a1, a3, a4, a5); }
_mariadb_read_options: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x238 MOV qword ptr [RBP + -0x258],RCX MOV qword ptr [RBP + -0x250],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R12B,0x1 MOV dword ptr [RBP + -0x244],R8D CMP R8D,0x3f JBE 0x00132780 LAB_00132758: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00132963 MOV EAX,R12D ADD RSP,0x238 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00132780: MOV R9,RSI TEST RDX,RDX JZ 0x001327cd CMP byte ptr [RDX],0x0 JZ 0x001327cd MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00132963 MOV RDI,qword ptr [RBP + -0x250] MOV RSI,RDX MOV RDX,qword ptr [RBP + -0x258] MOV ECX,dword ptr [RBP + -0x244] ADD RSP,0x238 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00132968 LAB_001327cd: TEST R9,R9 JZ 0x0013284b CMP byte ptr [R9],0x0 JZ 0x0013284b LEA R10,[0x1383b1] LEA R8,[0x13836c] XOR R12D,R12D LEA R14,[RBP + -0x240] MOV ESI,0x200 MOV ECX,0x201 MOV RDI,R14 MOV EDX,0x1 XOR EAX,EAX PUSH R10 PUSH 0x2f CALL 0x001132c0 ADD RSP,0x10 MOV RDI,R14 MOV ESI,0x4 CALL 0x00113760 TEST EAX,EAX JNZ 0x00132758 LEA RSI,[RBP + -0x240] MOV RDI,qword ptr [RBP + -0x250] MOV RDX,qword ptr [RBP + -0x258] MOV ECX,dword ptr [RBP + -0x244] CALL 0x00132968 JMP 0x0013295b LAB_0013284b: XOR R12D,R12D LEA R15,[0x14c9a0] LEA R13,[0x13836c] LEA R14,[RBP + -0x240] XOR EBX,EBX LAB_00132865: MOV RAX,qword ptr [R15] MOV R9,qword ptr [RAX + RBX*0x8] TEST R9,R9 JZ 0x001328d5 MOV ESI,0x200 MOV ECX,0x201 MOV RDI,R14 MOV EDX,0x1 MOV R8,R13 XOR EAX,EAX LEA R10,[0x1383b1] PUSH R10 PUSH 0x2f CALL 0x001132c0 ADD RSP,0x10 MOV RDI,R14 MOV ESI,0x4 CALL 0x00113760 TEST EAX,EAX JNZ 0x001328cc MOV RDI,qword ptr [RBP + -0x250] MOV RSI,R14 MOV RDX,qword ptr [RBP + -0x258] MOV ECX,dword ptr [RBP + -0x244] CALL 0x00132968 ADD R12B,AL LAB_001328cc: INC RBX CMP RBX,0x6 JNZ 0x00132865 LAB_001328d5: LEA RDI,[0x13835c] CALL 0x00113590 TEST RAX,RAX JZ 0x00132758 LEA R8,[0x138376] LEA R14,[RBP + -0x240] MOV ESI,0x200 MOV ECX,0x201 MOV RDI,R14 MOV EDX,0x1 MOV R9,RAX XOR EAX,EAX LEA R10,[0x1383b1] PUSH R10 PUSH 0x2f CALL 0x001132c0 ADD RSP,0x10 MOV RDI,R14 MOV ESI,0x4 CALL 0x00113760 TEST EAX,EAX JNZ 0x00132758 LEA RSI,[RBP + -0x240] MOV RDI,qword ptr [RBP + -0x250] MOV RDX,qword ptr [RBP + -0x258] MOV ECX,dword ptr [RBP + -0x244] CALL 0x00132968 ADD AL,R12B LAB_0013295b: MOV R12D,EAX JMP 0x00132758 LAB_00132963: CALL 0x00113500
ulong _mariadb_read_options (int8 param_1,char *param_2,char *param_3,int8 param_4,uint param_5) { long lVar1; char cVar2; int iVar3; uint uVar4; ulong uVar5; char *pcVar6; int8 uVar7; long lVar8; int8 unaff_R12; long in_FS_OFFSET; char local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar5 = CONCAT71((int7)((ulong)unaff_R12 >> 8),1); if (param_5 < 0x40) { if ((param_3 != (char *)0x0) && (*param_3 != '\0')) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { uVar5 = _mariadb_read_options_from_file(param_1,param_3,param_4,param_5); return uVar5; } goto LAB_00132963; } if ((param_2 == (char *)0x0) || (*param_2 == '\0')) { uVar5 = 0; lVar8 = 0; do { lVar1 = *(long *)(configuration_dirs + lVar8 * 8); if (lVar1 == 0) break; __snprintf_chk(local_248,0x200,1,0x201,"%s%cmy.%s",lVar1,0x2f,&DAT_001383b1); iVar3 = access(local_248,4); if (iVar3 == 0) { cVar2 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5); uVar5 = (ulong)(byte)((char)uVar5 + cVar2); } lVar8 = lVar8 + 1; } while (lVar8 != 6); pcVar6 = getenv("HOME"); if (pcVar6 != (char *)0x0) { __snprintf_chk(local_248,0x200,1,0x201,"%s%c.my.%s",pcVar6,0x2f,&DAT_001383b1); iVar3 = access(local_248,4); if (iVar3 == 0) { uVar7 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5); uVar4 = (uint)CONCAT71((int7)((ulong)uVar7 >> 8),(char)uVar7 + (char)uVar5); goto LAB_0013295b; } } } else { uVar5 = 0; __snprintf_chk(local_248,0x200,1,0x201,"%s%cmy.%s",param_2,0x2f,&DAT_001383b1); iVar3 = access(local_248,4); if (iVar3 == 0) { uVar4 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5); LAB_0013295b: uVar5 = (ulong)uVar4; } } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar5 & 0xffffffff; } LAB_00132963: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
53,056
void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../sdc/loopScheme.h
inline void Scheme<SCHEME_LOOP>::assignSmoothMaskForEdge(EDGE const& edge, MASK& mask) const { int faceCount = edge.GetNumFaces(); mask.SetNumVertexWeights(2); mask.SetNumEdgeWeights(0); mask.SetNumFaceWeights(faceCount); mask.SetFaceWeightsForFaceCenters(false); // // This is where we run into the issue of "face weights" -- we want to weight the // face-centers for Catmark, but face-centers are not generated for Loop. So do // we make assumptions on how the mask is used, assign some property to the mask // to indicate how they were assigned, or take input from the mask itself? // // Regardless, we have two choices: // - face-weights are for the vertices opposite the edge (as in Hbr): // vertex weights = 0.375f; // face weights = 0.125f; // // - face-weights are for the face centers: // vertex weights = 0.125f; // face weights = 0.375f; // // Coincidentally the coefficients are the same but reversed. // typedef typename MASK::Weight Weight; Weight vWeight = mask.AreFaceWeightsForFaceCenters() ? 0.125f : 0.375f; Weight fWeight = mask.AreFaceWeightsForFaceCenters() ? 0.375f : 0.125f; mask.VertexWeight(0) = vWeight; mask.VertexWeight(1) = vWeight; if (faceCount == 2) { mask.FaceWeight(0) = fWeight; mask.FaceWeight(1) = fWeight; } else { // The non-manifold case is not clearly defined -- we adjust the above // face-weight to preserve the ratio of edge-center and face-centers: fWeight *= 2.0f / (Weight) faceCount; for (int i = 0; i < faceCount; ++i) { mask.FaceWeight(i) = fWeight; } } }
O0
c
void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0xc44f0 movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rdi movl $0x2, %esi callq 0xd0130 movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xd2660 movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi callq 0xd56a0 movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xd6d40 movq -0x18(%rbp), %rdi callq 0xcc720 movss 0x80827(%rip), %xmm0 # 0x1f1988 movss 0x80823(%rip), %xmm1 # 0x1f198c movss %xmm1, -0x3c(%rbp) testb $0x1, %al movss %xmm0, -0x38(%rbp) jne 0x171181 movss -0x3c(%rbp), %xmm0 movss %xmm0, -0x38(%rbp) movss -0x38(%rbp), %xmm0 cvtss2sd %xmm0, %xmm0 movsd %xmm0, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0xcc720 movss 0x807ec(%rip), %xmm0 # 0x1f198c movss 0x807e0(%rip), %xmm1 # 0x1f1988 movss %xmm1, -0x44(%rbp) testb $0x1, %al movss %xmm0, -0x40(%rbp) jne 0x1711c0 movss -0x44(%rbp), %xmm0 movss %xmm0, -0x40(%rbp) movss -0x40(%rbp), %xmm0 cvtss2sd %xmm0, %xmm0 movsd %xmm0, -0x30(%rbp) movsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x58(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xcdfe0 movsd -0x58(%rbp), %xmm0 movsd %xmm0, (%rax) movsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x50(%rbp) movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0xcdfe0 movsd -0x50(%rbp), %xmm0 movsd %xmm0, (%rax) cmpl $0x2, -0x1c(%rbp) jne 0x171254 movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x68(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xca370 movsd -0x68(%rbp), %xmm0 movsd %xmm0, (%rax) movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x60(%rbp) movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0xca370 movsd -0x60(%rbp), %xmm0 movsd %xmm0, (%rax) jmp 0x1712aa cvtsi2sdl -0x1c(%rbp), %xmm1 movsd 0x7b35f(%rip), %xmm0 # 0x1ec5c0 divsd %xmm1, %xmm0 mulsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x30(%rbp) movl $0x0, -0x34(%rbp) movl -0x34(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x1712a8 movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x70(%rbp) movq -0x18(%rbp), %rdi movl -0x34(%rbp), %esi callq 0xca370 movsd -0x70(%rbp), %xmm0 movsd %xmm0, (%rax) movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0x171276 jmp 0x1712aa addq $0x70, %rsp popq %rbp retq
_ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE23assignSmoothMaskForEdgeINS0_3Vtr8internal13EdgeInterfaceENS0_3Far18PrimvarRefinerRealIdE4MaskEEEvRKT_RT0_: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_10]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal13EdgeInterface11GetNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumFaces(void) mov [rbp+var_1C], eax mov rdi, [rbp+var_18] mov esi, 2 call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask19SetNumVertexWeightsEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumVertexWeights(int) mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask17SetNumEdgeWeightsEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumEdgeWeights(int) mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask17SetNumFaceWeightsEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumFaceWeights(int) mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask28SetFaceWeightsForFaceCentersEb; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetFaceWeightsForFaceCenters(bool) mov rdi, [rbp+var_18] call __ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask28AreFaceWeightsForFaceCentersEv; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::AreFaceWeightsForFaceCenters(void) movss xmm0, cs:dword_1F1988 movss xmm1, cs:dword_1F198C movss [rbp+var_3C], xmm1 test al, 1 movss [rbp+var_38], xmm0 jnz short loc_171181 movss xmm0, [rbp+var_3C] movss [rbp+var_38], xmm0 loc_171181: movss xmm0, [rbp+var_38] cvtss2sd xmm0, xmm0 movsd [rbp+var_28], xmm0 mov rdi, [rbp+var_18] call __ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask28AreFaceWeightsForFaceCentersEv; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::AreFaceWeightsForFaceCenters(void) movss xmm0, cs:dword_1F198C movss xmm1, cs:dword_1F1988 movss [rbp+var_44], xmm1 test al, 1 movss [rbp+var_40], xmm0 jnz short loc_1711C0 movss xmm0, [rbp+var_44] movss [rbp+var_40], xmm0 loc_1711C0: movss xmm0, [rbp+var_40] cvtss2sd xmm0, xmm0 movsd [rbp+var_30], xmm0 movsd xmm0, [rbp+var_28] movsd [rbp+var_58], xmm0 mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask12VertexWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(int) movsd xmm0, [rbp+var_58] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_28] movsd [rbp+var_50], xmm0 mov rdi, [rbp+var_18] mov esi, 1 call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask12VertexWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(int) movsd xmm0, [rbp+var_50] movsd qword ptr [rax], xmm0 cmp [rbp+var_1C], 2 jnz short loc_171254 movsd xmm0, [rbp+var_30] movsd [rbp+var_68], xmm0 mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask10FaceWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(int) movsd xmm0, [rbp+var_68] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_30] movsd [rbp+var_60], xmm0 mov rdi, [rbp+var_18] mov esi, 1 call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask10FaceWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(int) movsd xmm0, [rbp+var_60] movsd qword ptr [rax], xmm0 jmp short loc_1712AA loc_171254: cvtsi2sd xmm1, [rbp+var_1C] movsd xmm0, cs:qword_1EC5C0 divsd xmm0, xmm1 mulsd xmm0, [rbp+var_30] movsd [rbp+var_30], xmm0 mov [rbp+var_34], 0 loc_171276: mov eax, [rbp+var_34] cmp eax, [rbp+var_1C] jge short loc_1712A8 movsd xmm0, [rbp+var_30] movsd [rbp+var_70], xmm0 mov rdi, [rbp+var_18] mov esi, [rbp+var_34] call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask10FaceWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(int) movsd xmm0, [rbp+var_70] movsd qword ptr [rax], xmm0 mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp short loc_171276 loc_1712A8: jmp short $+2 loc_1712AA: add rsp, 70h pop rbp retn
double * OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask>( long long a1, OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface *a2, long long a3) { double *result; // rax float v4; // [rsp+30h] [rbp-40h] float v5; // [rsp+38h] [rbp-38h] unsigned int i; // [rsp+3Ch] [rbp-34h] double v7; // [rsp+40h] [rbp-30h] double v8; // [rsp+40h] [rbp-30h] double v9; // [rsp+48h] [rbp-28h] int NumFaces; // [rsp+54h] [rbp-1Ch] NumFaces = OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumFaces(a2); OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumVertexWeights(a3, 2LL); OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumEdgeWeights(a3, 0LL); OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumFaceWeights(a3, (unsigned int)NumFaces); OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetFaceWeightsForFaceCenters(a3, 0LL); v5 = 0.125; if ( (OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::AreFaceWeightsForFaceCenters(a3) & 1) == 0 ) v5 = 0.375; v9 = v5; v4 = 0.375; if ( (OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::AreFaceWeightsForFaceCenters(a3) & 1) == 0 ) v4 = 0.125; v7 = v4; *(double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(a3, 0LL) = v9; *(double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(a3, 1LL) = v9; if ( NumFaces == 2 ) { *(double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(a3, 0LL) = v7; result = (double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(a3, 1LL); *result = v7; } else { v8 = 2.0 / (double)NumFaces * v7; for ( i = 0; ; ++i ) { result = (double *)i; if ( (int)i >= NumFaces ) break; *(double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(a3, i) = v8; } } return result; }
53,057
void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../sdc/loopScheme.h
inline void Scheme<SCHEME_LOOP>::assignSmoothMaskForEdge(EDGE const& edge, MASK& mask) const { int faceCount = edge.GetNumFaces(); mask.SetNumVertexWeights(2); mask.SetNumEdgeWeights(0); mask.SetNumFaceWeights(faceCount); mask.SetFaceWeightsForFaceCenters(false); // // This is where we run into the issue of "face weights" -- we want to weight the // face-centers for Catmark, but face-centers are not generated for Loop. So do // we make assumptions on how the mask is used, assign some property to the mask // to indicate how they were assigned, or take input from the mask itself? // // Regardless, we have two choices: // - face-weights are for the vertices opposite the edge (as in Hbr): // vertex weights = 0.375f; // face weights = 0.125f; // // - face-weights are for the face centers: // vertex weights = 0.125f; // face weights = 0.375f; // // Coincidentally the coefficients are the same but reversed. // typedef typename MASK::Weight Weight; Weight vWeight = mask.AreFaceWeightsForFaceCenters() ? 0.125f : 0.375f; Weight fWeight = mask.AreFaceWeightsForFaceCenters() ? 0.375f : 0.125f; mask.VertexWeight(0) = vWeight; mask.VertexWeight(1) = vWeight; if (faceCount == 2) { mask.FaceWeight(0) = fWeight; mask.FaceWeight(1) = fWeight; } else { // The non-manifold case is not clearly defined -- we adjust the above // face-weight to preserve the ratio of edge-center and face-centers: fWeight *= 2.0f / (Weight) faceCount; for (int i = 0; i < faceCount; ++i) { mask.FaceWeight(i) = fWeight; } } }
O2
c
void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const: pushq %rbx movq %rdx, %rbx movq %rsi, %rdi callq 0x4f720 movq $0x2, 0x18(%rbx) movl %eax, 0x20(%rbx) movb $0x0, 0x24(%rbx) movq (%rbx), %rcx movsd 0x3ad60(%rip), %xmm0 # 0xc3fc0 movsd %xmm0, (%rcx) cmpl $0x2, %eax jne 0x8927b movq 0x10(%rbx), %rax movsd 0x3ad5b(%rip), %xmm0 # 0xc3fd0 movsd %xmm0, (%rax) popq %rbx retq cvtsi2ss %eax, %xmm1 movss 0x388c5(%rip), %xmm0 # 0xc1b4c divss %xmm1, %xmm0 mulss 0x3acc9(%rip), %xmm0 # 0xc3f5c movq 0x10(%rbx), %rcx xorl %edx, %edx testl %eax, %eax cmovlel %edx, %eax cmpq %rdx, %rax je 0x89279 movss %xmm0, (%rcx,%rdx,4) incq %rdx jmp 0x8929e nop
_ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE23assignSmoothMaskForEdgeINS0_3Vtr8internal13EdgeInterfaceENS0_3Far18PrimvarRefinerRealIfE4MaskEEEvRKT_RT0_: push rbx mov rbx, rdx mov rdi, rsi; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal13EdgeInterface11GetNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumFaces(void) mov qword ptr [rbx+18h], 2 mov [rbx+20h], eax mov byte ptr [rbx+24h], 0 mov rcx, [rbx] movsd xmm0, cs:qword_C3FC0 movsd qword ptr [rcx], xmm0 cmp eax, 2 jnz short loc_8927B mov rax, [rbx+10h] movsd xmm0, cs:qword_C3FD0 movsd qword ptr [rax], xmm0 loc_89279: pop rbx retn loc_8927B: cvtsi2ss xmm1, eax movss xmm0, cs:dword_C1B4C divss xmm0, xmm1 mulss xmm0, cs:dword_C3F5C mov rcx, [rbx+10h] xor edx, edx test eax, eax cmovle eax, edx loc_8929E: cmp rax, rdx jz short loc_89279 movss dword ptr [rcx+rdx*4], xmm0 inc rdx jmp short loc_8929E
_QWORD * OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>( long long a1, OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface *a2, long long a3) { _QWORD *result; // rax float v5; // xmm0_4 long long v6; // rcx _QWORD *v7; // rdx result = (_QWORD *)OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumFaces(a2); *(_QWORD *)(a3 + 24) = 2LL; *(_DWORD *)(a3 + 32) = (_DWORD)result; *(_BYTE *)(a3 + 36) = 0; **(_QWORD **)a3 = 0x3EC000003EC00000LL; if ( (_DWORD)result == 2 ) { result = *(_QWORD **)(a3 + 16); *result = 0x3E0000003E000000LL; } else { v5 = (float)(2.0 / (float)(int)result) * 0.125; v6 = *(_QWORD *)(a3 + 16); v7 = 0LL; if ( (int)result <= 0 ) result = 0LL; while ( result != v7 ) { *(float *)(v6 + 4LL * (_QWORD)v7) = v5; v7 = (_QWORD *)((char *)v7 + 1); } } return result; }
assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>: PUSH RBX MOV RBX,RDX MOV RDI,RSI CALL 0x0014f720 MOV qword ptr [RBX + 0x18],0x2 MOV dword ptr [RBX + 0x20],EAX MOV byte ptr [RBX + 0x24],0x0 MOV RCX,qword ptr [RBX] MOVSD XMM0,qword ptr [0x001c3fc0] MOVSD qword ptr [RCX],XMM0 CMP EAX,0x2 JNZ 0x0018927b MOV RAX,qword ptr [RBX + 0x10] MOVSD XMM0,qword ptr [0x001c3fd0] MOVSD qword ptr [RAX],XMM0 LAB_00189279: POP RBX RET LAB_0018927b: CVTSI2SS XMM1,EAX MOVSS XMM0,dword ptr [0x001c1b4c] DIVSS XMM0,XMM1 MULSS XMM0,dword ptr [0x001c3f5c] MOV RCX,qword ptr [RBX + 0x10] XOR EDX,EDX TEST EAX,EAX CMOVLE EAX,EDX LAB_0018929e: CMP RAX,RDX JZ 0x00189279 MOVSS dword ptr [RCX + RDX*0x4],XMM0 INC RDX JMP 0x0018929e
/* void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const */ void __thiscall OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>:: assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask> (Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2> *this,EdgeInterface *param_1,Mask *param_2 ) { long lVar1; uint uVar2; ulong uVar3; ulong uVar4; float fVar5; uVar2 = Vtr::internal::EdgeInterface::GetNumFaces(param_1); *(int8 *)(param_2 + 0x18) = 2; *(uint *)(param_2 + 0x20) = uVar2; param_2[0x24] = (Mask)0x0; **(int8 **)param_2 = DAT_001c3fc0; if (uVar2 == 2) { **(int8 **)(param_2 + 0x10) = DAT_001c3fd0; } else { fVar5 = (DAT_001c1b4c / (float)(int)uVar2) * DAT_001c3f5c; lVar1 = *(long *)(param_2 + 0x10); uVar4 = 0; uVar3 = (ulong)uVar2; if ((int)uVar2 < 1) { uVar3 = uVar4; } for (; uVar3 != uVar4; uVar4 = uVar4 + 1) { *(float *)(lVar1 + uVar4 * 4) = fVar5; } } return; }
53,058
flush_partitioned_key_cache_blocks
eloqsql/mysys/mf_keycache.c
static int flush_partitioned_key_cache_blocks(PARTITIONED_KEY_CACHE_CB *keycache, File file, void *file_extra, enum flush_type type) { uint i; uint partitions= keycache->partitions; int err= 0; ulonglong *dirty_part_map= (ulonglong *) file_extra; DBUG_ENTER("partitioned_flush_key_blocks"); DBUG_PRINT("enter", ("keycache: %p", keycache)); for (i= 0; i < partitions; i++) { SIMPLE_KEY_CACHE_CB *partition= keycache->partition_array[i]; if ((type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) && !((*dirty_part_map) & ((ulonglong) 1 << i))) continue; err|= MY_TEST(flush_simple_key_cache_blocks(partition, file, 0, type)); } *dirty_part_map= 0; DBUG_RETURN(err); }
O3
c
flush_partitioned_key_cache_blocks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, -0x38(%rbp) movl %esi, -0x2c(%rbp) movl 0x1c(%rdi), %ebx testq %rbx, %rbx je 0x9aa7c movl %ecx, %r14d movq %rdi, %r12 xorl %r15d, %r15d xorl %r13d, %r13d movq 0x8(%r12), %rax movq (%rax,%r15,8), %rdi cmpl $0x3, %r14d je 0x9aa50 testl %r14d, %r14d jne 0x9aa5d movq -0x38(%rbp), %rax movq (%rax), %rax btq %r15, %rax jae 0x9aa72 movl -0x2c(%rbp), %esi movl %r14d, %ecx callq 0x9988b xorl %ecx, %ecx testl %eax, %eax setne %cl orl %ecx, %r13d incq %r15 cmpq %r15, %rbx jne 0x9aa3c jmp 0x9aa7f xorl %r13d, %r13d movq -0x38(%rbp), %rax movq $0x0, (%rax) movl %r13d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
flush_partitioned_key_cache_blocks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdx mov [rbp+var_2C], esi mov ebx, [rdi+1Ch] test rbx, rbx jz short loc_9AA7C mov r14d, ecx mov r12, rdi xor r15d, r15d xor r13d, r13d loc_9AA3C: mov rax, [r12+8] mov rdi, [rax+r15*8] cmp r14d, 3 jz short loc_9AA50 test r14d, r14d jnz short loc_9AA5D loc_9AA50: mov rax, [rbp+var_38] mov rax, [rax] bt rax, r15 jnb short loc_9AA72 loc_9AA5D: mov esi, [rbp+var_2C] mov ecx, r14d call flush_simple_key_cache_blocks xor ecx, ecx test eax, eax setnz cl or r13d, ecx loc_9AA72: inc r15 cmp rbx, r15 jnz short loc_9AA3C jmp short loc_9AA7F loc_9AA7C: xor r13d, r13d loc_9AA7F: mov rax, [rbp+var_38] mov qword ptr [rax], 0 mov eax, r13d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long flush_partitioned_key_cache_blocks(long long a1, unsigned int a2, long long *a3, unsigned int a4) { long long v4; // rbx unsigned long long v6; // r15 unsigned int v7; // r13d long long v8; // rax v4 = *(unsigned int *)(a1 + 28); if ( *(_DWORD *)(a1 + 28) ) { v6 = 0LL; v7 = 0; do { if ( a4 != 3 && a4 || (v8 = *a3, _bittest64(&v8, v6)) ) v7 |= (unsigned int)flush_simple_key_cache_blocks( *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v6), a2, (long long)a3, a4) != 0; ++v6; } while ( v4 != v6 ); } else { v7 = 0; } *a3 = 0LL; return v7; }
flush_partitioned_key_cache_blocks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDX MOV dword ptr [RBP + -0x2c],ESI MOV EBX,dword ptr [RDI + 0x1c] TEST RBX,RBX JZ 0x0019aa7c MOV R14D,ECX MOV R12,RDI XOR R15D,R15D XOR R13D,R13D LAB_0019aa3c: MOV RAX,qword ptr [R12 + 0x8] MOV RDI,qword ptr [RAX + R15*0x8] CMP R14D,0x3 JZ 0x0019aa50 TEST R14D,R14D JNZ 0x0019aa5d LAB_0019aa50: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] BT RAX,R15 JNC 0x0019aa72 LAB_0019aa5d: MOV ESI,dword ptr [RBP + -0x2c] MOV ECX,R14D CALL 0x0019988b XOR ECX,ECX TEST EAX,EAX SETNZ CL OR R13D,ECX LAB_0019aa72: INC R15 CMP RBX,R15 JNZ 0x0019aa3c JMP 0x0019aa7f LAB_0019aa7c: XOR R13D,R13D LAB_0019aa7f: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],0x0 MOV EAX,R13D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
byte flush_partitioned_key_cache_blocks(long param_1,int4 param_2,ulong *param_3,int param_4) { uint uVar1; int iVar2; ulong *extraout_RDX; ulong *puVar3; byte bVar4; ulong uVar5; uVar1 = *(uint *)(param_1 + 0x1c); if ((ulong)uVar1 == 0) { bVar4 = 0; } else { uVar5 = 0; bVar4 = 0; puVar3 = param_3; do { if (((param_4 != 3) && (param_4 != 0)) || ((*param_3 >> (uVar5 & 0x3f) & 1) != 0)) { iVar2 = flush_simple_key_cache_blocks (*(int8 *)(*(long *)(param_1 + 8) + uVar5 * 8),param_2,puVar3, param_4); bVar4 = bVar4 | iVar2 != 0; puVar3 = extraout_RDX; } uVar5 = uVar5 + 1; } while (uVar1 != uVar5); } *param_3 = 0; return bVar4; }
53,059
my_message_stderr
eloqsql/mysys/my_mess.c
void my_message_stderr(uint error __attribute__((unused)), const char *str, myf MyFlags) { DBUG_ENTER("my_message_stderr"); DBUG_PRINT("enter",("message: %s",str)); (void) fflush(stdout); if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY)) DBUG_VOID_RETURN; if (MyFlags & ME_BELL) (void) fputc('\007', stderr); if (my_progname) { (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); } (void)fputs(str,stderr); (void)fputc('\n',stderr); (void)fflush(stderr); DBUG_VOID_RETURN; }
O0
c
my_message_stderr: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0xc28c5 movq 0x233704(%rip), %rax # 0x2f5fd0 movq (%rax), %rdi callq 0x60540 movq -0x18(%rbp), %rax andq $0x480, %rax # imm = 0x480 cmpq $0x0, %rax je 0xc28eb jmp 0xc28e6 jmp 0xc2981 movq -0x18(%rbp), %rax andq $0x4, %rax cmpq $0x0, %rax je 0xc290d movq 0x2336d8(%rip), %rax # 0x2f5fd8 movq (%rax), %rsi movl $0x7, %edi callq 0x609f0 leaq 0x40327c(%rip), %rax # 0x4c5b90 cmpq $0x0, (%rax) je 0xc2949 leaq 0x40326f(%rip), %rax # 0x4c5b90 movq (%rax), %rdi movq 0x2336ad(%rip), %rax # 0x2f5fd8 movq (%rax), %rsi callq 0x60380 movq 0x23369e(%rip), %rax # 0x2f5fd8 movq (%rax), %rsi leaq 0x890ac(%rip), %rdi # 0x14b9f0 callq 0x60380 movq -0x10(%rbp), %rdi movq 0x233684(%rip), %rax # 0x2f5fd8 movq (%rax), %rsi callq 0x60380 movq 0x233675(%rip), %rax # 0x2f5fd8 movq (%rax), %rsi movl $0xa, %edi callq 0x609f0 movq 0x233661(%rip), %rax # 0x2f5fd8 movq (%rax), %rdi callq 0x60540 jmp 0xc2981 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
my_message_stderr: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_C28C5: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, [rbp+var_18] and rax, 480h cmp rax, 0 jz short loc_C28EB jmp short $+2 loc_C28E6: jmp loc_C2981 loc_C28EB: mov rax, [rbp+var_18] and rax, 4 cmp rax, 0 jz short loc_C290D mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 7 call _fputc loc_C290D: lea rax, my_progname cmp qword ptr [rax], 0 jz short loc_C2949 lea rax, my_progname mov rdi, [rax] mov rax, cs:stderr_ptr mov rsi, [rax] call _fputs mov rax, cs:stderr_ptr mov rsi, [rax] lea rdi, aInIncludedFile_0+15h; ": " call _fputs loc_C2949: mov rdi, [rbp+var_10] mov rax, cs:stderr_ptr mov rsi, [rax] call _fputs mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 0Ah call _fputc mov rax, cs:stderr_ptr mov rdi, [rax] call _fflush jmp short $+2 loc_C2981: add rsp, 20h pop rbp retn
long long my_message_stderr(long long a1, long long a2, __int16 a3) { long long result; // rax fflush(stdout); result = a3 & 0x480; if ( (a3 & 0x480) == 0 ) { if ( (a3 & 4) != 0 ) fputc(7LL, stderr); if ( my_progname ) { fputs(my_progname, stderr); fputs(": ", stderr); } fputs(a2, stderr); fputc(10LL, stderr); return fflush(stderr); } return result; }
my_message_stderr: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x001c28c5 LAB_001c28c5: MOV RAX,qword ptr [0x003f5fd0] MOV RDI,qword ptr [RAX] CALL 0x00160540 MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x480 CMP RAX,0x0 JZ 0x001c28eb JMP 0x001c28e6 LAB_001c28e6: JMP 0x001c2981 LAB_001c28eb: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x4 CMP RAX,0x0 JZ 0x001c290d MOV RAX,qword ptr [0x003f5fd8] MOV RSI,qword ptr [RAX] MOV EDI,0x7 CALL 0x001609f0 LAB_001c290d: LEA RAX,[0x5c5b90] CMP qword ptr [RAX],0x0 JZ 0x001c2949 LEA RAX,[0x5c5b90] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x003f5fd8] MOV RSI,qword ptr [RAX] CALL 0x00160380 MOV RAX,qword ptr [0x003f5fd8] MOV RSI,qword ptr [RAX] LEA RDI,[0x24b9f0] CALL 0x00160380 LAB_001c2949: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [0x003f5fd8] MOV RSI,qword ptr [RAX] CALL 0x00160380 MOV RAX,qword ptr [0x003f5fd8] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x001609f0 MOV RAX,qword ptr [0x003f5fd8] MOV RDI,qword ptr [RAX] CALL 0x00160540 JMP 0x001c2981 LAB_001c2981: ADD RSP,0x20 POP RBP RET
void my_message_stderr(int8 param_1,char *param_2,ulong param_3) { fflush(*(FILE **)PTR_stdout_003f5fd0); if ((param_3 & 0x480) == 0) { if ((param_3 & 4) != 0) { fputc(7,*(FILE **)PTR_stderr_003f5fd8); } if (my_progname != (char *)0x0) { fputs(my_progname,*(FILE **)PTR_stderr_003f5fd8); fputs(": ",*(FILE **)PTR_stderr_003f5fd8); } fputs(param_2,*(FILE **)PTR_stderr_003f5fd8); fputc(10,*(FILE **)PTR_stderr_003f5fd8); fflush(*(FILE **)PTR_stderr_003f5fd8); } return; }
53,060
my_message_stderr
eloqsql/mysys/my_mess.c
void my_message_stderr(uint error __attribute__((unused)), const char *str, myf MyFlags) { DBUG_ENTER("my_message_stderr"); DBUG_PRINT("enter",("message: %s",str)); (void) fflush(stdout); if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY)) DBUG_VOID_RETURN; if (MyFlags & ME_BELL) (void) fputc('\007', stderr); if (my_progname) { (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); } (void)fputs(str,stderr); (void)fputc('\n',stderr); (void)fflush(stderr); DBUG_VOID_RETURN; }
O3
c
my_message_stderr: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %rbx movq 0x33d528(%rip), %rax # 0x3d9f98 movq (%rax), %rdi callq 0x5f570 testl $0x480, %r14d # imm = 0x480 je 0x9ca86 popq %rbx popq %r14 popq %rbp retq testb $0x4, %r14b je 0x9caa0 movq 0x33d515(%rip), %rax # 0x3d9fa8 movq (%rax), %rsi movl $0x7, %edi callq 0x5fa50 leaq 0x3cbcd9(%rip), %rax # 0x468780 movq (%rax), %rdi testq %rdi, %rdi je 0x9cab4 callq 0x61021 movq 0x33d4ed(%rip), %r14 # 0x3d9fa8 movq (%r14), %rsi movq %rbx, %rdi callq 0x5f3a0 movq (%r14), %rsi movl $0xa, %edi callq 0x5fa50 movq (%r14), %rdi popq %rbx popq %r14 popq %rbp jmp 0x5f570 nop
my_message_stderr: push rbp mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rsi mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush test r14d, 480h jz short loc_9CA86 pop rbx pop r14 pop rbp retn loc_9CA86: test r14b, 4 jz short loc_9CAA0 mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 7 call _fputc loc_9CAA0: lea rax, my_progname mov rdi, [rax] test rdi, rdi jz short loc_9CAB4 call my_message_stderr_cold_1 loc_9CAB4: mov r14, cs:stderr_ptr mov rsi, [r14] mov rdi, rbx call _fputs mov rsi, [r14] mov edi, 0Ah call _fputc mov rdi, [r14] pop rbx pop r14 pop rbp jmp _fflush
long long my_message_stderr(long long a1, long long a2, __int16 a3) { long long result; // rax result = fflush(stdout); if ( (a3 & 0x480) == 0 ) { if ( (a3 & 4) != 0 ) fputc(7LL, stderr); if ( my_progname ) my_message_stderr_cold_1((long long)my_progname); fputs(a2, stderr); fputc(10LL, stderr); return fflush(stderr); } return result; }
my_message_stderr: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RDX MOV RBX,RSI MOV RAX,qword ptr [0x004d9f98] MOV RDI,qword ptr [RAX] CALL 0x0015f570 TEST R14D,0x480 JZ 0x0019ca86 POP RBX POP R14 POP RBP RET LAB_0019ca86: TEST R14B,0x4 JZ 0x0019caa0 MOV RAX,qword ptr [0x004d9fa8] MOV RSI,qword ptr [RAX] MOV EDI,0x7 CALL 0x0015fa50 LAB_0019caa0: LEA RAX,[0x568780] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x0019cab4 CALL 0x00161021 LAB_0019cab4: MOV R14,qword ptr [0x004d9fa8] MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0015f3a0 MOV RSI,qword ptr [R14] MOV EDI,0xa CALL 0x0015fa50 MOV RDI,qword ptr [R14] POP RBX POP R14 POP RBP JMP 0x0015f570
void my_message_stderr(int8 param_1,char *param_2,ulong param_3) { int *puVar1; fflush(*(FILE **)PTR_stdout_004d9f98); if ((param_3 & 0x480) != 0) { return; } if ((param_3 & 4) != 0) { fputc(7,*(FILE **)PTR_stderr_004d9fa8); } if (my_progname != 0) { my_message_stderr_cold_1(); } puVar1 = PTR_stderr_004d9fa8; fputs(param_2,*(FILE **)PTR_stderr_004d9fa8); fputc(10,*(FILE **)puVar1); fflush(*(FILE **)puVar1); return; }
53,061
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(nlohmann::json_abi_v3_11_3::detail::priority_tag<0u>) const
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
const noexcept(noexcept( JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>()))) { auto ret = ValueType(); JSONSerializer<ValueType>::from_json(*this, ret); return ret; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(nlohmann::json_abi_v3_11_3::detail::priority_tag<0u>) const: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rbx, %rsi callq 0x11e00 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x1575b movq (%r15), %rsi incq %rsi callq 0x119a0 movq %r14, %rdi callq 0x11fe0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE: push r15 push r14 push rbx mov rbx, rdi lea r15, [rdi+10h] mov [rdi], r15 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rbx call __ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE; nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::string_t &) mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_1575B mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1575B: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( long long a1, long long a2) { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( a2, a1); return a1; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_00115731: MOV RDI,RSI MOV RSI,RBX CALL 0x00111e00 LAB_0011573c: MOV RAX,RBX POP RBX POP R14 POP R15 RET
string_t * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (string_t *param_1,basic_json *param_2) { *(string_t **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string_t)0x0; /* try { // try from 00115731 to 0011573b has its CatchHandler @ 00115745 */ nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (param_2,param_1); return param_1; }
53,062
mp_sqrtrem_rec_dec
bluesky950520[P]quickjs/libbf.c
static limb_t mp_sqrtrem_rec_dec(limb_t *tabs, limb_t *taba, limb_t n, limb_t *tmp_buf) { limb_t l, h, rh, ql, qh, c, i; if (n == 1) return mp_sqrtrem2_dec(tabs, taba); #ifdef DEBUG_SQRTREM_DEC mp_print_str_dec("a", taba, 2 * n); #endif l = n / 2; h = n - l; qh = mp_sqrtrem_rec_dec(tabs + l, taba + 2 * l, h, tmp_buf); #ifdef DEBUG_SQRTREM_DEC mp_print_str_dec("s1", tabs + l, h); mp_print_str_h_dec("r1", taba + 2 * l, h, qh); mp_print_str_h_dec("r2", taba + l, n, qh); #endif /* the remainder is in taba + 2 * l. Its high bit is in qh */ if (qh) { mp_sub_dec(taba + 2 * l, taba + 2 * l, tabs + l, h, 0); } /* instead of dividing by 2*s, divide by s (which is normalized) and update q and r */ mp_div_dec(NULL, tmp_buf, taba + l, n, tabs + l, h); qh += tmp_buf[l]; for(i = 0; i < l; i++) tabs[i] = tmp_buf[i]; ql = mp_div1_dec(tabs, tabs, l, 2, qh & 1); qh = qh >> 1; /* 0 or 1 */ if (ql) rh = mp_add_dec(taba + l, taba + l, tabs + l, h, 0); else rh = 0; #ifdef DEBUG_SQRTREM_DEC mp_print_str_h_dec("q", tabs, l, qh); mp_print_str_h_dec("u", taba + l, h, rh); #endif mp_add_ui_dec(tabs + l, qh, h); #ifdef DEBUG_SQRTREM_DEC mp_print_str_dec("s2", tabs, n); #endif /* q = qh, tabs[l - 1 ... 0], r = taba[n - 1 ... l] */ /* subtract q^2. if qh = 1 then q = B^l, so we can take shortcuts */ if (qh) { c = qh; } else { mp_mul_basecase_dec(taba + n, tabs, l, tabs, l); c = mp_sub_dec(taba, taba, taba + n, 2 * l, 0); } rh -= mp_sub_ui_dec(taba + 2 * l, c, n - 2 * l); if ((slimb_t)rh < 0) { mp_sub_ui_dec(tabs, 1, n); rh += mp_add_mul1_dec(taba, tabs, n, 2); rh += mp_add_ui_dec(taba, 1, n); } return rh; }
O1
c
mp_sqrtrem_rec_dec: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r14 cmpq $0x1, %rdx jne 0x8df51 movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000 mulq 0x8(%rbx) movq %rdx, %r15 movq %rax, %r12 addq (%rbx), %r12 adcq $0x0, %r15 je 0x8e07a bsrq %r15, %rbp xorq $0x3f, %rbp jmp 0x8e07f movq %rcx, %rbp movq %rdx, %rax shrq %rax movq %rdx, %r15 subq %rax, %r15 movq %rax, 0x10(%rsp) leaq (%r14,%rax,8), %r13 movq %rdx, 0x8(%rsp) andq $-0x2, %rdx movq %rdx, 0x18(%rsp) leaq (%rbx,%rdx,8), %r12 movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x8df09 movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000 movq %rax, 0x20(%rsp) testq %rax, %rax sete %al testq %r15, %r15 setle %cl orb %al, %cl jne 0x8dfd5 xorl %eax, %eax xorl %ecx, %ecx movq (%r12,%rax,8), %rdx addq (%r13,%rax,8), %rcx xorl %esi, %esi subq %rcx, %rdx setb %sil leaq (%rdx,%rdi), %rcx cmovaeq %rdx, %rcx movq %rcx, (%r12,%rax,8) incq %rax movq %rsi, %rcx cmpq %rax, %r15 jne 0x8dfac movq 0x10(%rsp), %rax leaq (%rbx,%rax,8), %rdx xorl %edi, %edi movq %rbp, %rsi movq 0x8(%rsp), %rcx movq %r13, %r8 movq %r15, %r9 callq 0x92a86 movq 0x10(%rsp), %r11 movq 0x8(%rsp), %rdx movq (%rbp,%r11,8), %rax addq 0x20(%rsp), %rax testq %rdx, %rdx je 0x8e02a cmpq $0x1, %r11 movq %r11, %rcx adcq $0x0, %rcx xorl %edi, %edi movq (%rbp,%rdi,8), %rsi movq %rsi, (%r14,%rdi,8) incq %rdi cmpq %rdi, %rcx jne 0x8e019 movabsq $0x4563918244f40000, %rcx # imm = 0x4563918244F40000 movl %eax, %edi andl $0x1, %edi negq %rdi andq %rcx, %rdi testq %rdx, %rdx je 0x8e154 leaq 0x1(%r11), %rsi movq -0x10(%r14,%rsi,8), %r9 movq %r9, %r8 shrq %r8 addq %rdi, %r8 movq %r8, -0x10(%r14,%rsi,8) andl $0x1, %r9d negq %r9 andq %rcx, %r9 decq %rsi movq %r9, %rdi cmpq $0x1, %rsi jg 0x8e04c jmp 0x8e157 movl $0x40, %ebp movl %ebp, %ecx andb $0x7e, %cl movq %r15, %rax shldq %cl, %r12, %rax movl %ebp, %ecx andb $0x3e, %cl movq %r12, %rdx shlq %cl, %rdx xorl %ecx, %ecx testb $0x40, %bpl cmovneq %rdx, %rax cmoveq %rdx, %rcx leaq 0x30(%rsp), %rsi movq %rcx, (%rsi) movq %rax, 0x8(%rsi) leaq 0x28(%rsp), %r13 movq %r13, %rdi callq 0x903dc shrl %ebp movq (%r13), %rsi movl %ebp, %ecx shrq %cl, %rsi movq %rsi, (%r13) movq %rsi, %rax mulq %rsi subq %rax, %r12 sbbq %rdx, %r15 movq %r15, %rax shldq $0x1, %r12, %rax movabsq $-0x13e1b582496a9e5b, %rcx # imm = 0xEC1E4A7DB69561A5 mulq %rcx movq %rdx, %rcx movq %rdx, %rax movabsq $-0x7538dcfb76180000, %rdx # imm = 0x8AC7230489E80000 mulq %rdx subq %rax, %r12 sbbq %rdx, %r15 movabsq $0x158e460913d00000, %rax # imm = 0x158E460913D00000 subq %rax, %r12 movq $-0x1, %rax sbbq $0x0, %rax leaq (%r15,%rax), %rdx sarq %rdx addq %rdx, %rcx movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000 andq %rdi, %rdx addq %r12, %rdx adcq %r15, %rax leaq (%rax,%rcx), %rbp addq $0x2, %rbp andq %rdi, %rax addq %rdx, %rax movq %rax, (%rbx) movq %rsi, (%r14) jmp 0x8e315 movq %rdi, %r9 movabsq $0x7538dcfb76180000, %r13 # imm = 0x7538DCFB76180000 xorl %ebp, %ebp testq %r15, %r15 jle 0x8e19e testq %r9, %r9 je 0x8e19e xorl %r8d, %r8d movq %r11, %rcx movq (%rbx,%rcx,8), %rsi addq %rsi, %r8 addq (%r14,%rcx,8), %r8 leaq (%r8,%r13), %rdi xorl %ebp, %ebp cmpq %rsi, %rdi setbe %bpl cmovbeq %rdi, %r8 movq %r8, (%rbx,%rcx,8) incq %rcx movq %rbp, %r8 cmpq %rcx, %rdx jne 0x8e173 movq %rax, %rcx shrq %rcx testq %r15, %r15 jle 0x8e1dc leaq -0x1(%rdx), %r10 movq %r11, %rsi movq %rcx, %rdi movq (%r14,%rsi,8), %r8 addq %r8, %rdi leaq (%rdi,%r13), %r9 cmpq %r8, %r9 cmovbeq %r9, %rdi movq %rdi, (%r14,%rsi,8) ja 0x8e1dc leaq 0x1(%rsi), %r8 movl $0x1, %edi cmpq %rsi, %r10 movq %r8, %rsi jne 0x8e1b3 cmpq $0x1, %rax movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000 ja 0x8e25c leaq (%rbx,%rdx,8), %r15 movq %r15, %rdi movq %r14, %rsi movq %r11, %rdx movq %r14, %rcx movq %r11, %r8 callq 0x8db9a movq 0x18(%rsp), %r9 testq %r9, %r9 jle 0x8e24b xorl %eax, %eax xorl %r8d, %r8d movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000 movq 0x8(%rsp), %rdx movq (%rbx,%rax,8), %rsi addq (%r15,%rax,8), %r8 xorl %ecx, %ecx subq %r8, %rsi setb %cl leaq (%rsi,%rdi), %r8 cmovaeq %rsi, %r8 movq %r8, (%rbx,%rax,8) incq %rax movq %rcx, %r8 cmpq %rax, %r9 jne 0x8e222 jmp 0x8e25c xorl %ecx, %ecx movabsq $-0x7538dcfb76180000, %rdi # imm = 0x8AC7230489E80000 movq 0x8(%rsp), %rdx testb $0x1, %dl je 0x8e27d movq (%r12), %rax xorl %esi, %esi subq %rcx, %rax setb %sil leaq (%rax,%rdi), %rcx cmovaeq %rax, %rcx movq %rcx, (%r12) movq %rsi, %rcx subq %rcx, %rbp jns 0x8e315 testq %rdx, %rdx jle 0x8e2b2 leaq -0x1(%rdx), %rax xorl %ecx, %ecx decq %rdi movq (%r14,%rcx,8), %rsi addq $-0x1, %rsi cmovaeq %rdi, %rsi movq %rsi, (%r14,%rcx,8) jb 0x8e2b2 leaq 0x1(%rcx), %rsi cmpq %rcx, %rax movq %rsi, %rcx jne 0x8e294 movl $0x2, %ecx movq %rbx, %rdi movq %r14, %rsi callq 0x8da1f movq 0x8(%rsp), %r10 addq %rbp, %rax testq %r10, %r10 jle 0x8e30a xorl %ecx, %ecx movabsq $-0x7538dcfb76180000, %r9 # imm = 0x8AC7230489E80000 decq %r9 incq %r13 movl $0x1, %edx xorl %esi, %esi movq (%rbx,%rsi,8), %rdi cmpq %r9, %rdi movq %r13, %r8 cmovbq %rdx, %r8 addq %rdi, %r8 movq %r8, (%rbx,%rsi,8) cmpq %r9, %rdi jb 0x8e30f incq %rsi cmpq %rsi, %r10 jne 0x8e2e8 movl $0x1, %ecx addq %rcx, %rax movq %rax, %rbp movq %rbp, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mp_sqrtrem_rec_dec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rsi mov r14, rdi cmp rdx, 1 jnz short loc_8DF51 mov rax, 8AC7230489E80000h mul qword ptr [rbx+8] mov r15, rdx mov r12, rax add r12, [rbx] adc r15, 0 jz loc_8E07A bsr rbp, r15 xor rbp, 3Fh jmp loc_8E07F loc_8DF51: mov rbp, rcx mov rax, rdx shr rax, 1 mov r15, rdx sub r15, rax mov [rsp+78h+var_68], rax lea r13, [r14+rax*8] mov [rsp+78h+var_70], rdx and rdx, 0FFFFFFFFFFFFFFFEh mov [rsp+78h+var_60], rdx lea r12, [rbx+rdx*8] mov rdi, r13 mov rsi, r12 mov rdx, r15 call mp_sqrtrem_rec_dec mov rdi, 8AC7230489E80000h mov [rsp+78h+var_58], rax test rax, rax setz al test r15, r15 setle cl or cl, al jnz short loc_8DFD5 xor eax, eax xor ecx, ecx loc_8DFAC: mov rdx, [r12+rax*8] add rcx, [r13+rax*8+0] xor esi, esi sub rdx, rcx setb sil lea rcx, [rdx+rdi] cmovnb rcx, rdx mov [r12+rax*8], rcx inc rax mov rcx, rsi cmp r15, rax jnz short loc_8DFAC loc_8DFD5: mov rax, [rsp+78h+var_68] lea rdx, [rbx+rax*8] xor edi, edi mov rsi, rbp mov rcx, [rsp+78h+var_70] mov r8, r13 mov r9, r15 call mp_div_dec mov r11, [rsp+78h+var_68] mov rdx, [rsp+78h+var_70] mov rax, [rbp+r11*8+0] add rax, [rsp+78h+var_58] test rdx, rdx jz short loc_8E02A cmp r11, 1 mov rcx, r11 adc rcx, 0 xor edi, edi loc_8E019: mov rsi, [rbp+rdi*8+0] mov [r14+rdi*8], rsi inc rdi cmp rcx, rdi jnz short loc_8E019 loc_8E02A: mov rcx, 4563918244F40000h mov edi, eax and edi, 1 neg rdi and rdi, rcx test rdx, rdx jz loc_8E154 lea rsi, [r11+1] loc_8E04C: mov r9, [r14+rsi*8-10h] mov r8, r9 shr r8, 1 add r8, rdi mov [r14+rsi*8-10h], r8 and r9d, 1 neg r9 and r9, rcx dec rsi mov rdi, r9 cmp rsi, 1 jg short loc_8E04C jmp loc_8E157 loc_8E07A: mov ebp, 40h ; '@' loc_8E07F: mov ecx, ebp and cl, 7Eh mov rax, r15 shld rax, r12, cl mov ecx, ebp and cl, 3Eh mov rdx, r12 shl rdx, cl xor ecx, ecx test bpl, 40h cmovnz rax, rdx cmovz rcx, rdx lea rsi, [rsp+78h+var_48] mov [rsi], rcx mov [rsi+8], rax lea r13, [rsp+78h+var_50] mov rdi, r13 call mp_sqrtrem2 shr ebp, 1 mov rsi, [r13+0] mov ecx, ebp shr rsi, cl mov [r13+0], rsi mov rax, rsi mul rsi sub r12, rax sbb r15, rdx mov rax, r15 shld rax, r12, 1 mov rcx, 0EC1E4A7DB69561A5h mul rcx mov rcx, rdx mov rax, rdx mov rdx, 8AC7230489E80000h mul rdx sub r12, rax sbb r15, rdx mov rax, 158E460913D00000h sub r12, rax mov rax, 0FFFFFFFFFFFFFFFFh sbb rax, 0 lea rdx, [r15+rax] sar rdx, 1 add rcx, rdx mov rdi, 8AC7230489E80000h and rdx, rdi add rdx, r12 adc rax, r15 lea rbp, [rax+rcx] add rbp, 2 and rax, rdi add rax, rdx mov [rbx], rax mov [r14], rsi jmp loc_8E315 loc_8E154: mov r9, rdi loc_8E157: mov r13, 7538DCFB76180000h xor ebp, ebp test r15, r15 jle short loc_8E19E test r9, r9 jz short loc_8E19E xor r8d, r8d mov rcx, r11 loc_8E173: mov rsi, [rbx+rcx*8] add r8, rsi add r8, [r14+rcx*8] lea rdi, [r8+r13] xor ebp, ebp cmp rdi, rsi setbe bpl cmovbe r8, rdi mov [rbx+rcx*8], r8 inc rcx mov r8, rbp cmp rdx, rcx jnz short loc_8E173 loc_8E19E: mov rcx, rax shr rcx, 1 test r15, r15 jle short loc_8E1DC lea r10, [rdx-1] mov rsi, r11 mov rdi, rcx loc_8E1B3: mov r8, [r14+rsi*8] add rdi, r8 lea r9, [rdi+r13] cmp r9, r8 cmovbe rdi, r9 mov [r14+rsi*8], rdi ja short loc_8E1DC lea r8, [rsi+1] mov edi, 1 cmp r10, rsi mov rsi, r8 jnz short loc_8E1B3 loc_8E1DC: cmp rax, 1 mov rdi, 8AC7230489E80000h ja short loc_8E25C lea r15, [rbx+rdx*8] mov rdi, r15 mov rsi, r14 mov rdx, r11 mov rcx, r14 mov r8, r11 call mp_mul_basecase_dec mov r9, [rsp+78h+var_60] test r9, r9 jle short loc_8E24B xor eax, eax xor r8d, r8d mov rdi, 8AC7230489E80000h mov rdx, [rsp+78h+var_70] loc_8E222: mov rsi, [rbx+rax*8] add r8, [r15+rax*8] xor ecx, ecx sub rsi, r8 setb cl lea r8, [rsi+rdi] cmovnb r8, rsi mov [rbx+rax*8], r8 inc rax mov r8, rcx cmp r9, rax jnz short loc_8E222 jmp short loc_8E25C loc_8E24B: xor ecx, ecx mov rdi, 8AC7230489E80000h mov rdx, [rsp+78h+var_70] loc_8E25C: test dl, 1 jz short loc_8E27D mov rax, [r12] xor esi, esi sub rax, rcx setb sil lea rcx, [rax+rdi] cmovnb rcx, rax mov [r12], rcx mov rcx, rsi loc_8E27D: sub rbp, rcx jns loc_8E315 test rdx, rdx jle short loc_8E2B2 lea rax, [rdx-1] xor ecx, ecx dec rdi loc_8E294: mov rsi, [r14+rcx*8] add rsi, 0FFFFFFFFFFFFFFFFh cmovnb rsi, rdi mov [r14+rcx*8], rsi jb short loc_8E2B2 lea rsi, [rcx+1] cmp rax, rcx mov rcx, rsi jnz short loc_8E294 loc_8E2B2: mov ecx, 2 mov rdi, rbx mov rsi, r14 call mp_add_mul1_dec mov r10, [rsp+78h+var_70] add rax, rbp test r10, r10 jle short loc_8E30A xor ecx, ecx mov r9, 8AC7230489E80000h dec r9 inc r13 mov edx, 1 xor esi, esi loc_8E2E8: mov rdi, [rbx+rsi*8] cmp rdi, r9 mov r8, r13 cmovb r8, rdx add r8, rdi mov [rbx+rsi*8], r8 cmp rdi, r9 jb short loc_8E30F inc rsi cmp r10, rsi jnz short loc_8E2E8 loc_8E30A: mov ecx, 1 loc_8E30F: add rax, rcx mov rbp, rax loc_8E315: mov rax, rbp add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mp_sqrtrem_rec_dec(unsigned long long *a1, unsigned long long *a2, unsigned long long a3, long long a4) { unsigned __int128 v6; // kr00_16 unsigned long long v7; // rbp unsigned int v8; // ebp long long v10; // r15 unsigned long long *v11; // r13 unsigned long long *v12; // r12 long long v13; // rax _BOOL8 v14; // rcx unsigned long long v15; // rdx unsigned long long v16; // rcx bool v17; // cf unsigned long long v18; // rdx unsigned long long v19; // rcx long long v20; // rdx unsigned long long v21; // rax long long v22; // rdi long long v23; // rdi long long v24; // rsi unsigned long long v25; // r9 long long v26; // r9 unsigned long long v27; // rax long long v28; // rcx unsigned long long v29; // rsi __int128 v30; // kr10_16 unsigned long long v31; // rcx unsigned long long v32; // r15 unsigned __int128 v33; // kr30_16 long long v34; // rdx long long v35; // rbp _BOOL8 v36; // rbp _BOOL8 v37; // r8 long long v38; // rcx unsigned long long v39; // rsi unsigned long long v40; // r8 unsigned long long v41; // rcx long long v42; // rsi long long v43; // rdi unsigned long long v44; // r8 unsigned long long v45; // rdi bool v46; // cc bool v47; // zf long long v48; // rax _BOOL8 v49; // r8 unsigned long long v50; // rsi unsigned long long v51; // r8 bool v52; // cf unsigned long long v53; // rsi unsigned long long v54; // r8 bool v55; // cf unsigned long long v56; // rax unsigned long long v57; // rcx long long v58; // rcx unsigned long long v59; // rsi bool v60; // cf unsigned long long v61; // rsi long long v62; // rax long long v63; // rcx long long v64; // rsi unsigned long long v65; // rdi long long v66; // r8 long long v69; // [rsp+10h] [rbp-68h] signed long long v70; // [rsp+18h] [rbp-60h] long long v71; // [rsp+20h] [rbp-58h] unsigned long long v72; // [rsp+28h] [rbp-50h] BYREF _QWORD v73[9]; // [rsp+30h] [rbp-48h] BYREF if ( a3 == 1 ) { v6 = *a2 + a2[1] * (unsigned __int128)0x8AC7230489E80000LL; if ( *((_QWORD *)&v6 + 1) ) { _BitScanReverse64(&v7, *((unsigned long long *)&v6 + 1)); v8 = v7 ^ 0x3F; } else { v8 = 64; } v27 = (*((_QWORD *)&v6 + 1) << (v8 & 0x7E)) | ((unsigned long long)v6 >> (64 - (v8 & 0x7E))); v28 = 0LL; if ( (v8 & 0x40) != 0 ) v27 = (*a2 - 0x7538DCFB76180000LL * a2[1]) << (v8 & 0x3E); else v28 = (*a2 - 0x7538DCFB76180000LL * a2[1]) << (v8 & 0x3E); v73[0] = v28; v73[1] = v27; mp_sqrtrem2(&v72, v73); v29 = v72 >> (v8 >> 1); v72 = v29; v30 = v6 - v29 * (unsigned __int128)v29; v31 = (0xEC1E4A7DB69561A5LL * (unsigned __int128)(unsigned long long)(v30 >> 63)) >> 64; v32 = (v30 - 0x8AC7230489E80000LL * (unsigned __int128)v31) >> 64; v33 = __PAIR128__(-1LL, (unsigned long long)v30 - 0x8AC7230489E80000LL * v31) - 0x158E460913D00000LL; v34 = (long long)(v32 + *((_QWORD *)&v33 + 1)) >> 1; v35 = ((v33 + __PAIR128__(v32, v34 & 0x8AC7230489E80000LL)) >> 64) + v34 + v31 + 2; *a2 = v33 + (v34 & 0x8AC7230489E80000LL) + (((v33 + __PAIR128__(v32, v34 & 0x8AC7230489E80000LL)) >> 64) & 0x8AC7230489E80000LL); *a1 = v29; } else { v10 = a3 - (a3 >> 1); v69 = a3 >> 1; v11 = &a1[a3 >> 1]; v70 = a3 & 0xFFFFFFFFFFFFFFFELL; v12 = &a2[a3 & 0xFFFFFFFFFFFFFFFELL]; v71 = mp_sqrtrem_rec_dec(v11, v12, v10, a4); if ( v71 != 0 && v10 > 0 ) { v13 = 0LL; v14 = 0LL; do { v15 = v12[v13]; v16 = v11[v13] + v14; v17 = v15 < v16; v18 = v15 - v16; v19 = v18 - 0x7538DCFB76180000LL; if ( !v17 ) v19 = v18; v12[v13++] = v19; v14 = v17; } while ( v10 != v13 ); } mp_div_dec(0LL, a4, &a2[v69], a3, v11, v10); v20 = a3; v21 = v71 + *(_QWORD *)(a4 + 8 * v69); if ( a3 ) { v22 = 0LL; do { a1[v22] = *(_QWORD *)(a4 + 8 * v22); ++v22; } while ( (v69 == 0) + v69 != v22 ); } v23 = -(long long)(v21 & 1) & 0x4563918244F40000LL; if ( a3 ) { v24 = v69 + 1; do { v25 = a1[v24 - 2]; a1[v24 - 2] = v23 + (v25 >> 1); v26 = -(long long)(v25 & 1) & 0x4563918244F40000LL; --v24; v23 = v26; } while ( v24 > 1 ); } else { v26 = -(long long)(v21 & 1) & 0x4563918244F40000LL; } v36 = 0LL; if ( v10 > 0 && v26 ) { v37 = 0LL; v38 = v69; do { v39 = a2[v38]; v40 = a1[v38] + v39 + v37; v36 = v40 + 0x7538DCFB76180000LL <= v39; if ( v40 + 0x7538DCFB76180000LL <= v39 ) v40 += 0x7538DCFB76180000LL; a2[v38++] = v40; v37 = v36; } while ( a3 != v38 ); } v41 = v21 >> 1; if ( v10 > 0 ) { v42 = v69; v43 = v21 >> 1; do { v44 = a1[v42]; v45 = v44 + v43; v46 = v45 + 0x7538DCFB76180000LL <= v44; if ( v45 + 0x7538DCFB76180000LL <= v44 ) v45 += 0x7538DCFB76180000LL; a1[v42] = v45; if ( !v46 ) break; v43 = 1LL; v47 = a3 - 1 == v42++; } while ( !v47 ); } if ( v21 <= 1 ) { mp_mul_basecase_dec((long long)&a2[a3], (long long)a1, v69, a1, v69); if ( v70 <= 0 ) { v41 = 0LL; v20 = a3; } else { v48 = 0LL; v49 = 0LL; v20 = a3; do { v50 = a2[v48]; v51 = a2[a3 + v48] + v49; v52 = v50 < v51; v53 = v50 - v51; v41 = v52; v54 = v53 - 0x7538DCFB76180000LL; if ( !v52 ) v54 = v53; a2[v48++] = v54; v49 = v52; } while ( v70 != v48 ); } } if ( (v20 & 1) != 0 ) { v55 = *v12 < v41; v56 = *v12 - v41; v57 = v56 - 0x7538DCFB76180000LL; if ( !v55 ) v57 = v56; *v12 = v57; v41 = v55; } v35 = v36 - v41; if ( v35 < 0 ) { if ( v20 > 0 ) { v58 = 0LL; do { v59 = a1[v58]; v60 = v59 != 0; v61 = v59 - 1; if ( !v60 ) v61 = 0x8AC7230489E7FFFFLL; a1[v58] = v61; if ( v60 ) break; v47 = v20 - 1 == v58++; } while ( !v47 ); } v62 = v35 + mp_add_mul1_dec((long long)a2, (long long)a1, v20, 2uLL); if ( (long long)a3 <= 0 ) { LABEL_59: v63 = 1LL; } else { v63 = 0LL; v64 = 0LL; while ( 1 ) { v65 = a2[v64]; v66 = 0x7538DCFB76180001LL; if ( v65 < 0x8AC7230489E7FFFFLL ) v66 = 1LL; a2[v64] = v65 + v66; if ( v65 < 0x8AC7230489E7FFFFLL ) break; if ( a3 == ++v64 ) goto LABEL_59; } } return v63 + v62; } } return v35; }
mp_sqrtrem_rec_dec: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV R14,RDI CMP RDX,0x1 JNZ 0x0018df51 MOV RAX,-0x7538dcfb76180000 MUL qword ptr [RBX + 0x8] MOV R15,RDX MOV R12,RAX ADD R12,qword ptr [RBX] ADC R15,0x0 JZ 0x0018e07a BSR RBP,R15 XOR RBP,0x3f JMP 0x0018e07f LAB_0018df51: MOV RBP,RCX MOV RAX,RDX SHR RAX,0x1 MOV R15,RDX SUB R15,RAX MOV qword ptr [RSP + 0x10],RAX LEA R13,[R14 + RAX*0x8] MOV qword ptr [RSP + 0x8],RDX AND RDX,-0x2 MOV qword ptr [RSP + 0x18],RDX LEA R12,[RBX + RDX*0x8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL 0x0018df09 MOV RDI,-0x7538dcfb76180000 MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX SETZ AL TEST R15,R15 SETLE CL OR CL,AL JNZ 0x0018dfd5 XOR EAX,EAX XOR ECX,ECX LAB_0018dfac: MOV RDX,qword ptr [R12 + RAX*0x8] ADD RCX,qword ptr [R13 + RAX*0x8] XOR ESI,ESI SUB RDX,RCX SETC SIL LEA RCX,[RDX + RDI*0x1] CMOVNC RCX,RDX MOV qword ptr [R12 + RAX*0x8],RCX INC RAX MOV RCX,RSI CMP R15,RAX JNZ 0x0018dfac LAB_0018dfd5: MOV RAX,qword ptr [RSP + 0x10] LEA RDX,[RBX + RAX*0x8] XOR EDI,EDI MOV RSI,RBP MOV RCX,qword ptr [RSP + 0x8] MOV R8,R13 MOV R9,R15 CALL 0x00192a86 MOV R11,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBP + R11*0x8] ADD RAX,qword ptr [RSP + 0x20] TEST RDX,RDX JZ 0x0018e02a CMP R11,0x1 MOV RCX,R11 ADC RCX,0x0 XOR EDI,EDI LAB_0018e019: MOV RSI,qword ptr [RBP + RDI*0x8] MOV qword ptr [R14 + RDI*0x8],RSI INC RDI CMP RCX,RDI JNZ 0x0018e019 LAB_0018e02a: MOV RCX,0x4563918244f40000 MOV EDI,EAX AND EDI,0x1 NEG RDI AND RDI,RCX TEST RDX,RDX JZ 0x0018e154 LEA RSI,[R11 + 0x1] LAB_0018e04c: MOV R9,qword ptr [R14 + RSI*0x8 + -0x10] MOV R8,R9 SHR R8,0x1 ADD R8,RDI MOV qword ptr [R14 + RSI*0x8 + -0x10],R8 AND R9D,0x1 NEG R9 AND R9,RCX DEC RSI MOV RDI,R9 CMP RSI,0x1 JG 0x0018e04c JMP 0x0018e157 LAB_0018e07a: MOV EBP,0x40 LAB_0018e07f: MOV ECX,EBP AND CL,0x7e MOV RAX,R15 SHLD RAX,R12,CL MOV ECX,EBP AND CL,0x3e MOV RDX,R12 SHL RDX,CL XOR ECX,ECX TEST BPL,0x40 CMOVNZ RAX,RDX CMOVZ RCX,RDX LEA RSI,[RSP + 0x30] MOV qword ptr [RSI],RCX MOV qword ptr [RSI + 0x8],RAX LEA R13,[RSP + 0x28] MOV RDI,R13 CALL 0x001903dc SHR EBP,0x1 MOV RSI,qword ptr [R13] MOV ECX,EBP SHR RSI,CL MOV qword ptr [R13],RSI MOV RAX,RSI MUL RSI SUB R12,RAX SBB R15,RDX MOV RAX,R15 SHLD RAX,R12,0x1 MOV RCX,-0x13e1b582496a9e5b MUL RCX MOV RCX,RDX MOV RAX,RDX MOV RDX,-0x7538dcfb76180000 MUL RDX SUB R12,RAX SBB R15,RDX MOV RAX,0x158e460913d00000 SUB R12,RAX MOV RAX,-0x1 SBB RAX,0x0 LEA RDX,[R15 + RAX*0x1] SAR RDX,0x1 ADD RCX,RDX MOV RDI,-0x7538dcfb76180000 AND RDX,RDI ADD RDX,R12 ADC RAX,R15 LEA RBP,[RAX + RCX*0x1] ADD RBP,0x2 AND RAX,RDI ADD RAX,RDX MOV qword ptr [RBX],RAX MOV qword ptr [R14],RSI JMP 0x0018e315 LAB_0018e154: MOV R9,RDI LAB_0018e157: MOV R13,0x7538dcfb76180000 XOR EBP,EBP TEST R15,R15 JLE 0x0018e19e TEST R9,R9 JZ 0x0018e19e XOR R8D,R8D MOV RCX,R11 LAB_0018e173: MOV RSI,qword ptr [RBX + RCX*0x8] ADD R8,RSI ADD R8,qword ptr [R14 + RCX*0x8] LEA RDI,[R8 + R13*0x1] XOR EBP,EBP CMP RDI,RSI SETBE BPL CMOVBE R8,RDI MOV qword ptr [RBX + RCX*0x8],R8 INC RCX MOV R8,RBP CMP RDX,RCX JNZ 0x0018e173 LAB_0018e19e: MOV RCX,RAX SHR RCX,0x1 TEST R15,R15 JLE 0x0018e1dc LEA R10,[RDX + -0x1] MOV RSI,R11 MOV RDI,RCX LAB_0018e1b3: MOV R8,qword ptr [R14 + RSI*0x8] ADD RDI,R8 LEA R9,[RDI + R13*0x1] CMP R9,R8 CMOVBE RDI,R9 MOV qword ptr [R14 + RSI*0x8],RDI JA 0x0018e1dc LEA R8,[RSI + 0x1] MOV EDI,0x1 CMP R10,RSI MOV RSI,R8 JNZ 0x0018e1b3 LAB_0018e1dc: CMP RAX,0x1 MOV RDI,-0x7538dcfb76180000 JA 0x0018e25c LEA R15,[RBX + RDX*0x8] MOV RDI,R15 MOV RSI,R14 MOV RDX,R11 MOV RCX,R14 MOV R8,R11 CALL 0x0018db9a MOV R9,qword ptr [RSP + 0x18] TEST R9,R9 JLE 0x0018e24b XOR EAX,EAX XOR R8D,R8D MOV RDI,-0x7538dcfb76180000 MOV RDX,qword ptr [RSP + 0x8] LAB_0018e222: MOV RSI,qword ptr [RBX + RAX*0x8] ADD R8,qword ptr [R15 + RAX*0x8] XOR ECX,ECX SUB RSI,R8 SETC CL LEA R8,[RSI + RDI*0x1] CMOVNC R8,RSI MOV qword ptr [RBX + RAX*0x8],R8 INC RAX MOV R8,RCX CMP R9,RAX JNZ 0x0018e222 JMP 0x0018e25c LAB_0018e24b: XOR ECX,ECX MOV RDI,-0x7538dcfb76180000 MOV RDX,qword ptr [RSP + 0x8] LAB_0018e25c: TEST DL,0x1 JZ 0x0018e27d MOV RAX,qword ptr [R12] XOR ESI,ESI SUB RAX,RCX SETC SIL LEA RCX,[RAX + RDI*0x1] CMOVNC RCX,RAX MOV qword ptr [R12],RCX MOV RCX,RSI LAB_0018e27d: SUB RBP,RCX JNS 0x0018e315 TEST RDX,RDX JLE 0x0018e2b2 LEA RAX,[RDX + -0x1] XOR ECX,ECX DEC RDI LAB_0018e294: MOV RSI,qword ptr [R14 + RCX*0x8] ADD RSI,-0x1 CMOVNC RSI,RDI MOV qword ptr [R14 + RCX*0x8],RSI JC 0x0018e2b2 LEA RSI,[RCX + 0x1] CMP RAX,RCX MOV RCX,RSI JNZ 0x0018e294 LAB_0018e2b2: MOV ECX,0x2 MOV RDI,RBX MOV RSI,R14 CALL 0x0018da1f MOV R10,qword ptr [RSP + 0x8] ADD RAX,RBP TEST R10,R10 JLE 0x0018e30a XOR ECX,ECX MOV R9,-0x7538dcfb76180000 DEC R9 INC R13 MOV EDX,0x1 XOR ESI,ESI LAB_0018e2e8: MOV RDI,qword ptr [RBX + RSI*0x8] CMP RDI,R9 MOV R8,R13 CMOVC R8,RDX ADD R8,RDI MOV qword ptr [RBX + RSI*0x8],R8 CMP RDI,R9 JC 0x0018e30f INC RSI CMP R10,RSI JNZ 0x0018e2e8 LAB_0018e30a: MOV ECX,0x1 LAB_0018e30f: ADD RAX,RCX MOV RBP,RAX LAB_0018e315: MOV RAX,RBP ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long mp_sqrtrem_rec_dec(ulong *param_1,ulong *param_2,ulong param_3,long param_4) { ulong *puVar1; ulong *puVar2; ulong uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; byte bVar9; ulong uVar10; long lVar11; ulong uVar12; ulong uVar13; ulong uVar14; ulong uVar15; long lVar16; ulong uVar17; ulong uVar18; ulong uVar19; long lVar20; long lVar21; bool bVar22; ulong uStack_50; ulong uStack_48; ulong uStack_40; if (param_3 == 1) { auVar7._8_8_ = 0; auVar7._0_8_ = param_2[1]; uVar10 = SUB168(ZEXT816(10000000000000000000) * auVar7,0); uVar17 = uVar10 + *param_2; uVar10 = SUB168(ZEXT816(10000000000000000000) * auVar7,8) + (ulong)CARRY8(uVar10,*param_2); if (uVar10 == 0) { uVar13 = 0x40; } else { uVar13 = 0x3f; if (uVar10 != 0) { for (; uVar10 >> uVar13 == 0; uVar13 = uVar13 - 1) { } } uVar13 = uVar13 ^ 0x3f; } bVar9 = (byte)uVar13 & 0x3e; uStack_40 = uVar17 << ((byte)uVar13 & 0x3e); uStack_48 = 0; if ((uVar13 & 0x40) == 0) { uStack_48 = uStack_40; uStack_40 = uVar10 << bVar9 | uVar17 >> 0x40 - bVar9; } mp_sqrtrem2(&uStack_50); uStack_50 = uStack_50 >> ((byte)((uint)uVar13 >> 1) & 0x3f); auVar4._8_8_ = 0; auVar4._0_8_ = uStack_50; auVar8._8_8_ = 0; auVar8._0_8_ = uStack_50; uVar13 = SUB168(auVar4 * auVar8,0); uVar18 = uVar17 - uVar13; lVar20 = (uVar10 - SUB168(auVar4 * auVar8,8)) - (ulong)(uVar17 < uVar13); auVar5._8_8_ = 0; auVar5._0_8_ = lVar20 * 2 | uVar18 >> 0x3f; uVar17 = SUB168(auVar5 * ZEXT816(0xec1e4a7db69561a5),8); auVar6._8_8_ = 0; auVar6._0_8_ = uVar17; uVar10 = SUB168(auVar6 * ZEXT816(10000000000000000000),0); uVar13 = uVar18 - uVar10; lVar21 = (lVar20 - SUB168(auVar6 * ZEXT816(10000000000000000000),8)) - (ulong)(uVar18 < uVar10); uVar19 = uVar13 + 0xea71b9f6ec300000; lVar20 = -1 - (ulong)(uVar13 < 0x158e460913d00000); uVar13 = lVar21 + lVar20 >> 1; uVar18 = uVar13 & 10000000000000000000; uVar10 = lVar20 + lVar21 + (ulong)CARRY8(uVar18,uVar19); lVar20 = uVar10 + uVar17 + uVar13 + 2; *param_2 = (uVar10 & 10000000000000000000) + uVar18 + uVar19; *param_1 = uStack_50; } else { uVar10 = param_3 >> 1; lVar21 = param_3 - uVar10; puVar1 = param_1 + uVar10; uVar17 = param_3 & 0xfffffffffffffffe; puVar2 = param_2 + uVar17; lVar20 = mp_sqrtrem_rec_dec(puVar1,puVar2,lVar21); if (0 < lVar21 && lVar20 != 0) { lVar11 = 0; uVar13 = 0; do { uVar18 = puVar2[lVar11]; uVar12 = uVar13 + puVar1[lVar11]; uVar13 = (ulong)(uVar18 < uVar12); uVar19 = (uVar18 - uVar12) + 10000000000000000000; if (uVar18 >= uVar12) { uVar19 = uVar18 - uVar12; } puVar2[lVar11] = uVar19; lVar11 = lVar11 + 1; } while (lVar21 != lVar11); } mp_div_dec(0,param_4,param_2 + uVar10,param_3,puVar1,lVar21); uVar13 = *(long *)(param_4 + uVar10 * 8) + lVar20; if (param_3 != 0) { lVar20 = 0; do { param_1[lVar20] = *(ulong *)(param_4 + lVar20 * 8); lVar20 = lVar20 + 1; } while (uVar10 + (uVar10 == 0) != lVar20); } uVar18 = -(ulong)((uint)uVar13 & 1) & 5000000000000000000; if (param_3 != 0) { lVar20 = uVar10 + 1; do { uVar19 = param_1[lVar20 + -2]; param_1[lVar20 + -2] = (uVar19 >> 1) + uVar18; uVar18 = -(ulong)((uint)uVar19 & 1) & 5000000000000000000; lVar20 = lVar20 + -1; } while (1 < lVar20); } uVar19 = 0; if ((0 < lVar21) && (uVar18 != 0)) { uVar19 = 0; uVar18 = uVar10; do { uVar14 = param_2[uVar18]; uVar15 = uVar19 + uVar14 + param_1[uVar18]; uVar12 = uVar15 + 0x7538dcfb76180000; uVar19 = (ulong)(uVar12 <= uVar14); if (uVar12 <= uVar14) { uVar15 = uVar12; } param_2[uVar18] = uVar15; uVar18 = uVar18 + 1; } while (param_3 != uVar18); } uVar18 = uVar13 >> 1; if (0 < lVar21) { uVar12 = uVar10; uVar14 = uVar18; do { uVar3 = param_1[uVar12]; uVar15 = uVar14 + uVar3 + 0x7538dcfb76180000; uVar14 = uVar14 + uVar3; if (uVar15 <= uVar3) { uVar14 = uVar15; } param_1[uVar12] = uVar14; if (uVar3 < uVar15) break; uVar14 = 1; bVar22 = param_3 - 1 != uVar12; uVar12 = uVar12 + 1; } while (bVar22); } if (uVar13 < 2) { mp_mul_basecase_dec(param_2 + param_3,param_1,uVar10); if ((long)uVar17 < 1) { uVar18 = 0; } else { uVar10 = 0; uVar18 = 0; do { uVar13 = param_2[uVar10]; uVar14 = uVar18 + (param_2 + param_3)[uVar10]; uVar18 = (ulong)(uVar13 < uVar14); uVar12 = (uVar13 - uVar14) + 10000000000000000000; if (uVar13 >= uVar14) { uVar12 = uVar13 - uVar14; } param_2[uVar10] = uVar12; uVar10 = uVar10 + 1; } while (uVar17 != uVar10); } } if ((param_3 & 1) != 0) { uVar10 = *puVar2; bVar22 = uVar10 < uVar18; uVar10 = uVar10 - uVar18; uVar18 = (ulong)bVar22; uVar17 = uVar10 + 10000000000000000000; if (!bVar22) { uVar17 = uVar10; } *puVar2 = uVar17; } lVar20 = uVar19 - uVar18; if (lVar20 < 0) { if (0 < (long)param_3) { lVar21 = 0; do { uVar10 = param_1[lVar21]; uVar17 = uVar10 - 1; if (uVar10 == 0) { uVar17 = 9999999999999999999; } param_1[lVar21] = uVar17; } while ((uVar10 == 0) && (bVar22 = param_3 - 1 != lVar21, lVar21 = lVar21 + 1, bVar22)); } lVar21 = mp_add_mul1_dec(param_2,param_1,param_3,2); if (0 < (long)param_3) { lVar11 = 0; uVar10 = 0; do { uVar17 = param_2[uVar10]; lVar16 = 0x7538dcfb76180001; if (uVar17 < 9999999999999999999) { lVar16 = 1; } param_2[uVar10] = lVar16 + uVar17; if (uVar17 < 9999999999999999999) goto LAB_0018e30f; uVar10 = uVar10 + 1; } while (param_3 != uVar10); } lVar11 = 1; LAB_0018e30f: lVar20 = lVar21 + lVar20 + lVar11; } } return lVar20; }
53,063
spdlog::details::aggregate_formatter::~aggregate_formatter()
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/pattern_formatter-inl.h
aggregate_formatter() = default;
O3
c
spdlog::details::aggregate_formatter::~aggregate_formatter(): movq %rdi, %rax movq 0x18(%rdi), %rdi addq $0x28, %rax cmpq %rax, %rdi je 0x3d2a9 movq (%rax), %rsi incq %rsi jmp 0xa910 retq
_ZN6spdlog7details19aggregate_formatterD2Ev: mov rax, rdi mov rdi, [rdi+18h]; void * add rax, 28h ; '(' cmp rdi, rax jz short locret_3D2A9 mov rsi, [rax] inc rsi; unsigned __int64 jmp __ZdlPvm; operator delete(void *,ulong) locret_3D2A9: retn
void spdlog::details::aggregate_formatter::~aggregate_formatter(spdlog::details::aggregate_formatter *this) { _QWORD *v2; // rdi _QWORD *v3; // rax v2 = (_QWORD *)*((_QWORD *)this + 3); v3 = (_QWORD *)((char *)this + 40); if ( v2 != v3 ) operator delete(v2, *v3 + 1LL); }
~aggregate_formatter: MOV RAX,RDI MOV RDI,qword ptr [RDI + 0x18] ADD RAX,0x28 CMP RDI,RAX JZ 0x0013d2a9 MOV RSI,qword ptr [RAX] INC RSI JMP 0x0010a910 LAB_0013d2a9: RET
/* spdlog::details::aggregate_formatter::~aggregate_formatter() */ void __thiscall spdlog::details::aggregate_formatter::~aggregate_formatter(aggregate_formatter *this) { if (*(aggregate_formatter **)(this + 0x18) != this + 0x28) { operator_delete(*(aggregate_formatter **)(this + 0x18),*(long *)(this + 0x28) + 1); return; } return; }
53,064
cleanup_dirname
eloqsql/mysys/mf_pack.c
size_t cleanup_dirname(register char *to, const char *from) { reg5 size_t length; reg2 char * pos; reg3 char * from_ptr; reg4 char * start; char parent[5], /* for "FN_PARENTDIR" */ buff[FN_REFLEN + 1],*end_parentdir; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("cleanup_dirname"); DBUG_PRINT("enter",("from: '%s'",from)); start=buff; from_ptr=(char *) from; #ifdef FN_DEVCHAR if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0) { /* Skip device part */ length=(size_t) (pos-from_ptr)+1; start=strnmov(buff,from_ptr,length); from_ptr+=length; } #endif parent[0]=FN_LIBCHAR; length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent); for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++) { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2))) { for (l-- ; l ; *++pos= *from_ptr++, l--); start= pos + 1; /* Don't look inside multi-byte char */ continue; } #endif if (*pos == '/') *pos = FN_LIBCHAR; if (*pos == FN_LIBCHAR) { if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0) { /* If .../../; skip prev */ pos-=length; if (pos != start) { /* not /../ */ pos--; if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (!home_dir) { pos+=length+1; /* Don't unpack ~/.. */ continue; } pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (my_getwd(curr_dir,FN_REFLEN,MYF(0))) { pos+=length+1; /* Don't unpack ./.. */ continue; } pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } end_parentdir=pos; while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */ pos--; if (pos[1] == FN_HOMELIB || (pos >= start && memcmp(pos, parent, length) == 0)) { /* Don't remove ~user/ */ pos=strmov(end_parentdir+1,parent); *pos=FN_LIBCHAR; continue; } } } else if ((size_t) (pos-start) == length-1 && !memcmp(start,parent+1,length-1)) start=pos; /* Starts with "../" */ else if (pos-start > 0 && pos[-1] == FN_LIBCHAR) { #ifdef FN_NETWORK_DRIVES if (pos-start != 1) #endif pos--; /* Remove dupplicate '/' */ } else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR) pos-=2; /* Skip /./ */ } } (void) strmov(to,buff); DBUG_PRINT("exit",("to: '%s'",to)); DBUG_RETURN((size_t) (pos-buff)); }
O0
c
cleanup_dirname: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) jmp 0x2d1f8 leaq -0x210(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x220(%rbp), %rax movq %rax, -0x238(%rbp) movb $0x2f, -0xd(%rbp) leaq -0xd(%rbp), %rdi addq $0x1, %rdi leaq 0x4be01(%rip), %rsi # 0x79028 callq 0x242a0 leaq -0xd(%rbp), %rcx subq %rcx, %rax movq %rax, -0x228(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x230(%rbp) movq -0x238(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x238(%rbp) movb (%rax), %al movq -0x230(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0x2d641 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x2d28d movq -0x230(%rbp), %rax movb $0x2f, (%rax) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x2d628 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq -0x228(%rbp), %rax jbe 0x2d544 movq -0x230(%rbp), %rdi xorl %eax, %eax subq -0x228(%rbp), %rax addq %rax, %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x24130 cmpl $0x0, %eax jne 0x2d544 movq -0x228(%rbp), %rdx movq -0x230(%rbp), %rax xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x2d53f movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x2d3cf movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x2d360 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x2d3cf leaq 0x3565a1(%rip), %rax # 0x383908 cmpq $0x0, (%rax) jne 0x2d38b movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x2d62a leaq -0x210(%rbp), %rdi leaq 0x35656f(%rip), %rax # 0x383908 movq (%rax), %rsi callq 0x242a0 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x2d3cd movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x2d3cf movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax jne 0x2d47b movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x2d402 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x2d47b leaq 0x356517(%rip), %rdi # 0x383920 movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0x2e290 cmpl $0x0, %eax je 0x2d43a movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x2d62a leaq -0x210(%rbp), %rdi leaq 0x3564d8(%rip), %rsi # 0x383920 callq 0x242a0 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x2d479 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x2d47b movq -0x230(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x230(%rbp), %rcx xorl %eax, %eax cmpq -0x240(%rbp), %rcx movb %al, -0x249(%rbp) jb 0x2d4b7 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax setne %al movb %al, -0x249(%rbp) movb -0x249(%rbp), %al testb $0x1, %al jne 0x2d4c3 jmp 0x2d4d7 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x2d489 movq -0x230(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x7e, %eax je 0x2d513 movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax jb 0x2d53d movq -0x230(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x24130 cmpl $0x0, %eax jne 0x2d53d movq -0x248(%rbp), %rdi addq $0x1, %rdi leaq -0xd(%rbp), %rsi callq 0x242a0 movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movb $0x2f, (%rax) jmp 0x2d62a jmp 0x2d53f jmp 0x2d626 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax movq -0x228(%rbp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jne 0x2d59c movq -0x240(%rbp), %rdi leaq -0xd(%rbp), %rsi addq $0x1, %rsi movq -0x228(%rbp), %rdx subq $0x1, %rdx callq 0x24130 cmpl $0x0, %eax jne 0x2d59c movq -0x230(%rbp), %rax movq %rax, -0x240(%rbp) jmp 0x2d624 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x0, %rax jle 0x2d5d7 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x2d5d7 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x2d622 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x1, %rax jle 0x2d620 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2e, %eax jne 0x2d620 movq -0x230(%rbp), %rax movsbl -0x2(%rax), %eax cmpl $0x2f, %eax jne 0x2d620 movq -0x230(%rbp), %rax addq $-0x2, %rax movq %rax, -0x230(%rbp) jmp 0x2d622 jmp 0x2d624 jmp 0x2d626 jmp 0x2d628 jmp 0x2d62a movq -0x230(%rbp), %rax addq $0x1, %rax movq %rax, -0x230(%rbp) jmp 0x2d248 movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x242a0 jmp 0x2d656 jmp 0x2d658 movq -0x230(%rbp), %rax leaq -0x210(%rbp), %rcx subq %rcx, %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2d692 movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x242d0 nopw (%rax,%rax)
cleanup_dirname: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi jmp short $+2 loc_2D1F8: lea rax, [rbp+var_210] mov [rbp+var_240], rax mov rax, [rbp+var_220] mov [rbp+var_238], rax mov [rbp+var_D], 2Fh ; '/' lea rdi, [rbp+var_D] add rdi, 1 lea rsi, asc_79028; ".." call _stpcpy lea rcx, [rbp+var_D] sub rax, rcx mov [rbp+var_228], rax mov rax, [rbp+var_240] mov [rbp+var_230], rax loc_2D248: mov rax, [rbp+var_238] mov rcx, rax add rcx, 1 mov [rbp+var_238], rcx mov al, [rax] mov rcx, [rbp+var_230] mov [rcx], al movsx eax, al cmp eax, 0 jz loc_2D641 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_2D28D mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' loc_2D28D: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz loc_2D628 mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, [rbp+var_228] jbe loc_2D544 mov rdi, [rbp+var_230] xor eax, eax sub rax, [rbp+var_228] add rdi, rax lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz loc_2D544 mov rdx, [rbp+var_228] mov rax, [rbp+var_230] xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz loc_2D53F mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz loc_2D3CF mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_2D360 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_2D3CF loc_2D360: lea rax, home_dir cmp qword ptr [rax], 0 jnz short loc_2D38B mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_2D62A loc_2D38B: lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_2D3CD mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_2D3CD: jmp short $+2 loc_2D3CF: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_2D47B mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_2D402 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_2D47B loc_2D402: lea rdi, curr_dir mov esi, 200h xor eax, eax mov edx, eax call my_getwd cmp eax, 0 jz short loc_2D43A mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_2D62A loc_2D43A: lea rdi, [rbp+var_210] lea rsi, curr_dir call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_2D479 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_2D479: jmp short $+2 loc_2D47B: mov rax, [rbp+var_230] mov [rbp+var_248], rax loc_2D489: mov rcx, [rbp+var_230] xor eax, eax cmp rcx, [rbp+var_240] mov [rbp+var_249], al jb short loc_2D4B7 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' setnz al mov [rbp+var_249], al loc_2D4B7: mov al, [rbp+var_249] test al, 1 jnz short loc_2D4C3 jmp short loc_2D4D7 loc_2D4C3: mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_2D489 loc_2D4D7: mov rax, [rbp+var_230] movsx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jz short loc_2D513 mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jb short loc_2D53D mov rdi, [rbp+var_230] lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz short loc_2D53D loc_2D513: mov rdi, [rbp+var_248] add rdi, 1 lea rsi, [rbp+var_D] call _stpcpy mov [rbp+var_230], rax mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' jmp loc_2D62A loc_2D53D: jmp short $+2 loc_2D53F: jmp loc_2D626 loc_2D544: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx mov rcx, [rbp+var_228] sub rcx, 1 cmp rax, rcx jnz short loc_2D59C mov rdi, [rbp+var_240] lea rsi, [rbp+var_D] add rsi, 1 mov rdx, [rbp+var_228] sub rdx, 1 call _memcmp cmp eax, 0 jnz short loc_2D59C mov rax, [rbp+var_230] mov [rbp+var_240], rax jmp loc_2D624 loc_2D59C: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 0 jle short loc_2D5D7 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_2D5D7 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_2D622 loc_2D5D7: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 1 jle short loc_2D620 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Eh ; '.' jnz short loc_2D620 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-2] cmp eax, 2Fh ; '/' jnz short loc_2D620 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_230], rax loc_2D620: jmp short $+2 loc_2D622: jmp short $+2 loc_2D624: jmp short $+2 loc_2D626: jmp short $+2 loc_2D628: jmp short $+2 loc_2D62A: mov rax, [rbp+var_230] add rax, 1 mov [rbp+var_230], rax jmp loc_2D248 loc_2D641: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call _stpcpy jmp short $+2 loc_2D656: jmp short $+2 loc_2D658: mov rax, [rbp+var_230] lea rcx, [rbp+var_210] sub rax, rcx mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2D692 mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_2D692: call ___stack_chk_fail
long long cleanup_dirname(long long a1, _BYTE *a2) { _BYTE *v2; // rax bool v4; // [rsp+17h] [rbp-249h] _BYTE *v5; // [rsp+18h] [rbp-248h] _BYTE *v6; // [rsp+20h] [rbp-240h] _BYTE *i; // [rsp+30h] [rbp-230h] unsigned long long v9; // [rsp+38h] [rbp-228h] long long v10; // [rsp+48h] [rbp-218h] _BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF char v12; // [rsp+253h] [rbp-Dh] BYREF _BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF *(_QWORD *)&v13[4] = __readfsqword(0x28u); v10 = a1; v6 = v11; v12 = 47; v9 = stpcpy(v13, "..") - (_QWORD)&v12; for ( i = v11; ; ++i ) { v2 = a2++; LOBYTE(v2) = *v2; *i = (_BYTE)v2; if ( !(_BYTE)v2 ) break; if ( *i == 47 ) *i = 47; if ( *i == 47 ) { if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) ) { i -= v9; if ( i != v6 ) { if ( *--i == 126 && (i == v6 || *(i - 1) == 47) ) { if ( !home_dir ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, home_dir) - 1); if ( *i == 47 ) --i; } if ( *i == 46 && (i == v6 || *(i - 1) == 47) ) { if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1); if ( *i == 47 ) --i; } v5 = i; while ( 1 ) { v4 = 0; if ( i >= v6 ) v4 = *i != 47; if ( !v4 ) break; --i; } if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) ) { i = (_BYTE *)stpcpy(v5 + 1, &v12); *i = 47; } } } else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) ) { v6 = i; } else if ( i - v6 > 0 && *(i - 1) == 47 ) { --i; } else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 ) { i -= 2; } } } stpcpy(v10, v11); return i - v11; }
cleanup_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI JMP 0x0012d1f8 LAB_0012d1f8: LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RBP + -0x238],RAX MOV byte ptr [RBP + -0xd],0x2f LEA RDI,[RBP + -0xd] ADD RDI,0x1 LEA RSI,[0x179028] CALL 0x001242a0 LEA RCX,[RBP + -0xd] SUB RAX,RCX MOV qword ptr [RBP + -0x228],RAX MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x230],RAX LAB_0012d248: MOV RAX,qword ptr [RBP + -0x238] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x238],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x230] MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x0012d641 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0012d28d MOV RAX,qword ptr [RBP + -0x230] MOV byte ptr [RAX],0x2f LAB_0012d28d: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0012d628 MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,qword ptr [RBP + -0x228] JBE 0x0012d544 MOV RDI,qword ptr [RBP + -0x230] XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x228] ADD RDI,RAX LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x228] CALL 0x00124130 CMP EAX,0x0 JNZ 0x0012d544 MOV RDX,qword ptr [RBP + -0x228] MOV RAX,qword ptr [RBP + -0x230] XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x0012d53f MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x0012d3cf MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x0012d360 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x0012d3cf LAB_0012d360: LEA RAX,[0x483908] CMP qword ptr [RAX],0x0 JNZ 0x0012d38b MOV RAX,qword ptr [RBP + -0x228] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x230],RAX JMP 0x0012d62a LAB_0012d38b: LEA RDI,[RBP + -0x210] LEA RAX,[0x483908] MOV RSI,qword ptr [RAX] CALL 0x001242a0 ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0012d3cd MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_0012d3cd: JMP 0x0012d3cf LAB_0012d3cf: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x0012d47b MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x0012d402 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x0012d47b LAB_0012d402: LEA RDI,[0x483920] MOV ESI,0x200 XOR EAX,EAX MOV EDX,EAX CALL 0x0012e290 CMP EAX,0x0 JZ 0x0012d43a MOV RAX,qword ptr [RBP + -0x228] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x230],RAX JMP 0x0012d62a LAB_0012d43a: LEA RDI,[RBP + -0x210] LEA RSI,[0x483920] CALL 0x001242a0 ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0012d479 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_0012d479: JMP 0x0012d47b LAB_0012d47b: MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x248],RAX LAB_0012d489: MOV RCX,qword ptr [RBP + -0x230] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x240] MOV byte ptr [RBP + -0x249],AL JC 0x0012d4b7 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f SETNZ AL MOV byte ptr [RBP + -0x249],AL LAB_0012d4b7: MOV AL,byte ptr [RBP + -0x249] TEST AL,0x1 JNZ 0x0012d4c3 JMP 0x0012d4d7 LAB_0012d4c3: MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x0012d489 LAB_0012d4d7: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JZ 0x0012d513 MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JC 0x0012d53d MOV RDI,qword ptr [RBP + -0x230] LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x228] CALL 0x00124130 CMP EAX,0x0 JNZ 0x0012d53d LAB_0012d513: MOV RDI,qword ptr [RBP + -0x248] ADD RDI,0x1 LEA RSI,[RBP + -0xd] CALL 0x001242a0 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOV byte ptr [RAX],0x2f JMP 0x0012d62a LAB_0012d53d: JMP 0x0012d53f LAB_0012d53f: JMP 0x0012d626 LAB_0012d544: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x228] SUB RCX,0x1 CMP RAX,RCX JNZ 0x0012d59c MOV RDI,qword ptr [RBP + -0x240] LEA RSI,[RBP + -0xd] ADD RSI,0x1 MOV RDX,qword ptr [RBP + -0x228] SUB RDX,0x1 CALL 0x00124130 CMP EAX,0x0 JNZ 0x0012d59c MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x240],RAX JMP 0x0012d624 LAB_0012d59c: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,0x0 JLE 0x0012d5d7 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x0012d5d7 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x0012d622 LAB_0012d5d7: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,0x1 JLE 0x0012d620 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2e JNZ 0x0012d620 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x2] CMP EAX,0x2f JNZ 0x0012d620 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x2 MOV qword ptr [RBP + -0x230],RAX LAB_0012d620: JMP 0x0012d622 LAB_0012d622: JMP 0x0012d624 LAB_0012d624: JMP 0x0012d626 LAB_0012d626: JMP 0x0012d628 LAB_0012d628: JMP 0x0012d62a LAB_0012d62a: MOV RAX,qword ptr [RBP + -0x230] ADD RAX,0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x0012d248 LAB_0012d641: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x001242a0 JMP 0x0012d656 LAB_0012d656: JMP 0x0012d658 LAB_0012d658: MOV RAX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x210] SUB RAX,RCX MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012d692 MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_0012d692: CALL 0x001242d0
long cleanup_dirname(char *param_1,char *param_2) { char cVar1; int iVar2; char *pcVar3; ulong __n; char *pcVar4; long in_FS_OFFSET; bool bVar5; char *local_248; char *local_240; char *local_238; char local_218 [515]; char local_15; char acStack_14 [4]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_248 = local_218; local_15 = '/'; pcVar3 = stpcpy(acStack_14,".."); __n = (long)pcVar3 - (long)&local_15; local_240 = param_2; local_238 = local_248; do { cVar1 = *local_240; *local_238 = cVar1; if (cVar1 == '\0') { stpcpy(param_1,local_218); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)local_238 - (long)local_218; } if (*local_238 == '/') { *local_238 = '/'; } if (*local_238 == '/') { if ((__n < (ulong)((long)local_238 - (long)local_248)) && (iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) { local_238 = local_238 + -__n; if (local_238 != local_248) { pcVar3 = local_238 + -1; if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) { if (home_dir == (char *)0x0) { local_238 = pcVar3 + __n + 1; goto LAB_0012d62a; } pcVar4 = stpcpy(local_218,home_dir); pcVar3 = pcVar4 + -1; if (pcVar4[-1] == '/') { pcVar3 = pcVar4 + -2; } } local_238 = pcVar3; pcVar3 = local_238; if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) { iVar2 = my_getwd(&curr_dir,0x200,0); if (iVar2 != 0) { local_238 = local_238 + __n + 1; goto LAB_0012d62a; } pcVar4 = stpcpy(local_218,&curr_dir); local_238 = pcVar4 + -1; pcVar3 = local_238; if (*local_238 == '/') { local_238 = pcVar4 + -2; pcVar3 = local_238; } } while( true ) { bVar5 = false; if (local_248 <= local_238) { bVar5 = *local_238 != '/'; } if (!bVar5) break; local_238 = local_238 + -1; } if ((local_238[1] == '~') || ((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) { local_238 = stpcpy(pcVar3 + 1,&local_15); *local_238 = '/'; } } } else if (((long)local_238 - (long)local_248 == __n - 1) && (iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) { local_248 = local_238; } else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) { if ((1 < (long)local_238 - (long)local_248) && ((local_238[-1] == '.' && (local_238[-2] == '/')))) { local_238 = local_238 + -2; } } else { local_238 = local_238 + -1; } } LAB_0012d62a: local_238 = local_238 + 1; local_240 = local_240 + 1; } while( true ); }
53,065
my_strnxfrm_8bit_nopad_bin
eloqsql/strings/ctype-bin.c
static size_t my_strnxfrm_8bit_nopad_bin(CHARSET_INFO *cs, uchar * dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { set_if_smaller(srclen, dstlen); set_if_smaller(srclen, nweights); if (dst != src) memcpy(dst, src, srclen); return my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + srclen, dst + dstlen,(uint)(nweights - srclen), flags, 0); }
O0
c
my_strnxfrm_8bit_nopad_bin: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0xa11b4 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xa11b6 jmp 0xa11b8 movq -0x30(%rbp), %rax movl -0x1c(%rbp), %ecx cmpq %rcx, %rax jbe 0xa11cb movl -0x1c(%rbp), %eax movq %rax, -0x30(%rbp) jmp 0xa11cd movq -0x10(%rbp), %rax cmpq -0x28(%rbp), %rax je 0xa11e8 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x292d0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x30(%rbp), %rdx movq -0x10(%rbp), %rcx addq -0x18(%rbp), %rcx movl -0x1c(%rbp), %eax subq -0x30(%rbp), %rax movl %eax, %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0xace20 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strnxfrm_8bit_nopad_bin: push rbp mov rbp, rsp sub rsp, 40h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_30] cmp rax, [rbp+var_18] jbe short loc_A11B4 mov rax, [rbp+var_18] mov [rbp+var_30], rax loc_A11B4: jmp short $+2 loc_A11B6: jmp short $+2 loc_A11B8: mov rax, [rbp+var_30] mov ecx, [rbp+var_1C] cmp rax, rcx jbe short loc_A11CB mov eax, [rbp+var_1C] mov [rbp+var_30], rax loc_A11CB: jmp short $+2 loc_A11CD: mov rax, [rbp+var_10] cmp rax, [rbp+var_28] jz short loc_A11E8 mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_30] call _memcpy loc_A11E8: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_30] mov rcx, [rbp+var_10] add rcx, [rbp+var_18] mov eax, [rbp+var_1C] sub rax, [rbp+var_30] mov r8d, eax mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+40h+var_40], 0 call my_strxfrm_pad_desc_and_reverse_nopad add rsp, 40h pop rbp retn
long long my_strnxfrm_8bit_nopad_bin( int a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, int a7) { unsigned long long v8; // [rsp+10h] [rbp-30h] int v10; // [rsp+28h] [rbp-18h] v10 = a3; v8 = a6; if ( a6 > a3 ) v8 = a3; if ( v8 > a4 ) v8 = a4; if ( a2 != a5 ) memcpy(a2, a5, v8); return my_strxfrm_pad_desc_and_reverse_nopad(a1, a2, (int)v8 + (int)a2, v10 + (int)a2, a4 - (unsigned int)v8, a7, 0); }
my_strnxfrm_8bit_nopad_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x18] JBE 0x001a11b4 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_001a11b4: JMP 0x001a11b6 LAB_001a11b6: JMP 0x001a11b8 LAB_001a11b8: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x1c] CMP RAX,RCX JBE 0x001a11cb MOV EAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x30],RAX LAB_001a11cb: JMP 0x001a11cd LAB_001a11cd: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x28] JZ 0x001a11e8 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001292d0 LAB_001a11e8: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] SUB RAX,qword ptr [RBP + -0x30] MOV R8D,EAX MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x001ace20 ADD RSP,0x40 POP RBP RET
void my_strnxfrm_8bit_nopad_bin (int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 local_38; local_38 = param_6; if (param_3 < param_6) { local_38 = param_3; } if (param_4 < local_38) { local_38 = (ulong)param_4; } if (param_2 != param_5) { memcpy(param_2,param_5,local_38); } my_strxfrm_pad_desc_and_reverse_nopad (param_1,param_2,(long)param_2 + local_38,(long)param_2 + param_3, param_4 - (int)local_38,param_7,0); return; }
53,066
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const
monkey531[P]llama/common/json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O1
cpp
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x5ed7f testq %rax, %rax je 0x5eddd movzbl (%rax), %eax cmpl $0x2, %eax je 0x5ed5f cmpl $0x1, %eax jne 0x5ed69 movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x5ed71 movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x5ed71 movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b460 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x9102b(%rip), %rsi # 0xefdc7 leaq 0x91054(%rip), %rdx # 0xefdf7 leaq 0x8(%rsp), %rdi callq 0x22ba6 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x5ee36 xorl %ebp, %ebp leaq 0xce10a(%rip), %rsi # 0x12ced8 leaq -0x399d(%rip), %rdx # 0x5b438 movq %rbx, %rdi callq 0x1bf30 leaq 0x8ffe5(%rip), %rdi # 0xeedc9 leaq 0x8a41f(%rip), %rdx # 0xe920a leaq 0x952ab(%rip), %rcx # 0xf409d movl $0x3422, %esi # imm = 0x3422 xorl %eax, %eax callq 0x1bec0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x5ee20 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x5ee20 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x5ee2d movq %rbx, %rdi callq 0x1b690 movq %r14, %rdi callq 0x1bfd0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_5ED7F test rax, rax jz loc_5EDDD movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_5ED5F cmp eax, 1 jnz short loc_5ED69 mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_5ED71 loc_5ED5F: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_5ED71 loc_5ED69: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_5ED71: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_5ED7F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdx, aCannotCompareI+30h; "" lea rdi, [rsp+48h+var_40] 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 rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_5EDDD: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3422h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_5EE20 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5EE20 mov r14, rax mov bpl, 1 loc_5EE20: test bpl, bpl jz short loc_5EE2D mov rdi, rbx; void * call ___cxa_free_exception loc_5EE2D: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RSI] JNZ 0x0015ed7f TEST RAX,RAX JZ 0x0015eddd MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0015ed5f CMP EAX,0x1 JNZ 0x0015ed69 MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0015ed71 LAB_0015ed5f: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x0015ed71 LAB_0015ed69: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_0015ed71: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0015ed7f: MOV EDI,0x20 CALL 0x0011b460 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0015ed95: LEA RSI,[0x1efdc7] LEA RDX,[0x1efdf7] LEA RDI,[RSP + 0x8] CALL 0x00122ba6 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0015edb3: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x0015ee36 XOR EBP,EBP LEA RSI,[0x22ced8] LEA RDX,[0x15b438] MOV RDI,RBX CALL 0x0011bf30 LAB_0015eddd: LEA RDI,[0x1eedc9] LEA RDX,[0x1e920a] LEA RCX,[0x1f409d] MOV ESI,0x3422 XOR EAX,EAX CALL 0x0011bec0
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (int8 *param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; pcVar1 = (char *)*param_1; if (pcVar1 != (char *)*param_2) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 0015ed95 to 0015edac has its CatchHandler @ 0015ee1a */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 0015edb3 to 0015eddc has its CatchHandler @ 0015edfe */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (pcVar1 != (char *)0x0) { if (*pcVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (*pcVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3422, "GGML_ASSERT(%s) failed","m_object != nullptr"); }
53,067
evmone::instr::core::returncode(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline TermResult returncode( StackTop stack, int64_t gas_left, ExecutionState& state, code_iterator pos) noexcept { const auto& offset = stack[0]; const auto& size = stack[1]; if (!check_memory(gas_left, state.memory, offset, size)) return {EVMC_OUT_OF_GAS, gas_left}; const auto deploy_container_index = size_t{pos[1]}; bytes deploy_container{state.analysis.baseline->eof_header().get_container( state.original_code, deploy_container_index)}; // Append (offset, size) to data section if (!append_data_section(deploy_container, {&state.memory[static_cast<size_t>(offset)], static_cast<size_t>(size)})) return {EVMC_OUT_OF_GAS, gas_left}; state.deploy_container = std::move(deploy_container); return {EVMC_SUCCESS, gas_left}; }
O2
cpp
evmone::instr::core::returncode(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r12 movq %rdx, %rbx movq %rdi, %r14 leaq 0x10(%rsp), %rdi movq %rsi, (%rdi) leaq -0x20(%r14), %rcx leaq 0x8(%rdx), %r15 movq %r15, %rsi movq %r14, %rdx callq 0x3b250 testb %al, %al je 0x3d672 movzbl 0x1(%r12), %ecx movq 0x1f8(%rbx), %rdi addq $0x48, %rdi movq 0x68(%rbx), %rsi movq 0x70(%rbx), %rdx callq 0x3d6a8 leaq 0x38(%rsp), %rsi movq %rax, (%rsi) movq %rdx, 0x8(%rsi) leaq 0x18(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x3d70a movq (%r15), %rdx addq (%r14), %rdx movq -0x20(%r14), %rsi leaq 0x18(%rsp), %rdi callq 0x3dea2 testb %al, %al je 0x3d67c addq $0x90, %rbx leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x3d724 xorl %ebx, %ebx jmp 0x3d67f pushq $0x3 popq %rbx movq 0x10(%rsp), %r14 jmp 0x3d68e pushq $0x3 popq %rbx movq 0x10(%rsp), %r14 leaq 0x18(%rsp), %rdi callq 0x2efda movl %ebx, %eax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rdi callq 0x2e859 nop
_ZN6evmone5instr4core10returncodeENS_8StackTopElRNS_14ExecutionStateEPKh: push r15 push r14 push r12 push rbx sub rsp, 48h mov r12, rcx mov rbx, rdx mov r14, rdi lea rdi, [rsp+68h+var_58] mov [rdi], rsi lea rcx, [r14-20h] lea r15, [rdx+8] mov rsi, r15 mov rdx, r14 call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&) test al, al jz short loc_3D672 movzx ecx, byte ptr [r12+1] mov rdi, [rbx+1F8h] add rdi, 48h ; 'H' mov rsi, [rbx+68h] mov rdx, [rbx+70h] call _ZNK6evmone10EOF1Header13get_containerESt17basic_string_viewIhN4evmc11byte_traitsIhEEEm; evmone::EOF1Header::get_container(std::basic_string_view<uchar,evmc::byte_traits<uchar>>,ulong) lea rsi, [rsp+68h+var_30] mov [rsi], rax mov [rsi+8], rdx lea rdi, [rsp+68h+var_50] lea rdx, [rsp+68h+var_59] call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEC2ISt17basic_string_viewIhS3_EvEERKT_RKS4_; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::basic_string<std::basic_string_view<uchar,evmc::byte_traits<uchar>>,void>(std::basic_string_view<uchar,evmc::byte_traits<uchar>> const&,std::allocator<uchar> const&) mov rdx, [r15] add rdx, [r14] mov rsi, [r14-20h] lea rdi, [rsp+68h+var_50] call _ZN6evmone19append_data_sectionERNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEESt17basic_string_viewIhS4_E; evmone::append_data_section(std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>> &,std::basic_string_view<uchar,evmc::byte_traits<uchar>>) test al, al jz short loc_3D67C add rbx, 90h lea rsi, [rsp+68h+var_50] mov rdi, rbx call _ZNSt8optionalINSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEEEaSIS6_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS7_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEESA_ISt6__and_IJSt9is_scalarIS6_ESB_IS6_NSt5decayISE_E4typeEEEEESt16is_constructibleIS6_JSE_EESt13is_assignableIRS6_SE_EEERS7_E4typeEOSE_ xor ebx, ebx jmp short loc_3D67F loc_3D672: push 3 pop rbx mov r14, [rsp+68h+var_58] jmp short loc_3D68E loc_3D67C: push 3 pop rbx loc_3D67F: mov r14, [rsp+68h+var_58] lea rdi, [rsp+68h+var_50] call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEED2Ev; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::~basic_string() loc_3D68E: mov eax, ebx mov rdx, r14 add rsp, 48h pop rbx pop r12 pop r14 pop r15 retn mov rdi, rax call __clang_call_terminate
long long evmone::instr::core::returncode(_QWORD *a1, long long a2, _QWORD *a3, long long a4) { _QWORD *v6; // r15 long long v7; // rdx unsigned int v8; // ebx char v10; // [rsp+Fh] [rbp-59h] BYREF long long v11; // [rsp+10h] [rbp-58h] BYREF _BYTE v12[32]; // [rsp+18h] [rbp-50h] BYREF _QWORD v13[6]; // [rsp+38h] [rbp-30h] BYREF v11 = a2; v6 = a3 + 1; if ( evmone::check_memory((long long)&v11, (long long)(a3 + 1), (long long)a1, a1 - 4) ) { v13[0] = evmone::EOF1Header::get_container(a3[63] + 72LL, a3[13], a3[14], *(unsigned __int8 *)(a4 + 1)); v13[1] = v7; std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::basic_string<std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>,void>( v12, v13, &v10); if ( (unsigned __int8)evmone::append_data_section(v12, *(a1 - 4), *a1 + *v6) ) { std::optional<std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>>::operator=<std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>>( a3 + 18, v12); v8 = 0; } else { v8 = 3; } std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::~basic_string(); } else { return 3; } return v8; }
returncode: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R12,RCX MOV RBX,RDX MOV R14,RDI LEA RDI,[RSP + 0x10] MOV qword ptr [RDI],RSI LEA RCX,[R14 + -0x20] LEA R15,[RDX + 0x8] MOV RSI,R15 MOV RDX,R14 CALL 0x0013b250 TEST AL,AL JZ 0x0013d672 MOVZX ECX,byte ptr [R12 + 0x1] MOV RDI,qword ptr [RBX + 0x1f8] ADD RDI,0x48 MOV RSI,qword ptr [RBX + 0x68] MOV RDX,qword ptr [RBX + 0x70] CALL 0x0013d6a8 LEA RSI,[RSP + 0x38] MOV qword ptr [RSI],RAX MOV qword ptr [RSI + 0x8],RDX LAB_0013d633: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0xf] CALL 0x0013d70a MOV RDX,qword ptr [R15] ADD RDX,qword ptr [R14] MOV RSI,qword ptr [R14 + -0x20] LEA RDI,[RSP + 0x18] CALL 0x0013dea2 TEST AL,AL JZ 0x0013d67c ADD RBX,0x90 LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x0013d724 XOR EBX,EBX JMP 0x0013d67f LAB_0013d672: PUSH 0x3 POP RBX MOV R14,qword ptr [RSP + 0x10] JMP 0x0013d68e LAB_0013d67c: PUSH 0x3 POP RBX LAB_0013d67f: MOV R14,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x18] CALL 0x0012efda LAB_0013d68e: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET
/* evmone::instr::core::returncode(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*) */ int1 [16] evmone::instr::core::returncode(uint *param_1,long param_2,long param_3,long param_4) { long lVar1; char cVar2; int8 uVar3; int1 auVar4 [16]; long local_58; evmone local_50 [32]; allocator local_30 [16]; local_58 = param_2; cVar2 = check_memory(&local_58,(Memory *)(param_3 + 8),param_1,param_1 + -0x20); if (cVar2 == '\0') { uVar3 = 3; } else { local_30 = (allocator [16]) EOF1Header::get_container (*(long *)(param_3 + 0x1f8) + 0x48,*(int8 *)(param_3 + 0x68), *(int8 *)(param_3 + 0x70),*(int1 *)(param_4 + 1)); /* try { // try from 0013d633 to 0013d655 has its CatchHandler @ 0013d69f */ std::__cxx11:: basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>:: basic_string<std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>,void> (local_50,local_30); cVar2 = append_data_section(local_50,*(int8 *)(param_1 + -0x20), *(long *)(param_3 + 8) + *(long *)param_1); if (cVar2 == '\0') { uVar3 = 3; } else { std:: optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>> ::operator=((optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>> *)(param_3 + 0x90),(basic_string *)local_50); uVar3 = 0; } lVar1 = local_58; std::__cxx11:: basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>:: ~basic_string((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>> *)local_50); local_58 = lVar1; } auVar4._8_8_ = local_58; auVar4._0_8_ = uVar3; return auVar4; }
53,068
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const: subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xbc970 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x16f0e8 jmp 0x16f1c4 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x5b6d0 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xc3740 movq %rax, 0x90(%rsp) leaq 0xadd0f(%rip), %rsi # 0x21ce27 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x176c40 jmp 0x16f12f movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0x11fa60 jmp 0x16f14d movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x13ec27(%rip), %rsi # 0x2add88 leaq -0xab978(%rip), %rdx # 0xc37f0 callq 0x5bb60 jmp 0x16f341 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x16f1a9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x5c608 testb $0x1, 0x83(%rsp) jne 0x16f1b5 jmp 0x16f1bf movq 0x18(%rsp), %rdi callq 0x5bff0 jmp 0x16f334 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x178b60 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xc2170 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xc3110 testb $0x1, %al jne 0x16f20d jmp 0x16f31e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x5b6d0 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x5c150 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x651c0 jmp 0x16f252 leaq 0xadbfe(%rip), %rsi # 0x21ce57 leaq 0xadbfd(%rip), %rcx # 0x21ce5d leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x177e60 jmp 0x16f271 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0x178d50 jmp 0x16f28b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x13ea6d(%rip), %rsi # 0x2add08 leaq -0xb37d2(%rip), %rdx # 0xbbad0 callq 0x5bb60 jmp 0x16f341 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x16f300 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x16f2f6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x5c608 leaq 0x30(%rsp), %rdi callq 0x5c608 leaq 0x2f(%rsp), %rdi callq 0x5c5e0 testb $0x1, 0x2e(%rsp) jne 0x16f313 jmp 0x16f31c movq (%rsp), %rdi callq 0x5bff0 jmp 0x16f334 leaq 0x78(%rsp), %rdi callq 0xc3310 addq $0x20, %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x5bc20 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_16F0E8 jmp loc_16F1C4 loc_16F0E8: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char 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) mov qword ptr [rsp+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) jmp short $+2 loc_16F12F: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_16F14D: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_16F341 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_16F1A9 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16F1A9: test [rsp+arg_7B], 1 jnz short loc_16F1B5 jmp short loc_16F1BF loc_16F1B5: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_16F1BF: jmp loc_16F334 loc_16F1C4: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<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>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<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>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_16F20D jmp loc_16F31E loc_16F20D: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_16F252: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_16F271: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_16F28B: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_16F341 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_16F300 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_16F2F6 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16F2F6: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16F300: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_16F313 jmp short loc_16F31C loc_16F313: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_16F31C: jmp short loc_16F334 loc_16F31E: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<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->(void) add rax, 20h ; ' ' add rsp, 0C8h retn loc_16F334: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_16F341: nop word ptr [rax+rax+00000000h] nop dword ptr [rax+rax+00h]
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { int v2; // ecx int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d int v8; // [rsp+0h] [rbp-C8h] void *v9; // [rsp+0h] [rbp-C8h] int v10; // [rsp+0h] [rbp-C8h] void *v11; // [rsp+0h] [rbp-C8h] void *v12; // [rsp+8h] [rbp-C0h] long long v13; // [rsp+8h] [rbp-C0h] int v14; // [rsp+8h] [rbp-C0h] int v15; // [rsp+10h] [rbp-B8h] int v16; // [rsp+10h] [rbp-B8h] int v17; // [rsp+18h] [rbp-B0h] void *exception; // [rsp+18h] [rbp-B0h] nlohmann::json_abi_v3_11_3::detail::type_error *v19; // [rsp+18h] [rbp-B0h] char v20; // [rsp+18h] [rbp-B0h] int v21; // [rsp+20h] [rbp-A8h] int v22; // [rsp+28h] [rbp-A0h] char v23; // [rsp+2Fh] [rbp-99h] BYREF int v24[4]; // [rsp+30h] [rbp-98h] BYREF long long v25; // [rsp+40h] [rbp-88h] int v26; // [rsp+48h] [rbp-80h] int v27[8]; // [rsp+50h] [rbp-78h] BYREF char v28[8]; // [rsp+70h] [rbp-58h] BYREF int v29[2]; // [rsp+78h] [rbp-50h] BYREF int v30; // [rsp+80h] [rbp-48h] int v31; // [rsp+88h] [rbp-40h] char v32[8]; // [rsp+90h] [rbp-38h] BYREF int v33[8]; // [rsp+98h] [rbp-30h] BYREF int v34[2]; // [rsp+B8h] [rbp-10h] long long v35; // [rsp+C0h] [rbp-8h] v35 = a1; *(_QWORD *)v34 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v32 = 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((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (int)v33, (int)"cannot use at() with ", (int)v32, v2, v3, v4, v8, v12, v15, (long long)exception); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v19, 304, (long long)v33, a1); HIBYTE(v30) = 0; __cxa_throw( v19, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } *(_QWORD *)v29 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(_QWORD *)v34); *(_QWORD *)v28 = std::vector<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>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<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>>>>( (long long)v29, (long long)v28) ) { v9 = __cxa_allocate_exception(0x20uLL); v13 = *(_QWORD *)v34; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v24, v13, (long long)&v23); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (int)v27, (int)"key '", (int)v24, (int)"' not found", v5, v6, v9, v13, (int)&v23, v17, a1); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v10, v10, v14, v16, v20, v21, v22, v24[0], v24[2], v25, v26, v27[0], v27[2], v27[4], v27[6], v28[0], v29[0], v30, v31, v32[0]); __cxa_throw( v11, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<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->((long long)v29) + 32; }
size: MOV qword ptr [RSP + -0x8],RDI MOV RCX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX] SUB RAX,RCX SAR RAX,0x2 RET
/* std::vector<common_sampler_type, std::allocator<common_sampler_type> >::size() const */ long __thiscall std::vector<common_sampler_type,std::allocator<common_sampler_type>>::size (vector<common_sampler_type,std::allocator<common_sampler_type>> *this) { return *(long *)(this + 8) - *(long *)this >> 2; }
53,069
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xb1368 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xb134d movq %rbx, %rdi movq %r15, %rsi callq 0x1b230 testl %eax, %eax je 0xb134a addq $0x30, %rbx jmp 0xb132b movq %rbx, %rax movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0xb13c4 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b460 movq %rax, %rbx movq %r14, %rdi callq 0x633e2 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x460bc(%rip), %rsi # 0xf7448 movq %rsp, %rdi callq 0xb020f movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x8b74a xorl %ebp, %ebp leaq 0x7fb55(%rip), %rsi # 0x130f08 leaq -0x51e96(%rip), %rdx # 0x5f524 movq %rbx, %rdi callq 0x1bfb0 jmp 0xb143d movl $0x20, %edi callq 0x1b460 movq %rax, %rbx leaq 0x30(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1b400 leaq (%rax,%r15), %rdx leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x24db0 leaq 0x4607d(%rip), %rsi # 0xf7478 leaq 0x4607c(%rip), %rcx # 0xf747e movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0xb0818 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0xb0b92 xorl %ebp, %ebp leaq 0x7fa5a(%rip), %rsi # 0x130e88 leaq -0x51f11(%rip), %rdx # 0x5f524 movq %rbx, %rdi callq 0x1bfb0 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb1463 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xb1463 movq %rax, %r14 movb $0x1, %bpl movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xb149c movq 0x30(%rsp), %rsi jmp 0xb148c jmp 0xb1496 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb149c movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xb149c movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xb14a9 movq %rbx, %rdi callq 0x1b6a0 movq %r14, %rdi callq 0x1c030 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_B1368 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] loc_B132B: mov rax, [r12+8] cmp rbx, rax jz short loc_B134D mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_B134A add rbx, 30h ; '0' jmp short loc_B132B loc_B134A: mov rax, rbx loc_B134D: mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_B13C4 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_B1368: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_48] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_B143D loc_B13C4: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_38] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] lea rdi, [rsp+68h+var_48] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" mov rdi, rsp lea rdx, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B143D: mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B1463 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B1463 mov r14, rax mov bpl, 1 loc_B1463: mov rdi, [rsp+68h+var_48] cmp rdi, r12 jz short loc_B149C mov rsi, [rsp+68h+var_38] jmp short loc_B148C jmp short loc_B1496 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B149C mov rsi, [rsp+68h+var_58] loc_B148C: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B149C loc_B1496: mov r14, rax mov bpl, 1 loc_B149C: test bpl, bpl jz short loc_B14A9 mov rdi, rbx; void * call ___cxa_free_exception loc_B14A9: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long i; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax _QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF long long v11; // [rsp+30h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = 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(&)[22],char const*>( (long long)v9, (long long)"cannot use at() with ", v10); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 304, v9); __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); } v2 = *(long long **)(a1 + 8); for ( i = *v2; ; i += 48LL ) { v4 = v2[1]; if ( i == v4 ) break; if ( !(unsigned int)std::string::compare(i, a2) ) { v4 = i; break; } } if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = &v11; v8 = strlen(a2); std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v9, (long long)"key '", v10, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v7, 403, v9); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001b1368 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] LAB_001b132b: MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001b134d MOV RDI,RBX MOV RSI,R15 CALL 0x0011b230 TEST EAX,EAX JZ 0x001b134a ADD RBX,0x30 JMP 0x001b132b LAB_001b134a: MOV RAX,RBX LAB_001b134d: MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x001b13c4 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001b1368: MOV EDI,0x20 CALL 0x0011b460 MOV RBX,RAX MOV RDI,R14 CALL 0x001633e2 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001b1385: LEA RSI,[0x1f7448] MOV RDI,RSP CALL 0x001b020f MOV BPL,0x1 LAB_001b1397: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0018b74a XOR EBP,EBP LEA RSI,[0x230f08] LEA RDX,[0x15f524] MOV RDI,RBX CALL 0x0011bfb0 LAB_001b13c4: MOV EDI,0x20 CALL 0x0011b460 MOV RBX,RAX LEA R12,[RSP + 0x30] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011b400 LEA RDX,[RAX + R15*0x1] LAB_001b13e7: LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x00124db0 LAB_001b13f4: LEA RSI,[0x1f7478] LEA RCX,[0x1f747e] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001b0818 MOV BPL,0x1 LAB_001b1412: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001b0b92 XOR EBP,EBP LEA RSI,[0x230e88] LEA RDX,[0x15f524] MOV RDI,RBX CALL 0x0011bfb0
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { int8 *puVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; detail adStack_68 [32]; char *local_48 [2]; char local_38 [16]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = (char *)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> ::type_name(param_1); /* try { // try from 001b1385 to 001b1393 has its CatchHandler @ 001b1496 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (adStack_68,"cannot use at() with ",local_48); /* try { // try from 001b1397 to 001b13c1 has its CatchHandler @ 001b1476 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } puVar1 = *(int8 **)(param_1 + 8); pcVar6 = (char *)*puVar1; while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 && (iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) { pcVar6 = pcVar6 + 0x30; } if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = local_38; sVar5 = strlen(param_2); /* try { // try from 001b13e7 to 001b13f3 has its CatchHandler @ 001b1474 */ std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5); /* try { // try from 001b13f4 to 001b140e has its CatchHandler @ 001b145d */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (adStack_68,"key \'",(string *)local_48,"\' not found"); /* try { // try from 001b1412 to 001b143c has its CatchHandler @ 001b143d */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
53,070
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xb0be9 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xb0bd3 movq %rbx, %rdi movq %r15, %rsi callq 0x1b230 testl %eax, %eax je 0xb0bc8 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0xb0ba9 jmp 0xb0bcb movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0xb0c47 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b460 movq %rax, %rbx movq %r14, %rdi callq 0x63c4a movq %rsp, %rdx movq %rax, (%rdx) leaq 0x4482d(%rip), %rsi # 0xf5438 leaq 0x20(%rsp), %rdi callq 0xafab5 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x8b41a xorl %ebp, %ebp leaq 0x7e312(%rip), %rsi # 0x12ef48 leaq -0x50dbd(%rip), %rdx # 0x5fe80 movq %rbx, %rdi callq 0x1bfb0 jmp 0xb0cc0 movl $0x20, %edi callq 0x1b460 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1b400 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x24db4 leaq 0x447ec(%rip), %rsi # 0xf5468 leaq 0x447eb(%rip), %rcx # 0xf546e leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xb0092 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0xb040a xorl %ebp, %ebp leaq 0x7e217(%rip), %rsi # 0x12eec8 leaq -0x50e38(%rip), %rdx # 0x5fe80 movq %rbx, %rdi callq 0x1bfb0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0cde movq 0x30(%rsp), %rsi incq %rsi callq 0x1b910 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb0d29 movq 0x10(%rsp), %rsi jmp 0xb0d21 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb0d33 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xb0d33 jmp 0xb0d30 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0d29 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b910 testb %bpl, %bpl jne 0xb0d33 jmp 0xb0d3b movq %rax, %r14 movq %rbx, %rdi callq 0x1b6a0 movq %r14, %rdi callq 0x1c030 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_B0BE9 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_B0BD3 loc_B0BA9: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_B0BC8 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_B0BA9 jmp short loc_B0BCB loc_B0BC8: mov rax, rbx loc_B0BCB: mov rcx, [r14+8] mov rbx, [rcx+8] loc_B0BD3: cmp rax, rbx jz short loc_B0C47 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_B0BE9: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_B0CC0 loc_B0C47: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B0CC0: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0CDE mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0CDE: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_B0D29 mov rsi, [rsp+68h+var_58] jmp short loc_B0D21 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_B0D33 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B0D33 jmp short loc_B0D30 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0D29 mov rsi, [rsp+68h+var_38] loc_B0D21: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0D29: test bpl, bpl jnz short loc_B0D33 jmp short loc_B0D3B loc_B0D30: mov r14, rax loc_B0D33: mov rdi, rbx; void * call ___cxa_free_exception loc_B0D3B: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax void *v9[2]; // [rsp+0h] [rbp-68h] BYREF long long v10; // [rsp+10h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = (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>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v11, (long long)"cannot use at() with ", v9); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 304, v11); __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); } v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) goto LABEL_7; } v4 = v3; LABEL_7: v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } if ( v4 == v3 ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = &v10; v8 = strlen(a2); std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v11, (long long)"key '", v9, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v7, 403, v11); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001b0be9 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001b0bd3 LAB_001b0ba9: MOV RDI,RBX MOV RSI,R15 CALL 0x0011b230 TEST EAX,EAX JZ 0x001b0bc8 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001b0ba9 JMP 0x001b0bcb LAB_001b0bc8: MOV RAX,RBX LAB_001b0bcb: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_001b0bd3: CMP RAX,RBX JZ 0x001b0c47 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001b0be9: MOV EDI,0x20 CALL 0x0011b460 MOV RBX,RAX MOV RDI,R14 CALL 0x00163c4a MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_001b0c04: LEA RSI,[0x1f5438] LEA RDI,[RSP + 0x20] CALL 0x001afab5 MOV BPL,0x1 LAB_001b0c18: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0018b41a XOR EBP,EBP LEA RSI,[0x22ef48] LEA RDX,[0x15fe80] MOV RDI,RBX CALL 0x0011bfb0 LAB_001b0c47: MOV EDI,0x20 CALL 0x0011b460 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011b400 LEA RDX,[RAX + R15*0x1] LAB_001b0c6a: MOV RDI,RSP MOV RSI,R15 CALL 0x00124db4 LAB_001b0c75: LEA RSI,[0x1f5468] LEA RCX,[0x1f546e] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001b0092 MOV BPL,0x1 LAB_001b0c93: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001b040a XOR EBP,EBP LEA RSI,[0x22eec8] LEA RDX,[0x15fe80] MOV RDI,RBX CALL 0x0011bfb0
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)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> ::type_name(param_1); /* try { // try from 001b0c04 to 001b0c14 has its CatchHandler @ 001b0d30 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 001b0c18 to 001b0c44 has its CatchHandler @ 001b0d0b */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001b0c6a to 001b0c74 has its CatchHandler @ 001b0d09 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001b0c75 to 001b0c8f has its CatchHandler @ 001b0cee */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001b0c93 to 001b0cbf has its CatchHandler @ 001b0cc0 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
53,071
to_printable_8bit
eloqsql/strings/ctype.c
static uint to_printable_8bit(uchar *dst, my_wc_t wc, uint bs) { /* This function is used only in context of error messages for now. All non-BMP characters are currently replaced to question marks when a message is put into diagnostics area. */ DBUG_ASSERT(wc < 0x10000); *dst++= (char) bs; *dst++= _dig_vec_upper[(wc >> 12) & 0x0F]; *dst++= _dig_vec_upper[(wc >> 8) & 0x0F]; *dst++= _dig_vec_upper[(wc >> 4) & 0x0F]; *dst++= _dig_vec_upper[wc & 0x0F]; return MY_CS_PRINTABLE_CHAR_LENGTH; }
O0
c
to_printable_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) jmp 0x6d461 movl -0x14(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0xc, %rcx andq $0xf, %rcx leaq 0x148b96(%rip), %rax # 0x1b6020 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0x8, %rcx andq $0xf, %rcx leaq 0x148b6f(%rip), %rax # 0x1b6020 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0x4, %rcx andq $0xf, %rcx leaq 0x148b48(%rip), %rax # 0x1b6020 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx andq $0xf, %rcx leaq 0x148b25(%rip), %rax # 0x1b6020 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movl $0x5, %eax popq %rbp retq nopw %cs:(%rax,%rax)
to_printable_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx jmp short $+2 loc_6D461: mov eax, [rbp+var_14] mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 0Ch and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 8 and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 4 and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov eax, 5 pop rbp retn
long long to_printable_8bit(_BYTE *a1, unsigned long long a2, char a3) { *a1 = a3; a1[1] = dig_vec_upper[(unsigned __int16)a2 >> 12]; a1[2] = dig_vec_upper[(a2 >> 8) & 0xF]; a1[3] = dig_vec_upper[(unsigned __int8)a2 >> 4]; a1[4] = dig_vec_upper[a2 & 0xF]; return 5LL; }
to_printable_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX JMP 0x0016d461 LAB_0016d461: MOV EAX,dword ptr [RBP + -0x14] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0xc AND RCX,0xf LEA RAX,[0x2b6020] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x8 AND RCX,0xf LEA RAX,[0x2b6020] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x4 AND RCX,0xf LEA RAX,[0x2b6020] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] AND RCX,0xf LEA RAX,[0x2b6020] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV EAX,0x5 POP RBP RET
int8 to_printable_8bit(int1 *param_1,ulong param_2,int1 param_3) { *param_1 = param_3; param_1[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 0xc & 0xf]; param_1[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 8 & 0xf]; param_1[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 4 & 0xf]; param_1[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 & 0xf]; return 5; }
53,072
bf_log_internal
bluesky950520[P]quickjs/libbf.c
static int bf_log_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; bf_t U_s, *U = &U_s; bf_t V_s, *V = &V_s; slimb_t n, prec1, l, i, K; assert(r != a); bf_init(s, T); /* argument reduction 1 */ /* T=a*2^n with 2/3 <= T <= 4/3 */ { bf_t U_s, *U = &U_s; bf_set(T, a); n = T->expn; T->expn = 0; /* U= ~ 2/3 */ bf_init(s, U); bf_set_ui(U, 0xaaaaaaaa); U->expn = 0; if (bf_cmp_lt(T, U)) { T->expn++; n--; } bf_delete(U); } // printf("n=%ld\n", n); // bf_print_str("T", T); /* XXX: precision analysis */ /* number of iterations for argument reduction 2 */ K = bf_isqrt((prec + 1) / 2); /* order of Taylor expansion */ l = prec / (2 * K) + 1; /* precision of the intermediate computations */ prec1 = prec + K + 2 * l + 32; bf_init(s, U); bf_init(s, V); /* Note: cancellation occurs here, so we use more precision (XXX: reduce the precision by computing the exact cancellation) */ bf_add_si(T, T, -1, BF_PREC_INF, BF_RNDN); /* argument reduction 2 */ for(i = 0; i < K; i++) { /* T = T / (1 + sqrt(1 + T)) */ bf_add_si(U, T, 1, prec1, BF_RNDN); bf_sqrt(V, U, prec1, BF_RNDF); bf_add_si(U, V, 1, prec1, BF_RNDN); bf_div(T, T, U, prec1, BF_RNDN); } { bf_t Y_s, *Y = &Y_s; bf_t Y2_s, *Y2 = &Y2_s; bf_init(s, Y); bf_init(s, Y2); /* compute ln(1+x) = ln((1+y)/(1-y)) with y=x/(2+x) = y + y^3/3 + ... + y^(2*l + 1) / (2*l+1) with Y=Y^2 = y*(1+Y/3+Y^2/5+...) = y*(1+Y*(1/3+Y*(1/5 + ...))) */ bf_add_si(Y, T, 2, prec1, BF_RNDN); bf_div(Y, T, Y, prec1, BF_RNDN); bf_mul(Y2, Y, Y, prec1, BF_RNDN); bf_set_ui(r, 0); for(i = l; i >= 1; i--) { bf_set_ui(U, 1); bf_set_ui(V, 2 * i + 1); bf_div(U, U, V, prec1, BF_RNDN); bf_add(r, r, U, prec1, BF_RNDN); bf_mul(r, r, Y2, prec1, BF_RNDN); } bf_add_si(r, r, 1, prec1, BF_RNDN); bf_mul(r, r, Y, prec1, BF_RNDN); bf_delete(Y); bf_delete(Y2); } bf_delete(V); bf_delete(U); /* multiplication by 2 for the Taylor expansion and undo the argument reduction 2*/ bf_mul_2exp(r, K + 1, BF_PREC_INF, BF_RNDZ); /* undo the argument reduction 1 */ bf_const_log2(T, prec1, BF_RNDF); bf_mul_si(T, T, n, prec1, BF_RNDN); bf_add(r, r, T, prec1, BF_RNDN); bf_delete(T); return BF_ST_INEXACT; }
O1
c
bf_log_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rdx, (%rsp) movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000 movq %rdi, 0x40(%rsp) movq (%rdi), %r13 leaq 0x70(%rsp), %r14 movq %r13, (%r14) xorl %ebx, %ebx movl %ebx, 0x8(%r14) movq %rbp, 0x10(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r14) movq %r14, %rdi callq 0x84c8d movq 0x10(%r14), %r15 movq %rbx, 0x10(%r14) leaq 0x10(%rsp), %r12 movq %r13, 0x8(%rsp) movq %r13, (%r12) movl %ebx, 0x8(%r12) movq %rbp, 0x10(%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r12) movl $0xaaaaaaaa, %esi # imm = 0xAAAAAAAA movq %r12, %rdi callq 0x84abb movq %rbx, 0x10(%r12) movq %r14, %rdi movq %r12, %rsi callq 0x854f5 testl %eax, %eax jns 0x8b390 incq 0x80(%rsp) decq %r15 movq 0x10(%rsp), %rax testq %rax, %rax movq (%rsp), %r13 je 0x8b3b0 movq 0x30(%rsp), %rsi testq %rsi, %rsi je 0x8b3b0 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) leaq 0x1(%r13), %rsi xorl %r12d, %r12d cmpq $0x2, %rsi movq %r15, 0x38(%rsp) jae 0x8b3c6 xorl %ebx, %ebx jmp 0x8b3f0 shrq %rsi bsrq %rsi, %r14 xorq $0x3f, %r14 movl %r14d, %ecx andb $0x3e, %cl shlq %cl, %rsi leaq 0x10(%rsp), %rdi callq 0x8712d movq %rax, %rbx shrl %r14d movl %r14d, %ecx shrq %cl, %rbx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF leaq (%rbx,%rbx), %rsi movq %r13, %rax xorl %edx, %edx divq %rsi movq %rax, %rbp addq %rbx, %r13 leaq 0x22(,%rax,2), %r15 addq %r13, %r15 movq 0x8(%rsp), %rdx movq %rdx, 0x10(%rsp) movl %r12d, 0x18(%rsp) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x20(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rsp) movq %rdx, 0x48(%rsp) movl %r12d, 0x50(%rsp) movq %rax, 0x58(%rsp) movups %xmm0, 0x60(%rsp) leaq 0x70(%rsp), %rdi movq %rdi, %rsi movq $-0x1, %rdx xorl %r8d, %r8d callq 0x86f60 movq %rbx, (%rsp) testq %rbx, %rbx jle 0x8b4e3 leaq 0x10(%rsp), %r13 leaq 0x70(%rsp), %r14 leaq 0x48(%rsp), %r12 movq (%rsp), %rbx movl $0x1, %edx movq %r13, %rdi movq %r14, %rsi movq %r15, %rcx xorl %r8d, %r8d callq 0x86f60 movq %r12, %rdi movq %r13, %rsi movq %r15, %rdx movl $0x6, %ecx callq 0x87806 movl $0x1, %edx movq %r13, %rdi movq %r12, %rsi movq %r15, %rcx xorl %r8d, %r8d callq 0x86f60 movq %r14, %rdi movq %r14, %rsi movq %r13, %rdx movq %r15, %rcx xorl %r8d, %r8d leaq -0x38e6(%rip), %r9 # 0x87bf3 callq 0x87b3a decq %rbx jne 0x8b484 leaq 0xc0(%rsp), %r14 movq 0x8(%rsp), %rcx movq %rcx, (%r14) xorl %ebx, %ebx movl %ebx, 0x8(%r14) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r14) leaq 0x98(%rsp), %r12 movq %rcx, (%r12) movl %ebx, 0x8(%r12) movq %rax, 0x10(%r12) movups %xmm0, 0x18(%r12) leaq 0x70(%rsp), %r13 movl $0x2, %edx movq %r14, %rdi movq %r13, %rsi movq %r15, %rcx xorl %r8d, %r8d callq 0x86f60 leaq -0x395a(%rip), %r9 # 0x87bf3 movq %r14, %rdi movq %r13, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x87b3a movq %r12, %rdi movq %r14, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x86711 movq 0x40(%rsp), %rax movl %ebx, 0x8(%rax) movq %rax, %rbx movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%rbx) cmpq $0x0, 0x18(%rbx) je 0x8b5b0 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 decq %rax cmpq %rax, %rbp jae 0x8b64f incq %rbp leaq 0x10(%rsp), %r13 leaq 0x48(%rsp), %r14 leaq 0x98(%rsp), %r12 movl $0x1, %esi movq %r13, %rdi callq 0x84abb leaq 0x1(,%rbp,2), %rsi movq %r14, %rdi callq 0x84abb movq %r13, %rdi movq %r13, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d leaq -0x3a1b(%rip), %r9 # 0x87bf3 callq 0x87b3a movq %rbx, %rdi movq %rbx, %rsi movq %r13, %rdx movq %r15, %rcx xorl %r8d, %r8d leaq -0x3a55(%rip), %r9 # 0x87bd4 callq 0x87b3a movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x86711 leaq -0x1(%rbp), %rax cmpq $0x1, %rbp movq %rax, %rbp jg 0x8b5db movl $0x1, %edx movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rcx xorl %r8d, %r8d callq 0x86f60 leaq 0xc0(%rsp), %r14 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x86711 movq (%r14), %rax testq %rax, %rax je 0x8b69e movq 0xe0(%rsp), %rsi testq %rsi, %rsi je 0x8b69e movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x98(%rsp), %rax testq %rax, %rax movq 0x38(%rsp), %r12 je 0x8b6c5 movq 0xb8(%rsp), %rsi testq %rsi, %rsi je 0x8b6c5 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x48(%rsp), %rax testq %rax, %rax je 0x8b6e1 movq 0x68(%rsp), %rsi testq %rsi, %rsi je 0x8b6e1 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x10(%rsp), %rax testq %rax, %rax je 0x8b6fd movq 0x30(%rsp), %rsi testq %rsi, %rsi je 0x8b6fd movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x18(%rbx), %rcx testq %rcx, %rcx je 0x8b754 movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000 movq (%rsp), %rdx cmpq %rax, %rdx cmovgq %rdx, %rax movabsq $0x3ffffffffffffffe, %rdx # imm = 0x3FFFFFFFFFFFFFFE cmpq %rdx, %rax cmovgeq %rdx, %rax movq 0x10(%rbx), %rdx addq %rdx, %rax incq %rax movq %rax, 0x10(%rbx) movq %rbx, %rdi movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %edx xorl %r8d, %r8d callq 0x84e26 leaq 0x70(%rsp), %r14 movq (%r14), %rcx addq $0x10, %rcx leaq -0x102b(%rip), %r8 # 0x8a73c movq %r14, %rdi movq %r15, %rsi movl $0x6, %edx xorl %r9d, %r9d callq 0x8a640 movq %r14, %rdi movq %r14, %rsi movq %r12, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x87fdf leaq -0x3bc1(%rip), %r9 # 0x87bd4 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x87b3a movq (%r14), %rax testq %rax, %rax je 0x8b7c6 movq 0x90(%rsp), %rsi testq %rsi, %rsi je 0x8b7c6 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl $0x10, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_log_internal: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_118], rdx mov rbp, 8000000000000000h mov [rsp+118h+var_D8], rdi mov r13, [rdi] lea r14, [rsp+118h+var_A8] mov [r14], r13 xor ebx, ebx mov [r14+8], ebx mov [r14+10h], rbp xorps xmm0, xmm0 movups xmmword ptr [r14+18h], xmm0 mov rdi, r14 call bf_set mov r15, [r14+10h] mov [r14+10h], rbx lea r12, [rsp+118h+var_108] mov [rsp+118h+var_110], r13 mov [r12], r13 mov [r12+8], ebx mov [r12+10h], rbp xorps xmm0, xmm0 movups xmmword ptr [r12+18h], xmm0 mov esi, 0AAAAAAAAh mov rdi, r12 call bf_set_ui mov [r12+10h], rbx mov rdi, r14 mov rsi, r12 call bf_cmp test eax, eax jns short loc_8B390 inc [rsp+118h+var_98] dec r15 loc_8B390: mov rax, [rsp+118h+var_108] test rax, rax mov r13, [rsp+118h+var_118] jz short loc_8B3B0 mov rsi, [rsp+118h+var_E8] test rsi, rsi jz short loc_8B3B0 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8B3B0: lea rsi, [r13+1] xor r12d, r12d cmp rsi, 2 mov [rsp+118h+var_E0], r15 jnb short loc_8B3C6 xor ebx, ebx jmp short loc_8B3F0 loc_8B3C6: shr rsi, 1 bsr r14, rsi xor r14, 3Fh mov ecx, r14d and cl, 3Eh shl rsi, cl lea rdi, [rsp+118h+var_108] call mp_sqrtrem1 mov rbx, rax shr r14d, 1 mov ecx, r14d shr rbx, cl loc_8B3F0: mov rcx, 3FFFFFFFFFFFFFFFh lea rsi, [rbx+rbx] mov rax, r13 xor edx, edx div rsi mov rbp, rax add r13, rbx lea r15, ds:22h[rax*2] add r15, r13 mov rdx, [rsp+118h+var_110] mov [rsp+118h+var_108], rdx mov [rsp+118h+var_100], r12d mov rax, 8000000000000000h mov [rsp+118h+var_F8], rax xorps xmm0, xmm0 movups xmmword ptr [rsp+28h], xmm0 mov [rsp+118h+var_D0], rdx mov [rsp+118h+var_C8], r12d mov [rsp+118h+var_C0], rax movups [rsp+118h+var_B8], xmm0 lea rdi, [rsp+118h+var_A8] mov rsi, rdi mov rdx, 0FFFFFFFFFFFFFFFFh xor r8d, r8d call bf_add_si mov [rsp+118h+var_118], rbx test rbx, rbx jle short loc_8B4E3 lea r13, [rsp+118h+var_108] lea r14, [rsp+118h+var_A8] lea r12, [rsp+118h+var_D0] mov rbx, [rsp+118h+var_118] loc_8B484: mov edx, 1 mov rdi, r13 mov rsi, r14 mov rcx, r15 xor r8d, r8d call bf_add_si mov rdi, r12 mov rsi, r13 mov rdx, r15 mov ecx, 6 call bf_sqrt mov edx, 1 mov rdi, r13 mov rsi, r12 mov rcx, r15 xor r8d, r8d call bf_add_si mov rdi, r14 mov rsi, r14 mov rdx, r13 mov rcx, r15 xor r8d, r8d lea r9, __bf_div call bf_op2 dec rbx jnz short loc_8B484 loc_8B4E3: lea r14, [rsp+118h+var_58] mov rcx, [rsp+118h+var_110] mov [r14], rcx xor ebx, ebx mov [r14+8], ebx mov rax, 8000000000000000h mov [r14+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r14+18h], xmm0 lea r12, [rsp+118h+var_80] mov [r12], rcx mov [r12+8], ebx mov [r12+10h], rax movups xmmword ptr [r12+18h], xmm0 lea r13, [rsp+118h+var_A8] mov edx, 2 mov rdi, r14 mov rsi, r13 mov rcx, r15 xor r8d, r8d call bf_add_si lea r9, __bf_div mov rdi, r14 mov rsi, r13 mov rdx, r14 mov rcx, r15 xor r8d, r8d call bf_op2 mov rdi, r12 mov rsi, r14 mov rdx, r14 mov rcx, r15 xor r8d, r8d call bf_mul mov rax, [rsp+118h+var_D8] mov [rax+8], ebx mov rbx, rax mov rax, 8000000000000000h mov [rbx+10h], rax cmp qword ptr [rbx+18h], 0 jz short loc_8B5B0 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 [rbx+18h], 0 loc_8B5B0: mov rax, 8000000000000000h dec rax cmp rbp, rax jnb loc_8B64F inc rbp lea r13, [rsp+118h+var_108] lea r14, [rsp+118h+var_D0] lea r12, [rsp+118h+var_80] loc_8B5DB: mov esi, 1 mov rdi, r13 call bf_set_ui lea rsi, ds:1[rbp*2] mov rdi, r14 call bf_set_ui mov rdi, r13 mov rsi, r13 mov rdx, r14 mov rcx, r15 xor r8d, r8d lea r9, __bf_div call bf_op2 mov rdi, rbx mov rsi, rbx mov rdx, r13 mov rcx, r15 xor r8d, r8d lea r9, __bf_add call bf_op2 mov rdi, rbx mov rsi, rbx mov rdx, r12 mov rcx, r15 xor r8d, r8d call bf_mul lea rax, [rbp-1] cmp rbp, 1 mov rbp, rax jg short loc_8B5DB loc_8B64F: mov edx, 1 mov rdi, rbx mov rsi, rbx mov rcx, r15 xor r8d, r8d call bf_add_si lea r14, [rsp+118h+var_58] mov rdi, rbx mov rsi, rbx mov rdx, r14 mov rcx, r15 xor r8d, r8d call bf_mul mov rax, [r14] test rax, rax jz short loc_8B69E mov rsi, [rsp+118h+var_38] test rsi, rsi jz short loc_8B69E mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8B69E: mov rax, [rsp+118h+var_80] test rax, rax mov r12, [rsp+118h+var_E0] jz short loc_8B6C5 mov rsi, [rsp+118h+var_60] test rsi, rsi jz short loc_8B6C5 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8B6C5: mov rax, [rsp+118h+var_D0] test rax, rax jz short loc_8B6E1 mov rsi, qword ptr [rsp+118h+var_B8+8] test rsi, rsi jz short loc_8B6E1 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8B6E1: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_8B6FD mov rsi, [rsp+118h+var_E8] test rsi, rsi jz short loc_8B6FD mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8B6FD: mov rcx, [rbx+18h] test rcx, rcx jz short loc_8B754 mov rax, 0C000000000000000h mov rdx, [rsp+118h+var_118] cmp rdx, rax cmovg rax, rdx mov rdx, 3FFFFFFFFFFFFFFEh cmp rax, rdx cmovge rax, rdx mov rdx, [rbx+10h] add rax, rdx inc rax mov [rbx+10h], rax mov rdi, rbx mov rsi, 3FFFFFFFFFFFFFFFh mov edx, 1 xor r8d, r8d call __bf_round loc_8B754: lea r14, [rsp+118h+var_A8] mov rcx, [r14] add rcx, 10h lea r8, bf_const_log2_internal mov rdi, r14 mov rsi, r15 mov edx, 6 xor r9d, r9d call bf_const_get mov rdi, r14 mov rsi, r14 mov rdx, r12 mov rcx, r15 xor r8d, r8d call bf_mul_si lea r9, __bf_add mov rdi, rbx mov rsi, rbx mov rdx, r14 mov rcx, r15 xor r8d, r8d call bf_op2 mov rax, [r14] test rax, rax jz short loc_8B7C6 mov rsi, [rsp+118h+var_88] test rsi, rsi jz short loc_8B7C6 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8B7C6: mov eax, 10h add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_log_internal(_QWORD *a1, long long a2, unsigned long long a3) { long long v3; // r13 unsigned long long v4; // r15 signed long long v5; // rbx unsigned long long v6; // rsi unsigned long long v7; // r14 unsigned long long v8; // rbp long long v9; // r15 _QWORD *v10; // rax long long v11; // rbx long long v12; // rbp signed long long v14; // r12 unsigned long long v15; // rcx long long v16; // rax signed long long v19; // [rsp+0h] [rbp-118h] __int128 v20; // [rsp+10h] [rbp-108h] BYREF unsigned long long v21; // [rsp+20h] [rbp-F8h] __int128 v22; // [rsp+28h] [rbp-F0h] signed long long v23; // [rsp+38h] [rbp-E0h] _QWORD *v24; // [rsp+40h] [rbp-D8h] __int128 v25; // [rsp+48h] [rbp-D0h] BYREF unsigned long long v26; // [rsp+58h] [rbp-C0h] __int128 v27; // [rsp+60h] [rbp-B8h] __int128 v28; // [rsp+70h] [rbp-A8h] BYREF unsigned long long v29; // [rsp+80h] [rbp-98h] __int128 v30; // [rsp+88h] [rbp-90h] __int128 v31; // [rsp+98h] [rbp-80h] BYREF unsigned long long v32; // [rsp+A8h] [rbp-70h] __int128 v33; // [rsp+B0h] [rbp-68h] __int128 v34; // [rsp+C0h] [rbp-58h] BYREF unsigned long long v35; // [rsp+D0h] [rbp-48h] __int128 v36; // [rsp+D8h] [rbp-40h] v24 = a1; *(_QWORD *)&v28 = *a1; v3 = v28; DWORD2(v28) = 0; v29 = 0x8000000000000000LL; v30 = 0LL; bf_set(&v28, a2); v4 = v29; v29 = 0LL; *(_QWORD *)&v20 = v3; DWORD2(v20) = 0; v21 = 0x8000000000000000LL; v22 = 0LL; bf_set_ui((_QWORD **)&v20, 0xAAAAAAAAuLL); v21 = 0LL; if ( (int)bf_cmp((long long)&v28, (long long)&v20) < 0 ) { ++v29; --v4; } if ( (_QWORD)v20 && *((_QWORD *)&v22 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v20 + 8))(*(_QWORD *)v20, *((_QWORD *)&v22 + 1), 0LL); v23 = v4; if ( a3 + 1 >= 2 ) { v6 = (a3 + 1) >> 1; _BitScanReverse64(&v7, v6); v5 = mp_sqrtrem1(&v20, v6 << ((v7 ^ 0x3F) & 0x3E)) >> (((unsigned int)v7 ^ 0x3F) >> 1); } else { v5 = 0LL; } v8 = a3 / (2 * v5); v9 = v5 + a3 + 2 * v8 + 34; *(_QWORD *)&v20 = v3; DWORD2(v20) = 0; v21 = 0x8000000000000000LL; v22 = 0LL; *(_QWORD *)&v25 = v3; DWORD2(v25) = 0; v26 = 0x8000000000000000LL; v27 = 0LL; bf_add_si((long long *)&v28, (long long)&v28, -1LL, 0x3FFFFFFFFFFFFFFFLL, 0); v19 = v5; if ( v5 > 0 ) { do { bf_add_si((long long *)&v20, (long long)&v28, 1LL, v9, 0); bf_sqrt((_QWORD **)&v25, (long long)&v20, v9, 6u); bf_add_si((long long *)&v20, (long long)&v25, 1LL, v9, 0); bf_op2(&v28, &v28, &v20, v9, 0LL, (long long ( *)(__int128 *))_bf_div); --v5; } while ( v5 ); } *(_QWORD *)&v34 = v3; DWORD2(v34) = 0; v35 = 0x8000000000000000LL; v36 = 0LL; *(_QWORD *)&v31 = v3; DWORD2(v31) = 0; v32 = 0x8000000000000000LL; v33 = 0LL; bf_add_si((long long *)&v34, (long long)&v28, 2LL, v9, 0); bf_op2(&v34, &v28, &v34, v9, 0LL, (long long ( *)(__int128 *))_bf_div); bf_mul(&v31, (long long)&v34, (long long)&v34, v9, 0); v10 = v24; *((_DWORD *)v24 + 2) = 0; v11 = (long long)v10; v10[2] = 0x8000000000000000LL; if ( v10[3] ) { v10[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*v10 + 8LL))(*(_QWORD *)*v10, v10[4], 0LL); *(_QWORD *)(v11 + 24) = 0LL; } if ( v8 < 0x7FFFFFFFFFFFFFFFLL ) { v12 = v8 + 1; do { bf_set_ui((_QWORD **)&v20, 1uLL); bf_set_ui((_QWORD **)&v25, 2 * v12 + 1); bf_op2(&v20, &v20, &v25, v9, 0LL, (long long ( *)(__int128 *))_bf_div); bf_op2((__int128 *)v11, (__int128 *)v11, &v20, v9, 0LL, (long long ( *)(__int128 *))_bf_add); bf_mul((__int128 *)v11, v11, (long long)&v31, v9, 0); } while ( v12-- > 1 ); } bf_add_si((long long *)v11, v11, 1LL, v9, 0); bf_mul((__int128 *)v11, v11, (long long)&v34, v9, 0); if ( (_QWORD)v34 && *((_QWORD *)&v36 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v34 + 8))(*(_QWORD *)v34, *((_QWORD *)&v36 + 1), 0LL); v14 = v23; if ( (_QWORD)v31 && *((_QWORD *)&v33 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v31 + 8))(*(_QWORD *)v31, *((_QWORD *)&v33 + 1), 0LL); if ( (_QWORD)v25 && *((_QWORD *)&v27 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v25 + 8))(*(_QWORD *)v25, *((_QWORD *)&v27 + 1), 0LL); if ( (_QWORD)v20 && *((_QWORD *)&v22 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v20 + 8))(*(_QWORD *)v20, *((_QWORD *)&v22 + 1), 0LL); v15 = *(_QWORD *)(v11 + 24); if ( v15 ) { v16 = 0xC000000000000000LL; if ( v19 > (long long)0xC000000000000000LL ) v16 = v19; if ( v16 >= 0x3FFFFFFFFFFFFFFELL ) v16 = 0x3FFFFFFFFFFFFFFELL; *(_QWORD *)(v11 + 16) += v16 + 1; _bf_round(v11, 0x3FFFFFFFFFFFFFFFLL, 1LL, v15, 0); } bf_const_get( (long long)&v28, v9, 6u, v28 + 16, (void ( *)(long long, unsigned long long))bf_const_log2_internal, 0); bf_mul_si(&v28, (long long)&v28, v14, v9, 0); bf_op2((__int128 *)v11, (__int128 *)v11, &v28, v9, 0LL, (long long ( *)(__int128 *))_bf_add); if ( (_QWORD)v28 && *((_QWORD *)&v30 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v28 + 8))(*(_QWORD *)v28, *((_QWORD *)&v30 + 1), 0LL); return 16LL; }
bf_log_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RSP],RDX MOV RBP,-0x8000000000000000 MOV qword ptr [RSP + 0x40],RDI MOV R13,qword ptr [RDI] LEA R14,[RSP + 0x70] MOV qword ptr [R14],R13 XOR EBX,EBX MOV dword ptr [R14 + 0x8],EBX MOV qword ptr [R14 + 0x10],RBP XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x18],XMM0 MOV RDI,R14 CALL 0x00184c8d MOV R15,qword ptr [R14 + 0x10] MOV qword ptr [R14 + 0x10],RBX LEA R12,[RSP + 0x10] MOV qword ptr [RSP + 0x8],R13 MOV qword ptr [R12],R13 MOV dword ptr [R12 + 0x8],EBX MOV qword ptr [R12 + 0x10],RBP XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x18],XMM0 MOV ESI,0xaaaaaaaa MOV RDI,R12 CALL 0x00184abb MOV qword ptr [R12 + 0x10],RBX MOV RDI,R14 MOV RSI,R12 CALL 0x001854f5 TEST EAX,EAX JNS 0x0018b390 INC qword ptr [RSP + 0x80] DEC R15 LAB_0018b390: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX MOV R13,qword ptr [RSP] JZ 0x0018b3b0 MOV RSI,qword ptr [RSP + 0x30] TEST RSI,RSI JZ 0x0018b3b0 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018b3b0: LEA RSI,[R13 + 0x1] XOR R12D,R12D CMP RSI,0x2 MOV qword ptr [RSP + 0x38],R15 JNC 0x0018b3c6 XOR EBX,EBX JMP 0x0018b3f0 LAB_0018b3c6: SHR RSI,0x1 BSR R14,RSI XOR R14,0x3f MOV ECX,R14D AND CL,0x3e SHL RSI,CL LEA RDI,[RSP + 0x10] CALL 0x0018712d MOV RBX,RAX SHR R14D,0x1 MOV ECX,R14D SHR RBX,CL LAB_0018b3f0: MOV RCX,0x3fffffffffffffff LEA RSI,[RBX + RBX*0x1] MOV RAX,R13 XOR EDX,EDX DIV RSI MOV RBP,RAX ADD R13,RBX LEA R15,[0x22 + RAX*0x2] ADD R15,R13 MOV RDX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV dword ptr [RSP + 0x18],R12D MOV RAX,-0x8000000000000000 MOV qword ptr [RSP + 0x20],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x28],XMM0 MOV qword ptr [RSP + 0x48],RDX MOV dword ptr [RSP + 0x50],R12D MOV qword ptr [RSP + 0x58],RAX MOVUPS xmmword ptr [RSP + 0x60],XMM0 LEA RDI,[RSP + 0x70] MOV RSI,RDI MOV RDX,-0x1 XOR R8D,R8D CALL 0x00186f60 MOV qword ptr [RSP],RBX TEST RBX,RBX JLE 0x0018b4e3 LEA R13,[RSP + 0x10] LEA R14,[RSP + 0x70] LEA R12,[RSP + 0x48] MOV RBX,qword ptr [RSP] LAB_0018b484: MOV EDX,0x1 MOV RDI,R13 MOV RSI,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x00186f60 MOV RDI,R12 MOV RSI,R13 MOV RDX,R15 MOV ECX,0x6 CALL 0x00187806 MOV EDX,0x1 MOV RDI,R13 MOV RSI,R12 MOV RCX,R15 XOR R8D,R8D CALL 0x00186f60 MOV RDI,R14 MOV RSI,R14 MOV RDX,R13 MOV RCX,R15 XOR R8D,R8D LEA R9,[0x187bf3] CALL 0x00187b3a DEC RBX JNZ 0x0018b484 LAB_0018b4e3: LEA R14,[RSP + 0xc0] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [R14],RCX XOR EBX,EBX MOV dword ptr [R14 + 0x8],EBX MOV RAX,-0x8000000000000000 MOV qword ptr [R14 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x18],XMM0 LEA R12,[RSP + 0x98] MOV qword ptr [R12],RCX MOV dword ptr [R12 + 0x8],EBX MOV qword ptr [R12 + 0x10],RAX MOVUPS xmmword ptr [R12 + 0x18],XMM0 LEA R13,[RSP + 0x70] MOV EDX,0x2 MOV RDI,R14 MOV RSI,R13 MOV RCX,R15 XOR R8D,R8D CALL 0x00186f60 LEA R9,[0x187bf3] MOV RDI,R14 MOV RSI,R13 MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x00187b3a MOV RDI,R12 MOV RSI,R14 MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x00186711 MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX + 0x8],EBX MOV RBX,RAX MOV RAX,-0x8000000000000000 MOV qword ptr [RBX + 0x10],RAX CMP qword ptr [RBX + 0x18],0x0 JZ 0x0018b5b0 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x0 LAB_0018b5b0: MOV RAX,-0x8000000000000000 DEC RAX CMP RBP,RAX JNC 0x0018b64f INC RBP LEA R13,[RSP + 0x10] LEA R14,[RSP + 0x48] LEA R12,[RSP + 0x98] LAB_0018b5db: MOV ESI,0x1 MOV RDI,R13 CALL 0x00184abb LEA RSI,[0x1 + RBP*0x2] MOV RDI,R14 CALL 0x00184abb MOV RDI,R13 MOV RSI,R13 MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D LEA R9,[0x187bf3] CALL 0x00187b3a MOV RDI,RBX MOV RSI,RBX MOV RDX,R13 MOV RCX,R15 XOR R8D,R8D LEA R9,[0x187bd4] CALL 0x00187b3a MOV RDI,RBX MOV RSI,RBX MOV RDX,R12 MOV RCX,R15 XOR R8D,R8D CALL 0x00186711 LEA RAX,[RBP + -0x1] CMP RBP,0x1 MOV RBP,RAX JG 0x0018b5db LAB_0018b64f: MOV EDX,0x1 MOV RDI,RBX MOV RSI,RBX MOV RCX,R15 XOR R8D,R8D CALL 0x00186f60 LEA R14,[RSP + 0xc0] MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x00186711 MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x0018b69e MOV RSI,qword ptr [RSP + 0xe0] TEST RSI,RSI JZ 0x0018b69e MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018b69e: MOV RAX,qword ptr [RSP + 0x98] TEST RAX,RAX MOV R12,qword ptr [RSP + 0x38] JZ 0x0018b6c5 MOV RSI,qword ptr [RSP + 0xb8] TEST RSI,RSI JZ 0x0018b6c5 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018b6c5: MOV RAX,qword ptr [RSP + 0x48] TEST RAX,RAX JZ 0x0018b6e1 MOV RSI,qword ptr [RSP + 0x68] TEST RSI,RSI JZ 0x0018b6e1 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018b6e1: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0018b6fd MOV RSI,qword ptr [RSP + 0x30] TEST RSI,RSI JZ 0x0018b6fd MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018b6fd: MOV RCX,qword ptr [RBX + 0x18] TEST RCX,RCX JZ 0x0018b754 MOV RAX,-0x4000000000000000 MOV RDX,qword ptr [RSP] CMP RDX,RAX CMOVG RAX,RDX MOV RDX,0x3ffffffffffffffe CMP RAX,RDX CMOVGE RAX,RDX MOV RDX,qword ptr [RBX + 0x10] ADD RAX,RDX INC RAX MOV qword ptr [RBX + 0x10],RAX MOV RDI,RBX MOV RSI,0x3fffffffffffffff MOV EDX,0x1 XOR R8D,R8D CALL 0x00184e26 LAB_0018b754: LEA R14,[RSP + 0x70] MOV RCX,qword ptr [R14] ADD RCX,0x10 LEA R8,[0x18a73c] MOV RDI,R14 MOV RSI,R15 MOV EDX,0x6 XOR R9D,R9D CALL 0x0018a640 MOV RDI,R14 MOV RSI,R14 MOV RDX,R12 MOV RCX,R15 XOR R8D,R8D CALL 0x00187fdf LEA R9,[0x187bd4] MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x00187b3a MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x0018b7c6 MOV RSI,qword ptr [RSP + 0x90] TEST RSI,RSI JZ 0x0018b7c6 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018b7c6: MOV EAX,0x10 ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 bf_log_internal(long *param_1,int8 param_2,ulong param_3) { int8 *puVar1; bool bVar2; long *plVar3; int iVar4; ulong uVar5; long lVar6; ulong uVar7; ulong uVar8; long lVar9; int8 *local_108; int4 local_100; int8 local_f8; int8 local_f0; long lStack_e8; long local_e0; long *local_d8; int8 *local_d0; int4 local_c8; int8 local_c0; int8 local_b8; long lStack_b0; int8 *local_a8; int4 local_a0; long local_98; int8 local_90; long lStack_88; int8 *local_80; int4 local_78; int8 local_70; int8 local_68; long lStack_60; int8 *local_58; int4 local_50; int8 local_48; int8 local_40; long lStack_38; puVar1 = (int8 *)*param_1; local_a0 = 0; local_98 = -0x8000000000000000; local_90 = 0; lStack_88 = 0; local_d8 = param_1; local_a8 = puVar1; bf_set(&local_a8); lVar9 = local_98; local_98 = 0; local_100 = 0; local_f8 = 0x8000000000000000; local_f0 = 0; lStack_e8 = 0; local_108 = puVar1; bf_set_ui(&local_108,0xaaaaaaaa); local_f8 = 0; iVar4 = bf_cmp(&local_a8,&local_108); if (iVar4 < 0) { local_98 = local_98 + 1; lVar9 = lVar9 + -1; } if ((local_108 != (int8 *)0x0) && (lStack_e8 != 0)) { (*(code *)local_108[1])(*local_108,lStack_e8,0); } local_e0 = lVar9; if (param_3 + 1 < 2) { uVar8 = 0; } else { uVar8 = param_3 + 1 >> 1; uVar5 = 0x3f; if (uVar8 != 0) { for (; uVar8 >> uVar5 == 0; uVar5 = uVar5 - 1) { } } uVar8 = mp_sqrtrem1(&local_108,uVar8 << ((byte)(uVar5 ^ 0x3f) & 0x3e)); uVar8 = uVar8 >> ((byte)((uint)(uVar5 ^ 0x3f) >> 1) & 0x3f); } uVar5 = param_3 / (uVar8 * 2); lVar9 = uVar5 * 2 + 0x22 + param_3 + uVar8; local_100 = 0; local_f8 = 0x8000000000000000; local_f0 = 0; lStack_e8 = 0; local_c8 = 0; local_c0 = 0x8000000000000000; local_b8 = 0; lStack_b0 = 0; local_108 = puVar1; local_d0 = puVar1; bf_add_si(&local_a8,&local_a8,0xffffffffffffffff,0x3fffffffffffffff,0); if (0 < (long)uVar8) { uVar7 = uVar8; do { bf_add_si(&local_108,&local_a8,1,lVar9,0); bf_sqrt(&local_d0,&local_108,lVar9,6); bf_add_si(&local_108,&local_d0,1,lVar9); bf_op2(&local_a8,&local_a8,&local_108,lVar9,0,__bf_div); uVar7 = uVar7 - 1; } while (uVar7 != 0); } local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; lStack_38 = 0; local_78 = 0; local_70 = 0x8000000000000000; local_68 = 0; lStack_60 = 0; local_80 = puVar1; local_58 = puVar1; bf_add_si(&local_58,&local_a8,2,lVar9,0); bf_op2(&local_58,&local_a8,&local_58,lVar9,0,__bf_div); bf_mul(&local_80,&local_58,&local_58,lVar9,0); plVar3 = local_d8; *(int4 *)(local_d8 + 1) = 0; local_d8[2] = -0x8000000000000000; if (local_d8[3] != 0) { lVar6 = (*(code *)((int8 *)*local_d8)[1])(*(int8 *)*local_d8,local_d8[4],0); plVar3[4] = lVar6; plVar3[3] = 0; } if (uVar5 < 0x7fffffffffffffff) { lVar6 = uVar5 + 1; do { bf_set_ui(&local_108,1); bf_set_ui(&local_d0,lVar6 * 2 + 1); bf_op2(&local_108,&local_108,&local_d0,lVar9,0,__bf_div); bf_op2(plVar3,plVar3,&local_108,lVar9,0,__bf_add); bf_mul(plVar3,plVar3,&local_80,lVar9); bVar2 = 1 < lVar6; lVar6 = lVar6 + -1; } while (bVar2); } bf_add_si(plVar3,plVar3,1,lVar9,0); bf_mul(plVar3,plVar3,&local_58,lVar9,0); if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { (*(code *)local_58[1])(*local_58,lStack_38,0); } lVar6 = local_e0; if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } if ((local_d0 != (int8 *)0x0) && (lStack_b0 != 0)) { (*(code *)local_d0[1])(*local_d0,lStack_b0,0); } if ((local_108 != (int8 *)0x0) && (lStack_e8 != 0)) { (*(code *)local_108[1])(*local_108,lStack_e8,0); } if (plVar3[3] != 0) { uVar5 = 0xc000000000000000; if (-0x4000000000000000 < (long)uVar8) { uVar5 = uVar8; } if (0x3ffffffffffffffd < (long)uVar5) { uVar5 = 0x3ffffffffffffffe; } plVar3[2] = uVar5 + plVar3[2] + 1; __bf_round(plVar3,0x3fffffffffffffff,1,plVar3[3],0); } bf_const_get(&local_a8,lVar9,6,local_a8 + 2,bf_const_log2_internal,0); bf_mul_si(&local_a8,&local_a8,lVar6,lVar9,0); bf_op2(plVar3,plVar3,&local_a8,lVar9,0,__bf_add); if ((local_a8 != (int8 *)0x0) && (lStack_88 != 0)) { (*(code *)local_a8[1])(*local_a8,lStack_88,0); } return 0x10; }
53,073
dump_datapage
eloqsql/storage/maria/ma_loghandler.c
static void dump_datapage(uchar *buffer, File handler) { uchar *ptr; ulong offset; uint32 page, file; uint header_len; printf(" Page: %ld File number: %ld\n", (ulong) (page= uint3korr(buffer)), (ulong) (file= uint3korr(buffer + 3))); if (page == 0) printf(" WARNING: page == 0!!!\n"); if (file == 0) printf(" WARNING: file == 0!!!\n"); offset= page * TRANSLOG_PAGE_SIZE; printf(" Flags (0x%x):\n", (uint) buffer[TRANSLOG_PAGE_FLAGS]); if (buffer[TRANSLOG_PAGE_FLAGS]) { if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_PAGE_CRC) printf(" Page CRC\n"); if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_SECTOR_PROTECTION) printf(" Sector protection\n"); if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_RECORD_CRC) printf(" Record CRC (WARNING: not yet implemented!!!)\n"); if (buffer[TRANSLOG_PAGE_FLAGS] & ~(TRANSLOG_PAGE_CRC | TRANSLOG_SECTOR_PROTECTION | TRANSLOG_RECORD_CRC)) { printf(" WARNING: unknown flags (stop interpretation)!!!\n"); return; } } else printf(" No flags\n"); printf(" Page header length: %u\n", (header_len= page_overhead[buffer[TRANSLOG_PAGE_FLAGS]])); if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_RECORD_CRC) { uint32 crc= uint4korr(buffer + TRANSLOG_PAGE_FLAGS + 1); uint32 ccrc; printf (" Page CRC 0x%04lx\n", (ulong) crc); ccrc= translog_crc(buffer + header_len, TRANSLOG_PAGE_SIZE - header_len); if (crc != ccrc) printf(" WARNING: calculated CRC: 0x%04lx!!!\n", (ulong) ccrc); } if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_SECTOR_PROTECTION) { TRANSLOG_FILE tfile; { uchar *table= buffer + header_len - TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE; uint i; printf(" Sector protection current value: 0x%02x\n", (uint) table[0]); for (i= 1; i < TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE; i++) { printf(" Sector protection in sector: 0x%02x saved value 0x%02x\n", (uint)buffer[i * DISK_DRIVE_SECTOR_SIZE], (uint)table[i]); } } tfile.number= file; bzero(&tfile.handler, sizeof(tfile.handler)); tfile.handler.file= handler; tfile.was_recovered= 0; tfile.is_sync= 1; if (translog_check_sector_protection(buffer, &tfile)) printf(" WARNING: sector protection found problems!!!\n"); } ptr= buffer + header_len; while (ptr && ptr < buffer + TRANSLOG_PAGE_SIZE) { printf(" Chunk %d %lld:\n", file,((longlong) (ptr - buffer)+ offset)); ptr= dump_chunk(buffer, ptr); } }
O0
c
dump_datapage: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movzbl (%rax), %eax movq -0x8(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x8(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, -0x24(%rbp) movl %eax, %eax movl %eax, %esi movq -0x8(%rbp), %rax movzbl 0x3(%rax), %eax movq -0x8(%rbp), %rcx movzbl 0x4(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x8(%rbp), %rcx movzbl 0x5(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, -0x28(%rbp) movl %eax, %eax movl %eax, %edx leaq 0xc40fc(%rip), %rdi # 0x153176 movb $0x0, %al callq 0x29050 cmpl $0x0, -0x24(%rbp) jne 0x8f095 leaq 0xc4107(%rip), %rdi # 0x153195 movb $0x0, %al callq 0x29050 cmpl $0x0, -0x28(%rbp) jne 0x8f0a9 leaq 0xc410e(%rip), %rdi # 0x1531b0 movb $0x0, %al callq 0x29050 movl -0x24(%rbp), %eax shll $0xd, %eax movl %eax, %eax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movzbl 0x6(%rax), %esi leaq 0xc4107(%rip), %rdi # 0x1531cb movb $0x0, %al callq 0x29050 movq -0x8(%rbp), %rax cmpb $0x0, 0x6(%rax) je 0x8f154 movq -0x8(%rbp), %rax movzbl 0x6(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x8f0f3 leaq 0xc40f0(%rip), %rdi # 0x1531dc movb $0x0, %al callq 0x29050 movq -0x8(%rbp), %rax movzbl 0x6(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x8f111 leaq 0xc40e0(%rip), %rdi # 0x1531ea movb $0x0, %al callq 0x29050 movq -0x8(%rbp), %rax movzbl 0x6(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x8f12f leaq 0xc40d9(%rip), %rdi # 0x153201 movb $0x0, %al callq 0x29050 movq -0x8(%rbp), %rax movzbl 0x6(%rax), %eax andl $-0x8, %eax cmpl $0x0, %eax je 0x8f152 leaq 0xc40ed(%rip), %rdi # 0x153233 movb $0x0, %al callq 0x29050 jmp 0x8f34b jmp 0x8f162 leaq 0xc410d(%rip), %rdi # 0x153268 movb $0x0, %al callq 0x29050 movq -0x8(%rbp), %rax movzbl 0x6(%rax), %eax movl %eax, %ecx leaq 0xbed18d(%rip), %rax # 0xc7c300 movl (%rax,%rcx,4), %esi movl %esi, -0x2c(%rbp) leaq 0xc40f6(%rip), %rdi # 0x153276 movb $0x0, %al callq 0x29050 movq -0x8(%rbp), %rax movzbl 0x6(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x8f1eb movq -0x8(%rbp), %rax movl 0x7(%rax), %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl %eax, %esi leaq 0xc40e3(%rip), %rdi # 0x153290 movb $0x0, %al callq 0x29050 movq -0x8(%rbp), %rdi movl -0x2c(%rbp), %eax addq %rax, %rdi movl $0x2000, %esi # imm = 0x2000 subl -0x2c(%rbp), %esi callq 0x8f800 movl %eax, -0x34(%rbp) movl -0x30(%rbp), %eax cmpl -0x34(%rbp), %eax je 0x8f1e9 movl -0x34(%rbp), %eax movl %eax, %esi leaq 0xc40c2(%rip), %rdi # 0x1532a4 movb $0x0, %al callq 0x29050 jmp 0x8f1eb movq -0x8(%rbp), %rax movzbl 0x6(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x8f2d4 movq -0x8(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax addq $-0x10, %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movzbl (%rax), %esi leaq 0xc40a8(%rip), %rdi # 0x1532cd movb $0x0, %al callq 0x29050 movl $0x1, -0x9c(%rbp) cmpl $0x10, -0x9c(%rbp) jae 0x8f282 movq -0x8(%rbp), %rax movl -0x9c(%rbp), %ecx shll $0x9, %ecx movl %ecx, %ecx movzbl (%rax,%rcx), %esi movq -0x98(%rbp), %rax movl -0x9c(%rbp), %ecx movzbl (%rax,%rcx), %edx leaq 0xc4090(%rip), %rdi # 0x1532fa movb $0x0, %al callq 0x29050 movl -0x9c(%rbp), %eax addl $0x1, %eax movl %eax, -0x9c(%rbp) jmp 0x8f236 movl -0x28(%rbp), %eax movl %eax, -0x90(%rbp) leaq -0x90(%rbp), %rdi addq $0x8, %rdi xorl %esi, %esi movl $0x48, %edx callq 0x29280 movl -0xc(%rbp), %eax movl %eax, -0x78(%rbp) movb $0x0, -0x40(%rbp) movb $0x1, -0x3f(%rbp) movq -0x8(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0x8f830 cmpb $0x0, %al je 0x8f2d2 leaq 0xc406c(%rip), %rdi # 0x153337 movb $0x0, %al callq 0x29050 jmp 0x8f2d4 movq -0x8(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) xorl %eax, %eax cmpq $0x0, -0x18(%rbp) movb %al, -0x9d(%rbp) je 0x8f30c movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx addq $0x2000, %rcx # imm = 0x2000 cmpq %rcx, %rax setb %al movb %al, -0x9d(%rbp) movb -0x9d(%rbp), %al testb $0x1, %al jne 0x8f318 jmp 0x8f34b movl -0x28(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x8(%rbp), %rax subq %rax, %rdx addq -0x20(%rbp), %rdx leaq 0xc4038(%rip), %rdi # 0x153369 movb $0x0, %al callq 0x29050 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x93a40 movq %rax, -0x18(%rbp) jmp 0x8f2e2 addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
dump_datapage: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] movzx eax, byte ptr [rax] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov [rbp+var_24], eax mov eax, eax mov esi, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+3] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+4] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+5] shl ecx, 10h or eax, ecx mov [rbp+var_28], eax mov eax, eax mov edx, eax lea rdi, aPageLdFileNumb; " Page: %ld File number: %ld\n" mov al, 0 call _printf cmp [rbp+var_24], 0 jnz short loc_8F095 lea rdi, aWarningPage0; " WARNING: page == 0!!!\n" mov al, 0 call _printf loc_8F095: cmp [rbp+var_28], 0 jnz short loc_8F0A9 lea rdi, aWarningFile0; " WARNING: file == 0!!!\n" mov al, 0 call _printf loc_8F0A9: mov eax, [rbp+var_24] shl eax, 0Dh mov eax, eax mov [rbp+var_20], rax mov rax, [rbp+var_8] movzx esi, byte ptr [rax+6] lea rdi, aFlags0xX; " Flags (0x%x):\n" mov al, 0 call _printf mov rax, [rbp+var_8] cmp byte ptr [rax+6], 0 jz short loc_8F154 mov rax, [rbp+var_8] movzx eax, byte ptr [rax+6] and eax, 1 cmp eax, 0 jz short loc_8F0F3 lea rdi, aPageCrc; " Page CRC\n" mov al, 0 call _printf loc_8F0F3: mov rax, [rbp+var_8] movzx eax, byte ptr [rax+6] and eax, 2 cmp eax, 0 jz short loc_8F111 lea rdi, aSectorProtecti; " Sector protection\n" mov al, 0 call _printf loc_8F111: mov rax, [rbp+var_8] movzx eax, byte ptr [rax+6] and eax, 4 cmp eax, 0 jz short loc_8F12F lea rdi, aRecordCrcWarni; " Record CRC (WARNING: not yet implem"... mov al, 0 call _printf loc_8F12F: mov rax, [rbp+var_8] movzx eax, byte ptr [rax+6] and eax, 0FFFFFFF8h cmp eax, 0 jz short loc_8F152 lea rdi, aWarningUnknown; " WARNING: unknown flags (stop interp"... mov al, 0 call _printf jmp loc_8F34B loc_8F152: jmp short loc_8F162 loc_8F154: lea rdi, aNoFlags; " No flags\n" mov al, 0 call _printf loc_8F162: mov rax, [rbp+var_8] movzx eax, byte ptr [rax+6] mov ecx, eax lea rax, page_overhead mov esi, [rax+rcx*4] mov [rbp+var_2C], esi lea rdi, aPageHeaderLeng; " Page header length: %u\n" mov al, 0 call _printf mov rax, [rbp+var_8] movzx eax, byte ptr [rax+6] and eax, 4 cmp eax, 0 jz short loc_8F1EB mov rax, [rbp+var_8] mov eax, [rax+7] mov [rbp+var_30], eax mov eax, [rbp+var_30] mov esi, eax lea rdi, aPageCrc0x04lx; " Page CRC 0x%04lx\n" mov al, 0 call _printf mov rdi, [rbp+var_8] mov eax, [rbp+var_2C] add rdi, rax mov esi, 2000h sub esi, [rbp+var_2C] call translog_crc mov [rbp+var_34], eax mov eax, [rbp+var_30] cmp eax, [rbp+var_34] jz short loc_8F1E9 mov eax, [rbp+var_34] mov esi, eax lea rdi, aWarningCalcula; " WARNING: calculated CRC: 0x%04lx!!!"... mov al, 0 call _printf loc_8F1E9: jmp short $+2 loc_8F1EB: mov rax, [rbp+var_8] movzx eax, byte ptr [rax+6] and eax, 2 cmp eax, 0 jz loc_8F2D4 mov rax, [rbp+var_8] mov ecx, [rbp+var_2C] add rax, rcx add rax, 0FFFFFFFFFFFFFFF0h mov [rbp+var_98], rax mov rax, [rbp+var_98] movzx esi, byte ptr [rax] lea rdi, aSectorProtecti_0; " Sector protection current value: 0x"... mov al, 0 call _printf mov [rbp+var_9C], 1 loc_8F236: cmp [rbp+var_9C], 10h jnb short loc_8F282 mov rax, [rbp+var_8] mov ecx, [rbp+var_9C] shl ecx, 9 mov ecx, ecx movzx esi, byte ptr [rax+rcx] mov rax, [rbp+var_98] mov ecx, [rbp+var_9C] movzx edx, byte ptr [rax+rcx] lea rdi, aSectorProtecti_1; " Sector protection in sector: 0x%02x"... mov al, 0 call _printf mov eax, [rbp+var_9C] add eax, 1 mov [rbp+var_9C], eax jmp short loc_8F236 loc_8F282: mov eax, [rbp+var_28] mov [rbp+var_90], eax lea rdi, [rbp+var_90] add rdi, 8 xor esi, esi mov edx, 48h ; 'H' call _memset mov eax, [rbp+var_C] mov [rbp+var_78], eax mov [rbp+var_40], 0 mov [rbp+var_3F], 1 mov rdi, [rbp+var_8] lea rsi, [rbp+var_90] call translog_check_sector_protection cmp al, 0 jz short loc_8F2D2 lea rdi, aWarningSectorP; " WARNING: sector protection found pr"... mov al, 0 call _printf loc_8F2D2: jmp short $+2 loc_8F2D4: mov rax, [rbp+var_8] mov ecx, [rbp+var_2C] add rax, rcx mov [rbp+var_18], rax loc_8F2E2: xor eax, eax cmp [rbp+var_18], 0 mov [rbp+var_9D], al jz short loc_8F30C mov rax, [rbp+var_18] mov rcx, [rbp+var_8] add rcx, 2000h cmp rax, rcx setb al mov [rbp+var_9D], al loc_8F30C: mov al, [rbp+var_9D] test al, 1 jnz short loc_8F318 jmp short loc_8F34B loc_8F318: mov esi, [rbp+var_28] mov rdx, [rbp+var_18] mov rax, [rbp+var_8] sub rdx, rax add rdx, [rbp+var_20] lea rdi, aChunkDLld; " Chunk %d %lld:\n" mov al, 0 call _printf mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call dump_chunk mov [rbp+var_18], rax jmp short loc_8F2E2 loc_8F34B: add rsp, 0A0h pop rbp retn
char dump_datapage(unsigned __int16 *a1, int a2) { char result; // al bool v3; // [rsp+3h] [rbp-9Dh] unsigned int i; // [rsp+4h] [rbp-9Ch] unsigned int v5; // [rsp+10h] [rbp-90h] BYREF _DWORD v6[18]; // [rsp+18h] [rbp-88h] BYREF char v7; // [rsp+60h] [rbp-40h] char v8; // [rsp+61h] [rbp-3Fh] unsigned int v9; // [rsp+6Ch] [rbp-34h] unsigned int v10; // [rsp+70h] [rbp-30h] unsigned int v11; // [rsp+74h] [rbp-2Ch] unsigned int v12; // [rsp+78h] [rbp-28h] unsigned int v13; // [rsp+7Ch] [rbp-24h] long long v14; // [rsp+80h] [rbp-20h] unsigned long long j; // [rsp+88h] [rbp-18h] int v16; // [rsp+94h] [rbp-Ch] unsigned __int16 *v17; // [rsp+98h] [rbp-8h] v17 = a1; v16 = a2; v13 = (*((unsigned __int8 *)a1 + 2) << 16) | *a1; v12 = (*((unsigned __int8 *)a1 + 5) << 16) | *(unsigned __int16 *)((char *)a1 + 3); printf(" Page: %ld File number: %ld\n", v13, v12); if ( !v13 ) printf(" WARNING: page == 0!!!\n"); if ( !v12 ) printf(" WARNING: file == 0!!!\n"); v14 = v13 << 13; printf(" Flags (0x%x):\n", *((unsigned __int8 *)v17 + 6)); if ( *((_BYTE *)v17 + 6) ) { if ( (v17[3] & 1) != 0 ) printf(" Page CRC\n"); if ( (v17[3] & 2) != 0 ) printf(" Sector protection\n"); if ( (v17[3] & 4) != 0 ) printf(" Record CRC (WARNING: not yet implemented!!!)\n"); if ( (v17[3] & 0xF8) != 0 ) return printf(" WARNING: unknown flags (stop interpretation)!!!\n"); } else { printf(" No flags\n"); } v11 = page_overhead[*((unsigned __int8 *)v17 + 6)]; printf(" Page header length: %u\n", v11); if ( (v17[3] & 4) != 0 ) { v10 = *(_DWORD *)((char *)v17 + 7); printf(" Page CRC 0x%04lx\n", v10); v9 = translog_crc((char *)v17 + v11, 0x2000 - v11); if ( v10 != v9 ) printf(" WARNING: calculated CRC: 0x%04lx!!!\n", v9); } if ( (v17[3] & 2) != 0 ) { printf(" Sector protection current value: 0x%02x\n", *((unsigned __int8 *)v17 + v11 - 16)); for ( i = 1; i < 0x10; ++i ) printf( " Sector protection in sector: 0x%02x saved value 0x%02x\n", LOBYTE(v17[256 * i]), *((unsigned __int8 *)v17 + v11 + i - 16)); v5 = v12; memset(v6, 0LL, sizeof(v6)); v6[4] = v16; v7 = 0; v8 = 1; if ( (unsigned __int8)translog_check_sector_protection(v17, &v5) ) printf(" WARNING: sector protection found problems!!!\n"); } for ( j = (unsigned long long)v17 + v11; ; j = dump_chunk(v17, j) ) { v3 = 0; if ( j ) v3 = j < (unsigned long long)(v17 + 4096); result = v3; if ( !v3 ) break; printf(" Chunk %d %lld:\n", v12, v14 + j - (_QWORD)v17); } return result; }
dump_datapage: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x24],EAX MOV EAX,EAX MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x4] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x5] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x28],EAX MOV EAX,EAX MOV EDX,EAX LEA RDI,[0x253176] MOV AL,0x0 CALL 0x00129050 CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0018f095 LEA RDI,[0x253195] MOV AL,0x0 CALL 0x00129050 LAB_0018f095: CMP dword ptr [RBP + -0x28],0x0 JNZ 0x0018f0a9 LEA RDI,[0x2531b0] MOV AL,0x0 CALL 0x00129050 LAB_0018f0a9: MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0xd MOV EAX,EAX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX ESI,byte ptr [RAX + 0x6] LEA RDI,[0x2531cb] MOV AL,0x0 CALL 0x00129050 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x6],0x0 JZ 0x0018f154 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x6] AND EAX,0x1 CMP EAX,0x0 JZ 0x0018f0f3 LEA RDI,[0x2531dc] MOV AL,0x0 CALL 0x00129050 LAB_0018f0f3: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x6] AND EAX,0x2 CMP EAX,0x0 JZ 0x0018f111 LEA RDI,[0x2531ea] MOV AL,0x0 CALL 0x00129050 LAB_0018f111: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x6] AND EAX,0x4 CMP EAX,0x0 JZ 0x0018f12f LEA RDI,[0x253201] MOV AL,0x0 CALL 0x00129050 LAB_0018f12f: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x6] AND EAX,0xfffffff8 CMP EAX,0x0 JZ 0x0018f152 LEA RDI,[0x253233] MOV AL,0x0 CALL 0x00129050 JMP 0x0018f34b LAB_0018f152: JMP 0x0018f162 LAB_0018f154: LEA RDI,[0x253268] MOV AL,0x0 CALL 0x00129050 LAB_0018f162: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x6] MOV ECX,EAX LEA RAX,[0xd7c300] MOV ESI,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x2c],ESI LEA RDI,[0x253276] MOV AL,0x0 CALL 0x00129050 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x6] AND EAX,0x4 CMP EAX,0x0 JZ 0x0018f1eb MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x7] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x30] MOV ESI,EAX LEA RDI,[0x253290] MOV AL,0x0 CALL 0x00129050 MOV RDI,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RBP + -0x2c] ADD RDI,RAX MOV ESI,0x2000 SUB ESI,dword ptr [RBP + -0x2c] CALL 0x0018f800 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x34] JZ 0x0018f1e9 MOV EAX,dword ptr [RBP + -0x34] MOV ESI,EAX LEA RDI,[0x2532a4] MOV AL,0x0 CALL 0x00129050 LAB_0018f1e9: JMP 0x0018f1eb LAB_0018f1eb: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x6] AND EAX,0x2 CMP EAX,0x0 JZ 0x0018f2d4 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x2c] ADD RAX,RCX ADD RAX,-0x10 MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x98] MOVZX ESI,byte ptr [RAX] LEA RDI,[0x2532cd] MOV AL,0x0 CALL 0x00129050 MOV dword ptr [RBP + -0x9c],0x1 LAB_0018f236: CMP dword ptr [RBP + -0x9c],0x10 JNC 0x0018f282 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x9c] SHL ECX,0x9 MOV ECX,ECX MOVZX ESI,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x98] MOV ECX,dword ptr [RBP + -0x9c] MOVZX EDX,byte ptr [RAX + RCX*0x1] LEA RDI,[0x2532fa] MOV AL,0x0 CALL 0x00129050 MOV EAX,dword ptr [RBP + -0x9c] ADD EAX,0x1 MOV dword ptr [RBP + -0x9c],EAX JMP 0x0018f236 LAB_0018f282: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x90],EAX LEA RDI,[RBP + -0x90] ADD RDI,0x8 XOR ESI,ESI MOV EDX,0x48 CALL 0x00129280 MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x78],EAX MOV byte ptr [RBP + -0x40],0x0 MOV byte ptr [RBP + -0x3f],0x1 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x90] CALL 0x0018f830 CMP AL,0x0 JZ 0x0018f2d2 LEA RDI,[0x253337] MOV AL,0x0 CALL 0x00129050 LAB_0018f2d2: JMP 0x0018f2d4 LAB_0018f2d4: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x2c] ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX LAB_0018f2e2: XOR EAX,EAX CMP qword ptr [RBP + -0x18],0x0 MOV byte ptr [RBP + -0x9d],AL JZ 0x0018f30c MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x2000 CMP RAX,RCX SETC AL MOV byte ptr [RBP + -0x9d],AL LAB_0018f30c: MOV AL,byte ptr [RBP + -0x9d] TEST AL,0x1 JNZ 0x0018f318 JMP 0x0018f34b LAB_0018f318: MOV ESI,dword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] SUB RDX,RAX ADD RDX,qword ptr [RBP + -0x20] LEA RDI,[0x253369] MOV AL,0x0 CALL 0x00129050 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00193a40 MOV qword ptr [RBP + -0x18],RAX JMP 0x0018f2e2 LAB_0018f34b: ADD RSP,0xa0 POP RBP RET
void dump_datapage(uint3 *param_1,int4 param_2) { uint3 *puVar1; char cVar2; ulong uVar3; uint local_a4; uint local_98 [2]; int1 auStack_90 [16]; int4 local_80; int1 local_48; int1 local_47; uint local_3c; uint local_38; uint local_34; uint local_30; uint local_2c; ulong local_28; uint3 *local_20; int4 local_14; uint3 *local_10; local_2c = (uint)*param_1; local_30 = (uint)*(uint3 *)((long)param_1 + 3); local_14 = param_2; local_10 = param_1; printf(" Page: %ld File number: %ld\n",(ulong)local_2c,(ulong)local_30); if (local_2c == 0) { printf(" WARNING: page == 0!!!\n"); } if (local_30 == 0) { printf(" WARNING: file == 0!!!\n"); } local_28 = (ulong)(local_2c << 0xd); printf(" Flags (0x%x):\n",(ulong)*(byte *)((long)local_10 + 6)); if (*(char *)((long)local_10 + 6) == '\0') { printf(" No flags\n"); } else { if ((*(byte *)((long)local_10 + 6) & 1) != 0) { printf(" Page CRC\n"); } if ((*(byte *)((long)local_10 + 6) & 2) != 0) { printf(" Sector protection\n"); } if ((*(byte *)((long)local_10 + 6) & 4) != 0) { printf(" Record CRC (WARNING: not yet implemented!!!)\n"); } if ((*(byte *)((long)local_10 + 6) & 0xf8) != 0) { printf(" WARNING: unknown flags (stop interpretation)!!!\n"); return; } } local_34 = *(uint *)(page_overhead + (ulong)*(byte *)((long)local_10 + 6) * 4); printf(" Page header length: %u\n"); if ((*(byte *)((long)local_10 + 6) & 4) != 0) { local_38 = *(uint *)((long)local_10 + 7); printf(" Page CRC 0x%04lx\n",(ulong)local_38); local_3c = translog_crc((long)local_10 + (ulong)local_34,0x2000 - local_34); if (local_38 != local_3c) { printf(" WARNING: calculated CRC: 0x%04lx!!!\n",(ulong)local_3c); } } puVar1 = local_10; if ((*(byte *)((long)local_10 + 6) & 2) != 0) { uVar3 = (ulong)local_34; printf(" Sector protection current value: 0x%02x\n"); for (local_a4 = 1; local_a4 < 0x10; local_a4 = local_a4 + 1) { printf(" Sector protection in sector: 0x%02x saved value 0x%02x\n", (ulong)*(byte *)((long)local_10 + (ulong)(local_a4 << 9)), (ulong)*(byte *)((long)puVar1 + (ulong)local_a4 + (uVar3 - 0x10))); } local_98[0] = local_30; memset(auStack_90,0,0x48); local_80 = local_14; local_48 = 0; local_47 = 1; cVar2 = translog_check_sector_protection(local_10,local_98); if (cVar2 != '\0') { printf(" WARNING: sector protection found problems!!!\n"); } } for (local_20 = (uint3 *)((long)local_10 + (ulong)local_34); local_20 != (uint3 *)0x0 && local_20 < local_10 + 0x800; local_20 = (uint3 *)dump_chunk(local_10,local_20)) { printf(" Chunk %d %lld:\n",(ulong)local_30,(long)local_20 + (local_28 - (long)local_10)); } return; }
53,074
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O0
cpp
SchemaConverter::format_grammar[abi:cxx11](): subq $0x1f8, %rsp # imm = 0x1F8 movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0x1f0(%rsp) movq %rsi, 0x1e8(%rsp) movq 0x1e8(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0x60(%rsp), %rdi callq 0x5e570 movq 0x28(%rsp), %rax addq $0x28, %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x1b2c50 movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rdi callq 0x1b16e0 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x1b2c80 testb $0x1, %al jne 0x1b041f jmp 0x1b04b2 leaq 0x50(%rsp), %rdi callq 0x1b1730 movq %rax, 0x40(%rsp) leaq 0x70(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x5e560 movq %rax, 0x10(%rsp) jmp 0x1b0444 movq 0x10(%rsp), %rdi leaq 0x73f70(%rip), %rsi # 0x2243c0 callq 0x5ea60 movq %rax, 0x8(%rsp) jmp 0x1b045c movq 0x8(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x20, %rsi callq 0x5e560 movq %rax, (%rsp) jmp 0x1b0475 movq (%rsp), %rdi movq 0x102b38(%rip), %rsi # 0x2b2fb8 callq 0x5f200 jmp 0x1b0487 jmp 0x1b0489 leaq 0x50(%rsp), %rdi callq 0x1b25b0 jmp 0x1b0407 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) leaq 0x60(%rsp), %rdi callq 0x5e6a0 jmp 0x1b04da movq 0x18(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x5ecd0 jmp 0x1b04c3 leaq 0x60(%rsp), %rdi callq 0x5e6a0 movq 0x20(%rsp), %rax addq $0x1f8, %rsp # imm = 0x1F8 retq movq 0x38(%rsp), %rdi callq 0x5ebf0 nopw %cs:(%rax,%rax) nop
_ZN15SchemaConverter14format_grammarB5cxx11Ev: sub rsp, 1F8h mov [rsp+1F8h+var_1E0], rdi mov rax, rdi mov [rsp+1F8h+var_1D8], rax mov [rsp+1F8h+var_8], rdi mov [rsp+1F8h+var_10], rsi mov rax, [rsp+1F8h+var_10] mov [rsp+1F8h+var_1D0], rax lea rdi, [rsp+1F8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov rax, [rsp+1F8h+var_1D0] add rax, 28h ; '(' mov [rsp+1F8h+var_1A0], rax mov rdi, [rsp+1F8h+var_1A0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE5beginEv; std::map<std::string,std::string>::begin(void) mov [rsp+1F8h+var_1A8], rax mov rdi, [rsp+1F8h+var_1A0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE3endEv; std::map<std::string,std::string>::end(void) mov [rsp+1F8h+var_1B0], rax loc_1B0407: lea rdi, [rsp+1F8h+var_1A8] lea rsi, [rsp+1F8h+var_1B0] call _ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EESB_; std::operator!=(std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&,std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&) test al, 1 jnz short loc_1B041F jmp loc_1B04B2 loc_1B041F: lea rdi, [rsp+1F8h+var_1A8] call _ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEdeEv; std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator*(void) mov [rsp+1F8h+var_1B8], rax lea rdi, [rsp+1F8h+var_188] mov rsi, [rsp+1F8h+var_1B8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+1F8h+var_1E8], rax jmp short $+2 loc_1B0444: mov rdi, [rsp+1F8h+var_1E8] lea rsi, asc_2243C0; " ::= " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+1F8h+var_1F0], rax jmp short $+2 loc_1B045C: mov rdi, [rsp+1F8h+var_1F0] mov rsi, [rsp+1F8h+var_1B8] add rsi, 20h ; ' ' call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+1F8h+var_1F8], rax jmp short $+2 loc_1B0475: mov rdi, [rsp+1F8h+var_1F8] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_1B0487: jmp short $+2 loc_1B0489: lea rdi, [rsp+1F8h+var_1A8] call _ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEppEv; std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator++(void) jmp loc_1B0407 mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax lea rdi, [rsp+arg_58] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() jmp short loc_1B04DA loc_1B04B2: mov rdi, [rsp+1F8h+var_1E0] lea rsi, [rsp+1F8h+var_198] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_1B04C3: lea rdi, [rsp+1F8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rsp+1F8h+var_1D8] add rsp, 1F8h retn loc_1B04DA: mov rdi, [rsp+arg_30] call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-1F8h] long long v4; // [rsp+8h] [rbp-1F0h] long long v5; // [rsp+10h] [rbp-1E8h] long long v6; // [rsp+40h] [rbp-1B8h] long long v7; // [rsp+48h] [rbp-1B0h] BYREF _QWORD v8[2]; // [rsp+50h] [rbp-1A8h] BYREF _BYTE v9[16]; // [rsp+60h] [rbp-198h] BYREF _BYTE v10[376]; // [rsp+70h] [rbp-188h] BYREF long long v11; // [rsp+1E8h] [rbp-10h] long long v12; // [rsp+1F0h] [rbp-8h] v12 = a1; v11 = a2; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9); v8[1] = a2 + 40; v8[0] = std::map<std::string,std::string>::begin(a2 + 40); v7 = std::map<std::string,std::string>::end(a2 + 40); while ( (std::operator!=(v8, &v7) & 1) != 0 ) { v6 = std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator*(v8); v5 = std::operator<<<char>(v10, v6); v4 = std::operator<<<std::char_traits<char>>(v5, " ::= "); v3 = std::operator<<<char>(v4, v6 + 32); std::ostream::operator<<(v3, &std::endl<char,std::char_traits<char>>); std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator++(v8); } std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v9); return a1; }
53,075
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O1
cpp
SchemaConverter::format_grammar[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x188, %rsp # imm = 0x188 movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rdi callq 0x1b660 movq 0x40(%r14), %r15 addq $0x30, %r14 cmpq %r14, %r15 je 0xc42f7 leaq 0x10(%rsp), %r12 leaq 0x3873f(%rip), %r13 # 0xfc9c9 movq 0x20(%r15), %rsi movq 0x28(%r15), %rdx movq %r12, %rdi callq 0x1ba30 movq %rax, %rbp movl $0x5, %edx movq %rax, %rdi movq %r13, %rsi callq 0x1ba30 movq 0x40(%r15), %rsi movq 0x48(%r15), %rdx movq %rbp, %rdi callq 0x1ba30 movq %rax, %rbp movq (%rax), %rax movq -0x18(%rax), %rdi addq %rbp, %rdi movl $0xa, %esi callq 0x1b8a0 movsbl %al, %esi movq %rbp, %rdi callq 0x1b040 movq %rax, %rdi callq 0x1b630 movq %r15, %rdi callq 0x1b650 movq %rax, %r15 cmpq %r14, %rax jne 0xc428a leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x1be00 movq 0x6fc0d(%rip), %rsi # 0x133f18 movq %rsp, %rdi callq 0x1b6a0 leaq 0x80(%rsp), %rdi callq 0x1b2c0 movq %rbx, %rax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xc4337 movq %rax, %rbx movq 0x6fbd7(%rip), %rsi # 0x133f18 movq %rsp, %rdi callq 0x1b6a0 leaq 0x80(%rsp), %rdi callq 0x1b2c0 movq %rbx, %rdi callq 0x1bff0
_ZN15SchemaConverter14format_grammarB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 188h mov r14, rsi mov rbx, rdi mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov r15, [r14+40h] add r14, 30h ; '0' cmp r15, r14 jz short loc_C42F7 lea r12, [rsp+1B8h+var_1A8] lea r13, asc_FC9C9; " ::= " loc_C428A: mov rsi, [r15+20h] mov rdx, [r15+28h] 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 rbp, rax mov edx, 5 mov rdi, rax mov rsi, r13 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, [r15+40h] mov rdx, [r15+48h] mov rdi, rbp call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbp, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, rbp mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbp; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov rdi, r15 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r15, rax cmp rax, r14 jnz short loc_C428A loc_C42F7: lea rsi, [rsp+1B8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1B8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_C4337: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_78]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { _QWORD *i; // r15 long long v3; // rbp std::ostream *v4; // rbp char v5; // al std::ostream *v6; // rax _BYTE v8[16]; // [rsp+0h] [rbp-1B8h] BYREF _BYTE v9[8]; // [rsp+10h] [rbp-1A8h] BYREF _BYTE v10[104]; // [rsp+18h] [rbp-1A0h] BYREF _BYTE v11[312]; // [rsp+80h] [rbp-138h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v8); for ( i = *(_QWORD **)(a2 + 64); i != (_QWORD *)(a2 + 48); i = (_QWORD *)std::_Rb_tree_increment(i) ) { v3 = std::__ostream_insert<char,std::char_traits<char>>(v9, i[4], i[5]); std::__ostream_insert<char,std::char_traits<char>>(v3, " ::= ", 5LL); v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v3, i[8], i[9]); v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL); v6 = (std::ostream *)std::ostream::put(v4, v5); std::ostream::flush(v6); } std::stringbuf::str(a1, v10); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v8, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v11); return a1; }
format_grammar[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x188 MOV R14,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x0011b660 MOV R15,qword ptr [R14 + 0x40] ADD R14,0x30 CMP R15,R14 JZ 0x001c42f7 LEA R12,[RSP + 0x10] LEA R13,[0x1fc9c9] LAB_001c428a: MOV RSI,qword ptr [R15 + 0x20] MOV RDX,qword ptr [R15 + 0x28] LAB_001c4292: MOV RDI,R12 CALL 0x0011ba30 MOV RBP,RAX MOV EDX,0x5 MOV RDI,RAX MOV RSI,R13 CALL 0x0011ba30 MOV RSI,qword ptr [R15 + 0x40] MOV RDX,qword ptr [R15 + 0x48] MOV RDI,RBP CALL 0x0011ba30 MOV RBP,RAX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBP MOV ESI,0xa CALL 0x0011b8a0 MOVSX ESI,AL MOV RDI,RBP CALL 0x0011b040 MOV RDI,RAX CALL 0x0011b630 MOV RDI,R15 CALL 0x0011b650 MOV R15,RAX CMP RAX,R14 JNZ 0x001c428a LAB_001c42f7: LEA RSI,[RSP + 0x18] LAB_001c42fc: MOV RDI,RBX CALL 0x0011be00 LAB_001c4304: MOV RSI,qword ptr [0x00233f18] MOV RDI,RSP CALL 0x0011b6a0 LEA RDI,[RSP + 0x80] CALL 0x0011b2c0 MOV RAX,RBX ADD RSP,0x188 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::format_grammar[abi:cxx11]() */ void SchemaConverter::format_grammar_abi_cxx11_(void) { ostream *poVar1; _Rb_tree_node_base *p_Var2; long in_RSI; stringstream asStack_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; std::__cxx11::stringstream::stringstream(asStack_1b8); p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x40); if (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)) { do { /* try { // try from 001c4292 to 001c42e6 has its CatchHandler @ 001c4337 */ poVar1 = std::__ostream_insert<char,std::char_traits<char>> (local_1a8,*(char **)(p_Var2 + 0x20),*(long *)(p_Var2 + 0x28)); std::__ostream_insert<char,std::char_traits<char>>(poVar1," ::= ",5); poVar1 = std::__ostream_insert<char,std::char_traits<char>> (poVar1,*(char **)(p_Var2 + 0x40),*(long *)(p_Var2 + 0x48)); std::ios::widen((char)*(int8 *)(*(long *)poVar1 + -0x18) + (char)poVar1); std::ostream::put((char)poVar1); std::ostream::flush(); p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2); } while (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)); } /* try { // try from 001c42fc to 001c4303 has its CatchHandler @ 001c4335 */ std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(asStack_1b8); std::ios_base::~ios_base(local_138); return; }
53,076
bitmap_get_first
eloqsql/mysys/my_bitmap.c
uint bitmap_get_first(const MY_BITMAP *map) { uchar *byte_ptr; uint i,j,k; my_bitmap_map *data_ptr, *end= map->last_word_ptr; DBUG_ASSERT(map->bitmap); data_ptr= map->bitmap; *map->last_word_ptr|= map->last_word_mask; for (i=0; data_ptr < end; data_ptr++, i++) if (*data_ptr != 0xFFFFFFFF) goto found; if ((*data_ptr | map->last_word_mask) == 0xFFFFFFFF) return MY_BIT_NONE; found: byte_ptr= (uchar*)data_ptr; for (j=0; ; j++, byte_ptr++) { if (*byte_ptr != 0xFF) { for (k=0; ; k++) { if (!(*byte_ptr & (1 << k))) return (i*32) + (j*8) + k; } } } DBUG_ASSERT(0); return MY_BIT_NONE; /* Impossible */ }
O3
c
bitmap_get_first: pushq %rbp movq %rsp, %rbp movq (%rdi), %rcx movq 0x8(%rdi), %rdx movl 0x18(%rdi), %eax orl %eax, (%rdx) xorl %eax, %eax cmpq %rdx, %rcx jae 0x9e3e1 xorl %eax, %eax movl (%rcx), %r8d cmpl $-0x1, %r8d jne 0x9e3ef addq $0x4, %rcx incl %eax cmpq %rdx, %rcx jb 0x9e3cd movl (%rcx), %r8d movl 0x18(%rdi), %edx orl %r8d, %edx cmpl $-0x1, %edx je 0x9e428 xorl %edx, %edx movl $0x0, %esi cmpb $-0x1, %r8b jne 0x9e410 incq %rcx xorl %esi, %esi movb (%rcx), %r8b addl $0x8, %esi incq %rcx cmpb $-0x1, %r8b je 0x9e401 movzbl %r8b, %ecx btl %edx, %ecx leal 0x1(%rdx), %edx jb 0x9e414 shll $0x5, %eax addl %eax, %esi leal (%rdx,%rsi), %eax decl %eax jmp 0x9e42d movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbp retq
bitmap_get_first: push rbp mov rbp, rsp mov rcx, [rdi] mov rdx, [rdi+8] mov eax, [rdi+18h] or [rdx], eax xor eax, eax cmp rcx, rdx jnb short loc_9E3E1 xor eax, eax loc_9E3CD: mov r8d, [rcx] cmp r8d, 0FFFFFFFFh jnz short loc_9E3EF add rcx, 4 inc eax cmp rcx, rdx jb short loc_9E3CD loc_9E3E1: mov r8d, [rcx] mov edx, [rdi+18h] or edx, r8d cmp edx, 0FFFFFFFFh jz short loc_9E428 loc_9E3EF: xor edx, edx mov esi, 0 cmp r8b, 0FFh jnz short loc_9E410 inc rcx xor esi, esi loc_9E401: mov r8b, [rcx] add esi, 8 inc rcx cmp r8b, 0FFh jz short loc_9E401 loc_9E410: movzx ecx, r8b loc_9E414: bt ecx, edx lea edx, [rdx+1] jb short loc_9E414 shl eax, 5 add esi, eax lea eax, [rdx+rsi] dec eax jmp short loc_9E42D loc_9E428: mov eax, 0FFFFFFFFh loc_9E42D: pop rbp retn
long long bitmap_get_first(long long a1) { _DWORD *v1; // rcx _DWORD *v2; // rdx int v3; // eax int v4; // r8d unsigned int v5; // edx int v6; // esi _BYTE *v7; // rcx int v8; // ecx v1 = *(_DWORD **)a1; v2 = *(_DWORD **)(a1 + 8); *v2 |= *(_DWORD *)(a1 + 24); v3 = 0; if ( v1 >= v2 ) { LABEL_5: v4 = *v1; if ( (*v1 | *(_DWORD *)(a1 + 24)) == -1 ) return 0xFFFFFFFFLL; } else { v3 = 0; while ( 1 ) { v4 = *v1; if ( *v1 != -1 ) break; ++v1; ++v3; if ( v1 >= v2 ) goto LABEL_5; } } v5 = 0; v6 = 0; if ( (_BYTE)v4 == 0xFF ) { v7 = (char *)v1 + 1; v6 = 0; do { LOBYTE(v4) = *v7; v6 += 8; ++v7; } while ( (_BYTE)v4 == 0xFF ); } v8 = (unsigned __int8)v4; while ( _bittest(&v8, v5++) ) ; return v5 + 32 * v3 + v6 - 1; }
bitmap_get_first: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] MOV EAX,dword ptr [RDI + 0x18] OR dword ptr [RDX],EAX XOR EAX,EAX CMP RCX,RDX JNC 0x0019e3e1 XOR EAX,EAX LAB_0019e3cd: MOV R8D,dword ptr [RCX] CMP R8D,-0x1 JNZ 0x0019e3ef ADD RCX,0x4 INC EAX CMP RCX,RDX JC 0x0019e3cd LAB_0019e3e1: MOV R8D,dword ptr [RCX] MOV EDX,dword ptr [RDI + 0x18] OR EDX,R8D CMP EDX,-0x1 JZ 0x0019e428 LAB_0019e3ef: XOR EDX,EDX MOV ESI,0x0 CMP R8B,0xff JNZ 0x0019e410 INC RCX XOR ESI,ESI LAB_0019e401: MOV R8B,byte ptr [RCX] ADD ESI,0x8 INC RCX CMP R8B,0xff JZ 0x0019e401 LAB_0019e410: MOVZX ECX,R8B LAB_0019e414: BT ECX,EDX LEA EDX,[RDX + 0x1] JC 0x0019e414 SHL EAX,0x5 ADD ESI,EAX LEA EAX,[RDX + RSI*0x1] DEC EAX JMP 0x0019e42d LAB_0019e428: MOV EAX,0xffffffff LAB_0019e42d: POP RBP RET
int bitmap_get_first(int8 *param_1) { uint *puVar1; uint uVar2; int iVar3; uint *puVar4; uint uVar5; int iVar6; uint uVar7; puVar4 = (uint *)*param_1; puVar1 = (uint *)param_1[1]; *puVar1 = *puVar1 | *(uint *)(param_1 + 3); iVar3 = 0; if (puVar4 < puVar1) { iVar3 = 0; do { uVar7 = *puVar4; if (uVar7 != 0xffffffff) goto LAB_0019e3ef; puVar4 = puVar4 + 1; iVar3 = iVar3 + 1; } while (puVar4 < puVar1); } uVar7 = *puVar4; if ((*(uint *)(param_1 + 3) | uVar7) == 0xffffffff) { iVar3 = -1; } else { LAB_0019e3ef: uVar5 = 0; iVar6 = 0; if ((char)uVar7 == -1) { iVar6 = 0; do { puVar4 = (uint *)((long)puVar4 + 1); uVar7 = (uint)*(byte *)puVar4; iVar6 = iVar6 + 8; } while (*(byte *)puVar4 == 0xff); } do { uVar2 = uVar5 & 0x1f; uVar5 = uVar5 + 1; } while (((uVar7 & 0xff) >> uVar2 & 1) != 0); iVar3 = uVar5 + iVar6 + iVar3 * 0x20 + -1; } return iVar3; }
53,077
httplib::Response::set_chunked_content_provider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (unsigned long, httplib::DataSink&)>, std::function<void (bool)>)
hkr04[P]cpp-mcp/common/httplib.h
inline void Response::set_chunked_content_provider( const std::string &content_type, ContentProviderWithoutLength provider, ContentProviderResourceReleaser resource_releaser) { set_header("Content-Type", content_type); content_length_ = 0; content_provider_ = detail::ContentProviderAdapter(std::move(provider)); content_provider_resource_releaser_ = std::move(resource_releaser); is_chunked_content_provider_ = true; }
O2
c
httplib::Response::set_chunked_content_provider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (unsigned long, httplib::DataSink&)>, std::function<void (bool)>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx leaq 0x334c9(%rip), %rsi # 0x4b5a9 leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0xcab2 leaq 0x8(%rsp), %rsi movq %rbx, %rdi movq %r12, %rdx callq 0x17d82 leaq 0x8(%rsp), %rdi callq 0xac20 andq $0x0, 0xc0(%rbx) leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x26006 leaq 0xc8(%rbx), %rdi movq %r12, %rsi callq 0x25f56 leaq 0x8(%rsp), %rdi callq 0xf7f4 leaq 0xe8(%rbx), %rdi movq %r14, %rsi callq 0x25fa4 movb $0x1, 0x108(%rbx) addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xf7f4 jmp 0x1817d movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xac20 jmp 0x1817d movq %rax, %rbx movq %rbx, %rdi callq 0xaac0 nop
_ZN7httplib8Response28set_chunked_content_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFbmRNS_8DataSinkEEES9_IFvbEE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi lea rsi, aContentType; "Content-Type" lea rdi, [rsp+48h+var_40] lea rdx, [rsp+48h+var_41] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+48h+var_40] mov rdi, rbx mov rdx, r12 call _ZN7httplib8Response10set_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; httplib::Response::set_header(std::string const&,std::string const&) lea rdi, [rsp+48h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() and qword ptr [rbx+0C0h], 0 lea r12, [rsp+48h+var_40] mov rdi, r12 mov rsi, r15 call _ZNSt8functionIFbmRN7httplib8DataSinkEEEC2ERKS4_; std::function<bool ()(ulong,httplib::DataSink &)>::function(std::function<bool ()(ulong,httplib::DataSink &)> const&) lea rdi, [rbx+0C8h] mov rsi, r12 call _ZNSt8functionIFbmmRN7httplib8DataSinkEEEaSINS0_6detail22ContentProviderAdapterEEENSt9enable_ifIXsrNS4_9_CallableIT_NS8_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISA_E4typeEE4typeES4_EE5valueESt5decayISA_EE4type4typeESt15__invoke_resultIRSL_JmmS2_EEEE5valueERS4_E4typeEOSA_ lea rdi, [rsp+48h+var_40]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rbx+0E8h] mov rsi, r14 call _ZNSt8functionIFvbEEaSEOS1_; std::function<void ()(bool)>::operator=(std::function<void ()(bool)>&&) mov byte ptr [rbx+108h], 1 add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_1817D mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1817D mov rbx, rax loc_1817D: mov rdi, rbx call __Unwind_Resume
long long httplib::Response::set_chunked_content_provider(long long a1, long long a2, long long a3, long long a4) { long long result; // rax _QWORD v7[8]; // [rsp+8h] [rbp-40h] BYREF std::string::basic_string<std::allocator<char>>(v7, (long long)"Content-Type"); httplib::Response::set_header(a1, (long long)v7, a2); std::string::~string(v7); *(_QWORD *)(a1 + 192) = 0LL; std::function<bool ()(unsigned long,httplib::DataSink &)>::function(v7, a3); std::function<bool ()(unsigned long,unsigned long,httplib::DataSink &)>::operator=<httplib::detail::ContentProviderAdapter>( a1 + 200, v7); std::_Function_base::~_Function_base((std::_Function_base *)v7); result = std::function<void ()(bool)>::operator=(a1 + 232, a4); *(_BYTE *)(a1 + 264) = 1; return result; }
set_chunked_content_provider: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI LAB_001180d9: LEA RSI,[0x14b5a9] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x0010cab2 LAB_001180ef: LEA RSI,[RSP + 0x8] MOV RDI,RBX MOV RDX,R12 CALL 0x00117d82 LAB_001180ff: LEA RDI,[RSP + 0x8] CALL 0x0010ac20 AND qword ptr [RBX + 0xc0],0x0 LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 CALL 0x00126006 LEA RDI,[RBX + 0xc8] LAB_00118128: MOV RSI,R12 CALL 0x00125f56 LAB_00118130: LEA RDI,[RSP + 0x8] CALL 0x0010f7f4 LEA RDI,[RBX + 0xe8] MOV RSI,R14 CALL 0x00125fa4 MOV byte ptr [RBX + 0x108],0x1 ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* httplib::Response::set_chunked_content_provider(std::__cxx11::string const&, std::function<bool (unsigned long, httplib::DataSink&)>, std::function<void (bool)>) */ void __thiscall httplib::Response::set_chunked_content_provider (Response *this,string *param_1,function *param_3,function *param_4) { allocator local_41; string local_40 [32]; /* try { // try from 001180d9 to 001180ee has its CatchHandler @ 0011817a */ std::__cxx11::string::string<std::allocator<char>>(local_40,"Content-Type",&local_41); /* try { // try from 001180ef to 001180fe has its CatchHandler @ 0011816b */ set_header(this,local_40,param_1); std::__cxx11::string::~string(local_40); *(int8 *)(this + 0xc0) = 0; std::function<bool(unsigned_long,httplib::DataSink&)>::function ((function<bool(unsigned_long,httplib::DataSink&)> *)local_40,param_3); /* try { // try from 00118128 to 0011812f has its CatchHandler @ 0011815c */ std::function<bool(unsigned_long,unsigned_long,httplib::DataSink&)>::operator= ((function<bool(unsigned_long,unsigned_long,httplib::DataSink&)> *)(this + 200), (ContentProviderAdapter *)local_40); std::_Function_base::~_Function_base((_Function_base *)local_40); std::function<void(bool)>::operator=((function<void(bool)> *)(this + 0xe8),param_4); this[0x108] = (Response)0x1; return; }
53,078
nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*)
ng-log[P]ng-log/src/utilities.cc
void AlsoErrorWrite(LogSeverity severity, const char* tag, const char* message) noexcept { #if defined(NGLOG_OS_WINDOWS) (void)severity; (void)tag; // On Windows, also output to the debugger ::OutputDebugStringA(message); #elif defined(NGLOG_OS_ANDROID) constexpr int android_log_levels[] = { ANDROID_LOG_INFO, ANDROID_LOG_WARN, ANDROID_LOG_ERROR, ANDROID_LOG_FATAL, }; __android_log_write(android_log_levels[severity], tag, message); #else (void)severity; (void)tag; (void)message; #endif }
O3
cpp
nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*): retq
_ZN5nglog5tools14AlsoErrorWriteENS_11LogSeverityEPKcS3_: retn
void nglog::tools::AlsoErrorWrite() { ; }
AlsoErrorWrite: RET
/* nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*) */ void nglog::tools::AlsoErrorWrite(void) { return; }
53,079
serial_cpp::Serial::SerialImpl::writeUnlock()
ami-iit[P]serial_cpp/src/impl/unix.cc
void Serial::SerialImpl::writeUnlock () { int result = pthread_mutex_unlock(&this->write_mutex); if (result) { THROW (IOException, result); } }
O0
cpp
serial_cpp::Serial::SerialImpl::writeUnlock(): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi addq $0x90, %rdi callq 0x3270 movl %eax, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) je 0xc671 movb $0x1, -0x45(%rbp) movl $0x58, %edi callq 0x31a0 movq %rax, -0x58(%rbp) leaq -0x31(%rbp), %rdi movq %rdi, -0x50(%rbp) callq 0x35e0 movq -0x50(%rbp), %rdx leaq 0x3cae(%rip), %rsi # 0x102a1 leaq -0x30(%rbp), %rdi callq 0x4680 jmp 0xc5fe movq -0x58(%rbp), %rdi movl -0xc(%rbp), %ecx leaq -0x30(%rbp), %rsi movl $0x438, %edx # imm = 0x438 callq 0xca50 jmp 0xc615 movq -0x58(%rbp), %rdi movb $0x0, -0x45(%rbp) leaq 0xa6c4(%rip), %rsi # 0x16ce8 leaq 0x3d5(%rip), %rdx # 0xca00 callq 0x35b0 jmp 0xc680 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0xc655 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x30(%rbp), %rdi callq 0x31e0 leaq -0x31(%rbp), %rdi callq 0x3380 testb $0x1, -0x45(%rbp) jne 0xc666 jmp 0xc66f movq -0x58(%rbp), %rdi callq 0x3240 jmp 0xc677 addq $0x60, %rsp popq %rbp retq movq -0x40(%rbp), %rdi callq 0x35d0
_ZN10serial_cpp6Serial10SerialImpl11writeUnlockEv: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] add rdi, 90h call _pthread_mutex_unlock mov [rbp+var_C], eax cmp [rbp+var_C], 0 jz loc_C671 mov [rbp+var_45], 1 mov edi, 58h ; 'X'; thrown_size call ___cxa_allocate_exception mov [rbp+var_58], rax lea rdi, [rbp+var_31] mov [rbp+var_50], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_50] lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_30] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_C5FE: mov rdi, [rbp+var_58] mov ecx, [rbp+var_C] lea rsi, [rbp+var_30] mov edx, 438h call _ZN10serial_cpp11IOExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii; serial_cpp::IOException::IOException(std::string,int,int) jmp short $+2 loc_C615: mov rdi, [rbp+var_58]; this mov [rbp+var_45], 0 lea rsi, _ZTIN10serial_cpp11IOExceptionE; char * lea rdx, _ZN10serial_cpp11IOExceptionD2Ev; void (*)(void *) call ___cxa_throw jmp short _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*) mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_C655 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C655: lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rbp+var_45], 1 jnz short loc_C666 jmp short loc_C66F loc_C666: mov rdi, [rbp+var_58]; void * call ___cxa_free_exception loc_C66F: jmp short loc_C677 loc_C671: add rsp, 60h pop rbp retn loc_C677: mov rdi, [rbp+var_40] call __Unwind_Resume
long long serial_cpp::Serial::SerialImpl::writeUnlock(serial_cpp::Serial::SerialImpl *this) { long long result; // rax serial_cpp::SerialException *exception; // [rsp+8h] [rbp-58h] char v3; // [rsp+2Fh] [rbp-31h] BYREF _BYTE v4[36]; // [rsp+30h] [rbp-30h] BYREF unsigned int v5; // [rsp+54h] [rbp-Ch] serial_cpp::Serial::SerialImpl *v6; // [rsp+58h] [rbp-8h] v6 = this; result = pthread_mutex_unlock((char *)this + 144); v5 = result; if ( (_DWORD)result ) { exception = (serial_cpp::SerialException *)__cxa_allocate_exception(0x58uLL); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>( (long long)v4, (long long)"/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc", (long long)&v3); serial_cpp::IOException::IOException(exception, v4, 1080LL, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'serial_cpp::IOException, serial_cpp::IOException::~IOException); } return result; }
writeUnlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x90 CALL 0x00103270 MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x0 JZ 0x0010c671 MOV byte ptr [RBP + -0x45],0x1 MOV EDI,0x58 CALL 0x001031a0 MOV qword ptr [RBP + -0x58],RAX LEA RDI,[RBP + -0x31] MOV qword ptr [RBP + -0x50],RDI CALL 0x001035e0 MOV RDX,qword ptr [RBP + -0x50] LAB_0010c5ec: LEA RSI,[0x1102a1] LEA RDI,[RBP + -0x30] CALL 0x00104680 JMP 0x0010c5fe LAB_0010c5fe: MOV RDI,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0xc] LAB_0010c605: LEA RSI,[RBP + -0x30] MOV EDX,0x438 CALL 0x0010ca50 JMP 0x0010c615 LAB_0010c615: MOV RDI,qword ptr [RBP + -0x58] MOV byte ptr [RBP + -0x45],0x0 LEA RSI,[0x116ce8] LEA RDX,[0x10ca00] CALL 0x001035b0 LAB_0010c671: ADD RSP,0x60 POP RBP RET
/* serial_cpp::Serial::SerialImpl::writeUnlock() */ void __thiscall serial_cpp::Serial::SerialImpl::writeUnlock(SerialImpl *this) { IOException *pIVar1; allocator local_39; string local_38 [36]; int local_14; SerialImpl *local_10; local_10 = this; local_14 = pthread_mutex_unlock((pthread_mutex_t *)(this + 0x90)); if (local_14 != 0) { pIVar1 = (IOException *)__cxa_allocate_exception(0x58); std::allocator<char>::allocator(); /* try { // try from 0010c5ec to 0010c5fb has its CatchHandler @ 0010c632 */ std::__cxx11::string::string<std::allocator<char>> (local_38, "/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc", &local_39); /* try { // try from 0010c605 to 0010c62f has its CatchHandler @ 0010c640 */ IOException::IOException(pIVar1,local_38,0x438,local_14); /* WARNING: Subroutine does not return */ __cxa_throw(pIVar1,&IOException::typeinfo,IOException::~IOException); } return; }
53,080
serial_cpp::Serial::SerialImpl::writeUnlock()
ami-iit[P]serial_cpp/src/impl/unix.cc
void Serial::SerialImpl::writeUnlock () { int result = pthread_mutex_unlock(&this->write_mutex); if (result) { THROW (IOException, result); } }
O3
cpp
serial_cpp::Serial::SerialImpl::writeUnlock(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp addq $0x90, %rdi callq 0x3210 testl %eax, %eax jne 0x7de5 addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %eax, %ebp movl $0x58, %edi callq 0x3150 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x3533(%rip), %rsi # 0xb337 leaq 0x3579(%rip), %rdx # 0xb384 movq %rsp, %rdi callq 0x42e0 movb $0x1, %r12b movq %rsp, %rsi movq %rbx, %rdi movl $0x438, %edx # imm = 0x438 movl %ebp, %ecx callq 0x8238 xorl %r12d, %r12d leaq 0x7eb6(%rip), %rsi # 0xfce8 leaq 0x3b7(%rip), %rdx # 0x81f0 movq %rbx, %rdi callq 0x34c0 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x7e5a movq 0x10(%rsp), %rsi incq %rsi callq 0x32c0 testb %r12b, %r12b jne 0x7e64 jmp 0x7e6c movq %rax, %r14 movq %rbx, %rdi callq 0x31e0 movq %r14, %rdi callq 0x34f0
_ZN10serial_cpp6Serial10SerialImpl11writeUnlockEv: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h add rdi, 90h call _pthread_mutex_unlock test eax, eax jnz short loc_7DE5 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_7DE5: mov ebp, eax mov edi, 58h ; 'X'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_38] mov [r15-10h], r15 lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aWorkspaceLlm4b+4Dh; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov r12b, 1 mov rsi, rsp mov rdi, rbx mov edx, 438h mov ecx, ebp call _ZN10serial_cpp11IOExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii; serial_cpp::IOException::IOException(std::string,int,int) xor r12d, r12d lea rsi, _ZTIN10serial_cpp11IOExceptionE; lptinfo lea rdx, _ZN10serial_cpp11IOExceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+48h+var_48]; void * cmp rdi, r15 jz short loc_7E5A mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7E5A: test r12b, r12b jnz short loc_7E64 jmp short loc_7E6C mov r14, rax loc_7E64: mov rdi, rbx; void * call ___cxa_free_exception loc_7E6C: mov rdi, r14 call __Unwind_Resume
long long serial_cpp::Serial::SerialImpl::writeUnlock(serial_cpp::Serial::SerialImpl *this) { long long result; // rax int v2; // ebp void *exception; // rbx int v4; // r8d int v5; // r9d void *v6[2]; // [rsp+0h] [rbp-48h] BYREF long long v7; // [rsp+10h] [rbp-38h] BYREF result = pthread_mutex_unlock((char *)this + 144); if ( (_DWORD)result ) { v2 = result; exception = __cxa_allocate_exception(0x58uLL); v6[0] = &v7; std::string::_M_construct<char const*>( (long long)v6, "/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc", (long long)""); serial_cpp::IOException::IOException((_DWORD)exception, (unsigned int)v6, 1080, v2, v4, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'serial_cpp::IOException, serial_cpp::IOException::~IOException); } return result; }
writeUnlock: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 ADD RDI,0x90 CALL 0x00103210 TEST EAX,EAX JNZ 0x00107de5 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00107de5: MOV EBP,EAX MOV EDI,0x58 CALL 0x00103150 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_00107dfd: LEA RSI,[0x10b337] LEA RDX,[0x10b384] MOV RDI,RSP CALL 0x001042e0 MOV R12B,0x1 LAB_00107e16: MOV RSI,RSP MOV RDI,RBX MOV EDX,0x438 MOV ECX,EBP CALL 0x00108238 XOR R12D,R12D LEA RSI,[0x10fce8] LEA RDX,[0x1081f0] MOV RDI,RBX CALL 0x001034c0
/* serial_cpp::Serial::SerialImpl::writeUnlock() */ void __thiscall serial_cpp::Serial::SerialImpl::writeUnlock(SerialImpl *this) { IOException *pIVar1; int iVar2; int1 *local_48 [2]; int1 local_38 [16]; iVar2 = pthread_mutex_unlock((pthread_mutex_t *)(this + 0x90)); if (iVar2 == 0) { return; } pIVar1 = (IOException *)__cxa_allocate_exception(0x58); local_48[0] = local_38; /* try { // try from 00107dfd to 00107e12 has its CatchHandler @ 00107e61 */ std::__cxx11::string::_M_construct<char_const*> (local_48, "/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc",""); /* try { // try from 00107e16 to 00107e40 has its CatchHandler @ 00107e41 */ IOException::IOException(pIVar1,local_48,0x438,iVar2); /* WARNING: Subroutine does not return */ __cxa_throw(pIVar1,&IOException::typeinfo,IOException::~IOException); }
53,081
reinit_queue
eloqsql/mysys/queues.c
int reinit_queue(QUEUE *queue, uint max_elements, uint offset_to_key, my_bool max_at_top, int (*compare) (void *, uchar *, uchar *), void *first_cmp_arg, uint offset_to_queue_pos, uint auto_extent) { DBUG_ENTER("reinit_queue"); queue->elements= 0; queue->compare= compare; queue->first_cmp_arg= first_cmp_arg; queue->offset_to_key= offset_to_key; queue->offset_to_queue_pos= offset_to_queue_pos; queue->auto_extent= auto_extent; queue_set_max_at_top(queue, max_at_top); DBUG_RETURN(resize_queue(queue, max_elements)); }
O3
c
reinit_queue: pushq %rbp movq %rsp, %rbp movl 0x18(%rbp), %eax movl 0x10(%rbp), %r10d movl $0x0, 0x10(%rdi) movq %r8, 0x28(%rdi) movq %r9, 0x8(%rdi) movl %edx, 0x18(%rdi) movl %r10d, 0x1c(%rdi) movl %eax, 0x20(%rdi) xorl %eax, %eax negb %cl sbbl %eax, %eax orl $0x1, %eax movl %eax, 0x24(%rdi) popq %rbp jmp 0xa50a9
reinit_queue: push rbp mov rbp, rsp mov eax, [rbp+arg_8] mov r10d, [rbp+arg_0] mov dword ptr [rdi+10h], 0 mov [rdi+28h], r8 mov [rdi+8], r9 mov [rdi+18h], edx mov [rdi+1Ch], r10d mov [rdi+20h], eax xor eax, eax neg cl sbb eax, eax or eax, 1 mov [rdi+24h], eax pop rbp jmp $+5
long long reinit_queue(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, int a7, int a8) { *(_DWORD *)(a1 + 16) = 0; *(_QWORD *)(a1 + 40) = a5; *(_QWORD *)(a1 + 8) = a6; *(_DWORD *)(a1 + 24) = a3; *(_DWORD *)(a1 + 28) = a7; *(_DWORD *)(a1 + 32) = a8; LOBYTE(a4) = -(char)a4; *(_DWORD *)(a1 + 36) = (_BYTE)a4 != 0 ? -1 : 1; return resize_queue(a1, a2, a3, a4); }
reinit_queue: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RBP + 0x18] MOV R10D,dword ptr [RBP + 0x10] MOV dword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x28],R8 MOV qword ptr [RDI + 0x8],R9 MOV dword ptr [RDI + 0x18],EDX MOV dword ptr [RDI + 0x1c],R10D MOV dword ptr [RDI + 0x20],EAX XOR EAX,EAX NEG CL SBB EAX,EAX OR EAX,0x1 MOV dword ptr [RDI + 0x24],EAX POP RBP JMP 0x001a50a9
void reinit_queue(long param_1,int8 param_2,int4 param_3,char param_4,int8 param_5 ,int8 param_6,int4 param_7,int4 param_8) { *(int4 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x28) = param_5; *(int8 *)(param_1 + 8) = param_6; *(int4 *)(param_1 + 0x18) = param_3; *(int4 *)(param_1 + 0x1c) = param_7; *(int4 *)(param_1 + 0x20) = param_8; *(uint *)(param_1 + 0x24) = -(uint)(param_4 != '\0') | 1; resize_queue(); return; }
53,082
ma_crypt_post_write_hook
eloqsql/storage/maria/ma_crypt.c
static void ma_crypt_post_write_hook(int res, PAGECACHE_IO_HOOK_ARGS *args) { if (args->crypt_buf != NULL) { uchar *tmp= args->page; args->page= args->crypt_buf; args->crypt_buf= NULL; my_free(tmp); } maria_page_write_failure(res, args); }
O0
c
ma_crypt_post_write_hook: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) je 0x8b109 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x18(%rbp), %rdi callq 0xf5560 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq 0x42f60 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
ma_crypt_post_write_hook: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jz short loc_8B109 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rdi, [rbp+var_18] call my_free loc_8B109: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call maria_page_write_failure add rsp, 20h pop rbp retn
long long ma_crypt_post_write_hook(int a1, long long *a2) { long long v3; // [rsp+8h] [rbp-18h] if ( a2[3] ) { v3 = *a2; *a2 = a2[3]; a2[3] = 0LL; my_free(v3); } return maria_page_write_failure(a1, (long long)a2); }
ma_crypt_post_write_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0018b109 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001f5560 LAB_0018b109: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00142f60 ADD RSP,0x20 POP RBP RET
void ma_crypt_post_write_hook(int4 param_1,int8 *param_2) { int8 uVar1; if (param_2[3] != 0) { uVar1 = *param_2; *param_2 = param_2[3]; param_2[3] = 0; my_free(uVar1); } maria_page_write_failure(param_1,param_2); return; }
53,083
inline_mysql_rwlock_unlock
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_rwlock_unlock( mysql_rwlock_t *that) { int result; #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi); #endif result= rw_unlock(&that->m_rwlock); return result; }
O0
c
inline_mysql_rwlock_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x90(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xc79d1 leaq 0x203b26(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x168(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x102980 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_rwlock_unlock_7: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+90h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_C79D1 lea rax, PSI_server mov rax, [rax] mov rax, [rax+168h] mov rcx, [rbp+var_8] mov rdi, [rcx+90h] call rax loc_C79D1: mov rdi, [rbp+var_8] call my_rw_unlock mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_rwlock_unlock_7(long long a1) { if ( *(_QWORD *)(a1 + 144) ) ((void ( *)(_QWORD))PSI_server[45])(*(_QWORD *)(a1 + 144)); return (unsigned int)my_rw_unlock(a1); }
inline_mysql_rwlock_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x90],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001c79d1 LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x168] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x90] CALL RAX LAB_001c79d1: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00202980 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 inline_mysql_rwlock_unlock(long param_1) { int4 uVar1; if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(*(int8 *)(param_1 + 0x90)); } uVar1 = my_rw_unlock(param_1); return uVar1; }
53,084
js_os_init
bluesky950520[P]quickjs/quickjs-libc.c
static int js_os_init(JSContext *ctx, JSModuleDef *m) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); ts->can_js_os_poll = TRUE; #ifdef USE_WORKER { JSValue proto, obj; /* Worker class */ JS_NewClassID(rt, &ts->worker_class_id); JS_NewClass(rt, ts->worker_class_id, &js_worker_class); proto = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, proto, js_worker_proto_funcs, countof(js_worker_proto_funcs)); obj = JS_NewCFunction2(ctx, js_worker_ctor, "Worker", 1, JS_CFUNC_constructor, 0); JS_SetConstructor(ctx, obj, proto); JS_SetClassProto(ctx, ts->worker_class_id, proto); /* set 'Worker.parent' if necessary */ if (ts->recv_pipe && ts->send_pipe) { JS_DefinePropertyValueStr(ctx, obj, "parent", js_worker_ctor_internal(ctx, JS_UNDEFINED, ts->recv_pipe, ts->send_pipe), JS_PROP_C_W_E); } JS_SetModuleExport(ctx, m, "Worker", obj); } #endif /* USE_WORKER */ return JS_SetModuleExportList(ctx, m, js_os_funcs, countof(js_os_funcs)); }
O2
c
js_os_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, 0x10(%rsp) movq %rdi, %r14 callq 0x1a185 movq %rax, %rbx movq %rax, %rdi callq 0x1028a movq %rax, %r15 movl $0x1, 0x60(%rax) leaq 0x7c(%rax), %rsi movq %rbx, %rdi callq 0x1aa1d movl 0x7c(%r15), %esi leaq 0xab7c0(%rip), %rdx # 0xbb538 movq %rbx, %rdi callq 0x1aa5a movq %r14, %rdi callq 0x1b2c9 movq %rax, %rbp movq %rdx, %rbx leaq 0xa4e5b(%rip), %rcx # 0xb4bf0 pushq $0x2 popq %r12 movq %r14, %rdi movq %rax, %rsi movl %r12d, %r8d callq 0x2c3ff leaq 0x2d87(%rip), %rsi # 0x12b35 leaq 0x72b5c(%rip), %rdx # 0x82911 pushq $0x1 popq %rcx movq %r14, %rdi movl %r12d, %r8d xorl %r9d, %r9d callq 0x1b2dd movq %rax, %r12 movq %rdx, %r13 movq %r14, %rdi movq %rax, %rsi movq %rbp, %rcx movq %rbx, %r8 callq 0x2c8e7 movl 0x7c(%r15), %esi movq %r14, %rdi movq %rbp, %rdx movq %rbx, %rcx callq 0x19ee0 movq 0x68(%r15), %rcx testq %rcx, %rcx je 0xfe30 movq 0x70(%r15), %r8 testq %r8, %r8 je 0xfe30 pushq $0x3 popq %rdx movq %r14, %rdi xorl %esi, %esi callq 0x12d8a movq %rdx, %r9 movl $0x7, (%rsp) leaq 0x72f01(%rip), %rcx # 0x82d20 movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx movq %rax, %r8 callq 0x20a2b leaq 0x72ada(%rip), %rdx # 0x82911 movq %r14, %rdi movq 0x10(%rsp), %rbx movq %rbx, %rsi movq %r12, %rcx movq %r13, %r8 callq 0x2909b leaq 0xa4ddc(%rip), %rdx # 0xb4c30 pushq $0x4a popq %rcx movq %r14, %rdi movq %rbx, %rsi addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2c7a8
js_os_init: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_38], rsi mov r14, rdi call JS_GetRuntime mov rbx, rax mov rdi, rax call js_get_thread_state mov r15, rax mov dword ptr [rax+60h], 1 lea rsi, [rax+7Ch] mov rdi, rbx call JS_NewClassID mov esi, [r15+7Ch] lea rdx, js_worker_class mov rdi, rbx call JS_NewClass mov rdi, r14 call JS_NewObject mov rbp, rax mov rbx, rdx lea rcx, js_worker_proto_funcs push 2 pop r12 mov rdi, r14 mov rsi, rax mov r8d, r12d call JS_SetPropertyFunctionList lea rsi, js_worker_ctor lea rdx, aWorker; "Worker" push 1 pop rcx mov rdi, r14 mov r8d, r12d xor r9d, r9d call JS_NewCFunction2 mov r12, rax mov r13, rdx mov rdi, r14 mov rsi, rax mov rcx, rbp mov r8, rbx call JS_SetConstructor mov esi, [r15+7Ch] mov rdi, r14 mov rdx, rbp mov rcx, rbx call JS_SetClassProto mov rcx, [r15+68h] test rcx, rcx jz short loc_FE30 mov r8, [r15+70h] test r8, r8 jz short loc_FE30 push 3 pop rdx mov rdi, r14 xor esi, esi call js_worker_ctor_internal mov r9, rdx mov [rsp+48h+var_48], 7 lea rcx, aParent; "parent" mov rdi, r14 mov rsi, r12 mov rdx, r13 mov r8, rax call JS_DefinePropertyValueStr loc_FE30: lea rdx, aWorker; "Worker" mov rdi, r14 mov rbx, [rsp+48h+var_38] mov rsi, rbx mov rcx, r12 mov r8, r13 call JS_SetModuleExport lea rdx, js_os_funcs push 4Ah ; 'J' pop rcx mov rdi, r14 mov rsi, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_SetModuleExportList
long long js_os_init(long long a1, long long a2) { long long Runtime; // rbx long long thread_state; // r15 long long v4; // rbp long long v5; // rdx long long v6; // rbx long long v7; // r12 long long v8; // rdx long long v9; // r13 int v10; // eax int v11; // edx Runtime = JS_GetRuntime(); thread_state = js_get_thread_state(Runtime); *(_DWORD *)(thread_state + 96) = 1; JS_NewClassID(Runtime, thread_state + 124); JS_NewClass(Runtime, *(unsigned int *)(thread_state + 124), &js_worker_class); v4 = JS_NewObject(a1); v6 = v5; JS_SetPropertyFunctionList(a1, v4, v5, &js_worker_proto_funcs, 2LL); v7 = JS_NewCFunction2(a1, js_worker_ctor, "Worker", 1LL, 2LL, 0LL); v9 = v8; JS_SetConstructor(a1, v7, v8, v4, v6); JS_SetClassProto(a1, *(unsigned int *)(thread_state + 124), v4, v6); if ( *(_QWORD *)(thread_state + 104) && *(_QWORD *)(thread_state + 112) ) { v10 = js_worker_ctor_internal(a1, 0LL, 3LL); JS_DefinePropertyValueStr(a1, v7, v9, (unsigned int)"parent", v10, v11, 7); } JS_SetModuleExport(a1, a2, "Worker", v7, v9); return JS_SetModuleExportList(a1, a2, &js_os_funcs, 74LL); }
js_os_init: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RSI MOV R14,RDI CALL 0x0011a185 MOV RBX,RAX MOV RDI,RAX CALL 0x0011028a MOV R15,RAX MOV dword ptr [RAX + 0x60],0x1 LEA RSI,[RAX + 0x7c] MOV RDI,RBX CALL 0x0011aa1d MOV ESI,dword ptr [R15 + 0x7c] LEA RDX,[0x1bb538] MOV RDI,RBX CALL 0x0011aa5a MOV RDI,R14 CALL 0x0011b2c9 MOV RBP,RAX MOV RBX,RDX LEA RCX,[0x1b4bf0] PUSH 0x2 POP R12 MOV RDI,R14 MOV RSI,RAX MOV R8D,R12D CALL 0x0012c3ff LEA RSI,[0x112b35] LEA RDX,[0x182911] PUSH 0x1 POP RCX MOV RDI,R14 MOV R8D,R12D XOR R9D,R9D CALL 0x0011b2dd MOV R12,RAX MOV R13,RDX MOV RDI,R14 MOV RSI,RAX MOV RCX,RBP MOV R8,RBX CALL 0x0012c8e7 MOV ESI,dword ptr [R15 + 0x7c] MOV RDI,R14 MOV RDX,RBP MOV RCX,RBX CALL 0x00119ee0 MOV RCX,qword ptr [R15 + 0x68] TEST RCX,RCX JZ 0x0010fe30 MOV R8,qword ptr [R15 + 0x70] TEST R8,R8 JZ 0x0010fe30 PUSH 0x3 POP RDX MOV RDI,R14 XOR ESI,ESI CALL 0x00112d8a MOV R9,RDX MOV dword ptr [RSP],0x7 LEA RCX,[0x182d20] MOV RDI,R14 MOV RSI,R12 MOV RDX,R13 MOV R8,RAX CALL 0x00120a2b LAB_0010fe30: LEA RDX,[0x182911] MOV RDI,R14 MOV RBX,qword ptr [RSP + 0x10] MOV RSI,RBX MOV RCX,R12 MOV R8,R13 CALL 0x0012909b LEA RDX,[0x1b4c30] PUSH 0x4a POP RCX MOV RDI,R14 MOV RSI,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0012c7a8
void js_os_init(int8 param_1,int8 param_2) { int8 uVar1; long lVar2; int8 uVar3; int8 uVar4; int8 uVar5; int1 auVar6 [16]; uVar1 = JS_GetRuntime(); lVar2 = js_get_thread_state(uVar1); *(int4 *)(lVar2 + 0x60) = 1; JS_NewClassID(uVar1,lVar2 + 0x7c); JS_NewClass(uVar1,*(int4 *)(lVar2 + 0x7c),js_worker_class); auVar6 = JS_NewObject(param_1); uVar4 = auVar6._8_8_; uVar1 = auVar6._0_8_; JS_SetPropertyFunctionList(param_1,uVar1,uVar4,js_worker_proto_funcs,2); auVar6 = JS_NewCFunction2(param_1,js_worker_ctor,"Worker",1,2,0); uVar5 = auVar6._8_8_; uVar3 = auVar6._0_8_; JS_SetConstructor(param_1,uVar3,uVar5,uVar1,uVar4); JS_SetClassProto(param_1,*(int4 *)(lVar2 + 0x7c),uVar1,uVar4); if ((*(long *)(lVar2 + 0x68) != 0) && (*(long *)(lVar2 + 0x70) != 0)) { auVar6 = js_worker_ctor_internal(param_1,0,3); JS_DefinePropertyValueStr(param_1,uVar3,uVar5,"parent",auVar6._0_8_,auVar6._8_8_,7); } JS_SetModuleExport(param_1,param_2,"Worker",uVar3,uVar5); JS_SetModuleExportList(param_1,param_2,js_os_funcs,0x4a); return; }
53,085
my_caseup_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_caseup_utf32(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= my_utf32_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0) { my_toupper_utf32(uni_plane, &wc); if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_caseup_utf32: movq %rdx, %rax cmpq $0x4, %rdx jl 0xe9569 pushq %rbp movq %rsp, %rbp pushq %rbx leaq (%rsi,%rax), %rdx addq %rcx, %r8 movq 0x78(%rdi), %rdi addq $0x4, %rcx movzbl (%rsi), %r9d shll $0x18, %r9d movzbl 0x1(%rsi), %r10d shll $0x10, %r10d orl %r9d, %r10d cmpl $0x10ffff, %r10d # imm = 0x10FFFF ja 0xe9567 movzbl 0x2(%rsi), %ebx shll $0x8, %ebx movzbl 0x3(%rsi), %r9d orq %r9, %rbx orq %r10, %rbx cmpq (%rdi), %rbx ja 0xe9528 movq 0x8(%rdi), %r10 movl %ebx, %r11d shrl $0x8, %r11d movq (%r10,%r11,8), %r10 testq %r10, %r10 je 0xe9528 leaq (%r9,%r9,2), %r9 movl (%r10,%r9,4), %ebx cmpq %r8, %rcx ja 0xe9567 cmpl $0x10ffff, %ebx # imm = 0x10FFFF ja 0xe9567 movb $0x0, -0x4(%rcx) movl %ebx, %r9d shrl $0x10, %r9d movb %r9b, -0x3(%rcx) movb %bh, -0x2(%rcx) movb %bl, -0x1(%rcx) leaq 0x4(%rsi), %r9 cmpq %rdx, %r9 jae 0xe9567 addq $0x8, %rsi addq $0x4, %rcx cmpq %rdx, %rsi movq %r9, %rsi jbe 0xe94d8 popq %rbx popq %rbp retq
my_caseup_utf32: mov rax, rdx cmp rdx, 4 jl locret_E9569 push rbp mov rbp, rsp push rbx lea rdx, [rsi+rax] add r8, rcx mov rdi, [rdi+78h] add rcx, 4 loc_E94D8: movzx r9d, byte ptr [rsi] shl r9d, 18h movzx r10d, byte ptr [rsi+1] shl r10d, 10h or r10d, r9d cmp r10d, offset unk_10FFFF ja short loc_E9567 movzx ebx, byte ptr [rsi+2] shl ebx, 8 movzx r9d, byte ptr [rsi+3] or rbx, r9 or rbx, r10 cmp rbx, [rdi] ja short loc_E9528 mov r10, [rdi+8] mov r11d, ebx shr r11d, 8 mov r10, [r10+r11*8] test r10, r10 jz short loc_E9528 lea r9, [r9+r9*2] mov ebx, [r10+r9*4] loc_E9528: cmp rcx, r8 ja short loc_E9567 cmp ebx, offset unk_10FFFF ja short loc_E9567 mov byte ptr [rcx-4], 0 mov r9d, ebx shr r9d, 10h mov [rcx-3], r9b mov [rcx-2], bh mov [rcx-1], bl lea r9, [rsi+4] cmp r9, rdx jnb short loc_E9567 add rsi, 8 add rcx, 4 cmp rsi, rdx mov rsi, r9 jbe loc_E94D8 loc_E9567: pop rbx pop rbp locret_E9569: retn
long long my_caseup_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5) { long long result; // rax unsigned long long v6; // rdx unsigned long long v7; // r8 unsigned long long *v8; // rdi unsigned long long v9; // rcx long long v10; // r10 long long v11; // r9 unsigned long long v12; // rbx long long v13; // r10 bool v14; // cc result = a3; if ( a3 >= 4 ) { v6 = (unsigned long long)&a2[a3]; v7 = a4 + a5; v8 = *(unsigned long long **)(a1 + 120); v9 = a4 + 4; do { v10 = (*a2 << 24) | (a2[1] << 16); if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF ) break; v11 = a2[3]; v12 = v10 | v11 | (a2[2] << 8); if ( v12 <= *v8 ) { v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8)); if ( v13 ) LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11); } if ( v9 > v7 ) break; if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF ) break; *(_BYTE *)(v9 - 4) = 0; *(_BYTE *)(v9 - 3) = BYTE2(v12); *(_BYTE *)(v9 - 2) = BYTE1(v12); *(_BYTE *)(v9 - 1) = v12; if ( (unsigned long long)(a2 + 4) >= v6 ) break; v9 += 4LL; v14 = (unsigned long long)(a2 + 8) <= v6; a2 += 4; } while ( v14 ); } return result; }
my_caseup_utf32: MOV RAX,RDX CMP RDX,0x4 JL 0x001e9569 PUSH RBP MOV RBP,RSP PUSH RBX LEA RDX,[RSI + RAX*0x1] ADD R8,RCX MOV RDI,qword ptr [RDI + 0x78] ADD RCX,0x4 LAB_001e94d8: MOVZX R9D,byte ptr [RSI] SHL R9D,0x18 MOVZX R10D,byte ptr [RSI + 0x1] SHL R10D,0x10 OR R10D,R9D CMP R10D,0x10ffff JA 0x001e9567 MOVZX EBX,byte ptr [RSI + 0x2] SHL EBX,0x8 MOVZX R9D,byte ptr [RSI + 0x3] OR RBX,R9 OR RBX,R10 CMP RBX,qword ptr [RDI] JA 0x001e9528 MOV R10,qword ptr [RDI + 0x8] MOV R11D,EBX SHR R11D,0x8 MOV R10,qword ptr [R10 + R11*0x8] TEST R10,R10 JZ 0x001e9528 LEA R9,[R9 + R9*0x2] MOV EBX,dword ptr [R10 + R9*0x4] LAB_001e9528: CMP RCX,R8 JA 0x001e9567 CMP EBX,0x10ffff JA 0x001e9567 MOV byte ptr [RCX + -0x4],0x0 MOV R9D,EBX SHR R9D,0x10 MOV byte ptr [RCX + -0x3],R9B MOV byte ptr [RCX + -0x2],BH MOV byte ptr [RCX + -0x1],BL LEA R9,[RSI + 0x4] CMP R9,RDX JNC 0x001e9567 ADD RSI,0x8 ADD RCX,0x4 CMP RSI,RDX MOV RSI,R9 JBE 0x001e94d8 LAB_001e9567: POP RBX POP RBP LAB_001e9569: RET
void my_caseup_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5) { ulong *puVar1; long lVar2; ulong uVar3; ulong uVar4; byte *pbVar5; byte *pbVar6; uint uVar7; if (3 < param_3) { puVar1 = *(ulong **)(param_1 + 0x78); uVar3 = param_4 + 4; pbVar5 = param_2; while (uVar7 = (uint)pbVar5[1] << 0x10 | (uint)*pbVar5 << 0x18, uVar7 < 0x110000) { uVar4 = (ulong)CONCAT11(pbVar5[2],pbVar5[3]) | (ulong)uVar7; if ((uVar4 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (uVar4 >> 8) * 8), lVar2 != 0)) { uVar4 = (ulong)*(uint *)(lVar2 + (ulong)pbVar5[3] * 0xc); } if ((ulong)(param_5 + param_4) < uVar3) { return; } if (0x10ffff < (uint)uVar4) { return; } *(int1 *)(uVar3 - 4) = 0; *(char *)(uVar3 - 3) = (char)(uVar4 >> 0x10); *(char *)(uVar3 - 2) = (char)(uVar4 >> 8); *(char *)(uVar3 - 1) = (char)uVar4; if (param_2 + param_3 <= pbVar5 + 4) { return; } pbVar6 = pbVar5 + 8; uVar3 = uVar3 + 4; pbVar5 = pbVar5 + 4; if (param_2 + param_3 < pbVar6) { return; } } } return; }
53,086
ma_mark_file_changed_now
eloqsql/storage/maria/ma_locking.c
int _ma_mark_file_changed_now(register MARIA_SHARE *share) { uchar buff[3]; int error= 1; DBUG_ENTER("_ma_mark_file_changed_now"); if (_MA_ALREADY_MARKED_FILE_CHANGED) DBUG_RETURN(0); mysql_mutex_lock(&share->intern_lock); /* recheck under mutex */ if (! _MA_ALREADY_MARKED_FILE_CHANGED) { share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED | STATE_NOT_OPTIMIZED_KEYS); if (!share->global_changed) { share->changed= share->global_changed= 1; share->state.open_count++; } /* Temp tables don't need an open_count as they are removed on crash. In theory transactional tables are fixed by log-based recovery, so don't need an open_count either, but if recovery has failed and logs have been removed (by maria-force-start-after-recovery-failures), we still need to detect dubious tables. If we didn't maintain open_count on disk for a table, after a crash we wouldn't know if it was closed at crash time (thus does not need a check) or not. So we would have to check all tables: overkill. */ if (!share->temporary) { CRASH_IF_S3_TABLE(share); mi_int2store(buff,share->state.open_count); buff[2]=1; /* Mark that it's changed */ if (my_pwrite(share->kfile.file, buff, sizeof(buff), sizeof(share->state.header) + MARIA_FILE_OPEN_COUNT_OFFSET, MYF(MY_NABP))) goto err; } /* Set uuid of file if not yet set (zerofilled file) */ if (share->base.born_transactional && !(share->state.org_changed & STATE_NOT_MOVABLE)) { CRASH_IF_S3_TABLE(share); /* Lock table to current installation */ if (_ma_set_uuid(share, 0) || (share->state.create_rename_lsn == LSN_NEEDS_NEW_STATE_LSNS && _ma_update_state_lsns_sub(share, LSN_IMPOSSIBLE, trnman_get_min_trid(), TRUE, TRUE))) goto err; share->state.changed|= STATE_NOT_MOVABLE; share->state.org_changed|= STATE_NOT_MOVABLE; } } error= 0; err: mysql_mutex_unlock(&share->intern_lock); DBUG_RETURN(error); #undef _MA_ALREADY_MARKED_FILE_CHANGED }
O0
c
ma_mark_file_changed_now: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x1, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x170(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x35df3 movq -0x10(%rbp), %rax movsbl 0x7df(%rax), %eax cmpl $0x0, %eax je 0x35df3 jmp 0x35de7 movl $0x0, -0x4(%rbp) jmp 0x35fa4 movq -0x10(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0x11b714(%rip), %rsi # 0x151519 movl $0x1ad, %edx # imm = 0x1AD callq 0x35a20 movq -0x10(%rbp), %rax movl 0x170(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x35e35 movq -0x10(%rbp), %rax movsbl 0x7df(%rax), %eax cmpl $0x0, %eax jne 0x35f87 movq -0x10(%rbp), %rax movl 0x170(%rax), %ecx orl $0x19, %ecx movl %ecx, 0x170(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x7df(%rax) jne 0x35e7e movq -0x10(%rbp), %rax movb $0x1, 0x7df(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x7de(%rax) movq -0x10(%rbp), %rax movl 0x16c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x16c(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x7d9(%rax) jne 0x35edf jmp 0x35e8d jmp 0x35e8f movq -0x10(%rbp), %rax movl 0x16c(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movb %al, -0x12(%rbp) movl -0x1c(%rbp), %eax shrl $0x8, %eax movb %al, -0x13(%rbp) movb $0x1, -0x11(%rbp) movq -0x10(%rbp), %rax movl 0x760(%rax), %edi leaq -0x13(%rbp), %rsi movl $0x3, %edx movl $0x18, %ecx movl $0x4, %r8d callq 0xf4860 cmpq $0x0, %rax je 0x35edd jmp 0x35f8e jmp 0x35edf movq -0x10(%rbp), %rax movsbl 0x44c(%rax), %eax cmpl $0x0, %eax je 0x35f85 movq -0x10(%rbp), %rax movl 0x174(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0x35f85 jmp 0x35f09 jmp 0x35f0b movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x35fb0 movsbl %al, %eax cmpl $0x0, %eax jne 0x35f57 movq -0x10(%rbp), %rax cmpq $0x2, 0x178(%rax) jne 0x35f59 movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) callq 0x4d8d0 movq -0x28(%rbp), %rdi movq %rax, %rdx xorl %eax, %eax movl %eax, %esi movl $0x1, %r8d movl %r8d, %ecx callq 0x4aa40 cmpl $0x0, %eax je 0x35f59 jmp 0x35f8e movq -0x10(%rbp), %rax movl 0x170(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0x170(%rax) movq -0x10(%rbp), %rax movl 0x174(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0x174(%rax) jmp 0x35f87 movl $0x0, -0x18(%rbp) movq -0x10(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x35bc0 movl -0x18(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ma_mark_file_changed_now: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], 1 mov rax, [rbp+var_10] mov eax, [rax+170h] and eax, 1 cmp eax, 0 jz short loc_35DF3 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+7DFh] cmp eax, 0 jz short loc_35DF3 jmp short $+2 loc_35DE7: mov [rbp+var_4], 0 jmp loc_35FA4 loc_35DF3: mov rdi, [rbp+var_10] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1ADh call inline_mysql_mutex_lock_2 mov rax, [rbp+var_10] mov eax, [rax+170h] and eax, 1 cmp eax, 0 jz short loc_35E35 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+7DFh] cmp eax, 0 jnz loc_35F87 loc_35E35: mov rax, [rbp+var_10] mov ecx, [rax+170h] or ecx, 19h mov [rax+170h], ecx mov rax, [rbp+var_10] cmp byte ptr [rax+7DFh], 0 jnz short loc_35E7E mov rax, [rbp+var_10] mov byte ptr [rax+7DFh], 1 mov rax, [rbp+var_10] mov byte ptr [rax+7DEh], 1 mov rax, [rbp+var_10] mov ecx, [rax+16Ch] add ecx, 1 mov [rax+16Ch], ecx loc_35E7E: mov rax, [rbp+var_10] cmp byte ptr [rax+7D9h], 0 jnz short loc_35EDF jmp short $+2 loc_35E8D: jmp short $+2 loc_35E8F: mov rax, [rbp+var_10] mov eax, [rax+16Ch] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov [rbp+var_12], al mov eax, [rbp+var_1C] shr eax, 8 mov [rbp+var_13], al mov [rbp+var_11], 1 mov rax, [rbp+var_10] mov edi, [rax+760h] lea rsi, [rbp+var_13] mov edx, 3 mov ecx, 18h mov r8d, 4 call my_pwrite cmp rax, 0 jz short loc_35EDD jmp loc_35F8E loc_35EDD: jmp short $+2 loc_35EDF: mov rax, [rbp+var_10] movsx eax, byte ptr [rax+44Ch] cmp eax, 0 jz loc_35F85 mov rax, [rbp+var_10] mov eax, [rax+174h] and eax, 100h cmp eax, 0 jnz short loc_35F85 jmp short $+2 loc_35F09: jmp short $+2 loc_35F0B: mov rdi, [rbp+var_10] xor esi, esi call _ma_set_uuid movsx eax, al cmp eax, 0 jnz short loc_35F57 mov rax, [rbp+var_10] cmp qword ptr [rax+178h], 2 jnz short loc_35F59 mov rax, [rbp+var_10] mov [rbp+var_28], rax call trnman_get_min_trid mov rdi, [rbp+var_28] mov rdx, rax xor eax, eax mov esi, eax mov r8d, 1 mov ecx, r8d call _ma_update_state_lsns_sub cmp eax, 0 jz short loc_35F59 loc_35F57: jmp short loc_35F8E loc_35F59: mov rax, [rbp+var_10] mov ecx, [rax+170h] or ecx, 100h mov [rax+170h], ecx mov rax, [rbp+var_10] mov ecx, [rax+174h] or ecx, 100h mov [rax+174h], ecx loc_35F85: jmp short $+2 loc_35F87: mov [rbp+var_18], 0 loc_35F8E: mov rdi, [rbp+var_10] add rdi, 8F0h call inline_mysql_mutex_unlock_2 mov eax, [rbp+var_18] mov [rbp+var_4], eax loc_35FA4: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ma_mark_file_changed_now(long long a1) { __int16 v1; // kr00_2 long long min_trid; // rax long long v4; // [rsp+8h] [rbp-28h] unsigned int v5; // [rsp+18h] [rbp-18h] _BYTE v6[3]; // [rsp+1Dh] [rbp-13h] BYREF long long v7; // [rsp+20h] [rbp-10h] v7 = a1; v5 = 1; if ( (*(_DWORD *)(a1 + 368) & 1) == 0 || !*(_BYTE *)(v7 + 2015) ) { inline_mysql_mutex_lock_2( v7 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x1ADu); if ( (*(_DWORD *)(v7 + 368) & 1) == 0 || !*(_BYTE *)(v7 + 2015) ) { *(_DWORD *)(v7 + 368) |= 0x19u; if ( !*(_BYTE *)(v7 + 2015) ) { *(_BYTE *)(v7 + 2015) = 1; *(_BYTE *)(v7 + 2014) = 1; ++*(_DWORD *)(v7 + 364); } if ( !*(_BYTE *)(v7 + 2009) ) { v1 = *(_DWORD *)(v7 + 364); v6[0] = HIBYTE(v1); v6[1] = v1; v6[2] = 1; if ( my_pwrite(*(unsigned int *)(v7 + 1888), v6, 3LL, 24LL) ) goto LABEL_18; } if ( *(_BYTE *)(v7 + 1100) && (*(_DWORD *)(v7 + 372) & 0x100) == 0 ) { if ( (unsigned __int8)ma_set_uuid(v7, 0LL) ) goto LABEL_18; if ( *(_QWORD *)(v7 + 376) == 2LL ) { v4 = v7; min_trid = trnman_get_min_trid(); if ( (unsigned int)ma_update_state_lsns_sub(v4, 0LL, min_trid, 1LL) ) goto LABEL_18; } *(_DWORD *)(v7 + 368) |= 0x100u; *(_DWORD *)(v7 + 372) |= 0x100u; } } v5 = 0; LABEL_18: inline_mysql_mutex_unlock_2(v7 + 2288); return v5; } return 0; }
_ma_mark_file_changed_now: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x18],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x170] AND EAX,0x1 CMP EAX,0x0 JZ 0x00135df3 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x7df] CMP EAX,0x0 JZ 0x00135df3 JMP 0x00135de7 LAB_00135de7: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00135fa4 LAB_00135df3: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8f0 LEA RSI,[0x251519] MOV EDX,0x1ad CALL 0x00135a20 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x170] AND EAX,0x1 CMP EAX,0x0 JZ 0x00135e35 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x7df] CMP EAX,0x0 JNZ 0x00135f87 LAB_00135e35: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x19 MOV dword ptr [RAX + 0x170],ECX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x7df],0x0 JNZ 0x00135e7e MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x7df],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x7de],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x16c] ADD ECX,0x1 MOV dword ptr [RAX + 0x16c],ECX LAB_00135e7e: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x7d9],0x0 JNZ 0x00135edf JMP 0x00135e8d LAB_00135e8d: JMP 0x00135e8f LAB_00135e8f: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x16c] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV byte ptr [RBP + -0x12],AL MOV EAX,dword ptr [RBP + -0x1c] SHR EAX,0x8 MOV byte ptr [RBP + -0x13],AL MOV byte ptr [RBP + -0x11],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x760] LEA RSI,[RBP + -0x13] MOV EDX,0x3 MOV ECX,0x18 MOV R8D,0x4 CALL 0x001f4860 CMP RAX,0x0 JZ 0x00135edd JMP 0x00135f8e LAB_00135edd: JMP 0x00135edf LAB_00135edf: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x44c] CMP EAX,0x0 JZ 0x00135f85 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x174] AND EAX,0x100 CMP EAX,0x0 JNZ 0x00135f85 JMP 0x00135f09 LAB_00135f09: JMP 0x00135f0b LAB_00135f0b: MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00135fb0 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x00135f57 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x178],0x2 JNZ 0x00135f59 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX CALL 0x0014d8d0 MOV RDI,qword ptr [RBP + -0x28] MOV RDX,RAX XOR EAX,EAX MOV ESI,EAX MOV R8D,0x1 MOV ECX,R8D CALL 0x0014aa40 CMP EAX,0x0 JZ 0x00135f59 LAB_00135f57: JMP 0x00135f8e LAB_00135f59: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x100 MOV dword ptr [RAX + 0x170],ECX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x174] OR ECX,0x100 MOV dword ptr [RAX + 0x174],ECX LAB_00135f85: JMP 0x00135f87 LAB_00135f87: MOV dword ptr [RBP + -0x18],0x0 LAB_00135f8e: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8f0 CALL 0x00135bc0 MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x4],EAX LAB_00135fa4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 _ma_mark_file_changed_now(long param_1) { char cVar1; int iVar2; long lVar3; int8 uVar4; int4 local_20; int1 local_1b; int1 local_1a; int1 local_19; long local_18; local_20 = 1; if (((*(uint *)(param_1 + 0x170) & 1) != 0) && (*(char *)(param_1 + 0x7df) != '\0')) { return 0; } local_18 = param_1; inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x1ad); if (((*(uint *)(local_18 + 0x170) & 1) == 0) || (*(char *)(local_18 + 0x7df) == '\0')) { *(uint *)(local_18 + 0x170) = *(uint *)(local_18 + 0x170) | 0x19; if (*(char *)(local_18 + 0x7df) == '\0') { *(int1 *)(local_18 + 0x7df) = 1; *(int1 *)(local_18 + 0x7de) = 1; *(int *)(local_18 + 0x16c) = *(int *)(local_18 + 0x16c) + 1; } if (*(char *)(local_18 + 0x7d9) == '\0') { local_1a = (int1)*(int4 *)(local_18 + 0x16c); local_1b = (int1)((uint)*(int4 *)(local_18 + 0x16c) >> 8); local_19 = 1; lVar3 = my_pwrite(*(int4 *)(local_18 + 0x760),&local_1b,3,0x18,4); if (lVar3 != 0) goto LAB_00135f8e; } if ((*(char *)(local_18 + 0x44c) != '\0') && ((*(uint *)(local_18 + 0x174) & 0x100) == 0)) { cVar1 = _ma_set_uuid(local_18,0); lVar3 = local_18; if (cVar1 != '\0') goto LAB_00135f8e; if (*(long *)(local_18 + 0x178) == 2) { uVar4 = trnman_get_min_trid(); iVar2 = _ma_update_state_lsns_sub(lVar3,0,uVar4,1); if (iVar2 != 0) goto LAB_00135f8e; } *(uint *)(local_18 + 0x170) = *(uint *)(local_18 + 0x170) | 0x100; *(uint *)(local_18 + 0x174) = *(uint *)(local_18 + 0x174) | 0x100; } } local_20 = 0; LAB_00135f8e: inline_mysql_mutex_unlock(local_18 + 0x8f0); return local_20; }
53,087
rw_pr_wrlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_wrlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); if (rwlock->active_readers != 0) { /* There are active readers. We have to wait until they are gone. */ rwlock->writers_waiting_readers++; while (rwlock->active_readers != 0) pthread_cond_wait(&rwlock->no_active_readers, &rwlock->lock); rwlock->writers_waiting_readers--; } /* We own 'lock' mutex so there is no active writers. Also there are no active readers. This means that we can grant wr-lock. Not releasing 'lock' mutex until unlock will block both requests for rd and wr-locks. Set 'active_writer' flag to simplify unlock. Thanks to the fact wr-lock/unlock in the absence of contention from readers is essentially mutex lock/unlock with a few simple checks make this rwlock implementation wr-lock optimized. */ rwlock->active_writer= TRUE; #ifdef SAFE_MUTEX rwlock->writer_thread= pthread_self(); #endif return 0; }
O0
c
rw_pr_wrlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x25580 movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) je 0x32876 movq -0x8(%rbp), %rax movl 0x5c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x5c(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) je 0x32869 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi callq 0x25620 jmp 0x3284c movq -0x8(%rbp), %rax movl 0x5c(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x5c(%rax) movq -0x8(%rbp), %rax movb $0x1, 0x60(%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rw_pr_wrlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jz short loc_32876 mov rax, [rbp+var_8] mov ecx, [rax+5Ch] add ecx, 1 mov [rax+5Ch], ecx loc_3284C: mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jz short loc_32869 mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] call _pthread_cond_wait jmp short loc_3284C loc_32869: mov rax, [rbp+var_8] mov ecx, [rax+5Ch] add ecx, 0FFFFFFFFh mov [rax+5Ch], ecx loc_32876: mov rax, [rbp+var_8] mov byte ptr [rax+60h], 1 xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_wrlock(long long a1) { pthread_mutex_lock(a1); if ( *(_DWORD *)(a1 + 88) ) { ++*(_DWORD *)(a1 + 92); while ( *(_DWORD *)(a1 + 88) ) pthread_cond_wait(a1 + 40, a1); --*(_DWORD *)(a1 + 92); } *(_BYTE *)(a1 + 96) = 1; return 0LL; }
rw_pr_wrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00125580 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JZ 0x00132876 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x5c] ADD ECX,0x1 MOV dword ptr [RAX + 0x5c],ECX LAB_0013284c: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JZ 0x00132869 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] CALL 0x00125620 JMP 0x0013284c LAB_00132869: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x5c] ADD ECX,-0x1 MOV dword ptr [RAX + 0x5c],ECX LAB_00132876: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x1 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_wrlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); if (*(int *)((long)param_1 + 0x58) != 0) { *(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + 1; while (*(int *)((long)param_1 + 0x58) != 0) { pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1); } *(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + -1; } *(int1 *)((long)param_1 + 0x60) = 1; return 0; }
53,088
rak_token_kind_to_cstr
fabiosvm[P]rak/src/lexer.c
const char *rak_token_kind_to_cstr(RakTokenKind kind) { char *cstr = NULL; switch (kind) { case RAK_TOKEN_KIND_EOF: cstr = "eof"; break; case RAK_TOKEN_KIND_COMMA: cstr = "','"; break; case RAK_TOKEN_KIND_COLON: cstr = "':'"; break; case RAK_TOKEN_KIND_SEMICOLON: cstr = "';'"; break; case RAK_TOKEN_KIND_LPAREN: cstr = "'('"; break; case RAK_TOKEN_KIND_RPAREN: cstr = "')'"; break; case RAK_TOKEN_KIND_LBRACKET: cstr = "'['"; break; case RAK_TOKEN_KIND_RBRACKET: cstr = "']'"; break; case RAK_TOKEN_KIND_LBRACE: cstr = "'{'"; break; case RAK_TOKEN_KIND_RBRACE: cstr = "'}'"; break; case RAK_TOKEN_KIND_PIPEPIPE: cstr = "'||'"; break; case RAK_TOKEN_KIND_AMPAMP: cstr = "'&&'"; break; case RAK_TOKEN_KIND_AMP: cstr = "'&'"; break; case RAK_TOKEN_KIND_EQEQ: cstr = "'=='"; break; case RAK_TOKEN_KIND_EQ: cstr = "'='"; break; case RAK_TOKEN_KIND_BANGEQ: cstr = "'!='"; break; case RAK_TOKEN_KIND_BANG: cstr = "'!'"; break; case RAK_TOKEN_KIND_GTEQ: cstr = "'>='"; break; case RAK_TOKEN_KIND_GT: cstr = "'>'"; break; case RAK_TOKEN_KIND_LTEQ: cstr = "'<='"; break; case RAK_TOKEN_KIND_LT: cstr = "'<'"; break; case RAK_TOKEN_KIND_DOTDOT: cstr = "'..'"; break; case RAK_TOKEN_KIND_DOT: cstr = "'.'"; break; case RAK_TOKEN_KIND_PLUSEQ: cstr = "'+='"; break; case RAK_TOKEN_KIND_PLUS: cstr = "'+'"; break; case RAK_TOKEN_KIND_MINUSEQ: cstr = "'-='"; break; case RAK_TOKEN_KIND_MINUS: cstr = "'-'"; break; case RAK_TOKEN_KIND_STAREQ: cstr = "'*='"; break; case RAK_TOKEN_KIND_STAR: cstr = "'*'"; break; case RAK_TOKEN_KIND_SLASHEQ: cstr = "'/='"; break; case RAK_TOKEN_KIND_SLASH: cstr = "'/'"; break; case RAK_TOKEN_KIND_PERCENTEQ: cstr = "'%='"; break; case RAK_TOKEN_KIND_PERCENT: cstr = "'%'"; break; case RAK_TOKEN_KIND_NUMBER: cstr = "number"; break; case RAK_TOKEN_KIND_STRING: cstr = "string"; break; case RAK_TOKEN_KIND_BREAK_KW: cstr = "break"; break; case RAK_TOKEN_KIND_CONTINUE_KW: cstr = "continue"; break; case RAK_TOKEN_KIND_DO_KW: cstr = "do"; break; case RAK_TOKEN_KIND_ELSE_KW: cstr = "else"; break; case RAK_TOKEN_KIND_FALSE_KW: cstr = "false"; break; case RAK_TOKEN_KIND_IF_KW: cstr = "if"; break; case RAK_TOKEN_KIND_LET_KW: cstr = "let"; break; case RAK_TOKEN_KIND_LOOP_KW: cstr = "loop"; break; case RAK_TOKEN_KIND_NIL_KW: cstr = "nil"; break; case RAK_TOKEN_KIND_TRUE_KW: cstr = "true"; break; case RAK_TOKEN_KIND_WHILE_KW: cstr = "while"; break; case RAK_TOKEN_KIND_IDENT: cstr = "identifier"; break; } return cstr; }
O0
c
rak_token_kind_to_cstr: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movq $0x0, -0x10(%rbp) movl -0x4(%rbp), %eax movq %rax, -0x18(%rbp) subq $0x2e, %rax ja 0x8654 movq -0x18(%rbp), %rax leaq 0x62d5(%rip), %rcx # 0xe650 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x6381(%rip), %rax # 0xe70c movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6375(%rip), %rax # 0xe710 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6369(%rip), %rax # 0xe714 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x635d(%rip), %rax # 0xe718 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6351(%rip), %rax # 0xe71c movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6345(%rip), %rax # 0xe720 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6339(%rip), %rax # 0xe724 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x632d(%rip), %rax # 0xe728 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6321(%rip), %rax # 0xe72c movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6315(%rip), %rax # 0xe730 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6309(%rip), %rax # 0xe734 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62fe(%rip), %rax # 0xe739 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62f3(%rip), %rax # 0xe73e movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62e7(%rip), %rax # 0xe742 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62dc(%rip), %rax # 0xe747 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62d0(%rip), %rax # 0xe74b movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62c5(%rip), %rax # 0xe750 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62b9(%rip), %rax # 0xe754 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62ae(%rip), %rax # 0xe759 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x62a2(%rip), %rax # 0xe75d movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6297(%rip), %rax # 0xe762 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x628b(%rip), %rax # 0xe766 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6280(%rip), %rax # 0xe76b movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6274(%rip), %rax # 0xe76f movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6269(%rip), %rax # 0xe774 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x625d(%rip), %rax # 0xe778 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6252(%rip), %rax # 0xe77d movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6246(%rip), %rax # 0xe781 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x623b(%rip), %rax # 0xe786 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x622f(%rip), %rax # 0xe78a movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6224(%rip), %rax # 0xe78f movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6218(%rip), %rax # 0xe793 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x620d(%rip), %rax # 0xe798 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6467(%rip), %rax # 0xea02 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x5c9c(%rip), %rax # 0xe247 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x61e1(%rip), %rax # 0xe79c movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x61d7(%rip), %rax # 0xe7a2 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x61d0(%rip), %rax # 0xe7ab movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x61c6(%rip), %rax # 0xe7ae movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x61be(%rip), %rax # 0xe7b3 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x61b7(%rip), %rax # 0xe7b9 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x61ad(%rip), %rax # 0xe7bc movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x5fba(%rip), %rax # 0xe5d6 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x5bfa(%rip), %rax # 0xe223 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x618a(%rip), %rax # 0xe7c0 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x6182(%rip), %rax # 0xe7c5 movq %rax, -0x10(%rbp) jmp 0x8654 leaq 0x617b(%rip), %rax # 0xe7cb movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
rak_token_kind_to_cstr: push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_10], 0 mov eax, [rbp+var_4] mov [rbp+var_18], rax sub rax, 2Eh; switch 47 cases ja def_8382; jumptable 0000000000008382 default case mov rax, [rbp+var_18] lea rcx, jpt_8382 movsxd rax, ds:(jpt_8382 - 0E650h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_8384: lea rax, unk_E70C; jumptable 0000000000008382 case 0 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8394: lea rax, unk_E710; jumptable 0000000000008382 case 1 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_83A4: lea rax, unk_E714; jumptable 0000000000008382 case 2 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_83B4: lea rax, unk_E718; jumptable 0000000000008382 case 3 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_83C4: lea rax, unk_E71C; jumptable 0000000000008382 case 4 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_83D4: lea rax, unk_E720; jumptable 0000000000008382 case 5 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_83E4: lea rax, unk_E724; jumptable 0000000000008382 case 6 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_83F4: lea rax, unk_E728; jumptable 0000000000008382 case 7 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8404: lea rax, unk_E72C; jumptable 0000000000008382 case 8 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8414: lea rax, unk_E730; jumptable 0000000000008382 case 9 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8424: lea rax, asc_E734; jumptable 0000000000008382 case 10 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8434: lea rax, asc_E739; jumptable 0000000000008382 case 11 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8444: lea rax, asc_E73E; jumptable 0000000000008382 case 12 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8454: lea rax, asc_E742; jumptable 0000000000008382 case 13 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8464: lea rax, asc_E747; jumptable 0000000000008382 case 14 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8474: lea rax, asc_E74B; jumptable 0000000000008382 case 15 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8484: lea rax, asc_E750; jumptable 0000000000008382 case 16 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8494: lea rax, asc_E754; jumptable 0000000000008382 case 17 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_84A4: lea rax, asc_E759; jumptable 0000000000008382 case 18 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_84B4: lea rax, asc_E75D; jumptable 0000000000008382 case 19 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_84C4: lea rax, asc_E762; jumptable 0000000000008382 case 20 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_84D4: lea rax, asc_E766; jumptable 0000000000008382 case 21 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_84E4: lea rax, asc_E76B; jumptable 0000000000008382 case 22 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_84F4: lea rax, asc_E76F; jumptable 0000000000008382 case 23 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8504: lea rax, asc_E774; jumptable 0000000000008382 case 24 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8514: lea rax, asc_E778; jumptable 0000000000008382 case 25 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8524: lea rax, asc_E77D; jumptable 0000000000008382 case 26 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8534: lea rax, asc_E781; jumptable 0000000000008382 case 27 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8544: lea rax, asc_E786; jumptable 0000000000008382 case 28 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8554: lea rax, asc_E78A; jumptable 0000000000008382 case 29 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8564: lea rax, asc_E78F; jumptable 0000000000008382 case 30 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8574: lea rax, asc_E793; jumptable 0000000000008382 case 31 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8584: lea rax, asc_E798; jumptable 0000000000008382 case 32 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_8594: lea rax, aCannotIndexArr+24h; jumptable 0000000000008382 case 33 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_85A4: lea rax, aIsString+3; jumptable 0000000000008382 case 34 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_85B4: lea rax, aBreak; jumptable 0000000000008382 case 35 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_85C4: lea rax, aContinue; jumptable 0000000000008382 case 36 mov [rbp+var_10], rax jmp def_8382; jumptable 0000000000008382 default case loc_85D4: lea rax, aDo; jumptable 0000000000008382 case 37 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_85E1: lea rax, aElse; jumptable 0000000000008382 case 38 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_85EE: lea rax, aFalse; jumptable 0000000000008382 case 39 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_85FB: lea rax, aIf; jumptable 0000000000008382 case 40 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_8608: lea rax, aLet; jumptable 0000000000008382 case 41 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_8615: lea rax, aTooManyBreakSt+1Dh; jumptable 0000000000008382 case 42 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_8622: lea rax, aIsNil+3; jumptable 0000000000008382 case 43 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_862F: lea rax, aTrue; jumptable 0000000000008382 case 44 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_863C: lea rax, aWhile; jumptable 0000000000008382 case 45 mov [rbp+var_10], rax jmp short def_8382; jumptable 0000000000008382 default case loc_8649: lea rax, aIdentifier; jumptable 0000000000008382 case 46 mov [rbp+var_10], rax def_8382: mov rax, [rbp+var_10]; jumptable 0000000000008382 default case pop rbp retn
char * rak_token_kind_to_cstr(int a1) { char *v2; // [rsp+8h] [rbp-10h] v2 = 0LL; switch ( a1 ) { case 0: v2 = (char *)&unk_E70C; break; case 1: v2 = (char *)&unk_E710; break; case 2: v2 = (char *)&unk_E714; break; case 3: v2 = (char *)&unk_E718; break; case 4: v2 = (char *)&unk_E71C; break; case 5: v2 = (char *)&unk_E720; break; case 6: v2 = (char *)&unk_E724; break; case 7: v2 = (char *)&unk_E728; break; case 8: v2 = (char *)&unk_E72C; break; case 9: v2 = (char *)&unk_E730; break; case 10: v2 = "'||'"; break; case 11: v2 = "'&&'"; break; case 12: v2 = "'&'"; break; case 13: v2 = "'=='"; break; case 14: v2 = "'='"; break; case 15: v2 = "'!='"; break; case 16: v2 = "'!'"; break; case 17: v2 = "'>='"; break; case 18: v2 = "'>'"; break; case 19: v2 = "'<='"; break; case 20: v2 = "'<'"; break; case 21: v2 = "'..'"; break; case 22: v2 = "'.'"; break; case 23: v2 = "'+='"; break; case 24: v2 = "'+'"; break; case 25: v2 = "'-='"; break; case 26: v2 = "'-'"; break; case 27: v2 = "'*='"; break; case 28: v2 = "'*'"; break; case 29: v2 = "'/='"; break; case 30: v2 = "'/'"; break; case 31: v2 = "'%='"; break; case 32: v2 = "'%'"; break; case 33: v2 = "number"; break; case 34: v2 = "string"; break; case 35: v2 = "break"; break; case 36: v2 = "continue"; break; case 37: v2 = "do"; break; case 38: v2 = "else"; break; case 39: v2 = "false"; break; case 40: v2 = "if"; break; case 41: v2 = "let"; break; case 42: v2 = "loop"; break; case 43: v2 = "nil"; break; case 44: v2 = "true"; break; case 45: v2 = "while"; break; case 46: v2 = "identifier"; break; default: return v2; } return v2; }
rak_token_kind_to_cstr: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],0x0 MOV EAX,dword ptr [RBP + -0x4] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x2e JA 0x00108654 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x10e650] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[0x10e70c] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_1: LEA RAX,[0x10e710] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_2: LEA RAX,[0x10e714] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_3: LEA RAX,[0x10e718] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_4: LEA RAX,[0x10e71c] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_5: LEA RAX,[0x10e720] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_6: LEA RAX,[0x10e724] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_7: LEA RAX,[0x10e728] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_8: LEA RAX,[0x10e72c] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_9: LEA RAX,[0x10e730] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_a: LEA RAX,[0x10e734] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_b: LEA RAX,[0x10e739] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_c: LEA RAX,[0x10e73e] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_d: LEA RAX,[0x10e742] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_e: LEA RAX,[0x10e747] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_f: LEA RAX,[0x10e74b] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_10: LEA RAX,[0x10e750] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_11: LEA RAX,[0x10e754] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_12: LEA RAX,[0x10e759] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_13: LEA RAX,[0x10e75d] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_14: LEA RAX,[0x10e762] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_15: LEA RAX,[0x10e766] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_16: LEA RAX,[0x10e76b] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_17: LEA RAX,[0x10e76f] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_18: LEA RAX,[0x10e774] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_19: LEA RAX,[0x10e778] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_1a: LEA RAX,[0x10e77d] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_1b: LEA RAX,[0x10e781] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_1c: LEA RAX,[0x10e786] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_1d: LEA RAX,[0x10e78a] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_1e: LEA RAX,[0x10e78f] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_1f: LEA RAX,[0x10e793] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_20: LEA RAX,[0x10e798] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_21: LEA RAX,[0x10ea02] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_22: LEA RAX,[0x10e247] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_23: LEA RAX,[0x10e79c] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_24: LEA RAX,[0x10e7a2] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_25: LEA RAX,[0x10e7ab] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_26: LEA RAX,[0x10e7ae] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_27: LEA RAX,[0x10e7b3] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_28: LEA RAX,[0x10e7b9] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_29: LEA RAX,[0x10e7bc] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_2a: LEA RAX,[0x10e5d6] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_2b: LEA RAX,[0x10e223] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_2c: LEA RAX,[0x10e7c0] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_2d: LEA RAX,[0x10e7c5] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108654 caseD_2e: LEA RAX,[0x10e7cb] MOV qword ptr [RBP + -0x10],RAX default: MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
char * rak_token_kind_to_cstr(int4 param_1) { char *local_18; local_18 = (char *)0x0; switch(param_1) { case 0: local_18 = "eof"; break; case 1: local_18 = "\',\'"; break; case 2: local_18 = "\':\'"; break; case 3: local_18 = "\';\'"; break; case 4: local_18 = "\'(\'"; break; case 5: local_18 = "\')\'"; break; case 6: local_18 = "\'[\'"; break; case 7: local_18 = "\']\'"; break; case 8: local_18 = "\'{\'"; break; case 9: local_18 = "\'}\'"; break; case 10: local_18 = "\'||\'"; break; case 0xb: local_18 = "\'&&\'"; break; case 0xc: local_18 = "\'&\'"; break; case 0xd: local_18 = "\'==\'"; break; case 0xe: local_18 = "\'=\'"; break; case 0xf: local_18 = "\'!=\'"; break; case 0x10: local_18 = "\'!\'"; break; case 0x11: local_18 = "\'>=\'"; break; case 0x12: local_18 = "\'>\'"; break; case 0x13: local_18 = "\'<=\'"; break; case 0x14: local_18 = "\'<\'"; break; case 0x15: local_18 = "\'..\'"; break; case 0x16: local_18 = "\'.\'"; break; case 0x17: local_18 = "\'+=\'"; break; case 0x18: local_18 = "\'+\'"; break; case 0x19: local_18 = "\'-=\'"; break; case 0x1a: local_18 = "\'-\'"; break; case 0x1b: local_18 = "\'*=\'"; break; case 0x1c: local_18 = "\'*\'"; break; case 0x1d: local_18 = "\'/=\'"; break; case 0x1e: local_18 = "\'/\'"; break; case 0x1f: local_18 = "\'%=\'"; break; case 0x20: local_18 = "\'%\'"; break; case 0x21: local_18 = "number"; break; case 0x22: local_18 = "string"; break; case 0x23: local_18 = "break"; break; case 0x24: local_18 = "continue"; break; case 0x25: local_18 = "do"; break; case 0x26: local_18 = "else"; break; case 0x27: local_18 = "false"; break; case 0x28: local_18 = "if"; break; case 0x29: local_18 = "let"; break; case 0x2a: local_18 = "loop"; break; case 0x2b: local_18 = "nil"; break; case 0x2c: local_18 = "true"; break; case 0x2d: local_18 = "while"; break; case 0x2e: local_18 = "identifier"; } return local_18; }
53,089
rak_token_kind_to_cstr
fabiosvm[P]rak/src/lexer.c
const char *rak_token_kind_to_cstr(RakTokenKind kind) { char *cstr = NULL; switch (kind) { case RAK_TOKEN_KIND_EOF: cstr = "eof"; break; case RAK_TOKEN_KIND_COMMA: cstr = "','"; break; case RAK_TOKEN_KIND_COLON: cstr = "':'"; break; case RAK_TOKEN_KIND_SEMICOLON: cstr = "';'"; break; case RAK_TOKEN_KIND_LPAREN: cstr = "'('"; break; case RAK_TOKEN_KIND_RPAREN: cstr = "')'"; break; case RAK_TOKEN_KIND_LBRACKET: cstr = "'['"; break; case RAK_TOKEN_KIND_RBRACKET: cstr = "']'"; break; case RAK_TOKEN_KIND_LBRACE: cstr = "'{'"; break; case RAK_TOKEN_KIND_RBRACE: cstr = "'}'"; break; case RAK_TOKEN_KIND_PIPEPIPE: cstr = "'||'"; break; case RAK_TOKEN_KIND_AMPAMP: cstr = "'&&'"; break; case RAK_TOKEN_KIND_AMP: cstr = "'&'"; break; case RAK_TOKEN_KIND_EQEQ: cstr = "'=='"; break; case RAK_TOKEN_KIND_EQ: cstr = "'='"; break; case RAK_TOKEN_KIND_BANGEQ: cstr = "'!='"; break; case RAK_TOKEN_KIND_BANG: cstr = "'!'"; break; case RAK_TOKEN_KIND_GTEQ: cstr = "'>='"; break; case RAK_TOKEN_KIND_GT: cstr = "'>'"; break; case RAK_TOKEN_KIND_LTEQ: cstr = "'<='"; break; case RAK_TOKEN_KIND_LT: cstr = "'<'"; break; case RAK_TOKEN_KIND_DOTDOT: cstr = "'..'"; break; case RAK_TOKEN_KIND_DOT: cstr = "'.'"; break; case RAK_TOKEN_KIND_PLUSEQ: cstr = "'+='"; break; case RAK_TOKEN_KIND_PLUS: cstr = "'+'"; break; case RAK_TOKEN_KIND_MINUSEQ: cstr = "'-='"; break; case RAK_TOKEN_KIND_MINUS: cstr = "'-'"; break; case RAK_TOKEN_KIND_STAREQ: cstr = "'*='"; break; case RAK_TOKEN_KIND_STAR: cstr = "'*'"; break; case RAK_TOKEN_KIND_SLASHEQ: cstr = "'/='"; break; case RAK_TOKEN_KIND_SLASH: cstr = "'/'"; break; case RAK_TOKEN_KIND_PERCENTEQ: cstr = "'%='"; break; case RAK_TOKEN_KIND_PERCENT: cstr = "'%'"; break; case RAK_TOKEN_KIND_NUMBER: cstr = "number"; break; case RAK_TOKEN_KIND_STRING: cstr = "string"; break; case RAK_TOKEN_KIND_BREAK_KW: cstr = "break"; break; case RAK_TOKEN_KIND_CONTINUE_KW: cstr = "continue"; break; case RAK_TOKEN_KIND_DO_KW: cstr = "do"; break; case RAK_TOKEN_KIND_ELSE_KW: cstr = "else"; break; case RAK_TOKEN_KIND_FALSE_KW: cstr = "false"; break; case RAK_TOKEN_KIND_IF_KW: cstr = "if"; break; case RAK_TOKEN_KIND_LET_KW: cstr = "let"; break; case RAK_TOKEN_KIND_LOOP_KW: cstr = "loop"; break; case RAK_TOKEN_KIND_NIL_KW: cstr = "nil"; break; case RAK_TOKEN_KIND_TRUE_KW: cstr = "true"; break; case RAK_TOKEN_KIND_WHILE_KW: cstr = "while"; break; case RAK_TOKEN_KIND_IDENT: cstr = "identifier"; break; } return cstr; }
O2
c
rak_token_kind_to_cstr: cmpl $0x2e, %edi ja 0x54f2 movl %edi, %eax leaq 0x432e(%rip), %rcx # 0x9818 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq xorl %eax, %eax retq
rak_token_kind_to_cstr: cmp edi, 2Eh ; '.' ja short loc_54F2 mov eax, edi lea rcx, unk_9818 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_54F2: xor eax, eax retn
char * rak_token_kind_to_cstr(unsigned int a1) { if ( a1 > 0x2E ) return 0LL; else return (char *)dword_9818 + dword_9818[a1]; }
rak_token_kind_to_cstr: CMP EDI,0x2e JA 0x001054f2 MOV EAX,EDI LEA RCX,[0x109818] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_001054f2: XOR EAX,EAX RET
int * rak_token_kind_to_cstr(uint param_1) { if (param_1 < 0x2f) { return &DAT_00109818 + *(int *)(&DAT_00109818 + (ulong)param_1 * 4); } return (int *)0x0; }
53,090
rak_token_kind_to_cstr
fabiosvm[P]rak/src/lexer.c
const char *rak_token_kind_to_cstr(RakTokenKind kind) { char *cstr = NULL; switch (kind) { case RAK_TOKEN_KIND_EOF: cstr = "eof"; break; case RAK_TOKEN_KIND_COMMA: cstr = "','"; break; case RAK_TOKEN_KIND_COLON: cstr = "':'"; break; case RAK_TOKEN_KIND_SEMICOLON: cstr = "';'"; break; case RAK_TOKEN_KIND_LPAREN: cstr = "'('"; break; case RAK_TOKEN_KIND_RPAREN: cstr = "')'"; break; case RAK_TOKEN_KIND_LBRACKET: cstr = "'['"; break; case RAK_TOKEN_KIND_RBRACKET: cstr = "']'"; break; case RAK_TOKEN_KIND_LBRACE: cstr = "'{'"; break; case RAK_TOKEN_KIND_RBRACE: cstr = "'}'"; break; case RAK_TOKEN_KIND_PIPEPIPE: cstr = "'||'"; break; case RAK_TOKEN_KIND_AMPAMP: cstr = "'&&'"; break; case RAK_TOKEN_KIND_AMP: cstr = "'&'"; break; case RAK_TOKEN_KIND_EQEQ: cstr = "'=='"; break; case RAK_TOKEN_KIND_EQ: cstr = "'='"; break; case RAK_TOKEN_KIND_BANGEQ: cstr = "'!='"; break; case RAK_TOKEN_KIND_BANG: cstr = "'!'"; break; case RAK_TOKEN_KIND_GTEQ: cstr = "'>='"; break; case RAK_TOKEN_KIND_GT: cstr = "'>'"; break; case RAK_TOKEN_KIND_LTEQ: cstr = "'<='"; break; case RAK_TOKEN_KIND_LT: cstr = "'<'"; break; case RAK_TOKEN_KIND_DOTDOT: cstr = "'..'"; break; case RAK_TOKEN_KIND_DOT: cstr = "'.'"; break; case RAK_TOKEN_KIND_PLUSEQ: cstr = "'+='"; break; case RAK_TOKEN_KIND_PLUS: cstr = "'+'"; break; case RAK_TOKEN_KIND_MINUSEQ: cstr = "'-='"; break; case RAK_TOKEN_KIND_MINUS: cstr = "'-'"; break; case RAK_TOKEN_KIND_STAREQ: cstr = "'*='"; break; case RAK_TOKEN_KIND_STAR: cstr = "'*'"; break; case RAK_TOKEN_KIND_SLASHEQ: cstr = "'/='"; break; case RAK_TOKEN_KIND_SLASH: cstr = "'/'"; break; case RAK_TOKEN_KIND_PERCENTEQ: cstr = "'%='"; break; case RAK_TOKEN_KIND_PERCENT: cstr = "'%'"; break; case RAK_TOKEN_KIND_NUMBER: cstr = "number"; break; case RAK_TOKEN_KIND_STRING: cstr = "string"; break; case RAK_TOKEN_KIND_BREAK_KW: cstr = "break"; break; case RAK_TOKEN_KIND_CONTINUE_KW: cstr = "continue"; break; case RAK_TOKEN_KIND_DO_KW: cstr = "do"; break; case RAK_TOKEN_KIND_ELSE_KW: cstr = "else"; break; case RAK_TOKEN_KIND_FALSE_KW: cstr = "false"; break; case RAK_TOKEN_KIND_IF_KW: cstr = "if"; break; case RAK_TOKEN_KIND_LET_KW: cstr = "let"; break; case RAK_TOKEN_KIND_LOOP_KW: cstr = "loop"; break; case RAK_TOKEN_KIND_NIL_KW: cstr = "nil"; break; case RAK_TOKEN_KIND_TRUE_KW: cstr = "true"; break; case RAK_TOKEN_KIND_WHILE_KW: cstr = "while"; break; case RAK_TOKEN_KIND_IDENT: cstr = "identifier"; break; } return cstr; }
O3
c
rak_token_kind_to_cstr: cmpl $0x2e, %edi ja 0x677a movl %edi, %eax leaq 0x404e(%rip), %rcx # 0xa7c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq xorl %eax, %eax retq
rak_token_kind_to_cstr: cmp edi, 2Eh ; '.' ja short loc_677A mov eax, edi lea rcx, unk_A7C0 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_677A: xor eax, eax retn
char * rak_token_kind_to_cstr(unsigned int a1) { if ( a1 > 0x2E ) return 0LL; else return (char *)dword_A7C0 + dword_A7C0[a1]; }
rak_token_kind_to_cstr: CMP EDI,0x2e JA 0x0010677a MOV EAX,EDI LEA RCX,[0x10a7c0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_0010677a: XOR EAX,EAX RET
int * rak_token_kind_to_cstr(uint param_1) { if (param_1 < 0x2f) { return &DAT_0010a7c0 + *(int *)(&DAT_0010a7c0 + (ulong)param_1 * 4); } return (int *)0x0; }
53,091
stbi__process_scan_header(stbi__jpeg*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__process_scan_header(stbi__jpeg *z) { int i; int Ls = stbi__get16be(z->s); z->scan_n = stbi__get8(z->s); if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG"); if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG"); for (i=0; i < z->scan_n; ++i) { int id = stbi__get8(z->s), which; int q = stbi__get8(z->s); for (which = 0; which < z->s->img_n; ++which) if (z->img_comp[which].id == id) break; if (which == z->s->img_n) return 0; // no match z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG"); z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG"); z->order[i] = which; } { int aa; z->spec_start = stbi__get8(z->s); z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 aa = stbi__get8(z->s); z->succ_high = (aa >> 4); z->succ_low = (aa & 15); if (z->progressive) { if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) return stbi__err("bad SOS", "Corrupt JPEG"); } else { if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG"); if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG"); z->spec_end = 63; } } return 1; }
O0
c
stbi__process_scan_header(stbi__jpeg*): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq (%rax), %rdi callq 0x19ee0 movl %eax, 0x10(%rsp) movq 0x18(%rsp), %rax movq (%rax), %rdi callq 0x17f50 movzbl %al, %ecx movq 0x18(%rsp), %rax movl %ecx, 0x4854(%rax) movq 0x18(%rsp), %rax cmpl $0x1, 0x4854(%rax) jl 0x287d9 movq 0x18(%rsp), %rax cmpl $0x4, 0x4854(%rax) jg 0x287d9 movq 0x18(%rsp), %rax movl 0x4854(%rax), %eax movq 0x18(%rsp), %rcx movq (%rcx), %rcx cmpl 0x8(%rcx), %eax jle 0x287ee leaq 0x156632(%rip), %rdi # 0x17ee12 callq 0xddd0 movl %eax, 0x24(%rsp) jmp 0x28ad4 movl 0x10(%rsp), %eax movq 0x18(%rsp), %rcx movl 0x4854(%rcx), %ecx shll %ecx addl $0x6, %ecx cmpl %ecx, %eax je 0x2881b leaq 0x15661d(%rip), %rdi # 0x17ee2a callq 0xddd0 movl %eax, 0x24(%rsp) jmp 0x28ad4 movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax movq 0x18(%rsp), %rcx cmpl 0x4854(%rcx), %eax jge 0x28992 movq 0x18(%rsp), %rax movq (%rax), %rdi callq 0x17f50 movzbl %al, %eax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rax movq (%rax), %rdi callq 0x17f50 movzbl %al, %eax movl %eax, 0x4(%rsp) movl $0x0, 0x8(%rsp) movl 0x8(%rsp), %eax movq 0x18(%rsp), %rcx movq (%rcx), %rcx cmpl 0x8(%rcx), %eax jge 0x288a9 movq 0x18(%rsp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq 0x8(%rsp), %rcx imulq $0x60, %rcx, %rcx addq %rcx, %rax movl (%rax), %eax cmpl 0xc(%rsp), %eax jne 0x2889a jmp 0x288a9 jmp 0x2889c movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) jmp 0x28868 movl 0x8(%rsp), %eax movq 0x18(%rsp), %rcx movq (%rcx), %rcx cmpl 0x8(%rcx), %eax jne 0x288c7 movl $0x0, 0x24(%rsp) jmp 0x28ad4 movl 0x4(%rsp), %ecx sarl $0x4, %ecx movq 0x18(%rsp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq 0x8(%rsp), %rdx imulq $0x60, %rdx, %rdx addq %rdx, %rax movl %ecx, 0x10(%rax) movq 0x18(%rsp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq 0x8(%rsp), %rcx imulq $0x60, %rcx, %rcx addq %rcx, %rax cmpl $0x3, 0x10(%rax) jle 0x2891a leaq 0x15652a(%rip), %rdi # 0x17ee36 callq 0xddd0 movl %eax, 0x24(%rsp) jmp 0x28ad4 movl 0x4(%rsp), %ecx andl $0xf, %ecx movq 0x18(%rsp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq 0x8(%rsp), %rdx imulq $0x60, %rdx, %rdx addq %rdx, %rax movl %ecx, 0x14(%rax) movq 0x18(%rsp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq 0x8(%rsp), %rcx imulq $0x60, %rcx, %rcx addq %rcx, %rax cmpl $0x3, 0x14(%rax) jle 0x2896d leaq 0x1564e3(%rip), %rdi # 0x17ee42 callq 0xddd0 movl %eax, 0x24(%rsp) jmp 0x28ad4 movl 0x8(%rsp), %edx movq 0x18(%rsp), %rax movslq 0x14(%rsp), %rcx movl %edx, 0x4858(%rax,%rcx,4) movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x28823 movq 0x18(%rsp), %rax movq (%rax), %rdi callq 0x17f50 movzbl %al, %ecx movq 0x18(%rsp), %rax movl %ecx, 0x4834(%rax) movq 0x18(%rsp), %rax movq (%rax), %rdi callq 0x17f50 movzbl %al, %ecx movq 0x18(%rsp), %rax movl %ecx, 0x4838(%rax) movq 0x18(%rsp), %rax movq (%rax), %rdi callq 0x17f50 movzbl %al, %eax movl %eax, (%rsp) movl (%rsp), %ecx sarl $0x4, %ecx movq 0x18(%rsp), %rax movl %ecx, 0x483c(%rax) movl (%rsp), %ecx andl $0xf, %ecx movq 0x18(%rsp), %rax movl %ecx, 0x4840(%rax) movq 0x18(%rsp), %rax cmpl $0x0, 0x4830(%rax) je 0x28a6f movq 0x18(%rsp), %rax cmpl $0x3f, 0x4834(%rax) jg 0x28a5b movq 0x18(%rsp), %rax cmpl $0x3f, 0x4838(%rax) jg 0x28a5b movq 0x18(%rsp), %rax movl 0x4834(%rax), %eax movq 0x18(%rsp), %rcx cmpl 0x4838(%rcx), %eax jg 0x28a5b movq 0x18(%rsp), %rax cmpl $0xd, 0x483c(%rax) jg 0x28a5b movq 0x18(%rsp), %rax cmpl $0xd, 0x4840(%rax) jle 0x28a6d leaq 0x1563ec(%rip), %rdi # 0x17ee4e callq 0xddd0 movl %eax, 0x24(%rsp) jmp 0x28ad4 jmp 0x28acc movq 0x18(%rsp), %rax cmpl $0x0, 0x4834(%rax) je 0x28a8f leaq 0x1563ca(%rip), %rdi # 0x17ee4e callq 0xddd0 movl %eax, 0x24(%rsp) jmp 0x28ad4 movq 0x18(%rsp), %rax cmpl $0x0, 0x483c(%rax) jne 0x28aab movq 0x18(%rsp), %rax cmpl $0x0, 0x4840(%rax) je 0x28abd leaq 0x15639c(%rip), %rdi # 0x17ee4e callq 0xddd0 movl %eax, 0x24(%rsp) jmp 0x28ad4 movq 0x18(%rsp), %rax movl $0x3f, 0x4838(%rax) movl $0x1, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax)
_ZL25stbi__process_scan_headerP10stbi__jpeg: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rax, [rsp+28h+var_10] mov rdi, [rax] call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov [rsp+28h+var_18], eax mov rax, [rsp+28h+var_10] mov rdi, [rax] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx ecx, al mov rax, [rsp+28h+var_10] mov [rax+4854h], ecx mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4854h], 1 jl short loc_287D9 mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4854h], 4 jg short loc_287D9 mov rax, [rsp+28h+var_10] mov eax, [rax+4854h] mov rcx, [rsp+28h+var_10] mov rcx, [rcx] cmp eax, [rcx+8] jle short loc_287EE loc_287D9: lea rdi, aBadSosComponen; "bad SOS component count" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+28h+var_4], eax jmp loc_28AD4 loc_287EE: mov eax, [rsp+28h+var_18] mov rcx, [rsp+28h+var_10] mov ecx, [rcx+4854h] shl ecx, 1 add ecx, 6 cmp eax, ecx jz short loc_2881B lea rdi, aBadSosLen; "bad SOS len" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+28h+var_4], eax jmp loc_28AD4 loc_2881B: mov [rsp+28h+var_14], 0 loc_28823: mov eax, [rsp+28h+var_14] mov rcx, [rsp+28h+var_10] cmp eax, [rcx+4854h] jge loc_28992 mov rax, [rsp+28h+var_10] mov rdi, [rax] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+28h+var_1C], eax mov rax, [rsp+28h+var_10] mov rdi, [rax] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+28h+var_24], eax mov [rsp+28h+var_20], 0 loc_28868: mov eax, [rsp+28h+var_20] mov rcx, [rsp+28h+var_10] mov rcx, [rcx] cmp eax, [rcx+8] jge short loc_288A9 mov rax, [rsp+28h+var_10] add rax, 46A0h movsxd rcx, [rsp+28h+var_20] imul rcx, 60h ; '`' add rax, rcx mov eax, [rax] cmp eax, [rsp+28h+var_1C] jnz short loc_2889A jmp short loc_288A9 loc_2889A: jmp short $+2 loc_2889C: mov eax, [rsp+28h+var_20] add eax, 1 mov [rsp+28h+var_20], eax jmp short loc_28868 loc_288A9: mov eax, [rsp+28h+var_20] mov rcx, [rsp+28h+var_10] mov rcx, [rcx] cmp eax, [rcx+8] jnz short loc_288C7 mov [rsp+28h+var_4], 0 jmp loc_28AD4 loc_288C7: mov ecx, [rsp+28h+var_24] sar ecx, 4 mov rax, [rsp+28h+var_10] add rax, 46A0h movsxd rdx, [rsp+28h+var_20] imul rdx, 60h ; '`' add rax, rdx mov [rax+10h], ecx mov rax, [rsp+28h+var_10] add rax, 46A0h movsxd rcx, [rsp+28h+var_20] imul rcx, 60h ; '`' add rax, rcx cmp dword ptr [rax+10h], 3 jle short loc_2891A lea rdi, aBadDcHuff; "bad DC huff" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+28h+var_4], eax jmp loc_28AD4 loc_2891A: mov ecx, [rsp+28h+var_24] and ecx, 0Fh mov rax, [rsp+28h+var_10] add rax, 46A0h movsxd rdx, [rsp+28h+var_20] imul rdx, 60h ; '`' add rax, rdx mov [rax+14h], ecx mov rax, [rsp+28h+var_10] add rax, 46A0h movsxd rcx, [rsp+28h+var_20] imul rcx, 60h ; '`' add rax, rcx cmp dword ptr [rax+14h], 3 jle short loc_2896D lea rdi, aBadAcHuff; "bad AC huff" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+28h+var_4], eax jmp loc_28AD4 loc_2896D: mov edx, [rsp+28h+var_20] mov rax, [rsp+28h+var_10] movsxd rcx, [rsp+28h+var_14] mov [rax+rcx*4+4858h], edx mov eax, [rsp+28h+var_14] add eax, 1 mov [rsp+28h+var_14], eax jmp loc_28823 loc_28992: mov rax, [rsp+28h+var_10] mov rdi, [rax] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx ecx, al mov rax, [rsp+28h+var_10] mov [rax+4834h], ecx mov rax, [rsp+28h+var_10] mov rdi, [rax] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx ecx, al mov rax, [rsp+28h+var_10] mov [rax+4838h], ecx mov rax, [rsp+28h+var_10] mov rdi, [rax] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+28h+var_28], eax mov ecx, [rsp+28h+var_28] sar ecx, 4 mov rax, [rsp+28h+var_10] mov [rax+483Ch], ecx mov ecx, [rsp+28h+var_28] and ecx, 0Fh mov rax, [rsp+28h+var_10] mov [rax+4840h], ecx mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4830h], 0 jz short loc_28A6F mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4834h], 3Fh ; '?' jg short loc_28A5B mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4838h], 3Fh ; '?' jg short loc_28A5B mov rax, [rsp+28h+var_10] mov eax, [rax+4834h] mov rcx, [rsp+28h+var_10] cmp eax, [rcx+4838h] jg short loc_28A5B mov rax, [rsp+28h+var_10] cmp dword ptr [rax+483Ch], 0Dh jg short loc_28A5B mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4840h], 0Dh jle short loc_28A6D loc_28A5B: lea rdi, aBadSos; "bad SOS" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+28h+var_4], eax jmp short loc_28AD4 loc_28A6D: jmp short loc_28ACC loc_28A6F: mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4834h], 0 jz short loc_28A8F lea rdi, aBadSos; "bad SOS" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+28h+var_4], eax jmp short loc_28AD4 loc_28A8F: mov rax, [rsp+28h+var_10] cmp dword ptr [rax+483Ch], 0 jnz short loc_28AAB mov rax, [rsp+28h+var_10] cmp dword ptr [rax+4840h], 0 jz short loc_28ABD loc_28AAB: lea rdi, aBadSos; "bad SOS" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+28h+var_4], eax jmp short loc_28AD4 loc_28ABD: mov rax, [rsp+28h+var_10] mov dword ptr [rax+4838h], 3Fh ; '?' loc_28ACC: mov [rsp+28h+var_4], 1 loc_28AD4: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long stbi__process_scan_header(long long a1) { unsigned __int8 v1; // al int v3; // [rsp+4h] [rbp-24h] int j; // [rsp+8h] [rbp-20h] int v5; // [rsp+Ch] [rbp-1Ch] int v6; // [rsp+10h] [rbp-18h] int i; // [rsp+14h] [rbp-14h] v6 = stbi__get16be(*(_QWORD *)a1); *(_DWORD *)(a1 + 18516) = (unsigned __int8)stbi__get8(*(_QWORD *)a1); if ( *(int *)(a1 + 18516) >= 1 && *(int *)(a1 + 18516) <= 4 && *(_DWORD *)(a1 + 18516) <= *(_DWORD *)(*(_QWORD *)a1 + 8LL) ) { if ( v6 != 2 * *(_DWORD *)(a1 + 18516) + 6 ) return (unsigned int)stbi__err("bad SOS len"); for ( i = 0; i < *(_DWORD *)(a1 + 18516); ++i ) { v5 = (unsigned __int8)stbi__get8(*(_QWORD *)a1); v3 = (unsigned __int8)stbi__get8(*(_QWORD *)a1); for ( j = 0; j < *(_DWORD *)(*(_QWORD *)a1 + 8LL) && *(_DWORD *)(96LL * j + a1 + 18080) != v5; ++j ) ; if ( j == *(_DWORD *)(*(_QWORD *)a1 + 8LL) ) return 0; *(_DWORD *)(96LL * j + a1 + 18080 + 16) = v3 >> 4; if ( *(int *)(96LL * j + a1 + 18080 + 16) > 3 ) return (unsigned int)stbi__err("bad DC huff"); *(_DWORD *)(96LL * j + a1 + 18080 + 20) = v3 & 0xF; if ( *(int *)(96LL * j + a1 + 18080 + 20) > 3 ) return (unsigned int)stbi__err("bad AC huff"); *(_DWORD *)(a1 + 4LL * i + 18520) = j; } *(_DWORD *)(a1 + 18484) = (unsigned __int8)stbi__get8(*(_QWORD *)a1); *(_DWORD *)(a1 + 18488) = (unsigned __int8)stbi__get8(*(_QWORD *)a1); v1 = stbi__get8(*(_QWORD *)a1); *(_DWORD *)(a1 + 18492) = (int)v1 >> 4; *(_DWORD *)(a1 + 18496) = v1 & 0xF; if ( *(_DWORD *)(a1 + 18480) ) { if ( *(int *)(a1 + 18484) > 63 || *(int *)(a1 + 18488) > 63 || *(_DWORD *)(a1 + 18484) > *(_DWORD *)(a1 + 18488) || *(int *)(a1 + 18492) > 13 || *(int *)(a1 + 18496) > 13 ) { return (unsigned int)stbi__err("bad SOS"); } } else { if ( *(_DWORD *)(a1 + 18484) || *(_DWORD *)(a1 + 18492) || *(_DWORD *)(a1 + 18496) ) return (unsigned int)stbi__err("bad SOS"); *(_DWORD *)(a1 + 18488) = 63; } return 1; } return (unsigned int)stbi__err("bad SOS component count"); }
stbi__process_scan_header: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] CALL 0x00119ee0 MOV dword ptr [RSP + 0x10],EAX MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] CALL 0x00117f50 MOVZX ECX,AL MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x4854],ECX MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4854],0x1 JL 0x001287d9 MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4854],0x4 JG 0x001287d9 MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x4854] MOV RCX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x8] JLE 0x001287ee LAB_001287d9: LEA RDI,[0x27ee12] CALL 0x0010ddd0 MOV dword ptr [RSP + 0x24],EAX JMP 0x00128ad4 LAB_001287ee: MOV EAX,dword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RCX + 0x4854] SHL ECX,0x1 ADD ECX,0x6 CMP EAX,ECX JZ 0x0012881b LEA RDI,[0x27ee2a] CALL 0x0010ddd0 MOV dword ptr [RSP + 0x24],EAX JMP 0x00128ad4 LAB_0012881b: MOV dword ptr [RSP + 0x14],0x0 LAB_00128823: MOV EAX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x18] CMP EAX,dword ptr [RCX + 0x4854] JGE 0x00128992 MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] CALL 0x00117f50 MOVZX EAX,AL MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] CALL 0x00117f50 MOVZX EAX,AL MOV dword ptr [RSP + 0x4],EAX MOV dword ptr [RSP + 0x8],0x0 LAB_00128868: MOV EAX,dword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x8] JGE 0x001288a9 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x46a0 MOVSXD RCX,dword ptr [RSP + 0x8] IMUL RCX,RCX,0x60 ADD RAX,RCX MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RSP + 0xc] JNZ 0x0012889a JMP 0x001288a9 LAB_0012889a: JMP 0x0012889c LAB_0012889c: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x00128868 LAB_001288a9: MOV EAX,dword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x8] JNZ 0x001288c7 MOV dword ptr [RSP + 0x24],0x0 JMP 0x00128ad4 LAB_001288c7: MOV ECX,dword ptr [RSP + 0x4] SAR ECX,0x4 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x46a0 MOVSXD RDX,dword ptr [RSP + 0x8] IMUL RDX,RDX,0x60 ADD RAX,RDX MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x46a0 MOVSXD RCX,dword ptr [RSP + 0x8] IMUL RCX,RCX,0x60 ADD RAX,RCX CMP dword ptr [RAX + 0x10],0x3 JLE 0x0012891a LEA RDI,[0x27ee36] CALL 0x0010ddd0 MOV dword ptr [RSP + 0x24],EAX JMP 0x00128ad4 LAB_0012891a: MOV ECX,dword ptr [RSP + 0x4] AND ECX,0xf MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x46a0 MOVSXD RDX,dword ptr [RSP + 0x8] IMUL RDX,RDX,0x60 ADD RAX,RDX MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x46a0 MOVSXD RCX,dword ptr [RSP + 0x8] IMUL RCX,RCX,0x60 ADD RAX,RCX CMP dword ptr [RAX + 0x14],0x3 JLE 0x0012896d LEA RDI,[0x27ee42] CALL 0x0010ddd0 MOV dword ptr [RSP + 0x24],EAX JMP 0x00128ad4 LAB_0012896d: MOV EDX,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x14] MOV dword ptr [RAX + RCX*0x4 + 0x4858],EDX MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x00128823 LAB_00128992: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] CALL 0x00117f50 MOVZX ECX,AL MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x4834],ECX MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] CALL 0x00117f50 MOVZX ECX,AL MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x4838],ECX MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] CALL 0x00117f50 MOVZX EAX,AL MOV dword ptr [RSP],EAX MOV ECX,dword ptr [RSP] SAR ECX,0x4 MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x483c],ECX MOV ECX,dword ptr [RSP] AND ECX,0xf MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x4840],ECX MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4830],0x0 JZ 0x00128a6f MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4834],0x3f JG 0x00128a5b MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4838],0x3f JG 0x00128a5b MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x4834] MOV RCX,qword ptr [RSP + 0x18] CMP EAX,dword ptr [RCX + 0x4838] JG 0x00128a5b MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x483c],0xd JG 0x00128a5b MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4840],0xd JLE 0x00128a6d LAB_00128a5b: LEA RDI,[0x27ee4e] CALL 0x0010ddd0 MOV dword ptr [RSP + 0x24],EAX JMP 0x00128ad4 LAB_00128a6d: JMP 0x00128acc LAB_00128a6f: MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4834],0x0 JZ 0x00128a8f LEA RDI,[0x27ee4e] CALL 0x0010ddd0 MOV dword ptr [RSP + 0x24],EAX JMP 0x00128ad4 LAB_00128a8f: MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x483c],0x0 JNZ 0x00128aab MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x4840],0x0 JZ 0x00128abd LAB_00128aab: LEA RDI,[0x27ee4e] CALL 0x0010ddd0 MOV dword ptr [RSP + 0x24],EAX JMP 0x00128ad4 LAB_00128abd: MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x4838],0x3f LAB_00128acc: MOV dword ptr [RSP + 0x24],0x1 LAB_00128ad4: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* stbi__process_scan_header(stbi__jpeg*) */ int4 stbi__process_scan_header(stbi__jpeg *param_1) { byte bVar1; byte bVar2; int iVar3; int4 uVar4; int local_20; int local_14; int4 local_4; iVar3 = stbi__get16be(*(stbi__context **)param_1); bVar1 = stbi__get8(*(stbi__context **)param_1); *(uint *)(param_1 + 0x4854) = (uint)bVar1; if (((*(int *)(param_1 + 0x4854) < 1) || (4 < *(int *)(param_1 + 0x4854))) || (*(int *)(*(long *)param_1 + 8) < *(int *)(param_1 + 0x4854))) { local_4 = stbi__err("bad SOS component count"); } else if (iVar3 == *(int *)(param_1 + 0x4854) * 2 + 6) { for (local_14 = 0; local_14 < *(int *)(param_1 + 0x4854); local_14 = local_14 + 1) { bVar1 = stbi__get8(*(stbi__context **)param_1); bVar2 = stbi__get8(*(stbi__context **)param_1); local_20 = 0; while ((local_20 < *(int *)(*(long *)param_1 + 8) && (*(uint *)(param_1 + (long)local_20 * 0x60 + 0x46a0) != (uint)bVar1))) { local_20 = local_20 + 1; } if (local_20 == *(int *)(*(long *)param_1 + 8)) { return 0; } *(int *)(param_1 + (long)local_20 * 0x60 + 0x46b0) = (int)(uint)bVar2 >> 4; if (3 < *(int *)(param_1 + (long)local_20 * 0x60 + 0x46b0)) { uVar4 = stbi__err("bad DC huff"); return uVar4; } *(uint *)(param_1 + (long)local_20 * 0x60 + 0x46b4) = bVar2 & 0xf; if (3 < *(int *)(param_1 + (long)local_20 * 0x60 + 0x46b4)) { uVar4 = stbi__err("bad AC huff"); return uVar4; } *(int *)(param_1 + (long)local_14 * 4 + 0x4858) = local_20; } bVar1 = stbi__get8(*(stbi__context **)param_1); *(uint *)(param_1 + 0x4834) = (uint)bVar1; bVar1 = stbi__get8(*(stbi__context **)param_1); *(uint *)(param_1 + 0x4838) = (uint)bVar1; bVar1 = stbi__get8(*(stbi__context **)param_1); *(int *)(param_1 + 0x483c) = (int)(uint)bVar1 >> 4; *(uint *)(param_1 + 0x4840) = bVar1 & 0xf; if (*(int *)(param_1 + 0x4830) == 0) { if (*(int *)(param_1 + 0x4834) != 0) { uVar4 = stbi__err("bad SOS"); return uVar4; } if ((*(int *)(param_1 + 0x483c) != 0) || (*(int *)(param_1 + 0x4840) != 0)) { uVar4 = stbi__err("bad SOS"); return uVar4; } *(int4 *)(param_1 + 0x4838) = 0x3f; } else if ((((0x3f < *(int *)(param_1 + 0x4834)) || (0x3f < *(int *)(param_1 + 0x4838))) || (*(int *)(param_1 + 0x4838) < *(int *)(param_1 + 0x4834))) || ((0xd < *(int *)(param_1 + 0x483c) || (0xd < *(int *)(param_1 + 0x4840))))) { uVar4 = stbi__err("bad SOS"); return uVar4; } local_4 = 1; } else { local_4 = stbi__err("bad SOS len"); } return local_4; }
53,092
ma_apply_undo_key_insert
eloqsql/storage/maria/ma_key_recover.c
my_bool _ma_apply_undo_key_insert(MARIA_HA *info, LSN undo_lsn, const uchar *header, uint length) { LSN lsn; my_bool res; uint keynr; uchar key_buff[MARIA_MAX_KEY_BUFF]; MARIA_SHARE *share= info->s; MARIA_KEY key; my_off_t new_root; struct st_msg_to_write_hook_for_undo_key msg; DBUG_ENTER("_ma_apply_undo_key_insert"); share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS | STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); keynr= key_nr_korr(header); length-= KEY_NR_STORE_SIZE; /* We have to copy key as _ma_ck_real_delete() may change it */ memcpy(key_buff, header + KEY_NR_STORE_SIZE, length); DBUG_DUMP("key_buff", key_buff, length); new_root= share->state.key_root[keynr]; /* Change the key to an internal structure. It's safe to have SEARCH_USER_KEY_HAS_TRANSID even if there isn't a transaction id, as ha_key_cmp() will stop comparison when key length is reached. For index with transid flag, the ref_length of the key is not correct. This should however be safe as long as this key is only used for comparsion against other keys (not for packing or for read-next etc as in this case we use data_length + ref_length, which is correct. */ key.keyinfo= share->keyinfo + keynr; key.data= key_buff; key.data_length= length - share->rec_reflength; key.ref_length= share->rec_reflength; key.flag= SEARCH_USER_KEY_HAS_TRANSID; res= ((share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ? maria_rtree_real_delete(info, &key, &new_root) : _ma_ck_real_delete(info, &key, &new_root)); if (res) _ma_mark_file_crashed(share); msg.root= &share->state.key_root[keynr]; msg.value= new_root; msg.keynr= keynr; if (_ma_write_clr(info, undo_lsn, *msg.root == msg.value ? LOGREC_UNDO_KEY_INSERT : LOGREC_UNDO_KEY_INSERT_WITH_ROOT, 0, 0, &lsn, (void*) &msg)) res= 1; _ma_fast_unlock_key_del(info); _ma_unpin_all_pages_and_finalize_row(info, lsn); DBUG_RETURN(res); }
O3
c
ma_apply_undo_key_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa48, %rsp # imm = 0xA48 movl %ecx, %r12d movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %r15 orl $0x1b1, 0x170(%r15) # imm = 0x1B1 movq %rsi, -0xa20(%rbp) movzbl (%rdx), %r14d decl %r12d leaq 0x1(%rdx), %rsi leaq -0xa10(%rbp), %r13 movl $0x9d3, %ecx # imm = 0x9D3 movq %r13, %rdi movq %r12, %rdx callq 0x29410 movq 0x118(%r15), %rax movq (%rax,%r14,8), %rax movq %rax, -0xa18(%rbp) movq 0x570(%r15), %rax imulq $0x118, %r14, %rcx # imm = 0x118 leaq (%rax,%rcx), %rdx movq %rdx, -0xa40(%rbp) movq %r13, -0xa48(%rbp) movl 0x740(%r15), %edx subl %edx, %r12d movl %r12d, -0xa38(%rbp) movl %edx, -0xa34(%rbp) movl $0x80000, -0xa30(%rbp) # imm = 0x80000 cmpb $0x2, 0xa4(%rax,%rcx) jne 0x41105 leaq -0xa48(%rbp), %rsi leaq -0xa18(%rbp), %rdx movq %rbx, %rdi callq 0x6278b jmp 0x4111b leaq -0xa48(%rbp), %rsi leaq -0xa18(%rbp), %rdx movq %rbx, %rdi callq 0x5915c movl %eax, %r12d testb %al, %al je 0x4112a movq %r15, %rdi callq 0x42d42 movq 0x118(%r15), %rax leaq (%rax,%r14,8), %rax leaq -0xa68(%rbp), %rcx movq %rax, (%rcx) movq -0xa18(%rbp), %rsi movq %rsi, 0x8(%rcx) movl %r14d, 0x10(%rcx) xorl %edx, %edx cmpq %rsi, (%rax) setne %dl addl $0x15, %edx movq %rcx, (%rsp) leaq -0xa28(%rbp), %r9 movq %rbx, %rdi movq -0xa20(%rbp), %rsi xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3fecd movl %eax, %r14d cmpb $0x0, 0x67e(%rbx) je 0x4118c movq %rbx, %rdi callq 0x4150a testb %r14b, %r14b movzbl %r12b, %eax movl $0x1, %r14d cmovel %eax, %r14d movq -0xa28(%rbp), %rsi movq %rbx, %rdi callq 0x3fe50 movq 0x8(%rbx), %rax movq $0x0, 0x90(%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x411df movl %r14d, %eax addq $0xa48, %rsp # imm = 0xA48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29250
_ma_apply_undo_key_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A48h mov r12d, ecx mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r15, [rdi] or dword ptr [r15+170h], 1B1h mov [rbp+var_A20], rsi movzx r14d, byte ptr [rdx] dec r12d lea rsi, [rdx+1] lea r13, [rbp+var_A10] mov ecx, 9D3h mov rdi, r13 mov rdx, r12 call ___memcpy_chk mov rax, [r15+118h] mov rax, [rax+r14*8] mov [rbp+var_A18], rax mov rax, [r15+570h] imul rcx, r14, 118h lea rdx, [rax+rcx] mov [rbp+var_A40], rdx mov [rbp+var_A48], r13 mov edx, [r15+740h] sub r12d, edx mov [rbp+var_A38], r12d mov [rbp+var_A34], edx mov [rbp+var_A30], 80000h cmp byte ptr [rax+rcx+0A4h], 2 jnz short loc_41105 lea rsi, [rbp+var_A48] lea rdx, [rbp+var_A18] mov rdi, rbx call maria_rtree_real_delete jmp short loc_4111B loc_41105: lea rsi, [rbp+var_A48] lea rdx, [rbp+var_A18] mov rdi, rbx call _ma_ck_real_delete loc_4111B: mov r12d, eax test al, al jz short loc_4112A mov rdi, r15 call _ma_mark_file_crashed loc_4112A: mov rax, [r15+118h] lea rax, [rax+r14*8] lea rcx, [rbp+var_A68] mov [rcx], rax mov rsi, [rbp+var_A18] mov [rcx+8], rsi mov [rcx+10h], r14d xor edx, edx cmp [rax], rsi setnz dl add edx, 15h mov [rsp+0A70h+var_A70], rcx lea r9, [rbp+var_A28] mov rdi, rbx mov rsi, [rbp+var_A20] xor ecx, ecx xor r8d, r8d call _ma_write_clr mov r14d, eax cmp byte ptr [rbx+67Eh], 0 jz short loc_4118C mov rdi, rbx call _ma_unlock_key_del loc_4118C: test r14b, r14b movzx eax, r12b mov r14d, 1 cmovz r14d, eax mov rsi, [rbp+var_A28] mov rdi, rbx call _ma_unpin_all_pages mov rax, [rbx+8] mov qword ptr [rax+90h], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_411DF mov eax, r14d add rsp, 0A48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_411DF: call ___stack_chk_fail
long long ma_apply_undo_key_insert(long long a1, long long a2, unsigned __int8 *a3, int a4) { long long v4; // r15 long long v5; // r14 long long v6; // r12 int v7; // edx unsigned __int8 v8; // al unsigned __int8 v9; // r12 char v10; // r14 bool v11; // zf unsigned int v12; // r14d _QWORD v14[2]; // [rsp+8h] [rbp-A68h] BYREF int v15; // [rsp+18h] [rbp-A58h] _BYTE *v16; // [rsp+28h] [rbp-A48h] BYREF long long v17; // [rsp+30h] [rbp-A40h] int v18; // [rsp+38h] [rbp-A38h] int v19; // [rsp+3Ch] [rbp-A34h] int v20; // [rsp+40h] [rbp-A30h] signed long long v21; // [rsp+48h] [rbp-A28h] BYREF long long v22; // [rsp+50h] [rbp-A20h] long long v23; // [rsp+58h] [rbp-A18h] BYREF _BYTE v24[2528]; // [rsp+60h] [rbp-A10h] BYREF unsigned long long v25; // [rsp+A40h] [rbp-30h] v25 = __readfsqword(0x28u); v4 = *(_QWORD *)a1; *(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x1B1u; v22 = a2; v5 = *a3; v6 = (unsigned int)(a4 - 1); __memcpy_chk(v24, a3 + 1, v6, 2515LL); v23 = *(_QWORD *)(*(_QWORD *)(v4 + 280) + 8 * v5); v17 = *(_QWORD *)(v4 + 1392) + 280 * v5; v16 = v24; v7 = *(_DWORD *)(v4 + 1856); v18 = v6 - v7; v19 = v7; v20 = 0x80000; if ( *(_BYTE *)(v17 + 164) == 2 ) v8 = maria_rtree_real_delete(a1, &v16, &v23); else v8 = ma_ck_real_delete(a1, &v16, &v23); v9 = v8; if ( v8 ) ma_mark_file_crashed(v4); v14[0] = *(_QWORD *)(v4 + 280) + 8 * v5; v14[1] = v23; v15 = v5; v10 = ma_write_clr( (long long *)a1, v22, (unsigned int)(*(_QWORD *)v14[0] != v23) + 21, 0, 0, (unsigned long long)&v21, (long long)v14); if ( *(_BYTE *)(a1 + 1662) ) ma_unlock_key_del(a1); v11 = v10 == 0; v12 = 1; if ( v11 ) v12 = v9; ma_unpin_all_pages(a1, v21); *(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL; return v12; }
_ma_apply_undo_key_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa48 MOV R12D,ECX MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R15,qword ptr [RDI] OR dword ptr [R15 + 0x170],0x1b1 MOV qword ptr [RBP + -0xa20],RSI MOVZX R14D,byte ptr [RDX] DEC R12D LEA RSI,[RDX + 0x1] LEA R13,[RBP + -0xa10] MOV ECX,0x9d3 MOV RDI,R13 MOV RDX,R12 CALL 0x00129410 MOV RAX,qword ptr [R15 + 0x118] MOV RAX,qword ptr [RAX + R14*0x8] MOV qword ptr [RBP + -0xa18],RAX MOV RAX,qword ptr [R15 + 0x570] IMUL RCX,R14,0x118 LEA RDX,[RAX + RCX*0x1] MOV qword ptr [RBP + -0xa40],RDX MOV qword ptr [RBP + -0xa48],R13 MOV EDX,dword ptr [R15 + 0x740] SUB R12D,EDX MOV dword ptr [RBP + -0xa38],R12D MOV dword ptr [RBP + -0xa34],EDX MOV dword ptr [RBP + -0xa30],0x80000 CMP byte ptr [RAX + RCX*0x1 + 0xa4],0x2 JNZ 0x00141105 LEA RSI,[RBP + -0xa48] LEA RDX,[RBP + -0xa18] MOV RDI,RBX CALL 0x0016278b JMP 0x0014111b LAB_00141105: LEA RSI,[RBP + -0xa48] LEA RDX,[RBP + -0xa18] MOV RDI,RBX CALL 0x0015915c LAB_0014111b: MOV R12D,EAX TEST AL,AL JZ 0x0014112a MOV RDI,R15 CALL 0x00142d42 LAB_0014112a: MOV RAX,qword ptr [R15 + 0x118] LEA RAX,[RAX + R14*0x8] LEA RCX,[RBP + -0xa68] MOV qword ptr [RCX],RAX MOV RSI,qword ptr [RBP + -0xa18] MOV qword ptr [RCX + 0x8],RSI MOV dword ptr [RCX + 0x10],R14D XOR EDX,EDX CMP qword ptr [RAX],RSI SETNZ DL ADD EDX,0x15 MOV qword ptr [RSP],RCX LEA R9,[RBP + -0xa28] MOV RDI,RBX MOV RSI,qword ptr [RBP + -0xa20] XOR ECX,ECX XOR R8D,R8D CALL 0x0013fecd MOV R14D,EAX CMP byte ptr [RBX + 0x67e],0x0 JZ 0x0014118c MOV RDI,RBX CALL 0x0014150a LAB_0014118c: TEST R14B,R14B MOVZX EAX,R12B MOV R14D,0x1 CMOVZ R14D,EAX MOV RSI,qword ptr [RBP + -0xa28] MOV RDI,RBX CALL 0x0013fe50 MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001411df MOV EAX,R14D ADD RSP,0xa48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001411df: CALL 0x00129250
char _ma_apply_undo_key_insert(long *param_1,int8 param_2,byte *param_3,int param_4) { byte bVar1; long lVar2; char cVar3; char cVar4; char cVar5; ulong uVar6; long in_FS_OFFSET; long *local_a70; long local_a68; uint local_a60; int1 *local_a50; long local_a48; int local_a40; int local_a3c; int4 local_a38; int8 local_a30; int8 local_a28; long local_a20; int1 local_a18 [2528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar2 = *param_1; *(uint *)(lVar2 + 0x170) = *(uint *)(lVar2 + 0x170) | 0x1b1; bVar1 = *param_3; uVar6 = (ulong)bVar1; local_a28 = param_2; __memcpy_chk(local_a18,param_3 + 1,param_4 + -1,0x9d3); local_a20 = *(long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8); local_a48 = *(long *)(lVar2 + 0x570) + uVar6 * 0x118; local_a3c = *(int *)(lVar2 + 0x740); local_a40 = (param_4 + -1) - local_a3c; local_a38 = 0x80000; local_a50 = local_a18; if (*(char *)(*(long *)(lVar2 + 0x570) + 0xa4 + uVar6 * 0x118) == '\x02') { cVar3 = maria_rtree_real_delete(param_1,&local_a50,&local_a20); } else { cVar3 = _ma_ck_real_delete(param_1,&local_a50,&local_a20); } if (cVar3 != '\0') { _ma_mark_file_crashed(lVar2); } local_a70 = (long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8); local_a68 = local_a20; local_a60 = (uint)bVar1; cVar4 = _ma_write_clr(param_1,local_a28,(*local_a70 != local_a20) + '\x15',0,0,&local_a30, &local_a70); if (*(char *)((long)param_1 + 0x67e) != '\0') { _ma_unlock_key_del(param_1); } cVar5 = '\x01'; if (cVar4 == '\0') { cVar5 = cVar3; } _ma_unpin_all_pages(param_1,local_a30); *(int8 *)(param_1[1] + 0x90) = 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return cVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
53,093
pagecache_fwrite
eloqsql/storage/maria/ma_pagecache.c
static my_bool pagecache_fwrite(PAGECACHE *pagecache, PAGECACHE_FILE *filedesc, uchar *buffer, pgcache_page_no_t pageno, enum pagecache_page_type type __attribute__((unused)), myf flags) { int res; PAGECACHE_IO_HOOK_ARGS args; DBUG_ENTER("pagecache_fwrite"); DBUG_ASSERT(type != PAGECACHE_READ_UNKNOWN_PAGE); #ifdef EXTRA_DEBUG_BITMAP /* This code is very good when debugging changes in bitmaps or dirty lists The above define should be defined for all Aria files if you want to debug either of the above issues. */ if (pagecache->extra_debug) { char buff[80]; uint len= my_sprintf(buff, (buff, "fwrite: fd: %d id: %u page: %llu", filedesc->file, _ma_file_callback_to_id(filedesc->callback_data), pageno)); (void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY, (uchar*) buff, len); } #endif /* initialize hooks args */ args.page= buffer; args.pageno= pageno; args.data= filedesc->callback_data; /* Todo: Integrate this with write_callback so we have only one callback */ if ((*filedesc->flush_log_callback)(&args)) DBUG_RETURN(1); DBUG_PRINT("info", ("pre_write_hook:%p data: %p", filedesc->pre_write_hook, filedesc->callback_data)); if ((*filedesc->pre_write_hook)(&args)) { DBUG_PRINT("error", ("write callback problem")); DBUG_RETURN(1); } #if __has_feature(memory_sanitizer) /* FIXME: encryption.aria_tiny etc. fail */ /* FIXME: ENGINE=Aria occasionally writes uninitialized data */ __msan_unpoison(args.page, pagecache->block_size); #endif res= (int)my_pwrite(filedesc->file, args.page, pagecache->block_size, ((my_off_t) pageno << pagecache->shift), flags); (*filedesc->post_write_hook)(res, &args); DBUG_RETURN(res); }
O3
c
pagecache_fwrite: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r14 movq %rcx, %r15 movq %rsi, %rbx movq %rdi, %r12 leaq -0x48(%rbp), %rdi movq %rdx, (%rdi) movq %rcx, 0x8(%rdi) movq 0x40(%rsi), %rax movq %rax, 0x10(%rdi) callq *0x38(%rsi) movb $0x1, %r13b testb %al, %al jne 0x3d54a leaq -0x48(%rbp), %rdi callq *0x28(%rbx) testb %al, %al jne 0x3d54a movl 0x10(%rbx), %edi leaq -0x48(%rbp), %rax movq (%rax), %rsi movl 0x80(%r12), %edx movb 0x190(%r12), %cl shlq %cl, %r15 movq %r15, %rcx movq %r14, %r8 callq 0xa10de movq %rax, %r13 movl %r13d, %edi leaq -0x48(%rbp), %rsi callq *0x30(%rbx) movl %r13d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
pagecache_fwrite: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, r8 mov r15, rcx mov rbx, rsi mov r12, rdi lea rdi, [rbp+var_48] mov [rdi], rdx mov [rdi+8], rcx mov rax, [rsi+40h] mov [rdi+10h], rax call qword ptr [rsi+38h] mov r13b, 1 test al, al jnz short loc_3D54A lea rdi, [rbp+var_48] call qword ptr [rbx+28h] test al, al jnz short loc_3D54A mov edi, [rbx+10h] lea rax, [rbp+var_48] mov rsi, [rax] mov edx, [r12+80h] mov cl, [r12+190h] shl r15, cl mov rcx, r15 mov r8, r14 call my_pwrite mov r13, rax mov edi, r13d lea rsi, [rbp+var_48] call qword ptr [rbx+30h] loc_3D54A: mov eax, r13d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long pagecache_fwrite(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned int v5; // r13d _QWORD v9[9]; // [rsp+8h] [rbp-48h] BYREF v9[0] = a3; v9[1] = a4; v9[2] = *(_QWORD *)(a2 + 64); LOBYTE(v5) = 1; if ( !(*(unsigned __int8 (**)(void))(a2 + 56))() && !(*(unsigned __int8 ( **)(_QWORD *))(a2 + 40))(v9) ) { v5 = my_pwrite(*(unsigned int *)(a2 + 16), v9[0], *(unsigned int *)(a1 + 128), a4 << *(_BYTE *)(a1 + 400), a5); (*(void ( **)(_QWORD, _QWORD *))(a2 + 48))(v5, v9); } return v5; }
pagecache_fwrite: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,R8 MOV R15,RCX MOV RBX,RSI MOV R12,RDI LEA RDI,[RBP + -0x48] MOV qword ptr [RDI],RDX MOV qword ptr [RDI + 0x8],RCX MOV RAX,qword ptr [RSI + 0x40] MOV qword ptr [RDI + 0x10],RAX CALL qword ptr [RSI + 0x38] MOV R13B,0x1 TEST AL,AL JNZ 0x0013d54a LEA RDI,[RBP + -0x48] CALL qword ptr [RBX + 0x28] TEST AL,AL JNZ 0x0013d54a MOV EDI,dword ptr [RBX + 0x10] LEA RAX,[RBP + -0x48] MOV RSI,qword ptr [RAX] MOV EDX,dword ptr [R12 + 0x80] MOV CL,byte ptr [R12 + 0x190] SHL R15,CL MOV RCX,R15 MOV R8,R14 CALL 0x001a10de MOV R13,RAX MOV EDI,R13D LEA RSI,[RBP + -0x48] CALL qword ptr [RBX + 0x30] LAB_0013d54a: MOV EAX,R13D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong pagecache_fwrite(long param_1,long param_2,int8 param_3,long param_4,int8 param_5) { char cVar1; ulong uVar2; int8 unaff_R13; int8 local_50; long local_48; int8 local_40; local_40 = *(int8 *)(param_2 + 0x40); local_50 = param_3; local_48 = param_4; cVar1 = (**(code **)(param_2 + 0x38))(); uVar2 = CONCAT71((int7)((ulong)unaff_R13 >> 8),1); if (cVar1 == '\0') { cVar1 = (**(code **)(param_2 + 0x28))(&local_50); if (cVar1 == '\0') { uVar2 = my_pwrite(*(int4 *)(param_2 + 0x10),local_50,*(int4 *)(param_1 + 0x80), param_4 << (*(byte *)(param_1 + 400) & 0x3f),param_5); (**(code **)(param_2 + 0x30))(uVar2 & 0xffffffff,&local_50); } } return uVar2 & 0xffffffff; }
53,094
maria_rtree_insert_req
eloqsql/storage/maria/ma_rt_index.c
static int maria_rtree_insert_req(MARIA_HA *info, MARIA_KEY *key, my_off_t page_pos, my_off_t *new_page, int ins_level, int level) { uint nod_flag; uint key_length= key->data_length; int res; my_bool buff_alloced; uchar *page_buf, *k; MARIA_SHARE *share= info->s; MARIA_KEYDEF *keyinfo= key->keyinfo; MARIA_PAGE page; DBUG_ENTER("maria_rtree_insert_req"); alloc_on_stack(*info->stack_end_ptr, page_buf, buff_alloced, keyinfo->block_length + keyinfo->max_store_length); if (!page_buf) { my_errno= HA_ERR_OUT_OF_MEM; DBUG_RETURN(-1); /* purecov: inspected */ } if (_ma_fetch_keypage(&page, info, keyinfo, page_pos, PAGECACHE_LOCK_WRITE, DFLT_INIT_HITS, page_buf, 0)) goto err; nod_flag= page.node; DBUG_PRINT("rtree", ("page: %lu level: %d ins_level: %d nod_flag: %u", (ulong) page.pos, level, ins_level, nod_flag)); if ((ins_level == -1 && nod_flag) || /* key: go down to leaf */ (ins_level > -1 && ins_level > level)) /* branch: go down to ins_level */ { if (!(k= (uchar *)maria_rtree_pick_key(key, &page))) goto err; /* k is now a pointer inside the page_buf buffer */ switch ((res= maria_rtree_insert_req(info, key, _ma_kpos(nod_flag, k), new_page, ins_level, level + 1))) { case 0: /* child was not split, most common case */ { maria_rtree_combine_rect(keyinfo->seg, k, key->data, k, key_length); if (share->now_transactional && _ma_log_change(&page, k, key_length, KEY_OP_DEBUG_RTREE_COMBINE)) goto err; page_mark_changed(info, &page); if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED, DFLT_INIT_HITS)) goto err; goto ok; } case 1: /* child was split */ { /* Set new_key to point to a free buffer area */ uchar *new_key_buff= page_buf + keyinfo->block_length + nod_flag; MARIA_KEY new_key; MARIA_KEY k_key; DBUG_ASSERT(nod_flag); k_key.keyinfo= new_key.keyinfo= keyinfo; new_key.data= new_key_buff; k_key.data= k; k_key.data_length= new_key.data_length= key->data_length; k_key.ref_length= new_key.ref_length= key->ref_length; k_key.flag= new_key.flag= 0; /* Safety */ /* set proper MBR for key */ if (maria_rtree_set_key_mbr(info, &k_key, _ma_kpos(nod_flag, k))) goto err; if (share->now_transactional && _ma_log_change(&page, k, key_length, KEY_OP_DEBUG_RTREE_SPLIT)) goto err; /* add new key for new page */ _ma_kpointer(info, new_key_buff - nod_flag, *new_page); if (maria_rtree_set_key_mbr(info, &new_key, *new_page)) goto err; res= maria_rtree_add_key(&new_key, &page, new_page); page_mark_changed(info, &page); if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED, DFLT_INIT_HITS)) goto err; goto ok; } default: case -1: /* error */ { goto err; } } } else { res= maria_rtree_add_key(key, &page, new_page); page_mark_changed(info, &page); if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED, DFLT_INIT_HITS)) goto err; } ok: stack_alloc_free(page_buf, buff_alloced); DBUG_RETURN(res); err: res= -1; /* purecov: inspected */ goto ok; /* purecov: inspected */ }
O3
c
maria_rtree_insert_req: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movl %r9d, -0x44(%rbp) movl %r8d, -0x48(%rbp) movq %rcx, -0x50(%rbp) movq %rdx, %rbx movq %rsi, %r13 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x10(%rsi), %eax movl %eax, -0x38(%rbp) movq (%rdi), %rax movq %rax, -0x70(%rbp) movq 0x8(%rsi), %rcx movzwl 0xa6(%rcx), %eax movq %rcx, -0x58(%rbp) movzwl 0xb0(%rcx), %esi addq %rax, %rsi leaq -0xd8(%rbp), %rcx movq %rsi, (%rcx) movq 0x78(%rdi), %rax movq (%rax), %rax subq %rcx, %rax subq %rsi, %rax jbe 0x64fe6 cmpq $0x10000, %rax # imm = 0x10000 ja 0x64fd2 cmpl $0x1000, %esi # imm = 0x1000 jb 0x64fe6 cmpq $0x8001, %rax # imm = 0x8001 jb 0x64fe6 movq %rsp, %r14 addl $0xf, %esi andl $-0x10, %esi subq %rsi, %r14 movq %r14, %rsp movb $0x1, %r15b jmp 0x65001 xorl %r15d, %r15d movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0xa63e5 testq %rax, %rax je 0x6521f movq %rax, %r14 leaq -0xd8(%rbp), %rdi movq %r12, %rsi movq -0x58(%rbp), %rdx movq %rbx, %rcx movl $0x4, %r8d movl $0x3, %r9d pushq $0x0 pushq %r14 callq 0x720be addq $0x10, %rsp testb %al, %al jne 0x65285 movq %r12, -0x40(%rbp) movl %r15d, -0x34(%rbp) movl -0xb0(%rbp), %eax movl -0x48(%rbp), %esi cmpl $-0x1, %esi sete %cl testl %eax, %eax setne %dl testb %dl, %cl jne 0x65066 testl %esi, %esi sets %cl cmpl -0x44(%rbp), %esi setle %dl orb %cl, %dl jne 0x6523b movq %r14, -0x68(%rbp) movl %eax, %edx movq -0xd8(%rbp), %rax movq -0xc8(%rbp), %rcx movq (%rax), %rax movq %rax, %r12 movl 0x744(%rax), %r15d movq %rdx, -0x60(%rbp) addq %rcx, %r15 addq %rdx, %r15 movl -0xb8(%rbp), %r14d addq %rcx, %r14 cmpq %r14, %r15 jae 0x65231 movl 0x10(%r13), %ecx movsd 0x842d8(%rip), %xmm2 # 0xe9388 xorl %ebx, %ebx movsd %xmm2, -0xa0(%rbp) movq (%r13), %rdx movq 0x8(%r13), %rax movq 0xc0(%rax), %rdi addl 0x14(%r13), %ecx movq %r15, %rsi leaq -0x90(%rbp), %r8 callq 0x67cf9 ucomisd 0x842ac(%rip), %xmm0 # 0xe9390 jne 0x650ec jnp 0x65231 movsd -0x90(%rbp), %xmm1 testq %rbx, %rbx movsd -0xa0(%rbp), %xmm2 je 0x6511d ucomisd %xmm0, %xmm2 ja 0x6511d ucomisd %xmm2, %xmm0 jne 0x6512c jp 0x6512c movsd -0x98(%rbp), %xmm3 ucomisd %xmm1, %xmm3 jbe 0x6512c movapd %xmm0, %xmm2 movsd %xmm1, -0x98(%rbp) movq %r15, %rbx movl -0xb0(%rbp), %eax testl %eax, %eax jne 0x6513e movl 0x3e0(%r12), %eax movl 0x10(%r13), %ecx addq %rcx, %r15 movl %eax, %eax addq %rax, %r15 cmpq %r14, %r15 jb 0x650b2 testq %rbx, %rbx movq -0x68(%rbp), %r14 movl -0x34(%rbp), %r15d movq -0x40(%rbp), %r12 je 0x65285 movq -0x60(%rbp), %rdi movq %rbx, %rsi callq 0x700cf movl -0x44(%rbp), %r9d incl %r9d movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx movq -0x50(%rbp), %rcx movl -0x48(%rbp), %r8d callq 0x64f45 cmpl $0x1, %eax je 0x652bb testl %eax, %eax movq -0x40(%rbp), %r12 jne 0x65285 movq -0x58(%rbp), %rax movq 0xc0(%rax), %rdi movq (%r13), %rdx movq %rbx, %rsi movq %rbx, %rcx movl -0x38(%rbp), %r8d callq 0x672f9 movq -0x70(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x651ed leaq -0xd8(%rbp), %rdi movq %rbx, %rsi movl -0x38(%rbp), %edx xorl %ecx, %ecx callq 0x5b4b2 testb %al, %al jne 0x65285 movq 0x2e8(%r12), %rax leaq -0xd8(%rbp), %rdi movl 0x30(%rdi), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) movl $0x2, %esi movl $0x3, %edx callq 0x721fd testb %al, %al jne 0x65285 xorl %ebx, %ebx jmp 0x6528a callq 0xa8156 movl $0x80, (%rax) movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x65297 movq -0x68(%rbp), %r14 movl -0x34(%rbp), %r15d jmp 0x65285 leaq -0xd8(%rbp), %r15 movq %r13, %rdi movq %r15, %rsi movq -0x50(%rbp), %rdx callq 0x661ac movl %eax, %ebx movq -0x40(%rbp), %rax movq 0x2e8(%rax), %rax movl 0x30(%r15), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) movq %r15, %rdi movl $0x2, %esi movl $0x3, %edx callq 0x721fd testb %al, %al movl -0x34(%rbp), %r15d je 0x6528a movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testb %r15b, %r15b jne 0x65297 movq %r14, %rdi callq 0xa6612 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x653e1 movl %ebx, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x58(%rbp), %rcx movzwl 0xa6(%rcx), %r12d addq %r14, %r12 movq -0x60(%rbp), %rdi movq %rdi, %rax addq %r12, %rax movq %rcx, -0x88(%rbp) leaq -0xf8(%rbp), %r15 movq %rcx, 0x8(%r15) movq %rax, -0x90(%rbp) movq %rbx, (%r15) movl 0x10(%r13), %eax movl %eax, -0x80(%rbp) movl %eax, 0x10(%r15) movl 0x14(%r13), %eax movl %eax, -0x7c(%rbp) movl %eax, 0x14(%r15) xorl %eax, %eax movl %eax, -0x78(%rbp) movl %eax, 0x18(%r15) movq %rbx, %rsi callq 0x700cf movq -0x40(%rbp), %rdi movq %r15, %rsi movq %rax, %rdx callq 0x6634b testl %eax, %eax jne 0x65235 movq -0x70(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x6535a leaq -0xd8(%rbp), %rdi movq %rbx, %rsi movl -0x38(%rbp), %edx movl $0x1, %ecx callq 0x5b4b2 testb %al, %al jne 0x65235 movq -0x50(%rbp), %r15 movq (%r15), %rdx movq -0x40(%rbp), %rbx movq %rbx, %rdi movq %r12, %rsi callq 0x7017d movq (%r15), %rdx leaq -0x90(%rbp), %rsi movq %rbx, %rdi callq 0x6634b testl %eax, %eax jne 0x65235 leaq -0x90(%rbp), %rdi leaq -0xd8(%rbp), %r15 movq %r15, %rsi movq -0x50(%rbp), %rdx callq 0x661ac movl %eax, %ebx movq -0x40(%rbp), %rax movq 0x2e8(%rax), %rax movl 0x30(%r15), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) movq %r15, %rdi movl $0x2, %esi movl $0x3, %edx callq 0x721fd testb %al, %al jne 0x65235 movl -0x34(%rbp), %r15d jmp 0x6528a callq 0x2a270
maria_rtree_insert_req: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov [rbp+var_44], r9d mov [rbp+var_48], r8d mov [rbp+var_50], rcx mov rbx, rdx mov r13, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov eax, [rsi+10h] mov [rbp+var_38], eax mov rax, [rdi] mov [rbp+var_70], rax mov rcx, [rsi+8] movzx eax, word ptr [rcx+0A6h] mov [rbp+var_58], rcx movzx esi, word ptr [rcx+0B0h] add rsi, rax lea rcx, [rbp+var_D8] mov [rcx], rsi mov rax, [rdi+78h] mov rax, [rax] sub rax, rcx sub rax, rsi jbe short loc_64FE6 cmp rax, offset stru_10000 ja short loc_64FD2 cmp esi, 1000h jb short loc_64FE6 cmp rax, 8001h jb short loc_64FE6 loc_64FD2: mov r14, rsp add esi, 0Fh and esi, 0FFFFFFF0h sub r14, rsi mov rsp, r14 mov r15b, 1 jmp short loc_65001 loc_64FE6: xor r15d, r15d mov edx, 10010h xor edi, edi call my_malloc test rax, rax jz loc_6521F mov r14, rax loc_65001: lea rdi, [rbp+var_D8] mov rsi, r12 mov rdx, [rbp+var_58] mov rcx, rbx mov r8d, 4 mov r9d, 3 push 0 push r14 call _ma_fetch_keypage add rsp, 10h test al, al jnz loc_65285 mov [rbp+var_40], r12 mov [rbp+var_34], r15d mov eax, [rbp+var_B0] mov esi, [rbp+var_48] cmp esi, 0FFFFFFFFh setz cl test eax, eax setnz dl test cl, dl jnz short loc_65066 test esi, esi sets cl cmp esi, [rbp+var_44] setle dl or dl, cl jnz loc_6523B loc_65066: mov [rbp+var_68], r14 mov edx, eax mov rax, [rbp+var_D8] mov rcx, [rbp+var_C8] mov rax, [rax] mov r12, rax mov r15d, [rax+744h] mov [rbp+var_60], rdx add r15, rcx add r15, rdx mov r14d, [rbp+var_B8] add r14, rcx cmp r15, r14 jnb loc_65231 mov ecx, [r13+10h] movsd xmm2, cs:qword_E9388 xor ebx, ebx loc_650B2: movsd [rbp+var_A0], xmm2 mov rdx, [r13+0] mov rax, [r13+8] mov rdi, [rax+0C0h] add ecx, [r13+14h] mov rsi, r15 lea r8, [rbp+var_90] call maria_rtree_area_increase ucomisd xmm0, cs:qword_E9390 jnz short loc_650EC jnp loc_65231 loc_650EC: movsd xmm1, [rbp+var_90] test rbx, rbx movsd xmm2, [rbp+var_A0] jz short loc_6511D ucomisd xmm2, xmm0 ja short loc_6511D ucomisd xmm0, xmm2 jnz short loc_6512C jp short loc_6512C movsd xmm3, [rbp+var_98] ucomisd xmm3, xmm1 jbe short loc_6512C loc_6511D: movapd xmm2, xmm0 movsd [rbp+var_98], xmm1 mov rbx, r15 loc_6512C: mov eax, [rbp+var_B0] test eax, eax jnz short loc_6513E mov eax, [r12+3E0h] loc_6513E: mov ecx, [r13+10h] add r15, rcx mov eax, eax add r15, rax cmp r15, r14 jb loc_650B2 test rbx, rbx mov r14, [rbp+var_68] mov r15d, [rbp+var_34] mov r12, [rbp+var_40] jz loc_65285 mov rdi, [rbp+var_60] mov rsi, rbx call _ma_kpos mov r9d, [rbp+var_44] inc r9d mov rdi, r12 mov rsi, r13 mov rdx, rax mov rcx, [rbp+var_50] mov r8d, [rbp+var_48] call maria_rtree_insert_req cmp eax, 1 jz loc_652BB test eax, eax mov r12, [rbp+var_40] jnz loc_65285 mov rax, [rbp+var_58] mov rdi, [rax+0C0h] mov rdx, [r13+0] mov rsi, rbx mov rcx, rbx mov r8d, [rbp+var_38] call maria_rtree_combine_rect mov rax, [rbp+var_70] cmp byte ptr [rax+7E7h], 0 jz short loc_651ED lea rdi, [rbp+var_D8] mov rsi, rbx mov edx, [rbp+var_38] xor ecx, ecx call _ma_log_change test al, al jnz loc_65285 loc_651ED: mov rax, [r12+2E8h] lea rdi, [rbp+var_D8] mov ecx, [rdi+30h] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 mov esi, 2 mov edx, 3 call _ma_write_keypage test al, al jnz short loc_65285 xor ebx, ebx jmp short loc_6528A loc_6521F: call _my_thread_var mov dword ptr [rax], 80h mov ebx, 0FFFFFFFFh jmp short loc_65297 loc_65231: mov r14, [rbp+var_68] loc_65235: mov r15d, [rbp+var_34] jmp short loc_65285 loc_6523B: lea r15, [rbp+var_D8] mov rdi, r13 mov rsi, r15 mov rdx, [rbp+var_50] call maria_rtree_add_key mov ebx, eax mov rax, [rbp+var_40] mov rax, [rax+2E8h] mov ecx, [r15+30h] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 mov rdi, r15 mov esi, 2 mov edx, 3 call _ma_write_keypage test al, al mov r15d, [rbp+var_34] jz short loc_6528A loc_65285: mov ebx, 0FFFFFFFFh loc_6528A: test r15b, r15b jnz short loc_65297 mov rdi, r14 call my_free loc_65297: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_653E1 mov eax, ebx lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_652BB: mov rcx, [rbp+var_58] movzx r12d, word ptr [rcx+0A6h] add r12, r14 mov rdi, [rbp+var_60] mov rax, rdi add rax, r12 mov [rbp+var_88], rcx lea r15, [rbp+var_F8] mov [r15+8], rcx mov [rbp+var_90], rax mov [r15], rbx mov eax, [r13+10h] mov [rbp+var_80], eax mov [r15+10h], eax mov eax, [r13+14h] mov [rbp+var_7C], eax mov [r15+14h], eax xor eax, eax mov [rbp+var_78], eax mov [r15+18h], eax mov rsi, rbx call _ma_kpos mov rdi, [rbp+var_40] mov rsi, r15 mov rdx, rax call maria_rtree_set_key_mbr test eax, eax jnz loc_65235 mov rax, [rbp+var_70] cmp byte ptr [rax+7E7h], 0 jz short loc_6535A lea rdi, [rbp+var_D8] mov rsi, rbx mov edx, [rbp+var_38] mov ecx, 1 call _ma_log_change test al, al jnz loc_65235 loc_6535A: mov r15, [rbp+var_50] mov rdx, [r15] mov rbx, [rbp+var_40] mov rdi, rbx mov rsi, r12 call _ma_kpointer mov rdx, [r15] lea rsi, [rbp+var_90] mov rdi, rbx call maria_rtree_set_key_mbr test eax, eax jnz loc_65235 lea rdi, [rbp+var_90] lea r15, [rbp+var_D8] mov rsi, r15 mov rdx, [rbp+var_50] call maria_rtree_add_key mov ebx, eax mov rax, [rbp+var_40] mov rax, [rax+2E8h] mov ecx, [r15+30h] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 mov rdi, r15 mov esi, 2 mov edx, 3 call _ma_write_keypage test al, al jnz loc_65235 mov r15d, [rbp+var_34] jmp loc_6528A loc_653E1: call ___stack_chk_fail
long long maria_rtree_insert_req(long long *a1, _QWORD *a2, int a3, _QWORD *a4, int a5, int a6) { int v6; // r15d double v9; // rcx long long v10; // rax unsigned long long v11; // rsi unsigned long long v12; // rax bool v13; // cc unsigned long long v14; // rax char *v15; // r14 long long v16; // rax long long v17; // r12 long long v18; // r15 unsigned long long v19; // r15 unsigned long long v20; // r14 long long v21; // rcx double v22; // xmm2_8 long long v23; // rbx double v24; // xmm0_8 double v25; // xmm1_8 unsigned int v26; // eax long long *v27; // r12 long long v28; // rax int inserted; // eax long long *v30; // r12 unsigned int v31; // ebx char v32; // al char *v34; // r12 long long v35; // rax _QWORD *v36; // r15 long long *v37; // rbx double v39[2]; // [rsp+8h] [rbp-F8h] BYREF int v40; // [rsp+18h] [rbp-E8h] int v41; // [rsp+1Ch] [rbp-E4h] int v42; // [rsp+20h] [rbp-E0h] _QWORD v43[2]; // [rsp+28h] [rbp-D8h] BYREF long long v44; // [rsp+38h] [rbp-C8h] unsigned int v45; // [rsp+48h] [rbp-B8h] unsigned int v46; // [rsp+50h] [rbp-B0h] unsigned int v47; // [rsp+58h] [rbp-A8h] double v48; // [rsp+60h] [rbp-A0h] double v49; // [rsp+68h] [rbp-98h] double v50[2]; // [rsp+70h] [rbp-90h] BYREF int v51; // [rsp+80h] [rbp-80h] int v52; // [rsp+84h] [rbp-7Ch] int v53; // [rsp+88h] [rbp-78h] long long v54; // [rsp+90h] [rbp-70h] char *v55; // [rsp+98h] [rbp-68h] long long v56; // [rsp+A0h] [rbp-60h] double v57; // [rsp+A8h] [rbp-58h] _QWORD *v58; // [rsp+B0h] [rbp-50h] int v59; // [rsp+B8h] [rbp-48h] int v60; // [rsp+BCh] [rbp-44h] long long *v61; // [rsp+C0h] [rbp-40h] unsigned int v62; // [rsp+C8h] [rbp-38h] int v63; // [rsp+CCh] [rbp-34h] unsigned long long v64; // [rsp+D0h] [rbp-30h] v60 = a6; v59 = a5; v58 = a4; v64 = __readfsqword(0x28u); v62 = *((_DWORD *)a2 + 4); v54 = *a1; v9 = *((double *)a2 + 1); v10 = *(unsigned __int16 *)(*(_QWORD *)&v9 + 166LL); v57 = v9; v11 = v10 + *(unsigned __int16 *)(*(_QWORD *)&v9 + 176LL); v43[0] = v11; v12 = *(_QWORD *)a1[15] - (_QWORD)v43; v13 = v12 <= v11; v14 = v12 - v11; if ( v13 || v14 <= (unsigned long long)&stru_10000 && ((unsigned int)v11 < 0x1000 || v14 < 0x8001) ) { v6 = 0; v16 = my_malloc(0LL, v11, 65552LL); if ( !v16 ) { *(_DWORD *)my_thread_var(0LL) = 128; return (unsigned int)-1; } v15 = (char *)v16; } else { v15 = (char *)&v39[-1] - (((_DWORD)v11 + 15) & 0xFFFFFFF0); LOBYTE(v6) = 1; } if ( !(unsigned __int8)ma_fetch_keypage((unsigned int)v43, (_DWORD)a1, LODWORD(v57), a3, 4, 3, (long long)v15) ) { v61 = a1; v63 = v6; if ( (v46 == 0 || v59 != -1) && (v59 < 0 || v59 <= v60) ) { v31 = maria_rtree_add_key(a2, v43, v58); *(_BYTE *)(v61[93] + 24LL * v47 + 16) = 1; v32 = ma_write_keypage(v43, 2LL, 3LL); LOBYTE(v6) = v63; if ( !v32 ) goto LABEL_34; } else { v55 = v15; v17 = *(_QWORD *)v43[0]; v18 = *(unsigned int *)(*(_QWORD *)v43[0] + 1860LL); v56 = v46; v19 = v46 + v44 + v18; v20 = v44 + v45; if ( v19 < v20 ) { LODWORD(v21) = *((_DWORD *)a2 + 4); v22 = 1.797693134862316e308; v23 = 0LL; while ( 1 ) { v48 = v22; v24 = maria_rtree_area_increase( *(_QWORD *)(a2[1] + 192LL), v19, *a2, (unsigned int)(*((_DWORD *)a2 + 5) + v21), v50); if ( v24 == -1.0 ) break; v25 = v50[0]; v22 = v48; if ( !v23 || v48 > v24 || v24 == v48 && v49 > v50[0] ) { v22 = v24; v49 = v50[0]; v23 = v19; } v26 = v46; if ( !v46 ) v26 = *(_DWORD *)(v17 + 992); v21 = *((unsigned int *)a2 + 4); v19 += v26 + v21; if ( v19 >= v20 ) { v15 = v55; LOBYTE(v6) = v63; v27 = v61; if ( !v23 ) goto LABEL_33; v28 = ma_kpos(v56, v23); inserted = maria_rtree_insert_req(v27, a2, v28, v58, (unsigned int)v59, (unsigned int)(v60 + 1)); if ( inserted != 1 ) { v30 = v61; if ( !inserted ) { maria_rtree_combine_rect(*(_QWORD *)(*(_QWORD *)&v57 + 192LL), v23, *a2, v23, v62, v24, v25, v22); if ( !*(_BYTE *)(v54 + 2023) || !ma_log_change((long long)v43, v23, v62) ) { *(_BYTE *)(v30[93] + 24LL * v47 + 16) = 1; if ( !(unsigned __int8)ma_write_keypage(v43, 2LL, 3LL) ) { v31 = 0; goto LABEL_34; } } } goto LABEL_33; } v34 = &v15[*(unsigned __int16 *)(*(_QWORD *)&v57 + 166LL)]; v50[1] = v57; v39[1] = v57; *(_QWORD *)&v50[0] = &v34[v56]; *(_QWORD *)&v39[0] = v23; v51 = *((_DWORD *)a2 + 4); v40 = v51; v52 = *((_DWORD *)a2 + 5); v41 = v52; v53 = 0; v42 = 0; v35 = ma_kpos(v56, v23); if ( !(unsigned int)maria_rtree_set_key_mbr(v61, v39, v35) && (!*(_BYTE *)(v54 + 2023) || !ma_log_change((long long)v43, v23, v62)) ) { v36 = v58; v37 = v61; ma_kpointer(v61, v34); if ( !(unsigned int)maria_rtree_set_key_mbr(v37, v50, *v36) ) { v31 = maria_rtree_add_key(v50, v43, v58); *(_BYTE *)(v61[93] + 24LL * v47 + 16) = 1; if ( !(unsigned __int8)ma_write_keypage(v43, 2LL, 3LL) ) { LOBYTE(v6) = v63; goto LABEL_34; } } } goto LABEL_31; } } } v15 = v55; LABEL_31: LOBYTE(v6) = v63; } } LABEL_33: v31 = -1; LABEL_34: if ( !(_BYTE)v6 ) my_free(v15); return v31; }
maria_rtree_insert_req: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV dword ptr [RBP + -0x44],R9D MOV dword ptr [RBP + -0x48],R8D MOV qword ptr [RBP + -0x50],RCX MOV RBX,RDX MOV R13,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RSI + 0x10] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RDI] MOV qword ptr [RBP + -0x70],RAX MOV RCX,qword ptr [RSI + 0x8] MOVZX EAX,word ptr [RCX + 0xa6] MOV qword ptr [RBP + -0x58],RCX MOVZX ESI,word ptr [RCX + 0xb0] ADD RSI,RAX LEA RCX,[RBP + -0xd8] MOV qword ptr [RCX],RSI MOV RAX,qword ptr [RDI + 0x78] MOV RAX,qword ptr [RAX] SUB RAX,RCX SUB RAX,RSI JBE 0x00164fe6 CMP RAX,0x10000 JA 0x00164fd2 CMP ESI,0x1000 JC 0x00164fe6 CMP RAX,0x8001 JC 0x00164fe6 LAB_00164fd2: MOV R14,RSP ADD ESI,0xf AND ESI,0xfffffff0 SUB R14,RSI MOV RSP,R14 MOV R15B,0x1 JMP 0x00165001 LAB_00164fe6: XOR R15D,R15D MOV EDX,0x10010 XOR EDI,EDI CALL 0x001a63e5 TEST RAX,RAX JZ 0x0016521f MOV R14,RAX LAB_00165001: LEA RDI,[RBP + -0xd8] MOV RSI,R12 MOV RDX,qword ptr [RBP + -0x58] MOV RCX,RBX MOV R8D,0x4 MOV R9D,0x3 PUSH 0x0 PUSH R14 CALL 0x001720be ADD RSP,0x10 TEST AL,AL JNZ 0x00165285 MOV qword ptr [RBP + -0x40],R12 MOV dword ptr [RBP + -0x34],R15D MOV EAX,dword ptr [RBP + -0xb0] MOV ESI,dword ptr [RBP + -0x48] CMP ESI,-0x1 SETZ CL TEST EAX,EAX SETNZ DL TEST CL,DL JNZ 0x00165066 TEST ESI,ESI SETS CL CMP ESI,dword ptr [RBP + -0x44] SETLE DL OR DL,CL JNZ 0x0016523b LAB_00165066: MOV qword ptr [RBP + -0x68],R14 MOV EDX,EAX MOV RAX,qword ptr [RBP + -0xd8] MOV RCX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX] MOV R12,RAX MOV R15D,dword ptr [RAX + 0x744] MOV qword ptr [RBP + -0x60],RDX ADD R15,RCX ADD R15,RDX MOV R14D,dword ptr [RBP + -0xb8] ADD R14,RCX CMP R15,R14 JNC 0x00165231 MOV ECX,dword ptr [R13 + 0x10] MOVSD XMM2,qword ptr [0x001e9388] XOR EBX,EBX LAB_001650b2: MOVSD qword ptr [RBP + -0xa0],XMM2 MOV RDX,qword ptr [R13] MOV RAX,qword ptr [R13 + 0x8] MOV RDI,qword ptr [RAX + 0xc0] ADD ECX,dword ptr [R13 + 0x14] MOV RSI,R15 LEA R8,[RBP + -0x90] CALL 0x00167cf9 UCOMISD XMM0,qword ptr [0x001e9390] JNZ 0x001650ec JNP 0x00165231 LAB_001650ec: MOVSD XMM1,qword ptr [RBP + -0x90] TEST RBX,RBX MOVSD XMM2,qword ptr [RBP + -0xa0] JZ 0x0016511d UCOMISD XMM2,XMM0 JA 0x0016511d UCOMISD XMM0,XMM2 JNZ 0x0016512c JP 0x0016512c MOVSD XMM3,qword ptr [RBP + -0x98] UCOMISD XMM3,XMM1 JBE 0x0016512c LAB_0016511d: MOVAPD XMM2,XMM0 MOVSD qword ptr [RBP + -0x98],XMM1 MOV RBX,R15 LAB_0016512c: MOV EAX,dword ptr [RBP + -0xb0] TEST EAX,EAX JNZ 0x0016513e MOV EAX,dword ptr [R12 + 0x3e0] LAB_0016513e: MOV ECX,dword ptr [R13 + 0x10] ADD R15,RCX MOV EAX,EAX ADD R15,RAX CMP R15,R14 JC 0x001650b2 TEST RBX,RBX MOV R14,qword ptr [RBP + -0x68] MOV R15D,dword ptr [RBP + -0x34] MOV R12,qword ptr [RBP + -0x40] JZ 0x00165285 MOV RDI,qword ptr [RBP + -0x60] MOV RSI,RBX CALL 0x001700cf MOV R9D,dword ptr [RBP + -0x44] INC R9D MOV RDI,R12 MOV RSI,R13 MOV RDX,RAX MOV RCX,qword ptr [RBP + -0x50] MOV R8D,dword ptr [RBP + -0x48] CALL 0x00164f45 CMP EAX,0x1 JZ 0x001652bb TEST EAX,EAX MOV R12,qword ptr [RBP + -0x40] JNZ 0x00165285 MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RAX + 0xc0] MOV RDX,qword ptr [R13] MOV RSI,RBX MOV RCX,RBX MOV R8D,dword ptr [RBP + -0x38] CALL 0x001672f9 MOV RAX,qword ptr [RBP + -0x70] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x001651ed LEA RDI,[RBP + -0xd8] MOV RSI,RBX MOV EDX,dword ptr [RBP + -0x38] XOR ECX,ECX CALL 0x0015b4b2 TEST AL,AL JNZ 0x00165285 LAB_001651ed: MOV RAX,qword ptr [R12 + 0x2e8] LEA RDI,[RBP + -0xd8] MOV ECX,dword ptr [RDI + 0x30] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 MOV ESI,0x2 MOV EDX,0x3 CALL 0x001721fd TEST AL,AL JNZ 0x00165285 XOR EBX,EBX JMP 0x0016528a LAB_0016521f: CALL 0x001a8156 MOV dword ptr [RAX],0x80 MOV EBX,0xffffffff JMP 0x00165297 LAB_00165231: MOV R14,qword ptr [RBP + -0x68] LAB_00165235: MOV R15D,dword ptr [RBP + -0x34] JMP 0x00165285 LAB_0016523b: LEA R15,[RBP + -0xd8] MOV RDI,R13 MOV RSI,R15 MOV RDX,qword ptr [RBP + -0x50] CALL 0x001661ac MOV EBX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x2e8] MOV ECX,dword ptr [R15 + 0x30] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 MOV RDI,R15 MOV ESI,0x2 MOV EDX,0x3 CALL 0x001721fd TEST AL,AL MOV R15D,dword ptr [RBP + -0x34] JZ 0x0016528a LAB_00165285: MOV EBX,0xffffffff LAB_0016528a: TEST R15B,R15B JNZ 0x00165297 MOV RDI,R14 CALL 0x001a6612 LAB_00165297: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001653e1 MOV EAX,EBX LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001652bb: MOV RCX,qword ptr [RBP + -0x58] MOVZX R12D,word ptr [RCX + 0xa6] ADD R12,R14 MOV RDI,qword ptr [RBP + -0x60] MOV RAX,RDI ADD RAX,R12 MOV qword ptr [RBP + -0x88],RCX LEA R15,[RBP + -0xf8] MOV qword ptr [R15 + 0x8],RCX MOV qword ptr [RBP + -0x90],RAX MOV qword ptr [R15],RBX MOV EAX,dword ptr [R13 + 0x10] MOV dword ptr [RBP + -0x80],EAX MOV dword ptr [R15 + 0x10],EAX MOV EAX,dword ptr [R13 + 0x14] MOV dword ptr [RBP + -0x7c],EAX MOV dword ptr [R15 + 0x14],EAX XOR EAX,EAX MOV dword ptr [RBP + -0x78],EAX MOV dword ptr [R15 + 0x18],EAX MOV RSI,RBX CALL 0x001700cf MOV RDI,qword ptr [RBP + -0x40] MOV RSI,R15 MOV RDX,RAX CALL 0x0016634b TEST EAX,EAX JNZ 0x00165235 MOV RAX,qword ptr [RBP + -0x70] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x0016535a LEA RDI,[RBP + -0xd8] MOV RSI,RBX MOV EDX,dword ptr [RBP + -0x38] MOV ECX,0x1 CALL 0x0015b4b2 TEST AL,AL JNZ 0x00165235 LAB_0016535a: MOV R15,qword ptr [RBP + -0x50] MOV RDX,qword ptr [R15] MOV RBX,qword ptr [RBP + -0x40] MOV RDI,RBX MOV RSI,R12 CALL 0x0017017d MOV RDX,qword ptr [R15] LEA RSI,[RBP + -0x90] MOV RDI,RBX CALL 0x0016634b TEST EAX,EAX JNZ 0x00165235 LEA RDI,[RBP + -0x90] LEA R15,[RBP + -0xd8] MOV RSI,R15 MOV RDX,qword ptr [RBP + -0x50] CALL 0x001661ac MOV EBX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x2e8] MOV ECX,dword ptr [R15 + 0x30] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 MOV RDI,R15 MOV ESI,0x2 MOV EDX,0x3 CALL 0x001721fd TEST AL,AL JNZ 0x00165235 MOV R15D,dword ptr [RBP + -0x34] JMP 0x0016528a LAB_001653e1: CALL 0x0012a270
int4 maria_rtree_insert_req (long *param_1,int8 *param_2,int8 param_3,int8 *param_4,int param_5, int param_6) { ushort uVar1; long lVar2; int8 uVar3; ulong uVar4; int8 *puVar5; long *plVar6; int1 *puVar7; char cVar8; char cVar9; uint uVar10; int iVar11; int4 uVar12; ulong uVar13; int1 *puVar14; int8 uVar15; int4 *puVar16; ulong uVar17; ulong uVar18; int1 *puVar19; int iVar20; int8 unaff_R15; long in_FS_OFFSET; double dVar21; double dVar22; int1 auStack_108 [8]; ulong local_100; long local_f8; int4 local_f0; int4 local_ec; int4 local_e8; long *local_e0 [2]; long local_d0; uint local_c0; uint local_b8; uint local_b0; double local_a8; int1 *local_a0; int1 *local_98; long local_90; int4 local_88; int4 local_84; int4 local_80; long local_78; int1 *local_70; ulong local_68; long local_60; int8 *local_58; int local_50; int local_4c; long *local_48; int4 local_40; uint local_3c; long local_38; puVar19 = auStack_108; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_40 = *(int4 *)(param_2 + 2); local_78 = *param_1; local_60 = param_2[1]; local_e0[0] = (long *)((ulong)*(ushort *)(local_60 + 0xb0) + (ulong)*(ushort *)(local_60 + 0xa6)); uVar13 = (*(long *)param_1[0xf] - (long)local_e0) - (long)local_e0[0]; local_58 = param_4; local_50 = param_5; local_4c = param_6; if ((local_e0[0] < (long *)(*(long *)param_1[0xf] - (long)local_e0)) && ((0x10000 < uVar13 || ((0xfff < (uint)local_e0[0] && (0x8000 < uVar13)))))) { puVar14 = auStack_108 + -(ulong)((uint)local_e0[0] + 0xf & 0xfffffff0); uVar13 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1); puVar7 = puVar14; } else { uVar13 = 0; puVar14 = (int1 *)my_malloc(0,local_e0[0],0x10010); puVar7 = auStack_108; if (puVar14 == (int1 *)0x0) { puVar16 = (int4 *)_my_thread_var(); *puVar16 = 0x80; uVar12 = 0xffffffff; goto LAB_00165297; } } puVar19 = puVar7; lVar2 = local_60; *(int8 *)(puVar19 + -8) = 0; *(int1 **)(puVar19 + -0x10) = puVar14; *(int8 *)(puVar19 + -0x18) = 0x165027; cVar8 = _ma_fetch_keypage(local_e0,param_1,lVar2,param_3,4,3); puVar5 = local_58; if (cVar8 == '\0') { local_3c = (uint)uVar13; local_48 = param_1; if ((local_50 == -1 && local_b8 != 0) || (local_4c < local_50 && -1 < local_50)) { local_68 = (ulong)local_b8; lVar2 = *local_e0[0]; uVar13 = (ulong)*(uint *)(lVar2 + 0x744) + local_d0 + local_68; local_70 = puVar14; if ((ulong)local_c0 + local_d0 <= uVar13) goto LAB_00165235; uVar17 = (ulong)*(uint *)(param_2 + 2); uVar18 = 0; dVar22 = DAT_001e9388; do { uVar15 = *param_2; uVar3 = *(int8 *)(param_2[1] + 0xc0); iVar11 = *(int *)((long)param_2 + 0x14); local_a8 = dVar22; *(int8 *)(puVar19 + -8) = 0x1650dc; dVar21 = (double)maria_rtree_area_increase (uVar3,uVar13,uVar15,(int)uVar17 + iVar11,&local_98); plVar6 = local_48; uVar4 = local_68; puVar14 = local_70; if ((dVar21 == DAT_001e9390) && (!NAN(dVar21) && !NAN(DAT_001e9390))) goto LAB_00165235; if ((uVar18 == 0) || (dVar21 < local_a8)) { LAB_0016511d: local_a0 = local_98; uVar18 = uVar13; dVar22 = dVar21; } else { dVar22 = local_a8; if (((dVar21 == local_a8) && (!NAN(dVar21) && !NAN(local_a8))) && ((double)local_98 < (double)local_a0)) goto LAB_0016511d; } uVar10 = local_b8; if (local_b8 == 0) { uVar10 = *(uint *)(lVar2 + 0x3e0); } uVar17 = (ulong)*(uint *)(param_2 + 2); uVar13 = uVar13 + uVar17 + (ulong)uVar10; } while (uVar13 < (ulong)local_c0 + local_d0); uVar13 = (ulong)local_3c; cVar8 = (char)local_3c; if (uVar18 != 0) { *(int8 *)(puVar19 + -8) = 0x165174; uVar15 = _ma_kpos(uVar4,uVar18); iVar11 = local_50; puVar5 = local_58; iVar20 = local_4c + 1; *(int8 *)(puVar19 + -8) = 0x165191; iVar11 = maria_rtree_insert_req(plVar6,param_2,uVar15,puVar5,iVar11,iVar20); uVar12 = local_40; plVar6 = local_48; uVar17 = local_68; if (iVar11 == 1) { uVar1 = *(ushort *)(local_60 + 0xa6); local_98 = puVar14 + uVar1 + local_68; local_90 = local_60; local_f8 = local_60; local_f0 = *(int4 *)(param_2 + 2); local_ec = *(int4 *)((long)param_2 + 0x14); local_80 = 0; local_e8 = 0; local_100 = uVar18; local_88 = local_f0; local_84 = local_ec; *(int8 *)(puVar19 + -8) = 0x165317; uVar15 = _ma_kpos(uVar17,uVar18); plVar6 = local_48; *(int8 *)(puVar19 + -8) = 0x165326; iVar11 = maria_rtree_set_key_mbr(plVar6,&local_100,uVar15); uVar12 = local_40; if (iVar11 == 0) { if (*(char *)(local_78 + 0x7e7) != '\0') { *(int8 *)(puVar19 + -8) = 0x165352; cVar8 = _ma_log_change(local_e0,uVar18,uVar12,1); if (cVar8 != '\0') goto LAB_00165235; } plVar6 = local_48; puVar5 = local_58; uVar15 = *local_58; *(int8 *)(puVar19 + -8) = 0x165370; _ma_kpointer(plVar6,puVar14 + uVar1,uVar15); uVar15 = *puVar5; *(int8 *)(puVar19 + -8) = 0x165382; iVar11 = maria_rtree_set_key_mbr(plVar6,&local_98,uVar15); puVar5 = local_58; if (iVar11 == 0) { *(int8 *)(puVar19 + -8) = 0x1653a4; uVar12 = maria_rtree_add_key(&local_98,local_e0,puVar5); *(int1 *)(local_48[0x5d] + 0x10 + (ulong)local_b0 * 0x18) = 1; *(int8 *)(puVar19 + -8) = 0x1653d0; cVar8 = _ma_write_keypage(local_e0,2,3); if (cVar8 == '\0') { cVar8 = (char)local_3c; goto LAB_0016528a; } } } LAB_00165235: uVar13 = (ulong)local_3c; } else if (iVar11 == 0) { uVar15 = *(int8 *)(local_60 + 0xc0); uVar3 = *param_2; *(int8 *)(puVar19 + -8) = 0x1651c4; maria_rtree_combine_rect(uVar15,uVar18,uVar3,uVar18,uVar12); uVar12 = local_40; if (*(char *)(local_78 + 0x7e7) != '\0') { *(int8 *)(puVar19 + -8) = 0x1651e5; cVar9 = _ma_log_change(local_e0,uVar18,uVar12,0); if (cVar9 != '\0') goto LAB_00165285; } *(int1 *)(plVar6[0x5d] + 0x10 + (ulong)local_b0 * 0x18) = 1; *(int8 *)(puVar19 + -8) = 0x165217; cVar9 = _ma_write_keypage(local_e0,2,3); if (cVar9 == '\0') { uVar12 = 0; goto LAB_0016528a; } } } goto LAB_00165285; } *(int8 *)(puVar19 + -8) = 0x165251; uVar12 = maria_rtree_add_key(param_2,local_e0,puVar5); *(int1 *)(local_48[0x5d] + 0x10 + (ulong)local_b0 * 0x18) = 1; *(int8 *)(puVar19 + -8) = 0x16527d; cVar9 = _ma_write_keypage(local_e0,2,3); uVar13 = (ulong)local_3c; cVar8 = (char)local_3c; if (cVar9 != '\0') goto LAB_00165285; } else { LAB_00165285: cVar8 = (char)uVar13; uVar12 = 0xffffffff; } LAB_0016528a: if (cVar8 == '\0') { *(int8 *)(puVar19 + -8) = 0x165297; my_free(puVar14); } LAB_00165297: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)(puVar19 + -8) = maria_rtree_insert; __stack_chk_fail(); } return uVar12; }
53,095
inline_mysql_file_chsize
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_chsize( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t newlength, int filler, myf flags) { int result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CHSIZE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file, src_line); result= my_chsize(file, newlength, filler, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength); return result; } #endif result= my_chsize(file, newlength, filler, flags); return result; }
O0
c
inline_mysql_file_chsize: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x233a10(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0xd, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x8d7e2 leaq 0x2339ca(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xf0850 movl %eax, -0x34(%rbp) leaq 0x233992(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x8d7fe movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xf0850 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_chsize_2: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 0Dh call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_8D7E2 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_chsize mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_8D7FE loc_8D7E2: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_chsize mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_8D7FE: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_chsize_2( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 13LL); if ( v8 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v8, v12, v15, v14); v9 = my_chsize(v13, v12, v11, v10); ((void ( *)(long long, long long))PSI_server[67])(v8, v12); } else { return (unsigned int)my_chsize(v13, v12, v11, v10); } return v9; }
inline_mysql_file_chsize: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0xd CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0018d7e2 LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f0850 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x0018d7fe LAB_0018d7e2: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f0850 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_0018d7fe: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_chsize (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,0xd); if (local_48 == 0) { local_c = my_chsize(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_28,local_18,local_1c); local_3c = my_chsize(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,local_28); local_c = local_3c; } return local_c; }
53,096
pow5mult
eloqsql/strings/dtoa.c
static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc) { Bigint *b1, *p5, *p51=NULL; int i; static int p05[3]= { 5, 25, 125 }; my_bool overflow= FALSE; if ((i= k & 3)) b= multadd(b, p05[i-1], 0, alloc); if (!(k>>= 2)) return b; p5= p5_a; for (;;) { if (k & 1) { b1= mult(b, p5, alloc); Bfree(b, alloc); b= b1; } if (!(k>>= 1)) break; /* Calculate next power of 5 */ if (overflow) { p51= mult(p5, p5, alloc); Bfree(p5, alloc); p5= p51; } else if (p5 < p5_a + P5A_MAX) ++p5; else if (p5 == p5_a + P5A_MAX) { p5= mult(p5, p5, alloc); overflow= TRUE; } } if (p51) Bfree(p51, alloc); return b; }
O3
c
pow5mult: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movl %esi, %r15d movq %rdi, %r13 movl %esi, %eax andl $0x3, %eax je 0x90b49 decl %eax leaq 0x284c12(%rip), %rcx # 0x315748 movl (%rcx,%rax,4), %esi movq %r13, %rdi xorl %edx, %edx movq %rbx, %rcx callq 0x90f96 movq %rax, %r13 cmpl $0x4, %r15d jb 0x90c31 movq %rbx, -0x38(%rbp) shrl $0x2, %r15d movb $0x1, %cl leaq 0x3198cc(%rip), %rbx # 0x3aa430 movq $0x0, -0x40(%rbp) leaq 0x31994d(%rip), %r12 # 0x3aa4c0 movl %ecx, %r14d cmpq %r12, %rbx setb %cl movl %ecx, -0x2c(%rbp) testb $0x1, %r15b je 0x90bb4 movq %r13, %rdi movq %rbx, %rsi movq %r13, %r12 movq -0x38(%rbp), %r13 movq %r13, %rdx callq 0x90c43 movq %rax, -0x48(%rbp) movq %r12, %rdi leaq 0x319918(%rip), %r12 # 0x3aa4c0 movq %r13, %rsi callq 0x90d65 movq -0x48(%rbp), %r13 cmpl $0x2, %r15d jb 0x90c1f shrl %r15d testb $0x1, %r14b je 0x90be4 cmpq %r12, %rbx jb 0x90c13 movb $0x1, %r14b jne 0x90b7f movq %r12, %rdi movq %r12, %rsi movq -0x38(%rbp), %rdx callq 0x90c43 movq %rax, %rbx movl -0x2c(%rbp), %ecx jmp 0x90b73 movq %rbx, %rdi movq %rbx, %r14 movq %rbx, %rsi movq -0x38(%rbp), %rbx movq %rbx, %rdx callq 0x90c43 movq %rax, -0x40(%rbp) movq %r14, %rdi movq %rbx, %rsi callq 0x90d65 xorl %ecx, %ecx movq -0x40(%rbp), %rbx jmp 0x90b73 addq $0x18, %rbx movl -0x2c(%rbp), %ecx jmp 0x90b73 movq -0x40(%rbp), %rdi testq %rdi, %rdi je 0x90c31 movq -0x38(%rbp), %rsi callq 0x90d65 movq %r13, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
pow5mult: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdx mov r15d, esi mov r13, rdi mov eax, esi and eax, 3 jz short loc_90B49 dec eax lea rcx, pow5mult_p05 mov esi, [rcx+rax*4] mov rdi, r13 xor edx, edx mov rcx, rbx call multadd mov r13, rax loc_90B49: cmp r15d, 4 jb loc_90C31 mov [rbp+var_38], rbx shr r15d, 2 mov cl, 1 lea rbx, p5_a mov [rbp+var_40], 0 lea r12, off_3AA4C0 loc_90B73: mov r14d, ecx cmp rbx, r12 setb cl mov [rbp+var_2C], ecx loc_90B7F: test r15b, 1 jz short loc_90BB4 mov rdi, r13 mov rsi, rbx mov r12, r13 mov r13, [rbp+var_38] mov rdx, r13 call mult mov [rbp+var_48], rax mov rdi, r12 lea r12, off_3AA4C0 mov rsi, r13 call Bfree mov r13, [rbp+var_48] loc_90BB4: cmp r15d, 2 jb short loc_90C1F shr r15d, 1 test r14b, 1 jz short loc_90BE4 cmp rbx, r12 jb short loc_90C13 mov r14b, 1 jnz short loc_90B7F mov rdi, r12 mov rsi, r12 mov rdx, [rbp+var_38] call mult mov rbx, rax mov ecx, [rbp+var_2C] jmp short loc_90B73 loc_90BE4: mov rdi, rbx mov r14, rbx mov rsi, rbx mov rbx, [rbp+var_38] mov rdx, rbx call mult mov [rbp+var_40], rax mov rdi, r14 mov rsi, rbx call Bfree xor ecx, ecx mov rbx, [rbp+var_40] jmp loc_90B73 loc_90C13: add rbx, 18h mov ecx, [rbp+var_2C] jmp loc_90B73 loc_90C1F: mov rdi, [rbp+var_40] test rdi, rdi jz short loc_90C31 mov rsi, [rbp+var_38] call Bfree loc_90C31: mov rax, r13 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long pow5mult(long long a1, unsigned int a2, long long a3, int a4) { long long v5; // r13 unsigned int v6; // r15d _UNKNOWN **v7; // rbx char v8; // r14 long long v10; // [rsp+8h] [rbp-48h] long long v11; // [rsp+10h] [rbp-40h] long long v12; // [rsp+18h] [rbp-38h] int v13; // [rsp+24h] [rbp-2Ch] v5 = a1; if ( (a2 & 3) != 0 ) v5 = multadd(a1, pow5mult_p05[(a2 & 3) - 1], 0LL, a3); if ( a2 >= 4 ) { v12 = a3; v6 = a2 >> 2; LOBYTE(a4) = 1; v7 = &p5_a; v11 = 0LL; LABEL_5: v8 = a4; LOBYTE(a4) = v7 < &off_3AA4C0; v13 = a4; while ( 1 ) { if ( (v6 & 1) != 0 ) { v10 = mult(v5, v7, v12); Bfree(v5, v12); v5 = v10; } if ( v6 < 2 ) break; v6 >>= 1; if ( (v8 & 1) == 0 ) { v11 = mult(v7, v7, v12); Bfree(v7, v12); a4 = 0; v7 = (_UNKNOWN **)v11; goto LABEL_5; } if ( v7 < &off_3AA4C0 ) { v7 += 3; a4 = v13; goto LABEL_5; } v8 = 1; if ( v7 == &off_3AA4C0 ) { v7 = (_UNKNOWN **)mult(&off_3AA4C0, &off_3AA4C0, v12); a4 = v13; goto LABEL_5; } } if ( v11 ) Bfree(v11, v12); } return v5; }
pow5mult: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV R15D,ESI MOV R13,RDI MOV EAX,ESI AND EAX,0x3 JZ 0x00190b49 DEC EAX LEA RCX,[0x415748] MOV ESI,dword ptr [RCX + RAX*0x4] MOV RDI,R13 XOR EDX,EDX MOV RCX,RBX CALL 0x00190f96 MOV R13,RAX LAB_00190b49: CMP R15D,0x4 JC 0x00190c31 MOV qword ptr [RBP + -0x38],RBX SHR R15D,0x2 MOV CL,0x1 LEA RBX,[0x4aa430] MOV qword ptr [RBP + -0x40],0x0 LEA R12,[0x4aa4c0] LAB_00190b73: MOV R14D,ECX CMP RBX,R12 SETC CL MOV dword ptr [RBP + -0x2c],ECX LAB_00190b7f: TEST R15B,0x1 JZ 0x00190bb4 MOV RDI,R13 MOV RSI,RBX MOV R12,R13 MOV R13,qword ptr [RBP + -0x38] MOV RDX,R13 CALL 0x00190c43 MOV qword ptr [RBP + -0x48],RAX MOV RDI,R12 LEA R12,[0x4aa4c0] MOV RSI,R13 CALL 0x00190d65 MOV R13,qword ptr [RBP + -0x48] LAB_00190bb4: CMP R15D,0x2 JC 0x00190c1f SHR R15D,0x1 TEST R14B,0x1 JZ 0x00190be4 CMP RBX,R12 JC 0x00190c13 MOV R14B,0x1 JNZ 0x00190b7f MOV RDI,R12 MOV RSI,R12 MOV RDX,qword ptr [RBP + -0x38] CALL 0x00190c43 MOV RBX,RAX MOV ECX,dword ptr [RBP + -0x2c] JMP 0x00190b73 LAB_00190be4: MOV RDI,RBX MOV R14,RBX MOV RSI,RBX MOV RBX,qword ptr [RBP + -0x38] MOV RDX,RBX CALL 0x00190c43 MOV qword ptr [RBP + -0x40],RAX MOV RDI,R14 MOV RSI,RBX CALL 0x00190d65 XOR ECX,ECX MOV RBX,qword ptr [RBP + -0x40] JMP 0x00190b73 LAB_00190c13: ADD RBX,0x18 MOV ECX,dword ptr [RBP + -0x2c] JMP 0x00190b73 LAB_00190c1f: MOV RDI,qword ptr [RBP + -0x40] TEST RDI,RDI JZ 0x00190c31 MOV RSI,qword ptr [RBP + -0x38] CALL 0x00190d65 LAB_00190c31: MOV RAX,R13 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 pow5mult(int8 param_1,uint param_2,int8 param_3) { int1 *puVar1; int8 uVar2; bool bVar3; bool bVar4; int1 *local_48; if ((param_2 & 3) != 0) { param_1 = multadd(param_1,*(int4 *)(pow5mult_p05 + (ulong)((param_2 & 3) - 1) * 4),0, param_3); } if (param_2 < 4) { return param_1; } param_2 = param_2 >> 2; local_48 = (int1 *)0x0; puVar1 = p5_a; bVar3 = true; LAB_00190b73: do { bVar4 = puVar1 < (int1 *)0x4aa4c0; uVar2 = param_1; do { param_1 = uVar2; if ((param_2 & 1) != 0) { param_1 = mult(uVar2,puVar1,param_3); Bfree(uVar2,param_3); } if (param_2 < 2) { if (local_48 == (int1 *)0x0) { return param_1; } Bfree(local_48,param_3); return param_1; } param_2 = param_2 >> 1; if (!bVar3) { local_48 = (int1 *)mult(puVar1,puVar1,param_3); Bfree(puVar1,param_3); bVar3 = false; puVar1 = local_48; goto LAB_00190b73; } if (puVar1 < (int1 *)0x4aa4c0) { puVar1 = puVar1 + 0x18; bVar3 = bVar4; goto LAB_00190b73; } bVar3 = true; uVar2 = param_1; } while (puVar1 != (int1 *)0x4aa4c0); puVar1 = (int1 *)mult(0x4aa4c0,0x4aa4c0,param_3); bVar3 = bVar4; } while( true ); }
53,097
get_simple_key_cache_statistics
eloqsql/mysys/mf_keycache.c
static void get_simple_key_cache_statistics(SIMPLE_KEY_CACHE_CB *keycache, uint partition_no __attribute__((unused)), KEY_CACHE_STATISTICS *keycache_stats) { DBUG_ENTER("simple_get_key_cache_statistics"); keycache_stats->mem_size= (longlong) keycache->key_cache_mem_size; keycache_stats->block_size= (longlong) keycache->key_cache_block_size; keycache_stats->blocks_used= keycache->blocks_used; keycache_stats->blocks_unused= keycache->blocks_unused; keycache_stats->blocks_changed= keycache->global_blocks_changed; keycache_stats->blocks_warm= keycache->warm_blocks; keycache_stats->read_requests= keycache->global_cache_r_requests; keycache_stats->reads= keycache->global_cache_read; keycache_stats->write_requests= keycache->global_cache_w_requests; keycache_stats->writes= keycache->global_cache_write; DBUG_VOID_RETURN; }
O3
c
get_simple_key_cache_statistics: pushq %rbp movq %rsp, %rbp movq 0x8(%rdi), %rax movq %rax, (%rdx) movl 0x18(%rdi), %eax movq %rax, 0x8(%rdx) movq 0x50(%rdi), %rax movq %rax, 0x10(%rdx) movq 0x58(%rdi), %rax movq %rax, 0x18(%rdx) movq 0x138(%rdi), %rax movq %rax, 0x20(%rdx) movq 0x68(%rdi), %rax movq %rax, 0x28(%rdx) movq 0x150(%rdi), %rax movq %rax, 0x30(%rdx) movq 0x158(%rdi), %rax movq %rax, 0x38(%rdx) movq 0x140(%rdi), %rax movq %rax, 0x40(%rdx) movq 0x148(%rdi), %rax movq %rax, 0x48(%rdx) popq %rbp retq
get_simple_key_cache_statistics: push rbp mov rbp, rsp mov rax, [rdi+8] mov [rdx], rax mov eax, [rdi+18h] mov [rdx+8], rax mov rax, [rdi+50h] mov [rdx+10h], rax mov rax, [rdi+58h] mov [rdx+18h], rax mov rax, [rdi+138h] mov [rdx+20h], rax mov rax, [rdi+68h] mov [rdx+28h], rax mov rax, [rdi+150h] mov [rdx+30h], rax mov rax, [rdi+158h] mov [rdx+38h], rax mov rax, [rdi+140h] mov [rdx+40h], rax mov rax, [rdi+148h] mov [rdx+48h], rax pop rbp retn
long long get_simple_key_cache_statistics(long long a1, long long a2, _QWORD *a3) { long long result; // rax *a3 = *(_QWORD *)(a1 + 8); a3[1] = *(unsigned int *)(a1 + 24); a3[2] = *(_QWORD *)(a1 + 80); a3[3] = *(_QWORD *)(a1 + 88); a3[4] = *(_QWORD *)(a1 + 312); a3[5] = *(_QWORD *)(a1 + 104); a3[6] = *(_QWORD *)(a1 + 336); a3[7] = *(_QWORD *)(a1 + 344); a3[8] = *(_QWORD *)(a1 + 320); result = *(_QWORD *)(a1 + 328); a3[9] = result; return result; }
get_simple_key_cache_statistics: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RDX],RAX MOV EAX,dword ptr [RDI + 0x18] MOV qword ptr [RDX + 0x8],RAX MOV RAX,qword ptr [RDI + 0x50] MOV qword ptr [RDX + 0x10],RAX MOV RAX,qword ptr [RDI + 0x58] MOV qword ptr [RDX + 0x18],RAX MOV RAX,qword ptr [RDI + 0x138] MOV qword ptr [RDX + 0x20],RAX MOV RAX,qword ptr [RDI + 0x68] MOV qword ptr [RDX + 0x28],RAX MOV RAX,qword ptr [RDI + 0x150] MOV qword ptr [RDX + 0x30],RAX MOV RAX,qword ptr [RDI + 0x158] MOV qword ptr [RDX + 0x38],RAX MOV RAX,qword ptr [RDI + 0x140] MOV qword ptr [RDX + 0x40],RAX MOV RAX,qword ptr [RDI + 0x148] MOV qword ptr [RDX + 0x48],RAX POP RBP RET
void get_simple_key_cache_statistics(long param_1,int8 param_2,int8 *param_3) { *param_3 = *(int8 *)(param_1 + 8); param_3[1] = (ulong)*(uint *)(param_1 + 0x18); param_3[2] = *(int8 *)(param_1 + 0x50); param_3[3] = *(int8 *)(param_1 + 0x58); param_3[4] = *(int8 *)(param_1 + 0x138); param_3[5] = *(int8 *)(param_1 + 0x68); param_3[6] = *(int8 *)(param_1 + 0x150); param_3[7] = *(int8 *)(param_1 + 0x158); param_3[8] = *(int8 *)(param_1 + 0x140); param_3[9] = *(int8 *)(param_1 + 0x148); return; }
53,098
reset_root_defaults
eloqsql/mysys/my_alloc.c
void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused))) { DBUG_ENTER("reset_root_defaults"); DBUG_ASSERT(alloc_root_inited(mem_root)); mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) | (mem_root->block_size & 1)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size) { USED_MEM *mem, **prev= &mem_root->free; /* Free unused blocks, so that consequent calls to reset_root_defaults won't eat away memory. */ while (*prev) { mem= *prev; if (mem->size == size) { /* We found a suitable block, no need to do anything else */ mem_root->pre_alloc= mem; DBUG_VOID_RETURN; } if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size) { /* remove block from the list and free it */ *prev= mem->next; my_free(mem); } else prev= &mem->next; } /* Allocate new prealloc block and add it to the end of free list */ if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size, MYF(MALLOC_FLAG(mem_root-> block_size))))) { mem->size= size; mem->left= pre_alloc_size; mem->next= *prev; *prev= mem_root->pre_alloc= mem; TRASH_MEM(mem); } else { mem_root->pre_alloc= 0; } } } else #endif mem_root->pre_alloc= 0; DBUG_VOID_RETURN; }
O3
c
reset_root_defaults: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx andq $-0x2, %rsi movq 0x20(%rdi), %rax andl $0x1, %eax leaq (%rsi,%rax), %rdx addq $-0x28, %rdx movq %rdx, 0x20(%rdi) testq %r14, %r14 je 0xa2cb4 leaq 0x18(%r14), %r15 movq 0x10(%rbx), %rax testq %rax, %rax je 0xa2c43 cmpq %r15, 0x10(%rax) je 0xa2cc2 movq (%rbx), %rdi movq %rbx, %r12 testq %rdi, %rdi je 0xa2c85 movq %rbx, %r12 movq 0x10(%rdi), %rax cmpq %r15, %rax je 0xa2cbe movq 0x8(%rdi), %rcx addq $0x18, %rcx cmpq %rax, %rcx jne 0xa2c75 movq (%rdi), %rax movq %rax, (%r12) callq 0xa600e jmp 0xa2c78 movq %rdi, %r12 movq (%r12), %rdi testq %rdi, %rdi jne 0xa2c51 movq 0x20(%rbx), %rdx movl 0x38(%rbx), %edi andl $0x1, %edx shll $0x10, %edx movq %r15, %rsi callq 0xa5de1 testq %rax, %rax je 0xa2cb4 movq %r15, 0x10(%rax) movq %r14, 0x8(%rax) movq (%r12), %rcx movq %rcx, (%rax) movq %rax, 0x10(%rbx) movq %rax, (%r12) jmp 0xa2cc2 movq $0x0, 0x10(%rbx) jmp 0xa2cc2 movq %rdi, 0x10(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
reset_root_defaults: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdx mov rbx, rdi and rsi, 0FFFFFFFFFFFFFFFEh mov rax, [rdi+20h] and eax, 1 lea rdx, [rsi+rax] add rdx, 0FFFFFFFFFFFFFFD8h mov [rdi+20h], rdx test r14, r14 jz loc_A2CB4 lea r15, [r14+18h] mov rax, [rbx+10h] test rax, rax jz short loc_A2C43 cmp [rax+10h], r15 jz short loc_A2CC2 loc_A2C43: mov rdi, [rbx] mov r12, rbx test rdi, rdi jz short loc_A2C85 mov r12, rbx loc_A2C51: mov rax, [rdi+10h] cmp rax, r15 jz short loc_A2CBE mov rcx, [rdi+8] add rcx, 18h cmp rcx, rax jnz short loc_A2C75 mov rax, [rdi] mov [r12], rax call my_free jmp short loc_A2C78 loc_A2C75: mov r12, rdi loc_A2C78: mov rdi, [r12] test rdi, rdi jnz short loc_A2C51 mov rdx, [rbx+20h] loc_A2C85: mov edi, [rbx+38h] and edx, 1 shl edx, 10h mov rsi, r15 call my_malloc test rax, rax jz short loc_A2CB4 mov [rax+10h], r15 mov [rax+8], r14 mov rcx, [r12] mov [rax], rcx mov [rbx+10h], rax mov [r12], rax jmp short loc_A2CC2 loc_A2CB4: mov qword ptr [rbx+10h], 0 jmp short loc_A2CC2 loc_A2CBE: mov [rbx+10h], rdi loc_A2CC2: pop rbx pop r12 pop r14 pop r15 pop rbp retn
_QWORD * reset_root_defaults(long long a1, long long a2, long long a3) { _QWORD *result; // rax unsigned long long v6; // rdx _QWORD *v7; // r15 _QWORD *v8; // rdi _QWORD *v9; // r12 result = (_QWORD *)(*(_QWORD *)(a1 + 32) & 1LL); v6 = (unsigned long long)result + (a2 & 0xFFFFFFFFFFFFFFFELL) - 40; *(_QWORD *)(a1 + 32) = v6; if ( !a3 ) { LABEL_14: *(_QWORD *)(a1 + 16) = 0LL; return result; } v7 = (_QWORD *)(a3 + 24); result = *(_QWORD **)(a1 + 16); if ( result && (_QWORD *)result[2] == v7 ) return result; v8 = *(_QWORD **)a1; v9 = (_QWORD *)a1; if ( !*(_QWORD *)a1 ) { LABEL_12: result = (_QWORD *)my_malloc(*(unsigned int *)(a1 + 56), a3 + 24, (unsigned __int8)(v6 & 1) << 16); if ( result ) { result[2] = v7; result[1] = a3; *result = *v9; *(_QWORD *)(a1 + 16) = result; *v9 = result; return result; } goto LABEL_14; } v9 = (_QWORD *)a1; while ( 1 ) { result = (_QWORD *)v8[2]; if ( result == v7 ) break; if ( (_QWORD *)(v8[1] + 24LL) == result ) { *v9 = *v8; my_free(v8); } else { v9 = v8; } v8 = (_QWORD *)*v9; if ( !*v9 ) { v6 = *(_QWORD *)(a1 + 32); goto LABEL_12; } } *(_QWORD *)(a1 + 16) = v8; return result; }
reset_root_defaults: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV RBX,RDI AND RSI,-0x2 MOV RAX,qword ptr [RDI + 0x20] AND EAX,0x1 LEA RDX,[RSI + RAX*0x1] ADD RDX,-0x28 MOV qword ptr [RDI + 0x20],RDX TEST R14,R14 JZ 0x001a2cb4 LEA R15,[R14 + 0x18] MOV RAX,qword ptr [RBX + 0x10] TEST RAX,RAX JZ 0x001a2c43 CMP qword ptr [RAX + 0x10],R15 JZ 0x001a2cc2 LAB_001a2c43: MOV RDI,qword ptr [RBX] MOV R12,RBX TEST RDI,RDI JZ 0x001a2c85 MOV R12,RBX LAB_001a2c51: MOV RAX,qword ptr [RDI + 0x10] CMP RAX,R15 JZ 0x001a2cbe MOV RCX,qword ptr [RDI + 0x8] ADD RCX,0x18 CMP RCX,RAX JNZ 0x001a2c75 MOV RAX,qword ptr [RDI] MOV qword ptr [R12],RAX CALL 0x001a600e JMP 0x001a2c78 LAB_001a2c75: MOV R12,RDI LAB_001a2c78: MOV RDI,qword ptr [R12] TEST RDI,RDI JNZ 0x001a2c51 MOV RDX,qword ptr [RBX + 0x20] LAB_001a2c85: MOV EDI,dword ptr [RBX + 0x38] AND EDX,0x1 SHL EDX,0x10 MOV RSI,R15 CALL 0x001a5de1 TEST RAX,RAX JZ 0x001a2cb4 MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RAX + 0x8],R14 MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [R12],RAX JMP 0x001a2cc2 LAB_001a2cb4: MOV qword ptr [RBX + 0x10],0x0 JMP 0x001a2cc2 LAB_001a2cbe: MOV qword ptr [RBX + 0x10],RDI LAB_001a2cc2: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void reset_root_defaults(long *param_1,ulong param_2,long param_3) { long lVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; lVar3 = (param_2 & 0xfffffffffffffffe) + (ulong)((uint)param_1[4] & 1) + -0x28; param_1[4] = lVar3; if (param_3 != 0) { lVar1 = param_3 + 0x18; if ((param_1[2] != 0) && (*(long *)(param_1[2] + 0x10) == lVar1)) { return; } plVar2 = (long *)*param_1; plVar4 = param_1; plVar5 = param_1; if (plVar2 != (long *)0x0) { do { if (plVar2[2] == lVar1) { param_1[2] = (long)plVar2; return; } plVar5 = plVar2; if (plVar2[1] + 0x18 == plVar2[2]) { *plVar4 = *plVar2; my_free(); plVar5 = plVar4; } plVar2 = (long *)*plVar5; plVar4 = plVar5; } while (plVar2 != (long *)0x0); lVar3 = param_1[4]; } plVar2 = (long *)my_malloc((int)param_1[7],lVar1,((uint)lVar3 & 1) << 0x10); if (plVar2 != (long *)0x0) { plVar2[2] = lVar1; plVar2[1] = param_3; *plVar2 = *plVar5; param_1[2] = (long)plVar2; *plVar5 = (long)plVar2; return; } } param_1[2] = 0; return; }
53,099
gguf_get_val_i32
llama.cpp/ggml/src/gguf.cpp
int32_t gguf_get_val_i32(const struct gguf_context * ctx, int64_t key_id) { GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx)); GGML_ASSERT(ctx->kv[key_id].get_ne() == 1); return ctx->kv[key_id].get_val<int32_t>(); }
O3
cpp
gguf_get_val_i32: pushq %r14 pushq %rbx pushq %rax testq %rsi, %rsi js 0x3d621 movq %rdi, %rbx movq 0x8(%rdi), %rdi movq 0x10(%rbx), %rax subq %rdi, %rax sarq $0x3, %rax movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3 imulq %rax, %rcx cmpq %rsi, %rcx jle 0x3d621 imulq $0x58, %rsi, %r14 addq %r14, %rdi callq 0x165e0 cmpq $0x1, %rax jne 0x3d63d addq 0x8(%rbx), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x16960 movl (%rax), %eax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x1c71d(%rip), %rdi # 0x59d45 leaq 0xd01f(%rip), %rdx # 0x4a64e leaq 0x1cb8b(%rip), %rcx # 0x5a1c1 movl $0x341, %esi # imm = 0x341 jmp 0x3d657 leaq 0x1c701(%rip), %rdi # 0x59d45 leaq 0xd003(%rip), %rdx # 0x4a64e leaq 0x1cc3e(%rip), %rcx # 0x5a290 movl $0x342, %esi # imm = 0x342 xorl %eax, %eax callq 0x17c80
gguf_get_val_i32: push r14 push rbx push rax test rsi, rsi js short loc_3D621 mov rbx, rdi mov rdi, [rdi+8] mov rax, [rbx+10h] sub rax, rdi sar rax, 3 mov rcx, 2E8BA2E8BA2E8BA3h imul rcx, rax cmp rcx, rsi jle short loc_3D621 imul r14, rsi, 58h ; 'X' add rdi, r14; this call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void) cmp rax, 1 jnz short loc_3D63D add r14, [rbx+8] mov rdi, r14 xor esi, esi call __ZNK7gguf_kv7get_valIiEERKT_m; gguf_kv::get_val<int>(ulong) mov eax, [rax] add rsp, 8 pop rbx pop r14 retn loc_3D621: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"... mov esi, 341h jmp short loc_3D657 loc_3D63D: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1" mov esi, 342h loc_3D657: xor eax, eax call _ggml_abort
long long gguf_get_val_i32(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v7; // rdi const char *v9; // rcx int v10; // esi if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) ) { v9 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; v10 = 833; goto LABEL_7; } if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v7)) != 1 ) { v9 = "ctx->kv[key_id].get_ne() == 1"; v10 = 834; LABEL_7: ggml_abort( (unsigned int)"/workspace/llm4binary/github2025/llama.cpp/ggml/src/gguf.cpp", v10, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v9, a5, a6); } return *(unsigned int *)gguf_kv::get_val<int>(*(_QWORD *)(a1 + 8) + 88 * a2, 0LL); }
gguf_get_val_i32: PUSH R14 PUSH RBX PUSH RAX TEST RSI,RSI JS 0x0013d621 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RBX + 0x10] SUB RAX,RDI SAR RAX,0x3 MOV RCX,0x2e8ba2e8ba2e8ba3 IMUL RCX,RAX CMP RCX,RSI JLE 0x0013d621 IMUL R14,RSI,0x58 ADD RDI,R14 CALL 0x001165e0 CMP RAX,0x1 JNZ 0x0013d63d ADD R14,qword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00116960 MOV EAX,dword ptr [RAX] ADD RSP,0x8 POP RBX POP R14 RET LAB_0013d621: LEA RDI,[0x159d45] LEA RDX,[0x14a64e] LEA RCX,[0x15a1c1] MOV ESI,0x341 JMP 0x0013d657 LAB_0013d63d: LEA RDI,[0x159d45] LEA RDX,[0x14a64e] LEA RCX,[0x15a290] MOV ESI,0x342 LAB_0013d657: XOR EAX,EAX CALL 0x00117c80
int gguf_get_val_i32(long param_1,long param_2) { int *piVar1; long lVar2; char *pcVar3; int8 uVar4; if ((param_2 < 0) || (lVar2 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3, lVar2 - param_2 == 0 || lVar2 < param_2)) { pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; uVar4 = 0x341; } else { lVar2 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58)); if (lVar2 == 1) { piVar1 = gguf_kv::get_val<int>((gguf_kv *)(param_2 * 0x58 + *(long *)(param_1 + 8)),0); return *piVar1; } pcVar3 = "ctx->kv[key_id].get_ne() == 1"; uVar4 = 0x342; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/gguf.cpp",uVar4, "GGML_ASSERT(%s) failed",pcVar3); }