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
51,700
translog_is_LSN_chunk
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_is_LSN_chunk(uchar type) { DBUG_ENTER("translog_is_LSN_chunk"); DBUG_PRINT("info", ("byte: %x chunk type: %u record type: %u", type, type >> 6, type & TRANSLOG_REC_TYPE)); DBUG_RETURN(((type & TRANSLOG_CHUNK_TYPE) == TRANSLOG_CHUNK_FIXED) || (((type & TRANSLOG_CHUNK_TYPE) == TRANSLOG_CHUNK_LSN) && ((type & TRANSLOG_REC_TYPE)) != TRANSLOG_CHUNK_0_CONT)); }
O0
c
translog_is_LSN_chunk: pushq %rbp movq %rsp, %rbp movb %dil, %al movb %al, -0x1(%rbp) jmp 0x52e0c jmp 0x52e0e movzbl -0x1(%rbp), %ecx andl $0xc0, %ecx movb $0x1, %al cmpl $0x40, %ecx movb %al, -0x2(%rbp) je 0x52e4c movzbl -0x1(%rbp), %ecx andl $0xc0, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x3(%rbp) jne 0x52e46 movzbl -0x1(%rbp), %eax andl $0x3f, %eax cmpl $0x3f, %eax setne %al movb %al, -0x3(%rbp) movb -0x3(%rbp), %al movb %al, -0x2(%rbp) movb -0x2(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x4(%rbp) movb -0x4(%rbp), %al popq %rbp retq nopl (%rax)
translog_is_LSN_chunk: push rbp mov rbp, rsp mov al, dil mov [rbp+var_1], al jmp short $+2 loc_52E0C: jmp short $+2 loc_52E0E: movzx ecx, [rbp+var_1] and ecx, 0C0h mov al, 1 cmp ecx, 40h ; '@' mov [rbp+var_2], al jz short loc_52E4C movzx ecx, [rbp+var_1] and ecx, 0C0h xor eax, eax cmp ecx, 0 mov [rbp+var_3], al jnz short loc_52E46 movzx eax, [rbp+var_1] and eax, 3Fh cmp eax, 3Fh ; '?' setnz al mov [rbp+var_3], al loc_52E46: mov al, [rbp+var_3] mov [rbp+var_2], al loc_52E4C: mov al, [rbp+var_2] and al, 1 movzx eax, al mov [rbp+var_4], al mov al, [rbp+var_4] pop rbp retn
long long translog_is_LSN_chunk(char a1) { bool v2; // [rsp+1h] [rbp-3h] char v3; // [rsp+2h] [rbp-2h] v3 = 1; if ( (a1 & 0xC0) != 0x40 ) { v2 = 0; if ( (a1 & 0xC0) == 0 ) v2 = (a1 & 0x3F) != 63; v3 = v2; } return v3 & 1; }
translog_is_LSN_chunk: PUSH RBP MOV RBP,RSP MOV AL,DIL MOV byte ptr [RBP + -0x1],AL JMP 0x00152e0c LAB_00152e0c: JMP 0x00152e0e LAB_00152e0e: MOVZX ECX,byte ptr [RBP + -0x1] AND ECX,0xc0 MOV AL,0x1 CMP ECX,0x40 MOV byte ptr [RBP + -0x2],AL JZ 0x00152e4c MOVZX ECX,byte ptr [RBP + -0x1] AND ECX,0xc0 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x3],AL JNZ 0x00152e46 MOVZX EAX,byte ptr [RBP + -0x1] AND EAX,0x3f CMP EAX,0x3f SETNZ AL MOV byte ptr [RBP + -0x3],AL LAB_00152e46: MOV AL,byte ptr [RBP + -0x3] MOV byte ptr [RBP + -0x2],AL LAB_00152e4c: MOV AL,byte ptr [RBP + -0x2] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x4],AL MOV AL,byte ptr [RBP + -0x4] POP RBP RET
bool translog_is_LSN_chunk(byte param_1) { bool local_b; bool local_a; local_a = true; if ((param_1 & 0xc0) != 0x40) { local_b = (param_1 & 0xc0) == 0 && (param_1 & 0x3f) != 0x3f; local_a = local_b; } return local_a; }
51,701
maria_indexes_are_disabled
eloqsql/storage/maria/ma_open.c
int maria_indexes_are_disabled(MARIA_HA *info) { MARIA_SHARE *share= info->s; /* No keys or all are enabled. keys is the number of keys. Left shifted gives us only one bit set. When decreased by one, gives us all all bits up to this one set and it gets unset. */ if (!share->base.keys || (maria_is_all_keys_active(share->state.key_map, share->base.keys))) return 0; /* All are disabled */ if (maria_is_any_key_active(share->state.key_map)) return 1; /* We have keys. Some enabled, some disabled. Don't check for any non-unique disabled but return directly 2 */ return 2; }
O3
c
maria_indexes_are_disabled: pushq %rbp movq %rsp, %rbp movq (%rdi), %rdx movl 0x3e8(%rdx), %ecx xorl %eax, %eax testq %rcx, %rcx je 0x55d1d movq 0x140(%rdx), %rdx movq $-0x1, %rsi movq $-0x1, %rdi shlq %cl, %rdi cmpl $0x40, %ecx notq %rdi cmovaeq %rsi, %rdi cmpq %rdi, %rdx je 0x55d1d xorl %eax, %eax cmpq $0x1, %rdx adcl $0x1, %eax popq %rbp retq nop
maria_indexes_are_disabled: push rbp mov rbp, rsp mov rdx, [rdi] mov ecx, [rdx+3E8h] xor eax, eax test rcx, rcx jz short loc_55D1D mov rdx, [rdx+140h] mov rsi, 0FFFFFFFFFFFFFFFFh mov rdi, 0FFFFFFFFFFFFFFFFh shl rdi, cl cmp ecx, 40h ; '@' not rdi cmovnb rdi, rsi cmp rdx, rdi jz short loc_55D1D xor eax, eax cmp rdx, 1 adc eax, 1 loc_55D1D: pop rbp retn
long long maria_indexes_are_disabled(long long a1) { unsigned int v1; // ecx long long result; // rax long long v3; // rdx long long v4; // rdi v1 = *(_DWORD *)(*(_QWORD *)a1 + 1000LL); result = 0LL; if ( v1 ) { v3 = *(_QWORD *)(*(_QWORD *)a1 + 320LL); v4 = ~(-1LL << v1); if ( v1 >= 0x40 ) v4 = -1LL; if ( v3 != v4 ) return (unsigned int)(v3 == 0) + 1; } return result; }
maria_indexes_are_disabled: PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RDI] MOV ECX,dword ptr [RDX + 0x3e8] XOR EAX,EAX TEST RCX,RCX JZ 0x00155d1d MOV RDX,qword ptr [RDX + 0x140] MOV RSI,-0x1 MOV RDI,-0x1 SHL RDI,CL CMP ECX,0x40 NOT RDI CMOVNC RDI,RSI CMP RDX,RDI JZ 0x00155d1d XOR EAX,EAX CMP RDX,0x1 ADC EAX,0x1 LAB_00155d1d: POP RBP RET
char maria_indexes_are_disabled(long *param_1) { uint uVar1; ulong uVar2; char cVar3; ulong uVar4; uVar1 = *(uint *)(*param_1 + 1000); cVar3 = '\0'; if (uVar1 != 0) { uVar2 = *(ulong *)(*param_1 + 0x140); uVar4 = ~(-1L << ((byte)uVar1 & 0x3f)); if (0x3f < uVar1) { uVar4 = 0xffffffffffffffff; } if (uVar2 != uVar4) { cVar3 = (uVar2 == 0) + '\x01'; } } return cVar3; }
51,702
my_coll_parser_scan_character_list
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_character_list(MY_COLL_RULE_PARSER *p, my_wc_t *pwc, size_t limit, const char *name) { if (my_coll_parser_curr(p)->term != MY_COLL_LEXEM_CHAR) return my_coll_parser_expected_error(p, MY_COLL_LEXEM_CHAR); if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_CHAR)) return 0; while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CHAR) { if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); my_coll_parser_scan(p); } return 1; }
O0
c
my_coll_parser_scan_character_list: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0x4d110 cmpl $0x5, (%rax) je 0x4e10c movq -0x10(%rbp), %rdi movl $0x5, %esi callq 0x4da50 movl %eax, -0x4(%rbp) jmp 0x4e1cc movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi callq 0x4d110 movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rsi movslq 0x24(%rax), %rdx callq 0x4e1e0 cmpl $0x0, %eax jne 0x4e14d movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x4e250 movl %eax, -0x4(%rbp) jmp 0x4e1cc movq -0x10(%rbp), %rdi movl $0x5, %esi callq 0x4d6e0 cmpl $0x0, %eax jne 0x4e169 movl $0x0, -0x4(%rbp) jmp 0x4e1cc jmp 0x4e16b movq -0x10(%rbp), %rdi callq 0x4d110 cmpl $0x5, (%rax) jne 0x4e1c5 movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi callq 0x4d110 movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rsi movslq 0x24(%rax), %rdx callq 0x4e1e0 cmpl $0x0, %eax jne 0x4e1ba movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x4e250 movl %eax, -0x4(%rbp) jmp 0x4e1cc movq -0x10(%rbp), %rdi callq 0x4d8f0 jmp 0x4e16b movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_parser_scan_character_list: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 5 jz short loc_4E10C mov rdi, [rbp+var_10] mov esi, 5 call my_coll_parser_expected_error mov [rbp+var_4], eax jmp loc_4E1CC loc_4E10C: mov rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov [rbp+var_30], rax mov rdi, [rbp+var_10] call my_coll_parser_curr mov rdi, [rbp+var_38] mov rsi, [rbp+var_30] movsxd rdx, dword ptr [rax+24h] call my_coll_rule_expand cmp eax, 0 jnz short loc_4E14D mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] call my_coll_parser_too_long_error mov [rbp+var_4], eax jmp short loc_4E1CC loc_4E14D: mov rdi, [rbp+var_10] mov esi, 5 call my_coll_parser_scan_term cmp eax, 0 jnz short loc_4E169 mov [rbp+var_4], 0 jmp short loc_4E1CC loc_4E169: jmp short $+2 loc_4E16B: mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 5 jnz short loc_4E1C5 mov rax, [rbp+var_18] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov [rbp+var_40], rax mov rdi, [rbp+var_10] call my_coll_parser_curr mov rdi, [rbp+var_48] mov rsi, [rbp+var_40] movsxd rdx, dword ptr [rax+24h] call my_coll_rule_expand cmp eax, 0 jnz short loc_4E1BA mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] call my_coll_parser_too_long_error mov [rbp+var_4], eax jmp short loc_4E1CC loc_4E1BA: mov rdi, [rbp+var_10] call my_coll_parser_scan jmp short loc_4E16B loc_4E1C5: mov [rbp+var_4], 1 loc_4E1CC: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_coll_parser_scan_character_list(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rax if ( *(_DWORD *)my_coll_parser_curr(a1) == 5 ) { v4 = my_coll_parser_curr(a1); if ( (unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v4 + 36)) ) { if ( (unsigned int)my_coll_parser_scan_term(a1, 5u) ) { while ( *(_DWORD *)my_coll_parser_curr(a1) == 5 ) { v5 = my_coll_parser_curr(a1); if ( !(unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v5 + 36)) ) return (unsigned int)my_coll_parser_too_long_error(a1, a4); my_coll_parser_scan(a1); } return 1; } else { return 0; } } else { return (unsigned int)my_coll_parser_too_long_error(a1, a4); } } else { return (unsigned int)my_coll_parser_expected_error(a1, 5u); } }
my_coll_parser_scan_character_list: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014d110 CMP dword ptr [RAX],0x5 JZ 0x0014e10c MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x5 CALL 0x0014da50 MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e1cc LAB_0014e10c: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014d110 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x30] MOVSXD RDX,dword ptr [RAX + 0x24] CALL 0x0014e1e0 CMP EAX,0x0 JNZ 0x0014e14d MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] CALL 0x0014e250 MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e1cc LAB_0014e14d: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x5 CALL 0x0014d6e0 CMP EAX,0x0 JNZ 0x0014e169 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014e1cc LAB_0014e169: JMP 0x0014e16b LAB_0014e16b: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014d110 CMP dword ptr [RAX],0x5 JNZ 0x0014e1c5 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014d110 MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x40] MOVSXD RDX,dword ptr [RAX + 0x24] CALL 0x0014e1e0 CMP EAX,0x0 JNZ 0x0014e1ba MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] CALL 0x0014e250 MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e1cc LAB_0014e1ba: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014d8f0 JMP 0x0014e16b LAB_0014e1c5: MOV dword ptr [RBP + -0x4],0x1 LAB_0014e1cc: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 my_coll_parser_scan_character_list (int8 param_1,int8 param_2,int8 param_3,int8 param_4) { int iVar1; int4 uVar2; int *piVar3; long lVar4; int4 local_c; piVar3 = (int *)my_coll_parser_curr(param_1); if (*piVar3 == 5) { lVar4 = my_coll_parser_curr(param_1); iVar1 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar4 + 0x24)); if (iVar1 == 0) { local_c = my_coll_parser_too_long_error(param_1,param_4); } else { iVar1 = my_coll_parser_scan_term(param_1,5); if (iVar1 == 0) { local_c = 0; } else { while (piVar3 = (int *)my_coll_parser_curr(param_1), *piVar3 == 5) { lVar4 = my_coll_parser_curr(param_1); iVar1 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar4 + 0x24)); if (iVar1 == 0) { uVar2 = my_coll_parser_too_long_error(param_1,param_4); return uVar2; } my_coll_parser_scan(param_1); } local_c = 1; } } } else { local_c = my_coll_parser_expected_error(param_1,5); } return local_c; }
51,703
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) { std::vector<common_chat_msg> msgs = { {"system", "You are a helpful assistant", {}}, {"user", "Hello", {}}, {"assistant", "Hi there", {}}, {"user", "How are you?", {}}, }; return common_chat_apply_template(tmpl, msgs, true, use_jinja); }
O3
cpp
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %r14d movq %rsi, %rbp movq %rdi, %r15 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x788cd(%rip), %rsi # 0xef37a leaq 0x788cc(%rip), %rdx # 0xef380 leaq 0x28(%rsp), %rbx movq %rbx, %rdi callq 0x21cae movl %r14d, 0xc(%rsp) leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x788a5(%rip), %rsi # 0xef381 leaq 0x788b9(%rip), %rdx # 0xef39c callq 0x21cae leaq 0x68(%rsp), %r14 leaq 0x80(%rsp), %rdi leaq 0x90(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x74fbf(%rip), %rdx # 0xebad6 movq %rdx, %rsi callq 0x21cae movq %rbp, %r12 leaq 0xa0(%rsp), %r14 leaq 0xb0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x787c7(%rip), %rsi # 0xef304 leaq 0x787c4(%rip), %rdx # 0xef308 movq %r14, %rdi callq 0x21cae leaq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x78836(%rip), %rsi # 0xef39d leaq 0x78834(%rip), %rdx # 0xef3a2 callq 0x21cae leaq 0xe0(%rsp), %r13 leaq 0xf8(%rsp), %rdi leaq 0x108(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x74f31(%rip), %rdx # 0xebad6 movq %rdx, %rsi callq 0x21cae leaq 0x118(%rsp), %r14 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x787cb(%rip), %rsi # 0xef393 leaq 0x787cd(%rip), %rdx # 0xef39c movq %r14, %rdi callq 0x21cae leaq 0x138(%rsp), %rdi leaq 0x148(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x787b1(%rip), %rsi # 0xef3a3 leaq 0x787b2(%rip), %rdx # 0xef3ab callq 0x21cae leaq 0x158(%rsp), %r13 leaq 0x170(%rsp), %rdi leaq 0x180(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x74ea6(%rip), %rdx # 0xebad6 movq %rdx, %rsi callq 0x21cae leaq 0x190(%rsp), %r14 leaq 0x1a0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x786b1(%rip), %rsi # 0xef304 leaq 0x786ae(%rip), %rdx # 0xef308 movq %r14, %rdi callq 0x21cae leaq 0x1b0(%rsp), %rdi leaq 0x1c0(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x7872f(%rip), %rsi # 0xef3ac leaq 0x78734(%rip), %rdx # 0xef3b8 callq 0x21cae leaq 0x1d0(%rsp), %r13 leaq 0x1e8(%rsp), %rdi leaq 0x1f8(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x74e1b(%rip), %rdx # 0xebad6 movq %rdx, %rsi callq 0x21cae leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0xb(%rsp), %rcx movl $0x4, %edx callq 0x7e8a4 movl $0x1e0, %r14d # imm = 0x1E0 leaq (%rsp,%r14), %rax addq $0x18, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x76cfe movq (%rax), %rsi incq %rsi callq 0x1a8d0 leaq (%rsp,%r14), %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0x7e874 movq -0x20(%rbx), %rdi leaq (%rsp,%r14), %rax addq $-0x20, %rax cmpq %rdi, %rax je 0x76d2a movq (%rax), %rsi incq %rsi callq 0x1a8d0 leaq (%rsp,%r14), %rax addq $-0x40, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x76d46 movq (%rax), %rsi incq %rsi callq 0x1a8d0 addq $-0x78, %r14 jne 0x76ce2 movzbl 0xc(%rsp), %r8d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movl $0x1, %ecx callq 0x760e4 leaq 0x10(%rsp), %rdi callq 0x7e844 movq %r15, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x7e844 jmp 0x76eca movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x7e8ec addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x76da0 jmp 0x76eca movq %rax, %r15 movq %r13, %rdi callq 0x7e874 movq 0x1b0(%rsp), %rdi cmpq %rbp, %rdi je 0x76de9 movq 0x1c0(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x76de9 movq %rax, %r15 movq 0x190(%rsp), %rdi leaq 0x1a0(%rsp), %rax cmpq %rax, %rdi je 0x76eb9 movq 0x1a0(%rsp), %rsi jmp 0x76eac jmp 0x76eb6 movq %rax, %r15 movq %r13, %rdi callq 0x7e874 movq 0x138(%rsp), %rdi cmpq %rbp, %rdi je 0x76e41 movq 0x148(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x76e41 movq %rax, %r15 movq 0x118(%rsp), %rdi leaq 0x128(%rsp), %rax cmpq %rax, %rdi je 0x76eb9 movq 0x128(%rsp), %rsi jmp 0x76eac jmp 0x76eb6 movq %rax, %r15 movq %r13, %rdi callq 0x7e874 movq 0xc0(%rsp), %rdi cmpq %rbp, %rdi je 0x76e8f movq 0xd0(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x76e8f movq %rax, %r15 movq 0xa0(%rsp), %rdi leaq 0xb0(%rsp), %rax cmpq %rax, %rdi je 0x76eb9 movq 0xb0(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x76eb9 movq %rax, %r15 addq $-0x78, %r14 movq %r14, %rdi callq 0x7e8ec cmpq %rbx, %r14 jne 0x76eb9 movq %r15, %rdi callq 0x1afc0 movq %rax, %r15 movq %r14, %rdi callq 0x7e874 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x76ef9 movq 0x58(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x76ef9 movq %rax, %r15 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x76eca movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x76eca movq %rax, %r15 jmp 0x76eca
_Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov r14d, edx mov rbp, rsi mov r15, rdi lea r13, [rsp+238h+var_200] mov [r13-10h], r13 lea rsi, aSystem; "system" lea rdx, aSystem+6; "" lea rbx, [rsp+238h+var_210] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov [rsp+238h+var_22C], r14d lea rdi, [rsp+238h+var_1F0] lea r12, [rsp+238h+var_1E0] mov [r12-10h], r12 lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, aYouAreAHelpful+1Bh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] lea rax, [rsp+238h+var_1A8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov r12, rbp lea r14, [rsp+238h+var_198] lea rax, [rsp+238h+var_188] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_178] lea rbp, [rsp+238h+var_168] mov [rbp-10h], rbp lea rsi, aHello; "Hello" lea rdx, aHello+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+238h+var_158] lea rdi, [rsp+238h+var_140] lea rax, [rsp+238h+var_130] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_120] lea rax, [rsp+238h+var_110] mov [rax-10h], rax lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, aYouAreAHelpful+1Bh; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_100] lea rbp, [rsp+238h+var_F0] mov [rbp-10h], rbp lea rsi, aHiThere; "Hi there" lea rdx, aHiThere+8; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+238h+var_E0] lea rdi, [rsp+238h+var_C8] lea rax, [rsp+238h+var_B8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_A8] lea rax, [rsp+238h+var_98] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_88] lea rbp, [rsp+238h+var_78] mov [rbp-10h], rbp lea rsi, aHowAreYou; "How are you?" lea rdx, aHowAreYou+0Ch; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+238h+var_68] lea rdi, [rsp+238h+var_50] lea rax, [rsp+238h+var_40] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] lea rcx, [rsp+238h+var_22D] mov edx, 4 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&) mov r14d, 1E0h loc_76CE2: lea rax, [rsp+r14+238h+var_238] add rax, 18h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_76CFE mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76CFE: lea rbx, [rsp+r14+238h+var_238] add rbx, 0FFFFFFFFFFFFFFF0h mov rdi, rbx call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rbx-20h]; void * lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFE0h cmp rax, rdi jz short loc_76D2A mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76D2A: lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFC0h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_76D46 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76D46: add r14, 0FFFFFFFFFFFFFF88h jnz short loc_76CE2 movzx r8d, byte ptr [rsp+238h+var_22C] lea rdx, [rsp+238h+var_228] mov rdi, r15 mov rsi, r12 mov ecx, 1 call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) lea rdi, [rsp+238h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() jmp loc_76ECA mov r15, rax mov ebx, 168h loc_76DA0: lea rdi, [rsp+rbx+0] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_76DA0 jmp loc_76ECA mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_1A8]; void * cmp rdi, rbp jz short loc_76DE9 mov rsi, [rsp+arg_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76DE9 mov r15, rax loc_76DE9: mov rdi, [rsp+arg_188] lea rax, [rsp+arg_198] cmp rdi, rax jz loc_76EB9 mov rsi, [rsp+arg_198] jmp loc_76EAC jmp loc_76EB6 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_130]; void * cmp rdi, rbp jz short loc_76E41 mov rsi, [rsp+arg_140] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76E41 mov r15, rax loc_76E41: mov rdi, [rsp+arg_110] lea rax, [rsp+arg_120] cmp rdi, rax jz short loc_76EB9 mov rsi, [rsp+arg_120] jmp short loc_76EAC jmp short loc_76EB6 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_B8]; void * cmp rdi, rbp jz short loc_76E8F mov rsi, [rsp+arg_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76E8F mov r15, rax loc_76E8F: mov rdi, [rsp+arg_98]; void * lea rax, [rsp+arg_A8] cmp rdi, rax jz short loc_76EB9 mov rsi, [rsp+arg_A8] loc_76EAC: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76EB9 loc_76EB6: mov r15, rax loc_76EB9: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_76EB9 loc_76ECA: mov rdi, r15 call __Unwind_Resume mov r15, rax mov rdi, r14 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_40]; void * cmp rdi, r12 jz short loc_76EF9 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76EF9 mov r15, rax loc_76EF9: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_76ECA mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76ECA mov r15, rax jmp short loc_76ECA
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, int a3) { unsigned long long v5; // r14 long long *v6; // rdi _QWORD *v7; // rdi _QWORD *v8; // rax _QWORD *v9; // rax _QWORD *v10; // rdi _BYTE v12[11]; // [rsp+0h] [rbp-238h] BYREF char v13; // [rsp+Bh] [rbp-22Dh] BYREF int v14; // [rsp+Ch] [rbp-22Ch] long long v15[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v16[2]; // [rsp+28h] [rbp-210h] BYREF char v17; // [rsp+38h] [rbp-200h] BYREF char *v18; // [rsp+48h] [rbp-1F0h] BYREF char v19; // [rsp+58h] [rbp-1E0h] BYREF __int128 v20; // [rsp+68h] [rbp-1D0h] long long v21; // [rsp+78h] [rbp-1C0h] char *v22; // [rsp+80h] [rbp-1B8h] BYREF char v23; // [rsp+90h] [rbp-1A8h] BYREF char *v24; // [rsp+A0h] [rbp-198h] BYREF char v25; // [rsp+B0h] [rbp-188h] BYREF char *v26; // [rsp+C0h] [rbp-178h] BYREF char v27; // [rsp+D0h] [rbp-168h] BYREF __int128 v28; // [rsp+E0h] [rbp-158h] long long v29; // [rsp+F0h] [rbp-148h] char *v30; // [rsp+F8h] [rbp-140h] BYREF char v31; // [rsp+108h] [rbp-130h] BYREF char *v32; // [rsp+118h] [rbp-120h] BYREF char v33; // [rsp+128h] [rbp-110h] BYREF char *v34; // [rsp+138h] [rbp-100h] BYREF char v35; // [rsp+148h] [rbp-F0h] BYREF __int128 v36; // [rsp+158h] [rbp-E0h] long long v37; // [rsp+168h] [rbp-D0h] char *v38; // [rsp+170h] [rbp-C8h] BYREF char v39; // [rsp+180h] [rbp-B8h] BYREF char *v40; // [rsp+190h] [rbp-A8h] BYREF char v41; // [rsp+1A0h] [rbp-98h] BYREF char *v42; // [rsp+1B0h] [rbp-88h] BYREF char v43; // [rsp+1C0h] [rbp-78h] BYREF __int128 v44; // [rsp+1D0h] [rbp-68h] long long v45; // [rsp+1E0h] [rbp-58h] char *v46; // [rsp+1E8h] [rbp-50h] BYREF char v47; // [rsp+1F8h] [rbp-40h] BYREF v16[0] = &v17; std::string::_M_construct<char const*>((long long)v16, "system", (long long)""); v14 = a3; v18 = &v19; std::string::_M_construct<char const*>((long long)&v18, "You are a helpful assistant", (long long)""); v20 = 0LL; v21 = 0LL; v22 = &v23; std::string::_M_construct<char const*>((long long)&v22, "", (long long)""); v24 = &v25; std::string::_M_construct<char const*>((long long)&v24, "user", (long long)""); v26 = &v27; std::string::_M_construct<char const*>((long long)&v26, "Hello", (long long)""); v28 = 0LL; v29 = 0LL; v30 = &v31; std::string::_M_construct<char const*>((long long)&v30, "", (long long)""); v32 = &v33; std::string::_M_construct<char const*>((long long)&v32, "assistant", (long long)""); v34 = &v35; std::string::_M_construct<char const*>((long long)&v34, "Hi there", (long long)""); v36 = 0LL; v37 = 0LL; v38 = &v39; std::string::_M_construct<char const*>((long long)&v38, "", (long long)""); v40 = &v41; std::string::_M_construct<char const*>((long long)&v40, "user", (long long)""); v42 = &v43; std::string::_M_construct<char const*>((long long)&v42, "How are you?", (long long)""); v44 = 0LL; v45 = 0LL; v46 = &v47; std::string::_M_construct<char const*>((long long)&v46, "", (long long)""); std::vector<common_chat_msg>::vector(v15, v16, 4LL, &v13); v5 = 480LL; do { v6 = *(long long **)&v12[v5 + 8]; if ( &v15[v5 / 8 + 1] != v6 ) operator delete(v6, v15[v5 / 8 + 1] + 1); std::vector<common_tool_call>::~vector(&v12[v5 - 16]); v7 = *(_QWORD **)&v12[v5 - 48]; v8 = &v12[v5 - 32]; if ( v8 != v7 ) operator delete(v7, *v8 + 1LL); v9 = &v12[v5 - 64]; v10 = (_QWORD *)*(v9 - 2); if ( v9 != v10 ) operator delete(v10, *v9 + 1LL); v5 -= 120LL; } while ( v5 ); common_chat_apply_template[abi:cxx11](a1, a2, v15, 1u, (unsigned __int8)v14); std::vector<common_chat_msg>::~vector(v15); return a1; }
common_chat_format_example[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV R14D,EDX MOV RBP,RSI MOV R15,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_00176aa6: LEA RSI,[0x1ef37a] LEA RDX,[0x1ef380] LEA RBX,[RSP + 0x28] MOV RDI,RBX CALL 0x00121cae MOV dword ptr [RSP + 0xc],R14D LEA RDI,[RSP + 0x48] LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 LAB_00176ad5: LEA RSI,[0x1ef381] LEA RDX,[0x1ef39c] CALL 0x00121cae LEA R14,[RSP + 0x68] LEA RDI,[RSP + 0x80] LEA RAX,[RSP + 0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00176b10: LEA RDX,[0x1ebad6] MOV RSI,RDX CALL 0x00121cae MOV R12,RBP LEA R14,[RSP + 0xa0] LEA RAX,[RSP + 0xb0] MOV qword ptr [RAX + -0x10],RAX LAB_00176b36: LEA RSI,[0x1ef304] LEA RDX,[0x1ef308] MOV RDI,R14 CALL 0x00121cae LEA RDI,[RSP + 0xc0] LEA RBP,[RSP + 0xd0] MOV qword ptr [RBP + -0x10],RBP LAB_00176b60: LEA RSI,[0x1ef39d] LEA RDX,[0x1ef3a2] CALL 0x00121cae LEA R13,[RSP + 0xe0] LEA RDI,[RSP + 0xf8] LEA RAX,[RSP + 0x108] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00176b9e: LEA RDX,[0x1ebad6] MOV RSI,RDX CALL 0x00121cae LEA R14,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_00176bc1: LEA RSI,[0x1ef393] LEA RDX,[0x1ef39c] MOV RDI,R14 CALL 0x00121cae LEA RDI,[RSP + 0x138] LEA RBP,[RSP + 0x148] MOV qword ptr [RBP + -0x10],RBP LAB_00176beb: LEA RSI,[0x1ef3a3] LEA RDX,[0x1ef3ab] CALL 0x00121cae LEA R13,[RSP + 0x158] LEA RDI,[RSP + 0x170] LEA RAX,[RSP + 0x180] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00176c29: LEA RDX,[0x1ebad6] MOV RSI,RDX CALL 0x00121cae LEA R14,[RSP + 0x190] LEA RAX,[RSP + 0x1a0] MOV qword ptr [RAX + -0x10],RAX LAB_00176c4c: LEA RSI,[0x1ef304] LEA RDX,[0x1ef308] MOV RDI,R14 CALL 0x00121cae LEA RDI,[RSP + 0x1b0] LEA RBP,[RSP + 0x1c0] MOV qword ptr [RBP + -0x10],RBP LAB_00176c76: LEA RSI,[0x1ef3ac] LEA RDX,[0x1ef3b8] CALL 0x00121cae LEA R13,[RSP + 0x1d0] LEA RDI,[RSP + 0x1e8] LEA RAX,[RSP + 0x1f8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00176cb4: LEA RDX,[0x1ebad6] MOV RSI,RDX CALL 0x00121cae LAB_00176cc3: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] LEA RCX,[RSP + 0xb] MOV EDX,0x4 CALL 0x0017e8a4 MOV R14D,0x1e0 LAB_00176ce2: LEA RAX,[RSP + R14*0x1] ADD RAX,0x18 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x00176cfe MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011a8d0 LAB_00176cfe: LEA RBX,[RSP + R14*0x1] ADD RBX,-0x10 MOV RDI,RBX CALL 0x0017e874 MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + R14*0x1] ADD RAX,-0x20 CMP RAX,RDI JZ 0x00176d2a MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011a8d0 LAB_00176d2a: LEA RAX,[RSP + R14*0x1] ADD RAX,-0x40 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x00176d46 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011a8d0 LAB_00176d46: ADD R14,-0x78 JNZ 0x00176ce2 LAB_00176d4c: MOVZX R8D,byte ptr [RSP + 0xc] LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV ECX,0x1 CALL 0x001760e4 LAB_00176d67: LEA RDI,[RSP + 0x10] CALL 0x0017e844 MOV RAX,R15 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */ chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2) { long *plVar1; long *plVar2; int7 in_register_00000031; long lVar3; long alStack_288 [8]; vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8]; int8 uStack_240; int8 uStack_230; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8]; long alStack_220 [2]; int1 *local_210 [2]; int1 local_200 [16]; int1 *local_1f0 [2]; int1 local_1e0 [16]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; int1 *local_1b8 [2]; int1 local_1a8 [16]; int1 *local_198 [2]; int1 local_188 [16]; int1 *local_178 [2]; int1 local_168 [16]; int8 local_158; int8 uStack_150; int8 local_148; int1 *local_140 [2]; int1 local_130 [16]; int1 *local_120 [2]; int1 local_110 [16]; int1 *local_100 [2]; int1 local_f0 [16]; int8 local_e0; int8 uStack_d8; int8 local_d0; int1 *local_c8 [2]; int1 local_b8 [16]; int1 *local_a8 [2]; int1 local_98 [16]; int1 *local_88 [2]; int1 local_78 [16]; int8 local_68; int8 uStack_60; int8 local_58; int1 *local_50 [2]; int1 local_40 [16]; local_210[0] = local_200; /* try { // try from 00176aa6 to 00176ac0 has its CatchHandler @ 00176f12 */ uStack_240 = 0x176ac1; std::__cxx11::string::_M_construct<char_const*>(local_210,"system",""); local_1f0[0] = local_1e0; /* try { // try from 00176ad5 to 00176ae7 has its CatchHandler @ 00176ef6 */ uStack_240 = 0x176ae8; std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant",""); local_1b8[0] = local_1a8; local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 00176b10 to 00176b1e has its CatchHandler @ 00176ed2 */ uStack_240 = 0x176b1f; std::__cxx11::string::_M_construct<char_const*>(local_1b8,""); local_198[0] = local_188; /* try { // try from 00176b36 to 00176b4b has its CatchHandler @ 00176eb6 */ uStack_240 = 0x176b4c; std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001ef304,&DAT_001ef308); local_178[0] = local_168; /* try { // try from 00176b60 to 00176b72 has its CatchHandler @ 00176e8c */ uStack_240 = 0x176b73; std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello",""); local_140[0] = local_130; local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 00176b9e to 00176bac has its CatchHandler @ 00176e62 */ uStack_240 = 0x176bad; std::__cxx11::string::_M_construct<char_const*>(local_140,""); local_120[0] = local_110; /* try { // try from 00176bc1 to 00176bd6 has its CatchHandler @ 00176e60 */ uStack_240 = 0x176bd7; std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant",""); local_100[0] = local_f0; /* try { // try from 00176beb to 00176bfd has its CatchHandler @ 00176e3e */ uStack_240 = 0x176bfe; std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there",""); local_c8[0] = local_b8; local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 00176c29 to 00176c37 has its CatchHandler @ 00176e14 */ uStack_240 = 0x176c38; std::__cxx11::string::_M_construct<char_const*>(local_c8,""); local_a8[0] = local_98; /* try { // try from 00176c4c to 00176c61 has its CatchHandler @ 00176e0f */ uStack_240 = 0x176c62; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001ef304,&DAT_001ef308); local_88[0] = local_78; /* try { // try from 00176c76 to 00176c88 has its CatchHandler @ 00176de6 */ uStack_240 = 0x176c89; std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?",""); local_50[0] = local_40; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 00176cb4 to 00176cc2 has its CatchHandler @ 00176dbc */ uStack_240 = 0x176cc3; std::__cxx11::string::_M_construct<char_const*>(local_50,""); /* try { // try from 00176cc3 to 00176cdb has its CatchHandler @ 00176d98 */ uStack_240 = 0x176cdc; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,(long)&uStack_230 + 3); lVar3 = 0x1e0; do { if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) { uStack_240 = 0x176cfe; operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1 ); } uStack_240 = 0x176d0e; std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3); plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20); plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30); if (plVar1 != plVar2) { uStack_240 = 0x176d2a; operator_delete(plVar2,*plVar1 + 1); } plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10); if (plVar2 != *(long **)((long)alStack_288 + lVar3)) { uStack_240 = 0x176d46; operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1); } lVar3 = lVar3 + -0x78; } while (lVar3 != 0); /* try { // try from 00176d4c to 00176d66 has its CatchHandler @ 00176d86 */ uStack_240 = 0x176d67; common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); uStack_240 = 0x176d71; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
51,704
func_gb2312_uni_onechar
eloqsql/strings/ctype-gb2312.c
static int func_gb2312_uni_onechar(int code){ if ((code>=0x2121)&&(code<=0x2658)) return(tab_gb2312_uni0[code-0x2121]); if ((code>=0x2721)&&(code<=0x296F)) return(tab_gb2312_uni1[code-0x2721]); if ((code>=0x3021)&&(code<=0x777E)) return(tab_gb2312_uni2[code-0x3021]); return(0); }
O0
c
func_gb2312_uni_onechar: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x2121, -0x8(%rbp) # imm = 0x2121 jl 0x9af34 cmpl $0x2658, -0x8(%rbp) # imm = 0x2658 jg 0x9af34 movl -0x8(%rbp), %eax subl $0x2121, %eax # imm = 0x2121 movslq %eax, %rcx leaq 0xcfde5(%rip), %rax # 0x16ad10 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x9af95 cmpl $0x2721, -0x8(%rbp) # imm = 0x2721 jl 0x9af61 cmpl $0x296f, -0x8(%rbp) # imm = 0x296F jg 0x9af61 movl -0x8(%rbp), %eax subl $0x2721, %eax # imm = 0x2721 movslq %eax, %rcx leaq 0xd0828(%rip), %rax # 0x16b780 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x9af95 cmpl $0x3021, -0x8(%rbp) # imm = 0x3021 jl 0x9af8e cmpl $0x777e, -0x8(%rbp) # imm = 0x777E jg 0x9af8e movl -0x8(%rbp), %eax subl $0x3021, %eax # imm = 0x3021 movslq %eax, %rcx leaq 0xd0c9b(%rip), %rax # 0x16bc20 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x9af95 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
func_gb2312_uni_onechar: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 2121h jl short loc_9AF34 cmp [rbp+var_8], 2658h jg short loc_9AF34 mov eax, [rbp+var_8] sub eax, 2121h movsxd rcx, eax lea rax, tab_gb2312_uni0 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_9AF95 loc_9AF34: cmp [rbp+var_8], 2721h jl short loc_9AF61 cmp [rbp+var_8], 296Fh jg short loc_9AF61 mov eax, [rbp+var_8] sub eax, 2721h movsxd rcx, eax lea rax, tab_gb2312_uni1 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_9AF95 loc_9AF61: cmp [rbp+var_8], 3021h jl short loc_9AF8E cmp [rbp+var_8], 777Eh jg short loc_9AF8E mov eax, [rbp+var_8] sub eax, 3021h movsxd rcx, eax lea rax, tab_gb2312_uni2 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_9AF95 loc_9AF8E: mov [rbp+var_4], 0 loc_9AF95: mov eax, [rbp+var_4] pop rbp retn
long long func_gb2312_uni_onechar(int a1) { if ( a1 < 8481 || a1 > 9816 ) { if ( a1 < 10017 || a1 > 10607 ) { if ( a1 < 12321 || a1 > 30590 ) return 0; else return tab_gb2312_uni2[a1 - 12321]; } else { return tab_gb2312_uni1[a1 - 10017]; } } else { return tab_gb2312_uni0[a1 - 8481]; } }
func_gb2312_uni_onechar: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x2121 JL 0x0019af34 CMP dword ptr [RBP + -0x8],0x2658 JG 0x0019af34 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2121 MOVSXD RCX,EAX LEA RAX,[0x26ad10] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019af95 LAB_0019af34: CMP dword ptr [RBP + -0x8],0x2721 JL 0x0019af61 CMP dword ptr [RBP + -0x8],0x296f JG 0x0019af61 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2721 MOVSXD RCX,EAX LEA RAX,[0x26b780] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019af95 LAB_0019af61: CMP dword ptr [RBP + -0x8],0x3021 JL 0x0019af8e CMP dword ptr [RBP + -0x8],0x777e JG 0x0019af8e MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3021 MOVSXD RCX,EAX LEA RAX,[0x26bc20] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019af95 LAB_0019af8e: MOV dword ptr [RBP + -0x4],0x0 LAB_0019af95: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int2 func_gb2312_uni_onechar(int param_1) { int2 uVar1; if ((param_1 < 0x2121) || (0x2658 < param_1)) { if ((param_1 < 0x2721) || (0x296f < param_1)) { if ((param_1 < 0x3021) || (0x777e < param_1)) { uVar1 = 0; } else { uVar1 = *(int2 *)(tab_gb2312_uni2 + (long)(param_1 + -0x3021) * 2); } } else { uVar1 = *(int2 *)(tab_gb2312_uni1 + (long)(param_1 + -0x2721) * 2); } } else { uVar1 = *(int2 *)(tab_gb2312_uni0 + (long)(param_1 + -0x2121) * 2); } return uVar1; }
51,705
compare_columns
eloqsql/storage/maria/ma_create.c
static int compare_columns(MARIA_COLUMNDEF **a_ptr, MARIA_COLUMNDEF **b_ptr) { MARIA_COLUMNDEF *a= *a_ptr, *b= *b_ptr; enum en_fieldtype a_type, b_type; a_type= (a->type == FIELD_CHECK) ? FIELD_NORMAL : a->type; b_type= (b->type == FIELD_CHECK) ? FIELD_NORMAL : b->type; if (a_type == FIELD_NORMAL && !a->null_bit) { if (b_type != FIELD_NORMAL || b->null_bit) return -1; return sign((long) a->offset - (long) b->offset); } if (b_type == FIELD_NORMAL && !b->null_bit) return 1; if (a_type == b_type) return sign((long) a->offset - (long) b->offset); if (a_type == FIELD_NORMAL) return -1; if (b_type == FIELD_NORMAL) return 1; if (a_type == FIELD_SKIP_ZERO) return -1; if (b_type == FIELD_SKIP_ZERO) return 1; if (a->type != FIELD_BLOB && b->type != FIELD_BLOB) if (a->length != b->length) return sign((long) a->length - (long) b->length); if (a_type == FIELD_BLOB) return 1; if (b_type == FIELD_BLOB) return -1; return sign((long) a->offset - (long) b->offset); }
O3
c
compare_columns: pushq %rbp movq %rsp, %rbp movq (%rdi), %rdx movq (%rsi), %rcx movl (%rdx), %r8d xorl %esi, %esi cmpl $0x9, %r8d movl %r8d, %edi cmovel %esi, %edi movl (%rcx), %r9d cmpl $0x9, %r9d cmovnel %r9d, %esi testl %edi, %edi jne 0x44a34 cmpb $0x0, 0x12(%rdx) je 0x44ac5 testl %esi, %esi jne 0x44a42 cmpb $0x0, 0x12(%rcx) je 0x44ad9 cmpl %esi, %edi jne 0x44a5e movl 0x4(%rdx), %eax xorl %edx, %edx cmpl 0x4(%rcx), %eax setne %dl movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovael %edx, %eax jmp 0x44ade testl %esi, %esi sete %r11b xorl %eax, %eax testl %edi, %edi sete %r10b orb %r10b, %r11b je 0x44a7b movb %r10b, %al negl %eax orl $0x1, %eax jmp 0x44ade movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x3, %edi je 0x44ade movl $0x1, %eax cmpl $0x3, %esi je 0x44ade cmpl $0x4, %r8d sete %r8b cmpl $0x4, %r9d sete %r9b orb %r8b, %r9b jne 0x44ab4 movzwl 0x8(%rdx), %r8d movzwl 0x8(%rcx), %r9d cmpw %r9w, %r8w jne 0x44ae0 cmpl $0x4, %edi je 0x44ade movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x4, %esi jne 0x44a46 jmp 0x44ade movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %esi, %esi jne 0x44ade cmpb $0x0, 0x12(%rcx) jne 0x44ade jmp 0x44a46 movl $0x1, %eax popq %rbp retq xorl %eax, %eax cmpw %r9w, %r8w sbbl %eax, %eax jmp 0x44a76
compare_columns: push rbp mov rbp, rsp mov rdx, [rdi] mov rcx, [rsi] mov r8d, [rdx] xor esi, esi cmp r8d, 9 mov edi, r8d cmovz edi, esi mov r9d, [rcx] cmp r9d, 9 cmovnz esi, r9d test edi, edi jnz short loc_44A34 cmp byte ptr [rdx+12h], 0 jz loc_44AC5 loc_44A34: test esi, esi jnz short loc_44A42 cmp byte ptr [rcx+12h], 0 jz loc_44AD9 loc_44A42: cmp edi, esi jnz short loc_44A5E loc_44A46: mov eax, [rdx+4] xor edx, edx cmp eax, [rcx+4] setnz dl mov eax, 0FFFFFFFFh cmovnb eax, edx jmp loc_44ADE loc_44A5E: test esi, esi setz r11b xor eax, eax test edi, edi setz r10b or r11b, r10b jz short loc_44A7B mov al, r10b neg eax loc_44A76: or eax, 1 jmp short loc_44ADE loc_44A7B: mov eax, 0FFFFFFFFh cmp edi, 3 jz short loc_44ADE mov eax, 1 cmp esi, 3 jz short loc_44ADE cmp r8d, 4 setz r8b cmp r9d, 4 setz r9b or r9b, r8b jnz short loc_44AB4 movzx r8d, word ptr [rdx+8] movzx r9d, word ptr [rcx+8] cmp r8w, r9w jnz short loc_44AE0 loc_44AB4: cmp edi, 4 jz short loc_44ADE mov eax, 0FFFFFFFFh cmp esi, 4 jnz short loc_44A46 jmp short loc_44ADE loc_44AC5: mov eax, 0FFFFFFFFh test esi, esi jnz short loc_44ADE cmp byte ptr [rcx+12h], 0 jnz short loc_44ADE jmp loc_44A46 loc_44AD9: mov eax, 1 loc_44ADE: pop rbp retn loc_44AE0: xor eax, eax cmp r8w, r9w sbb eax, eax jmp short loc_44A76
long long compare_columns(int **a1, int **a2) { int *v2; // rdx int *v3; // rcx int v4; // r8d int v5; // esi int v6; // edi unsigned int v7; // eax bool v8; // cf BOOL v9; // edx long long result; // rax int v11; // eax int v12; // eax unsigned __int16 v13; // r8 unsigned __int16 v14; // r9 v2 = *a1; v3 = *a2; v5 = 0; v6 = **a1; v4 = v6; if ( v6 == 9 ) v6 = 0; if ( *v3 != 9 ) v5 = *v3; if ( !v6 && !*((_BYTE *)v2 + 18) ) { result = 0xFFFFFFFFLL; if ( v5 || *((_BYTE *)v3 + 18) ) return result; LABEL_10: v7 = v2[1]; v8 = v7 < v3[1]; v9 = v7 != v3[1]; result = 0xFFFFFFFFLL; if ( !v8 ) return v9; return result; } if ( !v5 && !*((_BYTE *)v3 + 18) ) return 1LL; if ( v6 == v5 ) goto LABEL_10; v11 = 0; if ( v6 == 0 || v5 == 0 ) { LOBYTE(v11) = v6 == 0; v12 = -v11; return v12 | 1u; } result = 0xFFFFFFFFLL; if ( v6 != 3 ) { result = 1LL; if ( v5 != 3 ) { if ( v4 != 4 && *v3 != 4 ) { v13 = *((_WORD *)v2 + 4); v14 = *((_WORD *)v3 + 4); if ( v13 != v14 ) { v12 = -(v13 < v14); return v12 | 1u; } } if ( v6 != 4 ) { result = 0xFFFFFFFFLL; if ( v5 != 4 ) goto LABEL_10; } } } return result; }
compare_columns: PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RDI] MOV RCX,qword ptr [RSI] MOV R8D,dword ptr [RDX] XOR ESI,ESI CMP R8D,0x9 MOV EDI,R8D CMOVZ EDI,ESI MOV R9D,dword ptr [RCX] CMP R9D,0x9 CMOVNZ ESI,R9D TEST EDI,EDI JNZ 0x00144a34 CMP byte ptr [RDX + 0x12],0x0 JZ 0x00144ac5 LAB_00144a34: TEST ESI,ESI JNZ 0x00144a42 CMP byte ptr [RCX + 0x12],0x0 JZ 0x00144ad9 LAB_00144a42: CMP EDI,ESI JNZ 0x00144a5e LAB_00144a46: MOV EAX,dword ptr [RDX + 0x4] XOR EDX,EDX CMP EAX,dword ptr [RCX + 0x4] SETNZ DL MOV EAX,0xffffffff CMOVNC EAX,EDX JMP 0x00144ade LAB_00144a5e: TEST ESI,ESI SETZ R11B XOR EAX,EAX TEST EDI,EDI SETZ R10B OR R11B,R10B JZ 0x00144a7b MOV AL,R10B NEG EAX LAB_00144a76: OR EAX,0x1 JMP 0x00144ade LAB_00144a7b: MOV EAX,0xffffffff CMP EDI,0x3 JZ 0x00144ade MOV EAX,0x1 CMP ESI,0x3 JZ 0x00144ade CMP R8D,0x4 SETZ R8B CMP R9D,0x4 SETZ R9B OR R9B,R8B JNZ 0x00144ab4 MOVZX R8D,word ptr [RDX + 0x8] MOVZX R9D,word ptr [RCX + 0x8] CMP R8W,R9W JNZ 0x00144ae0 LAB_00144ab4: CMP EDI,0x4 JZ 0x00144ade MOV EAX,0xffffffff CMP ESI,0x4 JNZ 0x00144a46 JMP 0x00144ade LAB_00144ac5: MOV EAX,0xffffffff TEST ESI,ESI JNZ 0x00144ade CMP byte ptr [RCX + 0x12],0x0 JNZ 0x00144ade JMP 0x00144a46 LAB_00144ad9: MOV EAX,0x1 LAB_00144ade: POP RBP RET LAB_00144ae0: XOR EAX,EAX CMP R8W,R9W SBB EAX,EAX JMP 0x00144a76
uint compare_columns(int8 *param_1,int8 *param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; uint uVar5; int iVar6; int iVar7; bool bVar8; piVar3 = (int *)*param_1; piVar4 = (int *)*param_2; iVar1 = *piVar3; iVar7 = iVar1; if (iVar1 == 9) { iVar7 = 0; } iVar2 = *piVar4; iVar6 = 0; if (iVar2 != 9) { iVar6 = iVar2; } if ((iVar7 == 0) && (*(char *)((long)piVar3 + 0x12) == '\0')) { if (iVar6 != 0) { return 0xffffffff; } if (*(char *)((long)piVar4 + 0x12) != '\0') { return 0xffffffff; } } else { if ((iVar6 == 0) && (*(char *)((long)piVar4 + 0x12) == '\0')) { return 1; } if (iVar7 != iVar6) { bVar8 = iVar7 == 0; if (iVar6 == 0 || bVar8) { LAB_00144a76: return -(uint)bVar8 | 1; } if (iVar7 == 3) { return 0xffffffff; } if (iVar6 == 3) { return 1; } if (iVar2 != 4 && iVar1 != 4) { if (*(ushort *)(piVar3 + 2) != *(ushort *)(piVar4 + 2)) { bVar8 = *(ushort *)(piVar3 + 2) < *(ushort *)(piVar4 + 2); goto LAB_00144a76; } } if (iVar7 == 4) { return 1; } if (iVar6 == 4) { return 0xffffffff; } } } uVar5 = 0xffffffff; if ((uint)piVar4[1] <= (uint)piVar3[1]) { uVar5 = (uint)(piVar3[1] != piVar4[1]); } return uVar5; }
51,706
mi_nommap_pread
eloqsql/storage/myisam/mi_dynrec.c
size_t mi_nommap_pread(MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { return mysql_file_pread(info->dfile, Buffer, Count, offset, MyFlags); }
O3
c
mi_nommap_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x30(%rbp) movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 movl 0x1c0(%rdi), %ebx leaq 0x30f089(%rip), %rax # 0x389060 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7a019 movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r8 callq 0xa32d8 movq %rax, %rbx movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x30f03d(%rip), %rax # 0x389060 movq (%rax), %rax leaq 0x63d91(%rip), %rdx # 0xdddbe movq %r15, %rdi movq %r14, %rsi movl $0xca, %ecx callq *0x210(%rax) movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r12 movq %r12, %r8 callq 0xa32d8 movq %rax, %rbx xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %r14 cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r12b cmovneq %r14, %rsi leaq 0x30efe8(%rip), %rax # 0x389060 movq (%rax), %rax movq %r15, %rdi callq *0x218(%rax) jmp 0x7a007
mi_nommap_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], r8 mov r12, rcx mov r14, rdx mov r13, rsi mov ebx, [rdi+1C0h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_7A019 mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r8, [rbp+var_30] call my_pread mov rbx, rax loc_7A007: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7A019: mov r15, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov rsi, r14 mov ecx, 0CAh call qword ptr [rax+210h] mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r12, [rbp+var_30] mov r8, r12 call my_pread mov rbx, rax xor esi, esi test rax, rax cmovnz r14, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r12b, 6 cmovnz rsi, r14 lea rax, PSI_server mov rax, [rax] mov rdi, r15 call qword ptr [rax+218h] jmp short loc_7A007
long long mi_nommap_pread(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned int v7; // ebx long long v8; // rax long long v9; // rbx long long v11; // r15 _BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF long long v13; // [rsp+50h] [rbp-30h] v13 = a5; v7 = *(_DWORD *)(a1 + 448); v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 6LL); if ( !v8 ) return my_pread(v7, a2, a3, a4, v13); v11 = v8; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v8, a3, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 202LL); v9 = my_pread(v7, a2, a3, a4, v13); ((void ( *)(long long))PSI_server[67])(v11); return v9; }
mi_nommap_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],R8 MOV R12,RCX MOV R14,RDX MOV R13,RSI MOV EBX,dword ptr [RDI + 0x1c0] LEA RAX,[0x489060] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017a019 MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R8,qword ptr [RBP + -0x30] CALL 0x001a32d8 MOV RBX,RAX LAB_0017a007: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017a019: MOV R15,RAX LEA RAX,[0x489060] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dddbe] MOV RDI,R15 MOV RSI,R14 MOV ECX,0xca CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R12,qword ptr [RBP + -0x30] MOV R8,R12 CALL 0x001a32d8 MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ R14,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R12B,0x6 CMOVNZ RSI,R14 LEA RAX,[0x489060] MOV RAX,qword ptr [RAX] MOV RDI,R15 CALL qword ptr [RAX + 0x218] JMP 0x0017a007
long mi_nommap_pread(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5) { int4 uVar1; ulong uVar2; long lVar3; long lVar4; long lVar5; int1 local_80 [72]; ulong local_38; uVar1 = *(int4 *)(param_1 + 0x1c0); local_38 = param_5; lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6); if (lVar3 == 0) { lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); } else { (**(code **)(PSI_server + 0x210)) (lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 0xca); uVar2 = local_38; lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); if (lVar4 != 0) { param_3 = 0; } lVar5 = 0; if (lVar4 != -1) { lVar5 = lVar4; } if ((uVar2 & 6) != 0) { lVar5 = param_3; } (**(code **)(PSI_server + 0x218))(lVar3,lVar5); } return lVar4; }
51,707
add_compiled_extra_collation
eloqsql/mysys/charset.c
void add_compiled_extra_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); cs->cs_name= org->cs_name; } }
O0
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0xdb7fe movq -0x8(%rbp), %rdx movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, %ecx leaq 0xb9eeaf(%rip), %rax # 0xc7a6c0 movq %rdx, (%rax,%rcx,8) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x200, %ecx # imm = 0x200 movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rsi leaq 0xba2e90(%rip), %rdi # 0xc7e6c0 callq 0xde490 cmpb $0x0, %al je 0xdb871 movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi movq -0x8(%rbp), %rax movq 0x18(%rax), %rdx leaq 0xba2e70(%rip), %rdi # 0xc7e6c0 callq 0xde0a0 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
add_compiled_extra_collation: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_DB7FE: mov rdx, [rbp+var_8] mov rax, [rbp+var_8] mov eax, [rax] mov ecx, eax lea rax, all_charsets mov [rax+rcx*8], rdx mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 200h mov [rax+0Ch], ecx mov rsi, [rbp+var_8] lea rdi, charset_name_hash call my_hash_insert cmp al, 0 jz short loc_DB871 mov rax, [rbp+var_8] mov rsi, [rax+10h] mov rax, [rbp+var_8] mov rdx, [rax+18h] lea rdi, charset_name_hash call my_hash_search mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_10] mov rdx, [rcx+10h] mov [rax+10h], rdx mov rcx, [rcx+18h] mov [rax+18h], rcx loc_DB871: add rsp, 10h pop rbp retn
long long add_compiled_extra_collation(unsigned int *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] all_charsets[*a1] = a1; a1[3] |= 0x200u; result = my_hash_insert(&charset_name_hash, a1); if ( (_BYTE)result ) { v2 = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); result = (long long)a1; *((_QWORD *)a1 + 2) = *(_QWORD *)(v2 + 16); *((_QWORD *)a1 + 3) = *(_QWORD *)(v2 + 24); } return result; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001db7fe LAB_001db7fe: MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV ECX,EAX LEA RAX,[0xd7a6c0] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x200 MOV dword ptr [RAX + 0xc],ECX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0xd7e6c0] CALL 0x001de490 CMP AL,0x0 JZ 0x001db871 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x18] LEA RDI,[0xd7e6c0] CALL 0x001de0a0 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_001db871: ADD RSP,0x10 POP RBP RET
void add_compiled_extra_collation(uint *param_1) { char cVar1; long lVar2; (&all_charsets)[*param_1] = param_1; param_1[3] = param_1[3] | 0x200; cVar1 = my_hash_insert(charset_name_hash,param_1); if (cVar1 != '\0') { lVar2 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); *(int8 *)(param_1 + 4) = *(int8 *)(lVar2 + 0x10); *(int8 *)(param_1 + 6) = *(int8 *)(lVar2 + 0x18); } return; }
51,708
uf_zerofill_skip_zero
eloqsql/storage/myisam/mi_packrec.c
static void uf_zerofill_skip_zero(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((char*) to,(uint) (end-to)); else { end-=rec->space_length_bits; decode_bytes(rec,bit_buff,to,end); bzero((char*) end,rec->space_length_bits); } }
O3
c
uf_zerofill_skip_zero: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x3bd41 movl (%r12), %ecx decl %eax movl %eax, 0x4(%r12) btl %eax, %ecx jae 0x3bd59 subl %r14d, %ebx movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx jmp 0x3bd7a movq %r12, %rdi callq 0x3b5a9 movl $0x1f, 0x4(%r12) cmpl $0x0, (%r12) js 0x3bd34 movl 0x1c(%r15), %eax subq %rax, %rbx movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x3be9a movl 0x1c(%r15), %edx movq %rbx, %rdi xorl %esi, %esi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x281d0
uf_zerofill_skip_zero: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rdx mov r12, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_3BD41 mov ecx, [r12] dec eax mov [r12+4], eax bt ecx, eax jnb short loc_3BD59 loc_3BD34: sub ebx, r14d mov rdi, r14 xor esi, esi mov rdx, rbx jmp short loc_3BD7A loc_3BD41: mov rdi, r12 call fill_buffer mov dword ptr [r12+4], 1Fh cmp dword ptr [r12], 0 js short loc_3BD34 loc_3BD59: mov eax, [r15+1Ch] sub rbx, rax mov rdi, r15 mov rsi, r12 mov rdx, r14 mov rcx, rbx call decode_bytes mov edx, [r15+1Ch] mov rdi, rbx xor esi, esi loc_3BD7A: pop rbx pop r12 pop r14 pop r15 pop rbp jmp _memset
long long uf_zerofill_skip_zero(long long a1, int *a2, long long a3, long long a4) { int v6; // eax int v7; // ecx unsigned int v8; // eax long long v10; // rbx v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest(&v7, v8) ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } else { fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } v10 = a4 - *(unsigned int *)(a1 + 28); decode_bytes(a1, a2, a3, v10); return memset(v10, 0LL, *(unsigned int *)(a1 + 28)); }
uf_zerofill_skip_zero: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x0013bd41 MOV ECX,dword ptr [R12] DEC EAX MOV dword ptr [R12 + 0x4],EAX BT ECX,EAX JNC 0x0013bd59 LAB_0013bd34: SUB EBX,R14D MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX JMP 0x0013bd7a LAB_0013bd41: MOV RDI,R12 CALL 0x0013b5a9 MOV dword ptr [R12 + 0x4],0x1f CMP dword ptr [R12],0x0 JS 0x0013bd34 LAB_0013bd59: MOV EAX,dword ptr [R15 + 0x1c] SUB RBX,RAX MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV RCX,RBX CALL 0x0013be9a MOV EDX,dword ptr [R15 + 0x1c] MOV RDI,RBX XOR ESI,ESI LAB_0013bd7a: POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001281d0
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; void *__s; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; if (-1 < (int)*param_2) goto LAB_0013bd59; } else { uVar1 = param_2[1] - 1; param_2[1] = uVar1; if ((*param_2 >> (uVar1 & 0x1f) & 1) == 0) { LAB_0013bd59: __s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x1c)); decode_bytes(param_1,param_2,param_3,__s); uVar1 = *(uint *)(param_1 + 0x1c); goto LAB_0013bd7a; } } uVar1 = (int)param_4 - (int)param_3; __s = param_3; LAB_0013bd7a: memset(__s,0,(ulong)uVar1); return; }
51,709
translog_set_only_in_buffers
eloqsql/storage/maria/ma_loghandler.c
static void translog_set_only_in_buffers(TRANSLOG_ADDRESS in_buffers) { DBUG_ENTER("translog_set_only_in_buffers"); mysql_mutex_lock(&log_descriptor.sent_to_disk_lock); DBUG_PRINT("enter", ("in_buffers: " LSN_FMT " " "in_buffers_only: " LSN_FMT, LSN_IN_PARTS(in_buffers), LSN_IN_PARTS(log_descriptor.in_buffers_only))); /* LSN_IMPOSSIBLE == 0 => it will work for very first time */ if (cmp_translog_addr(in_buffers, log_descriptor.in_buffers_only) > 0) { if (translog_status != TRANSLOG_OK) goto end; log_descriptor.in_buffers_only= in_buffers; DBUG_PRINT("info", ("set new in_buffers_only")); } end: mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock); DBUG_VOID_RETURN; }
O0
c
translog_set_only_in_buffers: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) leaq 0x43e06d(%rip), %rdi # 0x478c70 addq $0x800cc0, %rdi # imm = 0x800CC0 leaq 0x116a9c(%rip), %rsi # 0x1516ad movl $0x911, %edx # imm = 0x911 callq 0x2db60 jmp 0x3ac1d movq -0x8(%rbp), %rax subq 0xc3ed00(%rip), %rax # 0xc79928 cmpq $0x0, %rax jle 0x3ac48 cmpl $0x1, 0x43ce2b(%rip) # 0x477a60 je 0x3ac39 jmp 0x3ac4a movq -0x8(%rbp), %rax movq %rax, 0xc3ece4(%rip) # 0xc79928 jmp 0x3ac46 jmp 0x3ac48 jmp 0x3ac4a leaq 0x43e01f(%rip), %rdi # 0x478c70 addq $0x800cc0, %rdi # imm = 0x800CC0 callq 0x2dbd0 jmp 0x3ac5f addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_set_only_in_buffers: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi lea rdi, log_descriptor add rdi, 800CC0h lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 911h call inline_mysql_mutex_lock jmp short $+2 loc_3AC1D: mov rax, [rbp+var_8] sub rax, cs:qword_C79928 cmp rax, 0 jle short loc_3AC48 cmp cs:translog_status, 1 jz short loc_3AC39 jmp short loc_3AC4A loc_3AC39: mov rax, [rbp+var_8] mov cs:qword_C79928, rax jmp short $+2 loc_3AC46: jmp short $+2 loc_3AC48: jmp short $+2 loc_3AC4A: lea rdi, log_descriptor add rdi, 800CC0h call inline_mysql_mutex_unlock jmp short $+2 loc_3AC5F: add rsp, 10h pop rbp retn
long long translog_set_only_in_buffers(long long a1) { inline_mysql_mutex_lock( (long long)&log_descriptor[1048984], (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x911u); if ( a1 - qword_C79928 > 0 && translog_status == 1 ) qword_C79928 = a1; return inline_mysql_mutex_unlock((long long)&log_descriptor[1048984]); }
translog_set_only_in_buffers: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI LEA RDI,[0x578c70] ADD RDI,0x800cc0 LEA RSI,[0x2516ad] MOV EDX,0x911 CALL 0x0012db60 JMP 0x0013ac1d LAB_0013ac1d: MOV RAX,qword ptr [RBP + -0x8] SUB RAX,qword ptr [0x00d79928] CMP RAX,0x0 JLE 0x0013ac48 CMP dword ptr [0x00577a60],0x1 JZ 0x0013ac39 JMP 0x0013ac4a LAB_0013ac39: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [0x00d79928],RAX JMP 0x0013ac46 LAB_0013ac46: JMP 0x0013ac48 LAB_0013ac48: JMP 0x0013ac4a LAB_0013ac4a: LEA RDI,[0x578c70] ADD RDI,0x800cc0 CALL 0x0012dbd0 JMP 0x0013ac5f LAB_0013ac5f: ADD RSP,0x10 POP RBP RET
void translog_set_only_in_buffers(long param_1) { long lVar1; inline_mysql_mutex_lock (&DAT_00d79930,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x911); lVar1 = DAT_00d79928; if ((param_1 - DAT_00d79928 < 1) || (lVar1 = param_1, translog_status == 1)) { DAT_00d79928 = lVar1; } inline_mysql_mutex_unlock(&DAT_00d79930); return; }
51,710
translog_set_only_in_buffers
eloqsql/storage/maria/ma_loghandler.c
static void translog_set_only_in_buffers(TRANSLOG_ADDRESS in_buffers) { DBUG_ENTER("translog_set_only_in_buffers"); mysql_mutex_lock(&log_descriptor.sent_to_disk_lock); DBUG_PRINT("enter", ("in_buffers: " LSN_FMT " " "in_buffers_only: " LSN_FMT, LSN_IN_PARTS(in_buffers), LSN_IN_PARTS(log_descriptor.in_buffers_only))); /* LSN_IMPOSSIBLE == 0 => it will work for very first time */ if (cmp_translog_addr(in_buffers, log_descriptor.in_buffers_only) > 0) { if (translog_status != TRANSLOG_OK) goto end; log_descriptor.in_buffers_only= in_buffers; DBUG_PRINT("info", ("set new in_buffers_only")); } end: mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock); DBUG_VOID_RETURN; }
O3
c
translog_set_only_in_buffers: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpq $0x0, 0xbc5432(%rip) # 0xbfebf0 jne 0x39803 leaq 0xbc53e9(%rip), %rdi # 0xbfebb0 callq 0x29200 cmpq %rbx, 0xbc53d5(%rip) # 0xbfeba8 jge 0x397e5 cmpl $0x1, 0x3c3504(%rip) # 0x3fcce0 jne 0x397e5 movq %rbx, 0xbc53c3(%rip) # 0xbfeba8 movq 0xbc5404(%rip), %rdi # 0xbfebf0 testq %rdi, %rdi jne 0x3980a leaq 0xbc53b8(%rip), %rdi # 0xbfebb0 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x291c0 callq 0x2c2bd jmp 0x397cc leaq 0x34c7ff(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x397f1
translog_set_only_in_buffers: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi cmp cs:qword_BFEBF0, 0 jnz short loc_39803 lea rdi, unk_BFEBB0 call _pthread_mutex_lock loc_397CC: cmp cs:qword_BFEBA8, rbx jge short loc_397E5 cmp cs:translog_status, 1 jnz short loc_397E5 mov cs:qword_BFEBA8, rbx loc_397E5: mov rdi, cs:qword_BFEBF0 test rdi, rdi jnz short loc_3980A loc_397F1: lea rdi, unk_BFEBB0 add rsp, 8 pop rbx pop rbp jmp _pthread_mutex_unlock loc_39803: call translog_set_only_in_buffers_cold_1 jmp short loc_397CC loc_3980A: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_397F1
long long translog_set_only_in_buffers(long long a1) { if ( qword_BFEBF0 ) translog_set_only_in_buffers_cold_1(a1); else pthread_mutex_lock(&unk_BFEBB0); if ( qword_BFEBA8 < a1 && translog_status == 1 ) qword_BFEBA8 = a1; if ( qword_BFEBF0 ) ((void ( *)(long long))PSI_server[44])(qword_BFEBF0); return pthread_mutex_unlock(&unk_BFEBB0); }
translog_set_only_in_buffers: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CMP qword ptr [0x00cfebf0],0x0 JNZ 0x00139803 LEA RDI,[0xcfebb0] CALL 0x00129200 LAB_001397cc: CMP qword ptr [0x00cfeba8],RBX JGE 0x001397e5 CMP dword ptr [0x004fcce0],0x1 JNZ 0x001397e5 MOV qword ptr [0x00cfeba8],RBX LAB_001397e5: MOV RDI,qword ptr [0x00cfebf0] TEST RDI,RDI JNZ 0x0013980a LAB_001397f1: LEA RDI,[0xcfebb0] ADD RSP,0x8 POP RBX POP RBP JMP 0x001291c0 LAB_00139803: CALL 0x0012c2bd JMP 0x001397cc LAB_0013980a: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001397f1
void translog_set_only_in_buffers(long param_1) { if (DAT_00cfebf0 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00cfebb0); } else { translog_set_only_in_buffers_cold_1(); } if ((DAT_00cfeba8 < param_1) && (translog_status == 1)) { DAT_00cfeba8 = param_1; } if (DAT_00cfebf0 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cfebb0); return; }
51,711
escape_quotes_for_mysql
eloqsql/mysys/charset.c
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); #ifdef USE_MB my_bool use_mb_flag= my_ci_use_mb(charset_info); #endif *overflow= FALSE; for (end= from + length; from < end; from++) { #ifdef USE_MB int tmp_length; if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end))) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* We don't have the same issue here with a non-multi-byte character being turned into a multi-byte character by the addition of an escaping character, because we are only escaping the ' character with itself. */ #endif if (*from == '\'') { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\''; *to++= '\''; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O0
c
escape_quotes_for_mysql: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x18(%rbp) je 0x30315 movq -0x18(%rbp), %rax subq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x30320 movq -0x28(%rbp), %rax shlq %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movq -0x60(%rbp), %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi callq 0x30490 movb %al, -0x49(%rbp) movq -0x30(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x30469 movsbl -0x49(%rbp), %eax cmpl $0x0, %eax je 0x303df movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x304c0 movl %eax, -0x50(%rbp) cmpl $0x0, %eax je 0x303df movq -0x10(%rbp), %rax movslq -0x50(%rbp), %rcx addq %rcx, %rax cmpq -0x48(%rbp), %rax jbe 0x3039b movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x30469 jmp 0x3039d movl -0x50(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x50(%rbp) cmpl $0x0, %eax je 0x303d1 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x3039d movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0x30458 movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x27, %eax jne 0x30428 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x48(%rbp), %rax jbe 0x30402 movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x30469 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x27, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x27, (%rax) jmp 0x30456 movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x48(%rbp), %rax jbe 0x3043f movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x30469 movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x30458 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x3034e movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
escape_quotes_for_mysql: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_58], rax cmp [rbp+var_18], 0 jz short loc_30315 mov rax, [rbp+var_18] sub rax, 1 mov [rbp+var_60], rax jmp short loc_30320 loc_30315: mov rax, [rbp+var_28] shl rax, 1 mov [rbp+var_60], rax loc_30320: mov rax, [rbp+var_58] mov rcx, [rbp+var_60] add rax, rcx mov [rbp+var_48], rax mov rdi, [rbp+var_8] call my_ci_use_mb mov [rbp+var_49], al mov rax, [rbp+var_30] mov byte ptr [rax], 0 mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_40], rax loc_3034E: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] jnb loc_30469 movsx eax, [rbp+var_49] cmp eax, 0 jz short loc_303DF mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] call my_ismbchar mov [rbp+var_50], eax cmp eax, 0 jz short loc_303DF mov rax, [rbp+var_10] movsxd rcx, [rbp+var_50] add rax, rcx cmp rax, [rbp+var_48] jbe short loc_3039B mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp loc_30469 loc_3039B: jmp short $+2 loc_3039D: mov eax, [rbp+var_50] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_50], ecx cmp eax, 0 jz short loc_303D1 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_3039D loc_303D1: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short loc_30458 loc_303DF: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 27h ; ''' jnz short loc_30428 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_48] jbe short loc_30402 mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_30469 loc_30402: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 27h ; ''' mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 27h ; ''' jmp short loc_30456 loc_30428: mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_48] jbe short loc_3043F mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_30469 loc_3043F: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl loc_30456: jmp short $+2 loc_30458: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp loc_3034E loc_30469: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6) { char *v7; // rax char v8; // cl char *v9; // rax _BYTE *v10; // rax char *v11; // rax long long v13; // [rsp+0h] [rbp-60h] int v14; // [rsp+10h] [rbp-50h] char v15; // [rsp+17h] [rbp-49h] unsigned long long v16; // [rsp+18h] [rbp-48h] char *v17; // [rsp+20h] [rbp-40h] char *v21; // [rsp+50h] [rbp-10h] v21 = a2; if ( a3 ) v13 = a3 - 1; else v13 = 2 * a5; v16 = (unsigned long long)&a2[v13]; v15 = my_ci_use_mb(a1); *a6 = 0; v17 = &a4[a5]; while ( a4 < v17 ) { if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 ) { if ( (unsigned long long)&v21[v14] > v16 ) { *a6 = 1; break; } while ( v14-- ) { v7 = a4++; v8 = *v7; v9 = v21++; *v9 = v8; } --a4; } else if ( *a4 == 39 ) { if ( (unsigned long long)(v21 + 2) > v16 ) { *a6 = 1; break; } *v21 = 39; v10 = v21 + 1; v21 += 2; *v10 = 39; } else { if ( (unsigned long long)(v21 + 1) > v16 ) { *a6 = 1; break; } v11 = v21++; *v11 = *a4; } ++a4; } *v21 = 0; return (_BYTE *)(v21 - a2); }
escape_quotes_for_mysql: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00130315 MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x00130320 LAB_00130315: MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x1 MOV qword ptr [RBP + -0x60],RAX LAB_00130320: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00130490 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_0013034e: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00130469 MOVSX EAX,byte ptr [RBP + -0x49] CMP EAX,0x0 JZ 0x001303df MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CALL 0x001304c0 MOV dword ptr [RBP + -0x50],EAX CMP EAX,0x0 JZ 0x001303df MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x50] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x48] JBE 0x0013039b MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x00130469 LAB_0013039b: JMP 0x0013039d LAB_0013039d: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x50],ECX CMP EAX,0x0 JZ 0x001303d1 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0013039d LAB_001303d1: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00130458 LAB_001303df: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x27 JNZ 0x00130428 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x48] JBE 0x00130402 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x00130469 LAB_00130402: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x27 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x27 JMP 0x00130456 LAB_00130428: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x48] JBE 0x0013043f MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x00130469 LAB_0013043f: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL LAB_00130456: JMP 0x00130458 LAB_00130458: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0013034e LAB_00130469: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long escape_quotes_for_mysql (int8 param_1,char *param_2,long param_3,char *param_4,long param_5, int1 *param_6) { char cVar1; char *pcVar2; long local_68; int local_58; char *local_28; char *local_18; if (param_3 == 0) { local_68 = param_5 << 1; } else { local_68 = param_3 + -1; } pcVar2 = param_2 + local_68; cVar1 = my_ci_use_mb(param_1); *param_6 = 0; local_28 = param_4; local_18 = param_2; do { if (param_4 + param_5 <= local_28) { LAB_00130469: *local_18 = '\0'; return (long)local_18 - (long)param_2; } if ((cVar1 == '\0') || (local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) { if (*local_28 == '\'') { if (pcVar2 < local_18 + 2) { *param_6 = 1; goto LAB_00130469; } *local_18 = '\''; local_18[1] = '\''; local_18 = local_18 + 2; } else { if (pcVar2 < local_18 + 1) { *param_6 = 1; goto LAB_00130469; } *local_18 = *local_28; local_18 = local_18 + 1; } } else { if (pcVar2 < local_18 + local_58) { *param_6 = 1; goto LAB_00130469; } while (local_58 != 0) { *local_18 = *local_28; local_58 = local_58 + -1; local_28 = local_28 + 1; local_18 = local_18 + 1; } local_28 = local_28 + -1; } local_28 = local_28 + 1; } while( true ); }
51,712
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_create_directory_with_parents(const std::string & path) { #ifdef _WIN32 std::wstring_convert<std::codecvt_utf8<wchar_t>> converter; std::wstring wpath = converter.from_bytes(path); // if the path already exists, check whether it's a directory const DWORD attributes = GetFileAttributesW(wpath.c_str()); if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) { return true; } size_t pos_slash = 0; // process path from front to back, procedurally creating directories while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) { const std::wstring subpath = wpath.substr(0, pos_slash); const wchar_t * test = subpath.c_str(); const bool success = CreateDirectoryW(test, NULL); if (!success) { const DWORD error = GetLastError(); // if the path already exists, ensure that it's a directory if (error == ERROR_ALREADY_EXISTS) { const DWORD attributes = GetFileAttributesW(subpath.c_str()); if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) { return false; } } else { return false; } } pos_slash += 1; } return true; #else // if the path already exists, check whether it's a directory struct stat info; if (stat(path.c_str(), &info) == 0) { return S_ISDIR(info.st_mode); } size_t pos_slash = 1; // skip leading slashes for directory creation // process path from front to back, procedurally creating directories while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) { const std::string subpath = path.substr(0, pos_slash); struct stat info; // if the path already exists, ensure that it's a directory if (stat(subpath.c_str(), &info) == 0) { if (!S_ISDIR(info.st_mode)) { return false; } } else { // create parent directories const int ret = mkdir(subpath.c_str(), 0755); if (ret != 0) { return false; } } pos_slash += 1; } return true; #endif // _WIN32 }
O2
cpp
fs_create_directory_with_parents(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 $0x148, %rsp # imm = 0x148 movq %rdi, %rbx movq (%rdi), %rdi leaq 0xb8(%rsp), %rsi callq 0x24930 testl %eax, %eax je 0x57765 pushq $0x1 popq %r14 leaq 0x8(%rsp), %r15 leaq 0x28(%rsp), %r12 movq %rbx, %rdi pushq $0x2f popq %rsi movq %r14, %rdx callq 0x24d40 cmpq $-0x1, %rax sete %r13b je 0x5777a movq %rax, %r14 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x24ab0 movq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x24930 testl %eax, %eax je 0x5773e movq 0x8(%rsp), %rdi movl $0x1ed, %esi # imm = 0x1ED callq 0x244d0 testl %eax, %eax je 0x57750 xorl %ebp, %ebp jmp 0x57756 movl 0x40(%rsp), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax cmpl $0x4000, %eax # imm = 0x4000 jne 0x5773a incq %r14 movb $0x1, %bpl movq %r15, %rdi callq 0x25478 testb %bpl, %bpl jne 0x576eb jmp 0x5777a movl $0xf000, %eax # imm = 0xF000 andl 0xd0(%rsp), %eax cmpl $0x4000, %eax # imm = 0x4000 sete %r13b movl %r13d, %eax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov rbx, rdi mov rdi, [rdi] lea rsi, [rsp+178h+var_C0] call _stat test eax, eax jz loc_57765 push 1 pop r14 lea r15, [rsp+178h+var_170] lea r12, [rsp+178h+var_150] loc_576EB: mov rdi, rbx push 2Fh ; '/' pop rsi mov rdx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh setz r13b jz short loc_5777A mov r14, rax mov rdi, r15 mov rsi, rbx xor edx, edx mov rcx, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+178h+var_170] mov rsi, r12 call _stat test eax, eax jz short loc_5773E mov rdi, [rsp+178h+var_170] mov esi, 1EDh call _mkdir test eax, eax jz short loc_57750 loc_5773A: xor ebp, ebp jmp short loc_57756 loc_5773E: mov eax, [rsp+178h+var_138] mov ecx, 0F000h and eax, ecx cmp eax, 4000h jnz short loc_5773A loc_57750: inc r14 mov bpl, 1 loc_57756: mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_576EB jmp short loc_5777A loc_57765: mov eax, 0F000h and eax, [rsp+178h+var_A8] cmp eax, 4000h setz r13b loc_5777A: mov eax, r13d add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long fs_create_directory_with_parents(_QWORD *a1) { unsigned int v1; // r13d long long v2; // r14 long long v3; // rax char v4; // bp _QWORD v6[4]; // [rsp+8h] [rbp-170h] BYREF _BYTE v7[24]; // [rsp+28h] [rbp-150h] BYREF int v8; // [rsp+40h] [rbp-138h] _BYTE v9[24]; // [rsp+B8h] [rbp-C0h] BYREF int v10; // [rsp+D0h] [rbp-A8h] if ( (unsigned int)stat(*a1, v9) ) { v2 = 1LL; while ( 1 ) { v3 = std::string::find(a1, 47LL, v2); LOBYTE(v1) = v3 == -1; if ( v3 == -1 ) return v1; v2 = v3; std::string::substr(v6, a1, 0LL, v3); if ( (unsigned int)stat(v6[0], v7) ) { if ( !(unsigned int)mkdir(v6[0], 493LL) ) goto LABEL_8; } else if ( (v8 & 0xF000) == 0x4000 ) { LABEL_8: ++v2; v4 = 1; goto LABEL_9; } v4 = 0; LABEL_9: std::string::~string(v6); if ( !v4 ) return v1; } } LOBYTE(v1) = (v10 & 0xF000) == 0x4000; return v1; }
fs_create_directory_with_parents: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV RBX,RDI MOV RDI,qword ptr [RDI] LEA RSI,[RSP + 0xb8] CALL 0x00124930 TEST EAX,EAX JZ 0x00157765 PUSH 0x1 POP R14 LEA R15,[RSP + 0x8] LEA R12,[RSP + 0x28] LAB_001576eb: MOV RDI,RBX PUSH 0x2f POP RSI MOV RDX,R14 CALL 0x00124d40 CMP RAX,-0x1 SETZ R13B JZ 0x0015777a MOV R14,RAX MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX MOV RCX,RAX CALL 0x00124ab0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R12 CALL 0x00124930 TEST EAX,EAX JZ 0x0015773e MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1ed CALL 0x001244d0 TEST EAX,EAX JZ 0x00157750 LAB_0015773a: XOR EBP,EBP JMP 0x00157756 LAB_0015773e: MOV EAX,dword ptr [RSP + 0x40] MOV ECX,0xf000 AND EAX,ECX CMP EAX,0x4000 JNZ 0x0015773a LAB_00157750: INC R14 MOV BPL,0x1 LAB_00157756: MOV RDI,R15 CALL 0x00125478 TEST BPL,BPL JNZ 0x001576eb JMP 0x0015777a LAB_00157765: MOV EAX,0xf000 AND EAX,dword ptr [RSP + 0xd0] CMP EAX,0x4000 SETZ R13B LAB_0015777a: MOV EAX,R13D ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* fs_create_directory_with_parents(std::__cxx11::string const&) */ ulong fs_create_directory_with_parents(string *param_1) { bool bVar1; int iVar2; long lVar3; ulong unaff_R13; char *local_170 [4]; stat local_150; stat local_c0; iVar2 = stat(*(char **)param_1,&local_c0); if (iVar2 == 0) { unaff_R13 = CONCAT71((int7)(unaff_R13 >> 8),(local_c0.st_mode & 0xf000) == 0x4000); } else { do { lVar3 = std::__cxx11::string::find((char)param_1,0x2f); unaff_R13 = CONCAT71((int7)(unaff_R13 >> 8),lVar3 == -1); if (lVar3 == -1) break; std::__cxx11::string::substr((ulong)local_170,(ulong)param_1); iVar2 = stat(local_170[0],&local_150); if (iVar2 == 0) { if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_0015773a; LAB_00157750: bVar1 = true; } else { iVar2 = mkdir(local_170[0],0x1ed); if (iVar2 == 0) goto LAB_00157750; LAB_0015773a: bVar1 = false; } std::__cxx11::string::~string((string *)local_170); } while (bVar1); } return unaff_R13 & 0xffffffff; }
51,713
nglog::tools::ShutdownLoggingUtilities()
ng-log[P]ng-log/src/utilities.cc
bool IsLoggingInitialized() { return g_program_invocation_short_name != nullptr; }
O2
cpp
nglog::tools::ShutdownLoggingUtilities(): pushq %rbx subq $0x60, %rsp cmpq $0x0, 0x230a7(%rip) # 0x41b80 je 0x1eaed andq $0x0, 0x2309d(%rip) # 0x41b80 addq $0x60, %rsp popq %rbx jmp 0x8580 leaq 0x366c(%rip), %rsi # 0x22160 movq %rsp, %rbx movq %rbx, %rdi movl $0x134, %edx # imm = 0x134 callq 0xe432 movq %rbx, %rdi callq 0xbd6a leaq 0x36e3(%rip), %rsi # 0x221f6 movq %rax, %rdi callq 0x8590 leaq 0x36fa(%rip), %rsi # 0x2221c movq %rax, %rdi callq 0x8590 movq %rsp, %rdi callq 0xe440 movq %rsp, %rdi callq 0xe440 movq %rax, %rdi callq 0xa25d
_ZN5nglog5tools24ShutdownLoggingUtilitiesEv: push rbx sub rsp, 60h cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name jz short loc_1EAED and cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name add rsp, 60h pop rbx jmp _closelog loc_1EAED: lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... mov rbx, rsp mov rdi, rbx; this mov edx, 134h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedIsl_0; "Check failed: IsLoggingInitialized() " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aYouCalledShutd; "You called ShutdownLogging() without ca"... mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rsp; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() mov rdi, rsp; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() mov rdi, rax call __clang_call_terminate
long long nglog::tools::ShutdownLoggingUtilities(nglog::tools *this) { long long v2; // rax long long v3; // rax _BYTE v4[104]; // [rsp+0h] [rbp-68h] BYREF if ( !nglog::g_program_invocation_short_name ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v4, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc", 308); v2 = nglog::LogMessage::stream((nglog::LogMessage *)v4); v3 = std::operator<<<std::char_traits<char>>(v2, "Check failed: IsLoggingInitialized() "); std::operator<<<std::char_traits<char>>( v3, "You called ShutdownLogging() without calling InitializeLogging() first!"); nglog::LogMessageFatal::~LogMessageFatal( (nglog::LogMessageFatal *)v4, (nglog::internal::LogMessageData *)"You called ShutdownLogging() without calling InitializeLogging() first!"); } nglog::g_program_invocation_short_name = 0LL; return closelog(this); }
ShutdownLoggingUtilities: PUSH RBX SUB RSP,0x60 CMP qword ptr [0x00141b80],0x0 JZ 0x0011eaed AND qword ptr [0x00141b80],0x0 ADD RSP,0x60 POP RBX JMP 0x00108580 LAB_0011eaed: LEA RSI,[0x122160] MOV RBX,RSP MOV RDI,RBX MOV EDX,0x134 CALL 0x0010e432 LAB_0011eb04: MOV RDI,RBX CALL 0x0010bd6a LEA RSI,[0x1221f6] MOV RDI,RAX CALL 0x00108590 LEA RSI,[0x12221c] MOV RDI,RAX CALL 0x00108590 LAB_0011eb2a: MOV RDI,RSP CALL 0x0010e440 LAB_0011eb32: MOV RDI,RSP CALL 0x0010e440 LAB_0011eb3a: MOV RDI,RAX CALL 0x0010a25d
/* nglog::tools::ShutdownLoggingUtilities() */ void nglog::tools::ShutdownLoggingUtilities(void) { ostream *poVar1; int8 uVar2; LogMessageFatal aLStack_68 [96]; if (g_program_invocation_short_name != 0) { g_program_invocation_short_name = 0; closelog(); return; } LogMessageFatal::LogMessageFatal (aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc", 0x134); /* try { // try from 0011eb04 to 0011eb29 has its CatchHandler @ 0011eb32 */ poVar1 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68); poVar1 = std::operator<<(poVar1,"Check failed: IsLoggingInitialized() "); std::operator<<(poVar1,"You called ShutdownLogging() without calling InitializeLogging() first!"); LogMessageFatal::~LogMessageFatal(aLStack_68); /* catch(type#1 @ 00000000) { ... } // from try @ 0011eb04 with catch @ 0011eb32 try { // try from 0011eb32 to 0011eb39 has its CatchHandler @ 0011eb3a */ uVar2 = LogMessageFatal::~LogMessageFatal(aLStack_68); /* catch(type#1 @ 00000000) { ... } // from try @ 0011eb32 with catch @ 0011eb3a */ /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar2); }
51,714
nglog::tools::ShutdownLoggingUtilities()
ng-log[P]ng-log/src/utilities.cc
bool IsLoggingInitialized() { return g_program_invocation_short_name != nullptr; }
O3
cpp
nglog::tools::ShutdownLoggingUtilities(): pushq %rbx subq $0x60, %rsp cmpq $0x0, 0x1fb6d(%rip) # 0x41b10 jne 0x21fd5 movq %rdi, %rbx movl $0x2f, %esi callq 0x75b0 leaq 0x1(%rax), %rcx testq %rax, %rax cmoveq %rbx, %rcx movq %rcx, 0x1fb4c(%rip) # 0x41b10 leaq 0x6c(%rip), %rdi # 0x22037 addq $0x60, %rsp popq %rbx jmp 0xbef5 leaq 0x3148(%rip), %rsi # 0x25124 movq %rsp, %rbx movq %rbx, %rdi movl $0x12b, %edx # imm = 0x12B callq 0xedda movq %rbx, %rdi callq 0xb552 movq %rax, %rbx leaq 0x316f(%rip), %rsi # 0x2516d movl $0x26, %edx movq %rax, %rdi callq 0x7600 leaq 0x3182(%rip), %rsi # 0x25194 movl $0x25, %edx movq %rbx, %rdi callq 0x7600 movq %rsp, %rdi callq 0xee1e movq %rsp, %rdi callq 0xee1e movq %rax, %rdi callq 0x9717
_ZN5nglog5tools26InitializeLoggingUtilitiesEPKc: push rbx sub rsp, 60h cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name jnz short loc_21FD5 mov rbx, rdi mov esi, (offset qword_28+7); void (*)(void) call _strrchr lea rcx, [rax+1] test rax, rax cmovz rcx, rbx mov cs:_ZN5nglogL31g_program_invocation_short_nameE, rcx; nglog::g_program_invocation_short_name lea rdi, _ZN5nglogL21DumpStackTraceAndExitEv; this add rsp, 60h pop rbx jmp _ZN5nglog22InstallFailureFunctionEPFvvE; nglog::InstallFailureFunction(void (*)(void)) loc_21FD5: lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... mov rbx, rsp mov rdi, rbx; this mov edx, 12Bh; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov rbx, rax lea rsi, aCheckFailedIsl; "Check failed: !IsLoggingInitialized() " mov edx, 26h ; '&' mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aYouCalledIniti; "You called InitializeLogging() twice!" mov edx, 25h ; '%' mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, rsp; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() mov rdi, rsp; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() mov rdi, rax call __clang_call_terminate
long long ( * nglog::tools::InitializeLoggingUtilities(nglog::tools *this, const char *a2))(_QWORD) { long long v2; // rax nglog::tools *v3; // rcx long long v5; // rbx _BYTE v6[104]; // [rsp+0h] [rbp-68h] BYREF if ( nglog::g_program_invocation_short_name ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v6, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc", 299); v5 = nglog::LogMessage::stream((nglog::LogMessage *)v6); std::__ostream_insert<char,std::char_traits<char>>(v5, "Check failed: !IsLoggingInitialized() ", 38LL); std::__ostream_insert<char,std::char_traits<char>>(v5, "You called InitializeLogging() twice!", 37LL); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v6); } v2 = strrchr(this, (char *)&qword_28 + 7); v3 = (nglog::tools *)(v2 + 1); if ( !v2 ) v3 = this; nglog::g_program_invocation_short_name = (long long)v3; return nglog::InstallFailureFunction((nglog *)nglog::DumpStackTraceAndExit, (void (*)(void))((char *)&qword_28 + 7)); }
InitializeLoggingUtilities: PUSH RBX SUB RSP,0x60 CMP qword ptr [0x00141b10],0x0 JNZ 0x00121fd5 MOV RBX,RDI MOV ESI,0x2f CALL 0x001075b0 LEA RCX,[RAX + 0x1] TEST RAX,RAX CMOVZ RCX,RBX MOV qword ptr [0x00141b10],RCX LEA RDI,[0x122037] ADD RSP,0x60 POP RBX JMP 0x0010bef5 LAB_00121fd5: LEA RSI,[0x125124] MOV RBX,RSP MOV RDI,RBX MOV EDX,0x12b CALL 0x0010edda LAB_00121fec: MOV RDI,RBX CALL 0x0010b552 MOV RBX,RAX LEA RSI,[0x12516d] MOV EDX,0x26 MOV RDI,RAX CALL 0x00107600 LEA RSI,[0x125194] MOV EDX,0x25 MOV RDI,RBX CALL 0x00107600 LAB_0012201f: MOV RDI,RSP CALL 0x0010ee1e LAB_00122027: MOV RDI,RSP CALL 0x0010ee1e LAB_0012202f: MOV RDI,RAX CALL 0x00109717
/* nglog::tools::InitializeLoggingUtilities(char const*) */ void nglog::tools::InitializeLoggingUtilities(char *param_1) { char *pcVar1; ostream *poVar2; int8 uVar3; LogMessageFatal aLStack_68 [96]; if (g_program_invocation_short_name == (char *)0x0) { pcVar1 = strrchr(param_1,0x2f); g_program_invocation_short_name = pcVar1 + 1; if (pcVar1 == (char *)0x0) { g_program_invocation_short_name = param_1; } InstallFailureFunction(DumpStackTraceAndExit); return; } LogMessageFatal::LogMessageFatal (aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc", 299); /* try { // try from 00121fec to 0012201e has its CatchHandler @ 00122027 */ poVar2 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"Check failed: !IsLoggingInitialized() ",0x26); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"You called InitializeLogging() twice!",0x25); LogMessageFatal::~LogMessageFatal(aLStack_68); /* catch(type#1 @ 00000000) { ... } // from try @ 00121fec with catch @ 00122027 try { // try from 00122027 to 0012202e has its CatchHandler @ 0012202f */ uVar3 = LogMessageFatal::~LogMessageFatal(aLStack_68); /* catch(type#1 @ 00000000) { ... } // from try @ 00122027 with catch @ 0012202f */ /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar3); }
51,715
ma_keyseg_read
eloqsql/storage/maria/ma_open.c
uchar *_ma_keyseg_read(uchar *ptr, HA_KEYSEG *keyseg) { keyseg->type = *ptr++; keyseg->language = *ptr++; keyseg->null_bit = *ptr++; keyseg->bit_start = *ptr++; keyseg->language += ((uint16) (*ptr++)) << 8; keyseg->bit_length = *ptr++; keyseg->flag = mi_uint2korr(ptr); ptr+= 2; keyseg->length = mi_uint2korr(ptr); ptr+= 2; keyseg->start = mi_uint4korr(ptr); ptr+= 4; keyseg->null_pos = mi_uint4korr(ptr); ptr+= 4; keyseg->charset=0; /* Will be filled in later */ if (keyseg->null_bit) keyseg->bit_pos= (uint16)(keyseg->null_pos + (keyseg->null_bit == 7)); else { keyseg->bit_pos= (uint16)keyseg->null_pos; keyseg->null_pos= 0; } return ptr; }
O0
c
ma_keyseg_read: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x18(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movzbl (%rax), %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x16(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x19(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x1a(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movzbl (%rax), %eax movzwl %ax, %edx shll $0x8, %edx movq -0x10(%rbp), %rax movzwl 0x16(%rax), %ecx addl %edx, %ecx movw %cx, 0x16(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x1b(%rax) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x12(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x14(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax shll $0x8, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax shll $0x10, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movzbl (%rax), %eax shll $0x18, %eax orl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rbp), %rax addq $0x4, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax shll $0x8, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax shll $0x10, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movzbl (%rax), %eax shll $0x18, %eax orl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rax addq $0x4, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x19(%rax) je 0x64f52 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movq -0x10(%rbp), %rcx movzbl 0x19(%rcx), %ecx cmpl $0x7, %ecx sete %cl andb $0x1, %cl movzbl %cl, %ecx addl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x10(%rax) jmp 0x64f6f movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0xc(%rax) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_keyseg_read: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+18h], cl mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movzx eax, byte ptr [rax] mov cx, ax mov rax, [rbp+var_10] mov [rax+16h], cx mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+19h], cl mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+1Ah], cl mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movzx eax, byte ptr [rax] movzx edx, ax shl edx, 8 mov rax, [rbp+var_10] movzx ecx, word ptr [rax+16h] add ecx, edx mov [rax+16h], cx mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+1Bh], cl mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+12h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+14h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] movzx eax, byte ptr [rax+2] shl eax, 8 or ecx, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] shl eax, 10h or ecx, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax] shl eax, 18h or ecx, eax mov rax, [rbp+var_10] mov [rax+8], ecx mov rax, [rbp+var_8] add rax, 4 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] movzx eax, byte ptr [rax+2] shl eax, 8 or ecx, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] shl eax, 10h or ecx, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax] shl eax, 18h or ecx, eax mov rax, [rbp+var_10] mov [rax+0Ch], ecx mov rax, [rbp+var_8] add rax, 4 mov [rbp+var_8], rax mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov rax, [rbp+var_10] cmp byte ptr [rax+19h], 0 jz short loc_64F52 mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+19h] cmp ecx, 7 setz cl and cl, 1 movzx ecx, cl add eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+10h], cx jmp short loc_64F6F loc_64F52: mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov cx, ax mov rax, [rbp+var_10] mov [rax+10h], cx mov rax, [rbp+var_10] mov dword ptr [rax+0Ch], 0 loc_64F6F: mov rax, [rbp+var_8] pop rbp retn
long long ma_keyseg_read(long long a1, long long a2) { *(_BYTE *)(a2 + 24) = *(_BYTE *)a1; *(_WORD *)(a2 + 22) = *(unsigned __int8 *)(a1 + 1); *(_BYTE *)(a2 + 25) = *(_BYTE *)(a1 + 2); *(_BYTE *)(a2 + 26) = *(_BYTE *)(a1 + 3); *(_WORD *)(a2 + 22) += *(unsigned __int8 *)(a1 + 4) << 8; *(_BYTE *)(a2 + 27) = *(_BYTE *)(a1 + 5); *(_WORD *)(a2 + 18) = _byteswap_ushort(*(_WORD *)(a1 + 6)); *(_WORD *)(a2 + 20) = _byteswap_ushort(*(_WORD *)(a1 + 8)); *(_DWORD *)(a2 + 8) = _byteswap_ulong(*(_DWORD *)(a1 + 10)); *(_DWORD *)(a2 + 12) = _byteswap_ulong(*(_DWORD *)(a1 + 14)); *(_QWORD *)a2 = 0LL; if ( *(_BYTE *)(a2 + 25) ) { *(_WORD *)(a2 + 16) = (*(_BYTE *)(a2 + 25) == 7) + (unsigned __int16)*(_DWORD *)(a2 + 12); } else { *(_WORD *)(a2 + 16) = *(_DWORD *)(a2 + 12); *(_DWORD *)(a2 + 12) = 0; } return a1 + 18; }
_ma_keyseg_read: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x18],CL MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVZX EAX,byte ptr [RAX] MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x16],CX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x19],CL MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1a],CL MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVZX EAX,byte ptr [RAX] MOVZX EDX,AX SHL EDX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX + 0x16] ADD ECX,EDX MOV word ptr [RAX + 0x16],CX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1b],CL MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x12],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x14],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL EAX,0x8 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x10 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] SHL EAX,0x18 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL EAX,0x8 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x10 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] SHL EAX,0x18 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x19],0x0 JZ 0x00164f52 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x19] CMP ECX,0x7 SETZ CL AND CL,0x1 MOVZX ECX,CL ADD EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x10],CX JMP 0x00164f6f LAB_00164f52: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x10],CX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],0x0 LAB_00164f6f: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 * _ma_keyseg_read(int1 *param_1,int8 *param_2) { *(int1 *)(param_2 + 3) = *param_1; *(ushort *)((long)param_2 + 0x16) = (ushort)(byte)param_1[1]; *(int1 *)((long)param_2 + 0x19) = param_1[2]; *(int1 *)((long)param_2 + 0x1a) = param_1[3]; *(ushort *)((long)param_2 + 0x16) = *(short *)((long)param_2 + 0x16) + (ushort)(byte)param_1[4] * 0x100; *(int1 *)((long)param_2 + 0x1b) = param_1[5]; *(ushort *)((long)param_2 + 0x12) = CONCAT11(param_1[6],param_1[7]); *(ushort *)((long)param_2 + 0x14) = CONCAT11(param_1[8],param_1[9]); *(uint *)(param_2 + 1) = CONCAT13(param_1[10],CONCAT12(param_1[0xb],CONCAT11(param_1[0xc],param_1[0xd]))); *(uint *)((long)param_2 + 0xc) = CONCAT13(param_1[0xe],CONCAT12(param_1[0xf],CONCAT11(param_1[0x10],param_1[0x11]))); *param_2 = 0; if (*(char *)((long)param_2 + 0x19) == '\0') { *(short *)(param_2 + 2) = (short)*(int4 *)((long)param_2 + 0xc); *(int4 *)((long)param_2 + 0xc) = 0; } else { *(ushort *)(param_2 + 2) = (short)*(int4 *)((long)param_2 + 0xc) + (ushort)(*(char *)((long)param_2 + 0x19) == '\a'); } return param_1 + 0x12; }
51,716
my_hash_sort_utf16_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_bin(CHARSET_INFO *cs, const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { size_t lengthsp= my_ci_lengthsp(cs, (const char *) pos, len); my_hash_sort_utf16_nopad_bin(cs, pos, lengthsp, nr1, nr2); }
O3
c
my_hash_sort_utf16_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r14 movq %rsi, %r15 movq 0xb8(%rdi), %rax callq *0x18(%rax) movq (%r14), %rcx movq (%rbx), %rdx testq %rax, %rax jle 0xd0ee5 addq %r15, %rax movl %ecx, %esi andl $0x3f, %esi addq %rdx, %rsi movzbl (%r15), %edi imulq %rsi, %rdi movq %rcx, %rsi shlq $0x8, %rsi addq %rdi, %rsi xorq %rsi, %rcx addq $0x3, %rdx incq %r15 cmpq %rax, %r15 jb 0xd0ebc movq %rcx, (%r14) movq %rdx, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_sort_utf16_bin: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, r8 mov r14, rcx mov r15, rsi mov rax, [rdi+0B8h] call qword ptr [rax+18h] mov rcx, [r14] mov rdx, [rbx] test rax, rax jle short loc_D0EE5 add rax, r15 loc_D0EBC: mov esi, ecx and esi, 3Fh add rsi, rdx movzx edi, byte ptr [r15] imul rdi, rsi mov rsi, rcx shl rsi, 8 add rsi, rdi xor rcx, rsi add rdx, 3 inc r15 cmp r15, rax jb short loc_D0EBC loc_D0EE5: mov [r14], rcx mov [rbx], rdx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_sort_utf16_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { unsigned __int8 *v7; // r15 long long result; // rax long long v9; // rcx long long v10; // rdx v7 = a2; result = (*(long long ( **)(long long))(*(_QWORD *)(a1 + 184) + 24LL))(a1); v9 = *a4; v10 = *a5; if ( result > 0 ) { result += (long long)a2; do { v9 ^= (v10 + (v9 & 0x3F)) * *v7 + (v9 << 8); v10 += 3LL; ++v7; } while ( (unsigned long long)v7 < result ); } *a4 = v9; *a5 = v10; return result; }
my_hash_sort_utf16_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RCX MOV R15,RSI MOV RAX,qword ptr [RDI + 0xb8] CALL qword ptr [RAX + 0x18] MOV RCX,qword ptr [R14] MOV RDX,qword ptr [RBX] TEST RAX,RAX JLE 0x001d0ee5 ADD RAX,R15 LAB_001d0ebc: MOV ESI,ECX AND ESI,0x3f ADD RSI,RDX MOVZX EDI,byte ptr [R15] IMUL RDI,RSI MOV RSI,RCX SHL RSI,0x8 ADD RSI,RDI XOR RCX,RSI ADD RDX,0x3 INC R15 CMP R15,RAX JC 0x001d0ebc LAB_001d0ee5: MOV qword ptr [R14],RCX MOV qword ptr [RBX],RDX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_sort_utf16_bin (long param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5) { long lVar1; byte *pbVar2; ulong uVar3; long lVar4; lVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x18))(); uVar3 = *param_4; lVar4 = *param_5; if (0 < lVar1) { pbVar2 = param_2 + lVar1; do { uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4); lVar4 = lVar4 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar3; *param_5 = lVar4; return; }
51,717
translog_log_debug_info
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_log_debug_info(TRN *trn __attribute__((unused)), enum translog_debug_info_type type __attribute__((unused)), uchar *info __attribute__((unused)), size_t length __attribute__((unused))) { #ifdef EXTRA_DEBUG LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; uchar debug_type; LSN lsn; if (!trn) { /* We can't log the current transaction because we don't have an active transaction. Use a temporary transaction object instead */ trn= &dummy_transaction_object; } debug_type= (uchar) type; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= &debug_type; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= 1; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= info; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length; return translog_write_record(&lsn, LOGREC_DEBUG_INFO, trn, NULL, (translog_size_t) (1+ length), sizeof(log_array)/sizeof(log_array[0]), log_array, NULL, NULL); #else return 0; #endif }
O3
c
translog_log_debug_info: pushq %rbp movq %rsp, %rbp xorl %eax, %eax popq %rbp retq
translog_log_debug_info: push rbp mov rbp, rsp xor eax, eax pop rbp retn
long long translog_log_debug_info() { return 0LL; }
translog_log_debug_info: PUSH RBP MOV RBP,RSP XOR EAX,EAX POP RBP RET
int8 translog_log_debug_info(void) { return 0; }
51,718
flux::parser::Parser::enumDeclaration()
kvthweatt[P]FluxLang/src/parser/parser.cpp
std::unique_ptr<Decl> Parser::enumDeclaration() { // Parse the enum name auto name = consume(lexer::TokenType::IDENTIFIER, "Expected enum name"); // Parse the enum body consume(lexer::TokenType::LEFT_BRACE, "Expected '{' after enum name"); std::vector<EnumDecl::Member> members; // Parse enum members until we reach the closing brace while (!check(lexer::TokenType::RIGHT_BRACE) && !check(lexer::TokenType::END_OF_FILE)) { // Parse member name auto memberName = consume(lexer::TokenType::IDENTIFIER, "Expected enum member name"); // Parse member value (optional) std::unique_ptr<Expr> value; if (match(lexer::TokenType::EQUAL)) { value = expression(); if (!value) { error("Expected expression after '='"); } } // Add the member to our list members.emplace_back(memberName.lexeme(), std::move(value)); // Check for comma - it's required between members but optional after the last member if (match(lexer::TokenType::COMMA)) { // After a comma, there might be another member or we might be at the end // If we're at the closing brace, that's fine (trailing comma case) if (check(lexer::TokenType::RIGHT_BRACE)) { break; } } else { // If there's no comma, we must be at the end if (!check(lexer::TokenType::RIGHT_BRACE)) { error("Expected ',' or '}' after enum member"); } break; } } auto endToken = consume(lexer::TokenType::RIGHT_BRACE, "Expected '}' after enum body"); consume(lexer::TokenType::SEMICOLON, "Expected ';' after enum declaration"); return std::make_unique<EnumDecl>( name.lexeme(), std::move(members), makeRange(name, endToken) ); }
O1
cpp
flux::parser::Parser::enumDeclaration(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1d8, %rsp # imm = 0x1D8 movq %rsi, %r14 movq %rdi, %rbx leaq 0x12361(%rip), %r8 # 0x2d665 leaq 0xb8(%rsp), %rdi movl $0x12, %ecx movl $0x5, %edx callq 0x14f3c leaq 0x12356(%rip), %r8 # 0x2d678 leaq 0x178(%rsp), %rdi movl $0x1c, %ecx movq %r14, %rsi movl $0x5f, %edx callq 0x14f3c movq %rbx, 0x38(%rsp) leaq 0x1c8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1b362 movq 0x1c8(%rsp), %rsi incq %rsi callq 0x6280 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %r15 movaps %xmm0, (%r15) movq $0x0, 0x10(%r15) leaq 0x8(%r14), %r12 leaq 0x40(%rsp), %rbx leaq 0x8(%rsp), %r13 movl (%r12), %eax testl %eax, %eax je 0x1b4b0 cmpl $0x60, %eax je 0x1b4b0 movl $0x19, %ecx leaq 0x58(%rsp), %rdi movq %r14, %rsi movl $0x5, %edx leaq 0x122e3(%rip), %r8 # 0x2d695 callq 0x14f3c movq $0x0, 0x8(%rsp) movq %r14, %rdi movl $0x48, %esi callq 0x14e88 testb %al, %al je 0x1b41e movq %rbx, %rdi movq %r14, %rsi callq 0x1cf50 movq 0x40(%rsp), %rax movq $0x0, 0x40(%rsp) movq 0x8(%rsp), %rdi movq %rax, 0x8(%rsp) testq %rdi, %rdi je 0x1b3ff movq (%rdi), %rax callq *0x8(%rax) cmpq $0x0, 0x8(%rsp) jne 0x1b41e movl $0x1d, %edx movq %r14, %rdi movq %r12, %rsi leaq 0x117ee(%rip), %rcx # 0x2cc07 callq 0x14c10 movups 0x60(%rsp), %xmm0 movups %xmm0, 0x40(%rsp) movq %r15, %rdi movq %rbx, %rsi movq %r13, %rdx callq 0x2978c movq %r14, %rdi movl $0x59, %esi callq 0x14e88 movl (%r12), %ecx testb %al, %al je 0x1b454 cmpl $0x60, %ecx setne %bpl jmp 0x1b472 cmpl $0x60, %ecx je 0x1b470 movl $0x25, %edx movq %r14, %rdi movq %r12, %rsi leaq 0x12244(%rip), %rcx # 0x2d6af callq 0x14c10 xorl %ebp, %ebp movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1b482 movq (%rdi), %rax callq *0x8(%rax) movq 0x98(%rsp), %rdi leaq 0xa8(%rsp), %rax cmpq %rax, %rdi je 0x1b4a7 movq 0xa8(%rsp), %rsi incq %rsi callq 0x6280 testb %bpl, %bpl jne 0x1b384 leaq 0x1221e(%rip), %r8 # 0x2d6d5 leaq 0x58(%rsp), %rdi movl $0x1c, %ecx movq %r14, %rsi movl $0x60, %edx callq 0x14f3c leaq 0x1221d(%rip), %r8 # 0x2d6f2 leaq 0x118(%rsp), %rdi movl $0x23, %ecx movq %r14, %rsi movl $0x58, %edx callq 0x14f3c leaq 0x168(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1b510 movq 0x168(%rsp), %rsi incq %rsi callq 0x6280 movq 0xc0(%rsp), %rax movq %rax, 0x30(%rsp) movq 0xc8(%rsp), %r15 movq 0xd0(%rsp), %r12 movq 0xd8(%rsp), %r13 movq 0x80(%rsp), %rbp movq 0x88(%rsp), %r14 movl $0x50, %edi callq 0x6270 movq %rax, %rbx movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx leaq 0x40(%rsp), %rdi movq %rax, (%rdi) movq %rcx, 0x8(%rdi) movq 0x20(%rsp), %rdx movq %rdx, 0x10(%rdi) xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) xorl %esi, %esi movq %rsi, 0x20(%rsp) movq %r12, 0x8(%rbx) movq %r13, 0x10(%rbx) movq %rbp, 0x18(%rbx) movq %r14, 0x20(%rbx) movq 0x30(%rsp), %r8 movq %r8, 0x28(%rbx) movq %r15, 0x30(%rbx) leaq 0x1f3ec(%rip), %r8 # 0x3a990 addq $0x10, %r8 movq %r8, (%rbx) movq %rax, 0x38(%rbx) movq %rcx, 0x40(%rbx) movq %rdx, 0x48(%rbx) movq %rsi, 0x10(%rdi) movaps %xmm0, (%rdi) callq 0x10884 movq 0x38(%rsp), %rax movq %rbx, (%rax) movq %rax, %rbx movq 0x98(%rsp), %rdi leaq 0xa8(%rsp), %rax cmpq %rax, %rdi je 0x1b5f3 movq 0xa8(%rsp), %rsi incq %rsi callq 0x6280 leaq 0x10(%rsp), %rdi callq 0x10884 leaq 0x108(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1b61e movq 0x108(%rsp), %rsi incq %rsi callq 0x6280 movq %rbx, %rax addq $0x1d8, %rsp # imm = 0x1D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1b635 movq %rax, %rbx jmp 0x1b65d jmp 0x1b643 movq %rax, %rbx jmp 0x1b68c jmp 0x1b64a movq %rax, %rbx jmp 0x1b682 jmp 0x1b64a movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1b65d movq (%rdi), %rax callq *0x8(%rax) movq 0x98(%rsp), %rdi leaq 0xa8(%rsp), %rax cmpq %rax, %rdi je 0x1b682 movq 0xa8(%rsp), %rsi incq %rsi callq 0x6280 leaq 0x10(%rsp), %rdi callq 0x10884 leaq 0x108(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1b6ad movq 0x108(%rsp), %rsi incq %rsi callq 0x6280 movq %rbx, %rdi callq 0x6440 nop
_ZN4flux6parser6Parser15enumDeclarationEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1D8h mov r14, rsi mov rbx, rdi lea r8, aExpectedEnumNa; "Expected enum name" lea rdi, [rsp+208h+var_150]; this mov ecx, 12h mov edx, 5 call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) lea r8, aExpectedAfterE_0; "Expected '{' after enum name" lea rdi, [rsp+208h+var_90]; this mov ecx, 1Ch mov rsi, r14 mov edx, 5Fh ; '_' call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) mov [rsp+208h+var_1D0], rbx lea rax, [rsp+208h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1B362 mov rsi, [rsp+208h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B362: xorps xmm0, xmm0 lea r15, [rsp+208h+var_1F8] movaps xmmword ptr [r15], xmm0 mov qword ptr [r15+10h], 0 lea r12, [r14+8] lea rbx, [rsp+208h+var_1C8] lea r13, [rsp+208h+var_200] loc_1B384: mov eax, [r12] test eax, eax jz loc_1B4B0 cmp eax, 60h ; '`' jz loc_1B4B0 mov ecx, 19h lea rdi, [rsp+208h+var_1B0]; this mov rsi, r14 mov edx, 5 lea r8, aExpectedEnumMe; "Expected enum member name" call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) mov [rsp+208h+var_200], 0 mov rdi, r14 mov esi, 48h ; 'H' call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType) test al, al jz short loc_1B41E mov rdi, rbx; this mov rsi, r14 call _ZN4flux6parser6Parser10expressionEv; flux::parser::Parser::expression(void) mov rax, qword ptr [rsp+208h+var_1C8] mov qword ptr [rsp+208h+var_1C8], 0 mov rdi, [rsp+208h+var_200] mov [rsp+208h+var_200], rax test rdi, rdi jz short loc_1B3FF mov rax, [rdi] call qword ptr [rax+8] loc_1B3FF: cmp [rsp+208h+var_200], 0 jnz short loc_1B41E mov edx, 1Dh mov rdi, r14 mov rsi, r12 lea rcx, aExpectedExpres; "Expected expression after '='" call _ZN4flux6parser6Parser5errorERKNS_5lexer5TokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(flux::lexer::Token const&,std::string_view) loc_1B41E: movups xmm0, [rsp+208h+var_1A8] movups [rsp+208h+var_1C8], xmm0 mov rdi, r15 mov rsi, rbx mov rdx, r13 call _ZNSt6vectorIN4flux6parser8EnumDecl6MemberESaIS3_EE12emplace_backIJSt17basic_string_viewIcSt11char_traitsIcEESt10unique_ptrINS1_4ExprESt14default_deleteISC_EEEEERS3_DpOT_; std::vector<flux::parser::EnumDecl::Member>::emplace_back<std::string_view,std::unique_ptr<flux::parser::Expr>>(std::string_view,std::unique_ptr<flux::parser::Expr> &&) mov rdi, r14 mov esi, 59h ; 'Y' call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType) mov ecx, [r12] test al, al jz short loc_1B454 cmp ecx, 60h ; '`' setnz bpl jmp short loc_1B472 loc_1B454: cmp ecx, 60h ; '`' jz short loc_1B470 mov edx, 25h ; '%' mov rdi, r14 mov rsi, r12 lea rcx, aExpectedOrAfte; "Expected ',' or '}' after enum member" call _ZN4flux6parser6Parser5errorERKNS_5lexer5TokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(flux::lexer::Token const&,std::string_view) loc_1B470: xor ebp, ebp loc_1B472: mov rdi, [rsp+208h+var_200] test rdi, rdi jz short loc_1B482 mov rax, [rdi] call qword ptr [rax+8] loc_1B482: mov rdi, [rsp+208h+var_170]; void * lea rax, [rsp+208h+var_160] cmp rdi, rax jz short loc_1B4A7 mov rsi, [rsp+208h+var_160] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B4A7: test bpl, bpl jnz loc_1B384 loc_1B4B0: lea r8, aExpectedAfterE_1; "Expected '}' after enum body" lea rdi, [rsp+208h+var_1B0]; this mov ecx, 1Ch mov rsi, r14 mov edx, 60h ; '`' call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) lea r8, aExpectedAfterE_2; "Expected ';' after enum declaration" lea rdi, [rsp+208h+var_F0]; this mov ecx, 23h ; '#' mov rsi, r14 mov edx, 58h ; 'X' call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) lea rax, [rsp+208h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1B510 mov rsi, [rsp+208h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B510: mov rax, [rsp+208h+var_148] mov [rsp+208h+var_1D8], rax mov r15, [rsp+208h+var_140] mov r12, [rsp+208h+var_138] mov r13, [rsp+208h+var_130] mov rbp, [rsp+208h+var_188] mov r14, [rsp+208h+var_180] mov edi, 50h ; 'P'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, qword ptr [rsp+208h+var_1F8] mov rcx, qword ptr [rsp+208h+var_1F8+8] lea rdi, [rsp+208h+var_1C8] mov [rdi], rax mov [rdi+8], rcx mov rdx, [rsp+208h+var_1E8] mov [rdi+10h], rdx xorps xmm0, xmm0 movaps [rsp+208h+var_1F8], xmm0 xor esi, esi mov [rsp+208h+var_1E8], rsi mov [rbx+8], r12 mov [rbx+10h], r13 mov [rbx+18h], rbp mov [rbx+20h], r14 mov r8, [rsp+208h+var_1D8] mov [rbx+28h], r8 mov [rbx+30h], r15 lea r8, _ZTVN4flux6parser8EnumDeclE; `vtable for'flux::parser::EnumDecl add r8, 10h mov [rbx], r8 mov [rbx+38h], rax mov [rbx+40h], rcx mov [rbx+48h], rdx mov [rdi+10h], rsi movaps xmmword ptr [rdi], xmm0 call _ZNSt6vectorIN4flux6parser8EnumDecl6MemberESaIS3_EED2Ev; std::vector<flux::parser::EnumDecl::Member>::~vector() mov rax, [rsp+208h+var_1D0] mov [rax], rbx mov rbx, rax mov rdi, [rsp+208h+var_170]; void * lea rax, [rsp+208h+var_160] cmp rdi, rax jz short loc_1B5F3 mov rsi, [rsp+208h+var_160] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B5F3: lea rdi, [rsp+208h+var_1F8] call _ZNSt6vectorIN4flux6parser8EnumDecl6MemberESaIS3_EED2Ev; std::vector<flux::parser::EnumDecl::Member>::~vector() lea rax, [rsp+208h+var_100] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1B61E mov rsi, [rsp+208h+var_100] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B61E: mov rax, rbx add rsp, 1D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_1B635: mov rbx, rax jmp short loc_1B65D jmp short loc_1B643 mov rbx, rax jmp short loc_1B68C jmp short loc_1B64A loc_1B643: mov rbx, rax jmp short loc_1B682 jmp short $+2 loc_1B64A: mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_1B65D mov rax, [rdi] call qword ptr [rax+8] loc_1B65D: mov rdi, [rsp+arg_90]; void * lea rax, [rsp+arg_A0] cmp rdi, rax jz short loc_1B682 mov rsi, [rsp+arg_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B682: lea rdi, [rsp+arg_8] call _ZNSt6vectorIN4flux6parser8EnumDecl6MemberESaIS3_EED2Ev; std::vector<flux::parser::EnumDecl::Member>::~vector() loc_1B68C: lea rax, [rsp+arg_100] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1B6AD mov rsi, [rsp+arg_100] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B6AD: mov rdi, rbx call __Unwind_Resume
flux::parser::Parser * flux::parser::Parser::enumDeclaration(flux::parser::Parser *this, _BYTE *a2) { int *v2; // r12 long long v3; // rax long long v4; // rdi bool v5; // al int v6; // ecx bool v7; // bp long long v8; // r15 long long v9; // r12 long long v10; // r13 long long v11; // rbp long long v12; // r14 long long v13; // rbx __int128 v14; // kr00_16 long long v15; // rdx flux::parser::Parser *v16; // rax flux::parser::Parser *v17; // rbx long long v19; // [rsp+8h] [rbp-200h] BYREF __int128 v20; // [rsp+10h] [rbp-1F8h] BYREF long long v21; // [rsp+20h] [rbp-1E8h] long long v22; // [rsp+30h] [rbp-1D8h] flux::parser::Parser *v23; // [rsp+38h] [rbp-1D0h] __int128 v24; // [rsp+40h] [rbp-1C8h] BYREF long long v25; // [rsp+50h] [rbp-1B8h] char v26[8]; // [rsp+58h] [rbp-1B0h] BYREF __int128 v27; // [rsp+60h] [rbp-1A8h] long long v28; // [rsp+80h] [rbp-188h] long long v29; // [rsp+88h] [rbp-180h] void *v30; // [rsp+98h] [rbp-170h] _QWORD v31[2]; // [rsp+A8h] [rbp-160h] BYREF char v32[8]; // [rsp+B8h] [rbp-150h] BYREF long long v33; // [rsp+C0h] [rbp-148h] long long v34; // [rsp+C8h] [rbp-140h] long long v35; // [rsp+D0h] [rbp-138h] long long v36; // [rsp+D8h] [rbp-130h] long long *v37; // [rsp+F8h] [rbp-110h] long long v38; // [rsp+108h] [rbp-100h] BYREF char v39[64]; // [rsp+118h] [rbp-F0h] BYREF long long *v40; // [rsp+158h] [rbp-B0h] long long v41; // [rsp+168h] [rbp-A0h] BYREF char v42[64]; // [rsp+178h] [rbp-90h] BYREF long long *v43; // [rsp+1B8h] [rbp-50h] long long v44; // [rsp+1C8h] [rbp-40h] BYREF flux::parser::Parser::consume((flux::parser::Parser *)v32, (long long)a2, 5, 18LL, (long long)"Expected enum name"); flux::parser::Parser::consume( (flux::parser::Parser *)v42, (long long)a2, 95, 28LL, (long long)"Expected '{' after enum name"); v23 = this; if ( v43 != &v44 ) operator delete(v43, v44 + 1); v20 = 0LL; v21 = 0LL; v2 = (int *)(a2 + 8); do { if ( !*v2 || *v2 == 96 ) break; flux::parser::Parser::consume( (flux::parser::Parser *)v26, (long long)a2, 5, 25LL, (long long)"Expected enum member name"); v19 = 0LL; if ( flux::parser::Parser::match((long long)a2, 72) ) { flux::parser::Parser::expression((flux::parser::Parser *)&v24); v3 = v24; *(_QWORD *)&v24 = 0LL; v4 = v19; v19 = v3; if ( v4 ) (*(void ( **)(long long, _BYTE *))(*(_QWORD *)v4 + 8LL))(v4, a2); if ( !v19 ) flux::parser::Parser::error(a2, (long long)(a2 + 8), 29LL, (long long)"Expected expression after '='"); } v24 = v27; std::vector<flux::parser::EnumDecl::Member>::emplace_back<std::string_view,std::unique_ptr<flux::parser::Expr>>( &v20, &v24, &v19); v5 = flux::parser::Parser::match((long long)a2, 89); v6 = *v2; if ( v5 ) { v7 = v6 != 96; } else { if ( v6 != 96 ) flux::parser::Parser::error(a2, (long long)(a2 + 8), 37LL, (long long)"Expected ',' or '}' after enum member"); v7 = 0; } if ( v19 ) (*(void ( **)(long long))(*(_QWORD *)v19 + 8LL))(v19); if ( v30 != v31 ) operator delete(v30, v31[0] + 1LL); } while ( v7 ); flux::parser::Parser::consume( (flux::parser::Parser *)v26, (long long)a2, 96, 28LL, (long long)"Expected '}' after enum body"); flux::parser::Parser::consume( (flux::parser::Parser *)v39, (long long)a2, 88, 35LL, (long long)"Expected ';' after enum declaration"); if ( v40 != &v41 ) operator delete(v40, v41 + 1); v22 = v33; v8 = v34; v9 = v35; v10 = v36; v11 = v28; v12 = v29; v13 = operator new(0x50uLL); v14 = v20; v15 = v21; v20 = 0LL; v21 = 0LL; *(_QWORD *)(v13 + 8) = v9; *(_QWORD *)(v13 + 16) = v10; *(_QWORD *)(v13 + 24) = v11; *(_QWORD *)(v13 + 32) = v12; *(_QWORD *)(v13 + 40) = v22; *(_QWORD *)(v13 + 48) = v8; *(_QWORD *)v13 = &`vtable for'flux::parser::EnumDecl + 2; *(_OWORD *)(v13 + 56) = v14; *(_QWORD *)(v13 + 72) = v15; v25 = 0LL; v24 = 0LL; std::vector<flux::parser::EnumDecl::Member>::~vector((long long)&v24); v16 = v23; *(_QWORD *)v23 = v13; v17 = v16; if ( v30 != v31 ) operator delete(v30, v31[0] + 1LL); std::vector<flux::parser::EnumDecl::Member>::~vector((long long)&v20); if ( v37 != &v38 ) operator delete(v37, v38 + 1); return v17; }
enumDeclaration: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1d8 MOV R14,RSI MOV RBX,RDI LEA R8,[0x12d665] LEA RDI,[RSP + 0xb8] MOV ECX,0x12 MOV EDX,0x5 CALL 0x00114f3c LAB_0011b31b: LEA R8,[0x12d678] LEA RDI,[RSP + 0x178] MOV ECX,0x1c MOV RSI,R14 MOV EDX,0x5f CALL 0x00114f3c MOV qword ptr [RSP + 0x38],RBX LEA RAX,[RSP + 0x1c8] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011b362 MOV RSI,qword ptr [RSP + 0x1c8] INC RSI CALL 0x00106280 LAB_0011b362: XORPS XMM0,XMM0 LEA R15,[RSP + 0x10] MOVAPS xmmword ptr [R15],XMM0 MOV qword ptr [R15 + 0x10],0x0 LEA R12,[R14 + 0x8] LEA RBX,[RSP + 0x40] LEA R13,[RSP + 0x8] LAB_0011b384: MOV EAX,dword ptr [R12] TEST EAX,EAX JZ 0x0011b4b0 CMP EAX,0x60 JZ 0x0011b4b0 LAB_0011b399: MOV ECX,0x19 LEA RDI,[RSP + 0x58] MOV RSI,R14 MOV EDX,0x5 LEA R8,[0x12d695] CALL 0x00114f3c MOV qword ptr [RSP + 0x8],0x0 LAB_0011b3c0: MOV RDI,R14 MOV ESI,0x48 CALL 0x00114e88 TEST AL,AL JZ 0x0011b41e LAB_0011b3d1: MOV RDI,RBX MOV RSI,R14 CALL 0x0011cf50 LAB_0011b3dc: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x40],0x0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RDI,RDI JZ 0x0011b3ff MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0011b3ff: CMP qword ptr [RSP + 0x8],0x0 JNZ 0x0011b41e LAB_0011b407: MOV EDX,0x1d MOV RDI,R14 MOV RSI,R12 LEA RCX,[0x12cc07] CALL 0x00114c10 LAB_0011b41e: MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP + 0x40],XMM0 LAB_0011b428: MOV RDI,R15 MOV RSI,RBX MOV RDX,R13 CALL 0x0012978c LAB_0011b436: MOV RDI,R14 MOV ESI,0x59 CALL 0x00114e88 MOV ECX,dword ptr [R12] TEST AL,AL JZ 0x0011b454 CMP ECX,0x60 SETNZ BPL JMP 0x0011b472 LAB_0011b454: CMP ECX,0x60 JZ 0x0011b470 MOV EDX,0x25 MOV RDI,R14 MOV RSI,R12 LEA RCX,[0x12d6af] CALL 0x00114c10 LAB_0011b470: XOR EBP,EBP LAB_0011b472: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0011b482 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0011b482: MOV RDI,qword ptr [RSP + 0x98] LEA RAX,[RSP + 0xa8] CMP RDI,RAX JZ 0x0011b4a7 MOV RSI,qword ptr [RSP + 0xa8] INC RSI CALL 0x00106280 LAB_0011b4a7: TEST BPL,BPL JNZ 0x0011b384 LAB_0011b4b0: LEA R8,[0x12d6d5] LEA RDI,[RSP + 0x58] MOV ECX,0x1c MOV RSI,R14 MOV EDX,0x60 CALL 0x00114f3c LAB_0011b4ce: LEA R8,[0x12d6f2] LEA RDI,[RSP + 0x118] MOV ECX,0x23 MOV RSI,R14 MOV EDX,0x58 CALL 0x00114f3c LEA RAX,[RSP + 0x168] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011b510 MOV RSI,qword ptr [RSP + 0x168] INC RSI CALL 0x00106280 LAB_0011b510: MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x30],RAX MOV R15,qword ptr [RSP + 0xc8] MOV R12,qword ptr [RSP + 0xd0] MOV R13,qword ptr [RSP + 0xd8] MOV RBP,qword ptr [RSP + 0x80] MOV R14,qword ptr [RSP + 0x88] LAB_0011b545: MOV EDI,0x50 CALL 0x00106270 LAB_0011b54f: MOV RBX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x40] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],RCX MOV RDX,qword ptr [RSP + 0x20] MOV qword ptr [RDI + 0x10],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 XOR ESI,ESI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RBX + 0x8],R12 MOV qword ptr [RBX + 0x10],R13 MOV qword ptr [RBX + 0x18],RBP MOV qword ptr [RBX + 0x20],R14 MOV R8,qword ptr [RSP + 0x30] MOV qword ptr [RBX + 0x28],R8 MOV qword ptr [RBX + 0x30],R15 LEA R8,[0x13a990] ADD R8,0x10 MOV qword ptr [RBX],R8 MOV qword ptr [RBX + 0x38],RAX MOV qword ptr [RBX + 0x40],RCX MOV qword ptr [RBX + 0x48],RDX MOV qword ptr [RDI + 0x10],RSI MOVAPS xmmword ptr [RDI],XMM0 CALL 0x00110884 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX],RBX MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x98] LEA RAX,[RSP + 0xa8] CMP RDI,RAX JZ 0x0011b5f3 MOV RSI,qword ptr [RSP + 0xa8] INC RSI CALL 0x00106280 LAB_0011b5f3: LEA RDI,[RSP + 0x10] CALL 0x00110884 LEA RAX,[RSP + 0x108] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011b61e MOV RSI,qword ptr [RSP + 0x108] INC RSI CALL 0x00106280 LAB_0011b61e: MOV RAX,RBX ADD RSP,0x1d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* flux::parser::Parser::enumDeclaration() */ int8 * flux::parser::Parser::enumDeclaration(void) { int iVar1; long *plVar2; int8 uVar3; int8 uVar4; int8 uVar5; long *plVar6; char cVar7; int8 *puVar8; long in_RSI; int8 *in_RDI; bool bVar9; long *local_200; int8 local_1f8; int8 uStack_1f0; int8 local_1e8; int8 local_1d8; int8 *local_1d0; long *local_1c8; int8 uStack_1c0; int8 local_1b8; int1 local_1b0 [8]; long *local_1a8; int8 uStack_1a0; int8 local_188; int8 local_180; long *local_170; long local_160 [2]; int1 local_150 [8]; int8 local_148; int8 local_140; int8 local_138; int8 local_130; long *local_110; long local_100 [2]; int1 local_f0 [64]; long *local_b0; long local_a0 [2]; int1 local_90 [64]; long *local_50; long local_40 [2]; consume(local_150,in_RSI,5,0x12,"Expected enum name"); /* try { // try from 0011b31b to 0011b33b has its CatchHandler @ 0011b63c */ consume(local_90); local_1d0 = in_RDI; if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } local_1f8 = 0; uStack_1f0 = 0; local_1e8 = 0; do { iVar1 = *(int *)(in_RSI + 8); if ((iVar1 == 0) || (iVar1 == 0x60)) break; /* try { // try from 0011b399 to 0011b3b6 has its CatchHandler @ 0011b643 */ consume(local_1b0); local_200 = (long *)0x0; /* try { // try from 0011b3c0 to 0011b3cc has its CatchHandler @ 0011b64a */ cVar7 = match(); if (cVar7 != '\0') { /* try { // try from 0011b3d1 to 0011b3db has its CatchHandler @ 0011b641 */ expression((Parser *)&local_1c8); plVar6 = local_1c8; plVar2 = local_200; local_1c8 = (long *)0x0; local_200 = plVar6; if (plVar2 != (long *)0x0) { (**(code **)(*plVar2 + 8))(); } if (local_200 == (long *)0x0) { /* try { // try from 0011b407 to 0011b41d has its CatchHandler @ 0011b64a */ error(); } } local_1c8 = local_1a8; uStack_1c0 = uStack_1a0; /* try { // try from 0011b428 to 0011b435 has its CatchHandler @ 0011b648 */ std::vector<flux::parser::EnumDecl::Member,std::allocator<flux::parser::EnumDecl::Member>>:: emplace_back<std::basic_string_view<char,std::char_traits<char>>,std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>> ((vector<flux::parser::EnumDecl::Member,std::allocator<flux::parser::EnumDecl::Member>> *)&local_1f8,(Parser *)&local_1c8,(unique_ptr *)&local_200); /* try { // try from 0011b436 to 0011b46f has its CatchHandler @ 0011b64a */ cVar7 = match(); iVar1 = *(int *)(in_RSI + 8); if (cVar7 == '\0') { if (iVar1 != 0x60) { error(); } bVar9 = false; } else { bVar9 = iVar1 != 0x60; } if (local_200 != (long *)0x0) { (**(code **)(*local_200 + 8))(); } if (local_170 != local_160) { operator_delete(local_170,local_160[0] + 1); } } while (bVar9); /* try { // try from 0011b4b0 to 0011b4cd has its CatchHandler @ 0011b63a */ consume(local_1b0); /* try { // try from 0011b4ce to 0011b4ee has its CatchHandler @ 0011b635 */ consume(local_f0); if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } local_1d8 = local_148; /* try { // try from 0011b545 to 0011b54e has its CatchHandler @ 0011b633 */ puVar8 = (int8 *)operator_new(0x50); uVar5 = local_1e8; uVar4 = uStack_1f0; uVar3 = local_1f8; local_1f8 = 0; uStack_1f0 = 0; local_1e8 = 0; puVar8[1] = local_138; puVar8[2] = local_130; puVar8[3] = local_188; puVar8[4] = local_180; puVar8[5] = local_1d8; puVar8[6] = local_140; *puVar8 = &PTR__EnumDecl_0013a9a0; puVar8[7] = uVar3; puVar8[8] = uVar4; puVar8[9] = uVar5; local_1b8 = 0; local_1c8 = (long *)0x0; uStack_1c0 = 0; std::vector<flux::parser::EnumDecl::Member,std::allocator<flux::parser::EnumDecl::Member>>:: ~vector((vector<flux::parser::EnumDecl::Member,std::allocator<flux::parser::EnumDecl::Member>> *) &local_1c8); *local_1d0 = puVar8; if (local_170 != local_160) { operator_delete(local_170,local_160[0] + 1); } std::vector<flux::parser::EnumDecl::Member,std::allocator<flux::parser::EnumDecl::Member>>:: ~vector((vector<flux::parser::EnumDecl::Member,std::allocator<flux::parser::EnumDecl::Member>> *) &local_1f8); if (local_110 != local_100) { operator_delete(local_110,local_100[0] + 1); } return local_1d0; }
51,719
bitmap_xor
eloqsql/mysys/my_bitmap.c
void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end= map->last_word_ptr; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map->n_bits == map2->n_bits); while (to <= end) *to++ ^= *from++; }
O0
c
bitmap_xor: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) jmp 0xf69c0 jmp 0xf69c2 jmp 0xf69c4 jmp 0xf69c6 jmp 0xf69c8 jmp 0xf69ca movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax ja 0xf69fa movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x20(%rbp) movl (%rax), %ecx movq -0x18(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x18(%rbp) xorl (%rax), %ecx movl %ecx, (%rax) jmp 0xf69ca popq %rbp retq nopl (%rax)
bitmap_xor: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_28], rax jmp short $+2 loc_F69C0: jmp short $+2 loc_F69C2: jmp short $+2 loc_F69C4: jmp short $+2 loc_F69C6: jmp short $+2 loc_F69C8: jmp short $+2 loc_F69CA: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] ja short loc_F69FA mov rax, [rbp+var_20] mov rcx, rax add rcx, 4 mov [rbp+var_20], rcx mov ecx, [rax] mov rax, [rbp+var_18] mov rdx, rax add rdx, 4 mov [rbp+var_18], rdx xor ecx, [rax] mov [rax], ecx jmp short loc_F69CA loc_F69FA: pop rbp retn
_DWORD * bitmap_xor(_QWORD *a1, int **a2) { _DWORD *result; // rax int *v3; // rax int v4; // ecx _DWORD *v5; // rax unsigned long long v6; // [rsp+0h] [rbp-28h] int *v7; // [rsp+8h] [rbp-20h] _DWORD *v8; // [rsp+10h] [rbp-18h] v8 = (_DWORD *)*a1; v7 = *a2; v6 = a1[1]; while ( 1 ) { result = v8; if ( (unsigned long long)v8 > v6 ) break; v3 = v7++; v4 = *v3; v5 = v8++; *v5 ^= v4; } return result; }
bitmap_xor: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX JMP 0x001f69c0 LAB_001f69c0: JMP 0x001f69c2 LAB_001f69c2: JMP 0x001f69c4 LAB_001f69c4: JMP 0x001f69c6 LAB_001f69c6: JMP 0x001f69c8 LAB_001f69c8: JMP 0x001f69ca LAB_001f69ca: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JA 0x001f69fa MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x20],RCX MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x18],RDX XOR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX JMP 0x001f69ca LAB_001f69fa: POP RBP RET
void bitmap_xor(int8 *param_1,int8 *param_2) { uint *puVar1; uint *local_28; uint *local_20; puVar1 = (uint *)param_1[1]; local_28 = (uint *)*param_2; local_20 = (uint *)*param_1; while (local_20 <= puVar1) { *local_20 = *local_28 ^ *local_20; local_28 = local_28 + 1; local_20 = local_20 + 1; } return; }
51,720
mariadb_compress_alloc
eloqsql/libmariadb/libmariadb/ma_compress.c
unsigned char *_mariadb_compress_alloc(NET *net, const unsigned char *packet, size_t *len, size_t *complen) { unsigned char *compbuf; *complen = *len * 120 / 100 + 12; if (!(compbuf = (unsigned char *) malloc(*complen))) return 0; /* Not enough memory */ if (compression_plugin(net)->compress(compression_ctx(net), (void *)compbuf, complen, (void *)packet, *len)) { free(compbuf); return 0; } if (*complen >= *len) { *complen=0; free(compbuf); return 0; } swap(size_t,*len,*complen); /* *len is now packet length */ return compbuf; }
O0
c
mariadb_compress_alloc: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax imulq $0x78, (%rax), %rax movl $0x64, %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx addq $0xc, %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movq (%rax), %rdi callq 0x145c0 movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x3fa1b movq $0x0, -0x8(%rbp) jmp 0x3fac5 movq -0x10(%rbp), %rax movq 0x2a0(%rax), %rax movq 0x10(%rax), %rax movq 0x68(%rax), %rax movq -0x10(%rbp), %rcx movq 0x2a0(%rcx), %rcx movq 0x8(%rcx), %rdi movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq (%r8), %r8 callq *%rax cmpb $0x0, %al je 0x3fa69 movq -0x30(%rbp), %rdi callq 0x14530 movq $0x0, -0x8(%rbp) jmp 0x3fac5 movq -0x28(%rbp), %rax movq (%rax), %rax movq -0x20(%rbp), %rcx cmpq (%rcx), %rax jb 0x3fa97 movq -0x28(%rbp), %rax movq $0x0, (%rax) movq -0x30(%rbp), %rdi callq 0x14530 movq $0x0, -0x8(%rbp) jmp 0x3fac5 jmp 0x3fa99 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
_mariadb_compress_alloc: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] imul rax, [rax], 78h ; 'x' mov ecx, 64h ; 'd' xor edx, edx div rcx mov rcx, rax add rcx, 0Ch mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_28] mov rdi, [rax] call _malloc mov [rbp+var_30], rax cmp rax, 0 jnz short loc_3FA1B mov [rbp+var_8], 0 jmp loc_3FAC5 loc_3FA1B: mov rax, [rbp+var_10] mov rax, [rax+2A0h] mov rax, [rax+10h] mov rax, [rax+68h] mov rcx, [rbp+var_10] mov rcx, [rcx+2A0h] mov rdi, [rcx+8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_28] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r8, [r8] call rax cmp al, 0 jz short loc_3FA69 mov rdi, [rbp+var_30] call _free mov [rbp+var_8], 0 jmp short loc_3FAC5 loc_3FA69: mov rax, [rbp+var_28] mov rax, [rax] mov rcx, [rbp+var_20] cmp rax, [rcx] jb short loc_3FA97 mov rax, [rbp+var_28] mov qword ptr [rax], 0 mov rdi, [rbp+var_30] call _free mov [rbp+var_8], 0 jmp short loc_3FAC5 loc_3FA97: jmp short $+2 loc_3FA99: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov rcx, [rax] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_3FAC5: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long mariadb_compress_alloc(long long a1, long long a2, _QWORD *a3, _QWORD *a4) { long long v5; // [rsp+8h] [rbp-38h] long long v6; // [rsp+10h] [rbp-30h] *a4 = 120LL * *a3 / 0x64uLL + 12; v6 = malloc(*a4); if ( !v6 ) return 0LL; if ( (*(unsigned __int8 ( **)(_QWORD, long long, _QWORD *, long long, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL) + 104LL))( *(_QWORD *)(*(_QWORD *)(a1 + 672) + 8LL), v6, a4, a2, *a3) ) { free(v6); return 0LL; } else if ( *a4 < *a3 ) { v5 = *a3; *a3 = *a4; *a4 = v5; return v6; } else { *a4 = 0LL; free(v6); return 0LL; } }
_mariadb_compress_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] IMUL RAX,qword ptr [RAX],0x78 MOV ECX,0x64 XOR EDX,EDX DIV RCX MOV RCX,RAX ADD RCX,0xc MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] CALL 0x001145c0 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x0013fa1b MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013fac5 LAB_0013fa1b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2a0] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x2a0] MOV RDI,qword ptr [RCX + 0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R8,qword ptr [R8] CALL RAX CMP AL,0x0 JZ 0x0013fa69 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00114530 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013fac5 LAB_0013fa69: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RCX] JC 0x0013fa97 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00114530 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013fac5 LAB_0013fa97: JMP 0x0013fa99 LAB_0013fa99: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0013fac5: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
void * _mariadb_compress_alloc(long param_1,int8 param_2,size_t *param_3,size_t *param_4) { size_t sVar1; char cVar2; int8 local_10; *param_4 = (*param_3 * 0x78) / 100 + 0xc; local_10 = malloc(*param_4); if (local_10 == (void *)0x0) { local_10 = (void *)0x0; } else { cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x2a0) + 0x10) + 0x68)) (*(int8 *)(*(long *)(param_1 + 0x2a0) + 8),local_10,param_4,param_2, *param_3); if (cVar2 == '\0') { if (*param_4 < *param_3) { sVar1 = *param_3; *param_3 = *param_4; *param_4 = sVar1; } else { *param_4 = 0; free(local_10); local_10 = (void *)0x0; } } else { free(local_10); local_10 = (void *)0x0; } } return local_10; }
51,721
ggml_unary_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_unary_impl( struct ggml_context * ctx, struct ggml_tensor * a, enum ggml_unary_op op, bool inplace) { GGML_ASSERT(ggml_is_contiguous_1(a)); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params_i32(result, 0, (int32_t) op); result->op = GGML_OP_UNARY; result->src[0] = a; return result; }
O2
c
ggml_unary_impl: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %r15d movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x1c040 testb %al, %al je 0x25204 movq %r14, %rdi movq %rbx, %rsi testb %r15b, %r15b je 0x251e3 callq 0x1c3e0 jmp 0x251e8 callq 0x1d660 movl %ebp, 0x54(%rax) movl $0x4a, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x26378(%rip), %rdi # 0x4b583 leaq 0x263bc(%rip), %rdx # 0x4b5ce leaq 0x2878d(%rip), %rcx # 0x4d9a6 movl $0x12ff, %esi # imm = 0x12FF xorl %eax, %eax callq 0x1e770
ggml_unary_impl: push rbp push r15 push r14 push rbx push rax mov r15d, ecx mov ebp, edx mov rbx, rsi mov r14, rdi mov rdi, rsi call _ggml_is_contiguous_1 test al, al jz short loc_25204 mov rdi, r14 mov rsi, rbx test r15b, r15b jz short loc_251E3 call _ggml_view_tensor jmp short loc_251E8 loc_251E3: call _ggml_dup_tensor loc_251E8: mov [rax+54h], ebp mov dword ptr [rax+50h], 4Ah ; 'J' mov [rax+98h], rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_25204: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_22; "ggml_is_contiguous_1(a)" mov esi, 12FFh xor eax, eax call _ggml_abort
long long ggml_unary_impl( long long a1, unsigned int *a2, int a3, char a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { char v12; // al long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long result; // rax char v20; // [rsp-8h] [rbp-28h] v20 = v12; if ( !(unsigned __int8)ggml_is_contiguous_1(a2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 4863, (long long)"GGML_ASSERT(%s) failed", (long long)"ggml_is_contiguous_1(a)", v15, v16, a5, a6, a7, a8, v17, v18, a11, a12, v20); if ( a4 ) result = ggml_view_tensor(a1, (long long)a2, a5, a6, a7, a8, v17, v18, a11, a12); else result = ggml_dup_tensor(a1, a2); *(_DWORD *)(result + 84) = a3; *(_DWORD *)(result + 80) = 74; *(_QWORD *)(result + 152) = a2; return result; }
ggml_unary_impl: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15D,ECX MOV EBP,EDX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x0011c040 TEST AL,AL JZ 0x00125204 MOV RDI,R14 MOV RSI,RBX TEST R15B,R15B JZ 0x001251e3 CALL 0x0011c3e0 JMP 0x001251e8 LAB_001251e3: CALL 0x0011d660 LAB_001251e8: MOV dword ptr [RAX + 0x54],EBP MOV dword ptr [RAX + 0x50],0x4a MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00125204: LEA RDI,[0x14b583] LEA RDX,[0x14b5ce] LEA RCX,[0x14d9a6] MOV ESI,0x12ff XOR EAX,EAX CALL 0x0011e770
void ggml_unary_impl(int8 param_1,int8 param_2,int4 param_3,char param_4) { char cVar1; long lVar2; cVar1 = ggml_is_contiguous_1(param_2); if (cVar1 != '\0') { if (param_4 == '\0') { lVar2 = ggml_dup_tensor(param_1,param_2); } else { lVar2 = ggml_view_tensor(); } *(int4 *)(lVar2 + 0x54) = param_3; *(int4 *)(lVar2 + 0x50) = 0x4a; *(int8 *)(lVar2 + 0x98) = param_2; return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x12ff, "GGML_ASSERT(%s) failed","ggml_is_contiguous_1(a)"); }
51,722
pagecache_delete_by_link
eloqsql/storage/maria/ma_pagecache.c
my_bool pagecache_delete_by_link(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, enum pagecache_page_lock lock, my_bool flush) { my_bool error= 0; enum pagecache_page_pin pin= PAGECACHE_PIN_LEFT_PINNED; DBUG_ENTER("pagecache_delete_by_link"); DBUG_PRINT("enter", ("fd: %d block %p %s %s", block->hash_link->file.file, block, page_cache_page_lock_str[lock], page_cache_page_pin_str[pin])); DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_LEFT_WRITELOCKED); DBUG_ASSERT(block->pins != 0); /* should be pinned */ if (pagecache->can_be_used) { pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (!pagecache->can_be_used) goto end; /* This block should be pinned (i.e. has not zero request counter) => Such block can't be chosen for eviction. */ DBUG_ASSERT((block->status & (PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0); /* This lock is deleted in pagecache_delete_internal() called below */ inc_counter_for_resize_op(pagecache); /* make_lock_and_pin() can't fail here, because we are keeping pin on the block and it can't be evicted (which is cause of lock fail and retry) */ if (make_lock_and_pin(pagecache, block, lock, pin, FALSE)) DBUG_ASSERT(0); /* get_present_hash_link() side effect emulation before call pagecache_delete_internal() */ block->hash_link->requests++; error= pagecache_delete_internal(pagecache, block, block->hash_link, flush); end: pagecache_pthread_mutex_unlock(&pagecache->cache_lock); } DBUG_RETURN(error); }
O3
c
pagecache_delete_by_link: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpb $0x0, 0x1aa(%rdi) je 0x3c118 movl %ecx, %r12d movl %edx, %r13d movq %rsi, %r15 movq %rdi, %r14 leaq 0xc8(%rdi), %rbx cmpq $0x0, 0x108(%rdi) jne 0x3c146 movq %rbx, %rdi callq 0x29210 cmpb $0x0, 0x1aa(%r14) je 0x3c11d incq 0x68(%r14) movq %r14, %rdi movq %r15, %rsi movl %r13d, %edx xorl %ecx, %ecx callq 0x3abcf movq 0x20(%r15), %rax incl 0x68(%rax) movq 0x20(%r15), %rdx movsbl %r12b, %ecx movq %r14, %rdi movq %r15, %rsi callq 0x3c171 movl %eax, %r15d jmp 0x3c120 xorl %r15d, %r15d jmp 0x3c134 xorl %r15d, %r15d movq 0x108(%r14), %rdi testq %rdi, %rdi jne 0x3c15f movq %rbx, %rdi callq 0x291d0 movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9dff8(%rip), %rsi # 0xda145 movq %rbx, %rdi movl $0x1002, %edx # imm = 0x1002 callq 0x2eb7f jmp 0x3c0db leaq 0x349eaa(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x3c12c
pagecache_delete_by_link: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp byte ptr [rdi+1AAh], 0 jz short loc_3C118 mov r12d, ecx mov r13d, edx mov r15, rsi mov r14, rdi lea rbx, [rdi+0C8h] cmp qword ptr [rdi+108h], 0 jnz short loc_3C146 mov rdi, rbx call _pthread_mutex_lock loc_3C0DB: cmp byte ptr [r14+1AAh], 0 jz short loc_3C11D inc qword ptr [r14+68h] mov rdi, r14 mov rsi, r15 mov edx, r13d xor ecx, ecx call make_lock_and_pin mov rax, [r15+20h] inc dword ptr [rax+68h] mov rdx, [r15+20h] movsx ecx, r12b mov rdi, r14 mov rsi, r15 call pagecache_delete_internal mov r15d, eax jmp short loc_3C120 loc_3C118: xor r15d, r15d jmp short loc_3C134 loc_3C11D: xor r15d, r15d loc_3C120: mov rdi, [r14+108h] test rdi, rdi jnz short loc_3C15F loc_3C12C: mov rdi, rbx call _pthread_mutex_unlock loc_3C134: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3C146: lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 1002h call psi_mutex_lock jmp loc_3C0DB loc_3C15F: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_3C12C
long long pagecache_delete_by_link(long long a1, long long a2, int a3, char a4) { long long v6; // rbx unsigned int v7; // r15d long long v8; // rdi if ( *(_BYTE *)(a1 + 426) ) { v6 = a1 + 200; if ( *(_QWORD *)(a1 + 264) ) psi_mutex_lock( a1 + 200, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x1002u); else pthread_mutex_lock(a1 + 200); if ( *(_BYTE *)(a1 + 426) ) { ++*(_QWORD *)(a1 + 104); make_lock_and_pin(a1, a2, a3, 0); ++*(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL); v7 = pagecache_delete_internal(a1, a2, *(_QWORD *)(a2 + 32), (unsigned int)a4); } else { v7 = 0; } v8 = *(_QWORD *)(a1 + 264); if ( v8 ) ((void ( *)(long long))PSI_server[44])(v8); pthread_mutex_unlock(v6); } else { return 0; } return v7; }
pagecache_delete_by_link: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP byte ptr [RDI + 0x1aa],0x0 JZ 0x0013c118 MOV R12D,ECX MOV R13D,EDX MOV R15,RSI MOV R14,RDI LEA RBX,[RDI + 0xc8] CMP qword ptr [RDI + 0x108],0x0 JNZ 0x0013c146 MOV RDI,RBX CALL 0x00129210 LAB_0013c0db: CMP byte ptr [R14 + 0x1aa],0x0 JZ 0x0013c11d INC qword ptr [R14 + 0x68] MOV RDI,R14 MOV RSI,R15 MOV EDX,R13D XOR ECX,ECX CALL 0x0013abcf MOV RAX,qword ptr [R15 + 0x20] INC dword ptr [RAX + 0x68] MOV RDX,qword ptr [R15 + 0x20] MOVSX ECX,R12B MOV RDI,R14 MOV RSI,R15 CALL 0x0013c171 MOV R15D,EAX JMP 0x0013c120 LAB_0013c118: XOR R15D,R15D JMP 0x0013c134 LAB_0013c11d: XOR R15D,R15D LAB_0013c120: MOV RDI,qword ptr [R14 + 0x108] TEST RDI,RDI JNZ 0x0013c15f LAB_0013c12c: MOV RDI,RBX CALL 0x001291d0 LAB_0013c134: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013c146: LEA RSI,[0x1da145] MOV RDI,RBX MOV EDX,0x1002 CALL 0x0012eb7f JMP 0x0013c0db LAB_0013c15f: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013c12c
int4 pagecache_delete_by_link(long param_1,long param_2,int4 param_3,char param_4) { int *piVar1; pthread_mutex_t *__mutex; int4 uVar2; if (*(char *)(param_1 + 0x1aa) == '\0') { uVar2 = 0; } else { __mutex = (pthread_mutex_t *)(param_1 + 200); if (*(long *)(param_1 + 0x108) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c" ,0x1002); } if (*(char *)(param_1 + 0x1aa) == '\0') { uVar2 = 0; } else { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1; make_lock_and_pin(param_1,param_2,param_3,0); piVar1 = (int *)(*(long *)(param_2 + 0x20) + 0x68); *piVar1 = *piVar1 + 1; uVar2 = pagecache_delete_internal (param_1,param_2,*(int8 *)(param_2 + 0x20),(int)param_4); } if (*(long *)(param_1 + 0x108) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } return uVar2; }
51,723
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&)
hkr04[P]cpp-mcp/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x51c0 movq %rax, %r12 movq (%r14), %rdi callq 0x51c0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x5660 movq %rbx, %rdi movq %r15, %rsi callq 0x57a0 movq (%r14), %rsi movq %rbx, %rdi callq 0x57a0 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0x1963c movq (%r13), %rsi incq %rsi callq 0x5460 movq %r14, %rdi callq 0x5740
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_1963C mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1963C: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[25],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x001051c0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x001051c0 ADD R12,RAX LAB_001195f7: MOV RDI,RBX MOV RSI,R12 CALL 0x00105660 MOV RDI,RBX MOV RSI,R15 CALL 0x001057a0 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x001057a0 LAB_00119618: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [25], char const*>(char const (&) [25], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001195f7 to 00119617 has its CatchHandler @ 00119625 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
51,724
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&)
hkr04[P]cpp-mcp/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx callq 0x16e5a movq %rbx, %rdi movq %rax, %rsi callq 0x5670 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx movq %r14, %r8 callq 0x16e90 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x51d0 movq %r14, %rdi callq 0x5750
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_SB_S8_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx mov rdx, rcx mov rcx, r8 call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA10_cS8_EEEmPKcDpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [10],std::string>(char const*,std::string,char [10],std::string const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, r15 mov r8, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA10_KcJS8_SB_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_ mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>( long long a1, long long a2, long long a3, long long a4, long long a5) { long long v8; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v8 = nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [10],std::string>(a2, a3, a4, a5); std::string::reserve(a1, v8); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA10_KcJS8_SB_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_( a1, a2, a3, a4, a5); return a1; }
concat<std::__cxx11::string,char_const(&)[10],std::__cxx11::string,char_const(&)[10],std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_00116e0a: MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 CALL 0x00116e5a MOV RDI,RBX MOV RSI,RAX CALL 0x00105670 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 MOV R8,R14 CALL 0x00116e90 LAB_00116e3a: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [10], std::__cxx11::string, char const (&) [10], std::__cxx11::string >(char const (&) [10], std::__cxx11::string&&, char const (&) [10], std::__cxx11::string&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[10],std::__cxx11::string,char_const(&)[10],std::__cxx11::string> (detail *this,char *param_1,string *param_2,char *param_3,string *param_4) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; /* try { // try from 00116e0a to 00116e39 has its CatchHandler @ 00116e47 */ concat_length<std::__cxx11::string,char[10],std::__cxx11::string>(param_1,param_2,param_3,param_4) ; std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA10_KcJS8_SB_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_ (this,param_1,param_2,param_3,param_4); return this; }
51,725
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&)
hkr04[P]cpp-mcp/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x51c0 addq 0x8(%r14), %rax movq %rbx, %rdi movq %rax, %rsi callq 0x5660 movq %rbx, %rdi movq %r15, %rsi callq 0x57a0 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x5120 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0x19460 movq (%r12), %rsi incq %rsi callq 0x5460 movq %r14, %rdi callq 0x5740
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen add rax, [r14+8] mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_19460 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_19460: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>( long long a1, long long a2, _QWORD *a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); std::string::reserve(a1, a3[1] + v4); std::string::append(a1, a2); std::string::_M_append(a1, *a3, a3[1]); return a1; }
concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x001051c0 ADD RAX,qword ptr [R14 + 0x8] LAB_00119415: MOV RDI,RBX MOV RSI,RAX CALL 0x00105660 MOV RDI,RBX MOV RSI,R15 CALL 0x001057a0 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x00105120 LAB_0011943a: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [23], std::__cxx11::string >(char const (&) [23], std::__cxx11::string&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string> (detail *this,char *param_1,string *param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); /* try { // try from 00119415 to 00119439 has its CatchHandler @ 00119449 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2); return this; }
51,726
directory_file_name
eloqsql/mysys/my_lib.c
static char *directory_file_name (char * dst, const char *src) { /* Process as Unix format: just remove test the final slash. */ char *end; DBUG_ASSERT(strlen(src) < (FN_REFLEN + 1)); if (src[0] == 0) src= (char*) "."; /* Use empty as current */ end= strnmov(dst, src, FN_REFLEN + 1); if (end[-1] != FN_LIBCHAR) { *end++= FN_LIBCHAR; /* Add last '/' */ *end='\0'; } return end; }
O0
c
directory_file_name: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x2d702 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x2d719 leaq 0x4b79e(%rip), %rax # 0x78eb3 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x201, %edx # imm = 0x201 callq 0x75900 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax je 0x2d755 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb $0x2f, (%rax) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
directory_file_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_2D702: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_2D719 lea rax, asc_78EB2+1; "." mov [rbp+var_10], rax loc_2D719: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 201h call strnmov mov [rbp+var_18], rax mov rax, [rbp+var_18] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jz short loc_2D755 mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov byte ptr [rax], 2Fh ; '/' mov rax, [rbp+var_18] mov byte ptr [rax], 0 loc_2D755: mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
_BYTE * directory_file_name(long long a1, char *a2) { _BYTE *v2; // rax _BYTE *v4; // [rsp+8h] [rbp-18h] char *v5; // [rsp+10h] [rbp-10h] v5 = a2; if ( !*a2 ) v5 = "."; v4 = (_BYTE *)strnmov(a1, v5, 513LL); if ( *(v4 - 1) != 47 ) { v2 = v4++; *v2 = 47; *v4 = 0; } return v4; }
directory_file_name: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x0012d702 LAB_0012d702: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0012d719 LEA RAX,[0x178eb3] MOV qword ptr [RBP + -0x10],RAX LAB_0012d719: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x201 CALL 0x00175900 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JZ 0x0012d755 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV byte ptr [RAX],0x2f MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 LAB_0012d755: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int1 * directory_file_name(int8 param_1,char *param_2) { int1 *puVar1; int1 *local_20; char *local_18; local_18 = param_2; if (*param_2 == '\0') { local_18 = "."; } puVar1 = (int1 *)strnmov(param_1,local_18,0x201); local_20 = puVar1; if (puVar1[-1] != '/') { local_20 = puVar1 + 1; *puVar1 = 0x2f; *local_20 = 0; } return local_20; }
51,727
ma_remove_not_visible_states_with_lock
eloqsql/storage/maria/ma_state.c
void _ma_remove_not_visible_states_with_lock(MARIA_SHARE *share, my_bool all) { my_bool is_lock_trman; if ((is_lock_trman= trman_is_inited())) trnman_lock(); mysql_mutex_lock(&share->intern_lock); share->state_history= _ma_remove_not_visible_states(share->state_history, all, 1); mysql_mutex_unlock(&share->intern_lock); if (is_lock_trman) trnman_unlock(); }
O3
c
ma_remove_not_visible_states_with_lock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %r14d movq %rdi, %rbx xorl %eax, %eax callq 0x61b5f testb %al, %al je 0x43833 xorl %eax, %eax callq 0x61b0f leaq 0x8f0(%rbx), %r15 cmpq $0x0, 0x930(%rbx) jne 0x43886 movq %r15, %rdi callq 0x29210 movq 0x450(%rbx), %rdi movsbl %r14b, %esi movl $0x1, %edx callq 0x436fe movq %rax, 0x450(%rbx) movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x4389f movq %r15, %rdi callq 0x291d0 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x61b30 leaq 0x8f0(%rbx), %r15 cmpq $0x0, 0x930(%rbx) jne 0x438b4 movq %r15, %rdi callq 0x29210 movq 0x450(%rbx), %rdi movsbl %r14b, %esi movl $0x1, %edx callq 0x436fe movq %rax, 0x450(%rbx) movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x438ca movq %r15, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x291d0 leaq 0x96f83(%rip), %rsi # 0xda810 movq %r15, %rdi movl $0xe1, %edx callq 0x2ebaf jmp 0x437ee leaq 0x34276a(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4381a leaq 0x96f55(%rip), %rsi # 0xda810 movq %r15, %rdi movl $0xe1, %edx callq 0x2ebaf jmp 0x4384c leaq 0x34273f(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x43874
_ma_remove_not_visible_states_with_lock: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14d, esi mov rbx, rdi xor eax, eax call trman_is_inited test al, al jz short loc_43833 xor eax, eax call trnman_lock lea r15, [rbx+8F0h] cmp qword ptr [rbx+930h], 0 jnz loc_43886 mov rdi, r15 call _pthread_mutex_lock loc_437EE: mov rdi, [rbx+450h] movsx esi, r14b mov edx, 1 call _ma_remove_not_visible_states mov [rbx+450h], rax mov rdi, [rbx+930h] test rdi, rdi jnz loc_4389F loc_4381A: mov rdi, r15 call _pthread_mutex_unlock xor eax, eax add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp trnman_unlock loc_43833: lea r15, [rbx+8F0h] cmp qword ptr [rbx+930h], 0 jnz short loc_438B4 mov rdi, r15 call _pthread_mutex_lock loc_4384C: mov rdi, [rbx+450h] movsx esi, r14b mov edx, 1 call _ma_remove_not_visible_states mov [rbx+450h], rax mov rdi, [rbx+930h] test rdi, rdi jnz short loc_438CA loc_43874: mov rdi, r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_43886: lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 0E1h call psi_mutex_lock jmp loc_437EE loc_4389F: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_4381A loc_438B4: lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 0E1h call psi_mutex_lock jmp short loc_4384C loc_438CA: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_43874
long long ma_remove_not_visible_states_with_lock(long long a1, char a2) { if ( (unsigned __int8)trman_is_inited(a1) ) { trnman_lock(); if ( *(_QWORD *)(a1 + 2352) ) psi_mutex_lock(a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0xE1u); else pthread_mutex_lock(a1 + 2288); *(_QWORD *)(a1 + 1104) = ma_remove_not_visible_states(*(_QWORD **)(a1 + 1104), a2, 1); if ( *(_QWORD *)(a1 + 2352) ) PSI_server[44](); pthread_mutex_unlock(a1 + 2288); return trnman_unlock(); } else { if ( *(_QWORD *)(a1 + 2352) ) psi_mutex_lock(a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0xE1u); else pthread_mutex_lock(a1 + 2288); *(_QWORD *)(a1 + 1104) = ma_remove_not_visible_states(*(_QWORD **)(a1 + 1104), a2, 1); if ( *(_QWORD *)(a1 + 2352) ) PSI_server[44](); return pthread_mutex_unlock(a1 + 2288); } }
_ma_remove_not_visible_states_with_lock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,ESI MOV RBX,RDI XOR EAX,EAX CALL 0x00161b5f TEST AL,AL JZ 0x00143833 XOR EAX,EAX CALL 0x00161b0f LEA R15,[RBX + 0x8f0] CMP qword ptr [RBX + 0x930],0x0 JNZ 0x00143886 MOV RDI,R15 CALL 0x00129210 LAB_001437ee: MOV RDI,qword ptr [RBX + 0x450] MOVSX ESI,R14B MOV EDX,0x1 CALL 0x001436fe MOV qword ptr [RBX + 0x450],RAX MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x0014389f LAB_0014381a: MOV RDI,R15 CALL 0x001291d0 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00161b30 LAB_00143833: LEA R15,[RBX + 0x8f0] CMP qword ptr [RBX + 0x930],0x0 JNZ 0x001438b4 MOV RDI,R15 CALL 0x00129210 LAB_0014384c: MOV RDI,qword ptr [RBX + 0x450] MOVSX ESI,R14B MOV EDX,0x1 CALL 0x001436fe MOV qword ptr [RBX + 0x450],RAX MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x001438ca LAB_00143874: MOV RDI,R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001291d0 LAB_00143886: LEA RSI,[0x1da810] MOV RDI,R15 MOV EDX,0xe1 CALL 0x0012ebaf JMP 0x001437ee LAB_0014389f: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014381a LAB_001438b4: LEA RSI,[0x1da810] MOV RDI,R15 MOV EDX,0xe1 CALL 0x0012ebaf JMP 0x0014384c LAB_001438ca: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00143874
void _ma_remove_not_visible_states_with_lock(long param_1,char param_2) { pthread_mutex_t *ppVar1; char cVar2; int8 uVar3; cVar2 = trman_is_inited(); if (cVar2 != '\0') { trnman_lock(); ppVar1 = (pthread_mutex_t *)(param_1 + 0x8f0); if (*(long *)(param_1 + 0x930) == 0) { pthread_mutex_lock(ppVar1); } else { psi_mutex_lock(ppVar1,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",0xe1 ); } uVar3 = _ma_remove_not_visible_states(*(int8 *)(param_1 + 0x450),(int)param_2,1); *(int8 *)(param_1 + 0x450) = uVar3; if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar1); trnman_unlock(); return; } ppVar1 = (pthread_mutex_t *)(param_1 + 0x8f0); if (*(long *)(param_1 + 0x930) == 0) { pthread_mutex_lock(ppVar1); } else { psi_mutex_lock(ppVar1,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",0xe1); } uVar3 = _ma_remove_not_visible_states(*(int8 *)(param_1 + 0x450),(int)param_2,1); *(int8 *)(param_1 + 0x450) = uVar3; if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar1); return; }
51,728
blst_p1_to_affine
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e1.c
void blst_p1_to_affine(POINTonE1_affine *out, const POINTonE1 *a) { POINTonE1_to_affine(out, a); }
O1
c
blst_p1_to_affine: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x98, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsi), %rdi leaq 0x26791(%rip), %rsi # 0x3fb58 movl $0x30, %edx callq 0x306c0 testq %rax, %rax jne 0x193eb leaq -0xa8(%rbp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x192c4 movq %r15, %r14 movl $0xc, %ecx movq %rbx, %rdi movq %r14, %rsi rep movsq (%rsi), %es:(%rdi) addq $0x98, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
blst_p1_to_affine: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 98h mov r14, rsi mov rbx, rdi lea rdi, [rsi+60h] lea rsi, BLS12_381_Rx mov edx, 30h ; '0' call vec_is_equal_16x test rax, rax jnz short loc_193EB lea r15, [rbp+var_A8] mov rdi, r15 mov rsi, r14 call POINTonE1_from_Jacobian mov r14, r15 loc_193EB: mov ecx, 0Ch mov rdi, rbx mov rsi, r14 rep movsq add rsp, 98h pop rbx pop r14 pop r15 pop rbp retn
long long blst_p1_to_affine(void *a1, long long a2) { _BYTE *v2; // r14 long long result; // rax _BYTE v4[168]; // [rsp+8h] [rbp-A8h] BYREF v2 = (_BYTE *)a2; result = vec_is_equal_16x(a2 + 96, &BLS12_381_Rx, 48LL); if ( !result ) { result = POINTonE1_from_Jacobian((long long)v4, a2); v2 = v4; } qmemcpy(a1, v2, 0x60uLL); return result; }
blst_p1_to_affine: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x98 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSI + 0x60] LEA RSI,[0x13fb58] MOV EDX,0x30 CALL 0x001306c0 TEST RAX,RAX JNZ 0x001193eb LEA R15,[RBP + -0xa8] MOV RDI,R15 MOV RSI,R14 CALL 0x001192c4 MOV R14,R15 LAB_001193eb: MOV ECX,0xc MOV RDI,RBX MOV RSI,R14 MOVSQ.REP RDI,RSI ADD RSP,0x98 POP RBX POP R14 POP R15 POP RBP RET
void blst_p1_to_affine(int8 *param_1,int8 *param_2) { long lVar1; int8 *puVar2; byte bVar3; int8 local_b0 [18]; bVar3 = 0; lVar1 = vec_is_equal_16x(param_2 + 0xc,&BLS12_381_Rx,0x30); puVar2 = param_2; if (lVar1 == 0) { puVar2 = local_b0; POINTonE1_from_Jacobian(puVar2,param_2); } for (lVar1 = 0xc; lVar1 != 0; lVar1 = lVar1 + -1) { *param_1 = *puVar2; puVar2 = puVar2 + (ulong)bVar3 * -2 + 1; param_1 = param_1 + (ulong)bVar3 * -2 + 1; } return; }
51,729
int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
int LoopPatchBuilder::convertSourcePatch(SourcePatch const & sourcePatch, PatchDescriptor::Type patchType, SparseMatrix<REAL> & matrix) const { assert(_schemeType == Sdc::SCHEME_LOOP); if (patchType == PatchDescriptor::LOOP) { convertToLoop<REAL>(sourcePatch, matrix); } else if (patchType == PatchDescriptor::TRIANGLES) { convertToLinear<REAL>(sourcePatch, matrix); } else if (patchType == PatchDescriptor::GREGORY_TRIANGLE) { convertToGregory<REAL>(sourcePatch, matrix); } else { assert("Unknown or unsupported patch type" == 0); } return matrix.GetNumRows(); }
O0
cpp
int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax cmpl $0x2, 0x1c(%rax) jne 0x11d583 jmp 0x11d5a2 leaq 0xd14ee(%rip), %rdi # 0x1eea78 leaq 0xd1507(%rip), %rsi # 0x1eea98 movl $0x744, %edx # imm = 0x744 leaq 0xd1cd3(%rip), %rcx # 0x1ef270 callq 0xc9440 cmpl $0x5, -0x14(%rbp) jne 0x11d5b7 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xc7940 jmp 0x11d604 cmpl $0x4, -0x14(%rbp) jne 0x11d5cc movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xd6c60 jmp 0x11d602 cmpl $0xa, -0x14(%rbp) jne 0x11d5e1 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xc71c0 jmp 0x11d600 leaq 0xcf1ef(%rip), %rdi # 0x1ec7d7 leaq 0xd14a9(%rip), %rsi # 0x1eea98 movl $0x74d, %edx # imm = 0x74D leaq 0xd1c75(%rip), %rcx # 0x1ef270 callq 0xc9440 jmp 0x11d602 jmp 0x11d604 movq -0x20(%rbp), %rdi callq 0xd3550 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK10OpenSubdiv6v3_6_03Far16LoopPatchBuilder18convertSourcePatchIdEEiRKNS1_11SourcePatchENS1_15PatchDescriptor4TypeERNS1_12SparseMatrixIT_EE: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov rax, [rbp+var_8] cmp dword ptr [rax+1Ch], 2 jnz short loc_11D583 jmp short loc_11D5A2 loc_11D583: lea rdi, aSchemetypeSdcS_0; "_schemeType == Sdc::SCHEME_LOOP" lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... mov edx, 744h lea rcx, aIntOpensubdivV_12; "int OpenSubdiv::v3_6_0::Far::LoopPatchB"... call ___assert_fail loc_11D5A2: cmp [rbp+var_14], 5 jnz short loc_11D5B7 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call __ZN10OpenSubdiv6v3_6_03Far13convertToLoopIdEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToLoop<double>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short loc_11D604 loc_11D5B7: cmp [rbp+var_14], 4 jnz short loc_11D5CC mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call __ZN10OpenSubdiv6v3_6_03Far15convertToLinearIdEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToLinear<double>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short loc_11D602 loc_11D5CC: cmp [rbp+var_14], 0Ah jnz short loc_11D5E1 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call __ZN10OpenSubdiv6v3_6_03Far16convertToGregoryIdEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToGregory<double>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short loc_11D600 loc_11D5E1: lea rdi, aUnknownOrUnsup; "\"Unknown or unsupported patch type\" ="... lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... mov edx, 74Dh lea rcx, aIntOpensubdivV_12; "int OpenSubdiv::v3_6_0::Far::LoopPatchB"... call ___assert_fail loc_11D600: jmp short $+2 loc_11D602: jmp short $+2 loc_11D604: mov rdi, [rbp+var_20] call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE10GetNumRowsEv; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumRows(void) add rsp, 20h pop rbp retn
long long OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch<double>( long long a1, long long a2, int a3, long long a4) { if ( *(_DWORD *)(a1 + 28) != 2 ) __assert_fail( "_schemeType == Sdc::SCHEME_LOOP", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1860LL, "int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch(const SourcePatch &, PatchDescriptor::Type, Spar" "seMatrix<REAL> &) const [REAL = double]"); switch ( a3 ) { case 5: OpenSubdiv::v3_6_0::Far::convertToLoop<double>(a2, a4); break; case 4: OpenSubdiv::v3_6_0::Far::convertToLinear<double>(a2, a4); break; case 10: OpenSubdiv::v3_6_0::Far::convertToGregory<double>(a2, a4); break; default: __assert_fail( "\"Unknown or unsupported patch type\" == 0", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1869LL, "int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch(const SourcePatch &, PatchDescriptor::Type, Sp" "arseMatrix<REAL> &) const [REAL = double]"); } return OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumRows(a4); }
51,730
int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
int LoopPatchBuilder::convertSourcePatch(SourcePatch const & sourcePatch, PatchDescriptor::Type patchType, SparseMatrix<REAL> & matrix) const { assert(_schemeType == Sdc::SCHEME_LOOP); if (patchType == PatchDescriptor::LOOP) { convertToLoop<REAL>(sourcePatch, matrix); } else if (patchType == PatchDescriptor::TRIANGLES) { convertToLinear<REAL>(sourcePatch, matrix); } else if (patchType == PatchDescriptor::GREGORY_TRIANGLE) { convertToGregory<REAL>(sourcePatch, matrix); } else { assert("Unknown or unsupported patch type" == 0); } return matrix.GetNumRows(); }
O2
cpp
int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const: pushq %rbx cmpl $0x2, 0x1c(%rdi) jne 0x6be2e movq %rcx, %rbx cmpl $0x4, %edx je 0x6be1f cmpl $0xa, %edx je 0x6be12 cmpl $0x5, %edx jne 0x6be4d movq %rsi, %rdi movq %rbx, %rsi callq 0x50910 jmp 0x6be2a movq %rsi, %rdi movq %rbx, %rsi callq 0x50620 jmp 0x6be2a movq %rsi, %rdi movq %rbx, %rsi callq 0x55960 movl (%rbx), %eax popq %rbx retq leaq 0x54e73(%rip), %rdi # 0xc0ca8 leaq 0x54e8c(%rip), %rsi # 0xc0cc8 leaq 0x5565d(%rip), %rcx # 0xc14a0 movl $0x744, %edx # imm = 0x744 callq 0x512a0 leaq 0x52a03(%rip), %rdi # 0xbe857 leaq 0x54e6d(%rip), %rsi # 0xc0cc8 leaq 0x5563e(%rip), %rcx # 0xc14a0 movl $0x74d, %edx # imm = 0x74D callq 0x512a0
_ZNK10OpenSubdiv6v3_6_03Far16LoopPatchBuilder18convertSourcePatchIdEEiRKNS1_11SourcePatchENS1_15PatchDescriptor4TypeERNS1_12SparseMatrixIT_EE: push rbx; int cmp dword ptr [rdi+1Ch], 2 jnz short loc_6BE2E mov rbx, rcx cmp edx, 4 jz short loc_6BE1F cmp edx, 0Ah jz short loc_6BE12 cmp edx, 5 jnz short loc_6BE4D mov rdi, rsi mov rsi, rbx call __ZN10OpenSubdiv6v3_6_03Far13convertToLoopIdEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToLoop<double>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short loc_6BE2A loc_6BE12: mov rdi, rsi mov rsi, rbx call __ZN10OpenSubdiv6v3_6_03Far16convertToGregoryIdEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToGregory<double>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short loc_6BE2A loc_6BE1F: mov rdi, rsi; int mov rsi, rbx; int call __ZN10OpenSubdiv6v3_6_03Far15convertToLinearIdEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToLinear<double>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_6BE2A: mov eax, [rbx] pop rbx retn loc_6BE2E: lea rdi, aSchemetypeSdcS_0; "_schemeType == Sdc::SCHEME_LOOP" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aIntOpensubdivV_12; "int OpenSubdiv::v3_6_0::Far::LoopPatchB"... mov edx, 744h call ___assert_fail loc_6BE4D: lea rdi, aUnknownOrUnsup; "\"Unknown or unsupported patch type\" ="... lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aIntOpensubdivV_12; "int OpenSubdiv::v3_6_0::Far::LoopPatchB"... mov edx, 74Dh call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch<double>( long long a1, long long a2, int a3, unsigned int *a4) { if ( *(_DWORD *)(a1 + 28) != 2 ) __assert_fail( "_schemeType == Sdc::SCHEME_LOOP", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1860LL, "int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch(const SourcePatch &, PatchDescriptor::Type, Spar" "seMatrix<REAL> &) const [REAL = double]"); switch ( a3 ) { case 4: OpenSubdiv::v3_6_0::Far::convertToLinear<double>(a2, a4); break; case 10: OpenSubdiv::v3_6_0::Far::convertToGregory<double>(a2, a4); break; case 5: OpenSubdiv::v3_6_0::Far::convertToLoop<double>(a2, a4); break; default: __assert_fail( "\"Unknown or unsupported patch type\" == 0", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1869LL, "int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch(const SourcePatch &, PatchDescriptor::Type, Sp" "arseMatrix<REAL> &) const [REAL = double]"); } return *a4; }
convertSourcePatch<double>: PUSH RBX CMP dword ptr [RDI + 0x1c],0x2 JNZ 0x0016be2e MOV RBX,RCX CMP EDX,0x4 JZ 0x0016be1f CMP EDX,0xa JZ 0x0016be12 CMP EDX,0x5 JNZ 0x0016be4d MOV RDI,RSI MOV RSI,RBX CALL 0x00150910 JMP 0x0016be2a LAB_0016be12: MOV RDI,RSI MOV RSI,RBX CALL 0x00150620 JMP 0x0016be2a LAB_0016be1f: MOV RDI,RSI MOV RSI,RBX CALL 0x00155960 LAB_0016be2a: MOV EAX,dword ptr [RBX] POP RBX RET LAB_0016be2e: LEA RDI,[0x1c0ca8] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c14a0] MOV EDX,0x744 CALL 0x001512a0 LAB_0016be4d: LEA RDI,[0x1be857] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c14a0] MOV EDX,0x74d CALL 0x001512a0
/* int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch<double>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const */ int __thiscall OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch<double> (LoopPatchBuilder *this,SourcePatch *param_1,int param_3,SparseMatrix *param_4) { if (*(int *)(this + 0x1c) != 2) { /* WARNING: Subroutine does not return */ __assert_fail("_schemeType == Sdc::SCHEME_LOOP", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x744, "int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch(const SourcePatch &, PatchDescriptor::Type, SparseMatrix<REAL> &) const [REAL = double]" ); } if (param_3 == 4) { convertToLinear<double>(param_1,param_4); } else if (param_3 == 10) { convertToGregory<double>(param_1,param_4); } else { if (param_3 != 5) { /* WARNING: Subroutine does not return */ __assert_fail("\"Unknown or unsupported patch type\" == 0", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x74d, "int OpenSubdiv::v3_6_0::Far::LoopPatchBuilder::convertSourcePatch(const SourcePatch &, PatchDescriptor::Type, SparseMatrix<REAL> &) const [REAL = double]" ); } convertToLoop<double>(param_1,param_4); } return *(int *)param_4; }
51,731
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
Value get_named(const std::string & name) { for (const auto & [key, value] : kwargs) { if (key == name) return value; } return Value(); }
O2
cpp
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rdi, %rbx movq 0x18(%rsi), %r14 movq 0x20(%rsi), %r12 cmpq %r12, %r14 je 0x8c18c movq %r14, %rdi movq %r15, %rsi callq 0x46506 testb %al, %al jne 0x8c196 addq $0x70, %r14 jmp 0x8c172 movq %rbx, %rdi callq 0x71dce jmp 0x8c1a5 addq $0x20, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x74468 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja14ArgumentsValue9get_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx push rax mov r15, rdx mov rbx, rdi mov r14, [rsi+18h] mov r12, [rsi+20h] loc_8C172: cmp r14, r12 jz short loc_8C18C mov rdi, r14 mov rsi, r15 call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, al jnz short loc_8C196 add r14, 70h ; 'p' jmp short loc_8C172 loc_8C18C: mov rdi, rbx; this call _ZN5minja5ValueC2Ev; minja::Value::Value(void) jmp short loc_8C1A5 loc_8C196: add r14, 20h ; ' ' mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) loc_8C1A5: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
minja::Value * minja::ArgumentsValue::get_named(minja::Value *this, long long a2, _QWORD *a3) { _QWORD *v4; // r14 _QWORD *v5; // r12 v4 = *(_QWORD **)(a2 + 24); v5 = *(_QWORD **)(a2 + 32); while ( 1 ) { if ( v4 == v5 ) { minja::Value::Value(this); return this; } if ( std::operator==<char>(v4, a3) ) break; v4 += 14; } minja::Value::Value(this, (const minja::Value *)(v4 + 4)); return this; }
get_named: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV RBX,RDI MOV R14,qword ptr [RSI + 0x18] MOV R12,qword ptr [RSI + 0x20] LAB_0018c172: CMP R14,R12 JZ 0x0018c18c MOV RDI,R14 MOV RSI,R15 CALL 0x00146506 TEST AL,AL JNZ 0x0018c196 ADD R14,0x70 JMP 0x0018c172 LAB_0018c18c: MOV RDI,RBX CALL 0x00171dce JMP 0x0018c1a5 LAB_0018c196: ADD R14,0x20 MOV RDI,RBX MOV RSI,R14 CALL 0x00174468 LAB_0018c1a5: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::ArgumentsValue::get_named(std::__cxx11::string const&) */ string * minja::ArgumentsValue::get_named(string *param_1) { string *psVar1; char cVar2; string *in_RDX; long in_RSI; string *psVar3; psVar3 = *(string **)(in_RSI + 0x18); psVar1 = *(string **)(in_RSI + 0x20); while( true ) { if (psVar3 == psVar1) { Value::Value((Value *)param_1); return param_1; } cVar2 = std::operator==(psVar3,in_RDX); if (cVar2 != '\0') break; psVar3 = psVar3 + 0x70; } Value::Value((Value *)param_1,(Value *)(psVar3 + 0x20)); return param_1; }
51,732
mz_zip_add_mem_to_archive_file_in_place_v2
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_add_mem_to_archive_file_in_place_v2( const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_zip_error *pErr) { mz_bool status, created_new_archive = MZ_FALSE; mz_zip_archive zip_archive; struct MZ_FILE_STAT_STRUCT file_stat; mz_zip_error actual_err = MZ_ZIP_NO_ERROR; mz_zip_zero_struct(&zip_archive); if ((int)level_and_flags < 0) level_and_flags = MZ_DEFAULT_LEVEL; if ((!pZip_filename) || (!pArchive_name) || ((buf_size) && (!pBuf)) || ((comment_size) && (!pComment)) || ((level_and_flags & 0xF) > MZ_UBER_COMPRESSION)) { if (pErr) *pErr = MZ_ZIP_INVALID_PARAMETER; return MZ_FALSE; } if (!mz_zip_writer_validate_archive_name(pArchive_name)) { if (pErr) *pErr = MZ_ZIP_INVALID_FILENAME; return MZ_FALSE; } /* Important: The regular non-64 bit version of stat() can fail here if the * file is very large, which could cause the archive to be overwritten. */ /* So be sure to compile with _LARGEFILE64_SOURCE 1 */ if (MZ_FILE_STAT(pZip_filename, &file_stat) != 0) { /* Create a new archive. */ if (!mz_zip_writer_init_file_v2(&zip_archive, pZip_filename, 0, level_and_flags)) { if (pErr) *pErr = zip_archive.m_last_error; return MZ_FALSE; } created_new_archive = MZ_TRUE; } else { /* Append to an existing archive. */ if (!mz_zip_reader_init_file_v2( &zip_archive, pZip_filename, level_and_flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, 0)) { if (pErr) *pErr = zip_archive.m_last_error; return MZ_FALSE; } if (!mz_zip_writer_init_from_reader_v2(&zip_archive, pZip_filename, level_and_flags)) { if (pErr) *pErr = zip_archive.m_last_error; mz_zip_reader_end_internal(&zip_archive, MZ_FALSE); return MZ_FALSE; } } status = mz_zip_writer_add_mem_ex(&zip_archive, pArchive_name, pBuf, buf_size, pComment, comment_size, level_and_flags, 0, 0); actual_err = zip_archive.m_last_error; /* Always finalize, even if adding failed for some reason, so we have a valid * central directory. (This may not always succeed, but we can try.) */ if (!mz_zip_writer_finalize_archive(&zip_archive)) { if (!actual_err) actual_err = zip_archive.m_last_error; status = MZ_FALSE; } if (!mz_zip_writer_end_internal(&zip_archive, status)) { if (!actual_err) actual_err = zip_archive.m_last_error; status = MZ_FALSE; } if ((!status) && (created_new_archive)) { /* It's a new archive and something went wrong, so just delete it. */ int ignoredStatus = MZ_DELETE_FILE(pZip_filename); (void)ignoredStatus; } if (pErr) *pErr = actual_err; return status; }
O1
c
mz_zip_add_mem_to_archive_file_in_place_v2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x158, %rsp # imm = 0x158 movq %rcx, %r12 movq %rdx, %r13 movq 0x198(%rsp), %rdx movl 0x190(%rsp), %eax xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0xb0(%rsp) testl %eax, %eax movl $0x6, %ebp cmovnsl %eax, %ebp testq %rdi, %rdi sete %al testq %rsi, %rsi sete %cl orb %al, %cl jne 0x8a25d testq %r12, %r12 setne %al testq %r13, %r13 sete %cl testb %al, %cl jne 0x8a25d testw %r9w, %r9w sete %al testq %r8, %r8 setne %cl orb %al, %cl movl %ebp, %eax andl $0xf, %eax cmpl $0xb, %eax setb %al testb %al, %cl jne 0x8a280 xorl %r14d, %r14d testq %rdx, %rdx je 0x8a26b movl $0x18, (%rdx) movl %r14d, %eax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rsi, %r15 cmpb $0x2f, (%rsi) jne 0x8a298 xorl %r14d, %r14d testq %rdx, %rdx je 0x8a26b movl $0x19, (%rdx) jmp 0x8a26b movq %rdi, %rbx movl %r9d, 0x44(%rsp) movq %r8, 0x48(%rsp) leaq 0xc8(%rsp), %rsi callq 0xa540 movl %eax, 0x40(%rsp) testl %eax, %eax je 0x8a2d7 xorl %r14d, %r14d leaq 0x50(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movl %ebp, %ecx callq 0x86a0f testl %eax, %eax jne 0x8a313 jmp 0x8a3be movl %ebp, %edx orl $0x800, %edx # imm = 0x800 xorl %r14d, %r14d leaq 0x50(%rsp), %rdi movq %rbx, %rsi xorl %ecx, %ecx xorl %r8d, %r8d callq 0x83e47 testl %eax, %eax je 0x8a3be leaq 0x50(%rsp), %rdi movq %rbx, %rsi movl %ebp, %edx callq 0x86c44 testl %eax, %eax je 0x8a3da xorl %eax, %eax movl %eax, 0x38(%rsp) movq %rax, 0x30(%rsp) movl %eax, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %eax, 0x10(%rsp) movq %rax, 0x8(%rsp) movl %ebp, (%rsp) movzwl 0x44(%rsp), %r9d leaq 0x50(%rsp), %rbp movq %rbp, %rdi movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx movq 0x48(%rsp), %r8 callq 0x86f42 movl %eax, %r14d movl 0x1c(%rbp), %r15d movq %rbp, %rdi callq 0x89d74 testl %eax, %eax cmovel %eax, %r14d orl %r15d, %eax jne 0x8a376 movl 0x6c(%rsp), %r15d movq %rbp, %rdi movl %r14d, %esi callq 0x868d1 testl %eax, %eax cmovel %eax, %r14d orl %r15d, %eax jne 0x8a391 movl 0x6c(%rsp), %r15d cmpl $0x0, 0x40(%rsp) je 0x8a3a5 testl %r14d, %r14d jne 0x8a3a5 movq %rbx, %rdi callq 0xab20 movq 0x198(%rsp), %rax testq %rax, %rax je 0x8a26b movl %r15d, (%rax) jmp 0x8a26b movq 0x198(%rsp), %rcx testq %rcx, %rcx je 0x8a26b movl 0x6c(%rsp), %eax movl %eax, (%rcx) jmp 0x8a26b movq 0x198(%rsp), %rcx testq %rcx, %rcx je 0x8a3ed movl 0x6c(%rsp), %eax movl %eax, (%rcx) leaq 0x50(%rsp), %rdi xorl %r14d, %r14d xorl %esi, %esi callq 0x83479 jmp 0x8a26b
mz_zip_add_mem_to_archive_file_in_place_v2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 158h mov r12, rcx mov r13, rdx mov rdx, [rsp+188h+arg_8] mov eax, [rsp+188h+arg_0] xorps xmm0, xmm0 movaps [rsp+188h+var_138], xmm0 movaps [rsp+188h+var_128], xmm0 movaps [rsp+188h+var_118], xmm0 movaps [rsp+188h+var_108], xmm0 movaps [rsp+188h+var_F8], xmm0 movaps [rsp+188h+var_E8], xmm0 movaps [rsp+188h+var_D8], xmm0 test eax, eax mov ebp, 6 cmovns ebp, eax test rdi, rdi setz al test rsi, rsi setz cl or cl, al jnz short loc_8A25D test r12, r12 setnz al test r13, r13 setz cl test cl, al jnz short loc_8A25D test r9w, r9w setz al test r8, r8 setnz cl or cl, al mov eax, ebp and eax, 0Fh cmp eax, 0Bh setb al test cl, al jnz short loc_8A280 loc_8A25D: xor r14d, r14d test rdx, rdx jz short loc_8A26B mov dword ptr [rdx], 18h loc_8A26B: mov eax, r14d add rsp, 158h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8A280: mov r15, rsi cmp byte ptr [rsi], 2Fh ; '/' jnz short loc_8A298 xor r14d, r14d test rdx, rdx jz short loc_8A26B mov dword ptr [rdx], 19h jmp short loc_8A26B loc_8A298: mov rbx, rdi mov [rsp+188h+var_144], r9d mov [rsp+188h+var_140], r8 lea rsi, [rsp+188h+var_C0] call _stat mov [rsp+188h+var_148], eax test eax, eax jz short loc_8A2D7 xor r14d, r14d lea rdi, [rsp+188h+var_138] mov rsi, rbx xor edx, edx mov ecx, ebp call mz_zip_writer_init_file_v2 test eax, eax jnz short loc_8A313 jmp loc_8A3BE loc_8A2D7: mov edx, ebp or edx, 800h xor r14d, r14d lea rdi, [rsp+188h+var_138] mov rsi, rbx xor ecx, ecx xor r8d, r8d call mz_zip_reader_init_file_v2 test eax, eax jz loc_8A3BE lea rdi, [rsp+188h+var_138] mov rsi, rbx mov edx, ebp call mz_zip_writer_init_from_reader_v2 test eax, eax jz loc_8A3DA loc_8A313: xor eax, eax mov [rsp+188h+var_150], eax mov [rsp+188h+var_158], rax mov [rsp+188h+var_160], eax xorps xmm0, xmm0 movups [rsp+188h+var_170], xmm0 mov [rsp+188h+var_178], eax mov [rsp+188h+var_180], rax mov [rsp+188h+var_188], ebp movzx r9d, word ptr [rsp+188h+var_144] lea rbp, [rsp+188h+var_138] mov rdi, rbp mov rsi, r15 mov rdx, r13 mov rcx, r12 mov r8, [rsp+188h+var_140] call mz_zip_writer_add_mem_ex_v2 mov r14d, eax mov r15d, [rbp+1Ch] mov rdi, rbp call mz_zip_writer_finalize_archive test eax, eax cmovz r14d, eax or eax, r15d jnz short loc_8A376 mov r15d, dword ptr [rsp+188h+var_128+0Ch] loc_8A376: mov rdi, rbp mov esi, r14d call mz_zip_writer_end_internal test eax, eax cmovz r14d, eax or eax, r15d jnz short loc_8A391 mov r15d, dword ptr [rsp+188h+var_128+0Ch] loc_8A391: cmp [rsp+188h+var_148], 0 jz short loc_8A3A5 test r14d, r14d jnz short loc_8A3A5 mov rdi, rbx call _remove loc_8A3A5: mov rax, [rsp+188h+arg_8] test rax, rax jz loc_8A26B mov [rax], r15d jmp loc_8A26B loc_8A3BE: mov rcx, [rsp+188h+arg_8] test rcx, rcx jz loc_8A26B mov eax, dword ptr [rsp+188h+var_128+0Ch] mov [rcx], eax jmp loc_8A26B loc_8A3DA: mov rcx, [rsp+188h+arg_8] test rcx, rcx jz short loc_8A3ED mov eax, dword ptr [rsp+188h+var_128+0Ch] mov [rcx], eax loc_8A3ED: lea rdi, [rsp+188h+var_138] xor r14d, r14d xor esi, esi call mz_zip_reader_end_internal jmp loc_8A26B
long long mz_zip_add_mem_to_archive_file_in_place_v2( long long a1, _BYTE *a2, _BYTE *a3, unsigned long long a4, long long a5, unsigned __int16 a6, int a7, _DWORD *a8) { int v10; // ebp unsigned int v11; // r14d int v13; // r15d int v14; // eax int v15; // eax int v16; // [rsp+40h] [rbp-148h] __int128 v19; // [rsp+50h] [rbp-138h] BYREF __int128 v20; // [rsp+60h] [rbp-128h] __int128 v21; // [rsp+70h] [rbp-118h] __int128 v22; // [rsp+80h] [rbp-108h] __int128 v23; // [rsp+90h] [rbp-F8h] __int128 v24; // [rsp+A0h] [rbp-E8h] __int128 v25; // [rsp+B0h] [rbp-D8h] _BYTE v26[192]; // [rsp+C8h] [rbp-C0h] BYREF v19 = 0LL; v20 = 0LL; v21 = 0LL; v22 = 0LL; v23 = 0LL; v24 = 0LL; v25 = 0LL; v10 = 6; if ( a7 >= 0 ) v10 = a7; if ( a1 == 0 || a2 == 0LL || a4 != 0 && a3 == 0LL || (v10 & 0xFu) >= 0xB || a6 != 0 && a5 == 0 ) { v11 = 0; if ( a8 ) *a8 = 24; return v11; } if ( *a2 == 47 ) { v11 = 0; if ( a8 ) *a8 = 25; return v11; } v16 = stat(a1, v26); if ( v16 ) { v11 = 0; if ( !(unsigned int)mz_zip_writer_init_file_v2((long long)&v19, a1, 0LL, v10) ) { LABEL_30: if ( a8 ) *a8 = HIDWORD(v20); return v11; } LABEL_17: v11 = mz_zip_writer_add_mem_ex_v2((long long)&v19, a2, a3, a4, a5, a6, v10, 0LL, 0, 0LL, 0LL, 0, 0LL, 0); v13 = HIDWORD(v20); v14 = mz_zip_writer_finalize_archive((long long *)&v19); if ( !v14 ) v11 = 0; if ( !(v13 | v14) ) v13 = HIDWORD(v20); v15 = mz_zip_writer_end_internal((long long)&v19, v11); if ( !v15 ) v11 = 0; if ( !(v13 | v15) ) v13 = HIDWORD(v20); if ( v16 && !v11 ) remove(a1); if ( a8 ) *a8 = v13; return v11; } v11 = 0; if ( !(unsigned int)mz_zip_reader_init_file_v2((long long)&v19, a1, v10 | 0x800u, 0LL, 0LL) ) goto LABEL_30; if ( (unsigned int)mz_zip_writer_init_from_reader_v2((long long)&v19, a1, v10) ) goto LABEL_17; if ( a8 ) *a8 = HIDWORD(v20); v11 = 0; mz_zip_reader_end_internal((long long)&v19, 0); return v11; }
51,733
mz_zip_add_mem_to_archive_file_in_place_v2
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_add_mem_to_archive_file_in_place_v2( const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_zip_error *pErr) { mz_bool status, created_new_archive = MZ_FALSE; mz_zip_archive zip_archive; struct MZ_FILE_STAT_STRUCT file_stat; mz_zip_error actual_err = MZ_ZIP_NO_ERROR; mz_zip_zero_struct(&zip_archive); if ((int)level_and_flags < 0) level_and_flags = MZ_DEFAULT_LEVEL; if ((!pZip_filename) || (!pArchive_name) || ((buf_size) && (!pBuf)) || ((comment_size) && (!pComment)) || ((level_and_flags & 0xF) > MZ_UBER_COMPRESSION)) { if (pErr) *pErr = MZ_ZIP_INVALID_PARAMETER; return MZ_FALSE; } if (!mz_zip_writer_validate_archive_name(pArchive_name)) { if (pErr) *pErr = MZ_ZIP_INVALID_FILENAME; return MZ_FALSE; } /* Important: The regular non-64 bit version of stat() can fail here if the * file is very large, which could cause the archive to be overwritten. */ /* So be sure to compile with _LARGEFILE64_SOURCE 1 */ if (MZ_FILE_STAT(pZip_filename, &file_stat) != 0) { /* Create a new archive. */ if (!mz_zip_writer_init_file_v2(&zip_archive, pZip_filename, 0, level_and_flags)) { if (pErr) *pErr = zip_archive.m_last_error; return MZ_FALSE; } created_new_archive = MZ_TRUE; } else { /* Append to an existing archive. */ if (!mz_zip_reader_init_file_v2( &zip_archive, pZip_filename, level_and_flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, 0)) { if (pErr) *pErr = zip_archive.m_last_error; return MZ_FALSE; } if (!mz_zip_writer_init_from_reader_v2(&zip_archive, pZip_filename, level_and_flags)) { if (pErr) *pErr = zip_archive.m_last_error; mz_zip_reader_end_internal(&zip_archive, MZ_FALSE); return MZ_FALSE; } } status = mz_zip_writer_add_mem_ex(&zip_archive, pArchive_name, pBuf, buf_size, pComment, comment_size, level_and_flags, 0, 0); actual_err = zip_archive.m_last_error; /* Always finalize, even if adding failed for some reason, so we have a valid * central directory. (This may not always succeed, but we can try.) */ if (!mz_zip_writer_finalize_archive(&zip_archive)) { if (!actual_err) actual_err = zip_archive.m_last_error; status = MZ_FALSE; } if (!mz_zip_writer_end_internal(&zip_archive, status)) { if (!actual_err) actual_err = zip_archive.m_last_error; status = MZ_FALSE; } if ((!status) && (created_new_archive)) { /* It's a new archive and something went wrong, so just delete it. */ int ignoredStatus = MZ_DELETE_FILE(pZip_filename); (void)ignoredStatus; } if (pErr) *pErr = actual_err; return status; }
O2
c
mz_zip_add_mem_to_archive_file_in_place_v2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 movq %rcx, %r12 movq %rdx, %r13 movq 0x158(%rsp), %rdx movl 0x150(%rsp), %eax xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x70(%rsp) testl %eax, %eax pushq $0x6 popq %rbp cmovnsl %eax, %ebp testq %rdi, %rdi sete %al testq %rsi, %rsi sete %cl orb %al, %cl jne 0x6444c testq %r12, %r12 setne %al testq %r13, %r13 sete %cl testb %al, %cl jne 0x6444c testw %r9w, %r9w sete %al testq %r8, %r8 setne %cl orb %al, %cl movl %ebp, %eax andl $0xf, %eax cmpl $0xb, %eax setb %al testb %al, %cl jne 0x6446f xorl %r14d, %r14d testq %rdx, %rdx je 0x6445a movl $0x18, (%rdx) movl %r14d, %eax addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rsi, %r15 cmpb $0x2f, (%rsi) jne 0x64487 xorl %r14d, %r14d testq %rdx, %rdx je 0x6445a movl $0x19, (%rdx) jmp 0x6445a movq %rdi, %rbx movl %r9d, 0x4(%rsp) movq %r8, 0x8(%rsp) leaq 0x88(%rsp), %rsi callq 0xa550 movl %eax, (%rsp) testl %eax, %eax je 0x644c5 xorl %r14d, %r14d leaq 0x10(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movl %ebp, %ecx callq 0x61033 testl %eax, %eax jne 0x64501 jmp 0x64590 movl %ebp, %edx orl $0x800, %edx # imm = 0x800 xorl %r14d, %r14d leaq 0x10(%rsp), %rdi movq %rbx, %rsi xorl %ecx, %ecx xorl %r8d, %r8d callq 0x5e5e1 testl %eax, %eax je 0x64590 leaq 0x10(%rsp), %rdi movq %rbx, %rsi movl %ebp, %edx callq 0x61233 testl %eax, %eax je 0x645ac subq $0x8, %rsp movzwl 0xc(%rsp), %r9d leaq 0x18(%rsp), %rdi movq %r15, %rsi movq %rdi, %r15 movq %r13, %rdx movq %r12, %rcx movq 0x10(%rsp), %r8 pushq $0x0 pushq $0x0 pushq %rbp callq 0x614d5 addq $0x20, %rsp movl %eax, %r14d movl 0x1c(%r15), %ebp movq %r15, %rdi callq 0x63f48 testl %eax, %eax cmovel %eax, %r14d orl %ebp, %eax jne 0x6454c movl 0x2c(%rsp), %ebp movq %r15, %rdi movl %r14d, %esi callq 0x60f0f testl %eax, %eax cmovel %eax, %r14d orl %ebp, %eax jne 0x64565 movl 0x2c(%rsp), %ebp cmpl $0x0, (%rsp) je 0x64578 testl %r14d, %r14d jne 0x64578 movq %rbx, %rdi callq 0xaaf0 movq 0x158(%rsp), %rax testq %rax, %rax je 0x6445a movl %ebp, (%rax) jmp 0x6445a movq 0x158(%rsp), %rcx testq %rcx, %rcx je 0x6445a movl 0x2c(%rsp), %eax movl %eax, (%rcx) jmp 0x6445a movq 0x158(%rsp), %rcx testq %rcx, %rcx je 0x645bf movl 0x2c(%rsp), %eax movl %eax, (%rcx) leaq 0x10(%rsp), %rdi xorl %r14d, %r14d xorl %esi, %esi callq 0x5d92b jmp 0x6445a
mz_zip_add_mem_to_archive_file_in_place_v2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h mov r12, rcx mov r13, rdx mov rdx, [rsp+148h+arg_8] mov eax, [rsp+148h+arg_0] xorps xmm0, xmm0 movaps [rsp+148h+var_138], xmm0 movaps [rsp+148h+var_128], xmm0 movaps [rsp+148h+var_118], xmm0 movaps [rsp+148h+var_108], xmm0 movaps [rsp+148h+var_F8], xmm0 movaps [rsp+148h+var_E8], xmm0 movaps [rsp+148h+var_D8], xmm0 test eax, eax push 6 pop rbp cmovns ebp, eax test rdi, rdi setz al test rsi, rsi setz cl or cl, al jnz short loc_6444C test r12, r12 setnz al test r13, r13 setz cl test cl, al jnz short loc_6444C test r9w, r9w setz al test r8, r8 setnz cl or cl, al mov eax, ebp and eax, 0Fh cmp eax, 0Bh setb al test cl, al jnz short loc_6446F loc_6444C: xor r14d, r14d test rdx, rdx jz short loc_6445A mov dword ptr [rdx], 18h loc_6445A: mov eax, r14d add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6446F: mov r15, rsi cmp byte ptr [rsi], 2Fh ; '/' jnz short loc_64487 xor r14d, r14d test rdx, rdx jz short loc_6445A mov dword ptr [rdx], 19h jmp short loc_6445A loc_64487: mov rbx, rdi mov [rsp+148h+var_144], r9d mov [rsp+148h+var_140], r8 lea rsi, [rsp+148h+var_C0] call _stat mov [rsp+148h+var_148], eax test eax, eax jz short loc_644C5 xor r14d, r14d lea rdi, [rsp+148h+var_138] mov rsi, rbx xor edx, edx mov ecx, ebp call mz_zip_writer_init_file_v2 test eax, eax jnz short loc_64501 jmp loc_64590 loc_644C5: mov edx, ebp or edx, 800h xor r14d, r14d lea rdi, [rsp+148h+var_138] mov rsi, rbx xor ecx, ecx xor r8d, r8d call mz_zip_reader_init_file_v2 test eax, eax jz loc_64590 lea rdi, [rsp+148h+var_138] mov rsi, rbx mov edx, ebp call mz_zip_writer_init_from_reader_v2 test eax, eax jz loc_645AC loc_64501: sub rsp, 8 movzx r9d, word ptr [rsp+150h+var_144] lea rdi, [rsp+150h+var_138] mov rsi, r15 mov r15, rdi mov rdx, r13 mov rcx, r12 mov r8, [rsp+150h+var_140] push 0 push 0 push rbp call mz_zip_writer_add_mem_ex add rsp, 20h mov r14d, eax mov ebp, [r15+1Ch] mov rdi, r15 call mz_zip_writer_finalize_archive test eax, eax cmovz r14d, eax or eax, ebp jnz short loc_6454C mov ebp, dword ptr [rsp+148h+var_128+0Ch] loc_6454C: mov rdi, r15 mov esi, r14d call mz_zip_writer_end_internal test eax, eax cmovz r14d, eax or eax, ebp jnz short loc_64565 mov ebp, dword ptr [rsp+148h+var_128+0Ch] loc_64565: cmp [rsp+148h+var_148], 0 jz short loc_64578 test r14d, r14d jnz short loc_64578 mov rdi, rbx call _remove loc_64578: mov rax, [rsp+148h+arg_8] test rax, rax jz loc_6445A mov [rax], ebp jmp loc_6445A loc_64590: mov rcx, [rsp+148h+arg_8] test rcx, rcx jz loc_6445A mov eax, dword ptr [rsp+148h+var_128+0Ch] mov [rcx], eax jmp loc_6445A loc_645AC: mov rcx, [rsp+148h+arg_8] test rcx, rcx jz short loc_645BF mov eax, dword ptr [rsp+148h+var_128+0Ch] mov [rcx], eax loc_645BF: lea rdi, [rsp+148h+var_138] xor r14d, r14d xor esi, esi call mz_zip_reader_end_internal jmp loc_6445A
long long mz_zip_add_mem_to_archive_file_in_place_v2( long long a1, _BYTE *a2, long long a3, long long a4, long long a5, unsigned __int16 a6, int a7, _DWORD *a8) { int v8; // r12d int v9; // r13d int v10; // ebp unsigned int v11; // r14d int v13; // ebp int v14; // eax int v15; // eax int v16; // [rsp+0h] [rbp-148h] int v18; // [rsp+8h] [rbp-140h] __int128 v19; // [rsp+10h] [rbp-138h] BYREF __int128 v20; // [rsp+20h] [rbp-128h] __int128 v21; // [rsp+30h] [rbp-118h] __int128 v22; // [rsp+40h] [rbp-108h] __int128 v23; // [rsp+50h] [rbp-F8h] __int128 v24; // [rsp+60h] [rbp-E8h] __int128 v25; // [rsp+70h] [rbp-D8h] _BYTE v26[192]; // [rsp+88h] [rbp-C0h] BYREF v8 = a4; v9 = a3; v19 = 0LL; v20 = 0LL; v21 = 0LL; v22 = 0LL; v23 = 0LL; v24 = 0LL; v25 = 0LL; v10 = 6; if ( a7 >= 0 ) v10 = a7; if ( a1 == 0 || a2 == 0LL || a4 != 0 && a3 == 0 || (v10 & 0xFu) >= 0xB || a6 != 0 && a5 == 0 ) { v11 = 0; if ( a8 ) *a8 = 24; return v11; } if ( *a2 == 47 ) { v11 = 0; if ( a8 ) *a8 = 25; return v11; } v18 = a5; v16 = stat(a1, v26); if ( v16 ) { v11 = 0; if ( !(unsigned int)mz_zip_writer_init_file_v2((long long)&v19, a1, 0LL, v10) ) { LABEL_30: if ( a8 ) *a8 = HIDWORD(v20); return v11; } LABEL_17: v11 = mz_zip_writer_add_mem_ex((int)&v19, (int)a2, v9, v8, v18, a6, v10, 0LL, 0); v13 = HIDWORD(v20); v14 = mz_zip_writer_finalize_archive((long long)&v19); if ( !v14 ) v11 = 0; if ( !(v13 | v14) ) v13 = HIDWORD(v20); v15 = mz_zip_writer_end_internal((long long)&v19, v11); if ( !v15 ) v11 = 0; if ( !(v13 | v15) ) v13 = HIDWORD(v20); if ( v16 && !v11 ) remove(a1); if ( a8 ) *a8 = v13; return v11; } v11 = 0; if ( !(unsigned int)mz_zip_reader_init_file_v2((long long)&v19, a1, v10 | 0x800u, 0LL, 0LL) ) goto LABEL_30; if ( (unsigned int)mz_zip_writer_init_from_reader_v2((long long)&v19, a1, v10) ) goto LABEL_17; if ( a8 ) *a8 = HIDWORD(v20); v11 = 0; mz_zip_reader_end_internal((long long)&v19, 0); return v11; }
mz_zip_add_mem_to_archive_file_in_place_v2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 MOV R12,RCX MOV R13,RDX MOV RDX,qword ptr [RSP + 0x158] MOV EAX,dword ptr [RSP + 0x150] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 TEST EAX,EAX PUSH 0x6 POP RBP CMOVNS EBP,EAX TEST RDI,RDI SETZ AL TEST RSI,RSI SETZ CL OR CL,AL JNZ 0x0016444c TEST R12,R12 SETNZ AL TEST R13,R13 SETZ CL TEST CL,AL JNZ 0x0016444c TEST R9W,R9W SETZ AL TEST R8,R8 SETNZ CL OR CL,AL MOV EAX,EBP AND EAX,0xf CMP EAX,0xb SETC AL TEST CL,AL JNZ 0x0016446f LAB_0016444c: XOR R14D,R14D TEST RDX,RDX JZ 0x0016445a MOV dword ptr [RDX],0x18 LAB_0016445a: MOV EAX,R14D ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016446f: MOV R15,RSI CMP byte ptr [RSI],0x2f JNZ 0x00164487 XOR R14D,R14D TEST RDX,RDX JZ 0x0016445a MOV dword ptr [RDX],0x19 JMP 0x0016445a LAB_00164487: MOV RBX,RDI MOV dword ptr [RSP + 0x4],R9D MOV qword ptr [RSP + 0x8],R8 LEA RSI,[RSP + 0x88] CALL 0x0010a550 MOV dword ptr [RSP],EAX TEST EAX,EAX JZ 0x001644c5 XOR R14D,R14D LEA RDI,[RSP + 0x10] MOV RSI,RBX XOR EDX,EDX MOV ECX,EBP CALL 0x00161033 TEST EAX,EAX JNZ 0x00164501 JMP 0x00164590 LAB_001644c5: MOV EDX,EBP OR EDX,0x800 XOR R14D,R14D LEA RDI,[RSP + 0x10] MOV RSI,RBX XOR ECX,ECX XOR R8D,R8D CALL 0x0015e5e1 TEST EAX,EAX JZ 0x00164590 LEA RDI,[RSP + 0x10] MOV RSI,RBX MOV EDX,EBP CALL 0x00161233 TEST EAX,EAX JZ 0x001645ac LAB_00164501: SUB RSP,0x8 MOVZX R9D,word ptr [RSP + 0xc] LEA RDI,[RSP + 0x18] MOV RSI,R15 MOV R15,RDI MOV RDX,R13 MOV RCX,R12 MOV R8,qword ptr [RSP + 0x10] PUSH 0x0 PUSH 0x0 PUSH RBP CALL 0x001614d5 ADD RSP,0x20 MOV R14D,EAX MOV EBP,dword ptr [R15 + 0x1c] MOV RDI,R15 CALL 0x00163f48 TEST EAX,EAX CMOVZ R14D,EAX OR EAX,EBP JNZ 0x0016454c MOV EBP,dword ptr [RSP + 0x2c] LAB_0016454c: MOV RDI,R15 MOV ESI,R14D CALL 0x00160f0f TEST EAX,EAX CMOVZ R14D,EAX OR EAX,EBP JNZ 0x00164565 MOV EBP,dword ptr [RSP + 0x2c] LAB_00164565: CMP dword ptr [RSP],0x0 JZ 0x00164578 TEST R14D,R14D JNZ 0x00164578 MOV RDI,RBX CALL 0x0010aaf0 LAB_00164578: MOV RAX,qword ptr [RSP + 0x158] TEST RAX,RAX JZ 0x0016445a MOV dword ptr [RAX],EBP JMP 0x0016445a LAB_00164590: MOV RCX,qword ptr [RSP + 0x158] TEST RCX,RCX JZ 0x0016445a MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX],EAX JMP 0x0016445a LAB_001645ac: MOV RCX,qword ptr [RSP + 0x158] TEST RCX,RCX JZ 0x001645bf MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX],EAX LAB_001645bf: LEA RDI,[RSP + 0x10] XOR R14D,R14D XOR ESI,ESI CALL 0x0015d92b JMP 0x0016445a
int mz_zip_add_mem_to_archive_file_in_place_v2 (char *param_1,char *param_2,long param_3,long param_4,long param_5,short param_6, uint param_7,int *param_8) { int iVar1; int iVar2; int iVar3; uint uVar4; int iVar5; int8 local_138; int8 uStack_130; int8 local_128; int8 uStack_120; int8 local_118; int8 uStack_110; int8 local_108; int8 uStack_100; int8 local_f8; int8 uStack_f0; int8 local_e8; int8 uStack_e0; int8 local_d8; int8 uStack_d0; stat local_c0; local_138 = 0; uStack_130 = 0; local_128 = 0; uStack_120 = 0; local_118 = 0; uStack_110 = 0; local_108 = 0; uStack_100 = 0; local_f8 = 0; uStack_f0 = 0; local_e8 = 0; uStack_e0 = 0; local_d8 = 0; uStack_d0 = 0; uVar4 = 6; if (-1 < (int)param_7) { uVar4 = param_7; } if (((param_2 == (char *)0x0 || param_1 == (char *)0x0) || (param_3 == 0 && param_4 != 0)) || (param_5 == 0 && param_6 != 0 || 10 < (uVar4 & 0xf))) { if (param_8 == (int *)0x0) { return 0; } *param_8 = 0x18; return 0; } if (*param_2 == '/') { if (param_8 == (int *)0x0) { return 0; } *param_8 = 0x19; return 0; } iVar1 = stat(param_1,&local_c0); if (iVar1 == 0) { iVar2 = mz_zip_reader_init_file_v2(&local_138,param_1,uVar4 | 0x800,0,0); if (iVar2 != 0) { iVar2 = mz_zip_writer_init_from_reader_v2(&local_138,param_1,uVar4); if (iVar2 == 0) { if (param_8 != (int *)0x0) { *param_8 = uStack_120._4_4_; } mz_zip_reader_end_internal(&local_138,0); return 0; } goto LAB_00164501; } } else { iVar2 = mz_zip_writer_init_file_v2(&local_138,param_1,0,uVar4); if (iVar2 != 0) { LAB_00164501: iVar2 = mz_zip_writer_add_mem_ex(&local_138,param_2,param_3,param_4,param_5,param_6,uVar4,0,0) ; iVar5 = uStack_120._4_4_; iVar3 = mz_zip_writer_finalize_archive(&local_138); if (iVar3 == 0) { iVar2 = 0; } if (iVar3 == 0 && iVar5 == 0) { iVar5 = uStack_120._4_4_; } iVar3 = mz_zip_writer_end_internal(&local_138,iVar2); if (iVar3 == 0) { iVar2 = 0; } if (iVar3 == 0 && iVar5 == 0) { iVar5 = uStack_120._4_4_; } if ((iVar1 != 0) && (iVar2 == 0)) { remove(param_1); } if (param_8 == (int *)0x0) { return iVar2; } *param_8 = iVar5; return iVar2; } } if (param_8 != (int *)0x0) { *param_8 = uStack_120._4_4_; } return 0; }
51,734
translog_chaser_page_next
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_chaser_page_next(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { struct st_translog_buffer *buffer_to_flush; my_bool rc; DBUG_ENTER("translog_chaser_page_next"); DBUG_ASSERT(cursor->chaser); rc= translog_page_next(horizon, cursor, &buffer_to_flush); if (buffer_to_flush != NULL) { translog_buffer_lock(buffer_to_flush); translog_buffer_decrease_writers(buffer_to_flush); used_buffs_register_unlock(&cursor->buffs, buffer_to_flush); if (!rc) rc= translog_buffer_flush(buffer_to_flush); translog_buffer_unlock(buffer_to_flush); } DBUG_RETURN(rc); }
O0
c
translog_chaser_page_next: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x5b9c2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x18(%rbp), %rdx callq 0x59410 movb %al, -0x19(%rbp) cmpq $0x0, -0x18(%rbp) je 0x5ba17 movq -0x18(%rbp), %rdi callq 0x4fb20 movq -0x18(%rbp), %rdi callq 0x5b720 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x5b770 cmpb $0x0, -0x19(%rbp) jne 0x5ba0e movq -0x18(%rbp), %rdi callq 0x55d50 movb %al, -0x19(%rbp) movq -0x18(%rbp), %rdi callq 0x4fb60 jmp 0x5ba19 movb -0x19(%rbp), %al movb %al, -0x1a(%rbp) movb -0x1a(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
translog_chaser_page_next: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_5B9C2: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, [rbp+var_18] call translog_page_next mov [rbp+var_19], al cmp [rbp+var_18], 0 jz short loc_5BA17 mov rdi, [rbp+var_18] call translog_buffer_lock mov rdi, [rbp+var_18] call translog_buffer_decrease_writers mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call used_buffs_register_unlock cmp [rbp+var_19], 0 jnz short loc_5BA0E mov rdi, [rbp+var_18] call translog_buffer_flush mov [rbp+var_19], al loc_5BA0E: mov rdi, [rbp+var_18] call translog_buffer_unlock loc_5BA17: jmp short $+2 loc_5BA19: mov al, [rbp+var_19] mov [rbp+var_1A], al mov al, [rbp+var_1A] add rsp, 20h pop rbp retn
char translog_chaser_page_next(long long *a1, long long a2) { char v3; // [rsp+7h] [rbp-19h] long long v4; // [rsp+8h] [rbp-18h] BYREF long long v5; // [rsp+10h] [rbp-10h] long long *v6; // [rsp+18h] [rbp-8h] v6 = a1; v5 = a2; v3 = translog_page_next(a1, a2, &v4); if ( v4 ) { translog_buffer_lock(v4); translog_buffer_decrease_writers(v4); used_buffs_register_unlock(v5); if ( !v3 ) v3 = translog_buffer_flush(v4); translog_buffer_unlock(v4); } return v3; }
translog_chaser_page_next: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x0015b9c2 LAB_0015b9c2: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x18] CALL 0x00159410 MOV byte ptr [RBP + -0x19],AL CMP qword ptr [RBP + -0x18],0x0 JZ 0x0015ba17 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014fb20 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0015b720 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0015b770 CMP byte ptr [RBP + -0x19],0x0 JNZ 0x0015ba0e MOV RDI,qword ptr [RBP + -0x18] CALL 0x00155d50 MOV byte ptr [RBP + -0x19],AL LAB_0015ba0e: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014fb60 LAB_0015ba17: JMP 0x0015ba19 LAB_0015ba19: MOV AL,byte ptr [RBP + -0x19] MOV byte ptr [RBP + -0x1a],AL MOV AL,byte ptr [RBP + -0x1a] ADD RSP,0x20 POP RBP RET
char translog_chaser_page_next(int8 param_1,int8 param_2) { char local_21; long local_20; int8 local_18; int8 local_10; local_18 = param_2; local_10 = param_1; local_21 = translog_page_next(param_1,param_2,&local_20); if (local_20 != 0) { translog_buffer_lock(local_20); translog_buffer_decrease_writers(local_20); used_buffs_register_unlock(local_18,local_20); if (local_21 == '\0') { local_21 = translog_buffer_flush(local_20); } translog_buffer_unlock(local_20); } return local_21; }
51,735
sdflib::getNeighboursVector(unsigned int, unsigned int, unsigned int, unsigned int, std::array<unsigned int, 6ul> const&, std::array<unsigned char, 6ul> const&, std::array<unsigned int, 6ul>&, std::array<unsigned char, 6ul>&)
aimrt_mujoco_sim/_deps/sdflib-src/src/sdf/OctreeSdfBreadthFirst.h
inline void getNeighboursVector(uint32_t outChildId, uint32_t childId, uint32_t parentChildrenIndex, uint32_t currentDepth, const std::array<uint32_t, 6>& parentNeighbours, const std::array<uint8_t, 6>& parentNeighboursDepth, std::array<uint32_t, 6>& outNeighbours, std::array<uint8_t, 6>& outNeighboursDepth) { for(uint32_t n=1; n <= 6; n++) { const uint32_t nIdx = (~(outChildId ^ childId)) & n; outNeighbours[n - 1] = (nIdx != 0) ? parentNeighbours[nIdx - 1] + (n ^ childId) * (1 - (parentNeighbours[nIdx - 1] >> 31)) : parentChildrenIndex + (n ^ childId); outNeighboursDepth[n - 1] = (nIdx != 0) ? parentNeighboursDepth[nIdx - 1] : currentDepth; } }
O0
c
sdflib::getNeighboursVector(unsigned int, unsigned int, unsigned int, unsigned int, std::array<unsigned int, 6ul> const&, std::array<unsigned char, 6ul> const&, std::array<unsigned int, 6ul>&, std::array<unsigned char, 6ul>&): subq $0x48, %rsp movq 0x58(%rsp), %rax movq 0x50(%rsp), %rax movl %edi, 0x44(%rsp) movl %esi, 0x40(%rsp) movl %edx, 0x3c(%rsp) movl %ecx, 0x38(%rsp) movq %r8, 0x30(%rsp) movq %r9, 0x28(%rsp) movl $0x1, 0x24(%rsp) cmpl $0x6, 0x24(%rsp) ja 0x89488 movl 0x44(%rsp), %eax xorl 0x40(%rsp), %eax xorl $-0x1, %eax andl 0x24(%rsp), %eax movl %eax, 0x20(%rsp) cmpl $0x0, 0x20(%rsp) je 0x893f3 movq 0x30(%rsp), %rdi movl 0x20(%rsp), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %esi callq 0x8ceb0 movl (%rax), %eax movl %eax, 0x18(%rsp) movl 0x24(%rsp), %eax xorl 0x40(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x30(%rsp), %rdi movl 0x20(%rsp), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %esi callq 0x8ceb0 movl 0x14(%rsp), %ecx movq %rax, %rdx movl 0x18(%rsp), %eax movl (%rdx), %esi shrl $0x1f, %esi movl $0x1, %edx subl %esi, %edx imull %edx, %ecx addl %ecx, %eax movl %eax, 0x1c(%rsp) jmp 0x89405 movl 0x3c(%rsp), %eax movl 0x24(%rsp), %ecx xorl 0x40(%rsp), %ecx addl %ecx, %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax movl %eax, 0x10(%rsp) movq 0x50(%rsp), %rdi movl 0x24(%rsp), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %esi callq 0x88c50 movl 0x10(%rsp), %ecx movl %ecx, (%rax) cmpl $0x0, 0x20(%rsp) je 0x8944d movq 0x28(%rsp), %rdi movl 0x20(%rsp), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %esi callq 0x8cee0 movzbl (%rax), %eax movl %eax, 0xc(%rsp) jmp 0x89455 movl 0x38(%rsp), %eax movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax movb %al, 0xb(%rsp) movq 0x58(%rsp), %rdi movl 0x24(%rsp), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %esi callq 0x88c80 movb 0xb(%rsp), %cl movb %cl, (%rax) movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x89370 addq $0x48, %rsp retq nopl (%rax)
_ZN6sdflib19getNeighboursVectorEjjjjRKSt5arrayIjLm6EERKS0_IhLm6EERS1_RS4_: sub rsp, 48h mov rax, [rsp+48h+arg_8] mov rax, [rsp+48h+arg_0] mov [rsp+48h+var_4], edi mov [rsp+48h+var_8], esi mov [rsp+48h+var_C], edx mov [rsp+48h+var_10], ecx mov [rsp+48h+var_18], r8 mov [rsp+48h+var_20], r9 mov [rsp+48h+var_24], 1 loc_89370: cmp [rsp+48h+var_24], 6 ja loc_89488 mov eax, [rsp+48h+var_4] xor eax, [rsp+48h+var_8] xor eax, 0FFFFFFFFh and eax, [rsp+48h+var_24] mov [rsp+48h+var_28], eax cmp [rsp+48h+var_28], 0 jz short loc_893F3 mov rdi, [rsp+48h+var_18] mov eax, [rsp+48h+var_28] sub eax, 1 mov eax, eax mov esi, eax call _ZNKSt5arrayIjLm6EEixEm; std::array<uint,6ul>::operator[](ulong) mov eax, [rax] mov [rsp+48h+var_30], eax mov eax, [rsp+48h+var_24] xor eax, [rsp+48h+var_8] mov [rsp+48h+var_34], eax mov rdi, [rsp+48h+var_18] mov eax, [rsp+48h+var_28] sub eax, 1 mov eax, eax mov esi, eax call _ZNKSt5arrayIjLm6EEixEm; std::array<uint,6ul>::operator[](ulong) mov ecx, [rsp+48h+var_34] mov rdx, rax mov eax, [rsp+48h+var_30] mov esi, [rdx] shr esi, 1Fh mov edx, 1 sub edx, esi imul ecx, edx add eax, ecx mov [rsp+48h+var_2C], eax jmp short loc_89405 loc_893F3: mov eax, [rsp+48h+var_C] mov ecx, [rsp+48h+var_24] xor ecx, [rsp+48h+var_8] add eax, ecx mov [rsp+48h+var_2C], eax loc_89405: mov eax, [rsp+48h+var_2C] mov [rsp+48h+var_38], eax mov rdi, [rsp+48h+arg_0] mov eax, [rsp+48h+var_24] sub eax, 1 mov eax, eax mov esi, eax call _ZNSt5arrayIjLm6EEixEm; std::array<uint,6ul>::operator[](ulong) mov ecx, [rsp+48h+var_38] mov [rax], ecx cmp [rsp+48h+var_28], 0 jz short loc_8944D mov rdi, [rsp+48h+var_20] mov eax, [rsp+48h+var_28] sub eax, 1 mov eax, eax mov esi, eax call _ZNKSt5arrayIhLm6EEixEm; std::array<uchar,6ul>::operator[](ulong) movzx eax, byte ptr [rax] mov [rsp+48h+var_3C], eax jmp short loc_89455 loc_8944D: mov eax, [rsp+48h+var_10] mov [rsp+48h+var_3C], eax loc_89455: mov eax, [rsp+48h+var_3C] mov [rsp+48h+var_3D], al mov rdi, [rsp+48h+arg_8] mov eax, [rsp+48h+var_24] sub eax, 1 mov eax, eax mov esi, eax call _ZNSt5arrayIhLm6EEixEm; std::array<uchar,6ul>::operator[](ulong) mov cl, [rsp+48h+var_3D] mov [rax], cl mov eax, [rsp+48h+var_24] add eax, 1 mov [rsp+48h+var_24], eax jmp loc_89370 loc_89488: add rsp, 48h retn
long long sdflib::getNeighboursVector( int a1, int a2, int a3, char a4, long long a5, long long a6, long long a7, long long a8) { long long result; // rax char v9; // [rsp+Ch] [rbp-3Ch] int v10; // [rsp+18h] [rbp-30h] int v11; // [rsp+1Ch] [rbp-2Ch] int v12; // [rsp+20h] [rbp-28h] unsigned int i; // [rsp+24h] [rbp-24h] result = a7; for ( i = 1; i <= 6; ++i ) { v12 = i & ~(a2 ^ a1); if ( v12 ) { v10 = *(_DWORD *)std::array<unsigned int,6ul>::operator[](a5, (unsigned int)(v12 - 1)); v11 = (1 - (*(_DWORD *)std::array<unsigned int,6ul>::operator[](a5, (unsigned int)(v12 - 1)) >> 31)) * (a2 ^ i) + v10; } else { v11 = (a2 ^ i) + a3; } *(_DWORD *)std::array<unsigned int,6ul>::operator[](a7, i - 1) = v11; if ( v12 ) v9 = *(_BYTE *)std::array<unsigned char,6ul>::operator[](a6, (unsigned int)(v12 - 1)); else v9 = a4; *(_BYTE *)std::array<unsigned char,6ul>::operator[](a8, i - 1) = v9; result = i + 1; } return result; }
getNeighboursVector: SUB RSP,0x48 MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x50] MOV dword ptr [RSP + 0x44],EDI MOV dword ptr [RSP + 0x40],ESI MOV dword ptr [RSP + 0x3c],EDX MOV dword ptr [RSP + 0x38],ECX MOV qword ptr [RSP + 0x30],R8 MOV qword ptr [RSP + 0x28],R9 MOV dword ptr [RSP + 0x24],0x1 LAB_00189370: CMP dword ptr [RSP + 0x24],0x6 JA 0x00189488 MOV EAX,dword ptr [RSP + 0x44] XOR EAX,dword ptr [RSP + 0x40] XOR EAX,0xffffffff AND EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x20],EAX CMP dword ptr [RSP + 0x20],0x0 JZ 0x001893f3 MOV RDI,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RSP + 0x20] SUB EAX,0x1 MOV EAX,EAX MOV ESI,EAX CALL 0x0018ceb0 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x18],EAX MOV EAX,dword ptr [RSP + 0x24] XOR EAX,dword ptr [RSP + 0x40] MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RSP + 0x20] SUB EAX,0x1 MOV EAX,EAX MOV ESI,EAX CALL 0x0018ceb0 MOV ECX,dword ptr [RSP + 0x14] MOV RDX,RAX MOV EAX,dword ptr [RSP + 0x18] MOV ESI,dword ptr [RDX] SHR ESI,0x1f MOV EDX,0x1 SUB EDX,ESI IMUL ECX,EDX ADD EAX,ECX MOV dword ptr [RSP + 0x1c],EAX JMP 0x00189405 LAB_001893f3: MOV EAX,dword ptr [RSP + 0x3c] MOV ECX,dword ptr [RSP + 0x24] XOR ECX,dword ptr [RSP + 0x40] ADD EAX,ECX MOV dword ptr [RSP + 0x1c],EAX LAB_00189405: MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x10],EAX MOV RDI,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RSP + 0x24] SUB EAX,0x1 MOV EAX,EAX MOV ESI,EAX CALL 0x00188c50 MOV ECX,dword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX CMP dword ptr [RSP + 0x20],0x0 JZ 0x0018944d MOV RDI,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RSP + 0x20] SUB EAX,0x1 MOV EAX,EAX MOV ESI,EAX CALL 0x0018cee0 MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0xc],EAX JMP 0x00189455 LAB_0018944d: MOV EAX,dword ptr [RSP + 0x38] MOV dword ptr [RSP + 0xc],EAX LAB_00189455: MOV EAX,dword ptr [RSP + 0xc] MOV byte ptr [RSP + 0xb],AL MOV RDI,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RSP + 0x24] SUB EAX,0x1 MOV EAX,EAX MOV ESI,EAX CALL 0x00188c80 MOV CL,byte ptr [RSP + 0xb] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x00189370 LAB_00189488: ADD RSP,0x48 RET
/* sdflib::getNeighboursVector(unsigned int, unsigned int, unsigned int, unsigned int, std::array<unsigned int, 6ul> const&, std::array<unsigned char, 6ul> const&, std::array<unsigned int, 6ul>&, std::array<unsigned char, 6ul>&) */ array * sdflib::getNeighboursVector (uint param_1,uint param_2,uint param_3,uint param_4,array *param_5,array *param_6 ,array *param_7,array *param_8) { uint uVar1; int *piVar2; int1 *puVar3; array *paVar4; int1 local_3c; int local_2c; uint local_24; local_24 = 1; paVar4 = param_7; while (local_24 < 7) { uVar1 = (param_1 ^ param_2 ^ 0xffffffff) & local_24; if (uVar1 == 0) { local_2c = param_3 + (local_24 ^ param_2); } else { piVar2 = (int *)std::array<unsigned_int,6ul>::operator[] ((array<unsigned_int,6ul> *)param_5,(ulong)(uVar1 - 1)); local_2c = *piVar2; piVar2 = (int *)std::array<unsigned_int,6ul>::operator[] ((array<unsigned_int,6ul> *)param_5,(ulong)(uVar1 - 1)); local_2c = local_2c + (local_24 ^ param_2) * ((*piVar2 >> 0x1f) + 1); } piVar2 = (int *)std::array<unsigned_int,6ul>::operator[] ((array<unsigned_int,6ul> *)param_7,(ulong)(local_24 - 1)); *piVar2 = local_2c; local_3c = (char)param_4; if (uVar1 != 0) { puVar3 = (int1 *) std::array<unsigned_char,6ul>::operator[] ((array<unsigned_char,6ul> *)param_6,(ulong)(uVar1 - 1)); local_3c = *puVar3; } puVar3 = (int1 *) std::array<unsigned_char,6ul>::operator[] ((array<unsigned_char,6ul> *)param_8,(ulong)(local_24 - 1)); *puVar3 = local_3c; local_24 = local_24 + 1; paVar4 = (array *)(ulong)local_24; } return paVar4; }
51,736
common_log::resume()
monkey531[P]llama/common/log.cpp
void resume() { std::lock_guard<std::mutex> lock(mtx); if (running) { return; } running = true; thrd = std::thread([this]() { while (true) { { std::unique_lock<std::mutex> lock(mtx); cv.wait(lock, [this]() { return head != tail; }); cur = entries[head]; head = (head + 1) % entries.size(); } if (cur.is_end) { break; } cur.print(); // stdout and stderr if (file) { cur.print(file); } } }); }
O2
cpp
common_log::resume(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx callq 0x970d6 cmpb $0x0, 0x6a(%rbx) jne 0x96934 movb $0x1, 0x6a(%rbx) leaq 0x10(%rsp), %rsi movq %rbx, (%rsi) leaq 0x8(%rsp), %rdi callq 0x970ea leaq 0x28(%rbx), %rdi leaq 0x8(%rsp), %r14 movq %r14, %rsi callq 0x97156 movq %r14, %rdi callq 0x96e04 movq %rbx, %rdi callq 0x236f0 addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi callq 0x236f0 movq %r14, %rdi callq 0x23fb0 nop
_ZN10common_log6resumeEv: push r14 push rbx sub rsp, 18h mov rbx, rdi call _ZNSt5mutex4lockEv; std::mutex::lock(void) cmp byte ptr [rbx+6Ah], 0 jnz short loc_96934 mov byte ptr [rbx+6Ah], 1 lea rsi, [rsp+28h+var_18] mov [rsi], rbx lea rdi, [rsp+28h+var_20] call _ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_ lea rdi, [rbx+28h] lea r14, [rsp+28h+var_20] mov rsi, r14 call _ZNSt6threadaSEOS_; std::thread::operator=(std::thread&&) mov rdi, r14; this call _ZNSt6threadD2Ev; std::thread::~thread() loc_96934: mov rdi, rbx call _pthread_mutex_unlock add rsp, 18h pop rbx pop r14 retn mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long common_log::resume(common_log *this) { _BYTE v2[8]; // [rsp+8h] [rbp-20h] BYREF common_log *v3; // [rsp+10h] [rbp-18h] std::mutex::lock(this); if ( !*((_BYTE *)this + 106) ) { *((_BYTE *)this + 106) = 1; v3 = this; ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_(v2); std::thread::operator=((char *)this + 40, v2); std::thread::~thread((std::thread *)v2); } return pthread_mutex_unlock(this); }
resume: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CALL 0x001970d6 CMP byte ptr [RBX + 0x6a],0x0 JNZ 0x00196934 MOV byte ptr [RBX + 0x6a],0x1 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RBX LAB_00196911: LEA RDI,[RSP + 0x8] CALL 0x001970ea LAB_0019691b: LEA RDI,[RBX + 0x28] LEA R14,[RSP + 0x8] MOV RSI,R14 CALL 0x00197156 MOV RDI,R14 CALL 0x00196e04 LAB_00196934: MOV RDI,RBX CALL 0x001236f0 ADD RSP,0x18 POP RBX POP R14 RET
/* common_log::resume() */ void __thiscall common_log::resume(common_log *this) { thread local_20 [8]; common_log *local_18; std::mutex::lock((mutex *)this); if (this[0x6a] == (common_log)0x0) { this[0x6a] = (common_log)0x1; /* try { // try from 00196911 to 0019691a has its CatchHandler @ 00196944 */ local_18 = this; std::thread::thread<common_log::resume()::_lambda()_1_,,void> (local_20,(_lambda___1_ *)&local_18); std::thread::operator=((thread *)(this + 0x28),local_20); std::thread::~thread(local_20); } pthread_mutex_unlock((pthread_mutex_t *)this); return; }
51,737
flux::parser::VarDecl::clone() const
kvthweatt[P]FluxLang/src/parser/ast.cpp
std::unique_ptr<Decl> VarDecl::clone() const { return std::make_unique<VarDecl>( name, type ? static_cast<std::unique_ptr<TypeExpr>>(type->clone()) : nullptr, initializer ? initializer->clone() : nullptr, isConst, range); }
O1
cpp
flux::parser::VarDecl::clone() const: pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rsi testq %rsi, %rsi je 0xf027 movq (%rsi), %rax leaq 0x10(%rsp), %rdi callq *0x18(%rax) jmp 0xf030 movq $0x0, 0x10(%rsp) movq 0x40(%r14), %rsi testq %rsi, %rsi je 0xf046 movq (%rsi), %rax leaq 0x8(%rsp), %rdi callq *0x18(%rax) jmp 0xf04f movq $0x0, 0x8(%rsp) movl $0x50, %edi callq 0x6270 movups 0x28(%r14), %xmm0 movq 0x10(%rsp), %rcx xorl %edx, %edx movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rsi movq %rdx, 0x8(%rsp) movb 0x48(%r14), %dl leaq 0x2bc61(%rip), %rdi # 0x3ace0 movq %rdi, (%rax) movups 0x8(%r14), %xmm1 movups 0x18(%r14), %xmm2 movups %xmm1, 0x8(%rax) movups %xmm2, 0x18(%rax) movups %xmm0, 0x28(%rax) leaq 0x2b631(%rip), %rdi # 0x3a6d0 movq %rdi, (%rax) movq %rcx, 0x38(%rax) movq %rsi, 0x40(%rax) movb %dl, 0x48(%rax) movq %rax, (%rbx) movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xf0c0 movq (%rdi), %rax callq *0x8(%rax) movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xf0d0 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx jmp 0xf0fc movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xf0f3 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x8(%rsp) movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xf10c movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x6440
_ZNK4flux6parser7VarDecl5cloneEv: push r14 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rsi, [rsi+38h] test rsi, rsi jz short loc_F027 mov rax, [rsi] lea rdi, [rsp+28h+var_18] call qword ptr [rax+18h] jmp short loc_F030 loc_F027: mov [rsp+28h+var_18], 0 loc_F030: mov rsi, [r14+40h] test rsi, rsi jz short loc_F046 mov rax, [rsi] lea rdi, [rsp+28h+var_20] call qword ptr [rax+18h] jmp short loc_F04F loc_F046: mov [rsp+28h+var_20], 0 loc_F04F: mov edi, 50h ; 'P'; unsigned __int64 call __Znwm; operator new(ulong) movups xmm0, xmmword ptr [r14+28h] mov rcx, [rsp+28h+var_18] xor edx, edx mov [rsp+28h+var_18], rdx mov rsi, [rsp+28h+var_20] mov [rsp+28h+var_20], rdx mov dl, [r14+48h] lea rdi, off_3ACE0 mov [rax], rdi movups xmm1, xmmword ptr [r14+8] movups xmm2, xmmword ptr [r14+18h] movups xmmword ptr [rax+8], xmm1 movups xmmword ptr [rax+18h], xmm2 movups xmmword ptr [rax+28h], xmm0 lea rdi, off_3A6D0 mov [rax], rdi mov [rax+38h], rcx mov [rax+40h], rsi mov [rax+48h], dl mov [rbx], rax mov rdi, [rsp+28h+var_20] test rdi, rdi jz short loc_F0C0 mov rax, [rdi] call qword ptr [rax+8] loc_F0C0: mov rdi, [rsp+28h+var_18] test rdi, rdi jz short loc_F0D0 mov rax, [rdi] call qword ptr [rax+8] loc_F0D0: mov rax, rbx add rsp, 18h pop rbx pop r14 retn mov rbx, rax jmp short loc_F0FC mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_F0F3 mov rax, [rdi] call qword ptr [rax+8] loc_F0F3: mov [rsp+arg_0], 0 loc_F0FC: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_F10C mov rax, [rdi] call qword ptr [rax+8] loc_F10C: mov rdi, rbx call __Unwind_Resume
flux::parser::VarDecl * flux::parser::VarDecl::clone(flux::parser::VarDecl *this, long long a2) { long long v3; // rsi long long v4; // rsi long long v5; // rax __int128 v6; // xmm0 long long v7; // rcx long long v8; // rsi char v9; // dl __int128 v10; // xmm2 long long v12; // [rsp+8h] [rbp-20h] BYREF _QWORD v13[3]; // [rsp+10h] [rbp-18h] BYREF v3 = *(_QWORD *)(a2 + 56); if ( v3 ) (*(void ( **)(_QWORD *))(*(_QWORD *)v3 + 24LL))(v13); else v13[0] = 0LL; v4 = *(_QWORD *)(a2 + 64); if ( v4 ) (*(void ( **)(long long *))(*(_QWORD *)v4 + 24LL))(&v12); else v12 = 0LL; v5 = operator new(0x50uLL); v6 = *(_OWORD *)(a2 + 40); v7 = v13[0]; v13[0] = 0LL; v8 = v12; v12 = 0LL; v9 = *(_BYTE *)(a2 + 72); *(_QWORD *)v5 = &off_3ACE0; v10 = *(_OWORD *)(a2 + 24); *(_OWORD *)(v5 + 8) = *(_OWORD *)(a2 + 8); *(_OWORD *)(v5 + 24) = v10; *(_OWORD *)(v5 + 40) = v6; *(_QWORD *)v5 = off_3A6D0; *(_QWORD *)(v5 + 56) = v7; *(_QWORD *)(v5 + 64) = v8; *(_BYTE *)(v5 + 72) = v9; *(_QWORD *)this = v5; if ( v12 ) (*(void ( **)(long long))(*(_QWORD *)v12 + 8LL))(v12); if ( v13[0] ) (*(void ( **)(_QWORD))(*(_QWORD *)v13[0] + 8LL))(v13[0]); return this; }
clone: PUSH R14 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x38] TEST RSI,RSI JZ 0x0010f027 MOV RAX,qword ptr [RSI] LEA RDI,[RSP + 0x10] CALL qword ptr [RAX + 0x18] JMP 0x0010f030 LAB_0010f027: MOV qword ptr [RSP + 0x10],0x0 LAB_0010f030: MOV RSI,qword ptr [R14 + 0x40] TEST RSI,RSI JZ 0x0010f046 MOV RAX,qword ptr [RSI] LAB_0010f03c: LEA RDI,[RSP + 0x8] CALL qword ptr [RAX + 0x18] JMP 0x0010f04f LAB_0010f046: MOV qword ptr [RSP + 0x8],0x0 LAB_0010f04f: MOV EDI,0x50 CALL 0x00106270 LAB_0010f059: MOVUPS XMM0,xmmword ptr [R14 + 0x28] MOV RCX,qword ptr [RSP + 0x10] XOR EDX,EDX MOV qword ptr [RSP + 0x10],RDX MOV RSI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x8],RDX MOV DL,byte ptr [R14 + 0x48] LEA RDI,[0x13ace0] MOV qword ptr [RAX],RDI MOVUPS XMM1,xmmword ptr [R14 + 0x8] MOVUPS XMM2,xmmword ptr [R14 + 0x18] MOVUPS xmmword ptr [RAX + 0x8],XMM1 MOVUPS xmmword ptr [RAX + 0x18],XMM2 MOVUPS xmmword ptr [RAX + 0x28],XMM0 LEA RDI,[0x13a6d0] MOV qword ptr [RAX],RDI MOV qword ptr [RAX + 0x38],RCX MOV qword ptr [RAX + 0x40],RSI MOV byte ptr [RAX + 0x48],DL MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0010f0c0 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010f0c0: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0010f0d0 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010f0d0: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET
/* WARNING: Removing unreachable block (ram,0x0010f0ba) */ /* WARNING: Removing unreachable block (ram,0x0010f0ca) */ /* flux::parser::VarDecl::clone() const */ void flux::parser::VarDecl::clone(void) { int1 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 uVar12; int8 *puVar13; long in_RSI; int8 *in_RDI; int8 local_20; int8 local_18; if (*(long **)(in_RSI + 0x38) == (long *)0x0) { local_18 = 0; } else { (**(code **)(**(long **)(in_RSI + 0x38) + 0x18))(&local_18); } if (*(long **)(in_RSI + 0x40) == (long *)0x0) { local_20 = 0; } else { /* try { // try from 0010f03c to 0010f043 has its CatchHandler @ 0010f0db */ (**(code **)(**(long **)(in_RSI + 0x40) + 0x18))(&local_20); } /* try { // try from 0010f04f to 0010f058 has its CatchHandler @ 0010f0e0 */ puVar13 = (int8 *)operator_new(0x50); uVar2 = *(int4 *)(in_RSI + 0x28); uVar3 = *(int4 *)(in_RSI + 0x2c); uVar4 = *(int4 *)(in_RSI + 0x30); uVar5 = *(int4 *)(in_RSI + 0x34); uVar1 = *(int1 *)(in_RSI + 0x48); *puVar13 = &PTR__Decl_0013ace0; uVar6 = *(int4 *)(in_RSI + 0xc); uVar7 = *(int4 *)(in_RSI + 0x10); uVar8 = *(int4 *)(in_RSI + 0x14); uVar9 = *(int4 *)(in_RSI + 0x18); uVar10 = *(int4 *)(in_RSI + 0x1c); uVar11 = *(int4 *)(in_RSI + 0x20); uVar12 = *(int4 *)(in_RSI + 0x24); *(int4 *)(puVar13 + 1) = *(int4 *)(in_RSI + 8); *(int4 *)((long)puVar13 + 0xc) = uVar6; *(int4 *)(puVar13 + 2) = uVar7; *(int4 *)((long)puVar13 + 0x14) = uVar8; *(int4 *)(puVar13 + 3) = uVar9; *(int4 *)((long)puVar13 + 0x1c) = uVar10; *(int4 *)(puVar13 + 4) = uVar11; *(int4 *)((long)puVar13 + 0x24) = uVar12; *(int4 *)(puVar13 + 5) = uVar2; *(int4 *)((long)puVar13 + 0x2c) = uVar3; *(int4 *)(puVar13 + 6) = uVar4; *(int4 *)((long)puVar13 + 0x34) = uVar5; *puVar13 = &PTR__VarDecl_0013a6d0; puVar13[7] = local_18; puVar13[8] = local_20; *(int1 *)(puVar13 + 9) = uVar1; *in_RDI = puVar13; return; }
51,738
nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
monkey531[P]llama/common/./json.hpp
static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("parse_error", id_), "parse error", (byte_ != 0 ? (concat(" at byte ", std::to_string(byte_))) : ""), ": ", exception::diagnostics(context), what_arg); return {id_, byte_, w.c_str()}; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): subq $0x148, %rsp # imm = 0x148 movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0x140(%rsp) movl %esi, 0x13c(%rsp) movq %rdx, 0x130(%rsp) movq %rcx, 0x128(%rsp) movq %r8, 0x120(%rsp) leaq 0xbf(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x52fe0 movq 0x38(%rsp), %rdx leaq 0x2a02e(%rip), %rsi # 0x1dc287 leaq 0xc0(%rsp), %rdi callq 0x5b620 jmp 0x1b2268 movl 0x13c(%rsp), %edx leaq 0xe0(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0x641e0 jmp 0x1b2286 movq 0x130(%rsp), %rax movb $0x0, 0x67(%rsp) movb $0x0, 0x65(%rsp) cmpq $0x0, %rax je 0x1b22d4 movq 0x130(%rsp), %rsi leaq 0x68(%rsp), %rdi callq 0x70ac0 jmp 0x1b22b2 movb $0x1, 0x67(%rsp) leaq 0x3504b(%rip), %rsi # 0x1e7309 leaq 0x88(%rsp), %rdi leaq 0x68(%rsp), %rdx callq 0x1b7290 jmp 0x1b22d2 jmp 0x1b2305 leaq 0x66(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x52fe0 movq 0x20(%rsp), %rdx movb $0x1, 0x65(%rsp) leaq 0x2c9cb(%rip), %rsi # 0x1decbf leaq 0x88(%rsp), %rdi callq 0x5b620 jmp 0x1b2303 jmp 0x1b2305 xorl %eax, %eax movl %eax, %esi leaq 0x40(%rsp), %rdi callq 0x64280 jmp 0x1b2315 movq 0x128(%rsp), %rcx movq %rsp, %rax movq %rcx, (%rax) leaq 0x29f69(%rip), %rdx # 0x1dc293 leaq 0x2a65e(%rip), %r8 # 0x1dc98f leaq 0x100(%rsp), %rdi leaq 0xe0(%rsp), %rsi leaq 0x88(%rsp), %rcx leaq 0x40(%rsp), %r9 callq 0x7b730 jmp 0x1b2355 leaq 0x40(%rsp), %rdi callq 0x53408 leaq 0x88(%rsp), %rdi callq 0x53408 testb $0x1, 0x65(%rsp) jne 0x1b2375 jmp 0x1b237f leaq 0x66(%rsp), %rdi callq 0x533e0 testb $0x1, 0x67(%rsp) jne 0x1b2388 jmp 0x1b2392 leaq 0x68(%rsp), %rdi callq 0x53408 leaq 0xe0(%rsp), %rdi callq 0x53408 leaq 0xc0(%rsp), %rdi callq 0x53408 leaq 0xbf(%rsp), %rdi callq 0x533e0 movl 0x13c(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x130(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x100(%rsp), %rdi callq 0x521e0 movq 0x28(%rsp), %rdi movl 0x14(%rsp), %esi movq 0x18(%rsp), %rdx movq %rax, %rcx callq 0x7b8f0 jmp 0x1b23f6 leaq 0x100(%rsp), %rdi callq 0x53408 movq 0x30(%rsp), %rax addq $0x148, %rsp # imm = 0x148 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0x1b250c movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0x1b24ff movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0x1b24f2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0x1b24dd movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0x1b24c8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0x1b24bb movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) leaq 0x40(%rsp), %rdi callq 0x53408 leaq 0x88(%rsp), %rdi callq 0x53408 testb $0x1, 0x65(%rsp) jne 0x1b24d1 jmp 0x1b24db leaq 0x66(%rsp), %rdi callq 0x533e0 jmp 0x1b24dd testb $0x1, 0x67(%rsp) jne 0x1b24e6 jmp 0x1b24f0 leaq 0x68(%rsp), %rdi callq 0x53408 jmp 0x1b24f2 leaq 0xe0(%rsp), %rdi callq 0x53408 leaq 0xc0(%rsp), %rdi callq 0x53408 leaq 0xbf(%rsp), %rdi callq 0x533e0 jmp 0x1b253c movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) leaq 0x100(%rsp), %rdi callq 0x53408 movq 0xb0(%rsp), %rdi callq 0x52ae0 nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_imRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: sub rsp, 148h mov [rsp+148h+var_120], rdi; char mov rax, rdi mov [rsp+148h+var_118], rax mov [rsp+148h+var_8], rdi mov [rsp+148h+var_C], esi mov [rsp+148h+var_18], rdx mov [rsp+148h+var_20], rcx mov [rsp+148h+var_28], r8 lea rdi, [rsp+148h+var_89] mov [rsp+148h+var_110], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+148h+var_110] lea rsi, aParseError; "parse_error" lea rdi, [rsp+148h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1B2268: mov edx, [rsp+148h+var_C] lea rdi, [rsp+148h+var_68]; int lea rsi, [rsp+148h+var_88] call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) jmp short $+2 loc_1B2286: mov rax, [rsp+148h+var_18] mov [rsp+148h+var_E1], 0 mov [rsp+148h+var_E3], 0 cmp rax, 0 jz short loc_1B22D4 mov rsi, [rsp+148h+var_18]; unsigned __int64 lea rdi, [rsp+148h+var_E0]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_1B22B2: mov [rsp+148h+var_E1], 1 lea rsi, aAtByte; " at byte " lea rdi, [rsp+148h+var_C0] lea rdx, [rsp+148h+var_E0] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string>(char const(&)[10],std::string &&) jmp short $+2 loc_1B22D2: jmp short loc_1B2305 loc_1B22D4: lea rdi, [rsp+148h+var_E2] mov [rsp+148h+var_128], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+148h+var_128] mov [rsp+148h+var_E3], 1 lea rsi, asc_1DECBE+1; "" lea rdi, [rsp+148h+var_C0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1B2303: jmp short $+2 loc_1B2305: xor eax, eax mov esi, eax lea rdi, [rsp+148h+var_108] call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr)) jmp short $+2 loc_1B2315: mov rcx, [rsp+148h+var_20] mov rax, rsp mov [rax], rcx lea rdx, aParseError_0; "parse error" lea r8, aSubtype+9; int lea rdi, [rsp+148h+var_48]; int lea rsi, [rsp+148h+var_68]; int lea rcx, [rsp+148h+var_C0]; int lea r9, [rsp+148h+var_108]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&) jmp short $+2 loc_1B2355: lea rdi, [rsp+148h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+148h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() test [rsp+148h+var_E3], 1 jnz short loc_1B2375 jmp short loc_1B237F loc_1B2375: lea rdi, [rsp+148h+var_E2] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_1B237F: test [rsp+148h+var_E1], 1 jnz short loc_1B2388 jmp short loc_1B2392 loc_1B2388: lea rdi, [rsp+148h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1B2392: lea rdi, [rsp+148h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+148h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+148h+var_89] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rsp+148h+var_C] mov [rsp+148h+var_134], eax mov rax, [rsp+148h+var_18] mov [rsp+148h+var_130], rax lea rdi, [rsp+148h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+148h+var_120]; this mov esi, [rsp+148h+var_134]; int mov rdx, [rsp+148h+var_130]; unsigned __int64 mov rcx, rax; char * call _ZN8nlohmann16json_abi_v3_11_36detail11parse_errorC2EimPKc; nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(int,ulong,char const*) jmp short $+2 loc_1B23F6: lea rdi, [rsp+148h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+148h+var_118] add rsp, 148h retn mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp loc_1B250C mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp loc_1B24FF mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp loc_1B24F2 mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp short loc_1B24DD mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp short loc_1B24C8 mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp short loc_1B24BB mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1B24BB: lea rdi, [rsp+arg_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1B24C8: test [rsp+arg_5D], 1 jnz short loc_1B24D1 jmp short loc_1B24DB loc_1B24D1: lea rdi, [rsp+arg_5E] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_1B24DB: jmp short $+2 loc_1B24DD: test [rsp+arg_5F], 1 jnz short loc_1B24E6 jmp short loc_1B24F0 loc_1B24E6: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1B24F0: jmp short $+2 loc_1B24F2: lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1B24FF: lea rdi, [rsp+arg_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1B250C: lea rdi, [rsp+arg_B7] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_1B253C mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax lea rdi, [rsp+arg_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1B253C: mov rdi, [rsp+arg_A8] call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::parse_error * ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_imRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( nlohmann::json_abi_v3_11_3::detail::parse_error *a1, long long a2, unsigned long long a3, void *a4, long long a5) { int v5; // ecx int v6; // r8d int v7; // r9d const char *v8; // rax int v10; // [rsp+14h] [rbp-134h] long long v11; // [rsp+18h] [rbp-130h] int v12[9]; // [rsp+40h] [rbp-108h] BYREF char v13; // [rsp+65h] [rbp-E3h] char v14; // [rsp+66h] [rbp-E2h] BYREF char v15; // [rsp+67h] [rbp-E1h] _BYTE v16[32]; // [rsp+68h] [rbp-E0h] BYREF int v17[13]; // [rsp+88h] [rbp-C0h] BYREF char v18; // [rsp+BFh] [rbp-89h] BYREF _BYTE v19[32]; // [rsp+C0h] [rbp-88h] BYREF int v20[8]; // [rsp+E0h] [rbp-68h] BYREF int v21[8]; // [rsp+100h] [rbp-48h] BYREF long long v22; // [rsp+120h] [rbp-28h] void *v23; // [rsp+128h] [rbp-20h] unsigned long long v24; // [rsp+130h] [rbp-18h] int v25; // [rsp+13Ch] [rbp-Ch] nlohmann::json_abi_v3_11_3::detail::parse_error *v26; // [rsp+140h] [rbp-8h] v26 = a1; v25 = a2; v24 = a3; v23 = a4; v22 = a5; std::allocator<char>::allocator(&v18, a2); std::string::basic_string<std::allocator<char>>((long long)v19, (long long)"parse_error", (long long)&v18); nlohmann::json_abi_v3_11_3::detail::exception::name(v20, (long long)v19, v25); v15 = 0; v13 = 0; if ( v24 ) { std::to_string((std::__cxx11 *)v16, v24); v15 = 1; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string>( (unsigned int)v17, (unsigned int)" at byte ", (unsigned int)v16, v5, v6, v7); } else { std::allocator<char>::allocator(&v14, v19); v13 = 1; std::string::basic_string<std::allocator<char>>((long long)v17, (long long)"", (long long)&v14); } nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]((long long)v12, 0LL); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>( (long long)v21, (long long)v20, (long long)"parse error", (long long)v17, (long long)": ", (long long)v12, v23); std::string::~string(v12); std::string::~string(v17); if ( (v13 & 1) != 0 ) std::allocator<char>::~allocator(&v14); if ( (v15 & 1) != 0 ) std::string::~string(v16); std::string::~string(v20); std::string::~string(v19); std::allocator<char>::~allocator(&v18); v10 = v25; v11 = v24; v8 = (const char *)std::string::c_str(v21); nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(a1, v10, v11, v8); std::string::~string(v21); return a1; }
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,double&>: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP],RDX MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP] CALL 0x001af5a0 ADD RSP,0x18 RET
/* void __gnu_cxx::new_allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, double&>(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>*, double&) */ void __thiscall __gnu_cxx:: new_allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> :: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,double&> (new_allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,basic_json *param_1,double *param_2) { _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRddTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ (param_1,param_2); return; }
51,739
sp_make_key
eloqsql/storage/myisam/sp_key.c
uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key, const uchar *record, my_off_t filepos) { HA_KEYSEG *keyseg; MI_KEYDEF *keyinfo = &info->s->keyinfo[keynr]; uint len = 0; uchar *pos; uint dlen; uchar *dptr; double mbr[SPDIMS * 2]; uint i; keyseg = &keyinfo->seg[-1]; pos = (uchar*)record + keyseg->start; dlen = _mi_calc_blob_length(keyseg->bit_start, pos); memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*)); if (!dptr) { my_errno= HA_ERR_NULL_IN_SPATIAL; return 0; } sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */ for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++) { uint length = keyseg->length, start= keyseg->start; double val; DBUG_ASSERT(length == sizeof(double)); DBUG_ASSERT(!(start % sizeof(double))); DBUG_ASSERT(start < sizeof(mbr)); DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE); val= mbr[start / sizeof (double)]; if (isnan(val)) { bzero(key, length); key+= length; len+= length; continue; } if (keyseg->flag & HA_SWAP_KEY) { uchar buf[sizeof(double)]; float8store(buf, val); pos= &buf[length]; while (pos > buf) *key++ = *--pos; } else { float8store((uchar *)key, val); key += length; } len+= length; } _mi_dpointer(info, key, filepos); return len; }
O0
c
sp_make_key: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movl %esi, -0x24(%rbp) movq %rdx, -0x30(%rbp) movq %rcx, -0x38(%rbp) movq %r8, -0x40(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x24(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movl $0x0, -0x54(%rbp) movq -0x50(%rbp), %rax movq 0x28(%rax), %rax addq $-0x20, %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rax movq -0x48(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x48(%rbp), %rax movzbl 0x1a(%rax), %edi movq -0x60(%rbp), %rsi callq 0x343b0 movl %eax, -0x64(%rbp) movq -0x60(%rbp), %rax movq -0x48(%rbp), %rcx movzbl 0x1a(%rcx), %ecx movslq %ecx, %rcx movq (%rax,%rcx), %rax movq %rax, -0x70(%rbp) cmpq $0x0, -0x70(%rbp) jne 0x608b9 callq 0x82cc0 movl $0x9e, (%rax) movl $0x0, -0x14(%rbp) jmp 0x60a52 movq -0x70(%rbp), %rdi addq $0x4, %rdi movl -0x64(%rbp), %esi subl $0x4, %esi leaq -0x90(%rbp), %rcx movl $0x2, %edx callq 0x60a90 movl $0x0, -0x94(%rbp) movq -0x50(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax cmpb $0x0, 0x18(%rax) je 0x60a3b movq -0x48(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x98(%rbp) movq -0x48(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x9c(%rbp) jmp 0x60919 jmp 0x6091b jmp 0x6091d jmp 0x6091f jmp 0x60921 jmp 0x60923 jmp 0x60925 movl -0x9c(%rbp), %eax shrq $0x3, %rax movsd -0x90(%rbp,%rax,8), %xmm0 movsd %xmm0, -0xa8(%rbp) movsd -0xa8(%rbp), %xmm0 ucomisd %xmm0, %xmm0 setp %al testb $0x1, %al jne 0x60955 jmp 0x6098c movq -0x30(%rbp), %rdi movl -0x98(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x281c0 movl -0x98(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movl -0x98(%rbp), %eax addl -0x54(%rbp), %eax movl %eax, -0x54(%rbp) jmp 0x60a1b movq -0x48(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x609ee movq -0xa8(%rbp), %rax movq %rax, -0x10(%rbp) movl -0x98(%rbp), %eax movl %eax, %ecx leaq -0x10(%rbp), %rax addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax leaq -0x10(%rbp), %rcx cmpq %rcx, %rax jbe 0x609ec movq -0x60(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x60(%rbp) movb -0x1(%rax), %cl movq -0x30(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x30(%rbp) movb %cl, (%rax) jmp 0x609ba jmp 0x60a0f movq -0x30(%rbp), %rax movq -0xa8(%rbp), %rcx movq %rcx, (%rax) movl -0x98(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movl -0x98(%rbp), %eax addl -0x54(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x48(%rbp), %rax addq $0x20, %rax movq %rax, -0x48(%rbp) movl -0x94(%rbp), %eax addl $0x1, %eax movl %eax, -0x94(%rbp) jmp 0x608ee movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x4a410 movl -0x54(%rbp), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0xac(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x60a7c movl -0xac(%rbp), %eax addq $0xb0, %rsp popq %rbp retq callq 0x28390 nopw %cs:(%rax,%rax)
sp_make_key: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_24], esi mov [rbp+var_30], rdx mov [rbp+var_38], rcx mov [rbp+var_40], r8 mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_24] imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_50], rax mov [rbp+var_54], 0 mov rax, [rbp+var_50] mov rax, [rax+28h] add rax, 0FFFFFFFFFFFFFFE0h mov [rbp+var_48], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_48] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_48] movzx edi, byte ptr [rax+1Ah] mov rsi, [rbp+var_60] call _mi_calc_blob_length mov [rbp+var_64], eax mov rax, [rbp+var_60] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1Ah] movsxd rcx, ecx mov rax, [rax+rcx] mov [rbp+var_70], rax cmp [rbp+var_70], 0 jnz short loc_608B9 call _my_thread_var mov dword ptr [rax], 9Eh mov [rbp+var_14], 0 jmp loc_60A52 loc_608B9: mov rdi, [rbp+var_70] add rdi, 4 mov esi, [rbp+var_64] sub esi, 4 lea rcx, [rbp+var_90] mov edx, 2 call sp_mbr_from_wkb mov [rbp+var_94], 0 mov rax, [rbp+var_50] mov rax, [rax+28h] mov [rbp+var_48], rax loc_608EE: mov rax, [rbp+var_48] cmp byte ptr [rax+18h], 0 jz loc_60A3B mov rax, [rbp+var_48] movzx eax, word ptr [rax+14h] mov [rbp+var_98], eax mov rax, [rbp+var_48] mov eax, [rax+8] mov [rbp+var_9C], eax jmp short $+2 loc_60919: jmp short $+2 loc_6091B: jmp short $+2 loc_6091D: jmp short $+2 loc_6091F: jmp short $+2 loc_60921: jmp short $+2 loc_60923: jmp short $+2 loc_60925: mov eax, [rbp+var_9C] shr rax, 3 movsd xmm0, [rbp+rax*8+var_90] movsd [rbp+var_A8], xmm0 movsd xmm0, [rbp+var_A8] ucomisd xmm0, xmm0 setp al test al, 1 jnz short loc_60955 jmp short loc_6098C loc_60955: mov rdi, [rbp+var_30] mov eax, [rbp+var_98] mov edx, eax xor esi, esi call _memset mov ecx, [rbp+var_98] mov rax, [rbp+var_30] mov ecx, ecx add rax, rcx mov [rbp+var_30], rax mov eax, [rbp+var_98] add eax, [rbp+var_54] mov [rbp+var_54], eax jmp loc_60A1B loc_6098C: mov rax, [rbp+var_48] movzx eax, word ptr [rax+12h] and eax, 40h cmp eax, 0 jz short loc_609EE mov rax, [rbp+var_A8] mov [rbp+var_10], rax mov eax, [rbp+var_98] mov ecx, eax lea rax, [rbp+var_10] add rax, rcx mov [rbp+var_60], rax loc_609BA: mov rax, [rbp+var_60] lea rcx, [rbp+var_10] cmp rax, rcx jbe short loc_609EC mov rax, [rbp+var_60] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_60], rcx mov cl, [rax-1] mov rax, [rbp+var_30] mov rdx, rax add rdx, 1 mov [rbp+var_30], rdx mov [rax], cl jmp short loc_609BA loc_609EC: jmp short loc_60A0F loc_609EE: mov rax, [rbp+var_30] mov rcx, [rbp+var_A8] mov [rax], rcx mov ecx, [rbp+var_98] mov rax, [rbp+var_30] mov ecx, ecx add rax, rcx mov [rbp+var_30], rax loc_60A0F: mov eax, [rbp+var_98] add eax, [rbp+var_54] mov [rbp+var_54], eax loc_60A1B: mov rax, [rbp+var_48] add rax, 20h ; ' ' mov [rbp+var_48], rax mov eax, [rbp+var_94] add eax, 1 mov [rbp+var_94], eax jmp loc_608EE loc_60A3B: mov rdi, [rbp+var_20] mov rsi, [rbp+var_30] mov rdx, [rbp+var_40] call _mi_dpointer mov eax, [rbp+var_54] mov [rbp+var_14], eax loc_60A52: mov eax, [rbp+var_14] mov [rbp+var_AC], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_60A7C mov eax, [rbp+var_AC] add rsp, 0B0h pop rbp retn loc_60A7C: call ___stack_chk_fail
long long sp_make_key(long long a1, unsigned int a2, _BYTE *a3, long long a4, unsigned long long a5) { long long v5; // rdi unsigned __int8 *v6; // rax char v7; // cl _BYTE *v8; // rax unsigned int v10; // [rsp+18h] [rbp-98h] int v11; // [rsp+1Ch] [rbp-94h] _QWORD v12[4]; // [rsp+20h] [rbp-90h] BYREF long long v13; // [rsp+40h] [rbp-70h] int v14; // [rsp+4Ch] [rbp-64h] unsigned __int8 *v15; // [rsp+50h] [rbp-60h] unsigned int v16; // [rsp+5Ch] [rbp-54h] long long v17; // [rsp+60h] [rbp-50h] long long v18; // [rsp+68h] [rbp-48h] unsigned long long v19; // [rsp+70h] [rbp-40h] long long v20; // [rsp+78h] [rbp-38h] _BYTE *v21; // [rsp+80h] [rbp-30h] unsigned int v22; // [rsp+8Ch] [rbp-24h] long long v23; // [rsp+90h] [rbp-20h] _QWORD v25[2]; // [rsp+A0h] [rbp-10h] BYREF v25[1] = __readfsqword(0x28u); v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = a5; v17 = 112LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL); v16 = 0; v18 = *(_QWORD *)(v17 + 40) - 32LL; v15 = (unsigned __int8 *)(*(unsigned int *)(v18 + 8) + a4); v5 = *(unsigned __int8 *)(v18 + 26); v14 = mi_calc_blob_length(v5, v15); v13 = *(_QWORD *)&v15[*(unsigned __int8 *)(v18 + 26)]; if ( v13 ) { sp_mbr_from_wkb(v13 + 4, (unsigned int)(v14 - 4), 2LL, v12); v11 = 0; v18 = *(_QWORD *)(v17 + 40); while ( *(_BYTE *)(v18 + 24) ) { v10 = *(unsigned __int16 *)(v18 + 20); if ( (*(_WORD *)(v18 + 18) & 0x40) != 0 ) { v25[0] = v12[(unsigned long long)*(unsigned int *)(v18 + 8) >> 3]; v15 = (unsigned __int8 *)v25 + v10; while ( v15 > (unsigned __int8 *)v25 ) { v6 = v15--; v7 = *(v6 - 1); v8 = v21++; *v8 = v7; } } else { *(_QWORD *)v21 = v12[(unsigned long long)*(unsigned int *)(v18 + 8) >> 3]; v21 += v10; } v16 += v10; v18 += 32LL; ++v11; } mi_dpointer(v23, v21, v19); return v16; } else { *(_DWORD *)my_thread_var(v5, (const char *)v15) = 158; return 0; } }
sp_make_key: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV dword ptr [RBP + -0x24],ESI MOV qword ptr [RBP + -0x30],RDX MOV qword ptr [RBP + -0x38],RCX MOV qword ptr [RBP + -0x40],R8 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV dword ptr [RBP + -0x54],0x0 MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x28] ADD RAX,-0x20 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x48] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RSI,qword ptr [RBP + -0x60] CALL 0x001343b0 MOV dword ptr [RBP + -0x64],EAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1a] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x70],RAX CMP qword ptr [RBP + -0x70],0x0 JNZ 0x001608b9 CALL 0x00182cc0 MOV dword ptr [RAX],0x9e MOV dword ptr [RBP + -0x14],0x0 JMP 0x00160a52 LAB_001608b9: MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4 MOV ESI,dword ptr [RBP + -0x64] SUB ESI,0x4 LEA RCX,[RBP + -0x90] MOV EDX,0x2 CALL 0x00160a90 MOV dword ptr [RBP + -0x94],0x0 MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x48],RAX LAB_001608ee: MOV RAX,qword ptr [RBP + -0x48] CMP byte ptr [RAX + 0x18],0x0 JZ 0x00160a3b MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x98],EAX MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x9c],EAX JMP 0x00160919 LAB_00160919: JMP 0x0016091b LAB_0016091b: JMP 0x0016091d LAB_0016091d: JMP 0x0016091f LAB_0016091f: JMP 0x00160921 LAB_00160921: JMP 0x00160923 LAB_00160923: JMP 0x00160925 LAB_00160925: MOV EAX,dword ptr [RBP + -0x9c] SHR RAX,0x3 MOVSD XMM0,qword ptr [RBP + RAX*0x8 + -0x90] MOVSD qword ptr [RBP + -0xa8],XMM0 MOVSD XMM0,qword ptr [RBP + -0xa8] UCOMISD XMM0,XMM0 SETP AL TEST AL,0x1 JNZ 0x00160955 JMP 0x0016098c LAB_00160955: MOV RDI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x98] MOV EDX,EAX XOR ESI,ESI CALL 0x001281c0 MOV ECX,dword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x30] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBP + -0x98] ADD EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x54],EAX JMP 0x00160a1b LAB_0016098c: MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x40 CMP EAX,0x0 JZ 0x001609ee MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x10],RAX MOV EAX,dword ptr [RBP + -0x98] MOV ECX,EAX LEA RAX,[RBP + -0x10] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX LAB_001609ba: MOV RAX,qword ptr [RBP + -0x60] LEA RCX,[RBP + -0x10] CMP RAX,RCX JBE 0x001609ec MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x60],RCX MOV CL,byte ptr [RAX + -0x1] MOV RAX,qword ptr [RBP + -0x30] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x30],RDX MOV byte ptr [RAX],CL JMP 0x001609ba LAB_001609ec: JMP 0x00160a0f LAB_001609ee: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0xa8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x30] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_00160a0f: MOV EAX,dword ptr [RBP + -0x98] ADD EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x54],EAX LAB_00160a1b: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x20 MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x94] ADD EAX,0x1 MOV dword ptr [RBP + -0x94],EAX JMP 0x001608ee LAB_00160a3b: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x40] CALL 0x0014a410 MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x14],EAX LAB_00160a52: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0xac],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00160a7c MOV EAX,dword ptr [RBP + -0xac] ADD RSP,0xb0 POP RBP RET LAB_00160a7c: CALL 0x00128390
int sp_make_key(long *param_1,uint param_2,double *param_3,long param_4,int8 param_5) { double dVar1; long lVar2; double *pdVar3; double *pdVar4; uint uVar5; int4 *puVar6; long in_FS_OFFSET; double local_98 [4]; long local_78; int local_6c; double *local_68; int local_5c; long local_58; long local_50; int8 local_48; long local_40; double *local_38; uint local_2c; long *local_28; int local_1c; double local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_58 = *(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70; local_5c = 0; lVar2 = *(long *)(local_58 + 0x28); local_50 = lVar2 + -0x20; local_68 = (double *)(param_4 + (ulong)*(uint *)(lVar2 + -0x18)); local_48 = param_5; local_40 = param_4; local_38 = param_3; local_2c = param_2; local_28 = param_1; local_6c = _mi_calc_blob_length(*(int1 *)(lVar2 + -6),local_68); local_78 = *(long *)((long)local_68 + (long)(int)(uint)*(byte *)(local_50 + 0x1a)); if (local_78 == 0) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x9e; local_1c = 0; } else { sp_mbr_from_wkb(local_78 + 4,local_6c + -4,2,local_98); for (local_50 = *(long *)(local_58 + 0x28); *(char *)(local_50 + 0x18) != '\0'; local_50 = local_50 + 0x20) { uVar5 = (uint)*(ushort *)(local_50 + 0x14); dVar1 = local_98[*(uint *)(local_50 + 8) >> 3]; if (NAN(dVar1)) { memset(local_38,0,(ulong)uVar5); local_38 = (double *)((long)local_38 + (ulong)uVar5); local_5c = uVar5 + local_5c; } else { if ((*(ushort *)(local_50 + 0x12) & 0x40) == 0) { *local_38 = dVar1; local_38 = (double *)((long)local_38 + (ulong)uVar5); } else { local_18 = dVar1; local_68 = (double *)((long)&local_18 + (ulong)uVar5); while (pdVar4 = local_38, pdVar3 = local_68, &local_18 < local_68) { local_68 = (double *)((long)local_68 + -1); local_38 = (double *)((long)local_38 + 1); *(int1 *)pdVar4 = *(int1 *)((long)pdVar3 + -1); } } local_5c = uVar5 + local_5c; } } _mi_dpointer(local_28,local_38,local_48); local_1c = local_5c; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_1c; }
51,740
sp_make_key
eloqsql/storage/myisam/sp_key.c
uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key, const uchar *record, my_off_t filepos) { HA_KEYSEG *keyseg; MI_KEYDEF *keyinfo = &info->s->keyinfo[keynr]; uint len = 0; uchar *pos; uint dlen; uchar *dptr; double mbr[SPDIMS * 2]; uint i; keyseg = &keyinfo->seg[-1]; pos = (uchar*)record + keyseg->start; dlen = _mi_calc_blob_length(keyseg->bit_start, pos); memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*)); if (!dptr) { my_errno= HA_ERR_NULL_IN_SPATIAL; return 0; } sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */ for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++) { uint length = keyseg->length, start= keyseg->start; double val; DBUG_ASSERT(length == sizeof(double)); DBUG_ASSERT(!(start % sizeof(double))); DBUG_ASSERT(start < sizeof(mbr)); DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE); val= mbr[start / sizeof (double)]; if (isnan(val)) { bzero(key, length); key+= length; len+= length; continue; } if (keyseg->flag & HA_SWAP_KEY) { uchar buf[sizeof(double)]; float8store(buf, val); pos= &buf[length]; while (pos > buf) *key++ = *--pos; } else { float8store((uchar *)key, val); key += length; } len+= length; } _mi_dpointer(info, key, filepos); return len; }
O3
c
sp_make_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, -0x48(%rbp) movq %rdx, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rdi, -0x40(%rbp) movq (%rdi), %rax movq 0x218(%rax), %r15 movl %esi, %eax imulq $0x70, %rax, %r12 movq 0x28(%r15,%r12), %r13 movl -0x18(%r13), %ebx addq %rcx, %rbx movzbl -0x6(%r13), %edi movq %rbx, %rsi callq 0x31759 movzbl -0x6(%r13), %ecx movq (%rcx,%rbx), %rcx testq %rcx, %rcx je 0x48063 leaq (%r15,%r12), %rbx addq $0x28, %rbx leaq 0x4(%rcx), %rdx addl $-0x4, %eax leaq -0x38(%rbp), %r13 movq %rdx, (%r13) movapd 0x4f59d(%rip), %xmm0 # 0x97560 leaq -0x70(%rbp), %rdx movapd %xmm0, (%rdx) movapd %xmm0, 0x10(%rdx) leaq (%rcx,%rax), %rsi addq $0x4, %rsi movq %r13, %rdi movl $0x1, %ecx callq 0x480ac movq (%rbx), %r15 cmpb $0x0, 0x18(%r15) je 0x48073 xorl %r12d, %r12d movzwl 0x14(%r15), %ebx movl 0x8(%r15), %eax andl $-0x8, %eax movsd -0x70(%rbp,%rax), %xmm0 ucomisd %xmm0, %xmm0 jp 0x48051 testb $0x40, 0x12(%r15) jne 0x4801f movsd %xmm0, (%r14) addq %rbx, %r14 jmp 0x48041 movsd %xmm0, -0x38(%rbp) testl %ebx, %ebx je 0x48041 leaq (%rbx,%rbp), %rax addq $-0x38, %rax movb -0x1(%rax), %cl decq %rax movb %cl, (%r14) incq %r14 cmpq %r13, %rax ja 0x48030 addl %ebx, %r12d cmpb $0x0, 0x38(%r15) leaq 0x20(%r15), %r15 jne 0x47ff6 jmp 0x48076 movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0x281b0 addq %rbx, %r14 jmp 0x48041 callq 0x5c086 movl $0x9e, (%rax) xorl %r12d, %r12d jmp 0x48086 xorl %r12d, %r12d movq -0x40(%rbp), %rdi movq %r14, %rsi movq -0x48(%rbp), %rdx callq 0x3df8b movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x480a7 movl %r12d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x283d0
sp_make_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_48], r8 mov r14, rdx mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_40], rdi mov rax, [rdi] mov r15, [rax+218h] mov eax, esi imul r12, rax, 70h ; 'p' mov r13, [r15+r12+28h] mov ebx, [r13-18h] add rbx, rcx movzx edi, byte ptr [r13-6] mov rsi, rbx call _mi_calc_blob_length movzx ecx, byte ptr [r13-6] mov rcx, [rcx+rbx] test rcx, rcx jz loc_48063 lea rbx, [r15+r12] add rbx, 28h ; '(' lea rdx, [rcx+4] add eax, 0FFFFFFFCh lea r13, [rbp+var_38] mov [r13+0], rdx movapd xmm0, cs:xmmword_97560 lea rdx, [rbp+var_70] movapd xmmword ptr [rdx], xmm0 movapd xmmword ptr [rdx+10h], xmm0 lea rsi, [rcx+rax] add rsi, 4 mov rdi, r13 mov ecx, 1 call sp_get_geometry_mbr mov r15, [rbx] cmp byte ptr [r15+18h], 0 jz loc_48073 xor r12d, r12d loc_47FF6: movzx ebx, word ptr [r15+14h] mov eax, [r15+8] and eax, 0FFFFFFF8h movsd xmm0, [rbp+rax+var_70] ucomisd xmm0, xmm0 jp short loc_48051 test byte ptr [r15+12h], 40h jnz short loc_4801F movsd qword ptr [r14], xmm0 add r14, rbx jmp short loc_48041 loc_4801F: movsd [rbp+var_38], xmm0 test ebx, ebx jz short loc_48041 lea rax, [rbx+rbp] add rax, 0FFFFFFFFFFFFFFC8h loc_48030: mov cl, [rax-1] dec rax mov [r14], cl inc r14 cmp rax, r13 ja short loc_48030 loc_48041: add r12d, ebx cmp byte ptr [r15+38h], 0 lea r15, [r15+20h] jnz short loc_47FF6 jmp short loc_48076 loc_48051: mov rdi, r14 xor esi, esi mov rdx, rbx call _memset add r14, rbx jmp short loc_48041 loc_48063: call _my_thread_var mov dword ptr [rax], 9Eh xor r12d, r12d jmp short loc_48086 loc_48073: xor r12d, r12d loc_48076: mov rdi, [rbp+var_40] mov rsi, r14 mov rdx, [rbp+var_48] call _mi_dpointer loc_48086: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_480A7 mov eax, r12d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_480A7: call ___stack_chk_fail
long long sp_make_key(long long *a1, unsigned int a2, _QWORD *a3, long long a4, unsigned long long a5) { long long v6; // r15 long long v7; // r12 long long v8; // r13 unsigned __int8 *v9; // rbx long long v10; // rdi int v11; // eax long long v12; // rcx long long v13; // rbx long long v14; // r15 unsigned int v15; // r12d long long v16; // rbx char *v17; // rax char v18; // cl bool v19; // zf _OWORD v21[2]; // [rsp+0h] [rbp-70h] BYREF unsigned long long v22; // [rsp+28h] [rbp-48h] long long *v23; // [rsp+30h] [rbp-40h] _QWORD v24[7]; // [rsp+38h] [rbp-38h] BYREF v22 = a5; v24[1] = __readfsqword(0x28u); v23 = a1; v6 = *(_QWORD *)(*a1 + 536); v7 = 112LL * a2; v8 = *(_QWORD *)(v6 + v7 + 40); v9 = (unsigned __int8 *)(a4 + *(unsigned int *)(v8 - 24)); v10 = *(unsigned __int8 *)(v8 - 6); v11 = mi_calc_blob_length(v10, v9); v12 = *(_QWORD *)&v9[*(unsigned __int8 *)(v8 - 6)]; if ( v12 ) { v13 = v6 + v7 + 40; v24[0] = v12 + 4; v21[0] = xmmword_97560; v21[1] = xmmword_97560; ((void ( *)(_QWORD *, long long, _OWORD *, long long))sp_get_geometry_mbr)( v24, v12 + (unsigned int)(v11 - 4) + 4, v21, 1LL); v14 = *(_QWORD *)v13; if ( *(_BYTE *)(*(_QWORD *)v13 + 24LL) ) { v15 = 0; do { v16 = *(unsigned __int16 *)(v14 + 20); if ( (*(_BYTE *)(v14 + 18) & 0x40) != 0 ) { v24[0] = *(_QWORD *)((char *)v21 + (*(_DWORD *)(v14 + 8) & 0xFFFFFFF8)); if ( (_DWORD)v16 ) { v17 = (char *)v24 + v16; do { v18 = *--v17; *(_BYTE *)a3 = v18; a3 = (_QWORD *)((char *)a3 + 1); } while ( v17 > (char *)v24 ); } } else { *a3 = *(_QWORD *)((char *)v21 + (*(_DWORD *)(v14 + 8) & 0xFFFFFFF8)); a3 = (_QWORD *)((char *)a3 + v16); } v15 += v16; v19 = *(_BYTE *)(v14 + 56) == 0; v14 += 32LL; } while ( !v19 ); } else { v15 = 0; } mi_dpointer(v23, (long long)a3, v22); } else { *(_DWORD *)my_thread_var(v10, (const char *)v9) = 158; return 0; } return v15; }
sp_make_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],R8 MOV R14,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x40],RDI MOV RAX,qword ptr [RDI] MOV R15,qword ptr [RAX + 0x218] MOV EAX,ESI IMUL R12,RAX,0x70 MOV R13,qword ptr [R15 + R12*0x1 + 0x28] MOV EBX,dword ptr [R13 + -0x18] ADD RBX,RCX MOVZX EDI,byte ptr [R13 + -0x6] MOV RSI,RBX CALL 0x00131759 MOVZX ECX,byte ptr [R13 + -0x6] MOV RCX,qword ptr [RCX + RBX*0x1] TEST RCX,RCX JZ 0x00148063 LEA RBX,[R15 + R12*0x1] ADD RBX,0x28 LEA RDX,[RCX + 0x4] ADD EAX,-0x4 LEA R13,[RBP + -0x38] MOV qword ptr [R13],RDX MOVAPD XMM0,xmmword ptr [0x00197560] LEA RDX,[RBP + -0x70] MOVAPD xmmword ptr [RDX],XMM0 MOVAPD xmmword ptr [RDX + 0x10],XMM0 LEA RSI,[RCX + RAX*0x1] ADD RSI,0x4 MOV RDI,R13 MOV ECX,0x1 CALL 0x001480ac MOV R15,qword ptr [RBX] CMP byte ptr [R15 + 0x18],0x0 JZ 0x00148073 XOR R12D,R12D LAB_00147ff6: MOVZX EBX,word ptr [R15 + 0x14] MOV EAX,dword ptr [R15 + 0x8] AND EAX,0xfffffff8 MOVSD XMM0,qword ptr [RBP + RAX*0x1 + -0x70] UCOMISD XMM0,XMM0 JP 0x00148051 TEST byte ptr [R15 + 0x12],0x40 JNZ 0x0014801f MOVSD qword ptr [R14],XMM0 ADD R14,RBX JMP 0x00148041 LAB_0014801f: MOVSD qword ptr [RBP + -0x38],XMM0 TEST EBX,EBX JZ 0x00148041 LEA RAX,[RBX + RBP*0x1] ADD RAX,-0x38 LAB_00148030: MOV CL,byte ptr [RAX + -0x1] DEC RAX MOV byte ptr [R14],CL INC R14 CMP RAX,R13 JA 0x00148030 LAB_00148041: ADD R12D,EBX CMP byte ptr [R15 + 0x38],0x0 LEA R15,[R15 + 0x20] JNZ 0x00147ff6 JMP 0x00148076 LAB_00148051: MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX CALL 0x001281b0 ADD R14,RBX JMP 0x00148041 LAB_00148063: CALL 0x0015c086 MOV dword ptr [RAX],0x9e XOR R12D,R12D JMP 0x00148086 LAB_00148073: XOR R12D,R12D LAB_00148076: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,R14 MOV RDX,qword ptr [RBP + -0x48] CALL 0x0013df8b LAB_00148086: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001480a7 MOV EAX,R12D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001480a7: CALL 0x001283d0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int sp_make_key(long *param_1,ulong param_2,double *param_3,long param_4,int8 param_5) { int1 *puVar1; char *pcVar2; double dVar3; ushort uVar4; long lVar5; int iVar6; double *pdVar7; int4 *puVar8; ulong __n; long lVar9; long lVar10; long in_FS_OFFSET; double local_78 [5]; int8 local_50; long *local_48; double local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar10 = *(long *)(*param_1 + 0x218); lVar9 = (param_2 & 0xffffffff) * 0x70; lVar5 = *(long *)(lVar10 + 0x28 + lVar9); param_4 = (ulong)*(uint *)(lVar5 + -0x18) + param_4; local_50 = param_5; local_48 = param_1; iVar6 = _mi_calc_blob_length(*(int1 *)(lVar5 + -6),param_4); lVar5 = *(long *)((ulong)*(byte *)(lVar5 + -6) + param_4); if (lVar5 == 0) { puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x9e; iVar6 = 0; } else { local_40 = (double)(lVar5 + 4); local_78[0] = _DAT_00197560; local_78[1] = (double)_UNK_00197568; local_78[2] = _DAT_00197560; local_78[3] = (double)_UNK_00197568; sp_get_geometry_mbr(&local_40,lVar5 + (ulong)(iVar6 - 4) + 4,local_78,1); lVar10 = *(long *)(lVar10 + lVar9 + 0x28); if (*(char *)(lVar10 + 0x18) == '\0') { iVar6 = 0; } else { iVar6 = 0; do { uVar4 = *(ushort *)(lVar10 + 0x14); __n = (ulong)uVar4; dVar3 = *(double *)((long)local_78 + (ulong)(*(uint *)(lVar10 + 8) & 0xfffffff8)); if (NAN(dVar3)) { memset(param_3,0,__n); param_3 = (double *)((long)param_3 + __n); } else if ((*(byte *)(lVar10 + 0x12) & 0x40) == 0) { *param_3 = dVar3; param_3 = (double *)((long)param_3 + __n); } else { local_40 = dVar3; if (uVar4 != 0) { pdVar7 = (double *)((long)&local_40 + __n); do { puVar1 = (int1 *)((long)pdVar7 - 1); pdVar7 = (double *)((long)pdVar7 - 1); *(int1 *)param_3 = *puVar1; param_3 = (double *)((long)param_3 + 1); } while (&local_40 < pdVar7); } } iVar6 = iVar6 + (uint)uVar4; pcVar2 = (char *)(lVar10 + 0x38); lVar10 = lVar10 + 0x20; } while (*pcVar2 != '\0'); } _mi_dpointer(local_48,param_3,local_50); } if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return iVar6; }
51,741
google::protobuf::FileDescriptorTables::AddEnumValueByNumber(google::protobuf::EnumValueDescriptor*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
bool FileDescriptorTables::AddEnumValueByNumber(EnumValueDescriptor* value) { // Skip values that are at the start of the sequence. const int base = value->type()->value(0)->number(); if (base <= value->number() && value->number() <= static_cast<int64_t>(base) + value->type()->sequential_value_limit_) return true; return enum_values_by_number_.insert(Symbol::EnumValue(value, 0)).second; }
O0
cpp
google::protobuf::FileDescriptorTables::AddEnumValueByNumber(google::protobuf::EnumValueDescriptor*): subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x60(%rsp), %rdi callq 0x73e00 movq %rax, %rdi xorl %esi, %esi callq 0x73e10 movq %rax, %rdi callq 0x73e30 movl %eax, 0x5c(%rsp) movl 0x5c(%rsp), %eax movl %eax, 0x2c(%rsp) movq 0x60(%rsp), %rdi callq 0x73e30 movl %eax, %ecx movl 0x2c(%rsp), %eax cmpl %ecx, %eax jg 0x341aa movq 0x60(%rsp), %rdi callq 0x73e30 cltq movq %rax, 0x18(%rsp) movslq 0x5c(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x60(%rsp), %rdi callq 0x73e00 movq 0x10(%rsp), %rcx movq %rax, %rdx movq 0x18(%rsp), %rax movswq 0x2(%rdx), %rdx addq %rdx, %rcx cmpq %rcx, %rax jg 0x341aa movb $0x1, 0x77(%rsp) jmp 0x341ff movq 0x20(%rsp), %rax addq $0x88, %rax movq %rax, 0x8(%rsp) movq 0x60(%rsp), %rdi xorl %esi, %esi callq 0x73e40 movq 0x8(%rsp), %rdi movq %rax, 0x40(%rsp) leaq 0x40(%rsp), %rsi callq 0x340c0 movb %dl, 0x38(%rsp) movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x48(%rsp) movb 0x38(%rsp), %al movb %al, 0x50(%rsp) movb 0x50(%rsp), %al andb $0x1, %al movb %al, 0x77(%rsp) movb 0x77(%rsp), %al andb $0x1, %al addq $0x78, %rsp retq nopw (%rax,%rax)
_ZN6google8protobuf20FileDescriptorTables20AddEnumValueByNumberEPNS0_19EnumValueDescriptorE: sub rsp, 78h mov [rsp+78h+var_10], rdi mov [rsp+78h+var_18], rsi mov rax, [rsp+78h+var_10] mov [rsp+78h+var_58], rax mov rdi, [rsp+78h+var_18]; this call _ZNK6google8protobuf19EnumValueDescriptor4typeEv; google::protobuf::EnumValueDescriptor::type(void) mov rdi, rax; this xor esi, esi; int call _ZNK6google8protobuf14EnumDescriptor5valueEi; google::protobuf::EnumDescriptor::value(int) mov rdi, rax; this call _ZNK6google8protobuf19EnumValueDescriptor6numberEv; google::protobuf::EnumValueDescriptor::number(void) mov [rsp+78h+var_1C], eax mov eax, [rsp+78h+var_1C] mov [rsp+78h+var_4C], eax mov rdi, [rsp+78h+var_18]; this call _ZNK6google8protobuf19EnumValueDescriptor6numberEv; google::protobuf::EnumValueDescriptor::number(void) mov ecx, eax mov eax, [rsp+78h+var_4C] cmp eax, ecx jg short loc_341AA mov rdi, [rsp+78h+var_18]; this call _ZNK6google8protobuf19EnumValueDescriptor6numberEv; google::protobuf::EnumValueDescriptor::number(void) cdqe mov [rsp+78h+var_60], rax movsxd rax, [rsp+78h+var_1C] mov [rsp+78h+var_68], rax mov rdi, [rsp+78h+var_18]; this call _ZNK6google8protobuf19EnumValueDescriptor4typeEv; google::protobuf::EnumValueDescriptor::type(void) mov rcx, [rsp+78h+var_68] mov rdx, rax mov rax, [rsp+78h+var_60] movsx rdx, word ptr [rdx+2] add rcx, rdx cmp rax, rcx jg short loc_341AA mov [rsp+78h+var_1], 1 jmp short loc_341FF loc_341AA: mov rax, [rsp+78h+var_58] add rax, 88h mov [rsp+78h+var_70], rax mov rdi, [rsp+78h+var_18]; this xor esi, esi; google::protobuf::EnumValueDescriptor * call _ZN6google8protobuf6Symbol9EnumValueEPNS0_19EnumValueDescriptorEi; google::protobuf::Symbol::EnumValue(google::protobuf::EnumValueDescriptor *,int) mov rdi, [rsp+78h+var_70] mov [rsp+78h+var_38], rax lea rsi, [rsp+78h+var_38] call _ZNSt13unordered_setIN6google8protobuf6SymbolENS1_12_GLOBAL__N_118FieldsByNumberHashENS3_16FieldsByNumberEqESaIS2_EE6insertEOS2_; std::unordered_set<google::protobuf::Symbol,google::protobuf::`anonymous namespace'::FieldsByNumberHash,google::protobuf::`anonymous namespace'::FieldsByNumberEq,std::allocator<google::protobuf::Symbol>>::insert(google::protobuf::Symbol&&) mov [rsp+78h+var_40], dl mov [rsp+78h+var_48], rax mov rax, [rsp+78h+var_48] mov [rsp+78h+var_30], rax mov al, [rsp+78h+var_40] mov [rsp+78h+var_28], al mov al, [rsp+78h+var_28] and al, 1 mov [rsp+78h+var_1], al loc_341FF: mov al, [rsp+78h+var_1] and al, 1 add rsp, 78h retn
char google::protobuf::FileDescriptorTables::AddEnumValueByNumber( google::protobuf::FileDescriptorTables *this, google::protobuf::EnumValueDescriptor *a2) { google::protobuf::EnumDescriptor *v2; // rax google::protobuf::EnumValueDescriptor *v3; // rax long long v4; // rdx char v5; // dl long long v7; // [rsp+18h] [rbp-60h] _QWORD v8[2]; // [rsp+40h] [rbp-38h] BYREF char v9; // [rsp+50h] [rbp-28h] int v10; // [rsp+5Ch] [rbp-1Ch] google::protobuf::EnumValueDescriptor *v11; // [rsp+60h] [rbp-18h] google::protobuf::FileDescriptorTables *v12; // [rsp+68h] [rbp-10h] v12 = this; v11 = a2; v2 = (google::protobuf::EnumDescriptor *)google::protobuf::EnumValueDescriptor::type(a2); v3 = (google::protobuf::EnumValueDescriptor *)google::protobuf::EnumDescriptor::value(v2, 0); v10 = google::protobuf::EnumValueDescriptor::number(v3); if ( v10 <= (int)google::protobuf::EnumValueDescriptor::number(a2) ) { v7 = (int)google::protobuf::EnumValueDescriptor::number(v11); v4 = *(__int16 *)(google::protobuf::EnumValueDescriptor::type(v11) + 2); if ( v7 <= v4 + v10 ) return 1; } v8[0] = google::protobuf::Symbol::EnumValue(v11, 0LL, v4); v8[1] = std::unordered_set<google::protobuf::Symbol,google::protobuf::`anonymous namespace'::FieldsByNumberHash,google::protobuf::`anonymous namespace'::FieldsByNumberEq,std::allocator<google::protobuf::Symbol>>::insert( (long long)this + 136, (long long)v8); v9 = v5; return v5 & 1; }
AddEnumValueByNumber: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00173e00 MOV RDI,RAX XOR ESI,ESI CALL 0x00173e10 MOV RDI,RAX CALL 0x00173e30 MOV dword ptr [RSP + 0x5c],EAX MOV EAX,dword ptr [RSP + 0x5c] MOV dword ptr [RSP + 0x2c],EAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00173e30 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x2c] CMP EAX,ECX JG 0x001341aa MOV RDI,qword ptr [RSP + 0x60] CALL 0x00173e30 CDQE MOV qword ptr [RSP + 0x18],RAX MOVSXD RAX,dword ptr [RSP + 0x5c] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00173e00 MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x18] MOVSX RDX,word ptr [RDX + 0x2] ADD RCX,RDX CMP RAX,RCX JG 0x001341aa MOV byte ptr [RSP + 0x77],0x1 JMP 0x001341ff LAB_001341aa: MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x88 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x60] XOR ESI,ESI CALL 0x00173e40 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x40],RAX LEA RSI,[RSP + 0x40] CALL 0x001340c0 MOV byte ptr [RSP + 0x38],DL MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x48],RAX MOV AL,byte ptr [RSP + 0x38] MOV byte ptr [RSP + 0x50],AL MOV AL,byte ptr [RSP + 0x50] AND AL,0x1 MOV byte ptr [RSP + 0x77],AL LAB_001341ff: MOV AL,byte ptr [RSP + 0x77] AND AL,0x1 ADD RSP,0x78 RET
/* google::protobuf::FileDescriptorTables::AddEnumValueByNumber(google::protobuf::EnumValueDescriptor*) */ int8 __thiscall google::protobuf::FileDescriptorTables::AddEnumValueByNumber (FileDescriptorTables *this,EnumValueDescriptor *param_1) { int iVar1; int iVar2; EnumDescriptor *this_00; EnumValueDescriptor *this_01; ulong uVar3; long lVar4; long lVar5; int8 uVar6; int1 extraout_DL; int8 local_38 [3]; int local_1c; EnumValueDescriptor *local_18; FileDescriptorTables *local_10; int1 local_1; local_18 = param_1; local_10 = this; this_00 = (EnumDescriptor *)EnumValueDescriptor::type(param_1); this_01 = (EnumValueDescriptor *)EnumDescriptor::value(this_00,0); iVar1 = EnumValueDescriptor::number(this_01); local_1c = iVar1; iVar2 = EnumValueDescriptor::number(local_18); if (iVar1 <= iVar2) { iVar1 = EnumValueDescriptor::number(local_18); uVar3 = (ulong)iVar1; lVar4 = (long)local_1c; lVar5 = EnumValueDescriptor::type(local_18); if ((long)uVar3 <= lVar4 + *(short *)(lVar5 + 2)) { local_1 = 1; goto LAB_001341ff; } } local_38[0] = Symbol::EnumValue(local_18,0); uVar6 = std:: unordered_set<google::protobuf::Symbol,google::protobuf::(anonymous_namespace)::FieldsByNumberHash,google::protobuf::(anonymous_namespace)::FieldsByNumberEq,std::allocator<google::protobuf::Symbol>> ::insert((unordered_set<google::protobuf::Symbol,google::protobuf::(anonymous_namespace)::FieldsByNumberHash,google::protobuf::(anonymous_namespace)::FieldsByNumberEq,std::allocator<google::protobuf::Symbol>> *)(this + 0x88),(Symbol *)local_38); uVar3 = CONCAT71((int7)((ulong)uVar6 >> 8),extraout_DL) & 0xffffffffffffff01; local_1 = (int1)uVar3; LAB_001341ff: return CONCAT71((int7)(uVar3 >> 8),local_1); }
51,742
my_snprintf_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_utf32(to, n, fmt, args); va_end(args); return ret; }
O3
c
my_snprintf_utf32: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rsi, %r12 leaq -0x120(%rbp), %rcx movq %r8, 0x20(%rcx) movq %r9, 0x28(%rcx) testb %al, %al je 0xc59ff movaps %xmm0, -0xf0(%rbp) movaps %xmm1, -0xe0(%rbp) movaps %xmm2, -0xd0(%rbp) movaps %xmm3, -0xc0(%rbp) movaps %xmm4, -0xb0(%rbp) movaps %xmm5, -0xa0(%rbp) movaps %xmm6, -0x90(%rbp) movaps %xmm7, -0x80(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rcx, -0x50(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x58(%rbp) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, -0x60(%rbp) addq %rsi, %rbx leaq -0x40(%rbp), %r14 movq %rsi, -0x68(%rbp) movzbl (%r15), %eax cmpl $0x25, %eax je 0xc5a69 testl %eax, %eax je 0xc5bea cmpq %rbx, %r12 jae 0xc5bea movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb (%r15), %al movb %al, 0x3(%r12) addq $0x4, %r12 incq %r15 jmp 0xc5a31 addq $0x2, %r15 movb -0x1(%r15), %al leal -0x30(%rax), %ecx cmpb $0xa, %cl jb 0xc5a84 movzbl %al, %ecx leal -0x2d(%rcx), %edx cmpl $0x2, %edx jae 0xc5a89 incq %r15 jmp 0xc5a6d cmpl $0x6c, %ecx jne 0xc5a93 movb (%r15), %al jmp 0xc5a96 decq %r15 cmpb $0x64, %al je 0xc5ac6 movzbl %al, %eax cmpl $0x75, %eax je 0xc5ac6 cmpl $0x73, %eax jne 0xc5aee movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0xc5b67 movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0xc5b73 movq %rbx, %rax subq %r12, %rax cmpq $0x3f, %rax jbe 0xc5bea movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0xc5b04 movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0xc5b10 cmpq %rbx, %r12 je 0xc5be7 movl $0x25000000, (%r12) # imm = 0x25000000 jmp 0xc5a60 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movslq (%rax), %rdi cmpb $0x64, (%r15) jne 0xc5b23 movq %r14, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0xc5b2d movl %edi, %edi movq %r14, %rsi movl $0xa, %edx callq 0xd672e cmpb $0x0, -0x40(%rbp) je 0xc5a64 leaq -0x3f(%rbp), %rax movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb -0x1(%rax), %cl movb %cl, 0x3(%r12) addq $0x4, %r12 cmpb $0x0, (%rax) leaq 0x1(%rax), %rax jne 0xc5b40 jmp 0xc5a64 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movq (%rax), %r13 movq %rbx, %r14 subq %r12, %r14 testq %r13, %r13 leaq 0x1a735(%rip), %rax # 0xe02bb cmoveq %rax, %r13 movq %r13, %rdi callq 0x29350 leaq (,%rax,4), %rdx movq %r14, %rcx shrq $0x2, %rcx decq %rcx cmpq %rdx, %r14 cmovaq %rax, %rcx testq %rcx, %rcx je 0xc5bde xorl %eax, %eax leaq -0x40(%rbp), %r14 movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb (%r13,%rax), %dl movb %dl, 0x3(%r12) addq $0x4, %r12 incq %rax cmpq %rax, %rcx jne 0xc5bb6 jmp 0xc5a64 leaq -0x40(%rbp), %r14 jmp 0xc5a64 movq %rbx, %r12 movl $0x0, (%r12) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xc5c1a subq -0x68(%rbp), %r12 movq %r12, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
my_snprintf_utf32: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov rbx, rdx mov r12, rsi lea rcx, [rbp+var_120] mov [rcx+20h], r8 mov [rcx+28h], r9 test al, al jz short loc_C59FF movaps [rbp+var_F0], xmm0 movaps [rbp+var_E0], xmm1 movaps [rbp+var_D0], xmm2 movaps [rbp+var_C0], xmm3 movaps [rbp+var_B0], xmm4 movaps [rbp+var_A0], xmm5 movaps [rbp+var_90], xmm6 movaps [rbp+var_80], xmm7 loc_C59FF: mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_50], rcx lea rax, [rbp+arg_0] mov [rbp+var_58], rax mov rax, 3000000020h mov [rbp+var_60], rax add rbx, rsi lea r14, [rbp+var_40] mov [rbp+var_68], rsi loc_C5A31: movzx eax, byte ptr [r15] cmp eax, 25h ; '%' jz short loc_C5A69 test eax, eax jz loc_C5BEA cmp r12, rbx jnb loc_C5BEA mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov al, [r15] mov [r12+3], al loc_C5A60: add r12, 4 loc_C5A64: inc r15 jmp short loc_C5A31 loc_C5A69: add r15, 2 loc_C5A6D: mov al, [r15-1] lea ecx, [rax-30h] cmp cl, 0Ah jb short loc_C5A84 movzx ecx, al lea edx, [rcx-2Dh] cmp edx, 2 jnb short loc_C5A89 loc_C5A84: inc r15 jmp short loc_C5A6D loc_C5A89: cmp ecx, 6Ch ; 'l' jnz short loc_C5A93 mov al, [r15] jmp short loc_C5A96 loc_C5A93: dec r15 loc_C5A96: cmp al, 64h ; 'd' jz short loc_C5AC6 movzx eax, al cmp eax, 75h ; 'u' jz short loc_C5AC6 cmp eax, 73h ; 's' jnz short loc_C5AEE mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja loc_C5B67 mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp loc_C5B73 loc_C5AC6: mov rax, rbx sub rax, r12 cmp rax, 3Fh ; '?' jbe loc_C5BEA mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja short loc_C5B04 mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp short loc_C5B10 loc_C5AEE: cmp r12, rbx jz loc_C5BE7 mov dword ptr [r12], 25000000h jmp loc_C5A60 loc_C5B04: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_C5B10: movsxd rdi, dword ptr [rax] cmp byte ptr [r15], 64h ; 'd' jnz short loc_C5B23 mov rsi, r14 mov edx, 0FFFFFFF6h jmp short loc_C5B2D loc_C5B23: mov edi, edi mov rsi, r14 mov edx, 0Ah loc_C5B2D: call int10_to_str cmp [rbp+var_40], 0 jz loc_C5A64 lea rax, [rbp+var_3F] loc_C5B40: mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov cl, [rax-1] mov [r12+3], cl add r12, 4 cmp byte ptr [rax], 0 lea rax, [rax+1] jnz short loc_C5B40 jmp loc_C5A64 loc_C5B67: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_C5B73: mov r13, [rax] mov r14, rbx sub r14, r12 test r13, r13 lea rax, aNull; "(null)" cmovz r13, rax mov rdi, r13 call _strlen lea rdx, ds:0[rax*4] mov rcx, r14 shr rcx, 2 dec rcx cmp r14, rdx cmova rcx, rax test rcx, rcx jz short loc_C5BDE xor eax, eax lea r14, [rbp+var_40] loc_C5BB6: mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov dl, [r13+rax+0] mov [r12+3], dl add r12, 4 inc rax cmp rcx, rax jnz short loc_C5BB6 jmp loc_C5A64 loc_C5BDE: lea r14, [rbp+var_40] jmp loc_C5A64 loc_C5BE7: mov r12, rbx loc_C5BEA: mov dword ptr [r12], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_C5C1A sub r12, [rbp+var_68] mov rax, r12 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C5C1A: call ___stack_chk_fail
unsigned long long my_snprintf_utf32( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, unsigned long long a10, long long a11, unsigned __int8 *a12, long long a13, long long a14, char a15) { unsigned long long v16; // r12 unsigned long long v17; // rbx unsigned __int8 v18; // al const char **v19; // rax char *v20; // rax long long v21; // rdi long long v22; // rdx char *v23; // rax const char *v25; // r13 unsigned long long v26; // r14 long long v27; // rax long long v28; // rcx long long i; // rax char v31; // [rsp+0h] [rbp-120h] BYREF long long v32; // [rsp+20h] [rbp-100h] long long v33; // [rsp+28h] [rbp-F8h] __m128 v34; // [rsp+30h] [rbp-F0h] __m128 v35; // [rsp+40h] [rbp-E0h] __m128 v36; // [rsp+50h] [rbp-D0h] __m128 v37; // [rsp+60h] [rbp-C0h] __m128 v38; // [rsp+70h] [rbp-B0h] __m128 v39; // [rsp+80h] [rbp-A0h] __m128 v40; // [rsp+90h] [rbp-90h] __m128 v41; // [rsp+A0h] [rbp-80h] unsigned long long v42; // [rsp+B8h] [rbp-68h] long long v43; // [rsp+C0h] [rbp-60h] char *v44; // [rsp+C8h] [rbp-58h] char *v45; // [rsp+D0h] [rbp-50h] char v46; // [rsp+E0h] [rbp-40h] BYREF char v47; // [rsp+E1h] [rbp-3Fh] BYREF unsigned long long v48; // [rsp+F0h] [rbp-30h] v34 = a1; v35 = a2; v36 = a3; v37 = a4; v38 = a5; v39 = a6; v40 = a7; v41 = a8; v16 = a10; v32 = a13; v33 = a14; v48 = __readfsqword(0x28u); v45 = &v31; v44 = &a15; v43 = 0x3000000020LL; v17 = a10 + a11; v42 = a10; while ( 1 ) { if ( *a12 != 37 ) { if ( !*a12 || v16 >= v17 ) goto LABEL_44; *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = *a12; goto LABEL_6; } for ( a12 += 2; ; ++a12 ) { v18 = *(a12 - 1); if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 ) break; } if ( v18 == 108 ) v18 = *a12; else --a12; if ( v18 != 100 && v18 != 117 ) break; if ( v17 - v16 <= 0x3F ) goto LABEL_44; if ( (unsigned int)v43 > 0x28uLL ) { v20 = v44; v44 += 8; } else { v20 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v21 = *(int *)v20; if ( *a12 == 100 ) { v22 = 4294967286LL; } else { v21 = (unsigned int)v21; v22 = 10LL; } int10_to_str(v21, &v46, v22); if ( v46 ) { v23 = &v47; do { *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = *(v23 - 1); v16 += 4LL; } while ( *v23++ != 0 ); } LABEL_7: ++a12; } if ( v18 == 115 ) { if ( (unsigned int)v43 > 0x28uLL ) { v19 = (const char **)v44; v44 += 8; } else { v19 = (const char **)&v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v25 = *v19; v26 = v17 - v16; if ( !*v19 ) v25 = "(null)"; v27 = strlen(v25); v28 = (v26 >> 2) - 1; if ( v26 > 4 * v27 ) v28 = v27; if ( v28 ) { for ( i = 0LL; i != v28; ++i ) { *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = v25[i]; v16 += 4LL; } } goto LABEL_7; } if ( v16 != v17 ) { *(_DWORD *)v16 = 620756992; LABEL_6: v16 += 4LL; goto LABEL_7; } v16 = v17; LABEL_44: *(_DWORD *)v16 = 0; return v16 - v42; }
my_snprintf_utf32: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV RBX,RDX MOV R12,RSI LEA RCX,[RBP + -0x120] MOV qword ptr [RCX + 0x20],R8 MOV qword ptr [RCX + 0x28],R9 TEST AL,AL JZ 0x001c59ff MOVAPS xmmword ptr [RBP + -0xf0],XMM0 MOVAPS xmmword ptr [RBP + -0xe0],XMM1 MOVAPS xmmword ptr [RBP + -0xd0],XMM2 MOVAPS xmmword ptr [RBP + -0xc0],XMM3 MOVAPS xmmword ptr [RBP + -0xb0],XMM4 MOVAPS xmmword ptr [RBP + -0xa0],XMM5 MOVAPS xmmword ptr [RBP + -0x90],XMM6 MOVAPS xmmword ptr [RBP + -0x80],XMM7 LAB_001c59ff: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x50],RCX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,0x3000000020 MOV qword ptr [RBP + -0x60],RAX ADD RBX,RSI LEA R14,[RBP + -0x40] MOV qword ptr [RBP + -0x68],RSI LAB_001c5a31: MOVZX EAX,byte ptr [R15] CMP EAX,0x25 JZ 0x001c5a69 TEST EAX,EAX JZ 0x001c5bea CMP R12,RBX JNC 0x001c5bea MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV AL,byte ptr [R15] MOV byte ptr [R12 + 0x3],AL LAB_001c5a60: ADD R12,0x4 LAB_001c5a64: INC R15 JMP 0x001c5a31 LAB_001c5a69: ADD R15,0x2 LAB_001c5a6d: MOV AL,byte ptr [R15 + -0x1] LEA ECX,[RAX + -0x30] CMP CL,0xa JC 0x001c5a84 MOVZX ECX,AL LEA EDX,[RCX + -0x2d] CMP EDX,0x2 JNC 0x001c5a89 LAB_001c5a84: INC R15 JMP 0x001c5a6d LAB_001c5a89: CMP ECX,0x6c JNZ 0x001c5a93 MOV AL,byte ptr [R15] JMP 0x001c5a96 LAB_001c5a93: DEC R15 LAB_001c5a96: CMP AL,0x64 JZ 0x001c5ac6 MOVZX EAX,AL CMP EAX,0x75 JZ 0x001c5ac6 CMP EAX,0x73 JNZ 0x001c5aee MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x001c5b67 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x001c5b73 LAB_001c5ac6: MOV RAX,RBX SUB RAX,R12 CMP RAX,0x3f JBE 0x001c5bea MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x001c5b04 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x001c5b10 LAB_001c5aee: CMP R12,RBX JZ 0x001c5be7 MOV dword ptr [R12],0x25000000 JMP 0x001c5a60 LAB_001c5b04: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_001c5b10: MOVSXD RDI,dword ptr [RAX] CMP byte ptr [R15],0x64 JNZ 0x001c5b23 MOV RSI,R14 MOV EDX,0xfffffff6 JMP 0x001c5b2d LAB_001c5b23: MOV EDI,EDI MOV RSI,R14 MOV EDX,0xa LAB_001c5b2d: CALL 0x001d672e CMP byte ptr [RBP + -0x40],0x0 JZ 0x001c5a64 LEA RAX,[RBP + -0x3f] LAB_001c5b40: MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV CL,byte ptr [RAX + -0x1] MOV byte ptr [R12 + 0x3],CL ADD R12,0x4 CMP byte ptr [RAX],0x0 LEA RAX,[RAX + 0x1] JNZ 0x001c5b40 JMP 0x001c5a64 LAB_001c5b67: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_001c5b73: MOV R13,qword ptr [RAX] MOV R14,RBX SUB R14,R12 TEST R13,R13 LEA RAX,[0x1e02bb] CMOVZ R13,RAX MOV RDI,R13 CALL 0x00129350 LEA RDX,[RAX*0x4] MOV RCX,R14 SHR RCX,0x2 DEC RCX CMP R14,RDX CMOVA RCX,RAX TEST RCX,RCX JZ 0x001c5bde XOR EAX,EAX LEA R14,[RBP + -0x40] LAB_001c5bb6: MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV DL,byte ptr [R13 + RAX*0x1] MOV byte ptr [R12 + 0x3],DL ADD R12,0x4 INC RAX CMP RCX,RAX JNZ 0x001c5bb6 JMP 0x001c5a64 LAB_001c5bde: LEA R14,[RBP + -0x40] JMP 0x001c5a64 LAB_001c5be7: MOV R12,RBX LAB_001c5bea: MOV dword ptr [R12],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001c5c1a SUB R12,qword ptr [RBP + -0x68] MOV RAX,R12 ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c5c1a: CALL 0x00129270
long my_snprintf_utf32(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,int4 *param_10,long param_11,byte *param_12, int8 param_13,int8 param_14) { char in_AL; byte bVar1; uint *puVar2; size_t sVar3; size_t sVar4; int8 uVar5; int4 *puVar6; ulong uVar7; int4 *puVar8; char *pcVar9; long in_FS_OFFSET; int1 local_128 [32]; int8 local_108; int8 local_100; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int4 *local_70; ulong local_68; uint *local_60; int1 *local_58; char local_48 [16]; long local_38; local_58 = local_128; if (in_AL != '\0') { local_f8 = param_1; local_e8 = param_2; local_d8 = param_3; local_c8 = param_4; local_b8 = param_5; local_a8 = param_6; local_98 = param_7; local_88 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_60 = (uint *)&stack0x00000008; local_68 = 0x3000000020; puVar6 = (int4 *)(param_11 + (long)param_10); local_108 = param_13; local_100 = param_14; local_70 = param_10; do { puVar8 = param_10; if (*param_12 == 0x25) { param_12 = param_12 + 2; while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) { param_12 = param_12 + 1; } if (bVar1 == 0x6c) { bVar1 = *param_12; } else { param_12 = param_12 + -1; } if ((bVar1 == 100) || (bVar1 == 0x75)) { if ((ulong)((long)puVar6 - (long)param_10) < 0x40) { LAB_001c5bea: *puVar8 = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)puVar8 - (long)local_70; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } uVar7 = (ulong)(int)*puVar2; if (*param_12 == 100) { uVar5 = 0xfffffff6; } else { uVar7 = (ulong)*puVar2; uVar5 = 10; } int10_to_str(uVar7,local_48,uVar5); if (local_48[0] != '\0') { pcVar9 = local_48; do { pcVar9 = pcVar9 + 1; *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(char *)((long)param_10 + 3) = pcVar9[-1]; param_10 = param_10 + 1; } while (*pcVar9 != '\0'); } } else { if (bVar1 != 0x73) { puVar8 = puVar6; if (param_10 != puVar6) { *param_10 = 0x25000000; goto LAB_001c5a60; } goto LAB_001c5bea; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } pcVar9 = *(char **)puVar2; if (pcVar9 == (char *)0x0) { pcVar9 = "(null)"; } sVar3 = strlen(pcVar9); sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 2) - 1; if (sVar3 * 4 < (ulong)((long)puVar6 - (long)param_10)) { sVar4 = sVar3; } if (sVar4 != 0) { sVar3 = 0; do { *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(char *)((long)param_10 + 3) = pcVar9[sVar3]; param_10 = param_10 + 1; sVar3 = sVar3 + 1; } while (sVar4 != sVar3); } } } else { if ((*param_12 == 0) || (puVar6 <= param_10)) goto LAB_001c5bea; *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(byte *)((long)param_10 + 3) = *param_12; LAB_001c5a60: param_10 = param_10 + 1; } param_12 = param_12 + 1; } while( true ); }
51,743
ma_rec_pos
eloqsql/storage/maria/ma_search.c
MARIA_RECORD_POS _ma_rec_pos(MARIA_SHARE *share, uchar *ptr) { my_off_t pos; switch (share->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: pos= (my_off_t) mi_uint8korr(ptr); if (pos == HA_OFFSET_ERROR) return HA_OFFSET_ERROR; /* end of list */ break; case 7: pos= (my_off_t) mi_uint7korr(ptr); if (pos == (((my_off_t) 1) << 56) -1) return HA_OFFSET_ERROR; /* end of list */ break; case 6: pos= (my_off_t) mi_uint6korr(ptr); if (pos == (((my_off_t) 1) << 48) -1) return HA_OFFSET_ERROR; /* end of list */ break; case 5: pos= (my_off_t) mi_uint5korr(ptr); if (pos == (((my_off_t) 1) << 40) -1) return HA_OFFSET_ERROR; /* end of list */ break; #else case 8: case 7: case 6: case 5: ptr+= (share->rec_reflength-4); /* fall through */ #endif case 4: pos= (my_off_t) mi_uint4korr(ptr); if (pos == (my_off_t) (uint32) ~0L) return HA_OFFSET_ERROR; break; case 3: pos= (my_off_t) mi_uint3korr(ptr); if (pos == (my_off_t) (1 << 24) -1) return HA_OFFSET_ERROR; break; case 2: pos= (my_off_t) mi_uint2korr(ptr); if (pos == (my_off_t) (1 << 16) -1) return HA_OFFSET_ERROR; break; default: abort(); /* Impossible */ } return (*share->keypos_to_recpos)(share, pos); }
O3
c
ma_rec_pos: movl 0x740(%rdi), %ecx addl $-0x2, %ecx cmpl $0x6, %ecx ja 0x57133 movq %rsi, %rax leaq 0x8a363(%rip), %rdx # 0xe13bc movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movzwl (%rax), %eax rolw $0x8, %ax cmpw $-0x1, %ax je 0x57116 movzwl %ax, %esi jmp 0x5712a movl (%rax), %esi movzwl 0x4(%rax), %eax shlq $0x30, %rax shlq $0x10, %rsi orq %rax, %rsi bswapq %rsi movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF jmp 0x57111 movl (%rax), %esi bswapl %esi cmpl $-0x1, %esi je 0x57116 jmp 0x5712a movl (%rax), %esi movzbl 0x4(%rax), %eax shlq $0x38, %rax shlq $0x18, %rsi orq %rax, %rsi bswapq %rsi movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF jmp 0x57111 movzwl 0x1(%rax), %ecx rolw $0x8, %cx movzwl %cx, %ecx movzbl (%rax), %esi shll $0x10, %esi orq %rcx, %rsi cmpq $0xffffff, %rsi # imm = 0xFFFFFF je 0x57116 jmp 0x5712a movl (%rax), %esi movzwl 0x4(%rax), %ecx movzbl 0x6(%rax), %eax shlq $0x38, %rax shlq $0x28, %rcx shlq $0x8, %rsi orq %rcx, %rsi orq %rax, %rsi bswapq %rsi movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF cmpq %rax, %rsi jne 0x5712a movq $-0x1, %rax retq movq (%rax), %rsi bswapq %rsi cmpq $-0x1, %rsi je 0x57116 movq 0x6c8(%rdi), %rax jmpq *%rax pushq %rbp movq %rsp, %rbp callq 0x29610
_ma_rec_pos: mov ecx, [rdi+740h] add ecx, 0FFFFFFFEh; switch 7 cases cmp ecx, 6 ja def_57060; jumptable 0000000000057060 default case mov rax, rsi lea rdx, jpt_57060 movsxd rcx, ds:(jpt_57060 - 0E13BCh)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_57062: movzx eax, word ptr [rax]; jumptable 0000000000057060 case 2 rol ax, 8 cmp ax, 0FFFFh jz loc_57116 movzx esi, ax jmp loc_5712A loc_5707B: mov esi, [rax]; jumptable 0000000000057060 case 6 movzx eax, word ptr [rax+4] shl rax, 30h shl rsi, 10h or rsi, rax bswap rsi mov rax, 0FFFFFFFFFFFFh jmp short loc_57111 loc_5709B: mov esi, [rax]; jumptable 0000000000057060 case 4 bswap esi cmp esi, 0FFFFFFFFh jz short loc_57116 jmp loc_5712A loc_570A9: mov esi, [rax]; jumptable 0000000000057060 case 5 movzx eax, byte ptr [rax+4] shl rax, 38h shl rsi, 18h or rsi, rax bswap rsi mov rax, 0FFFFFFFFFFh jmp short loc_57111 loc_570C9: movzx ecx, word ptr [rax+1]; jumptable 0000000000057060 case 3 rol cx, 8 movzx ecx, cx movzx esi, byte ptr [rax] shl esi, 10h or rsi, rcx cmp rsi, 0FFFFFFh jz short loc_57116 jmp short loc_5712A loc_570E8: mov esi, [rax]; jumptable 0000000000057060 case 7 movzx ecx, word ptr [rax+4] movzx eax, byte ptr [rax+6] shl rax, 38h shl rcx, 28h shl rsi, 8 or rsi, rcx or rsi, rax bswap rsi mov rax, 0FFFFFFFFFFFFFFh loc_57111: cmp rsi, rax jnz short loc_5712A loc_57116: mov rax, 0FFFFFFFFFFFFFFFFh retn loc_5711E: mov rsi, [rax]; jumptable 0000000000057060 case 8 bswap rsi cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_57116 loc_5712A: mov rax, [rdi+6C8h] jmp rax def_57060: push rbp; jumptable 0000000000057060 default case mov rbp, rsp call _abort
long long ma_rec_pos(long long a1, _WORD *a2, long long a3) { unsigned __int16 v3; // ax unsigned long long v4; // rsi long long v5; // rax switch ( *(_DWORD *)(a1 + 1856) ) { case 2: v3 = __ROL2__(*a2, 8); if ( v3 == 0xFFFF ) return -1LL; v4 = v3; return (*(long long ( **)(long long, unsigned long long))(a1 + 1736))(a1, v4); case 3: v4 = (unsigned __int16)__ROL2__(*(_WORD *)((char *)a2 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)a2 << 16); if ( v4 != 0xFFFFFF ) return (*(long long ( **)(long long, unsigned long long))(a1 + 1736))(a1, v4); return -1LL; case 4: v4 = _byteswap_ulong(*(_DWORD *)a2); if ( (_DWORD)v4 != -1 ) return (*(long long ( **)(long long, unsigned long long))(a1 + 1736))(a1, v4); return -1LL; case 5: v4 = _byteswap_uint64(((unsigned long long)*((unsigned __int8 *)a2 + 4) << 56) | ((unsigned long long)*(unsigned int *)a2 << 24)); v5 = 0xFFFFFFFFFFLL; goto LABEL_11; case 6: v4 = _byteswap_uint64(((unsigned long long)(unsigned __int16)a2[2] << 48) | ((unsigned long long)*(unsigned int *)a2 << 16)); v5 = 0xFFFFFFFFFFFFLL; goto LABEL_11; case 7: v4 = _byteswap_uint64(((unsigned long long)*((unsigned __int8 *)a2 + 6) << 56) | ((unsigned long long)(unsigned __int16)a2[2] << 40) | ((unsigned long long)*(unsigned int *)a2 << 8)); v5 = 0xFFFFFFFFFFFFFFLL; LABEL_11: if ( v4 == v5 ) return -1LL; return (*(long long ( **)(long long, unsigned long long))(a1 + 1736))(a1, v4); case 8: v4 = _byteswap_uint64(*(_QWORD *)a2); if ( v4 == -1LL ) return -1LL; else return (*(long long ( **)(long long, unsigned long long))(a1 + 1736))(a1, v4); default: abort(a1, a2, a3); } }
_ma_rec_pos: MOV ECX,dword ptr [RDI + 0x740] ADD ECX,-0x2 CMP ECX,0x6 JA 0x00157133 MOV RAX,RSI LEA RDX,[0x1e13bc] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_2: MOVZX EAX,word ptr [RAX] ROL AX,0x8 CMP AX,-0x1 JZ 0x00157116 MOVZX ESI,AX JMP 0x0015712a caseD_6: MOV ESI,dword ptr [RAX] MOVZX EAX,word ptr [RAX + 0x4] SHL RAX,0x30 SHL RSI,0x10 OR RSI,RAX BSWAP RSI MOV RAX,0xffffffffffff JMP 0x00157111 caseD_4: MOV ESI,dword ptr [RAX] BSWAP ESI CMP ESI,-0x1 JZ 0x00157116 JMP 0x0015712a caseD_5: MOV ESI,dword ptr [RAX] MOVZX EAX,byte ptr [RAX + 0x4] SHL RAX,0x38 SHL RSI,0x18 OR RSI,RAX BSWAP RSI MOV RAX,0xffffffffff JMP 0x00157111 caseD_3: MOVZX ECX,word ptr [RAX + 0x1] ROL CX,0x8 MOVZX ECX,CX MOVZX ESI,byte ptr [RAX] SHL ESI,0x10 OR RSI,RCX CMP RSI,0xffffff JZ 0x00157116 JMP 0x0015712a caseD_7: MOV ESI,dword ptr [RAX] MOVZX ECX,word ptr [RAX + 0x4] MOVZX EAX,byte ptr [RAX + 0x6] SHL RAX,0x38 SHL RCX,0x28 SHL RSI,0x8 OR RSI,RCX OR RSI,RAX BSWAP RSI MOV RAX,0xffffffffffffff LAB_00157111: CMP RSI,RAX JNZ 0x0015712a LAB_00157116: MOV RAX,-0x1 RET caseD_8: MOV RSI,qword ptr [RAX] BSWAP RSI CMP RSI,-0x1 JZ 0x00157116 LAB_0015712a: MOV RAX,qword ptr [RDI + 0x6c8] JMP RAX default: PUSH RBP MOV RBP,RSP CALL 0x00129610
int8 _ma_rec_pos(long param_1,ulong *param_2) { ushort uVar1; int8 uVar2; uint uVar3; ulong uVar4; ulong uVar5; switch(*(int4 *)(param_1 + 0x740)) { case 2: uVar1 = (ushort)*param_2 << 8 | (ushort)*param_2 >> 8; if (uVar1 == 0xffff) { return 0xffffffffffffffff; } uVar5 = (ulong)uVar1; break; case 3: uVar5 = (ulong)CONCAT12((char)*param_2, *(ushort *)((long)param_2 + 1) << 8 | *(ushort *)((long)param_2 + 1) >> 8); if (uVar5 == 0xffffff) { return 0xffffffffffffffff; } break; case 4: uVar3 = (uint)*param_2; uVar3 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18; uVar5 = (ulong)uVar3; if (uVar3 == 0xffffffff) { return 0xffffffffffffffff; } break; case 5: uVar5 = (ulong)(uint)*param_2 << 0x18; uVar5 = (ulong)*(byte *)((long)param_2 + 4) | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8; uVar4 = 0xffffffffff; goto LAB_00157111; case 6: uVar5 = (ulong)*(ushort *)((long)param_2 + 4) << 0x30; uVar4 = (ulong)(uint)*param_2 << 0x10; uVar5 = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar4 & 0xff0000000000) >> 0x18 | (uVar4 & 0xff00000000) >> 8 | (uVar4 & 0xff000000) << 8 | (uVar4 & 0xff0000) << 0x18; uVar4 = 0xffffffffffff; goto LAB_00157111; case 7: uVar5 = (ulong)*(ushort *)((long)param_2 + 4) << 0x28; uVar4 = (ulong)(uint)*param_2 << 8; uVar5 = (ulong)*(byte *)((long)param_2 + 6) | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar4 & 0xff00000000) >> 8 | (uVar4 & 0xff000000) << 8 | (uVar4 & 0xff0000) << 0x18 | (uVar4 & 0xff00) << 0x28; uVar4 = 0xffffffffffffff; LAB_00157111: if (uVar5 == uVar4) { return 0xffffffffffffffff; } break; case 8: uVar5 = *param_2; uVar5 = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; if (uVar5 == 0xffffffffffffffff) { return 0xffffffffffffffff; } break; default: /* WARNING: Subroutine does not return */ abort(); } /* WARNING: Could not recover jumptable at 0x00157131. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar2 = (**(code **)(param_1 + 0x6c8))(param_1,uVar5); return uVar2; }
51,744
LefDefParser::defiComponent::setRegionBounds(int, int, int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiComponent.cpp
void defiComponent::setRegionBounds(int xl, int yl, int xh, int yh) { int i; i = numRects_; if (i == rectsAllocated_) { int max = rectsAllocated_ * 2; int* nxl = (int*)malloc(sizeof(int)*max); int* nyl = (int*)malloc(sizeof(int)*max); int* nxh = (int*)malloc(sizeof(int)*max); int* nyh = (int*)malloc(sizeof(int)*max); for (i = 0; i < numRects_; i++) { nxl[i] = rectXl_[i]; nyl[i] = rectYl_[i]; nxh[i] = rectXh_[i]; nyh[i] = rectYh_[i]; } free((char*)(rectXl_)); free((char*)(rectYl_)); free((char*)(rectXh_)); free((char*)(rectYh_)); rectXl_ = nxl; rectYl_ = nyl; rectXh_ = nxh; rectYh_ = nyh; rectsAllocated_ = max; } rectXl_[i] = xl; rectYl_[i] = yl; rectXh_[i] = xh; rectYh_[i] = yh; numRects_ += 1; }
O0
cpp
LefDefParser::defiComponent::setRegionBounds(int, int, int, int): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movl %esi, 0x3c(%rsp) movl %edx, 0x38(%rsp) movl %ecx, 0x34(%rsp) movl %r8d, 0x30(%rsp) movq 0x40(%rsp), %rcx movq %rcx, (%rsp) movl 0x34(%rcx), %eax movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %eax cmpl 0x38(%rcx), %eax jne 0x18070 movq (%rsp), %rax movl 0x38(%rax), %eax shll %eax movl %eax, 0x28(%rsp) movslq 0x28(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x20(%rsp) movslq 0x28(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x18(%rsp) movslq 0x28(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x10(%rsp) movslq 0x28(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x8(%rsp) movl $0x0, 0x2c(%rsp) movq (%rsp), %rcx movl 0x2c(%rsp), %eax cmpl 0x34(%rcx), %eax jge 0x1800d movq (%rsp), %rax movq 0x40(%rax), %rcx movslq 0x2c(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x20(%rsp), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x48(%rax), %rcx movslq 0x2c(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x18(%rsp), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x50(%rax), %rcx movslq 0x2c(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x10(%rsp), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x58(%rax), %rax movslq 0x2c(%rsp), %rcx movl (%rax,%rcx,4), %edx movq 0x8(%rsp), %rax movslq 0x2c(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x17f88 movq (%rsp), %rax movq 0x40(%rax), %rdi callq 0x72a0 movq (%rsp), %rax movq 0x48(%rax), %rdi callq 0x72a0 movq (%rsp), %rax movq 0x50(%rax), %rdi callq 0x72a0 movq (%rsp), %rax movq 0x58(%rax), %rdi callq 0x72a0 movq (%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, 0x40(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x48(%rax) movq 0x10(%rsp), %rcx movq %rcx, 0x50(%rax) movq 0x8(%rsp), %rcx movq %rcx, 0x58(%rax) movl 0x28(%rsp), %ecx movl %ecx, 0x38(%rax) movq (%rsp), %rax movl 0x3c(%rsp), %esi movq 0x40(%rax), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movl 0x38(%rsp), %esi movq 0x48(%rax), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movl 0x34(%rsp), %esi movq 0x50(%rax), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movl 0x30(%rsp), %esi movq 0x58(%rax), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movl 0x34(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x34(%rax) addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser13defiComponent15setRegionBoundsEiiii: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_C], esi mov [rsp+48h+var_10], edx mov [rsp+48h+var_14], ecx mov [rsp+48h+var_18], r8d mov rcx, [rsp+48h+var_8] mov [rsp+48h+var_48], rcx mov eax, [rcx+34h] mov [rsp+48h+var_1C], eax mov eax, [rsp+48h+var_1C] cmp eax, [rcx+38h] jnz loc_18070 mov rax, [rsp+48h+var_48] mov eax, [rax+38h] shl eax, 1 mov [rsp+48h+var_20], eax movsxd rdi, [rsp+48h+var_20] shl rdi, 2 call _malloc mov [rsp+48h+var_28], rax movsxd rdi, [rsp+48h+var_20] shl rdi, 2 call _malloc mov [rsp+48h+var_30], rax movsxd rdi, [rsp+48h+var_20] shl rdi, 2 call _malloc mov [rsp+48h+var_38], rax movsxd rdi, [rsp+48h+var_20] shl rdi, 2 call _malloc mov [rsp+48h+var_40], rax mov [rsp+48h+var_1C], 0 loc_17F88: mov rcx, [rsp+48h+var_48] mov eax, [rsp+48h+var_1C] cmp eax, [rcx+34h] jge short loc_1800D mov rax, [rsp+48h+var_48] mov rcx, [rax+40h] movsxd rdx, [rsp+48h+var_1C] mov esi, [rcx+rdx*4] mov rcx, [rsp+48h+var_28] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov rcx, [rax+48h] movsxd rdx, [rsp+48h+var_1C] mov esi, [rcx+rdx*4] mov rcx, [rsp+48h+var_30] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov rcx, [rax+50h] movsxd rdx, [rsp+48h+var_1C] mov esi, [rcx+rdx*4] mov rcx, [rsp+48h+var_38] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov rax, [rax+58h] movsxd rcx, [rsp+48h+var_1C] mov edx, [rax+rcx*4] mov rax, [rsp+48h+var_40] movsxd rcx, [rsp+48h+var_1C] mov [rax+rcx*4], edx mov eax, [rsp+48h+var_1C] add eax, 1 mov [rsp+48h+var_1C], eax jmp loc_17F88 loc_1800D: mov rax, [rsp+48h+var_48] mov rdi, [rax+40h] call _free mov rax, [rsp+48h+var_48] mov rdi, [rax+48h] call _free mov rax, [rsp+48h+var_48] mov rdi, [rax+50h] call _free mov rax, [rsp+48h+var_48] mov rdi, [rax+58h] call _free mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_28] mov [rax+40h], rcx mov rcx, [rsp+48h+var_30] mov [rax+48h], rcx mov rcx, [rsp+48h+var_38] mov [rax+50h], rcx mov rcx, [rsp+48h+var_40] mov [rax+58h], rcx mov ecx, [rsp+48h+var_20] mov [rax+38h], ecx loc_18070: mov rax, [rsp+48h+var_48] mov esi, [rsp+48h+var_C] mov rcx, [rax+40h] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov esi, [rsp+48h+var_10] mov rcx, [rax+48h] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov esi, [rsp+48h+var_14] mov rcx, [rax+50h] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov esi, [rsp+48h+var_18] mov rcx, [rax+58h] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov ecx, [rax+34h] add ecx, 1 mov [rax+34h], ecx add rsp, 48h retn
LefDefParser::defiComponent * LefDefParser::defiComponent::setRegionBounds( LefDefParser::defiComponent *this, int a2, int a3, int a4, int a5) { LefDefParser::defiComponent *result; // rax long long v6; // [rsp+8h] [rbp-40h] long long v7; // [rsp+10h] [rbp-38h] long long v8; // [rsp+18h] [rbp-30h] long long v9; // [rsp+20h] [rbp-28h] int v10; // [rsp+28h] [rbp-20h] int i; // [rsp+2Ch] [rbp-1Ch] i = *((_DWORD *)this + 13); if ( i == *((_DWORD *)this + 14) ) { v10 = 2 * *((_DWORD *)this + 14); v9 = malloc(4LL * v10); v8 = malloc(4LL * v10); v7 = malloc(4LL * v10); v6 = malloc(4LL * v10); for ( i = 0; i < *((_DWORD *)this + 13); ++i ) { *(_DWORD *)(v9 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 8) + 4LL * i); *(_DWORD *)(v8 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 9) + 4LL * i); *(_DWORD *)(v7 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 10) + 4LL * i); *(_DWORD *)(v6 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 11) + 4LL * i); } free(*((_QWORD *)this + 8)); free(*((_QWORD *)this + 9)); free(*((_QWORD *)this + 10)); free(*((_QWORD *)this + 11)); *((_QWORD *)this + 8) = v9; *((_QWORD *)this + 9) = v8; *((_QWORD *)this + 10) = v7; *((_QWORD *)this + 11) = v6; *((_DWORD *)this + 14) = v10; } result = this; *(_DWORD *)(*((_QWORD *)this + 8) + 4LL * i) = a2; *(_DWORD *)(*((_QWORD *)this + 9) + 4LL * i) = a3; *(_DWORD *)(*((_QWORD *)this + 10) + 4LL * i) = a4; *(_DWORD *)(*((_QWORD *)this + 11) + 4LL * i) = a5; ++*((_DWORD *)this + 13); return result; }
setRegionBounds: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ESI MOV dword ptr [RSP + 0x38],EDX MOV dword ptr [RSP + 0x34],ECX MOV dword ptr [RSP + 0x30],R8D MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RSP],RCX MOV EAX,dword ptr [RCX + 0x34] MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x2c] CMP EAX,dword ptr [RCX + 0x38] JNZ 0x00118070 MOV RAX,qword ptr [RSP] MOV EAX,dword ptr [RAX + 0x38] SHL EAX,0x1 MOV dword ptr [RSP + 0x28],EAX MOVSXD RDI,dword ptr [RSP + 0x28] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x20],RAX MOVSXD RDI,dword ptr [RSP + 0x28] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x18],RAX MOVSXD RDI,dword ptr [RSP + 0x28] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x10],RAX MOVSXD RDI,dword ptr [RSP + 0x28] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x2c],0x0 LAB_00117f88: MOV RCX,qword ptr [RSP] MOV EAX,dword ptr [RSP + 0x2c] CMP EAX,dword ptr [RCX + 0x34] JGE 0x0011800d MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RAX + 0x40] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x48] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x50] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x10] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV RAX,qword ptr [RAX + 0x58] MOVSXD RCX,dword ptr [RSP + 0x2c] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP + 0x2c] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x00117f88 LAB_0011800d: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x40] CALL 0x001072a0 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x48] CALL 0x001072a0 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x50] CALL 0x001072a0 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x58] CALL 0x001072a0 MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x48],RCX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x50],RCX MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x58],RCX MOV ECX,dword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x38],ECX LAB_00118070: MOV RAX,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0x3c] MOV RCX,qword ptr [RAX + 0x40] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x38] MOV RCX,qword ptr [RAX + 0x48] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x34] MOV RCX,qword ptr [RAX + 0x50] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0x58] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV ECX,dword ptr [RAX + 0x34] ADD ECX,0x1 MOV dword ptr [RAX + 0x34],ECX ADD RSP,0x48 RET
/* LefDefParser::defiComponent::setRegionBounds(int, int, int, int) */ void __thiscall LefDefParser::defiComponent::setRegionBounds (defiComponent *this,int param_1,int param_2,int param_3,int param_4) { int iVar1; void *pvVar2; void *pvVar3; void *pvVar4; void *pvVar5; int local_1c; local_1c = *(int *)(this + 0x34); if (local_1c == *(int *)(this + 0x38)) { iVar1 = *(int *)(this + 0x38) << 1; pvVar2 = malloc((long)iVar1 << 2); pvVar3 = malloc((long)iVar1 << 2); pvVar4 = malloc((long)iVar1 << 2); pvVar5 = malloc((long)iVar1 << 2); for (local_1c = 0; local_1c < *(int *)(this + 0x34); local_1c = local_1c + 1) { *(int4 *)((long)pvVar2 + (long)local_1c * 4) = *(int4 *)(*(long *)(this + 0x40) + (long)local_1c * 4); *(int4 *)((long)pvVar3 + (long)local_1c * 4) = *(int4 *)(*(long *)(this + 0x48) + (long)local_1c * 4); *(int4 *)((long)pvVar4 + (long)local_1c * 4) = *(int4 *)(*(long *)(this + 0x50) + (long)local_1c * 4); *(int4 *)((long)pvVar5 + (long)local_1c * 4) = *(int4 *)(*(long *)(this + 0x58) + (long)local_1c * 4); } free(*(void **)(this + 0x40)); free(*(void **)(this + 0x48)); free(*(void **)(this + 0x50)); free(*(void **)(this + 0x58)); *(void **)(this + 0x40) = pvVar2; *(void **)(this + 0x48) = pvVar3; *(void **)(this + 0x50) = pvVar4; *(void **)(this + 0x58) = pvVar5; *(int *)(this + 0x38) = iVar1; } *(int *)(*(long *)(this + 0x40) + (long)local_1c * 4) = param_1; *(int *)(*(long *)(this + 0x48) + (long)local_1c * 4) = param_2; *(int *)(*(long *)(this + 0x50) + (long)local_1c * 4) = param_3; *(int *)(*(long *)(this + 0x58) + (long)local_1c * 4) = param_4; *(int *)(this + 0x34) = *(int *)(this + 0x34) + 1; return; }
51,745
YAML::SingleDocParser::ParseAnchor(unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/singledocparser.cpp
void SingleDocParser::ParseAnchor(anchor_t& anchor, std::string& anchor_name) { Token& token = m_scanner.peek(); if (anchor) throw ParserException(token.mark, ErrorMsg::MULTIPLE_ANCHORS); anchor_name = token.value; anchor = RegisterAnchor(token.value); m_scanner.pop(); }
O3
cpp
YAML::SingleDocParser::ParseAnchor(unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movq 0x8(%rdi), %rdi callq 0x63cac movq %rax, %r14 cmpq $0x0, (%r15) jne 0x6c9ad movq %r14, %r13 addq $0x18, %r14 movq %r12, %rdi movq %r14, %rsi callq 0x2d240 cmpq $0x0, 0x20(%r13) je 0x6c990 movq 0x50(%rbx), %r12 incq %r12 movq %r12, 0x50(%rbx) leaq 0x20(%rbx), %rdi movq %r14, %rsi callq 0x2e210 movq %r12, (%rax) jmp 0x6c993 xorl %r12d, %r12d movq %r12, (%r15) movq 0x8(%rbx), %rdi addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x63c84 movl $0x40, %edi callq 0x2c800 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xf84ef(%rip), %rsi # 0x164eb9 leaq 0xf8517(%rip), %rdx # 0x164ee8 leaq 0x8(%rsp), %rdi callq 0x2c610 addq $0x8, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x47336 leaq 0x19caf7(%rip), %rax # 0x2094f0 addq $0x10, %rax movq %rax, (%rbx) xorl %ebp, %ebp leaq 0x19cb0f(%rip), %rsi # 0x209518 leaq -0xc2e4(%rip), %rdx # 0x6072c movq %rbx, %rdi callq 0x2e0f0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x6ca32 movq 0x18(%rsp), %rsi incq %rsi callq 0x2d2d0 testb %bpl, %bpl jne 0x6ca3c jmp 0x6ca44 movq %rax, %r14 movq %rbx, %rdi callq 0x2cc80 movq %r14, %rdi callq 0x2e220
_ZN4YAML15SingleDocParser11ParseAnchorERmRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, rdx mov r15, rsi mov rbx, rdi mov rdi, [rdi+8]; this call _ZN4YAML7Scanner4peekEv; YAML::Scanner::peek(void) mov r14, rax cmp qword ptr [r15], 0 jnz short loc_6C9AD mov r13, r14 add r14, 18h mov rdi, r12 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) cmp qword ptr [r13+20h], 0 jz short loc_6C990 mov r12, [rbx+50h] inc r12 mov [rbx+50h], r12 lea rdi, [rbx+20h] mov rsi, r14 call __ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r12 jmp short loc_6C993 loc_6C990: xor r12d, r12d loc_6C993: mov [r15], r12 mov rdi, [rbx+8]; this add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZN4YAML7Scanner3popEv; YAML::Scanner::pop(void) loc_6C9AD: mov edi, 40h ; '@'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_40] mov [r15-10h], r15 lea rsi, aCannotAssignMu_0; "cannot assign multiple anchors to the s"... lea rdx, aCannotAssignMu_0+2Fh; "" lea rdi, [rsp+58h+var_50] 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) add r14, 8 mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx mov rsi, r14 call _ZN4YAML9ExceptionC2ERKNS_4MarkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::Exception::Exception(YAML::Mark const&,std::string const&) lea rax, _ZTVN4YAML15ParserExceptionE; `vtable for'YAML::ParserException add rax, 10h mov [rbx], rax xor ebp, ebp lea rsi, _ZTIN4YAML15ParserExceptionE; lptinfo lea rdx, _ZN4YAML9ExceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+58h+var_50]; void * cmp rdi, r15 jz short loc_6CA32 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6CA32: test bpl, bpl jnz short loc_6CA3C jmp short loc_6CA44 mov r14, rax loc_6CA3C: mov rdi, rbx; void * call ___cxa_free_exception loc_6CA44: mov rdi, r14 call __Unwind_Resume
long long YAML::SingleDocParser::ParseAnchor(long long a1, long long *a2, long long a3) { long long v4; // rax int v5; // r14d long long v6; // r13 long long v7; // r14 long long v8; // r12 _QWORD *exception; // rbx int v11; // ecx int v12; // r8d int v13; // r9d void *v14[2]; // [rsp+8h] [rbp-50h] BYREF long long v15; // [rsp+18h] [rbp-40h] BYREF v4 = YAML::Scanner::peek(*(YAML::Scanner **)(a1 + 8)); v5 = v4; if ( *a2 ) { exception = __cxa_allocate_exception(0x40uLL); v14[0] = &v15; std::string::_M_construct<char const*>(v14, "cannot assign multiple anchors to the same node", ""); YAML::Exception::Exception((_DWORD)exception, v5 + 8, (unsigned int)v14, v11, v12, v13); *exception = &`vtable for'YAML::ParserException + 2; __cxa_throw( exception, (struct type_info *)&`typeinfo for'YAML::ParserException, (void (*)(void *))YAML::Exception::~Exception); } v6 = v4; v7 = v4 + 24; std::string::_M_assign(a3, v4 + 24); if ( *(_QWORD *)(v6 + 32) ) { v8 = *(_QWORD *)(a1 + 80) + 1LL; *(_QWORD *)(a1 + 80) = v8; *(_QWORD *)std::map<std::string,unsigned long>::operator[](a1 + 32, v7) = v8; } else { v8 = 0LL; } *a2 = v8; return YAML::Scanner::pop(*(YAML::Scanner **)(a1 + 8)); }
ParseAnchor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] CALL 0x00163cac MOV R14,RAX CMP qword ptr [R15],0x0 JNZ 0x0016c9ad MOV R13,R14 ADD R14,0x18 MOV RDI,R12 MOV RSI,R14 CALL 0x0012d240 CMP qword ptr [R13 + 0x20],0x0 JZ 0x0016c990 MOV R12,qword ptr [RBX + 0x50] INC R12 MOV qword ptr [RBX + 0x50],R12 LEA RDI,[RBX + 0x20] MOV RSI,R14 CALL 0x0012e210 MOV qword ptr [RAX],R12 JMP 0x0016c993 LAB_0016c990: XOR R12D,R12D LAB_0016c993: MOV qword ptr [R15],R12 MOV RDI,qword ptr [RBX + 0x8] ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00163c84 LAB_0016c9ad: MOV EDI,0x40 CALL 0x0012c800 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0016c9c3: LEA RSI,[0x264eb9] LEA RDX,[0x264ee8] LEA RDI,[RSP + 0x8] CALL 0x0012c610 ADD R14,0x8 MOV BPL,0x1 LAB_0016c9e2: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV RSI,R14 CALL 0x00147336 LEA RAX,[0x3094f0] ADD RAX,0x10 MOV qword ptr [RBX],RAX XOR EBP,EBP LEA RSI,[0x309518] LEA RDX,[0x16072c] MOV RDI,RBX CALL 0x0012e0f0
/* YAML::SingleDocParser::ParseAnchor(unsigned long&, std::__cxx11::string&) */ void __thiscall YAML::SingleDocParser::ParseAnchor(SingleDocParser *this,ulong *param_1,string *param_2) { long lVar1; ulong *puVar2; Exception *this_00; ulong uVar3; int1 *local_50 [2]; int1 local_40 [16]; lVar1 = Scanner::peek(*(Scanner **)(this + 8)); if (*param_1 == 0) { std::__cxx11::string::_M_assign(param_2,(string *)(lVar1 + 0x18)); if (*(long *)(lVar1 + 0x20) == 0) { uVar3 = 0; } else { uVar3 = *(long *)(this + 0x50) + 1; *(ulong *)(this + 0x50) = uVar3; puVar2 = (ulong *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[]((map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)(this + 0x20),(string *)(lVar1 + 0x18)); *puVar2 = uVar3; } *param_1 = uVar3; Scanner::pop(*(Scanner **)(this + 8)); return; } this_00 = (Exception *)__cxa_allocate_exception(0x40); local_50[0] = local_40; /* try { // try from 0016c9c3 to 0016c9da has its CatchHandler @ 0016ca39 */ std::__cxx11::string::_M_construct<char_const*> (local_50,"cannot assign multiple anchors to the same node",""); /* try { // try from 0016c9e2 to 0016ca17 has its CatchHandler @ 0016ca18 */ Exception::Exception(this_00,(Mark *)(lVar1 + 8),(string *)local_50); *(int ***)this_00 = &PTR__BadInsert_00309500; /* WARNING: Subroutine does not return */ __cxa_throw(this_00,&ParserException::typeinfo,BadInsert::~BadInsert); }
51,746
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!left) throw std::runtime_error("BinaryOpExpr.left is null"); if (!right) throw std::runtime_error("BinaryOpExpr.right is null"); auto l = left->evaluate(context); auto do_eval = [&](const Value & l) -> Value { if (op == Op::Is || op == Op::IsNot) { auto t = dynamic_cast<VariableExpr*>(right.get()); if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable"); auto eval = [&]() { const auto & name = t->get_name(); if (name == "none") return l.is_null(); if (name == "boolean") return l.is_boolean(); if (name == "integer") return l.is_number_integer(); if (name == "float") return l.is_number_float(); if (name == "number") return l.is_number(); if (name == "string") return l.is_string(); if (name == "mapping") return l.is_object(); if (name == "iterable") return l.is_iterable(); if (name == "sequence") return l.is_array(); if (name == "defined") return !l.is_null(); throw std::runtime_error("Unknown type for 'is' operator: " + name); }; auto value = eval(); return Value(op == Op::Is ? value : !value); } if (op == Op::And) { if (!l.to_bool()) return Value(false); return right->evaluate(context).to_bool(); } else if (op == Op::Or) { if (l.to_bool()) return l; return right->evaluate(context); } auto r = right->evaluate(context); switch (op) { case Op::StrConcat: return l.to_str() + r.to_str(); case Op::Add: return l + r; case Op::Sub: return l - r; case Op::Mul: return l * r; case Op::Div: return l / r; case Op::MulMul: return std::pow(l.get<double>(), r.get<double>()); case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>(); case Op::Mod: return l.get<int64_t>() % r.get<int64_t>(); case Op::Eq: return l == r; case Op::Ne: return l != r; case Op::Lt: return l < r; case Op::Gt: return l > r; case Op::Le: return l <= r; case Op::Ge: return l >= r; case Op::In: return (r.is_array() || r.is_object()) && r.contains(l); case Op::NotIn: return !(r.is_array() && r.contains(l)); default: break; } throw std::runtime_error("Unknown binary operator"); }; if (l.is_callable()) { return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) { auto ll = l.call(context, args); return do_eval(ll); //args[0].second); }); } else { return do_eval(l); } }
O3
cpp
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0xa21cb cmpq $0x0, 0x30(%r15) je 0xa21e9 movq %rdx, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi callq 0x96f0a movq %r15, 0x8(%rsp) movq %r14, 0x10(%rsp) cmpq $0x0, 0x30(%r12) je 0xa2123 leaq 0x88(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x74a14 movups 0x8(%rsp), %xmm0 leaq 0x88(%rsp), %rsi movups %xmm0, 0x50(%rsi) leaq 0x18(%rsp), %rdi callq 0xa2306 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x72a46 movq 0x28(%rsp), %rax testq %rax, %rax je 0xa20bf leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0xc8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x732fc movq %r14, %rdi callq 0x300e0 leaq 0xc0(%rsp), %rdi callq 0x34564 leaq 0xb0(%rsp), %rdi callq 0x34564 leaq 0xa0(%rsp), %r14 movq %r14, %rdi callq 0x34564 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xa214c movq 0x5de7d(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0xa2137 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa2141 leaq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0xa23e0 jmp 0xa214c movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa214c movq (%rdi), %rax callq *0x18(%rax) leaq 0x78(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x732fc movq %r14, %rdi callq 0x300e0 leaq 0x70(%rsp), %rdi callq 0x34564 leaq 0x60(%rsp), %rdi callq 0x34564 leaq 0x50(%rsp), %r14 movq %r14, %rdi callq 0x34564 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xa21b9 movq 0x5ddfc(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0xa21a4 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa21ae movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa21b9 movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x1c460 movq %rax, %r14 leaq 0x2c5dd(%rip), %rsi # 0xce7bc movq %rax, %rdi callq 0x1c280 jmp 0xa2205 movl $0x10, %edi callq 0x1c460 movq %rax, %r14 leaq 0x2c5d9(%rip), %rsi # 0xce7d6 movq %rax, %rdi callq 0x1c280 movq 0x5ddac(%rip), %rsi # 0xfffb8 movq 0x5dd65(%rip), %rdx # 0xfff78 movq %r14, %rdi callq 0x1c7b0 jmp 0xa2266 jmp 0xa224c jmp 0xa2221 movq %rax, %rbx movq %r14, %rdi callq 0x1caa0 jmp 0xa2273 movq %rax, %rbx movq 0x28(%rsp), %rax testq %rax, %rax je 0xa2257 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xa2257 movq %rax, %rdi callq 0x2a81a movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0xa2364 jmp 0xa2269 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x6cc36 movq %rbx, %rdi callq 0x1c7d0 nop
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0E8h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_A21CB cmp qword ptr [r15+30h], 0 jz loc_A21E9 mov r14, rdx mov rbx, rdi lea r12, [rsp+108h+var_D0] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov qword ptr [rsp+108h+var_100], r15 mov qword ptr [rsp+108h+var_100+8], r14 cmp qword ptr [r12+30h], 0 jz loc_A2123 lea rdi, [rsp+108h+var_80]; this lea rsi, [rsp+108h+var_D0]; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) movups xmm0, [rsp+108h+var_100] lea rsi, [rsp+108h+var_80] movups xmmword ptr [rsi+50h], xmm0 lea rdi, [rsp+108h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&) lea rsi, [rsp+108h+var_F0] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) mov rax, [rsp+108h+var_E0] test rax, rax jz short loc_A20BF lea rdi, [rsp+108h+var_F0] mov rsi, rdi mov edx, 3 call rax loc_A20BF: lea r14, [rsp+108h+var_40] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+108h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+108h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+108h+var_68] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_A214C mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_A2137 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A2141 loc_A2123: lea rsi, [rsp+108h+var_100] lea rdx, [rsp+108h+var_D0] mov rdi, rbx; this call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&) jmp short loc_A214C loc_A2137: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A2141: cmp eax, 1 jnz short loc_A214C mov rax, [rdi] call qword ptr [rax+18h] loc_A214C: lea r14, [rsp+108h+var_90] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+108h+var_98] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+108h+var_A8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+108h+var_B8] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_A21B9 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_A21A4 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A21AE loc_A21A4: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A21AE: cmp eax, 1 jnz short loc_A21B9 mov rax, [rdi] call qword ptr [rax+18h] loc_A21B9: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r14 pop r15 retn loc_A21CB: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_A2205 loc_A21E9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_A2205: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_A2266 jmp short loc_A224C jmp short $+2 loc_A2221: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_A2273 mov rbx, rax mov rax, [rsp+108h+var_E0] test rax, rax jz short loc_A2257 lea rdi, [rsp+108h+var_F0] mov rsi, rdi mov edx, 3 call rax jmp short loc_A2257 loc_A224C: mov rdi, rax call __clang_call_terminate mov rbx, rax loc_A2257: lea rdi, [rsp+108h+var_80] call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue() jmp short loc_A2269 loc_A2266: mov rbx, rax loc_A2269: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_A2273: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3) { void (***v4)(void); // rsi long long v7; // rdi signed __int32 v8; // eax long long v9; // rdi signed __int32 v10; // eax std::runtime_error *exception; // r14 __int128 v13; // [rsp+8h] [rbp-100h] _BYTE v14[16]; // [rsp+18h] [rbp-F0h] BYREF void ( *v15)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h] _BYTE v16[8]; // [rsp+38h] [rbp-D0h] BYREF long long v17; // [rsp+40h] [rbp-C8h] volatile signed __int32 *v18; // [rsp+50h] [rbp-B8h] BYREF volatile signed __int32 *v19[2]; // [rsp+60h] [rbp-A8h] BYREF volatile signed __int32 *v20; // [rsp+70h] [rbp-98h] BYREF char v21[16]; // [rsp+78h] [rbp-90h] BYREF _BYTE v22[8]; // [rsp+88h] [rbp-80h] BYREF long long v23; // [rsp+90h] [rbp-78h] volatile signed __int32 *v24; // [rsp+A0h] [rbp-68h] BYREF volatile signed __int32 *v25; // [rsp+B0h] [rbp-58h] BYREF volatile signed __int32 *v26; // [rsp+C0h] [rbp-48h] BYREF char v27[16]; // [rsp+C8h] [rbp-40h] BYREF __int128 v28; // [rsp+D8h] [rbp-30h] v4 = *(void (****)(void))(a2 + 32); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null"); goto LABEL_22; } if ( !*(_QWORD *)(a2 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null"); LABEL_22: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v16, v4); *(_QWORD *)&v13 = a2; *((_QWORD *)&v13 + 1) = a3; if ( v19[1] ) { minja::Value::Value((minja::Value *)v22, (const minja::Value *)v16); v28 = v13; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v14); minja::Value::callable((long long)this, (long long)v14); if ( v15 ) v15(v14, v14, 3LL); 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(v27); 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(v27); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v26); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v25); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v24); v7 = v23; if ( v23 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v23 + 12); *(_DWORD *)(v23 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v23 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } } else { minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this); } 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(v21); 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(v21); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v19); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18); v9 = v17; if ( v17 ) { if ( _libc_single_threaded ) { v10 = *(_DWORD *)(v17 + 12); *(_DWORD *)(v17 + 12) = v10 - 1; } else { v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( v10 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL); } return this; }
do_evaluate: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x001a21cb CMP qword ptr [R15 + 0x30],0x0 JZ 0x001a21e9 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x38] MOV RDI,R12 CALL 0x00196f0a MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],R14 CMP qword ptr [R12 + 0x30],0x0 JZ 0x001a2123 LAB_001a206c: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x38] CALL 0x00174a14 MOVUPS XMM0,xmmword ptr [RSP + 0x8] LEA RSI,[RSP + 0x88] MOVUPS xmmword ptr [RSI + 0x50],XMM0 LAB_001a208f: LEA RDI,[RSP + 0x18] CALL 0x001a2306 LAB_001a2099: LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x00172a46 MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x001a20bf LAB_001a20b0: LEA RDI,[RSP + 0x18] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a20bf: LEA R14,[RSP + 0xc8] MOV RDI,R14 XOR ESI,ESI CALL 0x001732fc MOV RDI,R14 CALL 0x001300e0 LEA RDI,[RSP + 0xc0] CALL 0x00134564 LEA RDI,[RSP + 0xb0] CALL 0x00134564 LEA R14,[RSP + 0xa0] MOV RDI,R14 CALL 0x00134564 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001a214c MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x001a2137 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a2141 LAB_001a2123: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x38] MOV RDI,RBX CALL 0x001a23e0 LAB_001a2135: JMP 0x001a214c LAB_001a2137: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a2141: CMP EAX,0x1 JNZ 0x001a214c MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a214c: LEA R14,[RSP + 0x78] MOV RDI,R14 XOR ESI,ESI CALL 0x001732fc MOV RDI,R14 CALL 0x001300e0 LEA RDI,[RSP + 0x70] CALL 0x00134564 LEA RDI,[RSP + 0x60] CALL 0x00134564 LEA R14,[RSP + 0x50] MOV RDI,R14 CALL 0x00134564 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001a21b9 MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x001a21a4 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a21ae LAB_001a21a4: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a21ae: CMP EAX,0x1 JNZ 0x001a21b9 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a21b9: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R14 POP R15 RET LAB_001a21cb: MOV EDI,0x10 CALL 0x0011c460 MOV R14,RAX LAB_001a21d8: LEA RSI,[0x1ce7bc] MOV RDI,RAX CALL 0x0011c280 LAB_001a21e7: JMP 0x001a2205 LAB_001a21e9: MOV EDI,0x10 CALL 0x0011c460 MOV R14,RAX LAB_001a21f6: LEA RSI,[0x1ce7d6] MOV RDI,RAX CALL 0x0011c280 LAB_001a2205: MOV RSI,qword ptr [0x001fffb8] MOV RDX,qword ptr [0x001fff78] MOV RDI,R14 CALL 0x0011c7b0
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1) { int *piVar1; int iVar2; runtime_error *this; int8 in_RDX; long in_RSI; long local_100; int8 uStack_f8; _lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16]; code *local_e0; Expression local_d0 [8]; long *local_c8; __shared_count<(__gnu_cxx::_Lock_policy)2> local_b8 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_a8 [8]; long local_a0; __shared_count<(__gnu_cxx::_Lock_policy)2> local_98 [8]; data local_90 [16]; Value local_80 [8]; long *local_78; __shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8]; data local_40 [16]; long local_30; int8 uStack_28; if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a21d8 to 001a21e6 has its CatchHandler @ 001a2221 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null"); } else { if (*(long *)(in_RSI + 0x30) != 0) { Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20)); if (local_a0 == 0) { /* try { // try from 001a2123 to 001a2134 has its CatchHandler @ 001a221b */ const::{lambda(minja::Value_const&)#1}::operator() ((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100); } else { /* try { // try from 001a206c to 001a207d has its CatchHandler @ 001a2266 */ local_100 = in_RSI; uStack_f8 = in_RDX; Value::Value(local_80,(Value *)local_d0); local_30 = local_100; uStack_28 = uStack_f8; /* try { // try from 001a208f to 001a2098 has its CatchHandler @ 001a2254 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void> (local_f0); /* try { // try from 001a2099 to 001a20a5 has its CatchHandler @ 001a222e */ Value::callable((Value *)param_1,local_f0); if (local_e0 != (code *)0x0) { /* try { // try from 001a20b0 to 001a20be has its CatchHandler @ 001a221d */ (*local_e0)(local_f0,local_f0,3); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68); if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_78 + 0x18))(); } } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_90); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_98); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_a8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b8); if (local_c8 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_c8 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_c8 + 0xc); *(int *)((long)local_c8 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_c8 + 0x18))(); } } return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a21f6 to 001a2204 has its CatchHandler @ 001a221f */ std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78); }
51,747
on_request_chunk_packet(protocol::RequestChunk const&)
untodesu[P]voxelius/game/server/receive.cc
static void on_request_chunk_packet(const protocol::RequestChunk &packet) { if(auto session = sessions::find(packet.peer)) { if(!session->dimension || !session->dimension->entities.valid(session->player_entity)) { // De-spawned sessions cannot request // chunks from the server; that's cheating!!! return; } if(auto transform = session->dimension->entities.try_get<TransformComponent>(session->player_entity)) { ChunkAABB view_box; view_box.min = transform->chunk - static_cast<chunk_pos::value_type>(server_game::view_distance.get_value()); view_box.max = transform->chunk + static_cast<chunk_pos::value_type>(server_game::view_distance.get_value()); if(view_box.contains(packet.cpos)) { if(auto chunk = universe::load_chunk(session->dimension, packet.cpos)) { protocol::ChunkVoxels response; response.chunk = packet.cpos; response.voxels = chunk->get_voxels(); protocol::send(packet.peer, protocol::encode(response)); } else { worldgen::request_chunk(session, packet.cpos); } } } } }
O0
cpp
on_request_chunk_packet(protocol::RequestChunk const&): pushq %rbp movq %rsp, %rbp subq $0x2110, %rsp # imm = 0x2110 movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rdi callq 0x5ac70 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x32679 movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x32405 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x158, %rdi # imm = 0x158 movq -0x10(%rbp), %rax movl 0x30(%rax), %esi callq 0x3e850 testb $0x1, %al jne 0x3240a jmp 0x32679 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x158, %rdi # imm = 0x158 movq -0x10(%rbp), %rax movl 0x30(%rax), %esi callq 0x585c0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x32677 leaq -0x38(%rbp), %rdi callq 0x585f0 movq -0x18(%rbp), %rax movq %rax, -0x20c0(%rbp) leaq 0x29ecf1(%rip), %rdi # 0x2d1140 callq 0x24710 movl %eax, -0x20b4(%rbp) jmp 0x3245c movl -0x20b4(%rbp), %esi movq -0x20c0(%rbp), %rdi callq 0x58610 movl %edx, -0x20cc(%rbp) movq %rax, -0x20c8(%rbp) jmp 0x3247d movl -0x20cc(%rbp), %eax movq -0x20c8(%rbp), %rcx movq %rcx, -0x68(%rbp) movl %eax, -0x60(%rbp) movl -0x60(%rbp), %eax movl %eax, -0x40(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x48(%rbp) movl -0x40(%rbp), %eax movl %eax, -0x28(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x20d8(%rbp) leaq 0x29ec81(%rip), %rdi # 0x2d1140 callq 0x24710 movl %eax, -0x20d0(%rbp) jmp 0x324cc movl -0x20d0(%rbp), %esi movq -0x20d8(%rbp), %rdi callq 0x58660 movl %edx, -0x20e4(%rbp) movq %rax, -0x20e0(%rbp) jmp 0x324ed movl -0x20e4(%rbp), %eax movq -0x20e0(%rbp), %rcx movq %rcx, -0x88(%rbp) movl %eax, -0x80(%rbp) movl -0x80(%rbp), %eax movl %eax, -0x70(%rbp) movq -0x88(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x70(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x24(%rbp) movq -0x8(%rbp), %rsi addq $0x10, %rsi leaq -0x38(%rbp), %rdi callq 0x91b10 movb %al, -0x20e5(%rbp) jmp 0x3253c movb -0x20e5(%rbp), %al testb $0x1, %al jne 0x3254b jmp 0x32661 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi movq -0x8(%rbp), %rsi addq $0x10, %rsi callq 0x71560 movq %rax, -0x20f0(%rbp) jmp 0x32569 movq -0x20f0(%rbp), %rax movq %rax, -0x90(%rbp) cmpq $0x0, -0x90(%rbp) je 0x3264a leaq -0x20b0(%rbp), %rdi callq 0x586b0 movq -0x8(%rbp), %rax movl 0x18(%rax), %ecx movl %ecx, -0x2098(%rbp) movq 0x10(%rax), %rax movq %rax, -0x20a0(%rbp) movq -0x90(%rbp), %rdi callq 0x92020 movq %rax, -0x20f8(%rbp) jmp 0x325be movq -0x20f8(%rbp), %rsi leaq -0x2094(%rbp), %rdi movl $0x2000, %edx # imm = 0x2000 callq 0x1a780 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x2108(%rbp) leaq -0x20b0(%rbp), %rdi movl $0x1, %esi callq 0xbce80 movq %rax, -0x2100(%rbp) jmp 0x325ff movq -0x2100(%rbp), %rsi movq -0x2108(%rbp), %rdi callq 0xbd8b0 jmp 0x32614 leaq -0x20b0(%rbp), %rdi callq 0x586f0 jmp 0x3265f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x3266c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x20b0(%rbp), %rdi callq 0x586f0 jmp 0x3266c movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0x10, %rsi callq 0x8cc90 jmp 0x3265d jmp 0x3265f jmp 0x32661 leaq -0x38(%rbp), %rdi callq 0x58710 jmp 0x32677 leaq -0x38(%rbp), %rdi callq 0x58710 jmp 0x32682 jmp 0x32679 addq $0x2110, %rsp # imm = 0x2110 popq %rbp retq movq -0x50(%rbp), %rdi callq 0x1aff0 nopl (%rax,%rax)
_ZL23on_request_chunk_packetRKN8protocol12RequestChunkE: push rbp mov rbp, rsp sub rsp, 2110h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rdi, [rax+8] call _ZN8sessions4findEP9_ENetPeer; sessions::find(_ENetPeer *) mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz loc_32679 mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jz short loc_32405 mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 158h mov rax, [rbp+var_10] mov esi, [rax+30h] call _ZNK4entt14basic_registryINS_6entityESaIS1_EE5validES1_; entt::basic_registry<entt::entity,std::allocator<entt::entity>>::valid(entt::entity) test al, 1 jnz short loc_3240A loc_32405: jmp loc_32679 loc_3240A: mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 158h mov rax, [rbp+var_10] mov esi, [rax+30h] call _ZN4entt14basic_registryINS_6entityESaIS1_EE7try_getIJ18TransformComponentEEEDaS1_ mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz loc_32677 lea rdi, [rbp+var_38]; this call _ZN9ChunkAABBC2Ev; ChunkAABB::ChunkAABB(void) mov rax, [rbp+var_18] mov [rbp+var_20C0], rax lea rdi, _ZN11server_game13view_distanceE; server_game::view_distance call _ZNK12ConfigNumberIjE9get_valueEv; ConfigNumber<uint>::get_value(void) mov [rbp+var_20B4], eax jmp short $+2 loc_3245C: mov esi, [rbp+var_20B4] mov rdi, [rbp+var_20C0] call _ZN3glmmiIiLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S3_; glm::operator-<int,(glm::qualifier)0>(glm::vec<3,int,(glm::qualifier)0> const&,int) mov [rbp+var_20CC], edx mov [rbp+var_20C8], rax jmp short $+2 loc_3247D: mov eax, [rbp+var_20CC] mov rcx, [rbp+var_20C8] mov [rbp+var_68], rcx mov [rbp+var_60], eax mov eax, [rbp+var_60] mov [rbp+var_40], eax mov rax, [rbp+var_68] mov [rbp+var_48], rax mov eax, [rbp+var_40] mov [rbp+var_28], eax mov rax, [rbp+var_48] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov [rbp+var_20D8], rax lea rdi, _ZN11server_game13view_distanceE; server_game::view_distance call _ZNK12ConfigNumberIjE9get_valueEv; ConfigNumber<uint>::get_value(void) mov [rbp+var_20D0], eax jmp short $+2 loc_324CC: mov esi, [rbp+var_20D0] mov rdi, [rbp+var_20D8] call _ZN3glmplIiLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S3_; glm::operator+<int,(glm::qualifier)0>(glm::vec<3,int,(glm::qualifier)0> const&,int) mov [rbp+var_20E4], edx mov [rbp+var_20E0], rax jmp short $+2 loc_324ED: mov eax, [rbp+var_20E4] mov rcx, [rbp+var_20E0] mov [rbp+var_88], rcx mov [rbp+var_80], eax mov eax, [rbp+var_80] mov [rbp+var_70], eax mov rax, [rbp+var_88] mov [rbp+var_78], rax mov eax, [rbp+var_70] mov [rbp+var_1C], eax mov rax, [rbp+var_78] mov [rbp+var_24], rax mov rsi, [rbp+var_8] add rsi, 10h lea rdi, [rbp+var_38] call _ZNK9ChunkAABB8containsERKN3glm3vecILi3EiLNS0_9qualifierE0EEE; ChunkAABB::contains(glm::vec<3,int,(glm::qualifier)0> const&) mov [rbp+var_20E5], al jmp short $+2 loc_3253C: mov al, [rbp+var_20E5] test al, 1 jnz short loc_3254B jmp loc_32661 loc_3254B: mov rax, [rbp+var_10] mov rdi, [rax+38h] mov rsi, [rbp+var_8] add rsi, 10h call _ZN8universe10load_chunkEP9DimensionRKN3glm3vecILi3EiLNS2_9qualifierE0EEE; universe::load_chunk(Dimension *,glm::vec<3,int,(glm::qualifier)0> const&) mov [rbp+var_20F0], rax jmp short $+2 loc_32569: mov rax, [rbp+var_20F0] mov [rbp+var_90], rax cmp [rbp+var_90], 0 jz loc_3264A lea rdi, [rbp+var_20B0]; this call _ZN8protocol11ChunkVoxelsC2Ev; protocol::ChunkVoxels::ChunkVoxels(void) mov rax, [rbp+var_8] mov ecx, [rax+18h] mov [rbp+var_2098], ecx mov rax, [rax+10h] mov [rbp+var_20A0], rax mov rdi, [rbp+var_90]; this call _ZNK5Chunk10get_voxelsEv; Chunk::get_voxels(void) mov [rbp+var_20F8], rax jmp short $+2 loc_325BE: mov rsi, [rbp+var_20F8] lea rdi, [rbp+var_2094] mov edx, 2000h call _memcpy mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_2108], rax lea rdi, [rbp+var_20B0]; this mov esi, (offset dword_0+1); protocol::ChunkVoxels * call _ZN8protocol6encodeERKNS_11ChunkVoxelsEj; protocol::encode(protocol::ChunkVoxels const&,uint) mov [rbp+var_2100], rax jmp short $+2 loc_325FF: mov rsi, [rbp+var_2100] mov rdi, [rbp+var_2108] call _ZN8protocol4sendEP9_ENetPeerP11_ENetPacket; protocol::send(_ENetPeer *,_ENetPacket *) jmp short $+2 loc_32614: lea rdi, [rbp+var_20B0]; this call _ZN8protocol11ChunkVoxelsD2Ev; protocol::ChunkVoxels::~ChunkVoxels() jmp short loc_3265F mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp short loc_3266C mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_20B0]; this call _ZN8protocol11ChunkVoxelsD2Ev; protocol::ChunkVoxels::~ChunkVoxels() jmp short loc_3266C loc_3264A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_8] add rsi, 10h call _ZN8worldgen13request_chunkEP7SessionRKN3glm3vecILi3EiLNS2_9qualifierE0EEE; worldgen::request_chunk(Session *,glm::vec<3,int,(glm::qualifier)0> const&) jmp short $+2 loc_3265D: jmp short $+2 loc_3265F: jmp short $+2 loc_32661: lea rdi, [rbp+var_38]; this call _ZN9ChunkAABBD2Ev; ChunkAABB::~ChunkAABB() jmp short loc_32677 loc_3266C: lea rdi, [rbp+var_38]; this call _ZN9ChunkAABBD2Ev; ChunkAABB::~ChunkAABB() jmp short loc_32682 loc_32677: jmp short $+2 loc_32679: add rsp, 2110h pop rbp retn loc_32682: mov rdi, [rbp+var_50] call __Unwind_Resume
void on_request_chunk_packet(const protocol::RequestChunk *a1) { int v1; // edx int v2; // edx unsigned int v3; // edx long long v4; // [rsp+8h] [rbp-2108h] long long v5; // [rsp+10h] [rbp-2100h] long long voxels; // [rsp+18h] [rbp-20F8h] long long v7; // [rsp+38h] [rbp-20D8h] unsigned int v8; // [rsp+40h] [rbp-20D0h] long long v9; // [rsp+50h] [rbp-20C0h] unsigned int value; // [rsp+5Ch] [rbp-20B4h] _BYTE v11[16]; // [rsp+60h] [rbp-20B0h] BYREF long long v12; // [rsp+70h] [rbp-20A0h] int v13; // [rsp+78h] [rbp-2098h] _BYTE v14[8196]; // [rsp+7Ch] [rbp-2094h] BYREF Chunk *chunk; // [rsp+2080h] [rbp-90h] long long v16; // [rsp+2088h] [rbp-88h] int v17; // [rsp+2090h] [rbp-80h] long long v18; // [rsp+2098h] [rbp-78h] int v19; // [rsp+20A0h] [rbp-70h] long long v20; // [rsp+20A8h] [rbp-68h] int v21; // [rsp+20B0h] [rbp-60h] long long v22; // [rsp+20C8h] [rbp-48h] int v23; // [rsp+20D0h] [rbp-40h] _BYTE v24[8]; // [rsp+20D8h] [rbp-38h] BYREF long long v25; // [rsp+20E0h] [rbp-30h] int v26; // [rsp+20E8h] [rbp-28h] long long v27; // [rsp+20ECh] [rbp-24h] int v28; // [rsp+20F4h] [rbp-1Ch] long long v29; // [rsp+20F8h] [rbp-18h] long long v30; // [rsp+2100h] [rbp-10h] const protocol::RequestChunk *v31; // [rsp+2108h] [rbp-8h] v31 = a1; v30 = sessions::find(*((_QWORD *)a1 + 1)); if ( v30 ) { if ( *(_QWORD *)(v30 + 56) ) { if ( (entt::basic_registry<entt::entity,std::allocator<entt::entity>>::valid( *(_QWORD *)(v30 + 56) + 344LL, *(unsigned int *)(v30 + 48)) & 1) != 0 ) { v29 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::try_get<TransformComponent>( *(_QWORD *)(v30 + 56) + 344LL, *(unsigned int *)(v30 + 48)); if ( v29 ) { ChunkAABB::ChunkAABB((ChunkAABB *)v24); v9 = v29; value = ConfigNumber<unsigned int>::get_value((long long)&server_game::view_distance); v20 = glm::operator-<int,(glm::qualifier)0>(v9, value); v21 = v1; v23 = v1; v22 = v20; v26 = v1; v25 = v20; v7 = v29; v8 = ConfigNumber<unsigned int>::get_value((long long)&server_game::view_distance); v16 = glm::operator+<int,(glm::qualifier)0>(v7, v8); v17 = v2; v19 = v2; v18 = v16; v28 = v2; v27 = v16; if ( (ChunkAABB::contains(v24, (char *)v31 + 16) & 1) != 0 ) { chunk = (Chunk *)universe::load_chunk(*(_QWORD *)(v30 + 56), (char *)v31 + 16); if ( chunk ) { protocol::ChunkVoxels::ChunkVoxels((protocol::ChunkVoxels *)v11); v13 = *((_DWORD *)v31 + 6); v12 = *((_QWORD *)v31 + 2); voxels = Chunk::get_voxels(chunk); memcpy(v14, voxels, 0x2000LL); v4 = *((_QWORD *)v31 + 1); v5 = protocol::encode((protocol *)v11, (const protocol::ChunkVoxels *)((char *)&dword_0 + 1), v3); protocol::send(v4, v5); protocol::ChunkVoxels::~ChunkVoxels((protocol::ChunkVoxels *)v11); } else { worldgen::request_chunk(v30, (char *)v31 + 16); } } ChunkAABB::~ChunkAABB((ChunkAABB *)v24); } } } } }
on_request_chunk_packet: PUSH RBP MOV RBP,RSP SUB RSP,0x2110 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x0015ac70 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00132679 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00132405 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x158 MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x30] CALL 0x0013e850 TEST AL,0x1 JNZ 0x0013240a LAB_00132405: JMP 0x00132679 LAB_0013240a: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x158 MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x30] CALL 0x001585c0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00132677 LEA RDI,[RBP + -0x38] CALL 0x001585f0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20c0],RAX LAB_00132448: LEA RDI,[0x3d1140] CALL 0x00124710 MOV dword ptr [RBP + -0x20b4],EAX JMP 0x0013245c LAB_0013245c: MOV ESI,dword ptr [RBP + -0x20b4] MOV RDI,qword ptr [RBP + -0x20c0] CALL 0x00158610 MOV dword ptr [RBP + -0x20cc],EDX MOV qword ptr [RBP + -0x20c8],RAX JMP 0x0013247d LAB_0013247d: MOV EAX,dword ptr [RBP + -0x20cc] MOV RCX,qword ptr [RBP + -0x20c8] MOV qword ptr [RBP + -0x68],RCX MOV dword ptr [RBP + -0x60],EAX MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x40],EAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20d8],RAX LEA RDI,[0x3d1140] CALL 0x00124710 MOV dword ptr [RBP + -0x20d0],EAX JMP 0x001324cc LAB_001324cc: MOV ESI,dword ptr [RBP + -0x20d0] MOV RDI,qword ptr [RBP + -0x20d8] CALL 0x00158660 MOV dword ptr [RBP + -0x20e4],EDX MOV qword ptr [RBP + -0x20e0],RAX JMP 0x001324ed LAB_001324ed: MOV EAX,dword ptr [RBP + -0x20e4] MOV RCX,qword ptr [RBP + -0x20e0] MOV qword ptr [RBP + -0x88],RCX MOV dword ptr [RBP + -0x80],EAX MOV EAX,dword ptr [RBP + -0x80] MOV dword ptr [RBP + -0x70],EAX MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x78],RAX MOV EAX,dword ptr [RBP + -0x70] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x24],RAX MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x10 LEA RDI,[RBP + -0x38] CALL 0x00191b10 MOV byte ptr [RBP + -0x20e5],AL JMP 0x0013253c LAB_0013253c: MOV AL,byte ptr [RBP + -0x20e5] TEST AL,0x1 JNZ 0x0013254b JMP 0x00132661 LAB_0013254b: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x10 CALL 0x00171560 MOV qword ptr [RBP + -0x20f0],RAX JMP 0x00132569 LAB_00132569: MOV RAX,qword ptr [RBP + -0x20f0] MOV qword ptr [RBP + -0x90],RAX CMP qword ptr [RBP + -0x90],0x0 JZ 0x0013264a LEA RDI,[RBP + -0x20b0] CALL 0x001586b0 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x2098],ECX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20a0],RAX MOV RDI,qword ptr [RBP + -0x90] LAB_001325b0: CALL 0x00192020 LAB_001325b5: MOV qword ptr [RBP + -0x20f8],RAX JMP 0x001325be LAB_001325be: MOV RSI,qword ptr [RBP + -0x20f8] LEA RDI,[RBP + -0x2094] MOV EDX,0x2000 CALL 0x0011a780 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x2108],RAX LAB_001325e5: LEA RDI,[RBP + -0x20b0] MOV ESI,0x1 CALL 0x001bce80 MOV qword ptr [RBP + -0x2100],RAX JMP 0x001325ff LAB_001325ff: MOV RSI,qword ptr [RBP + -0x2100] MOV RDI,qword ptr [RBP + -0x2108] CALL 0x001bd8b0 JMP 0x00132614 LAB_00132614: LEA RDI,[RBP + -0x20b0] CALL 0x001586f0 JMP 0x0013265f LAB_0013264a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x10 LAB_00132656: CALL 0x0018cc90 LAB_0013265b: JMP 0x0013265d LAB_0013265d: JMP 0x0013265f LAB_0013265f: JMP 0x00132661 LAB_00132661: LEA RDI,[RBP + -0x38] CALL 0x00158710 JMP 0x00132677 LAB_00132677: JMP 0x00132679 LAB_00132679: ADD RSP,0x2110 POP RBP RET
/* on_request_chunk_packet(protocol::RequestChunk const&) */ void on_request_chunk_packet(RequestChunk *param_1) { _ENetPeer *p_Var1; vec *pvVar2; byte bVar3; int iVar4; ulong uVar5; void *__src; _ENetPacket *p_Var6; ChunkVoxels local_20b8 [16]; int8 local_20a8; int4 local_20a0; int1 local_209c [8196]; Chunk *local_98; int1 local_90 [12]; int1 local_80 [12]; int1 local_70 [12]; int1 local_50 [12]; ChunkAABB local_40 [8]; int1 local_38 [12]; int1 local_2c [12]; vec *local_20; Session *local_18; RequestChunk *local_10; local_10 = param_1; local_18 = (Session *)sessions::find(*(_ENetPeer **)(param_1 + 8)); if ((((local_18 != (Session *)0x0) && (*(long *)(local_18 + 0x38) != 0)) && (uVar5 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::valid ((basic_registry<entt::entity,std::allocator<entt::entity>> *) (*(long *)(local_18 + 0x38) + 0x158),*(int4 *)(local_18 + 0x30)), (uVar5 & 1) != 0)) && (local_20 = (vec *)entt::basic_registry<entt::entity,std::allocator<entt::entity>>:: try_get<TransformComponent> ((basic_registry<entt::entity,std::allocator<entt::entity>> *) (*(long *)(local_18 + 0x38) + 0x158), *(int4 *)(local_18 + 0x30)), local_20 != (vec *)0x0)) { ChunkAABB::ChunkAABB(local_40); pvVar2 = local_20; /* try { // try from 00132448 to 0013255f has its CatchHandler @ 00132622 */ iVar4 = ConfigNumber<unsigned_int>::get_value ((ConfigNumber<unsigned_int> *)server_game::view_distance); local_70 = glm::operator-(pvVar2,iVar4); pvVar2 = local_20; local_50 = local_70; local_38 = local_70; iVar4 = ConfigNumber<unsigned_int>::get_value ((ConfigNumber<unsigned_int> *)server_game::view_distance); local_90 = glm::operator+(pvVar2,iVar4); local_80 = local_90; local_2c = local_90; bVar3 = ChunkAABB::contains(local_40,(vec *)(local_10 + 0x10)); if ((bVar3 & 1) != 0) { local_98 = (Chunk *)universe::load_chunk (*(Dimension **)(local_18 + 0x38),(vec *)(local_10 + 0x10)); if (local_98 == (Chunk *)0x0) { /* try { // try from 00132656 to 0013265a has its CatchHandler @ 00132622 */ worldgen::request_chunk(local_18,(vec *)(local_10 + 0x10)); } else { protocol::ChunkVoxels::ChunkVoxels(local_20b8); local_20a0 = *(int4 *)(local_10 + 0x18); local_20a8 = *(int8 *)(local_10 + 0x10); /* try { // try from 001325b0 to 001325b4 has its CatchHandler @ 00132630 */ __src = (void *)Chunk::get_voxels(local_98); memcpy(local_209c,__src,0x2000); p_Var1 = *(_ENetPeer **)(local_10 + 8); /* try { // try from 001325e5 to 00132611 has its CatchHandler @ 00132630 */ p_Var6 = (_ENetPacket *)protocol::encode(local_20b8,1); protocol::send(p_Var1,p_Var6); protocol::ChunkVoxels::~ChunkVoxels(local_20b8); } } ChunkAABB::~ChunkAABB(local_40); } return; }
51,748
utf8_decode_len
bluesky950520[P]quickjs/cutils.c
uint32_t utf8_decode_len(const uint8_t *p, size_t max_len, const uint8_t **pp) { switch (max_len) { case 0: *pp = p; return 0xFFFD; case 1: if (*p < 0x80) goto good; break; case 2: if (*p < 0xE0) goto good; break; case 3: if (*p < 0xF0) goto good; break; default: good: return utf8_decode(p, pp); } *pp = p + 1; return 0xFFFD; }
O0
c
utf8_decode_len: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) subq $0x3, %rax ja 0x1db96 movq (%rsp), %rax leaq 0xeb12f(%rip), %rcx # 0x108c6c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, (%rax) movl $0xfffd, 0x24(%rsp) # imm = 0xFFFD jmp 0x1dbc6 movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x1db6e jmp 0x1db98 jmp 0x1dbad movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0xe0, %eax jge 0x1db81 jmp 0x1db98 jmp 0x1dbad movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0xf0, %eax jge 0x1db94 jmp 0x1db98 jmp 0x1dbad jmp 0x1db98 movq 0x18(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x1d890 movl %eax, 0x24(%rsp) jmp 0x1dbc6 movq 0x18(%rsp), %rcx addq $0x1, %rcx movq 0x8(%rsp), %rax movq %rcx, (%rax) movl $0xfffd, 0x24(%rsp) # imm = 0xFFFD movl 0x24(%rsp), %eax addq $0x28, %rsp retq nop
utf8_decode_len: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_20], rdx mov rax, [rsp+28h+var_18] mov [rsp+28h+var_28], rax sub rax, 3; switch 4 cases ja short def_1DB44; jumptable 000000000001DB44 default case mov rax, [rsp+28h+var_28] lea rcx, jpt_1DB44 movsxd rax, ds:(jpt_1DB44 - 108C6Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1DB46: mov rcx, [rsp+28h+var_10]; jumptable 000000000001DB44 case 0 mov rax, [rsp+28h+var_20] mov [rax], rcx mov [rsp+28h+var_4], 0FFFDh jmp short loc_1DBC6 loc_1DB5D: mov rax, [rsp+28h+var_10]; jumptable 000000000001DB44 case 1 movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_1DB6E jmp short loc_1DB98 loc_1DB6E: jmp short loc_1DBAD loc_1DB70: mov rax, [rsp+28h+var_10]; jumptable 000000000001DB44 case 2 movzx eax, byte ptr [rax] cmp eax, 0E0h jge short loc_1DB81 jmp short loc_1DB98 loc_1DB81: jmp short loc_1DBAD loc_1DB83: mov rax, [rsp+28h+var_10]; jumptable 000000000001DB44 case 3 movzx eax, byte ptr [rax] cmp eax, 0F0h jge short loc_1DB94 jmp short loc_1DB98 loc_1DB94: jmp short loc_1DBAD def_1DB44: jmp short $+2; jumptable 000000000001DB44 default case loc_1DB98: mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_20] call utf8_decode mov [rsp+28h+var_4], eax jmp short loc_1DBC6 loc_1DBAD: mov rcx, [rsp+28h+var_10] add rcx, 1 mov rax, [rsp+28h+var_20] mov [rax], rcx mov [rsp+28h+var_4], 0FFFDh loc_1DBC6: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long utf8_decode_len(unsigned __int8 *a1, long long a2, unsigned __int8 **a3) { unsigned int v4; // [rsp+24h] [rbp-4h] switch ( a2 ) { case 0LL: *a3 = a1; return 65533; case 1LL: if ( *a1 < 0x80u ) goto LABEL_8; goto LABEL_9; case 2LL: if ( *a1 >= 0xE0u ) goto LABEL_9; goto LABEL_8; case 3LL: if ( *a1 < 0xF0u ) goto LABEL_8; LABEL_9: *a3 = a1 + 1; v4 = 65533; break; default: LABEL_8: v4 = utf8_decode(a1, a3); break; } return v4; }
utf8_decode_len: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX SUB RAX,0x3 JA 0x0011db96 MOV RAX,qword ptr [RSP] LEA RCX,[0x208c6c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x24],0xfffd JMP 0x0011dbc6 caseD_1: MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x0011db6e JMP 0x0011db98 LAB_0011db6e: JMP 0x0011dbad caseD_2: MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xe0 JGE 0x0011db81 JMP 0x0011db98 LAB_0011db81: JMP 0x0011dbad caseD_3: MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xf0 JGE 0x0011db94 JMP 0x0011db98 LAB_0011db94: JMP 0x0011dbad LAB_0011db96: JMP 0x0011db98 default: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0011d890 MOV dword ptr [RSP + 0x24],EAX JMP 0x0011dbc6 LAB_0011dbad: MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x1 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x24],0xfffd LAB_0011dbc6: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 utf8_decode_len(byte *param_1,int8 param_2,int8 *param_3) { int4 uVar1; switch(param_2) { case 0: *param_3 = param_1; return 0xfffd; case 1: if (0x7f < *param_1) { LAB_0011dbad: *param_3 = param_1 + 1; return 0xfffd; } break; case 2: if (0xdf < *param_1) goto LAB_0011dbad; break; case 3: if (0xef < *param_1) goto LAB_0011dbad; } uVar1 = utf8_decode(param_1,param_3); return uVar1; }
51,749
utf8_decode_len
bluesky950520[P]quickjs/cutils.c
uint32_t utf8_decode_len(const uint8_t *p, size_t max_len, const uint8_t **pp) { switch (max_len) { case 0: *pp = p; return 0xFFFD; case 1: if (*p < 0x80) goto good; break; case 2: if (*p < 0xE0) goto good; break; case 3: if (*p < 0xF0) goto good; break; default: good: return utf8_decode(p, pp); } *pp = p + 1; return 0xFFFD; }
O1
c
utf8_decode_len: cmpq $0x3, %rsi ja 0x1ac3e leaq 0x7ff8c(%rip), %rax # 0x9abbc movslq (%rax,%rsi,4), %rcx addq %rax, %rcx jmpq *%rcx cmpb $0x0, (%rdi) js 0x1ac4b movq %rdx, %rsi jmp 0x1ab15 cmpb $-0x20, (%rdi) jb 0x1ac3e incq %rdi movq %rdi, (%rdx) movl $0xfffd, %eax # imm = 0xFFFD retq cmpb $-0x11, (%rdi) jbe 0x1ac3e jmp 0x1ac4b
utf8_decode_len: cmp rsi, 3; switch 4 cases ja short def_1AC37; jumptable 000000000001AC37 default case lea rax, jpt_1AC37 movsxd rcx, ds:(jpt_1AC37 - 9ABBCh)[rax+rsi*4] add rcx, rax jmp rcx; switch jump loc_1AC39: cmp byte ptr [rdi], 0; jumptable 000000000001AC37 case 1 js short loc_1AC4B def_1AC37: mov rsi, rdx; jumptable 000000000001AC37 default case jmp utf8_decode loc_1AC46: cmp byte ptr [rdi], 0E0h; jumptable 000000000001AC37 case 2 jb short def_1AC37; jumptable 000000000001AC37 default case loc_1AC4B: inc rdi loc_1AC4E: mov [rdx], rdi; jumptable 000000000001AC37 case 0 mov eax, 0FFFDh retn loc_1AC57: cmp byte ptr [rdi], 0EFh; jumptable 000000000001AC37 case 3 jbe short def_1AC37; jumptable 000000000001AC37 default case jmp short loc_1AC4B
long long utf8_decode_len(char *a1, long long a2, char **a3) { long long result; // rax switch ( a2 ) { case 0LL: goto LABEL_6; case 1LL: if ( *a1 >= 0 ) goto LABEL_3; goto LABEL_5; case 2LL: if ( (unsigned __int8)*a1 >= 0xE0u ) goto LABEL_5; goto LABEL_3; case 3LL: if ( (unsigned __int8)*a1 <= 0xEFu ) goto LABEL_3; LABEL_5: ++a1; LABEL_6: *a3 = a1; result = 65533LL; break; default: LABEL_3: result = utf8_decode(a1, a3); break; } return result; }
utf8_decode_len: CMP RSI,0x3 JA 0x0011ac3e LEA RAX,[0x19abbc] MOVSXD RCX,dword ptr [RAX + RSI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_1: CMP byte ptr [RDI],0x0 JS 0x0011ac4b default: MOV RSI,RDX JMP 0x0011ab15 caseD_2: CMP byte ptr [RDI],0xe0 JC 0x0011ac3e LAB_0011ac4b: INC RDI caseD_0: MOV qword ptr [RDX],RDI MOV EAX,0xfffd RET caseD_3: CMP byte ptr [RDI],0xef JBE 0x0011ac3e JMP 0x0011ac4b
int8 utf8_decode_len(byte *param_1,int8 param_2,int8 *param_3) { int8 uVar1; switch(param_2) { case 0: goto switchD_0011ac37_caseD_0; case 1: if (-1 < (char)*param_1) goto switchD_0011ac37_default; break; case 2: if (*param_1 < 0xe0) goto switchD_0011ac37_default; break; case 3: if (*param_1 < 0xf0) goto switchD_0011ac37_default; break; default: switchD_0011ac37_default: uVar1 = utf8_decode(param_1,param_3); return uVar1; } param_1 = param_1 + 1; switchD_0011ac37_caseD_0: *param_3 = param_1; return 0xfffd; }
51,750
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&))
llama.cpp/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const std::string & help, void (*handler)(common_params & params) ) : args(args), help(help), handler_void(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbx leaq 0xc(%rsp), %rsi movl $0x0, (%rsi) leaq 0xb(%rsp), %rcx leaq 0xa(%rsp), %r8 movl $0x1, %edx callq 0x941aa leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r12 movq (%r13), %rsi movq 0x8(%r13), %rdx leaq 0x9(%rsp), %rcx movq %r12, %rdi callq 0x9422c leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) movq $0x0, 0x88(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x3bb50 movb $0x0, 0xb0(%rbx) movq %r14, 0xb8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc0(%rbx) movq $0x0, 0xd0(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%r12), %rdi testq %rdi, %rdi je 0x82bae movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x21180 jmp 0x82bae movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x94272 movq %rbx, %rdi callq 0x94272 movq %r14, %rdi callq 0x21b20 nop
_ZN10common_argC2ERKSt16initializer_listIPKcERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsE: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, rcx mov r15, rdx mov r13, rsi mov rbx, rdi lea rsi, [rsp+38h+var_2C] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_2D] lea r8, [rsp+38h+var_2E] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r12, [rbx+60h] mov rsi, [r13+0] mov rdx, [r13+8] lea rcx, [rsp+38h+var_2F] mov rdi, r12 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 mov qword ptr [rbx+88h], 0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 mov [rbx+0B8h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C0h], xmm0 mov qword ptr [rbx+0D0h], 0 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [r12]; void * test rdi, rdi jz short loc_82BAE mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_82BAE mov r14, rax loc_82BAE: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4) { long long result; // rax char v7; // [rsp+9h] [rbp-2Fh] BYREF char v8; // [rsp+Ah] [rbp-2Eh] BYREF char v9; // [rsp+Bh] [rbp-2Dh] BYREF _DWORD v10[11]; // [rsp+Ch] [rbp-2Ch] BYREF v10[0] = 0; std::set<llama_example>::set(a1, v10, 1LL, &v9, &v8); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v7); *(_OWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 136) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = a4; *(_OWORD *)(a1 + 192) = 0LL; *(_QWORD *)(a1 + 208) = 0LL; return result; }
common_arg: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV RBX,RDI LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0xb] LEA R8,[RSP + 0xa] MOV EDX,0x1 CALL 0x001941aa LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R12,[RBX + 0x60] MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LAB_00182b1d: LEA RCX,[RSP + 0x9] MOV RDI,R12 CALL 0x0019422c LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 MOV qword ptr [RBX + 0x88],0x0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_00182b5b: CALL 0x0013bb50 LAB_00182b60: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV qword ptr [RBX + 0xd0],0x0 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::string const&, void (*)(common_params&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,string *param_2, _func_void_common_params_ptr *param_3) { int1 local_2f; int1 local_2e; int1 local_2d; int4 local_2c; local_2c = 0; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&local_2c,1,&local_2d,&local_2e); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 00182b1d to 00182b29 has its CatchHandler @ 00182bab */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&local_2f); *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 00182b5b to 00182b5f has its CatchHandler @ 00182b91 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); this[0xb0] = (common_arg)0x0; *(_func_void_common_params_ptr **)(this + 0xb8) = param_3; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
51,751
ftxui::ScreenInteractive::Uninstall()
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
void ScreenInteractive::Uninstall() { ExitNow(); event_listener_.join(); animation_listener_.join(); OnExit(); }
O3
cpp
ftxui::ScreenInteractive::Uninstall(): pushq %rbx movq %rdi, %rbx movb $0x1, %al xchgb %al, 0xb8(%rdi) addq $0x68, %rdi xorl %esi, %esi callq 0x31188 leaq 0xc0(%rbx), %rdi callq 0xb730 addq $0xc8, %rbx movq %rbx, %rdi callq 0xb730 popq %rbx jmp 0x2e59f
_ZN5ftxui17ScreenInteractive9UninstallEv: push rbx mov rbx, rdi mov al, 1 xchg al, [rdi+0B8h] add rdi, 68h ; 'h' xor esi, esi call _ZNSt15__uniq_ptr_implIN5ftxui10SenderImplISt7variantIJNS0_5EventESt8functionIFvvEENS0_13AnimationTaskEEEEESt14default_deleteIS9_EE5resetEPS9_; std::__uniq_ptr_impl<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>,std::default_delete<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>>::reset(ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>*) lea rdi, [rbx+0C0h]; this call __ZNSt6thread4joinEv; std::thread::join(void) add rbx, 0C8h mov rdi, rbx; this call __ZNSt6thread4joinEv; std::thread::join(void) pop rbx jmp _ZN5ftxui12_GLOBAL__N_16OnExitEv; ftxui::`anonymous namespace'::OnExit(void)
long long ftxui::ScreenInteractive::Uninstall(ftxui::ScreenInteractive *this) { std::thread *v1; // rdi *((_BYTE *)this + 184) = 1; std::__uniq_ptr_impl<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>,std::default_delete<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>>::reset( (char *)this + 104, 0LL); std::thread::join((ftxui::ScreenInteractive *)((char *)this + 192)); v1 = (ftxui::ScreenInteractive *)((char *)this + 200); std::thread::join(v1); return ftxui::`anonymous namespace'::OnExit(v1); }
Uninstall: PUSH RBX MOV RBX,RDI MOV AL,0x1 XCHG byte ptr [RDI + 0xb8],AL ADD RDI,0x68 XOR ESI,ESI CALL 0x00131188 LEA RDI,[RBX + 0xc0] CALL 0x0010b730 ADD RBX,0xc8 MOV RDI,RBX CALL 0x0010b730 POP RBX JMP 0x0012e59f
/* ftxui::ScreenInteractive::Uninstall() */ void __thiscall ftxui::ScreenInteractive::Uninstall(ScreenInteractive *this) { LOCK(); this[0xb8] = (ScreenInteractive)0x1; UNLOCK(); std:: __uniq_ptr_impl<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>,std::default_delete<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>>> ::reset((__uniq_ptr_impl<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>,std::default_delete<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>>> *)(this + 0x68),(SenderImpl *)0x0); std::thread::join(); std::thread::join(); (anonymous_namespace)::OnExit(); return; }
51,752
rapidjson::internal::FastPath(double, int)
mnn-tts/MNN/3rd_party/rapidjson/internal/strtod.h
inline double FastPath(double significand, int exp) { if (exp < -308) return 0.0; else if (exp >= 0) return significand * internal::Pow10(exp); else return significand / internal::Pow10(-exp); }
O0
c
rapidjson::internal::FastPath(double, int): subq $0x28, %rsp movsd %xmm0, 0x18(%rsp) movl %edi, 0x14(%rsp) cmpl $0xfffffecc, 0x14(%rsp) # imm = 0xFFFFFECC jge 0xfad3 xorps %xmm0, %xmm0 movsd %xmm0, 0x20(%rsp) jmp 0xfb2c cmpl $0x0, 0x14(%rsp) jl 0xfb04 movsd 0x18(%rsp), %xmm0 movsd %xmm0, 0x8(%rsp) movl 0x14(%rsp), %edi callq 0xfb40 movaps %xmm0, %xmm1 movsd 0x8(%rsp), %xmm0 mulsd %xmm1, %xmm0 movsd %xmm0, 0x20(%rsp) jmp 0xfb2c movsd 0x18(%rsp), %xmm0 movsd %xmm0, (%rsp) xorl %edi, %edi subl 0x14(%rsp), %edi callq 0xfb40 movaps %xmm0, %xmm1 movsd (%rsp), %xmm0 divsd %xmm1, %xmm0 movsd %xmm0, 0x20(%rsp) movsd 0x20(%rsp), %xmm0 addq $0x28, %rsp retq nopw (%rax,%rax)
_ZN9rapidjson8internal8FastPathEdi: sub rsp, 28h movsd [rsp+28h+var_14+4], xmm0 mov dword ptr [rsp+28h+var_14], edi cmp dword ptr [rsp+28h+var_14], 0FFFFFECCh jge short loc_FAD3 xorps xmm0, xmm0 movsd [rsp+28h+var_8], xmm0 jmp short loc_FB2C loc_FAD3: cmp dword ptr [rsp+28h+var_14], 0 jl short loc_FB04 movsd xmm0, [rsp+28h+var_14+4] movsd [rsp+28h+var_20], xmm0 mov edi, dword ptr [rsp+28h+var_14]; this call _ZN9rapidjson8internal5Pow10Ei; rapidjson::internal::Pow10(int) movaps xmm1, xmm0 movsd xmm0, [rsp+28h+var_20] mulsd xmm0, xmm1 movsd [rsp+28h+var_8], xmm0 jmp short loc_FB2C loc_FB04: movsd xmm0, [rsp+28h+var_14+4] movsd [rsp+28h+var_28], xmm0 xor edi, edi sub edi, dword ptr [rsp+28h+var_14]; this call _ZN9rapidjson8internal5Pow10Ei; rapidjson::internal::Pow10(int) movaps xmm1, xmm0 movsd xmm0, [rsp+28h+var_28] divsd xmm0, xmm1 movsd [rsp+28h+var_8], xmm0 loc_FB2C: movsd xmm0, [rsp+28h+var_8] add rsp, 28h retn
double rapidjson::internal::FastPath(rapidjson::internal *this, double a2, int a3) { if ( (int)this < -308 ) return 0.0; if ( (int)this < 0 ) { rapidjson::internal::Pow10((rapidjson::internal *)(unsigned int)-(int)this, a3); return a2 / a2; } else { rapidjson::internal::Pow10((rapidjson::internal *)(unsigned int)this, a3); return a2 * a2; } }
FastPath: SUB RSP,0x28 MOVSD qword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x14],EDI CMP dword ptr [RSP + 0x14],0xfffffecc JGE 0x0010fad3 XORPS XMM0,XMM0 MOVSD qword ptr [RSP + 0x20],XMM0 JMP 0x0010fb2c LAB_0010fad3: CMP dword ptr [RSP + 0x14],0x0 JL 0x0010fb04 MOVSD XMM0,qword ptr [RSP + 0x18] MOVSD qword ptr [RSP + 0x8],XMM0 MOV EDI,dword ptr [RSP + 0x14] CALL 0x0010fb40 MOVAPS XMM1,XMM0 MOVSD XMM0,qword ptr [RSP + 0x8] MULSD XMM0,XMM1 MOVSD qword ptr [RSP + 0x20],XMM0 JMP 0x0010fb2c LAB_0010fb04: MOVSD XMM0,qword ptr [RSP + 0x18] MOVSD qword ptr [RSP],XMM0 XOR EDI,EDI SUB EDI,dword ptr [RSP + 0x14] CALL 0x0010fb40 MOVAPS XMM1,XMM0 MOVSD XMM0,qword ptr [RSP] DIVSD XMM0,XMM1 MOVSD qword ptr [RSP + 0x20],XMM0 LAB_0010fb2c: MOVSD XMM0,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
/* rapidjson::internal::FastPath(double, int) */ double rapidjson::internal::FastPath(double param_1,int param_2) { int8 local_8; if (param_2 < -0x134) { local_8 = 0.0; } else if (param_2 < 0) { local_8 = (double)Pow10(-param_2); local_8 = param_1 / local_8; } else { local_8 = (double)Pow10(param_2); local_8 = param_1 * local_8; } return local_8; }
51,753
ma_hashtbl_delete
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
my_bool ma_hashtbl_delete(MA_HASHTBL *hash,uchar *record) { uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index; MA_HASHTBL_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; if (!hash->records) return(1); blength=hash->blength; data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); /* Search after record with key */ pos=data+ hash_mask(rec_hashnr(hash,record),blength,hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) return(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; hash->current_record= NO_RECORD; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos->data=empty->data; pos->next=empty->next; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr=rec_hashnr(hash,lastpos->data); /* pos is where lastpos should be */ pos=data+hash_mask(lastpos_hashnr,hash->blength,hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr=rec_hashnr(hash,pos->data); /* pos3 is where the pos should be */ pos3= data+hash_mask(pos_hashnr,hash->blength,hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= hash_mask(lastpos_hashnr,blength,hash->records+1); if (pos2 == hash_mask(pos_hashnr,blength,hash->records+1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: ma_pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); return(0); }
O0
c
ma_hashtbl_delete: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x8(%rax) jne 0x45ef6 movb $0x1, -0x1(%rbp) jmp 0x46271 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x45e50 movl %eax, %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x45870 movl %eax, %ecx movq -0x68(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq $0x0, -0x48(%rbp) movq -0x50(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax je 0x45f8c movq -0x50(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x50(%rbp), %rax cmpl $-0x1, (%rax) jne 0x45f75 movb $0x1, -0x1(%rbp) jmp 0x46271 movq -0x38(%rbp), %rax movq -0x50(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) jmp 0x45f4d movq -0x10(%rbp), %rcx movl 0x8(%rcx), %eax addl $-0x1, %eax movl %eax, 0x8(%rcx) movq -0x10(%rbp), %rcx movl 0xc(%rcx), %ecx shrl %ecx cmpl %ecx, %eax jae 0x45fb2 movq -0x10(%rbp), %rax movl 0xc(%rax), %ecx shrl %ecx movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x8(%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x30(%rbp) cmpq $0x0, -0x48(%rbp) je 0x46002 movq -0x50(%rbp), %rax movl (%rax), %ecx movq -0x48(%rbp), %rax movl %ecx, (%rax) jmp 0x46043 movq -0x50(%rbp), %rax cmpl $-0x1, (%rax) je 0x46041 movq -0x38(%rbp), %rax movq -0x50(%rbp), %rcx movl (%rcx), %ecx movl %ecx, -0x30(%rbp) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq 0x8(%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x60(%rbp), %rax movl (%rax), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) jmp 0x46043 movq -0x60(%rbp), %rax cmpq -0x40(%rbp), %rax jne 0x46052 jmp 0x46247 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rax movq 0x8(%rax), %rsi callq 0x45e50 movl %eax, -0x28(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x70(%rbp) movl -0x28(%rbp), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x45870 movl %eax, %ecx movq -0x70(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x460bc movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x46247 movq -0x10(%rbp), %rdi movq -0x50(%rbp), %rax movq 0x8(%rax), %rsi callq 0x45e50 movl %eax, -0x24(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x24(%rbp), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x45870 movl %eax, %ecx movq -0x78(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax je 0x4616a movq -0x60(%rbp), %rax movq -0x50(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x50(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x58(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x30(%rbp), %ecx callq 0x45e90 jmp 0x46247 movl -0x28(%rbp), %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx addl $0x1, %edx callq 0x45870 movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movl %eax, -0x7c(%rbp) movl -0x24(%rbp), %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx addl $0x1, %edx callq 0x45870 movl %eax, %ecx movl -0x7c(%rbp), %eax cmpl %ecx, %eax jne 0x4620c movl -0x20(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x8(%rcx), %eax je 0x461f8 movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x30(%rbp), %ecx callq 0x45e90 jmp 0x46247 movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x2c(%rbp) jmp 0x46213 movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %esi movl -0x30(%rbp), %edx movq -0x50(%rbp), %rax movl (%rax), %ecx callq 0x45e90 movl -0x30(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rdi addq $0x18, %rdi callq 0x43870 movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x4626d movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq nopl (%rax)
ma_hashtbl_delete: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp dword ptr [rax+8], 0 jnz short loc_45EF6 mov [rbp+var_1], 1 jmp loc_46271 loc_45EF6: mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rec_hashnr mov edi, eax mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_68] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_50], rax mov [rbp+var_48], 0 loc_45F4D: mov rax, [rbp+var_50] mov rax, [rax+8] cmp rax, [rbp+var_18] jz short loc_45F8C mov rax, [rbp+var_50] mov [rbp+var_48], rax mov rax, [rbp+var_50] cmp dword ptr [rax], 0FFFFFFFFh jnz short loc_45F75 mov [rbp+var_1], 1 jmp loc_46271 loc_45F75: mov rax, [rbp+var_38] mov rcx, [rbp+var_50] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov [rbp+var_50], rax jmp short loc_45F4D loc_45F8C: mov rcx, [rbp+var_10] mov eax, [rcx+8] add eax, 0FFFFFFFFh mov [rcx+8], eax mov rcx, [rbp+var_10] mov ecx, [rcx+0Ch] shr ecx, 1 cmp eax, ecx jnb short loc_45FB2 mov rax, [rbp+var_10] mov ecx, [rax+0Ch] shr ecx, 1 mov [rax+0Ch], ecx loc_45FB2: mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0FFFFFFFFh mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+8] shl rcx, 4 add rax, rcx mov [rbp+var_40], rax mov rax, [rbp+var_50] mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov [rbp+var_30], eax cmp [rbp+var_48], 0 jz short loc_46002 mov rax, [rbp+var_50] mov ecx, [rax] mov rax, [rbp+var_48] mov [rax], ecx jmp short loc_46043 loc_46002: mov rax, [rbp+var_50] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_46041 mov rax, [rbp+var_38] mov rcx, [rbp+var_50] mov ecx, [rcx] mov [rbp+var_30], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rcx, [rax+8] mov rax, [rbp+var_50] mov [rax+8], rcx mov rax, [rbp+var_60] mov ecx, [rax] mov rax, [rbp+var_50] mov [rax], ecx loc_46041: jmp short $+2 loc_46043: mov rax, [rbp+var_60] cmp rax, [rbp+var_40] jnz short loc_46052 jmp loc_46247 loc_46052: mov rdi, [rbp+var_10] mov rax, [rbp+var_40] mov rsi, [rax+8] call rec_hashnr mov [rbp+var_28], eax mov rax, [rbp+var_38] mov [rbp+var_70], rax mov edi, [rbp+var_28] mov rax, [rbp+var_10] mov esi, [rax+0Ch] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_70] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] cmp rax, [rbp+var_60] jnz short loc_460BC mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx jmp loc_46247 loc_460BC: mov rdi, [rbp+var_10] mov rax, [rbp+var_50] mov rsi, [rax+8] call rec_hashnr mov [rbp+var_24], eax mov rax, [rbp+var_38] mov [rbp+var_78], rax mov edi, [rbp+var_24] mov rax, [rbp+var_10] mov esi, [rax+0Ch] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_78] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jz short loc_4616A mov rax, [rbp+var_60] mov rcx, [rbp+var_50] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rax, [rbp+var_50] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_58] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_30] call movelink jmp loc_46247 loc_4616A: mov edi, [rbp+var_28] mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] add edx, 1 call hash_mask mov [rbp+var_20], eax mov eax, [rbp+var_20] mov [rbp+var_7C], eax mov edi, [rbp+var_24] mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] add edx, 1 call hash_mask mov ecx, eax mov eax, [rbp+var_7C] cmp eax, ecx jnz short loc_4620C mov eax, [rbp+var_20] mov rcx, [rbp+var_10] cmp eax, [rcx+8] jz short loc_461F8 mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov rax, [rbp+var_40] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_30] call movelink jmp short loc_46247 loc_461F8: mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov [rbp+var_2C], eax jmp short loc_46213 loc_4620C: mov [rbp+var_2C], 0FFFFFFFFh loc_46213: mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov esi, [rbp+var_2C] mov edx, [rbp+var_30] mov rax, [rbp+var_50] mov ecx, [rax] call movelink mov ecx, [rbp+var_30] mov rax, [rbp+var_50] mov [rax], ecx loc_46247: mov rdi, [rbp+var_10] add rdi, 18h call ma_pop_dynamic mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jz short loc_4626D mov rax, [rbp+var_10] mov rax, [rax+38h] mov rdi, [rbp+var_18] call rax loc_4626D: mov [rbp+var_1], 0 loc_46271: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_hashtbl_delete(long long a1, long long a2) { unsigned int v2; // eax unsigned int v3; // eax _QWORD *v5; // [rsp+20h] [rbp-60h] long long v6; // [rsp+28h] [rbp-58h] unsigned int *v7; // [rsp+30h] [rbp-50h] long long v8; // [rsp+30h] [rbp-50h] _DWORD *v9; // [rsp+38h] [rbp-48h] _QWORD *v10; // [rsp+40h] [rbp-40h] long long v11; // [rsp+48h] [rbp-38h] unsigned int v12; // [rsp+50h] [rbp-30h] int v13; // [rsp+54h] [rbp-2Ch] unsigned int v14; // [rsp+58h] [rbp-28h] unsigned int v15; // [rsp+5Ch] [rbp-24h] int v16; // [rsp+60h] [rbp-20h] unsigned int v17; // [rsp+64h] [rbp-1Ch] if ( !*(_DWORD *)(a1 + 8) ) return 1; v17 = *(_DWORD *)(a1 + 12); v11 = *(_QWORD *)(a1 + 24); v2 = rec_hashnr(a1, a2); v7 = (unsigned int *)(16LL * (unsigned int)hash_mask(v2, v17, *(_DWORD *)(a1 + 8)) + v11); v9 = 0LL; while ( *((_QWORD *)v7 + 1) != a2 ) { v9 = v7; if ( *v7 == -1 ) return 1; v7 = (unsigned int *)(16LL * *v7 + v11); } v3 = *(_DWORD *)(a1 + 8) - 1; *(_DWORD *)(a1 + 8) = v3; if ( v3 < *(_DWORD *)(a1 + 12) >> 1 ) *(_DWORD *)(a1 + 12) >>= 1; *(_DWORD *)(a1 + 16) = -1; v10 = (_QWORD *)(16LL * *(unsigned int *)(a1 + 8) + v11); v5 = v7; v12 = ((long long)v7 - v11) >> 4; if ( v9 ) { *v9 = *v7; } else if ( *v7 != -1 ) { v12 = *v7; v5 = (_QWORD *)(16LL * *v7 + v11); *((_QWORD *)v7 + 1) = v5[1]; *v7 = *(_DWORD *)v5; } if ( v5 != v10 ) { v14 = rec_hashnr(a1, v10[1]); v8 = 16LL * (unsigned int)hash_mask(v14, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) + v11; if ( (_QWORD *)v8 == v5 ) { *v5 = *v10; v5[1] = v10[1]; } else { v15 = rec_hashnr(a1, *(_QWORD *)(v8 + 8)); v6 = 16LL * (unsigned int)hash_mask(v15, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) + v11; if ( v8 == v6 ) { v16 = hash_mask(v14, v17, *(_DWORD *)(a1 + 8) + 1); if ( v16 == (unsigned int)hash_mask(v15, v17, *(_DWORD *)(a1 + 8) + 1) ) { if ( v16 != *(_DWORD *)(a1 + 8) ) { *v5 = *v10; v5[1] = v10[1]; movelink(v11, ((long long)v10 - v11) >> 4, (v8 - v11) >> 4, v12); goto LABEL_25; } v13 = (v8 - v11) >> 4; } else { v13 = -1; } *v5 = *v10; v5[1] = v10[1]; movelink(v11, v13, v12, *(_DWORD *)v8); *(_DWORD *)v8 = v12; goto LABEL_25; } *v5 = *(_QWORD *)v8; v5[1] = *(_QWORD *)(v8 + 8); *(_QWORD *)v8 = *v10; *(_QWORD *)(v8 + 8) = v10[1]; movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v12); } } LABEL_25: ma_pop_dynamic((long long *)(a1 + 24)); if ( *(_QWORD *)(a1 + 56) ) (*(void ( **)(long long))(a1 + 56))(a2); return 0; }
ma_hashtbl_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x0 JNZ 0x00145ef6 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146271 LAB_00145ef6: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00145e50 MOV EDI,EAX MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00145870 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x68] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x48],0x0 LAB_00145f4d: MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JZ 0x00145f8c MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX],-0x1 JNZ 0x00145f75 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146271 LAB_00145f75: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX JMP 0x00145f4d LAB_00145f8c: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x8] ADD EAX,-0x1 MOV dword ptr [RCX + 0x8],EAX MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0xc] SHR ECX,0x1 CMP EAX,ECX JNC 0x00145fb2 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0xc] SHR ECX,0x1 MOV dword ptr [RAX + 0xc],ECX LAB_00145fb2: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0xffffffff MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x8] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x30],EAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x00146002 MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX JMP 0x00146043 LAB_00146002: MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX],-0x1 JZ 0x00146041 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RCX] MOV dword ptr [RBP + -0x30],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00146041: JMP 0x00146043 LAB_00146043: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x40] JNZ 0x00146052 JMP 0x00146247 LAB_00146052: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00145e50 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x70],RAX MOV EDI,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00145870 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x001460bc MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX JMP 0x00146247 LAB_001460bc: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00145e50 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x78],RAX MOV EDI,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00145870 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JZ 0x0014616a MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x30] CALL 0x00145e90 JMP 0x00146247 LAB_0014616a: MOV EDI,dword ptr [RBP + -0x28] MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] ADD EDX,0x1 CALL 0x00145870 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x7c],EAX MOV EDI,dword ptr [RBP + -0x24] MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] ADD EDX,0x1 CALL 0x00145870 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x7c] CMP EAX,ECX JNZ 0x0014620c MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x8] JZ 0x001461f8 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x30] CALL 0x00145e90 JMP 0x00146247 LAB_001461f8: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00146213 LAB_0014620c: MOV dword ptr [RBP + -0x2c],0xffffffff LAB_00146213: MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX] CALL 0x00145e90 MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00146247: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x18 CALL 0x00143870 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0014626d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x18] CALL RAX LAB_0014626d: MOV byte ptr [RBP + -0x1],0x0 LAB_00146271: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 ma_hashtbl_delete(long param_1,long param_2) { int4 uVar1; long lVar2; int4 uVar3; uint uVar4; int4 uVar5; int iVar6; int iVar7; uint *puVar8; uint *puVar9; uint *puVar10; uint *local_68; uint *local_58; uint *local_50; uint local_38; int4 local_34; if (*(int *)(param_1 + 8) == 0) { return 1; } uVar1 = *(int4 *)(param_1 + 0xc); lVar2 = *(long *)(param_1 + 0x18); uVar3 = rec_hashnr(param_1,param_2); uVar4 = hash_mask(uVar3,uVar1,*(int4 *)(param_1 + 8)); local_50 = (uint *)0x0; while (local_58 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_58 + 2) != param_2) { local_50 = local_58; if (*local_58 == 0xffffffff) { return 1; } uVar4 = *local_58; } uVar4 = *(int *)(param_1 + 8) - 1; *(uint *)(param_1 + 8) = uVar4; if (uVar4 < *(uint *)(param_1 + 0xc) >> 1) { *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) >> 1; } *(int4 *)(param_1 + 0x10) = 0xffffffff; puVar8 = (uint *)(lVar2 + (ulong)*(uint *)(param_1 + 8) * 0x10); local_68 = local_58; local_38 = (uint)((long)local_58 - lVar2 >> 4); if (local_50 == (uint *)0x0) { if (*local_58 != 0xffffffff) { local_38 = *local_58; local_68 = (uint *)(lVar2 + (ulong)local_38 * 0x10); *(int8 *)(local_58 + 2) = *(int8 *)(local_68 + 2); *local_58 = *local_68; } } else { *local_50 = *local_58; } if (local_68 != puVar8) { uVar3 = rec_hashnr(param_1,*(int8 *)(puVar8 + 2)); uVar4 = hash_mask(uVar3,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8)); puVar9 = (uint *)(lVar2 + (ulong)uVar4 * 0x10); if (puVar9 == local_68) { *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); } else { uVar5 = rec_hashnr(param_1,*(int8 *)(puVar9 + 2)); uVar4 = hash_mask(uVar5,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8)); puVar10 = (uint *)(lVar2 + (ulong)uVar4 * 0x10); if (puVar9 == puVar10) { iVar6 = hash_mask(uVar3,uVar1,*(int *)(param_1 + 8) + 1); iVar7 = hash_mask(uVar5,uVar1,*(int *)(param_1 + 8) + 1); if (iVar6 == iVar7) { if (iVar6 != *(int *)(param_1 + 8)) { *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff, (long)puVar9 - lVar2 >> 4 & 0xffffffff,local_38); goto LAB_00146247; } local_34 = (int4)((long)puVar9 - lVar2 >> 4); } else { local_34 = 0xffffffff; } *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,local_34,local_38,*puVar9); *puVar9 = local_38; } else { *(int8 *)local_68 = *(int8 *)puVar9; *(int8 *)(local_68 + 2) = *(int8 *)(puVar9 + 2); *(int8 *)puVar9 = *(int8 *)puVar8; *(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff, (long)puVar10 - lVar2 >> 4 & 0xffffffff,local_38); } } } LAB_00146247: ma_pop_dynamic(param_1 + 0x18); if (*(long *)(param_1 + 0x38) != 0) { (**(code **)(param_1 + 0x38))(param_2); } return 0; }
51,754
wait_on_queue
eloqsql/mysys/mf_keycache.c
static void wait_on_queue(KEYCACHE_WQUEUE *wqueue, mysql_mutex_t *mutex) { struct st_my_thread_var *last; struct st_my_thread_var *thread= my_thread_var; DBUG_ASSERT(!thread->next); DBUG_ASSERT(!thread->prev); /* Not required, but must be true anyway. */ mysql_mutex_assert_owner(mutex); /* Add to queue. */ if (! (last= wqueue->last_thread)) thread->next= thread; else { thread->next= last->next; last->next= thread; } wqueue->last_thread= thread; /* Wait until thread is removed from queue by the signaling thread. The loop protects against stray signals. */ do { KEYCACHE_DBUG_PRINT("wait", ("suspend thread %ld", (ulong) thread->id)); keycache_pthread_cond_wait(&thread->suspend, mutex); } while (thread->next); }
O3
c
wait_on_queue: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 callq 0xa8dda movq %rax, %r14 movq %rax, %r12 movq (%r15), %rax testq %rax, %rax je 0x9c533 movq 0x88(%rax), %rcx addq $0x88, %rax movq %rcx, 0x88(%r12) jmp 0x9c53a leaq 0x88(%r14), %rax movq %r12, (%rax) movq %r12, (%r15) addq $0x8, %r14 leaq 0x4843c(%rip), %r15 # 0xe4987 cmpq $0x0, 0x38(%r12) jne 0x9c56b movq %r14, %rdi movq %rbx, %rsi callq 0x2a410 cmpq $0x0, 0x88(%r12) jne 0x9c54b jmp 0x9c580 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movl $0x477, %ecx # imm = 0x477 callq 0x30240 jmp 0x9c55e popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
wait_on_queue: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi mov r15, rdi call _my_thread_var mov r14, rax mov r12, rax mov rax, [r15] test rax, rax jz short loc_9C533 mov rcx, [rax+88h] add rax, 88h mov [r12+88h], rcx jmp short loc_9C53A loc_9C533: lea rax, [r14+88h] loc_9C53A: mov [rax], r12 mov [r15], r12 add r14, 8 lea r15, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"... loc_9C54B: cmp qword ptr [r12+38h], 0 jnz short loc_9C56B mov rdi, r14 mov rsi, rbx call _pthread_cond_wait loc_9C55E: cmp qword ptr [r12+88h], 0 jnz short loc_9C54B jmp short loc_9C580 loc_9C56B: mov rdi, r14 mov rsi, rbx mov rdx, r15 mov ecx, 477h call psi_cond_wait jmp short loc_9C55E loc_9C580: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long wait_on_queue(long long *a1, const char *a2) { long long v2; // r14 long long v3; // r12 long long v4; // rax long long v5; // rcx long long *v6; // rax long long v7; // r14 long long result; // rax v2 = my_thread_var(a1, a2); v3 = v2; v4 = *a1; if ( *a1 ) { v5 = *(_QWORD *)(v4 + 136); v6 = (long long *)(v4 + 136); *(_QWORD *)(v2 + 136) = v5; } else { v6 = (long long *)(v2 + 136); } *v6 = v2; *a1 = v2; v7 = v2 + 8; do { if ( *(_QWORD *)(v3 + 56) ) result = psi_cond_wait( v7, (long long)a2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x477u); else result = pthread_cond_wait(v7, a2); } while ( *(_QWORD *)(v3 + 136) ); return result; }
wait_on_queue: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R15,RDI CALL 0x001a8dda MOV R14,RAX MOV R12,RAX MOV RAX,qword ptr [R15] TEST RAX,RAX JZ 0x0019c533 MOV RCX,qword ptr [RAX + 0x88] ADD RAX,0x88 MOV qword ptr [R12 + 0x88],RCX JMP 0x0019c53a LAB_0019c533: LEA RAX,[R14 + 0x88] LAB_0019c53a: MOV qword ptr [RAX],R12 MOV qword ptr [R15],R12 ADD R14,0x8 LEA R15,[0x1e4987] LAB_0019c54b: CMP qword ptr [R12 + 0x38],0x0 JNZ 0x0019c56b MOV RDI,R14 MOV RSI,RBX CALL 0x0012a410 LAB_0019c55e: CMP qword ptr [R12 + 0x88],0x0 JNZ 0x0019c54b JMP 0x0019c580 LAB_0019c56b: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV ECX,0x477 CALL 0x00130240 JMP 0x0019c55e LAB_0019c580: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void wait_on_queue(long *param_1,pthread_mutex_t *param_2) { long lVar1; long lVar2; long lVar3; lVar3 = _my_thread_var(); lVar1 = *param_1; lVar2 = lVar3; if (lVar1 != 0) { *(int8 *)(lVar3 + 0x88) = *(int8 *)(lVar1 + 0x88); lVar2 = lVar1; } *(long *)(lVar2 + 0x88) = lVar3; *param_1 = lVar3; do { if (*(long *)(lVar3 + 0x38) == 0) { pthread_cond_wait((pthread_cond_t *)(lVar3 + 8),param_2); } else { psi_cond_wait((pthread_cond_t *)(lVar3 + 8),param_2, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x477); } } while (*(long *)(lVar3 + 0x88) != 0); return; }
51,755
minja::Value::to_int() const
monkey531[P]llama/common/./minja.hpp
int64_t to_int() const { if (is_null()) return 0; if (is_boolean()) return get<bool>() ? 1 : 0; if (is_number()) return static_cast<int64_t>(get<double>()); if (is_string()) { try { return std::stol(get<std::string>()); } catch (const std::exception &) { return 0; } } return 0; }
O2
cpp
minja::Value::to_int() const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx callq 0x3b982 testb %al, %al je 0x42dc9 xorl %ebx, %ebx jmp 0x42e21 movb 0x40(%rbx), %al cmpb $0x4, %al jne 0x42ddd movq %rbx, %rdi callq 0x3c526 movzbl %al, %ebx jmp 0x42e21 leal -0x5(%rax), %ecx cmpb $0x2, %cl ja 0x42df4 movq %rbx, %rdi callq 0x3c5dc cvttsd2si %xmm0, %rbx jmp 0x42e21 cmpb $0x3, %al jne 0x42dc5 leaq 0x8(%rsp), %rdi movq %rbx, %rsi callq 0x3c692 leaq 0x8(%rsp), %rdi pushq $0xa popq %rdx xorl %esi, %esi callq 0x42e61 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x22078 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rdx, %r14 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x22078 jmp 0x42e44 movq %rdx, %r14 movq %rax, %rbx movq %rbx, %rdi cmpl $0x1, %r14d jne 0x42e5c callq 0x21310 callq 0x21d50 jmp 0x42dc5 callq 0x21e50
_ZNK5minja5Value6to_intEv: push r14 push rbx sub rsp, 28h mov rbx, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jz short loc_42DC9 loc_42DC5: xor ebx, ebx jmp short loc_42E21 loc_42DC9: mov al, [rbx+40h] cmp al, 4 jnz short loc_42DDD mov rdi, rbx call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) movzx ebx, al jmp short loc_42E21 loc_42DDD: lea ecx, [rax-5] cmp cl, 2 ja short loc_42DF4 mov rdi, rbx call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) cvttsd2si rbx, xmm0 jmp short loc_42E21 loc_42DF4: cmp al, 3 jnz short loc_42DC5 lea rdi, [rsp+38h+var_30] mov rsi, rbx call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea rdi, [rsp+38h+var_30] push 0Ah pop rdx xor esi, esi call _ZNSt7__cxx114stolERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stol(std::string const&,ulong *,int) mov rbx, rax lea rdi, [rsp+38h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_42E21: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov r14, rdx mov rbx, rax lea rdi, [rsp+38h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_42E44 mov r14, rdx mov rbx, rax loc_42E44: mov rdi, rbx; void * cmp r14d, 1 jnz short loc_42E5C call ___cxa_begin_catch call ___cxa_end_catch jmp loc_42DC5 loc_42E5C: call __Unwind_Resume
long long minja::Value::to_int(minja::Value *this, double a2) { long long v2; // rbx char v3; // al _BYTE v5[48]; // [rsp+8h] [rbp-30h] BYREF if ( !minja::Value::is_null(this) ) { v3 = *((_BYTE *)this + 64); if ( v3 == 4 ) return (unsigned __int8)minja::Value::get<bool>(this); if ( (unsigned __int8)(v3 - 5) <= 2u ) { minja::Value::get<double>(this); return (unsigned int)(int)a2; } if ( v3 == 3 ) { minja::Value::get<std::string>((long long)v5, this); v2 = std::stol(v5, 0LL, 10LL); std::string::~string(v5); return v2; } } return 0LL; }
to_int: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI CALL 0x0013b982 TEST AL,AL JZ 0x00142dc9 LAB_00142dc5: XOR EBX,EBX JMP 0x00142e21 LAB_00142dc9: MOV AL,byte ptr [RBX + 0x40] CMP AL,0x4 JNZ 0x00142ddd MOV RDI,RBX CALL 0x0013c526 MOVZX EBX,AL JMP 0x00142e21 LAB_00142ddd: LEA ECX,[RAX + -0x5] CMP CL,0x2 JA 0x00142df4 MOV RDI,RBX CALL 0x0013c5dc CVTTSD2SI RBX,XMM0 JMP 0x00142e21 LAB_00142df4: CMP AL,0x3 JNZ 0x00142dc5 LAB_00142df8: LEA RDI,[RSP + 0x8] MOV RSI,RBX CALL 0x0013c692 LAB_00142e05: LEA RDI,[RSP + 0x8] PUSH 0xa POP RDX XOR ESI,ESI CALL 0x00142e61 LAB_00142e14: MOV RBX,RAX LEA RDI,[RSP + 0x8] CALL 0x00122078 LAB_00142e21: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* minja::Value::to_int() const */ ulong __thiscall minja::Value::to_int(Value *this) { Value VVar1; char cVar2; bool bVar3; ulong uVar4; double dVar5; string local_30 [32]; cVar2 = is_null(this); if (cVar2 == '\0') { VVar1 = this[0x40]; if (VVar1 == (Value)0x4) { bVar3 = get<bool>(this); return (ulong)bVar3; } if ((byte)((char)VVar1 - 5U) < 3) { dVar5 = get<double>(this); return (long)dVar5; } if (VVar1 == (Value)0x3) { /* try { // try from 00142df8 to 00142e04 has its CatchHandler @ 00142e3e */ get<std::__cxx11::string>(); /* try { // try from 00142e05 to 00142e13 has its CatchHandler @ 00142e2c */ uVar4 = std::__cxx11::stol(local_30,(ulong *)0x0,10); std::__cxx11::string::~string(local_30); return uVar4; } } return 0; }
51,756
my_snprintf_8bit
eloqsql/strings/ctype-simple.c
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n __attribute__((unused)), const char* fmt, ...) { va_list args; size_t result; va_start(args,fmt); result= my_vsnprintf(to, n, fmt, args); va_end(args); return result; }
O3
c
my_snprintf_8bit: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rsi, %rdi leaq -0xd0(%rbp), %rsi movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x79841 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %rax movq %rsi, 0x10(%rax) leaq 0x10(%rbp), %rsi movq %rsi, 0x8(%rax) movabsq $0x3000000020, %rsi # imm = 0x3000000020 movq %rsi, (%rax) movq %rdx, %rsi movq %rcx, %rdx movq %rax, %rcx callq 0x9b4f5 addq $0xd0, %rsp popq %rbp retq
my_snprintf_8bit: push rbp mov rbp, rsp sub rsp, 0D0h mov rdi, rsi lea rsi, [rbp+var_D0] mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_79841 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_79841: lea rax, [rbp+var_20] mov [rax+10h], rsi lea rsi, [rbp+arg_0] mov [rax+8], rsi mov rsi, 3000000020h mov [rax], rsi mov rsi, rdx mov rdx, rcx mov rcx, rax call my_vsnprintf add rsp, 0D0h pop rbp retn
long long my_snprintf_8bit( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+20h] [rbp-B0h] long long v18; // [rsp+28h] [rbp-A8h] __m128 v19; // [rsp+30h] [rbp-A0h] __m128 v20; // [rsp+40h] [rbp-90h] __m128 v21; // [rsp+50h] [rbp-80h] __m128 v22; // [rsp+60h] [rbp-70h] __m128 v23; // [rsp+70h] [rbp-60h] __m128 v24; // [rsp+80h] [rbp-50h] __m128 v25; // [rsp+90h] [rbp-40h] __m128 v26; // [rsp+A0h] [rbp-30h] _QWORD v27[4]; // [rsp+B0h] [rbp-20h] BYREF v19 = a1; v20 = a2; v21 = a3; v22 = a4; v23 = a5; v24 = a6; v25 = a7; v26 = a8; v17 = a13; v18 = a14; v27[2] = &v16; v27[1] = &a15; v27[0] = 0x3000000020LL; return my_vsnprintf(a10, a11, a12, v27); }
my_snprintf_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RDI,RSI LEA RSI,[RBP + -0xd0] MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x00179841 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_00179841: LEA RAX,[RBP + -0x20] MOV qword ptr [RAX + 0x10],RSI LEA RSI,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RSI MOV RSI,0x3000000020 MOV qword ptr [RAX],RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,RAX CALL 0x0019b4f5 ADD RSP,0xd0 POP RBP RET
void my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [32]; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000020; local_b8 = param_13; local_b0 = param_14; my_vsnprintf(param_10,param_11,param_12,&local_28); return; }
51,757
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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
basic_json(const basic_json& other) : json_base_class_t(other) { m_data.m_type = other.m_data.m_type; // check of passed value is valid other.assert_invariant(); switch (m_data.m_type) { case value_t::object: { m_data.m_value = *other.m_data.m_value.object; break; } case value_t::array: { m_data.m_value = *other.m_data.m_value.array; break; } case value_t::string: { m_data.m_value = *other.m_data.m_value.string; break; } case value_t::boolean: { m_data.m_value = other.m_data.m_value.boolean; break; } case value_t::number_integer: { m_data.m_value = other.m_data.m_value.number_integer; break; } case value_t::number_unsigned: { m_data.m_value = other.m_data.m_value.number_unsigned; break; } case value_t::number_float: { m_data.m_value = other.m_data.m_value.number_float; break; } case value_t::binary: { m_data.m_value = *other.m_data.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movb (%rsi), %al movb %al, (%rdi) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3dcd2 movzbl (%rbx), %eax decl %eax cmpl $0x7, %eax ja 0x2d9bc leaq 0x5fc48(%rip), %rcx # 0x8d5c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%r14), %rax jmp 0x2d9b8 movq 0x8(%r14), %rdi callq 0x47df6 jmp 0x2d9b8 movq 0x8(%r14), %rdi callq 0x6e6ee jmp 0x2d9b8 movzbl 0x8(%r14), %eax jmp 0x2d9b8 movq 0x8(%r14), %rdi callq 0x6e40c jmp 0x2d9b8 movq 0x8(%r14), %rdi callq 0x6e580 movq %rax, 0x8(%rbx) pushq $0x1 popq %rsi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3dcd2 jmp 0x2d9d4 jmp 0x2d9d4 jmp 0x2d9d4 movq %rax, %r14 movq %rbx, %rdi callq 0x47da4 movq %r14, %rdi callq 0x20bf0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov al, [rsi] mov [rdi], al push 1 pop rsi mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) movzx eax, byte ptr [rbx] dec eax; switch 8 cases cmp eax, 7 ja short def_2D97F; jumptable 000000000002D97F default case lea rcx, jpt_2D97F movsxd rax, ds:(jpt_2D97F - 8D5C0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2D981: mov rax, [r14+8]; jumptable 000000000002D97F cases 5-7 jmp short loc_2D9B8 loc_2D987: mov rdi, [r14+8]; jumptable 000000000002D97F case 3 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,std::string const&>(std::string const&) jmp short loc_2D9B8 loc_2D992: mov rdi, [r14+8]; jumptable 000000000002D97F case 8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_2D9B8 loc_2D99D: movzx eax, byte ptr [r14+8]; jumptable 000000000002D97F case 4 jmp short loc_2D9B8 loc_2D9A4: mov rdi, [r14+8]; jumptable 000000000002D97F case 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&>(nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) jmp short loc_2D9B8 loc_2D9AF: mov rdi, [r14+8]; jumptable 000000000002D97F case 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&>(std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_2D9B8: mov [rbx+8], rax def_2D97F: push 1; jumptable 000000000002D97F default case pop rsi mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_2D9D4 jmp short loc_2D9D4 jmp short $+2 loc_2D9D4: mov r14, rax mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( long long a1, long long a2) { int v2; // eax int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d long long v7; // rax int v9; // [rsp-8h] [rbp-18h] v9 = v2; *(_OWORD *)a1 = 0LL; *(_BYTE *)a1 = *(_BYTE *)a2; 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( a2, 1LL); switch ( *(_BYTE *)a1 ) { case 1: v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>> const&>( *(_QWORD *)(a2 + 8), 1, v3, v4, v5, v6, v9); goto LABEL_8; case 2: v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&>( *(_QWORD *)(a2 + 8), 1, v3, v4, v5, v6, v9); goto LABEL_8; case 3: v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::string,std::string const&>( *(_QWORD *)(a2 + 8), 1, v3, v4, v5, v6, v9); goto LABEL_8; case 4: v7 = *(unsigned __int8 *)(a2 + 8); goto LABEL_8; case 5: case 6: case 7: v7 = *(_QWORD *)(a2 + 8); goto LABEL_8; case 8: v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>> const&>( *(_QWORD *)(a2 + 8), 1, v3, v4, v5, v6, v9); LABEL_8: *(_QWORD *)(a1 + 8) = v7; break; default: return 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( a1, 1LL); } return 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( a1, 1LL); }
basic_json: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV AL,byte ptr [RSI] MOV byte ptr [RDI],AL PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013dcd2 MOVZX EAX,byte ptr [RBX] DEC EAX CMP EAX,0x7 JA 0x0012d9bc LEA RCX,[0x18d5c0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [R14 + 0x8] JMP 0x0012d9b8 caseD_3: MOV RDI,qword ptr [R14 + 0x8] LAB_0012d98b: CALL 0x00147df6 JMP 0x0012d9b8 caseD_8: MOV RDI,qword ptr [R14 + 0x8] LAB_0012d996: CALL 0x0016e6ee JMP 0x0012d9b8 caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x0012d9b8 caseD_1: MOV RDI,qword ptr [R14 + 0x8] LAB_0012d9a8: CALL 0x0016e40c JMP 0x0012d9b8 caseD_2: MOV RDI,qword ptr [R14 + 0x8] LAB_0012d9b3: CALL 0x0016e580 LAB_0012d9b8: MOV qword ptr [RBX + 0x8],RAX default: PUSH 0x1 POP RSI MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0013dcd2
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { string *psVar1; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )*param_1; assert_invariant(SUB81(param_1,0)); switch(*this) { case (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: /* try { // try from 0012d9a8 to 0012d9ac has its CatchHandler @ 0012d9d0 */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>const&> (*(ordered_map **)(param_1 + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: /* try { // try from 0012d9b3 to 0012d9b7 has its CatchHandler @ 0012d9ce */ psVar1 = (string *) create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>const&> (*(vector **)(param_1 + 8)); break; case (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> )0x3: /* try { // try from 0012d98b to 0012d98f has its CatchHandler @ 0012d9d4 */ psVar1 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8)); break; case (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> )0x4: psVar1 = (string *)(ulong)(byte)param_1[8]; break; case (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> )0x5: case (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> )0x6: case (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> )0x7: psVar1 = *(string **)(param_1 + 8); break; case (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> )0x8: /* try { // try from 0012d996 to 0012d99a has its CatchHandler @ 0012d9d2 */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&> (*(byte_container_with_subtype **)(param_1 + 8)); break; default: goto switchD_0012d97f_default; } *(string **)(this + 8) = psVar1; switchD_0012d97f_default: assert_invariant(SUB81(this,0)); return; }
51,758
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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
basic_json(const basic_json& other) : json_base_class_t(other) { m_data.m_type = other.m_data.m_type; // check of passed value is valid other.assert_invariant(); switch (m_data.m_type) { case value_t::object: { m_data.m_value = *other.m_data.m_value.object; break; } case value_t::array: { m_data.m_value = *other.m_data.m_value.array; break; } case value_t::string: { m_data.m_value = *other.m_data.m_value.string; break; } case value_t::boolean: { m_data.m_value = other.m_data.m_value.boolean; break; } case value_t::number_integer: { m_data.m_value = other.m_data.m_value.number_integer; break; } case value_t::number_unsigned: { m_data.m_value = other.m_data.m_value.number_unsigned; break; } case value_t::number_float: { m_data.m_value = other.m_data.m_value.number_float; break; } case value_t::binary: { m_data.m_value = *other.m_data.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movb (%rsi), %al movb %al, (%rdi) movq %rsi, %rdi movl $0x1, %esi callq 0x3ecbc movzbl (%rbx), %eax decl %eax cmpl $0x7, %eax ja 0x2c0f6 leaq 0x7c53e(%rip), %rcx # 0xa85f0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%r14), %rax jmp 0x2c0f2 movq 0x8(%r14), %rdi callq 0x4b8fe jmp 0x2c0f2 movq 0x8(%r14), %rdi callq 0x7d562 jmp 0x2c0f2 movzbl 0x8(%r14), %eax jmp 0x2c0f2 movq 0x8(%r14), %rdi callq 0x7d2cc jmp 0x2c0f2 movq 0x8(%r14), %rdi callq 0x7d420 movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3ecbc jmp 0x2c110 jmp 0x2c110 jmp 0x2c110 movq %rax, %r14 movq %rbx, %rdi callq 0x4b8aa movq %r14, %rdi callq 0x18bc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov al, [rsi] mov [rdi], al mov rdi, rsi 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) movzx eax, byte ptr [rbx] dec eax; switch 8 cases cmp eax, 7 ja short def_2C0B9; jumptable 000000000002C0B9 default case lea rcx, jpt_2C0B9 movsxd rax, ds:(jpt_2C0B9 - 0A85F0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2C0BB: mov rax, [r14+8]; jumptable 000000000002C0B9 cases 5-7 jmp short loc_2C0F2 loc_2C0C1: mov rdi, [r14+8]; jumptable 000000000002C0B9 case 3 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,std::string const&>(std::string const&) jmp short loc_2C0F2 loc_2C0CC: mov rdi, [r14+8]; jumptable 000000000002C0B9 case 8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_2C0F2 loc_2C0D7: movzx eax, byte ptr [r14+8]; jumptable 000000000002C0B9 case 4 jmp short loc_2C0F2 loc_2C0DE: mov rdi, [r14+8]; jumptable 000000000002C0B9 case 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&>(nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) jmp short loc_2C0F2 loc_2C0E9: mov rdi, [r14+8]; jumptable 000000000002C0B9 case 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&>(std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_2C0F2: mov [rbx+8], rax def_2C0B9: mov rdi, rbx; jumptable 000000000002C0B9 default case mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_2C110 jmp short loc_2C110 jmp short $+2 loc_2C110: mov r14, rax mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( long long a1, long long a2) { long long v2; // rax *(_OWORD *)a1 = 0LL; *(_BYTE *)a1 = *(_BYTE *)a2; 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( a2, 1LL); switch ( *(_BYTE *)a1 ) { case 1: v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>> const&>(*(_QWORD *)(a2 + 8)); goto LABEL_8; case 2: v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&>(*(_QWORD *)(a2 + 8)); goto LABEL_8; case 3: v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::string,std::string const&>(*(_QWORD *)(a2 + 8)); goto LABEL_8; case 4: v2 = *(unsigned __int8 *)(a2 + 8); goto LABEL_8; case 5: case 6: case 7: v2 = *(_QWORD *)(a2 + 8); goto LABEL_8; case 8: v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>> const&>(*(_QWORD *)(a2 + 8)); LABEL_8: *(_QWORD *)(a1 + 8) = v2; break; default: return 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( a1, 1LL); } return 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( a1, 1LL); }
basic_json: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV AL,byte ptr [RSI] MOV byte ptr [RDI],AL MOV RDI,RSI MOV ESI,0x1 CALL 0x0013ecbc MOVZX EAX,byte ptr [RBX] DEC EAX CMP EAX,0x7 JA 0x0012c0f6 LEA RCX,[0x1a85f0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [R14 + 0x8] JMP 0x0012c0f2 caseD_3: MOV RDI,qword ptr [R14 + 0x8] LAB_0012c0c5: CALL 0x0014b8fe JMP 0x0012c0f2 caseD_8: MOV RDI,qword ptr [R14 + 0x8] LAB_0012c0d0: CALL 0x0017d562 JMP 0x0012c0f2 caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x0012c0f2 caseD_1: MOV RDI,qword ptr [R14 + 0x8] LAB_0012c0e2: CALL 0x0017d2cc JMP 0x0012c0f2 caseD_2: MOV RDI,qword ptr [R14 + 0x8] LAB_0012c0ed: CALL 0x0017d420 LAB_0012c0f2: MOV qword ptr [RBX + 0x8],RAX default: MOV RDI,RBX MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x0013ecbc
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { string *psVar1; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )*param_1; assert_invariant(SUB81(param_1,0)); switch(*this) { case (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: /* try { // try from 0012c0e2 to 0012c0e6 has its CatchHandler @ 0012c10c */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>const&> (*(ordered_map **)(param_1 + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: /* try { // try from 0012c0ed to 0012c0f1 has its CatchHandler @ 0012c10a */ psVar1 = (string *) create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>const&> (*(vector **)(param_1 + 8)); break; case (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> )0x3: /* try { // try from 0012c0c5 to 0012c0c9 has its CatchHandler @ 0012c110 */ psVar1 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8)); break; case (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> )0x4: psVar1 = (string *)(ulong)(byte)param_1[8]; break; case (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> )0x5: case (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> )0x6: case (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> )0x7: psVar1 = *(string **)(param_1 + 8); break; case (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> )0x8: /* try { // try from 0012c0d0 to 0012c0d4 has its CatchHandler @ 0012c10e */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&> (*(byte_container_with_subtype **)(param_1 + 8)); break; default: goto switchD_0012c0b9_default; } *(string **)(this + 8) = psVar1; switchD_0012c0b9_default: assert_invariant(SUB81(this,0)); return; }
51,759
options_add_initcommand
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void options_add_initcommand(struct st_mysql_options *options, const char *init_cmd) { char *insert= strdup(init_cmd); if (!options->init_command) { options->init_command= (DYNAMIC_ARRAY*)malloc(sizeof(DYNAMIC_ARRAY)); ma_init_dynamic_array(options->init_command, sizeof(char*), 5, 5); } if (ma_insert_dynamic(options->init_command, (gptr)&insert)) free(insert); }
O0
c
options_add_initcommand: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x137a0 movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x48(%rax) jne 0x21636 movl $0x18, %edi callq 0x135b0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x8(%rbp), %rax movq 0x48(%rax), %rdi movl $0x8, %esi movl $0x5, %ecx movl %ecx, %edx callq 0x43650 movq -0x8(%rbp), %rax movq 0x48(%rax), %rdi leaq -0x18(%rbp), %rsi callq 0x43730 cmpb $0x0, %al je 0x21654 movq -0x18(%rbp), %rdi callq 0x13520 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
options_add_initcommand: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] call _strdup mov [rbp+var_18], rax mov rax, [rbp+var_8] cmp qword ptr [rax+48h], 0 jnz short loc_21636 mov edi, 18h call _malloc mov rcx, rax mov rax, [rbp+var_8] mov [rax+48h], rcx mov rax, [rbp+var_8] mov rdi, [rax+48h] mov esi, 8 mov ecx, 5 mov edx, ecx call ma_init_dynamic_array loc_21636: mov rax, [rbp+var_8] mov rdi, [rax+48h] lea rsi, [rbp+var_18] call ma_insert_dynamic cmp al, 0 jz short loc_21654 mov rdi, [rbp+var_18] call _free loc_21654: add rsp, 20h pop rbp retn
long long options_add_initcommand(long long a1, long long a2) { long long result; // rax _QWORD v3[2]; // [rsp+8h] [rbp-18h] BYREF long long v4; // [rsp+18h] [rbp-8h] v4 = a1; v3[1] = a2; v3[0] = strdup(a2); if ( !*(_QWORD *)(a1 + 72) ) { *(_QWORD *)(v4 + 72) = malloc(24LL); ma_init_dynamic_array(*(_QWORD *)(v4 + 72), 8LL, 5LL); } result = ma_insert_dynamic(*(_QWORD *)(v4 + 72), v3); if ( (_BYTE)result ) return free(v3[0]); return result; }
options_add_initcommand: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x001137a0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x00121636 MOV EDI,0x18 CALL 0x001135b0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x48] MOV ESI,0x8 MOV ECX,0x5 MOV EDX,ECX CALL 0x00143650 LAB_00121636: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x48] LEA RSI,[RBP + -0x18] CALL 0x00143730 CMP AL,0x0 JZ 0x00121654 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113520 LAB_00121654: ADD RSP,0x20 POP RBP RET
void options_add_initcommand(long param_1,char *param_2) { char cVar1; void *pvVar2; char *local_20; char *local_18; long local_10; local_18 = param_2; local_10 = param_1; local_20 = strdup(param_2); if (*(long *)(local_10 + 0x48) == 0) { pvVar2 = malloc(0x18); *(void **)(local_10 + 0x48) = pvVar2; ma_init_dynamic_array(*(int8 *)(local_10 + 0x48),8,5); } cVar1 = ma_insert_dynamic(*(int8 *)(local_10 + 0x48),&local_20); if (cVar1 != '\0') { free(local_20); } return; }
51,760
my_sync_dir
eloqsql/mysys/my_sync.c
int my_sync_dir(const char *dir_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR static const char cur_dir_name[]= {FN_CURLIB, 0}; File dir_fd; int res= 0; const char *correct_dir_name; DBUG_ENTER("my_sync_dir"); DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags)); /* Sometimes the path does not contain an explicit directory */ correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; /* Syncing a dir may give EINVAL on tmpfs on Linux, which is ok. EIO on the other hand is very important. Hence MY_IGNORE_BADFD. */ if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0) { if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD))) res= 2; if (my_close(dir_fd, MYF(my_flags))) res= 3; } else res= 1; DBUG_RETURN(res); #else return 0; #endif }
O0
c
my_sync_dir: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x18(%rbp) jmp 0xfd939 movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0xfd952 leaq 0x63ce4(%rip), %rax # 0x161630 movq %rax, -0x28(%rbp) jmp 0xfd95a movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0xfbd00 movl %eax, -0x14(%rbp) cmpl $0x0, %eax jl 0xfd9af movl -0x14(%rbp), %edi movq -0x10(%rbp), %rsi orq $0x20, %rsi callq 0xfd790 cmpl $0x0, %eax je 0xfd995 movl $0x2, -0x18(%rbp) movl -0x14(%rbp), %edi movq -0x10(%rbp), %rsi callq 0xfbf90 cmpl $0x0, %eax je 0xfd9ad movl $0x3, -0x18(%rbp) jmp 0xfd9b6 movl $0x1, -0x18(%rbp) jmp 0xfd9b8 movl -0x18(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
my_sync_dir: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], 0 jmp short $+2 loc_FD939: mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_FD952 lea rax, my_sync_dir_cur_dir_name mov [rbp+var_28], rax jmp short loc_FD95A loc_FD952: mov rax, [rbp+var_8] mov [rbp+var_28], rax loc_FD95A: mov rax, [rbp+var_28] mov [rbp+var_20], rax mov rdi, [rbp+var_20] mov rdx, [rbp+var_10] xor esi, esi call my_open mov [rbp+var_14], eax cmp eax, 0 jl short loc_FD9AF mov edi, [rbp+var_14] mov rsi, [rbp+var_10] or rsi, 20h call my_sync cmp eax, 0 jz short loc_FD995 mov [rbp+var_18], 2 loc_FD995: mov edi, [rbp+var_14] mov rsi, [rbp+var_10] call my_close cmp eax, 0 jz short loc_FD9AD mov [rbp+var_18], 3 loc_FD9AD: jmp short loc_FD9B6 loc_FD9AF: mov [rbp+var_18], 1 loc_FD9B6: jmp short $+2 loc_FD9B8: mov eax, [rbp+var_18] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] add rsp, 30h pop rbp retn
long long my_sync_dir(_BYTE *a1, long long a2) { void *v3; // [rsp+8h] [rbp-28h] unsigned int v4; // [rsp+18h] [rbp-18h] signed int v5; // [rsp+1Ch] [rbp-14h] v4 = 0; if ( *a1 ) v3 = a1; else v3 = &my_sync_dir_cur_dir_name; v5 = my_open((long long)v3, 0, a2); if ( v5 < 0 ) { return 1; } else { if ( (unsigned int)my_sync(v5, (const char *)(a2 | 0x20)) ) v4 = 2; if ( (unsigned int)my_close(v5, (const char *)a2) ) return 3; } return v4; }
my_sync_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x18],0x0 JMP 0x001fd939 LAB_001fd939: MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x001fd952 LEA RAX,[0x261630] MOV qword ptr [RBP + -0x28],RAX JMP 0x001fd95a LAB_001fd952: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX LAB_001fd95a: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x001fbd00 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JL 0x001fd9af MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x10] OR RSI,0x20 CALL 0x001fd790 CMP EAX,0x0 JZ 0x001fd995 MOV dword ptr [RBP + -0x18],0x2 LAB_001fd995: MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001fbf90 CMP EAX,0x0 JZ 0x001fd9ad MOV dword ptr [RBP + -0x18],0x3 LAB_001fd9ad: JMP 0x001fd9b6 LAB_001fd9af: MOV dword ptr [RBP + -0x18],0x1 LAB_001fd9b6: JMP 0x001fd9b8 LAB_001fd9b8: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] ADD RSP,0x30 POP RBP RET
int4 my_sync_dir(char *param_1,ulong param_2) { int iVar1; int iVar2; char *local_30; int4 local_20; local_20 = 0; local_30 = param_1; if (*param_1 == '\0') { local_30 = "."; } iVar1 = my_open(local_30,0,param_2); if (iVar1 < 0) { local_20 = 1; } else { iVar2 = my_sync(iVar1,param_2 | 0x20); if (iVar2 != 0) { local_20 = 2; } iVar1 = my_close(iVar1,param_2); if (iVar1 != 0) { local_20 = 3; } } return local_20; }
51,761
settings::add_slider(int, ConfigFloat&, settings_location, char const*, bool, char const*)
untodesu[P]voxelius/game/client/settings.cc
void settings::add_slider(int priority, ConfigFloat &value, settings_location location, const char *name, bool tooltip, const char *format) { auto setting_value = new SettingValue_SliderFloat; setting_value->type = setting_type::SLIDER_FLOAT; setting_value->priority = priority; setting_value->has_tooltip = tooltip; setting_value->value = &value; setting_value->name = name; setting_value->format = format; setting_value->wid = fmt::format("###{}", static_cast<const void *>(setting_value->value)); values[static_cast<unsigned int>(location)].push_back(setting_value); values_all.push_back(setting_value); }
O3
cpp
settings::add_slider(int, ConfigFloat&, settings_location, char const*, bool, char const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, %r14 movl %r8d, 0x8(%rsp) movq %rcx, %r12 movl %edx, 0xc(%rsp) movq %rsi, 0x10(%rsp) movl %edi, %r15d movl $0xc0, %edi callq 0x268c0 movq %rax, %rbx addq $0x20, %rax movq %rax, 0x10(%rbx) xorl %eax, %eax movq %rax, 0x18(%rbx) movb %al, 0x20(%rbx) leaq 0x40(%rbx), %rcx movq %rcx, 0x30(%rbx) movq %rax, 0x38(%rbx) movb %al, 0x40(%rbx) leaq 0x50(%rbx), %r13 leaq 0x60(%rbx), %rcx movq %rcx, 0x50(%rbx) movq %rax, 0x58(%rbx) movb %al, 0x60(%rbx) leaq 0x78(%rbx), %rcx movq %rcx, 0x18(%rsp) leaq 0x88(%rbx), %rcx movq %rcx, 0x78(%rbx) movq %rax, 0x80(%rbx) movb %al, 0x88(%rbx) leaq 0x1e6558(%rip), %rcx # 0x251488 movq %rcx, (%rbx) leaq 0x98(%rbx), %rbp leaq 0xa8(%rbx), %rcx movq %rcx, 0x98(%rbx) movq %rax, 0xa0(%rbx) movb %al, 0xa8(%rbx) movl $0x6, 0x8(%rbx) movl %r15d, 0x74(%rbx) movl 0x8(%rsp), %eax movb %al, 0x70(%rbx) movq 0x10(%rsp), %rax movq %rax, 0xb8(%rbx) movq %r12, %rdi callq 0x26330 movq %r13, %rdi xorl %esi, %esi xorl %edx, %edx movq %r12, %rcx movq %rax, %r8 callq 0x26dc0 movq 0xa0(%rbx), %r15 movq %r14, %rdi callq 0x26330 movq %rbp, %rdi xorl %esi, %esi movq %r15, %rdx movq %r14, %rcx movq %rax, %r8 callq 0x26dc0 movq 0xb8(%rbx), %rax leaq 0x40(%rsp), %r8 movq %rax, (%r8) leaq 0x13036e(%rip), %rsi # 0x19b333 leaq 0x20(%rsp), %r14 movl $0x5, %edx movl $0xe, %ecx movq %r14, %rdi callq 0x1441d9 movq 0x18(%rsp), %rdi movq %r14, %rsi callq 0x26ad0 movq (%r14), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x6b003 movq 0x30(%rsp), %rsi incq %rsi callq 0x268e0 movl 0xc(%rsp), %eax leaq (%rax,%rax,2), %rax leaq 0x1f07fe(%rip), %rcx # 0x25b810 leaq (%rcx,%rax,8), %rdi leaq 0x20(%rsp), %r14 movq %rbx, (%r14) movq %r14, %rsi callq 0x6c8a4 movq %rbx, (%r14) leaq 0x1f07c8(%rip), %rdi # 0x25b7f8 leaq 0x20(%rsp), %rsi callq 0x6c8a4 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8settings10add_sliderEiR11ConfigFloat17settings_locationPKcbS4_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, r9 mov [rsp+88h+var_80], r8d mov r12, rcx mov [rsp+88h+var_7C], edx mov [rsp+88h+var_78], rsi mov r15d, edi mov edi, 0C0h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax add rax, 20h ; ' ' mov [rbx+10h], rax xor eax, eax mov [rbx+18h], rax mov [rbx+20h], al lea rcx, [rbx+40h] mov [rbx+30h], rcx mov [rbx+38h], rax mov [rbx+40h], al lea r13, [rbx+50h] lea rcx, [rbx+60h] mov [rbx+50h], rcx mov [rbx+58h], rax mov [rbx+60h], al lea rcx, [rbx+78h] mov [rsp+88h+var_70], rcx lea rcx, [rbx+88h] mov [rbx+78h], rcx mov [rbx+80h], rax mov [rbx+88h], al lea rcx, off_251488 mov [rbx], rcx lea rbp, [rbx+98h] lea rcx, [rbx+0A8h] mov [rbx+98h], rcx mov [rbx+0A0h], rax mov [rbx+0A8h], al mov dword ptr [rbx+8], 6 mov [rbx+74h], r15d mov eax, [rsp+88h+var_80] mov [rbx+70h], al mov rax, [rsp+88h+var_78] mov [rbx+0B8h], rax mov rdi, r12 call _strlen mov rdi, r13 xor esi, esi xor edx, edx mov rcx, r12 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov r15, [rbx+0A0h] mov rdi, r14 call _strlen mov rdi, rbp xor esi, esi mov rdx, r15 mov rcx, r14 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rax, [rbx+0B8h] lea r8, [rsp+88h+var_48] mov [r8], rax lea rsi, asc_19B330+3; "###{}" lea r14, [rsp+88h+var_68] mov edx, 5 mov ecx, 0Eh mov rdi, r14 call _ZN3fmt3v117vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEE; fmt::v11::vformat(fmt::v11::basic_string_view<char>,fmt::v11::basic_format_args<fmt::v11::context>) mov rdi, [rsp+88h+var_70] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+88h+var_58] cmp rdi, rax jz short loc_6B003 mov rsi, [rsp+88h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6B003: mov eax, [rsp+88h+var_7C] lea rax, [rax+rax*2] lea rcx, _ZL6values; values lea rdi, [rcx+rax*8] lea r14, [rsp+88h+var_68] mov [r14], rbx mov rsi, r14 call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&) mov [r14], rbx lea rdi, _ZL10values_all; values_all lea rsi, [rsp+88h+var_68] call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&) add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long settings::add_slider( int a1, long long a2, unsigned int a3, long long a4, char a5, const char *a6, double a7) { _QWORD *v9; // rbx long long v10; // rax long long v11; // r9 long long v12; // r15 long long v13; // rax long long v14; // r9 int v15; // r9d void *v19[2]; // [rsp+20h] [rbp-68h] BYREF long long v20; // [rsp+30h] [rbp-58h] BYREF long long v21; // [rsp+40h] [rbp-48h] BYREF v9 = (_QWORD *)operator new(0xC0uLL); v9[2] = v9 + 4; v9[3] = 0LL; *((_BYTE *)v9 + 32) = 0; v9[6] = v9 + 8; v9[7] = 0LL; *((_BYTE *)v9 + 64) = 0; v9[10] = v9 + 12; v9[11] = 0LL; *((_BYTE *)v9 + 96) = 0; v9[15] = v9 + 17; v9[16] = 0LL; *((_BYTE *)v9 + 136) = 0; *v9 = off_251488; v9[19] = v9 + 21; v9[20] = 0LL; *((_BYTE *)v9 + 168) = 0; *((_DWORD *)v9 + 2) = 6; *((_DWORD *)v9 + 29) = a1; *((_BYTE *)v9 + 112) = a5; v9[23] = a2; v10 = strlen(a4); std::string::_M_replace(v9 + 10, 0LL, 0LL, a4, v10, v11); v12 = v9[20]; v13 = strlen(a6); std::string::_M_replace(v9 + 19, 0LL, v12, a6, v13, v14); v21 = v9[23]; fmt::v11::vformat[abi:cxx11]((unsigned int)v19, (unsigned int)"###{}", 5, 14, (unsigned int)&v21, v15); std::string::operator=(v9 + 15, v19, a7); if ( v19[0] != &v20 ) operator delete(v19[0], v20 + 1); v19[0] = v9; std::vector<SettingValue *>::emplace_back<SettingValue *>(&values[3 * a3], v19); v19[0] = v9; return std::vector<SettingValue *>::emplace_back<SettingValue *>(&values_all, v19); }
add_slider: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,R9 MOV dword ptr [RSP + 0x8],R8D MOV R12,RCX MOV dword ptr [RSP + 0xc],EDX MOV qword ptr [RSP + 0x10],RSI MOV R15D,EDI MOV EDI,0xc0 CALL 0x001268c0 MOV RBX,RAX ADD RAX,0x20 MOV qword ptr [RBX + 0x10],RAX XOR EAX,EAX MOV qword ptr [RBX + 0x18],RAX MOV byte ptr [RBX + 0x20],AL LEA RCX,[RBX + 0x40] MOV qword ptr [RBX + 0x30],RCX MOV qword ptr [RBX + 0x38],RAX MOV byte ptr [RBX + 0x40],AL LEA R13,[RBX + 0x50] LEA RCX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RCX MOV qword ptr [RBX + 0x58],RAX MOV byte ptr [RBX + 0x60],AL LEA RCX,[RBX + 0x78] MOV qword ptr [RSP + 0x18],RCX LEA RCX,[RBX + 0x88] MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x80],RAX MOV byte ptr [RBX + 0x88],AL LEA RCX,[0x351488] MOV qword ptr [RBX],RCX LEA RBP,[RBX + 0x98] LEA RCX,[RBX + 0xa8] MOV qword ptr [RBX + 0x98],RCX MOV qword ptr [RBX + 0xa0],RAX MOV byte ptr [RBX + 0xa8],AL MOV dword ptr [RBX + 0x8],0x6 MOV dword ptr [RBX + 0x74],R15D MOV EAX,dword ptr [RSP + 0x8] MOV byte ptr [RBX + 0x70],AL MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0xb8],RAX MOV RDI,R12 CALL 0x00126330 MOV RDI,R13 XOR ESI,ESI XOR EDX,EDX MOV RCX,R12 MOV R8,RAX CALL 0x00126dc0 MOV R15,qword ptr [RBX + 0xa0] MOV RDI,R14 CALL 0x00126330 MOV RDI,RBP XOR ESI,ESI MOV RDX,R15 MOV RCX,R14 MOV R8,RAX CALL 0x00126dc0 MOV RAX,qword ptr [RBX + 0xb8] LEA R8,[RSP + 0x40] MOV qword ptr [R8],RAX LEA RSI,[0x29b333] LEA R14,[RSP + 0x20] MOV EDX,0x5 MOV ECX,0xe MOV RDI,R14 CALL 0x002441d9 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,R14 CALL 0x00126ad0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0016b003 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001268e0 LAB_0016b003: MOV EAX,dword ptr [RSP + 0xc] LEA RAX,[RAX + RAX*0x2] LEA RCX,[0x35b810] LEA RDI,[RCX + RAX*0x8] LEA R14,[RSP + 0x20] MOV qword ptr [R14],RBX MOV RSI,R14 CALL 0x0016c8a4 MOV qword ptr [R14],RBX LEA RDI,[0x35b7f8] LEA RSI,[RSP + 0x20] CALL 0x0016c8a4 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* settings::add_slider(int, ConfigFloat&, settings_location, char const*, bool, char const*) */ void settings::add_slider (int4 param_1,int8 param_2,uint param_3,char *param_4, SettingValue param_5,char *param_6) { char *pcVar1; SettingValue *pSVar2; SettingValue *local_68 [2]; long local_58 [2]; int8 local_48; pSVar2 = (SettingValue *)operator_new(0xc0); *(SettingValue **)(pSVar2 + 0x10) = pSVar2 + 0x20; *(int8 *)(pSVar2 + 0x18) = 0; pSVar2[0x20] = (SettingValue)0x0; *(SettingValue **)(pSVar2 + 0x30) = pSVar2 + 0x40; *(int8 *)(pSVar2 + 0x38) = 0; pSVar2[0x40] = (SettingValue)0x0; *(SettingValue **)(pSVar2 + 0x50) = pSVar2 + 0x60; *(int8 *)(pSVar2 + 0x58) = 0; pSVar2[0x60] = (SettingValue)0x0; *(SettingValue **)(pSVar2 + 0x78) = pSVar2 + 0x88; *(int8 *)(pSVar2 + 0x80) = 0; pSVar2[0x88] = (SettingValue)0x0; *(int ***)pSVar2 = &PTR__SettingValue_SliderFloat_00351488; *(SettingValue **)(pSVar2 + 0x98) = pSVar2 + 0xa8; *(int8 *)(pSVar2 + 0xa0) = 0; pSVar2[0xa8] = (SettingValue)0x0; *(int4 *)(pSVar2 + 8) = 6; *(int4 *)(pSVar2 + 0x74) = param_1; pSVar2[0x70] = param_5; *(int8 *)(pSVar2 + 0xb8) = param_2; strlen(param_4); std::__cxx11::string::_M_replace((ulong)(pSVar2 + 0x50),0,(char *)0x0,(ulong)param_4); pcVar1 = *(char **)(pSVar2 + 0xa0); strlen(param_6); std::__cxx11::string::_M_replace((ulong)(pSVar2 + 0x98),0,pcVar1,(ulong)param_6); local_48 = *(int8 *)(pSVar2 + 0xb8); fmt::v11::vformat_abi_cxx11_((string *)local_68,"###{}",5,0xe); std::__cxx11::string::operator=((string *)(pSVar2 + 0x78),(string *)local_68); if (local_68[0] != (SettingValue *)local_58) { operator_delete(local_68[0],local_58[0] + 1); } local_68[0] = pSVar2; std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*> ((vector<SettingValue*,std::allocator<SettingValue*>> *)(&values + (ulong)param_3 * 3), local_68); local_68[0] = pSVar2; std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*> ((vector<SettingValue*,std::allocator<SettingValue*>> *)&values_all,local_68); return; }
51,762
ma_ck_delete
eloqsql/storage/maria/ma_delete.c
my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key) { MARIA_SHARE *share= info->s; int res; my_bool buff_alloced; LSN lsn= LSN_IMPOSSIBLE; my_off_t new_root= share->state.key_root[key->keyinfo->key_nr]; uchar *key_buff, *save_key_data; MARIA_KEY org_key; DBUG_ENTER("_ma_ck_delete"); LINT_INIT_STRUCT(org_key); alloc_on_stack(*info->stack_end_ptr, key_buff, buff_alloced, key->keyinfo->max_store_length); if (!key_buff) DBUG_RETURN(1); save_key_data= key->data; if (share->now_transactional) { /* Save original value as the key may change */ memcpy(key_buff, key->data, key->data_length + key->ref_length); org_key= *key; key->data= key_buff; } if ((res= _ma_ck_real_delete(info, key, &new_root))) { /* We have to mark the table crashed before unpin_all_pages() */ maria_mark_crashed(info); } key->data= save_key_data; if (!res && share->now_transactional) res= _ma_write_undo_key_delete(info, &org_key, new_root, &lsn); else { share->state.key_root[key->keyinfo->key_nr]= new_root; _ma_fast_unlock_key_del(info); } _ma_unpin_all_pages_and_finalize_row(info, lsn); stack_alloc_free(key_buff, buff_alloced); DBUG_RETURN(res != 0); }
O0
c
ma_ck_delete: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq $0x0, -0x38(%rbp) movq -0x28(%rbp), %rax movq 0x118(%rax), %rax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movzbl 0xa5(%rcx), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movzwl 0xb0(%rax), %eax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax movq 0x78(%rax), %rax movq (%rax), %rax leaq -0x78(%rbp), %rcx subq %rcx, %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax cmpq -0x78(%rbp), %rax jbe 0x87951 movq -0x80(%rbp), %rcx subq -0x78(%rbp), %rcx movl $0x10000, %eax # imm = 0x10000 cmpq %rcx, %rax jb 0x87927 movq -0x80(%rbp), %rcx subq -0x78(%rbp), %rcx movl $0x8000, %eax # imm = 0x8000 cmpq %rcx, %rax jae 0x87951 movl $0x1000, %eax # imm = 0x1000 cmpq -0x78(%rbp), %rax ja 0x87951 movb $0x0, -0x2d(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movzwl 0xb0(%rax), %eax addl $0xf, %eax andl $-0x10, %eax movl %eax, %ecx movq %rsp, %rax subq %rcx, %rax movq %rax, %rsp movq %rax, -0x48(%rbp) jmp 0x87976 movb $0x1, -0x2d(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movzwl 0xb0(%rax), %eax movl %eax, %esi xorl %edi, %edi movl $0x10010, %edx # imm = 0x10010 callq 0xf3830 movq %rax, -0x48(%rbp) jmp 0x87978 cmpq $0x0, -0x48(%rbp) jne 0x8798a jmp 0x87981 movb $0x1, -0x9(%rbp) jmp 0x87abe movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x879f2 movq -0x48(%rbp), %rdi movq -0x20(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rax movl 0x10(%rax), %eax movq -0x20(%rbp), %rcx addl 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x2a090 movq -0x20(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x70(%rbp) movq 0x8(%rax), %rcx movq %rcx, -0x68(%rbp) movq 0x10(%rax), %rcx movq %rcx, -0x60(%rbp) movq 0x18(%rax), %rax movq %rax, -0x58(%rbp) movq -0x48(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi leaq -0x40(%rbp), %rdx callq 0x87af0 movsbl %al, %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x87a2c jmp 0x87a10 movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x170(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x170(%rax) jmp 0x87a28 jmp 0x87a2a jmp 0x87a2c movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) cmpl $0x0, -0x2c(%rbp) jne 0x87a6a movq -0x28(%rbp), %rax movsbl 0x7e7(%rax), %eax cmpl $0x0, %eax je 0x87a6a movq -0x18(%rbp), %rdi movq -0x40(%rbp), %rdx leaq -0x70(%rbp), %rsi leaq -0x38(%rbp), %rcx callq 0x87e20 movsbl %al, %eax movl %eax, -0x2c(%rbp) jmp 0x87a95 movq -0x40(%rbp), %rdx movq -0x28(%rbp), %rax movq 0x118(%rax), %rax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movzbl 0xa5(%rcx), %ecx movq %rdx, (%rax,%rcx,8) movq -0x18(%rbp), %rdi callq 0x880b0 movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x880e0 movq -0x48(%rbp), %rdi movsbl -0x2d(%rbp), %esi callq 0x88110 cmpl $0x0, -0x2c(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x9(%rbp) movb -0x9(%rbp), %al movb %al, -0x81(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x87ae4 movb -0x81(%rbp), %al movq %rbp, %rsp popq %rbp retq callq 0x2a270 nopl (%rax)
_ma_ck_delete: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_28], rax mov [rbp+var_38], 0 mov rax, [rbp+var_28] mov rax, [rax+118h] mov rcx, [rbp+var_20] mov rcx, [rcx+8] movzx ecx, byte ptr [rcx+0A5h] mov rax, [rax+rcx*8] mov [rbp+var_40], rax mov rax, [rbp+var_20] mov rax, [rax+8] movzx eax, word ptr [rax+0B0h] mov [rbp+var_78], rax mov rax, [rbp+var_18] mov rax, [rax+78h] mov rax, [rax] lea rcx, [rbp+var_78] sub rax, rcx mov [rbp+var_80], rax mov rax, [rbp+var_80] cmp rax, [rbp+var_78] jbe short loc_87951 mov rcx, [rbp+var_80] sub rcx, [rbp+var_78] mov eax, 10000h cmp rax, rcx jb short loc_87927 mov rcx, [rbp+var_80] sub rcx, [rbp+var_78] mov eax, 8000h cmp rax, rcx jnb short loc_87951 mov eax, 1000h cmp rax, [rbp+var_78] ja short loc_87951 loc_87927: mov [rbp+var_2D], 0 mov rax, [rbp+var_20] mov rax, [rax+8] movzx eax, word ptr [rax+0B0h] add eax, 0Fh and eax, 0FFFFFFF0h mov ecx, eax mov rax, rsp sub rax, rcx mov rsp, rax mov [rbp+var_48], rax jmp short loc_87976 loc_87951: mov [rbp+var_2D], 1 mov rax, [rbp+var_20] mov rax, [rax+8] movzx eax, word ptr [rax+0B0h] mov esi, eax xor edi, edi mov edx, offset stru_10010 call my_malloc mov [rbp+var_48], rax loc_87976: jmp short $+2 loc_87978: cmp [rbp+var_48], 0 jnz short loc_8798A jmp short $+2 loc_87981: mov [rbp+var_9], 1 jmp loc_87ABE loc_8798A: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] cmp byte ptr [rax+7E7h], 0 jz short loc_879F2 mov rdi, [rbp+var_48] mov rax, [rbp+var_20] mov rsi, [rax] mov rax, [rbp+var_20] mov eax, [rax+10h] mov rcx, [rbp+var_20] add eax, [rcx+14h] mov eax, eax mov edx, eax call _memcpy mov rax, [rbp+var_20] mov rcx, [rax] mov [rbp+var_70], rcx mov rcx, [rax+8] mov [rbp+var_68], rcx mov rcx, [rax+10h] mov [rbp+var_60], rcx mov rax, [rax+18h] mov [rbp+var_58], rax mov rcx, [rbp+var_48] mov rax, [rbp+var_20] mov [rax], rcx loc_879F2: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] lea rdx, [rbp+var_40] call _ma_ck_real_delete movsx eax, al mov [rbp+var_2C], eax cmp eax, 0 jz short loc_87A2C jmp short $+2 loc_87A10: mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rax+170h] or ecx, 2 mov [rax+170h], ecx jmp short $+2 loc_87A28: jmp short $+2 loc_87A2A: jmp short $+2 loc_87A2C: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx cmp [rbp+var_2C], 0 jnz short loc_87A6A mov rax, [rbp+var_28] movsx eax, byte ptr [rax+7E7h] cmp eax, 0 jz short loc_87A6A mov rdi, [rbp+var_18] mov rdx, [rbp+var_40] lea rsi, [rbp+var_70] lea rcx, [rbp+var_38] call _ma_write_undo_key_delete movsx eax, al mov [rbp+var_2C], eax jmp short loc_87A95 loc_87A6A: mov rdx, [rbp+var_40] mov rax, [rbp+var_28] mov rax, [rax+118h] mov rcx, [rbp+var_20] mov rcx, [rcx+8] movzx ecx, byte ptr [rcx+0A5h] mov [rax+rcx*8], rdx mov rdi, [rbp+var_18] call _ma_fast_unlock_key_del_1 loc_87A95: mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] call _ma_unpin_all_pages_and_finalize_row_2 mov rdi, [rbp+var_48] movsx esi, [rbp+var_2D] call stack_alloc_free_3 cmp [rbp+var_2C], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_9], al loc_87ABE: mov al, [rbp+var_9] mov [rbp+var_81], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_87AE4 mov al, [rbp+var_81] mov rsp, rbp pop rbp retn loc_87AE4: call ___stack_chk_fail
bool ma_ck_delete(long long *a1, long long *a2) { char v2; // al long long v4; // [rsp+0h] [rbp-90h] BYREF unsigned long long v5; // [rsp+10h] [rbp-80h] unsigned long long v6; // [rsp+18h] [rbp-78h] BYREF _QWORD v7[4]; // [rsp+20h] [rbp-70h] BYREF long long v8; // [rsp+40h] [rbp-50h] char *v9; // [rsp+48h] [rbp-48h] long long v10; // [rsp+50h] [rbp-40h] BYREF long long v11; // [rsp+58h] [rbp-38h] BYREF char v12; // [rsp+63h] [rbp-2Dh] int v13; // [rsp+64h] [rbp-2Ch] long long v14; // [rsp+68h] [rbp-28h] long long *v15; // [rsp+70h] [rbp-20h] long long *v16; // [rsp+78h] [rbp-18h] unsigned long long v18; // [rsp+88h] [rbp-8h] v18 = __readfsqword(0x28u); v16 = a1; v15 = a2; v14 = *a1; v11 = 0LL; v10 = *(_QWORD *)(*(_QWORD *)(v14 + 280) + 8LL * *(unsigned __int8 *)(a2[1] + 165)); v6 = *(unsigned __int16 *)(a2[1] + 176); v5 = *(_QWORD *)a1[15] - (_QWORD)&v6; if ( v5 <= v6 || v5 - v6 <= 0x10000 && (v5 - v6 <= 0x8000 || v6 < 0x1000) ) { v12 = 1; v9 = (char *)my_malloc(0LL, *(unsigned __int16 *)(v15[1] + 176), &stru_10010); } else { v12 = 0; v9 = (char *)&v4 - ((*(unsigned __int16 *)(v15[1] + 176) + 15) & 0xFFFFFFF0); } if ( !v9 ) return 1; v8 = *v15; if ( *(_BYTE *)(v14 + 2023) ) { memcpy(v9, *v15, (unsigned int)(*((_DWORD *)v15 + 5) + *((_DWORD *)v15 + 4))); v7[0] = *v15; v7[1] = v15[1]; v7[2] = v15[2]; v7[3] = v15[3]; *v15 = (long long)v9; } v2 = ma_ck_real_delete(v16, v15, &v10); v13 = v2; if ( v2 ) *(_DWORD *)(*v16 + 368) |= 2u; *v15 = v8; if ( v13 || !*(_BYTE *)(v14 + 2023) ) { *(_QWORD *)(*(_QWORD *)(v14 + 280) + 8LL * *(unsigned __int8 *)(v15[1] + 165)) = v10; ma_fast_unlock_key_del_1(v16); } else { v13 = (char)ma_write_undo_key_delete(v16, v7, v10, &v11); } ma_unpin_all_pages_and_finalize_row_2(v16, v11); stack_alloc_free_3(v9, (unsigned int)v12); return v13 != 0; }
_ma_ck_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x118] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOVZX ECX,byte ptr [RCX + 0xa5] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,word ptr [RAX + 0xb0] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RAX] LEA RCX,[RBP + -0x78] SUB RAX,RCX MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] CMP RAX,qword ptr [RBP + -0x78] JBE 0x00187951 MOV RCX,qword ptr [RBP + -0x80] SUB RCX,qword ptr [RBP + -0x78] MOV EAX,0x10000 CMP RAX,RCX JC 0x00187927 MOV RCX,qword ptr [RBP + -0x80] SUB RCX,qword ptr [RBP + -0x78] MOV EAX,0x8000 CMP RAX,RCX JNC 0x00187951 MOV EAX,0x1000 CMP RAX,qword ptr [RBP + -0x78] JA 0x00187951 LAB_00187927: MOV byte ptr [RBP + -0x2d],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,word ptr [RAX + 0xb0] ADD EAX,0xf AND EAX,0xfffffff0 MOV ECX,EAX MOV RAX,RSP SUB RAX,RCX MOV RSP,RAX MOV qword ptr [RBP + -0x48],RAX JMP 0x00187976 LAB_00187951: MOV byte ptr [RBP + -0x2d],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,word ptr [RAX + 0xb0] MOV ESI,EAX XOR EDI,EDI MOV EDX,0x10010 CALL 0x001f3830 MOV qword ptr [RBP + -0x48],RAX LAB_00187976: JMP 0x00187978 LAB_00187978: CMP qword ptr [RBP + -0x48],0x0 JNZ 0x0018798a JMP 0x00187981 LAB_00187981: MOV byte ptr [RBP + -0x9],0x1 JMP 0x00187abe LAB_0018798a: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x001879f2 MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x20] ADD EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x68],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x60],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX LAB_001879f2: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] LEA RDX,[RBP + -0x40] CALL 0x00187af0 MOVSX EAX,AL MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x00187a2c JMP 0x00187a10 LAB_00187a10: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x2 MOV dword ptr [RAX + 0x170],ECX JMP 0x00187a28 LAB_00187a28: JMP 0x00187a2a LAB_00187a2a: JMP 0x00187a2c LAB_00187a2c: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x00187a6a MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX + 0x7e7] CMP EAX,0x0 JZ 0x00187a6a MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x70] LEA RCX,[RBP + -0x38] CALL 0x00187e20 MOVSX EAX,AL MOV dword ptr [RBP + -0x2c],EAX JMP 0x00187a95 LAB_00187a6a: MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x118] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOVZX ECX,byte ptr [RCX + 0xa5] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001880b0 LAB_00187a95: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001880e0 MOV RDI,qword ptr [RBP + -0x48] MOVSX ESI,byte ptr [RBP + -0x2d] CALL 0x00188110 CMP dword ptr [RBP + -0x2c],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x9],AL LAB_00187abe: MOV AL,byte ptr [RBP + -0x9] MOV byte ptr [RBP + -0x81],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00187ae4 MOV AL,byte ptr [RBP + -0x81] MOV RSP,RBP POP RBP RET LAB_00187ae4: CALL 0x0012a270
int8 _ma_ck_delete(long *param_1,int8 *param_2) { int iVar1; void *__src; int1 *puVar2; int8 uVar3; int8 *puVar4; long *plVar5; char cVar6; int1 *puVar7; int iVar8; long in_FS_OFFSET; int1 auStack_98 [15]; bool local_89; ulong local_88; ulong local_80; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; int1 *local_50; int8 local_48; int8 local_40; char local_35; int local_34; long local_30; int8 *local_28; long *local_20; bool local_11; long local_10; puVar7 = auStack_98; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_30 = *param_1; local_40 = 0; local_48 = *(int8 *)(*(long *)(local_30 + 0x118) + (ulong)*(byte *)(param_2[1] + 0xa5) * 8); local_80 = (ulong)*(ushort *)(param_2[1] + 0xb0); local_88 = *(long *)param_1[0xf] - (long)&local_80; local_28 = param_2; local_20 = param_1; if ((local_80 < local_88) && ((0x10000 < local_88 - local_80 || ((0x8000 < local_88 - local_80 && (0xfff < local_80)))))) { local_35 = '\0'; puVar7 = auStack_98 + -(ulong)(*(ushort *)(param_2[1] + 0xb0) + 0xf & 0xfffffff0); local_50 = puVar7; } else { local_35 = '\x01'; local_50 = (int1 *)my_malloc(0,*(int2 *)(param_2[1] + 0xb0),0x10010); } puVar2 = local_50; if (local_50 == (int1 *)0x0) { local_11 = true; } else { local_58 = *local_28; if (*(char *)(local_30 + 0x7e7) != '\0') { __src = (void *)*local_28; iVar8 = *(int *)(local_28 + 2); iVar1 = *(int *)((long)local_28 + 0x14); *(int8 *)(puVar7 + -8) = 0x1879c4; memcpy(puVar2,__src,(ulong)(uint)(iVar8 + iVar1)); local_78 = *local_28; local_70 = local_28[1]; local_68 = local_28[2]; local_60 = local_28[3]; *local_28 = local_50; } plVar5 = local_20; puVar4 = local_28; *(int8 *)(puVar7 + -8) = 0x187a03; cVar6 = _ma_ck_real_delete(plVar5,puVar4,&local_48); plVar5 = local_20; uVar3 = local_48; local_34 = (int)cVar6; if (local_34 != 0) { *(uint *)(*local_20 + 0x170) = *(uint *)(*local_20 + 0x170) | 2; } *local_28 = local_58; if ((local_34 == 0) && (*(char *)(local_30 + 0x7e7) != '\0')) { *(int8 *)(puVar7 + -8) = 0x187a62; cVar6 = _ma_write_undo_key_delete(plVar5,&local_78,uVar3,&local_40); local_34 = (int)cVar6; } else { *(int8 *)(*(long *)(local_30 + 0x118) + (ulong)*(byte *)(local_28[1] + 0xa5) * 8) = local_48; *(int8 *)(puVar7 + -8) = 0x187a95; _ma_fast_unlock_key_del(plVar5); } plVar5 = local_20; uVar3 = local_40; *(int8 *)(puVar7 + -8) = 0x187aa2; _ma_unpin_all_pages_and_finalize_row(plVar5,uVar3); puVar2 = local_50; iVar8 = (int)local_35; *(int8 *)(puVar7 + -8) = 0x187aaf; stack_alloc_free(puVar2,iVar8); local_11 = local_34 != 0; } local_89 = local_11; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_11); } /* WARNING: Subroutine does not return */ *(int8 *)(puVar7 + -8) = 0x187ae9; __stack_chk_fail(); }
51,763
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&)
monkey531[P]llama/common/./json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x18300 movq %rax, %r12 movq (%r14), %rdi callq 0x18300 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x18a50 movq %rbx, %rdi movq %r15, %rsi callq 0x18ce0 movq (%r14), %rsi movq %rbx, %rdi callq 0x18ce0 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0x9903a movq (%r13), %rsi incq %rsi callq 0x186a0 movq %r14, %rdi callq 0x18bc0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_9903A mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9903A: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[32],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x00118300 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x00118300 ADD R12,RAX LAB_00198ff5: MOV RDI,RBX MOV RSI,R12 CALL 0x00118a50 MOV RDI,RBX MOV RSI,R15 CALL 0x00118ce0 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x00118ce0 LAB_00199016: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [32], char const*>(char const (&) [32], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 00198ff5 to 00199015 has its CatchHandler @ 00199023 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
51,764
ma_get_prev_key
eloqsql/storage/maria/ma_search.c
static my_bool _ma_get_prev_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos) { uint page_flag, nod_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; DBUG_ENTER("_ma_get_prev_key"); page_flag= ma_page->flag; nod_flag= ma_page->node; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && ! (page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { bmove(key->data, keypos - keyinfo->keylength - nod_flag, keyinfo->keylength); key->ref_length= keyinfo->share->rec_reflength; key->data_length= keyinfo->keylength - key->ref_length; key->flag= 0; DBUG_RETURN(0); } else { uchar *page; page= ma_page->buff + keyinfo->share->keypage_header + nod_flag; key->data[0]= 0; /* safety */ DBUG_ASSERT(page != keypos); while (page < keypos) { if (! (*keyinfo->get_key)(key, page_flag, nod_flag, &page)) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); DBUG_RETURN(1); } } } DBUG_RETURN(0); }
O0
c
ma_get_prev_key: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x28(%rbp) movq -0x30(%rbp), %rax movzwl 0xa2(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0x6eca4 movl -0x24(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x6eca4 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %eax movslq %eax, %rcx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movl -0x28(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %eax movl %eax, %edx callq 0x2a130 movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x740(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %ecx movq -0x10(%rbp), %rax subl 0x14(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x18(%rax) movb $0x0, -0x1(%rbp) jmp 0x6ed1f movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x30(%rbp), %rcx movq (%rcx), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax movl -0x28(%rbp), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movb $0x0, (%rax) jmp 0x6ecd2 jmp 0x6ecd4 movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x6ed17 movq -0x30(%rbp), %rax movq 0xe0(%rax), %rax movq -0x10(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx leaq -0x38(%rbp), %rcx callq *%rax cmpl $0x0, %eax jne 0x6ed15 movq -0x30(%rbp), %rax movq (%rax), %rdi movl $0x7e, %esi callq 0x33940 movb $0x1, -0x1(%rbp) jmp 0x6ed1f jmp 0x6ecd4 jmp 0x6ed19 jmp 0x6ed1b movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_get_prev_key: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov eax, [rax+2Ch] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov eax, [rax+28h] mov [rbp+var_28], eax mov rax, [rbp+var_30] movzx eax, word ptr [rax+0A2h] and eax, 28h cmp eax, 0 jnz loc_6ECA4 mov eax, [rbp+var_24] and eax, 2 cmp eax, 0 jnz short loc_6ECA4 mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_20] mov rax, [rbp+var_30] movzx eax, word ptr [rax+0AAh] movsxd rcx, eax xor eax, eax sub rax, rcx add rsi, rax mov eax, [rbp+var_28] mov ecx, eax xor eax, eax sub rax, rcx add rsi, rax mov rax, [rbp+var_30] movzx eax, word ptr [rax+0AAh] mov edx, eax call _memmove mov rax, [rbp+var_30] mov rax, [rax] mov ecx, [rax+740h] mov rax, [rbp+var_10] mov [rax+14h], ecx mov rax, [rbp+var_30] movzx ecx, word ptr [rax+0AAh] mov rax, [rbp+var_10] sub ecx, [rax+14h] mov rax, [rbp+var_10] mov [rax+10h], ecx mov rax, [rbp+var_10] mov dword ptr [rax+18h], 0 mov [rbp+var_1], 0 jmp short loc_6ED1F loc_6ECA4: mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_30] mov rcx, [rcx] mov ecx, [rcx+744h] add rax, rcx mov ecx, [rbp+var_28] add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax] mov byte ptr [rax], 0 jmp short $+2 loc_6ECD2: jmp short $+2 loc_6ECD4: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jnb short loc_6ED17 mov rax, [rbp+var_30] mov rax, [rax+0E0h] mov rdi, [rbp+var_10] mov esi, [rbp+var_24] mov edx, [rbp+var_28] lea rcx, [rbp+var_38] call rax cmp eax, 0 jnz short loc_6ED15 mov rax, [rbp+var_30] mov rdi, [rax] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share mov [rbp+var_1], 1 jmp short loc_6ED1F loc_6ED15: jmp short loc_6ECD4 loc_6ED17: jmp short $+2 loc_6ED19: jmp short $+2 loc_6ED1B: mov [rbp+var_1], 0 loc_6ED1F: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_get_prev_key(long long a1, long long a2, unsigned long long a3) { long long v3; // rdx long long v4; // rcx long long v5; // r8 int v6; // r9d unsigned long long v8; // [rsp+8h] [rbp-38h] BYREF long long v9; // [rsp+10h] [rbp-30h] unsigned int v10; // [rsp+18h] [rbp-28h] unsigned int v11; // [rsp+1Ch] [rbp-24h] unsigned long long v12; // [rsp+20h] [rbp-20h] long long v13; // [rsp+28h] [rbp-18h] long long v14; // [rsp+30h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v9 = *(_QWORD *)(a1 + 8); v11 = *(_DWORD *)(a2 + 44); v10 = *(_DWORD *)(a2 + 40); if ( (*(_WORD *)(v9 + 162) & 0x28) != 0 || (v11 & 2) != 0 ) { v8 = v10 + *(unsigned int *)(*(_QWORD *)v9 + 1860LL) + *(_QWORD *)(v13 + 16); **(_BYTE **)v14 = 0; while ( v8 < v12 ) { if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(v14, v11, v10, &v8) ) { ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v3, v4, v5, v6); return 1; } } return 0; } else { memmove(*(_QWORD *)v14, v12 - *(unsigned __int16 *)(v9 + 170) - v10, *(unsigned __int16 *)(v9 + 170)); *(_DWORD *)(v14 + 20) = *(_DWORD *)(*(_QWORD *)v9 + 1856LL); *(_DWORD *)(v14 + 16) = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(v14 + 20); *(_DWORD *)(v14 + 24) = 0; return 0; } }
_ma_get_prev_key: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xa2] AND EAX,0x28 CMP EAX,0x0 JNZ 0x0016eca4 MOV EAX,dword ptr [RBP + -0x24] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0016eca4 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xaa] MOVSXD RCX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x28] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xaa] MOV EDX,EAX CALL 0x0012a130 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x740] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x30] MOVZX ECX,word ptr [RAX + 0xaa] MOV RAX,qword ptr [RBP + -0x10] SUB ECX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x18],0x0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0016ed1f LAB_0016eca4: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV byte ptr [RAX],0x0 JMP 0x0016ecd2 LAB_0016ecd2: JMP 0x0016ecd4 LAB_0016ecd4: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0016ed17 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0xe0] MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] LEA RCX,[RBP + -0x38] CALL RAX CMP EAX,0x0 JNZ 0x0016ed15 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX] MOV ESI,0x7e CALL 0x00133940 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0016ed1f LAB_0016ed15: JMP 0x0016ecd4 LAB_0016ed17: JMP 0x0016ed19 LAB_0016ed19: JMP 0x0016ed1b LAB_0016ed1b: MOV byte ptr [RBP + -0x1],0x0 LAB_0016ed1f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 _ma_get_prev_key(int8 *param_1,long param_2,ulong param_3) { int iVar1; ulong local_40; long *local_38; uint local_30; uint local_2c; ulong local_28; long local_20; int8 *local_18; int1 local_9; local_38 = (long *)param_1[1]; local_2c = *(uint *)(param_2 + 0x2c); local_30 = *(uint *)(param_2 + 0x28); local_28 = param_3; local_20 = param_2; local_18 = param_1; if (((*(ushort *)((long)local_38 + 0xa2) & 0x28) == 0) && ((local_2c & 2) == 0)) { memmove((void *)*param_1, (void *)((param_3 - (long)(int)(uint)*(ushort *)((long)local_38 + 0xaa)) - (ulong)local_30),(ulong)*(ushort *)((long)local_38 + 0xaa)); *(int4 *)((long)local_18 + 0x14) = *(int4 *)(*local_38 + 0x740); *(uint *)(local_18 + 2) = (uint)*(ushort *)((long)local_38 + 0xaa) - *(int *)((long)local_18 + 0x14); *(int4 *)(local_18 + 3) = 0; local_9 = 0; } else { local_40 = *(long *)(param_2 + 0x10) + (ulong)*(uint *)(*local_38 + 0x744) + (ulong)local_30; *(int1 *)*param_1 = 0; do { if (local_28 <= local_40) { return 0; } iVar1 = (*(code *)local_38[0x1c])(local_18,local_2c,local_30,&local_40); } while (iVar1 != 0); _ma_set_fatal_error_with_share(*local_38,0x7e); local_9 = 1; } return local_9; }
51,765
void CLI::Option::results<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) const
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/Option.hpp
void results(T &output) const { bool retval = false; if(current_option_state_ >= option_state::reduced || (results_.size() == 1 && validators_.empty())) { const results_t &res = (proc_results_.empty()) ? results_ : proc_results_; retval = detail::lexical_conversion<T, T>(res, output); } else { results_t res; if(results_.empty()) { if(!default_str_.empty()) { // _add_results takes an rvalue only _add_result(std::string(default_str_), res); _validate_results(res); results_t extra; _reduce_results(extra, res); if(!extra.empty()) { res = std::move(extra); } } else { res.emplace_back(); } } else { res = reduced_results(); } retval = detail::lexical_conversion<T, T>(res, output); } if(!retval) { throw ConversionError(get_name(), results_); } }
O2
cpp
void CLI::Option::results<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, %rbx cmpb $0x3, 0x248(%rdi) jle 0x1d186 leaq 0x230(%rbx), %rdi movq 0x230(%rbx), %rax leaq 0x218(%rbx), %rcx cmpq 0x238(%rbx), %rax cmoveq %rcx, %rdi movq %r14, %rsi callq 0x1d356 testb %al, %al je 0x1d284 addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x218(%rbx), %rax movq 0x220(%rbx), %rcx movq %rcx, %rdx subq %rax, %rdx cmpq $0x20, %rdx jne 0x1d1b0 movq 0x178(%rbx), %rdx cmpq 0x180(%rbx), %rdx je 0x1d14b xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) cmpq %rcx, %rax je 0x1d1e4 leaq 0x20(%rsp), %rdi movq %rbx, %rsi callq 0x9904 movq %rsp, %rdi leaq 0x20(%rsp), %r15 movq %r15, %rsi callq 0x11644 movq %r15, %rdi jmp 0x1d261 cmpq $0x0, 0xf0(%rbx) je 0x1d2e1 leaq 0xe8(%rbx), %rsi leaq 0x20(%rsp), %rdi callq 0x75e0 leaq 0x20(%rsp), %rsi movq %rsp, %rdx movq %rbx, %rdi callq 0x1aa86 leaq 0x20(%rsp), %rdi callq 0x7860 movq %rsp, %rsi movq %rbx, %rdi callq 0xe8b4 xorps %xmm0, %xmm0 leaq 0x20(%rsp), %rsi movaps %xmm0, (%rsi) andq $0x0, 0x10(%rsi) movq %rsp, %rdx movq %rbx, %rdi callq 0xeb16 movq 0x20(%rsp), %rax cmpq 0x28(%rsp), %rax je 0x1d25c movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x11644 leaq 0x20(%rsp), %rdi callq 0x99ca movq %rsp, %rdi movq %r14, %rsi callq 0x1d356 movl %eax, %ebp movq %rsp, %rdi callq 0x99ca testb %bpl, %bpl jne 0x1d17b pushq $0x38 popq %rdi callq 0x7210 movq %rax, %r14 leaq 0x58(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0xf2c4 addq $0x218, %rbx # imm = 0x218 leaq 0x40(%rsp), %rdi movq %rbx, %rsi callq 0xe796 movb $0x1, %bpl leaq 0x58(%rsp), %rsi leaq 0x40(%rsp), %rdx movq %r14, %rdi callq 0x1adfe xorl %ebp, %ebp leaq 0x2232e(%rip), %rsi # 0x3f600 leaq 0x98b(%rip), %rdx # 0x1dc64 movq %r14, %rdi callq 0x7750 movq %rsp, %rdi callq 0xdf10 jmp 0x1d266 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x99ca jmp 0x1d346 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x7860 jmp 0x1d346 jmp 0x1d343 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x99ca jmp 0x1d323 movq %rax, %rbx movb $0x1, %bpl leaq 0x58(%rsp), %rdi callq 0x7860 testb %bpl, %bpl jne 0x1d339 jmp 0x1d34e jmp 0x1d343 movq %rax, %rbx movq %r14, %rdi callq 0x7360 jmp 0x1d34e movq %rax, %rbx movq %rsp, %rdi callq 0x99ca movq %rbx, %rdi callq 0x7770
_ZNK3CLI6Option7resultsISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEEEvRT_: push rbp push r15 push r14 push rbx sub rsp, 78h mov r14, rsi mov rbx, rdi cmp byte ptr [rdi+248h], 3 jle short loc_1D186 loc_1D14B: lea rdi, [rbx+230h] mov rax, [rbx+230h] lea rcx, [rbx+218h] cmp rax, [rbx+238h] cmovz rdi, rcx mov rsi, r14 call _ZN3CLI6detail18lexical_conversionISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESA_TnNSt9enable_ifIXaaaasr20is_mutable_containerIT_EE5valuesr20is_mutable_containerIT0_EE5valueeqsr10type_countISD_EE5valueLi1EENS0_7enablerEE4typeELSE_0EEEbRKSA_RSC_ test al, al jz loc_1D284 loc_1D17B: add rsp, 78h pop rbx pop r14 pop r15 pop rbp retn loc_1D186: mov rax, [rbx+218h] mov rcx, [rbx+220h] mov rdx, rcx sub rdx, rax cmp rdx, 20h ; ' ' jnz short loc_1D1B0 mov rdx, [rbx+178h] cmp rdx, [rbx+180h] jz short loc_1D14B loc_1D1B0: xorps xmm0, xmm0 movaps [rsp+98h+var_98], xmm0 and [rsp+98h+var_88], 0 cmp rax, rcx jz short loc_1D1E4 lea rdi, [rsp+98h+var_78] mov rsi, rbx call _ZNK3CLI6Option15reduced_resultsB5cxx11Ev; CLI::Option::reduced_results(void) mov rdi, rsp lea r15, [rsp+98h+var_78] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE14_M_move_assignEOS7_St17integral_constantIbLb1EE; std::vector<std::string>::_M_move_assign(std::vector<std::string>&&,std::integral_constant<bool,true>) mov rdi, r15 jmp short loc_1D261 loc_1D1E4: cmp qword ptr [rbx+0F0h], 0 jz loc_1D2E1 lea rsi, [rbx+0E8h] lea rdi, [rsp+98h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rsi, [rsp+98h+var_78] mov rdx, rsp mov rdi, rbx call _ZNK3CLI6Option11_add_resultEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS6_SaIS6_EE; CLI::Option::_add_result(std::string &&,std::vector<std::string> &) lea rdi, [rsp+98h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rsi, rsp mov rdi, rbx; this call _ZNK3CLI6Option17_validate_resultsERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::Option::_validate_results(std::vector<std::string> &) xorps xmm0, xmm0 lea rsi, [rsp+98h+var_78] movaps xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 mov rdx, rsp mov rdi, rbx; this call _ZNK3CLI6Option15_reduce_resultsERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS9_; CLI::Option::_reduce_results(std::vector<std::string> &,std::vector<std::string> const&) mov rax, [rsp+98h+var_78] cmp rax, [rsp+98h+var_70] jz short loc_1D25C mov rdi, rsp lea rsi, [rsp+98h+var_78] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE14_M_move_assignEOS7_St17integral_constantIbLb1EE; std::vector<std::string>::_M_move_assign(std::vector<std::string>&&,std::integral_constant<bool,true>) loc_1D25C: lea rdi, [rsp+98h+var_78] loc_1D261: call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_1D266: mov rdi, rsp mov rsi, r14 call _ZN3CLI6detail18lexical_conversionISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESA_TnNSt9enable_ifIXaaaasr20is_mutable_containerIT_EE5valuesr20is_mutable_containerIT0_EE5valueeqsr10type_countISD_EE5valueLi1EENS0_7enablerEE4typeELSE_0EEEbRKSA_RSC_ mov ebp, eax mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() test bpl, bpl jnz loc_1D17B loc_1D284: push 38h ; '8' pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rdi, [rsp+98h+var_40] mov rsi, rbx xor edx, edx xor ecx, ecx call _ZNK3CLI6Option8get_nameB5cxx11Ebb; CLI::Option::get_name(bool,bool) add rbx, 218h lea rdi, [rsp+98h+var_58] mov rsi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov bpl, 1 lea rsi, [rsp+98h+var_40] lea rdx, [rsp+98h+var_58] mov rdi, r14 call _ZN3CLI15ConversionErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EE; CLI::ConversionError::ConversionError(std::string,std::vector<std::string>) xor ebp, ebp lea rsi, _ZTIN3CLI15ConversionErrorE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_1D2E1: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJEEERS5_DpOT_; std::vector<std::string>::emplace_back<>() jmp loc_1D266 mov rbx, rax lea rdi, [rsp+arg_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_1D346 mov rbx, rax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1D346 jmp short loc_1D343 mov rbx, rax lea rdi, [rsp+arg_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_1D323 mov rbx, rax mov bpl, 1 loc_1D323: lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_1D339 jmp short loc_1D34E jmp short loc_1D343 mov rbx, rax loc_1D339: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_1D34E loc_1D343: mov rbx, rax loc_1D346: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_1D34E: mov rdi, rbx call __Unwind_Resume
long long CLI::Option::results<std::vector<std::string>>( CLI::Option *this, int a2, long long a3, long long a4, int a5, int a6) { int v7; // edi long long result; // rax long long v9; // rax long long v10; // rcx int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d char v15; // bp void *exception; // r14 __int128 v17; // [rsp+0h] [rbp-98h] BYREF long long v18; // [rsp+10h] [rbp-88h] __int128 v19; // [rsp+20h] [rbp-78h] BYREF long long v20; // [rsp+30h] [rbp-68h] _QWORD v21[3]; // [rsp+40h] [rbp-58h] BYREF _BYTE v22[64]; // [rsp+58h] [rbp-40h] BYREF if ( *((char *)this + 584) <= 3 ) { v9 = *((_QWORD *)this + 67); v10 = *((_QWORD *)this + 68); if ( v10 - v9 != 32 || (a3 = *((_QWORD *)this + 47), a3 != *((_QWORD *)this + 48)) ) { v17 = 0LL; v18 = 0LL; if ( v9 == v10 ) { if ( !*((_QWORD *)this + 30) ) { std::vector<std::string>::emplace_back<>((long long)&v17); LABEL_14: v15 = ZN3CLI6detail18lexical_conversionISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESA_TnNSt9enable_ifIXaaaasr20is_mutable_containerIT_EE5valuesr20is_mutable_containerIT0_EE5valueeqsr10type_countISD_EE5valueLi1EENS0_7enablerEE4typeELSE_0EEEbRKSA_RSC_( (unsigned int)&v17, a2, v11, v12, v13, v14, v17, v18); result = std::vector<std::string>::~vector((long long)&v17); if ( !v15 ) goto LABEL_15; return result; } std::string::basic_string(&v19); CLI::Option::_add_result((long long)this, (long long)&v19, (long long)&v17); std::string::~string(&v19); CLI::Option::_validate_results(this); v19 = 0LL; v20 = 0LL; CLI::Option::_reduce_results(this); if ( (_QWORD)v19 != *((_QWORD *)&v19 + 1) ) std::vector<std::string>::_M_move_assign((long long)&v17, &v19); } else { CLI::Option::reduced_results[abi:cxx11](&v19, (long long)this); std::vector<std::string>::_M_move_assign((long long)&v17, &v19); } std::vector<std::string>::~vector((long long)&v19); goto LABEL_14; } } v7 = (_DWORD)this + 560; if ( *((_QWORD *)this + 70) == *((_QWORD *)this + 71) ) v7 = (_DWORD)this + 536; result = ZN3CLI6detail18lexical_conversionISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESA_TnNSt9enable_ifIXaaaasr20is_mutable_containerIT_EE5valuesr20is_mutable_containerIT0_EE5valueeqsr10type_countISD_EE5valueLi1EENS0_7enablerEE4typeELSE_0EEEbRKSA_RSC_( v7, a2, a3, (int)this + 536, a5, a6, v17); if ( !(_BYTE)result ) { LABEL_15: exception = __cxa_allocate_exception(0x38uLL); CLI::Option::get_name[abi:cxx11]((long long)v22, (long long)this, 0, 0); std::vector<std::string>::vector(v21, (_QWORD *)this + 67); CLI::ConversionError::ConversionError((int)exception, (long long)v22, v21); __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::ConversionError, CLI::Error::~Error); } return result; }
results<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV RBX,RDI CMP byte ptr [RDI + 0x248],0x3 JLE 0x0011d186 LAB_0011d14b: LEA RDI,[RBX + 0x230] MOV RAX,qword ptr [RBX + 0x230] LEA RCX,[RBX + 0x218] CMP RAX,qword ptr [RBX + 0x238] CMOVZ RDI,RCX MOV RSI,R14 CALL 0x0011d356 TEST AL,AL JZ 0x0011d284 LAB_0011d17b: ADD RSP,0x78 POP RBX POP R14 POP R15 POP RBP RET LAB_0011d186: MOV RAX,qword ptr [RBX + 0x218] MOV RCX,qword ptr [RBX + 0x220] MOV RDX,RCX SUB RDX,RAX CMP RDX,0x20 JNZ 0x0011d1b0 MOV RDX,qword ptr [RBX + 0x178] CMP RDX,qword ptr [RBX + 0x180] JZ 0x0011d14b LAB_0011d1b0: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 CMP RAX,RCX JZ 0x0011d1e4 LAB_0011d1c2: LEA RDI,[RSP + 0x20] MOV RSI,RBX CALL 0x00109904 MOV RDI,RSP LEA R15,[RSP + 0x20] MOV RSI,R15 CALL 0x00111644 MOV RDI,R15 JMP 0x0011d261 LAB_0011d1e4: CMP qword ptr [RBX + 0xf0],0x0 JZ 0x0011d2e1 LEA RSI,[RBX + 0xe8] LAB_0011d1f9: LEA RDI,[RSP + 0x20] CALL 0x001075e0 LAB_0011d203: LEA RSI,[RSP + 0x20] MOV RDX,RSP MOV RDI,RBX CALL 0x0011aa86 LEA RDI,[RSP + 0x20] CALL 0x00107860 LAB_0011d21d: MOV RSI,RSP MOV RDI,RBX CALL 0x0010e8b4 XORPS XMM0,XMM0 LEA RSI,[RSP + 0x20] MOVAPS xmmword ptr [RSI],XMM0 AND qword ptr [RSI + 0x10],0x0 LAB_0011d238: MOV RDX,RSP MOV RDI,RBX CALL 0x0010eb16 MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x28] JZ 0x0011d25c MOV RDI,RSP LEA RSI,[RSP + 0x20] CALL 0x00111644 LAB_0011d25c: LEA RDI,[RSP + 0x20] LAB_0011d261: CALL 0x001099ca LAB_0011d266: MOV RDI,RSP MOV RSI,R14 CALL 0x0011d356 LAB_0011d271: MOV EBP,EAX MOV RDI,RSP CALL 0x001099ca TEST BPL,BPL JNZ 0x0011d17b LAB_0011d284: PUSH 0x38 POP RDI CALL 0x00107210 MOV R14,RAX LAB_0011d28f: LEA RDI,[RSP + 0x58] MOV RSI,RBX XOR EDX,EDX XOR ECX,ECX CALL 0x0010f2c4 ADD RBX,0x218 LAB_0011d2a7: LEA RDI,[RSP + 0x40] MOV RSI,RBX CALL 0x0010e796 MOV BPL,0x1 LAB_0011d2b7: LEA RSI,[RSP + 0x58] LEA RDX,[RSP + 0x40] MOV RDI,R14 CALL 0x0011adfe XOR EBP,EBP LEA RSI,[0x13f600] LEA RDX,[0x11dc64] MOV RDI,R14 CALL 0x00107750 LAB_0011d2e1: MOV RDI,RSP CALL 0x0010df10 LAB_0011d2e9: JMP 0x0011d266
/* void CLI::Option::results<std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&) const */ void __thiscall CLI::Option::results<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> (Option *this,vector *param_1) { char cVar1; ConversionError *pCVar2; Option *pOVar3; int8 local_98; int8 uStack_90; int8 local_88; long local_78; long lStack_70; int8 local_68; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_58 [24]; int1 local_40 [32]; if ((char)this[0x248] < '\x04') { if ((*(long *)(this + 0x220) - *(long *)(this + 0x218) != 0x20) || (*(long *)(this + 0x178) != *(long *)(this + 0x180))) { local_98 = 0; uStack_90 = 0; local_88 = 0; if (*(long *)(this + 0x218) == *(long *)(this + 0x220)) { if (*(long *)(this + 0xf0) != 0) { /* try { // try from 0011d1f9 to 0011d202 has its CatchHandler @ 0011d30c */ std::__cxx11::string::string((string *)&local_78,(string *)(this + 0xe8)); /* try { // try from 0011d203 to 0011d212 has its CatchHandler @ 0011d2fd */ _add_result(this,(string *)&local_78,(vector *)&local_98); std::__cxx11::string::~string((string *)&local_78); /* try { // try from 0011d21d to 0011d227 has its CatchHandler @ 0011d343 */ _validate_results(this,(vector *)&local_98); local_78 = 0; lStack_70 = 0; local_68 = 0; /* try { // try from 0011d238 to 0011d242 has its CatchHandler @ 0011d2ee */ _reduce_results(this,(vector *)&local_78,(vector *)&local_98); if (local_78 != lStack_70) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_move_assign (&local_98,&local_78); } goto LAB_0011d261; } /* try { // try from 0011d2e1 to 0011d2e8 has its CatchHandler @ 0011d343 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::emplace_back<> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_98); } else { /* try { // try from 0011d1c2 to 0011d1ce has its CatchHandler @ 0011d334 */ reduced_results_abi_cxx11_(); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_move_assign (&local_98,&local_78); LAB_0011d261: std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_78); } /* try { // try from 0011d266 to 0011d270 has its CatchHandler @ 0011d343 */ cVar1 = _ZN3CLI6detail18lexical_conversionISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESA_TnNSt9enable_ifIXaaaasr20is_mutable_containerIT_EE5valuesr20is_mutable_containerIT0_EE5valueeqsr10type_countISD_EE5valueLi1EENS0_7enablerEE4typeELSE_0EEEbRKSA_RSC_ (&local_98,param_1); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_98); goto joined_r0x0011d27e; } } pOVar3 = this + 0x230; if (*(long *)(this + 0x230) == *(long *)(this + 0x238)) { pOVar3 = this + 0x218; } cVar1 = _ZN3CLI6detail18lexical_conversionISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESA_TnNSt9enable_ifIXaaaasr20is_mutable_containerIT_EE5valuesr20is_mutable_containerIT0_EE5valueeqsr10type_countISD_EE5valueLi1EENS0_7enablerEE4typeELSE_0EEEbRKSA_RSC_ (pOVar3,param_1); joined_r0x0011d27e: if (cVar1 == '\0') { pCVar2 = (ConversionError *)__cxa_allocate_exception(0x38); /* try { // try from 0011d28f to 0011d29f has its CatchHandler @ 0011d336 */ get_name_abi_cxx11_(SUB81(local_40,0),SUB81(this,0)); /* try { // try from 0011d2a7 to 0011d2b3 has its CatchHandler @ 0011d31d */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (local_58,(vector *)(this + 0x218)); /* try { // try from 0011d2b7 to 0011d2e0 has its CatchHandler @ 0011d30e */ ConversionError::ConversionError(pCVar2,local_40,local_58); /* WARNING: Subroutine does not return */ __cxa_throw(pCVar2,&ConversionError::typeinfo,Error::~Error); } return; }
51,766
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<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<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/json.hpp
T & operator[](KeyType && key) { return emplace(std::forward<KeyType>(key), T{}).first->second; }
O3
cpp
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<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<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r15 leaq 0x40(%rsp), %r14 movq $0x0, 0x8(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x40(%r14) movaps %xmm0, -0x30(%r14) movaps %xmm0, -0x20(%r14) movaps %xmm0, -0x10(%r14) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x8538a movq %r14, %rdi movl $0x1, %esi callq 0x8538a movq %rsp, %rdx movq %r15, %rdi movq %rbx, %rsi callq 0xbda6c movq %rax, %rbx movq %r14, %rdi xorl %esi, %esi callq 0x8538a movq %r14, %rdi callq 0x89aa4 leaq 0x38(%rsp), %rdi callq 0x70a60 leaq 0x28(%rsp), %rdi callq 0x70a60 leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x70a60 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xbd7f6 movq 0xa57c7(%rip), %rax # 0x162f98 cmpb $0x0, (%rax) je 0xbd7e1 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xbd7eb movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xbd7f6 movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0xb63cc movq %rbx, %rdi callq 0x20af0
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rsi mov r15, rdi lea r14, [rsp+68h+var_28] mov qword ptr [r14+8], 0 xorps xmm0, xmm0 movaps xmmword ptr [r14-40h], xmm0 movaps xmmword ptr [r14-30h], xmm0 movaps xmmword ptr [r14-20h], xmm0 movaps xmmword ptr [r14-10h], xmm0 mov byte ptr [r14], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 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 rdx, rsp mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ mov rbx, rax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+68h+var_30] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+68h+var_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+68h+var_50] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_BD7F6 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_BD7E1 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_BD7EB loc_BD7E1: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_BD7EB: cmp eax, 1 jnz short loc_BD7F6 mov rax, [rdi] call qword ptr [rax+18h] loc_BD7F6: add rbx, 10h mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_( long long a1, long long a2) { long long v2; // rbx long long v3; // rdi signed __int32 v4; // eax __int128 v6; // [rsp+0h] [rbp-68h] BYREF __int128 v7; // [rsp+10h] [rbp-58h] BYREF __int128 v8; // [rsp+20h] [rbp-48h] BYREF __int128 v9; // [rsp+30h] [rbp-38h] BYREF char v10[8]; // [rsp+40h] [rbp-28h] BYREF long long v11; // [rsp+48h] [rbp-20h] v11 = 0LL; v6 = 0LL; v7 = 0LL; v8 = 0LL; v9 = 0LL; v10[0] = 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>::assert_invariant(v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10); v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_( a1, a2, &v6); 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(v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v9 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v8 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v7 + 1); v3 = *((_QWORD *)&v6 + 1); if ( *((_QWORD *)&v6 + 1) ) { if ( _libc_single_threaded ) { v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1; } else { v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF); } if ( v4 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL); } return v2 + 16; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R15,RDI LEA R14,[RSP + 0x40] MOV qword ptr [R14 + 0x8],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x40],XMM0 MOVAPS xmmword ptr [R14 + -0x30],XMM0 MOVAPS xmmword ptr [R14 + -0x20],XMM0 MOVAPS xmmword ptr [R14 + -0x10],XMM0 MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0018538a MOV RDI,R14 MOV ESI,0x1 CALL 0x0018538a LAB_001bd77d: MOV RDX,RSP MOV RDI,R15 MOV RSI,RBX CALL 0x001bda6c LAB_001bd78b: MOV RBX,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x0018538a MOV RDI,R14 CALL 0x00189aa4 LEA RDI,[RSP + 0x38] CALL 0x00170a60 LEA RDI,[RSP + 0x28] CALL 0x00170a60 LEA R14,[RSP + 0x18] MOV RDI,R14 CALL 0x00170a60 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001bd7f6 MOV RAX,qword ptr [0x00262f98] CMP byte ptr [RAX],0x0 JZ 0x001bd7e1 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001bd7eb LAB_001bd7e1: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001bd7eb: CMP EAX,0x1 JNZ 0x001bd7f6 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001bd7f6: ADD RBX,0x10 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_ (int8 param_1,int8 param_2) { int *piVar1; int iVar2; long lVar3; bool bVar4; int8 local_68; long *plStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; data local_28 [8]; int8 local_20; local_20 = 0; local_68 = 0; plStack_60 = (long *)0x0; local_58 = 0; uStack_50 = 0; local_48 = 0; uStack_40 = 0; local_38 = 0; uStack_30 = 0; local_28[0] = (data)0x0; bVar4 = SUB81(local_28,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(bVar4); 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(bVar4); /* try { // try from 001bd77d to 001bd78a has its CatchHandler @ 001bd807 */ lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ (param_1,param_2,&local_68); 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(bVar4); 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_28); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_50); if (plStack_60 != (long *)0x0) { if (*PTR___libc_single_threaded_00262f98 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_60 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)plStack_60 + 0xc); *(int *)((long)plStack_60 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*plStack_60 + 0x18))(); } } return lVar3 + 0x10; }
51,767
ma_read_rnd_mempack_record
eloqsql/storage/maria/ma_packrec.c
static int _ma_read_rnd_mempack_record(MARIA_HA *info, uchar *buf, register MARIA_RECORD_POS filepos, my_bool skip_deleted_blocks __attribute__((unused))) { MARIA_BLOCK_INFO block_info; MARIA_SHARE *share= info->s; uchar *pos,*start; DBUG_ENTER("_ma_read_rnd_mempack_record"); if (filepos >= share->state.state.data_file_length) { my_errno=HA_ERR_END_OF_FILE; goto err; } if (!(pos= (uchar*) _ma_mempack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, (uchar*) (start= share->file_map + filepos)))) goto err; #ifndef DBUG_OFF if (block_info.rec_len > info->s->max_pack_length) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } #endif info->packed_length=block_info.rec_len; info->cur_row.lastpos= filepos; info->cur_row.nextpos= filepos+(uint) (pos-start)+block_info.rec_len; info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; DBUG_RETURN (_ma_pack_rec_unpack(info, &info->bit_buff, buf, pos, block_info.rec_len)); err: DBUG_RETURN(my_errno); }
O0
c
ma_read_rnd_mempack_record: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movb %al, -0x81(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0x90(%rbp) movq -0x80(%rbp), %rax movq -0x90(%rbp), %rcx cmpq 0x40(%rcx), %rax jb 0x38b1b callq 0xf6090 movl $0x89, (%rax) jmp 0x38bf9 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x70(%rbp), %rcx addq $0x3a0, %rcx # imm = 0x3A0 movq -0x70(%rbp), %r8 addq $0x460, %r8 # imm = 0x460 movq -0x90(%rbp), %rax movq 0x5f0(%rax), %r9 addq -0x80(%rbp), %r9 movq %r9, -0xa0(%rbp) leaq -0x60(%rbp), %rdx callq 0x3b250 movq %rax, -0x98(%rbp) cmpq $0x0, %rax jne 0x38b74 jmp 0x38bf9 movq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x450(%rax) movq -0x80(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x80(%rbp), %rcx movq -0x98(%rbp), %rax movq -0xa0(%rbp), %rdx subq %rdx, %rax movl %eax, %eax addq %rax, %rcx addq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x82, %ecx movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x78(%rbp), %rdx movq -0x98(%rbp), %rcx movq -0x48(%rbp), %r8 callq 0x382a0 movl %eax, -0x64(%rbp) jmp 0x38c05 jmp 0x38bfb callq 0xf6090 movl (%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0xa4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x38c2f movl -0xa4(%rbp), %eax addq $0xb0, %rsp popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
_ma_read_rnd_mempack_record: push rbp mov rbp, rsp sub rsp, 0B0h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov [rbp+var_81], al mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_90], rax mov rax, [rbp+var_80] mov rcx, [rbp+var_90] cmp rax, [rcx+40h] jb short loc_38B1B call _my_thread_var mov dword ptr [rax], 89h jmp loc_38BF9 loc_38B1B: mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rcx, [rbp+var_70] add rcx, 3A0h mov r8, [rbp+var_70] add r8, 460h mov rax, [rbp+var_90] mov r9, [rax+5F0h] add r9, [rbp+var_80] mov [rbp+var_A0], r9 lea rdx, [rbp+var_60] call _ma_mempack_get_block_info mov [rbp+var_98], rax cmp rax, 0 jnz short loc_38B74 jmp loc_38BF9 loc_38B74: mov rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+450h], rcx mov rcx, [rbp+var_80] mov rax, [rbp+var_70] mov [rax+98h], rcx mov rcx, [rbp+var_80] mov rax, [rbp+var_98] mov rdx, [rbp+var_A0] sub rax, rdx mov eax, eax add rcx, rax add rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+0A0h], rcx mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 82h mov [rax+624h], ecx mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rdx, [rbp+var_78] mov rcx, [rbp+var_98] mov r8, [rbp+var_48] call _ma_pack_rec_unpack mov [rbp+var_64], eax jmp short loc_38C05 loc_38BF9: jmp short $+2 loc_38BFB: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax loc_38C05: mov eax, [rbp+var_64] mov [rbp+var_A4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_38C2F mov eax, [rbp+var_A4] add rsp, 0B0h pop rbp retn loc_38C2F: call ___stack_chk_fail
long long ma_read_rnd_mempack_record(_DWORD *a1, long long a2, unsigned long long a3) { unsigned long long v4; // [rsp+10h] [rbp-A0h] long long block_info; // [rsp+18h] [rbp-98h] _BYTE v8[24]; // [rsp+50h] [rbp-60h] BYREF long long v9; // [rsp+68h] [rbp-48h] unsigned long long v10; // [rsp+A8h] [rbp-8h] v10 = __readfsqword(0x28u); if ( a3 >= *(_QWORD *)(*(_QWORD *)a1 + 64LL) ) { *(_DWORD *)my_thread_var() = 137; return *(unsigned int *)my_thread_var(); } v4 = a3 + *(_QWORD *)(*(_QWORD *)a1 + 1520LL); block_info = ma_mempack_get_block_info(a1, a1 + 164, v8, a1 + 232, a1 + 280, v4); if ( !block_info ) return *(unsigned int *)my_thread_var(); *((_QWORD *)a1 + 138) = v9; *((_QWORD *)a1 + 19) = a3; *((_QWORD *)a1 + 20) = v9 + (unsigned int)(block_info - v4) + a3; a1[393] |= 0x82u; return (unsigned int)ma_pack_rec_unpack(a1, (long long)(a1 + 164), a2, block_info, v9); }
_ma_read_rnd_mempack_record: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV AL,CL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RBP + -0x81],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RCX + 0x40] JC 0x00138b1b CALL 0x001f6090 MOV dword ptr [RAX],0x89 JMP 0x00138bf9 LAB_00138b1b: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x3a0 MOV R8,qword ptr [RBP + -0x70] ADD R8,0x460 MOV RAX,qword ptr [RBP + -0x90] MOV R9,qword ptr [RAX + 0x5f0] ADD R9,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0xa0],R9 LEA RDX,[RBP + -0x60] CALL 0x0013b250 MOV qword ptr [RBP + -0x98],RAX CMP RAX,0x0 JNZ 0x00138b74 JMP 0x00138bf9 LAB_00138b74: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x450],RCX MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0xa0] SUB RAX,RDX MOV EAX,EAX ADD RCX,RAX ADD RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x82 MOV dword ptr [RAX + 0x624],ECX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x98] MOV R8,qword ptr [RBP + -0x48] CALL 0x001382a0 MOV dword ptr [RBP + -0x64],EAX JMP 0x00138c05 LAB_00138bf9: JMP 0x00138bfb LAB_00138bfb: CALL 0x001f6090 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX LAB_00138c05: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0xa4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00138c2f MOV EAX,dword ptr [RBP + -0xa4] ADD RSP,0xb0 POP RBP RET LAB_00138c2f: CALL 0x0012a270
int4 _ma_read_rnd_mempack_record(long *param_1,int8 param_2,ulong param_3) { int8 uVar1; int4 *puVar2; long lVar3; long in_FS_OFFSET; int4 local_6c; int1 local_68 [24]; long local_50; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 < *(ulong *)(*param_1 + 0x40)) { uVar1 = *(int8 *)(*param_1 + 0x5f0); lVar3 = _ma_mempack_get_block_info (param_1,param_1 + 0x52,local_68,param_1 + 0x74,param_1 + 0x8c); if (lVar3 != 0) { param_1[0x8a] = local_50; param_1[0x13] = param_3; param_1[0x14] = param_3 + (uint)((int)lVar3 - ((int)uVar1 + (int)param_3)) + local_50; *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 0x82; local_6c = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,lVar3,local_50); goto LAB_00138c05; } } else { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; } puVar2 = (int4 *)_my_thread_var(); local_6c = *puVar2; LAB_00138c05: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }
51,768
ma_read_rnd_mempack_record
eloqsql/storage/maria/ma_packrec.c
static int _ma_read_rnd_mempack_record(MARIA_HA *info, uchar *buf, register MARIA_RECORD_POS filepos, my_bool skip_deleted_blocks __attribute__((unused))) { MARIA_BLOCK_INFO block_info; MARIA_SHARE *share= info->s; uchar *pos,*start; DBUG_ENTER("_ma_read_rnd_mempack_record"); if (filepos >= share->state.state.data_file_length) { my_errno=HA_ERR_END_OF_FILE; goto err; } if (!(pos= (uchar*) _ma_mempack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, (uchar*) (start= share->file_map + filepos)))) goto err; #ifndef DBUG_OFF if (block_info.rec_len > info->s->max_pack_length) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } #endif info->packed_length=block_info.rec_len; info->cur_row.lastpos= filepos; info->cur_row.nextpos= filepos+(uint) (pos-start)+block_info.rec_len; info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; DBUG_RETURN (_ma_pack_rec_unpack(info, &info->bit_buff, buf, pos, block_info.rec_len)); err: DBUG_RETURN(my_errno); }
O3
c
ma_read_rnd_mempack_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rdi cmpq %rdx, 0x40(%rdi) jbe 0x3a589 movq %rdx, %r15 movq %rsi, %rbx leaq 0x290(%r14), %r12 leaq 0x3a0(%r14), %rcx leaq 0x460(%r14), %r8 movq 0x5f0(%rdi), %r13 addq %rdx, %r13 leaq -0x88(%rbp), %rdx movq %r12, %rsi movq %r13, %r9 callq 0x3be99 testq %rax, %rax je 0x3a594 movq -0x70(%rbp), %r8 movq %r8, 0x450(%r14) movq %r15, 0x98(%r14) movl %eax, %ecx subl %r13d, %ecx addq %r8, %r15 addq %rcx, %r15 movq %r15, 0xa0(%r14) orb $-0x7e, 0x624(%r14) movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x3a5b9 movq %r14, %rdi movq %r12, %rsi movq %rbx, %rdx movq %rax, %rcx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x39ff9 callq 0xa1a06 movl $0x89, (%rax) callq 0xa1a06 movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x3a5b9 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
_ma_read_rnd_mempack_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rdi, [rdi] cmp [rdi+40h], rdx jbe loc_3A589 mov r15, rdx mov rbx, rsi lea r12, [r14+290h] lea rcx, [r14+3A0h] lea r8, [r14+460h] mov r13, [rdi+5F0h] add r13, rdx lea rdx, [rbp+var_88] mov rsi, r12 mov r9, r13 call _ma_mempack_get_block_info test rax, rax jz short loc_3A594 mov r8, [rbp+var_70] mov [r14+450h], r8 mov [r14+98h], r15 mov ecx, eax sub ecx, r13d add r15, r8 add r15, rcx mov [r14+0A0h], r15 or byte ptr [r14+624h], 82h mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_3A5B9 mov rdi, r14 mov rsi, r12 mov rdx, rbx mov rcx, rax add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ma_pack_rec_unpack loc_3A589: call _my_thread_var mov dword ptr [rax], 89h loc_3A594: call _my_thread_var mov eax, [rax] mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_3A5B9 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3A5B9: call ___stack_chk_fail
long long ma_read_rnd_mempack_record(long long *a1, long long a2, unsigned long long a3, long long a4, long long a5) { long long v6; // rdi long long v8; // rbx unsigned long long v9; // r13 long long block_info; // rax long long v11; // rdx long long v12; // rcx long long v13; // r8 int v14; // r9d long long v15; // r8 _BYTE v17[24]; // [rsp+8h] [rbp-88h] BYREF long long v18; // [rsp+20h] [rbp-70h] unsigned long long v19; // [rsp+60h] [rbp-30h] v19 = __readfsqword(0x28u); v6 = *a1; if ( *(_QWORD *)(v6 + 64) <= a3 ) { *(_DWORD *)my_thread_var(v6, a2, a3, a4, a5) = 137; } else { v8 = a2; v9 = a3 + *(_QWORD *)(v6 + 1520); a2 = (long long)(a1 + 82); block_info = ma_mempack_get_block_info(v6, a1 + 82, v17, a1 + 116, a1 + 140, v9); if ( block_info ) { v15 = v18; a1[138] = v18; a1[19] = a3; a1[20] = (unsigned int)(block_info - v9) + v15 + a3; *((_BYTE *)a1 + 1572) |= 0x82u; return ma_pack_rec_unpack(a1, (long long)(a1 + 82), v8, block_info, v15, v14); } } return *(unsigned int *)my_thread_var(v6, a2, v11, v12, v13); }
_ma_read_rnd_mempack_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RDI] CMP qword ptr [RDI + 0x40],RDX JBE 0x0013a589 MOV R15,RDX MOV RBX,RSI LEA R12,[R14 + 0x290] LEA RCX,[R14 + 0x3a0] LEA R8,[R14 + 0x460] MOV R13,qword ptr [RDI + 0x5f0] ADD R13,RDX LEA RDX,[RBP + -0x88] MOV RSI,R12 MOV R9,R13 CALL 0x0013be99 TEST RAX,RAX JZ 0x0013a594 MOV R8,qword ptr [RBP + -0x70] MOV qword ptr [R14 + 0x450],R8 MOV qword ptr [R14 + 0x98],R15 MOV ECX,EAX SUB ECX,R13D ADD R15,R8 ADD R15,RCX MOV qword ptr [R14 + 0xa0],R15 OR byte ptr [R14 + 0x624],0x82 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0013a5b9 MOV RDI,R14 MOV RSI,R12 MOV RDX,RBX MOV RCX,RAX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00139ff9 LAB_0013a589: CALL 0x001a1a06 MOV dword ptr [RAX],0x89 LAB_0013a594: CALL 0x001a1a06 MOV EAX,dword ptr [RAX] MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0013a5b9 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013a5b9: CALL 0x00129270
ulong _ma_read_rnd_mempack_record(long *param_1,int8 param_2,ulong param_3) { long lVar1; ulong uVar2; int4 *puVar3; uint *puVar4; long lVar5; long in_FS_OFFSET; int1 local_90 [24]; long local_78; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *param_1; if (param_3 < *(ulong *)(lVar1 + 0x40)) { lVar5 = *(long *)(lVar1 + 0x5f0) + param_3; lVar1 = _ma_mempack_get_block_info (lVar1,param_1 + 0x52,local_90,param_1 + 0x74,param_1 + 0x8c,lVar5); if (lVar1 != 0) { param_1[0x8a] = local_78; param_1[0x13] = param_3; param_1[0x14] = param_3 + local_78 + (ulong)(uint)((int)lVar1 - (int)lVar5); *(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 0x82; if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { uVar2 = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,lVar1); return uVar2; } goto LAB_0013a5b9; } } else { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; } puVar4 = (uint *)_my_thread_var(); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return (ulong)*puVar4; } LAB_0013a5b9: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
51,769
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; }
O3
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 0x86a9a 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 0x868c8 movq %rbx, 0x10(%r12) movq %r14, %rdi movq %r12, %rsi callq 0x872f9 testl %eax, %eax jns 0x8d1f4 incq 0x80(%rsp) decq %r15 movq 0x10(%rsp), %rax testq %rax, %rax movq (%rsp), %r13 je 0x8d214 movq 0x30(%rsp), %rsi testq %rsi, %rsi je 0x8d214 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) leaq 0x1(%r13), %rsi xorl %r12d, %r12d cmpq $0x2, %rsi movq %r15, 0x38(%rsp) jae 0x8d22a xorl %ebx, %ebx jmp 0x8d254 shrq %rsi bsrq %rsi, %r14 xorq $0x3f, %r14 movl %r14d, %ecx andb $0x3e, %cl shlq %cl, %rsi leaq 0x10(%rsp), %rdi callq 0x88f68 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 0x88d9b movq %rbx, (%rsp) testq %rbx, %rbx jle 0x8d347 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 0x88d9b movq %r12, %rdi movq %r13, %rsi movq %r15, %rdx movl $0x6, %ecx callq 0x896b8 movl $0x1, %edx movq %r13, %rdi movq %r12, %rsi movq %r15, %rcx xorl %r8d, %r8d callq 0x88d9b movq %r14, %rdi movq %r14, %rsi movq %r13, %rdx movq %r15, %rcx xorl %r8d, %r8d leaq -0x3887(%rip), %r9 # 0x89ab6 callq 0x899fd decq %rbx jne 0x8d2e8 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 0x88d9b leaq -0x38fb(%rip), %r9 # 0x89ab6 movq %r14, %rdi movq %r13, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x899fd movq %r12, %rdi movq %r14, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x8853c 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 0x8d414 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 0x8d4b3 incq %rbp leaq 0x10(%rsp), %r13 leaq 0x48(%rsp), %r14 leaq 0x98(%rsp), %r12 movl $0x1, %esi movq %r13, %rdi callq 0x868c8 leaq 0x1(,%rbp,2), %rsi movq %r14, %rdi callq 0x868c8 movq %r13, %rdi movq %r13, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d leaq -0x39bc(%rip), %r9 # 0x89ab6 callq 0x899fd movq %rbx, %rdi movq %rbx, %rsi movq %r13, %rdx movq %r15, %rcx xorl %r8d, %r8d leaq -0x39f6(%rip), %r9 # 0x89a97 callq 0x899fd movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x8853c leaq -0x1(%rbp), %rax cmpq $0x1, %rbp movq %rax, %rbp ja 0x8d43f movl $0x1, %edx movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rcx xorl %r8d, %r8d callq 0x88d9b leaq 0xc0(%rsp), %r14 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x8853c movq (%r14), %rax testq %rax, %rax je 0x8d502 movq 0xe0(%rsp), %rsi testq %rsi, %rsi je 0x8d502 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x98(%rsp), %rax testq %rax, %rax movq 0x38(%rsp), %r12 je 0x8d529 movq 0xb8(%rsp), %rsi testq %rsi, %rsi je 0x8d529 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x48(%rsp), %rax testq %rax, %rax je 0x8d545 movq 0x68(%rsp), %rsi testq %rsi, %rsi je 0x8d545 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x10(%rsp), %rax testq %rax, %rax je 0x8d561 movq 0x30(%rsp), %rsi testq %rsi, %rsi je 0x8d561 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x18(%rbx), %rcx testq %rcx, %rcx je 0x8d5b8 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 0x86c43 leaq 0x70(%rsp), %r14 movq (%r14), %rcx addq $0x10, %rcx leaq -0x1033(%rip), %r8 # 0x8c598 movq %r14, %rdi movq %r15, %rsi movl $0x6, %edx xorl %r9d, %r9d callq 0x8c49c movq %r14, %rdi movq %r14, %rsi movq %r12, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x89e98 leaq -0x3b62(%rip), %r9 # 0x89a97 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x899fd movq (%r14), %rax testq %rax, %rax je 0x8d62a movq 0x90(%rsp), %rsi testq %rsi, %rsi je 0x8d62a 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_8D1F4 inc [rsp+118h+var_98] dec r15 loc_8D1F4: mov rax, [rsp+118h+var_108] test rax, rax mov r13, [rsp+118h+var_118] jz short loc_8D214 mov rsi, [rsp+118h+var_E8] test rsi, rsi jz short loc_8D214 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8D214: lea rsi, [r13+1] xor r12d, r12d cmp rsi, 2 mov [rsp+118h+var_E0], r15 jnb short loc_8D22A xor ebx, ebx jmp short loc_8D254 loc_8D22A: 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_8D254: 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_8D347 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_8D2E8: 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_8D2E8 loc_8D347: 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_8D414 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_8D414: mov rax, 8000000000000000h dec rax cmp rbp, rax jnb loc_8D4B3 inc rbp lea r13, [rsp+118h+var_108] lea r14, [rsp+118h+var_D0] lea r12, [rsp+118h+var_80] loc_8D43F: 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 ja short loc_8D43F loc_8D4B3: 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_8D502 mov rsi, [rsp+118h+var_38] test rsi, rsi jz short loc_8D502 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8D502: mov rax, [rsp+118h+var_80] test rax, rax mov r12, [rsp+118h+var_E0] jz short loc_8D529 mov rsi, [rsp+118h+var_60] test rsi, rsi jz short loc_8D529 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8D529: mov rax, [rsp+118h+var_D0] test rax, rax jz short loc_8D545 mov rsi, qword ptr [rsp+118h+var_B8+8] test rsi, rsi jz short loc_8D545 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8D545: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_8D561 mov rsi, [rsp+118h+var_E8] test rsi, rsi jz short loc_8D561 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8D561: mov rcx, [rbx+18h] test rcx, rcx jz short loc_8D5B8 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_8D5B8: 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_8D62A mov rsi, [rsp+118h+var_88] test rsi, rsi jz short loc_8D62A mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8D62A: 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 unsigned 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((_QWORD **)v11, 0x3FFFFFFFFFFFFFFFLL, 1u, 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 0x00186a9a 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 0x001868c8 MOV qword ptr [R12 + 0x10],RBX MOV RDI,R14 MOV RSI,R12 CALL 0x001872f9 TEST EAX,EAX JNS 0x0018d1f4 INC qword ptr [RSP + 0x80] DEC R15 LAB_0018d1f4: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX MOV R13,qword ptr [RSP] JZ 0x0018d214 MOV RSI,qword ptr [RSP + 0x30] TEST RSI,RSI JZ 0x0018d214 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018d214: LEA RSI,[R13 + 0x1] XOR R12D,R12D CMP RSI,0x2 MOV qword ptr [RSP + 0x38],R15 JNC 0x0018d22a XOR EBX,EBX JMP 0x0018d254 LAB_0018d22a: SHR RSI,0x1 BSR R14,RSI XOR R14,0x3f MOV ECX,R14D AND CL,0x3e SHL RSI,CL LEA RDI,[RSP + 0x10] CALL 0x00188f68 MOV RBX,RAX SHR R14D,0x1 MOV ECX,R14D SHR RBX,CL LAB_0018d254: 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 0x00188d9b MOV qword ptr [RSP],RBX TEST RBX,RBX JLE 0x0018d347 LEA R13,[RSP + 0x10] LEA R14,[RSP + 0x70] LEA R12,[RSP + 0x48] MOV RBX,qword ptr [RSP] LAB_0018d2e8: MOV EDX,0x1 MOV RDI,R13 MOV RSI,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x00188d9b MOV RDI,R12 MOV RSI,R13 MOV RDX,R15 MOV ECX,0x6 CALL 0x001896b8 MOV EDX,0x1 MOV RDI,R13 MOV RSI,R12 MOV RCX,R15 XOR R8D,R8D CALL 0x00188d9b MOV RDI,R14 MOV RSI,R14 MOV RDX,R13 MOV RCX,R15 XOR R8D,R8D LEA R9,[0x189ab6] CALL 0x001899fd DEC RBX JNZ 0x0018d2e8 LAB_0018d347: 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 0x00188d9b LEA R9,[0x189ab6] MOV RDI,R14 MOV RSI,R13 MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x001899fd MOV RDI,R12 MOV RSI,R14 MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x0018853c 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 0x0018d414 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_0018d414: MOV RAX,-0x8000000000000000 DEC RAX CMP RBP,RAX JNC 0x0018d4b3 INC RBP LEA R13,[RSP + 0x10] LEA R14,[RSP + 0x48] LEA R12,[RSP + 0x98] LAB_0018d43f: MOV ESI,0x1 MOV RDI,R13 CALL 0x001868c8 LEA RSI,[0x1 + RBP*0x2] MOV RDI,R14 CALL 0x001868c8 MOV RDI,R13 MOV RSI,R13 MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D LEA R9,[0x189ab6] CALL 0x001899fd MOV RDI,RBX MOV RSI,RBX MOV RDX,R13 MOV RCX,R15 XOR R8D,R8D LEA R9,[0x189a97] CALL 0x001899fd MOV RDI,RBX MOV RSI,RBX MOV RDX,R12 MOV RCX,R15 XOR R8D,R8D CALL 0x0018853c LEA RAX,[RBP + -0x1] CMP RBP,0x1 MOV RBP,RAX JA 0x0018d43f LAB_0018d4b3: MOV EDX,0x1 MOV RDI,RBX MOV RSI,RBX MOV RCX,R15 XOR R8D,R8D CALL 0x00188d9b LEA R14,[RSP + 0xc0] MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x0018853c MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x0018d502 MOV RSI,qword ptr [RSP + 0xe0] TEST RSI,RSI JZ 0x0018d502 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018d502: MOV RAX,qword ptr [RSP + 0x98] TEST RAX,RAX MOV R12,qword ptr [RSP + 0x38] JZ 0x0018d529 MOV RSI,qword ptr [RSP + 0xb8] TEST RSI,RSI JZ 0x0018d529 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018d529: MOV RAX,qword ptr [RSP + 0x48] TEST RAX,RAX JZ 0x0018d545 MOV RSI,qword ptr [RSP + 0x68] TEST RSI,RSI JZ 0x0018d545 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018d545: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0018d561 MOV RSI,qword ptr [RSP + 0x30] TEST RSI,RSI JZ 0x0018d561 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018d561: MOV RCX,qword ptr [RBX + 0x18] TEST RCX,RCX JZ 0x0018d5b8 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 0x00186c43 LAB_0018d5b8: LEA R14,[RSP + 0x70] MOV RCX,qword ptr [R14] ADD RCX,0x10 LEA R8,[0x18c598] MOV RDI,R14 MOV RSI,R15 MOV EDX,0x6 XOR R9D,R9D CALL 0x0018c49c MOV RDI,R14 MOV RSI,R14 MOV RDX,R12 MOV RCX,R15 XOR R8D,R8D CALL 0x00189e98 LEA R9,[0x189a97] MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x001899fd MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x0018d62a MOV RSI,qword ptr [RSP + 0x90] TEST RSI,RSI JZ 0x0018d62a MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018d62a: 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) { uVar5 = uVar5 + 1; do { bf_set_ui(&local_108,1); bf_set_ui(&local_d0,uVar5 * 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 < uVar5; uVar5 = uVar5 - 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; }
51,770
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_create_directory_with_parents(const std::string & path) { #ifdef _WIN32 std::wstring_convert<std::codecvt_utf8<wchar_t>> converter; std::wstring wpath = converter.from_bytes(path); // if the path already exists, check whether it's a directory const DWORD attributes = GetFileAttributesW(wpath.c_str()); if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) { return true; } size_t pos_slash = 0; // process path from front to back, procedurally creating directories while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) { const std::wstring subpath = wpath.substr(0, pos_slash); const wchar_t * test = subpath.c_str(); const bool success = CreateDirectoryW(test, NULL); if (!success) { const DWORD error = GetLastError(); // if the path already exists, ensure that it's a directory if (error == ERROR_ALREADY_EXISTS) { const DWORD attributes = GetFileAttributesW(subpath.c_str()); if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) { return false; } } else { return false; } } pos_slash += 1; } return true; #else // if the path already exists, check whether it's a directory struct stat info; if (stat(path.c_str(), &info) == 0) { return S_ISDIR(info.st_mode); } size_t pos_slash = 1; // skip leading slashes for directory creation // process path from front to back, procedurally creating directories while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) { const std::string subpath = path.substr(0, pos_slash); struct stat info; // if the path already exists, ensure that it's a directory if (stat(subpath.c_str(), &info) == 0) { if (!S_ISDIR(info.st_mode)) { return false; } } else { // create parent directories const int ret = mkdir(subpath.c_str(), 0755); if (ret != 0) { return false; } } pos_slash += 1; } return true; #endif // _WIN32 }
O2
cpp
fs_create_directory_with_parents(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 $0x148, %rsp # imm = 0x148 movq %rdi, %rbx movq (%rdi), %rdi leaq 0xb8(%rsp), %rsi callq 0x20640 testl %eax, %eax je 0x24881 pushq $0x1 popq %r14 leaq 0x8(%rsp), %r15 leaq 0x28(%rsp), %r12 movq %rbx, %rdi pushq $0x2f popq %rsi movq %r14, %rdx callq 0x20890 cmpq $-0x1, %rax sete %r13b je 0x24896 movq %rax, %r14 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x20710 movq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x20640 testl %eax, %eax je 0x2485a movq 0x8(%rsp), %rdi movl $0x1ed, %esi # imm = 0x1ED callq 0x20340 testl %eax, %eax je 0x2486c xorl %ebp, %ebp jmp 0x24872 movl 0x40(%rsp), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax cmpl $0x4000, %eax # imm = 0x4000 jne 0x24856 incq %r14 movb $0x1, %bpl movq %r15, %rdi callq 0x20d88 testb %bpl, %bpl jne 0x24807 jmp 0x24896 movl $0xf000, %eax # imm = 0xF000 andl 0xd0(%rsp), %eax cmpl $0x4000, %eax # imm = 0x4000 sete %r13b movl %r13d, %eax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov rbx, rdi mov rdi, [rdi] lea rsi, [rsp+178h+var_C0] call _stat test eax, eax jz loc_24881 push 1 pop r14 lea r15, [rsp+178h+var_170] lea r12, [rsp+178h+var_150] loc_24807: mov rdi, rbx push 2Fh ; '/' pop rsi mov rdx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh setz r13b jz short loc_24896 mov r14, rax mov rdi, r15 mov rsi, rbx xor edx, edx mov rcx, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+178h+var_170] mov rsi, r12 call _stat test eax, eax jz short loc_2485A mov rdi, [rsp+178h+var_170] mov esi, 1EDh call _mkdir test eax, eax jz short loc_2486C loc_24856: xor ebp, ebp jmp short loc_24872 loc_2485A: mov eax, [rsp+178h+var_138] mov ecx, 0F000h and eax, ecx cmp eax, 4000h jnz short loc_24856 loc_2486C: inc r14 mov bpl, 1 loc_24872: mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_24807 jmp short loc_24896 loc_24881: mov eax, 0F000h and eax, [rsp+178h+var_A8] cmp eax, 4000h setz r13b loc_24896: mov eax, r13d add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long fs_create_directory_with_parents(_QWORD *a1) { unsigned int v1; // r13d long long v2; // r14 long long v3; // rax char v4; // bp _QWORD v6[4]; // [rsp+8h] [rbp-170h] BYREF _BYTE v7[24]; // [rsp+28h] [rbp-150h] BYREF int v8; // [rsp+40h] [rbp-138h] _BYTE v9[24]; // [rsp+B8h] [rbp-C0h] BYREF int v10; // [rsp+D0h] [rbp-A8h] if ( (unsigned int)stat(*a1, v9) ) { v2 = 1LL; while ( 1 ) { v3 = std::string::find(a1, 47LL, v2); LOBYTE(v1) = v3 == -1; if ( v3 == -1 ) return v1; v2 = v3; std::string::substr(v6, a1, 0LL, v3); if ( (unsigned int)stat(v6[0], v7) ) { if ( !(unsigned int)mkdir(v6[0], 493LL) ) goto LABEL_8; } else if ( (v8 & 0xF000) == 0x4000 ) { LABEL_8: ++v2; v4 = 1; goto LABEL_9; } v4 = 0; LABEL_9: std::string::~string(v6); if ( !v4 ) return v1; } } LOBYTE(v1) = (v10 & 0xF000) == 0x4000; return v1; }
fs_create_directory_with_parents: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV RBX,RDI MOV RDI,qword ptr [RDI] LEA RSI,[RSP + 0xb8] CALL 0x00120640 TEST EAX,EAX JZ 0x00124881 PUSH 0x1 POP R14 LEA R15,[RSP + 0x8] LEA R12,[RSP + 0x28] LAB_00124807: MOV RDI,RBX PUSH 0x2f POP RSI MOV RDX,R14 CALL 0x00120890 CMP RAX,-0x1 SETZ R13B JZ 0x00124896 MOV R14,RAX MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX MOV RCX,RAX CALL 0x00120710 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R12 CALL 0x00120640 TEST EAX,EAX JZ 0x0012485a MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1ed CALL 0x00120340 TEST EAX,EAX JZ 0x0012486c LAB_00124856: XOR EBP,EBP JMP 0x00124872 LAB_0012485a: MOV EAX,dword ptr [RSP + 0x40] MOV ECX,0xf000 AND EAX,ECX CMP EAX,0x4000 JNZ 0x00124856 LAB_0012486c: INC R14 MOV BPL,0x1 LAB_00124872: MOV RDI,R15 CALL 0x00120d88 TEST BPL,BPL JNZ 0x00124807 JMP 0x00124896 LAB_00124881: MOV EAX,0xf000 AND EAX,dword ptr [RSP + 0xd0] CMP EAX,0x4000 SETZ R13B LAB_00124896: MOV EAX,R13D ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* fs_create_directory_with_parents(std::__cxx11::string const&) */ ulong fs_create_directory_with_parents(string *param_1) { bool bVar1; int iVar2; long lVar3; ulong unaff_R13; char *local_170 [4]; stat local_150; stat local_c0; iVar2 = stat(*(char **)param_1,&local_c0); if (iVar2 == 0) { unaff_R13 = CONCAT71((int7)(unaff_R13 >> 8),(local_c0.st_mode & 0xf000) == 0x4000); } else { do { lVar3 = std::__cxx11::string::find((char)param_1,0x2f); unaff_R13 = CONCAT71((int7)(unaff_R13 >> 8),lVar3 == -1); if (lVar3 == -1) break; std::__cxx11::string::substr((ulong)local_170,(ulong)param_1); iVar2 = stat(local_170[0],&local_150); if (iVar2 == 0) { if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_00124856; LAB_0012486c: bVar1 = true; } else { iVar2 = mkdir(local_170[0],0x1ed); if (iVar2 == 0) goto LAB_0012486c; LAB_00124856: bVar1 = false; } std::__cxx11::string::~string((string *)local_170); } while (bVar1); } return unaff_R13 & 0xffffffff; }
51,771
yy::parser::error(yy::location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
msxemulator/build_O0/_deps/pico_sdk-src/tools/pioasm/gen/parser.cpp
void yy::parser::error(const location_type& l, const std::string& m) { if (l.begin.filename) { std::cerr << l << ": " << m << '\n'; pioasm.error_count++; if (l.begin.line == l.end.line && *l.begin.filename == *l.end.filename) { std::ifstream file(l.begin.filename->c_str()); std::string line; for(int i = 0; i < l.begin.line; ++i) { std::getline(file, line); } fprintf(stderr, "%5d | %s\n", l.begin.line, line.c_str()); fprintf(stderr, "%5s | %*s", "", l.begin.column, "^"); for (int i = l.begin.column; i < l.end.column - 1; i++) { putc ('~', stderr); } putc ('\n', stderr); } } else { std::cerr << m << '\n'; } }
O0
cpp
yy::parser::error(yy::location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x278, %rsp # imm = 0x278 movq %rdi, 0x270(%rsp) movq %rsi, 0x268(%rsp) movq %rdx, 0x260(%rsp) movq 0x270(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x268(%rsp), %rax cmpq $0x0, (%rax) je 0x3cbd6 movq 0x268(%rsp), %rsi movq 0x3460b(%rip), %rdi # 0x70fe8 callq 0x13290 movq %rax, %rdi leaq 0x1954c(%rip), %rsi # 0x55f38 callq 0x7350 movq %rax, %rdi movq 0x260(%rsp), %rsi callq 0x7310 movq %rax, %rdi movl $0xa, %esi callq 0x73f0 movq 0x18(%rsp), %rax movq 0x40(%rax), %rax movl 0x28(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x28(%rax) movq 0x268(%rsp), %rax movl 0x8(%rax), %eax movq 0x268(%rsp), %rcx cmpl 0x18(%rcx), %eax jne 0x3cbd4 movq 0x268(%rsp), %rax movq (%rax), %rdi movq 0x268(%rsp), %rax movq 0x10(%rax), %rsi callq 0xbf40 testb $0x1, %al jne 0x3ca61 jmp 0x3cbd4 movq 0x268(%rsp), %rax movq (%rax), %rdi callq 0x7180 movq %rax, %rsi leaq 0x58(%rsp), %rdi movl $0x8, %edx callq 0x7630 leaq 0x38(%rsp), %rdi callq 0x74d0 movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax movq 0x268(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0x3caed leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x70b0 jmp 0x3cab7 jmp 0x3cab9 movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) jmp 0x3ca95 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x38(%rsp), %rdi callq 0x76d8 leaq 0x58(%rsp), %rdi callq 0x70e0 jmp 0x3cbff movq 0x344d4(%rip), %rax # 0x70fc8 movq (%rax), %rax movq %rax, 0x8(%rsp) movq 0x268(%rsp), %rax movl 0x8(%rax), %eax movl %eax, 0x14(%rsp) leaq 0x38(%rsp), %rdi callq 0x7180 movq 0x8(%rsp), %rdi movl 0x14(%rsp), %edx movq %rax, %rcx leaq 0x1b0b8(%rip), %rsi # 0x57be0 movb $0x0, %al callq 0x7500 movq 0x34492(%rip), %rax # 0x70fc8 movq (%rax), %rdi movq 0x268(%rsp), %rax movl 0xc(%rax), %ecx leaq 0x1b09f(%rip), %rsi # 0x57bea leaq 0x1be4a(%rip), %rdx # 0x5899c leaq 0x1b09b(%rip), %r8 # 0x57bf4 movb $0x0, %al callq 0x7500 movq 0x268(%rsp), %rax movl 0xc(%rax), %eax movl %eax, 0x20(%rsp) movl 0x20(%rsp), %eax movq 0x268(%rsp), %rcx movl 0x1c(%rcx), %ecx subl $0x1, %ecx cmpl %ecx, %eax jge 0x3cbaa movq 0x3443c(%rip), %rax # 0x70fc8 movq (%rax), %rsi movl $0x7e, %edi callq 0x7680 jmp 0x3cb9b jmp 0x3cb9d movl 0x20(%rsp), %eax addl $0x1, %eax movl %eax, 0x20(%rsp) jmp 0x3cb6f movq 0x34417(%rip), %rax # 0x70fc8 movq (%rax), %rsi movl $0xa, %edi callq 0x7680 jmp 0x3cbc0 leaq 0x38(%rsp), %rdi callq 0x76d8 leaq 0x58(%rsp), %rdi callq 0x70e0 jmp 0x3cbf7 movq 0x260(%rsp), %rsi movq 0x34403(%rip), %rdi # 0x70fe8 callq 0x7310 movq %rax, %rdi movl $0xa, %esi callq 0x73f0 addq $0x278, %rsp # imm = 0x278 retq movq 0x28(%rsp), %rdi callq 0x75f0 nopl (%rax)
_ZN2yy6parser5errorERKNS_8locationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 278h mov [rsp+278h+var_8], rdi mov [rsp+278h+var_10], rsi mov [rsp+278h+var_18], rdx mov rax, [rsp+278h+var_8] mov [rsp+278h+var_260], rax mov rax, [rsp+278h+var_10] cmp qword ptr [rax], 0 jz loc_3CBD6 mov rsi, [rsp+278h+var_10] mov rdi, cs:_ZSt4cerr_ptr call _ZN2yylsIcEERSt13basic_ostreamIT_St11char_traitsIS2_EES6_RKNS_8locationE; yy::operator<<<char>(std::ostream &,yy::location const&) mov rdi, rax lea rsi, aIntegerIsOutOf+17h; ": " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, [rsp+278h+var_18] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov esi, 0Ah call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rax, [rsp+278h+var_260] mov rax, [rax+40h] mov ecx, [rax+28h] add ecx, 1 mov [rax+28h], ecx mov rax, [rsp+278h+var_10] mov eax, [rax+8] mov rcx, [rsp+278h+var_10] cmp eax, [rcx+18h] jnz loc_3CBD4 mov rax, [rsp+278h+var_10] mov rdi, [rax] mov rax, [rsp+278h+var_10] mov rsi, [rax+10h] call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, 1 jnz short loc_3CA61 jmp loc_3CBD4 loc_3CA61: mov rax, [rsp+278h+var_10] mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rsi, rax lea rdi, [rsp+278h+var_220] mov edx, 8 call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode) lea rdi, [rsp+278h+var_240] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov [rsp+278h+var_244], 0 loc_3CA95: mov eax, [rsp+278h+var_244] mov rcx, [rsp+278h+var_10] cmp eax, [rcx+8] jge short loc_3CAED lea rdi, [rsp+278h+var_220] lea rsi, [rsp+278h+var_240] call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &) jmp short $+2 loc_3CAB7: jmp short $+2 loc_3CAB9: mov eax, [rsp+278h+var_244] add eax, 1 mov [rsp+278h+var_244], eax jmp short loc_3CA95 mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+arg_50] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() jmp loc_3CBFF loc_3CAED: mov rax, cs:stderr_ptr mov rax, [rax] mov [rsp+278h+var_270], rax mov rax, [rsp+278h+var_10] mov eax, [rax+8] mov [rsp+278h+var_264], eax lea rdi, [rsp+278h+var_240] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+278h+var_270] mov edx, [rsp+278h+var_264] mov rcx, rax lea rsi, a5dS; "%5d | %s\n" mov al, 0 call _fprintf mov rax, cs:stderr_ptr mov rdi, [rax] mov rax, [rsp+278h+var_10] mov ecx, [rax+0Ch] lea rsi, a5sS; "%5s | %*s" lea rdx, asc_58999+3; "" lea r8, asc_57BF4; "^" mov al, 0 call _fprintf mov rax, [rsp+278h+var_10] mov eax, [rax+0Ch] mov [rsp+278h+var_258], eax loc_3CB6F: mov eax, [rsp+278h+var_258] mov rcx, [rsp+278h+var_10] mov ecx, [rcx+1Ch] sub ecx, 1 cmp eax, ecx jge short loc_3CBAA mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 7Eh ; '~' call _putc jmp short $+2 loc_3CB9B: jmp short $+2 loc_3CB9D: mov eax, [rsp+278h+var_258] add eax, 1 mov [rsp+278h+var_258], eax jmp short loc_3CB6F loc_3CBAA: mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 0Ah call _putc jmp short $+2 loc_3CBC0: lea rdi, [rsp+278h+var_240]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+278h+var_220] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_3CBD4: jmp short loc_3CBF7 loc_3CBD6: mov rsi, [rsp+278h+var_18] mov rdi, cs:_ZSt4cerr_ptr call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov esi, 0Ah call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) loc_3CBF7: add rsp, 278h retn loc_3CBFF: mov rdi, [rsp+arg_20] call __Unwind_Resume
char yy::parser::error(long long a1, _QWORD *a2, long long a3) { long long v3; // rax long long v4; // rax long long v5; // rax int v6; // eax long long v7; // rax const char *v8; // rax long long v9; // rax long long v11; // [rsp+8h] [rbp-270h] int v12; // [rsp+14h] [rbp-264h] int j; // [rsp+20h] [rbp-258h] int i; // [rsp+34h] [rbp-244h] _BYTE v15[32]; // [rsp+38h] [rbp-240h] BYREF _BYTE v16[520]; // [rsp+58h] [rbp-220h] BYREF long long v17; // [rsp+260h] [rbp-18h] _QWORD *v18; // [rsp+268h] [rbp-10h] long long v19; // [rsp+270h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; if ( *a2 ) { v3 = yy::operator<<<char>((long long)&std::cerr, (long long)v18); v4 = std::operator<<<std::char_traits<char>>(v3, ": "); v5 = std::operator<<<char>(v4, v17); std::operator<<<std::char_traits<char>>(v5, 10LL); ++*(_DWORD *)(*(_QWORD *)(a1 + 64) + 40LL); v6 = *((_DWORD *)v18 + 2); if ( v6 == *((_DWORD *)v18 + 6) ) { LOBYTE(v6) = std::operator==<char>(*v18, v18[2]); if ( (v6 & 1) != 0 ) { v7 = std::string::c_str(*v18); std::ifstream::basic_ifstream(v16, v7, 8LL); std::string::basic_string(v15); for ( i = 0; i < *((_DWORD *)v18 + 2); ++i ) std::getline<char,std::char_traits<char>,std::allocator<char>>(v16, v15); v11 = stderr; v12 = *((_DWORD *)v18 + 2); v8 = (const char *)std::string::c_str(v15); fprintf(v11, "%5d | %s\n", v12, v8); fprintf(stderr, "%5s | %*s", "", *((_DWORD *)v18 + 3), "^"); for ( j = *((_DWORD *)v18 + 3); j < *((_DWORD *)v18 + 7) - 1; ++j ) putc(126LL, stderr); putc(10LL, stderr); std::string::~string(v15); LOBYTE(v6) = std::ifstream::~ifstream(v16); } } } else { v9 = std::operator<<<char>(&std::cerr, v17); LOBYTE(v6) = std::operator<<<std::char_traits<char>>(v9, 10LL); } return v6; }
error: SUB RSP,0x278 MOV qword ptr [RSP + 0x270],RDI MOV qword ptr [RSP + 0x268],RSI MOV qword ptr [RSP + 0x260],RDX MOV RAX,qword ptr [RSP + 0x270] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x268] CMP qword ptr [RAX],0x0 JZ 0x0013cbd6 MOV RSI,qword ptr [RSP + 0x268] MOV RDI,qword ptr [0x00170fe8] CALL 0x00113290 MOV RDI,RAX LEA RSI,[0x155f38] CALL 0x00107350 MOV RDI,RAX MOV RSI,qword ptr [RSP + 0x260] CALL 0x00107310 MOV RDI,RAX MOV ESI,0xa CALL 0x001073f0 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RAX + 0x28] ADD ECX,0x1 MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RSP + 0x268] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x268] CMP EAX,dword ptr [RCX + 0x18] JNZ 0x0013cbd4 MOV RAX,qword ptr [RSP + 0x268] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x268] MOV RSI,qword ptr [RAX + 0x10] CALL 0x0010bf40 TEST AL,0x1 JNZ 0x0013ca61 JMP 0x0013cbd4 LAB_0013ca61: MOV RAX,qword ptr [RSP + 0x268] MOV RDI,qword ptr [RAX] CALL 0x00107180 MOV RSI,RAX LEA RDI,[RSP + 0x58] MOV EDX,0x8 CALL 0x00107630 LEA RDI,[RSP + 0x38] CALL 0x001074d0 MOV dword ptr [RSP + 0x34],0x0 LAB_0013ca95: MOV EAX,dword ptr [RSP + 0x34] MOV RCX,qword ptr [RSP + 0x268] CMP EAX,dword ptr [RCX + 0x8] JGE 0x0013caed LAB_0013caa6: LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x38] CALL 0x001070b0 JMP 0x0013cab7 LAB_0013cab7: JMP 0x0013cab9 LAB_0013cab9: MOV EAX,dword ptr [RSP + 0x34] ADD EAX,0x1 MOV dword ptr [RSP + 0x34],EAX JMP 0x0013ca95 LAB_0013caed: MOV RAX,qword ptr [0x00170fc8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x268] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x14],EAX LEA RDI,[RSP + 0x38] CALL 0x00107180 MOV RDI,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RSP + 0x14] MOV RCX,RAX LEA RSI,[0x157be0] MOV AL,0x0 CALL 0x00107500 MOV RAX,qword ptr [0x00170fc8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x268] MOV ECX,dword ptr [RAX + 0xc] LEA RSI,[0x157bea] LEA RDX,[0x15899c] LEA R8,[0x157bf4] MOV AL,0x0 CALL 0x00107500 MOV RAX,qword ptr [RSP + 0x268] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RSP + 0x20],EAX LAB_0013cb6f: MOV EAX,dword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x268] MOV ECX,dword ptr [RCX + 0x1c] SUB ECX,0x1 CMP EAX,ECX JGE 0x0013cbaa MOV RAX,qword ptr [0x00170fc8] MOV RSI,qword ptr [RAX] MOV EDI,0x7e CALL 0x00107680 JMP 0x0013cb9b LAB_0013cb9b: JMP 0x0013cb9d LAB_0013cb9d: MOV EAX,dword ptr [RSP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP + 0x20],EAX JMP 0x0013cb6f LAB_0013cbaa: MOV RAX,qword ptr [0x00170fc8] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x00107680 LAB_0013cbbe: JMP 0x0013cbc0 LAB_0013cbc0: LEA RDI,[RSP + 0x38] CALL 0x001076d8 LEA RDI,[RSP + 0x58] CALL 0x001070e0 LAB_0013cbd4: JMP 0x0013cbf7 LAB_0013cbd6: MOV RSI,qword ptr [RSP + 0x260] MOV RDI,qword ptr [0x00170fe8] CALL 0x00107310 MOV RDI,RAX MOV ESI,0xa CALL 0x001073f0 LAB_0013cbf7: ADD RSP,0x278 RET
/* yy::parser::error(yy::location const&, std::__cxx11::string const&) */ void __thiscall yy::parser::error(parser *this,location *param_1,string *param_2) { uint uVar1; FILE *__stream; ostream *poVar2; ulong uVar3; int8 uVar4; int local_258; int local_244; string local_240 [32]; ifstream local_220 [520]; string *local_18; location *local_10; parser *local_8; local_18 = param_2; local_10 = param_1; local_8 = this; if (*(long *)param_1 == 0) { poVar2 = std::operator<<((ostream *)PTR_cerr_00170fe8,param_2); std::operator<<(poVar2,'\n'); } else { poVar2 = operator<<((ostream *)PTR_cerr_00170fe8,param_1); poVar2 = std::operator<<(poVar2,": "); poVar2 = std::operator<<(poVar2,local_18); std::operator<<(poVar2,'\n'); *(int *)(*(long *)(this + 0x40) + 0x28) = *(int *)(*(long *)(this + 0x40) + 0x28) + 1; if ((*(int *)(local_10 + 8) == *(int *)(local_10 + 0x18)) && (uVar3 = std::operator==(*(string **)local_10,*(string **)(local_10 + 0x10)), (uVar3 & 1) != 0)) { uVar4 = std::__cxx11::string::c_str(); std::ifstream::ifstream(local_220,uVar4,8); std::__cxx11::string::string(local_240); for (local_244 = 0; local_244 < *(int *)(local_10 + 8); local_244 = local_244 + 1) { /* try { // try from 0013caa6 to 0013cbbd has its CatchHandler @ 0013cac6 */ std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_220,local_240); } __stream = *(FILE **)PTR_stderr_00170fc8; uVar1 = *(uint *)(local_10 + 8); uVar4 = std::__cxx11::string::c_str(); fprintf(__stream,"%5d | %s\n",(ulong)uVar1,uVar4); fprintf(*(FILE **)PTR_stderr_00170fc8,"%5s | %*s",&DAT_0015899c, (ulong)*(uint *)(local_10 + 0xc),&DAT_00157bf4); for (local_258 = *(int *)(local_10 + 0xc); local_258 < *(int *)(local_10 + 0x1c) + -1; local_258 = local_258 + 1) { putc(0x7e,*(FILE **)PTR_stderr_00170fc8); } putc(10,*(FILE **)PTR_stderr_00170fc8); std::__cxx11::string::~string(local_240); std::ifstream::~ifstream(local_220); } } return; }
51,772
evmone::ExecutionState::ExecutionState(evmc_message const&, evmc_revision, evmc_host_interface const&, evmc_host_context*, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/execution_state.hpp
ExecutionState(const evmc_message& message, evmc_revision revision, const evmc_host_interface& host_interface, evmc_host_context* host_ctx, bytes_view _code) noexcept : msg{&message}, host{host_interface, host_ctx}, rev{revision}, original_code{_code} {}
O3
cpp
evmone::ExecutionState::ExecutionState(evmc_message const&, evmc_revision, evmc_host_interface const&, evmc_host_context*, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r12 movq %rdi, %rbx addq $0x8, %rdi xorps %xmm0, %xmm0 movups %xmm0, (%rbx) xorl %r13d, %r13d movq %r13, 0x10(%rbx) movq $0x1000, 0x18(%rbx) # imm = 0x1000 callq 0x31078 movq %r12, 0x20(%rbx) leaq 0x7ca86(%rip), %rax # 0xae1c0 movq %rax, 0x28(%rbx) movq %r15, 0x30(%rbx) movq %r14, 0x38(%rbx) movl %ebp, 0x40(%rbx) leaq 0x58(%rbx), %rax movq %rax, 0x48(%rbx) movq %r13, 0x50(%rbx) movb %r13b, 0x58(%rbx) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0x68(%rbx) movl $0x0, 0x78(%rbx) movb %r13b, 0xb0(%rbx) leaq 0xb8(%rbx), %r14 movb %r13b, 0x1f0(%rbx) movl $0x20, %edi movl $0x8000, %esi # imm = 0x8000 callq 0x22470 movq %rax, %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rbx) movl $0x100, %edx # imm = 0x100 movq %r14, %rdi xorl %esi, %esi callq 0x22190 xorps %xmm0, %xmm0 movups %xmm0, 0x1f8(%rbx) movups %xmm0, 0x208(%rbx) movq %r15, 0x218(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6evmone14ExecutionStateC2ERK12evmc_message13evmc_revisionRK19evmc_host_interfaceP17evmc_host_contextSt17basic_string_viewIhN4evmc11byte_traitsIhEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov ebp, edx mov r12, rsi mov rbx, rdi add rdi, 8; this xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 xor r13d, r13d mov [rbx+10h], r13 mov qword ptr [rbx+18h], 1000h call _ZN6evmone6Memory17allocate_capacityEv; evmone::Memory::allocate_capacity(void) mov [rbx+20h], r12 lea rax, off_AE1C0 mov [rbx+28h], rax mov [rbx+30h], r15 mov [rbx+38h], r14 mov [rbx+40h], ebp lea rax, [rbx+58h] mov [rbx+48h], rax mov [rbx+50h], r13 mov [rbx+58h], r13b movaps xmm0, [rsp+38h+arg_0] movups xmmword ptr [rbx+68h], xmm0 mov dword ptr [rbx+78h], 0 mov [rbx+0B0h], r13b lea r14, [rbx+0B8h] mov [rbx+1F0h], r13b mov edi, 20h ; ' ' mov esi, 8000h call _aligned_alloc mov r15, rax xorps xmm0, xmm0 movups xmmword ptr [rbx+80h], xmm0 mov edx, 100h mov rdi, r14 xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [rbx+1F8h], xmm0 movups xmmword ptr [rbx+208h], xmm0 mov [rbx+218h], r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long evmone::ExecutionState::ExecutionState( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, __int128 a7) { long long v10; // r15 long long result; // rax *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 24) = 4096LL; evmone::Memory::allocate_capacity((evmone::Memory *)(a1 + 8)); *(_QWORD *)(a1 + 32) = a2; *(_QWORD *)(a1 + 40) = off_AE1C0; *(_QWORD *)(a1 + 48) = a4; *(_QWORD *)(a1 + 56) = a5; *(_DWORD *)(a1 + 64) = a3; *(_QWORD *)(a1 + 72) = a1 + 88; *(_QWORD *)(a1 + 80) = 0LL; *(_BYTE *)(a1 + 88) = 0; *(_OWORD *)(a1 + 104) = a7; *(_DWORD *)(a1 + 120) = 0; *(_BYTE *)(a1 + 176) = 0; *(_BYTE *)(a1 + 496) = 0; v10 = aligned_alloc(32LL, 0x8000LL); *(_OWORD *)(a1 + 128) = 0LL; result = memset(a1 + 184, 0LL, 256LL); *(_OWORD *)(a1 + 504) = 0LL; *(_OWORD *)(a1 + 520) = 0LL; *(_QWORD *)(a1 + 536) = v10; return result; }
ExecutionState: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV EBP,EDX MOV R12,RSI MOV RBX,RDI ADD RDI,0x8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 XOR R13D,R13D MOV qword ptr [RBX + 0x10],R13 MOV qword ptr [RBX + 0x18],0x1000 CALL 0x00131078 MOV qword ptr [RBX + 0x20],R12 LEA RAX,[0x1ae1c0] MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x30],R15 MOV qword ptr [RBX + 0x38],R14 MOV dword ptr [RBX + 0x40],EBP LEA RAX,[RBX + 0x58] MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],R13 MOV byte ptr [RBX + 0x58],R13B MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV dword ptr [RBX + 0x78],0x0 MOV byte ptr [RBX + 0xb0],R13B LEA R14,[RBX + 0xb8] MOV byte ptr [RBX + 0x1f0],R13B MOV EDI,0x20 MOV ESI,0x8000 CALL 0x00122470 MOV R15,RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV EDX,0x100 MOV RDI,R14 XOR ESI,ESI CALL 0x00122190 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x1f8],XMM0 MOVUPS xmmword ptr [RBX + 0x208],XMM0 MOV qword ptr [RBX + 0x218],R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* evmone::ExecutionState::ExecutionState(evmc_message const&, evmc_revision, evmc_host_interface const&, evmc_host_context*, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char> >) */ void __thiscall evmone::ExecutionState::ExecutionState (ExecutionState *this,int8 param_1,int4 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8) { int8 uVar1; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0x1000; Memory::allocate_capacity((Memory *)(this + 8)); *(int8 *)(this + 0x20) = param_1; *(int ***)(this + 0x28) = &PTR__HostInterface_001ae1c0; *(int8 *)(this + 0x30) = param_4; *(int8 *)(this + 0x38) = param_5; *(int4 *)(this + 0x40) = param_3; *(ExecutionState **)(this + 0x48) = this + 0x58; *(int8 *)(this + 0x50) = 0; this[0x58] = (ExecutionState)0x0; *(int4 *)(this + 0x68) = (int4)param_7; *(int4 *)(this + 0x6c) = param_7._4_4_; *(int4 *)(this + 0x70) = (int4)param_8; *(int4 *)(this + 0x74) = param_8._4_4_; *(int4 *)(this + 0x78) = 0; this[0xb0] = (ExecutionState)0x0; this[0x1f0] = (ExecutionState)0x0; uVar1 = aligned_alloc(0x20); *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; memset(this + 0xb8,0,0x100); *(int8 *)(this + 0x1f8) = 0; *(int8 *)(this + 0x200) = 0; *(int8 *)(this + 0x208) = 0; *(int8 *)(this + 0x210) = 0; *(int8 *)(this + 0x218) = uVar1; return; }
51,773
ggml_graph_print
ngxson[P]ggml-easy/ggml/src/ggml.c
void ggml_graph_print(const struct ggml_cgraph * cgraph) { GGML_LOG_INFO("=== GRAPH ===\n"); GGML_LOG_INFO("n_nodes = %d\n", cgraph->n_nodes); for (int i = 0; i < cgraph->n_nodes; i++) { struct ggml_tensor * node = cgraph->nodes[i]; GGML_LOG_INFO(" - %3d: [ %5" PRId64 ", %5" PRId64 ", %5" PRId64 "] %16s %s\n", i, node->ne[0], node->ne[1], node->ne[2], ggml_op_name(node->op), (node->flags & GGML_TENSOR_FLAG_PARAM) ? "x" : ggml_graph_get_grad(cgraph, node) ? "g" : " "); } GGML_LOG_INFO("n_leafs = %d\n", cgraph->n_leafs); for (int i = 0; i < cgraph->n_leafs; i++) { struct ggml_tensor * node = cgraph->leafs[i]; GGML_LOG_INFO(" - %3d: [ %5" PRId64 ", %5" PRId64 "] %8s %16s\n", i, node->ne[0], node->ne[1], ggml_op_name(node->op), ggml_get_name(node)); } GGML_LOG_INFO("========================================\n"); }
O0
c
ggml_graph_print: subq $0x88, %rsp movq %rdi, 0x80(%rsp) movl $0x2, %edi leaq 0x5d0df(%rip), %rsi # 0xb5a2a movb $0x0, %al callq 0x41c40 movq 0x80(%rsp), %rax movl 0x4(%rax), %edx movl $0x2, %edi leaq 0x5d0d0(%rip), %rsi # 0xb5a39 movb $0x0, %al callq 0x41c40 movl $0x0, 0x7c(%rsp) movl 0x7c(%rsp), %eax movq 0x80(%rsp), %rcx cmpl 0x4(%rcx), %eax jge 0x58a85 movq 0x80(%rsp), %rax movq 0x10(%rax), %rax movslq 0x7c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x70(%rsp) movl 0x7c(%rsp), %eax movl %eax, 0x3c(%rsp) movq 0x70(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x40(%rsp) movq 0x70(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x48(%rsp) movq 0x70(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x50(%rsp) movq 0x70(%rsp), %rax movl 0x50(%rax), %edi callq 0x444a0 movq %rax, 0x58(%rsp) movq 0x70(%rsp), %rax movl 0x94(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x58a0c leaq 0x5d848(%rip), %rax # 0xb624d movq %rax, 0x30(%rsp) jmp 0x58a3c movq 0x80(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0x423c0 movq %rax, %rdx leaq 0x5f9a0(%rip), %rax # 0xb83c8 leaq 0x5c433(%rip), %rcx # 0xb4e62 cmpq $0x0, %rdx cmovneq %rcx, %rax movq %rax, 0x30(%rsp) movq 0x58(%rsp), %r10 movq 0x50(%rsp), %r9 movq 0x48(%rsp), %r8 movq 0x40(%rsp), %rcx movl 0x3c(%rsp), %edx movq 0x30(%rsp), %rax movl $0x2, %edi leaq 0x5cfe2(%rip), %rsi # 0xb5a47 movq %r10, (%rsp) movq %rax, 0x8(%rsp) movb $0x0, %al callq 0x41c40 movl 0x7c(%rsp), %eax addl $0x1, %eax movl %eax, 0x7c(%rsp) jmp 0x58978 movq 0x80(%rsp), %rax movl 0x8(%rax), %edx movl $0x2, %edi leaq 0x5cfd0(%rip), %rsi # 0xb5a6c movb $0x0, %al callq 0x41c40 movl $0x0, 0x6c(%rsp) movl 0x6c(%rsp), %eax movq 0x80(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0x58b54 movq 0x80(%rsp), %rax movq 0x28(%rax), %rax movslq 0x6c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x60(%rsp) movl 0x6c(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x60(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x18(%rsp) movq 0x60(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x20(%rsp) movq 0x60(%rsp), %rax movl 0x50(%rax), %edi callq 0x444a0 movq %rax, 0x28(%rsp) movq 0x60(%rsp), %rdi callq 0x44420 movl 0x14(%rsp), %edx movq 0x18(%rsp), %rcx movq 0x20(%rsp), %r8 movq 0x28(%rsp), %r9 movl $0x2, %edi leaq 0x5cf41(%rip), %rsi # 0xb5a7a movq %rax, (%rsp) movb $0x0, %al callq 0x41c40 movl 0x6c(%rsp), %eax addl $0x1, %eax movl %eax, 0x6c(%rsp) jmp 0x58aab movl $0x2, %edi leaq 0x5cf3a(%rip), %rsi # 0xb5a9a movb $0x0, %al callq 0x41c40 addq $0x88, %rsp retq nop
ggml_graph_print: sub rsp, 88h mov [rsp+88h+var_8], rdi mov edi, 2 lea rsi, aGraph; "=== GRAPH ===\n" mov al, 0 call _ggml_log_internal mov rax, [rsp+88h+var_8] mov edx, [rax+4] mov edi, 2 lea rsi, aNNodesD; "n_nodes = %d\n" mov al, 0 call _ggml_log_internal mov [rsp+88h+var_C], 0 loc_58978: mov eax, [rsp+88h+var_C] mov rcx, [rsp+88h+var_8] cmp eax, [rcx+4] jge loc_58A85 mov rax, [rsp+88h+var_8] mov rax, [rax+10h] movsxd rcx, [rsp+88h+var_C] mov rax, [rax+rcx*8] mov [rsp+88h+var_18], rax mov eax, [rsp+88h+var_C] mov [rsp+88h+var_4C], eax mov rax, [rsp+88h+var_18] mov rax, [rax+10h] mov [rsp+88h+var_48], rax mov rax, [rsp+88h+var_18] mov rax, [rax+18h] mov [rsp+88h+var_40], rax mov rax, [rsp+88h+var_18] mov rax, [rax+20h] mov [rsp+88h+var_38], rax mov rax, [rsp+88h+var_18] mov edi, [rax+50h] call _ggml_op_name mov [rsp+88h+var_30], rax mov rax, [rsp+88h+var_18] mov eax, [rax+94h] and eax, 4 cmp eax, 0 jz short loc_58A0C lea rax, aViewXNbOffsetY+16h; "x" mov [rsp+88h+var_58], rax jmp short loc_58A3C loc_58A0C: mov rdi, [rsp+88h+var_8] mov rsi, [rsp+88h+var_18] call _ggml_graph_get_grad mov rdx, rax lea rax, aVal+6; " " lea rcx, aTheFlashAttent+67h; "g" cmp rdx, 0 cmovnz rax, rcx mov [rsp+88h+var_58], rax loc_58A3C: mov r10, [rsp+88h+var_30] mov r9, [rsp+88h+var_38] mov r8, [rsp+88h+var_40] mov rcx, [rsp+88h+var_48] mov edx, [rsp+88h+var_4C] mov rax, [rsp+88h+var_58] mov edi, 2 lea rsi, a3d5ld5ld5ld16s; " - %3d: [ %5ld, %5ld, %5ld] %16s %s\n" mov [rsp+88h+var_88], r10 mov [rsp+88h+var_80], rax mov al, 0 call _ggml_log_internal mov eax, [rsp+88h+var_C] add eax, 1 mov [rsp+88h+var_C], eax jmp loc_58978 loc_58A85: mov rax, [rsp+88h+var_8] mov edx, [rax+8] mov edi, 2 lea rsi, aNLeafsD; "n_leafs = %d\n" mov al, 0 call _ggml_log_internal mov [rsp+88h+var_1C], 0 loc_58AAB: mov eax, [rsp+88h+var_1C] mov rcx, [rsp+88h+var_8] cmp eax, [rcx+8] jge loc_58B54 mov rax, [rsp+88h+var_8] mov rax, [rax+28h] movsxd rcx, [rsp+88h+var_1C] mov rax, [rax+rcx*8] mov [rsp+88h+var_28], rax mov eax, [rsp+88h+var_1C] mov [rsp+88h+var_74], eax mov rax, [rsp+88h+var_28] mov rax, [rax+10h] mov [rsp+88h+var_70], rax mov rax, [rsp+88h+var_28] mov rax, [rax+18h] mov [rsp+88h+var_68], rax mov rax, [rsp+88h+var_28] mov edi, [rax+50h] call _ggml_op_name mov [rsp+88h+var_60], rax mov rdi, [rsp+88h+var_28] call _ggml_get_name mov edx, [rsp+88h+var_74] mov rcx, [rsp+88h+var_70] mov r8, [rsp+88h+var_68] mov r9, [rsp+88h+var_60] mov edi, 2 lea rsi, a3d5ld5ld8s16s; " - %3d: [ %5ld, %5ld] %8s %16s\n" mov [rsp+88h+var_88], rax mov al, 0 call _ggml_log_internal mov eax, [rsp+88h+var_1C] add eax, 1 mov [rsp+88h+var_1C], eax jmp loc_58AAB loc_58B54: mov edi, 2 lea rsi, asc_B5A9A; "======================================="... mov al, 0 call _ggml_log_internal add rsp, 88h retn
long long ggml_graph_print(long long a1) { long long grad; // rdx const char *v2; // rax const char *name; // rax long long v5; // [rsp+18h] [rbp-70h] long long v6; // [rsp+20h] [rbp-68h] char *v7; // [rsp+28h] [rbp-60h] long long v8; // [rsp+40h] [rbp-48h] long long v9; // [rsp+48h] [rbp-40h] long long v10; // [rsp+50h] [rbp-38h] char *v11; // [rsp+58h] [rbp-30h] long long v12; // [rsp+60h] [rbp-28h] int j; // [rsp+6Ch] [rbp-1Ch] long long v14; // [rsp+70h] [rbp-18h] int i; // [rsp+7Ch] [rbp-Ch] ggml_log_internal(2u, (long long)"=== GRAPH ===\n"); ggml_log_internal(2u, (long long)"n_nodes = %d\n", *(_DWORD *)(a1 + 4)); for ( i = 0; i < *(_DWORD *)(a1 + 4); ++i ) { v14 = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * i); v8 = *(_QWORD *)(v14 + 16); v9 = *(_QWORD *)(v14 + 24); v10 = *(_QWORD *)(v14 + 32); v11 = ggml_op_name(*(_DWORD *)(v14 + 80)); if ( (*(_DWORD *)(v14 + 148) & 4) != 0 ) { ggml_log_internal(2u, (long long)" - %3d: [ %5ld, %5ld, %5ld] %16s %s\n", i, v8, v9, v10, v11, "x"); } else { grad = ggml_graph_get_grad(a1, v14); v2 = " "; if ( grad ) v2 = "g"; ggml_log_internal(2u, (long long)" - %3d: [ %5ld, %5ld, %5ld] %16s %s\n", i, v8, v9, v10, v11, v2); } } ggml_log_internal(2u, (long long)"n_leafs = %d\n", *(_DWORD *)(a1 + 8)); for ( j = 0; j < *(_DWORD *)(a1 + 8); ++j ) { v12 = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 8LL * j); v5 = *(_QWORD *)(v12 + 16); v6 = *(_QWORD *)(v12 + 24); v7 = ggml_op_name(*(_DWORD *)(v12 + 80)); name = (const char *)ggml_get_name(v12); ggml_log_internal(2u, (long long)" - %3d: [ %5ld, %5ld] %8s %16s\n", j, v5, v6, v7, name); } return ggml_log_internal(2u, (long long)"========================================\n"); }
ggml_graph_print: SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI MOV EDI,0x2 LEA RSI,[0x1b5a2a] MOV AL,0x0 CALL 0x00141c40 MOV RAX,qword ptr [RSP + 0x80] MOV EDX,dword ptr [RAX + 0x4] MOV EDI,0x2 LEA RSI,[0x1b5a39] MOV AL,0x0 CALL 0x00141c40 MOV dword ptr [RSP + 0x7c],0x0 LAB_00158978: MOV EAX,dword ptr [RSP + 0x7c] MOV RCX,qword ptr [RSP + 0x80] CMP EAX,dword ptr [RCX + 0x4] JGE 0x00158a85 MOV RAX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x7c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x70],RAX MOV EAX,dword ptr [RSP + 0x7c] MOV dword ptr [RSP + 0x3c],EAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x70] MOV EDI,dword ptr [RAX + 0x50] CALL 0x001444a0 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x70] MOV EAX,dword ptr [RAX + 0x94] AND EAX,0x4 CMP EAX,0x0 JZ 0x00158a0c LEA RAX,[0x1b624d] MOV qword ptr [RSP + 0x30],RAX JMP 0x00158a3c LAB_00158a0c: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x70] CALL 0x001423c0 MOV RDX,RAX LEA RAX,[0x1b83c8] LEA RCX,[0x1b4e62] CMP RDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RSP + 0x30],RAX LAB_00158a3c: MOV R10,qword ptr [RSP + 0x58] MOV R9,qword ptr [RSP + 0x50] MOV R8,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x40] MOV EDX,dword ptr [RSP + 0x3c] MOV RAX,qword ptr [RSP + 0x30] MOV EDI,0x2 LEA RSI,[0x1b5a47] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV AL,0x0 CALL 0x00141c40 MOV EAX,dword ptr [RSP + 0x7c] ADD EAX,0x1 MOV dword ptr [RSP + 0x7c],EAX JMP 0x00158978 LAB_00158a85: MOV RAX,qword ptr [RSP + 0x80] MOV EDX,dword ptr [RAX + 0x8] MOV EDI,0x2 LEA RSI,[0x1b5a6c] MOV AL,0x0 CALL 0x00141c40 MOV dword ptr [RSP + 0x6c],0x0 LAB_00158aab: MOV EAX,dword ptr [RSP + 0x6c] MOV RCX,qword ptr [RSP + 0x80] CMP EAX,dword ptr [RCX + 0x8] JGE 0x00158b54 MOV RAX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RAX + 0x28] MOVSXD RCX,dword ptr [RSP + 0x6c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x60],RAX MOV EAX,dword ptr [RSP + 0x6c] MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x60] MOV EDI,dword ptr [RAX + 0x50] CALL 0x001444a0 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00144420 MOV EDX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x28] MOV EDI,0x2 LEA RSI,[0x1b5a7a] MOV qword ptr [RSP],RAX MOV AL,0x0 CALL 0x00141c40 MOV EAX,dword ptr [RSP + 0x6c] ADD EAX,0x1 MOV dword ptr [RSP + 0x6c],EAX JMP 0x00158aab LAB_00158b54: MOV EDI,0x2 LEA RSI,[0x1b5a9a] MOV AL,0x0 CALL 0x00141c40 ADD RSP,0x88 RET
void ggml_graph_print(long param_1) { int8 uVar1; int8 uVar2; int8 uVar3; long lVar4; int8 uVar5; char *local_58; int local_1c; int local_c; ggml_log_internal(2,"=== GRAPH ===\n"); ggml_log_internal(2,"n_nodes = %d\n",*(int4 *)(param_1 + 4)); for (local_c = 0; local_c < *(int *)(param_1 + 4); local_c = local_c + 1) { lVar4 = *(long *)(*(long *)(param_1 + 0x10) + (long)local_c * 8); uVar1 = *(int8 *)(lVar4 + 0x10); uVar2 = *(int8 *)(lVar4 + 0x18); uVar5 = *(int8 *)(lVar4 + 0x20); uVar3 = ggml_op_name(*(int4 *)(lVar4 + 0x50)); if ((*(uint *)(lVar4 + 0x94) & 4) == 0) { lVar4 = ggml_graph_get_grad(param_1,lVar4); local_58 = " "; if (lVar4 != 0) { local_58 = "g"; } } else { local_58 = "x"; } ggml_log_internal(2," - %3d: [ %5ld, %5ld, %5ld] %16s %s\n",local_c,uVar1,uVar2,uVar5,uVar3, local_58); } ggml_log_internal(2,"n_leafs = %d\n",*(int4 *)(param_1 + 8)); for (local_1c = 0; local_1c < *(int *)(param_1 + 8); local_1c = local_1c + 1) { lVar4 = *(long *)(*(long *)(param_1 + 0x28) + (long)local_1c * 8); uVar1 = *(int8 *)(lVar4 + 0x10); uVar2 = *(int8 *)(lVar4 + 0x18); uVar5 = ggml_op_name(*(int4 *)(lVar4 + 0x50)); uVar3 = ggml_get_name(lVar4); ggml_log_internal(2," - %3d: [ %5ld, %5ld] %8s %16s\n",local_1c,uVar1,uVar2,uVar5,uVar3); } ggml_log_internal(2,"========================================\n"); return; }
51,774
ggml_graph_print
ngxson[P]ggml-easy/ggml/src/ggml.c
void ggml_graph_print(const struct ggml_cgraph * cgraph) { GGML_LOG_INFO("=== GRAPH ===\n"); GGML_LOG_INFO("n_nodes = %d\n", cgraph->n_nodes); for (int i = 0; i < cgraph->n_nodes; i++) { struct ggml_tensor * node = cgraph->nodes[i]; GGML_LOG_INFO(" - %3d: [ %5" PRId64 ", %5" PRId64 ", %5" PRId64 "] %16s %s\n", i, node->ne[0], node->ne[1], node->ne[2], ggml_op_name(node->op), (node->flags & GGML_TENSOR_FLAG_PARAM) ? "x" : ggml_graph_get_grad(cgraph, node) ? "g" : " "); } GGML_LOG_INFO("n_leafs = %d\n", cgraph->n_leafs); for (int i = 0; i < cgraph->n_leafs; i++) { struct ggml_tensor * node = cgraph->leafs[i]; GGML_LOG_INFO(" - %3d: [ %5" PRId64 ", %5" PRId64 "] %8s %16s\n", i, node->ne[0], node->ne[1], ggml_op_name(node->op), ggml_get_name(node)); } GGML_LOG_INFO("========================================\n"); }
O1
c
ggml_graph_print: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x291a6(%rip), %rsi # 0x4b901 movl $0x2, %edi xorl %eax, %eax callq 0x167f0 movl 0x4(%rbx), %edx leaq 0x2919f(%rip), %rsi # 0x4b910 movl $0x2, %edi xorl %eax, %eax callq 0x167f0 cmpl $0x0, 0x4(%rbx) jle 0x22810 xorl %r15d, %r15d movq 0x10(%rbx), %rax movq (%rax,%r15,8), %rsi movq 0x10(%rsi), %r12 movq 0x18(%rsi), %r13 movq 0x20(%rsi), %rbp movl 0x50(%rsi), %eax leaq 0x46ea8(%rip), %rcx # 0x69650 movq (%rcx,%rax,8), %r14 testb $0x4, 0x94(%rsi) leaq 0x29968(%rip), %r10 # 0x4c122 jne 0x227d9 movq %rbx, %rdi callq 0x169f0 testq %rax, %rax leaq 0x29548(%rip), %r10 # 0x4bd16 leaq 0x2b983(%rip), %rax # 0x4e158 cmoveq %rax, %r10 movl $0x2, %edi leaq 0x29139(%rip), %rsi # 0x4b91e movl %r15d, %edx movq %r12, %rcx movq %r13, %r8 movq %rbp, %r9 xorl %eax, %eax pushq %r10 pushq %r14 callq 0x167f0 addq $0x10, %rsp incq %r15 movslq 0x4(%rbx), %rax cmpq %rax, %r15 jl 0x2278a movl 0x8(%rbx), %edx leaq 0x29129(%rip), %rsi # 0x4b943 movl $0x2, %edi xorl %eax, %eax callq 0x167f0 cmpl $0x0, 0x8(%rbx) leaq 0x46e1f(%rip), %r12 # 0x69650 jle 0x22884 leaq 0x29117(%rip), %r14 # 0x4b951 xorl %r15d, %r15d movq 0x28(%rbx), %rax movq (%rax,%r15,8), %r10 movq 0x10(%r10), %rcx movq 0x18(%r10), %r8 movl 0x50(%r10), %eax movq (%r12,%rax,8), %r9 addq $0x100, %r10 # imm = 0x100 subq $0x8, %rsp movl $0x2, %edi movq %r14, %rsi movl %r15d, %edx xorl %eax, %eax pushq %r10 callq 0x167f0 addq $0x10, %rsp incq %r15 movslq 0x8(%rbx), %rax cmpq %rax, %r15 jl 0x2283d leaq 0x290e6(%rip), %rsi # 0x4b971 movl $0x2, %edi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x167f0
ggml_graph_print: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea rsi, aGraph; "=== GRAPH ===\n" mov edi, 2 xor eax, eax call _ggml_log_internal mov edx, [rbx+4] lea rsi, aNNodesD; "n_nodes = %d\n" mov edi, 2 xor eax, eax call _ggml_log_internal cmp dword ptr [rbx+4], 0 jle loc_22810 xor r15d, r15d loc_2278A: mov rax, [rbx+10h] mov rsi, [rax+r15*8] mov r12, [rsi+10h] mov r13, [rsi+18h] mov rbp, [rsi+20h] mov eax, [rsi+50h] lea rcx, GGML_OP_NAME mov r14, [rcx+rax*8] test byte ptr [rsi+94h], 4 lea r10, aViewXNbOffsetY+16h; "x" jnz short loc_227D9 mov rdi, rbx call _ggml_graph_get_grad test rax, rax lea r10, aTypeQ4044Remov+35h; "g" lea rax, aVal+6; " " cmovz r10, rax loc_227D9: mov edi, 2 lea rsi, a3d5ld5ld5ld16s; " - %3d: [ %5ld, %5ld, %5ld] %16s %s\n" mov edx, r15d mov rcx, r12 mov r8, r13 mov r9, rbp xor eax, eax push r10 push r14 call _ggml_log_internal add rsp, 10h inc r15 movsxd rax, dword ptr [rbx+4] cmp r15, rax jl loc_2278A loc_22810: mov edx, [rbx+8] lea rsi, aNLeafsD; "n_leafs = %d\n" mov edi, 2 xor eax, eax call _ggml_log_internal cmp dword ptr [rbx+8], 0 lea r12, GGML_OP_NAME jle short loc_22884 lea r14, a3d5ld5ld8s16s; " - %3d: [ %5ld, %5ld] %8s %16s\n" xor r15d, r15d loc_2283D: mov rax, [rbx+28h] mov r10, [rax+r15*8] mov rcx, [r10+10h] mov r8, [r10+18h] mov eax, [r10+50h] mov r9, [r12+rax*8] add r10, 100h sub rsp, 8 mov edi, 2 mov rsi, r14 mov edx, r15d xor eax, eax push r10 call _ggml_log_internal add rsp, 10h inc r15 movsxd rax, dword ptr [rbx+8] cmp r15, rax jl short loc_2283D loc_22884: lea rsi, asc_4B971; "======================================="... mov edi, 2 xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ggml_log_internal
long long ggml_graph_print( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14) { long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // r15 long long v25; // rsi long long v26; // r12 long long v27; // r13 long long v28; // rbp long long v29; // rdx long long v30; // rcx long long v31; // r8 long long v32; // r9 __m128 v33; // xmm4 __m128 v34; // xmm5 long long v35; // r15 long long v36; // r10 ggml_log_internal(2u, (long long)"=== GRAPH ===\n", a11, a12, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9); ggml_log_internal( 2u, (long long)"n_nodes = %d\n", *(unsigned int *)(a1 + 4), v14, v15, v16, a2, a3, a4, a5, v17, v18, a8, a9); if ( *(int *)(a1 + 4) > 0 ) { v24 = 0LL; do { v25 = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v24); v26 = *(_QWORD *)(v25 + 16); v27 = *(_QWORD *)(v25 + 24); v28 = *(_QWORD *)(v25 + 32); if ( (*(_BYTE *)(v25 + 148) & 4) == 0 ) ggml_graph_get_grad(a1, v25); ggml_log_internal( 2u, (long long)" - %3d: [ %5ld, %5ld, %5ld] %16s %s\n", (unsigned int)v24++, v26, v27, v28, a2, a3, a4, a5, v22, v23, a8, a9); } while ( v24 < *(int *)(a1 + 4) ); } ggml_log_internal( 2u, (long long)"n_leafs = %d\n", *(unsigned int *)(a1 + 8), v19, v20, v21, a2, a3, a4, a5, v22, v23, a8, a9); if ( *(int *)(a1 + 8) > 0 ) { v35 = 0LL; do { v36 = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 8 * v35); ggml_log_internal( 2u, (long long)" - %3d: [ %5ld, %5ld] %8s %16s\n", (unsigned int)v35++, *(_QWORD *)(v36 + 16), *(_QWORD *)(v36 + 24), (long long)GGML_OP_NAME[*(unsigned int *)(v36 + 80)], a2, a3, a4, a5, v33, v34, a8, a9); } while ( v35 < *(int *)(a1 + 8) ); } return ggml_log_internal( 2u, (long long)"========================================\n", v29, v30, v31, v32, a2, a3, a4, a5, v33, v34, a8, a9); }
ggml_graph_print: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA RSI,[0x14b901] MOV EDI,0x2 XOR EAX,EAX CALL 0x001167f0 MOV EDX,dword ptr [RBX + 0x4] LEA RSI,[0x14b910] MOV EDI,0x2 XOR EAX,EAX CALL 0x001167f0 CMP dword ptr [RBX + 0x4],0x0 JLE 0x00122810 XOR R15D,R15D LAB_0012278a: MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + R15*0x8] MOV R12,qword ptr [RSI + 0x10] MOV R13,qword ptr [RSI + 0x18] MOV RBP,qword ptr [RSI + 0x20] MOV EAX,dword ptr [RSI + 0x50] LEA RCX,[0x169650] MOV R14,qword ptr [RCX + RAX*0x8] TEST byte ptr [RSI + 0x94],0x4 LEA R10,[0x14c122] JNZ 0x001227d9 MOV RDI,RBX CALL 0x001169f0 TEST RAX,RAX LEA R10,[0x14bd16] LEA RAX,[0x14e158] CMOVZ R10,RAX LAB_001227d9: MOV EDI,0x2 LEA RSI,[0x14b91e] MOV EDX,R15D MOV RCX,R12 MOV R8,R13 MOV R9,RBP XOR EAX,EAX PUSH R10 PUSH R14 CALL 0x001167f0 ADD RSP,0x10 INC R15 MOVSXD RAX,dword ptr [RBX + 0x4] CMP R15,RAX JL 0x0012278a LAB_00122810: MOV EDX,dword ptr [RBX + 0x8] LEA RSI,[0x14b943] MOV EDI,0x2 XOR EAX,EAX CALL 0x001167f0 CMP dword ptr [RBX + 0x8],0x0 LEA R12,[0x169650] JLE 0x00122884 LEA R14,[0x14b951] XOR R15D,R15D LAB_0012283d: MOV RAX,qword ptr [RBX + 0x28] MOV R10,qword ptr [RAX + R15*0x8] MOV RCX,qword ptr [R10 + 0x10] MOV R8,qword ptr [R10 + 0x18] MOV EAX,dword ptr [R10 + 0x50] MOV R9,qword ptr [R12 + RAX*0x8] ADD R10,0x100 SUB RSP,0x8 MOV EDI,0x2 MOV RSI,R14 MOV EDX,R15D XOR EAX,EAX PUSH R10 CALL 0x001167f0 ADD RSP,0x10 INC R15 MOVSXD RAX,dword ptr [RBX + 0x8] CMP R15,RAX JL 0x0012283d LAB_00122884: LEA RSI,[0x14b971] MOV EDI,0x2 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001167f0
void ggml_graph_print(long param_1) { int8 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; long lVar5; char *pcVar6; ulong uVar7; ggml_log_internal(2,"=== GRAPH ===\n"); ggml_log_internal(2,"n_nodes = %d\n",*(int4 *)(param_1 + 4)); if (0 < *(int *)(param_1 + 4)) { uVar7 = 0; do { lVar5 = *(long *)(*(long *)(param_1 + 0x10) + uVar7 * 8); uVar1 = *(int8 *)(lVar5 + 0x10); uVar2 = *(int8 *)(lVar5 + 0x18); uVar3 = *(int8 *)(lVar5 + 0x20); uVar4 = *(int8 *)(GGML_OP_NAME + (ulong)*(uint *)(lVar5 + 0x50) * 8); pcVar6 = "x"; if ((*(byte *)(lVar5 + 0x94) & 4) == 0) { lVar5 = ggml_graph_get_grad(param_1); pcVar6 = "g"; if (lVar5 == 0) { pcVar6 = " "; } } ggml_log_internal(2," - %3d: [ %5ld, %5ld, %5ld] %16s %s\n",uVar7 & 0xffffffff,uVar1,uVar2, uVar3,uVar4,pcVar6); uVar7 = uVar7 + 1; } while ((long)uVar7 < (long)*(int *)(param_1 + 4)); } ggml_log_internal(2,"n_leafs = %d\n",*(int4 *)(param_1 + 8)); if (0 < *(int *)(param_1 + 8)) { uVar7 = 0; do { lVar5 = *(long *)(*(long *)(param_1 + 0x28) + uVar7 * 8); ggml_log_internal(2," - %3d: [ %5ld, %5ld] %8s %16s\n",uVar7 & 0xffffffff, *(int8 *)(lVar5 + 0x10),*(int8 *)(lVar5 + 0x18), *(int8 *)(GGML_OP_NAME + (ulong)*(uint *)(lVar5 + 0x50) * 8), lVar5 + 0x100); uVar7 = uVar7 + 1; } while ((long)uVar7 < (long)*(int *)(param_1 + 8)); } ggml_log_internal(2,"========================================\n"); return; }
51,775
c4_get_storage_config
corpus-core[P]colibri-stateless/src/util/plugin.c
void c4_get_storage_config(storage_plugin_t* plugin) { if (!storage_conf.max_sync_states) storage_conf.max_sync_states = MAX_SYNC_STATES_DEFAULT; #ifdef FILE_STORAGE if (!storage_conf.get) { storage_conf.get = file_get; storage_conf.set = file_set; storage_conf.del = file_delete; } #endif *plugin = storage_conf; }
O3
c
c4_get_storage_config: cmpl $0x0, 0x695d5(%rip) # 0xbe648 jne 0x5507f movl $0x3, 0x695c9(%rip) # 0xbe648 cmpq $0x0, 0x695a9(%rip) # 0xbe630 jne 0x550b3 leaq 0x39(%rip), %rax # 0x550c9 movq %rax, 0x69599(%rip) # 0xbe630 leaq 0xf6(%rip), %rax # 0x55194 movq %rax, 0x69593(%rip) # 0xbe638 leaq 0x14f(%rip), %rax # 0x551fb movq %rax, 0x6958d(%rip) # 0xbe640 movups 0x69586(%rip), %xmm0 # 0xbe640 movups %xmm0, 0x10(%rdi) movups 0x6956b(%rip), %xmm0 # 0xbe630 movups %xmm0, (%rdi) retq
c4_get_storage_config: cmp dword ptr cs:xmmword_BE640+8, 0 jnz short loc_5507F mov dword ptr cs:xmmword_BE640+8, 3 loc_5507F: cmp qword ptr cs:storage_conf, 0 jnz short loc_550B3 lea rax, file_get mov qword ptr cs:storage_conf, rax lea rax, file_set mov qword ptr cs:storage_conf+8, rax lea rax, file_delete mov qword ptr cs:xmmword_BE640, rax loc_550B3: movups xmm0, cs:xmmword_BE640 movups xmmword ptr [rdi+10h], xmm0 movups xmm0, cs:storage_conf movups xmmword ptr [rdi], xmm0 retn
long long ( * c4_get_storage_config(_OWORD *a1))() { long long ( *result)(); // rax if ( !DWORD2(xmmword_BE640) ) DWORD2(xmmword_BE640) = 3; if ( !(_QWORD)storage_conf ) { *(_QWORD *)&storage_conf = file_get; *((_QWORD *)&storage_conf + 1) = file_set; result = file_delete; *(_QWORD *)&xmmword_BE640 = file_delete; } a1[1] = xmmword_BE640; *a1 = storage_conf; return result; }
c4_get_storage_config: CMP dword ptr [0x001be648],0x0 JNZ 0x0015507f MOV dword ptr [0x001be648],0x3 LAB_0015507f: CMP qword ptr [0x001be630],0x0 JNZ 0x001550b3 LEA RAX,[0x1550c9] MOV qword ptr [0x001be630],RAX LEA RAX,[0x155194] MOV qword ptr [0x001be638],RAX LEA RAX,[0x1551fb] MOV qword ptr [0x001be640],RAX LAB_001550b3: MOVUPS XMM0,xmmword ptr [0x001be640] MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [0x001be630] MOVUPS xmmword ptr [RDI],XMM0 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void c4_get_storage_config(long *param_1) { long lVar1; code *pcVar2; if (DAT_001be648 == 0) { DAT_001be648 = 3; } if (storage_conf == (code *)0x0) { storage_conf = file_get; _DAT_001be638 = file_set; _DAT_001be640 = file_delete; } lVar1 = CONCAT44(uRam00000000001be64c,DAT_001be648); param_1[2] = (long)_DAT_001be640; param_1[3] = lVar1; pcVar2 = _DAT_001be638; *param_1 = (long)storage_conf; param_1[1] = (long)pcVar2; return; }
51,776
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int, bool)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp
void addFace(Index face, bool t) { // Update the state of the Edge based on the added incident face: if (boundary) { if (t == trailing) setNonManifold(); // Edge is reversed else if (face == (trailing ? prevFace : nextFace)) setNonManifold(); // Edge is repeated in the face else { setInterior(); // Edge is manifold thus far -- promote to interior setFace(face, t); } } else if (interior) { setNonManifold(); // More than two incident faces -- make non-manifold } }
O0
cpp
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int, bool): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) andb $0x1, %al movb %al, -0xd(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movb 0xc(%rax), %al andb $0x1, %al cmpb $0x0, %al je 0x1e91b4 movq -0x18(%rbp), %rcx movb -0xd(%rbp), %al andb $0x1, %al movzbl %al, %eax movb 0xc(%rcx), %cl shrb $0x3, %cl andb $0x1, %cl movzbl %cl, %ecx cmpl %ecx, %eax jne 0x1e9152 movq -0x18(%rbp), %rdi callq 0xd7670 jmp 0x1e91b2 movq -0x18(%rbp), %rax movl -0xc(%rbp), %ecx movl %ecx, -0x1c(%rbp) movb 0xc(%rax), %al shrb $0x3, %al andb $0x1, %al cmpb $0x0, %al je 0x1e9174 movq -0x18(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x20(%rbp) jmp 0x1e917e movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax movl -0x20(%rbp), %ecx cmpl %ecx, %eax jne 0x1e9193 movq -0x18(%rbp), %rdi callq 0xd7670 jmp 0x1e91b0 movq -0x18(%rbp), %rdi callq 0xd5620 movq -0x18(%rbp), %rdi movl -0xc(%rbp), %esi movb -0xd(%rbp), %al andb $0x1, %al movzbl %al, %edx callq 0xc4240 jmp 0x1e91b2 jmp 0x1e91ce movq -0x18(%rbp), %rax movb 0xc(%rax), %al shrb %al andb $0x1, %al cmpb $0x0, %al je 0x1e91cc movq -0x18(%rbp), %rdi callq 0xd7670 jmp 0x1e91ce addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge7addFaceEib: push rbp mov rbp, rsp sub rsp, 20h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_C], esi and al, 1 mov [rbp+var_D], al mov rax, [rbp+var_8] mov [rbp+var_18], rax mov al, [rax+0Ch] and al, 1 cmp al, 0 jz loc_1E91B4 mov rcx, [rbp+var_18] mov al, [rbp+var_D] and al, 1 movzx eax, al mov cl, [rcx+0Ch] shr cl, 3 and cl, 1 movzx ecx, cl cmp eax, ecx jnz short loc_1E9152 mov rdi, [rbp+var_18]; this call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge14setNonManifoldEv; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::setNonManifold(void) jmp short loc_1E91B2 loc_1E9152: mov rax, [rbp+var_18] mov ecx, [rbp+var_C] mov [rbp+var_1C], ecx mov al, [rax+0Ch] shr al, 3 and al, 1 cmp al, 0 jz short loc_1E9174 mov rax, [rbp+var_18] mov eax, [rax+4] mov [rbp+var_20], eax jmp short loc_1E917E loc_1E9174: mov rax, [rbp+var_18] mov eax, [rax+8] mov [rbp+var_20], eax loc_1E917E: mov eax, [rbp+var_1C] mov ecx, [rbp+var_20] cmp eax, ecx jnz short loc_1E9193 mov rdi, [rbp+var_18]; this call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge14setNonManifoldEv; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::setNonManifold(void) jmp short loc_1E91B0 loc_1E9193: mov rdi, [rbp+var_18]; this call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge11setInteriorEv; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::setInterior(void) mov rdi, [rbp+var_18]; this mov esi, [rbp+var_C]; int mov al, [rbp+var_D] and al, 1 movzx edx, al; bool call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge7setFaceEib; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::setFace(int,bool) loc_1E91B0: jmp short $+2 loc_1E91B2: jmp short loc_1E91CE loc_1E91B4: mov rax, [rbp+var_18] mov al, [rax+0Ch] shr al, 1 and al, 1 cmp al, 0 jz short loc_1E91CC mov rdi, [rbp+var_18]; this call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge14setNonManifoldEv; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::setNonManifold(void) loc_1E91CC: jmp short $+2 loc_1E91CE: add rsp, 20h pop rbp retn
char OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace( OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *this, int a2, char a3) { char result; // al int v4; // [rsp+0h] [rbp-20h] char v5; // [rsp+13h] [rbp-Dh] v5 = a3 & 1; if ( (*((_BYTE *)this + 12) & 1) != 0 ) { if ( (a3 & 1) != ((*((_BYTE *)this + 12) & 8) != 0) ) { v4 = (*((_BYTE *)this + 12) & 8) != 0 ? *((_DWORD *)this + 1) : *((_DWORD *)this + 2); if ( a2 != v4 ) { OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::setInterior(this); return OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::setFace(this, a2, v5 & 1); } } } else { result = (*((_BYTE *)this + 12) & 2) != 0; if ( (*((_BYTE *)this + 12) & 2) == 0 ) return result; } return OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::setNonManifold(this); }
51,777
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int, bool)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp
void addFace(Index face, bool t) { // Update the state of the Edge based on the added incident face: if (boundary) { if (t == trailing) setNonManifold(); // Edge is reversed else if (face == (trailing ? prevFace : nextFace)) setNonManifold(); // Edge is repeated in the face else { setInterior(); // Edge is manifold thus far -- promote to interior setFace(face, t); } } else if (interior) { setNonManifold(); // More than two incident faces -- make non-manifold } }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int, bool): movb 0xc(%rdi), %al testb $0x1, %al jne 0xb1218 testb $0x2, %al jne 0xb1231 retq movl %eax, %ecx andb $0x8, %cl shrb $0x3, %cl cmpb %dl, %cl je 0xb1231 xorl %ecx, %ecx testb $0x8, %al sete %cl cmpl %esi, 0x4(%rdi,%rcx,4) jne 0xb1239 andb $-0x8, %al orb $0x4, %al movb %al, 0xc(%rdi) retq andb $-0xc, %al leal (,%rdx,8), %ecx orb %al, %cl orb $0x2, %cl movb %cl, 0xc(%rdi) xorb $0x1, %dl movzbl %dl, %eax movl %esi, 0x4(%rdi,%rax,4) retq nop
_ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge7addFaceEib: mov al, [rdi+0Ch] test al, 1 jnz short loc_B1218 test al, 2 jnz short loc_B1231 retn loc_B1218: mov ecx, eax and cl, 8 shr cl, 3 cmp cl, dl jz short loc_B1231 xor ecx, ecx test al, 8 setz cl cmp [rdi+rcx*4+4], esi jnz short loc_B1239 loc_B1231: and al, 0F8h or al, 4 mov [rdi+0Ch], al retn loc_B1239: and al, 0F4h lea ecx, ds:0[rdx*8] or cl, al or cl, 2 mov [rdi+0Ch], cl xor dl, 1 movzx eax, dl mov [rdi+rax*4+4], esi retn
char OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace( OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *this, int a2, unsigned __int8 a3) { long long v3; // rax LOBYTE(v3) = *((_BYTE *)this + 12); if ( (v3 & 1) != 0 ) { if ( (unsigned __int8)(v3 & 8) >> 3 != a3 && *((_DWORD *)this + ((v3 & 8) == 0) + 1) != a2 ) { *((_BYTE *)this + 12) = v3 & 0xF4 | (8 * a3) | 2; v3 = a3 ^ 1u; *((_DWORD *)this + v3 + 1) = a2; return v3; } } else if ( (v3 & 2) == 0 ) { return v3; } LOBYTE(v3) = v3 & 0xF8 | 4; *((_BYTE *)this + 12) = v3; return v3; }
addFace: MOV AL,byte ptr [RDI + 0xc] TEST AL,0x1 JNZ 0x001b1218 TEST AL,0x2 JNZ 0x001b1231 RET LAB_001b1218: MOV ECX,EAX AND CL,0x8 SHR CL,0x3 CMP CL,DL JZ 0x001b1231 XOR ECX,ECX TEST AL,0x8 SETZ CL CMP dword ptr [RDI + RCX*0x4 + 0x4],ESI JNZ 0x001b1239 LAB_001b1231: AND AL,0xf8 OR AL,0x4 MOV byte ptr [RDI + 0xc],AL RET LAB_001b1239: AND AL,0xf4 LEA ECX,[RDX*0x8] OR CL,AL OR CL,0x2 MOV byte ptr [RDI + 0xc],CL XOR DL,0x1 MOVZX EAX,DL MOV dword ptr [RDI + RAX*0x4 + 0x4],ESI RET
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int, bool) */ void __thiscall OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(Edge *this,int param_1,bool param_2) { Edge EVar1; EVar1 = this[0xc]; if (((byte)EVar1 & 1) == 0) { if (((byte)EVar1 & 2) == 0) { return; } } else if (((bool)(((byte)EVar1 & 8) >> 3) != param_2) && (*(int *)(this + (ulong)(((byte)EVar1 & 8) == 0) * 4 + 4) != param_1)) { this[0xc] = (Edge)(param_2 * '\b' | (byte)EVar1 & 0xf4 | 2); *(int *)(this + (ulong)!param_2 * 4 + 4) = param_1; return; } this[0xc] = (Edge)((byte)EVar1 & 0xf8 | 4); return; }
51,778
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int, bool)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp
void addFace(Index face, bool t) { // Update the state of the Edge based on the added incident face: if (boundary) { if (t == trailing) setNonManifold(); // Edge is reversed else if (face == (trailing ? prevFace : nextFace)) setNonManifold(); // Edge is repeated in the face else { setInterior(); // Edge is manifold thus far -- promote to interior setFace(face, t); } } else if (interior) { setNonManifold(); // More than two incident faces -- make non-manifold } }
O3
cpp
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int, bool): movb 0xc(%rdi), %al testb $0x1, %al jne 0xb422c testb $0x2, %al jne 0xb4245 retq movl %eax, %ecx andb $0x8, %cl shrb $0x3, %cl cmpb %dl, %cl je 0xb4245 xorl %ecx, %ecx testb $0x8, %al sete %cl cmpl %esi, 0x4(%rdi,%rcx,4) jne 0xb424d andb $-0x8, %al orb $0x4, %al movb %al, 0xc(%rdi) retq andb $-0xc, %al leal (,%rdx,8), %ecx orb %al, %cl orb $0x2, %cl movb %cl, 0xc(%rdi) xorb $0x1, %dl movzbl %dl, %eax movl %esi, 0x4(%rdi,%rax,4) retq nop
_ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge7addFaceEib: mov al, [rdi+0Ch] test al, 1 jnz short loc_B422C test al, 2 jnz short loc_B4245 retn loc_B422C: mov ecx, eax and cl, 8 shr cl, 3 cmp cl, dl jz short loc_B4245 xor ecx, ecx test al, 8 setz cl cmp [rdi+rcx*4+4], esi jnz short loc_B424D loc_B4245: and al, 0F8h or al, 4 mov [rdi+0Ch], al retn loc_B424D: and al, 0F4h lea ecx, ds:0[rdx*8] or cl, al or cl, 2 mov [rdi+0Ch], cl xor dl, 1 movzx eax, dl mov [rdi+rax*4+4], esi retn
char OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace( OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *this, int a2, unsigned __int8 a3) { long long v3; // rax LOBYTE(v3) = *((_BYTE *)this + 12); if ( (v3 & 1) != 0 ) { if ( (unsigned __int8)(v3 & 8) >> 3 != a3 && *((_DWORD *)this + ((v3 & 8) == 0) + 1) != a2 ) { *((_BYTE *)this + 12) = v3 & 0xF4 | (8 * a3) | 2; v3 = a3 ^ 1u; *((_DWORD *)this + v3 + 1) = a2; return v3; } } else if ( (v3 & 2) == 0 ) { return v3; } LOBYTE(v3) = v3 & 0xF8 | 4; *((_BYTE *)this + 12) = v3; return v3; }
addFace: MOV AL,byte ptr [RDI + 0xc] TEST AL,0x1 JNZ 0x001b422c TEST AL,0x2 JNZ 0x001b4245 RET LAB_001b422c: MOV ECX,EAX AND CL,0x8 SHR CL,0x3 CMP CL,DL JZ 0x001b4245 XOR ECX,ECX TEST AL,0x8 SETZ CL CMP dword ptr [RDI + RCX*0x4 + 0x4],ESI JNZ 0x001b424d LAB_001b4245: AND AL,0xf8 OR AL,0x4 MOV byte ptr [RDI + 0xc],AL RET LAB_001b424d: AND AL,0xf4 LEA ECX,[RDX*0x8] OR CL,AL OR CL,0x2 MOV byte ptr [RDI + 0xc],CL XOR DL,0x1 MOVZX EAX,DL MOV dword ptr [RDI + RAX*0x4 + 0x4],ESI RET
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int, bool) */ void __thiscall OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(Edge *this,int param_1,bool param_2) { Edge EVar1; EVar1 = this[0xc]; if (((byte)EVar1 & 1) == 0) { if (((byte)EVar1 & 2) == 0) { return; } } else if (((bool)(((byte)EVar1 & 8) >> 3) != param_2) && (*(int *)(this + (ulong)(((byte)EVar1 & 8) == 0) * 4 + 4) != param_1)) { this[0xc] = (Edge)(param_2 * '\b' | (byte)EVar1 & 0xf4 | 2); *(int *)(this + (ulong)!param_2 * 4 + 4) = param_1; return; } this[0xc] = (Edge)((byte)EVar1 & 0xf8 | 4); return; }
51,779
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
void push_back(const basic_json& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(val); set_parent(m_data.m_value.array->back(), old_capacity); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x7b907 movb $0x2, (%r14) callq 0x3e186 movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3e04c jmp 0x7b90c cmpl $0x2, %eax jne 0x7b920 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x7f068 pushq $0x20 popq %rdi callq 0x23470 movq %rax, %rbx movq %r14, %rdi callq 0x43b2e leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x39803(%rip), %rsi # 0xb5145 leaq 0x10(%rsp), %rdi callq 0x63b4f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x439e2 xorl %ebp, %ebp leaq 0x805db(%rip), %rsi # 0xfbf48 leaq -0x3b2b6(%rip), %rdx # 0x406be movq %rbx, %rdi callq 0x23f10 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241c8 testb %bpl, %bpl jne 0x7b993 jmp 0x7b99b movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 movq %r14, %rdi callq 0x23f90 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_7B907 mov byte ptr [r14], 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_7B90C loc_7B907: cmp eax, 2 jnz short loc_7B920 loc_7B90C: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) loc_7B920: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7B993 jmp short loc_7B99B mov r14, rax loc_7B993: mov rdi, rbx; void * call ___cxa_free_exception loc_7B99B: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; *(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::push_back( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0017b907 MOV byte ptr [R14],0x2 CALL 0x0013e186 MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013e04c JMP 0x0017b90c LAB_0017b907: CMP EAX,0x2 JNZ 0x0017b920 LAB_0017b90c: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x0017f068 LAB_0017b920: PUSH 0x20 POP RDI CALL 0x00123470 MOV RBX,RAX MOV RDI,R14 CALL 0x00143b2e LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017b93b: LEA RSI,[0x1b5145] LEA RDI,[RSP + 0x10] CALL 0x00163b4f MOV BPL,0x1 LAB_0017b94f: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x001439e2 XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x1406be] MOV RDI,RBX CALL 0x00123f10
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { vector *pvVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; pvVar1 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> (); *(vector **)(this + 8) = pvVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0017b93b to 0017b94b has its CatchHandler @ 0017b990 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 0017b94f to 0017b97b has its CatchHandler @ 0017b97c */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::push_back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8),param_1); return; }
51,780
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>::insert(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>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
iterator insert(const_iterator pos, const basic_json& val) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // check if iterator pos fits to this JSON value if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } // insert to array and return iterator return insert_iterator(pos, val); } JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert(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>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 cmpb $0x2, (%rsi) jne 0xaf89e movq (%rdx), %rsi cmpq %r14, %rsi jne 0xaf8fa movq %rdi, %rbx leaq 0x28(%rsp), %rax movq %rsi, (%rax) movups 0x8(%rdx), %xmm0 movups %xmm0, 0x8(%rax) movq 0x18(%rdx), %rdx movq %rdx, 0x18(%rax) movq %r14, %rsi movq %rax, %rdx callq 0xaf99c movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b480 movq %rax, %rbx movq %r14, %rdi callq 0x63c50 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x463da(%rip), %rsi # 0xf5c9c movq %rsp, %rdi callq 0xafa10 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x135, %esi # imm = 0x135 movq %r14, %rcx callq 0x639f8 xorl %ebp, %ebp leaq 0x7f65f(%rip), %rsi # 0x12ef48 leaq -0x4fa6a(%rip), %rdx # 0x5fe86 movq %rbx, %rdi callq 0x1c040 jmp 0xaf954 movl $0x20, %edi callq 0x1b480 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x4235f(%rip), %rsi # 0xf1c76 leaq 0x4237b(%rip), %rdx # 0xf1c99 movq %rsp, %rdi callq 0x2695a movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x63790 xorl %ebp, %ebp leaq 0x7f5c3(%rip), %rsi # 0x12ef08 leaq -0x4fac6(%rip), %rdx # 0x5fe86 movq %rbx, %rdi callq 0x1c040 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi jne 0xaf975 jmp 0xaf982 jmp 0xaf989 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaf982 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b930 testb %bpl, %bpl jne 0xaf98c jmp 0xaf994 movq %rax, %r14 movq %rbx, %rdi callq 0x1b6c0 movq %r14, %rdi callq 0x1c0d0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rsi cmp byte ptr [rsi], 2 jnz short loc_AF89E mov rsi, [rdx] cmp rsi, r14 jnz loc_AF8FA mov rbx, rdi lea rax, [rsp+68h+var_40] mov [rax], rsi movups xmm0, xmmword ptr [rdx+8] movups xmmword ptr [rax+8], xmm0 mov rdx, [rdx+18h] mov [rax+18h], rdx mov rsi, r14 mov rdx, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::insert_iterator<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&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_AF89E: 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, aCannotUseInser; "cannot use insert() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 135h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_AF954 loc_AF8FA: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+68h+var_58] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" 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 bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 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_AF954: mov r14, rax mov rdi, [rsp+68h+var_68] cmp rdi, r15 jnz short loc_AF975 jmp short loc_AF982 jmp short loc_AF989 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AF982 loc_AF975: mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AF982: test bpl, bpl jnz short loc_AF98C jmp short loc_AF994 loc_AF989: mov r14, rax loc_AF98C: mov rdi, rbx; void * call ___cxa_free_exception loc_AF994: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert( long long a1, unsigned __int8 *a2, long long a3) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v5; // rbx _QWORD v6[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v7[3]; // [rsp+10h] [rbp-58h] BYREF unsigned __int8 *v8; // [rsp+28h] [rbp-40h] BYREF __int128 v9; // [rsp+30h] [rbp-38h] long long v10; // [rsp+40h] [rbp-28h] if ( *a2 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7[2] = 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(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( v6, "cannot use insert() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 309, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if ( *(unsigned __int8 **)a3 != a2 ) { v5 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v6[0] = v7; std::string::_M_construct<char const*>((long long)v6, "iterator does not fit current value", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 202, v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v8 = *(unsigned __int8 **)a3; v9 = *(_OWORD *)(a3 + 8); v10 = *(_QWORD *)(a3 + 24); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>( a1, a2, &v8); return a1; }
insert: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI CMP byte ptr [RSI],0x2 JNZ 0x001af89e MOV RSI,qword ptr [RDX] CMP RSI,R14 JNZ 0x001af8fa MOV RBX,RDI LEA RAX,[RSP + 0x28] MOV qword ptr [RAX],RSI MOVUPS XMM0,xmmword ptr [RDX + 0x8] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOV RDX,qword ptr [RDX + 0x18] MOV qword ptr [RAX + 0x18],RDX MOV RSI,R14 MOV RDX,RAX CALL 0x001af99c MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001af89e: MOV EDI,0x20 CALL 0x0011b480 MOV RBX,RAX MOV RDI,R14 CALL 0x00163c50 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001af8bb: LEA RSI,[0x1f5c9c] MOV RDI,RSP CALL 0x001afa10 MOV BPL,0x1 LAB_001af8cd: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x135 MOV RCX,R14 CALL 0x001639f8 XOR EBP,EBP LEA RSI,[0x22ef48] LEA RDX,[0x15fe86] MOV RDI,RBX CALL 0x0011c040 LAB_001af8fa: MOV EDI,0x20 CALL 0x0011b480 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_001af910: LEA RSI,[0x1f1c76] LEA RDX,[0x1f1c99] MOV RDI,RSP CALL 0x0012695a MOV BPL,0x1 LAB_001af929: MOV RDX,RSP MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x00163790 XOR EBP,EBP LEA RSI,[0x22ef08] LEA RDX,[0x15fe86] MOV RDI,RBX CALL 0x0011c040
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ 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> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::insert(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json<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_2,long *param_3) { int8 uVar1; int1 *local_68 [2]; int1 local_58 [16]; char *local_48; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_40; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; long local_28; if (*param_2 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar1 = __cxa_allocate_exception(0x20); local_48 = (char *)type_name(param_2); /* try { // try from 001af8bb to 001af8c9 has its CatchHandler @ 001af989 */ detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> ((detail *)local_68,"cannot use insert() with ",&local_48); /* try { // try from 001af8cd to 001af8f7 has its CatchHandler @ 001af964 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x135,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } local_40 = (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_3; if (local_40 == param_2) { local_38 = (int4)param_3[1]; uStack_34 = *(int4 *)((long)param_3 + 0xc); uStack_30 = (int4)param_3[2]; uStack_2c = *(int4 *)((long)param_3 + 0x14); local_28 = param_3[3]; insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&> (this,param_2,&local_40); return this; } uVar1 = __cxa_allocate_exception(0x20); local_68[0] = local_58; /* try { // try from 001af910 to 001af925 has its CatchHandler @ 001af962 */ std::__cxx11::string::_M_construct<char_const*>(local_68,"iterator does not fit current value","") ; /* try { // try from 001af929 to 001af953 has its CatchHandler @ 001af954 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0xca,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::invalid_iterator::typeinfo,detail::exception::~exception); }
51,781
my_wc_mb_tis620
eloqsql/strings/ctype-tis620.c
static int my_wc_mb_tis620(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *str, uchar *end __attribute__((unused))) { const uchar *pl; if (str >= end) return MY_CS_TOOSMALL; pl= uni_to_cs[(wc>>8) & 0xFF]; str[0]= pl ? pl[wc & 0xFF] : '\0'; return (!str[0] && wc) ? MY_CS_ILUNI : 1; }
O3
c
my_wc_mb_tis620: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x5ddb2 pushq %rbp movq %rsp, %rbp pushq %rbx movq %rsi, %rbx movzbl %bh, %eax leaq 0x2b9365(%rip), %rcx # 0x3170f0 movq (%rcx,%rax,8), %rax testq %rax, %rax je 0x5dd9c movzbl %bl, %ecx movb (%rax,%rcx), %al jmp 0x5dd9e xorl %eax, %eax movb %al, (%rdx) testb %al, %al setne %al testq %rbx, %rbx sete %cl orb %al, %cl movzbl %cl, %eax popq %rbx popq %rbp retq
my_wc_mb_tis620: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_5DDB2 push rbp mov rbp, rsp push rbx mov rbx, rsi movzx eax, bh lea rcx, uni_to_cs_0 mov rax, [rcx+rax*8] test rax, rax jz short loc_5DD9C movzx ecx, bl mov al, [rax+rcx] jmp short loc_5DD9E loc_5DD9C: xor eax, eax loc_5DD9E: mov [rdx], al test al, al setnz al test rbx, rbx setz cl or cl, al movzx eax, cl pop rbx pop rbp locret_5DDB2: retn
long long my_wc_mb_tis620(long long a1, long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax long long v5; // rax char v6; // al result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = (long long)*(&uni_to_cs_0 + BYTE1(a2)); if ( v5 ) v6 = *(_BYTE *)(v5 + (unsigned __int8)a2); else v6 = 0; *a3 = v6; return (v6 != 0) | (unsigned __int8)(a2 == 0); } return result; }
my_wc_mb_tis620: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0015ddb2 PUSH RBP MOV RBP,RSP PUSH RBX MOV RBX,RSI MOVZX EAX,BH LEA RCX,[0x4170f0] MOV RAX,qword ptr [RCX + RAX*0x8] TEST RAX,RAX JZ 0x0015dd9c MOVZX ECX,BL MOV AL,byte ptr [RAX + RCX*0x1] JMP 0x0015dd9e LAB_0015dd9c: XOR EAX,EAX LAB_0015dd9e: MOV byte ptr [RDX],AL TEST AL,AL SETNZ AL TEST RBX,RBX SETZ CL OR CL,AL MOVZX EAX,CL POP RBX POP RBP LAB_0015ddb2: RET
ulong my_wc_mb_tis620(int8 param_1,ulong param_2,char *param_3,char *param_4) { char cVar1; ulong uVar2; uVar2 = 0xffffff9b; if (param_3 < param_4) { if (*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) == 0) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) + (param_2 & 0xff)); } *param_3 = cVar1; uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0'); } return uVar2; }
51,782
ExampleGuardedVector<int>::begin()
BadAccessGuards/examples/GuardedVectorExample.h
T* begin() noexcept { // We can't know whether it is used as read only or wrote to, accept the limitation and err on the conservative size BA_GUARD_READ(BAShadow); return super::data(); }
O3
c
ExampleGuardedVector<int>::begin(): pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rdi testb $0x3, %dil jne 0x2bf1 movq (%rbx), %rax popq %rbx retq xorl %esi, %esi callq 0x2c8a jmp 0x2bec movq %rax, %rdi callq 0x2c7f
_ZN20ExampleGuardedVectorIiE5beginEv: push rbx mov rbx, rdi mov rdi, [rdi+18h] test dil, 3 jnz short loc_2BF1 loc_2BEC: mov rax, [rbx] pop rbx retn loc_2BF1: xor esi, esi call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState) jmp short loc_2BEC mov rdi, rax call __clang_call_terminate
long long ExampleGuardedVector<int>::begin(_QWORD *a1) { long long v2; // rdi v2 = a1[3]; if ( (v2 & 3) != 0 ) BAGuardHandleBadAccess(v2, 0LL); return *a1; }
begin: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x18] TEST DIL,0x3 JNZ 0x00102bf1 LAB_00102bec: MOV RAX,qword ptr [RBX] POP RBX RET LAB_00102bf1: XOR ESI,ESI CALL 0x00102c8a JMP 0x00102bec
/* ExampleGuardedVector<int>::begin() */ int8 __thiscall ExampleGuardedVector<int>::begin(ExampleGuardedVector<int> *this) { if ((*(ulong *)(this + 0x18) & 3) != 0) { /* try { // try from 00102bf1 to 00102bf7 has its CatchHandler @ 00102bfa */ BAGuardHandleBadAccess(*(ulong *)(this + 0x18),0); } return *(int8 *)this; }
51,783
evmone::VM::VM()
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/vm.cpp
VM::VM() noexcept : evmc_vm{ EVMC_ABI_VERSION, "evmone", PROJECT_VERSION, evmone::destroy, evmone::baseline::execute, evmone::get_capabilities, evmone::set_option, } { m_execution_states.reserve(1025); }
O0
cpp
evmone::VM::VM(): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x18(%rbp) movl $0xc, (%rdi) leaq 0xa4c13(%rip), %rax # 0xdbd44 movq %rax, 0x8(%rdi) leaq 0xa4c0f(%rip), %rax # 0xdbd4b movq %rax, 0x10(%rdi) leaq 0x69(%rip), %rax # 0x371b0 movq %rax, 0x18(%rdi) leaq 0x1807e(%rip), %rax # 0x4f1d0 movq %rax, 0x20(%rdi) leaq 0xb3(%rip), %rax # 0x37210 movq %rax, 0x28(%rdi) leaq 0xb8(%rip), %rax # 0x37220 movq %rax, 0x30(%rdi) movb $0x1, 0x38(%rdi) movb $0x0, 0x39(%rdi) addq $0x40, %rdi movq %rdi, -0x10(%rbp) callq 0x37620 movq -0x18(%rbp), %rdi addq $0x58, %rdi callq 0x37640 movq -0x10(%rbp), %rdi movl $0x401, %esi # imm = 0x401 callq 0x37670 jmp 0x3719e addq $0x20, %rsp popq %rbp retq movq %rax, %rdi callq 0x36420 nopl (%rax)
_ZN6evmone2VMC2Ev: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_18], rdi mov dword ptr [rdi], 0Ch lea rax, aEvmone; "evmone" mov [rdi+8], rax lea rax, a0141; "0.14.1" mov [rdi+10h], rax lea rax, _ZN6evmone12_GLOBAL__N_17destroyEP7evmc_vm; evmone::`anonymous namespace'::destroy(evmc_vm *) mov [rdi+18h], rax lea rax, _ZN6evmone8baseline7executeEP7evmc_vmPK19evmc_host_interfaceP17evmc_host_context13evmc_revisionPK12evmc_messagePKhm; evmone::baseline::execute(evmc_vm *,evmc_host_interface const*,evmc_host_context *,evmc_revision,evmc_message const*,uchar const*,ulong) mov [rdi+20h], rax lea rax, _ZN6evmone12_GLOBAL__N_116get_capabilitiesEP7evmc_vm; evmone::`anonymous namespace'::get_capabilities(evmc_vm *) mov [rdi+28h], rax lea rax, _ZN6evmone12_GLOBAL__N_110set_optionEP7evmc_vmPKcS4_; evmone::`anonymous namespace'::set_option(evmc_vm *,char const*,char const*) mov [rdi+30h], rax mov byte ptr [rdi+38h], 1 mov byte ptr [rdi+39h], 0 add rdi, 40h ; '@' mov [rbp+var_10], rdi call _ZNSt6vectorIN6evmone14ExecutionStateESaIS1_EEC2Ev; std::vector<evmone::ExecutionState>::vector(void) mov rdi, [rbp+var_18] add rdi, 58h ; 'X' call _ZNSt10unique_ptrIN6evmone6TracerESt14default_deleteIS1_EEC2IS3_vEEv; std::unique_ptr<evmone::Tracer>::unique_ptr<std::default_delete<evmone::Tracer>,void>(void) mov rdi, [rbp+var_10] mov esi, 401h call _ZNSt6vectorIN6evmone14ExecutionStateESaIS1_EE7reserveEm; std::vector<evmone::ExecutionState>::reserve(ulong) jmp short $+2 loc_3719E: add rsp, 20h pop rbp retn mov rdi, rax call __clang_call_terminate
long long evmone::VM::VM(evmone::VM *this) { *(_DWORD *)this = 12; *((_QWORD *)this + 1) = "evmone"; *((_QWORD *)this + 2) = "0.14.1"; *((_QWORD *)this + 3) = evmone::`anonymous namespace'::destroy; *((_QWORD *)this + 4) = evmone::baseline::execute; *((_QWORD *)this + 5) = evmone::`anonymous namespace'::get_capabilities; *((_QWORD *)this + 6) = evmone::`anonymous namespace'::set_option; *((_BYTE *)this + 56) = 1; *((_BYTE *)this + 57) = 0; std::vector<evmone::ExecutionState>::vector(); std::unique_ptr<evmone::Tracer>::unique_ptr<std::default_delete<evmone::Tracer>,void>((char *)this + 88); return std::vector<evmone::ExecutionState>::reserve((char *)this + 64, 1025LL); }
VM: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RDI],0xc LEA RAX,[0x1dbd44] MOV qword ptr [RDI + 0x8],RAX LEA RAX,[0x1dbd4b] MOV qword ptr [RDI + 0x10],RAX LEA RAX,[0x1371b0] MOV qword ptr [RDI + 0x18],RAX LEA RAX,[0x14f1d0] MOV qword ptr [RDI + 0x20],RAX LEA RAX,[0x137210] MOV qword ptr [RDI + 0x28],RAX LEA RAX,[0x137220] MOV qword ptr [RDI + 0x30],RAX MOV byte ptr [RDI + 0x38],0x1 MOV byte ptr [RDI + 0x39],0x0 ADD RDI,0x40 MOV qword ptr [RBP + -0x10],RDI CALL 0x00137620 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x58 CALL 0x00137640 MOV RDI,qword ptr [RBP + -0x10] LAB_00137192: MOV ESI,0x401 CALL 0x00137670 JMP 0x0013719e LAB_0013719e: ADD RSP,0x20 POP RBP RET
/* evmone::VM::VM() */ void __thiscall evmone::VM::VM(VM *this) { *(int4 *)this = 0xc; *(char **)(this + 8) = "evmone"; *(char **)(this + 0x10) = "0.14.1"; *(code **)(this + 0x18) = (anonymous_namespace)::destroy; *(code **)(this + 0x20) = baseline::execute; *(code **)(this + 0x28) = (anonymous_namespace)::get_capabilities; *(code **)(this + 0x30) = (anonymous_namespace)::set_option; this[0x38] = (VM)0x1; this[0x39] = (VM)0x0; std::vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>>::vector ((vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>> *)(this + 0x40)) ; std::unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>>:: unique_ptr<std::default_delete<evmone::Tracer>,void> ((unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>> *)(this + 0x58)); /* try { // try from 00137192 to 0013719b has its CatchHandler @ 001371a4 */ std::vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>>::reserve ((vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>> *)(this + 0x40), 0x401); return; }
51,784
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<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<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, minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
T& at(const key_type& key) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it->second; } } JSON_THROW(std::out_of_range("key not found")); }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<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<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, minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdi), %rbx cmpq 0x8(%r15), %rbx je 0x6e4f4 movq %rbx, %rdi movq %r14, %rsi callq 0x684bc testb %al, %al jne 0x6e4e7 addq $0x60, %rbx jmp 0x6e4cc addq $0x10, %rbx movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x47db0(%rip), %rsi # 0xb62b6 movq %rax, %rdi callq 0x24100 movq 0x91aa3(%rip), %rsi # 0xfffb8 movq 0x91a7c(%rip), %rdx # 0xfff98 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_: push r15 push r14 push rbx mov r14, rsi mov r15, rdi mov rbx, [rdi] loc_6E4CC: cmp rbx, [r15+8] jz short loc_6E4F4 mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> 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, al jnz short loc_6E4E7 add rbx, 60h ; '`' jmp short loc_6E4CC loc_6E4E7: add rbx, 10h mov rax, rbx pop rbx pop r14 pop r15 retn loc_6E4F4: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aKeyNotFound; "key not found" mov rdi, rax; this call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*) mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
unsigned __int8 * nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::at( unsigned __int8 **a1, unsigned __int8 *a2, __m128d a3) { unsigned __int8 *i; // rbx std::out_of_range *exception; // rbx for ( i = *a1; ; i += 96 ) { if ( i == a1[1] ) { exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL); std::out_of_range::out_of_range(exception, "key not found"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::out_of_range, (void (*)(void *))&std::out_of_range::~out_of_range); } if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a3) ) break; } return i + 16; }
at: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV R15,RDI MOV RBX,qword ptr [RDI] LAB_0016e4cc: CMP RBX,qword ptr [R15 + 0x8] JZ 0x0016e4f4 MOV RDI,RBX MOV RSI,R14 CALL 0x001684bc TEST AL,AL JNZ 0x0016e4e7 ADD RBX,0x60 JMP 0x0016e4cc LAB_0016e4e7: ADD RBX,0x10 MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_0016e4f4: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_0016e4ff: LEA RSI,[0x1b62b6] MOV RDI,RAX CALL 0x00124100 LAB_0016e50e: MOV RSI,qword ptr [0x001fffb8] MOV RDX,qword ptr [0x001fff98] MOV RDI,RBX CALL 0x00124ee0
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::at(ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,basic_json *param_1) { char cVar1; out_of_range *this_00; basic_json *pbVar2; pbVar2 = *(basic_json **)this; while( true ) { if (pbVar2 == *(basic_json **)(this + 8)) { this_00 = (out_of_range *)__cxa_allocate_exception(0x10); /* try { // try from 0016e4ff to 0016e50d has its CatchHandler @ 0016e524 */ std::out_of_range::out_of_range(this_00,"key not found"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fffb8,PTR__out_of_range_001fff98); } cVar1 = json_abi_v3_11_3::operator==(pbVar2,param_1); if (cVar1 != '\0') break; pbVar2 = pbVar2 + 0x60; } return pbVar2 + 0x10; }
51,785
LefDefParser::defwNetPathPointWithExt(int, double*, double*, double*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwNetPathPointWithExt(int numPts, double *pointx, double *pointy, double *optValue) { int i; defwFunc = DEFW_PATH; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_PATH) return DEFW_BAD_ORDER; for (i = 0; i < numPts; i++) { if ((++defwLineItemCounter & 3) == 0) { fprintf(defwFile, "\n "); defwLines++; } fprintf(defwFile, " ( %.11g %.11g %.11g )", pointx[i], pointy[i], optValue[i]); } return DEFW_OK; }
O0
cpp
LefDefParser::defwNetPathPointWithExt(int, double*, double*, double*): subq $0x28, %rsp movl %edi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq %rcx, 0x8(%rsp) leaq 0x1001a(%rip), %rax # 0x2b168 movl $0x37, (%rax) leaq 0xfffd(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x1b16e movl $0x1, 0x24(%rsp) jmp 0x1b244 leaq 0xffef(%rip), %rax # 0x2b164 cmpl $0x37, (%rax) je 0x1b187 movl $0x2, 0x24(%rsp) jmp 0x1b244 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x20(%rsp), %eax jge 0x1b23c leaq 0xffd8(%rip), %rax # 0x2b17c movl (%rax), %eax addl $0x1, %eax leaq 0xffcc(%rip), %rcx # 0x2b17c movl %eax, (%rcx) andl $0x3, %eax cmpl $0x0, %eax jne 0x1b1e7 leaq 0xff97(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0x9529(%rip), %rsi # 0x246f4 movb $0x0, %al callq 0x10f0 leaq 0xff87(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0xff7b(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0xff6a(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x18(%rsp), %rax movslq 0x4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 movq 0x10(%rsp), %rax movslq 0x4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm1 movq 0x8(%rsp), %rax movslq 0x4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm2 leaq 0x9b09(%rip), %rsi # 0x24d2e movb $0x3, %al callq 0x10f0 movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x1b18f movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax)
_ZN12LefDefParser23defwNetPathPointWithExtEiPdS0_S0_: sub rsp, 28h mov [rsp+28h+var_8], edi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov [rsp+28h+var_20], rcx lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 37h ; '7' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_1B16E mov [rsp+28h+var_4], 1 jmp loc_1B244 loc_1B16E: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 37h ; '7' jz short loc_1B187 mov [rsp+28h+var_4], 2 jmp loc_1B244 loc_1B187: mov [rsp+28h+var_24], 0 loc_1B18F: mov eax, [rsp+28h+var_24] cmp eax, [rsp+28h+var_8] jge loc_1B23C lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter mov eax, [rax] add eax, 1 lea rcx, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter mov [rcx], eax and eax, 3 cmp eax, 0 jnz short loc_1B1E7 lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, asc_246F4; "\n " mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx loc_1B1E7: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rax, [rsp+28h+var_10] movsxd rcx, [rsp+28h+var_24] movsd xmm0, qword ptr [rax+rcx*8] mov rax, [rsp+28h+var_18] movsxd rcx, [rsp+28h+var_24] movsd xmm1, qword ptr [rax+rcx*8] mov rax, [rsp+28h+var_20] movsxd rcx, [rsp+28h+var_24] movsd xmm2, qword ptr [rax+rcx*8] lea rsi, a11g11g11g; " ( %.11g %.11g %.11g )" mov al, 3 call _fprintf mov eax, [rsp+28h+var_24] add eax, 1 mov [rsp+28h+var_24], eax jmp loc_1B18F loc_1B23C: mov [rsp+28h+var_4], 0 loc_1B244: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long LefDefParser::defwNetPathPointWithExt( LefDefParser *this, long long a2, double *a3, double *a4, double *a5) { int i; // [rsp+4h] [rbp-24h] LefDefParser::defwFunc = 55; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState == 55 ) { for ( i = 0; i < (int)this; ++i ) { if ( (++LefDefParser::defwLineItemCounter & 3) == 0 ) { fprintf(LefDefParser::defwFile, "\n "); ++LefDefParser::defwLines; } fprintf(LefDefParser::defwFile, " ( %.11g %.11g %.11g )", *(double *)(a2 + 8LL * i), a3[i], a4[i]); } return 0; } else { return 2; } } else { return 1; } }
defwNetPathPointWithExt: SUB RSP,0x28 MOV dword ptr [RSP + 0x20],EDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x8],RCX LEA RAX,[0x12b168] MOV dword ptr [RAX],0x37 LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x0011b16e MOV dword ptr [RSP + 0x24],0x1 JMP 0x0011b244 LAB_0011b16e: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x37 JZ 0x0011b187 MOV dword ptr [RSP + 0x24],0x2 JMP 0x0011b244 LAB_0011b187: MOV dword ptr [RSP + 0x4],0x0 LAB_0011b18f: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x20] JGE 0x0011b23c LEA RAX,[0x12b17c] MOV EAX,dword ptr [RAX] ADD EAX,0x1 LEA RCX,[0x12b17c] MOV dword ptr [RCX],EAX AND EAX,0x3 CMP EAX,0x0 JNZ 0x0011b1e7 LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x1246f4] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LAB_0011b1e7: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x4] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0x4] MOVSD XMM1,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP + 0x4] MOVSD XMM2,qword ptr [RAX + RCX*0x8] LEA RSI,[0x124d2e] MOV AL,0x3 CALL 0x001010f0 MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x0011b18f LAB_0011b23c: MOV dword ptr [RSP + 0x24],0x0 LAB_0011b244: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* LefDefParser::defwNetPathPointWithExt(int, double*, double*, double*) */ int4 LefDefParser::defwNetPathPointWithExt(int param_1,double *param_2,double *param_3,double *param_4) { int local_24; int4 local_4; defwFunc = 0x37; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if (defwState == 0x37) { for (local_24 = 0; local_24 < param_1; local_24 = local_24 + 1) { defwLineItemCounter = defwLineItemCounter + 1; if ((defwLineItemCounter & 3) == 0) { fprintf(defwFile,"\n "); defwLines = defwLines + 1; } fprintf(defwFile," ( %.11g %.11g %.11g )",param_2[local_24],param_3[local_24], param_4[local_24]); } local_4 = 0; } else { local_4 = 2; } return local_4; }
51,786
my_cset_init_8bit
eloqsql/strings/ctype-simple.c
static my_bool my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { cs->state|= my_8bit_charset_flags_from_data(cs); cs->caseup_multiply= 1; cs->casedn_multiply= 1; cs->pad_char= ' '; if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni) return TRUE; return create_fromuni(cs, loader); }
O0
c
my_cset_init_8bit: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x45ea0 movl %eax, %ecx movq -0x10(%rbp), %rax orl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x94(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x95(%rax) movq -0x10(%rbp), %rax movb $0x20, 0xb0(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x46c62 movq -0x10(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x46c62 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x46c62 movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x46c68 movb $0x1, -0x1(%rbp) jmp 0x46c78 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x46d50 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_cset_init_8bit: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] call my_8bit_charset_flags_from_data mov ecx, eax mov rax, [rbp+var_10] or ecx, [rax+0Ch] mov [rax+0Ch], ecx mov rax, [rbp+var_10] mov byte ptr [rax+94h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+95h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+0B0h], 20h ; ' ' mov rax, [rbp+var_10] cmp qword ptr [rax+48h], 0 jz short loc_46C62 mov rax, [rbp+var_10] cmp qword ptr [rax+50h], 0 jz short loc_46C62 mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz short loc_46C62 mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_46C68 loc_46C62: mov [rbp+var_1], 1 jmp short loc_46C78 loc_46C68: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call create_fromuni mov [rbp+var_1], al loc_46C78: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_cset_init_8bit(long long a1, long long a2) { *(_DWORD *)(a1 + 12) |= my_8bit_charset_flags_from_data(a1); *(_BYTE *)(a1 + 148) = 1; *(_BYTE *)(a1 + 149) = 1; *(_BYTE *)(a1 + 176) = 32; if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && *(_QWORD *)(a1 + 64) && *(_QWORD *)(a1 + 104) ) return create_fromuni(a1, a2); else return 1; }
my_cset_init_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00145ea0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] OR ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x94],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x95],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xb0],0x20 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x48],0x0 JZ 0x00146c62 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x50],0x0 JZ 0x00146c62 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00146c62 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x00146c68 LAB_00146c62: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146c78 LAB_00146c68: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00146d50 MOV byte ptr [RBP + -0x1],AL LAB_00146c78: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_cset_init_8bit(long param_1,int8 param_2) { uint uVar1; int1 local_9; uVar1 = my_8bit_charset_flags_from_data(param_1); *(uint *)(param_1 + 0xc) = uVar1 | *(uint *)(param_1 + 0xc); *(int1 *)(param_1 + 0x94) = 1; *(int1 *)(param_1 + 0x95) = 1; *(int1 *)(param_1 + 0xb0) = 0x20; if ((((*(long *)(param_1 + 0x48) == 0) || (*(long *)(param_1 + 0x50) == 0)) || (*(long *)(param_1 + 0x40) == 0)) || (*(long *)(param_1 + 0x68) == 0)) { local_9 = 1; } else { local_9 = create_fromuni(param_1,param_2); } return local_9; }
51,787
my_cset_init_8bit
eloqsql/strings/ctype-simple.c
static my_bool my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { cs->state|= my_8bit_charset_flags_from_data(cs); cs->caseup_multiply= 1; cs->casedn_multiply= 1; cs->pad_char= ' '; if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni) return TRUE; return create_fromuni(cs, loader); }
O3
c
my_cset_init_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1808, %rsp # imm = 0x1808 movq %rsi, -0x30(%rbp) movq %rdi, %rbx movq 0x68(%rdi), %r15 xorl %eax, %eax testq %r15, %r15 je 0x3a261 xorl %ecx, %ecx cmpw $0x80, (%r15,%rcx,2) jae 0x3a242 incq %rcx cmpq $0x100, %rcx # imm = 0x100 jne 0x3a228 movl $0x1000, %eax # imm = 0x1000 xorl %ecx, %ecx movzwl (%r15,%rcx,2), %edx cmpq %rdx, %rcx jne 0x3a25c incq %rcx cmpq $0x80, %rcx jne 0x3a244 jmp 0x3a261 orl $0x2000, %eax # imm = 0x2000 orl %eax, 0xc(%rbx) movw $0x101, 0x94(%rbx) # imm = 0x101 movb $0x20, 0xb0(%rbx) movb $0x1, %al cmpq $0x0, 0x48(%rbx) je 0x3a451 cmpq $0x0, 0x50(%rbx) je 0x3a451 testq %r15, %r15 je 0x3a451 cmpq $0x0, 0x40(%rbx) je 0x3a451 leaq -0x1830(%rbp), %rdi xorl %r12d, %r12d movl $0x1800, %edx # imm = 0x1800 xorl %esi, %esi callq 0x24180 movzwl (%r15,%r12,2), %eax testq %rax, %rax sete %cl testq %r12, %r12 setne %dl testb %cl, %dl jne 0x3a30e movl %eax, %ecx shrl $0x8, %ecx leaq (%rcx,%rcx,2), %rcx leaq -0x1830(,%rcx,8), %rcx addq %rbp, %rcx movl (%rcx), %edx testl %edx, %edx je 0x3a302 movl 0x8(%rcx), %esi movl %eax, %edi cmpw %si, %ax jb 0x3a2f1 movl %esi, %edi movw %di, 0x8(%rcx) movzwl 0xa(%rcx), %esi cmpw %si, %ax ja 0x3a306 movl %esi, %eax jmp 0x3a306 movw %ax, 0x8(%rcx) movw %ax, 0xa(%rcx) incl %edx movl %edx, (%rcx) incq %r12 cmpq $0x100, %r12 # imm = 0x100 jne 0x3a2b6 leaq 0x1b0(%rip), %rcx # 0x3a4d1 leaq -0x1830(%rbp), %rdi movl $0x100, %esi # imm = 0x100 movl $0x18, %edx callq 0x245b0 xorl %r13d, %r13d leaq (,%r13,2), %rax addq %r13, %rax cmpl $0x0, -0x1830(%rbp,%rax,8) je 0x3a3e8 leaq -0x1830(,%rax,8), %r14 addq %rbp, %r14 movzwl 0xa(%r14), %r12d movzwl 0x8(%r14), %eax subq %rax, %r12 incq %r12 movq %r12, %rdi movq -0x30(%rbp), %rax callq *0x80(%rax) movq %rax, 0x10(%r14) testq %rax, %rax je 0x3a43c movq %rax, %r15 movq %rax, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x24180 movl $0x1, %eax movq 0x68(%rbx), %rcx movzwl (%rcx,%rax,2), %ecx movzwl 0x8(%r14), %edx cmpw %dx, %cx jb 0x3a3c7 leal -0x1(%rcx), %esi cmpw 0xa(%r14), %si jae 0x3a3c7 subq %rdx, %rcx cmpb $0x0, (%r15,%rcx) jg 0x3a3c7 movb %al, (%r15,%rcx) incq %rax cmpq $0x100, %rax # imm = 0x100 jne 0x3a39d incq %r13 cmpq $0x100, %r13 # imm = 0x100 jne 0x3a33a movl $0x100, %r13d # imm = 0x100 movl %r13d, %r14d movq %r14, %rdi shlq $0x4, %rdi addq $0x10, %rdi movq -0x30(%rbp), %rax callq *0x80(%rax) movq %rax, 0x70(%rbx) testq %rax, %rax je 0x3a43c testl %r13d, %r13d je 0x3a440 movq %r14, %rax shlq $0x4, %rax leaq -0x1828(%rbp), %rcx xorl %edx, %edx movq 0x70(%rbx), %rsi movups (%rcx), %xmm0 movups %xmm0, (%rsi,%rdx) addq $0x10, %rdx addq $0x18, %rcx cmpq %rdx, %rax jne 0x3a41e movq 0x70(%rbx), %rax jmp 0x3a443 movb $0x1, %al jmp 0x3a451 xorl %r14d, %r14d shlq $0x4, %r14 xorps %xmm0, %xmm0 movups %xmm0, (%rax,%r14) xorl %eax, %eax addq $0x1808, %rsp # imm = 0x1808 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_cset_init_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 1808h mov [rbp+var_30], rsi mov rbx, rdi mov r15, [rdi+68h] xor eax, eax test r15, r15 jz short loc_3A261 xor ecx, ecx loc_3A228: cmp word ptr [r15+rcx*2], 80h jnb short loc_3A242 inc rcx cmp rcx, 100h jnz short loc_3A228 mov eax, 1000h loc_3A242: xor ecx, ecx loc_3A244: movzx edx, word ptr [r15+rcx*2] cmp rcx, rdx jnz short loc_3A25C inc rcx cmp rcx, 80h jnz short loc_3A244 jmp short loc_3A261 loc_3A25C: or eax, 2000h loc_3A261: or [rbx+0Ch], eax mov word ptr [rbx+94h], 101h mov byte ptr [rbx+0B0h], 20h ; ' ' mov al, 1 cmp qword ptr [rbx+48h], 0 jz loc_3A451 cmp qword ptr [rbx+50h], 0 jz loc_3A451 test r15, r15 jz loc_3A451 cmp qword ptr [rbx+40h], 0 jz loc_3A451 lea rdi, [rbp+var_1830] xor r12d, r12d mov edx, 1800h xor esi, esi call _memset loc_3A2B6: movzx eax, word ptr [r15+r12*2] test rax, rax setz cl test r12, r12 setnz dl test dl, cl jnz short loc_3A30E mov ecx, eax shr ecx, 8 lea rcx, [rcx+rcx*2] lea rcx, ds:0FFFFFFFFFFFFE7D0h[rcx*8] add rcx, rbp mov edx, [rcx] test edx, edx jz short loc_3A302 mov esi, [rcx+8] mov edi, eax cmp ax, si jb short loc_3A2F1 mov edi, esi loc_3A2F1: mov [rcx+8], di movzx esi, word ptr [rcx+0Ah] cmp ax, si ja short loc_3A306 mov eax, esi jmp short loc_3A306 loc_3A302: mov [rcx+8], ax loc_3A306: mov [rcx+0Ah], ax inc edx mov [rcx], edx loc_3A30E: inc r12 cmp r12, 100h jnz short loc_3A2B6 lea rcx, pcmp lea rdi, [rbp+var_1830] mov esi, 100h mov edx, 18h call _qsort xor r13d, r13d loc_3A33A: lea rax, ds:0[r13*2] add rax, r13 cmp [rbp+rax*8+var_1830], 0 jz loc_3A3E8 lea r14, ds:0FFFFFFFFFFFFE7D0h[rax*8] add r14, rbp movzx r12d, word ptr [r14+0Ah] movzx eax, word ptr [r14+8] sub r12, rax inc r12 mov rdi, r12 mov rax, [rbp+var_30] call qword ptr [rax+80h] mov [r14+10h], rax test rax, rax jz loc_3A43C mov r15, rax mov rdi, rax xor esi, esi mov rdx, r12 call _memset mov eax, 1 loc_3A39D: mov rcx, [rbx+68h] movzx ecx, word ptr [rcx+rax*2] movzx edx, word ptr [r14+8] cmp cx, dx jb short loc_3A3C7 lea esi, [rcx-1] cmp si, [r14+0Ah] jnb short loc_3A3C7 sub rcx, rdx cmp byte ptr [r15+rcx], 0 jg short loc_3A3C7 mov [r15+rcx], al loc_3A3C7: inc rax cmp rax, 100h jnz short loc_3A39D inc r13 cmp r13, 100h jnz loc_3A33A mov r13d, 100h loc_3A3E8: mov r14d, r13d mov rdi, r14 shl rdi, 4 add rdi, 10h mov rax, [rbp+var_30] call qword ptr [rax+80h] mov [rbx+70h], rax test rax, rax jz short loc_3A43C test r13d, r13d jz short loc_3A440 mov rax, r14 shl rax, 4 lea rcx, [rbp+var_1828] xor edx, edx loc_3A41E: mov rsi, [rbx+70h] movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rsi+rdx], xmm0 add rdx, 10h add rcx, 18h cmp rax, rdx jnz short loc_3A41E mov rax, [rbx+70h] jmp short loc_3A443 loc_3A43C: mov al, 1 jmp short loc_3A451 loc_3A440: xor r14d, r14d loc_3A443: shl r14, 4 xorps xmm0, xmm0 movups xmmword ptr [rax+r14], xmm0 xor eax, eax loc_3A451: add rsp, 1808h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char my_cset_init_8bit(long long a1, long long a2) { long long v3; // r15 int v4; // eax long long v5; // rcx long long v6; // rcx char result; // al long long v8; // r12 long long v9; // rax long long *v10; // rcx int v11; // edx __int16 v12; // di long long v13; // r13 long long *v14; // r14 unsigned long long v15; // r12 long long v16; // rax long long v17; // r15 long long i; // rax long long v19; // rcx long long v20; // rdx long long v21; // rcx long long v22; // r14 long long v23; // rax char *v24; // rcx long long v25; // rdx _DWORD v26[2]; // [rsp+0h] [rbp-1830h] BYREF char v27; // [rsp+8h] [rbp-1828h] BYREF long long v28; // [rsp+1800h] [rbp-30h] long long savedregs; // [rsp+1830h] [rbp+0h] BYREF _UNKNOWN *retaddr; // [rsp+1838h] [rbp+8h] v28 = a2; v3 = *(_QWORD *)(a1 + 104); v4 = 0; if ( v3 ) { v5 = 0LL; while ( *(_WORD *)(v3 + 2 * v5) < 0x80u ) { if ( ++v5 == 256 ) { v4 = 4096; break; } } v6 = 0LL; while ( v6 == *(unsigned __int16 *)(v3 + 2 * v6) ) { if ( ++v6 == 128 ) goto LABEL_11; } v4 |= 0x2000u; } LABEL_11: *(_DWORD *)(a1 + 12) |= v4; *(_WORD *)(a1 + 148) = 257; *(_BYTE *)(a1 + 176) = 32; result = 1; if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && v3 && *(_QWORD *)(a1 + 64) ) { v8 = 0LL; memset(v26, 0LL, 6144LL); do { v9 = *(unsigned __int16 *)(v3 + 2 * v8); if ( v9 != 0 || v8 == 0 ) { v10 = &savedregs + 3 * ((unsigned int)v9 >> 8) - 774; v11 = *(_DWORD *)v10; if ( *(_DWORD *)v10 ) { v12 = *(_WORD *)(v3 + 2 * v8); if ( (unsigned __int16)v9 >= (unsigned __int16)*((_DWORD *)v10 + 2) ) v12 = *((_DWORD *)v10 + 2); *((_WORD *)v10 + 4) = v12; if ( (unsigned __int16)v9 <= *((_WORD *)v10 + 5) ) LOWORD(v9) = *((_WORD *)v10 + 5); } else { *((_WORD *)v10 + 4) = v9; } *((_WORD *)v10 + 5) = v9; *(_DWORD *)v10 = v11 + 1; } ++v8; } while ( v8 != 256 ); qsort(v26, 256LL, 24LL, pcmp); v13 = 0LL; while ( v26[6 * v13] ) { v14 = &savedregs + 3 * v13 - 774; v15 = *((unsigned __int16 *)&retaddr + 12 * v13 - 3095) - (unsigned long long)*((unsigned __int16 *)&retaddr + 12 * v13 - 3096) + 1; v16 = (*(long long ( **)(unsigned long long))(v28 + 128))(v15); v14[2] = v16; if ( !v16 ) return 1; v17 = v16; memset(v16, 0LL, v15); for ( i = 1LL; i != 256; ++i ) { v19 = *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i); v20 = *((unsigned __int16 *)v14 + 4); if ( (unsigned __int16)v19 >= (unsigned __int16)v20 && (unsigned __int16)(v19 - 1) < *((_WORD *)v14 + 5) ) { v21 = v19 - v20; if ( *(char *)(v17 + v21) <= 0 ) *(_BYTE *)(v17 + v21) = i; } } if ( ++v13 == 256 ) { LODWORD(v13) = 256; break; } } v22 = (unsigned int)v13; v23 = (*(long long ( **)(long long))(v28 + 128))(16LL * (unsigned int)v13 + 16); *(_QWORD *)(a1 + 112) = v23; if ( !v23 ) return 1; if ( (_DWORD)v13 ) { v24 = &v27; v25 = 0LL; do { *(_OWORD *)(*(_QWORD *)(a1 + 112) + v25) = *(_OWORD *)v24; v25 += 16LL; v24 += 24; } while ( 16LL * (unsigned int)v13 != v25 ); v23 = *(_QWORD *)(a1 + 112); } else { v22 = 0LL; } *(_OWORD *)(v23 + 16 * v22) = 0LL; return 0; } return result; }
my_cset_init_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1808 MOV qword ptr [RBP + -0x30],RSI MOV RBX,RDI MOV R15,qword ptr [RDI + 0x68] XOR EAX,EAX TEST R15,R15 JZ 0x0013a261 XOR ECX,ECX LAB_0013a228: CMP word ptr [R15 + RCX*0x2],0x80 JNC 0x0013a242 INC RCX CMP RCX,0x100 JNZ 0x0013a228 MOV EAX,0x1000 LAB_0013a242: XOR ECX,ECX LAB_0013a244: MOVZX EDX,word ptr [R15 + RCX*0x2] CMP RCX,RDX JNZ 0x0013a25c INC RCX CMP RCX,0x80 JNZ 0x0013a244 JMP 0x0013a261 LAB_0013a25c: OR EAX,0x2000 LAB_0013a261: OR dword ptr [RBX + 0xc],EAX MOV word ptr [RBX + 0x94],0x101 MOV byte ptr [RBX + 0xb0],0x20 MOV AL,0x1 CMP qword ptr [RBX + 0x48],0x0 JZ 0x0013a451 CMP qword ptr [RBX + 0x50],0x0 JZ 0x0013a451 TEST R15,R15 JZ 0x0013a451 CMP qword ptr [RBX + 0x40],0x0 JZ 0x0013a451 LEA RDI,[RBP + -0x1830] XOR R12D,R12D MOV EDX,0x1800 XOR ESI,ESI CALL 0x00124180 LAB_0013a2b6: MOVZX EAX,word ptr [R15 + R12*0x2] TEST RAX,RAX SETZ CL TEST R12,R12 SETNZ DL TEST DL,CL JNZ 0x0013a30e MOV ECX,EAX SHR ECX,0x8 LEA RCX,[RCX + RCX*0x2] LEA RCX,[-0x1830 + RCX*0x8] ADD RCX,RBP MOV EDX,dword ptr [RCX] TEST EDX,EDX JZ 0x0013a302 MOV ESI,dword ptr [RCX + 0x8] MOV EDI,EAX CMP AX,SI JC 0x0013a2f1 MOV EDI,ESI LAB_0013a2f1: MOV word ptr [RCX + 0x8],DI MOVZX ESI,word ptr [RCX + 0xa] CMP AX,SI JA 0x0013a306 MOV EAX,ESI JMP 0x0013a306 LAB_0013a302: MOV word ptr [RCX + 0x8],AX LAB_0013a306: MOV word ptr [RCX + 0xa],AX INC EDX MOV dword ptr [RCX],EDX LAB_0013a30e: INC R12 CMP R12,0x100 JNZ 0x0013a2b6 LEA RCX,[0x13a4d1] LEA RDI,[RBP + -0x1830] MOV ESI,0x100 MOV EDX,0x18 CALL 0x001245b0 XOR R13D,R13D LAB_0013a33a: LEA RAX,[R13*0x2] ADD RAX,R13 CMP dword ptr [RBP + RAX*0x8 + -0x1830],0x0 JZ 0x0013a3e8 LEA R14,[-0x1830 + RAX*0x8] ADD R14,RBP MOVZX R12D,word ptr [R14 + 0xa] MOVZX EAX,word ptr [R14 + 0x8] SUB R12,RAX INC R12 MOV RDI,R12 MOV RAX,qword ptr [RBP + -0x30] CALL qword ptr [RAX + 0x80] MOV qword ptr [R14 + 0x10],RAX TEST RAX,RAX JZ 0x0013a43c MOV R15,RAX MOV RDI,RAX XOR ESI,ESI MOV RDX,R12 CALL 0x00124180 MOV EAX,0x1 LAB_0013a39d: MOV RCX,qword ptr [RBX + 0x68] MOVZX ECX,word ptr [RCX + RAX*0x2] MOVZX EDX,word ptr [R14 + 0x8] CMP CX,DX JC 0x0013a3c7 LEA ESI,[RCX + -0x1] CMP SI,word ptr [R14 + 0xa] JNC 0x0013a3c7 SUB RCX,RDX CMP byte ptr [R15 + RCX*0x1],0x0 JG 0x0013a3c7 MOV byte ptr [R15 + RCX*0x1],AL LAB_0013a3c7: INC RAX CMP RAX,0x100 JNZ 0x0013a39d INC R13 CMP R13,0x100 JNZ 0x0013a33a MOV R13D,0x100 LAB_0013a3e8: MOV R14D,R13D MOV RDI,R14 SHL RDI,0x4 ADD RDI,0x10 MOV RAX,qword ptr [RBP + -0x30] CALL qword ptr [RAX + 0x80] MOV qword ptr [RBX + 0x70],RAX TEST RAX,RAX JZ 0x0013a43c TEST R13D,R13D JZ 0x0013a440 MOV RAX,R14 SHL RAX,0x4 LEA RCX,[RBP + -0x1828] XOR EDX,EDX LAB_0013a41e: MOV RSI,qword ptr [RBX + 0x70] MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RSI + RDX*0x1],XMM0 ADD RDX,0x10 ADD RCX,0x18 CMP RAX,RDX JNZ 0x0013a41e MOV RAX,qword ptr [RBX + 0x70] JMP 0x0013a443 LAB_0013a43c: MOV AL,0x1 JMP 0x0013a451 LAB_0013a440: XOR R14D,R14D LAB_0013a443: SHL R14,0x4 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + R14*0x1],XMM0 XOR EAX,EAX LAB_0013a451: ADD RSP,0x1808 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_cset_init_8bit(long param_1,long param_2) { int8 *puVar1; int iVar2; ushort uVar3; uint uVar4; int8 uVar5; void *__s; long lVar6; long lVar7; ulong uVar8; ushort *puVar9; ushort uVar10; size_t __n; ulong uVar11; int local_1838 [2]; ushort local_1830 [4]; int8 auStack_1828 [766]; long local_38; lVar6 = *(long *)(param_1 + 0x68); uVar4 = 0; if (lVar6 != 0) { lVar7 = 0; do { if (0x7f < *(ushort *)(lVar6 + lVar7 * 2)) goto LAB_0013a242; lVar7 = lVar7 + 1; } while (lVar7 != 0x100); uVar4 = 0x1000; LAB_0013a242: uVar8 = 0; do { if (uVar8 != *(ushort *)(lVar6 + uVar8 * 2)) { uVar4 = uVar4 | 0x2000; break; } uVar8 = uVar8 + 1; } while (uVar8 != 0x80); } *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | uVar4; *(int2 *)(param_1 + 0x94) = 0x101; *(int1 *)(param_1 + 0xb0) = 0x20; uVar5 = 1; if ((((*(long *)(param_1 + 0x48) != 0) && (*(long *)(param_1 + 0x50) != 0)) && (lVar6 != 0)) && (*(long *)(param_1 + 0x40) != 0)) { lVar7 = 0; local_38 = param_2; memset(local_1838,0,0x1800); do { uVar3 = *(ushort *)(lVar6 + lVar7 * 2); if (lVar7 == 0 || uVar3 != 0) { uVar8 = (ulong)(uVar3 >> 8); iVar2 = local_1838[uVar8 * 6]; if (iVar2 == 0) { local_1830[uVar8 * 0xc] = uVar3; } else { uVar10 = uVar3; if ((ushort)*(int4 *)(local_1830 + uVar8 * 0xc) <= uVar3) { uVar10 = (ushort)*(int4 *)(local_1830 + uVar8 * 0xc); } local_1830[uVar8 * 0xc] = uVar10; if (uVar3 <= local_1830[uVar8 * 0xc + 1]) { uVar3 = local_1830[uVar8 * 0xc + 1]; } } local_1830[uVar8 * 0xc + 1] = uVar3; local_1838[uVar8 * 6] = iVar2 + 1; } lVar7 = lVar7 + 1; } while (lVar7 != 0x100); qsort(local_1838,0x100,0x18,pcmp); uVar8 = 0; do { if (local_1838[uVar8 * 6] == 0) goto LAB_0013a3e8; __n = ((ulong)local_1830[uVar8 * 0xc + 1] - (ulong)local_1830[uVar8 * 0xc]) + 1; __s = (void *)(**(code **)(local_38 + 0x80))(__n); auStack_1828[uVar8 * 3] = __s; if (__s == (void *)0x0) goto LAB_0013a43c; memset(__s,0,__n); lVar6 = 1; do { uVar3 = *(ushort *)(*(long *)(param_1 + 0x68) + lVar6 * 2); if (((local_1830[uVar8 * 0xc] <= uVar3) && ((ushort)(uVar3 - 1) < local_1830[uVar8 * 0xc + 1])) && (lVar7 = (ulong)uVar3 - (ulong)local_1830[uVar8 * 0xc], *(char *)((long)__s + lVar7) < '\x01')) { *(char *)((long)__s + lVar7) = (char)lVar6; } lVar6 = lVar6 + 1; } while (lVar6 != 0x100); uVar8 = uVar8 + 1; } while (uVar8 != 0x100); uVar8 = 0x100; LAB_0013a3e8: uVar11 = uVar8 & 0xffffffff; lVar6 = (**(code **)(local_38 + 0x80))(uVar11 * 0x10 + 0x10); *(long *)(param_1 + 0x70) = lVar6; if (lVar6 == 0) { LAB_0013a43c: uVar5 = 1; } else { if ((int)uVar8 == 0) { uVar11 = 0; } else { puVar9 = local_1830; lVar6 = 0; do { uVar5 = *(int8 *)(puVar9 + 4); puVar1 = (int8 *)(*(long *)(param_1 + 0x70) + lVar6); *puVar1 = *(int8 *)puVar9; puVar1[1] = uVar5; lVar6 = lVar6 + 0x10; puVar9 = puVar9 + 0xc; } while (uVar11 << 4 != lVar6); lVar6 = *(long *)(param_1 + 0x70); } puVar1 = (int8 *)(lVar6 + uVar11 * 0x10); *puVar1 = 0; puVar1[1] = 0; uVar5 = 0; } } return uVar5; }
51,788
my_wc_to_printable_8bit
eloqsql/strings/ctype.c
int my_wc_to_printable_8bit(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end) { /* Special case: swe7 does not have the backslash character. Use dot instead of backslash for escaping. */ uint bs= cs->tab_to_uni && cs->tab_to_uni['\\'] != '\\' ? '.' : '\\'; DBUG_ASSERT(cs->mbminlen == 1); /* Additionally, if the original swe7 string contains backslashes, replace them to dots, so this error message: Invalid swe7 character string: '\xEF\xBC\xB4' is displayed as: Invalid swe7 character string: '.xEF.xBC.xB4' which is more readable than what would happen without '\'-to-dot mapping: Invalid swe7 character string: '.005CxEF.005CxBC.005CxB4' */ if (bs == '.' && wc == '\\') wc= '.'; return my_wc_to_printable_ex(cs, wc, str, end, bs, 1, 1); }
O0
c
my_wc_to_printable_8bit: 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 -0x8(%rbp), %rcx xorl %eax, %eax cmpq $0x0, 0x68(%rcx) movb %al, -0x25(%rbp) je 0x6d0c0 movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movzwl 0xb8(%rax), %eax cmpl $0x5c, %eax setne %al movb %al, -0x25(%rbp) movb -0x25(%rbp), %dl movl $0x5c, %eax movl $0x2e, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x24(%rbp) jmp 0x6d0d8 cmpl $0x2e, -0x24(%rbp) jne 0x6d0ed cmpq $0x5c, -0x10(%rbp) jne 0x6d0ed movq $0x2e, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %r8d movl $0x1, %r9d movl $0x1, (%rsp) callq 0x6cd50 addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_wc_to_printable_8bit: 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 rcx, [rbp+var_8] xor eax, eax cmp qword ptr [rcx+68h], 0 mov [rbp+var_25], al jz short loc_6D0C0 mov rax, [rbp+var_8] mov rax, [rax+68h] movzx eax, word ptr [rax+0B8h] cmp eax, 5Ch ; '\' setnz al mov [rbp+var_25], al loc_6D0C0: mov dl, [rbp+var_25] mov eax, 5Ch ; '\' mov ecx, 2Eh ; '.' test dl, 1 cmovnz eax, ecx mov [rbp+var_24], eax jmp short $+2 loc_6D0D8: cmp [rbp+var_24], 2Eh ; '.' jnz short loc_6D0ED cmp [rbp+var_10], 5Ch ; '\' jnz short loc_6D0ED mov [rbp+var_10], 2Eh ; '.' loc_6D0ED: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8d, [rbp+var_24] mov r9d, 1 mov [rsp+30h+var_30], 1 call my_wc_to_printable_ex add rsp, 30h pop rbp retn
long long my_wc_to_printable_8bit(long long a1, long long a2, long long a3, unsigned long long a4) { unsigned int v4; // eax bool v6; // [rsp+Bh] [rbp-25h] long long v7; // [rsp+20h] [rbp-10h] v7 = a2; v6 = 0; if ( *(_QWORD *)(a1 + 104) ) v6 = *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 184LL) != 92; v4 = 92; if ( v6 ) v4 = 46; if ( v4 == 46 && a2 == 92 ) v7 = 46LL; return my_wc_to_printable_ex(a1, v7, a3, a4, v4, 1u, 1u); }
my_wc_to_printable_8bit: 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 RCX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP qword ptr [RCX + 0x68],0x0 MOV byte ptr [RBP + -0x25],AL JZ 0x0016d0c0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOVZX EAX,word ptr [RAX + 0xb8] CMP EAX,0x5c SETNZ AL MOV byte ptr [RBP + -0x25],AL LAB_0016d0c0: MOV DL,byte ptr [RBP + -0x25] MOV EAX,0x5c MOV ECX,0x2e TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x24],EAX JMP 0x0016d0d8 LAB_0016d0d8: CMP dword ptr [RBP + -0x24],0x2e JNZ 0x0016d0ed CMP qword ptr [RBP + -0x10],0x5c JNZ 0x0016d0ed MOV qword ptr [RBP + -0x10],0x2e LAB_0016d0ed: 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 R8D,dword ptr [RBP + -0x24] MOV R9D,0x1 MOV dword ptr [RSP],0x1 CALL 0x0016cd50 ADD RSP,0x30 POP RBP RET
void my_wc_to_printable_8bit(long param_1,long param_2,int8 param_3,int8 param_4) { int iVar1; bool bVar2; int8 local_18; bVar2 = false; if (*(long *)(param_1 + 0x68) != 0) { bVar2 = *(short *)(*(long *)(param_1 + 0x68) + 0xb8) != 0x5c; } iVar1 = 0x5c; if (bVar2) { iVar1 = 0x2e; } local_18 = param_2; if ((iVar1 == 0x2e) && (param_2 == 0x5c)) { local_18 = 0x2e; } my_wc_to_printable_ex(param_1,local_18,param_3,param_4,iVar1,1,1); return; }
51,789
blst_sk_mul_n_check
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/exports.c
int blst_sk_mul_n_check(pow256 ret, const pow256 a, const pow256 b) { vec256 t[2]; const union { long one; char little; } is_endian = { 1 }; bool_t is_zero; if (((size_t)a|(size_t)b)%sizeof(limb_t) != 0 || !is_endian.little) { limbs_from_le_bytes(t[0], a, sizeof(pow256)); limbs_from_le_bytes(t[1], b, sizeof(pow256)); a = (const byte *)t[0]; b = (const byte *)t[1]; } mul_mont_sparse_256(t[0], BLS12_381_rRR, (const limb_t *)a, BLS12_381_r, r0); mul_mont_sparse_256(t[0], t[0], (const limb_t *)b, BLS12_381_r, r0); le_bytes_from_limbs(ret, t[0], sizeof(pow256)); is_zero = vec_is_zero(t[0], sizeof(vec256)); vec_zero(t, sizeof(t)); return (int)(is_zero^1); }
O1
c
blst_sk_mul_n_check: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %rdx movq %rdi, %rbx movl %r14d, %eax orl %edx, %eax testb $0x7, %al je 0x251a4 movl $0x1f, %eax xorl %ecx, %ecx shlq $0x8, %rcx movzbl (%rdx,%rax), %esi orq %rsi, %rcx movq %rax, %rsi andq $-0x8, %rsi movq %rcx, -0x70(%rbp,%rsi) addq $-0x1, %rax jb 0x25157 leaq -0x50(%rbp), %rax movl $0x1f, %ecx xorl %esi, %esi leaq -0x70(%rbp), %rdx shlq $0x8, %rsi movzbl (%r14,%rcx), %edi orq %rdi, %rsi movq %rcx, %rdi andq $-0x8, %rdi movq %rsi, -0x50(%rbp,%rdi) addq $-0x1, %rcx jb 0x25183 movq %rax, %r14 leaq 0x1ac25(%rip), %rsi # 0x3fdd0 leaq 0x1a70e(%rip), %r15 # 0x3f8c0 leaq -0x70(%rbp), %r12 movabsq $-0x100000001, %r13 # imm = 0xFFFFFFFEFFFFFFFF movq %r12, %rdi movq %r15, %rcx movq %r13, %r8 callq 0x35d80 movq %r12, %rdi movq %r12, %rsi movq %r14, %rdx movq %r15, %rcx movq %r13, %r8 callq 0x35d80 cmpq %rbx, %r12 je 0x2520c xorl %eax, %eax movq -0x70(%rbp,%rax,8), %rdx xorl %ecx, %ecx movb %dl, (%rbx,%rcx) incq %rcx shrq $0x8, %rdx cmpq $0x8, %rcx jne 0x251f0 incq %rax addq %rcx, %rbx cmpq $0x4, %rax jne 0x251e9 leaq -0x70(%rbp), %rdi movl $0x20, %esi callq 0x30680 xorl %ecx, %ecx movq $0x0, -0x70(%rbp,%rcx,8) incq %rcx cmpq $0x8, %rcx jne 0x2521c leaq -0x70(%rbp), %rcx xorl $0x1, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
blst_sk_mul_n_check: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rdx mov rdx, rsi mov rbx, rdi mov eax, r14d or eax, edx test al, 7 jz short loc_251A4 mov eax, 1Fh xor ecx, ecx loc_25157: shl rcx, 8 movzx esi, byte ptr [rdx+rax] or rcx, rsi mov rsi, rax and rsi, 0FFFFFFFFFFFFFFF8h mov [rbp+rsi+var_70], rcx add rax, 0FFFFFFFFFFFFFFFFh jb short loc_25157 lea rax, [rbp+var_50] mov ecx, 1Fh xor esi, esi lea rdx, [rbp+var_70] loc_25183: shl rsi, 8 movzx edi, byte ptr [r14+rcx] or rsi, rdi mov rdi, rcx and rdi, 0FFFFFFFFFFFFFFF8h mov [rbp+rdi+var_50], rsi add rcx, 0FFFFFFFFFFFFFFFFh jb short loc_25183 mov r14, rax loc_251A4: lea rsi, BLS12_381_rRR lea r15, BLS12_381_r lea r12, [rbp+var_70] mov r13, 0FFFFFFFEFFFFFFFFh mov rdi, r12 mov rcx, r15 mov r8, r13 call mul_mont_sparse_256 mov rdi, r12 mov rsi, r12 mov rdx, r14 mov rcx, r15 mov r8, r13 call mul_mont_sparse_256 cmp r12, rbx jz short loc_2520C xor eax, eax loc_251E9: mov rdx, [rbp+rax*8+var_70] xor ecx, ecx loc_251F0: mov [rbx+rcx], dl inc rcx shr rdx, 8 cmp rcx, 8 jnz short loc_251F0 inc rax add rbx, rcx cmp rax, 4 jnz short loc_251E9 loc_2520C: lea rdi, [rbp+var_70] mov esi, 20h ; ' ' call vec_is_zero_16x xor ecx, ecx loc_2521C: mov [rbp+rcx*8+var_70], 0 inc rcx cmp rcx, 8 jnz short loc_2521C lea rcx, [rbp+var_70] xor eax, 1 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long blst_sk_mul_n_check(_QWORD *a1, _QWORD *a2, _QWORD *a3) { _QWORD *v4; // rdx _QWORD *v5; // rbx long long v6; // rax unsigned long long v7; // rcx bool v8; // cf long long v9; // rcx unsigned long long v10; // rsi long long i; // rax unsigned long long v12; // rdx long long j; // rcx int is_zero_16x; // eax long long k; // rcx _QWORD v17[4]; // [rsp+0h] [rbp-70h] BYREF _QWORD v18[10]; // [rsp+20h] [rbp-50h] BYREF v4 = a2; v5 = a1; if ( (((unsigned __int8)a2 | (unsigned __int8)a3) & 7) != 0 ) { v6 = 31LL; v7 = 0LL; do { v7 = *((unsigned __int8 *)a2 + v6) | (v7 << 8); *(_QWORD *)((char *)v17 + (v6 & 0xFFFFFFFFFFFFFFF8LL)) = v7; v8 = v6-- != 0; } while ( v8 ); v9 = 31LL; v10 = 0LL; v4 = v17; do { v10 = *((unsigned __int8 *)a3 + v9) | (v10 << 8); *(_QWORD *)((char *)v18 + (v9 & 0xFFFFFFFFFFFFFFF8LL)) = v10; v8 = v9-- != 0; } while ( v8 ); a3 = v18; } mul_mont_sparse_256(v17, &BLS12_381_rRR, v4, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); mul_mont_sparse_256(v17, v17, a3, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); if ( v17 != a1 ) { for ( i = 0LL; i != 4; ++i ) { v12 = v17[i]; for ( j = 0LL; j != 8; ++j ) { *((_BYTE *)v5 + j) = v12; v12 >>= 8; } ++v5; } } is_zero_16x = vec_is_zero_16x(v17, 32LL); for ( k = 0LL; k != 8; ++k ) v17[k] = 0LL; return is_zero_16x ^ 1u; }
blst_sk_mul_n_check: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RDX MOV RDX,RSI MOV RBX,RDI MOV EAX,R14D OR EAX,EDX TEST AL,0x7 JZ 0x001251a4 MOV EAX,0x1f XOR ECX,ECX LAB_00125157: SHL RCX,0x8 MOVZX ESI,byte ptr [RDX + RAX*0x1] OR RCX,RSI MOV RSI,RAX AND RSI,-0x8 MOV qword ptr [RBP + RSI*0x1 + -0x70],RCX ADD RAX,-0x1 JC 0x00125157 LEA RAX,[RBP + -0x50] MOV ECX,0x1f XOR ESI,ESI LEA RDX,[RBP + -0x70] LAB_00125183: SHL RSI,0x8 MOVZX EDI,byte ptr [R14 + RCX*0x1] OR RSI,RDI MOV RDI,RCX AND RDI,-0x8 MOV qword ptr [RBP + RDI*0x1 + -0x50],RSI ADD RCX,-0x1 JC 0x00125183 MOV R14,RAX LAB_001251a4: LEA RSI,[0x13fdd0] LEA R15,[0x13f8c0] LEA R12,[RBP + -0x70] MOV R13,-0x100000001 MOV RDI,R12 MOV RCX,R15 MOV R8,R13 CALL 0x00135d80 MOV RDI,R12 MOV RSI,R12 MOV RDX,R14 MOV RCX,R15 MOV R8,R13 CALL 0x00135d80 CMP R12,RBX JZ 0x0012520c XOR EAX,EAX LAB_001251e9: MOV RDX,qword ptr [RBP + RAX*0x8 + -0x70] XOR ECX,ECX LAB_001251f0: MOV byte ptr [RBX + RCX*0x1],DL INC RCX SHR RDX,0x8 CMP RCX,0x8 JNZ 0x001251f0 INC RAX ADD RBX,RCX CMP RAX,0x4 JNZ 0x001251e9 LAB_0012520c: LEA RDI,[RBP + -0x70] MOV ESI,0x20 CALL 0x00130680 XOR ECX,ECX LAB_0012521c: MOV qword ptr [RBP + RCX*0x8 + -0x70],0x0 INC RCX CMP RCX,0x8 JNZ 0x0012521c LEA RCX,[RBP + -0x70] XOR EAX,0x1 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint blst_sk_mul_n_check(ulong *param_1,ulong *param_2,ulong *param_3) { uint uVar1; ulong uVar2; long lVar3; ulong uVar4; long lVar5; ulong *puVar6; bool bVar7; ulong local_78 [9]; puVar6 = param_3; if ((((uint)param_3 | (uint)param_2) & 7) != 0) { uVar2 = 0x1f; uVar4 = 0; do { uVar4 = uVar4 << 8 | (ulong)*(byte *)((long)param_2 + uVar2); *(ulong *)((long)local_78 + (uVar2 & 0xfffffffffffffff8)) = uVar4; bVar7 = uVar2 != 0; uVar2 = uVar2 - 1; } while (bVar7); puVar6 = local_78 + 4; uVar2 = 0x1f; uVar4 = 0; param_2 = local_78; do { uVar4 = uVar4 << 8 | (ulong)*(byte *)((long)param_3 + uVar2); *(ulong *)((long)local_78 + (uVar2 & 0xfffffffffffffff8) + 0x20) = uVar4; bVar7 = uVar2 != 0; uVar2 = uVar2 - 1; } while (bVar7); } mul_mont_sparse_256(local_78,BLS12_381_rRR,param_2,BLS12_381_r,0xfffffffeffffffff); mul_mont_sparse_256(local_78,local_78,puVar6,BLS12_381_r,0xfffffffeffffffff); if (local_78 != param_1) { lVar3 = 0; do { uVar2 = local_78[lVar3]; lVar5 = 0; do { *(char *)((long)param_1 + lVar5) = (char)uVar2; lVar5 = lVar5 + 1; uVar2 = uVar2 >> 8; } while (lVar5 != 8); lVar3 = lVar3 + 1; param_1 = param_1 + 1; } while (lVar3 != 4); } uVar1 = vec_is_zero_16x(local_78,0x20); lVar3 = 0; do { local_78[lVar3] = 0; lVar3 = lVar3 + 1; } while (lVar3 != 8); return uVar1 ^ 1; }
51,790
UIMouse::addUIMouseChild(Object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, float, Anchor)
GhostEscape/src/screen/ui_mouse.cpp
UIMouse *UIMouse::addUIMouseChild(Object *parent, const std::string &file_path1, const std::string &file_path2, float scale, Anchor anchor) { auto ui_mouse = new UIMouse(); ui_mouse->init(); ui_mouse->sprite1_ = Sprite::addSpriteChild(ui_mouse, file_path1, scale, anchor); ui_mouse->sprite2_ = Sprite::addSpriteChild(ui_mouse, file_path2, scale, anchor); if (parent) parent->addChild(ui_mouse); return ui_mouse; }
O0
cpp
UIMouse::addUIMouseChild(Object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, float, Anchor): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movss %xmm0, -0x1c(%rbp) movl %ecx, -0x20(%rbp) movl $0x70, %edi callq 0x6460 movq %rax, %rdi movq %rdi, -0x48(%rbp) movq %rdi, %rax movq %rax, -0x40(%rbp) xorps %xmm0, %xmm0 movaps %xmm0, 0x60(%rdi) movaps %xmm0, 0x50(%rdi) movaps %xmm0, 0x40(%rdi) movaps %xmm0, 0x30(%rdi) movaps %xmm0, 0x20(%rdi) movaps %xmm0, 0x10(%rdi) movaps %xmm0, (%rdi) callq 0x15b90 jmp 0x15a19 movq -0x40(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi movq (%rdi), %rax callq *0x10(%rax) movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rsi movss -0x1c(%rbp), %xmm0 movl -0x20(%rbp), %edx callq 0x1a880 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, 0x58(%rax) movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi movss -0x1c(%rbp), %xmm0 movl -0x20(%rbp), %edx callq 0x1a880 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, 0x60(%rax) cmpq $0x0, -0x8(%rbp) je 0x15a9e movq -0x8(%rbp), %rdi movq -0x28(%rbp), %rsi movq (%rdi), %rax callq *0x38(%rax) jmp 0x15a9e movq -0x40(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) movl $0x70, %esi callq 0x6480 jmp 0x15aa8 movq -0x28(%rbp), %rax addq $0x50, %rsp popq %rbp retq movq -0x30(%rbp), %rdi callq 0x6750 nopw %cs:(%rax,%rax)
_ZN7UIMouse15addUIMouseChildEP6ObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_f6Anchor: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx movss [rbp+var_1C], xmm0 mov [rbp+var_20], ecx mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov [rbp+var_48], rdi mov rax, rdi mov [rbp+var_40], rax xorps xmm0, xmm0 movaps xmmword ptr [rdi+60h], xmm0 movaps xmmword ptr [rdi+50h], xmm0 movaps xmmword ptr [rdi+40h], xmm0 movaps xmmword ptr [rdi+30h], xmm0 movaps xmmword ptr [rdi+20h], xmm0 movaps xmmword ptr [rdi+10h], xmm0 movaps xmmword ptr [rdi], xmm0 call _ZN7UIMouseC2Ev; UIMouse::UIMouse(void) jmp short $+2 loc_15A19: mov rax, [rbp+var_40] mov [rbp+var_28], rax mov rdi, [rbp+var_28] mov rax, [rdi] call qword ptr [rax+10h] mov rdi, [rbp+var_28] mov rsi, [rbp+var_10] movss xmm0, [rbp+var_1C] mov edx, [rbp+var_20] call _ZN6Sprite14addSpriteChildEP12ObjectScreenRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEf6Anchor; Sprite::addSpriteChild(ObjectScreen *,std::string const&,float,Anchor) mov rcx, rax mov rax, [rbp+var_28] mov [rax+58h], rcx mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] movss xmm0, [rbp+var_1C] mov edx, [rbp+var_20] call _ZN6Sprite14addSpriteChildEP12ObjectScreenRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEf6Anchor; Sprite::addSpriteChild(ObjectScreen *,std::string const&,float,Anchor) mov rcx, rax mov rax, [rbp+var_28] mov [rax+60h], rcx cmp [rbp+var_8], 0 jz short loc_15A9E mov rdi, [rbp+var_8] mov rsi, [rbp+var_28] mov rax, [rdi] call qword ptr [rax+38h] jmp short loc_15A9E mov rdi, [rbp+var_40]; void * mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax mov esi, 70h ; 'p'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_15AA8 loc_15A9E: mov rax, [rbp+var_28] add rsp, 50h pop rbp retn loc_15AA8: mov rdi, [rbp+var_30] call __Unwind_Resume
UIMouse * UIMouse::addUIMouseChild(long long a1, long long a2, long long a3, unsigned int a4, float a5) { UIMouse *v6; // [rsp+10h] [rbp-40h] v6 = (UIMouse *)operator new(0x70uLL); *((_OWORD *)v6 + 6) = 0LL; *((_OWORD *)v6 + 5) = 0LL; *((_OWORD *)v6 + 4) = 0LL; *((_OWORD *)v6 + 3) = 0LL; *((_OWORD *)v6 + 2) = 0LL; *((_OWORD *)v6 + 1) = 0LL; *(_OWORD *)v6 = 0LL; UIMouse::UIMouse(v6); (*(void ( **)(UIMouse *))(*(_QWORD *)v6 + 16LL))(v6); *((_QWORD *)v6 + 11) = Sprite::addSpriteChild(v6, a2, a4, a5); *((_QWORD *)v6 + 12) = Sprite::addSpriteChild(v6, a3, a4, a5); if ( a1 ) (*(void ( **)(long long, UIMouse *))(*(_QWORD *)a1 + 56LL))(a1, v6); return v6; }
addUIMouseChild: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOVSS dword ptr [RBP + -0x1c],XMM0 MOV dword ptr [RBP + -0x20],ECX MOV EDI,0x70 CALL 0x00106460 MOV RDI,RAX MOV qword ptr [RBP + -0x48],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x40],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI + 0x60],XMM0 MOVAPS xmmword ptr [RDI + 0x50],XMM0 MOVAPS xmmword ptr [RDI + 0x40],XMM0 MOVAPS xmmword ptr [RDI + 0x30],XMM0 MOVAPS xmmword ptr [RDI + 0x20],XMM0 MOVAPS xmmword ptr [RDI + 0x10],XMM0 MOVAPS xmmword ptr [RDI],XMM0 LAB_00115a12: CALL 0x00115b90 LAB_00115a17: JMP 0x00115a19 LAB_00115a19: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RBP + -0x20] CALL 0x0011a880 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x58],RCX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] MOVSS XMM0,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RBP + -0x20] CALL 0x0011a880 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x60],RCX CMP qword ptr [RBP + -0x8],0x0 JZ 0x00115a9e MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x38] JMP 0x00115a9e LAB_00115a9e: MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x50 POP RBP RET
/* UIMouse::addUIMouseChild(Object*, std::__cxx11::string const&, std::__cxx11::string const&, float, Anchor) */ UIMouse * UIMouse::addUIMouseChild (int4 param_4,long *param_1,int8 param_2,int8 param_3, int4 param_5) { UIMouse *this; int8 uVar1; this = (UIMouse *)operator_new(0x70); *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; /* try { // try from 00115a12 to 00115a16 has its CatchHandler @ 00115a82 */ UIMouse(this); (**(code **)(*(long *)this + 0x10))(); uVar1 = Sprite::addSpriteChild(param_4,this,param_2,param_5); *(int8 *)(this + 0x58) = uVar1; uVar1 = Sprite::addSpriteChild(param_4,this,param_3,param_5); *(int8 *)(this + 0x60) = uVar1; if (param_1 != (long *)0x0) { (**(code **)(*param_1 + 0x38))(param_1,this); } return this; }
51,791
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 0x55c35 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 0x55c38 pushq %rbp movq %rsp, %rbp callq 0xc14ee movl $0xb0, (%rax) popq %rbp movb $0x1, %al retq movl 0x8(%rsi), %esi movl $0xffffffff, %ecx # imm = 0xFFFFFFFF jmp 0x55a94
maria_page_crc_check_index: test edi, edi jnz short loc_55C35 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_55C38 push rbp mov rbp, rsp call _my_thread_var mov dword ptr [rax], 0B0h pop rbp loc_55C35: mov al, 1 retn loc_55C38: 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 0x00155c35 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 0x00155c38 PUSH RBP MOV RBP,RSP CALL 0x001c14ee MOV dword ptr [RAX],0xb0 POP RBP LAB_00155c35: MOV AL,0x1 RET LAB_00155c38: MOV ESI,dword ptr [RSI + 0x8] MOV ECX,0xffffffff JMP 0x00155a94
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; }
51,792
push_state
bluesky950520[P]quickjs/libregexp.c
static int push_state(REExecContext *s, uint8_t **capture, StackInt *stack, size_t stack_len, const uint8_t *pc, const uint8_t *cptr, REExecStateEnum type, size_t count) { REExecState *rs; uint8_t *new_stack; size_t new_size, i, n; StackInt *stack_buf; if (unlikely((s->state_stack_len + 1) > s->state_stack_size)) { /* reallocate the stack */ new_size = s->state_stack_size * 3 / 2; if (new_size < 8) new_size = 8; new_stack = lre_realloc(s->opaque, s->state_stack, new_size * s->state_size); if (!new_stack) return -1; s->state_stack_size = new_size; s->state_stack = new_stack; } rs = (REExecState *)(s->state_stack + s->state_stack_len * s->state_size); s->state_stack_len++; rs->type = type; rs->count = count; rs->stack_len = stack_len; rs->cptr = cptr; rs->pc = pc; n = 2 * s->capture_count; for(i = 0; i < n; i++) rs->buf[i] = capture[i]; stack_buf = (StackInt *)(rs->buf + n); for(i = 0; i < stack_len; i++) stack_buf[i] = stack[i]; return 0; }
O0
c
push_state: subq $0x68, %rsp movq 0x78(%rsp), %rax movl 0x70(%rsp), %eax movq %rdi, 0x58(%rsp) movq %rsi, 0x50(%rsp) movq %rdx, 0x48(%rsp) movq %rcx, 0x40(%rsp) movq %r8, 0x38(%rsp) movq %r9, 0x30(%rsp) movq 0x58(%rsp), %rax movq 0x48(%rax), %rax addq $0x1, %rax movq 0x58(%rsp), %rcx cmpq 0x40(%rcx), %rax seta %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x109e84 movq 0x58(%rsp), %rax imulq $0x3, 0x40(%rax), %rax shrq %rax movq %rax, 0x18(%rsp) cmpq $0x8, 0x18(%rsp) jae 0x109e28 movq $0x8, 0x18(%rsp) movq 0x58(%rsp), %rax movq 0x28(%rax), %rdi movq 0x58(%rsp), %rax movq 0x38(%rax), %rsi movq 0x18(%rsp), %rdx movq 0x58(%rsp), %rax imulq 0x30(%rax), %rdx callq 0x54010 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x109e68 movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x109fb1 movq 0x18(%rsp), %rcx movq 0x58(%rsp), %rax movq %rcx, 0x40(%rax) movq 0x20(%rsp), %rcx movq 0x58(%rsp), %rax movq %rcx, 0x38(%rax) movq 0x58(%rsp), %rax movq 0x38(%rax), %rax movq 0x58(%rsp), %rcx movq 0x48(%rcx), %rcx movq 0x58(%rsp), %rdx imulq 0x30(%rdx), %rcx addq %rcx, %rax movq %rax, 0x28(%rsp) movq 0x58(%rsp), %rax movq 0x48(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x48(%rax) movl 0x70(%rsp), %ecx movq 0x28(%rsp), %rax movb %cl, (%rax) movq 0x78(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x40(%rsp), %rax movb %al, %cl movq 0x28(%rsp), %rax movb %cl, 0x1(%rax) movq 0x30(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x38(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x58(%rsp), %rax movl 0x14(%rax), %eax shll %eax cltq movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq 0x8(%rsp), %rax jae 0x109f50 movq 0x50(%rsp), %rax movq 0x10(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx movq %rdx, 0x20(%rax,%rcx,8) movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0x109f17 movq 0x28(%rsp), %rax addq $0x20, %rax movq 0x8(%rsp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, (%rsp) movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq 0x40(%rsp), %rax jae 0x109fa9 movq 0x48(%rsp), %rax movq 0x10(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq (%rsp), %rax movq 0x10(%rsp), %rcx movq %rdx, (%rax,%rcx,8) movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0x109f72 movl $0x0, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopw (%rax,%rax)
push_state: sub rsp, 68h mov rax, [rsp+68h+arg_8] mov eax, [rsp+68h+arg_0] mov [rsp+68h+var_10], rdi mov [rsp+68h+var_18], rsi mov [rsp+68h+var_20], rdx mov [rsp+68h+var_28], rcx mov [rsp+68h+var_30], r8 mov [rsp+68h+var_38], r9 mov rax, [rsp+68h+var_10] mov rax, [rax+48h] add rax, 1 mov rcx, [rsp+68h+var_10] cmp rax, [rcx+40h] setnbe al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_109E84 mov rax, [rsp+68h+var_10] imul rax, [rax+40h], 3 shr rax, 1 mov [rsp+68h+var_50], rax cmp [rsp+68h+var_50], 8 jnb short loc_109E28 mov [rsp+68h+var_50], 8 loc_109E28: mov rax, [rsp+68h+var_10] mov rdi, [rax+28h] mov rax, [rsp+68h+var_10] mov rsi, [rax+38h] mov rdx, [rsp+68h+var_50] mov rax, [rsp+68h+var_10] imul rdx, [rax+30h] call lre_realloc mov [rsp+68h+var_48], rax cmp [rsp+68h+var_48], 0 jnz short loc_109E68 mov [rsp+68h+var_4], 0FFFFFFFFh jmp loc_109FB1 loc_109E68: mov rcx, [rsp+68h+var_50] mov rax, [rsp+68h+var_10] mov [rax+40h], rcx mov rcx, [rsp+68h+var_48] mov rax, [rsp+68h+var_10] mov [rax+38h], rcx loc_109E84: mov rax, [rsp+68h+var_10] mov rax, [rax+38h] mov rcx, [rsp+68h+var_10] mov rcx, [rcx+48h] mov rdx, [rsp+68h+var_10] imul rcx, [rdx+30h] add rax, rcx mov [rsp+68h+var_40], rax mov rax, [rsp+68h+var_10] mov rcx, [rax+48h] add rcx, 1 mov [rax+48h], rcx mov ecx, [rsp+68h+arg_0] mov rax, [rsp+68h+var_40] mov [rax], cl mov rcx, [rsp+68h+arg_8] mov rax, [rsp+68h+var_40] mov [rax+8], rcx mov rax, [rsp+68h+var_28] mov cl, al mov rax, [rsp+68h+var_40] mov [rax+1], cl mov rcx, [rsp+68h+var_38] mov rax, [rsp+68h+var_40] mov [rax+10h], rcx mov rcx, [rsp+68h+var_30] mov rax, [rsp+68h+var_40] mov [rax+18h], rcx mov rax, [rsp+68h+var_10] mov eax, [rax+14h] shl eax, 1 cdqe mov [rsp+68h+var_60], rax mov [rsp+68h+var_58], 0 loc_109F17: mov rax, [rsp+68h+var_58] cmp rax, [rsp+68h+var_60] jnb short loc_109F50 mov rax, [rsp+68h+var_18] mov rcx, [rsp+68h+var_58] mov rdx, [rax+rcx*8] mov rax, [rsp+68h+var_40] mov rcx, [rsp+68h+var_58] mov [rax+rcx*8+20h], rdx mov rax, [rsp+68h+var_58] add rax, 1 mov [rsp+68h+var_58], rax jmp short loc_109F17 loc_109F50: mov rax, [rsp+68h+var_40] add rax, 20h ; ' ' mov rcx, [rsp+68h+var_60] shl rcx, 3 add rax, rcx mov [rsp+68h+var_68], rax mov [rsp+68h+var_58], 0 loc_109F72: mov rax, [rsp+68h+var_58] cmp rax, [rsp+68h+var_28] jnb short loc_109FA9 mov rax, [rsp+68h+var_20] mov rcx, [rsp+68h+var_58] mov rdx, [rax+rcx*8] mov rax, [rsp+68h+var_68] mov rcx, [rsp+68h+var_58] mov [rax+rcx*8], rdx mov rax, [rsp+68h+var_58] add rax, 1 mov [rsp+68h+var_58], rax jmp short loc_109F72 loc_109FA9: mov [rsp+68h+var_4], 0 loc_109FB1: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long push_state( long long a1, long long a2, long long a3, unsigned long long a4, long long a5, long long a6, char a7, long long a8) { unsigned long long v9; // [rsp+8h] [rbp-60h] unsigned long long i; // [rsp+10h] [rbp-58h] unsigned long long j; // [rsp+10h] [rbp-58h] unsigned long long v12; // [rsp+18h] [rbp-50h] long long v13; // [rsp+20h] [rbp-48h] long long v14; // [rsp+28h] [rbp-40h] if ( (unsigned long long)(*(_QWORD *)(a1 + 72) + 1LL) > *(_QWORD *)(a1 + 64) ) { v12 = (unsigned long long)(3LL * *(_QWORD *)(a1 + 64)) >> 1; if ( v12 < 8 ) v12 = 8LL; v13 = lre_realloc(*(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 56), *(_QWORD *)(a1 + 48) * v12); if ( !v13 ) return (unsigned int)-1; *(_QWORD *)(a1 + 64) = v12; *(_QWORD *)(a1 + 56) = v13; } v14 = *(_QWORD *)(a1 + 48) * (*(_QWORD *)(a1 + 72))++ + *(_QWORD *)(a1 + 56); *(_BYTE *)v14 = a7; *(_QWORD *)(v14 + 8) = a8; *(_BYTE *)(v14 + 1) = a4; *(_QWORD *)(v14 + 16) = a6; *(_QWORD *)(v14 + 24) = a5; v9 = 2 * *(_DWORD *)(a1 + 20); for ( i = 0LL; i < v9; ++i ) *(_QWORD *)(v14 + 8 * i + 32) = *(_QWORD *)(a2 + 8 * i); for ( j = 0LL; j < a4; ++j ) *(_QWORD *)(8 * v9 + v14 + 32 + 8 * j) = *(_QWORD *)(a3 + 8 * j); return 0; }
51,793
push_state
bluesky950520[P]quickjs/libregexp.c
static int push_state(REExecContext *s, uint8_t **capture, StackInt *stack, size_t stack_len, const uint8_t *pc, const uint8_t *cptr, REExecStateEnum type, size_t count) { REExecState *rs; uint8_t *new_stack; size_t new_size, i, n; StackInt *stack_buf; if (unlikely((s->state_stack_len + 1) > s->state_stack_size)) { /* reallocate the stack */ new_size = s->state_stack_size * 3 / 2; if (new_size < 8) new_size = 8; new_stack = lre_realloc(s->opaque, s->state_stack, new_size * s->state_size); if (!new_stack) return -1; s->state_stack_size = new_size; s->state_stack = new_stack; } rs = (REExecState *)(s->state_stack + s->state_stack_len * s->state_size); s->state_stack_len++; rs->type = type; rs->count = count; rs->stack_len = stack_len; rs->cptr = cptr; rs->pc = pc; n = 2 * s->capture_count; for(i = 0; i < n; i++) rs->buf[i] = capture[i]; stack_buf = (StackInt *)(rs->buf + n); for(i = 0; i < stack_len; i++) stack_buf[i] = stack[i]; return 0; }
O2
c
push_state: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movq %r8, %r12 movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbp movq 0x40(%rdi), %rax movq 0x48(%rdi), %rcx leaq 0x1(%rcx), %rdx cmpq %rax, %rdx ja 0x829f6 movq 0x38(%rbp), %rax movq 0x48(%rsp), %rsi movl 0x40(%rsp), %edi imulq 0x30(%rbp), %rcx movq %rdx, 0x48(%rbp) addq %rcx, %rax addq $0x20, %rax movb %dil, -0x20(%rax) movq %rsi, -0x18(%rax) movb %bl, -0x1f(%rax) movq %r13, -0x10(%rax) movq %r12, -0x8(%rax) movslq 0x14(%rbp), %rcx addq %rcx, %rcx xorl %edx, %edx cmpq %rdx, %rcx je 0x829dc movq (%r15,%rdx,8), %rsi movq %rsi, (%rax,%rdx,8) incq %rdx jmp 0x829ca leaq (%rax,%rcx,8), %rcx xorl %eax, %eax xorl %edx, %edx cmpq %rdx, %rbx je 0x82a42 movq (%r14,%rdx,8), %rsi movq %rsi, (%rcx,%rdx,8) incq %rdx jmp 0x829e4 leaq (%rax,%rax,2), %rax shrq %rax cmpq $0x9, %rax pushq $0x8 popq %rcx cmovaeq %rax, %rcx movq 0x28(%rbp), %rdi movq 0x38(%rbp), %rsi movq 0x30(%rbp), %rdx movq %rcx, (%rsp) imulq %rcx, %rdx callq 0x30755 testq %rax, %rax je 0x82a3f movq (%rsp), %rcx movq %rcx, 0x40(%rbp) movq %rax, 0x38(%rbp) movq 0x48(%rbp), %rcx leaq 0x1(%rcx), %rdx jmp 0x82995 pushq $-0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
push_state: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov r12, r8 mov rbx, rcx mov r14, rdx mov r15, rsi mov rbp, rdi mov rax, [rdi+40h] mov rcx, [rdi+48h] lea rdx, [rcx+1] cmp rdx, rax ja short loc_829F6 mov rax, [rbp+38h] loc_82995: mov rsi, [rsp+38h+arg_8] mov edi, [rsp+38h+arg_0] imul rcx, [rbp+30h] mov [rbp+48h], rdx add rax, rcx add rax, 20h ; ' ' mov [rax-20h], dil mov [rax-18h], rsi mov [rax-1Fh], bl mov [rax-10h], r13 mov [rax-8], r12 movsxd rcx, dword ptr [rbp+14h] add rcx, rcx xor edx, edx loc_829CA: cmp rcx, rdx jz short loc_829DC mov rsi, [r15+rdx*8] mov [rax+rdx*8], rsi inc rdx jmp short loc_829CA loc_829DC: lea rcx, [rax+rcx*8] xor eax, eax xor edx, edx loc_829E4: cmp rbx, rdx jz short loc_82A42 mov rsi, [r14+rdx*8] mov [rcx+rdx*8], rsi inc rdx jmp short loc_829E4 loc_829F6: lea rax, [rax+rax*2] shr rax, 1 cmp rax, 9 push 8 pop rcx cmovnb rcx, rax mov rdi, [rbp+28h] mov rsi, [rbp+38h] mov rdx, [rbp+30h] mov [rsp+38h+var_38], rcx imul rdx, rcx call lre_realloc test rax, rax jz short loc_82A3F mov rcx, [rsp+38h+var_38] mov [rbp+40h], rcx mov [rbp+38h], rax mov rcx, [rbp+48h] lea rdx, [rcx+1] jmp loc_82995 loc_82A3F: push 0FFFFFFFFFFFFFFFFh pop rax loc_82A42: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long push_state( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, char a7, long long a8) { unsigned long long v12; // rax long long v13; // rcx long long v14; // rdx long long v15; // rax long long v16; // rcx long long v17; // rax long long v18; // rcx long long i; // rdx long long v20; // rcx long long result; // rax long long j; // rdx unsigned long long v23; // rax long long v24; // rcx long long v25; // [rsp+0h] [rbp-38h] v12 = *(_QWORD *)(a1 + 64); v13 = *(_QWORD *)(a1 + 72); v14 = v13 + 1; if ( v13 + 1 > v12 ) { v23 = (3 * v12) >> 1; v24 = 8LL; if ( v23 >= 9 ) v24 = v23; v25 = v24; v15 = lre_realloc(*(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 56), v24 * *(_QWORD *)(a1 + 48)); if ( !v15 ) return -1LL; *(_QWORD *)(a1 + 64) = v25; *(_QWORD *)(a1 + 56) = v15; v13 = *(_QWORD *)(a1 + 72); v14 = v13 + 1; } else { v15 = *(_QWORD *)(a1 + 56); } v16 = *(_QWORD *)(a1 + 48) * v13; *(_QWORD *)(a1 + 72) = v14; v17 = v16 + v15 + 32; *(_BYTE *)(v17 - 32) = a7; *(_QWORD *)(v17 - 24) = a8; *(_BYTE *)(v17 - 31) = a4; *(_QWORD *)(v17 - 16) = a6; *(_QWORD *)(v17 - 8) = a5; v18 = 2LL * *(int *)(a1 + 20); for ( i = 0LL; v18 != i; ++i ) *(_QWORD *)(v17 + 8 * i) = *(_QWORD *)(a2 + 8 * i); v20 = v17 + 8 * v18; result = 0LL; for ( j = 0LL; a4 != j; ++j ) *(_QWORD *)(v20 + 8 * j) = *(_QWORD *)(a3 + 8 * j); return result; }
push_state: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV R12,R8 MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV RBP,RDI MOV RAX,qword ptr [RDI + 0x40] MOV RCX,qword ptr [RDI + 0x48] LEA RDX,[RCX + 0x1] CMP RDX,RAX JA 0x001829f6 MOV RAX,qword ptr [RBP + 0x38] LAB_00182995: MOV RSI,qword ptr [RSP + 0x48] MOV EDI,dword ptr [RSP + 0x40] IMUL RCX,qword ptr [RBP + 0x30] MOV qword ptr [RBP + 0x48],RDX ADD RAX,RCX ADD RAX,0x20 MOV byte ptr [RAX + -0x20],DIL MOV qword ptr [RAX + -0x18],RSI MOV byte ptr [RAX + -0x1f],BL MOV qword ptr [RAX + -0x10],R13 MOV qword ptr [RAX + -0x8],R12 MOVSXD RCX,dword ptr [RBP + 0x14] ADD RCX,RCX XOR EDX,EDX LAB_001829ca: CMP RCX,RDX JZ 0x001829dc MOV RSI,qword ptr [R15 + RDX*0x8] MOV qword ptr [RAX + RDX*0x8],RSI INC RDX JMP 0x001829ca LAB_001829dc: LEA RCX,[RAX + RCX*0x8] XOR EAX,EAX XOR EDX,EDX LAB_001829e4: CMP RBX,RDX JZ 0x00182a42 MOV RSI,qword ptr [R14 + RDX*0x8] MOV qword ptr [RCX + RDX*0x8],RSI INC RDX JMP 0x001829e4 LAB_001829f6: LEA RAX,[RAX + RAX*0x2] SHR RAX,0x1 CMP RAX,0x9 PUSH 0x8 POP RCX CMOVNC RCX,RAX MOV RDI,qword ptr [RBP + 0x28] MOV RSI,qword ptr [RBP + 0x38] MOV RDX,qword ptr [RBP + 0x30] MOV qword ptr [RSP],RCX IMUL RDX,RCX CALL 0x00130755 TEST RAX,RAX JZ 0x00182a3f MOV RCX,qword ptr [RSP] MOV qword ptr [RBP + 0x40],RCX MOV qword ptr [RBP + 0x38],RAX MOV RCX,qword ptr [RBP + 0x48] LEA RDX,[RCX + 0x1] JMP 0x00182995 LAB_00182a3f: PUSH -0x1 POP RAX LAB_00182a42: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 push_state(long param_1,long param_2,long param_3,long param_4,int8 param_5,int8 param_6 ,int1 param_7,int8 param_8) { int iVar1; int1 *puVar2; ulong uVar3; long lVar4; ulong uVar5; long lVar6; lVar6 = *(long *)(param_1 + 0x48); uVar5 = lVar6 + 1; if (*(ulong *)(param_1 + 0x40) < uVar5) { uVar3 = *(ulong *)(param_1 + 0x40) * 3 >> 1; uVar5 = 8; if (8 < uVar3) { uVar5 = uVar3; } lVar4 = lre_realloc(*(int8 *)(param_1 + 0x28),*(int8 *)(param_1 + 0x38), *(long *)(param_1 + 0x30) * uVar5); if (lVar4 == 0) { return 0xffffffffffffffff; } *(ulong *)(param_1 + 0x40) = uVar5; *(long *)(param_1 + 0x38) = lVar4; lVar6 = *(long *)(param_1 + 0x48); uVar5 = lVar6 + 1; } else { lVar4 = *(long *)(param_1 + 0x38); } *(ulong *)(param_1 + 0x48) = uVar5; puVar2 = (int1 *)(lVar4 + lVar6 * *(long *)(param_1 + 0x30)); *puVar2 = param_7; *(int8 *)(puVar2 + 8) = param_8; puVar2[1] = (char)param_4; *(int8 *)(puVar2 + 0x10) = param_6; *(int8 *)(puVar2 + 0x18) = param_5; iVar1 = *(int *)(param_1 + 0x14); for (lVar6 = 0; (long)iVar1 * 2 != lVar6; lVar6 = lVar6 + 1) { *(int8 *)(puVar2 + lVar6 * 8 + 0x20) = *(int8 *)(param_2 + lVar6 * 8); } for (lVar6 = 0; param_4 != lVar6; lVar6 = lVar6 + 1) { *(int8 *)(puVar2 + lVar6 * 8 + (long)iVar1 * 0x10 + 0x20) = *(int8 *)(param_3 + lVar6 * 8); } return 0; }
51,794
push_state
bluesky950520[P]quickjs/libregexp.c
static int push_state(REExecContext *s, uint8_t **capture, StackInt *stack, size_t stack_len, const uint8_t *pc, const uint8_t *cptr, REExecStateEnum type, size_t count) { REExecState *rs; uint8_t *new_stack; size_t new_size, i, n; StackInt *stack_buf; if (unlikely((s->state_stack_len + 1) > s->state_stack_size)) { /* reallocate the stack */ new_size = s->state_stack_size * 3 / 2; if (new_size < 8) new_size = 8; new_stack = lre_realloc(s->opaque, s->state_stack, new_size * s->state_size); if (!new_stack) return -1; s->state_stack_size = new_size; s->state_stack = new_stack; } rs = (REExecState *)(s->state_stack + s->state_stack_len * s->state_size); s->state_stack_len++; rs->type = type; rs->count = count; rs->stack_len = stack_len; rs->cptr = cptr; rs->pc = pc; n = 2 * s->capture_count; for(i = 0; i < n; i++) rs->buf[i] = capture[i]; stack_buf = (StackInt *)(rs->buf + n); for(i = 0; i < stack_len; i++) stack_buf[i] = stack[i]; return 0; }
O3
c
push_state: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movq %r8, %r12 movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbp movq 0x40(%rdi), %rax movq 0x48(%rdi), %rdx leaq 0x1(%rdx), %rsi cmpq %rax, %rsi ja 0x9e978 movq 0x38(%rbp), %rax movq 0x48(%rsp), %rdi imulq 0x30(%rbp), %rdx movl 0x40(%rsp), %r8d leaq (%rax,%rdx), %rcx movq %rsi, 0x48(%rbp) movb %r8b, (%rax,%rdx) movq %rdi, 0x8(%rax,%rdx) movb %bl, 0x1(%rax,%rdx) movq %r13, 0x10(%rax,%rdx) movq %r12, 0x18(%rax,%rdx) movl 0x14(%rbp), %edx leal (%rdx,%rdx), %eax cltq testl %edx, %edx je 0x9e944 cmpq $0x1, %rax movq %rax, %rdx adcq $0x0, %rdx xorl %esi, %esi movq (%r15,%rsi,8), %rdi movq %rdi, 0x20(%rcx,%rsi,8) incq %rsi cmpq %rsi, %rdx jne 0x9e933 testq %rbx, %rbx je 0x9e967 leaq (%rcx,%rax,8), %rcx addq $0x20, %rcx xorl %eax, %eax xorl %edx, %edx movq (%r14,%rdx,8), %rsi movq %rsi, (%rcx,%rdx,8) incq %rdx cmpq %rdx, %rbx jne 0x9e955 jmp 0x9e969 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq (%rax,%rax,2), %rax shrq %rax cmpq $0x9, %rax movl $0x8, %ecx cmovaeq %rax, %rcx movq 0x28(%rbp), %rdi movq 0x38(%rbp), %rsi movq 0x30(%rbp), %rdx movq %rcx, (%rsp) imulq %rcx, %rdx callq 0x383a3 testq %rax, %rax je 0x9e9c3 movq (%rsp), %rcx movq %rcx, 0x40(%rbp) movq %rax, 0x38(%rbp) movq 0x48(%rbp), %rdx leaq 0x1(%rdx), %rsi jmp 0x9e8ec movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x9e969 nop
push_state: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov r12, r8 mov rbx, rcx mov r14, rdx mov r15, rsi mov rbp, rdi mov rax, [rdi+40h] mov rdx, [rdi+48h] lea rsi, [rdx+1] cmp rsi, rax ja loc_9E978 mov rax, [rbp+38h] loc_9E8EC: mov rdi, [rsp+38h+arg_8] imul rdx, [rbp+30h] mov r8d, [rsp+38h+arg_0] lea rcx, [rax+rdx] mov [rbp+48h], rsi mov [rax+rdx], r8b mov [rax+rdx+8], rdi mov [rax+rdx+1], bl mov [rax+rdx+10h], r13 mov [rax+rdx+18h], r12 mov edx, [rbp+14h] lea eax, [rdx+rdx] cdqe test edx, edx jz short loc_9E944 cmp rax, 1 mov rdx, rax adc rdx, 0 xor esi, esi loc_9E933: mov rdi, [r15+rsi*8] mov [rcx+rsi*8+20h], rdi inc rsi cmp rdx, rsi jnz short loc_9E933 loc_9E944: test rbx, rbx jz short loc_9E967 lea rcx, [rcx+rax*8] add rcx, 20h ; ' ' xor eax, eax xor edx, edx loc_9E955: mov rsi, [r14+rdx*8] mov [rcx+rdx*8], rsi inc rdx cmp rbx, rdx jnz short loc_9E955 jmp short loc_9E969 loc_9E967: xor eax, eax loc_9E969: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9E978: lea rax, [rax+rax*2] shr rax, 1 cmp rax, 9 mov ecx, 8 cmovnb rcx, rax mov rdi, [rbp+28h] mov rsi, [rbp+38h] mov rdx, [rbp+30h] mov [rsp+38h+var_38], rcx imul rdx, rcx call lre_realloc test rax, rax jz short loc_9E9C3 mov rcx, [rsp+38h+var_38] mov [rbp+40h], rcx mov [rbp+38h], rax mov rdx, [rbp+48h] lea rsi, [rdx+1] jmp loc_9E8EC loc_9E9C3: mov eax, 0FFFFFFFFh jmp short loc_9E969
long long push_state( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, char a7, long long a8) { unsigned long long v13; // rax long long v14; // rdx long long v15; // rsi long long v16; // rax long long v17; // rcx int v18; // edx long long v19; // rax long long v20; // rsi long long v21; // rcx long long result; // rax long long v23; // rdx unsigned long long v24; // rax long long v25; // rcx long long v26; // [rsp+0h] [rbp-38h] v13 = *(_QWORD *)(a1 + 64); v14 = *(_QWORD *)(a1 + 72); v15 = v14 + 1; if ( v14 + 1 > v13 ) { v24 = (3 * v13) >> 1; v25 = 8LL; if ( v24 >= 9 ) v25 = v24; v26 = v25; v16 = lre_realloc(*(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 56), v25 * *(_QWORD *)(a1 + 48)); if ( !v16 ) return 0xFFFFFFFFLL; *(_QWORD *)(a1 + 64) = v26; *(_QWORD *)(a1 + 56) = v16; v14 = *(_QWORD *)(a1 + 72); v15 = v14 + 1; } else { v16 = *(_QWORD *)(a1 + 56); } v17 = v16 + *(_QWORD *)(a1 + 48) * v14; *(_QWORD *)(a1 + 72) = v15; *(_BYTE *)v17 = a7; *(_QWORD *)(v17 + 8) = a8; *(_BYTE *)(v17 + 1) = a4; *(_QWORD *)(v17 + 16) = a6; *(_QWORD *)(v17 + 24) = a5; v18 = *(_DWORD *)(a1 + 20); v19 = 2 * v18; if ( v18 ) { v20 = 0LL; do { *(_QWORD *)(v17 + 8 * v20 + 32) = *(_QWORD *)(a2 + 8 * v20); ++v20; } while ( (v19 == 0) + v19 != v20 ); } if ( !a4 ) return 0LL; v21 = v17 + 8 * v19 + 32; result = 0LL; v23 = 0LL; do { *(_QWORD *)(v21 + 8 * v23) = *(_QWORD *)(a3 + 8 * v23); ++v23; } while ( a4 != v23 ); return result; }
push_state: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV R12,R8 MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV RBP,RDI MOV RAX,qword ptr [RDI + 0x40] MOV RDX,qword ptr [RDI + 0x48] LEA RSI,[RDX + 0x1] CMP RSI,RAX JA 0x0019e978 MOV RAX,qword ptr [RBP + 0x38] LAB_0019e8ec: MOV RDI,qword ptr [RSP + 0x48] IMUL RDX,qword ptr [RBP + 0x30] MOV R8D,dword ptr [RSP + 0x40] LEA RCX,[RAX + RDX*0x1] MOV qword ptr [RBP + 0x48],RSI MOV byte ptr [RAX + RDX*0x1],R8B MOV qword ptr [RAX + RDX*0x1 + 0x8],RDI MOV byte ptr [RAX + RDX*0x1 + 0x1],BL MOV qword ptr [RAX + RDX*0x1 + 0x10],R13 MOV qword ptr [RAX + RDX*0x1 + 0x18],R12 MOV EDX,dword ptr [RBP + 0x14] LEA EAX,[RDX + RDX*0x1] CDQE TEST EDX,EDX JZ 0x0019e944 CMP RAX,0x1 MOV RDX,RAX ADC RDX,0x0 XOR ESI,ESI LAB_0019e933: MOV RDI,qword ptr [R15 + RSI*0x8] MOV qword ptr [RCX + RSI*0x8 + 0x20],RDI INC RSI CMP RDX,RSI JNZ 0x0019e933 LAB_0019e944: TEST RBX,RBX JZ 0x0019e967 LEA RCX,[RCX + RAX*0x8] ADD RCX,0x20 XOR EAX,EAX XOR EDX,EDX LAB_0019e955: MOV RSI,qword ptr [R14 + RDX*0x8] MOV qword ptr [RCX + RDX*0x8],RSI INC RDX CMP RBX,RDX JNZ 0x0019e955 JMP 0x0019e969 LAB_0019e967: XOR EAX,EAX LAB_0019e969: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019e978: LEA RAX,[RAX + RAX*0x2] SHR RAX,0x1 CMP RAX,0x9 MOV ECX,0x8 CMOVNC RCX,RAX MOV RDI,qword ptr [RBP + 0x28] MOV RSI,qword ptr [RBP + 0x38] MOV RDX,qword ptr [RBP + 0x30] MOV qword ptr [RSP],RCX IMUL RDX,RCX CALL 0x001383a3 TEST RAX,RAX JZ 0x0019e9c3 MOV RCX,qword ptr [RSP] MOV qword ptr [RBP + 0x40],RCX MOV qword ptr [RBP + 0x38],RAX MOV RDX,qword ptr [RBP + 0x48] LEA RSI,[RDX + 0x1] JMP 0x0019e8ec LAB_0019e9c3: MOV EAX,0xffffffff JMP 0x0019e969
int8 push_state(long param_1,long param_2,long param_3,long param_4,int8 param_5,int8 param_6 ,int1 param_7,int8 param_8) { long lVar1; ulong uVar2; long lVar3; ulong uVar4; long lVar5; long lVar6; lVar5 = *(long *)(param_1 + 0x48); uVar4 = lVar5 + 1; if (*(ulong *)(param_1 + 0x40) < uVar4) { uVar2 = *(ulong *)(param_1 + 0x40) * 3 >> 1; uVar4 = 8; if (8 < uVar2) { uVar4 = uVar2; } lVar3 = lre_realloc(*(int8 *)(param_1 + 0x28),*(int8 *)(param_1 + 0x38), *(long *)(param_1 + 0x30) * uVar4); if (lVar3 == 0) { return 0xffffffff; } *(ulong *)(param_1 + 0x40) = uVar4; *(long *)(param_1 + 0x38) = lVar3; lVar5 = *(long *)(param_1 + 0x48); uVar4 = lVar5 + 1; } else { lVar3 = *(long *)(param_1 + 0x38); } lVar5 = lVar5 * *(long *)(param_1 + 0x30); *(ulong *)(param_1 + 0x48) = uVar4; *(int1 *)(lVar3 + lVar5) = param_7; *(int8 *)(lVar3 + 8 + lVar5) = param_8; *(char *)(lVar3 + 1 + lVar5) = (char)param_4; *(int8 *)(lVar3 + 0x10 + lVar5) = param_6; *(int8 *)(lVar3 + 0x18 + lVar5) = param_5; lVar1 = (long)(*(int *)(param_1 + 0x14) * 2); if (*(int *)(param_1 + 0x14) != 0) { lVar6 = 0; do { *(int8 *)(lVar3 + lVar5 + 0x20 + lVar6 * 8) = *(int8 *)(param_2 + lVar6 * 8); lVar6 = lVar6 + 1; } while (lVar1 + (ulong)(lVar1 == 0) != lVar6); } if (param_4 != 0) { lVar6 = 0; do { *(int8 *)(lVar3 + lVar5 + lVar1 * 8 + 0x20 + lVar6 * 8) = *(int8 *)(param_3 + lVar6 * 8); lVar6 = lVar6 + 1; } while (param_4 != lVar6); } return 0; }
51,795
pocketflow::Flow::post(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::any>>>&, std::nullptr_t const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
The-Pocket[P]PocketFlow-CPP/pocketflow.h
std::optional<std::string> post(Context& sharedContext, const std::nullptr_t& /*prepResult*/, const std::optional<std::string>& execResult) override { return execResult; // Simply pass through the last action }
O1
c
pocketflow::Flow::post(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::any>>>&, std::nullptr_t const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&): pushq %rbx movq %rdi, %rbx movb $0x0, 0x20(%rdi) cmpb $0x1, 0x20(%r8) jne 0x7cc4 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq (%r8), %rsi movq 0x8(%r8), %rdx addq %rsi, %rdx movq %rbx, %rdi callq 0x84e8 movb $0x1, 0x20(%rbx) movq %rbx, %rax popq %rbx retq nop
_ZN10pocketflow4Flow4postERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4lessIS7_ESaISt4pairIKS7_S8_EEERKDnRKSt8optionalIS7_E: push rbx mov rbx, rdi mov byte ptr [rdi+20h], 0 cmp byte ptr [r8+20h], 1 jnz short loc_7CC4 lea rax, [rbx+10h] mov [rbx], rax mov rsi, [r8] mov rdx, [r8+8] add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+20h], 1 loc_7CC4: mov rax, rbx pop rbx retn
long long pocketflow::Flow::post(long long a1, long long a2, long long a3, long long a4, long long a5) { *(_BYTE *)(a1 + 32) = 0; if ( *(_BYTE *)(a5 + 32) == 1 ) { *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char *>(a1, *(_QWORD *)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8)); *(_BYTE *)(a1 + 32) = 1; } return a1; }
post: PUSH RBX MOV RBX,RDI MOV byte ptr [RDI + 0x20],0x0 CMP byte ptr [R8 + 0x20],0x1 JNZ 0x00107cc4 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] ADD RDX,RSI MOV RDI,RBX CALL 0x001084e8 MOV byte ptr [RBX + 0x20],0x1 LAB_00107cc4: MOV RAX,RBX POP RBX RET
/* pocketflow::Flow::post(std::map<std::__cxx11::string, std::any, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::any> > >&, decltype(nullptr) const&, std::optional<std::__cxx11::string > const&) */ map * pocketflow::Flow::post(map *param_1,_func_decltype_nullptr **param_2,optional *param_3) { long *in_R8; param_1[0x20] = (map)0x0; if ((char)in_R8[4] == '\x01') { *(map **)param_1 = param_1 + 0x10; std::__cxx11::string::_M_construct<char*>(param_1,*in_R8,in_R8[1] + *in_R8); param_1[0x20] = (map)0x1; } return param_1; }
51,796
mimi_encoder_decoder::load_decoder()
ngxson[P]ggml-easy/demo/kyutai-mimi.cpp
void load_decoder() { layers.push_back({ .conv_0_w = ctx.get_weight("decoder.layers.0.conv.weight"), .conv_0_b = ctx.get_weight("decoder.layers.0.conv.bias"), }); for (int i = 0; i < (int)repeated_pattern.size(); ++i) { int i_start = repeated_pattern[i]; // upsampling layers layers.push_back({ .is_elu = true, // layer (i_start) }); layers.push_back({ .is_transposed_conv = true, .conv_0_w = ctx.get_weight("decoder.layers.%d.conv.weight", i_start + 1), .conv_0_b = ctx.get_weight("decoder.layers.%d.conv.bias", i_start + 1), .stride = mimi_config.upsampling_ratio[i], }); // residual layers layers.push_back({ .is_resnet = true, .conv_0_w = ctx.get_weight("decoder.layers.%d.block.1.conv.weight", i_start + 2), .conv_0_b = ctx.get_weight("decoder.layers.%d.block.1.conv.bias", i_start + 2), .conv_1_w = ctx.get_weight("decoder.layers.%d.block.3.conv.weight", i_start + 2), .conv_1_b = ctx.get_weight("decoder.layers.%d.block.3.conv.bias", i_start + 2), }); } layers.push_back({ .is_elu = true, // layer 13 }); layers.push_back({ .conv_0_w = ctx.get_weight("decoder.layers.14.conv.weight"), .conv_0_b = ctx.get_weight("decoder.layers.14.conv.bias"), }); }
O2
cpp
mimi_encoder_decoder::load_decoder(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsp, %r15 andw $0x0, (%r15) movq %rdi, %r14 leaq 0x10(%rdi), %rbx movb $0x0, 0x2(%r15) movq (%rdi), %rdi leaq 0x5409(%rip), %rsi # 0xda37 xorl %eax, %eax callq 0xaaa4 movq %rax, 0x8(%r15) movq (%r14), %rdi leaq 0x5411(%rip), %rsi # 0xda54 xorl %eax, %eax callq 0xaaa4 movq %rax, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movl $0x1, 0x28(%r15) movq %rbx, 0x30(%rsp) movq %rbx, %rdi movq %r15, %rsi callq 0xb004 pushq $0xb popq %rbp movq 0x30(%rsp), %rbx cmpq $0xf, %rbp je 0x87ab movl -0x4(%r14,%rbp,4), %r12d xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movb $0x1, %r13b movb %r13b, (%rsp) xorl %eax, %eax movb %al, 0x2(%rsp) pushq $0x1 popq %r15 movl %r15d, 0x28(%rsp) movq %rbx, %rdi movq %rsp, %r15 movq %r15, %rsi callq 0xb004 andw $0x0, (%rsp) movb %r13b, 0x2(%rsp) movq (%r14), %rdi leal 0x1(%r12), %r13d leaq 0x539b(%rip), %rsi # 0xda6f movl %r13d, %edx xorl %eax, %eax callq 0xaaa4 movq %rax, 0x8(%rsp) movq (%r14), %rdi leaq 0x53a0(%rip), %rsi # 0xda8d movl %r13d, %edx xorl %eax, %eax callq 0xaaa4 movq %rax, 0x10(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) leaq 0xad6d(%rip), %rax # 0x13478 movl (%rax,%rbp,4), %eax movl %eax, 0x28(%rsp) movq %rbx, %rdi movq %r15, %rsi callq 0xb004 movw $0x100, (%rsp) # imm = 0x100 xorl %eax, %eax movb %al, 0x2(%rsp) movq (%r14), %rdi addl $0x2, %r12d leaq 0x5372(%rip), %rsi # 0xdaa9 movl %r12d, %edx xorl %eax, %eax callq 0xaaa4 movq %rax, 0x8(%rsp) movq (%r14), %rdi leaq 0x537f(%rip), %rsi # 0xdacf movl %r12d, %edx xorl %eax, %eax callq 0xaaa4 movq %rax, 0x10(%rsp) movq (%r14), %rdi leaq 0x538a(%rip), %rsi # 0xdaf3 movl %r12d, %edx xorl %eax, %eax callq 0xaaa4 movq %rax, 0x18(%rsp) movq (%r14), %rdi leaq 0x5397(%rip), %rsi # 0xdb19 movl %r12d, %edx xorl %eax, %eax callq 0xaaa4 movq %rax, 0x20(%rsp) pushq $0x1 popq %rax movl %eax, 0x28(%rsp) movq %rbx, %rdi movq %r15, %rsi callq 0xb004 incq %rbp jmp 0x8676 xorps %xmm0, %xmm0 movq %rsp, %r15 movaps %xmm0, (%r15) movaps %xmm0, 0x10(%r15) andq $0x0, 0x20(%r15) movb $0x1, (%r15) xorl %ebp, %ebp movb %bpl, 0x2(%r15) pushq $0x1 popq %r12 movl %r12d, 0x28(%r15) movq 0x30(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0xb004 andw $0x0, (%r15) movb %bpl, 0x2(%r15) movq (%r14), %rdi leaq 0x5349(%rip), %rsi # 0xdb3d xorl %eax, %eax callq 0xaaa4 movq %rax, 0x8(%r15) movq (%r14), %rdi leaq 0x5352(%rip), %rsi # 0xdb5b xorl %eax, %eax callq 0xaaa4 movq %rax, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movl %r12d, 0x28(%r15) movq %rsp, %rsi movq %rbx, %rdi callq 0xb004 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN20mimi_encoder_decoder12load_decoderEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rsp and word ptr [r15], 0 mov r14, rdi lea rbx, [rdi+10h] mov byte ptr [r15+2], 0 mov rdi, [rdi]; this lea rsi, aDecoderLayers0; "decoder.layers.0.conv.weight" xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov [r15+8], rax mov rdi, [r14]; this lea rsi, aDecoderLayers0_0; "decoder.layers.0.conv.bias" xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov [r15+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov dword ptr [r15+28h], 1 mov [rsp+68h+var_38], rbx mov rdi, rbx mov rsi, r15 call _ZNSt6vectorIN20mimi_encoder_decoder5layerESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(mimi_encoder_decoder::layer &&) push 0Bh pop rbp mov rbx, [rsp+68h+var_38] loc_8676: cmp rbp, 0Fh jz loc_87AB mov r12d, [r14+rbp*4-4] xorps xmm0, xmm0 movaps [rsp+68h+var_68], xmm0 and [rsp+68h+var_48], 0 movaps [rsp+68h+var_58], xmm0 mov r13b, 1 mov byte ptr [rsp+68h+var_68], r13b xor eax, eax mov byte ptr [rsp+68h+var_68+2], al push 1 pop r15 mov [rsp+68h+var_40], r15d mov rdi, rbx mov r15, rsp mov rsi, r15 call _ZNSt6vectorIN20mimi_encoder_decoder5layerESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(mimi_encoder_decoder::layer &&) and word ptr [rsp+68h+var_68], 0 mov byte ptr [rsp+68h+var_68+2], r13b mov rdi, [r14]; this lea r13d, [r12+1] lea rsi, aDecoderLayersD; "decoder.layers.%d.conv.weight" mov edx, r13d xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov qword ptr [rsp+68h+var_68+8], rax mov rdi, [r14]; this lea rsi, aDecoderLayersD_0; "decoder.layers.%d.conv.bias" mov edx, r13d xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov qword ptr [rsp+68h+var_58], rax xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 lea rax, mimi_config mov eax, [rax+rbp*4] mov [rsp+68h+var_40], eax mov rdi, rbx mov rsi, r15 call _ZNSt6vectorIN20mimi_encoder_decoder5layerESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(mimi_encoder_decoder::layer &&) mov word ptr [rsp+68h+var_68], 100h xor eax, eax mov byte ptr [rsp+68h+var_68+2], al mov rdi, [r14]; this add r12d, 2 lea rsi, aDecoderLayersD_1; "decoder.layers.%d.block.1.conv.weight" mov edx, r12d xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov qword ptr [rsp+68h+var_68+8], rax mov rdi, [r14]; this lea rsi, aDecoderLayersD_2; "decoder.layers.%d.block.1.conv.bias" mov edx, r12d xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov qword ptr [rsp+68h+var_58], rax mov rdi, [r14]; this lea rsi, aDecoderLayersD_3; "decoder.layers.%d.block.3.conv.weight" mov edx, r12d xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov qword ptr [rsp+68h+var_58+8], rax mov rdi, [r14]; this lea rsi, aDecoderLayersD_4; "decoder.layers.%d.block.3.conv.bias" mov edx, r12d xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov [rsp+68h+var_48], rax push 1 pop rax mov [rsp+68h+var_40], eax mov rdi, rbx mov rsi, r15 call _ZNSt6vectorIN20mimi_encoder_decoder5layerESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(mimi_encoder_decoder::layer &&) inc rbp jmp loc_8676 loc_87AB: xorps xmm0, xmm0 mov r15, rsp movaps xmmword ptr [r15], xmm0 movaps xmmword ptr [r15+10h], xmm0 and qword ptr [r15+20h], 0 mov byte ptr [r15], 1 xor ebp, ebp mov [r15+2], bpl push 1 pop r12 mov [r15+28h], r12d mov rbx, [rsp+68h+var_38] mov rdi, rbx mov rsi, r15 call _ZNSt6vectorIN20mimi_encoder_decoder5layerESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(mimi_encoder_decoder::layer &&) and word ptr [r15], 0 mov [r15+2], bpl mov rdi, [r14]; this lea rsi, aDecoderLayers1; "decoder.layers.14.conv.weight" xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov [r15+8], rax mov rdi, [r14]; this lea rsi, aDecoderLayers1_0; "decoder.layers.14.conv.bias" xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov [r15+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov [r15+28h], r12d mov rsi, rsp mov rdi, rbx call _ZNSt6vectorIN20mimi_encoder_decoder5layerESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(mimi_encoder_decoder::layer &&) add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mimi_encoder_decoder::load_decoder(ggml_easy::ctx **this) { long long v1; // rbp char *v2; // rbx int v3; // r12d char *v4; // rbx __int128 v6; // [rsp+0h] [rbp-68h] BYREF _BYTE v7[24]; // [rsp+10h] [rbp-58h] BYREF int v8; // [rsp+28h] [rbp-40h] char *v9; // [rsp+30h] [rbp-38h] LOWORD(v6) = 0; BYTE2(v6) = 0; *((_QWORD *)&v6 + 1) = ggml_easy::ctx::get_weight(*this, "decoder.layers.0.conv.weight"); *(_QWORD *)v7 = ggml_easy::ctx::get_weight(*this, "decoder.layers.0.conv.bias"); *(_OWORD *)&v7[8] = 0LL; v8 = 1; v9 = (char *)(this + 2); std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(this + 2, &v6); v1 = 11LL; v2 = v9; while ( v1 != 15 ) { v3 = *((_DWORD *)this + v1 - 1); v6 = 0LL; memset(v7, 0, sizeof(v7)); LOBYTE(v6) = 1; BYTE2(v6) = 0; v8 = 1; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(v2, &v6); LOWORD(v6) = 0; BYTE2(v6) = 1; *((_QWORD *)&v6 + 1) = ggml_easy::ctx::get_weight(*this, "decoder.layers.%d.conv.weight", v3 + 1); *(_QWORD *)v7 = ggml_easy::ctx::get_weight(*this, "decoder.layers.%d.conv.bias", v3 + 1); *(_OWORD *)&v7[8] = 0LL; v8 = *(_DWORD *)&mimi_config[4 * v1]; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(v2, &v6); LOWORD(v6) = 256; BYTE2(v6) = 0; v3 += 2; *((_QWORD *)&v6 + 1) = ggml_easy::ctx::get_weight(*this, "decoder.layers.%d.block.1.conv.weight", v3); *(_QWORD *)v7 = ggml_easy::ctx::get_weight(*this, "decoder.layers.%d.block.1.conv.bias", v3); *(_QWORD *)&v7[8] = ggml_easy::ctx::get_weight(*this, "decoder.layers.%d.block.3.conv.weight", v3); *(_QWORD *)&v7[16] = ggml_easy::ctx::get_weight(*this, "decoder.layers.%d.block.3.conv.bias", v3); v8 = 1; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(v2, &v6); ++v1; } v6 = 0LL; memset(v7, 0, sizeof(v7)); LOBYTE(v6) = 1; BYTE2(v6) = 0; v8 = 1; v4 = v9; std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(v9, &v6); LOWORD(v6) = 0; BYTE2(v6) = 0; *((_QWORD *)&v6 + 1) = ggml_easy::ctx::get_weight(*this, "decoder.layers.14.conv.weight"); *(_QWORD *)v7 = ggml_easy::ctx::get_weight(*this, "decoder.layers.14.conv.bias"); *(_OWORD *)&v7[8] = 0LL; v8 = 1; return std::vector<mimi_encoder_decoder::layer>::emplace_back<mimi_encoder_decoder::layer>(v4, &v6); }
load_decoder: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RSP AND word ptr [R15],0x0 MOV R14,RDI LEA RBX,[RDI + 0x10] MOV byte ptr [R15 + 0x2],0x0 MOV RDI,qword ptr [RDI] LEA RSI,[0x10da37] XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [R15 + 0x8],RAX MOV RDI,qword ptr [R14] LEA RSI,[0x10da54] XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [R15 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV dword ptr [R15 + 0x28],0x1 MOV qword ptr [RSP + 0x30],RBX MOV RDI,RBX MOV RSI,R15 CALL 0x0010b004 PUSH 0xb POP RBP MOV RBX,qword ptr [RSP + 0x30] LAB_00108676: CMP RBP,0xf JZ 0x001087ab MOV R12D,dword ptr [R14 + RBP*0x4 + -0x4] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x20],0x0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV R13B,0x1 MOV byte ptr [RSP],R13B XOR EAX,EAX MOV byte ptr [RSP + 0x2],AL PUSH 0x1 POP R15 MOV dword ptr [RSP + 0x28],R15D MOV RDI,RBX MOV R15,RSP MOV RSI,R15 CALL 0x0010b004 AND word ptr [RSP],0x0 MOV byte ptr [RSP + 0x2],R13B MOV RDI,qword ptr [R14] LEA R13D,[R12 + 0x1] LEA RSI,[0x10da6f] MOV EDX,R13D XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [R14] LEA RSI,[0x10da8d] MOV EDX,R13D XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [RSP + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 LEA RAX,[0x113478] MOV EAX,dword ptr [RAX + RBP*0x4] MOV dword ptr [RSP + 0x28],EAX MOV RDI,RBX MOV RSI,R15 CALL 0x0010b004 MOV word ptr [RSP],0x100 XOR EAX,EAX MOV byte ptr [RSP + 0x2],AL MOV RDI,qword ptr [R14] ADD R12D,0x2 LEA RSI,[0x10daa9] MOV EDX,R12D XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [R14] LEA RSI,[0x10dacf] MOV EDX,R12D XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [R14] LEA RSI,[0x10daf3] MOV EDX,R12D XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [R14] LEA RSI,[0x10db19] MOV EDX,R12D XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [RSP + 0x20],RAX PUSH 0x1 POP RAX MOV dword ptr [RSP + 0x28],EAX MOV RDI,RBX MOV RSI,R15 CALL 0x0010b004 INC RBP JMP 0x00108676 LAB_001087ab: XORPS XMM0,XMM0 MOV R15,RSP MOVAPS xmmword ptr [R15],XMM0 MOVAPS xmmword ptr [R15 + 0x10],XMM0 AND qword ptr [R15 + 0x20],0x0 MOV byte ptr [R15],0x1 XOR EBP,EBP MOV byte ptr [R15 + 0x2],BPL PUSH 0x1 POP R12 MOV dword ptr [R15 + 0x28],R12D MOV RBX,qword ptr [RSP + 0x30] MOV RDI,RBX MOV RSI,R15 CALL 0x0010b004 AND word ptr [R15],0x0 MOV byte ptr [R15 + 0x2],BPL MOV RDI,qword ptr [R14] LEA RSI,[0x10db3d] XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [R15 + 0x8],RAX MOV RDI,qword ptr [R14] LEA RSI,[0x10db5b] XOR EAX,EAX CALL 0x0010aaa4 MOV qword ptr [R15 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV dword ptr [R15 + 0x28],R12D MOV RSI,RSP MOV RDI,RBX CALL 0x0010b004 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* mimi_encoder_decoder::load_decoder() */ void __thiscall mimi_encoder_decoder::load_decoder(mimi_encoder_decoder *this) { int iVar1; vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>> *this_00; vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>> *this_01; long lVar2; uint uVar3; ulong local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 uStack_48; int4 local_40; vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>> *local_38; local_68 = local_68 & 0xffffffffff000000; uStack_60 = ggml_easy::ctx::get_weight(*(char **)this,"decoder.layers.0.conv.weight"); local_58 = ggml_easy::ctx::get_weight(*(char **)this,"decoder.layers.0.conv.bias"); uStack_50 = 0; uStack_48 = 0; local_40 = 1; local_38 = (vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>> *) (this + 0x10); std::vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>>:: emplace_back<mimi_encoder_decoder::layer> ((vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>> *) (this + 0x10),(layer *)&local_68); this_00 = local_38; for (lVar2 = 0xb; this_01 = local_38, lVar2 != 0xf; lVar2 = lVar2 + 1) { iVar1 = *(int *)(this + lVar2 * 4 + -4); uStack_60 = 0; uStack_48 = 0; local_58 = 0; uStack_50 = 0; local_68 = 1; local_40 = 1; std::vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>>:: emplace_back<mimi_encoder_decoder::layer>(this_00,(layer *)&local_68); local_68._0_3_ = 0x10000; uVar3 = iVar1 + 1; uStack_60 = ggml_easy::ctx::get_weight (*(char **)this,"decoder.layers.%d.conv.weight",(ulong)uVar3); local_58 = ggml_easy::ctx::get_weight(*(char **)this,"decoder.layers.%d.conv.bias",(ulong)uVar3) ; uStack_50 = 0; uStack_48 = 0; local_40 = *(int4 *)(&mimi_config + lVar2 * 4); std::vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>>:: emplace_back<mimi_encoder_decoder::layer>(this_00,(layer *)&local_68); local_68 = CONCAT53(local_68._3_5_,0x100); uVar3 = iVar1 + 2; uStack_60 = ggml_easy::ctx::get_weight (*(char **)this,"decoder.layers.%d.block.1.conv.weight",(ulong)uVar3); local_58 = ggml_easy::ctx::get_weight (*(char **)this,"decoder.layers.%d.block.1.conv.bias",(ulong)uVar3); uStack_50 = ggml_easy::ctx::get_weight (*(char **)this,"decoder.layers.%d.block.3.conv.weight",(ulong)uVar3); uStack_48 = ggml_easy::ctx::get_weight (*(char **)this,"decoder.layers.%d.block.3.conv.bias",(ulong)uVar3); local_40 = 1; std::vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>>:: emplace_back<mimi_encoder_decoder::layer>(this_00,(layer *)&local_68); } uStack_60 = 0; local_58 = 0; uStack_50 = 0; uStack_48 = 0; local_68 = 1; local_40 = 1; std::vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>>:: emplace_back<mimi_encoder_decoder::layer>(local_38,(layer *)&local_68); local_68 = local_68 & 0xffffffffff000000; uStack_60 = ggml_easy::ctx::get_weight(*(char **)this,"decoder.layers.14.conv.weight"); local_58 = ggml_easy::ctx::get_weight(*(char **)this,"decoder.layers.14.conv.bias"); uStack_50 = 0; uStack_48 = 0; local_40 = 1; std::vector<mimi_encoder_decoder::layer,std::allocator<mimi_encoder_decoder::layer>>:: emplace_back<mimi_encoder_decoder::layer>(this_01,(layer *)&local_68); return; }
51,797
nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::LogToAllLogfiles( LogSeverity severity, const std::chrono::system_clock::time_point& timestamp, const char* message, size_t len) { if (FLAGS_logtostdout) { // global flag: never log to file ColoredWriteToStdout(severity, message, len); } else if (FLAGS_logtostderr) { // global flag: never log to file ColoredWriteToStderr(severity, message, len); } else { for (int i = severity; i >= 0; --i) { LogDestination::MaybeLogToLogfile(static_cast<LogSeverity>(i), timestamp, message, len); } } }
O0
cpp
nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq 0x59554(%rip), %rax # 0x70ba2 testb $0x1, (%rax) je 0x17665 movl -0x4(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xf030 jmp 0x176b2 leaq 0x5952e(%rip), %rax # 0x70b9a testb $0x1, (%rax) je 0x17683 movl -0x4(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xf090 jmp 0x176b0 movl -0x4(%rbp), %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jl 0x176ae movl -0x24(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x1bac0 movl -0x24(%rbp), %eax addl $-0x1, %eax movl %eax, -0x24(%rbp) jmp 0x17689 jmp 0x176b0 jmp 0x176b2 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout test byte ptr [rax], 1 jz short loc_17665 mov edi, [rbp+var_4] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _ZN5nglogL20ColoredWriteToStdoutENS_11LogSeverityEPKcm; nglog::ColoredWriteToStdout(nglog::LogSeverity,char const*,ulong) jmp short loc_176B2 loc_17665: lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr test byte ptr [rax], 1 jz short loc_17683 mov edi, [rbp+var_4] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _ZN5nglogL20ColoredWriteToStderrENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderr(nglog::LogSeverity,char const*,ulong) jmp short loc_176B0 loc_17683: mov eax, [rbp+var_4] mov [rbp+var_24], eax loc_17689: cmp [rbp+var_24], 0 jl short loc_176AE mov edi, [rbp+var_24] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call _ZN5nglog14LogDestination17MaybeLogToLogfileENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::MaybeLogToLogfile(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong) mov eax, [rbp+var_24] add eax, 0FFFFFFFFh mov [rbp+var_24], eax jmp short loc_17689 loc_176AE: jmp short $+2 loc_176B0: jmp short $+2 loc_176B2: add rsp, 30h pop rbp retn
long long nglog::LogDestination::LogToAllLogfiles(unsigned int a1, long long a2, long long a3, long long a4) { long long result; // rax int i; // [rsp+Ch] [rbp-24h] if ( (fLB::FLAGS_logtostdout & 1) != 0 ) return nglog::ColoredWriteToStdout(a1, a3, a4); if ( (fLB::FLAGS_logtostderr & 1) != 0 ) return nglog::ColoredWriteToStderr(a1, a3, a4); result = a1; for ( i = a1; i >= 0; --i ) { nglog::LogDestination::MaybeLogToLogfile((unsigned int)i, a2, a3, a4); result = (unsigned int)(i - 1); } return result; }
LogToAllLogfiles: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[0x170ba2] TEST byte ptr [RAX],0x1 JZ 0x00117665 MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0010f030 JMP 0x001176b2 LAB_00117665: LEA RAX,[0x170b9a] TEST byte ptr [RAX],0x1 JZ 0x00117683 MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0010f090 JMP 0x001176b0 LAB_00117683: MOV EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x24],EAX LAB_00117689: CMP dword ptr [RBP + -0x24],0x0 JL 0x001176ae MOV EDI,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x0011bac0 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,-0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x00117689 LAB_001176ae: JMP 0x001176b0 LAB_001176b0: JMP 0x001176b2 LAB_001176b2: ADD RSP,0x30 POP RBP RET
/* nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, char const*, unsigned long) */ void nglog::LogDestination::LogToAllLogfiles (int param_1,int8 param_2,int8 param_3,int8 param_4) { int4 local_2c; if ((fLB::FLAGS_logtostdout & 1) == 0) { local_2c = param_1; if ((fLB::FLAGS_logtostderr & 1) == 0) { for (; -1 < local_2c; local_2c = local_2c + -1) { MaybeLogToLogfile(local_2c,param_2,param_3,param_4); } } else { ColoredWriteToStderr(param_1,param_3,param_4); } } else { ColoredWriteToStdout(param_1,param_3,param_4); } return; }
51,798
nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::LogToAllLogfiles( LogSeverity severity, const std::chrono::system_clock::time_point& timestamp, const char* message, size_t len) { if (FLAGS_logtostdout) { // global flag: never log to file ColoredWriteToStdout(severity, message, len); } else if (FLAGS_logtostderr) { // global flag: never log to file ColoredWriteToStderr(severity, message, len); } else { for (int i = severity; i >= 0; --i) { LogDestination::MaybeLogToLogfile(static_cast<LogSeverity>(i), timestamp, message, len); } } }
O2
cpp
nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, char const*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movl %edi, %ebp leaq 0x20ca8(%rip), %rax # 0x2e9f2 cmpb $0x1, (%rax) jne 0xdd66 movl %ebp, %edi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0xa048 leaq 0x20c7d(%rip), %rax # 0x2e9ea cmpb $0x0, (%rax) je 0xdd89 movl %ebp, %edi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0xa073 movq %rsi, %r15 testl %ebp, %ebp js 0xdda4 movl %ebp, %edi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0xef1e decl %ebp jmp 0xdd8c addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
_ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm: push rbp push r15 push r14 push rbx push rax mov rbx, rcx mov r14, rdx mov ebp, edi lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout cmp byte ptr [rax], 1 jnz short loc_DD66 mov edi, ebp mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ZN5nglogL20ColoredWriteToStdoutENS_11LogSeverityEPKcm; nglog::ColoredWriteToStdout(nglog::LogSeverity,char const*,ulong) loc_DD66: lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr cmp byte ptr [rax], 0 jz short loc_DD89 mov edi, ebp mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ZN5nglogL20ColoredWriteToStderrENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderr(nglog::LogSeverity,char const*,ulong) loc_DD89: mov r15, rsi loc_DD8C: test ebp, ebp js short loc_DDA4 mov edi, ebp mov rsi, r15 mov rdx, r14 mov rcx, rbx call _ZN5nglog14LogDestination17MaybeLogToLogfileENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::MaybeLogToLogfile(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong) dec ebp jmp short loc_DD8C loc_DDA4: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
void * nglog::LogDestination::LogToAllLogfiles(unsigned int a1, long long a2, long long a3, long long a4) { int v6; // ebp void *result; // rax v6 = a1; if ( fLB::FLAGS_logtostdout == 1 ) return (void *)nglog::ColoredWriteToStdout(a1, a3, a4); result = &fLB::FLAGS_logtostderr; if ( fLB::FLAGS_logtostderr ) return (void *)nglog::ColoredWriteToStderr(a1, a3, a4); while ( v6 >= 0 ) result = (void *)nglog::LogDestination::MaybeLogToLogfile((unsigned int)v6--, a2, a3, a4); return result; }
LogToAllLogfiles: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV EBP,EDI LEA RAX,[0x12e9f2] CMP byte ptr [RAX],0x1 JNZ 0x0010dd66 MOV EDI,EBP MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x0010a048 LAB_0010dd66: LEA RAX,[0x12e9ea] CMP byte ptr [RAX],0x0 JZ 0x0010dd89 MOV EDI,EBP MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x0010a073 LAB_0010dd89: MOV R15,RSI LAB_0010dd8c: TEST EBP,EBP JS 0x0010dda4 MOV EDI,EBP MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX CALL 0x0010ef1e DEC EBP JMP 0x0010dd8c LAB_0010dda4: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, char const*, unsigned long) */ void nglog::LogDestination::LogToAllLogfiles (int param_1,int8 param_2,int8 param_3,int8 param_4) { if (fLB::FLAGS_logtostdout == '\x01') { ColoredWriteToStdout(param_1,param_3,param_4); return; } if (fLB::FLAGS_logtostderr == '\0') { for (; -1 < param_1; param_1 = param_1 + -1) { MaybeLogToLogfile(param_1,param_2,param_3,param_4); } return; } ColoredWriteToStderr(param_1,param_3,param_4); return; }
51,799
bool llama_model_loader::get_key<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&, bool)
monkey531[P]llama/src/llama-model-loader.cpp
bool llama_model_loader::get_key(const std::string & key, T & result, bool required) { auto it = kv_overrides.find(key); const struct llama_model_kv_override * override = it != kv_overrides.end() ? &it->second : nullptr; const bool found = GGUFMeta::GKV<T>::set(meta.get(), key, result, override); if (required && !found) { throw std::runtime_error(format("key not found in model: %s", key.c_str())); } return found; }
O2
cpp
bool llama_model_loader::get_key<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movl %ecx, %ebx movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %r12 addq $0x90, %rdi callq 0xa8880 leaq 0x28(%rax), %rcx testq %rax, %rax cmoveq %rax, %rcx movq 0xc8(%r12), %rdi movq %r14, %rsi movq %r15, %rdx callq 0xa5a40 xorb $0x1, %bl orb %al, %bl je 0xe927f addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x9dfd0 movq %rax, %rbx movq (%r14), %rdx leaq 0x5ce4f(%rip), %rsi # 0x1460e3 movq %rsp, %rdi xorl %eax, %eax callq 0xa7ad0 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0xa6270 xorl %ebp, %ebp movq 0xb0d3b(%rip), %rsi # 0x199ff0 movq 0xb0a34(%rip), %rdx # 0x199cf0 movq %rbx, %rdi callq 0xa6f50 movq %rax, %r14 movq %rsp, %rdi callq 0xa8d48 testb %bpl, %bpl jne 0xe92d9 jmp 0xe92e1 movq %rax, %r14 movq %rbx, %rdi callq 0x9fc30 movq %r14, %rdi callq 0xa7540 nop
_ZN18llama_model_loader7get_keyIiEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERT_b: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov ebx, ecx mov r15, rdx mov r14, rsi mov r12, rdi add rdi, 90h call __ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_23llama_model_kv_overrideESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,llama_model_kv_override>,std::allocator<std::pair<std::string const,llama_model_kv_override>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) lea rcx, [rax+28h] test rax, rax cmovz rcx, rax mov rdi, [r12+0C8h] mov rsi, r14 mov rdx, r15 call __ZN8GGUFMeta3GKVIiE3setEPK12gguf_contextRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiPK23llama_model_kv_override; GGUFMeta::GKV<int>::set(gguf_context const*,std::string const&,int &,llama_model_kv_override const*) xor bl, 1 or bl, al jz short loc_E927F add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_E927F: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdx, [r14] lea rsi, aArrayKeyNotFou+6; "key not found in model: %s" mov rdi, rsp xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_E92D9 jmp short loc_E92E1 mov r14, rax loc_E92D9: mov rdi, rbx; void * call ___cxa_free_exception loc_E92E1: mov rdi, r14 call __Unwind_Resume
long long llama_model_loader::get_key<int>(long long a1, _QWORD *a2, long long a3, unsigned __int8 a4) { long long v6; // rax long long v7; // rcx long long result; // rax void *exception; // rbx int v10; // ecx int v11; // r8d int v12; // r9d _BYTE v13[72]; // [rsp+0h] [rbp-48h] BYREF v6 = std::_Hashtable<std::string,std::pair<std::string const,llama_model_kv_override>,std::allocator<std::pair<std::string const,llama_model_kv_override>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(a1 + 144); v7 = v6 + 40; if ( !v6 ) v7 = 0LL; result = GGUFMeta::GKV<int>::set(*(_QWORD *)(a1 + 200), a2, a3, v7); if ( !((unsigned __int8)result | a4 ^ 1) ) { exception = __cxa_allocate_exception(0x10uLL); format[abi:cxx11]((unsigned int)v13, (unsigned int)"key not found in model: %s", *a2, v10, v11, v12); std::runtime_error::runtime_error(exception, v13); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
get_key<int>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV EBX,ECX MOV R15,RDX MOV R14,RSI MOV R12,RDI ADD RDI,0x90 CALL 0x001a8880 LEA RCX,[RAX + 0x28] TEST RAX,RAX CMOVZ RCX,RAX MOV RDI,qword ptr [R12 + 0xc8] MOV RSI,R14 MOV RDX,R15 CALL 0x001a5a40 XOR BL,0x1 OR BL,AL JZ 0x001e927f ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001e927f: PUSH 0x10 POP RDI CALL 0x0019dfd0 MOV RBX,RAX MOV RDX,qword ptr [R14] LAB_001e928d: LEA RSI,[0x2460e3] MOV RDI,RSP XOR EAX,EAX CALL 0x001a7ad0 MOV BPL,0x1 LAB_001e92a1: MOV RSI,RSP MOV RDI,RBX CALL 0x001a6270 XOR EBP,EBP MOV RSI,qword ptr [0x00299ff0] MOV RDX,qword ptr [0x00299cf0] MOV RDI,RBX CALL 0x001a6f50
/* bool llama_model_loader::get_key<int>(std::__cxx11::string const&, int&, bool) */ bool __thiscall llama_model_loader::get_key<int>(llama_model_loader *this,string *param_1,int *param_2,bool param_3) { char cVar1; long lVar2; runtime_error *this_00; llama_model_kv_override *plVar3; string asStack_48 [32]; lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,llama_model_kv_override>,std::allocator<std::pair<std::__cxx11::string_const,llama_model_kv_override>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,llama_model_kv_override>,std::allocator<std::pair<std::__cxx11::string_const,llama_model_kv_override>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(this + 0x90),param_1); plVar3 = (llama_model_kv_override *)(lVar2 + 0x28); if (lVar2 == 0) { plVar3 = (llama_model_kv_override *)0x0; } cVar1 = GGUFMeta::GKV<int>::set(*(gguf_context **)(this + 200),param_1,param_2,plVar3); if (!param_3 || cVar1 != '\0') { return (bool)cVar1; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001e928d to 001e929d has its CatchHandler @ 001e92d6 */ format_abi_cxx11_((char *)asStack_48,"key not found in model: %s",*(int8 *)param_1); /* try { // try from 001e92a1 to 001e92c3 has its CatchHandler @ 001e92c4 */ std::runtime_error::runtime_error(this_00,asStack_48); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00299ff0,PTR__runtime_error_00299cf0); }