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
|
---|---|---|---|---|---|---|---|---|---|---|---|
62,100 |
mysql_data_seek
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void STDCALL
mysql_data_seek(MYSQL_RES *result, unsigned long long row)
{
MYSQL_ROWS *tmp=0;
if (result->data)
for (tmp=result->data->data; row-- && tmp ; tmp = tmp->next) ;
result->current_row=0;
result->data_cursor = tmp;
}
|
O0
|
c
|
mysql_data_seek:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3a6ed
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x19(%rbp)
je 0x3a6d3
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x3a6dc
jmp 0x3a6eb
jmp 0x3a6de
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3a6ae
jmp 0x3a6ed
movq -0x8(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_data_seek:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+18h], 0
jz short loc_3A6ED
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov rax, [rax]
mov [rbp+var_18], rax
loc_3A6AE:
mov rcx, [rbp+var_10]
mov rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
xor eax, eax
cmp rcx, 0
mov [rbp+var_19], al
jz short loc_3A6D3
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_19], al
loc_3A6D3:
mov al, [rbp+var_19]
test al, 1
jnz short loc_3A6DC
jmp short loc_3A6EB
loc_3A6DC:
jmp short $+2
loc_3A6DE:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_3A6AE
loc_3A6EB:
jmp short $+2
loc_3A6ED:
mov rax, [rbp+var_8]
mov qword ptr [rax+68h], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+20h], rcx
pop rbp
retn
|
long long mysql_data_seek(long long a1, long long a2)
{
long long v2; // rcx
long long result; // rax
bool v4; // [rsp+1h] [rbp-19h]
_QWORD *i; // [rsp+2h] [rbp-18h]
i = 0LL;
if ( *(_QWORD *)(a1 + 24) )
{
for ( i = **(_QWORD ***)(a1 + 24); ; i = (_QWORD *)*i )
{
v2 = a2--;
v4 = 0;
if ( v2 )
v4 = i != 0LL;
if ( !v4 )
break;
}
}
*(_QWORD *)(a1 + 104) = 0LL;
result = a1;
*(_QWORD *)(a1 + 32) = i;
return result;
}
|
mysql_data_seek:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013a6ed
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_0013a6ae:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x0013a6d3
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_0013a6d3:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0013a6dc
JMP 0x0013a6eb
LAB_0013a6dc:
JMP 0x0013a6de
LAB_0013a6de:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a6ae
LAB_0013a6eb:
JMP 0x0013a6ed
LAB_0013a6ed:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
POP RBP
RET
|
void mysql_data_seek(long param_1,long param_2)
{
int8 *local_20;
long local_18;
local_20 = (int8 *)0x0;
if (*(long *)(param_1 + 0x18) != 0) {
local_18 = param_2;
for (local_20 = (int8 *)**(int8 **)(param_1 + 0x18);
local_18 != 0 && local_20 != (int8 *)0x0; local_20 = (int8 *)*local_20) {
local_18 = local_18 + -1;
}
}
*(int8 *)(param_1 + 0x68) = 0;
*(int8 **)(param_1 + 0x20) = local_20;
return;
}
|
|
62,101 |
format_literal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
static std::string format_literal(const std::string & literal) {
std::string escaped = replacePattern(literal, GRAMMAR_LITERAL_ESCAPE_RE, [&](const std::smatch & match) {
char c = match.str()[0];
return GRAMMAR_LITERAL_ESCAPES.at(c);
});
return "\"" + escaped + "\"";
}
|
O1
|
cpp
|
format_literal(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 $0x88, %rsp
movq %rdi, 0x80(%rsp)
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rcx
movaps %xmm0, (%rcx)
leaq 0x2f9(%rip), %rax # 0x9a8b0
movq %rax, 0x18(%rcx)
leaq 0x35e(%rip), %rax # 0x9a920
movq %rax, 0x10(%rcx)
movq %rsp, %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rsi), %r14
movq 0x8(%rsi), %r15
addq %r14, %r15
leaq 0x44daf(%rip), %r13 # 0xdf3a8
leaq 0x20(%rsp), %rbp
leaq 0x40(%rsp), %rbx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x5aa2a
testb %al, %al
je 0x9a6dd
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
leaq -0x48(%rcx), %rsi
cmpq $0x48, %rdx
movq %rax, %rdx
cmoveq %rsi, %rdx
cmpq %rax, %rcx
cmoveq %rsi, %rdx
movq (%rdx), %r8
subq 0x18(%rsp), %r8
movq 0x28(%rsp), %rsi
movq %rbp, %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0x18750
cmpq $0x0, 0x70(%rsp)
je 0x9a7db
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
movq %r12, %rdx
callq *0x78(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rbp, %rdi
callq 0x181d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x9a6a7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x8(%rsp), %rax
movq %rax, %rcx
subq (%rsp), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
leaq -0x18(%rax), %rdx
addq $-0x48, %rax
cmpq $0x4, %rcx
cmovaeq %rdx, %rax
movq (%rax), %r14
jmp 0x9a603
leaq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rsi
subq %r14, %r15
xorl %edx, %edx
movq %r14, %rcx
movq %r15, %r8
callq 0x18750
movq (%rsp), %rdi
testq %rdi, %rdi
movq 0x80(%rsp), %rbx
je 0x9a714
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x186a0
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x9a72d
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x1850d(%rip), %rsi # 0xb2c41
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x24864
leaq 0x184f9(%rip), %rsi # 0xb2c41
movq %rsp, %rdi
callq 0x18cc0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x9a772
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x9a778
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a7aa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9a7c6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x18250
jmp 0x9a8a7
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a808
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x9a808
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9a89f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x9a89f
jmp 0x9a851
jmp 0x9a851
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x9a854
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x9a854
jmp 0x9a851
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9a870
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x9a886
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x186a0
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x9a89f
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x18ba0
movq %rax, %rdi
callq 0x2a807
nop
|
_ZL14format_literalRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov [rsp+0B8h+var_38], rdi
xorps xmm0, xmm0
lea rcx, [rsp+0B8h+var_58]
movaps xmmword ptr [rcx], xmm0
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEZL14format_literalRKS5_E3$_0E9_M_invokeERKSt9_Any_dataSH_; std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_invoke(std::_Any_data const&,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&)
mov [rcx+18h], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEZL14format_literalRKS5_E3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rcx+10h], rax
mov r12, rsp
movaps xmmword ptr [r12+10h], xmm0
movaps xmmword ptr [r12], xmm0
lea rax, [rsp+0B8h+var_88]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
mov r14, [rsi]
mov r15, [rsi+8]
add r15, r14
lea r13, _Z25GRAMMAR_LITERAL_ESCAPE_REB5cxx11; GRAMMAR_LITERAL_ESCAPE_RE
lea rbp, [rsp+0B8h+var_98]
lea rbx, [rsp+0B8h+var_78]
loc_9A603:
mov rdi, r14
mov rsi, r15
mov rdx, r12
mov rcx, r13
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, al
jz loc_9A6DD
mov rax, [rsp+0B8h+var_B8]
mov rcx, [rsp+0B8h+var_B0]
mov rdx, rcx
sub rdx, rax
lea rsi, [rcx-48h]
cmp rdx, 48h ; 'H'
mov rdx, rax
cmovz rdx, rsi
cmp rcx, rax
cmovz rdx, rsi
mov r8, [rdx]
sub r8, [rsp+0B8h+var_A0]
mov rsi, [rsp+0B8h+var_90]
mov rdi, rbp
xor edx, edx
mov rcx, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
cmp [rsp+0B8h+var_48], 0
jz loc_9A7DB
mov rdi, rbx
lea rsi, [rsp+0B8h+var_58]
mov rdx, r12
call [rsp+0B8h+var_40]
mov rsi, [rsp+0B8h+var_78]
mov rdx, [rsp+0B8h+var_70]
mov rdi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0B8h+var_78]; void *
lea rax, [rsp+0B8h+var_68]
cmp rdi, rax
jz short loc_9A6A7
mov rsi, [rsp+0B8h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A6A7:
mov rax, [rsp+0B8h+var_B0]
mov rcx, rax
sub rcx, [rsp+0B8h+var_B8]
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
lea rdx, [rax-18h]
add rax, 0FFFFFFFFFFFFFFB8h
cmp rcx, 4
cmovnb rax, rdx
mov r14, [rax]
jmp loc_9A603
loc_9A6DD:
lea rdi, [rsp+0B8h+var_98]
mov rsi, [rdi+8]
sub r15, r14
xor edx, edx
mov rcx, r14
mov r8, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov rdi, [rsp+0B8h+var_B8]; void *
test rdi, rdi
mov rbx, [rsp+0B8h+var_38]
jz short loc_9A714
mov rsi, [rsp+0B8h+var_A8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A714:
mov rax, [rsp+0B8h+var_48]
test rax, rax
jz short loc_9A72D
lea rdi, [rsp+0B8h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_9A72D:
lea rsi, aName+9; "\""
mov rdi, rsp
lea rdx, [rsp+0B8h+var_98]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rsi, aName+9; "\""
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_9A772
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_9A778
loc_9A772:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_9A778:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rax, [rsp+0B8h+var_A8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9A7AA
mov rsi, [rsp+0B8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A7AA:
mov rdi, [rsp+0B8h+var_98]; void *
lea rax, [rsp+0B8h+var_88]
cmp rdi, rax
jz short loc_9A7C6
mov rsi, [rsp+0B8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A7C6:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A7DB:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp loc_9A8A7
mov rbx, rax
lea rax, [rsp+0B8h+var_A8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9A808
mov rsi, [rsp+0B8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9A808
mov rbx, rax
loc_9A808:
mov rdi, [rsp+0B8h+var_98]; void *
lea rax, [rsp+0B8h+var_88]
cmp rdi, rax
jz loc_9A89F
mov rsi, [rsp+0B8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9A89F
jmp short loc_9A851
jmp short loc_9A851
mov rbx, rax
mov rdi, [rsp+0B8h+var_78]; void *
lea rax, [rsp+0B8h+var_68]
cmp rdi, rax
jz short loc_9A854
mov rsi, [rsp+0B8h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9A854
jmp short $+2
loc_9A851:
mov rbx, rax
loc_9A854:
mov rdi, [rsp+0B8h+var_98]; void *
lea rax, [rsp+0B8h+var_88]
cmp rdi, rax
jz short loc_9A870
mov rsi, [rsp+0B8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A870:
mov rdi, [rsp+0B8h+var_B8]; void *
test rdi, rdi
jz short loc_9A886
mov rsi, [rsp+0B8h+var_A8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A886:
mov rax, [rsp+0B8h+var_48]
test rax, rax
jz short loc_9A89F
lea rdi, [rsp+0B8h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_9A89F:
mov rdi, rbx
call __Unwind_Resume
loc_9A8A7:
mov rdi, rax
call __clang_call_terminate
|
long long format_literal(long long a1, long long a2)
{
long long *v2; // r14
long long v3; // r15
_QWORD *v4; // rdx
long long **v5; // rax
long long v6; // rbx
long long v7; // rax
_OWORD *v8; // rcx
__int128 v10; // [rsp+0h] [rbp-B8h] BYREF
__int128 v11; // [rsp+10h] [rbp-A8h] BYREF
void *v12; // [rsp+20h] [rbp-98h] BYREF
long long v13; // [rsp+28h] [rbp-90h]
_QWORD v14[2]; // [rsp+30h] [rbp-88h] BYREF
void *v15; // [rsp+40h] [rbp-78h] BYREF
long long v16; // [rsp+50h] [rbp-68h] BYREF
__int128 v17; // [rsp+60h] [rbp-58h] BYREF
long long ( *v18)(); // [rsp+70h] [rbp-48h]
long long ( *v19)(); // [rsp+78h] [rbp-40h]
long long v20; // [rsp+80h] [rbp-38h]
v20 = a1;
v17 = 0LL;
v19 = std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_invoke;
v18 = std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_manager;
v11 = 0LL;
v10 = 0LL;
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v2 = *(long long **)a2;
v3 = *(_QWORD *)a2 + *(_QWORD *)(a2 + 8);
while ( (unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(
v2,
v3,
(long long **)&v10,
(long long)&GRAMMAR_LITERAL_ESCAPE_RE[abi:cxx11],
0) )
{
v4 = (_QWORD *)v10;
if ( *((_QWORD *)&v10 + 1) - (_QWORD)v10 == 72LL )
v4 = (_QWORD *)(*((_QWORD *)&v10 + 1) - 72LL);
if ( *((_QWORD *)&v10 + 1) == (_QWORD)v10 )
v4 = (_QWORD *)(*((_QWORD *)&v10 + 1) - 72LL);
std::string::replace(&v12, v13, 0LL, v2, *v4 - *((_QWORD *)&v11 + 1));
if ( !v18 )
std::__throw_bad_function_call();
((void ( *)(void **, __int128 *, __int128 *))v19)(&v15, &v17, &v10);
std::string::_M_append(&v12, v15);
if ( v15 != &v16 )
operator delete(v15, v16 + 1);
v5 = (long long **)(*((_QWORD *)&v10 + 1) - 72LL);
if ( 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v10 + 1) - v10) >> 3) >= 4 )
v5 = (long long **)(*((_QWORD *)&v10 + 1) - 24LL);
v2 = *v5;
}
std::string::replace(&v12, v13, 0LL, v2, v3 - (_QWORD)v2);
v6 = v20;
if ( (_QWORD)v10 )
operator delete((void *)v10, v11 - v10);
if ( v18 )
((void ( *)(__int128 *, __int128 *, long long))v18)(&v17, &v17, 3LL);
std::operator+<char>((long long)&v10, (long long)"\"", &v12);
v7 = std::string::append(&v10, "\"");
*(_QWORD *)v6 = v6 + 16;
v8 = (_OWORD *)(v7 + 16);
if ( *(_QWORD *)v7 == v7 + 16 )
{
*(_OWORD *)(v6 + 16) = *v8;
}
else
{
*(_QWORD *)v6 = *(_QWORD *)v7;
*(_QWORD *)(v6 + 16) = *(_QWORD *)v8;
}
*(_QWORD *)(v6 + 8) = *(_QWORD *)(v7 + 8);
*(_QWORD *)v7 = v8;
*(_QWORD *)(v7 + 8) = 0LL;
*(_BYTE *)(v7 + 16) = 0;
if ( (__int128 *)v10 != &v11 )
operator delete((void *)v10, v11 + 1);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
return v6;
}
|
format_literal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RSP + 0x80],RDI
XORPS XMM0,XMM0
LEA RCX,[RSP + 0x60]
MOVAPS xmmword ptr [RCX],XMM0
LEA RAX,[0x19a8b0]
MOV qword ptr [RCX + 0x18],RAX
LEA RAX,[0x19a920]
MOV qword ptr [RCX + 0x10],RAX
MOV R12,RSP
MOVAPS xmmword ptr [R12 + 0x10],XMM0
MOVAPS xmmword ptr [R12],XMM0
LEA RAX,[RSP + 0x30]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
MOV R14,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
ADD R15,R14
LEA R13,[0x1df3a8]
LEA RBP,[RSP + 0x20]
LEA RBX,[RSP + 0x40]
LAB_0019a603:
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
MOV RCX,R13
XOR R8D,R8D
CALL 0x0015aa2a
TEST AL,AL
JZ 0x0019a6dd
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,RCX
SUB RDX,RAX
LEA RSI,[RCX + -0x48]
CMP RDX,0x48
MOV RDX,RAX
CMOVZ RDX,RSI
CMP RCX,RAX
CMOVZ RDX,RSI
MOV R8,qword ptr [RDX]
SUB R8,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDI,RBP
XOR EDX,EDX
MOV RCX,R14
CALL 0x00118750
CMP qword ptr [RSP + 0x70],0x0
JZ 0x0019a7db
LAB_0019a66a:
MOV RDI,RBX
LEA RSI,[RSP + 0x60]
MOV RDX,R12
CALL qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
LAB_0019a683:
MOV RDI,RBP
CALL 0x001181d0
MOV RDI,qword ptr [RSP + 0x40]
LEA RAX,[RSP + 0x50]
CMP RDI,RAX
JZ 0x0019a6a7
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x001186a0
LAB_0019a6a7:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RAX
SUB RCX,qword ptr [RSP]
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
LEA RDX,[RAX + -0x18]
ADD RAX,-0x48
CMP RCX,0x4
CMOVNC RAX,RDX
MOV R14,qword ptr [RAX]
JMP 0x0019a603
LAB_0019a6dd:
LEA RDI,[RSP + 0x20]
MOV RSI,qword ptr [RDI + 0x8]
SUB R15,R14
LAB_0019a6e9:
XOR EDX,EDX
MOV RCX,R14
MOV R8,R15
CALL 0x00118750
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
MOV RBX,qword ptr [RSP + 0x80]
JZ 0x0019a714
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,RDI
CALL 0x001186a0
LAB_0019a714:
MOV RAX,qword ptr [RSP + 0x70]
TEST RAX,RAX
JZ 0x0019a72d
LAB_0019a71e:
LEA RDI,[RSP + 0x60]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0019a72d:
LEA RSI,[0x1b2c41]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x00124864
LAB_0019a741:
LEA RSI,[0x1b2c41]
MOV RDI,RSP
CALL 0x00118cc0
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x0019a772
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x0019a778
LAB_0019a772:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0019a778:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019a7aa
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001186a0
LAB_0019a7aa:
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0019a7c6
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001186a0
LAB_0019a7c6:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a7db:
CALL 0x00118250
|
/* format_literal(std::__cxx11::string const&) */
string * format_literal(string *param_1)
{
string *psVar1;
bool bVar2;
ulong *puVar3;
int8 *puVar4;
long *plVar5;
ulong *in_RSI;
ulong uVar6;
long lVar7;
long *local_b8;
long lStack_b0;
long local_a8 [2];
int1 *local_98;
ulong local_90;
int1 local_88;
int7 uStack_87;
long *local_78 [2];
long local_68 [2];
int8 local_58;
int8 uStack_50;
code *local_48;
code *local_40;
string *local_38;
local_58 = 0;
uStack_50 = 0;
local_40 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>const&),format_literal(std::__cxx11::string_const&)::$_0>
::_M_invoke;
local_48 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>const&),format_literal(std::__cxx11::string_const&)::$_0>
::_M_manager;
local_a8[0] = 0;
local_a8[1] = 0;
local_b8 = (long *)0x0;
lStack_b0 = 0;
local_98 = &local_88;
local_90 = 0;
local_88 = 0;
uVar6 = *in_RSI;
lVar7 = in_RSI[1] + uVar6;
local_38 = param_1;
while( true ) {
/* try { // try from 0019a603 to 0019a65d has its CatchHandler @ 0019a851 */
bVar2 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>
(uVar6,lVar7,&local_b8,GRAMMAR_LITERAL_ESCAPE_RE_abi_cxx11_,0);
if (!bVar2) {
/* try { // try from 0019a6e9 to 0019a6f5 has its CatchHandler @ 0019a82a */
std::__cxx11::string::replace((ulong)&local_98,local_90,(char *)0x0,uVar6);
psVar1 = local_38;
if (local_b8 != (long *)0x0) {
operator_delete(local_b8,local_a8[0] - (long)local_b8);
}
if (local_48 != (code *)0x0) {
/* try { // try from 0019a71e to 0019a72c has its CatchHandler @ 0019a7e0 */
(*local_48)(&local_58,&local_58,3);
}
/* try { // try from 0019a72d to 0019a740 has its CatchHandler @ 0019a805 */
std::operator+((char *)&local_b8,(string *)&DAT_001b2c41);
/* try { // try from 0019a741 to 0019a74f has its CatchHandler @ 0019a7e5 */
puVar4 = (int8 *)std::__cxx11::string::append((char *)&local_b8);
*(string **)psVar1 = psVar1 + 0x10;
plVar5 = puVar4 + 2;
if ((long *)*puVar4 == plVar5) {
lVar7 = puVar4[3];
*(long *)(psVar1 + 0x10) = *plVar5;
*(long *)(psVar1 + 0x18) = lVar7;
}
else {
*(long **)psVar1 = (long *)*puVar4;
*(long *)(psVar1 + 0x10) = *plVar5;
}
*(int8 *)(psVar1 + 8) = puVar4[1];
*puVar4 = plVar5;
puVar4[1] = 0;
*(int1 *)(puVar4 + 2) = 0;
if (local_b8 != local_a8) {
operator_delete(local_b8,local_a8[0] + 1);
}
if (local_98 != &local_88) {
operator_delete(local_98,CONCAT71(uStack_87,local_88) + 1);
}
return psVar1;
}
std::__cxx11::string::replace((ulong)&local_98,local_90,(char *)0x0,uVar6);
if (local_48 == (code *)0x0) break;
/* try { // try from 0019a66a to 0019a678 has its CatchHandler @ 0019a84f */
(*local_40)(local_78,&local_58,&local_b8);
/* try { // try from 0019a683 to 0019a68a has its CatchHandler @ 0019a82e */
std::__cxx11::string::_M_append((char *)&local_98,(ulong)local_78[0]);
if (local_78[0] != local_68) {
operator_delete(local_78[0],local_68[0] + 1);
}
puVar3 = (ulong *)(lStack_b0 + -0x48);
if (3 < (ulong)((lStack_b0 - (long)local_b8 >> 3) * -0x5555555555555555)) {
puVar3 = (ulong *)(lStack_b0 + -0x18);
}
uVar6 = *puVar3;
}
/* WARNING: Subroutine does not return */
/* try { // try from 0019a7db to 0019a7df has its CatchHandler @ 0019a82c */
std::__throw_bad_function_call();
}
|
|
62,102 |
ma_kpointer
|
eloqsql/storage/maria/ma_search.c
|
void _ma_kpointer(register MARIA_HA *info, register uchar *buff, my_off_t pos)
{
pos/=maria_block_size;
switch (info->s->base.key_reflength) {
#if SIZEOF_OFF_T > 4
case 7: mi_int7store(buff,pos); break;
case 6: mi_int6store(buff,pos); break;
case 5: mi_int5store(buff,pos); break;
#else
case 7: *buff++=0;
/* fall through */
case 6: *buff++=0;
/* fall through */
case 5: *buff++=0;
/* fall through */
#endif
case 4: mi_int4store(buff,pos); break;
case 3: mi_int3store(buff,pos); break;
case 2: mi_int2store(buff,(uint) pos); break;
case 1: buff[0]= (uchar) pos; break;
default: abort(); /* impossible */
}
}
|
O0
|
c
|
ma_kpointer:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x212295(%rip), %rax # 0x2879d0
movq (%rax), %rcx
movq -0x18(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x3e4(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0x6, %eax
ja 0x75991
movq -0x68(%rbp), %rax
leaq 0xb0810(%rip), %rcx # 0x125f84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x20(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x20(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x20(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x28(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x28(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x28(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x75996
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x30(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x30(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x38(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x38(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x75996
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x40(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x40(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x40(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x48(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x75996
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x50(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x75996
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x58(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x58(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x75996
movq -0x18(%rbp), %rax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x5c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x75996
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x75996
callq 0x276a0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
|
_ma_kpointer:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, maria_block_size
mov rcx, [rax]
mov rax, [rbp+var_18]
xor edx, edx
div rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+3E4h]
dec eax; switch 7 cases
mov ecx, eax
mov [rbp+var_68], rcx
sub eax, 6
ja def_7577B; jumptable 000000000007577B default case
mov rax, [rbp+var_68]
lea rcx, jpt_7577B
movsxd rax, ds:(jpt_7577B - 125F84h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_7577D:
mov rax, [rbp+var_18]; jumptable 000000000007577B case 7
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_20]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_20]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_20]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_28]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_28]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_28]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_75996
loc_75804:
mov rax, [rbp+var_18]; jumptable 000000000007577B case 6
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_30]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_30]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_30]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_38]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_38]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_75996
loc_7587A:
mov rax, [rbp+var_18]; jumptable 000000000007577B case 5
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_40]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_40]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_40]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_48]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_75996
loc_758DF:
mov rax, [rbp+var_18]; jumptable 000000000007577B case 4
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_50]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_50]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_50]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_75996
loc_75928:
mov rax, [rbp+var_18]; jumptable 000000000007577B case 3
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_58]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_58]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_75996
loc_75960:
mov rax, [rbp+var_18]; jumptable 000000000007577B case 2
mov [rbp+var_5C], eax
mov eax, [rbp+var_5C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov eax, [rbp+var_5C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_75996
loc_75983:
mov rax, [rbp+var_18]; jumptable 000000000007577B case 1
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_75996
def_7577B:
call _abort; jumptable 000000000007577B default case
loc_75996:
add rsp, 70h
pop rbp
retn
|
_BYTE * ma_kpointer(long long a1, _BYTE *a2, unsigned long long a3)
{
unsigned long long v3; // rdx
_BYTE *result; // rax
unsigned long long v6; // [rsp+58h] [rbp-18h]
v3 = a3 % *(_QWORD *)&maria_block_size;
v6 = a3 / *(_QWORD *)&maria_block_size;
switch ( *(_DWORD *)(*(_QWORD *)a1 + 996LL) )
{
case 1:
result = a2;
*a2 = v6;
break;
case 2:
a2[1] = v6;
result = a2;
*a2 = BYTE1(v6);
break;
case 3:
a2[2] = v6;
a2[1] = BYTE1(v6);
result = a2;
*a2 = BYTE2(v6);
break;
case 4:
a2[3] = v6;
a2[2] = BYTE1(v6);
a2[1] = BYTE2(v6);
result = a2;
*a2 = BYTE3(v6);
break;
case 5:
a2[4] = v6;
a2[3] = BYTE1(v6);
a2[2] = BYTE2(v6);
a2[1] = BYTE3(v6);
result = a2;
*a2 = BYTE4(v6);
break;
case 6:
a2[5] = v6;
a2[4] = BYTE1(v6);
a2[3] = BYTE2(v6);
a2[2] = BYTE3(v6);
a2[1] = BYTE4(v6);
result = a2;
*a2 = BYTE5(v6);
break;
case 7:
a2[6] = v6;
a2[5] = BYTE1(v6);
a2[4] = BYTE2(v6);
a2[3] = BYTE3(v6);
a2[2] = BYTE4(v6);
a2[1] = BYTE5(v6);
result = a2;
*a2 = BYTE6(v6);
break;
default:
abort(a1, a2, v3);
}
return result;
}
|
_ma_kpointer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x3879d0]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x3e4]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x68],RCX
SUB EAX,0x6
JA 0x00175991
MOV RAX,qword ptr [RBP + -0x68]
LEA RCX,[0x225f84]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_7:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x28]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00175996
caseD_6:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00175996
caseD_5:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x48]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00175996
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00175996
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00175996
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x5c],EAX
MOV EAX,dword ptr [RBP + -0x5c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x5c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00175996
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00175996
default:
CALL 0x001276a0
LAB_00175996:
ADD RSP,0x70
POP RBP
RET
|
void _ma_kpointer(long *param_1,int1 *param_2,ulong param_3)
{
int1 uVar1;
int1 uVar2;
int1 uVar3;
int1 uVar4;
int1 uVar5;
int1 uVar6;
param_3 = param_3 / maria_block_size;
uVar1 = (int1)param_3;
uVar2 = (int1)(param_3 >> 8);
uVar3 = (int1)(param_3 >> 0x10);
uVar4 = (int1)(param_3 >> 0x18);
uVar5 = (int1)(param_3 >> 0x20);
uVar6 = (int1)(param_3 >> 0x28);
switch(*(int4 *)(*param_1 + 0x3e4)) {
case 1:
*param_2 = uVar1;
break;
case 2:
param_2[1] = uVar1;
*param_2 = uVar2;
break;
case 3:
param_2[2] = uVar1;
param_2[1] = uVar2;
*param_2 = uVar3;
break;
case 4:
param_2[3] = uVar1;
param_2[2] = uVar2;
param_2[1] = uVar3;
*param_2 = uVar4;
break;
case 5:
param_2[4] = uVar1;
param_2[3] = uVar2;
param_2[2] = uVar3;
param_2[1] = uVar4;
*param_2 = uVar5;
break;
case 6:
param_2[5] = uVar1;
param_2[4] = uVar2;
param_2[3] = uVar3;
param_2[2] = uVar4;
param_2[1] = uVar5;
*param_2 = uVar6;
break;
case 7:
param_2[6] = uVar1;
param_2[5] = uVar2;
param_2[4] = uVar3;
param_2[3] = uVar4;
param_2[2] = uVar5;
param_2[1] = uVar6;
*param_2 = (char)(param_3 >> 0x30);
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
return;
}
|
|
62,103 |
File::GetThemeDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
Dolphin-anty/Source/Core/Common/FileUtil.cpp
|
std::string GetThemeDir(const std::string& theme_name)
{
std::string dir = File::GetUserPath(D_THEMES_IDX) + theme_name + "/";
if (Exists(dir))
return dir;
// If the theme doesn't exist in the user dir, load from shared directory
dir = GetSysDirectory() + THEMES_DIR "/" + theme_name + "/";
if (Exists(dir))
return dir;
// If the theme doesn't exist at all, load the default theme
return GetSysDirectory() + THEMES_DIR "/" DEFAULT_THEME_DIR "/";
}
|
O3
|
cpp
|
File::GetThemeDir(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 $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x36658(%rip), %rsi # 0x53ec0
movq 0x36659(%rip), %rdx # 0x53ec8
addq %rsi, %rdx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0xd778
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x14dfc
leaq 0x207d8(%rip), %rsi # 0x3e06d
movq %r15, %rdi
callq 0x14f82
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1d8c5
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1d8d0
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %r12, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x1d904
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7560
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x19c64
cmpb $0x1, 0x10(%r15)
jne 0x1d95d
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rcx
cmpq %r12, %rcx
je 0x1d937
movq %rcx, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x1d93f
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1bbb4
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x3613e(%rip), %rsi # 0x53ab0
movq 0x3613f(%rip), %rdx # 0x53ab8
addq %rsi, %rdx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0xd778
leaq 0x20461(%rip), %rsi # 0x3ddf1
movq %r15, %rdi
callq 0x14f82
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x14dfc
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1d9c8
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x1d9d5
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20675(%rip), %rsi # 0x3e06d
callq 0x14f82
movq %r13, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1da1b
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x1da28
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x7d5a
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x1da66
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7560
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x1da7d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7560
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1da94
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x7560
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x19c64
cmpb $0x1, 0x10(%r14)
je 0x1d918
callq 0x1bbb4
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x35fec(%rip), %rsi # 0x53ab0
movq 0x35fed(%rip), %rdx # 0x53ab8
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xd778
leaq 0x2031c(%rip), %rsi # 0x3ddf9
movq %rbx, %rdi
callq 0x14f82
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d948
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7560
jmp 0x1d948
|
_ZN4File11GetThemeDirERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rsi
mov rbx, rdi
lea r13, [rsp+0B8h+var_80]
mov [r13-10h], r13
mov rsi, cs:qword_53EC0
mov rdx, cs:qword_53EC8
add rdx, rsi
lea r15, [rsp+0B8h+var_90]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rsi, aGba+3; "/"
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r12, [rsp+0B8h+var_A0]
mov [r12-10h], r12
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_1D8C5
mov [rsp+0B8h+var_B0], rsi
mov rdx, [rcx]
mov [rsp+0B8h+var_A0], rdx
jmp short loc_1D8D0
loc_1D8C5:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
mov rsi, r12
loc_1D8D0:
mov rdx, [rax+8]
mov [rsp+0B8h+var_A8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+0B8h+var_90]; void *
cmp rdi, r13
jz short loc_1D904
mov rsi, [rsp+0B8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rsi, [rsp+0B8h+var_B0]; char *
loc_1D904:
lea r15, [rsp+0B8h+var_90]
mov rdi, r15; this
call _ZN4File8FileInfoC2EPKc; File::FileInfo::FileInfo(char const*)
cmp byte ptr [r15+10h], 1
jnz short loc_1D95D
loc_1D918:
lea rax, [rbx+10h]
mov [rbx], rax
mov rcx, [rsp+0B8h+var_B0]
cmp rcx, r12
jz short loc_1D937
mov [rbx], rcx
mov rax, [rsp+0B8h+var_A0]
mov [rbx+10h], rax
jmp short loc_1D93F
loc_1D937:
movups xmm0, xmmword ptr [r12]
movups xmmword ptr [rax], xmm0
loc_1D93F:
mov rax, [rsp+0B8h+var_A8]
mov [rbx+8], rax
loc_1D948:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1D95D:
call _ZN4File15GetSysDirectoryB5cxx11Ev; File::GetSysDirectory(void)
lea rbp, [rsp+0B8h+var_40]
mov [rbp-10h], rbp
mov rsi, qword ptr cs:_ZZN4File15GetSysDirectoryB5cxx11EvE13sys_directoryB5cxx11; File::GetSysDirectory(void)::sys_directory
mov rdx, qword ptr cs:_ZZN4File15GetSysDirectoryB5cxx11EvE13sys_directoryB5cxx11+8; File::GetSysDirectory(void)::sys_directory
add rdx, rsi
lea r15, [rsp+0B8h+var_50]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aThemes; "Themes/"
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea r15, [rsp+0B8h+var_60]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_1D9C8
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
jmp short loc_1D9D5
loc_1D9C8:
mov [rsp+0B8h+var_70], rdx
mov rdx, [rcx]
mov [rsp+0B8h+var_60], rdx
loc_1D9D5:
mov rdx, [rax+8]
lea rdi, [rsp+0B8h+var_70]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aGba+3; "/"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+0B8h+var_90], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_1DA1B
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
jmp short loc_1DA28
loc_1DA1B:
mov [rsp+0B8h+var_90], rdx
mov rdx, [rcx]
mov [rsp+0B8h+var_80], rdx
loc_1DA28:
mov rdx, [rax+8]
lea r14, [rsp+0B8h+var_90]
mov [r14+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+0B8h+var_B0]
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r13
jz short loc_1DA66
mov rsi, [rsp+0B8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1DA66:
mov rdi, [rsp+0B8h+var_70]; void *
cmp rdi, r15
jz short loc_1DA7D
mov rsi, [rsp+0B8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1DA7D:
mov rdi, [rsp+0B8h+var_50]; void *
cmp rdi, rbp
jz short loc_1DA94
mov rsi, [rsp+0B8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1DA94:
mov rsi, [rsp+0B8h+var_B0]; char *
lea r14, [rsp+0B8h+var_90]
mov rdi, r14; this
call _ZN4File8FileInfoC2EPKc; File::FileInfo::FileInfo(char const*)
cmp byte ptr [r14+10h], 1
jz loc_1D918
call _ZN4File15GetSysDirectoryB5cxx11Ev; File::GetSysDirectory(void)
lea rax, [rbx+10h]
mov [rbx], rax
mov rsi, qword ptr cs:_ZZN4File15GetSysDirectoryB5cxx11EvE13sys_directoryB5cxx11; File::GetSysDirectory(void)::sys_directory
mov rdx, qword ptr cs:_ZZN4File15GetSysDirectoryB5cxx11EvE13sys_directoryB5cxx11+8; File::GetSysDirectory(void)::sys_directory
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)
lea rsi, aThemesClean; "Themes/Clean/"
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rdi, [rsp+0B8h+var_B0]; void *
cmp rdi, r12
jz loc_1D948
mov rsi, [rsp+0B8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_1D948
|
long long File::GetThemeDir(long long a1, _BYTE **a2)
{
_QWORD *v3; // rax
const char *v4; // rsi
__int128 *v5; // rcx
_QWORD *v7; // rax
__int128 *v8; // rcx
_QWORD *v9; // rax
__int128 *v10; // rcx
char *v11; // [rsp+8h] [rbp-B0h] BYREF
long long v12; // [rsp+10h] [rbp-A8h]
__int128 v13; // [rsp+18h] [rbp-A0h] BYREF
void *v14[2]; // [rsp+28h] [rbp-90h] BYREF
__int128 v15; // [rsp+38h] [rbp-80h] BYREF
void *v16[2]; // [rsp+48h] [rbp-70h] BYREF
__int128 v17; // [rsp+58h] [rbp-60h] BYREF
void *v18[2]; // [rsp+68h] [rbp-50h] BYREF
_QWORD v19[8]; // [rsp+78h] [rbp-40h] BYREF
v14[0] = &v15;
std::string::_M_construct<char *>(v14, (_BYTE *)qword_53EC0, qword_53EC0 + qword_53EC8);
std::string::_M_append(v14, *a2, (long long)a2[1]);
v3 = std::string::append(v14, "/");
v11 = (char *)&v13;
v4 = (const char *)*v3;
v5 = (__int128 *)(v3 + 2);
if ( (_QWORD *)*v3 == v3 + 2 )
{
v13 = *v5;
v4 = (const char *)&v13;
}
else
{
v11 = (char *)*v3;
*(_QWORD *)&v13 = *(_QWORD *)v5;
}
v12 = v3[1];
*v3 = v5;
v3[1] = 0LL;
*((_BYTE *)v3 + 16) = 0;
if ( v14[0] != &v15 )
{
operator delete(v14[0], v15 + 1);
v4 = v11;
}
File::FileInfo::FileInfo((File::FileInfo *)v14, v4);
if ( (_BYTE)v15 == 1 )
goto LABEL_7;
File::GetSysDirectory[abi:cxx11]();
v18[0] = v19;
std::string::_M_construct<char *>(
v18,
(_BYTE *)File::GetSysDirectory[abi:cxx11](void)::sys_directory[abi:cxx11],
File::GetSysDirectory[abi:cxx11](void)::sys_directory[abi:cxx11]
+ *((_QWORD *)&File::GetSysDirectory[abi:cxx11](void)::sys_directory[abi:cxx11] + 1));
std::string::append(v18, "Themes/");
v7 = std::string::_M_append(v18, *a2, (long long)a2[1]);
v16[0] = &v17;
v8 = (__int128 *)(v7 + 2);
if ( (_QWORD *)*v7 == v7 + 2 )
{
v17 = *v8;
}
else
{
v16[0] = *(void **)v7;
*(_QWORD *)&v17 = *(_QWORD *)v8;
}
v16[1] = *((void **)v7 + 1);
*v7 = v8;
v7[1] = 0LL;
*((_BYTE *)v7 + 16) = 0;
v9 = std::string::append(v16, "/");
v14[0] = &v15;
v10 = (__int128 *)(v9 + 2);
if ( (_QWORD *)*v9 == v9 + 2 )
{
v15 = *v10;
}
else
{
v14[0] = *(void **)v9;
*(_QWORD *)&v15 = *(_QWORD *)v10;
}
v14[1] = *((void **)v9 + 1);
*v9 = v10;
v9[1] = 0LL;
*((_BYTE *)v9 + 16) = 0;
std::string::operator=(&v11, (long long)v14);
if ( v14[0] != &v15 )
operator delete(v14[0], v15 + 1);
if ( v16[0] != &v17 )
operator delete(v16[0], v17 + 1);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
File::FileInfo::FileInfo((File::FileInfo *)v14, v11);
if ( (_BYTE)v15 == 1 )
{
LABEL_7:
*(_QWORD *)a1 = a1 + 16;
if ( v11 == (char *)&v13 )
{
*(_OWORD *)(a1 + 16) = v13;
}
else
{
*(_QWORD *)a1 = v11;
*(_QWORD *)(a1 + 16) = v13;
}
*(_QWORD *)(a1 + 8) = v12;
}
else
{
File::GetSysDirectory[abi:cxx11]();
*(_QWORD *)a1 = a1 + 16;
std::string::_M_construct<char *>(
(_QWORD *)a1,
(_BYTE *)File::GetSysDirectory[abi:cxx11](void)::sys_directory[abi:cxx11],
File::GetSysDirectory[abi:cxx11](void)::sys_directory[abi:cxx11]
+ *((_QWORD *)&File::GetSysDirectory[abi:cxx11](void)::sys_directory[abi:cxx11] + 1));
std::string::append((_QWORD *)a1, "Themes/Clean/");
if ( v11 != (char *)&v13 )
operator delete(v11, v13 + 1);
}
return a1;
}
|
GetThemeDir:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [0x00153ec0]
MOV RDX,qword ptr [0x00153ec8]
ADD RDX,RSI
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x0010d778
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x00114dfc
LEA RSI,[0x13e06d]
MOV RDI,R15
CALL 0x00114f82
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x0011d8c5
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0011d8d0
LAB_0011d8c5:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
MOV RSI,R12
LAB_0011d8d0:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0011d904
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00107560
MOV RSI,qword ptr [RSP + 0x8]
LAB_0011d904:
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x00119c64
CMP byte ptr [R15 + 0x10],0x1
JNZ 0x0011d95d
LAB_0011d918:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [RSP + 0x8]
CMP RCX,R12
JZ 0x0011d937
MOV qword ptr [RBX],RCX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0011d93f
LAB_0011d937:
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RAX],XMM0
LAB_0011d93f:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x8],RAX
LAB_0011d948:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011d95d:
CALL 0x0011bbb4
LEA RBP,[RSP + 0x78]
MOV qword ptr [RBP + -0x10],RBP
MOV RSI,qword ptr [0x00153ab0]
MOV RDX,qword ptr [0x00153ab8]
ADD RDX,RSI
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x0010d778
LEA RSI,[0x13ddf1]
MOV RDI,R15
CALL 0x00114f82
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x00114dfc
LEA R15,[RSP + 0x58]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0011d9c8
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
JMP 0x0011d9d5
LAB_0011d9c8:
MOV qword ptr [RSP + 0x48],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x58],RDX
LAB_0011d9d5:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x48]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RSI,[0x13e06d]
CALL 0x00114f82
MOV qword ptr [RSP + 0x28],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0011da1b
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
JMP 0x0011da28
LAB_0011da1b:
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
LAB_0011da28:
MOV RDX,qword ptr [RAX + 0x8]
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00107d5a
MOV RDI,qword ptr [R14]
CMP RDI,R13
JZ 0x0011da66
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00107560
LAB_0011da66:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R15
JZ 0x0011da7d
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00107560
LAB_0011da7d:
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,RBP
JZ 0x0011da94
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00107560
LAB_0011da94:
MOV RSI,qword ptr [RSP + 0x8]
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x00119c64
CMP byte ptr [R14 + 0x10],0x1
JZ 0x0011d918
CALL 0x0011bbb4
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [0x00153ab0]
MOV RDX,qword ptr [0x00153ab8]
ADD RDX,RSI
MOV RDI,RBX
CALL 0x0010d778
LEA RSI,[0x13ddf9]
MOV RDI,RBX
CALL 0x00114f82
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0011d948
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107560
JMP 0x0011d948
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* File::GetThemeDir(std::__cxx11::string const&) */
File * __thiscall File::GetThemeDir(File *this,string *param_1)
{
long *plVar1;
long *plVar2;
long *local_b0;
long local_a8;
long local_a0;
long lStack_98;
long *local_90;
long local_88;
long local_80;
long lStack_78;
long *local_70;
long local_68;
long local_60;
long lStack_58;
long *local_50 [2];
long local_40 [2];
local_90 = &local_80;
std::__cxx11::string::_M_construct<char*>
((string *)&local_90,_DAT_00153ec0,_DAT_00153ec8 + _DAT_00153ec0);
std::__cxx11::string::_M_append((string *)&local_90,*(char **)param_1,*(ulong *)(param_1 + 8));
plVar1 = (long *)std::__cxx11::string::append((string *)&local_90,"/");
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_a0 = *plVar2;
lStack_98 = plVar1[3];
local_b0 = &local_a0;
}
else {
local_a0 = *plVar2;
local_b0 = (long *)*plVar1;
}
local_a8 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
FileInfo::FileInfo((FileInfo *)&local_90,(char *)local_b0);
if ((char)local_80 != '\x01') {
GetSysDirectory_abi_cxx11_();
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char*>
((string *)local_50,GetSysDirectory[abi:cxx11]()::sys_directory_abi_cxx11_,
DAT_00153ab8 + GetSysDirectory[abi:cxx11]()::sys_directory_abi_cxx11_);
std::__cxx11::string::append((string *)local_50,"Themes/");
plVar1 = (long *)std::__cxx11::string::_M_append
((string *)local_50,*(char **)param_1,*(ulong *)(param_1 + 8));
local_70 = (long *)*plVar1;
plVar2 = plVar1 + 2;
if (local_70 == plVar2) {
local_60 = *plVar2;
lStack_58 = plVar1[3];
local_70 = &local_60;
}
else {
local_60 = *plVar2;
}
local_68 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
plVar1 = (long *)std::__cxx11::string::append((string *)&local_70,"/");
local_90 = (long *)*plVar1;
plVar2 = plVar1 + 2;
if (local_90 == plVar2) {
local_80 = *plVar2;
lStack_78 = plVar1[3];
local_90 = &local_80;
}
else {
local_80 = *plVar2;
}
local_88 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
std::__cxx11::string::operator=((string *)&local_b0,(string *)&local_90);
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_70 != &local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
FileInfo::FileInfo((FileInfo *)&local_90,(char *)local_b0);
if ((char)local_80 != '\x01') {
GetSysDirectory_abi_cxx11_();
*(File **)this = this + 0x10;
std::__cxx11::string::_M_construct<char*>
(this,GetSysDirectory[abi:cxx11]()::sys_directory_abi_cxx11_,
DAT_00153ab8 + GetSysDirectory[abi:cxx11]()::sys_directory_abi_cxx11_);
std::__cxx11::string::append((string *)this,"Themes/Clean/");
if (local_b0 == &local_a0) {
return this;
}
operator_delete(local_b0,local_a0 + 1);
return this;
}
}
*(File **)this = this + 0x10;
if (local_b0 == &local_a0) {
*(long *)(this + 0x10) = local_a0;
*(long *)(this + 0x18) = lStack_98;
}
else {
*(long **)this = local_b0;
*(long *)(this + 0x10) = local_a0;
}
*(long *)(this + 8) = local_a8;
return this;
}
|
|
62,104 |
translog_flush
|
eloqsql/storage/maria/ma_loghandler.c
|
my_bool translog_flush(TRANSLOG_ADDRESS lsn)
{
struct timespec abstime;
ulonglong UNINIT_VAR(flush_interval);
ulonglong time_spent;
LSN sent_to_disk= LSN_IMPOSSIBLE;
TRANSLOG_ADDRESS flush_horizon;
my_bool rc= 0;
my_bool hgroup_commit_at_start;
DBUG_ENTER("translog_flush");
DBUG_PRINT("enter", ("Flush up to LSN: " LSN_FMT, LSN_IN_PARTS(lsn)));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
mysql_mutex_lock(&log_descriptor.log_flush_lock);
DBUG_PRINT("info", ("Everything is flushed up to " LSN_FMT,
LSN_IN_PARTS(log_descriptor.flushed)));
if (cmp_translog_addr(log_descriptor.flushed, lsn) >= 0)
{
mysql_mutex_unlock(&log_descriptor.log_flush_lock);
DBUG_RETURN(0);
}
if (log_descriptor.flush_in_progress)
{
translog_lock();
/* fix lsn if it was horizon */
if (cmp_translog_addr(lsn, log_descriptor.bc.buffer->last_lsn) > 0)
lsn= BUFFER_MAX_LSN(log_descriptor.bc.buffer);
translog_unlock();
translog_flush_set_new_goal_and_wait(lsn);
if (!pthread_equal(log_descriptor.max_lsn_requester, pthread_self()))
{
/*
translog_flush_wait_for_end() release log_flush_lock while is
waiting then acquire it again
*/
translog_flush_wait_for_end(lsn);
mysql_mutex_unlock(&log_descriptor.log_flush_lock);
DBUG_RETURN(0);
}
log_descriptor.next_pass_max_lsn= LSN_IMPOSSIBLE;
}
log_descriptor.flush_in_progress= 1;
flush_horizon= log_descriptor.previous_flush_horizon;
DBUG_PRINT("info", ("flush_in_progress is set, flush_horizon: " LSN_FMT,
LSN_IN_PARTS(flush_horizon)));
mysql_mutex_unlock(&log_descriptor.log_flush_lock);
hgroup_commit_at_start= hard_group_commit;
if (hgroup_commit_at_start)
flush_interval= group_commit_wait;
translog_lock();
if (log_descriptor.is_everything_flushed)
{
DBUG_PRINT("info", ("everything is flushed"));
translog_unlock();
mysql_mutex_lock(&log_descriptor.log_flush_lock);
goto out;
}
for (;;)
{
/* Following function flushes buffers and makes translog_unlock() */
translog_flush_buffers(&lsn, &sent_to_disk, &flush_horizon);
if (!hgroup_commit_at_start)
break; /* flush pass is ended */
retest:
/*
We do not check time here because mysql_mutex_lock rarely takes
a lot of time so we can sacrifice a bit precision to performance
(taking into account that microsecond_interval_timer() might be
expensive call).
*/
if (flush_interval == 0)
break; /* flush pass is ended */
mysql_mutex_lock(&log_descriptor.log_flush_lock);
if (log_descriptor.next_pass_max_lsn == LSN_IMPOSSIBLE)
{
if (flush_interval == 0 ||
(time_spent= (microsecond_interval_timer() - flush_start)) >=
flush_interval)
{
mysql_mutex_unlock(&log_descriptor.log_flush_lock);
break;
}
DBUG_PRINT("info", ("flush waits: %llu interval: %llu spent: %llu",
flush_interval - time_spent,
flush_interval, time_spent));
/* wait time or next goal */
set_timespec_nsec(abstime, flush_interval - time_spent);
mysql_cond_timedwait(&log_descriptor.new_goal_cond,
&log_descriptor.log_flush_lock,
&abstime);
mysql_mutex_unlock(&log_descriptor.log_flush_lock);
DBUG_PRINT("info", ("retest conditions"));
goto retest;
}
/* take next goal */
lsn= log_descriptor.next_pass_max_lsn;
log_descriptor.next_pass_max_lsn= LSN_IMPOSSIBLE;
/* prevent other thread from continue */
log_descriptor.max_lsn_requester= pthread_self();
DBUG_PRINT("info", ("flush took next goal: " LSN_FMT,
LSN_IN_PARTS(lsn)));
mysql_mutex_unlock(&log_descriptor.log_flush_lock);
/* next flush pass */
DBUG_PRINT("info", ("next flush pass"));
translog_lock();
}
/*
sync() files from previous flush till current one
*/
if (!soft_sync || hgroup_commit_at_start)
{
if ((rc=
translog_sync_files(LSN_FILE_NO(log_descriptor.flushed),
LSN_FILE_NO(lsn),
sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS &&
(LSN_FILE_NO(log_descriptor.
previous_flush_horizon) !=
LSN_FILE_NO(flush_horizon) ||
(LSN_OFFSET(log_descriptor.
previous_flush_horizon) /
TRANSLOG_PAGE_SIZE) !=
(LSN_OFFSET(flush_horizon) /
TRANSLOG_PAGE_SIZE)))))
{
sent_to_disk= LSN_IMPOSSIBLE;
mysql_mutex_lock(&log_descriptor.log_flush_lock);
goto out;
}
/* keep values for soft sync() and forced sync() actual */
{
uint32 fileno= LSN_FILE_NO(lsn);
soft_sync_min= fileno;
soft_sync_max= fileno;
}
}
else
{
soft_sync_max= LSN_FILE_NO(lsn);
soft_need_sync= 1;
}
DBUG_ASSERT(flush_horizon <= log_descriptor.horizon);
mysql_mutex_lock(&log_descriptor.log_flush_lock);
log_descriptor.previous_flush_horizon= flush_horizon;
out:
if (sent_to_disk != LSN_IMPOSSIBLE)
log_descriptor.flushed= sent_to_disk;
log_descriptor.flush_in_progress= 0;
log_descriptor.flush_no++;
DBUG_PRINT("info", ("flush_in_progress is dropped"));
mysql_mutex_unlock(&log_descriptor.log_flush_lock);
mysql_cond_broadcast(&log_descriptor.log_flush_cond);
DBUG_RETURN(rc);
}
|
O3
|
c
|
translog_flush:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rdi, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x0, 0xbc9149(%rip) # 0xc00c38
jne 0x37f01
leaq 0xbc90fc(%rip), %rdi # 0xc00bf8
callq 0x29200
cmpq %rbx, 0xbc9080(%rip) # 0xc00b88
jge 0x37da5
cmpb $0x0, 0xbc92ac(%rip) # 0xc00dc1
je 0x37b93
callq 0x33983
movq 0xbc9045(%rip), %r14 # 0xc00b68
movq 0x100000(%r14), %rax
cmpq %rbx, %rax
jge 0x37b42
testq %rax, %rax
jne 0x37b3b
movq 0x100008(%r14), %rax
movq %rax, -0x38(%rbp)
movq %rax, %rbx
movq 0x1000d0(%r14), %rdi
testq %rdi, %rdi
jne 0x37f59
addq $0x100090, %r14 # imm = 0x100090
movq %r14, %rdi
callq 0x291c0
movq %rbx, %rdi
callq 0x370b5
movq 0xbc9260(%rip), %r14 # 0xc00dd0
callq 0x29580
movq %r14, %rdi
movq %rax, %rsi
callq 0x29980
testl %eax, %eax
je 0x37d9d
movq $0x0, 0xbc9235(%rip) # 0xc00dc8
movb $0x1, 0xbc9227(%rip) # 0xc00dc1
movq 0xbc8fff(%rip), %rax # 0xc00ba0
movq %rax, -0x40(%rbp)
movq 0xbc908c(%rip), %rdi # 0xc00c38
testq %rdi, %rdi
jne 0x37f20
leaq 0xbc903c(%rip), %rdi # 0xc00bf8
callq 0x291c0
movb 0xbc9249(%rip), %r14b # 0xc00e11
movl 0xbc9245(%rip), %r12d # 0xc00e14
callq 0x33983
cmpb $0x0, 0xbc91e5(%rip) # 0xc00dc0
je 0x37c22
movq 0xbc8f84(%rip), %rbx # 0xc00b68
movq 0x1000d0(%rbx), %rdi
testq %rdi, %rdi
jne 0x37f6e
addq $0x100090, %rbx # imm = 0x100090
movq %rbx, %rdi
callq 0x291c0
cmpq $0x0, 0xbc902d(%rip) # 0xc00c38
jne 0x37f83
leaq 0xbc8fe0(%rip), %rdi # 0xc00bf8
callq 0x29200
jmp 0x37eb1
testb %r14b, %r14b
sete %bl
leaq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x371d6
testq %r12, %r12
sete %al
orb %bl, %al
jne 0x37de8
movb %r14b, -0x29(%rbp)
leaq 0xbc8fa6(%rip), %rbx # 0xc00bf8
leaq -0x48(%rbp), %r13
leaq -0x40(%rbp), %r14
cmpq $0x0, 0xbc8fd6(%rip) # 0xc00c38
jne 0x37d61
movq %rbx, %rdi
callq 0x29200
movq 0xbc9151(%rip), %rax # 0xc00dc8
testq %rax, %rax
je 0x37cc5
movq %rax, -0x38(%rbp)
movq $0x0, 0xbc913d(%rip) # 0xc00dc8
callq 0x29580
movq %rax, 0xbc9139(%rip) # 0xc00dd0
movq 0xbc8f9a(%rip), %rdi # 0xc00c38
testq %rdi, %rdi
jne 0x37d6b
movq %rbx, %rdi
callq 0x291c0
callq 0x33983
leaq -0x38(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x371d6
jmp 0x37c5a
callq 0x9f990
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
subq 0xbc911a(%rip), %rdx # 0xc00e00
movq %r12, %r15
subq %rdx, %r15
jbe 0x37dc8
callq 0x9f9bc
imulq $0x3e8, %rax, %rcx # imm = 0x3E8
addq %r15, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movq %rdx, -0x58(%rbp)
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rcx
movq %rcx, -0x50(%rbp)
cmpq $0x0, 0xbc8f75(%rip) # 0xc00ca8
jne 0x37d80
leaq 0xbc8f3c(%rip), %rdi # 0xc00c78
movq %rbx, %rsi
leaq -0x58(%rbp), %rdx
callq 0x29660
movq 0xbc8ee9(%rip), %rdi # 0xc00c38
testq %rdi, %rdi
jne 0x37d8b
movq %rbx, %rdi
callq 0x291c0
jmp 0x37c5a
callq 0x2be3a
jmp 0x37c70
leaq 0x35029e(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37ca7
leaq -0x58(%rbp), %rdi
callq 0x2be58
jmp 0x37d48
leaq 0x35027e(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37d54
movq %rbx, %rdi
callq 0x3705f
movq 0xbc8e8c(%rip), %rdi # 0xc00c38
testq %rdi, %rdi
jne 0x37f0b
leaq 0xbc8e3c(%rip), %rdi # 0xc00bf8
callq 0x291c0
xorl %ebx, %ebx
jmp 0x37ef0
movq 0xbc8e69(%rip), %rdi # 0xc00c38
testq %rdi, %rdi
jne 0x37f97
leaq 0xbc8e19(%rip), %rdi # 0xc00bf8
callq 0x291c0
movb -0x29(%rbp), %r14b
movb 0xbc902a(%rip), %al # 0xc00e18
testb %r14b, %r14b
jne 0x37e09
testb %al, %al
je 0x37e09
movl -0x34(%rbp), %eax
movl %eax, 0xbc9020(%rip) # 0xc00e20
movb $0x0, 0xbc901d(%rip) # 0xc00e24
jmp 0x37e7c
movl 0xbc8d7d(%rip), %edi # 0xc00b8c
movl -0x34(%rbp), %r14d
cmpq $0x2, 0x34e335(%rip) # 0x386150
jb 0x37e3f
movq -0x40(%rbp), %rcx
xorq 0xbc8d78(%rip), %rcx # 0xc00ba0
movq %rcx, %rax
shrq $0x20, %rax
movb $0x1, %al
jne 0x37e41
cmpq $0x2000, %rcx # imm = 0x2000
setae %al
jmp 0x37e41
xorl %eax, %eax
movzbl %al, %edx
movl %r14d, %esi
callq 0x37fb6
testb %al, %al
je 0x37e6e
movl %eax, %ebx
cmpq $0x0, 0xbc8dde(%rip) # 0xc00c38
jne 0x37fac
leaq 0xbc8d91(%rip), %rdi # 0xc00bf8
callq 0x29200
jmp 0x37eb3
movl %r14d, 0xbc8fa7(%rip) # 0xc00e1c
movl %r14d, 0xbc8fa4(%rip) # 0xc00e20
cmpq $0x0, 0xbc8db4(%rip) # 0xc00c38
jne 0x37f8d
leaq 0xbc8d67(%rip), %rdi # 0xc00bf8
callq 0x29200
movq -0x40(%rbp), %rax
movq %rax, 0xbc8cff(%rip) # 0xc00ba0
movq -0x48(%rbp), %rax
testq %rax, %rax
je 0x37eb1
movq %rax, 0xbc8cd7(%rip) # 0xc00b88
xorl %ebx, %ebx
movb $0x0, 0xbc8f07(%rip) # 0xc00dc1
incl 0xbc8f04(%rip) # 0xc00dc4
movq 0xbc8d71(%rip), %rdi # 0xc00c38
testq %rdi, %rdi
jne 0x37f35
leaq 0xbc8d25(%rip), %rdi # 0xc00bf8
callq 0x291c0
movq 0xbc8d91(%rip), %rdi # 0xc00c70
testq %rdi, %rdi
jne 0x37f47
leaq 0xbc8d55(%rip), %rdi # 0xc00c40
callq 0x296d0
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2be00
jmp 0x37b01
leaq 0x3500fe(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37db5
leaq 0x3500e9(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37bb5
leaq 0x3500d4(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37ecc
leaq 0x3500c2(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x178(%rax)
jmp 0x37ee4
leaq 0x3500b0(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37b52
leaq 0x35009b(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37bf4
callq 0x2be1d
jmp 0x37eb1
callq 0x2be9f
jmp 0x37e96
leaq 0x350072(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37dd8
callq 0x2be81
jmp 0x37eb3
|
translog_flush:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov [rbp+var_38], rdi
mov [rbp+var_48], 0
cmp cs:qword_C00C38, 0
jnz loc_37F01
lea rdi, unk_C00BF8
call _pthread_mutex_lock
loc_37B01:
cmp cs:qword_C00B88, rbx
jge loc_37DA5
cmp byte ptr cs:word_C00DC0+1, 0
jz short loc_37B93
call translog_lock
mov r14, qword ptr cs:xmmword_C00B60+8
mov rax, qword ptr ds:xmmword_100000[r14]
cmp rax, rbx
jge short loc_37B42
test rax, rax
jnz short loc_37B3B
mov rax, [r14+100008h]
loc_37B3B:
mov [rbp+var_38], rax
mov rbx, rax
loc_37B42:
mov rdi, ds:qword_1000D0[r14]
test rdi, rdi
jnz loc_37F59
loc_37B52:
add r14, 100090h
mov rdi, r14
call _pthread_mutex_unlock
mov rdi, rbx
call translog_flush_set_new_goal_and_wait
mov r14, cs:qword_C00DD0
call _pthread_self
mov rdi, r14
mov rsi, rax
call _pthread_equal
test eax, eax
jz loc_37D9D
mov cs:qword_C00DC8, 0
loc_37B93:
mov byte ptr cs:word_C00DC0+1, 1
mov rax, cs:qword_C00BA0
mov [rbp+var_40], rax
mov rdi, cs:qword_C00C38
test rdi, rdi
jnz loc_37F20
loc_37BB5:
lea rdi, unk_C00BF8
call _pthread_mutex_unlock
mov r14b, cs:hard_group_commit
mov r12d, cs:group_commit_wait
call translog_lock
cmp byte ptr cs:word_C00DC0, 0
jz short loc_37C22
mov rbx, qword ptr cs:xmmword_C00B60+8
mov rdi, ds:qword_1000D0[rbx]
test rdi, rdi
jnz loc_37F6E
loc_37BF4:
add rbx, 100090h
mov rdi, rbx
call _pthread_mutex_unlock
cmp cs:qword_C00C38, 0
jnz loc_37F83
lea rdi, unk_C00BF8
call _pthread_mutex_lock
jmp loc_37EB1
loc_37C22:
test r14b, r14b
setz bl
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_48]
lea rdx, [rbp+var_40]
call translog_flush_buffers
test r12, r12
setz al
or al, bl
jnz loc_37DE8
mov [rbp+var_29], r14b
lea rbx, unk_C00BF8
lea r13, [rbp+var_48]
lea r14, [rbp+var_40]
loc_37C5A:
cmp cs:qword_C00C38, 0
jnz loc_37D61
mov rdi, rbx
call _pthread_mutex_lock
loc_37C70:
mov rax, cs:qword_C00DC8
test rax, rax
jz short loc_37CC5
mov [rbp+var_38], rax
mov cs:qword_C00DC8, 0
call _pthread_self
mov cs:qword_C00DD0, rax
mov rdi, cs:qword_C00C38
test rdi, rdi
jnz loc_37D6B
loc_37CA7:
mov rdi, rbx
call _pthread_mutex_unlock
call translog_lock
lea rdi, [rbp+var_38]
mov rsi, r13
mov rdx, r14
call translog_flush_buffers
jmp short loc_37C5A
loc_37CC5:
call my_interval_timer
shr rax, 3
mov rcx, 20C49BA5E353F7CFh
mul rcx
shr rdx, 4
sub rdx, cs:flush_start
mov r15, r12
sub r15, rdx
jbe loc_37DC8
call my_hrtime
imul rcx, rax, 3E8h
add rcx, r15
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
mov [rbp+var_58], rdx
imul rax, rdx, 3B9ACA00h
sub rcx, rax
mov [rbp+var_50], rcx
cmp cs:qword_C00CA8, 0
jnz short loc_37D80
lea rdi, unk_C00C78
mov rsi, rbx
lea rdx, [rbp+var_58]
call _pthread_cond_timedwait
loc_37D48:
mov rdi, cs:qword_C00C38
test rdi, rdi
jnz short loc_37D8B
loc_37D54:
mov rdi, rbx
call _pthread_mutex_unlock
jmp loc_37C5A
loc_37D61:
call translog_flush_cold_3
jmp loc_37C70
loc_37D6B:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_37CA7
loc_37D80:
lea rdi, [rbp+var_58]
call translog_flush_cold_4
jmp short loc_37D48
loc_37D8B:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_37D54
loc_37D9D:
mov rdi, rbx
call translog_flush_wait_for_end
loc_37DA5:
mov rdi, cs:qword_C00C38
test rdi, rdi
jnz loc_37F0B
loc_37DB5:
lea rdi, unk_C00BF8
call _pthread_mutex_unlock
xor ebx, ebx
jmp loc_37EF0
loc_37DC8:
mov rdi, cs:qword_C00C38
test rdi, rdi
jnz loc_37F97
loc_37DD8:
lea rdi, unk_C00BF8
call _pthread_mutex_unlock
mov r14b, [rbp+var_29]
loc_37DE8:
mov al, cs:soft_sync
test r14b, r14b
jnz short loc_37E09
test al, al
jz short loc_37E09
mov eax, dword ptr [rbp+var_38+4]
mov cs:soft_sync_max, eax
mov cs:soft_need_sync, 0
jmp short loc_37E7C
loc_37E09:
mov edi, dword ptr cs:qword_C00B88+4
mov r14d, dword ptr [rbp+var_38+4]
cmp cs:sync_log_dir, 2
jb short loc_37E3F
mov rcx, [rbp+var_40]
xor rcx, cs:qword_C00BA0
mov rax, rcx
shr rax, 20h
mov al, 1
jnz short loc_37E41
cmp rcx, 2000h
setnb al
jmp short loc_37E41
loc_37E3F:
xor eax, eax
loc_37E41:
movzx edx, al
mov esi, r14d
call translog_sync_files
test al, al
jz short loc_37E6E
mov ebx, eax
cmp cs:qword_C00C38, 0
jnz loc_37FAC
lea rdi, unk_C00BF8
call _pthread_mutex_lock
jmp short loc_37EB3
loc_37E6E:
mov cs:soft_sync_min, r14d
mov cs:soft_sync_max, r14d
loc_37E7C:
cmp cs:qword_C00C38, 0
jnz loc_37F8D
lea rdi, unk_C00BF8
call _pthread_mutex_lock
loc_37E96:
mov rax, [rbp+var_40]
mov cs:qword_C00BA0, rax
mov rax, [rbp+var_48]
test rax, rax
jz short loc_37EB1
mov cs:qword_C00B88, rax
loc_37EB1:
xor ebx, ebx
loc_37EB3:
mov byte ptr cs:word_C00DC0+1, 0
inc cs:dword_C00DC4
mov rdi, cs:qword_C00C38
test rdi, rdi
jnz short loc_37F35
loc_37ECC:
lea rdi, unk_C00BF8
call _pthread_mutex_unlock
mov rdi, cs:qword_C00C70
test rdi, rdi
jnz short loc_37F47
loc_37EE4:
lea rdi, unk_C00C40
call _pthread_cond_broadcast
loc_37EF0:
mov eax, ebx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_37F01:
call translog_flush_cold_1
jmp loc_37B01
loc_37F0B:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_37DB5
loc_37F20:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_37BB5
loc_37F35:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_37ECC
loc_37F47:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp short loc_37EE4
loc_37F59:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_37B52
loc_37F6E:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_37BF4
loc_37F83:
call translog_flush_cold_2
jmp loc_37EB1
loc_37F8D:
call translog_flush_cold_6
jmp loc_37E96
loc_37F97:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_37DD8
loc_37FAC:
call translog_flush_cold_5
jmp loc_37EB3
|
long long translog_flush(long long a1)
{
void *v1; // rbx
long long v2; // r14
long long v3; // rax
long long v4; // r14
long long v5; // rax
char v6; // r14
unsigned long long v7; // r12
long long v8; // rbx
long long *v9; // rdi
unsigned long long v10; // rdx
unsigned long long v11; // rcx
unsigned int v12; // ebx
int v13; // r14d
bool v14; // al
unsigned int v15; // eax
_QWORD v17[2]; // [rsp+8h] [rbp-58h] BYREF
long long v18; // [rsp+18h] [rbp-48h] BYREF
unsigned long long v19; // [rsp+20h] [rbp-40h] BYREF
long long v20; // [rsp+28h] [rbp-38h] BYREF
char v21; // [rsp+37h] [rbp-29h]
v1 = (void *)a1;
v20 = a1;
v18 = 0LL;
if ( qword_C00C38 )
translog_flush_cold_1();
else
pthread_mutex_lock(&unk_C00BF8);
if ( qword_C00B88 < a1 )
{
if ( !HIBYTE(word_C00DC0) )
goto LABEL_13;
translog_lock();
v2 = *((_QWORD *)&xmmword_C00B60 + 1);
v3 = *(_QWORD *)((char *)&xmmword_100000 + *((_QWORD *)&xmmword_C00B60 + 1));
if ( v3 < a1 )
{
if ( !v3 )
v3 = *(_QWORD *)(*((_QWORD *)&xmmword_C00B60 + 1) + 1048584LL);
v20 = v3;
v1 = (void *)v3;
}
if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_C00B60 + 1)) )
PSI_server[44]();
pthread_mutex_unlock(v2 + 1048720);
translog_flush_set_new_goal_and_wait(v1);
v4 = qword_C00DD0;
v5 = pthread_self(v1);
if ( (unsigned int)pthread_equal(v4, v5) )
{
qword_C00DC8 = 0LL;
LABEL_13:
HIBYTE(word_C00DC0) = 1;
v19 = qword_C00BA0;
if ( qword_C00C38 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C00BF8);
v6 = hard_group_commit;
v7 = (unsigned int)group_commit_wait;
translog_lock();
if ( (_BYTE)word_C00DC0 )
{
v8 = *((_QWORD *)&xmmword_C00B60 + 1);
if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_C00B60 + 1)) )
PSI_server[44]();
pthread_mutex_unlock(v8 + 1048720);
if ( qword_C00C38 )
translog_flush_cold_2();
else
pthread_mutex_lock(&unk_C00BF8);
}
else
{
v9 = &v20;
translog_flush_buffers(&v20, &v18, (long long *)&v19);
if ( v6 != 0 && v7 != 0 )
{
v21 = v6;
while ( 1 )
{
while ( 1 )
{
if ( qword_C00C38 )
{
translog_flush_cold_3();
}
else
{
v9 = (long long *)&unk_C00BF8;
pthread_mutex_lock(&unk_C00BF8);
}
if ( !qword_C00DC8 )
break;
v20 = qword_C00DC8;
qword_C00DC8 = 0LL;
qword_C00DD0 = pthread_self(v9);
if ( qword_C00C38 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C00BF8);
translog_lock();
v9 = &v20;
translog_flush_buffers(&v20, &v18, (long long *)&v19);
}
v10 = my_interval_timer() / 0x3E8uLL - flush_start;
if ( v7 <= v10 )
break;
v11 = v7 - v10 + 1000 * my_hrtime();
v17[0] = v11 / 0x3B9ACA00;
v17[1] = v11 % 0x3B9ACA00;
if ( qword_C00CA8 )
translog_flush_cold_4((long long)v17);
else
pthread_cond_timedwait(&unk_C00C78, &unk_C00BF8, v17);
if ( qword_C00C38 )
PSI_server[44]();
v9 = (long long *)&unk_C00BF8;
pthread_mutex_unlock(&unk_C00BF8);
}
if ( qword_C00C38 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C00BF8);
v6 = v21;
}
if ( v6 || !soft_sync )
{
v13 = HIDWORD(v20);
if ( (unsigned long long)sync_log_dir < 2 )
{
v14 = 0;
}
else
{
v14 = 1;
if ( !((qword_C00BA0 ^ v19) >> 32) )
v14 = (qword_C00BA0 ^ v19) >= 0x2000;
}
v15 = translog_sync_files(HIDWORD(qword_C00B88), HIDWORD(v20), v14);
if ( (_BYTE)v15 )
{
v12 = v15;
if ( qword_C00C38 )
translog_flush_cold_5();
else
pthread_mutex_lock(&unk_C00BF8);
goto LABEL_59;
}
soft_sync_min = v13;
soft_sync_max = v13;
}
else
{
soft_sync_max = HIDWORD(v20);
soft_need_sync = 0;
}
if ( qword_C00C38 )
translog_flush_cold_6();
else
pthread_mutex_lock(&unk_C00BF8);
qword_C00BA0 = v19;
if ( v18 )
qword_C00B88 = v18;
}
v12 = 0;
LABEL_59:
HIBYTE(word_C00DC0) = 0;
++dword_C00DC4;
if ( qword_C00C38 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C00BF8);
if ( qword_C00C70 )
PSI_server[47]();
pthread_cond_broadcast(&unk_C00C40);
return v12;
}
translog_flush_wait_for_end(v1);
}
if ( qword_C00C38 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C00BF8);
return 0;
}
|
translog_flush:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x48],0x0
CMP qword ptr [0x00d00c38],0x0
JNZ 0x00137f01
LEA RDI,[0xd00bf8]
CALL 0x00129200
LAB_00137b01:
CMP qword ptr [0x00d00b88],RBX
JGE 0x00137da5
CMP byte ptr [0x00d00dc1],0x0
JZ 0x00137b93
CALL 0x00133983
MOV R14,qword ptr [0x00d00b68]
MOV RAX,qword ptr [R14 + 0x100000]
CMP RAX,RBX
JGE 0x00137b42
TEST RAX,RAX
JNZ 0x00137b3b
MOV RAX,qword ptr [R14 + 0x100008]
LAB_00137b3b:
MOV qword ptr [RBP + -0x38],RAX
MOV RBX,RAX
LAB_00137b42:
MOV RDI,qword ptr [R14 + 0x1000d0]
TEST RDI,RDI
JNZ 0x00137f59
LAB_00137b52:
ADD R14,0x100090
MOV RDI,R14
CALL 0x001291c0
MOV RDI,RBX
CALL 0x001370b5
MOV R14,qword ptr [0x00d00dd0]
CALL 0x00129580
MOV RDI,R14
MOV RSI,RAX
CALL 0x00129980
TEST EAX,EAX
JZ 0x00137d9d
MOV qword ptr [0x00d00dc8],0x0
LAB_00137b93:
MOV byte ptr [0x00d00dc1],0x1
MOV RAX,qword ptr [0x00d00ba0]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [0x00d00c38]
TEST RDI,RDI
JNZ 0x00137f20
LAB_00137bb5:
LEA RDI,[0xd00bf8]
CALL 0x001291c0
MOV R14B,byte ptr [0x00d00e11]
MOV R12D,dword ptr [0x00d00e14]
CALL 0x00133983
CMP byte ptr [0x00d00dc0],0x0
JZ 0x00137c22
MOV RBX,qword ptr [0x00d00b68]
MOV RDI,qword ptr [RBX + 0x1000d0]
TEST RDI,RDI
JNZ 0x00137f6e
LAB_00137bf4:
ADD RBX,0x100090
MOV RDI,RBX
CALL 0x001291c0
CMP qword ptr [0x00d00c38],0x0
JNZ 0x00137f83
LEA RDI,[0xd00bf8]
CALL 0x00129200
JMP 0x00137eb1
LAB_00137c22:
TEST R14B,R14B
SETZ BL
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x48]
LEA RDX,[RBP + -0x40]
CALL 0x001371d6
TEST R12,R12
SETZ AL
OR AL,BL
JNZ 0x00137de8
MOV byte ptr [RBP + -0x29],R14B
LEA RBX,[0xd00bf8]
LEA R13,[RBP + -0x48]
LEA R14,[RBP + -0x40]
LAB_00137c5a:
CMP qword ptr [0x00d00c38],0x0
JNZ 0x00137d61
MOV RDI,RBX
CALL 0x00129200
LAB_00137c70:
MOV RAX,qword ptr [0x00d00dc8]
TEST RAX,RAX
JZ 0x00137cc5
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [0x00d00dc8],0x0
CALL 0x00129580
MOV qword ptr [0x00d00dd0],RAX
MOV RDI,qword ptr [0x00d00c38]
TEST RDI,RDI
JNZ 0x00137d6b
LAB_00137ca7:
MOV RDI,RBX
CALL 0x001291c0
CALL 0x00133983
LEA RDI,[RBP + -0x38]
MOV RSI,R13
MOV RDX,R14
CALL 0x001371d6
JMP 0x00137c5a
LAB_00137cc5:
CALL 0x0019f990
SHR RAX,0x3
MOV RCX,0x20c49ba5e353f7cf
MUL RCX
SHR RDX,0x4
SUB RDX,qword ptr [0x00d00e00]
MOV R15,R12
SUB R15,RDX
JBE 0x00137dc8
CALL 0x0019f9bc
IMUL RCX,RAX,0x3e8
ADD RCX,R15
MOV RAX,RCX
SHR RAX,0x9
MOV RDX,0x44b82fa09b5a53
MUL RDX
SHR RDX,0xb
MOV qword ptr [RBP + -0x58],RDX
IMUL RAX,RDX,0x3b9aca00
SUB RCX,RAX
MOV qword ptr [RBP + -0x50],RCX
CMP qword ptr [0x00d00ca8],0x0
JNZ 0x00137d80
LEA RDI,[0xd00c78]
MOV RSI,RBX
LEA RDX,[RBP + -0x58]
CALL 0x00129660
LAB_00137d48:
MOV RDI,qword ptr [0x00d00c38]
TEST RDI,RDI
JNZ 0x00137d8b
LAB_00137d54:
MOV RDI,RBX
CALL 0x001291c0
JMP 0x00137c5a
LAB_00137d61:
CALL 0x0012be3a
JMP 0x00137c70
LAB_00137d6b:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137ca7
LAB_00137d80:
LEA RDI,[RBP + -0x58]
CALL 0x0012be58
JMP 0x00137d48
LAB_00137d8b:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137d54
LAB_00137d9d:
MOV RDI,RBX
CALL 0x0013705f
LAB_00137da5:
MOV RDI,qword ptr [0x00d00c38]
TEST RDI,RDI
JNZ 0x00137f0b
LAB_00137db5:
LEA RDI,[0xd00bf8]
CALL 0x001291c0
XOR EBX,EBX
JMP 0x00137ef0
LAB_00137dc8:
MOV RDI,qword ptr [0x00d00c38]
TEST RDI,RDI
JNZ 0x00137f97
LAB_00137dd8:
LEA RDI,[0xd00bf8]
CALL 0x001291c0
MOV R14B,byte ptr [RBP + -0x29]
LAB_00137de8:
MOV AL,byte ptr [0x00d00e18]
TEST R14B,R14B
JNZ 0x00137e09
TEST AL,AL
JZ 0x00137e09
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [0x00d00e20],EAX
MOV byte ptr [0x00d00e24],0x0
JMP 0x00137e7c
LAB_00137e09:
MOV EDI,dword ptr [0x00d00b8c]
MOV R14D,dword ptr [RBP + -0x34]
CMP qword ptr [0x00486150],0x2
JC 0x00137e3f
MOV RCX,qword ptr [RBP + -0x40]
XOR RCX,qword ptr [0x00d00ba0]
MOV RAX,RCX
SHR RAX,0x20
MOV AL,0x1
JNZ 0x00137e41
CMP RCX,0x2000
SETNC AL
JMP 0x00137e41
LAB_00137e3f:
XOR EAX,EAX
LAB_00137e41:
MOVZX EDX,AL
MOV ESI,R14D
CALL 0x00137fb6
TEST AL,AL
JZ 0x00137e6e
MOV EBX,EAX
CMP qword ptr [0x00d00c38],0x0
JNZ 0x00137fac
LEA RDI,[0xd00bf8]
CALL 0x00129200
JMP 0x00137eb3
LAB_00137e6e:
MOV dword ptr [0x00d00e1c],R14D
MOV dword ptr [0x00d00e20],R14D
LAB_00137e7c:
CMP qword ptr [0x00d00c38],0x0
JNZ 0x00137f8d
LEA RDI,[0xd00bf8]
CALL 0x00129200
LAB_00137e96:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [0x00d00ba0],RAX
MOV RAX,qword ptr [RBP + -0x48]
TEST RAX,RAX
JZ 0x00137eb1
MOV qword ptr [0x00d00b88],RAX
LAB_00137eb1:
XOR EBX,EBX
LAB_00137eb3:
MOV byte ptr [0x00d00dc1],0x0
INC dword ptr [0x00d00dc4]
MOV RDI,qword ptr [0x00d00c38]
TEST RDI,RDI
JNZ 0x00137f35
LAB_00137ecc:
LEA RDI,[0xd00bf8]
CALL 0x001291c0
MOV RDI,qword ptr [0x00d00c70]
TEST RDI,RDI
JNZ 0x00137f47
LAB_00137ee4:
LEA RDI,[0xd00c40]
CALL 0x001296d0
LAB_00137ef0:
MOV EAX,EBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00137f01:
CALL 0x0012be00
JMP 0x00137b01
LAB_00137f0b:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137db5
LAB_00137f20:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137bb5
LAB_00137f35:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137ecc
LAB_00137f47:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x00137ee4
LAB_00137f59:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137b52
LAB_00137f6e:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137bf4
LAB_00137f83:
CALL 0x0012be1d
JMP 0x00137eb1
LAB_00137f8d:
CALL 0x0012be9f
JMP 0x00137e96
LAB_00137f97:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137dd8
LAB_00137fac:
CALL 0x0012be81
JMP 0x00137eb3
|
int4 translog_flush(long param_1)
{
pthread_t __thread1;
int4 uVar1;
int iVar2;
int4 uVar3;
pthread_t __thread2;
ulong uVar4;
long lVar5;
ulong uVar6;
char cVar7;
long lVar8;
bool bVar9;
timespec local_60;
long local_50;
ulong local_48;
int8 local_40;
char local_31;
local_50 = 0;
local_40 = param_1;
if (DAT_00d00c38 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d00bf8);
}
else {
translog_flush_cold_1();
}
if (param_1 <= DAT_00d00b88) {
LAB_00137da5:
if (DAT_00d00c38 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d00bf8);
return 0;
}
if (DAT_00d00dc1 != '\0') {
translog_lock();
lVar5 = DAT_00d00b68;
lVar8 = *(long *)(DAT_00d00b68 + 0x100000);
if ((lVar8 < param_1) && (param_1 = lVar8, local_40 = lVar8, lVar8 == 0)) {
param_1 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d00b68 + -1);
local_40 = param_1;
}
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00d00b68) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar5));
translog_flush_set_new_goal_and_wait(param_1);
__thread1 = DAT_00d00dd0;
__thread2 = pthread_self();
iVar2 = pthread_equal(__thread1,__thread2);
if (iVar2 == 0) {
translog_flush_wait_for_end(param_1);
goto LAB_00137da5;
}
DAT_00d00dc8 = 0;
}
DAT_00d00dc1 = 1;
local_48 = DAT_00d00ba0;
if (DAT_00d00c38 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d00bf8);
cVar7 = hard_group_commit;
uVar6 = (ulong)group_commit_wait;
translog_lock();
lVar8 = DAT_00d00b68;
if (DAT_00d00dc0 == '\0') {
translog_flush_buffers(&local_40,&local_50,&local_48);
if (uVar6 != 0 && cVar7 != '\0') {
local_31 = cVar7;
while( true ) {
while( true ) {
if (DAT_00d00c38 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d00bf8);
}
else {
translog_flush_cold_3();
}
if (DAT_00d00dc8 == 0) break;
local_40 = DAT_00d00dc8;
DAT_00d00dc8 = 0;
DAT_00d00dd0 = pthread_self();
if (DAT_00d00c38 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d00bf8);
translog_lock();
translog_flush_buffers(&local_40,&local_50,&local_48);
}
uVar4 = my_interval_timer();
uVar4 = uVar4 / 1000 - flush_start;
lVar8 = uVar6 - uVar4;
if (uVar6 < uVar4 || lVar8 == 0) break;
lVar5 = my_hrtime();
local_60.tv_nsec = lVar5 * 1000 + lVar8;
local_60.tv_sec = (ulong)local_60.tv_nsec / 1000000000;
local_60.tv_nsec = (ulong)local_60.tv_nsec % 1000000000;
if (DAT_00d00ca8 == 0) {
pthread_cond_timedwait
((pthread_cond_t *)&DAT_00d00c78,(pthread_mutex_t *)&DAT_00d00bf8,&local_60);
}
else {
translog_flush_cold_4(&local_60);
}
if (DAT_00d00c38 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d00bf8);
}
if (DAT_00d00c38 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d00bf8);
cVar7 = local_31;
}
uVar1 = local_40._4_4_;
if ((cVar7 == '\0') && (soft_sync != '\0')) {
soft_need_sync = 0;
}
else {
if (sync_log_dir < 2) {
bVar9 = false;
}
else {
bVar9 = true;
if ((local_48 ^ DAT_00d00ba0) >> 0x20 == 0) {
bVar9 = 0x1fff < (local_48 ^ DAT_00d00ba0);
}
}
uVar3 = translog_sync_files(DAT_00d00b88._4_4_,local_40._4_4_,bVar9);
if ((char)uVar3 != '\0') {
if (DAT_00d00c38 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d00bf8);
}
else {
translog_flush_cold_5();
}
goto LAB_00137eb3;
}
soft_sync_min = uVar1;
}
soft_sync_max = uVar1;
if (DAT_00d00c38 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d00bf8);
}
else {
translog_flush_cold_6();
}
DAT_00d00ba0 = local_48;
if (local_50 != 0) {
DAT_00d00b88 = local_50;
}
}
else {
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00d00b68) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar8));
if (DAT_00d00c38 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d00bf8);
}
else {
translog_flush_cold_2();
}
}
uVar3 = 0;
LAB_00137eb3:
DAT_00d00dc1 = 0;
DAT_00d00dc4 = DAT_00d00dc4 + 1;
if (DAT_00d00c38 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d00bf8);
if (DAT_00d00c70 != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast((pthread_cond_t *)&DAT_00d00c40);
return uVar3;
}
|
|
62,105 |
infer_variable_def
|
tsotchke[P]eshkol/src/frontend/type_inference/inference.c
|
static Type* infer_variable_def(TypeInferenceContext* context, AstNode* node) {
assert(node->type == AST_VARIABLE_DEF);
// Infer the type of the value
Type* value_type = type_inference_infer_node(context, node->as.variable_def.value);
// Add the variable to the context
type_inference_add_node(context, node, value_type);
return value_type;
}
|
O0
|
c
|
infer_variable_def:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1c, (%rax)
jne 0xe6fb
jmp 0xe71a
leaq 0x1b04f(%rip), %rdi # 0x29751
leaq 0x1a82b(%rip), %rsi # 0x28f34
movl $0x27e, %edx # imm = 0x27E
leaq 0x1b05b(%rip), %rcx # 0x29770
callq 0x2160
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0xc960
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xc000
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
infer_variable_def:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
cmp dword ptr [rax], 1Ch
jnz short loc_E6FB
jmp short loc_E71A
loc_E6FB:
lea rdi, aNodeTypeAstVar; "node->type == AST_VARIABLE_DEF"
lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"...
mov edx, 27Eh
lea rcx, aTypeInferVaria; "Type *infer_variable_def(TypeInferenceC"...
call ___assert_fail
loc_E71A:
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov rsi, [rax+50h]
call type_inference_infer_node
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call type_inference_add_node
mov rax, [rbp+var_18]
add rsp, 20h
pop rbp
retn
|
long long infer_variable_def(long long *a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-18h]
if ( *(_DWORD *)a2 != 28 )
__assert_fail(
"node->type == AST_VARIABLE_DEF",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/inference.c",
638LL,
"Type *infer_variable_def(TypeInferenceContext *, AstNode *)");
v3 = type_inference_infer_node(a1, *(_DWORD **)(a2 + 80));
type_inference_add_node(a1, a2, v3);
return v3;
}
|
infer_variable_def:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX],0x1c
JNZ 0x0010e6fb
JMP 0x0010e71a
LAB_0010e6fb:
LEA RDI,[0x129751]
LEA RSI,[0x128f34]
MOV EDX,0x27e
LEA RCX,[0x129770]
CALL 0x00102160
LAB_0010e71a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x50]
CALL 0x0010c960
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0010c000
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
int8 infer_variable_def(int8 param_1,int *param_2)
{
int8 uVar1;
if (*param_2 == 0x1c) {
uVar1 = type_inference_infer_node(param_1,*(int8 *)(param_2 + 0x14));
type_inference_add_node(param_1,param_2,uVar1);
return uVar1;
}
/* WARNING: Subroutine does not return */
__assert_fail("node->type == AST_VARIABLE_DEF",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/inference.c"
,0x27e,"Type *infer_variable_def(TypeInferenceContext *, AstNode *)");
}
|
|
62,106 |
utf8_decode_buf8
|
bluesky950520[P]quickjs/cutils.c
|
size_t utf8_decode_buf8(uint8_t *dest, size_t dest_len, const char *src, size_t src_len)
{
const uint8_t *p, *p_end;
size_t i;
p = (const uint8_t *)src;
p_end = p + src_len;
for (i = 0; p < p_end; i++) {
uint32_t c = *p++;
if (c >= 0xC0)
c = (c << 6) + *p++ - ((0xC0 << 6) + 0x80);
if (i < dest_len)
dest[i] = c;
}
if (i < dest_len)
dest[i] = '\0';
else if (dest_len > 0)
dest[dest_len - 1] = '\0';
return i;
}
|
O2
|
c
|
utf8_decode_buf8:
addq %rdx, %rcx
xorl %eax, %eax
cmpq %rcx, %rdx
jae 0x19d8f
movb (%rdx), %r8b
cmpb $-0x40, %r8b
jb 0x19d7e
shlb $0x6, %r8b
addb 0x1(%rdx), %r8b
addq $0x2, %rdx
addb $-0x80, %r8b
jmp 0x19d81
incq %rdx
cmpq %rsi, %rax
jae 0x19d8a
movb %r8b, (%rdi,%rax)
incq %rax
jmp 0x19d5e
cmpq %rsi, %rax
jae 0x19d99
addq %rax, %rdi
jmp 0x19da4
testq %rsi, %rsi
je 0x19da7
addq %rsi, %rdi
decq %rdi
movb $0x0, (%rdi)
retq
|
utf8_decode_buf8:
add rcx, rdx
xor eax, eax
loc_19D5E:
cmp rdx, rcx
jnb short loc_19D8F
mov r8b, [rdx]
cmp r8b, 0C0h
jb short loc_19D7E
shl r8b, 6
add r8b, [rdx+1]
add rdx, 2
add r8b, 80h
jmp short loc_19D81
loc_19D7E:
inc rdx
loc_19D81:
cmp rax, rsi
jnb short loc_19D8A
mov [rdi+rax], r8b
loc_19D8A:
inc rax
jmp short loc_19D5E
loc_19D8F:
cmp rax, rsi
jnb short loc_19D99
add rdi, rax
jmp short loc_19DA4
loc_19D99:
test rsi, rsi
jz short locret_19DA7
add rdi, rsi
dec rdi
loc_19DA4:
mov byte ptr [rdi], 0
locret_19DA7:
retn
|
unsigned long long utf8_decode_buf8(long long a1, unsigned long long a2, char *a3, long long a4)
{
char *v4; // rcx
unsigned long long result; // rax
char v6; // r8
char v7; // r8
_BYTE *v8; // rdi
v4 = &a3[a4];
result = 0LL;
while ( a3 < v4 )
{
v6 = *a3;
if ( (unsigned __int8)*a3 < 0xC0u )
{
++a3;
}
else
{
v7 = a3[1] + (v6 << 6);
a3 += 2;
v6 = v7 + 0x80;
}
if ( result < a2 )
*(_BYTE *)(a1 + result) = v6;
++result;
}
if ( result >= a2 )
{
if ( !a2 )
return result;
v8 = (_BYTE *)(a2 + a1 - 1);
}
else
{
v8 = (_BYTE *)(result + a1);
}
*v8 = 0;
return result;
}
|
utf8_decode_buf8:
ADD RCX,RDX
XOR EAX,EAX
LAB_00119d5e:
CMP RDX,RCX
JNC 0x00119d8f
MOV R8B,byte ptr [RDX]
CMP R8B,0xc0
JC 0x00119d7e
SHL R8B,0x6
ADD R8B,byte ptr [RDX + 0x1]
ADD RDX,0x2
ADD R8B,0x80
JMP 0x00119d81
LAB_00119d7e:
INC RDX
LAB_00119d81:
CMP RAX,RSI
JNC 0x00119d8a
MOV byte ptr [RDI + RAX*0x1],R8B
LAB_00119d8a:
INC RAX
JMP 0x00119d5e
LAB_00119d8f:
CMP RAX,RSI
JNC 0x00119d99
ADD RDI,RAX
JMP 0x00119da4
LAB_00119d99:
TEST RSI,RSI
JZ 0x00119da7
ADD RDI,RSI
DEC RDI
LAB_00119da4:
MOV byte ptr [RDI],0x0
LAB_00119da7:
RET
|
void utf8_decode_buf8(long param_1,ulong param_2,byte *param_3,long param_4)
{
byte *pbVar1;
ulong uVar2;
byte *pbVar3;
int1 *puVar4;
byte bVar5;
pbVar3 = param_3 + param_4;
uVar2 = 0;
while (param_3 < pbVar3) {
bVar5 = *param_3;
if (bVar5 < 0xc0) {
param_3 = param_3 + 1;
}
else {
pbVar1 = param_3 + 1;
param_3 = param_3 + 2;
bVar5 = bVar5 * '@' + *pbVar1 + 0x80;
}
if (uVar2 < param_2) {
*(byte *)(param_1 + uVar2) = bVar5;
}
uVar2 = uVar2 + 1;
}
if (uVar2 < param_2) {
puVar4 = (int1 *)(param_1 + uVar2);
}
else {
if (param_2 == 0) {
return;
}
puVar4 = (int1 *)(param_1 + param_2 + -1);
}
*puVar4 = 0;
return;
}
|
|
62,107 |
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [3], 0>(char const (&) [3])
|
monkey531[P]llama/common/json.hpp
|
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
}
|
O0
|
cpp
|
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [3], 0>(char const (&) [3]):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xb3af0
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rdi
callq 0xb3b20
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xb3b50
testb $0x1, %al
jne 0x1bc546
jmp 0x1bc586
movq 0x10(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xb4bf0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x20(%rsp), %rdx
callq 0x1bc5a0
testb $0x1, %al
jne 0x1bc576
jmp 0x1bc578
jmp 0x1bc595
jmp 0x1bc57a
leaq 0x30(%rsp), %rdi
callq 0xb3bd0
jmp 0x1bc522
movq 0x10(%rsp), %rdi
callq 0xb3b20
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rdi, [rsp+38h+var_10]
mov [rsp+38h+var_28], rdi
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void)
mov [rsp+38h+var_8], rax
loc_1BC522:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov [rsp+38h+var_20], rax
lea rdi, [rsp+38h+var_8]
lea rsi, [rsp+38h+var_20]
call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&)
test al, 1
jnz short loc_1BC546
jmp short loc_1BC586
loc_1BC546:
mov rax, [rsp+38h+var_28]
add rax, 18h
mov [rsp+38h+var_30], rax
lea rdi, [rsp+38h+var_8]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void)
mov rdi, [rsp+38h+var_30]
mov rsi, rax
mov rdx, [rsp+38h+var_18]
call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA17_KcEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSD_OSE_
test al, 1
jnz short loc_1BC576
jmp short loc_1BC578
loc_1BC576:
jmp short loc_1BC595
loc_1BC578:
jmp short $+2
loc_1BC57A:
lea rdi, [rsp+38h+var_8]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void)
jmp short loc_1BC522
loc_1BC586:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov [rsp+38h+var_8], rax
loc_1BC595:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long a1,
long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-20h] BYREF
long long v5; // [rsp+20h] [rbp-18h]
long long v6; // [rsp+28h] [rbp-10h]
long long i; // [rsp+30h] [rbp-8h] BYREF
v6 = a1;
v5 = a2;
for ( i = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(a1);
;
__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator++(&i) )
{
v4 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1);
if ( !__gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>(
(long long)&i,
(long long)&v4) )
break;
v2 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<std::string const&,char const(&)[17]>(a1 + 24, v2, v5) & 1) != 0 )
return i;
}
return std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1);
}
| |||
62,108 |
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [3], 0>(char const (&) [3])
|
monkey531[P]llama/common/json.hpp
|
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
}
|
O2
|
cpp
|
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [3], 0>(char const (&) [3]):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x7dec5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x38e8e
testb %al, %al
jne 0x7dec2
addq $0x30, %r14
jmp 0x7dea4
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_7DEA4:
mov rax, [r15+8]
cmp r14, rax
jz short loc_7DEC5
mov rdi, r14
mov rsi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_7DEC2
add r14, 30h ; '0'
jmp short loc_7DEA4
loc_7DEC2:
mov rax, r14
loc_7DEC5:
pop rbx
pop r14
pop r15
retn
|
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long *a1)
{
long long i; // r14
long long result; // rax
for ( i = *a1; ; i += 48LL )
{
result = a1[1];
if ( i == result )
break;
if ( std::operator==<char>(i) )
return i;
}
return result;
}
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_0017dea4:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x0017dec5
MOV RDI,R14
MOV RSI,RBX
CALL 0x00138e8e
TEST AL,AL
JNZ 0x0017dec2
ADD R14,0x30
JMP 0x0017dea4
LAB_0017dec2:
MOV RAX,R14
LAB_0017dec5:
POP RBX
POP R14
POP R15
RET
|
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(int8 *param_1,char *param_2)
{
bool bVar1;
string *psVar2;
string *psVar3;
psVar3 = (string *)*param_1;
while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] &&
(bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) {
psVar3 = psVar3 + 0x30;
}
return psVar2;
}
|
|
62,109 |
get_receipts
|
corpus-core[P]colibri-stateless/src/chains/eth/proofer/proof_logs.c
|
static c4_status_t get_receipts(proofer_ctx_t* ctx, proof_logs_block_t* blocks) {
c4_status_t status = C4_SUCCESS;
uint8_t tmp[100] = {0};
buffer_t buf = stack_buffer(tmp);
for (proof_logs_block_t* block = blocks; block; block = block->next) {
buffer_reset(&buf);
json_t block_number = json_parse(bprintf(&buf, "\"0x%lx\"", block->block_number));
TRY_ADD_ASYNC(status, c4_beacon_get_block_for_eth(ctx, block_number, &block->beacon_block));
#ifdef PROOFER_CACHE
// we get the merkle tree from the cache if available now so we can use it later in the worker thread
bytes32_t cachekey;
if (status == C4_SUCCESS && block->beacon_block.execution.bytes.data &&
c4_proofer_cache_get(ctx, c4_eth_receipt_cachekey(cachekey, ssz_get(&block->beacon_block.execution, "receiptsRoot").bytes.data)))
continue;
#endif
TRY_ADD_ASYNC(status, eth_getBlockReceipts(ctx, block_number, &block->block_receipts));
}
return status;
}
|
O0
|
c
|
get_receipts:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x64, %edx
callq 0x5110
movl $0x0, -0x98(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0xffffff9c, -0x88(%rbp) # imm = 0xFFFFFF9C
movq -0x18(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0x87b8
movl $0x0, -0x98(%rbp)
movq -0xa0(%rbp), %rax
movq (%rax), %rdx
leaq -0x98(%rbp), %rdi
leaq 0x4a0a6(%rip), %rsi # 0x5276a
movb $0x0, %al
callq 0x19740
movq %rax, %rsi
leaq -0xb8(%rbp), %rdi
callq 0x1fd30
movq -0x10(%rbp), %rdi
movq -0xa0(%rbp), %rsi
addq $0x58, %rsi
leaq -0xb8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xadf0
movl %eax, -0xbc(%rbp)
cmpl $-0x1, -0xbc(%rbp)
jne 0x8729
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x87be
cmpl $0x2, -0xbc(%rbp)
jne 0x873b
movl -0xbc(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x873d
jmp 0x873f
movq -0x10(%rbp), %rdi
movq -0xa0(%rbp), %rsi
addq $0x30, %rsi
leaq -0xb8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd530
movl %eax, -0xc0(%rbp)
cmpl $-0x1, -0xc0(%rbp)
jne 0x878b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x87be
cmpl $0x2, -0xc0(%rbp)
jne 0x879d
movl -0xc0(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x879f
jmp 0x87a1
movq -0xa0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xa0(%rbp)
jmp 0x8694
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
get_receipts:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 0
lea rdi, [rbp+var_80]
xor esi, esi
mov edx, 64h ; 'd'
call _memset
mov [rbp+var_98], 0
lea rax, [rbp+var_80]
mov [rbp+var_90], rax
mov [rbp+var_88], 0FFFFFF9Ch
mov rax, [rbp+var_18]
mov [rbp+var_A0], rax
loc_8694:
cmp [rbp+var_A0], 0
jz loc_87B8
mov [rbp+var_98], 0
mov rax, [rbp+var_A0]
mov rdx, [rax]
lea rdi, [rbp+var_98]
lea rsi, a0xLx; "\"0x%lx\""
mov al, 0
call bprintf
mov rsi, rax
lea rdi, [rbp+var_B8]
call json_parse
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_A0]
add rsi, 58h ; 'X'
lea rax, [rbp+var_B8]
mov rcx, [rax]
mov [rsp+0E0h+var_E0], rcx
mov rcx, [rax+8]
mov [rsp+0E0h+var_D8], rcx
mov rax, [rax+10h]
mov [rsp+0E0h+var_D0], rax
call c4_beacon_get_block_for_eth
mov [rbp+var_BC], eax
cmp [rbp+var_BC], 0FFFFFFFFh
jnz short loc_8729
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_87BE
loc_8729:
cmp [rbp+var_BC], 2
jnz short loc_873B
mov eax, [rbp+var_BC]
mov [rbp+var_1C], eax
loc_873B:
jmp short $+2
loc_873D:
jmp short $+2
loc_873F:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_A0]
add rsi, 30h ; '0'
lea rax, [rbp+var_B8]
mov rcx, [rax]
mov [rsp+0E0h+var_E0], rcx
mov rcx, [rax+8]
mov [rsp+0E0h+var_D8], rcx
mov rax, [rax+10h]
mov [rsp+0E0h+var_D0], rax
call eth_getBlockReceipts
mov [rbp+var_C0], eax
cmp [rbp+var_C0], 0FFFFFFFFh
jnz short loc_878B
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_87BE
loc_878B:
cmp [rbp+var_C0], 2
jnz short loc_879D
mov eax, [rbp+var_C0]
mov [rbp+var_1C], eax
loc_879D:
jmp short $+2
loc_879F:
jmp short $+2
loc_87A1:
mov rax, [rbp+var_A0]
mov rax, [rax+28h]
mov [rbp+var_A0], rax
jmp loc_8694
loc_87B8:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_87BE:
mov eax, [rbp+var_4]
add rsp, 0E0h
pop rbp
retn
|
long long get_receipts(long long a1, _QWORD *a2)
{
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long v5; // rax
int v6; // edx
int v7; // r8d
int v8; // r9d
int v9; // edx
int v10; // r8d
int v11; // r9d
int BlockReceipts; // [rsp+20h] [rbp-C0h]
int block_for_eth; // [rsp+24h] [rbp-BCh]
long long v15; // [rsp+28h] [rbp-B8h] BYREF
long long v16; // [rsp+30h] [rbp-B0h]
long long v17; // [rsp+38h] [rbp-A8h]
_QWORD *i; // [rsp+40h] [rbp-A0h]
int v19; // [rsp+48h] [rbp-98h] BYREF
_BYTE *v20; // [rsp+50h] [rbp-90h]
int v21; // [rsp+58h] [rbp-88h]
_BYTE v22[100]; // [rsp+60h] [rbp-80h] BYREF
unsigned int v23; // [rsp+C4h] [rbp-1Ch]
_QWORD *v24; // [rsp+C8h] [rbp-18h]
long long v25; // [rsp+D0h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = 0;
memset(v22, 0LL, sizeof(v22));
v19 = 0;
v20 = v22;
v21 = -100;
for ( i = v24; i; i = (_QWORD *)i[5] )
{
v19 = 0;
v5 = bprintf((unsigned int)&v19, (unsigned int)"\"0x%lx\"", *i, v2, v3, v4);
json_parse(&v15, v5);
block_for_eth = c4_beacon_get_block_for_eth(v25, (int)i + 88, v6, v16, v7, v8, v15, v16, v17);
if ( block_for_eth == -1 )
return (unsigned int)-1;
if ( block_for_eth == 2 )
v23 = 2;
BlockReceipts = eth_getBlockReceipts(v25, (int)i + 48, v9, v16, v10, v11, v15, v16, v17);
if ( BlockReceipts == -1 )
return (unsigned int)-1;
if ( BlockReceipts == 2 )
v23 = 2;
}
return v23;
}
|
get_receipts:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x0
LEA RDI,[RBP + -0x80]
XOR ESI,ESI
MOV EDX,0x64
CALL 0x00105110
MOV dword ptr [RBP + -0x98],0x0
LEA RAX,[RBP + -0x80]
MOV qword ptr [RBP + -0x90],RAX
MOV dword ptr [RBP + -0x88],0xffffff9c
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0xa0],RAX
LAB_00108694:
CMP qword ptr [RBP + -0xa0],0x0
JZ 0x001087b8
MOV dword ptr [RBP + -0x98],0x0
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDX,qword ptr [RAX]
LEA RDI,[RBP + -0x98]
LEA RSI,[0x15276a]
MOV AL,0x0
CALL 0x00119740
MOV RSI,RAX
LEA RDI,[RBP + -0xb8]
CALL 0x0011fd30
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0xa0]
ADD RSI,0x58
LEA RAX,[RBP + -0xb8]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010adf0
MOV dword ptr [RBP + -0xbc],EAX
CMP dword ptr [RBP + -0xbc],-0x1
JNZ 0x00108729
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001087be
LAB_00108729:
CMP dword ptr [RBP + -0xbc],0x2
JNZ 0x0010873b
MOV EAX,dword ptr [RBP + -0xbc]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0010873b:
JMP 0x0010873d
LAB_0010873d:
JMP 0x0010873f
LAB_0010873f:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0xa0]
ADD RSI,0x30
LEA RAX,[RBP + -0xb8]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010d530
MOV dword ptr [RBP + -0xc0],EAX
CMP dword ptr [RBP + -0xc0],-0x1
JNZ 0x0010878b
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001087be
LAB_0010878b:
CMP dword ptr [RBP + -0xc0],0x2
JNZ 0x0010879d
MOV EAX,dword ptr [RBP + -0xc0]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0010879d:
JMP 0x0010879f
LAB_0010879f:
JMP 0x001087a1
LAB_001087a1:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00108694
LAB_001087b8:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001087be:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xe0
POP RBP
RET
|
int4 get_receipts(int8 param_1,int8 *param_2)
{
int iVar1;
int8 uVar2;
int1 local_c0 [24];
int8 *local_a8;
int4 local_a0 [2];
int1 *local_98;
int4 local_90;
int1 local_88 [100];
int4 local_24;
int8 *local_20;
int8 local_18;
local_24 = 0;
local_20 = param_2;
local_18 = param_1;
memset(local_88,0,100);
local_98 = local_88;
local_90 = 0xffffff9c;
local_a8 = local_20;
while( true ) {
if (local_a8 == (int8 *)0x0) {
return local_24;
}
local_a0[0] = 0;
uVar2 = bprintf(local_a0,"\"0x%lx\"",*local_a8);
json_parse(local_c0,uVar2);
iVar1 = c4_beacon_get_block_for_eth(local_18,local_a8 + 0xb);
if (iVar1 == -1) break;
if (iVar1 == 2) {
local_24 = 2;
}
iVar1 = eth_getBlockReceipts(local_18,local_a8 + 6);
if (iVar1 == -1) {
return 0xffffffff;
}
if (iVar1 == 2) {
local_24 = 2;
}
local_a8 = (int8 *)local_a8[5];
}
return 0xffffffff;
}
|
|
62,110 |
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, unsigned short, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned short&)
|
msxemulator/build_O0/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp
|
inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
}
|
O0
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, unsigned short, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned short&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0x9a970
movzbl %al, %ecx
movq %rcx, 0x8(%rsp)
subb $0x9, %al
ja 0xf9a68
movq 0x8(%rsp), %rax
leaq 0x75e44(%rip), %rcx # 0x16f828
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x50(%rsp), %rdi
callq 0x9a980
movq (%rax), %rax
movw %ax, %cx
movq 0x48(%rsp), %rax
movw %cx, (%rax)
jmp 0xf9b16
movq 0x50(%rsp), %rdi
callq 0x9a9a0
movq (%rax), %rax
movw %ax, %cx
movq 0x48(%rsp), %rax
movw %cx, (%rax)
jmp 0xf9b16
movq 0x50(%rsp), %rdi
callq 0x9a9c0
cvttsd2si (%rax), %eax
movw %ax, %cx
movq 0x48(%rsp), %rax
movw %cx, (%rax)
jmp 0xf9b16
movq 0x50(%rsp), %rdi
callq 0xf6a60
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
movw %ax, %cx
movq 0x48(%rsp), %rax
movw %cx, (%rax)
jmp 0xf9b16
jmp 0xf9a68
movb $0x1, 0x13(%rsp)
movl $0x20, %edi
callq 0xf300
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
callq 0x9ac40
movq %rax, 0x20(%rsp)
leaq 0x77f34(%rip), %rsi # 0x1719c5
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x9ab90
jmp 0xf9aa2
movq (%rsp), %rdi
movq 0x50(%rsp), %rcx
movl $0x12e, %esi # imm = 0x12E
leaq 0x28(%rsp), %rdx
callq 0x9a9e0
jmp 0xf9abc
movq (%rsp), %rdi
movb $0x0, 0x13(%rsp)
leaq 0xe49ec(%rip), %rsi # 0x1de4b8
leaq -0x5ede3(%rip), %rdx # 0x9acf0
callq 0xf9a0
jmp 0xf9b25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xf9b02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0xfb10
testb $0x1, 0x13(%rsp)
jne 0xf9b0b
jmp 0xf9b14
movq (%rsp), %rdi
callq 0xf460
jmp 0xf9b1b
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0xf9e0
nopw %cs:(%rax,%rax)
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEtTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
sub rsp, 58h
mov qword ptr [rsp+58h+var_8], rdi; char
mov qword ptr [rsp+58h+var_10], rsi; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEcvNS0_6detail7value_tEEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(void)
movzx ecx, al
mov qword ptr [rsp+58h+var_50], rcx; int
sub al, 9; switch 10 cases
ja def_F99EB; jumptable 00000000000F99EB default case
mov rax, qword ptr [rsp+58h+var_50]
lea rcx, jpt_F99EB
movsxd rax, ds:(jpt_F99EB - 16F828h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_F99ED:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000F99EB case 6
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov rax, [rax]
mov cx, ax
mov rax, qword ptr [rsp+58h+var_10]
mov [rax], cx
jmp loc_F9B16
loc_F9A0A:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000F99EB case 5
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov rax, [rax]
mov cx, ax
mov rax, qword ptr [rsp+58h+var_10]
mov [rax], cx
jmp loc_F9B16
loc_F9A27:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000F99EB case 7
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
cvttsd2si eax, qword ptr [rax]
mov cx, ax
mov rax, qword ptr [rsp+58h+var_10]
mov [rax], cx
jmp loc_F9B16
loc_F9A45:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000F99EB case 4
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov al, [rax]
and al, 1
movzx eax, al
mov cx, ax
mov rax, qword ptr [rsp+58h+var_10]
mov [rax], cx
jmp loc_F9B16
loc_F9A66:
jmp short $+2; jumptable 00000000000F99EB cases 0-3,8,9
def_F99EB:
mov [rsp+58h+var_45], 1; jumptable 00000000000F99EB default case
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_58], rax; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+58h+var_38], rax; int
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+58h+var_30]
lea rdx, [rsp+58h+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* &&)
jmp short $+2
loc_F9AA2:
mov rdi, [rsp+58h+var_58]; int
mov rcx, qword ptr [rsp+58h+var_8]
mov esi, 12Eh
lea rdx, [rsp+58h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_F9ABC:
mov rdi, [rsp+58h+var_58]; void *
mov [rsp+58h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_F9B25
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_F9B02
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_F9B02:
test [rsp+arg_B], 1
jnz short loc_F9B0B
jmp short loc_F9B14
loc_F9B0B:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_F9B14:
jmp short loc_F9B1B
loc_F9B16:
add rsp, 58h
retn
loc_F9B1B:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
loc_F9B25:
nop word ptr [rax+rax+00000000h]
nop
|
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEtTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
long long a1,
long long a2)
{
__int16 v2; // cx
long long result; // rax
__int16 v4; // cx
__int16 v5; // cx
__int16 v6; // cx
void *exception; // [rsp+0h] [rbp-58h]
int v8[2]; // [rsp+20h] [rbp-38h] BYREF
_BYTE v9[32]; // [rsp+28h] [rbp-30h] BYREF
int v10[2]; // [rsp+48h] [rbp-10h]
char v11[8]; // [rsp+50h] [rbp-8h]
*(_QWORD *)v11 = a1;
*(_QWORD *)v10 = a2;
switch ( nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(a1) )
{
case 4:
v6 = *(_BYTE *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v11) & 1;
result = *(_QWORD *)v10;
**(_WORD **)v10 = v6;
break;
case 5:
v4 = *(_QWORD *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v11);
result = *(_QWORD *)v10;
**(_WORD **)v10 = v4;
break;
case 6:
v2 = *(_QWORD *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v11);
result = *(_QWORD *)v10;
**(_WORD **)v10 = v2;
break;
case 7:
v5 = (int)*(double *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v11);
result = *(_QWORD *)v10;
**(_WORD **)v10 = v5;
break;
default:
exception = __cxa_allocate_exception(0x20uLL);
*(_QWORD *)v8 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v11);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v9,
(long long)"type must be number, but is ",
(long long)v8);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
(long long)exception,
302LL,
(long long)v9,
*(long long *)v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
return result;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEtTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0019a970
MOVZX ECX,AL
MOV qword ptr [RSP + 0x8],RCX
SUB AL,0x9
JA 0x001f9a68
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x26f828]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_6:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0019a980
MOV RAX,qword ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x48]
MOV word ptr [RAX],CX
JMP 0x001f9b16
caseD_5:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0019a9a0
MOV RAX,qword ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x48]
MOV word ptr [RAX],CX
JMP 0x001f9b16
caseD_7:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0019a9c0
CVTTSD2SI EAX,qword ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x48]
MOV word ptr [RAX],CX
JMP 0x001f9b16
caseD_4:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001f6a60
MOV AL,byte ptr [RAX]
AND AL,0x1
MOVZX EAX,AL
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x48]
MOV word ptr [RAX],CX
JMP 0x001f9b16
caseD_0:
JMP 0x001f9a68
default:
MOV byte ptr [RSP + 0x13],0x1
MOV EDI,0x20
CALL 0x0010f300
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0019ac40
MOV qword ptr [RSP + 0x20],RAX
LAB_001f9a8a:
LEA RSI,[0x2719c5]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x20]
CALL 0x0019ab90
JMP 0x001f9aa2
LAB_001f9aa2:
MOV RDI,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x50]
LAB_001f9aab:
MOV ESI,0x12e
LEA RDX,[RSP + 0x28]
CALL 0x0019a9e0
JMP 0x001f9abc
LAB_001f9abc:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x13],0x0
LEA RSI,[0x2de4b8]
LEA RDX,[0x19acf0]
CALL 0x0010f9a0
LAB_001f9b16:
ADD RSP,0x58
RET
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEtTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json *param_1,ushort *param_2)
{
int1 uVar1;
int8 *puVar2;
double *pdVar3;
byte *pbVar4;
int8 uVar5;
char *local_38;
detail local_30 [32];
ushort *local_10;
basic_json *local_8;
local_10 = param_2;
local_8 = param_1;
uVar1 = nlohmann::json_abi_v3_11_3::basic_json::operator_cast_to_value_t(param_1);
switch(uVar1) {
case 0:
case 1:
case 2:
case 3:
case 8:
case 9:
default:
uVar5 = __cxa_allocate_exception(0x20);
local_38 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_8);
/* try { // try from 001f9a8a to 001f9a9f has its CatchHandler @ 001f9ada */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_30,"type must be number, but is ",&local_38);
/* try { // try from 001f9aab to 001f9ad7 has its CatchHandler @ 001f9aea */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar5,0x12e,local_30,local_8);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
case 4:
pbVar4 = (byte *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
*local_10 = (ushort)(*pbVar4 & 1);
break;
case 5:
puVar2 = (int8 *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
*local_10 = (ushort)*puVar2;
break;
case 6:
puVar2 = (int8 *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
*local_10 = (ushort)*puVar2;
break;
case 7:
pdVar3 = (double *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
*local_10 = (ushort)(int)*pdVar3;
}
return;
}
|
|
62,111 |
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>>>::emplace(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&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
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>>>::emplace(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&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%r14), %rbx
je 0x6a83f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x68d34
testb %al, %al
jne 0x6a859
addq $0x60, %rbx
jmp 0x6a824
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x6a86a
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x6a85b
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_:
push r15
push r14
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
loc_6A824:
cmp rbx, [r14+8]
jz short loc_6A83F
mov rdi, rbx
mov rsi, r12
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_6A859
add rbx, 60h ; '`'
jmp short loc_6A824
loc_6A83F:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFA0h
mov dl, 1
jmp short loc_6A85B
loc_6A859:
xor edx, edx
loc_6A85B:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long 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>>>::emplace(
unsigned __int8 **a1,
unsigned __int8 *a2,
long long a3,
__m128d a4)
{
unsigned __int8 *i; // rbx
for ( i = *a1; i != a1[1]; i += 96 )
{
if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a4) )
return (long long)i;
}
std::vector<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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,minja::Value>(
a1,
a2,
a3);
return (long long)(a1[1] - 96);
}
|
emplace:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
LAB_0016a824:
CMP RBX,qword ptr [R14 + 0x8]
JZ 0x0016a83f
MOV RDI,RBX
MOV RSI,R12
CALL 0x00168d34
TEST AL,AL
JNZ 0x0016a859
ADD RBX,0x60
JMP 0x0016a824
LAB_0016a83f:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0016a86a
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x0016a85b
LAB_0016a859:
XOR EDX,EDX
LAB_0016a85b:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* 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> >
>::emplace(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&&) */
int1 [16] __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>>>
::emplace(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,Value *param_2)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
basic_json *pbVar3;
int1 auVar4 [16];
pbVar3 = *(basic_json **)this;
do {
if (pbVar3 == *(basic_json **)(this + 8)) {
std::
vector<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>,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>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&,minja::Value>
((vector<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>,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,param_1,param_2);
pbVar3 = (basic_json *)(*(long *)(this + 8) + -0x60);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0016a85b:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = pbVar3;
return auVar4;
}
cVar1 = json_abi_v3_11_3::operator==(pbVar3,param_1);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_0016a85b;
}
pbVar3 = pbVar3 + 0x60;
} while( true );
}
|
|
62,112 |
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>>>::emplace(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&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O3
|
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>>>::emplace(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&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%rdi), %rbx
je 0x8f625
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8d950
testb %al, %al
jne 0x8f63f
addq $0x60, %rbx
cmpq 0x8(%r14), %rbx
jne 0x8f60c
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8f650
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x8f641
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_:
push r15
push r14
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
cmp rbx, [rdi+8]
jz short loc_8F625
loc_8F60C:
mov rdi, rbx
mov rsi, r12
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_8F63F
add rbx, 60h ; '`'
cmp rbx, [r14+8]
jnz short loc_8F60C
loc_8F625:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFA0h
mov dl, 1
jmp short loc_8F641
loc_8F63F:
xor edx, edx
loc_8F641:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long 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>>>::emplace(
long long a1,
unsigned __int8 *a2,
long long a3,
__m128d a4)
{
unsigned __int8 *v5; // rbx
v5 = *(unsigned __int8 **)a1;
if ( *(_QWORD *)a1 == *(_QWORD *)(a1 + 8) )
{
LABEL_4:
std::vector<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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,minja::Value>(
a1,
a2,
a3);
return *(_QWORD *)(a1 + 8) - 96LL;
}
else
{
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v5, a2, a4) )
{
v5 += 96;
if ( v5 == *(unsigned __int8 **)(a1 + 8) )
goto LABEL_4;
}
}
return (long long)v5;
}
|
emplace:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
CMP RBX,qword ptr [RDI + 0x8]
JZ 0x0018f625
LAB_0018f60c:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0018d950
TEST AL,AL
JNZ 0x0018f63f
ADD RBX,0x60
CMP RBX,qword ptr [R14 + 0x8]
JNZ 0x0018f60c
LAB_0018f625:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0018f650
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x0018f641
LAB_0018f63f:
XOR EDX,EDX
LAB_0018f641:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* 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> >
>::emplace(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&&) */
int1 [16] __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>>>
::emplace(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,Value *param_2)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
basic_json *pbVar3;
int1 auVar4 [16];
pbVar3 = *(basic_json **)this;
if (pbVar3 != *(basic_json **)(this + 8)) {
do {
cVar1 = operator==(pbVar3,param_1);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_0018f641;
}
pbVar3 = pbVar3 + 0x60;
} while (pbVar3 != *(basic_json **)(this + 8));
}
std::
vector<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>,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>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&,minja::Value>
((vector<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>,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,param_1,param_2);
pbVar3 = (basic_json *)(*(long *)(this + 8) + -0x60);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0018f641:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = pbVar3;
return auVar4;
}
|
|
62,113 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool, bool)
|
monkey531[P]llama/common/json.hpp
|
JSON_HEDLEY_WARN_UNUSED_RESULT
static basic_json parse(InputType&& i,
const parser_callback_t cb = nullptr,
const bool allow_exceptions = true,
const bool ignore_comments = false)
{
basic_json result;
parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result);
return result;
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
movl $0x1, %esi
callq 0x3dcd2
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3dcd2
movq (%r12), %r15
movq 0x8(%r12), %r12
movq %rsp, %rdi
movq %r13, %rsi
callq 0x44a5e
addq %r15, %r12
movzbl %r14b, %r8d
movzbl %bpl, %r9d
leaq 0x20(%rsp), %rdi
movq %rsp, %rcx
movq %r15, %rsi
movq %r12, %rdx
callq 0x449b2
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x44abc
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x45164
movq -0x18(%r14), %rax
testq %rax, %rax
je 0x69287
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6929e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x692e2
jmp 0x692e2
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x4505a
jmp 0x692c9
movq %rax, %r14
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x692ed
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x692ed
movq %rax, %rdi
callq 0x2aa87
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3dcd2
movq %rbx, %rdi
callq 0x4ac3e
movq %r14, %rdi
callq 0x18bb0
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov ebp, r8d
mov r14d, ecx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov byte ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov r15, [r12]
mov r12, [r12+8]
mov rdi, rsp
mov rsi, r13
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
add r12, r15
movzx r8d, r14b
movzx r9d, bpl
lea rdi, [rsp+118h+var_F8]
mov rcx, rsp
mov rsi, r15
mov rdx, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
lea rdi, [rsp+118h+var_F8]; int
mov esi, 1
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)
lea r14, [rsp+118h+var_D0]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer()
mov rax, [r14-18h]
test rax, rax
jz short loc_69287
lea rdi, [rsp+118h+var_F8]
mov rsi, rdi
mov edx, 3
call rax
loc_69287:
mov rax, [rsp+118h+var_108]
test rax, rax
jz short loc_6929E
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_6929E:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_692E2
jmp short loc_692E2
mov r14, rax
lea rdi, [rsp+118h+var_F8]
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser()
jmp short loc_692C9
mov r14, rax
loc_692C9:
mov rax, [rsp+118h+var_108]
test rax, rax
jz short loc_692ED
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_692ED
loc_692E2:
mov rdi, rax
call __clang_call_terminate
mov r14, rax
loc_692ED:
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov 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>::parse<std::string>(
long long a1,
long long *a2,
long long a3,
unsigned __int8 a4,
unsigned __int8 a5)
{
long long v8; // r15
long long v9; // r12
__int128 v11; // [rsp+0h] [rbp-118h] BYREF
void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h]
int v13[4]; // [rsp+20h] [rbp-F8h] BYREF
void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h]
_QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v8 = *a2;
v9 = a2[1];
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
&v11,
a3);
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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(
(long long)v13,
v8,
v8 + v9,
&v11,
a4,
a5);
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(
(long long)v13,
1,
(char *)a1);
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v15);
if ( v14 )
v14(v13, v13, 3LL);
if ( v12 )
v12(&v11, &v11, 3LL);
return a1;
}
|
parse<std::__cxx11::string>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV EBP,R8D
MOV R14D,ECX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV byte ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV ESI,0x1
CALL 0x0013dcd2
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0013dcd2
MOV R15,qword ptr [R12]
MOV R12,qword ptr [R12 + 0x8]
LAB_00169227:
MOV RDI,RSP
MOV RSI,R13
CALL 0x00144a5e
ADD R12,R15
LAB_00169235:
MOVZX R8D,R14B
MOVZX R9D,BPL
LEA RDI,[RSP + 0x20]
MOV RCX,RSP
MOV RSI,R15
MOV RDX,R12
CALL 0x001449b2
LAB_00169250:
LEA RDI,[RSP + 0x20]
MOV ESI,0x1
MOV RDX,RBX
CALL 0x00144abc
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00145164
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x00169287
LAB_00169278:
LEA RDI,[RSP + 0x20]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00169287:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0016929e
LAB_00169291:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0016929e:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* 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::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::parse<std::__cxx11::string >(std::__cxx11::string&&, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__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>&)>, bool, bool) */
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>
::parse<std::__cxx11::string>
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,long *param_1,function *param_3,int1 param_4,int1 param_5)
{
long lVar1;
long lVar2;
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
afStack_118 [16];
code *local_108;
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
local_f8 [16];
code *local_e8;
lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
local_d0 [160];
*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;
*(int8 *)(this + 8) = 0;
assert_invariant(SUB81(this,0));
assert_invariant(SUB81(this,0));
lVar1 = *param_1;
lVar2 = param_1[1];
/* try { // try from 00169227 to 00169231 has its CatchHandler @ 001692ea */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function(afStack_118,param_3);
/* try { // try from 00169235 to 0016924f has its CatchHandler @ 001692c6 */
parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
(local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5);
/* try { // try from 00169250 to 00169261 has its CatchHandler @ 001692b7 */
detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parse(local_f8,true,(basic_json *)this);
detail::
lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::~lexer(local_d0);
if (local_e8 != (code *)0x0) {
/* try { // try from 00169278 to 00169286 has its CatchHandler @ 001692b5 */
(*local_e8)(local_f8,local_f8,3);
}
if (local_108 != (code *)0x0) {
/* try { // try from 00169291 to 0016929d has its CatchHandler @ 001692b3 */
(*local_108)(afStack_118,afStack_118,3);
}
return this;
}
|
|
62,114 |
vec_is_equal
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/vect.h
|
static inline bool_t vec_is_equal(const void *a, const void *b, size_t num)
{
const limb_t *ap = (const limb_t *)a;
const limb_t *bp = (const limb_t *)b;
limb_t acc;
size_t i;
#ifndef __BLST_NO_ASM__
bool_t vec_is_equal_16x(const void *a, const void *b, size_t num);
if ((num & 15) == 0)
return vec_is_equal_16x(a, b, num);
#endif
num /= sizeof(limb_t);
for (acc = 0, i = 0; i < num; i++)
acc |= ap[i] ^ bp[i];
return is_zero(acc);
}
|
O2
|
c
|
vec_is_equal:
pushq %rbp
movq %rsp, %rbp
testb $0xf, %dl
je 0x52054
shrq $0x3, %rdx
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %rdx
je 0x52042
movq (%rsi,%rcx,8), %r8
xorq (%rdi,%rcx,8), %r8
orq %r8, %rax
incq %rcx
jmp 0x5202d
movq %rax, %rcx
notq %rcx
decq %rax
andq %rcx, %rax
shrq $0x3f, %rax
popq %rbp
retq
popq %rbp
jmp 0x63d00
|
vec_is_equal:
push rbp
mov rbp, rsp
test dl, 0Fh
jz short loc_52054
shr rdx, 3
xor eax, eax
xor ecx, ecx
loc_5202D:
cmp rdx, rcx
jz short loc_52042
mov r8, [rsi+rcx*8]
xor r8, [rdi+rcx*8]
or rax, r8
inc rcx
jmp short loc_5202D
loc_52042:
mov rcx, rax
not rcx
dec rax
and rax, rcx
shr rax, 3Fh
pop rbp
retn
loc_52054:
pop rbp
jmp vec_is_equal_16x
|
unsigned long long vec_is_equal(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rdx
long long v4; // rax
long long i; // rcx
if ( (a3 & 0xF) == 0 )
return vec_is_equal_16x();
v3 = a3 >> 3;
v4 = 0LL;
for ( i = 0LL; v3 != i; ++i )
v4 |= *(_QWORD *)(a1 + 8 * i) ^ *(_QWORD *)(a2 + 8 * i);
return (~v4 & (unsigned long long)(v4 - 1)) >> 63;
}
|
vec_is_equal:
PUSH RBP
MOV RBP,RSP
TEST DL,0xf
JZ 0x00152054
SHR RDX,0x3
XOR EAX,EAX
XOR ECX,ECX
LAB_0015202d:
CMP RDX,RCX
JZ 0x00152042
MOV R8,qword ptr [RSI + RCX*0x8]
XOR R8,qword ptr [RDI + RCX*0x8]
OR RAX,R8
INC RCX
JMP 0x0015202d
LAB_00152042:
MOV RCX,RAX
NOT RCX
DEC RAX
AND RAX,RCX
SHR RAX,0x3f
POP RBP
RET
LAB_00152054:
POP RBP
JMP 0x00163d00
|
ulong vec_is_equal(long param_1,long param_2,ulong param_3)
{
ulong uVar1;
ulong uVar2;
if ((param_3 & 0xf) != 0) {
uVar1 = 0;
for (uVar2 = 0; param_3 >> 3 != uVar2; uVar2 = uVar2 + 1) {
uVar1 = uVar1 | *(ulong *)(param_2 + uVar2 * 8) ^ *(ulong *)(param_1 + uVar2 * 8);
}
return (uVar1 - 1 & ~uVar1) >> 0x3f;
}
uVar1 = vec_is_equal_16x();
return uVar1;
}
|
|
62,115 |
nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()
|
ng-log[P]ng-log/src/logging.cc
|
std::unique_ptr<string> CheckOpMessageBuilder::NewString() {
*stream_ << ")";
return std::make_unique<std::string>(stream_->str());
}
|
O3
|
cpp
|
nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x13eb0(%rip), %rsi # 0x2207b
movl $0x1, %edx
callq 0x75d0
movq (%r14), %rsi
addq $0x8, %rsi
leaq 0x8(%rsp), %rdi
callq 0x7850
movl $0x20, %edi
callq 0x8e60
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
leaq 0x18(%rsp), %rdx
movq -0x10(%rdx), %rsi
cmpq %rdx, %rsi
je 0xe216
movq %rsi, (%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rax)
jmp 0xe21c
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe251
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8eac
movq %rbx, %rdi
callq 0x7930
|
_ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev:
push r14
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi]
lea rsi, aInitializelogg+1Ah; ")"
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
add rsi, 8
lea rdi, [rsp+38h+var_30]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov edi, 20h ; ' '; unsigned __int64
call _Znwm; operator new(ulong)
mov rcx, rax
add rcx, 10h
mov [rax], rcx
lea rdx, [rsp+38h+var_20]
mov rsi, [rdx-10h]
cmp rsi, rdx
jz short loc_E216
mov [rax], rsi
mov rcx, [rsp+38h+var_20]
mov [rax+10h], rcx
jmp short loc_E21C
loc_E216:
movups xmm0, xmmword ptr [rdx]
movups xmmword ptr [rcx], xmm0
loc_E21C:
mov rcx, [rsp+38h+var_28]
mov [rax+8], rcx
mov [rbx], rax
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E251
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_E251:
mov rdi, rbx
call __Unwind_Resume
|
long long * nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](long long *a1, _QWORD *a2)
{
long long v2; // rax
_QWORD v4[2]; // [rsp+8h] [rbp-30h] BYREF
__int128 v5; // [rsp+18h] [rbp-20h] BYREF
std::__ostream_insert<char,std::char_traits<char>>(*a2, ")", 1LL);
std::stringbuf::str(v4, *a2 + 8LL);
v2 = operator new(32LL);
*(_QWORD *)v2 = v2 + 16;
if ( (__int128 *)v4[0] == &v5 )
{
*(_OWORD *)(v2 + 16) = v5;
}
else
{
*(_QWORD *)v2 = v4[0];
*(_QWORD *)(v2 + 16) = v5;
}
*(_QWORD *)(v2 + 8) = v4[1];
*a1 = v2;
return a1;
}
|
NewString[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI]
LEA RSI,[0x12207b]
MOV EDX,0x1
CALL 0x001075d0
MOV RSI,qword ptr [R14]
ADD RSI,0x8
LEA RDI,[RSP + 0x8]
CALL 0x00107850
LAB_0010e1e6:
MOV EDI,0x20
CALL 0x00108e60
LAB_0010e1f0:
MOV RCX,RAX
ADD RCX,0x10
MOV qword ptr [RAX],RCX
LEA RDX,[RSP + 0x18]
MOV RSI,qword ptr [RDX + -0x10]
CMP RSI,RDX
JZ 0x0010e216
MOV qword ptr [RAX],RSI
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x0010e21c
LAB_0010e216:
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_0010e21c:
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RBX],RAX
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]() */
void nglog::internal::CheckOpMessageBuilder::NewString_abi_cxx11_(void)
{
long *plVar1;
int8 *in_RSI;
int8 *in_RDI;
long *local_30;
long local_28;
long local_20;
long lStack_18;
std::__ostream_insert<char,std::char_traits<char>>((ostream *)*in_RSI,")",1);
std::__cxx11::stringbuf::str();
/* try { // try from 0010e1e6 to 0010e1ef has its CatchHandler @ 0010e233 */
plVar1 = (long *)operator_new(0x20);
*plVar1 = (long)(plVar1 + 2);
if (local_30 == &local_20) {
plVar1[2] = local_20;
plVar1[3] = lStack_18;
}
else {
*plVar1 = (long)local_30;
plVar1[2] = local_20;
}
plVar1[1] = local_28;
*in_RDI = plVar1;
return;
}
|
|
62,116 |
ggml_opt_free
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp
|
void ggml_opt_free(ggml_opt_context_t opt_ctx) {
if (opt_ctx == nullptr) {
return;
}
ggml_backend_buffer_free(opt_ctx->buf_static);
ggml_backend_buffer_free(opt_ctx->buf_static_cpu);
ggml_free(opt_ctx->ctx_static);
ggml_free(opt_ctx->ctx_static_cpu);
delete opt_ctx;
}
|
O1
|
cpp
|
ggml_opt_free:
testq %rdi, %rdi
je 0x2b8b2
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x18d80
movq 0x40(%rbx), %rdi
callq 0x18d80
movq 0x18(%rbx), %rdi
callq 0x17270
movq 0x20(%rbx), %rdi
callq 0x17270
movl $0x1448, %esi # imm = 0x1448
movq %rbx, %rdi
popq %rbx
jmp 0x180e0
retq
|
ggml_opt_free:
test rdi, rdi
jz short locret_2B8B2
push rbx
mov rbx, rdi
mov rdi, [rdi+38h]; void *
call _ggml_backend_buffer_free
mov rdi, [rbx+40h]; void *
call _ggml_backend_buffer_free
mov rdi, [rbx+18h]
call _ggml_free
mov rdi, [rbx+20h]
call _ggml_free
mov esi, 1448h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
locret_2B8B2:
retn
|
void ggml_opt_free(void **a1)
{
if ( a1 )
{
ggml_backend_buffer_free(a1[7]);
ggml_backend_buffer_free(a1[8]);
ggml_free(a1[3]);
ggml_free(a1[4]);
operator delete(a1, 0x1448uLL);
}
}
|
ggml_opt_free:
TEST RDI,RDI
JZ 0x0012b8b2
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x38]
CALL 0x00118d80
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x00118d80
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00117270
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x00117270
MOV ESI,0x1448
MOV RDI,RBX
POP RBX
JMP 0x001180e0
LAB_0012b8b2:
RET
|
void ggml_opt_free(void *param_1)
{
if (param_1 != (void *)0x0) {
ggml_backend_buffer_free(*(int8 *)((long)param_1 + 0x38));
ggml_backend_buffer_free(*(int8 *)((long)param_1 + 0x40));
ggml_free(*(int8 *)((long)param_1 + 0x18));
ggml_free(*(int8 *)((long)param_1 + 0x20));
operator_delete(param_1,0x1448);
return;
}
return;
}
|
|
62,117 |
ggml_opt_free
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp
|
void ggml_opt_free(ggml_opt_context_t opt_ctx) {
if (opt_ctx == nullptr) {
return;
}
ggml_backend_buffer_free(opt_ctx->buf_static);
ggml_backend_buffer_free(opt_ctx->buf_static_cpu);
ggml_free(opt_ctx->ctx_static);
ggml_free(opt_ctx->ctx_static_cpu);
delete opt_ctx;
}
|
O2
|
cpp
|
ggml_opt_free:
testq %rdi, %rdi
je 0x2f911
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x1fa90
movq 0x40(%rbx), %rdi
callq 0x1fa90
movq 0x18(%rbx), %rdi
callq 0x1d420
movq 0x20(%rbx), %rdi
callq 0x1d420
movl $0x1448, %esi # imm = 0x1448
movq %rbx, %rdi
popq %rbx
jmp 0x1e850
retq
|
ggml_opt_free:
test rdi, rdi
jz short locret_2F911
push rbx
mov rbx, rdi
mov rdi, [rdi+38h]; void *
call _ggml_backend_buffer_free
mov rdi, [rbx+40h]; void *
call _ggml_backend_buffer_free
mov rdi, [rbx+18h]
call _ggml_free
mov rdi, [rbx+20h]
call _ggml_free
mov esi, 1448h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
locret_2F911:
retn
|
void ggml_opt_free(void *a1, long long a2)
{
if ( a1 )
{
ggml_backend_buffer_free(*((void **)a1 + 7));
ggml_backend_buffer_free(*((void **)a1 + 8));
ggml_free(*((_QWORD *)a1 + 3), a2);
ggml_free(*((_QWORD *)a1 + 4), a2);
operator delete(a1, 0x1448uLL);
}
}
|
ggml_opt_free:
TEST RDI,RDI
JZ 0x0012f911
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x38]
CALL 0x0011fa90
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x0011fa90
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d420
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x0011d420
MOV ESI,0x1448
MOV RDI,RBX
POP RBX
JMP 0x0011e850
LAB_0012f911:
RET
|
void ggml_opt_free(void *param_1)
{
if (param_1 != (void *)0x0) {
ggml_backend_buffer_free(*(int8 *)((long)param_1 + 0x38));
ggml_backend_buffer_free(*(int8 *)((long)param_1 + 0x40));
ggml_free(*(int8 *)((long)param_1 + 0x18));
ggml_free(*(int8 *)((long)param_1 + 0x20));
operator_delete(param_1,0x1448);
return;
}
return;
}
|
|
62,118 |
ggml_opt_free
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp
|
void ggml_opt_free(ggml_opt_context_t opt_ctx) {
if (opt_ctx == nullptr) {
return;
}
ggml_backend_buffer_free(opt_ctx->buf_static);
ggml_backend_buffer_free(opt_ctx->buf_static_cpu);
ggml_free(opt_ctx->ctx_static);
ggml_free(opt_ctx->ctx_static_cpu);
delete opt_ctx;
}
|
O3
|
cpp
|
ggml_opt_free:
testq %rdi, %rdi
je 0x2a327
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x17d70
movq 0x40(%rbx), %rdi
callq 0x17d70
movq 0x18(%rbx), %rdi
callq 0x16270
movq 0x20(%rbx), %rdi
callq 0x16270
movl $0x1448, %esi # imm = 0x1448
movq %rbx, %rdi
popq %rbx
jmp 0x170d0
retq
|
ggml_opt_free:
test rdi, rdi
jz short locret_2A327
push rbx
mov rbx, rdi
mov rdi, [rdi+38h]; void *
call _ggml_backend_buffer_free
mov rdi, [rbx+40h]; void *
call _ggml_backend_buffer_free
mov rdi, [rbx+18h]
call _ggml_free
mov rdi, [rbx+20h]
call _ggml_free
mov esi, 1448h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
locret_2A327:
retn
|
void ggml_opt_free(void **a1)
{
if ( a1 )
{
ggml_backend_buffer_free(a1[7]);
ggml_backend_buffer_free(a1[8]);
ggml_free(a1[3]);
ggml_free(a1[4]);
operator delete(a1, 0x1448uLL);
}
}
|
ggml_opt_free:
TEST RDI,RDI
JZ 0x0012a327
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x38]
CALL 0x00117d70
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x00117d70
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00116270
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x00116270
MOV ESI,0x1448
MOV RDI,RBX
POP RBX
JMP 0x001170d0
LAB_0012a327:
RET
|
void ggml_opt_free(void *param_1)
{
if (param_1 != (void *)0x0) {
ggml_backend_buffer_free(*(int8 *)((long)param_1 + 0x38));
ggml_backend_buffer_free(*(int8 *)((long)param_1 + 0x40));
ggml_free(*(int8 *)((long)param_1 + 0x18));
ggml_free(*(int8 *)((long)param_1 + 0x20));
operator_delete(param_1,0x1448);
return;
}
return;
}
|
|
62,119 |
del
|
eloqsql/storage/myisam/mi_delete.c
|
static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key,
uchar *anc_buff, my_off_t leaf_page, uchar *leaf_buff,
uchar *keypos, /* Pos to where deleted key was */
my_off_t next_block,
uchar *ret_key) /* key before keypos in anc_buff */
{
int ret_value,length;
uint a_length,nod_flag,tmp;
my_off_t next_page;
uchar keybuff[HA_MAX_KEY_BUFF],*endpos,*next_buff,*key_start, *prev_key;
MYISAM_SHARE *share=info->s;
MI_KEY_PARAM s_temp;
DBUG_ENTER("del");
DBUG_PRINT("enter",("leaf_page: %lld keypos: %p", leaf_page,
keypos));
DBUG_DUMP("leaf_buff",(uchar*) leaf_buff,mi_getint(leaf_buff));
endpos=leaf_buff+mi_getint(leaf_buff);
if (!(key_start=_mi_get_last_key(info,keyinfo,leaf_buff,keybuff,endpos,
&tmp)))
DBUG_RETURN(-1);
if ((nod_flag=mi_test_if_nod(leaf_buff)))
{
next_page= _mi_kpos(nod_flag,endpos);
if (!(next_buff= (uchar*) my_alloca((uint) keyinfo->block_length+
HA_MAX_KEY_BUFF*2)))
DBUG_RETURN(-1);
if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,next_buff,0))
ret_value= -1;
else
{
DBUG_DUMP("next_page",(uchar*) next_buff,mi_getint(next_buff));
if ((ret_value=del(info,keyinfo,key,anc_buff,next_page,next_buff,
keypos,next_block,ret_key)) >0)
{
endpos=leaf_buff+mi_getint(leaf_buff);
if (ret_value == 1)
{
ret_value=underflow(info,keyinfo,leaf_buff,next_page,
next_buff,endpos);
if (ret_value == 0 && mi_getint(leaf_buff) > keyinfo->block_length)
{
ret_value=_mi_split_page(info,keyinfo,key,leaf_buff,ret_key,0) | 2;
}
}
else
{
DBUG_PRINT("test",("Inserting of key when deleting"));
if (!_mi_get_last_key(info,keyinfo,leaf_buff,keybuff,endpos,
&tmp))
goto err;
ret_value=_mi_insert(info,keyinfo,key,leaf_buff,endpos,keybuff,
(uchar*) 0,(uchar*) 0,(my_off_t) 0,0);
}
}
if (_mi_write_keypage(info,keyinfo,leaf_page,DFLT_INIT_HITS,leaf_buff))
goto err;
}
my_afree((uchar*) next_buff);
DBUG_RETURN(ret_value);
}
/* Remove last key from leaf page */
mi_putint(leaf_buff,key_start-leaf_buff,nod_flag);
if (_mi_write_keypage(info,keyinfo,leaf_page,DFLT_INIT_HITS,leaf_buff))
goto err;
/* Place last key in ancestor page on deleted key position */
a_length=mi_getint(anc_buff);
endpos=anc_buff+a_length;
if (keypos != anc_buff+2+share->base.key_reflength &&
!_mi_get_last_key(info,keyinfo,anc_buff,ret_key,keypos,&tmp))
goto err;
prev_key=(keypos == anc_buff+2+share->base.key_reflength ?
0 : ret_key);
length=(*keyinfo->pack_key)(keyinfo,share->base.key_reflength,
keypos == endpos ? (uchar*) 0 : keypos,
prev_key, prev_key,
keybuff,&s_temp);
if (length > 0)
bmove_upp((uchar*) endpos+length,(uchar*) endpos,(uint) (endpos-keypos));
else
bmove(keypos,keypos-length, (int) (endpos-keypos)+length);
(*keyinfo->store_key)(keyinfo,keypos,&s_temp);
/* Save pointer to next leaf */
if (!(*keyinfo->get_key)(keyinfo,share->base.key_reflength,&keypos,ret_key))
goto err;
_mi_kpointer(info,keypos - share->base.key_reflength,next_block);
mi_putint(anc_buff,a_length+length,share->base.key_reflength);
DBUG_RETURN( mi_getint(leaf_buff) <=
(info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH :
(uint) keyinfo->underflow_block_length));
err:
DBUG_RETURN(-1);
}
|
O3
|
c
|
del:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x538, %rsp # imm = 0x538
movq %r9, %r14
movq %r8, -0x518(%rbp)
movq %rcx, -0x510(%rbp)
movq %rdx, -0x520(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rbp), %rax
movq %rax, -0x500(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq %rax, -0x4f8(%rbp)
movzbl 0x1(%r9), %eax
movzbl (%r9), %r12d
andl $0x7f, %r12d
shll $0x8, %r12d
orq %rax, %r12
addq %r9, %r12
leaq -0x4f0(%rbp), %rcx
leaq -0x504(%rbp), %r9
movq %r14, %rdx
movq %r12, %r8
callq 0x86a6e
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x7690e
cmpb $0x0, (%r14)
js 0x76933
subl %r14d, %eax
rolw $0x8, %ax
movw %ax, (%r14)
movq %r15, %rdi
movq %rbx, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x84cb0
testl %eax, %eax
je 0x76a50
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x76c9a
movl %r13d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rcx
movl 0x17c(%rcx), %edi
testl %edi, %edi
je 0x768db
movq %r12, %rsi
callq 0x8557e
movq %rax, %rdx
movzwl 0xe(%rbx), %eax
movq %rsp, %r12
addl $0x97f, %eax # imm = 0x97F
andl $-0x10, %eax
subq %rax, %r12
movq %r12, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq %rdx, -0x4f8(%rbp)
movl $0x3, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x84c04
testq %rax, %rax
je 0x7690e
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq -0x520(%rbp), %rdx
movq -0x510(%rbp), %rcx
movq -0x4f8(%rbp), %r8
movq %r12, %r9
pushq 0x20(%rbp)
pushq 0x18(%rbp)
pushq -0x500(%rbp)
callq 0x76846
addq $0x20, %rsp
movl %eax, %r13d
testl %eax, %eax
jle 0x76c73
movzbl 0x1(%r14), %eax
movzbl (%r14), %r10d
andl $0x7f, %r10d
shll $0x8, %r10d
orq %rax, %r10
addq %r14, %r10
cmpl $0x1, %r13d
jne 0x76c06
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq -0x4f8(%rbp), %rcx
movq %r12, %r8
movq %r10, %r9
callq 0x76c9f
testl %eax, %eax
jne 0x76c70
movzbl 0x1(%r14), %eax
movzbl (%r14), %ecx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzwl 0xe(%rbx), %eax
xorl %r13d, %r13d
cmpl %eax, %ecx
jbe 0x76c73
movq %r15, %rdi
movq %rbx, %rsi
movq -0x520(%rbp), %rdx
movq %r14, %rcx
movq 0x20(%rbp), %r8
xorl %r9d, %r9d
callq 0x8a13e
movl %eax, %r13d
orl $0x2, %r13d
jmp 0x76c73
movq -0x510(%rbp), %rcx
movzbl 0x1(%rcx), %r12d
movzbl (%rcx), %edi
movq -0x4f8(%rbp), %rax
movl 0x17c(%rax), %esi
leaq (%rcx,%rsi), %rax
addq $0x2, %rax
movq -0x500(%rbp), %r8
cmpq %r8, %rax
je 0x76ac3
movq %rdi, %r13
leaq -0x504(%rbp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movq %rcx, %rdx
movq 0x20(%rbp), %rcx
callq 0x86a6e
testq %rax, %rax
je 0x76908
movq -0x4f8(%rbp), %rax
movl 0x17c(%rax), %esi
movq -0x510(%rbp), %rcx
movq -0x500(%rbp), %r8
movq %r13, %rdi
andl $0x7f, %edi
shll $0x8, %edi
orl %r12d, %edi
leaq 0x2(%rcx), %rax
addq %rsi, %rax
xorl %edx, %edx
cmpq %r8, %rax
movq %rcx, %rax
movq 0x20(%rbp), %rcx
cmoveq %rdx, %rcx
movq %rdi, -0x518(%rbp)
leaq (%rax,%rdi), %r12
cmpq %r8, %r12
cmovneq %r8, %rdx
subq $0x8, %rsp
leaq -0x560(%rbp), %rax
leaq -0x4f0(%rbp), %r9
movq %rbx, %rdi
movq %rcx, %r8
pushq %rax
callq *0x50(%rbx)
addq $0x10, %rsp
movl %eax, %r13d
testl %eax, %eax
jle 0x76b35
movl %r13d, %edi
addq %r12, %rdi
movl %r12d, %edx
subl -0x500(%rbp), %edx
movq %r12, %rsi
callq 0xabc04
jmp 0x76b53
movslq %r13d, %rax
movq -0x500(%rbp), %rdi
movq %rdi, %rsi
subq %rax, %rsi
subl %edi, %r12d
addl %r13d, %r12d
movslq %r12d, %rdx
callq 0x29120
leaq -0x560(%rbp), %rdx
movq %rbx, %rdi
movq -0x500(%rbp), %rsi
callq *0x58(%rbx)
movq -0x4f8(%rbp), %rax
movl 0x17c(%rax), %esi
leaq 0x10(%rbp), %rdx
movq %rbx, %rdi
movq 0x20(%rbp), %rcx
callq *0x48(%rbx)
testl %eax, %eax
je 0x76908
movq 0x10(%rbp), %rsi
movq -0x4f8(%rbp), %r12
movl 0x17c(%r12), %eax
subq %rax, %rsi
movq %r15, %rdi
movq 0x18(%rbp), %rdx
callq 0x860e9
xorl %eax, %eax
cmpl $0x0, 0x17c(%r12)
setne %al
shll $0xf, %eax
addl -0x518(%rbp), %r13d
addl %r13d, %eax
movq -0x510(%rbp), %rcx
movb %r13b, 0x1(%rcx)
movb %ah, (%rcx)
movzbl 0x1(%r14), %ecx
movzbl (%r14), %eax
andl $0x7f, %eax
shll $0x8, %eax
orl %ecx, %eax
movl $0x32, %ecx
cmpb $0x0, 0x33b(%r15)
jne 0x76bf8
movzwl 0x10(%rbx), %ecx
xorl %r13d, %r13d
cmpl %ecx, %eax
setbe %r13b
jmp 0x7690e
leaq -0x4f0(%rbp), %rcx
leaq -0x504(%rbp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r10, %r12
movq %r10, %r8
callq 0x86a6e
testq %rax, %rax
je 0x76908
subq $0x20, %rsp
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
leaq -0x4f0(%rbp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movq -0x520(%rbp), %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x897f7
addq $0x20, %rsp
movl %eax, %r13d
movq %r15, %rdi
movq %rbx, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x84cb0
testl %eax, %eax
jne 0x76908
jmp 0x7690e
callq 0x29270
|
del_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 538h
mov r14, r9
mov [rbp+var_518], r8
mov [rbp+var_510], rcx
mov [rbp+var_520], rdx
mov rbx, rsi
mov r15, rdi
mov rax, [rbp+arg_0]
mov [rbp+var_500], rax
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov [rbp+var_4F8], rax
movzx eax, byte ptr [r9+1]
movzx r12d, byte ptr [r9]
and r12d, 7Fh
shl r12d, 8
or r12, rax
add r12, r9
lea rcx, [rbp+var_4F0]
lea r9, [rbp+var_504]
mov rdx, r14
mov r8, r12
call _mi_get_last_key
mov r13d, 0FFFFFFFFh
test rax, rax
jz short loc_7690E
cmp byte ptr [r14], 0
js short loc_76933
loc_768DB:
sub eax, r14d
rol ax, 8
mov [r14], ax
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r14
call _mi_write_keypage
test eax, eax
jz loc_76A50
loc_76908:
mov r13d, 0FFFFFFFFh
loc_7690E:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_76C9A
mov eax, r13d
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_76933:
mov rcx, [r15]
mov edi, [rcx+17Ch]
test edi, edi
jz short loc_768DB
mov rsi, r12
call _mi_kpos
mov rdx, rax
movzx eax, word ptr [rbx+0Eh]
mov r12, rsp
add eax, 97Fh
and eax, 0FFFFFFF0h
sub r12, rax
mov rsp, r12
mov rdi, r15
mov rsi, rbx
mov [rbp+var_4F8], rdx
mov ecx, 3
mov r8, r12
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz short loc_7690E
sub rsp, 8
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_520]
mov rcx, [rbp+var_510]
mov r8, [rbp+var_4F8]
mov r9, r12
push [rbp+arg_10]
push [rbp+arg_8]
push [rbp+var_500]
call del_0
add rsp, 20h
mov r13d, eax
test eax, eax
jle loc_76C73
movzx eax, byte ptr [r14+1]
movzx r10d, byte ptr [r14]
and r10d, 7Fh
shl r10d, 8
or r10, rax
add r10, r14
cmp r13d, 1
jnz loc_76C06
mov rdi, r15
mov rsi, rbx
mov rdx, r14
mov rcx, [rbp+var_4F8]
mov r8, r12
mov r9, r10
call underflow_0
test eax, eax
jnz loc_76C70
movzx eax, byte ptr [r14+1]
movzx ecx, byte ptr [r14]
and ecx, 7Fh
shl ecx, 8
or ecx, eax
movzx eax, word ptr [rbx+0Eh]
xor r13d, r13d
cmp ecx, eax
jbe loc_76C73
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_520]
mov rcx, r14
mov r8, [rbp+arg_10]
xor r9d, r9d
call _mi_split_page
mov r13d, eax
or r13d, 2
jmp loc_76C73
loc_76A50:
mov rcx, [rbp+var_510]
movzx r12d, byte ptr [rcx+1]
movzx edi, byte ptr [rcx]
mov rax, [rbp+var_4F8]
mov esi, [rax+17Ch]
lea rax, [rcx+rsi]
add rax, 2
mov r8, [rbp+var_500]
cmp rax, r8
jz short loc_76AC3
mov r13, rdi
lea r9, [rbp+var_504]
mov rdi, r15
mov rsi, rbx
mov rdx, rcx
mov rcx, [rbp+arg_10]
call _mi_get_last_key
test rax, rax
jz loc_76908
mov rax, [rbp+var_4F8]
mov esi, [rax+17Ch]
mov rcx, [rbp+var_510]
mov r8, [rbp+var_500]
mov rdi, r13
loc_76AC3:
and edi, 7Fh
shl edi, 8
or edi, r12d
lea rax, [rcx+2]
add rax, rsi
xor edx, edx
cmp rax, r8
mov rax, rcx
mov rcx, [rbp+arg_10]
cmovz rcx, rdx
mov [rbp+var_518], rdi
lea r12, [rax+rdi]
cmp r12, r8
cmovnz rdx, r8
sub rsp, 8
lea rax, [rbp+var_560]
lea r9, [rbp+var_4F0]
mov rdi, rbx
mov r8, rcx
push rax
call qword ptr [rbx+50h]
add rsp, 10h
mov r13d, eax
test eax, eax
jle short loc_76B35
mov edi, r13d
add rdi, r12
mov edx, r12d
sub edx, dword ptr [rbp+var_500]
mov rsi, r12
call bmove_upp
jmp short loc_76B53
loc_76B35:
movsxd rax, r13d
mov rdi, [rbp+var_500]
mov rsi, rdi
sub rsi, rax
sub r12d, edi
add r12d, r13d
movsxd rdx, r12d
call _memmove
loc_76B53:
lea rdx, [rbp+var_560]
mov rdi, rbx
mov rsi, [rbp+var_500]
call qword ptr [rbx+58h]
mov rax, [rbp+var_4F8]
mov esi, [rax+17Ch]
lea rdx, [rbp+arg_0]
mov rdi, rbx
mov rcx, [rbp+arg_10]
call qword ptr [rbx+48h]
test eax, eax
jz loc_76908
mov rsi, [rbp+arg_0]
mov r12, [rbp+var_4F8]
mov eax, [r12+17Ch]
sub rsi, rax
mov rdi, r15
mov rdx, [rbp+arg_8]
call _mi_kpointer
xor eax, eax
cmp dword ptr [r12+17Ch], 0
setnz al
shl eax, 0Fh
add r13d, dword ptr [rbp+var_518]
add eax, r13d
mov rcx, [rbp+var_510]
mov [rcx+1], r13b
mov [rcx], ah
movzx ecx, byte ptr [r14+1]
movzx eax, byte ptr [r14]
and eax, 7Fh
shl eax, 8
or eax, ecx
mov ecx, 32h ; '2'
cmp byte ptr [r15+33Bh], 0
jnz short loc_76BF8
movzx ecx, word ptr [rbx+10h]
loc_76BF8:
xor r13d, r13d
cmp eax, ecx
setbe r13b
jmp loc_7690E
loc_76C06:
lea rcx, [rbp+var_4F0]
lea r9, [rbp+var_504]
mov rdi, r15
mov rsi, rbx
mov rdx, r14
mov r12, r10
mov r8, r10
call _mi_get_last_key
test rax, rax
jz loc_76908
sub rsp, 20h
xorps xmm0, xmm0
movups [rsp+580h+var_580], xmm0
mov [rsp+580h+var_568], 0
mov [rsp+580h+var_570], 0
lea r9, [rbp+var_4F0]
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_520]
mov rcx, r14
mov r8, r12
call _mi_insert
add rsp, 20h
loc_76C70:
mov r13d, eax
loc_76C73:
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r14
call _mi_write_keypage
test eax, eax
jnz loc_76908
jmp loc_7690E
loc_76C9A:
call ___stack_chk_fail
|
long long del_0(
_BYTE *a1,
long long a2,
long long a3,
_BYTE *a4,
long long a5,
char *a6,
_BYTE *a7,
long long a8,
long long a9)
{
char *v12; // r12
long long last_key; // rax
unsigned int v14; // r13d
long long v16; // rdi
long long v17; // rax
_BYTE *v18; // r12
long long v19; // rax
unsigned int v20; // eax
_BYTE *v21; // rcx
int v22; // r12d
char v23; // di
long long v24; // rsi
long long v25; // r8
char v26; // r13
long long v27; // rdi
long long v28; // rdx
bool v29; // zf
_BYTE *v30; // rax
long long v31; // rcx
_BYTE *v32; // r12
int v33; // eax
__int16 v34; // r13
long long v35; // r12
bool v36; // al
__int16 v37; // r13
_BYTE *v38; // rcx
unsigned int v39; // ecx
int v40; // r12d
_BYTE v41[64]; // [rsp+20h] [rbp-560h] BYREF
long long v42; // [rsp+60h] [rbp-520h]
long long v43; // [rsp+68h] [rbp-518h]
_BYTE *v44; // [rsp+70h] [rbp-510h]
_BYTE v45[4]; // [rsp+7Ch] [rbp-504h] BYREF
_BYTE *v46; // [rsp+80h] [rbp-500h]
long long v47; // [rsp+88h] [rbp-4F8h]
_BYTE v48[1216]; // [rsp+90h] [rbp-4F0h] BYREF
unsigned long long v49; // [rsp+550h] [rbp-30h]
v43 = a5;
v44 = a4;
v42 = a3;
v46 = a7;
v49 = __readfsqword(0x28u);
v47 = *(_QWORD *)a1;
v12 = &a6[(unsigned __int8)a6[1] | (unsigned long long)((unsigned __int8)(*a6 & 0x7F) << 8)];
last_key = mi_get_last_key(a1, a2, a6, v48, v12, v45);
v14 = -1;
if ( last_key )
{
if ( *a6 < 0 )
{
v16 = *(unsigned int *)(*(_QWORD *)a1 + 380LL);
if ( (_DWORD)v16 )
{
v17 = mi_kpos(v16, v12);
v18 = &v41[-((*(unsigned __int16 *)(a2 + 14) + 2431) & 0xFFFFFFF0)];
v47 = v17;
if ( !mi_fetch_keypage(a1, a2, v17, 3LL, v18, 0LL) )
return v14;
v14 = del_0((_DWORD)a1, a2, v42, (_DWORD)v44, v47, (_DWORD)v18, (long long)v46, a8, a9);
if ( (int)v14 <= 0 )
goto LABEL_30;
v19 = (unsigned __int8)a6[1];
if ( v14 == 1 )
{
v20 = underflow_0(a1, a2, a6, v47, v18, &a6[v19 | ((unsigned __int8)(*a6 & 0x7F) << 8)]);
if ( !v20 )
{
v14 = 0;
if ( ((unsigned __int8)a6[1] | ((unsigned __int8)(*a6 & 0x7F) << 8)) > (unsigned int)*(unsigned __int16 *)(a2 + 14) )
v14 = mi_split_page(a1, a2, v42, a6, a9, 0LL) | 2;
LABEL_30:
if ( !(unsigned int)mi_write_keypage(a1, a2, v43, 3LL, a6) )
return v14;
return (unsigned int)-1;
}
LABEL_29:
v14 = v20;
goto LABEL_30;
}
v40 = (_DWORD)a6 + (v19 | ((*a6 & 0x7F) << 8));
if ( mi_get_last_key(a1, a2, a6, v48, &a6[v19 | ((unsigned __int8)(*a6 & 0x7F) << 8)], v45) )
{
v20 = mi_insert((_DWORD)a1, a2, v42, (_DWORD)a6, v40, (unsigned int)v48, 0LL, 0LL, 0LL, 0);
goto LABEL_29;
}
return (unsigned int)-1;
}
}
*(_WORD *)a6 = __ROL2__(last_key - (_WORD)a6, 8);
if ( (unsigned int)mi_write_keypage(a1, a2, v43, 3LL, a6) )
return (unsigned int)-1;
v21 = v44;
v22 = (unsigned __int8)v44[1];
v23 = *v44;
v24 = *(unsigned int *)(v47 + 380);
v25 = (long long)v46;
if ( &v44[v24 + 2] != v46 )
{
v26 = *v44;
if ( !mi_get_last_key(a1, a2, v44, a9, v46, v45) )
return (unsigned int)-1;
v24 = *(unsigned int *)(v47 + 380);
v21 = v44;
v25 = (long long)v46;
v23 = v26;
}
v27 = v22 | ((unsigned __int8)(v23 & 0x7F) << 8);
v28 = 0LL;
v29 = &v21[v24 + 2] == (_BYTE *)v25;
v30 = v21;
v31 = a9;
if ( v29 )
v31 = 0LL;
v43 = v27;
v32 = &v30[v27];
if ( &v30[v27] != (_BYTE *)v25 )
v28 = v25;
v33 = (*(long long ( **)(long long, long long, long long, long long, long long, _BYTE *, _BYTE *))(a2 + 80))(
a2,
v24,
v28,
v31,
v31,
v48,
v41);
v34 = v33;
if ( v33 <= 0 )
memmove(v46, &v46[-v33], v33 + (int)v32 - (int)v46);
else
bmove_upp(&v32[v33], v32);
(*(void ( **)(long long, _BYTE *, _BYTE *))(a2 + 88))(a2, v46, v41);
if ( !(*(unsigned int ( **)(long long, _QWORD, _BYTE **, long long))(a2 + 72))(
a2,
*(unsigned int *)(v47 + 380),
&a7,
a9) )
return (unsigned int)-1;
v35 = v47;
mi_kpointer(a1, &a7[-*(unsigned int *)(v47 + 380)], a8);
v36 = *(_DWORD *)(v35 + 380) != 0;
v37 = v43 + v34;
v38 = v44;
v44[1] = v37;
*v38 = (unsigned __int16)(v37 + (v36 << 15)) >> 8;
v39 = 50;
if ( !a1[827] )
v39 = *(unsigned __int16 *)(a2 + 16);
return ((unsigned __int8)a6[1] | ((unsigned __int8)(*a6 & 0x7F) << 8)) <= v39;
}
return v14;
}
|
del:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x538
MOV R14,R9
MOV qword ptr [RBP + -0x518],R8
MOV qword ptr [RBP + -0x510],RCX
MOV qword ptr [RBP + -0x520],RDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x500],RAX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RBP + -0x4f8],RAX
MOVZX EAX,byte ptr [R9 + 0x1]
MOVZX R12D,byte ptr [R9]
AND R12D,0x7f
SHL R12D,0x8
OR R12,RAX
ADD R12,R9
LEA RCX,[RBP + -0x4f0]
LEA R9,[RBP + -0x504]
MOV RDX,R14
MOV R8,R12
CALL 0x00186a6e
MOV R13D,0xffffffff
TEST RAX,RAX
JZ 0x0017690e
CMP byte ptr [R14],0x0
JS 0x00176933
LAB_001768db:
SUB EAX,R14D
ROL AX,0x8
MOV word ptr [R14],AX
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R14
CALL 0x00184cb0
TEST EAX,EAX
JZ 0x00176a50
LAB_00176908:
MOV R13D,0xffffffff
LAB_0017690e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00176c9a
MOV EAX,R13D
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00176933:
MOV RCX,qword ptr [R15]
MOV EDI,dword ptr [RCX + 0x17c]
TEST EDI,EDI
JZ 0x001768db
MOV RSI,R12
CALL 0x0018557e
MOV RDX,RAX
MOVZX EAX,word ptr [RBX + 0xe]
MOV R12,RSP
ADD EAX,0x97f
AND EAX,0xfffffff0
SUB R12,RAX
MOV RSP,R12
MOV RDI,R15
MOV RSI,RBX
MOV qword ptr [RBP + -0x4f8],RDX
MOV ECX,0x3
MOV R8,R12
XOR R9D,R9D
CALL 0x00184c04
TEST RAX,RAX
JZ 0x0017690e
SUB RSP,0x8
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x520]
MOV RCX,qword ptr [RBP + -0x510]
MOV R8,qword ptr [RBP + -0x4f8]
MOV R9,R12
PUSH qword ptr [RBP + 0x20]
PUSH qword ptr [RBP + 0x18]
PUSH qword ptr [RBP + -0x500]
CALL 0x00176846
ADD RSP,0x20
MOV R13D,EAX
TEST EAX,EAX
JLE 0x00176c73
MOVZX EAX,byte ptr [R14 + 0x1]
MOVZX R10D,byte ptr [R14]
AND R10D,0x7f
SHL R10D,0x8
OR R10,RAX
ADD R10,R14
CMP R13D,0x1
JNZ 0x00176c06
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
MOV RCX,qword ptr [RBP + -0x4f8]
MOV R8,R12
MOV R9,R10
CALL 0x00176c9f
TEST EAX,EAX
JNZ 0x00176c70
MOVZX EAX,byte ptr [R14 + 0x1]
MOVZX ECX,byte ptr [R14]
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EAX
MOVZX EAX,word ptr [RBX + 0xe]
XOR R13D,R13D
CMP ECX,EAX
JBE 0x00176c73
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x520]
MOV RCX,R14
MOV R8,qword ptr [RBP + 0x20]
XOR R9D,R9D
CALL 0x0018a13e
MOV R13D,EAX
OR R13D,0x2
JMP 0x00176c73
LAB_00176a50:
MOV RCX,qword ptr [RBP + -0x510]
MOVZX R12D,byte ptr [RCX + 0x1]
MOVZX EDI,byte ptr [RCX]
MOV RAX,qword ptr [RBP + -0x4f8]
MOV ESI,dword ptr [RAX + 0x17c]
LEA RAX,[RCX + RSI*0x1]
ADD RAX,0x2
MOV R8,qword ptr [RBP + -0x500]
CMP RAX,R8
JZ 0x00176ac3
MOV R13,RDI
LEA R9,[RBP + -0x504]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,RCX
MOV RCX,qword ptr [RBP + 0x20]
CALL 0x00186a6e
TEST RAX,RAX
JZ 0x00176908
MOV RAX,qword ptr [RBP + -0x4f8]
MOV ESI,dword ptr [RAX + 0x17c]
MOV RCX,qword ptr [RBP + -0x510]
MOV R8,qword ptr [RBP + -0x500]
MOV RDI,R13
LAB_00176ac3:
AND EDI,0x7f
SHL EDI,0x8
OR EDI,R12D
LEA RAX,[RCX + 0x2]
ADD RAX,RSI
XOR EDX,EDX
CMP RAX,R8
MOV RAX,RCX
MOV RCX,qword ptr [RBP + 0x20]
CMOVZ RCX,RDX
MOV qword ptr [RBP + -0x518],RDI
LEA R12,[RAX + RDI*0x1]
CMP R12,R8
CMOVNZ RDX,R8
SUB RSP,0x8
LEA RAX,[RBP + -0x560]
LEA R9,[RBP + -0x4f0]
MOV RDI,RBX
MOV R8,RCX
PUSH RAX
CALL qword ptr [RBX + 0x50]
ADD RSP,0x10
MOV R13D,EAX
TEST EAX,EAX
JLE 0x00176b35
MOV EDI,R13D
ADD RDI,R12
MOV EDX,R12D
SUB EDX,dword ptr [RBP + -0x500]
MOV RSI,R12
CALL 0x001abc04
JMP 0x00176b53
LAB_00176b35:
MOVSXD RAX,R13D
MOV RDI,qword ptr [RBP + -0x500]
MOV RSI,RDI
SUB RSI,RAX
SUB R12D,EDI
ADD R12D,R13D
MOVSXD RDX,R12D
CALL 0x00129120
LAB_00176b53:
LEA RDX,[RBP + -0x560]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x500]
CALL qword ptr [RBX + 0x58]
MOV RAX,qword ptr [RBP + -0x4f8]
MOV ESI,dword ptr [RAX + 0x17c]
LEA RDX,[RBP + 0x10]
MOV RDI,RBX
MOV RCX,qword ptr [RBP + 0x20]
CALL qword ptr [RBX + 0x48]
TEST EAX,EAX
JZ 0x00176908
MOV RSI,qword ptr [RBP + 0x10]
MOV R12,qword ptr [RBP + -0x4f8]
MOV EAX,dword ptr [R12 + 0x17c]
SUB RSI,RAX
MOV RDI,R15
MOV RDX,qword ptr [RBP + 0x18]
CALL 0x001860e9
XOR EAX,EAX
CMP dword ptr [R12 + 0x17c],0x0
SETNZ AL
SHL EAX,0xf
ADD R13D,dword ptr [RBP + -0x518]
ADD EAX,R13D
MOV RCX,qword ptr [RBP + -0x510]
MOV byte ptr [RCX + 0x1],R13B
MOV byte ptr [RCX],AH
MOVZX ECX,byte ptr [R14 + 0x1]
MOVZX EAX,byte ptr [R14]
AND EAX,0x7f
SHL EAX,0x8
OR EAX,ECX
MOV ECX,0x32
CMP byte ptr [R15 + 0x33b],0x0
JNZ 0x00176bf8
MOVZX ECX,word ptr [RBX + 0x10]
LAB_00176bf8:
XOR R13D,R13D
CMP EAX,ECX
SETBE R13B
JMP 0x0017690e
LAB_00176c06:
LEA RCX,[RBP + -0x4f0]
LEA R9,[RBP + -0x504]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
MOV R12,R10
MOV R8,R10
CALL 0x00186a6e
TEST RAX,RAX
JZ 0x00176908
SUB RSP,0x20
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x10],0x0
LEA R9,[RBP + -0x4f0]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x520]
MOV RCX,R14
MOV R8,R12
CALL 0x001897f7
ADD RSP,0x20
LAB_00176c70:
MOV R13D,EAX
LAB_00176c73:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R14
CALL 0x00184cb0
TEST EAX,EAX
JNZ 0x00176908
JMP 0x0017690e
LAB_00176c9a:
CALL 0x00129270
|
uint del(long *param_1,long param_2,int8 param_3,byte *param_4,ulong param_5,ushort *param_6,
byte *param_7,int8 param_8,byte *param_9)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
int8 uVar4;
ushort uVar5;
int iVar6;
uint uVar7;
long lVar8;
long lVar9;
long lVar10;
byte *pbVar11;
int1 *puVar12;
ulong uVar13;
byte *pbVar14;
long in_FS_OFFSET;
int1 *apuStack_590 [4];
int8 uStack_570;
int1 local_568 [64];
int8 local_528;
ulong local_520;
byte *local_518;
int1 local_50c [4];
byte *local_508;
long local_500;
int1 local_4f8 [1216];
long local_38;
local_508 = param_7;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_500 = *param_1;
pbVar14 = (byte *)(((ulong)(((byte)*param_6 & 0x7f) << 8) | (ulong)*(byte *)((long)param_6 + 1)) +
(long)param_6);
uStack_570 = 0x1768ca;
local_528 = param_3;
local_520 = param_5;
local_518 = param_4;
lVar8 = _mi_get_last_key(param_1,param_2,param_6,local_4f8,pbVar14,local_50c);
uVar7 = 0xffffffff;
puVar12 = local_568;
if (lVar8 == 0) goto LAB_0017690e;
if (((char)(byte)*param_6 < '\0') && (*(int *)(*param_1 + 0x17c) != 0)) {
uStack_570 = 0x176948;
lVar9 = _mi_kpos(*(int *)(*param_1 + 0x17c),pbVar14);
lVar8 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x97f & 0xfffffff0);
puVar12 = local_568 + lVar8;
local_500 = lVar9;
*(int8 *)(local_568 + lVar8 + -8) = 0x17697d;
lVar10 = _mi_fetch_keypage(param_1,param_2,lVar9,3,puVar12,0);
lVar9 = local_500;
pbVar14 = local_518;
uVar4 = local_528;
if (lVar10 == 0) goto LAB_0017690e;
*(byte **)((long)apuStack_590 + lVar8 + 0x18) = param_9;
*(int8 *)((long)apuStack_590 + lVar8 + 0x10) = param_8;
*(byte **)((long)apuStack_590 + lVar8 + 8) = local_508;
*(int8 *)((long)apuStack_590 + lVar8) = 0x1769b5;
uVar7 = del(param_1,param_2,uVar4,pbVar14,lVar9,puVar12);
lVar9 = local_500;
if (0 < (int)uVar7) {
pbVar14 = (byte *)(((ulong)(((byte)*param_6 & 0x7f) << 8) |
(ulong)*(byte *)((long)param_6 + 1)) + (long)param_6);
if (uVar7 == 1) {
*(int8 *)(local_568 + lVar8 + -8) = 0x176a00;
uVar7 = underflow(param_1,param_2,param_6,lVar9,puVar12,pbVar14);
uVar4 = local_528;
if ((uVar7 == 0) &&
(uVar7 = 0,
(uint)*(ushort *)(param_2 + 0xe) <
(((byte)*param_6 & 0x7f) << 8 | (uint)*(byte *)((long)param_6 + 1)))) {
*(int8 *)(local_568 + lVar8 + -8) = 0x176a44;
uVar7 = _mi_split_page(param_1,param_2,uVar4,param_6,param_9,0);
uVar7 = uVar7 | 2;
}
}
else {
*(int8 *)(local_568 + lVar8 + -8) = 0x176c28;
lVar9 = _mi_get_last_key(param_1,param_2,param_6,local_4f8,pbVar14,local_50c);
if (lVar9 == 0) goto LAB_00176908;
*(int8 *)((long)apuStack_590 + lVar8 + 8) = 0;
*(int8 *)((long)apuStack_590 + lVar8 + 0x10) = 0;
*(int4 *)(local_568 + lVar8 + -8) = 0;
*(int8 *)((long)apuStack_590 + lVar8 + 0x18) = 0;
uVar4 = local_528;
*(int8 *)((long)apuStack_590 + lVar8) = 0x176c6c;
uVar7 = _mi_insert(param_1,param_2,uVar4,param_6,pbVar14,local_4f8);
}
}
uVar13 = local_520;
*(int8 *)(local_568 + lVar8 + -8) = 0x176c8d;
iVar6 = _mi_write_keypage(param_1,param_2,uVar13,3,param_6);
if (iVar6 == 0) goto LAB_0017690e;
}
else {
uVar5 = (short)lVar8 - (short)param_6;
*param_6 = uVar5 * 0x100 | uVar5 >> 8;
uStack_570 = 0x176900;
iVar6 = _mi_write_keypage(param_1,param_2,local_520,3,param_6);
puVar12 = local_568;
if (iVar6 == 0) {
bVar2 = local_518[1];
bVar3 = *local_518;
uVar13 = (ulong)*(uint *)(local_500 + 0x17c);
if (local_518 + uVar13 + 2 != local_508) {
uStack_570 = 0x176a9c;
lVar8 = _mi_get_last_key(param_1,param_2,local_518,param_9,local_508,local_50c);
puVar12 = local_568;
if (lVar8 == 0) goto LAB_00176908;
uVar13 = (ulong)*(uint *)(local_500 + 0x17c);
}
local_520 = (ulong)((bVar3 & 0x7f) << 8 | (uint)bVar2);
pbVar14 = param_9;
if (local_518 + uVar13 + 2 == local_508) {
pbVar14 = (byte *)0x0;
}
pbVar1 = local_518 + local_520;
pbVar11 = (byte *)0x0;
if (pbVar1 != local_508) {
pbVar11 = local_508;
}
apuStack_590[3] = local_568;
apuStack_590[2] = (int1 *)0x176b11;
uVar7 = (**(code **)(param_2 + 0x50))(param_2,uVar13,pbVar11,pbVar14,pbVar14,local_4f8);
if ((int)uVar7 < 1) {
uStack_570 = 0x176b53;
memmove(local_508,local_508 + -(long)(int)uVar7,
(long)(int)(((int)pbVar1 - (int)local_508) + uVar7));
}
else {
uStack_570 = 0x176b33;
bmove_upp(pbVar1 + uVar7,pbVar1,(int)pbVar1 - (int)local_508);
}
uStack_570 = 0x176b67;
(**(code **)(param_2 + 0x58))(param_2,local_508,local_568);
uStack_570 = 0x176b82;
iVar6 = (**(code **)(param_2 + 0x48))
(param_2,*(int4 *)(local_500 + 0x17c),¶m_7,param_9);
lVar8 = local_500;
puVar12 = local_568;
if (iVar6 != 0) {
uStack_570 = 0x176bac;
_mi_kpointer(param_1,(long)param_7 - (ulong)*(uint *)(local_500 + 0x17c),param_8);
iVar6 = *(int *)(lVar8 + 0x17c);
local_518[1] = (byte)(uVar7 + (int)local_520);
*local_518 = (byte)((uint)(iVar6 != 0) * 0x8000 + uVar7 + (int)local_520 >> 8);
uVar7 = 0x32;
if (*(char *)((long)param_1 + 0x33b) == '\0') {
uVar7 = (uint)*(ushort *)(param_2 + 0x10);
}
uVar7 = (uint)((((byte)*param_6 & 0x7f) << 8 | (uint)*(byte *)((long)param_6 + 1)) <= uVar7)
;
puVar12 = local_568;
goto LAB_0017690e;
}
}
}
LAB_00176908:
uVar7 = 0xffffffff;
LAB_0017690e:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)(puVar12 + -8) = underflow;
__stack_chk_fail();
}
return uVar7;
}
|
|
62,120 |
TerminalSupportsColor()
|
ng-log[P]ng-log/src/logging.cc
|
static bool TerminalSupportsColor() {
bool term_supports_color = false;
#ifdef NGLOG_OS_WINDOWS
// on Windows TERM variable is usually not set, but the console does
// support colors.
term_supports_color = true;
#else
// On non-Windows platforms, we rely on the TERM variable.
const char* const term = getenv("TERM");
if (term != nullptr && term[0] != '\0') {
term_supports_color =
!strcmp(term, "xterm") || !strcmp(term, "xterm-color") ||
!strcmp(term, "xterm-256color") || !strcmp(term, "screen-256color") ||
!strcmp(term, "konsole") || !strcmp(term, "konsole-16color") ||
!strcmp(term, "konsole-256color") || !strcmp(term, "screen") ||
!strcmp(term, "linux") || !strcmp(term, "cygwin");
}
#endif
return term_supports_color;
}
|
O0
|
cpp
|
TerminalSupportsColor():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb $0x0, -0x1(%rbp)
leaq 0x418c0(%rip), %rdi # 0x51233
callq 0x98d0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xfaca
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xfaca
movq -0x10(%rbp), %rdi
leaq 0x40398(%rip), %rsi # 0x4fd3a
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x4037e(%rip), %rsi # 0x4fd40
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x4036a(%rip), %rsi # 0x4fd4c
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x40359(%rip), %rsi # 0x4fd5b
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x40349(%rip), %rsi # 0x4fd6b
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x40331(%rip), %rsi # 0x4fd73
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x40325(%rip), %rsi # 0x4fd83
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x4031a(%rip), %rsi # 0x4fd94
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x40305(%rip), %rsi # 0x4fd9b
callq 0x9a50
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfac2
movq -0x10(%rbp), %rdi
leaq 0x402ef(%rip), %rsi # 0x4fda1
callq 0x9a50
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL21TerminalSupportsColorv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_1], 0
lea rdi, aSigterm+3; "TERM"
call _getenv
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz loc_FACA
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_FACA
mov rdi, [rbp+var_10]
lea rsi, aXterm; "xterm"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aXtermColor; "xterm-color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aXterm256color; "xterm-256color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aScreen256color; "screen-256color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aKonsole; "konsole"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aKonsole16color; "konsole-16color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aKonsole256colo; "konsole-256color"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aScreen; "screen"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aLinux; "linux"
call _strcmp
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_FAC2
mov rdi, [rbp+var_10]
lea rsi, aCygwin; "cygwin"
call _strcmp
cmp eax, 0
setnz al
xor al, 0FFh
mov [rbp+var_11], al
loc_FAC2:
mov al, [rbp+var_11]
and al, 1
mov [rbp+var_1], al
loc_FACA:
mov al, [rbp+var_1]
and al, 1
add rsp, 20h
pop rbp
retn
|
char TerminalSupportsColor(void)
{
char v1; // [rsp+Fh] [rbp-11h]
_BYTE *v2; // [rsp+10h] [rbp-10h]
char v3; // [rsp+1Fh] [rbp-1h]
v3 = 0;
v2 = (_BYTE *)getenv("TERM");
if ( v2 && *v2 )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "xterm") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "xterm-color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "xterm-256color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "screen-256color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "konsole") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "konsole-16color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "konsole-256color") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "screen") )
{
v1 = 1;
if ( (unsigned int)strcmp(v2, "linux") )
v1 = ~((unsigned int)strcmp(v2, "cygwin") != 0);
}
}
}
}
}
}
}
}
return v1 & 1;
}
return v3;
}
|
TerminalSupportsColor:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV byte ptr [RBP + -0x1],0x0
LEA RDI,[0x151233]
CALL 0x001098d0
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010faca
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0010faca
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd3a]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd40]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd4c]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd5b]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd6b]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd73]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd83]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd94]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fd9b]
CALL 0x00109a50
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0010fac2
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14fda1]
CALL 0x00109a50
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x11],AL
LAB_0010fac2:
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0010faca:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* TerminalSupportsColor() */
byte TerminalSupportsColor(void)
{
int iVar1;
char *__s1;
byte local_19;
byte local_9;
local_9 = 0;
__s1 = getenv("TERM");
if ((__s1 != (char *)0x0) && (*__s1 != '\0')) {
iVar1 = strcmp(__s1,"xterm");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"xterm-color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"xterm-256color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"screen-256color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"konsole");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"konsole-16color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"konsole-256color");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"screen");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"linux");
local_19 = 1;
if (iVar1 != 0) {
iVar1 = strcmp(__s1,"cygwin");
local_19 = iVar1 != 0 ^ 0xff;
}
}
}
}
}
}
}
}
}
local_9 = local_19 & 1;
}
return local_9;
}
|
|
62,121 |
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
SetNode(const Location & location, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v)
: TemplateNode(location), ns(ns), var_names(vns), value(std::move(v)) {}
|
O1
|
cpp
|
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
leaq 0x6b14b(%rip), %r13 # 0xee148
addq $0x10, %r13
movq %r13, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x8302d
movq 0x6bf71(%rip), %rcx # 0xeef90
cmpb $0x0, (%rcx)
je 0x83029
incl 0x8(%rax)
jmp 0x8302d
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x6b47c(%rip), %rax # 0xee4b8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %rbp
movq %rbp, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2887a
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0x36e58
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movups (%r14), %xmm0
movq %rax, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r12), %rdi
cmpq %rbp, %rdi
je 0x830ae
movq (%rbp), %rsi
incq %rsi
callq 0x196b0
jmp 0x830ae
movq %rax, %r14
movq %r13, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x830bf
callq 0x42d00
movq %r14, %rdi
callq 0x19be0
nop
|
_ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov rbx, rdi
lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r13, 10h
mov [rdi], r13
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_8302D
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_83029
inc dword ptr [rax+8]
jmp short loc_8302D
loc_83029:
lock inc dword ptr [rax+8]
loc_8302D:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode
add rax, 10h
mov [rbx], rax
lea r12, [rbx+20h]
lea rbp, [rbx+30h]
mov [rbx+20h], rbp
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rbx+40h]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
xor eax, eax
mov [rbx+60h], rax
movups xmm0, xmmword ptr [r14]
mov [r14+8], rax
movups xmmword ptr [rbx+58h], xmm0
mov [r14], rax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [r12]; void *
cmp rdi, rbp
jz short loc_830AE
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_830AE
mov r14, rax
loc_830AE:
mov [rbx], r13
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_830BF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_830BF:
mov rdi, r14
call __Unwind_Resume
|
long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, _QWORD *a4, __int128 *a5)
{
long long v7; // rax
long long result; // rax
__int128 v9; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v7 = a2[1];
*(_QWORD *)(a1 + 16) = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v7 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v7 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SetNode + 2;
*(_QWORD *)(a1 + 32) = a1 + 48;
std::string::_M_construct<char *>((_QWORD *)(a1 + 32), *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
std::vector<std::string>::vector(a1 + 64, a4);
result = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v9 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v9;
*(_QWORD *)a5 = 0LL;
return result;
}
|
SetNode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV RBX,RDI
LEA R13,[0x1ee148]
ADD R13,0x10
MOV qword ptr [RDI],R13
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0018302d
MOV RCX,qword ptr [0x001eef90]
CMP byte ptr [RCX],0x0
JZ 0x00183029
INC dword ptr [RAX + 0x8]
JMP 0x0018302d
LAB_00183029:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018302d:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1ee4b8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA R12,[RBX + 0x20]
LEA RBP,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RBP
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_00183059:
MOV RDI,R12
CALL 0x0012887a
LEA RDI,[RBX + 0x40]
LAB_00183065:
MOV RSI,R15
CALL 0x00136e58
LAB_0018306d:
XOR EAX,EAX
MOV qword ptr [RBX + 0x60],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [R14],RAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SetNode::SetNode
(SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_001ee158;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001eef90 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_001ee4c8;
*(SetNode **)(this + 0x20) = this + 0x30;
/* try { // try from 00183059 to 00183060 has its CatchHandler @ 001830ab */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
/* try { // try from 00183065 to 0018306c has its CatchHandler @ 00183091 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40),
param_3);
*(int8 *)(this + 0x60) = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_4;
*(int8 *)(this + 0x60) = uVar2;
*(int8 *)param_4 = 0;
return;
}
|
|
62,122 |
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
SetNode(const Location & location, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v)
: TemplateNode(location), ns(ns), var_names(vns), value(std::move(v)) {}
|
O2
|
cpp
|
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rdi, %rbx
callq 0x6ef5e
leaq 0x69f37(%rip), %rax # 0xdb4c8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x21960
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0x35ebc
andq $0x0, 0x60(%rbx)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
andq $0x0, (%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r12, %rdi
callq 0x21dc8
jmp 0x715e3
movq %rax, %r14
movq %rbx, %rdi
callq 0x7357c
movq %r14, %rdi
callq 0x21be0
nop
|
_ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE:
push r15
push r14
push r13
push r12
push rbx
mov r14, r8
mov r15, rcx
mov r13, rdx
mov rbx, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode
add rax, 10h
mov [rbx], rax
lea r12, [rbx+20h]
mov rdi, r12
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea rdi, [rbx+40h]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
and qword ptr [rbx+60h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [rbx+58h], xmm0
and qword ptr [r14], 0
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_715E3
mov r14, rax
loc_715E3:
mov rdi, rbx; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
mov rdi, r14
call __Unwind_Resume
|
long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, _QWORD *a4, __int128 *a5)
{
long long result; // rax
__int128 v8; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::SetNode + 2;
std::string::basic_string(a1 + 32);
result = std::vector<std::string>::vector((_QWORD *)(a1 + 64), a4);
*(_QWORD *)(a1 + 96) = 0LL;
v8 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v8;
*(_QWORD *)a5 = 0LL;
return result;
}
|
SetNode:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,R8
MOV R15,RCX
MOV R13,RDX
MOV RBX,RDI
CALL 0x0016ef5e
LEA RAX,[0x1db4c8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA R12,[RBX + 0x20]
LAB_0017159c:
MOV RDI,R12
MOV RSI,R13
CALL 0x00121960
LEA RDI,[RBX + 0x40]
LAB_001715ab:
MOV RSI,R15
CALL 0x00135ebc
LAB_001715b3:
AND qword ptr [RBX + 0x60],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
AND qword ptr [R14],0x0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SetNode::SetNode
(SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001db4d8;
/* try { // try from 0017159c to 001715a6 has its CatchHandler @ 001715e0 */
std::__cxx11::string::string((string *)(this + 0x20),param_2);
/* try { // try from 001715ab to 001715b2 has its CatchHandler @ 001715d3 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40),
param_3);
*(int8 *)(this + 0x60) = 0;
uVar1 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_4;
*(int8 *)(this + 0x60) = uVar1;
*(int8 *)param_4 = 0;
return;
}
|
|
62,123 |
my_strcasecmp_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static
int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res;
/*
Scan a multibyte character.
In the future it is worth to write a special version of my_utf8mb3_uni()
for 0-terminated strings which will not take in account length. Now
we call the regular version of my_utf8mb3_uni() with s+3 in the
last argument. s+3 is enough to scan any multibyte sequence.
Calling the regular version of my_utf8mb3_uni is safe for 0-terminated
strings: we will never lose the end of the string:
If we have 0 character in the middle of a multibyte sequence,
then my_utf8mb3_uni will always return a negative number, so the
loop with finish.
*/
res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
/* Convert Unicode code into weight according to collation */
my_tolower_utf8mb3(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res=my_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3);
if (res <= 0)
return strcmp(s, t);
t+= res;
/* Convert code into weight */
my_tolower_utf8mb3(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int)(uchar)s[0]) - ((int) (uchar) t[0]);
}
|
O0
|
c
|
my_strcasecmp_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x6f241
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x6f24d
jmp 0x6f386
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x6f287
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2fd835(%rip), %rax # 0x36caa0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6f2dc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq $0x3, %rcx
leaq -0x30(%rbp), %rsi
callq 0x6d8d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0x6f2be
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x25450
movl %eax, -0x4(%rbp)
jmp 0x6f399
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6eba0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x6f316
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2fd7a6(%rip), %rax # 0x36caa0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x6f368
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x3, %rcx
leaq -0x38(%rbp), %rsi
callq 0x6d8d0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x6f34a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x25450
movl %eax, -0x4(%rbp)
jmp 0x6f399
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6eba0
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x6f381
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x6f399
jmp 0x6f220
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strcasecmp_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov [rbp+var_28], rax
loc_6F220:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_6F241
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_6F241:
mov al, [rbp+var_41]
test al, 1
jnz short loc_6F24D
jmp loc_6F386
loc_6F24D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_6F287
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_6F2DC
loc_6F287:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_18]
add rcx, 3
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jg short loc_6F2BE
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_6F399
loc_6F2BE:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb3
loc_6F2DC:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_6F316
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_6F368
loc_6F316:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_20]
add rcx, 3
lea rsi, [rbp+var_38]
call my_utf8mb3_uni
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_6F34A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_6F399
loc_6F34A:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_38]
call my_tolower_utf8mb3
loc_6F368:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_6F381
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_6F399
loc_6F381:
jmp loc_6F220
loc_6F386:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_4], eax
loc_6F399:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long my_strcasecmp_utf8mb3(long long a1, _BYTE *a2, _BYTE *a3, long long a4, long long a5, long long a6)
{
bool v7; // [rsp+Fh] [rbp-41h]
int v8; // [rsp+10h] [rbp-40h]
int v9; // [rsp+14h] [rbp-3Ch]
long long v10; // [rsp+18h] [rbp-38h] BYREF
long long v11; // [rsp+20h] [rbp-30h] BYREF
long long v12; // [rsp+28h] [rbp-28h]
_BYTE *v13; // [rsp+30h] [rbp-20h]
_BYTE *v14; // [rsp+38h] [rbp-18h]
long long v15; // [rsp+40h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( *v14 )
v7 = *v13 != 0;
if ( !v7 )
break;
if ( (unsigned __int8)*v14 >= 0x80u )
{
v9 = my_utf8mb3_uni(v15, (long long)&v11, (long long)v14, (long long)(v14 + 3), a5, a6);
if ( v9 <= 0 )
return (unsigned int)strcmp(v14, v13);
v14 += v9;
my_tolower_utf8mb3(v12, &v11);
}
else
{
v11 = my_unicase_default_page00[3 * (unsigned __int8)*v14++ + 1];
}
if ( (unsigned __int8)*v13 >= 0x80u )
{
v8 = my_utf8mb3_uni(v15, (long long)&v10, (long long)v13, (long long)(v13 + 3), a5, a6);
if ( v8 <= 0 )
return (unsigned int)strcmp(v14, v13);
v13 += v8;
my_tolower_utf8mb3(v12, &v10);
}
else
{
v10 = my_unicase_default_page00[3 * (unsigned __int8)*v13++ + 1];
}
if ( v11 != v10 )
return (unsigned int)(v11 - v10);
}
return (unsigned int)((unsigned __int8)*v14 - (unsigned __int8)*v13);
}
|
my_strcasecmp_utf8mb3:
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 RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x28],RAX
LAB_0016f220:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x0016f241
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_0016f241:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0016f24d
JMP 0x0016f386
LAB_0016f24d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x0016f287
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x46caa0]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016f2dc
LAB_0016f287:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x3
LEA RSI,[RBP + -0x30]
CALL 0x0016d8d0
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x0016f2be
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00125450
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016f399
LAB_0016f2be:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x0016eba0
LAB_0016f2dc:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x0016f316
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x46caa0]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016f368
LAB_0016f316:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x3
LEA RSI,[RBP + -0x38]
CALL 0x0016d8d0
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x0016f34a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00125450
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016f399
LAB_0016f34a:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x38]
CALL 0x0016eba0
LAB_0016f368:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x0016f381
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016f399
LAB_0016f381:
JMP 0x0016f220
LAB_0016f386:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_0016f399:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3)
{
int iVar1;
bool bVar2;
ulong local_40;
ulong local_38;
int8 local_30;
byte *local_28;
byte *local_20;
long local_18;
local_30 = *(int8 *)(param_1 + 0x78);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
bVar2 = false;
if (*local_20 != 0) {
bVar2 = *local_28 != 0;
}
if (!bVar2) {
return (uint)*local_20 - (uint)*local_28;
}
if (*local_20 < 0x80) {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4);
local_20 = local_20 + 1;
}
else {
iVar1 = my_utf8mb3_uni(local_18,&local_38,local_20,local_20 + 3);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_20 = local_20 + iVar1;
my_tolower_utf8mb3(local_30,&local_38);
}
if (*local_28 < 0x80) {
local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4);
local_28 = local_28 + 1;
}
else {
iVar1 = my_utf8mb3_uni(local_18,&local_40,local_28,local_28 + 3);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_28 = local_28 + iVar1;
my_tolower_utf8mb3(local_30,&local_40);
}
} while (local_38 == local_40);
return (int)local_38 - (int)local_40;
}
|
|
62,124 |
my_strcasecmp_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static
int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res;
/*
Scan a multibyte character.
In the future it is worth to write a special version of my_utf8mb3_uni()
for 0-terminated strings which will not take in account length. Now
we call the regular version of my_utf8mb3_uni() with s+3 in the
last argument. s+3 is enough to scan any multibyte sequence.
Calling the regular version of my_utf8mb3_uni is safe for 0-terminated
strings: we will never lose the end of the string:
If we have 0 character in the middle of a multibyte sequence,
then my_utf8mb3_uni will always return a negative number, so the
loop with finish.
*/
res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
/* Convert Unicode code into weight according to collation */
my_tolower_utf8mb3(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res=my_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3);
if (res <= 0)
return strcmp(s, t);
t+= res;
/* Convert code into weight */
my_tolower_utf8mb3(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int)(uchar)s[0]) - ((int) (uchar) t[0]);
}
|
O3
|
c
|
my_strcasecmp_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movb (%rsi), %al
testb %al, %al
je 0x55064
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x2f48e7(%rip), %r12 # 0x349880
cmpb $0x0, (%r13)
je 0x5505f
testb %al, %al
js 0x54fbd
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %ebx
movq %rbx, -0x30(%rbp)
incq %r14
jmp 0x54ffd
leaq 0x3(%r14), %rcx
leaq -0x30(%rbp), %rsi
movq %r14, %rdx
callq 0x53b13
testl %eax, %eax
jle 0x55082
movl %eax, %eax
addq %rax, %r14
movq 0x8(%r15), %rax
movq -0x30(%rbp), %rbx
movzbl %bh, %ecx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x54ffd
movzbl %bl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %ebx
movq %rbx, -0x30(%rbp)
movsbq (%r13), %rax
testq %rax, %rax
js 0x55015
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %r13
jmp 0x5504d
leaq 0x3(%r13), %rcx
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x53b13
testl %eax, %eax
jle 0x55082
movl %eax, %eax
addq %rax, %r13
movq 0x8(%r15), %rcx
movq -0x38(%rbp), %rax
movzbl %ah, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x5504d
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %rbx
jne 0x5507e
movb (%r14), %al
testb %al, %al
jne 0x54f99
xorl %eax, %eax
movzbl %al, %ebx
jmp 0x55066
xorl %ebx, %ebx
movzbl (%r13), %eax
subl %eax, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %eax, %ebx
jmp 0x5506d
movq %r14, %rdi
movq %r13, %rsi
callq 0x24490
movl %eax, %ebx
jmp 0x5506d
|
my_strcasecmp_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rdx
mov al, [rsi]
test al, al
jz loc_55064
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_54F99:
cmp byte ptr [r13+0], 0
jz loc_5505F
test al, al
js short loc_54FBD
movzx eax, al
lea rax, [rax+rax*2]
mov ebx, [r12+rax*4+4]
mov [rbp+var_30], rbx
inc r14
jmp short loc_54FFD
loc_54FBD:
lea rcx, [r14+3]
lea rsi, [rbp+var_30]
mov rdx, r14
call my_utf8mb3_uni
test eax, eax
jle loc_55082
mov eax, eax
add r14, rax
mov rax, [r15+8]
mov rbx, [rbp+var_30]
movzx ecx, bh
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_54FFD
movzx ecx, bl
lea rcx, [rcx+rcx*2]
mov ebx, [rax+rcx*4+4]
mov [rbp+var_30], rbx
loc_54FFD:
movsx rax, byte ptr [r13+0]
test rax, rax
js short loc_55015
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc r13
jmp short loc_5504D
loc_55015:
lea rcx, [r13+3]
lea rsi, [rbp+var_38]
mov rdx, r13
call my_utf8mb3_uni
test eax, eax
jle short loc_55082
mov eax, eax
add r13, rax
mov rcx, [r15+8]
mov rax, [rbp+var_38]
movzx edx, ah
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_5504D
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_5504D:
cmp rbx, rax
jnz short loc_5507E
mov al, [r14]
test al, al
jnz loc_54F99
xor eax, eax
loc_5505F:
movzx ebx, al
jmp short loc_55066
loc_55064:
xor ebx, ebx
loc_55066:
movzx eax, byte ptr [r13+0]
sub ebx, eax
loc_5506D:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5507E:
sub ebx, eax
jmp short loc_5506D
loc_55082:
mov rdi, r14
mov rsi, r13
call _strcmp
mov ebx, eax
jmp short loc_5506D
|
long long my_strcasecmp_utf8mb3(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // al
unsigned __int8 *v5; // r14
long long v6; // r15
unsigned long long v7; // rbx
int v8; // eax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
int v12; // eax
long long v13; // rcx
int v14; // ebx
unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v18; // [rsp+10h] [rbp-30h] BYREF
v4 = *a2;
if ( *a2 )
{
v5 = a2;
v6 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
if ( !*a3 )
goto LABEL_17;
if ( (v4 & 0x80u) != 0 )
{
v8 = my_utf8mb3_uni(a1, &v18, v5, (unsigned long long)(v5 + 3));
if ( v8 <= 0 )
return (unsigned int)strcmp(v5, a3);
v5 += (unsigned int)v8;
v7 = v18;
v9 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v18));
if ( v9 )
{
v7 = *(unsigned int *)(v9 + 12LL * (unsigned __int8)v18 + 4);
v18 = v7;
}
}
else
{
v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1];
v18 = v7;
++v5;
}
v10 = (char)*a3;
if ( v10 < 0 )
{
v12 = my_utf8mb3_uni(a1, &v17, a3, (unsigned long long)(a3 + 3));
if ( v12 <= 0 )
return (unsigned int)strcmp(v5, a3);
a3 += (unsigned int)v12;
v11 = v17;
v13 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v17));
if ( v13 )
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4);
}
else
{
v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1];
++a3;
}
if ( v7 != v11 )
return (unsigned int)(v7 - v11);
v4 = *v5;
if ( !*v5 )
{
v4 = 0;
LABEL_17:
v14 = v4;
return (unsigned int)(v14 - *a3);
}
}
}
v14 = 0;
return (unsigned int)(v14 - *a3);
}
|
my_strcasecmp_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RDX
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x00155064
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x449880]
LAB_00154f99:
CMP byte ptr [R13],0x0
JZ 0x0015505f
TEST AL,AL
JS 0x00154fbd
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EBX,dword ptr [R12 + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RBX
INC R14
JMP 0x00154ffd
LAB_00154fbd:
LEA RCX,[R14 + 0x3]
LEA RSI,[RBP + -0x30]
MOV RDX,R14
CALL 0x00153b13
TEST EAX,EAX
JLE 0x00155082
MOV EAX,EAX
ADD R14,RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV RBX,qword ptr [RBP + -0x30]
MOVZX ECX,BH
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x00154ffd
MOVZX ECX,BL
LEA RCX,[RCX + RCX*0x2]
MOV EBX,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RBX
LAB_00154ffd:
MOVSX RAX,byte ptr [R13]
TEST RAX,RAX
JS 0x00155015
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC R13
JMP 0x0015504d
LAB_00155015:
LEA RCX,[R13 + 0x3]
LEA RSI,[RBP + -0x38]
MOV RDX,R13
CALL 0x00153b13
TEST EAX,EAX
JLE 0x00155082
MOV EAX,EAX
ADD R13,RAX
MOV RCX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EDX,AH
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x0015504d
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_0015504d:
CMP RBX,RAX
JNZ 0x0015507e
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x00154f99
XOR EAX,EAX
LAB_0015505f:
MOVZX EBX,AL
JMP 0x00155066
LAB_00155064:
XOR EBX,EBX
LAB_00155066:
MOVZX EAX,byte ptr [R13]
SUB EBX,EAX
LAB_0015506d:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015507e:
SUB EBX,EAX
JMP 0x0015506d
LAB_00155082:
MOV RDI,R14
MOV RSI,R13
CALL 0x00124490
MOV EBX,EAX
JMP 0x0015506d
|
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
byte bVar3;
uint uVar4;
int iVar5;
ulong uVar6;
ulong local_40;
ulong local_38;
bVar3 = *param_2;
if (bVar3 == 0) {
uVar4 = 0;
}
else {
lVar1 = *(long *)(param_1 + 0x78);
do {
if (*param_3 == 0) goto LAB_0015505f;
if ((char)bVar3 < '\0') {
uVar4 = my_utf8mb3_uni();
if ((int)uVar4 < 1) goto LAB_00155082;
param_2 = param_2 + uVar4;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar2 != 0) {
local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc);
}
}
else {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar3 * 0xc + 4);
param_2 = param_2 + 1;
}
bVar3 = *param_3;
if ((long)(char)bVar3 < 0) {
uVar4 = my_utf8mb3_uni();
if ((int)uVar4 < 1) {
LAB_00155082:
iVar5 = strcmp((char *)param_2,(char *)param_3);
return iVar5;
}
param_3 = param_3 + uVar4;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8);
uVar6 = local_40;
if (lVar2 != 0) {
uVar6 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
}
else {
param_3 = param_3 + 1;
uVar6 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar3 * 0xc + 4);
}
if (local_38 != uVar6) {
return (int)local_38 - (int)uVar6;
}
bVar3 = *param_2;
} while (bVar3 != 0);
bVar3 = 0;
LAB_0015505f:
uVar4 = (uint)bVar3;
}
return uVar4 - *param_3;
}
|
|
62,125 |
bf_log
|
bluesky950520[P]quickjs/libbf.c
|
int bf_log(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
assert(r != a);
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
if (a->sign) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set_inf(r, 0);
return 0;
}
} else {
bf_set_inf(r, 1);
return 0;
}
}
if (a->sign) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
}
bf_init(s, T);
bf_set_ui(T, 1);
if (bf_cmp_eq(a, T)) {
bf_set_zero(r, 0);
bf_delete(T);
return 0;
}
bf_delete(T);
return bf_ziv_rounding(r, a, prec, flags, bf_log_internal, NULL);
}
|
O0
|
c
|
bf_log:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movl %ecx, 0x44(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xed756
movq 0x50(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
jne 0xed6ea
movq 0x58(%rsp), %rdi
callq 0xe4ee0
movl $0x0, 0x64(%rsp)
jmp 0xed7fc
movq 0x50(%rsp), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, 0x10(%rax)
jne 0xed73a
movq 0x50(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0xed721
movq 0x58(%rsp), %rdi
callq 0xe4ee0
movl $0x1, 0x64(%rsp)
jmp 0xed7fc
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0xe4fc0
movl $0x0, 0x64(%rsp)
jmp 0xed7fc
movq 0x58(%rsp), %rdi
movl $0x1, %esi
callq 0xe4fc0
movl $0x0, 0x64(%rsp)
jmp 0xed7fc
movq 0x50(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0xed778
movq 0x58(%rsp), %rdi
callq 0xe4ee0
movl $0x1, 0x64(%rsp)
jmp 0xed7fc
movq 0x38(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xe4cb0
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0xe4de0
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xed810
cmpl $0x0, %eax
je 0xed7ca
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0xe4f80
movq 0x8(%rsp), %rdi
callq 0xe8110
movl $0x0, 0x64(%rsp)
jmp 0xed7fc
movq 0x8(%rsp), %rdi
callq 0xe8110
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl 0x44(%rsp), %ecx
leaq 0x52(%rip), %r8 # 0xed840
xorl %eax, %eax
movl %eax, %r9d
callq 0xed220
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
bf_log:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_20], rdx
mov [rsp+68h+var_24], ecx
mov rax, [rsp+68h+var_10]
mov rax, [rax]
mov [rsp+68h+var_30], rax
lea rax, [rsp+68h+var_58]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_18]
cmp qword ptr [rax+18h], 0
jnz loc_ED756
mov rax, [rsp+68h+var_18]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jnz short loc_ED6EA
mov rdi, [rsp+68h+var_10]
call bf_set_nan
mov [rsp+68h+var_4], 0
jmp loc_ED7FC
loc_ED6EA:
mov rax, [rsp+68h+var_18]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp [rax+10h], rcx
jnz short loc_ED73A
mov rax, [rsp+68h+var_18]
cmp dword ptr [rax+8], 0
jz short loc_ED721
mov rdi, [rsp+68h+var_10]
call bf_set_nan
mov [rsp+68h+var_4], 1
jmp loc_ED7FC
loc_ED721:
mov rdi, [rsp+68h+var_10]
xor esi, esi
call bf_set_inf
mov [rsp+68h+var_4], 0
jmp loc_ED7FC
loc_ED73A:
mov rdi, [rsp+68h+var_10]
mov esi, 1
call bf_set_inf
mov [rsp+68h+var_4], 0
jmp loc_ED7FC
loc_ED756:
mov rax, [rsp+68h+var_18]
cmp dword ptr [rax+8], 0
jz short loc_ED778
mov rdi, [rsp+68h+var_10]
call bf_set_nan
mov [rsp+68h+var_4], 1
jmp loc_ED7FC
loc_ED778:
mov rdi, [rsp+68h+var_30]
mov rsi, [rsp+68h+var_60]
call bf_init
mov rdi, [rsp+68h+var_60]
mov esi, 1
call bf_set_ui
mov rdi, [rsp+68h+var_18]
mov rsi, [rsp+68h+var_60]
call bf_cmp_eq_0
cmp eax, 0
jz short loc_ED7CA
mov rdi, [rsp+68h+var_10]
xor esi, esi
call bf_set_zero
mov rdi, [rsp+68h+var_60]
call bf_delete_0
mov [rsp+68h+var_4], 0
jmp short loc_ED7FC
loc_ED7CA:
mov rdi, [rsp+68h+var_60]
call bf_delete_0
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_20]
mov ecx, [rsp+68h+var_24]
lea r8, bf_log_internal
xor eax, eax
mov r9d, eax
call bf_ziv_rounding
mov [rsp+68h+var_4], eax
loc_ED7FC:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
|
long long bf_log(_QWORD *a1, long long a2, long long a3, unsigned int a4)
{
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
long long v13[5]; // [rsp+10h] [rbp-58h] BYREF
long long v14; // [rsp+38h] [rbp-30h]
unsigned int v15; // [rsp+44h] [rbp-24h]
long long v16; // [rsp+48h] [rbp-20h]
long long v17; // [rsp+50h] [rbp-18h]
_QWORD *v18; // [rsp+58h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = *a1;
if ( !*(_QWORD *)(a2 + 24) )
{
if ( *(_QWORD *)(v17 + 16) == 0x7FFFFFFFFFFFFFFFLL )
{
bf_set_nan((long long)v18);
return 0;
}
if ( *(_QWORD *)(v17 + 16) != 0x7FFFFFFFFFFFFFFELL )
{
bf_set_inf((long long)v18, 1);
return 0;
}
if ( !*(_DWORD *)(v17 + 8) )
{
bf_set_inf((long long)v18, 0);
return 0;
}
LABEL_6:
bf_set_nan((long long)v18);
return 1;
}
if ( *(_DWORD *)(v17 + 8) )
goto LABEL_6;
bf_init(v14, (long long)v13);
bf_set_ui((long long)v13, 1LL);
if ( (unsigned int)bf_cmp_eq_0(v17, v13) )
{
bf_set_zero((long long)v18, 0);
bf_delete_0(v13, 0LL, v8, v9, v10, v11);
return 0;
}
else
{
bf_delete_0(v13, (long long)v13, v4, v5, v6, v7);
return (unsigned int)bf_ziv_rounding(
v18,
v17,
v16,
v15,
(void ( *)(_QWORD *, long long, long long, long long))bf_log_internal,
0LL);
}
}
|
bf_log:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV dword ptr [RSP + 0x44],ECX
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x38],RAX
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x50]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001ed756
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,0x7fffffffffffffff
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x001ed6ea
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001e4ee0
MOV dword ptr [RSP + 0x64],0x0
JMP 0x001ed7fc
LAB_001ed6ea:
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,0x7ffffffffffffffe
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x001ed73a
MOV RAX,qword ptr [RSP + 0x50]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x001ed721
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001e4ee0
MOV dword ptr [RSP + 0x64],0x1
JMP 0x001ed7fc
LAB_001ed721:
MOV RDI,qword ptr [RSP + 0x58]
XOR ESI,ESI
CALL 0x001e4fc0
MOV dword ptr [RSP + 0x64],0x0
JMP 0x001ed7fc
LAB_001ed73a:
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,0x1
CALL 0x001e4fc0
MOV dword ptr [RSP + 0x64],0x0
JMP 0x001ed7fc
LAB_001ed756:
MOV RAX,qword ptr [RSP + 0x50]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x001ed778
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001e4ee0
MOV dword ptr [RSP + 0x64],0x1
JMP 0x001ed7fc
LAB_001ed778:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001e4cb0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1
CALL 0x001e4de0
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001ed810
CMP EAX,0x0
JZ 0x001ed7ca
MOV RDI,qword ptr [RSP + 0x58]
XOR ESI,ESI
CALL 0x001e4f80
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001e8110
MOV dword ptr [RSP + 0x64],0x0
JMP 0x001ed7fc
LAB_001ed7ca:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001e8110
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x44]
LEA R8,[0x1ed840]
XOR EAX,EAX
MOV R9D,EAX
CALL 0x001ed220
MOV dword ptr [RSP + 0x64],EAX
LAB_001ed7fc:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4 bf_log(int8 *param_1,long param_2,int8 param_3,int4 param_4)
{
int iVar1;
int1 local_58 [40];
int8 local_30;
int4 local_24;
int8 local_20;
long local_18;
int8 *local_10;
int4 local_4;
local_30 = *param_1;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (*(long *)(param_2 + 0x18) == 0) {
if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) {
bf_set_nan(param_1);
local_4 = 0;
}
else if (*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) {
if (*(int *)(param_2 + 8) == 0) {
bf_set_inf(param_1,0);
local_4 = 0;
}
else {
bf_set_nan(param_1);
local_4 = 1;
}
}
else {
bf_set_inf(param_1,1);
local_4 = 0;
}
}
else if (*(int *)(param_2 + 8) == 0) {
bf_init(local_30,local_58);
bf_set_ui(local_58,1);
iVar1 = bf_cmp_eq(local_18,local_58);
if (iVar1 == 0) {
bf_delete(local_58);
local_4 = bf_ziv_rounding(local_10,local_18,local_20,local_24,bf_log_internal,0);
}
else {
bf_set_zero(local_10,0);
bf_delete(local_58);
local_4 = 0;
}
}
else {
bf_set_nan(param_1);
local_4 = 1;
}
return local_4;
}
|
|
62,126 |
bf_log
|
bluesky950520[P]quickjs/libbf.c
|
int bf_log(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
assert(r != a);
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
if (a->sign) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set_inf(r, 0);
return 0;
}
} else {
bf_set_inf(r, 1);
return 0;
}
}
if (a->sign) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
}
bf_init(s, T);
bf_set_ui(T, 1);
if (bf_cmp_eq(a, T)) {
bf_set_zero(r, 0);
bf_delete(T);
return 0;
}
bf_delete(T);
return bf_ziv_rounding(r, a, prec, flags, bf_log_internal, NULL);
}
|
O1
|
c
|
bf_log:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movabsq $0x7fffffffffffffff, %r13 # imm = 0x7FFFFFFFFFFFFFFF
movq (%rdi), %rax
cmpq $0x0, 0x18(%rsi)
je 0x8a535
cmpl $0x0, 0x8(%r14)
je 0x8a57d
cmpq $0x0, 0x18(%rbx)
je 0x8a520
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r13, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %ebx
jmp 0x8a6cd
movq 0x10(%r14), %rcx
movabsq $0x7ffffffffffffffe, %rdx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rdx, %rcx
je 0x8a606
cmpq %r13, %rcx
jne 0x8a623
cmpq $0x0, 0x18(%rbx)
je 0x8a6c0
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
jmp 0x8a6c0
movl %ecx, %ebp
movq %rdx, %r15
movq %rsp, %r12
movq %rax, (%r12)
movl $0x0, 0x8(%r12)
incq %r13
movq %r13, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movl $0x1, %esi
movq %r12, %rdi
callq 0x83ea7
movq %r14, %rdi
movq %r12, %rsi
callq 0x848e1
testl %eax, %eax
je 0x8a652
movq (%rsp), %rax
testq %rax, %rax
je 0x8a5de
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x8a5de
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
leaq 0xf9(%rip), %r8 # 0x8a6de
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
xorl %r9d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a0d8
cmpl $0x0, 0x8(%r14)
movq 0x18(%rbx), %rcx
je 0x8a6a0
testq %rcx, %rcx
jne 0x8a508
jmp 0x8a520
cmpq $0x0, 0x18(%rbx)
je 0x8a642
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
decq %r13
movq %r13, 0x10(%rbx)
movl $0x1, 0x8(%rbx)
jmp 0x8a6cb
cmpq $0x0, 0x18(%rbx)
je 0x8a674
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r13, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movq (%rsp), %rax
xorl %ebx, %ebx
testq %rax, %rax
je 0x8a6cd
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x8a6cd
movq (%rax), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x8a6cd
testq %rcx, %rcx
je 0x8a6bd
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
decq %r13
movq %r13, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_log:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov r13, 7FFFFFFFFFFFFFFFh
mov rax, [rdi]
cmp qword ptr [rsi+18h], 0
jz short loc_8A535
cmp dword ptr [r14+8], 0
jz short loc_8A57D
cmp qword ptr [rbx+18h], 0
jz short loc_8A520
loc_8A508:
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_8A520:
mov [rbx+10h], r13
mov dword ptr [rbx+8], 0
mov ebx, 1
jmp loc_8A6CD
loc_8A535:
mov rcx, [r14+10h]
mov rdx, 7FFFFFFFFFFFFFFEh
cmp rcx, rdx
jz loc_8A606
cmp rcx, r13
jnz loc_8A623
cmp qword ptr [rbx+18h], 0
jz loc_8A6C0
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
jmp loc_8A6C0
loc_8A57D:
mov ebp, ecx
mov r15, rdx
mov r12, rsp
mov [r12], rax
mov dword ptr [r12+8], 0
inc r13
mov [r12+10h], r13
xorps xmm0, xmm0
movups xmmword ptr [r12+18h], xmm0
mov esi, 1
mov rdi, r12
call bf_set_ui
mov rdi, r14
mov rsi, r12
call bf_cmp
test eax, eax
jz loc_8A652
mov rax, [rsp+58h+var_58]
test rax, rax
jz short loc_8A5DE
mov rsi, [rsp+58h+var_38]
test rsi, rsi
jz short loc_8A5DE
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8A5DE:
lea r8, bf_log_internal
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, ebp
xor r9d, r9d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_ziv_rounding
loc_8A606:
cmp dword ptr [r14+8], 0
mov rcx, [rbx+18h]
jz loc_8A6A0
test rcx, rcx
jnz loc_8A508
jmp loc_8A520
loc_8A623:
cmp qword ptr [rbx+18h], 0
jz short loc_8A642
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_8A642:
dec r13
mov [rbx+10h], r13
mov dword ptr [rbx+8], 1
jmp short loc_8A6CB
loc_8A652:
cmp qword ptr [rbx+18h], 0
jz short loc_8A674
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_8A674:
mov [rbx+10h], r13
mov dword ptr [rbx+8], 0
mov rax, [rsp+58h+var_58]
xor ebx, ebx
test rax, rax
jz short loc_8A6CD
mov rsi, [rsp+58h+var_38]
test rsi, rsi
jz short loc_8A6CD
mov rdi, [rax]
xor ebx, ebx
xor edx, edx
call qword ptr [rax+8]
jmp short loc_8A6CD
loc_8A6A0:
test rcx, rcx
jz short loc_8A6BD
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_8A6BD:
dec r13
loc_8A6C0:
mov [rbx+10h], r13
mov dword ptr [rbx+8], 0
loc_8A6CB:
xor ebx, ebx
loc_8A6CD:
mov eax, ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_log(_QWORD *a1, long long a2, long long a3, unsigned int a4)
{
long long v4; // r13
_QWORD *v5; // rax
unsigned int v6; // ebx
long long v7; // rcx
long long v11; // rcx
_QWORD *v12; // [rsp+0h] [rbp-58h] BYREF
int v13; // [rsp+8h] [rbp-50h]
unsigned long long v14; // [rsp+10h] [rbp-48h]
__int128 v15; // [rsp+18h] [rbp-40h]
v4 = 0x7FFFFFFFFFFFFFFFLL;
v5 = (_QWORD *)*a1;
if ( !*(_QWORD *)(a2 + 24) )
{
v7 = *(_QWORD *)(a2 + 16);
if ( v7 == 0x7FFFFFFFFFFFFFFELL )
{
v11 = a1[3];
if ( *(_DWORD *)(a2 + 8) )
{
if ( !v11 )
goto LABEL_5;
goto LABEL_4;
}
if ( v11 )
{
a1[4] = ((long long ( *)(_QWORD, _QWORD, _QWORD))v5[1])(*v5, a1[4], 0LL);
a1[3] = 0LL;
}
v4 = 0x7FFFFFFFFFFFFFFELL;
}
else
{
if ( v7 != 0x7FFFFFFFFFFFFFFFLL )
{
if ( a1[3] )
{
a1[4] = ((long long ( *)(_QWORD, _QWORD, _QWORD))v5[1])(*v5, a1[4], 0LL);
a1[3] = 0LL;
}
a1[2] = 0x7FFFFFFFFFFFFFFELL;
*((_DWORD *)a1 + 2) = 1;
return 0;
}
if ( a1[3] )
{
a1[4] = ((long long ( *)(_QWORD, _QWORD, _QWORD))v5[1])(*v5, a1[4], 0LL);
a1[3] = 0LL;
}
}
a1[2] = v4;
*((_DWORD *)a1 + 2) = 0;
return 0;
}
if ( *(_DWORD *)(a2 + 8) )
{
if ( !a1[3] )
{
LABEL_5:
a1[2] = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
return 1;
}
LABEL_4:
a1[4] = ((long long ( *)(_QWORD, _QWORD, _QWORD))v5[1])(*v5, a1[4], 0LL);
a1[3] = 0LL;
goto LABEL_5;
}
v12 = (_QWORD *)*a1;
v13 = 0;
v14 = 0x8000000000000000LL;
v15 = 0LL;
bf_set_ui(&v12, 1uLL);
if ( !(unsigned int)bf_cmp(a2, (long long)&v12) )
{
if ( a1[3] )
{
a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL);
a1[3] = 0LL;
}
a1[2] = 0x8000000000000000LL;
*((_DWORD *)a1 + 2) = 0;
v6 = 0;
if ( v12 && *((_QWORD *)&v15 + 1) )
{
v6 = 0;
((void ( *)(_QWORD, _QWORD, _QWORD))v12[1])(*v12, *((_QWORD *)&v15 + 1), 0LL);
}
return v6;
}
if ( v12 )
{
if ( *((_QWORD *)&v15 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v12[1])(*v12, *((_QWORD *)&v15 + 1), 0LL);
}
return bf_ziv_rounding(a1, a2, a3, a4, (void ( *)(_QWORD *, long long, long long, long long))bf_log_internal, 0LL);
}
|
bf_log:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV R13,0x7fffffffffffffff
MOV RAX,qword ptr [RDI]
CMP qword ptr [RSI + 0x18],0x0
JZ 0x0018a535
CMP dword ptr [R14 + 0x8],0x0
JZ 0x0018a57d
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018a520
LAB_0018a508:
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_0018a520:
MOV qword ptr [RBX + 0x10],R13
MOV dword ptr [RBX + 0x8],0x0
MOV EBX,0x1
JMP 0x0018a6cd
LAB_0018a535:
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,0x7ffffffffffffffe
CMP RCX,RDX
JZ 0x0018a606
CMP RCX,R13
JNZ 0x0018a623
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018a6c0
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
JMP 0x0018a6c0
LAB_0018a57d:
MOV EBP,ECX
MOV R15,RDX
MOV R12,RSP
MOV qword ptr [R12],RAX
MOV dword ptr [R12 + 0x8],0x0
INC R13
MOV qword ptr [R12 + 0x10],R13
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x18],XMM0
MOV ESI,0x1
MOV RDI,R12
CALL 0x00183ea7
MOV RDI,R14
MOV RSI,R12
CALL 0x001848e1
TEST EAX,EAX
JZ 0x0018a652
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x0018a5de
MOV RSI,qword ptr [RSP + 0x20]
TEST RSI,RSI
JZ 0x0018a5de
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018a5de:
LEA R8,[0x18a6de]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,EBP
XOR R9D,R9D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018a0d8
LAB_0018a606:
CMP dword ptr [R14 + 0x8],0x0
MOV RCX,qword ptr [RBX + 0x18]
JZ 0x0018a6a0
TEST RCX,RCX
JNZ 0x0018a508
JMP 0x0018a520
LAB_0018a623:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018a642
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_0018a642:
DEC R13
MOV qword ptr [RBX + 0x10],R13
MOV dword ptr [RBX + 0x8],0x1
JMP 0x0018a6cb
LAB_0018a652:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018a674
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_0018a674:
MOV qword ptr [RBX + 0x10],R13
MOV dword ptr [RBX + 0x8],0x0
MOV RAX,qword ptr [RSP]
XOR EBX,EBX
TEST RAX,RAX
JZ 0x0018a6cd
MOV RSI,qword ptr [RSP + 0x20]
TEST RSI,RSI
JZ 0x0018a6cd
MOV RDI,qword ptr [RAX]
XOR EBX,EBX
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x0018a6cd
LAB_0018a6a0:
TEST RCX,RCX
JZ 0x0018a6bd
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_0018a6bd:
DEC R13
LAB_0018a6c0:
MOV qword ptr [RBX + 0x10],R13
MOV dword ptr [RBX + 0x8],0x0
LAB_0018a6cb:
XOR EBX,EBX
LAB_0018a6cd:
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 bf_log(long *param_1,long param_2,int8 param_3,int4 param_4)
{
int iVar1;
long lVar2;
int8 uVar3;
long lVar4;
int8 *local_58;
int4 local_50;
int8 local_48;
int8 local_40;
long lStack_38;
lVar4 = 0x7fffffffffffffff;
local_58 = (int8 *)*param_1;
if (*(long *)(param_2 + 0x18) == 0) {
if (*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) {
lVar4 = param_1[3];
if (*(int *)(param_2 + 8) != 0) goto joined_r0x0018a618;
if (lVar4 != 0) {
lVar4 = (*(code *)local_58[1])(*local_58,param_1[4],0);
param_1[4] = lVar4;
param_1[3] = 0;
}
lVar4 = 0x7ffffffffffffffe;
LAB_0018a6c0:
param_1[2] = lVar4;
*(int4 *)(param_1 + 1) = 0;
}
else {
if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) {
if (param_1[3] != 0) {
lVar2 = (*(code *)local_58[1])(*local_58,param_1[4],0);
param_1[4] = lVar2;
param_1[3] = 0;
}
goto LAB_0018a6c0;
}
if (param_1[3] != 0) {
lVar4 = (*(code *)local_58[1])(*local_58,param_1[4],0);
param_1[4] = lVar4;
param_1[3] = 0;
}
param_1[2] = 0x7ffffffffffffffe;
*(int4 *)(param_1 + 1) = 1;
}
uVar3 = 0;
}
else {
if (*(int *)(param_2 + 8) == 0) {
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
bf_set_ui(&local_58,1);
iVar1 = bf_cmp(param_2,&local_58);
if (iVar1 != 0) {
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
uVar3 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_log_internal,0);
return uVar3;
}
if (param_1[3] != 0) {
lVar4 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar4;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
*(int4 *)(param_1 + 1) = 0;
if (local_58 == (int8 *)0x0) {
return 0;
}
if (lStack_38 == 0) {
return 0;
}
(*(code *)local_58[1])(*local_58,lStack_38,0);
return 0;
}
lVar4 = param_1[3];
joined_r0x0018a618:
if (lVar4 != 0) {
lVar4 = (*(code *)local_58[1])(*local_58,param_1[4],0);
param_1[4] = lVar4;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
uVar3 = 1;
}
return uVar3;
}
|
|
62,127 |
safe_lexcstrdup_root
|
eloqsql/mysys/my_alloc.c
|
LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
}
|
O0
|
c
|
safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6aff2
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x6af10
movq %rax, -0x10(%rbp)
jmp 0x6affd
leaq 0x4a6e6(%rip), %rax # 0xb56df
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
safe_lexcstrdup_root:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_20], rsi
mov [rbp+var_18], rdx
mov [rbp+var_28], rdi
cmp [rbp+var_18], 0
jz short loc_6AFF2
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call strmake_root
mov [rbp+var_10], rax
jmp short loc_6AFFD
loc_6AFF2:
lea rax, asc_B56DB+4; ""
mov [rbp+var_10], rax
loc_6AFFD:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
char * safe_lexcstrdup_root(_QWORD **a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
|
safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x28],RDI
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0016aff2
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0016af10
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016affd
LAB_0016aff2:
LEA RAX,[0x1b56df]
MOV qword ptr [RBP + -0x10],RAX
LAB_0016affd:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int1 auVar1 [16];
int *local_18;
if (param_3 == 0) {
local_18 = &DAT_001b56df;
}
else {
local_18 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar1._8_8_ = param_3;
auVar1._0_8_ = local_18;
return auVar1;
}
|
|
62,128 |
inline_mysql_cond_broadcast
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_cond_broadcast(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(broadcast_cond)(that->m_psi);
#endif
result= pthread_cond_broadcast(&that->m_cond);
return result;
}
|
O0
|
c
|
inline_mysql_cond_broadcast:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5f39b
leaq 0x261dd1(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x178(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x2a6b0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
|
inline_mysql_cond_broadcast_1:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5F39B
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+178h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_5F39B:
mov rdi, [rbp+var_8]
call _pthread_cond_broadcast
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
|
long long inline_mysql_cond_broadcast_1(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[47])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_broadcast(a1);
}
|
inline_mysql_cond_broadcast:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015f39b
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x178]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_0015f39b:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a6b0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_broadcast(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x178))(param_1[1].__align);
}
iVar1 = pthread_cond_broadcast(param_1);
return iVar1;
}
|
|
62,129 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
|
monkey531[P]llama/common/json.hpp
|
reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// fill up array with null values if given idx is outside range
if (idx >= m_data.m_value.array->size())
{
#if JSON_DIAGNOSTICS
// remember array size & capacity before resizing
const auto old_size = m_data.m_value.array->size();
const auto old_capacity = m_data.m_value.array->capacity();
#endif
m_data.m_value.array->resize(idx + 1);
#if JSON_DIAGNOSTICS
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
}
else
{
// set parent for values added above
set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));
}
#endif
assert_invariant();
}
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rdi), %al
testb %al, %al
jne 0x66de9
movb $0x2, (%rbx)
callq 0x4d21c
movq %rax, 0x8(%rbx)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x418da
movb (%rbx), %al
cmpb $0x2, %al
jne 0x66e32
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %r14, %rcx
ja 0x66e1f
leaq 0x1(%r14), %rsi
callq 0x6705c
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x418da
movq 0x8(%rbx), %rax
movq (%rax), %rax
shlq $0x4, %r14
addq %rax, %r14
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x223c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x41dd0
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2fb3f(%rip), %rsi # 0x96993
leaq 0x10(%rsp), %rdi
callq 0x61b36
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl $0x131, %esi # imm = 0x131
movq %rbx, %rcx
callq 0x4b35e
xorl %ebp, %ebp
leaq 0x6e459(%rip), %rsi # 0xd52d8
leaq -0x19b54(%rip), %rdx # 0x4d332
movq %r14, %rdi
callq 0x22cd0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x22f48
testb %bpl, %bpl
jne 0x66ea5
jmp 0x66ead
movq %rax, %rbx
movq %r14, %rdi
callq 0x22550
movq %rbx, %rdi
callq 0x22d30
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
mov al, [rdi]
test al, al
jnz short loc_66DE9
mov byte ptr [rbx], 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 [rbx+8], rax
push 1
pop rsi
mov rdi, rbx
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 al, [rbx]
loc_66DE9:
cmp al, 2
jnz short loc_66E32
mov rdi, [rbx+8]
mov rax, [rdi]
mov rcx, [rdi+8]
sub rcx, rax
sar rcx, 4
cmp rcx, r14
ja short loc_66E1F
lea rsi, [r14+1]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; 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>>::resize(ulong)
push 1
pop rsi
mov rdi, rbx
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 rax, [rbx+8]
mov rax, [rax]
loc_66E1F:
shl r14, 4
add r14, rax
mov rax, r14
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_66E32:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, r14; this
mov esi, 131h; int
mov rcx, rbx
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, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_66EA5
jmp short loc_66EAD
mov rbx, rax
loc_66EA5:
mov rdi, r14; void *
call ___cxa_free_exception
loc_66EAD:
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
unsigned long long a2)
{
char v3; // al
long long *v4; // rdi
long long v5; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // r14
char *v8; // [rsp+8h] [rbp-40h] BYREF
_BYTE v9[56]; // [rsp+10h] [rbp-38h] BYREF
v3 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_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);
v3 = *(_BYTE *)a1;
}
if ( v3 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v8 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
(long long)v9,
(long long)"cannot use operator[] with a numeric argument with ",
&v8);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
(long long)v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v4 = *(long long **)(a1 + 8);
v5 = *v4;
if ( (v4[1] - *v4) >> 4 <= a2 )
{
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>>::resize(
v4,
a2 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v5 = **(_QWORD **)(a1 + 8);
}
return v5 + 16 * a2;
}
|
operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x00166de9
MOV byte ptr [RBX],0x2
CALL 0x0014d21c
MOV qword ptr [RBX + 0x8],RAX
PUSH 0x1
POP RSI
MOV RDI,RBX
CALL 0x001418da
MOV AL,byte ptr [RBX]
LAB_00166de9:
CMP AL,0x2
JNZ 0x00166e32
MOV RDI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,RAX
SAR RCX,0x4
CMP RCX,R14
JA 0x00166e1f
LEA RSI,[R14 + 0x1]
CALL 0x0016705c
PUSH 0x1
POP RSI
MOV RDI,RBX
CALL 0x001418da
MOV RAX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RAX]
LAB_00166e1f:
SHL R14,0x4
ADD R14,RAX
MOV RAX,R14
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00166e32:
PUSH 0x20
POP RDI
CALL 0x001223c0
MOV R14,RAX
MOV RDI,RBX
CALL 0x00141dd0
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00166e4d:
LEA RSI,[0x196993]
LEA RDI,[RSP + 0x10]
CALL 0x00161b36
MOV BPL,0x1
LAB_00166e61:
LEA RDX,[RSP + 0x10]
MOV RDI,R14
MOV ESI,0x131
MOV RCX,RBX
CALL 0x0014b35e
XOR EBP,EBP
LEA RSI,[0x1d52d8]
LEA RDX,[0x14d332]
MOV RDI,R14
CALL 0x00122cd0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
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_00;
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>
bVar1;
vector *pvVar2;
long lVar3;
int8 uVar4;
char *local_40;
detail local_38 [32];
bVar1 = *this;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)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;
pvVar2 = 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) = pvVar2;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
this_00 = *(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);
lVar3 = *(long *)this_00;
if ((ulong)(*(long *)(this_00 + 8) - lVar3 >> 4) <= param_1) {
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>>>
::resize(this_00,param_1 + 1);
assert_invariant(SUB81(this,0));
lVar3 = **(long **)(this + 8);
}
return param_1 * 0x10 + lVar3;
}
uVar4 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00166e4d to 00166e5d has its CatchHandler @ 00166ea2 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 00166e61 to 00166e8d has its CatchHandler @ 00166e8e */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
62,130 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
|
monkey531[P]llama/common/json.hpp
|
reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// fill up array with null values if given idx is outside range
if (idx >= m_data.m_value.array->size())
{
#if JSON_DIAGNOSTICS
// remember array size & capacity before resizing
const auto old_size = m_data.m_value.array->size();
const auto old_capacity = m_data.m_value.array->capacity();
#endif
m_data.m_value.array->resize(idx + 1);
#if JSON_DIAGNOSTICS
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
}
else
{
// set parent for values added above
set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));
}
#endif
assert_invariant();
}
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0x73092
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1a720
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x426e2
movb (%r14), %al
cmpb $0x2, %al
jne 0x730dd
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rbx, %rcx
ja 0x730ca
leaq 0x1(%rbx), %rsi
callq 0x73350
movq %r14, %rdi
movl $0x1, %esi
callq 0x426e2
movq 0x8(%r14), %rax
movq (%rax), %rax
shlq $0x4, %rbx
addq %rax, %rbx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a390
movq %rax, %rbx
movq %r14, %rdi
callq 0x42dd6
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3e893(%rip), %rsi # 0xb1994
leaq 0x10(%rsp), %rdi
callq 0x69e03
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x4ea00
xorl %ebp, %ebp
leaq 0x6e19c(%rip), %rsi # 0xe12c8
leaq -0x22097(%rip), %rdx # 0x5109c
movq %rbx, %rdi
callq 0x1acd0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73159
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a740
testb %bpl, %bpl
jne 0x73163
jmp 0x7316b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a530
movq %r14, %rdi
callq 0x1ad30
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
mov al, [rdi]
test al, al
jnz short loc_73092
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
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 al, [r14]
loc_73092:
cmp al, 2
jnz short loc_730DD
mov rdi, [r14+8]
mov rax, [rdi]
mov rcx, [rdi+8]
sub rcx, rax
sar rcx, 4
cmp rcx, rbx
ja short loc_730CA
lea rsi, [rbx+1]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; 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>>::resize(ulong)
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 rax, [r14+8]
mov rax, [rax]
loc_730CA:
shl rbx, 4
add rbx, rax
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_730DD:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_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 rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_73159
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_73159:
test bpl, bpl
jnz short loc_73163
jmp short loc_7316B
mov r14, rax
loc_73163:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7316B:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
unsigned long long a2)
{
char v3; // al
long long v4; // rax
long long *v5; // rdi
long long v6; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v9; // [rsp+8h] [rbp-40h] BYREF
_QWORD v10[2]; // [rsp+10h] [rbp-38h] BYREF
v3 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 2;
v4 = operator new(0x18uLL);
*(_OWORD *)v4 = 0LL;
*(_QWORD *)(v4 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = 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>::assert_invariant((char *)a1);
v3 = *(_BYTE *)a1;
}
if ( v3 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
(long long)v10,
(long long)"cannot use operator[] with a numeric argument with ",
&v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v10);
__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);
}
v5 = *(long long **)(a1 + 8);
v6 = *v5;
if ( (v5[1] - *v5) >> 4 <= a2 )
{
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>>::resize(
v5,
a2 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v6 = **(_QWORD **)(a1 + 8);
}
return v6 + 16 * a2;
}
|
operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x00173092
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011a720
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x001426e2
MOV AL,byte ptr [R14]
LAB_00173092:
CMP AL,0x2
JNZ 0x001730dd
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,RAX
SAR RCX,0x4
CMP RCX,RBX
JA 0x001730ca
LEA RSI,[RBX + 0x1]
CALL 0x00173350
MOV RDI,R14
MOV ESI,0x1
CALL 0x001426e2
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX]
LAB_001730ca:
SHL RBX,0x4
ADD RBX,RAX
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001730dd:
MOV EDI,0x20
CALL 0x0011a390
MOV RBX,RAX
MOV RDI,R14
CALL 0x00142dd6
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001730fa:
LEA RSI,[0x1b1994]
LEA RDI,[RSP + 0x10]
CALL 0x00169e03
MOV BPL,0x1
LAB_0017310e:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0014ea00
XOR EBP,EBP
LEA RSI,[0x1e12c8]
LEA RDX,[0x15109c]
MOV RDI,RBX
CALL 0x0011acd0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
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_00;
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>
bVar1;
int8 *puVar2;
long lVar3;
int8 uVar4;
char *local_40;
detail local_38 [32];
bVar1 = *this;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)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;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
this_00 = *(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);
lVar3 = *(long *)this_00;
if ((ulong)(*(long *)(this_00 + 8) - lVar3 >> 4) <= param_1) {
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>>>
::resize(this_00,param_1 + 1);
assert_invariant(SUB81(this,0));
lVar3 = **(long **)(this + 8);
}
return param_1 * 0x10 + lVar3;
}
uVar4 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001730fa to 0017310a has its CatchHandler @ 00173160 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 0017310e to 0017313a has its CatchHandler @ 0017313b */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
62,131 |
MNN::IfParam::UnPackTo(MNN::IfParamT*, std::__1::function<void (void**, unsigned long)> const*) const
|
mnn-tts/MNN/schema/current/MNN_generated.h
|
inline void IfParam::UnPackTo(IfParamT *_o, const flatbuffers::resolver_function_t *_resolver) const {
(void)_o;
(void)_resolver;
{ auto _e = then_graph(); if (_e) _o->then_graph = _e->str(); };
{ auto _e = else_graph(); if (_e) _o->else_graph = _e->str(); };
{ auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr<StringVecT>(_e->Get(_i)->UnPack(_resolver)); } } };
{ auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = std::unique_ptr<StringVecT>(_e->Get(_i)->UnPack(_resolver)); } } };
}
|
O0
|
c
|
MNN::IfParam::UnPackTo(MNN::IfParamT*, std::__1::function<void (void**, unsigned long)> const*) const:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x54fb0
movq %rax, 0x98(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x7eafb
movq 0x98(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x68430
movq 0xa8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x421d0
leaq 0x80(%rsp), %rdi
callq 0x26120
movq 0x28(%rsp), %rdi
callq 0x54fd0
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x7eb41
movq 0x78(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x68430
movq 0xa8(%rsp), %rdi
addq $0x18, %rdi
leaq 0x60(%rsp), %rsi
callq 0x421d0
leaq 0x60(%rsp), %rdi
callq 0x26120
movq 0x28(%rsp), %rdi
callq 0x54ff0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x7ec14
movq 0xa8(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
callq 0x54bc0
movq 0x20(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x7dc70
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x58(%rsp), %rdi
callq 0x54bc0
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jae 0x7ec12
movq 0x58(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x54be0
movq %rax, %rdi
movq 0xa0(%rsp), %rsi
callq 0x7dce0
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0x7dd40
movq 0xa8(%rsp), %rdi
addq $0x30, %rdi
movl 0x54(%rsp), %eax
movl %eax, %esi
callq 0x7dd60
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
callq 0x7dd80
leaq 0x48(%rsp), %rdi
callq 0x7ddc0
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x7eb8d
jmp 0x7ec14
movq 0x28(%rsp), %rdi
callq 0x55010
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x7ece7
movq 0xa8(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rdi
callq 0x54bc0
movq 0x10(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x7dc70
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
callq 0x54bc0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jae 0x7ece5
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x54be0
movq %rax, %rdi
movq 0xa0(%rsp), %rsi
callq 0x7dce0
movq %rax, %rsi
leaq 0x30(%rsp), %rdi
callq 0x7dd40
movq 0xa8(%rsp), %rdi
addq $0x48, %rdi
movl 0x3c(%rsp), %eax
movl %eax, %esi
callq 0x7dd60
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x7dd80
leaq 0x30(%rsp), %rdi
callq 0x7ddc0
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x7ec60
jmp 0x7ece7
addq $0xb8, %rsp
retq
nop
|
_ZNK3MNN7IfParam8UnPackToEPNS_8IfParamTEPKNSt3__18functionIFvPPvmEEE:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov rdi, [rsp+0B8h+var_8]; this
mov [rsp+0B8h+var_90], rdi
call _ZNK3MNN7IfParam10then_graphEv; MNN::IfParam::then_graph(void)
mov [rsp+0B8h+var_20], rax
cmp [rsp+0B8h+var_20], 0
jz short loc_7EAFB
mov rsi, [rsp+0B8h+var_20]
lea rdi, [rsp+0B8h+var_38]; this
call _ZNK11flatbuffers6String3strEv; flatbuffers::String::str(void)
mov rdi, [rsp+0B8h+var_10]
lea rsi, [rsp+0B8h+var_38]
call _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSB8nn200100EOS5_; std::string::operator=(std::string&&)
lea rdi, [rsp+0B8h+var_38]
call __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev; std::string::~string()
loc_7EAFB:
mov rdi, [rsp+0B8h+var_90]; this
call _ZNK3MNN7IfParam10else_graphEv; MNN::IfParam::else_graph(void)
mov [rsp+0B8h+var_40], rax
cmp [rsp+0B8h+var_40], 0
jz short loc_7EB41
mov rsi, [rsp+0B8h+var_40]
lea rdi, [rsp+0B8h+var_58]; this
call _ZNK11flatbuffers6String3strEv; flatbuffers::String::str(void)
mov rdi, [rsp+0B8h+var_10]
add rdi, 18h
lea rsi, [rsp+0B8h+var_58]
call _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSB8nn200100EOS5_; std::string::operator=(std::string&&)
lea rdi, [rsp+0B8h+var_58]
call __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev; std::string::~string()
loc_7EB41:
mov rdi, [rsp+0B8h+var_90]; this
call _ZNK3MNN7IfParam14aliases_inputsEv; MNN::IfParam::aliases_inputs(void)
mov [rsp+0B8h+var_60], rax
cmp [rsp+0B8h+var_60], 0
jz loc_7EC14
mov rax, [rsp+0B8h+var_10]
add rax, 30h ; '0'
mov [rsp+0B8h+var_98], rax
mov rdi, [rsp+0B8h+var_60]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9StringVecEEEE4sizeEv; flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(void)
mov rdi, [rsp+0B8h+var_98]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorINS_10unique_ptrIN3MNN10StringVecTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE6resizeEm; std::vector<std::unique_ptr<MNN::StringVecT>>::resize(ulong)
mov [rsp+0B8h+var_64], 0
loc_7EB8D:
mov eax, [rsp+0B8h+var_64]
mov [rsp+0B8h+var_9C], eax
mov rdi, [rsp+0B8h+var_60]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9StringVecEEEE4sizeEv; flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_9C]
cmp eax, ecx
jnb short loc_7EC12
mov rdi, [rsp+0B8h+var_60]
mov esi, [rsp+0B8h+var_64]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9StringVecEEEE3GetEj; flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::Get(uint)
mov rdi, rax
mov rsi, [rsp+0B8h+var_18]
call _ZNK3MNN9StringVec6UnPackEPKNSt3__18functionIFvPPvmEEE; MNN::StringVec::UnPack(std::function<void ()(void **,ulong)> const*)
mov rsi, rax
lea rdi, [rsp+0B8h+var_70]
call _ZNSt3__110unique_ptrIN3MNN10StringVecTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::StringVecT>::unique_ptr<true,void>(MNN::StringVecT*)
mov rdi, [rsp+0B8h+var_10]
add rdi, 30h ; '0'
mov eax, [rsp+0B8h+var_64]
mov esi, eax
call _ZNSt3__16vectorINS_10unique_ptrIN3MNN10StringVecTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEEixB8nn200100Em; std::vector<std::unique_ptr<MNN::StringVecT>>::operator[](ulong)
mov rdi, rax
lea rsi, [rsp+0B8h+var_70]
call _ZNSt3__110unique_ptrIN3MNN10StringVecTENS_14default_deleteIS2_EEEaSB8nn200100EOS5_; std::unique_ptr<MNN::StringVecT>::operator=(std::unique_ptr<MNN::StringVecT>&&)
lea rdi, [rsp+0B8h+var_70]
call _ZNSt3__110unique_ptrIN3MNN10StringVecTENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::StringVecT>::~unique_ptr()
mov eax, [rsp+0B8h+var_64]
add eax, 1
mov [rsp+0B8h+var_64], eax
jmp loc_7EB8D
loc_7EC12:
jmp short $+2
loc_7EC14:
mov rdi, [rsp+0B8h+var_90]; this
call _ZNK3MNN7IfParam15aliases_outputsEv; MNN::IfParam::aliases_outputs(void)
mov [rsp+0B8h+var_78], rax
cmp [rsp+0B8h+var_78], 0
jz loc_7ECE7
mov rax, [rsp+0B8h+var_10]
add rax, 48h ; 'H'
mov [rsp+0B8h+var_A8], rax
mov rdi, [rsp+0B8h+var_78]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9StringVecEEEE4sizeEv; flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(void)
mov rdi, [rsp+0B8h+var_A8]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorINS_10unique_ptrIN3MNN10StringVecTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE6resizeEm; std::vector<std::unique_ptr<MNN::StringVecT>>::resize(ulong)
mov [rsp+0B8h+var_7C], 0
loc_7EC60:
mov eax, [rsp+0B8h+var_7C]
mov [rsp+0B8h+var_AC], eax
mov rdi, [rsp+0B8h+var_78]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9StringVecEEEE4sizeEv; flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_AC]
cmp eax, ecx
jnb short loc_7ECE5
mov rdi, [rsp+0B8h+var_78]
mov esi, [rsp+0B8h+var_7C]
call _ZNK11flatbuffers6VectorINS_6OffsetIN3MNN9StringVecEEEE3GetEj; flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::Get(uint)
mov rdi, rax
mov rsi, [rsp+0B8h+var_18]
call _ZNK3MNN9StringVec6UnPackEPKNSt3__18functionIFvPPvmEEE; MNN::StringVec::UnPack(std::function<void ()(void **,ulong)> const*)
mov rsi, rax
lea rdi, [rsp+0B8h+var_88]
call _ZNSt3__110unique_ptrIN3MNN10StringVecTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::StringVecT>::unique_ptr<true,void>(MNN::StringVecT*)
mov rdi, [rsp+0B8h+var_10]
add rdi, 48h ; 'H'
mov eax, [rsp+0B8h+var_7C]
mov esi, eax
call _ZNSt3__16vectorINS_10unique_ptrIN3MNN10StringVecTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEEixB8nn200100Em; std::vector<std::unique_ptr<MNN::StringVecT>>::operator[](ulong)
mov rdi, rax
lea rsi, [rsp+0B8h+var_88]
call _ZNSt3__110unique_ptrIN3MNN10StringVecTENS_14default_deleteIS2_EEEaSB8nn200100EOS5_; std::unique_ptr<MNN::StringVecT>::operator=(std::unique_ptr<MNN::StringVecT>&&)
lea rdi, [rsp+0B8h+var_88]
call _ZNSt3__110unique_ptrIN3MNN10StringVecTENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::StringVecT>::~unique_ptr()
mov eax, [rsp+0B8h+var_7C]
add eax, 1
mov [rsp+0B8h+var_7C], eax
jmp loc_7EC60
loc_7ECE5:
jmp short $+2
loc_7ECE7:
add rsp, 0B8h
retn
|
unsigned int * MNN::IfParam::UnPackTo(MNN::IfParam *a1, long long a2, long long a3)
{
unsigned int v3; // eax
long long v4; // rax
MNN::StringVecT *v5; // rax
long long v6; // rax
unsigned int *result; // rax
unsigned int v8; // eax
unsigned int v9; // ecx
long long v10; // rax
MNN::StringVecT *v11; // rax
long long v12; // rax
unsigned int v13; // [rsp+Ch] [rbp-ACh]
_QWORD *v14; // [rsp+10h] [rbp-A8h]
unsigned int v15; // [rsp+1Ch] [rbp-9Ch]
_QWORD *v16; // [rsp+20h] [rbp-98h]
long long v17; // [rsp+30h] [rbp-88h] BYREF
unsigned int j; // [rsp+3Ch] [rbp-7Ch]
unsigned int *v19; // [rsp+40h] [rbp-78h]
long long v20; // [rsp+48h] [rbp-70h] BYREF
unsigned int i; // [rsp+54h] [rbp-64h]
unsigned int *v22; // [rsp+58h] [rbp-60h]
_BYTE v23[24]; // [rsp+60h] [rbp-58h] BYREF
flatbuffers::String *v24; // [rsp+78h] [rbp-40h]
_BYTE v25[24]; // [rsp+80h] [rbp-38h] BYREF
flatbuffers::String *v26; // [rsp+98h] [rbp-20h]
long long v27; // [rsp+A0h] [rbp-18h]
long long v28; // [rsp+A8h] [rbp-10h]
MNN::IfParam *v29; // [rsp+B0h] [rbp-8h]
v29 = a1;
v28 = a2;
v27 = a3;
v26 = (flatbuffers::String *)MNN::IfParam::then_graph(a1);
if ( v26 )
{
flatbuffers::String::str((flatbuffers::String *)v25, v26);
std::string::operator=[abi:nn200100](v28, (long long)v25);
std::string::~string(v25);
}
v24 = (flatbuffers::String *)MNN::IfParam::else_graph(a1);
if ( v24 )
{
flatbuffers::String::str((flatbuffers::String *)v23, v24);
std::string::operator=[abi:nn200100](v28 + 24, (long long)v23);
std::string::~string(v23);
}
v22 = (unsigned int *)MNN::IfParam::aliases_inputs(a1);
if ( v22 )
{
v16 = (_QWORD *)(v28 + 48);
v3 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(v22);
std::vector<std::unique_ptr<MNN::StringVecT>>::resize(v16, v3);
for ( i = 0; ; ++i )
{
v15 = i;
if ( v15 >= (unsigned int)flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(v22) )
break;
v4 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::Get(v22, i);
v5 = MNN::StringVec::UnPack(v4, v27);
std::unique_ptr<MNN::StringVecT>::unique_ptr[abi:nn200100]<true,void>(&v20, (long long)v5);
v6 = std::vector<std::unique_ptr<MNN::StringVecT>>::operator[][abi:nn200100]((_QWORD *)(v28 + 48), i);
std::unique_ptr<MNN::StringVecT>::operator=[abi:nn200100](v6, (long long)&v20);
std::unique_ptr<MNN::StringVecT>::~unique_ptr[abi:nn200100]((long long)&v20);
}
}
result = (unsigned int *)MNN::IfParam::aliases_outputs(a1);
v19 = result;
if ( result )
{
v14 = (_QWORD *)(v28 + 72);
v8 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(v19);
std::vector<std::unique_ptr<MNN::StringVecT>>::resize(v14, v8);
for ( j = 0; ; ++j )
{
v13 = j;
v9 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(v19);
result = (unsigned int *)v13;
if ( v13 >= v9 )
break;
v10 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::Get(v19, j);
v11 = MNN::StringVec::UnPack(v10, v27);
std::unique_ptr<MNN::StringVecT>::unique_ptr[abi:nn200100]<true,void>(&v17, (long long)v11);
v12 = std::vector<std::unique_ptr<MNN::StringVecT>>::operator[][abi:nn200100]((_QWORD *)(v28 + 72), j);
std::unique_ptr<MNN::StringVecT>::operator=[abi:nn200100](v12, (long long)&v17);
std::unique_ptr<MNN::StringVecT>::~unique_ptr[abi:nn200100]((long long)&v17);
}
}
return result;
}
|
UnPackTo:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV RDI,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00154fb0
MOV qword ptr [RSP + 0x98],RAX
CMP qword ptr [RSP + 0x98],0x0
JZ 0x0017eafb
MOV RSI,qword ptr [RSP + 0x98]
LEA RDI,[RSP + 0x80]
CALL 0x00168430
MOV RDI,qword ptr [RSP + 0xa8]
LEA RSI,[RSP + 0x80]
CALL 0x001421d0
LEA RDI,[RSP + 0x80]
CALL 0x00126120
LAB_0017eafb:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00154fd0
MOV qword ptr [RSP + 0x78],RAX
CMP qword ptr [RSP + 0x78],0x0
JZ 0x0017eb41
MOV RSI,qword ptr [RSP + 0x78]
LEA RDI,[RSP + 0x60]
CALL 0x00168430
MOV RDI,qword ptr [RSP + 0xa8]
ADD RDI,0x18
LEA RSI,[RSP + 0x60]
CALL 0x001421d0
LEA RDI,[RSP + 0x60]
CALL 0x00126120
LAB_0017eb41:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00154ff0
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x58],0x0
JZ 0x0017ec14
MOV RAX,qword ptr [RSP + 0xa8]
ADD RAX,0x30
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00154bc0
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0017dc70
MOV dword ptr [RSP + 0x54],0x0
LAB_0017eb8d:
MOV EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00154bc0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,ECX
JNC 0x0017ec12
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,dword ptr [RSP + 0x54]
CALL 0x00154be0
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x0017dce0
MOV RSI,RAX
LEA RDI,[RSP + 0x48]
CALL 0x0017dd40
MOV RDI,qword ptr [RSP + 0xa8]
ADD RDI,0x30
MOV EAX,dword ptr [RSP + 0x54]
MOV ESI,EAX
CALL 0x0017dd60
MOV RDI,RAX
LEA RSI,[RSP + 0x48]
CALL 0x0017dd80
LEA RDI,[RSP + 0x48]
CALL 0x0017ddc0
MOV EAX,dword ptr [RSP + 0x54]
ADD EAX,0x1
MOV dword ptr [RSP + 0x54],EAX
JMP 0x0017eb8d
LAB_0017ec12:
JMP 0x0017ec14
LAB_0017ec14:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00155010
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JZ 0x0017ece7
MOV RAX,qword ptr [RSP + 0xa8]
ADD RAX,0x48
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x00154bc0
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0017dc70
MOV dword ptr [RSP + 0x3c],0x0
LAB_0017ec60:
MOV EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x00154bc0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,ECX
JNC 0x0017ece5
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x3c]
CALL 0x00154be0
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x0017dce0
MOV RSI,RAX
LEA RDI,[RSP + 0x30]
CALL 0x0017dd40
MOV RDI,qword ptr [RSP + 0xa8]
ADD RDI,0x48
MOV EAX,dword ptr [RSP + 0x3c]
MOV ESI,EAX
CALL 0x0017dd60
MOV RDI,RAX
LEA RSI,[RSP + 0x30]
CALL 0x0017dd80
LEA RDI,[RSP + 0x30]
CALL 0x0017ddc0
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x0017ec60
LAB_0017ece5:
JMP 0x0017ece7
LAB_0017ece7:
ADD RSP,0xb8
RET
|
/* MNN::IfParam::UnPackTo(MNN::IfParamT*, std::function<void (void**, unsigned long)> const*) const
*/
void __thiscall MNN::IfParam::UnPackTo(IfParam *this,IfParamT *param_1,function *param_2)
{
uint uVar1;
uint uVar2;
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*pvVar3;
StringVec *pSVar4;
int8 uVar5;
unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>> *puVar6;
unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>> local_88 [12];
uint local_7c;
Vector<flatbuffers::Offset<MNN::StringVec>> *local_78;
unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>> local_70 [12];
uint local_64;
Vector<flatbuffers::Offset<MNN::StringVec>> *local_60;
string local_58 [24];
long local_40;
string local_38 [24];
long local_20;
function *local_18;
IfParamT *local_10;
IfParam *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
local_20 = then_graph(this);
if (local_20 != 0) {
flatbuffers::String::str();
std::string::operator=[abi_nn200100_((string *)local_10,local_38);
std::string::~string(local_38);
}
local_40 = else_graph(this);
if (local_40 != 0) {
flatbuffers::String::str();
std::string::operator=[abi_nn200100_((string *)(local_10 + 0x18),local_58);
std::string::~string(local_58);
}
local_60 = (Vector<flatbuffers::Offset<MNN::StringVec>> *)aliases_inputs(this);
if (local_60 != (Vector<flatbuffers::Offset<MNN::StringVec>> *)0x0) {
pvVar3 = (vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*)(local_10 + 0x30);
uVar1 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(local_60);
std::
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
::resize(pvVar3,(ulong)uVar1);
for (local_64 = 0; uVar1 = local_64,
uVar2 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(local_60),
uVar1 < uVar2; local_64 = local_64 + 1) {
pSVar4 = (StringVec *)
flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::Get(local_60,local_64);
uVar5 = StringVec::UnPack(pSVar4,local_18);
_ZNSt3__110unique_ptrIN3MNN10StringVecTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_70,uVar5);
puVar6 = (unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>> *)
std::
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
::operator[][abi_nn200100_
((vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*)(local_10 + 0x30),(ulong)local_64);
std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>::operator=[abi_nn200100_
(puVar6,local_70);
std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>::
~unique_ptr_abi_nn200100_(local_70);
}
}
local_78 = (Vector<flatbuffers::Offset<MNN::StringVec>> *)aliases_outputs(this);
if (local_78 != (Vector<flatbuffers::Offset<MNN::StringVec>> *)0x0) {
pvVar3 = (vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*)(local_10 + 0x48);
uVar1 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(local_78);
std::
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
::resize(pvVar3,(ulong)uVar1);
for (local_7c = 0; uVar1 = local_7c,
uVar2 = flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::size(local_78),
uVar1 < uVar2; local_7c = local_7c + 1) {
pSVar4 = (StringVec *)
flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>::Get(local_78,local_7c);
uVar5 = StringVec::UnPack(pSVar4,local_18);
_ZNSt3__110unique_ptrIN3MNN10StringVecTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_88,uVar5);
puVar6 = (unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>> *)
std::
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
::operator[][abi_nn200100_
((vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*)(local_10 + 0x48),(ulong)local_7c);
std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>::operator=[abi_nn200100_
(puVar6,local_88);
std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>::
~unique_ptr_abi_nn200100_(local_88);
}
}
return;
}
|
|
62,132 |
gguf_add_tensor
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
|
void gguf_add_tensor(
struct gguf_context * ctx,
const struct ggml_tensor * tensor) {
GGML_ASSERT(tensor);
if (gguf_find_tensor(ctx, tensor->name) != -1) {
GGML_ABORT("duplicate tensor name: %s", tensor->name);
}
struct gguf_tensor_info ti;
ti.t = *tensor;
ti.offset = ctx->info.empty() ? 0 :
ctx->info.back().offset + GGML_PAD(ggml_nbytes(&ctx->info.back().t), ctx->alignment);
ctx->info.push_back(ti);
}
|
O0
|
cpp
|
gguf_add_tensor:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8e48b
leaq 0x34158(%rip), %rdi # 0xc25c9
movl $0x442, %esi # imm = 0x442
leaq 0x2318c(%rip), %rdx # 0xb1609
leaq 0x25934(%rip), %rcx # 0xb3db8
movb $0x0, %al
callq 0x48a00
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x100, %rsi # imm = 0x100
callq 0x46340
cmpq $-0x1, %rax
je 0x8e4ca
movq -0x10(%rbp), %rcx
addq $0x100, %rcx # imm = 0x100
leaq 0x34112(%rip), %rdi # 0xc25c9
movl $0x444, %esi # imm = 0x444
leaq 0x346ac(%rip), %rdx # 0xc2b6f
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rsi
leaq -0x168(%rbp), %rdi
movl $0x150, %edx # imm = 0x150
callq 0x453f0
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x43cf0
testb $0x1, %al
jne 0x8e4f2
jmp 0x8e4fd
xorl %eax, %eax
movq %rax, -0x170(%rbp)
jmp 0x8e560
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x49780
movq 0x150(%rax), %rax
movq %rax, -0x178(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x49780
movq %rax, %rdi
callq 0x42650
movq %rax, %rcx
movq -0x178(%rbp), %rax
movq -0x8(%rbp), %rdx
addq 0x38(%rdx), %rcx
subq $0x1, %rcx
movq -0x8(%rbp), %rdx
movq 0x38(%rdx), %rdx
subq $0x1, %rdx
xorq $-0x1, %rdx
andq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
leaq -0x168(%rbp), %rsi
callq 0x45ac0
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
nopl (%rax,%rax)
|
gguf_add_tensor:
push rbp
mov rbp, rsp
sub rsp, 180h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
cmp [rbp+var_10], 0
jnz short loc_8E48B
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov esi, 442h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNodesCgr+26h; "tensor"
mov al, 0
call _ggml_abort
loc_8E48B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
add rsi, 100h
call _gguf_find_tensor
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_8E4CA
mov rcx, [rbp+var_10]
add rcx, 100h
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov esi, 444h
lea rdx, aDuplicateTenso; "duplicate tensor name: %s"
mov al, 0
call _ggml_abort
loc_8E4CA:
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_168]
mov edx, 150h
call _memcpy
mov rdi, [rbp+var_8]
add rdi, 20h ; ' '
call __ZNKSt6vectorI16gguf_tensor_infoSaIS0_EE5emptyEv; std::vector<gguf_tensor_info>::empty(void)
test al, 1
jnz short loc_8E4F2
jmp short loc_8E4FD
loc_8E4F2:
xor eax, eax
mov [rbp+var_170], rax
jmp short loc_8E560
loc_8E4FD:
mov rdi, [rbp+var_8]
add rdi, 20h ; ' '
call __ZNSt6vectorI16gguf_tensor_infoSaIS0_EE4backEv; std::vector<gguf_tensor_info>::back(void)
mov rax, [rax+150h]
mov [rbp+var_178], rax
mov rdi, [rbp+var_8]
add rdi, 20h ; ' '
call __ZNSt6vectorI16gguf_tensor_infoSaIS0_EE4backEv; std::vector<gguf_tensor_info>::back(void)
mov rdi, rax
call _ggml_nbytes
mov rcx, rax
mov rax, [rbp+var_178]
mov rdx, [rbp+var_8]
add rcx, [rdx+38h]
sub rcx, 1
mov rdx, [rbp+var_8]
mov rdx, [rdx+38h]
sub rdx, 1
xor rdx, 0FFFFFFFFFFFFFFFFh
and rcx, rdx
add rax, rcx
mov [rbp+var_170], rax
loc_8E560:
mov rax, [rbp+var_170]
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]
add rdi, 20h ; ' '
lea rsi, [rbp+var_168]
call __ZNSt6vectorI16gguf_tensor_infoSaIS0_EE9push_backERKS0_; std::vector<gguf_tensor_info>::push_back(gguf_tensor_info const&)
add rsp, 180h
pop rbp
retn
|
long long gguf_add_tensor(long long a1, long long a2)
{
long long v2; // rdx
unsigned int *v3; // rax
long long v4; // rax
long long v6; // [rsp+8h] [rbp-178h]
long long v7; // [rsp+10h] [rbp-170h]
_BYTE v8[336]; // [rsp+18h] [rbp-168h] BYREF
long long v9; // [rsp+168h] [rbp-18h]
long long v10; // [rsp+170h] [rbp-10h]
long long v11; // [rsp+178h] [rbp-8h]
v11 = a1;
v10 = a2;
if ( !a2 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
1090,
(long long)"GGML_ASSERT(%s) failed",
"tensor");
if ( gguf_find_tensor(v11, v10 + 256) != -1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
1092,
(long long)"duplicate tensor name: %s",
(const char *)(v10 + 256));
memcpy(v8, v10, sizeof(v8));
if ( (std::vector<gguf_tensor_info>::empty(v11 + 32) & 1) != 0 )
{
v7 = 0LL;
}
else
{
v6 = *(_QWORD *)(std::vector<gguf_tensor_info>::back(v11 + 32) + 336);
v3 = (unsigned int *)std::vector<gguf_tensor_info>::back(v11 + 32);
v4 = ggml_nbytes(v3);
v2 = ~(*(_QWORD *)(v11 + 56) - 1LL);
v7 = (v2 & (*(_QWORD *)(v11 + 56) + v4 - 1)) + v6;
}
v9 = v7;
return std::vector<gguf_tensor_info>::push_back(v11 + 32, v8, v2);
}
|
gguf_add_tensor:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0018e48b
LEA RDI,[0x1c25c9]
MOV ESI,0x442
LEA RDX,[0x1b1609]
LEA RCX,[0x1b3db8]
MOV AL,0x0
CALL 0x00148a00
LAB_0018e48b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x100
CALL 0x00146340
CMP RAX,-0x1
JZ 0x0018e4ca
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x100
LEA RDI,[0x1c25c9]
MOV ESI,0x444
LEA RDX,[0x1c2b6f]
MOV AL,0x0
CALL 0x00148a00
LAB_0018e4ca:
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x168]
MOV EDX,0x150
CALL 0x001453f0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x20
CALL 0x00143cf0
TEST AL,0x1
JNZ 0x0018e4f2
JMP 0x0018e4fd
LAB_0018e4f2:
XOR EAX,EAX
MOV qword ptr [RBP + -0x170],RAX
JMP 0x0018e560
LAB_0018e4fd:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x20
CALL 0x00149780
MOV RAX,qword ptr [RAX + 0x150]
MOV qword ptr [RBP + -0x178],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x20
CALL 0x00149780
MOV RDI,RAX
CALL 0x00142650
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x178]
MOV RDX,qword ptr [RBP + -0x8]
ADD RCX,qword ptr [RDX + 0x38]
SUB RCX,0x1
MOV RDX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RDX + 0x38]
SUB RDX,0x1
XOR RDX,-0x1
AND RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x170],RAX
LAB_0018e560:
MOV RAX,qword ptr [RBP + -0x170]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x20
LEA RSI,[RBP + -0x168]
CALL 0x00145ac0
ADD RSP,0x180
POP RBP
RET
|
void gguf_add_tensor(long param_1,void *param_2)
{
long lVar1;
ulong uVar2;
int8 uVar3;
long local_178;
gguf_tensor_info local_170 [336];
long local_20;
void *local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
if (param_2 == (void *)0x0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0x442,"GGML_ASSERT(%s) failed","tensor");
}
lVar1 = gguf_find_tensor(local_10,(long)local_18 + 0x100);
if (lVar1 != -1) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0x444,"duplicate tensor name: %s",(long)local_18 + 0x100);
}
memcpy(local_170,local_18,0x150);
uVar2 = std::vector<gguf_tensor_info,std::allocator<gguf_tensor_info>>::empty
((vector<gguf_tensor_info,std::allocator<gguf_tensor_info>> *)(local_10 + 0x20))
;
if ((uVar2 & 1) == 0) {
lVar1 = std::vector<gguf_tensor_info,std::allocator<gguf_tensor_info>>::back
((vector<gguf_tensor_info,std::allocator<gguf_tensor_info>> *)
(local_10 + 0x20));
local_178 = *(long *)(lVar1 + 0x150);
uVar3 = std::vector<gguf_tensor_info,std::allocator<gguf_tensor_info>>::back
((vector<gguf_tensor_info,std::allocator<gguf_tensor_info>> *)
(local_10 + 0x20));
lVar1 = ggml_nbytes(uVar3);
local_178 = local_178 +
((lVar1 + *(long *)(local_10 + 0x38)) - 1U &
(*(long *)(local_10 + 0x38) - 1U ^ 0xffffffffffffffff));
}
else {
local_178 = 0;
}
local_20 = local_178;
std::vector<gguf_tensor_info,std::allocator<gguf_tensor_info>>::push_back
((vector<gguf_tensor_info,std::allocator<gguf_tensor_info>> *)(local_10 + 0x20),
local_170);
return;
}
|
|
62,133 |
my_tosort_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static inline void
my_tosort_utf16(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
{
if (*wc <= uni_plane->maxchar)
{
MY_UNICASE_CHARACTER *page;
if ((page= uni_plane->page[*wc >> 8]))
*wc= page[*wc & 0xFF].sort;
}
else
{
*wc= MY_CS_REPLACEMENT_CHARACTER;
}
}
|
O0
|
c
|
my_tosort_utf16:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0xae7c4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xae7c2
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
andq $0xff, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xae7cf
movq -0x10(%rbp), %rax
movq $0xfffd, (%rax) # imm = 0xFFFD
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_tosort_utf16:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_8]
cmp rax, [rcx]
ja short loc_AE7C4
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
shr rcx, 8
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_AE7C2
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
and rcx, 0FFh
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+8]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
loc_AE7C2:
jmp short loc_AE7CF
loc_AE7C4:
mov rax, [rbp+var_10]
mov qword ptr [rax], 0FFFDh
loc_AE7CF:
pop rbp
retn
|
_QWORD * my_tosort_utf16(_QWORD *a1, _QWORD *a2)
{
_QWORD *result; // rax
_QWORD *v3; // [rsp+0h] [rbp-18h]
if ( *a2 > *a1 )
{
result = a2;
*a2 = 65533LL;
}
else
{
result = *(_QWORD **)(a1[1] + 8LL * (*a2 >> 8));
v3 = result;
if ( result )
{
result = a2;
*a2 = *((unsigned int *)v3 + 3 * (unsigned __int8)*a2 + 2);
}
}
return result;
}
|
my_tosort_utf16:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX]
JA 0x001ae7c4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x001ae7c2
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
AND RCX,0xff
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
LAB_001ae7c2:
JMP 0x001ae7cf
LAB_001ae7c4:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0xfffd
LAB_001ae7cf:
POP RBP
RET
|
void my_tosort_utf16(ulong *param_1,ulong *param_2)
{
long lVar1;
if (*param_1 < *param_2) {
*param_2 = 0xfffd;
}
else {
lVar1 = *(long *)(param_1[1] + (*param_2 >> 8) * 8);
if (lVar1 != 0) {
*param_2 = (ulong)*(uint *)(lVar1 + (*param_2 & 0xff) * 0xc + 8);
}
}
return;
}
|
|
62,134 |
mi_store_blob_length
|
eloqsql/storage/myisam/mi_dynrec.c
|
void _mi_store_blob_length(uchar *pos,uint pack_length,uint length)
{
switch (pack_length) {
case 1:
*pos= (uchar) length;
break;
case 2:
int2store(pos,length);
break;
case 3:
int3store(pos,length);
break;
case 4:
int4store(pos,length);
default:
break;
}
return;
}
|
O3
|
c
|
mi_store_blob_length:
pushq %rbp
movq %rsp, %rbp
decl %esi
cmpl $0x3, %esi
ja 0x41faa
leaq 0x70c13(%rip), %rax # 0xb2b9c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb %dl, (%rdi)
jmp 0x41faa
movb %dl, (%rdi)
movb %dh, 0x1(%rdi)
shrl $0x10, %edx
movb %dl, 0x2(%rdi)
jmp 0x41faa
movl %edx, (%rdi)
jmp 0x41faa
movw %dx, (%rdi)
popq %rbp
retq
|
_mi_store_blob_length:
push rbp
mov rbp, rsp
dec esi; switch 4 cases
cmp esi, 3
ja short def_41F90; jumptable 0000000000041F90 default case
lea rax, jpt_41F90
movsxd rcx, ds:(jpt_41F90 - 0B2B9Ch)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_41F92:
mov [rdi], dl; jumptable 0000000000041F90 case 1
jmp short def_41F90; jumptable 0000000000041F90 default case
loc_41F96:
mov [rdi], dl; jumptable 0000000000041F90 case 3
mov [rdi+1], dh
shr edx, 10h
mov [rdi+2], dl
jmp short def_41F90; jumptable 0000000000041F90 default case
loc_41FA3:
mov [rdi], edx; jumptable 0000000000041F90 case 4
jmp short def_41F90; jumptable 0000000000041F90 default case
loc_41FA7:
mov [rdi], dx; jumptable 0000000000041F90 case 2
def_41F90:
pop rbp; jumptable 0000000000041F90 default case
retn
|
void mi_store_blob_length(_BYTE *a1, int a2, int a3)
{
switch ( a2 )
{
case 1:
*a1 = a3;
break;
case 2:
*(_WORD *)a1 = a3;
break;
case 3:
*(_WORD *)a1 = a3;
a1[2] = BYTE2(a3);
break;
case 4:
*(_DWORD *)a1 = a3;
break;
default:
return;
}
}
|
_mi_store_blob_length:
PUSH RBP
MOV RBP,RSP
DEC ESI
CMP ESI,0x3
JA 0x00141faa
LEA RAX,[0x1b2b9c]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
MOV byte ptr [RDI],DL
JMP 0x00141faa
caseD_3:
MOV byte ptr [RDI],DL
MOV byte ptr [RDI + 0x1],DH
SHR EDX,0x10
MOV byte ptr [RDI + 0x2],DL
JMP 0x00141faa
caseD_4:
MOV dword ptr [RDI],EDX
JMP 0x00141faa
caseD_2:
MOV word ptr [RDI],DX
default:
POP RBP
RET
|
void _mi_store_blob_length(int4 *param_1,int4 param_2,int4 param_3)
{
switch(param_2) {
case 1:
*(char *)param_1 = (char)param_3;
break;
case 2:
*(short *)param_1 = (short)param_3;
break;
case 3:
*(char *)param_1 = (char)param_3;
*(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8);
*(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10);
break;
case 4:
*param_1 = param_3;
}
return;
}
|
|
62,135 |
add_cfg_dir
|
eloqsql/libmariadb/libmariadb/ma_default.c
|
static int add_cfg_dir(char **cfg_dirs, const char *directory)
{
int i;
for (i = 0; i < MAX_CONFIG_DIRS && cfg_dirs[i]; i++)
if (!strcmp(cfg_dirs[i], directory)) /* already present */
return 0;
if (i < MAX_CONFIG_DIRS) {
cfg_dirs[i]= strdup(directory);
return 0;
}
return 1;
}
|
O3
|
c
|
add_cfg_dir:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x35708
movq %r14, %rsi
callq 0x13640
testl %eax, %eax
je 0x35714
incq %r15
cmpq $0x6, %r15
jne 0x356e3
movl $0x1, %eax
jmp 0x35716
movq %r14, %rdi
callq 0x137d0
movq %rax, (%rbx,%r15,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
add_cfg_dir:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
xor r15d, r15d
loc_356E3:
mov rdi, [rbx+r15*8]
test rdi, rdi
jz short loc_35708
mov rsi, r14
call _strcmp
test eax, eax
jz short loc_35714
inc r15
cmp r15, 6
jnz short loc_356E3
mov eax, 1
jmp short loc_35716
loc_35708:
mov rdi, r14
call _strdup
mov [rbx+r15*8], rax
loc_35714:
xor eax, eax
loc_35716:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long add_cfg_dir(long long a1, long long a2)
{
long long v3; // r15
long long v4; // rdi
v3 = 0LL;
while ( 1 )
{
v4 = *(_QWORD *)(a1 + 8 * v3);
if ( !v4 )
break;
if ( !(unsigned int)strcmp(v4, a2) )
return 0LL;
if ( ++v3 == 6 )
return 1LL;
}
*(_QWORD *)(a1 + 8 * v3) = strdup(a2);
return 0LL;
}
|
add_cfg_dir:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
XOR R15D,R15D
LAB_001356e3:
MOV RDI,qword ptr [RBX + R15*0x8]
TEST RDI,RDI
JZ 0x00135708
MOV RSI,R14
CALL 0x00113640
TEST EAX,EAX
JZ 0x00135714
INC R15
CMP R15,0x6
JNZ 0x001356e3
MOV EAX,0x1
JMP 0x00135716
LAB_00135708:
MOV RDI,R14
CALL 0x001137d0
MOV qword ptr [RBX + R15*0x8],RAX
LAB_00135714:
XOR EAX,EAX
LAB_00135716:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 add_cfg_dir(long param_1,char *param_2)
{
int iVar1;
char *pcVar2;
long lVar3;
lVar3 = 0;
while( true ) {
pcVar2 = *(char **)(param_1 + lVar3 * 8);
if (pcVar2 == (char *)0x0) {
pcVar2 = strdup(param_2);
*(char **)(param_1 + lVar3 * 8) = pcVar2;
return 0;
}
iVar1 = strcmp(pcVar2,param_2);
if (iVar1 == 0) break;
lVar3 = lVar3 + 1;
if (lVar3 == 6) {
return 1;
}
}
return 0;
}
|
|
62,136 |
my_hash_free_elements
|
eloqsql/mysys/hash.c
|
static inline void my_hash_free_elements(HASH *hash)
{
uint records= hash->records;
if (records == 0)
return;
/*
Set records to 0 early to guard against anyone looking at the structure
during the free process
*/
hash->records= 0;
if (hash->free)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
HASH_LINK *end= data + records;
do
{
(*hash->free)((data++)->data);
} while (data < end);
}
}
|
O0
|
c
|
my_hash_free_elements:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2c25f
jmp 0x2c2bd
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x2c2bd
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x10, %rdx
movq %rdx, -0x18(%rbp)
movq 0x8(%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x2c294
jmp 0x2c2bd
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_free_elements:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_2C25F
jmp short loc_2C2BD
loc_2C25F:
mov rax, [rbp+var_8]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_2C2BD
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov [rbp+var_20], rax
loc_2C294:
mov rax, [rbp+var_8]
mov rax, [rax+60h]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 10h
mov [rbp+var_18], rdx
mov rdi, [rcx+8]
call rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_2C294
jmp short $+2
loc_2C2BD:
add rsp, 20h
pop rbp
retn
|
unsigned long long my_hash_free_elements(unsigned long long a1)
{
unsigned long long result; // rax
unsigned long long v2; // rcx
unsigned long long v3; // [rsp+0h] [rbp-20h]
unsigned long long v4; // [rsp+8h] [rbp-18h]
unsigned int v5; // [rsp+14h] [rbp-Ch]
result = *(_QWORD *)(a1 + 24);
v5 = result;
if ( (_DWORD)result )
{
*(_QWORD *)(a1 + 24) = 0LL;
result = a1;
if ( *(_QWORD *)(a1 + 96) )
{
v4 = *(_QWORD *)(a1 + 40);
v3 = 16LL * v5 + v4;
do
{
v2 = v4;
v4 += 16LL;
(*(void ( **)(_QWORD))(a1 + 96))(*(_QWORD *)(v2 + 8));
result = v4;
}
while ( v4 < v3 );
}
}
return result;
}
|
my_hash_free_elements:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0012c25f
JMP 0x0012c2bd
LAB_0012c25f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0012c2bd
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_0012c294:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x10
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RCX + 0x8]
CALL RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0012c294
JMP 0x0012c2bd
LAB_0012c2bd:
ADD RSP,0x20
POP RBP
RET
|
void my_hash_free_elements(long param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong local_20;
uVar1 = *(ulong *)(param_1 + 0x18);
if (((int)uVar1 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) {
uVar2 = *(ulong *)(param_1 + 0x28);
local_20 = uVar2;
do {
uVar3 = local_20 + 0x10;
(**(code **)(param_1 + 0x60))(*(int8 *)(local_20 + 8));
local_20 = uVar3;
} while (uVar3 < uVar2 + (uVar1 & 0xffffffff) * 0x10);
}
return;
}
|
|
62,137 |
bf_atan2_internal
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_atan2_internal(bf_t *r, const bf_t *y, limb_t prec, void *opaque)
{
bf_context_t *s = r->ctx;
const bf_t *x = opaque;
bf_t T_s, *T = &T_s;
limb_t prec1;
int ret;
if (y->expn == BF_EXP_NAN || x->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
}
/* compute atan(y/x) assumming inf/inf = 1 and 0/0 = 0 */
bf_init(s, T);
prec1 = prec + 32;
if (y->expn == BF_EXP_INF && x->expn == BF_EXP_INF) {
bf_set_ui(T, 1);
T->sign = y->sign ^ x->sign;
} else if (y->expn == BF_EXP_ZERO && x->expn == BF_EXP_ZERO) {
bf_set_zero(T, y->sign ^ x->sign);
} else {
bf_div(T, y, x, prec1, BF_RNDF);
}
ret = bf_atan(r, T, prec1, BF_RNDF);
if (x->sign) {
/* if x < 0 (it includes -0), return sign(y)*pi + atan(y/x) */
bf_const_pi(T, prec1, BF_RNDF);
T->sign = y->sign;
bf_add(r, r, T, prec1, BF_RNDN);
ret |= BF_ST_INEXACT;
}
bf_delete(T);
return ret;
}
|
O2
|
c
|
bf_atan2_internal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq 0x10(%rsi), %rdx
cmpq %rax, %rdx
je 0x79a3f
movq %rcx, %r12
movq 0x10(%rcx), %rcx
cmpq %rax, %rcx
jne 0x79a4e
movq %r14, %rdi
callq 0x7317d
xorl %ebp, %ebp
jmp 0x79b2f
movq %rsi, %r15
movq (%r14), %rsi
movq %rsi, (%rsp)
andl $0x0, 0x8(%rsp)
leaq 0x1(%rax), %rsi
movq %rsi, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
addq $0x20, %rbx
movq %rdx, %rdi
negq %rdi
jo 0x79aae
movabsq $0x7ffffffffffffffe, %rsi # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rsi, %rdx
jne 0x79ac6
decq %rax
cmpq %rax, %rcx
jne 0x79ac6
movq %rsp, %r13
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0x73106
movl 0x8(%r12), %eax
xorl 0x8(%r15), %eax
movl %eax, 0x8(%r13)
jmp 0x79adb
cmpq %rsi, %rcx
jne 0x79ac6
movl 0x8(%r12), %esi
xorl 0x8(%r15), %esi
movq %rsp, %rdi
callq 0x731c2
jmp 0x79adb
movq %rsp, %rdi
pushq $0x6
popq %r8
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x758a2
movq %rsp, %rsi
pushq $0x6
popq %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x7950d
movl %eax, %ebp
cmpl $0x0, 0x8(%r12)
je 0x79b27
movq %rsp, %r12
pushq $0x6
popq %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x77ca8
movl 0x8(%r15), %eax
movl %eax, 0x8(%r12)
movq %r14, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x757f9
orl $0x10, %ebp
movq %rsp, %rdi
callq 0x7500e
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_atan2_internal:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rdi
mov rax, 7FFFFFFFFFFFFFFFh
mov rdx, [rsi+10h]
cmp rdx, rax
jz short loc_79A3F
mov r12, rcx
mov rcx, [rcx+10h]
cmp rcx, rax
jnz short loc_79A4E
loc_79A3F:
mov rdi, r14
call bf_set_nan
xor ebp, ebp
jmp loc_79B2F
loc_79A4E:
mov r15, rsi
mov rsi, [r14]
mov [rsp+58h+var_58], rsi
and [rsp+58h+var_50], 0
lea rsi, [rax+1]
mov [rsp+58h+var_48], rsi
xorps xmm0, xmm0
movups [rsp+58h+var_40], xmm0
add rbx, 20h ; ' '
mov rdi, rdx
neg rdi
jo short loc_79AAE
mov rsi, 7FFFFFFFFFFFFFFEh
cmp rdx, rsi
jnz short loc_79AC6
dec rax
cmp rcx, rax
jnz short loc_79AC6
mov r13, rsp
push 1
pop rsi
mov rdi, r13
call bf_set_ui
mov eax, [r12+8]
xor eax, [r15+8]
mov [r13+8], eax
jmp short loc_79ADB
loc_79AAE:
cmp rcx, rsi
jnz short loc_79AC6
mov esi, [r12+8]
xor esi, [r15+8]
mov rdi, rsp
call bf_set_zero
jmp short loc_79ADB
loc_79AC6:
mov rdi, rsp
push 6
pop r8
mov rsi, r15
mov rdx, r12
mov rcx, rbx
call bf_div
loc_79ADB:
mov rsi, rsp
push 6
pop rcx
mov rdi, r14
mov rdx, rbx
call bf_atan
mov ebp, eax
cmp dword ptr [r12+8], 0
jz short loc_79B27
mov r12, rsp
push 6
pop rdx
mov rdi, r12
mov rsi, rbx
call bf_const_pi
mov eax, [r15+8]
mov [r12+8], eax
mov rdi, r14
mov rsi, r14
mov rdx, r12
mov rcx, rbx
xor r8d, r8d
call bf_add
or ebp, 10h
loc_79B27:
mov rdi, rsp
call bf_delete_0
loc_79B2F:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_atan2_internal(long long *a1, long long a2, long long a3, long long a4)
{
long long v5; // rdx
long long v7; // rcx
unsigned int v8; // ebp
long long v9; // rbx
__int128 v11; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v12; // [rsp+10h] [rbp-48h]
__int128 v13; // [rsp+18h] [rbp-40h]
v5 = *(_QWORD *)(a2 + 16);
if ( v5 == 0x7FFFFFFFFFFFFFFFLL || (v7 = *(_QWORD *)(a4 + 16), v7 == 0x7FFFFFFFFFFFFFFFLL) )
{
bf_set_nan((long long)a1);
return 0;
}
*(_QWORD *)&v11 = *a1;
DWORD2(v11) = 0;
v12 = 0x8000000000000000LL;
v13 = 0LL;
v9 = a3 + 32;
if ( __OFSUB__(-v5, 1LL) )
{
if ( v7 == 0x8000000000000000LL )
{
bf_set_zero((long long)&v11, *(_DWORD *)(a2 + 8) ^ *(_DWORD *)(a4 + 8));
goto LABEL_11;
}
LABEL_10:
bf_div(&v11, (__int128 *)a2, (__int128 *)a4, v9, 6LL);
goto LABEL_11;
}
if ( v5 != 0x7FFFFFFFFFFFFFFELL || v7 != 0x7FFFFFFFFFFFFFFELL )
goto LABEL_10;
bf_set_ui((long long)&v11, 1uLL);
DWORD2(v11) = *(_DWORD *)(a2 + 8) ^ *(_DWORD *)(a4 + 8);
LABEL_11:
v8 = bf_atan(a1, (long long)&v11, v9, 6u);
if ( *(_DWORD *)(a4 + 8) )
{
bf_const_pi((long long)&v11, v9, 6u);
DWORD2(v11) = *(_DWORD *)(a2 + 8);
bf_add((long long)a1, (long long)a1, (long long)&v11, v9, 0LL);
v8 |= 0x10u;
}
bf_delete_0((long long *)&v11);
return v8;
}
|
bf_atan2_internal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RDI
MOV RAX,0x7fffffffffffffff
MOV RDX,qword ptr [RSI + 0x10]
CMP RDX,RAX
JZ 0x00179a3f
MOV R12,RCX
MOV RCX,qword ptr [RCX + 0x10]
CMP RCX,RAX
JNZ 0x00179a4e
LAB_00179a3f:
MOV RDI,R14
CALL 0x0017317d
XOR EBP,EBP
JMP 0x00179b2f
LAB_00179a4e:
MOV R15,RSI
MOV RSI,qword ptr [R14]
MOV qword ptr [RSP],RSI
AND dword ptr [RSP + 0x8],0x0
LEA RSI,[RAX + 0x1]
MOV qword ptr [RSP + 0x10],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
ADD RBX,0x20
MOV RDI,RDX
NEG RDI
JO 0x00179aae
MOV RSI,0x7ffffffffffffffe
CMP RDX,RSI
JNZ 0x00179ac6
DEC RAX
CMP RCX,RAX
JNZ 0x00179ac6
MOV R13,RSP
PUSH 0x1
POP RSI
MOV RDI,R13
CALL 0x00173106
MOV EAX,dword ptr [R12 + 0x8]
XOR EAX,dword ptr [R15 + 0x8]
MOV dword ptr [R13 + 0x8],EAX
JMP 0x00179adb
LAB_00179aae:
CMP RCX,RSI
JNZ 0x00179ac6
MOV ESI,dword ptr [R12 + 0x8]
XOR ESI,dword ptr [R15 + 0x8]
MOV RDI,RSP
CALL 0x001731c2
JMP 0x00179adb
LAB_00179ac6:
MOV RDI,RSP
PUSH 0x6
POP R8
MOV RSI,R15
MOV RDX,R12
MOV RCX,RBX
CALL 0x001758a2
LAB_00179adb:
MOV RSI,RSP
PUSH 0x6
POP RCX
MOV RDI,R14
MOV RDX,RBX
CALL 0x0017950d
MOV EBP,EAX
CMP dword ptr [R12 + 0x8],0x0
JZ 0x00179b27
MOV R12,RSP
PUSH 0x6
POP RDX
MOV RDI,R12
MOV RSI,RBX
CALL 0x00177ca8
MOV EAX,dword ptr [R15 + 0x8]
MOV dword ptr [R12 + 0x8],EAX
MOV RDI,R14
MOV RSI,R14
MOV RDX,R12
MOV RCX,RBX
XOR R8D,R8D
CALL 0x001757f9
OR EBP,0x10
LAB_00179b27:
MOV RDI,RSP
CALL 0x0017500e
LAB_00179b2f:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00179aae) */
/* WARNING: Removing unreachable block (ram,0x00179ab3) */
uint bf_atan2_internal(int8 *param_1,long param_2,long param_3,long param_4)
{
uint uVar1;
int8 local_58;
uint local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
if ((*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) ||
(*(long *)(param_4 + 0x10) == 0x7fffffffffffffff)) {
bf_set_nan(param_1);
uVar1 = 0;
}
else {
local_58 = *param_1;
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
param_3 = param_3 + 0x20;
if ((*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) &&
(*(long *)(param_4 + 0x10) == 0x7ffffffffffffffe)) {
bf_set_ui(&local_58,1);
local_50 = *(uint *)(param_4 + 8) ^ *(uint *)(param_2 + 8);
}
else {
bf_div(&local_58,param_2,param_4,param_3,6);
}
uVar1 = bf_atan(param_1,&local_58,param_3,6);
if (*(int *)(param_4 + 8) != 0) {
bf_const_pi(&local_58,param_3,6);
local_50 = *(uint *)(param_2 + 8);
bf_add(param_1,param_1,&local_58,param_3,0);
uVar1 = uVar1 | 0x10;
}
bf_delete(&local_58);
}
return uVar1;
}
|
|
62,138 |
bf_atan2_internal
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_atan2_internal(bf_t *r, const bf_t *y, limb_t prec, void *opaque)
{
bf_context_t *s = r->ctx;
const bf_t *x = opaque;
bf_t T_s, *T = &T_s;
limb_t prec1;
int ret;
if (y->expn == BF_EXP_NAN || x->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
}
/* compute atan(y/x) assumming inf/inf = 1 and 0/0 = 0 */
bf_init(s, T);
prec1 = prec + 32;
if (y->expn == BF_EXP_INF && x->expn == BF_EXP_INF) {
bf_set_ui(T, 1);
T->sign = y->sign ^ x->sign;
} else if (y->expn == BF_EXP_ZERO && x->expn == BF_EXP_ZERO) {
bf_set_zero(T, y->sign ^ x->sign);
} else {
bf_div(T, y, x, prec1, BF_RNDF);
}
ret = bf_atan(r, T, prec1, BF_RNDF);
if (x->sign) {
/* if x < 0 (it includes -0), return sign(y)*pi + atan(y/x) */
bf_const_pi(T, prec1, BF_RNDF);
T->sign = y->sign;
bf_add(r, r, T, prec1, BF_RNDN);
ret |= BF_ST_INEXACT;
}
bf_delete(T);
return ret;
}
|
O3
|
c
|
bf_atan2_internal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rdi, %rbx
movabsq $0x7fffffffffffffff, %r13 # imm = 0x7FFFFFFFFFFFFFFF
movq (%rdi), %rcx
movq 0x10(%rsi), %rdx
cmpq %r13, %rdx
je 0x93c98
movq 0x10(%r12), %rax
cmpq %r13, %rax
jne 0x93cd5
cmpq $0x0, 0x18(%rbx)
je 0x93cb7
movq 0x20(%rbx), %rsi
movq (%rcx), %rdi
xorl %edx, %edx
callq *0x8(%rcx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r13, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r15
movq %rcx, (%rsp)
movl $0x0, 0x8(%rsp)
leaq 0x1(%r13), %rcx
movq %rcx, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
addq $0x20, %r14
movq %rdx, %rsi
negq %rsi
jo 0x93d37
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rdx
jne 0x93d4b
decq %r13
cmpq %r13, %rax
jne 0x93d4b
movq %rsp, %r13
movl $0x1, %esi
movq %r13, %rdi
callq 0x8b510
movl 0x8(%r12), %eax
xorl 0x8(%r15), %eax
movl %eax, 0x8(%r13)
jmp 0x93d69
cmpq %rcx, %rax
jne 0x93d4b
movl 0x8(%r12), %eax
xorl 0x8(%r15), %eax
movl %eax, 0x8(%rsp)
jmp 0x93d69
leaq -0x5654(%rip), %r9 # 0x8e6fe
movq %rsp, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movl $0x6, %r8d
callq 0x8e645
movq %rsp, %rsi
movq %rbx, %rdi
movq %r14, %rdx
movl $0x6, %ecx
callq 0x9358e
movl %eax, %ebp
cmpl $0x0, 0x8(%r12)
je 0x93dd2
movq %rsp, %r12
movq (%r12), %rcx
addq $0x40, %rcx
leaq 0x4c49(%rip), %r8 # 0x989e1
movq %r12, %rdi
movq %r14, %rsi
movl $0x6, %edx
xorl %r9d, %r9d
callq 0x910e4
movl 0x8(%r15), %eax
movl %eax, 0x8(%r12)
leaq -0x56dc(%rip), %r9 # 0x8e6df
movq %rbx, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x8e645
orl $0x10, %ebp
movq (%rsp), %rax
testq %rax, %rax
je 0x93cc4
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x93cc4
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x93cc4
|
bf_atan2_internal:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rcx
mov r14, rdx
mov rbx, rdi
mov r13, 7FFFFFFFFFFFFFFFh
mov rcx, [rdi]
mov rdx, [rsi+10h]
cmp rdx, r13
jz short loc_93C98
mov rax, [r12+10h]
cmp rax, r13
jnz short loc_93CD5
loc_93C98:
cmp qword ptr [rbx+18h], 0
jz short loc_93CB7
mov rsi, [rbx+20h]
mov rdi, [rcx]
xor edx, edx
call qword ptr [rcx+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_93CB7:
mov [rbx+10h], r13
mov dword ptr [rbx+8], 0
xor ebp, ebp
loc_93CC4:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93CD5:
mov r15, rsi
mov [rsp+58h+var_58], rcx
mov [rsp+58h+var_50], 0
lea rcx, [r13+1]
mov [rsp+58h+var_48], rcx
xorps xmm0, xmm0
movups [rsp+58h+var_40], xmm0
add r14, 20h ; ' '
mov rsi, rdx
neg rsi
jo short loc_93D37
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rdx, rcx
jnz short loc_93D4B
dec r13
cmp rax, r13
jnz short loc_93D4B
mov r13, rsp
mov esi, 1
mov rdi, r13
call bf_set_ui
mov eax, [r12+8]
xor eax, [r15+8]
mov [r13+8], eax
jmp short loc_93D69
loc_93D37:
cmp rax, rcx
jnz short loc_93D4B
mov eax, [r12+8]
xor eax, [r15+8]
mov [rsp+58h+var_50], eax
jmp short loc_93D69
loc_93D4B:
lea r9, __bf_div
mov rdi, rsp
mov rsi, r15
mov rdx, r12
mov rcx, r14
mov r8d, 6
call bf_op2
loc_93D69:
mov rsi, rsp
mov rdi, rbx
mov rdx, r14
mov ecx, 6
call bf_atan
mov ebp, eax
cmp dword ptr [r12+8], 0
jz short loc_93DD2
mov r12, rsp
mov rcx, [r12]
add rcx, 40h ; '@'
lea r8, bf_const_pi_internal
mov rdi, r12
mov rsi, r14
mov edx, 6
xor r9d, r9d
call bf_const_get
mov eax, [r15+8]
mov [r12+8], eax
lea r9, __bf_add
mov rdi, rbx
mov rsi, rbx
mov rdx, r12
mov rcx, r14
xor r8d, r8d
call bf_op2
or ebp, 10h
loc_93DD2:
mov rax, [rsp+58h+var_58]
test rax, rax
jz loc_93CC4
mov rsi, qword ptr [rsp+58h+var_40+8]
test rsi, rsi
jz loc_93CC4
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp loc_93CC4
|
long long bf_atan2_internal(__int128 *a1, long long a2, long long a3, long long a4)
{
long long v6; // rdx
long long v7; // rax
unsigned int v8; // ebp
long long v10; // r14
__int128 v11; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v12; // [rsp+10h] [rbp-48h]
__int128 v13; // [rsp+18h] [rbp-40h]
v6 = *(_QWORD *)(a2 + 16);
if ( v6 == 0x7FFFFFFFFFFFFFFFLL || (v7 = *(_QWORD *)(a4 + 16), v7 == 0x7FFFFFFFFFFFFFFFLL) )
{
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
return 0;
}
*(_QWORD *)&v11 = *(_QWORD *)a1;
DWORD2(v11) = 0;
v12 = 0x8000000000000000LL;
v13 = 0LL;
v10 = a3 + 32;
if ( __OFSUB__(-v6, 1LL) )
{
if ( v7 == 0x8000000000000000LL )
{
DWORD2(v11) = *(_DWORD *)(a2 + 8) ^ *(_DWORD *)(a4 + 8);
goto LABEL_14;
}
LABEL_13:
bf_op2(&v11, (__int128 *)a2, (__int128 *)a4, v10, 6LL, (long long ( *)(__int128 *))_bf_div);
goto LABEL_14;
}
if ( v6 != 0x7FFFFFFFFFFFFFFELL || v7 != 0x7FFFFFFFFFFFFFFELL )
goto LABEL_13;
bf_set_ui((_QWORD **)&v11, 1uLL);
DWORD2(v11) = *(_DWORD *)(a2 + 8) ^ *(_DWORD *)(a4 + 8);
LABEL_14:
v8 = bf_atan((long long)a1, (long long)&v11, v10, 6u);
if ( *(_DWORD *)(a4 + 8) )
{
bf_const_get(
(long long)&v11,
v10,
6u,
v11 + 64,
(void ( *)(long long, unsigned long long))bf_const_pi_internal,
0);
DWORD2(v11) = *(_DWORD *)(a2 + 8);
bf_op2(a1, a1, &v11, v10, 0LL, (long long ( *)(__int128 *))_bf_add);
v8 |= 0x10u;
}
if ( (_QWORD)v11 && *((_QWORD *)&v13 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v11 + 8))(*(_QWORD *)v11, *((_QWORD *)&v13 + 1), 0LL);
return v8;
}
|
bf_atan2_internal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RCX
MOV R14,RDX
MOV RBX,RDI
MOV R13,0x7fffffffffffffff
MOV RCX,qword ptr [RDI]
MOV RDX,qword ptr [RSI + 0x10]
CMP RDX,R13
JZ 0x00193c98
MOV RAX,qword ptr [R12 + 0x10]
CMP RAX,R13
JNZ 0x00193cd5
LAB_00193c98:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x00193cb7
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RCX]
XOR EDX,EDX
CALL qword ptr [RCX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_00193cb7:
MOV qword ptr [RBX + 0x10],R13
MOV dword ptr [RBX + 0x8],0x0
XOR EBP,EBP
LAB_00193cc4:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00193cd5:
MOV R15,RSI
MOV qword ptr [RSP],RCX
MOV dword ptr [RSP + 0x8],0x0
LEA RCX,[R13 + 0x1]
MOV qword ptr [RSP + 0x10],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
ADD R14,0x20
MOV RSI,RDX
NEG RSI
JO 0x00193d37
MOV RCX,0x7ffffffffffffffe
CMP RDX,RCX
JNZ 0x00193d4b
DEC R13
CMP RAX,R13
JNZ 0x00193d4b
MOV R13,RSP
MOV ESI,0x1
MOV RDI,R13
CALL 0x0018b510
MOV EAX,dword ptr [R12 + 0x8]
XOR EAX,dword ptr [R15 + 0x8]
MOV dword ptr [R13 + 0x8],EAX
JMP 0x00193d69
LAB_00193d37:
CMP RAX,RCX
JNZ 0x00193d4b
MOV EAX,dword ptr [R12 + 0x8]
XOR EAX,dword ptr [R15 + 0x8]
MOV dword ptr [RSP + 0x8],EAX
JMP 0x00193d69
LAB_00193d4b:
LEA R9,[0x18e6fe]
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
MOV R8D,0x6
CALL 0x0018e645
LAB_00193d69:
MOV RSI,RSP
MOV RDI,RBX
MOV RDX,R14
MOV ECX,0x6
CALL 0x0019358e
MOV EBP,EAX
CMP dword ptr [R12 + 0x8],0x0
JZ 0x00193dd2
MOV R12,RSP
MOV RCX,qword ptr [R12]
ADD RCX,0x40
LEA R8,[0x1989e1]
MOV RDI,R12
MOV RSI,R14
MOV EDX,0x6
XOR R9D,R9D
CALL 0x001910e4
MOV EAX,dword ptr [R15 + 0x8]
MOV dword ptr [R12 + 0x8],EAX
LEA R9,[0x18e6df]
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R12
MOV RCX,R14
XOR R8D,R8D
CALL 0x0018e645
OR EBP,0x10
LAB_00193dd2:
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00193cc4
MOV RSI,qword ptr [RSP + 0x20]
TEST RSI,RSI
JZ 0x00193cc4
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x00193cc4
|
/* WARNING: Removing unreachable block (ram,0x00193d37) */
/* WARNING: Removing unreachable block (ram,0x00193d3c) */
uint bf_atan2_internal(long *param_1,long param_2,long param_3,long param_4)
{
uint uVar1;
long lVar2;
int8 *local_58;
uint local_50;
int8 local_48;
int8 local_40;
long lStack_38;
local_58 = (int8 *)*param_1;
if ((*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) ||
(*(long *)(param_4 + 0x10) == 0x7fffffffffffffff)) {
if (param_1[3] != 0) {
lVar2 = (*(code *)local_58[1])(*local_58,param_1[4],0);
param_1[4] = lVar2;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
uVar1 = 0;
}
else {
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
param_3 = param_3 + 0x20;
if ((*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) &&
(*(long *)(param_4 + 0x10) == 0x7ffffffffffffffe)) {
bf_set_ui(&local_58,1);
local_50 = *(uint *)(param_4 + 8) ^ *(uint *)(param_2 + 8);
}
else {
bf_op2(&local_58,param_2,param_4,param_3,6,__bf_div);
}
uVar1 = bf_atan(param_1,&local_58,param_3,6);
if (*(int *)(param_4 + 8) != 0) {
bf_const_get(&local_58,param_3,6,local_58 + 8,bf_const_pi_internal,0);
local_50 = *(uint *)(param_2 + 8);
bf_op2(param_1,param_1,&local_58,param_3,0,__bf_add);
uVar1 = uVar1 | 0x10;
}
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
}
return uVar1;
}
|
|
62,139 |
resize_queue
|
eloqsql/mysys/queues.c
|
int resize_queue(QUEUE *queue, uint max_elements)
{
uchar **new_root;
DBUG_ENTER("resize_queue");
if (queue->max_elements == max_elements)
DBUG_RETURN(0);
if ((new_root= (uchar **) my_realloc(key_memory_QUEUE, (void *)queue->root,
(max_elements + 1)* sizeof(void*),
MYF(MY_WME))) == 0)
DBUG_RETURN(1);
set_if_smaller(queue->elements, max_elements);
queue->max_elements= max_elements;
queue->root= new_root;
DBUG_RETURN(0);
}
|
O3
|
c
|
resize_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl %esi, 0x14(%rdi)
je 0xa6a47
movl %esi, %r15d
movq %rdi, %r14
leaq 0xb67d3d(%rip), %rax # 0xc0e750
movl (%rax), %edi
movq (%r14), %rsi
leal 0x1(%r15), %edx
shlq $0x3, %rdx
movl $0x10, %ecx
callq 0xa481c
testq %rax, %rax
je 0xa6a42
cmpl %r15d, 0x10(%r14)
jbe 0xa6a39
movl %r15d, 0x10(%r14)
movl %r15d, 0x14(%r14)
movq %rax, (%r14)
jmp 0xa6a47
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
resize_queue:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
xor ebx, ebx
cmp [rdi+14h], esi
jz short loc_A6A47
mov r15d, esi
mov r14, rdi
lea rax, key_memory_QUEUE
mov edi, [rax]
mov rsi, [r14]
lea edx, [r15+1]
shl rdx, 3
mov ecx, 10h
call my_realloc
test rax, rax
jz short loc_A6A42
cmp [r14+10h], r15d
jbe short loc_A6A39
mov [r14+10h], r15d
loc_A6A39:
mov [r14+14h], r15d
mov [r14], rax
jmp short loc_A6A47
loc_A6A42:
mov ebx, 1
loc_A6A47:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long resize_queue(long long a1, unsigned int a2)
{
unsigned int v2; // ebx
long long v3; // rax
v2 = 0;
if ( *(_DWORD *)(a1 + 20) != a2 )
{
v3 = my_realloc(key_memory_QUEUE, *(_QWORD *)a1, (const char *)(8LL * (a2 + 1)), 16);
if ( v3 )
{
if ( *(_DWORD *)(a1 + 16) > a2 )
*(_DWORD *)(a1 + 16) = a2;
*(_DWORD *)(a1 + 20) = a2;
*(_QWORD *)a1 = v3;
}
else
{
return 1;
}
}
return v2;
}
|
resize_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
XOR EBX,EBX
CMP dword ptr [RDI + 0x14],ESI
JZ 0x001a6a47
MOV R15D,ESI
MOV R14,RDI
LEA RAX,[0xd0e750]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [R14]
LEA EDX,[R15 + 0x1]
SHL RDX,0x3
MOV ECX,0x10
CALL 0x001a481c
TEST RAX,RAX
JZ 0x001a6a42
CMP dword ptr [R14 + 0x10],R15D
JBE 0x001a6a39
MOV dword ptr [R14 + 0x10],R15D
LAB_001a6a39:
MOV dword ptr [R14 + 0x14],R15D
MOV qword ptr [R14],RAX
JMP 0x001a6a47
LAB_001a6a42:
MOV EBX,0x1
LAB_001a6a47:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 resize_queue(long *param_1,uint param_2)
{
long lVar1;
int8 uVar2;
uVar2 = 0;
if (*(uint *)((long)param_1 + 0x14) != param_2) {
lVar1 = my_realloc(key_memory_QUEUE,*param_1,(ulong)(param_2 + 1) << 3,0x10);
if (lVar1 == 0) {
uVar2 = 1;
}
else {
if (param_2 < *(uint *)(param_1 + 2)) {
*(uint *)(param_1 + 2) = param_2;
}
*(uint *)((long)param_1 + 0x14) = param_2;
*param_1 = lVar1;
}
}
return uVar2;
}
|
|
62,140 |
js_number_isSafeInteger
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_number_isSafeInteger(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
double d;
if (!JS_IsNumber(argv[0]))
return JS_FALSE;
if (unlikely(JS_ToFloat64(ctx, &d, argv[0])))
return JS_EXCEPTION;
return js_bool(is_safe_integer(d));
}
|
O0
|
c
|
js_number_isSafeInteger:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x506d0
cmpl $0x0, %eax
jne 0xd23c5
movl $0x0, 0x38(%rsp)
movq $0x1, 0x40(%rsp)
jmp 0xd2426
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x8(%rsp), %rsi
callq 0x38580
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xd240a
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0xd2426
movsd 0x8(%rsp), %xmm0
callq 0xd2440
movl %eax, %edi
callq 0x57250
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_number_isSafeInteger:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_28], rdi
mov [rsp+48h+var_2C], ecx
mov [rsp+48h+var_38], r8
mov rax, [rsp+48h+var_38]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsNumber
cmp eax, 0
jnz short loc_D23C5
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 1
jmp short loc_D2426
loc_D23C5:
mov rdi, [rsp+48h+var_28]
mov rax, [rsp+48h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+48h+var_40]
call JS_ToFloat64
cmp eax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_D240A
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp short loc_D2426
loc_D240A:
movsd xmm0, [rsp+48h+var_40]
call is_safe_integer
mov edi, eax
call js_bool
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
loc_D2426:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long js_number_isSafeInteger(long long a1, long long a2, long long a3, int a4, long long *a5)
{
int v5; // eax
long long v6; // rdx
double v8; // [rsp+8h] [rbp-40h] BYREF
long long *v9; // [rsp+10h] [rbp-38h]
int v10; // [rsp+1Ch] [rbp-2Ch]
long long v11; // [rsp+20h] [rbp-28h]
long long v12; // [rsp+28h] [rbp-20h]
long long v13; // [rsp+30h] [rbp-18h]
long long v14; // [rsp+38h] [rbp-10h]
long long v15; // [rsp+40h] [rbp-8h]
v12 = a2;
v13 = a3;
v11 = a1;
v10 = a4;
v9 = a5;
if ( JS_IsNumber(*a5, a5[1]) )
{
if ( (unsigned int)JS_ToFloat64(v11, (long long)&v8, (_DWORD *)*v9, v9[1]) )
{
LODWORD(v14) = 0;
v15 = 6LL;
}
else
{
v5 = is_safe_integer(v8);
v14 = js_bool(v5);
v15 = v6;
}
}
else
{
LODWORD(v14) = 0;
v15 = 1LL;
}
return v14;
}
|
js_number_isSafeInteger:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001506d0
CMP EAX,0x0
JNZ 0x001d23c5
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x1
JMP 0x001d2426
LAB_001d23c5:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x00138580
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001d240a
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x001d2426
LAB_001d240a:
MOVSD XMM0,qword ptr [RSP + 0x8]
CALL 0x001d2440
MOV EDI,EAX
CALL 0x00157250
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_001d2426:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16]
js_number_isSafeInteger
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int iVar1;
int4 uVar2;
int1 auVar3 [16];
int8 local_40;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar1 = JS_IsNumber(*param_5,param_5[1]);
if (iVar1 == 0) {
local_10 = 0;
local_8 = 1;
}
else {
iVar1 = JS_ToFloat64(local_28,&local_40,*local_38,local_38[1]);
if (iVar1 == 0) {
uVar2 = is_safe_integer(local_40);
auVar3 = js_bool(uVar2);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
else {
local_10 = 0;
local_8 = 6;
}
}
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
|
|
62,141 |
js_number_isSafeInteger
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_number_isSafeInteger(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
double d;
if (!JS_IsNumber(argv[0]))
return JS_FALSE;
if (unlikely(JS_ToFloat64(ctx, &d, argv[0])))
return JS_EXCEPTION;
return js_bool(is_safe_integer(d));
}
|
O1
|
c
|
js_number_isSafeInteger:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq 0x8(%r8), %rcx
pushq $0x1
popq %rbx
cmpl $0x7, %ecx
je 0x12744
testl %ecx, %ecx
jne 0x127bf
movq (%r8), %rdx
leaq 0x8(%rsp), %rsi
callq 0x27681
testl %eax, %eax
jne 0x127bc
movq 0x8(%rsp), %xmm0
movdqa %xmm0, 0x10(%rsp)
movq %xmm0, %rax
movdqa 0x8c002(%rip), %xmm1 # 0x9e770
pand %xmm0, %xmm1
movdqa %xmm1, 0x20(%rsp)
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
setl %bpl
callq 0xe860
ucomisd 0x10(%rsp), %xmm0
setnp %al
sete %cl
andb %al, %cl
andb %bpl, %cl
movsd 0x8c114(%rip), %xmm0 # 0x9e8c0
ucomisd 0x20(%rsp), %xmm0
setae %al
andb %cl, %al
movzbl %al, %eax
jmp 0x127c1
pushq $0x6
popq %rbx
xorl %eax, %eax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
|
js_number_isSafeInteger:
push rbp
push rbx
sub rsp, 38h
mov rcx, [r8+8]
push 1
pop rbx
cmp ecx, 7
jz short loc_12744
test ecx, ecx
jnz short loc_127BF
loc_12744:
mov rdx, [r8]
lea rsi, [rsp+48h+var_40]
call JS_ToFloat64
test eax, eax
jnz short loc_127BC
movq xmm0, [rsp+48h+var_40]
movdqa [rsp+48h+var_38], xmm0
movq rax, xmm0
movdqa xmm1, cs:xmmword_9E770
pand xmm1, xmm0
movdqa [rsp+48h+var_28], xmm1
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
setl bpl
call _floor
ucomisd xmm0, qword ptr [rsp+48h+var_38]
setnp al
setz cl
and cl, al
and cl, bpl
movsd xmm0, cs:qword_9E8C0
ucomisd xmm0, qword ptr [rsp+48h+var_28]
setnb al
and al, cl
movzx eax, al
jmp short loc_127C1
loc_127BC:
push 6
pop rbx
loc_127BF:
xor eax, eax
loc_127C1:
mov rdx, rbx
add rsp, 38h
pop rbx
pop rbp
retn
|
long long js_number_isSafeInteger(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v5; // rcx
bool v6; // bp
double v7; // xmm0_8
long long v9; // [rsp+8h] [rbp-40h] BYREF
__m128i v10; // [rsp+10h] [rbp-38h]
__m128i v11; // [rsp+20h] [rbp-28h]
v5 = a5[1];
if ( (_DWORD)v5 != 7 && (_DWORD)v5 || (unsigned int)JS_ToFloat64(a1, &v9, *a5, v5) )
return 0LL;
v10 = _mm_loadl_epi64((const __m128i *)&v9);
v11 = _mm_and_si128(_mm_load_si128((const __m128i *)&xmmword_9E770), v10);
v6 = (v10.m128i_i64[0] & 0x7FFFFFFFFFFFFFFFuLL) < 0x7FF0000000000000LL;
v7 = floor(*(double *)v10.m128i_i64);
return (v6 && v7 == *(double *)v10.m128i_i64) & (unsigned __int8)(*(double *)v11.m128i_i64 <= 9.007199254740991e15);
}
|
js_number_isSafeInteger:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RCX,qword ptr [R8 + 0x8]
PUSH 0x1
POP RBX
CMP ECX,0x7
JZ 0x00112744
TEST ECX,ECX
JNZ 0x001127bf
LAB_00112744:
MOV RDX,qword ptr [R8]
LEA RSI,[RSP + 0x8]
CALL 0x00127681
TEST EAX,EAX
JNZ 0x001127bc
MOVQ XMM0,qword ptr [RSP + 0x8]
MOVDQA xmmword ptr [RSP + 0x10],XMM0
MOVQ RAX,XMM0
MOVDQA XMM1,xmmword ptr [0x0019e770]
PAND XMM1,XMM0
MOVDQA xmmword ptr [RSP + 0x20],XMM1
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
SETL BPL
CALL 0x0010e860
UCOMISD XMM0,qword ptr [RSP + 0x10]
SETNP AL
SETZ CL
AND CL,AL
AND CL,BPL
MOVSD XMM0,qword ptr [0x0019e8c0]
UCOMISD XMM0,qword ptr [RSP + 0x20]
SETNC AL
AND AL,CL
MOVZX EAX,AL
JMP 0x001127c1
LAB_001127bc:
PUSH 0x6
POP RBX
LAB_001127bf:
XOR EAX,EAX
LAB_001127c1:
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
bool js_number_isSafeInteger(int8 param_1)
{
bool bVar1;
int iVar2;
int8 *in_R8;
double dVar3;
double local_40;
double local_38;
int8 uStack_30;
double local_28;
int8 uStack_20;
if ((((int)in_R8[1] == 7) || ((int)in_R8[1] == 0)) &&
(iVar2 = JS_ToFloat64(param_1,&local_40,*in_R8), iVar2 == 0)) {
local_38 = local_40;
uStack_30 = 0;
local_28 = (double)(_DAT_0019e770 & (ulong)local_40);
uStack_20 = 0;
dVar3 = floor(local_40);
bVar1 = local_28 <= DAT_0019e8c0 &&
(dVar3 == local_38 && (ulong)ABS(local_40) < 0x7ff0000000000000);
}
else {
bVar1 = false;
}
return bVar1;
}
|
|
62,142 |
add_compiled_collation
|
eloqsql/mysys/charset.c
|
void add_compiled_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)))
{
#ifndef DBUG_OFF
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
DBUG_ASSERT(org);
DBUG_ASSERT(org->cs_name.str == cs->cs_name.str);
DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str));
#endif
}
}
|
O0
|
c
|
add_compiled_collation:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x2f7be
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
leaq 0x35edbf(%rip), %rax # 0x38e590
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 0x362da0(%rip), %rdi # 0x392590
callq 0x32560
cmpb $0x0, %al
je 0x2f7fb
jmp 0x2f7fb
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
add_compiled_collation:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_2F7BE:
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_2F7FB
jmp short $+2
loc_2F7FB:
add rsp, 10h
pop rbp
retn
|
long long add_compiled_collation(unsigned int *a1)
{
all_charsets[*a1] = a1;
a1[3] |= 0x200u;
return my_hash_insert(&charset_name_hash, a1);
}
|
add_compiled_collation:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0012f7be
LAB_0012f7be:
MOV RDX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x48e590]
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,[0x492590]
CALL 0x00132560
CMP AL,0x0
JZ 0x0012f7fb
JMP 0x0012f7fb
LAB_0012f7fb:
ADD RSP,0x10
POP RBP
RET
|
void add_compiled_collation(uint *param_1)
{
(&all_charsets)[*param_1] = param_1;
param_1[3] = param_1[3] | 0x200;
my_hash_insert(charset_name_hash,param_1);
return;
}
|
|
62,143 |
add_compiled_collation
|
eloqsql/mysys/charset.c
|
void add_compiled_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)))
{
#ifndef DBUG_OFF
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
DBUG_ASSERT(org);
DBUG_ASSERT(org->cs_name.str == cs->cs_name.str);
DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str));
#endif
}
}
|
O3
|
c
|
add_compiled_collation:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rsi
movl (%rdi), %eax
leaq 0x340543(%rip), %rcx # 0x369990
movq %rdi, (%rcx,%rax,8)
orb $0x2, 0xd(%rdi)
leaq 0x344534(%rip), %rdi # 0x36d990
popq %rbp
jmp 0x2ae12
|
add_compiled_collation:
push rbp
mov rbp, rsp
mov rsi, rdi
mov eax, [rdi]
lea rcx, all_charsets
mov [rcx+rax*8], rdi
or byte ptr [rdi+0Dh], 2
lea rdi, charset_name_hash
pop rbp
jmp my_hash_insert
|
long long add_compiled_collation(unsigned int *a1)
{
all_charsets[*a1] = a1;
*((_BYTE *)a1 + 13) |= 2u;
return my_hash_insert(&charset_name_hash, a1);
}
|
add_compiled_collation:
PUSH RBP
MOV RBP,RSP
MOV RSI,RDI
MOV EAX,dword ptr [RDI]
LEA RCX,[0x469990]
MOV qword ptr [RCX + RAX*0x8],RDI
OR byte ptr [RDI + 0xd],0x2
LEA RDI,[0x46d990]
POP RBP
JMP 0x0012ae12
|
void add_compiled_collation(uint *param_1)
{
(&all_charsets)[*param_1] = param_1;
*(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2;
my_hash_insert(charset_name_hash,param_1);
return;
}
|
|
62,144 |
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/json.hpp
|
std::string exception_message(const token_type expected, const std::string& context)
{
std::string error_msg = "syntax error ";
if (!context.empty())
{
error_msg += concat("while parsing ", context, ' ');
}
error_msg += "- ";
if (last_token == token_type::parse_error)
{
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
m_lexer.get_token_string(), '\'');
}
else
{
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
}
if (expected != token_type::uninitialized)
{
error_msg += concat("; expected ", lexer_t::token_type_name(expected));
}
return error_msg;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x6833f(%rip), %rsi # 0xcf365
leaq 0x10(%rsp), %rdx
callq 0x2b096
cmpq $0x0, 0x8(%r15)
je 0x6706a
leaq 0x38(%rsp), %rcx
movb $0x20, (%rcx)
leaq 0x6832d(%rip), %rsi # 0xcf373
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x6bef1
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x278e0
leaq 0x10(%rsp), %rdi
callq 0x27998
leaq 0x68311(%rip), %rsi # 0xcf382
movq %rbx, %rdi
callq 0x27880
movl 0x20(%r14), %edi
cmpl $0xe, %edi
jne 0x670e1
movq 0x98(%r14), %rax
addq $0x28, %r14
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x66e2c
leaq 0xf(%rsp), %r8
movb $0x27, (%r8)
leaq 0x682d6(%rip), %rdx # 0xcf385
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %rcx
callq 0x6bf61
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x278e0
leaq 0x10(%rsp), %rdi
callq 0x27998
leaq 0x38(%rsp), %rdi
jmp 0x67111
callq 0x6c038
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x6829f(%rip), %rsi # 0xcf394
leaq 0x10(%rsp), %rdi
callq 0x6bfd9
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x278e0
leaq 0x10(%rsp), %rdi
callq 0x27998
testl %ebp, %ebp
je 0x67151
movl %ebp, %edi
callq 0x6c038
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x68270(%rip), %rsi # 0xcf3a0
leaq 0x10(%rsp), %rdi
callq 0x6bfd9
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x278e0
leaq 0x10(%rsp), %rdi
callq 0x27998
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x27998
jmp 0x67173
jmp 0x67182
movq %rax, %r14
leaq 0x38(%rsp), %rdi
jmp 0x6718a
jmp 0x67193
jmp 0x67193
jmp 0x67182
jmp 0x67193
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x27998
jmp 0x67196
jmp 0x67193
movq %rax, %r14
movq %rbx, %rdi
callq 0x27998
movq %r14, %rdi
callq 0x27660
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_:
push rbp
push r15
push r14
push rbx
sub rsp, 58h
mov r15, rcx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea rsi, aSyntaxError; "syntax error "
lea rdx, [rsp+78h+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
cmp qword ptr [r15+8], 0
jz short loc_6706A
lea rcx, [rsp+78h+var_40]
mov byte ptr [rcx], 20h ; ' '
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rsp+78h+var_68]
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_6706A:
lea rsi, asc_CF382; "- "
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov edi, [r14+20h]
cmp edi, 0Eh
jnz short loc_670E1
mov rax, [r14+98h]
add r14, 28h ; '('
mov [rsp+78h+var_48], rax
lea rdi, [rsp+78h+var_40]
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void)
lea r8, [rsp+78h+var_69]
mov byte ptr [r8], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+78h+var_68]
lea rsi, [rsp+78h+var_48]
lea rcx, [rsp+78h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+78h+var_40]
jmp short loc_67111
loc_670E1:
call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
lea rdx, [rsp+78h+var_40]
mov [rdx], rax
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+78h+var_68]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]; void *
loc_67111:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test ebp, ebp
jz short loc_67151
mov edi, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
lea rdx, [rsp+78h+var_40]
mov [rdx], rax
lea rsi, aExpected; "; expected "
lea rdi, [rsp+78h+var_68]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_67151:
mov rax, rbx
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_67173
jmp short loc_67182
mov r14, rax
loc_67173:
lea rdi, [rsp+arg_30]
jmp short loc_6718A
jmp short loc_67193
jmp short loc_67193
jmp short loc_67182
jmp short loc_67193
loc_67182:
mov r14, rax
lea rdi, [rsp+arg_8]; void *
loc_6718A:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_67196
jmp short $+2
loc_67193:
mov r14, rax
loc_67196:
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message(
_QWORD *a1,
long long a2,
unsigned int a3,
long long a4)
{
_BYTE *v7; // rdi
char v9; // [rsp+Fh] [rbp-69h] BYREF
_BYTE v10[32]; // [rsp+10h] [rbp-68h] BYREF
long long v11; // [rsp+30h] [rbp-48h] BYREF
_QWORD v12[8]; // [rsp+38h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error ");
if ( *(_QWORD *)(a4 + 8) )
{
LOBYTE(v12[0]) = 32;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(
v10,
"while parsing ",
a4,
v12);
std::string::append(a1, v10);
std::string::~string(v10);
}
std::string::append(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 14 )
{
v11 = *(_QWORD *)(a2 + 152);
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(
(long long)v12,
a2 + 40);
v9 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
v10,
&v11,
"; last read: '",
v12,
&v9);
std::string::append(a1, v10);
std::string::~string(v10);
v7 = v12;
}
else
{
v12[0] = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name)();
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "unexpected ");
std::string::append(a1, v10);
v7 = v10;
}
std::string::~string(v7);
if ( a3 )
{
v12[0] = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(a3);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "; expected ");
std::string::append(a1, v10);
std::string::~string(v10);
}
return a1;
}
|
exception_message:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV R15,RCX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x1cf365]
LEA RDX,[RSP + 0x10]
CALL 0x0012b096
CMP qword ptr [R15 + 0x8],0x0
JZ 0x0016706a
LEA RCX,[RSP + 0x38]
MOV byte ptr [RCX],0x20
LAB_0016703f:
LEA RSI,[0x1cf373]
LEA RDI,[RSP + 0x10]
MOV RDX,R15
CALL 0x0016bef1
LAB_00167053:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001278e0
LEA RDI,[RSP + 0x10]
CALL 0x00127998
LAB_0016706a:
LEA RSI,[0x1cf382]
MOV RDI,RBX
CALL 0x00127880
MOV EDI,dword ptr [R14 + 0x20]
CMP EDI,0xe
JNZ 0x001670e1
MOV RAX,qword ptr [R14 + 0x98]
ADD R14,0x28
MOV qword ptr [RSP + 0x30],RAX
LAB_00167092:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x00166e2c
LEA R8,[RSP + 0xf]
MOV byte ptr [R8],0x27
LAB_001670a8:
LEA RDX,[0x1cf385]
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x30]
LEA RCX,[RSP + 0x38]
CALL 0x0016bf61
LAB_001670c3:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001278e0
LEA RDI,[RSP + 0x10]
CALL 0x00127998
LEA RDI,[RSP + 0x38]
JMP 0x00167111
LAB_001670e1:
CALL 0x0016c038
LEA RDX,[RSP + 0x38]
MOV qword ptr [RDX],RAX
LAB_001670ee:
LEA RSI,[0x1cf394]
LEA RDI,[RSP + 0x10]
CALL 0x0016bfd9
LAB_001670ff:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001278e0
LEA RDI,[RSP + 0x10]
LAB_00167111:
CALL 0x00127998
TEST EBP,EBP
JZ 0x00167151
MOV EDI,EBP
CALL 0x0016c038
LEA RDX,[RSP + 0x38]
MOV qword ptr [RDX],RAX
LAB_00167129:
LEA RSI,[0x1cf3a0]
LEA RDI,[RSP + 0x10]
CALL 0x0016bfd9
LAB_0016713a:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001278e0
LAB_00167147:
LEA RDI,[RSP + 0x10]
CALL 0x00127998
LAB_00167151:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type, std::__cxx11::string const&) */
string * nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::exception_message(string *param_1,long param_2,int param_3,string *param_4)
{
string *this;
char local_69;
allocator local_68 [32];
char *local_48;
char *local_40 [4];
std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",local_68);
if (*(long *)(param_4 + 8) != 0) {
local_40[0] = (char *)CONCAT71(local_40[0]._1_7_,0x20);
/* try { // try from 0016703f to 00167052 has its CatchHandler @ 00167191 */
concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char>
((detail *)local_68,"while parsing ",param_4,(char *)local_40);
/* try { // try from 00167053 to 0016705f has its CatchHandler @ 00167182 */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
}
/* try { // try from 0016706a to 00167078 has its CatchHandler @ 00167193 */
std::__cxx11::string::append((char *)param_1);
if (*(int *)(param_2 + 0x20) == 0xe) {
local_48 = *(char **)(param_2 + 0x98);
/* try { // try from 00167092 to 0016709e has its CatchHandler @ 0016717c */
lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_token_string();
local_69 = '\'';
/* try { // try from 001670a8 to 001670c2 has its CatchHandler @ 00167170 */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
((detail *)local_68,&local_48,"; last read: \'",(string *)local_40,&local_69);
/* try { // try from 001670c3 to 001670cf has its CatchHandler @ 0016715f */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
this = (string *)local_40;
}
else {
local_40[0] = (char *)lexer_base<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>>
::token_type_name();
/* try { // try from 001670ee to 001670fe has its CatchHandler @ 0016717a */
concat<std::__cxx11::string,char_const(&)[12],char_const*>
((detail *)local_68,"unexpected ",local_40);
/* try { // try from 001670ff to 0016710b has its CatchHandler @ 0016716e */
std::__cxx11::string::append(param_1);
this = (string *)local_68;
}
std::__cxx11::string::~string(this);
if (param_3 != 0) {
local_40[0] = (char *)lexer_base<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>>
::token_type_name(param_3);
/* try { // try from 00167129 to 00167139 has its CatchHandler @ 00167180 */
concat<std::__cxx11::string,char_const(&)[12],char_const*>
((detail *)local_68,"; expected ",local_40);
/* try { // try from 0016713a to 00167146 has its CatchHandler @ 0016717e */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
}
return param_1;
}
|
|
62,145 |
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
|
monkey531[P]llama/common/common.cpp
|
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) {
const char * sep = strchr(data, '=');
if (sep == nullptr || sep - data >= 128) {
LOG_ERR("%s: malformed KV override '%s'\n", __func__, data);
return false;
}
llama_model_kv_override kvo;
std::strncpy(kvo.key, data, sep - data);
kvo.key[sep - data] = 0;
sep++;
if (strncmp(sep, "int:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT;
kvo.val_i64 = std::atol(sep);
} else if (strncmp(sep, "float:", 6) == 0) {
sep += 6;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT;
kvo.val_f64 = std::atof(sep);
} else if (strncmp(sep, "bool:", 5) == 0) {
sep += 5;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL;
if (std::strcmp(sep, "true") == 0) {
kvo.val_bool = true;
} else if (std::strcmp(sep, "false") == 0) {
kvo.val_bool = false;
} else {
LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data);
return false;
}
} else if (strncmp(sep, "str:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR;
if (strlen(sep) > 127) {
LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data);
return false;
}
strncpy(kvo.val_str, sep, 127);
kvo.val_str[127] = '\0';
} else {
LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data);
return false;
}
overrides.emplace_back(std::move(kvo));
return true;
}
|
O0
|
cpp
|
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&):
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x118(%rsp)
movq %rsi, 0x110(%rsp)
movq 0x118(%rsp), %rdi
movl $0x3d, %esi
callq 0x5a980
movq %rax, 0x108(%rsp)
cmpq $0x0, 0x108(%rsp)
je 0xed4b7
movq 0x108(%rsp), %rax
movq 0x118(%rsp), %rcx
subq %rcx, %rax
cmpq $0x80, %rax
jl 0xed4ff
jmp 0xed4b9
xorl %eax, %eax
leaq 0x1b6126(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xed4f0
callq 0x1be200
movq %rax, %rdi
movq 0x118(%rsp), %r8
movl $0x4, %esi
leaq 0x1222f8(%rip), %rdx # 0x20f7da
leaq 0x122311(%rip), %rcx # 0x20f7fa
movb $0x0, %al
callq 0x1be2f0
jmp 0xed4f2
movb $0x0, 0x127(%rsp)
jmp 0xed7ec
movq %rsp, %rdi
addq $0x4, %rdi
movq 0x118(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq 0x118(%rsp), %rax
subq %rax, %rdx
callq 0x5a260
movq 0x108(%rsp), %rax
movq 0x118(%rsp), %rcx
subq %rcx, %rax
movb $0x0, 0x4(%rsp,%rax)
movq 0x108(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rdi
leaq 0x1222b2(%rip), %rsi # 0x20f813
movl $0x4, %edx
callq 0x5a3d0
cmpl $0x0, %eax
jne 0xed5a5
movq 0x108(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x108(%rsp)
movl $0x0, (%rsp)
movq 0x108(%rsp), %rdi
callq 0x5aa80
movq %rax, 0x88(%rsp)
jmp 0xed7d4
movq 0x108(%rsp), %rdi
leaq 0x122264(%rip), %rsi # 0x20f818
movl $0x6, %edx
callq 0x5a3d0
cmpl $0x0, %eax
jne 0xed5f9
movq 0x108(%rsp), %rax
addq $0x6, %rax
movq %rax, 0x108(%rsp)
movl $0x1, (%rsp)
movq 0x108(%rsp), %rdi
callq 0x5aea0
movsd %xmm0, 0x88(%rsp)
jmp 0xed7d2
movq 0x108(%rsp), %rdi
leaq 0x122217(%rip), %rsi # 0x20f81f
movl $0x5, %edx
callq 0x5a3d0
cmpl $0x0, %eax
jne 0xed6cb
movq 0x108(%rsp), %rax
addq $0x5, %rax
movq %rax, 0x108(%rsp)
movl $0x2, (%rsp)
movq 0x108(%rsp), %rdi
leaq 0x119b8d(%rip), %rsi # 0x2071d2
callq 0x5aeb0
cmpl $0x0, %eax
jne 0xed659
movb $0x1, 0x88(%rsp)
jmp 0xed6c6
movq 0x108(%rsp), %rdi
leaq 0x11c853(%rip), %rsi # 0x209ebb
callq 0x5aeb0
cmpl $0x0, %eax
jne 0xed67c
movb $0x0, 0x88(%rsp)
jmp 0xed6c4
jmp 0xed67e
xorl %eax, %eax
leaq 0x1b5f61(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xed6b5
callq 0x1be200
movq %rax, %rdi
movq 0x118(%rsp), %r8
movl $0x4, %esi
leaq 0x12217e(%rip), %rdx # 0x20f825
leaq 0x12214c(%rip), %rcx # 0x20f7fa
movb $0x0, %al
callq 0x1be2f0
jmp 0xed6b7
movb $0x0, 0x127(%rsp)
jmp 0xed7ec
jmp 0xed6c6
jmp 0xed7d0
movq 0x108(%rsp), %rdi
leaq 0x12217b(%rip), %rsi # 0x20f855
movl $0x4, %edx
callq 0x5a3d0
cmpl $0x0, %eax
jne 0xed789
movq 0x108(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x108(%rsp)
movl $0x3, (%rsp)
movq 0x108(%rsp), %rdi
callq 0x5a6a0
cmpq $0x7f, %rax
jbe 0xed763
jmp 0xed71d
xorl %eax, %eax
leaq 0x1b5ec2(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xed754
callq 0x1be200
movq %rax, %rdi
movq 0x118(%rsp), %r8
movl $0x4, %esi
leaq 0x122114(%rip), %rdx # 0x20f85a
leaq 0x1220ad(%rip), %rcx # 0x20f7fa
movb $0x0, %al
callq 0x1be2f0
jmp 0xed756
movb $0x0, 0x127(%rsp)
jmp 0xed7ec
movq %rsp, %rdi
addq $0x88, %rdi
movq 0x108(%rsp), %rsi
movl $0x7f, %edx
callq 0x5a260
movb $0x0, 0x107(%rsp)
jmp 0xed7ce
jmp 0xed78b
xorl %eax, %eax
leaq 0x1b5e54(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xed7c2
callq 0x1be200
movq %rax, %rdi
movq 0x118(%rsp), %r8
movl $0x4, %esi
leaq 0x1220e5(%rip), %rdx # 0x20f899
leaq 0x12203f(%rip), %rcx # 0x20f7fa
movb $0x0, %al
callq 0x1be2f0
jmp 0xed7c4
movb $0x0, 0x127(%rsp)
jmp 0xed7ec
jmp 0xed7d0
jmp 0xed7d2
jmp 0xed7d4
movq 0x110(%rsp), %rdi
movq %rsp, %rsi
callq 0xf7190
movb $0x1, 0x127(%rsp)
movb 0x127(%rsp), %al
andb $0x1, %al
addq $0x128, %rsp # imm = 0x128
retq
nopl (%rax)
|
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE:
sub rsp, 128h
mov [rsp+128h+var_10], rdi
mov [rsp+128h+var_18], rsi
mov rdi, [rsp+128h+var_10]
mov esi, 3Dh ; '='
call _strchr
mov [rsp+128h+var_20], rax
cmp [rsp+128h+var_20], 0
jz short loc_ED4B7
mov rax, [rsp+128h+var_20]
mov rcx, [rsp+128h+var_10]
sub rax, rcx
cmp rax, 80h
jl short loc_ED4FF
loc_ED4B7:
jmp short $+2
loc_ED4B9:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_ED4F0
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov r8, [rsp+128h+var_10]
mov esi, 4
lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n"
lea rcx, aStringParseKvO; "string_parse_kv_override"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_ED4F0:
jmp short $+2
loc_ED4F2:
mov [rsp+128h+var_1], 0
jmp loc_ED7EC
loc_ED4FF:
mov rdi, rsp
add rdi, 4
mov rsi, [rsp+128h+var_10]
mov rdx, [rsp+128h+var_20]
mov rax, [rsp+128h+var_10]
sub rdx, rax
call _strncpy
mov rax, [rsp+128h+var_20]
mov rcx, [rsp+128h+var_10]
sub rax, rcx
mov [rsp+rax+128h+var_124], 0
mov rax, [rsp+128h+var_20]
add rax, 1
mov [rsp+128h+var_20], rax
mov rdi, [rsp+128h+var_20]
lea rsi, aInt; "int:"
mov edx, 4
call _strncmp
cmp eax, 0
jnz short loc_ED5A5
mov rax, [rsp+128h+var_20]
add rax, 4
mov [rsp+128h+var_20], rax
mov [rsp+128h+var_128], 0
mov rdi, [rsp+128h+var_20]
call _atol
mov [rsp+128h+var_A0], rax
jmp loc_ED7D4
loc_ED5A5:
mov rdi, [rsp+128h+var_20]
lea rsi, aFloat; "float:"
mov edx, 6
call _strncmp
cmp eax, 0
jnz short loc_ED5F9
mov rax, [rsp+128h+var_20]
add rax, 6
mov [rsp+128h+var_20], rax
mov [rsp+128h+var_128], 1
mov rdi, [rsp+128h+var_20]
call _atof
movsd [rsp+128h+var_A0], xmm0
jmp loc_ED7D2
loc_ED5F9:
mov rdi, [rsp+128h+var_20]
lea rsi, aBool; "bool:"
mov edx, 5
call _strncmp
cmp eax, 0
jnz loc_ED6CB
mov rax, [rsp+128h+var_20]
add rax, 5
mov [rsp+128h+var_20], rax
mov [rsp+128h+var_128], 2
mov rdi, [rsp+128h+var_20]
lea rsi, aTrue; "true"
call _strcmp
cmp eax, 0
jnz short loc_ED659
mov byte ptr [rsp+128h+var_A0], 1
jmp short loc_ED6C6
loc_ED659:
mov rdi, [rsp+128h+var_20]
lea rsi, aAdvancedOption+0ABh; "false"
call _strcmp
cmp eax, 0
jnz short loc_ED67C
mov byte ptr [rsp+128h+var_A0], 0
jmp short loc_ED6C4
loc_ED67C:
jmp short $+2
loc_ED67E:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_ED6B5
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov r8, [rsp+128h+var_10]
mov esi, 4
lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"...
lea rcx, aStringParseKvO; "string_parse_kv_override"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_ED6B5:
jmp short $+2
loc_ED6B7:
mov [rsp+128h+var_1], 0
jmp loc_ED7EC
loc_ED6C4:
jmp short $+2
loc_ED6C6:
jmp loc_ED7D0
loc_ED6CB:
mov rdi, [rsp+128h+var_20]
lea rsi, aStr; "str:"
mov edx, 4
call _strncmp
cmp eax, 0
jnz loc_ED789
mov rax, [rsp+128h+var_20]
add rax, 4
mov [rsp+128h+var_20], rax
mov [rsp+128h+var_128], 3
mov rdi, [rsp+128h+var_20]
call _strlen
cmp rax, 7Fh
jbe short loc_ED763
jmp short $+2
loc_ED71D:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_ED754
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov r8, [rsp+128h+var_10]
mov esi, 4
lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"...
lea rcx, aStringParseKvO; "string_parse_kv_override"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_ED754:
jmp short $+2
loc_ED756:
mov [rsp+128h+var_1], 0
jmp loc_ED7EC
loc_ED763:
mov rdi, rsp
add rdi, 88h
mov rsi, [rsp+128h+var_20]
mov edx, 7Fh
call _strncpy
mov [rsp+128h+var_21], 0
jmp short loc_ED7CE
loc_ED789:
jmp short $+2
loc_ED78B:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_ED7C2
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov r8, [rsp+128h+var_10]
mov esi, 4
lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n"
lea rcx, aStringParseKvO; "string_parse_kv_override"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_ED7C2:
jmp short $+2
loc_ED7C4:
mov [rsp+128h+var_1], 0
jmp short loc_ED7EC
loc_ED7CE:
jmp short $+2
loc_ED7D0:
jmp short $+2
loc_ED7D2:
jmp short $+2
loc_ED7D4:
mov rdi, [rsp+128h+var_18]
mov rsi, rsp
call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(llama_model_kv_override &&)
mov [rsp+128h+var_1], 1
loc_ED7EC:
mov al, [rsp+128h+var_1]
and al, 1
add rsp, 128h
retn
|
char string_parse_kv_override(long long a1, long long a2)
{
int v2; // eax
int v3; // r9d
int v4; // eax
int v5; // r9d
int v6; // eax
int v7; // r9d
int v8; // eax
int v9; // r9d
int v11; // [rsp+0h] [rbp-128h] BYREF
_BYTE v12[132]; // [rsp+4h] [rbp-124h] BYREF
long long v13[15]; // [rsp+88h] [rbp-A0h] BYREF
char v14; // [rsp+107h] [rbp-21h]
long long v15; // [rsp+108h] [rbp-20h]
long long v16; // [rsp+110h] [rbp-18h]
long long v17; // [rsp+118h] [rbp-10h]
v17 = a1;
v16 = a2;
v15 = strchr(a1, 61LL);
if ( !v15 || v15 - v17 >= 128 )
{
if ( common_log_verbosity_thold >= 0 )
{
v2 = common_log_main();
common_log_add(
v2,
4,
(unsigned int)"%s: malformed KV override '%s'\n",
(unsigned int)"string_parse_kv_override",
v17,
v3);
}
return 0;
}
strncpy(v12, v17, v15 - v17);
v12[v15 - v17] = 0;
if ( !(unsigned int)strncmp(++v15, "int:", 4LL) )
{
v15 += 4LL;
v11 = 0;
v13[0] = atol(v15);
LABEL_27:
std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(v16, &v11);
return 1;
}
if ( !(unsigned int)strncmp(v15, "float:", 6LL) )
{
v15 += 6LL;
v11 = 1;
v13[0] = atof(v15);
goto LABEL_27;
}
if ( !(unsigned int)strncmp(v15, "bool:", 5LL) )
{
v15 += 5LL;
v11 = 2;
if ( !(unsigned int)strcmp(v15, "true") )
{
LOBYTE(v13[0]) = 1;
goto LABEL_27;
}
if ( !(unsigned int)strcmp(v15, "false") )
{
LOBYTE(v13[0]) = 0;
goto LABEL_27;
}
if ( common_log_verbosity_thold >= 0 )
{
v4 = common_log_main();
common_log_add(
v4,
4,
(unsigned int)"%s: invalid boolean value for KV override '%s'\n",
(unsigned int)"string_parse_kv_override",
v17,
v5);
}
return 0;
}
else if ( !(unsigned int)strncmp(v15, "str:", 4LL) )
{
v15 += 4LL;
v11 = 3;
if ( (unsigned long long)strlen(v15) <= 0x7F )
{
strncpy(v13, v15, 127LL);
v14 = 0;
goto LABEL_27;
}
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
common_log_add(
v6,
4,
(unsigned int)"%s: malformed KV override '%s', value cannot exceed 127 chars\n",
(unsigned int)"string_parse_kv_override",
v17,
v7);
}
return 0;
}
else
{
if ( common_log_verbosity_thold >= 0 )
{
v8 = common_log_main();
common_log_add(
v8,
4,
(unsigned int)"%s: invalid type for KV override '%s'\n",
(unsigned int)"string_parse_kv_override",
v17,
v9);
}
return 0;
}
}
|
string_parse_kv_override:
SUB RSP,0x128
MOV qword ptr [RSP + 0x118],RDI
MOV qword ptr [RSP + 0x110],RSI
MOV RDI,qword ptr [RSP + 0x118]
MOV ESI,0x3d
CALL 0x0015a980
MOV qword ptr [RSP + 0x108],RAX
CMP qword ptr [RSP + 0x108],0x0
JZ 0x001ed4b7
MOV RAX,qword ptr [RSP + 0x108]
MOV RCX,qword ptr [RSP + 0x118]
SUB RAX,RCX
CMP RAX,0x80
JL 0x001ed4ff
LAB_001ed4b7:
JMP 0x001ed4b9
LAB_001ed4b9:
XOR EAX,EAX
LEA RCX,[0x3a35e8]
CMP EAX,dword ptr [RCX]
JG 0x001ed4f0
CALL 0x002be200
MOV RDI,RAX
MOV R8,qword ptr [RSP + 0x118]
MOV ESI,0x4
LEA RDX,[0x30f7da]
LEA RCX,[0x30f7fa]
MOV AL,0x0
CALL 0x002be2f0
LAB_001ed4f0:
JMP 0x001ed4f2
LAB_001ed4f2:
MOV byte ptr [RSP + 0x127],0x0
JMP 0x001ed7ec
LAB_001ed4ff:
MOV RDI,RSP
ADD RDI,0x4
MOV RSI,qword ptr [RSP + 0x118]
MOV RDX,qword ptr [RSP + 0x108]
MOV RAX,qword ptr [RSP + 0x118]
SUB RDX,RAX
CALL 0x0015a260
MOV RAX,qword ptr [RSP + 0x108]
MOV RCX,qword ptr [RSP + 0x118]
SUB RAX,RCX
MOV byte ptr [RSP + RAX*0x1 + 0x4],0x0
MOV RAX,qword ptr [RSP + 0x108]
ADD RAX,0x1
MOV qword ptr [RSP + 0x108],RAX
MOV RDI,qword ptr [RSP + 0x108]
LEA RSI,[0x30f813]
MOV EDX,0x4
CALL 0x0015a3d0
CMP EAX,0x0
JNZ 0x001ed5a5
MOV RAX,qword ptr [RSP + 0x108]
ADD RAX,0x4
MOV qword ptr [RSP + 0x108],RAX
MOV dword ptr [RSP],0x0
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x0015aa80
MOV qword ptr [RSP + 0x88],RAX
JMP 0x001ed7d4
LAB_001ed5a5:
MOV RDI,qword ptr [RSP + 0x108]
LEA RSI,[0x30f818]
MOV EDX,0x6
CALL 0x0015a3d0
CMP EAX,0x0
JNZ 0x001ed5f9
MOV RAX,qword ptr [RSP + 0x108]
ADD RAX,0x6
MOV qword ptr [RSP + 0x108],RAX
MOV dword ptr [RSP],0x1
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x0015aea0
MOVSD qword ptr [RSP + 0x88],XMM0
JMP 0x001ed7d2
LAB_001ed5f9:
MOV RDI,qword ptr [RSP + 0x108]
LEA RSI,[0x30f81f]
MOV EDX,0x5
CALL 0x0015a3d0
CMP EAX,0x0
JNZ 0x001ed6cb
MOV RAX,qword ptr [RSP + 0x108]
ADD RAX,0x5
MOV qword ptr [RSP + 0x108],RAX
MOV dword ptr [RSP],0x2
MOV RDI,qword ptr [RSP + 0x108]
LEA RSI,[0x3071d2]
CALL 0x0015aeb0
CMP EAX,0x0
JNZ 0x001ed659
MOV byte ptr [RSP + 0x88],0x1
JMP 0x001ed6c6
LAB_001ed659:
MOV RDI,qword ptr [RSP + 0x108]
LEA RSI,[0x309ebb]
CALL 0x0015aeb0
CMP EAX,0x0
JNZ 0x001ed67c
MOV byte ptr [RSP + 0x88],0x0
JMP 0x001ed6c4
LAB_001ed67c:
JMP 0x001ed67e
LAB_001ed67e:
XOR EAX,EAX
LEA RCX,[0x3a35e8]
CMP EAX,dword ptr [RCX]
JG 0x001ed6b5
CALL 0x002be200
MOV RDI,RAX
MOV R8,qword ptr [RSP + 0x118]
MOV ESI,0x4
LEA RDX,[0x30f825]
LEA RCX,[0x30f7fa]
MOV AL,0x0
CALL 0x002be2f0
LAB_001ed6b5:
JMP 0x001ed6b7
LAB_001ed6b7:
MOV byte ptr [RSP + 0x127],0x0
JMP 0x001ed7ec
LAB_001ed6c4:
JMP 0x001ed6c6
LAB_001ed6c6:
JMP 0x001ed7d0
LAB_001ed6cb:
MOV RDI,qword ptr [RSP + 0x108]
LEA RSI,[0x30f855]
MOV EDX,0x4
CALL 0x0015a3d0
CMP EAX,0x0
JNZ 0x001ed789
MOV RAX,qword ptr [RSP + 0x108]
ADD RAX,0x4
MOV qword ptr [RSP + 0x108],RAX
MOV dword ptr [RSP],0x3
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x0015a6a0
CMP RAX,0x7f
JBE 0x001ed763
JMP 0x001ed71d
LAB_001ed71d:
XOR EAX,EAX
LEA RCX,[0x3a35e8]
CMP EAX,dword ptr [RCX]
JG 0x001ed754
CALL 0x002be200
MOV RDI,RAX
MOV R8,qword ptr [RSP + 0x118]
MOV ESI,0x4
LEA RDX,[0x30f85a]
LEA RCX,[0x30f7fa]
MOV AL,0x0
CALL 0x002be2f0
LAB_001ed754:
JMP 0x001ed756
LAB_001ed756:
MOV byte ptr [RSP + 0x127],0x0
JMP 0x001ed7ec
LAB_001ed763:
MOV RDI,RSP
ADD RDI,0x88
MOV RSI,qword ptr [RSP + 0x108]
MOV EDX,0x7f
CALL 0x0015a260
MOV byte ptr [RSP + 0x107],0x0
JMP 0x001ed7ce
LAB_001ed789:
JMP 0x001ed78b
LAB_001ed78b:
XOR EAX,EAX
LEA RCX,[0x3a35e8]
CMP EAX,dword ptr [RCX]
JG 0x001ed7c2
CALL 0x002be200
MOV RDI,RAX
MOV R8,qword ptr [RSP + 0x118]
MOV ESI,0x4
LEA RDX,[0x30f899]
LEA RCX,[0x30f7fa]
MOV AL,0x0
CALL 0x002be2f0
LAB_001ed7c2:
JMP 0x001ed7c4
LAB_001ed7c4:
MOV byte ptr [RSP + 0x127],0x0
JMP 0x001ed7ec
LAB_001ed7ce:
JMP 0x001ed7d0
LAB_001ed7d0:
JMP 0x001ed7d2
LAB_001ed7d2:
JMP 0x001ed7d4
LAB_001ed7d4:
MOV RDI,qword ptr [RSP + 0x110]
MOV RSI,RSP
CALL 0x001f7190
MOV byte ptr [RSP + 0x127],0x1
LAB_001ed7ec:
MOV AL,byte ptr [RSP + 0x127]
AND AL,0x1
ADD RSP,0x128
RET
|
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override,
std::allocator<llama_model_kv_override> >&) */
int1 string_parse_kv_override(char *param_1,vector *param_2)
{
int iVar1;
int8 uVar2;
size_t sVar3;
int4 local_128;
char acStack_124 [132];
double local_a0 [15];
int1 local_21;
char *local_20;
vector *local_18;
char *local_10;
local_18 = param_2;
local_10 = param_1;
local_20 = strchr(param_1,0x3d);
if ((local_20 == (char *)0x0) || (0x7f < (long)local_20 - (long)local_10)) {
if (-1 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,4,"%s: malformed KV override \'%s\'\n","string_parse_kv_override",
local_10);
}
return 0;
}
strncpy(acStack_124,local_10,(long)local_20 - (long)local_10);
local_20[(long)(acStack_124 + -(long)local_10)] = '\0';
local_20 = local_20 + 1;
iVar1 = strncmp(local_20,"int:",4);
if (iVar1 == 0) {
local_20 = local_20 + 4;
local_128 = 0;
local_a0[0] = (double)atol(local_20);
}
else {
iVar1 = strncmp(local_20,"float:",6);
if (iVar1 == 0) {
local_20 = local_20 + 6;
local_128 = 1;
local_a0[0] = atof(local_20);
}
else {
iVar1 = strncmp(local_20,"bool:",5);
if (iVar1 == 0) {
local_20 = local_20 + 5;
local_128 = 2;
iVar1 = strcmp(local_20,"true");
if (iVar1 == 0) {
local_a0[0] = (double)CONCAT71(local_a0[0]._1_7_,1);
}
else {
iVar1 = strcmp(local_20,"false");
if (iVar1 != 0) {
if (-1 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,4,"%s: invalid boolean value for KV override \'%s\'\n",
"string_parse_kv_override",local_10);
}
return 0;
}
local_a0[0] = (double)((ulong)local_a0[0] & 0xffffffffffffff00);
}
}
else {
iVar1 = strncmp(local_20,"str:",4);
if (iVar1 != 0) {
if (-1 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,4,"%s: invalid type for KV override \'%s\'\n",
"string_parse_kv_override",local_10);
}
return 0;
}
local_20 = local_20 + 4;
local_128 = 3;
sVar3 = strlen(local_20);
if (0x7f < sVar3) {
if (-1 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,4,
"%s: malformed KV override \'%s\', value cannot exceed 127 chars\n",
"string_parse_kv_override",local_10);
}
return 0;
}
strncpy((char *)local_a0,local_20,0x7f);
local_21 = 0;
}
}
}
std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>::
emplace_back<llama_model_kv_override>
((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)local_18,
(llama_model_kv_override *)&local_128);
return 1;
}
|
|
62,146 |
my_strcasecmp_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
}
|
O0
|
c
|
my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x32c71
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x32c7d
jmp 0x32da6
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x32cb7
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x19dd55(%rip), %rax # 0x1d09f0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x32d04
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x30(%rbp), %rsi
callq 0x323b0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0x32ce6
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x243d0
movl %eax, -0x4(%rbp)
jmp 0x32db9
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x327a0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x32d3e
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x19dcce(%rip), %rax # 0x1d09f0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x32d88
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x323b0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x32d6a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x243d0
movl %eax, -0x4(%rbp)
jmp 0x32db9
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x327a0
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x32da1
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x32db9
jmp 0x32c50
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov [rbp+var_28], rax
loc_32C50:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_32C71
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_32C71:
mov al, [rbp+var_41]
test al, 1
jnz short loc_32C7D
jmp loc_32DA6
loc_32C7D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_32CB7
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_32D04
loc_32CB7:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jg short loc_32CE6
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_32DB9
loc_32CE6:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb4
loc_32D04:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_32D3E
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_32D88
loc_32D3E:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
lea rsi, [rbp+var_38]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_32D6A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_32DB9
loc_32D6A:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_38]
call my_tolower_utf8mb4
loc_32D88:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_32DA1
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_32DB9
loc_32DA1:
jmp loc_32C50
loc_32DA6:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_4], eax
loc_32DB9:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
bool v4; // [rsp+Fh] [rbp-41h]
int v5; // [rsp+10h] [rbp-40h]
int v6; // [rsp+14h] [rbp-3Ch]
unsigned long long v7; // [rsp+18h] [rbp-38h] BYREF
unsigned long long v8; // [rsp+20h] [rbp-30h] BYREF
_QWORD *v9; // [rsp+28h] [rbp-28h]
unsigned __int8 *v10; // [rsp+30h] [rbp-20h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+40h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
v4 = 0;
if ( *v11 )
v4 = *v10 != 0;
if ( !v4 )
break;
if ( *v11 >= 0x80u )
{
v6 = my_mb_wc_utf8mb4_no_range(v12, &v8, v11);
if ( v6 <= 0 )
return (unsigned int)strcmp(v11, v10);
v11 += v6;
my_tolower_utf8mb4(v9, &v8);
}
else
{
v8 = my_unicase_default_page00[3 * *v11++ + 1];
}
if ( *v10 >= 0x80u )
{
v5 = my_mb_wc_utf8mb4_no_range(v12, &v7, v10);
if ( v5 <= 0 )
return (unsigned int)strcmp(v11, v10);
v10 += v5;
my_tolower_utf8mb4(v9, &v7);
}
else
{
v7 = my_unicase_default_page00[3 * *v10++ + 1];
}
if ( v8 != v7 )
return (unsigned int)(v8 - v7);
}
return (unsigned int)(*v11 - *v10);
}
|
my_strcasecmp_utf8mb4:
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 RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x28],RAX
LAB_00132c50:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x00132c71
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_00132c71:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x00132c7d
JMP 0x00132da6
LAB_00132c7d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00132cb7
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2d09f0]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00132d04
LAB_00132cb7:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
CALL 0x001323b0
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x00132ce6
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001243d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00132db9
LAB_00132ce6:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x001327a0
LAB_00132d04:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00132d3e
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2d09f0]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00132d88
LAB_00132d3e:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x38]
CALL 0x001323b0
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x00132d6a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001243d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00132db9
LAB_00132d6a:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x38]
CALL 0x001327a0
LAB_00132d88:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x00132da1
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00132db9
LAB_00132da1:
JMP 0x00132c50
LAB_00132da6:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_00132db9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
int iVar1;
bool bVar2;
ulong local_40;
ulong local_38;
int8 local_30;
byte *local_28;
byte *local_20;
long local_18;
local_30 = *(int8 *)(param_1 + 0x78);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
bVar2 = false;
if (*local_20 != 0) {
bVar2 = *local_28 != 0;
}
if (!bVar2) {
return (uint)*local_20 - (uint)*local_28;
}
if (*local_20 < 0x80) {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4);
local_20 = local_20 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_38,local_20);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_20 = local_20 + iVar1;
my_tolower_utf8mb4(local_30,&local_38);
}
if (*local_28 < 0x80) {
local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4);
local_28 = local_28 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_40,local_28);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_28 = local_28 + iVar1;
my_tolower_utf8mb4(local_30,&local_40);
}
} while (local_38 == local_40);
return (int)local_38 - (int)local_40;
}
|
|
62,147 |
skip_trailing_space
|
eloqsql/strings/strings_def.h
|
static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
{
const uchar *end= ptr + len;
if (len > 20)
{
const uchar *end_words= (const uchar *)(intptr)
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
const uchar *start_words= (const uchar *)(intptr)
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
if (end_words > ptr)
{
while (end > end_words && end[-1] == 0x20)
end--;
if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT;
}
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
}
|
O0
|
c
|
skip_trailing_space:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x14, -0x10(%rbp)
jbe 0x6722a
movq -0x18(%rbp), %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
subq $0x1, %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x6718d
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x67228
jmp 0x6719d
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x29(%rbp)
jbe 0x671bd
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x671c6
jmp 0x671d4
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6719d
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x67226
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x67226
jmp 0x671ed
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2a(%rbp)
jbe 0x6720d
movq -0x18(%rbp), %rax
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x67216
jmp 0x67224
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x671ed
jmp 0x67226
jmp 0x67228
jmp 0x6722a
jmp 0x6722c
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x2b(%rbp)
jbe 0x6724c
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x67255
jmp 0x67263
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6722c
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
|
skip_trailing_space_3:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_10], 14h
jbe loc_6722A
mov rax, [rbp+var_18]
shr rax, 2
shl rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
add rax, 4
sub rax, 1
shr rax, 2
shl rax, 2
mov [rbp+var_28], rax
jmp short $+2
loc_6718D:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_8]
jbe loc_67228
jmp short $+2
loc_6719D:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_29], al
jbe short loc_671BD
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_29], al
loc_671BD:
mov al, [rbp+var_29]
test al, 1
jnz short loc_671C6
jmp short loc_671D4
loc_671C6:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_6719D
loc_671D4:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
jnz short loc_67226
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnb short loc_67226
jmp short $+2
loc_671ED:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_2A], al
jbe short loc_6720D
mov rax, [rbp+var_18]
cmp dword ptr [rax-4], 20202020h
setz al
mov [rbp+var_2A], al
loc_6720D:
mov al, [rbp+var_2A]
test al, 1
jnz short loc_67216
jmp short loc_67224
loc_67216:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rax
jmp short loc_671ED
loc_67224:
jmp short $+2
loc_67226:
jmp short $+2
loc_67228:
jmp short $+2
loc_6722A:
jmp short $+2
loc_6722C:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_2B], al
jbe short loc_6724C
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_2B], al
loc_6724C:
mov al, [rbp+var_2B]
test al, 1
jnz short loc_67255
jmp short loc_67263
loc_67255:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_6722C
loc_67263:
mov rax, [rbp+var_18]
pop rbp
retn
|
unsigned long long skip_trailing_space_3(unsigned long long a1, unsigned long long a2)
{
bool v3; // [rsp+1h] [rbp-2Bh]
bool v4; // [rsp+2h] [rbp-2Ah]
bool v5; // [rsp+3h] [rbp-29h]
unsigned long long v6; // [rsp+4h] [rbp-28h]
unsigned long long v7; // [rsp+Ch] [rbp-20h]
unsigned long long v8; // [rsp+14h] [rbp-18h]
v8 = a2 + a1;
if ( a2 > 0x14 )
{
v7 = 4 * (v8 >> 2);
v6 = 4 * ((a1 + 3) >> 2);
if ( v7 > a1 )
{
while ( 1 )
{
v5 = 0;
if ( v8 > v7 )
v5 = *(_BYTE *)(v8 - 1) == 32;
if ( !v5 )
break;
--v8;
}
if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 )
{
while ( 1 )
{
v4 = 0;
if ( v8 > v6 )
v4 = *(_DWORD *)(v8 - 4) == 538976288;
if ( !v4 )
break;
v8 -= 4LL;
}
}
}
}
while ( 1 )
{
v3 = 0;
if ( v8 > a1 )
v3 = *(_BYTE *)(v8 - 1) == 32;
if ( !v3 )
break;
--v8;
}
return v8;
}
|
skip_trailing_space:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x10],0x14
JBE 0x0016722a
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x4
SUB RAX,0x1
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0016718d
LAB_0016718d:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x8]
JBE 0x00167228
JMP 0x0016719d
LAB_0016719d:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x29],AL
JBE 0x001671bd
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_001671bd:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x001671c6
JMP 0x001671d4
LAB_001671c6:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016719d
LAB_001671d4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
JNZ 0x00167226
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00167226
JMP 0x001671ed
LAB_001671ed:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x2a],AL
JBE 0x0016720d
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + -0x4],0x20202020
SETZ AL
MOV byte ptr [RBP + -0x2a],AL
LAB_0016720d:
MOV AL,byte ptr [RBP + -0x2a]
TEST AL,0x1
JNZ 0x00167216
JMP 0x00167224
LAB_00167216:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001671ed
LAB_00167224:
JMP 0x00167226
LAB_00167226:
JMP 0x00167228
LAB_00167228:
JMP 0x0016722a
LAB_0016722a:
JMP 0x0016722c
LAB_0016722c:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x2b],AL
JBE 0x0016724c
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x2b],AL
LAB_0016724c:
MOV AL,byte ptr [RBP + -0x2b]
TEST AL,0x1
JNZ 0x00167255
JMP 0x00167263
LAB_00167255:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016722c
LAB_00167263:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
ulong skip_trailing_space(ulong param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
bool bVar3;
ulong local_20;
local_20 = param_1 + param_2;
if (0x14 < param_2) {
uVar1 = local_20 & 0xfffffffffffffffc;
uVar2 = param_1 + 3 & 0xfffffffffffffffc;
if (param_1 < uVar1) {
while( true ) {
bVar3 = false;
if (uVar1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) {
while( true ) {
bVar3 = false;
if (uVar2 < local_20) {
bVar3 = *(int *)(local_20 - 4) == 0x20202020;
}
if (!bVar3) break;
local_20 = local_20 - 4;
}
}
}
}
while( true ) {
bVar3 = false;
if (param_1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
return local_20;
}
|
|
62,148 |
facebook::yoga::Style::computeRightEdge(std::array<facebook::yoga::StyleValueHandle, 9ul> const&, facebook::yoga::Direction) const
|
yoga-mod/yoga/../yoga/style/Style.h
|
Style::Length computeRightEdge(const Edges& edges, Direction layoutDirection)
const {
if (layoutDirection == Direction::LTR &&
edges[yoga::to_underlying(Edge::End)].isDefined()) {
return pool_.getLength(edges[yoga::to_underlying(Edge::End)]);
} else if (
layoutDirection == Direction::RTL &&
edges[yoga::to_underlying(Edge::Start)].isDefined()) {
return pool_.getLength(edges[yoga::to_underlying(Edge::Start)]);
} else if (edges[yoga::to_underlying(Edge::Right)].isDefined()) {
return pool_.getLength(edges[yoga::to_underlying(Edge::Right)]);
} else if (edges[yoga::to_underlying(Edge::Horizontal)].isDefined()) {
return pool_.getLength(edges[yoga::to_underlying(Edge::Horizontal)]);
} else {
return pool_.getLength(edges[yoga::to_underlying(Edge::All)]);
}
}
|
O3
|
c
|
facebook::yoga::Style::computeRightEdge(std::array<facebook::yoga::StyleValueHandle, 9ul> const&, facebook::yoga::Direction) const:
pushq %rbp
movq %rsp, %rbp
cmpl $0x2, %edx
je 0x79700
cmpl $0x1, %edx
jne 0x79708
movzwl 0xa(%rsi), %eax
jmp 0x79704
movzwl 0x8(%rsi), %eax
testb $0x7, %al
jne 0x79710
movzwl 0x4(%rsi), %eax
testb $0x7, %al
je 0x7972d
addq $0x68, %rdi
movl %eax, %esi
callq 0x7977e
movabsq $0xffffffffff, %rcx # imm = 0xFFFFFFFFFF
andq %rax, %rcx
movq %rcx, %rax
popq %rbp
retq
movzwl 0xc(%rsi), %eax
addq $0x68, %rdi
testb $0x7, %al
jne 0x79714
movzwl 0x10(%rsi), %esi
jmp 0x79716
nop
|
_ZNK8facebook4yoga5Style16computeRightEdgeERKSt5arrayINS0_16StyleValueHandleELm9EENS0_9DirectionE:
push rbp
mov rbp, rsp
cmp edx, 2
jz short loc_79700
cmp edx, 1
jnz short loc_79708
movzx eax, word ptr [rsi+0Ah]
jmp short loc_79704
loc_79700:
movzx eax, word ptr [rsi+8]
loc_79704:
test al, 7
jnz short loc_79710
loc_79708:
movzx eax, word ptr [rsi+4]
test al, 7
jz short loc_7972D
loc_79710:
add rdi, 68h ; 'h'
loc_79714:
mov esi, eax
loc_79716:
call _ZNK8facebook4yoga14StyleValuePool9getLengthENS0_16StyleValueHandleE; facebook::yoga::StyleValuePool::getLength(facebook::yoga::StyleValueHandle)
mov rcx, 0FFFFFFFFFFh
and rcx, rax
mov rax, rcx
pop rbp
retn
loc_7972D:
movzx eax, word ptr [rsi+0Ch]
add rdi, 68h ; 'h'
test al, 7
jnz short loc_79714
movzx esi, word ptr [rsi+10h]
jmp short loc_79716
|
long long facebook::yoga::Style::computeRightEdge(long long a1, unsigned __int16 *a2, int a3)
{
unsigned int v3; // eax
long long v4; // rdi
long long v5; // rsi
if ( a3 == 2 )
{
v3 = a2[4];
}
else
{
if ( a3 != 1 )
goto LABEL_6;
v3 = a2[5];
}
if ( (v3 & 7) != 0 )
{
LABEL_7:
v4 = a1 + 104;
goto LABEL_8;
}
LABEL_6:
v3 = a2[2];
if ( (v3 & 7) != 0 )
goto LABEL_7;
v3 = a2[6];
v4 = a1 + 104;
if ( (v3 & 7) == 0 )
{
v5 = a2[8];
return facebook::yoga::StyleValuePool::getLength(v4, v5) & 0xFFFFFFFFFFLL;
}
LABEL_8:
v5 = v3;
return facebook::yoga::StyleValuePool::getLength(v4, v5) & 0xFFFFFFFFFFLL;
}
|
computeRightEdge:
PUSH RBP
MOV RBP,RSP
CMP EDX,0x2
JZ 0x00179700
CMP EDX,0x1
JNZ 0x00179708
MOVZX EAX,word ptr [RSI + 0xa]
JMP 0x00179704
LAB_00179700:
MOVZX EAX,word ptr [RSI + 0x8]
LAB_00179704:
TEST AL,0x7
JNZ 0x00179710
LAB_00179708:
MOVZX EAX,word ptr [RSI + 0x4]
TEST AL,0x7
JZ 0x0017972d
LAB_00179710:
ADD RDI,0x68
LAB_00179714:
MOV ESI,EAX
LAB_00179716:
CALL 0x0017977e
MOV RCX,0xffffffffff
AND RCX,RAX
MOV RAX,RCX
POP RBP
RET
LAB_0017972d:
MOVZX EAX,word ptr [RSI + 0xc]
ADD RDI,0x68
TEST AL,0x7
JNZ 0x00179714
MOVZX ESI,word ptr [RSI + 0x10]
JMP 0x00179716
|
/* facebook::yoga::Style::computeRightEdge(std::array<facebook::yoga::StyleValueHandle, 9ul> const&,
facebook::yoga::Direction) const */
ulong __thiscall facebook::yoga::Style::computeRightEdge(Style *this,long param_1,int param_3)
{
ushort uVar1;
ulong uVar2;
if (param_3 == 2) {
uVar1 = *(ushort *)(param_1 + 8);
LAB_00179704:
if ((uVar1 & 7) != 0) goto LAB_00179716;
}
else if (param_3 == 1) {
uVar1 = *(ushort *)(param_1 + 10);
goto LAB_00179704;
}
uVar1 = *(ushort *)(param_1 + 4);
if (((uVar1 & 7) == 0) && (uVar1 = *(ushort *)(param_1 + 0xc), (uVar1 & 7) == 0)) {
uVar1 = *(ushort *)(param_1 + 0x10);
}
LAB_00179716:
uVar2 = StyleValuePool::getLength((StyleValuePool *)(this + 0x68),uVar1);
return uVar2 & 0xffffffffff;
}
|
|
62,149 |
utf8_encode_len
|
bluesky950520[P]quickjs/cutils.c
|
size_t utf8_encode_len(uint32_t c)
{
if (c < 0x80)
return 1;
if (c < 0x800)
return 2;
if (c < 0x10000)
return 3;
if (c < 0x110000)
return 4;
return 3;
}
|
O0
|
c
|
utf8_encode_len:
movl %edi, -0xc(%rsp)
cmpl $0x80, -0xc(%rsp)
jae 0x1d6c9
movq $0x1, -0x8(%rsp)
jmp 0x1d711
cmpl $0x800, -0xc(%rsp) # imm = 0x800
jae 0x1d6de
movq $0x2, -0x8(%rsp)
jmp 0x1d711
cmpl $0x10000, -0xc(%rsp) # imm = 0x10000
jae 0x1d6f3
movq $0x3, -0x8(%rsp)
jmp 0x1d711
cmpl $0x110000, -0xc(%rsp) # imm = 0x110000
jae 0x1d708
movq $0x4, -0x8(%rsp)
jmp 0x1d711
movq $0x3, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw (%rax,%rax)
|
utf8_encode_len:
mov [rsp+var_C], edi
cmp [rsp+var_C], 80h
jnb short loc_1D6C9
mov [rsp+var_8], 1
jmp short loc_1D711
loc_1D6C9:
cmp [rsp+var_C], 800h
jnb short loc_1D6DE
mov [rsp+var_8], 2
jmp short loc_1D711
loc_1D6DE:
cmp [rsp+var_C], 10000h
jnb short loc_1D6F3
mov [rsp+var_8], 3
jmp short loc_1D711
loc_1D6F3:
cmp [rsp+var_C], 110000h
jnb short loc_1D708
mov [rsp+var_8], 4
jmp short loc_1D711
loc_1D708:
mov [rsp+var_8], 3
loc_1D711:
mov rax, [rsp+var_8]
retn
|
long long utf8_encode_len(unsigned int a1)
{
if ( a1 < 0x80 )
return 1LL;
if ( a1 < 0x800 )
return 2LL;
if ( a1 < 0x10000 )
return 3LL;
if ( a1 >= 0x110000 )
return 3LL;
return 4LL;
}
|
utf8_encode_len:
MOV dword ptr [RSP + -0xc],EDI
CMP dword ptr [RSP + -0xc],0x80
JNC 0x0011d6c9
MOV qword ptr [RSP + -0x8],0x1
JMP 0x0011d711
LAB_0011d6c9:
CMP dword ptr [RSP + -0xc],0x800
JNC 0x0011d6de
MOV qword ptr [RSP + -0x8],0x2
JMP 0x0011d711
LAB_0011d6de:
CMP dword ptr [RSP + -0xc],0x10000
JNC 0x0011d6f3
MOV qword ptr [RSP + -0x8],0x3
JMP 0x0011d711
LAB_0011d6f3:
CMP dword ptr [RSP + -0xc],0x110000
JNC 0x0011d708
MOV qword ptr [RSP + -0x8],0x4
JMP 0x0011d711
LAB_0011d708:
MOV qword ptr [RSP + -0x8],0x3
LAB_0011d711:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
int8 utf8_encode_len(uint param_1)
{
int8 local_8;
if (param_1 < 0x80) {
local_8 = 1;
}
else if (param_1 < 0x800) {
local_8 = 2;
}
else if (param_1 < 0x10000) {
local_8 = 3;
}
else if (param_1 < 0x110000) {
local_8 = 4;
}
else {
local_8 = 3;
}
return local_8;
}
|
|
62,150 |
utf8_encode_len
|
bluesky950520[P]quickjs/cutils.c
|
size_t utf8_encode_len(uint32_t c)
{
if (c < 0x80)
return 1;
if (c < 0x800)
return 2;
if (c < 0x10000)
return 3;
if (c < 0x110000)
return 4;
return 3;
}
|
O3
|
c
|
utf8_encode_len:
movl $0x1, %eax
cmpl $0x80, %edi
jb 0x1b377
movl $0x2, %eax
cmpl $0x800, %edi # imm = 0x800
jb 0x1b377
movl $0x3, %eax
cmpl $0x10000, %edi # imm = 0x10000
jb 0x1b377
xorl %eax, %eax
cmpl $0x110000, %edi # imm = 0x110000
adcq $0x3, %rax
retq
|
utf8_encode_len:
mov eax, 1
cmp edi, 80h
jb short locret_1B377
mov eax, 2
cmp edi, 800h
jb short locret_1B377
mov eax, 3
cmp edi, offset loc_10000
jb short locret_1B377
xor eax, eax
cmp edi, 110000h
adc rax, 3
locret_1B377:
retn
|
long long utf8_encode_len(unsigned int a1)
{
long long result; // rax
result = 1LL;
if ( a1 >= 0x80 )
{
result = 2LL;
if ( a1 >= 0x800 )
{
result = 3LL;
if ( a1 >= (unsigned int)&loc_10000 )
return (a1 < 0x110000) + 3LL;
}
}
return result;
}
|
utf8_encode_len:
MOV EAX,0x1
CMP EDI,0x80
JC 0x0011b377
MOV EAX,0x2
CMP EDI,0x800
JC 0x0011b377
MOV EAX,0x3
CMP EDI,0x10000
JC 0x0011b377
XOR EAX,EAX
CMP EDI,0x110000
ADC RAX,0x3
LAB_0011b377:
RET
|
char utf8_encode_len(uint param_1)
{
char cVar1;
cVar1 = '\x01';
if (((0x7f < param_1) && (cVar1 = '\x02', 0x7ff < param_1)) && (cVar1 = '\x03', 0xffff < param_1))
{
cVar1 = (param_1 < 0x110000) + '\x03';
}
return cVar1;
}
|
|
62,151 |
my_convert
|
eloqsql/strings/ctype.c
|
uint32
my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
const char *from, uint32 from_length,
CHARSET_INFO *from_cs, uint *errors)
{
uint32 length, length2;
/*
If any of the character sets is not ASCII compatible,
immediately switch to slow mb_wc->wc_mb method.
*/
if ((to_cs->state | from_cs->state) & MY_CS_NONASCII)
return my_convert_using_func(to, to_length,
to_cs, to_cs->cset->wc_mb,
from, from_length,
from_cs, from_cs->cset->mb_wc,
errors);
length= length2= MY_MIN(to_length, from_length);
#if defined(__i386__) || defined(__x86_64__)
/*
Special loop for i386, it allows to refer to a
non-aligned memory block as UINT32, which makes
it possible to copy four bytes at once. This
gives about 10% performance improvement comparing
to byte-by-byte loop.
*/
for ( ; length >= 4; length-= 4, from+= 4, to+= 4)
{
if ((*(uint32*)from) & 0x80808080)
break;
*((uint32*) to)= *((const uint32*) from);
}
#endif /* __i386__ */
for (; ; *to++= *from++, length--)
{
if (!length)
{
*errors= 0;
return length2;
}
if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */
{
uint32 copied_length= length2 - length;
to_length-= copied_length;
from_length-= copied_length;
return copied_length + my_convert_using_func(to, to_length, to_cs,
to_cs->cset->wc_mb,
from, from_length, from_cs,
from_cs->cset->mb_wc,
errors);
}
}
DBUG_ASSERT(FALSE); // Should never get to here
return 0; // Make compiler happy
}
|
O3
|
c
|
my_convert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rax
movl %r8d, %r9d
movq %rcx, %r8
movq 0x10(%rbp), %r10
movl 0xc(%rax), %ecx
orl 0xc(%rdx), %ecx
btl $0xd, %ecx
jb 0xa0658
cmpl %r9d, %esi
movl %r9d, %ebx
cmovbl %esi, %ebx
movl %ebx, %ecx
cmpl $0x4, %ebx
jb 0xa0631
movl (%r8), %r11d
testl $0x80808080, %r11d # imm = 0x80808080
jne 0xa0635
movl %r11d, (%rdi)
addl $-0x4, %ecx
addq $0x4, %r8
addq $0x4, %rdi
cmpl $0x3, %ecx
ja 0xa0612
testl %ecx, %ecx
je 0xa064f
movl %ecx, %r14d
xorl %r15d, %r15d
movb (%r8,%r15), %cl
testb %cl, %cl
js 0xa0685
movb %cl, (%rdi,%r15)
incq %r15
cmpl %r15d, %r14d
jne 0xa063b
movl $0x0, (%r10)
jmp 0xa06ca
movl %esi, %esi
movq 0xb8(%rdx), %rcx
movq 0x30(%rcx), %rcx
movl %r9d, %r9d
movq 0xb8(%rax), %r11
subq $0x8, %rsp
pushq %r10
pushq 0x28(%r11)
pushq %rax
callq 0xa04e7
addq $0x28, %rsp
jmp 0xa06d0
addl %r14d, %esi
subl %ebx, %esi
subl %r15d, %esi
addl %r14d, %r9d
subl %ebx, %r9d
subl %r15d, %r9d
movq 0xb8(%rdx), %rcx
movq 0x30(%rcx), %rcx
movq 0xb8(%rax), %r11
addq %r15, %rdi
addq %r15, %r8
subq $0x8, %rsp
pushq %r10
pushq 0x28(%r11)
pushq %rax
callq 0xa04e7
addq $0x20, %rsp
subl %r14d, %ebx
addl %r15d, %ebx
addl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
my_convert:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rax, r9
mov r9d, r8d
mov r8, rcx
mov r10, [rbp+arg_0]
mov ecx, [rax+0Ch]
or ecx, [rdx+0Ch]
bt ecx, 0Dh
jb short loc_A0658
cmp esi, r9d
mov ebx, r9d
cmovb ebx, esi
mov ecx, ebx
cmp ebx, 4
jb short loc_A0631
loc_A0612:
mov r11d, [r8]
test r11d, 80808080h
jnz short loc_A0635
mov [rdi], r11d
add ecx, 0FFFFFFFCh
add r8, 4
add rdi, 4
cmp ecx, 3
ja short loc_A0612
loc_A0631:
test ecx, ecx
jz short loc_A064F
loc_A0635:
mov r14d, ecx
xor r15d, r15d
loc_A063B:
mov cl, [r8+r15]
test cl, cl
js short loc_A0685
mov [rdi+r15], cl
inc r15
cmp r14d, r15d
jnz short loc_A063B
loc_A064F:
mov dword ptr [r10], 0
jmp short loc_A06CA
loc_A0658:
mov esi, esi
mov rcx, [rdx+0B8h]
mov rcx, [rcx+30h]
mov r9d, r9d
mov r11, [rax+0B8h]
sub rsp, 8
push r10
push qword ptr [r11+28h]
push rax
call my_convert_using_func
add rsp, 28h
jmp short loc_A06D0
loc_A0685:
add esi, r14d
sub esi, ebx
sub esi, r15d
add r9d, r14d
sub r9d, ebx
sub r9d, r15d
mov rcx, [rdx+0B8h]
mov rcx, [rcx+30h]
mov r11, [rax+0B8h]
add rdi, r15
add r8, r15
sub rsp, 8
push r10
push qword ptr [r11+28h]
push rax
call my_convert_using_func
add rsp, 20h
sub ebx, r14d
add ebx, r15d
add ebx, eax
loc_A06CA:
mov eax, ebx
add rsp, 8
loc_A06D0:
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long my_convert(
_DWORD *a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
long long a6,
_DWORD *a7)
{
_DWORD *v9; // r8
unsigned int v10; // ebx
unsigned int v11; // ecx
unsigned int v12; // r14d
long long v13; // r15
char v14; // cl
v9 = (_DWORD *)a4;
if ( ((*(_DWORD *)(a3 + 12) | *(_DWORD *)(a6 + 12)) & 0x2000) != 0 )
return my_convert_using_func(
(long long)a1,
a2,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
a4,
a5,
a6,
*(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7);
v10 = a5;
if ( a2 < a5 )
v10 = a2;
v11 = v10;
if ( v10 >= 4 )
{
while ( (*v9 & 0x80808080) == 0 )
{
*a1 = *v9;
v11 -= 4;
++v9;
++a1;
if ( v11 <= 3 )
goto LABEL_7;
}
goto LABEL_8;
}
LABEL_7:
if ( v11 )
{
LABEL_8:
v12 = v11;
v13 = 0LL;
do
{
v14 = *((_BYTE *)v9 + v13);
if ( v14 < 0 )
return (unsigned int)my_convert_using_func(
(long long)a1 + v13,
v12 + a2 - v10 - (unsigned int)v13,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184)
+ 48LL),
(long long)v9 + v13,
v12 + a5 - v10 - (unsigned int)v13,
a6,
*(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7)
+ (_DWORD)v13
+ v10
- v12;
*((_BYTE *)a1 + v13++) = v14;
}
while ( v12 != (_DWORD)v13 );
}
*a7 = 0;
return v10;
}
|
my_convert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,R9
MOV R9D,R8D
MOV R8,RCX
MOV R10,qword ptr [RBP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,dword ptr [RDX + 0xc]
BT ECX,0xd
JC 0x001a0658
CMP ESI,R9D
MOV EBX,R9D
CMOVC EBX,ESI
MOV ECX,EBX
CMP EBX,0x4
JC 0x001a0631
LAB_001a0612:
MOV R11D,dword ptr [R8]
TEST R11D,0x80808080
JNZ 0x001a0635
MOV dword ptr [RDI],R11D
ADD ECX,-0x4
ADD R8,0x4
ADD RDI,0x4
CMP ECX,0x3
JA 0x001a0612
LAB_001a0631:
TEST ECX,ECX
JZ 0x001a064f
LAB_001a0635:
MOV R14D,ECX
XOR R15D,R15D
LAB_001a063b:
MOV CL,byte ptr [R8 + R15*0x1]
TEST CL,CL
JS 0x001a0685
MOV byte ptr [RDI + R15*0x1],CL
INC R15
CMP R14D,R15D
JNZ 0x001a063b
LAB_001a064f:
MOV dword ptr [R10],0x0
JMP 0x001a06ca
LAB_001a0658:
MOV ESI,ESI
MOV RCX,qword ptr [RDX + 0xb8]
MOV RCX,qword ptr [RCX + 0x30]
MOV R9D,R9D
MOV R11,qword ptr [RAX + 0xb8]
SUB RSP,0x8
PUSH R10
PUSH qword ptr [R11 + 0x28]
PUSH RAX
CALL 0x001a04e7
ADD RSP,0x28
JMP 0x001a06d0
LAB_001a0685:
ADD ESI,R14D
SUB ESI,EBX
SUB ESI,R15D
ADD R9D,R14D
SUB R9D,EBX
SUB R9D,R15D
MOV RCX,qword ptr [RDX + 0xb8]
MOV RCX,qword ptr [RCX + 0x30]
MOV R11,qword ptr [RAX + 0xb8]
ADD RDI,R15
ADD R8,R15
SUB RSP,0x8
PUSH R10
PUSH qword ptr [R11 + 0x28]
PUSH RAX
CALL 0x001a04e7
ADD RSP,0x20
SUB EBX,R14D
ADD EBX,R15D
ADD EBX,EAX
LAB_001a06ca:
MOV EAX,EBX
ADD RSP,0x8
LAB_001a06d0:
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6,
int4 *param_7)
{
int iVar1;
ulong uVar2;
uint uVar3;
uint uVar5;
int iVar6;
long lVar7;
ulong uVar4;
uVar2 = (ulong)param_5;
if (((*(uint *)(param_6 + 0xc) | *(uint *)(param_3 + 0xc)) >> 0xd & 1) == 0) {
if (param_2 < param_5) {
uVar2 = (ulong)param_2;
}
uVar5 = (uint)uVar2;
uVar3 = uVar5;
uVar4 = uVar2;
while (3 < uVar3) {
uVar3 = (uint)uVar4;
if ((*param_4 & 0x80808080) != 0) goto LAB_001a0635;
*param_1 = *param_4;
uVar3 = uVar3 - 4;
uVar4 = (ulong)uVar3;
param_4 = param_4 + 1;
param_1 = param_1 + 1;
}
if (uVar3 != 0) {
LAB_001a0635:
lVar7 = 0;
do {
if (*(char *)((long)param_4 + lVar7) < '\0') {
iVar6 = (int)lVar7;
iVar1 = my_convert_using_func
((long)param_1 + lVar7,((param_2 + uVar3) - uVar5) - iVar6,param_3,
*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),(long)param_4 + lVar7
,((param_5 + uVar3) - uVar5) - iVar6,param_6,
*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),param_7);
return (ulong)((uVar5 - uVar3) + iVar6 + iVar1);
}
*(char *)((long)param_1 + lVar7) = *(char *)((long)param_4 + lVar7);
lVar7 = lVar7 + 1;
} while (uVar3 != (uint)lVar7);
}
*param_7 = 0;
}
else {
uVar2 = my_convert_using_func
(param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),
param_4,uVar2,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),
param_7);
}
return uVar2;
}
|
|
62,152 |
LefDefParser::defiGcellGrid::setup(char const*, int, int, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRowTrack.cpp
|
void defiGcellGrid::setup(const char* macro, int x, int xNum, double xStep) {
int len = strlen(macro) + 1;
if (len > macroLength_) {
if (macro_) free(macro_);
macroLength_ = len;
macro_ = (char*)malloc(len);
}
strcpy(macro_, defData->DEFCASE(macro));
x_ = x;
xNum_ = xNum;
xStep_ = xStep;
}
|
O3
|
cpp
|
LefDefParser::defiGcellGrid::setup(char const*, int, int, double):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x70d0
movq %rax, %r13
incl %r13d
movq 0x8(%r14), %r12
cmpl (%r14), %r13d
jle 0x2025e
testq %r12, %r12
je 0x2024c
movq %r12, %rdi
callq 0x7220
movl %r13d, (%r14)
movslq %r13d, %rdi
callq 0x7270
movq %rax, %r12
movq %rax, 0x8(%r14)
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0x1b638
movq %r12, %rdi
movq %rax, %rsi
callq 0x7190
movl %ebp, 0x10(%r14)
movl %ebx, 0x14(%r14)
movsd (%rsp), %xmm0
movsd %xmm0, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN12LefDefParser13defiGcellGrid5setupEPKciid:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
movsd [rsp+38h+var_38], xmm0
mov ebx, ecx
mov ebp, edx
mov r15, rsi
mov r14, rdi
mov rdi, rsi
call _strlen
mov r13, rax
inc r13d
mov r12, [r14+8]
cmp r13d, [r14]
jle short loc_2025E
test r12, r12
jz short loc_2024C
mov rdi, r12
call _free
loc_2024C:
mov [r14], r13d
movsxd rdi, r13d
call _malloc
mov r12, rax
mov [r14+8], rax
loc_2025E:
mov rdi, [r14+20h]; this
mov rsi, r15; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r12
mov rsi, rax
call _strcpy
mov [r14+10h], ebp
mov [r14+14h], ebx
movsd xmm0, [rsp+38h+var_38]
movsd qword ptr [r14+18h], xmm0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::defiGcellGrid::setup(
LefDefParser::defiGcellGrid *this,
const char *a2,
int a3,
int a4,
double a5)
{
int v7; // r13d
long long v8; // r12
const char *v9; // rax
long long result; // rax
v7 = strlen(a2) + 1;
v8 = *((_QWORD *)this + 1);
if ( v7 > *(_DWORD *)this )
{
if ( v8 )
free(*((void **)this + 1));
*(_DWORD *)this = v7;
v8 = malloc(v7);
*((_QWORD *)this + 1) = v8;
}
v9 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 4), a2);
result = strcpy(v8, v9);
*((_DWORD *)this + 4) = a3;
*((_DWORD *)this + 5) = a4;
*((double *)this + 3) = a5;
return result;
}
|
setup:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOVSD qword ptr [RSP],XMM0
MOV EBX,ECX
MOV EBP,EDX
MOV R15,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x001070d0
MOV R13,RAX
INC R13D
MOV R12,qword ptr [R14 + 0x8]
CMP R13D,dword ptr [R14]
JLE 0x0012025e
TEST R12,R12
JZ 0x0012024c
MOV RDI,R12
CALL 0x00107220
LAB_0012024c:
MOV dword ptr [R14],R13D
MOVSXD RDI,R13D
CALL 0x00107270
MOV R12,RAX
MOV qword ptr [R14 + 0x8],RAX
LAB_0012025e:
MOV RDI,qword ptr [R14 + 0x20]
MOV RSI,R15
CALL 0x0011b638
MOV RDI,R12
MOV RSI,RAX
CALL 0x00107190
MOV dword ptr [R14 + 0x10],EBP
MOV dword ptr [R14 + 0x14],EBX
MOVSD XMM0,qword ptr [RSP]
MOVSD qword ptr [R14 + 0x18],XMM0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiGcellGrid::setup(char const*, int, int, double) */
void __thiscall
LefDefParser::defiGcellGrid::setup
(defiGcellGrid *this,char *param_1,int param_2,int param_3,double param_4)
{
size_t sVar1;
char *__dest;
char *__src;
int iVar2;
sVar1 = strlen(param_1);
iVar2 = (int)sVar1 + 1;
__dest = *(char **)(this + 8);
if (*(int *)this < iVar2) {
if (__dest != (char *)0x0) {
free(__dest);
}
*(int *)this = iVar2;
__dest = (char *)malloc((long)iVar2);
*(char **)(this + 8) = __dest;
}
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x20),param_1);
strcpy(__dest,__src);
*(int *)(this + 0x10) = param_2;
*(int *)(this + 0x14) = param_3;
*(double *)(this + 0x18) = param_4;
return;
}
|
|
62,153 |
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
|
monkey531[P]llama/common/json.hpp
|
bool next_byte_in_range(std::initializer_list<char_int_type> ranges)
{
JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6);
add(current);
for (auto range = ranges.begin(); range != ranges.end(); ++range)
{
get();
if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions)
{
add(current);
}
else
{
error_message = "invalid string: ill-formed UTF-8 byte";
return false;
}
}
return true;
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>):
subq $0x48, %rsp
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xa7a20
cmpq $0x2, %rax
je 0xa77ce
leaq 0x30(%rsp), %rdi
callq 0xa7a20
cmpq $0x4, %rax
je 0xa77ce
leaq 0x30(%rsp), %rdi
callq 0xa7a20
cmpq $0x6, %rax
je 0xa77ce
leaq 0x16d9ca(%rip), %rdi # 0x21517e
movl $0x1da8, %esi # imm = 0x1DA8
leaq 0x1678b0(%rip), %rdx # 0x20f070
leaq 0x16e724(%rip), %rcx # 0x215eeb
movb $0x0, %al
callq 0x5def0
movq 0x18(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xa7570
leaq 0x30(%rsp), %rdi
callq 0xa7a30
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xa7a40
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
je 0xa789c
movq 0x18(%rsp), %rdi
callq 0xa6750
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpl 0x14(%rdx), %ecx
movb %al, 0xf(%rsp)
jg 0xa7853
movq 0x18(%rsp), %rax
movl 0x14(%rax), %eax
movq 0x20(%rsp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, 0x20(%rsp)
cmpl 0x4(%rcx), %eax
setle %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa7861
jmp 0xa7870
movq 0x18(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0xa7570
jmp 0xa7887
movq 0x18(%rsp), %rax
leaq 0x16e60f(%rip), %rcx # 0x215e8b
movq %rcx, 0x70(%rax)
movb $0x0, 0x47(%rsp)
jmp 0xa78a1
jmp 0xa7889
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x20(%rsp)
jmp 0xa77ea
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE:
sub rsp, 48h
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_10], rdx
mov [rsp+48h+var_20], rdi
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_30], rax
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void)
cmp rax, 2
jz short loc_A77CE
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void)
cmp rax, 4
jz short loc_A77CE
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void)
cmp rax, 6
jz short loc_A77CE
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1DA8h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "...
mov al, 0
call _ggml_abort
loc_A77CE:
mov rdi, [rsp+48h+var_30]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3addEi; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add(int)
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE5beginEv; std::initializer_list<int>::begin(void)
mov [rsp+48h+var_28], rax
loc_A77EA:
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_38], rax
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE3endEv; std::initializer_list<int>::end(void)
mov rcx, rax
mov rax, [rsp+48h+var_38]
cmp rax, rcx
jz loc_A789C
mov rdi, [rsp+48h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov rdx, [rsp+48h+var_30]
mov rax, [rsp+48h+var_28]
mov ecx, [rax]
xor eax, eax
cmp ecx, [rdx+14h]
mov [rsp+48h+var_39], al
jg short loc_A7853
mov rax, [rsp+48h+var_30]
mov eax, [rax+14h]
mov rcx, [rsp+48h+var_28]
mov rdx, rcx
add rdx, 4
mov [rsp+48h+var_28], rdx
cmp eax, [rcx+4]
setle al
mov [rsp+48h+var_39], al
loc_A7853:
mov al, [rsp+48h+var_39]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_A7861
jmp short loc_A7870
loc_A7861:
mov rdi, [rsp+48h+var_30]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3addEi; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add(int)
jmp short loc_A7887
loc_A7870:
mov rax, [rsp+48h+var_30]
lea rcx, aInvalidStringI; "invalid string: ill-formed UTF-8 byte"
mov [rax+70h], rcx
mov [rsp+48h+var_1], 0
jmp short loc_A78A1
loc_A7887:
jmp short $+2
loc_A7889:
mov rax, [rsp+48h+var_28]
add rax, 4
mov [rsp+48h+var_28], rax
jmp loc_A77EA
loc_A789C:
mov [rsp+48h+var_1], 1
loc_A78A1:
mov al, [rsp+48h+var_1]
and al, 1
add rsp, 48h
retn
|
char nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(
long long a1,
long long a2,
long long a3)
{
_DWORD *v3; // rcx
bool v5; // [rsp+Fh] [rbp-39h]
_DWORD *i; // [rsp+20h] [rbp-28h]
_QWORD v7[2]; // [rsp+30h] [rbp-18h] BYREF
v7[0] = a2;
v7[1] = a3;
if ( std::initializer_list<int>::size(v7) != 2
&& std::initializer_list<int>::size(v7) != 4
&& std::initializer_list<int>::size(v7) != 6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7592LL,
"GGML_ASSERT(%s) failed",
"ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6");
}
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add(
a1,
*(_DWORD *)(a1 + 20));
for ( i = (_DWORD *)std::initializer_list<int>::begin(v7); i != (_DWORD *)std::initializer_list<int>::end(v7); ++i )
{
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v5 = 0;
if ( *i <= *(_DWORD *)(a1 + 20) )
{
v3 = i++;
v5 = *(_DWORD *)(a1 + 20) <= v3[1];
}
if ( !v5 )
{
*(_QWORD *)(a1 + 112) = "invalid string: ill-formed UTF-8 byte";
return 0;
}
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add(
a1,
*(_DWORD *)(a1 + 20));
}
return 1;
}
|
vector:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x001a7770
POP RAX
RET
|
/* std::vector<unsigned char, std::allocator<unsigned char> >::vector() */
vector<unsigned_char,std::allocator<unsigned_char>> * __thiscall
std::vector<unsigned_char,std::allocator<unsigned_char>>::vector
(vector<unsigned_char,std::allocator<unsigned_char>> *this)
{
_Vector_base<unsigned_char,std::allocator<unsigned_char>>::_Vector_base
((_Vector_base<unsigned_char,std::allocator<unsigned_char>> *)this);
return this;
}
|
|
62,154 |
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
|
monkey531[P]llama/common/json.hpp
|
bool next_byte_in_range(std::initializer_list<char_int_type> ranges)
{
JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6);
add(current);
for (auto range = ranges.begin(); range != ranges.end(); ++range)
{
get();
if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions)
{
add(current);
}
else
{
error_message = "invalid string: ill-formed UTF-8 byte";
return false;
}
}
return true;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x6, %rdx
ja 0x3f0ea
movq %rdx, %rbx
pushq $0x54
popq %rax
btq %rdx, %rax
jae 0x3f0ea
movq %rsi, %r15
movq %rdi, %r14
movsbl 0x14(%rdi), %esi
leaq 0x50(%rdi), %r12
movq %r12, %rdi
callq 0x24750
shlq $0x2, %rbx
testq %rbx, %rbx
je 0x3f0d8
movq %r14, %rdi
callq 0x3ed24
movl 0x14(%r14), %eax
cmpl %eax, (%r15)
jg 0x3f0cd
cmpl 0x4(%r15), %eax
jg 0x3f0cd
movsbl %al, %esi
movq %r12, %rdi
callq 0x24750
addq $0x8, %r15
addq $-0x8, %rbx
jmp 0x3f09c
leaq 0x73813(%rip), %rax # 0xb28e7
movq %rax, 0x70(%r14)
testq %rbx, %rbx
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x72af5(%rip), %rdi # 0xb1be6
leaq 0x6d048(%rip), %rdx # 0xac140
leaq 0x73848(%rip), %rcx # 0xb2947
movl $0x1da8, %esi # imm = 0x1DA8
xorl %eax, %eax
callq 0x24e90
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE:
push r15
push r14
push r12
push rbx
push rax
cmp rdx, 6
ja short loc_3F0EA
mov rbx, rdx
push 54h ; 'T'
pop rax
bt rax, rdx
jnb short loc_3F0EA
mov r15, rsi
mov r14, rdi
movsx esi, byte ptr [rdi+14h]
lea r12, [rdi+50h]
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
shl rbx, 2
loc_3F09C:
test rbx, rbx
jz short loc_3F0D8
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov eax, [r14+14h]
cmp [r15], eax
jg short loc_3F0CD
cmp eax, [r15+4]
jg short loc_3F0CD
movsx esi, al
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
add r15, 8
add rbx, 0FFFFFFFFFFFFFFF8h
jmp short loc_3F09C
loc_3F0CD:
lea rax, aInvalidStringI; "invalid string: ill-formed UTF-8 byte"
mov [r14+70h], rax
loc_3F0D8:
test rbx, rbx
setz al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_3F0EA:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "...
mov esi, 1DA8h
xor eax, eax
call _ggml_abort
nop
|
char nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(
__m128i *a1,
__int32 *a2,
unsigned long long a3)
{
long long v4; // rax
long long i; // rbx
__int32 v7; // eax
if ( a3 <= 6 && (v4 = 84LL, _bittest64(&v4, a3)) )
{
std::string::push_back(&a1[5], (unsigned int)a1[1].m128i_i8[4]);
for ( i = 4 * a3; i; i -= 8LL )
{
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v7 = a1[1].m128i_i32[1];
if ( *a2 > v7 || v7 > a2[1] )
{
a1[7].m128i_i64[0] = (long long)"invalid string: ill-formed UTF-8 byte";
return i == 0;
}
std::string::push_back(&a1[5], (unsigned int)(char)v7);
a2 += 2;
}
return i == 0;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7592LL,
"GGML_ASSERT(%s) failed",
"ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6");
return std::_Vector_base<char>::~_Vector_base("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
}
|
next_byte_in_range:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
CMP RDX,0x6
JA 0x0013f0ea
MOV RBX,RDX
PUSH 0x54
POP RAX
BT RAX,RDX
JNC 0x0013f0ea
MOV R15,RSI
MOV R14,RDI
MOVSX ESI,byte ptr [RDI + 0x14]
LEA R12,[RDI + 0x50]
MOV RDI,R12
CALL 0x00124750
SHL RBX,0x2
LAB_0013f09c:
TEST RBX,RBX
JZ 0x0013f0d8
MOV RDI,R14
CALL 0x0013ed24
MOV EAX,dword ptr [R14 + 0x14]
CMP dword ptr [R15],EAX
JG 0x0013f0cd
CMP EAX,dword ptr [R15 + 0x4]
JG 0x0013f0cd
MOVSX ESI,AL
MOV RDI,R12
CALL 0x00124750
ADD R15,0x8
ADD RBX,-0x8
JMP 0x0013f09c
LAB_0013f0cd:
LEA RAX,[0x1b28e7]
MOV qword ptr [R14 + 0x70],RAX
LAB_0013f0d8:
TEST RBX,RBX
SETZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0013f0ea:
LEA RDI,[0x1b1be6]
LEA RDX,[0x1ac140]
LEA RCX,[0x1b2947]
MOV ESI,0x1da8
XOR EAX,EAX
CALL 0x00124e90
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::next_byte_in_range(std::initializer_list<int>) */
bool nlohmann::json_abi_v3_11_3::detail::
lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::next_byte_in_range
(lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*param_1,int *param_2,ulong param_3)
{
long lVar1;
char cVar2;
if ((6 < param_3) || ((0x54UL >> (param_3 & 0x3f) & 1) == 0)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1da8,
"GGML_ASSERT(%s) failed",
"ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6");
}
cVar2 = (char)param_1 + 'P';
std::__cxx11::string::push_back(cVar2);
lVar1 = param_3 << 2;
do {
if (lVar1 == 0) {
LAB_0013f0d8:
return lVar1 == 0;
}
get(param_1);
if ((*(int *)(param_1 + 0x14) < *param_2) || (param_2[1] < *(int *)(param_1 + 0x14))) {
*(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte";
goto LAB_0013f0d8;
}
std::__cxx11::string::push_back(cVar2);
param_2 = param_2 + 2;
lVar1 = lVar1 + -8;
} while( true );
}
|
|
62,155 |
LefDefParser::defiNet::addNoShield(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
|
void defiNet::addNoShield(const char* name) {
defiShield* shield;
if (numNoShields_ == shieldsAllocated_) {
defiShield** array;
int i;
shieldsAllocated_ = shieldsAllocated_ ?
shieldsAllocated_ * 2 : 2 ;
array = (defiShield**)malloc(sizeof(defiShield*)*shieldsAllocated_);
for (i = 0; i < numNoShields_; i++)
array[i] = shields_[i];
if (shields_) free((char*)(shields_));
shields_ = array;
}
shield = shields_[numNoShields_] = new defiShield(defData);
numNoShields_ += 1;
shield->Init(name);
}
|
O3
|
cpp
|
LefDefParser::defiNet::addNoShield(char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x158(%rdi), %r12d
cmpl 0x14c(%rdi), %r12d
jne 0x24b15
leal (%r12,%r12), %eax
testq %r12, %r12
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x14c(%r14)
movslq %ecx, %rdi
shlq $0x3, %rdi
callq 0x7270
movq %rax, %r15
movq 0x150(%r14), %rdi
testl %r12d, %r12d
jle 0x24b00
xorl %eax, %eax
movq (%rdi,%rax,8), %rcx
movq %rcx, (%r15,%rax,8)
incq %rax
cmpq %rax, %r12
jne 0x24ae7
leaq 0x150(%r14), %r12
jmp 0x24b0c
leaq 0x150(%r14), %r12
testq %rdi, %rdi
je 0x24b11
callq 0x7220
movq %r15, (%r12)
movl $0x20, %edi
callq 0x71b0
movq %rax, %r15
movq 0x240(%r14), %rsi
movq %rax, %rdi
callq 0x2348a
movq 0x150(%r14), %rax
movslq 0x158(%r14), %rcx
movq %r15, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x158(%r14)
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x23490
movq %rax, %rbx
movl $0x20, %esi
movq %r15, %rdi
callq 0x71c0
movq %rbx, %rdi
callq 0x7300
nop
|
_ZN12LefDefParser7defiNet11addNoShieldEPKc:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r12d, [rdi+158h]
cmp r12d, [rdi+14Ch]
jnz short loc_24B15
lea eax, [r12+r12]
test r12, r12
mov ecx, 2
cmovnz ecx, eax
mov [r14+14Ch], ecx
movsxd rdi, ecx
shl rdi, 3
call _malloc
mov r15, rax
mov rdi, [r14+150h]
test r12d, r12d
jle short loc_24B00
xor eax, eax
loc_24AE7:
mov rcx, [rdi+rax*8]
mov [r15+rax*8], rcx
inc rax
cmp r12, rax
jnz short loc_24AE7
lea r12, [r14+150h]
jmp short loc_24B0C
loc_24B00:
lea r12, [r14+150h]
test rdi, rdi
jz short loc_24B11
loc_24B0C:
call _free
loc_24B11:
mov [r12], r15
loc_24B15:
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rsi, [r14+240h]; LefDefParser::defrData *
mov rdi, rax; this
call _ZN12LefDefParser10defiShieldC2EPNS_8defrDataE; LefDefParser::defiShield::defiShield(LefDefParser::defrData *)
mov rax, [r14+150h]
movsxd rcx, dword ptr [r14+158h]
mov [rax+rcx*8], r15
lea eax, [rcx+1]
mov [r14+158h], eax
mov rdi, r15; this
mov rsi, rbx; char *
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN12LefDefParser10defiShield4InitEPKc; LefDefParser::defiShield::Init(char const*)
mov rbx, rax
mov esi, 20h ; ' '; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, rbx
call __Unwind_Resume
|
long long LefDefParser::defiNet::addNoShield(LefDefParser::defiNet *this, const char *a2)
{
long long v3; // r12
int v4; // ecx
long long v5; // r15
_QWORD *v6; // rdi
long long i; // rax
long long *v8; // r12
LefDefParser::defiShield *v9; // r15
long long v10; // rcx
v3 = *((unsigned int *)this + 86);
if ( (_DWORD)v3 == *((_DWORD *)this + 83) )
{
v4 = 2;
if ( *((_DWORD *)this + 86) )
v4 = 2 * v3;
*((_DWORD *)this + 83) = v4;
v5 = malloc(8LL * v4);
v6 = (_QWORD *)*((_QWORD *)this + 42);
if ( (int)v3 <= 0 )
{
v8 = (long long *)((char *)this + 336);
if ( !v6 )
{
LABEL_10:
*v8 = v5;
goto LABEL_11;
}
}
else
{
for ( i = 0LL; i != v3; ++i )
*(_QWORD *)(v5 + 8 * i) = v6[i];
v8 = (long long *)((char *)this + 336);
}
free(v6);
goto LABEL_10;
}
LABEL_11:
v9 = (LefDefParser::defiShield *)operator new(0x20uLL);
LefDefParser::defiShield::defiShield(v9, *((LefDefParser::defrData **)this + 72));
v10 = *((int *)this + 86);
*(_QWORD *)(*((_QWORD *)this + 42) + 8 * v10) = v9;
*((_DWORD *)this + 86) = v10 + 1;
return LefDefParser::defiShield::Init(v9, a2);
}
|
addNoShield:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R12D,dword ptr [RDI + 0x158]
CMP R12D,dword ptr [RDI + 0x14c]
JNZ 0x00124b15
LEA EAX,[R12 + R12*0x1]
TEST R12,R12
MOV ECX,0x2
CMOVNZ ECX,EAX
MOV dword ptr [R14 + 0x14c],ECX
MOVSXD RDI,ECX
SHL RDI,0x3
CALL 0x00107270
MOV R15,RAX
MOV RDI,qword ptr [R14 + 0x150]
TEST R12D,R12D
JLE 0x00124b00
XOR EAX,EAX
LAB_00124ae7:
MOV RCX,qword ptr [RDI + RAX*0x8]
MOV qword ptr [R15 + RAX*0x8],RCX
INC RAX
CMP R12,RAX
JNZ 0x00124ae7
LEA R12,[R14 + 0x150]
JMP 0x00124b0c
LAB_00124b00:
LEA R12,[R14 + 0x150]
TEST RDI,RDI
JZ 0x00124b11
LAB_00124b0c:
CALL 0x00107220
LAB_00124b11:
MOV qword ptr [R12],R15
LAB_00124b15:
MOV EDI,0x20
CALL 0x001071b0
MOV R15,RAX
MOV RSI,qword ptr [R14 + 0x240]
LAB_00124b29:
MOV RDI,RAX
CALL 0x0012348a
LAB_00124b31:
MOV RAX,qword ptr [R14 + 0x150]
MOVSXD RCX,dword ptr [R14 + 0x158]
MOV qword ptr [RAX + RCX*0x8],R15
LEA EAX,[RCX + 0x1]
MOV dword ptr [R14 + 0x158],EAX
MOV RDI,R15
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00123490
|
/* LefDefParser::defiNet::addNoShield(char const*) */
void __thiscall LefDefParser::defiNet::addNoShield(defiNet *this,char *param_1)
{
uint uVar1;
void *__ptr;
void *pvVar2;
ulong uVar3;
defiShield *this_00;
int iVar4;
uVar1 = *(uint *)(this + 0x158);
if (uVar1 != *(uint *)(this + 0x14c)) goto LAB_00124b15;
iVar4 = 2;
if ((ulong)uVar1 != 0) {
iVar4 = uVar1 * 2;
}
*(int *)(this + 0x14c) = iVar4;
pvVar2 = malloc((long)iVar4 << 3);
__ptr = *(void **)(this + 0x150);
if ((int)uVar1 < 1) {
if (__ptr != (void *)0x0) goto LAB_00124b0c;
}
else {
uVar3 = 0;
do {
*(int8 *)((long)pvVar2 + uVar3 * 8) = *(int8 *)((long)__ptr + uVar3 * 8);
uVar3 = uVar3 + 1;
} while (uVar1 != uVar3);
LAB_00124b0c:
free(__ptr);
}
*(void **)(this + 0x150) = pvVar2;
LAB_00124b15:
this_00 = (defiShield *)operator_new(0x20);
/* try { // try from 00124b29 to 00124b30 has its CatchHandler @ 00124b63 */
defiShield::defiShield(this_00,*(defrData **)(this + 0x240));
iVar4 = *(int *)(this + 0x158);
*(defiShield **)(*(long *)(this + 0x150) + (long)iVar4 * 8) = this_00;
*(int *)(this + 0x158) = iVar4 + 1;
defiShield::Init(this_00,param_1);
return;
}
|
|
62,156 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long)
|
monkey531[P]llama/common/json.hpp
|
reference at(size_type idx)
{
// at only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
JSON_TRY
{
return set_parent(m_data.m_value.array->at(idx));
}
JSON_CATCH (std::out_of_range&)
{
// create better exception explanation
JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this));
}
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpb $0x2, (%rdi)
jne 0x7e2f3
movq %rsi, %r12
movq 0x8(%rbx), %rdi
callq 0x7e5bc
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x24460
movq %rax, %r14
movq %rbx, %rdi
callq 0x43ea6
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x38a7d(%rip), %rsi # 0xb6d92
movq %rsp, %rdi
callq 0x7e64d
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x130, %esi # imm = 0x130
movq %rbx, %rcx
callq 0x43d5a
xorl %ebp, %ebp
leaq 0x80bfc(%rip), %rsi # 0xfef38
leaq -0x3d90d(%rip), %rdx # 0x40a36
movq %r14, %rdi
callq 0x24ef0
jmp 0x7e3c2
movq %rax, %r15
cmpl $0x1, %edx
jne 0x7e41d
movq %r15, %rdi
callq 0x24380
pushq $0x20
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x42751
leaq 0x389f4(%rip), %rsi # 0xb6d74
leaq 0x389fa(%rip), %rcx # 0xb6d81
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x7e5dd
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x191, %esi # imm = 0x191
movq %rbx, %rcx
callq 0x42606
xorl %ebp, %ebp
leaq 0x80b05(%rip), %rsi # 0xfeeb8
leaq -0x3d984(%rip), %rdx # 0x40a36
movq %r14, %rdi
callq 0x24ef0
movq %rax, %r15
movq %rsp, %rdi
callq 0x251d8
jmp 0x7e3d5
movq %rax, %r15
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x251d8
testb %bpl, %bpl
jne 0x7e3e9
jmp 0x7e3f1
movq %rax, %r15
movq %r14, %rdi
callq 0x24680
callq 0x24e40
jmp 0x7e41d
movq %rax, %rdi
callq 0x27965
movq %rax, %r15
movq %rsp, %rdi
callq 0x251d8
testb %bpl, %bpl
jne 0x7e415
jmp 0x7e41d
movq %rax, %r15
movq %r14, %rdi
callq 0x24680
movq %r15, %rdi
callq 0x24f80
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov rbx, rdi
cmp byte ptr [rdi], 2
jnz short loc_7E2F3
mov r12, rsi
mov rdi, [rbx+8]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE2atEm; 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>>::at(ulong)
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7E2F3:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 130h; int
mov rcx, rbx
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, r14; void *
call ___cxa_throw
|
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>::at(
long long a1)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // r14
_QWORD v3[13]; // [rsp+0h] [rbp-68h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v3[4] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v3, "cannot use at() 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,
304,
(long long)v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return 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>>::at(*(_QWORD *)(a1 + 8));
}
|
at:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
CMP byte ptr [RDI],0x2
JNZ 0x0017e2f3
MOV R12,RSI
MOV RDI,qword ptr [RBX + 0x8]
LAB_0017e2e1:
CALL 0x0017e5bc
LAB_0017e2e6:
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017e2f3:
PUSH 0x20
POP RDI
CALL 0x00124460
MOV R14,RAX
MOV RDI,RBX
CALL 0x00143ea6
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_0017e30e:
LEA RSI,[0x1b6d92]
MOV RDI,RSP
CALL 0x0017e64d
MOV BPL,0x1
LAB_0017e320:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x130
MOV RCX,RBX
CALL 0x00143d5a
XOR EBP,EBP
LEA RSI,[0x1fef38]
LEA RDX,[0x140a36]
MOV RDI,R14
CALL 0x00124ef0
|
/* 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>::at(unsigned long) */
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>
::at(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
detail adStack_68 [32];
char *local_48 [4];
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) {
/* try { // try from 0017e2e1 to 0017e2e5 has its CatchHandler @ 0017e34d */
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>>>
::at(*(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;
}
uVar1 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)type_name(this);
/* try { // try from 0017e30e to 0017e31c has its CatchHandler @ 0017e412 */
detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 0017e320 to 0017e34a has its CatchHandler @ 0017e400 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x130,adStack_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
62,157 |
common_sampler_accept(common_sampler*, int, bool)
|
monkey531[P]llama/common/sampling.cpp
|
void common_sampler_accept(struct common_sampler * gsmpl, llama_token token, bool accept_grammar) {
if (accept_grammar) {
llama_sampler_accept(gsmpl->grmr, token);
}
llama_sampler_accept(gsmpl->chain, token);
gsmpl->prev.push_back(token);
}
|
O3
|
cpp
|
common_sampler_accept(common_sampler*, int, bool):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testl %edx, %edx
je 0xccffd
movq 0x138(%rbx), %rdi
movl %ebp, %esi
callq 0x1a4f0
movq 0x140(%rbx), %rdi
movl %ebp, %esi
callq 0x1a4f0
movq 0x148(%rbx), %rcx
movq 0x150(%rbx), %rsi
cmpq %rcx, %rsi
jne 0xcd036
movq 0x158(%rbx), %rax
incq %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x158(%rbx)
jmp 0xcd040
incq %rsi
movq %rsi, 0x150(%rbx)
movq 0x160(%rbx), %rax
movq 0x168(%rbx), %rdx
movl %ebp, (%rdx,%rax,4)
incq %rax
xorl %edx, %edx
divq %rcx
movq %rdx, 0x160(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
_Z21common_sampler_acceptP14common_samplerib:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
test edx, edx
jz short loc_CCFFD
mov rdi, [rbx+138h]
mov esi, ebp
call _llama_sampler_accept
loc_CCFFD:
mov rdi, [rbx+140h]
mov esi, ebp
call _llama_sampler_accept
mov rcx, [rbx+148h]
mov rsi, [rbx+150h]
cmp rsi, rcx
jnz short loc_CD036
mov rax, [rbx+158h]
inc rax
xor edx, edx
div rsi
mov [rbx+158h], rdx
jmp short loc_CD040
loc_CD036:
inc rsi
mov [rbx+150h], rsi
loc_CD040:
mov rax, [rbx+160h]
mov rdx, [rbx+168h]
mov [rdx+rax*4], ebp
inc rax
xor edx, edx
div rcx
mov [rbx+160h], rdx
add rsp, 8
pop rbx
pop rbp
retn
|
unsigned long long common_sampler_accept(_QWORD *a1, unsigned int a2, int a3)
{
unsigned long long v4; // rcx
unsigned long long v5; // rsi
long long v6; // rax
unsigned long long result; // rax
unsigned long long v8; // rtt
if ( a3 )
llama_sampler_accept(a1[39], a2);
llama_sampler_accept(a1[40], a2);
v4 = a1[41];
v5 = a1[42];
if ( v5 == v4 )
a1[43] = (a1[43] + 1LL) % v5;
else
a1[42] = v5 + 1;
v6 = a1[44];
*(_DWORD *)(a1[45] + 4 * v6) = a2;
v8 = v6 + 1;
result = (v6 + 1) / v4;
a1[44] = v8 % v4;
return result;
}
|
common_sampler_accept:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
TEST EDX,EDX
JZ 0x001ccffd
MOV RDI,qword ptr [RBX + 0x138]
MOV ESI,EBP
CALL 0x0011a4f0
LAB_001ccffd:
MOV RDI,qword ptr [RBX + 0x140]
MOV ESI,EBP
CALL 0x0011a4f0
MOV RCX,qword ptr [RBX + 0x148]
MOV RSI,qword ptr [RBX + 0x150]
CMP RSI,RCX
JNZ 0x001cd036
MOV RAX,qword ptr [RBX + 0x158]
INC RAX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x158],RDX
JMP 0x001cd040
LAB_001cd036:
INC RSI
MOV qword ptr [RBX + 0x150],RSI
LAB_001cd040:
MOV RAX,qword ptr [RBX + 0x160]
MOV RDX,qword ptr [RBX + 0x168]
MOV dword ptr [RDX + RAX*0x4],EBP
INC RAX
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBX + 0x160],RDX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* common_sampler_accept(common_sampler*, int, bool) */
ulong common_sampler_accept(common_sampler *param_1,int param_2,bool param_3)
{
ulong uVar1;
long lVar2;
ulong uVar3;
int7 in_register_00000011;
if ((int)CONCAT71(in_register_00000011,param_3) != 0) {
llama_sampler_accept(*(int8 *)(param_1 + 0x138),param_2);
}
llama_sampler_accept(*(int8 *)(param_1 + 0x140),param_2);
uVar1 = *(ulong *)(param_1 + 0x148);
uVar3 = *(ulong *)(param_1 + 0x150);
if (uVar3 == uVar1) {
*(ulong *)(param_1 + 0x158) = (*(long *)(param_1 + 0x158) + 1U) % uVar3;
}
else {
*(ulong *)(param_1 + 0x150) = uVar3 + 1;
}
lVar2 = *(long *)(param_1 + 0x160);
*(int *)(*(long *)(param_1 + 0x168) + lVar2 * 4) = param_2;
uVar3 = lVar2 + 1;
*(ulong *)(param_1 + 0x160) = uVar3 % uVar1;
return uVar3 / uVar1;
}
|
|
62,158 |
my_strcasecmp_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static
int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res;
/*
Scan a multibyte character.
In the future it is worth to write a special version of my_utf8mb3_uni()
for 0-terminated strings which will not take in account length. Now
we call the regular version of my_utf8mb3_uni() with s+3 in the
last argument. s+3 is enough to scan any multibyte sequence.
Calling the regular version of my_utf8mb3_uni is safe for 0-terminated
strings: we will never lose the end of the string:
If we have 0 character in the middle of a multibyte sequence,
then my_utf8mb3_uni will always return a negative number, so the
loop with finish.
*/
res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
/* Convert Unicode code into weight according to collation */
my_tolower_utf8mb3(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res=my_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3);
if (res <= 0)
return strcmp(s, t);
t+= res;
/* Convert code into weight */
my_tolower_utf8mb3(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int)(uchar)s[0]) - ((int) (uchar) t[0]);
}
|
O3
|
c
|
my_strcasecmp_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movb (%rsi), %al
testb %al, %al
je 0xcd6dc
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x30b24f(%rip), %r12 # 0x3d8860
cmpb $0x0, (%r13)
je 0xcd6d7
testb %al, %al
js 0xcd635
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %ebx
movq %rbx, -0x30(%rbp)
incq %r14
jmp 0xcd675
leaq 0x3(%r14), %rcx
leaq -0x30(%rbp), %rsi
movq %r14, %rdx
callq 0xcc18b
testl %eax, %eax
jle 0xcd6fa
movl %eax, %eax
addq %rax, %r14
movq 0x8(%r15), %rax
movq -0x30(%rbp), %rbx
movzbl %bh, %ecx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xcd675
movzbl %bl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %ebx
movq %rbx, -0x30(%rbp)
movsbq (%r13), %rax
testq %rax, %rax
js 0xcd68d
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %r13
jmp 0xcd6c5
leaq 0x3(%r13), %rcx
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0xcc18b
testl %eax, %eax
jle 0xcd6fa
movl %eax, %eax
addq %rax, %r13
movq 0x8(%r15), %rcx
movq -0x38(%rbp), %rax
movzbl %ah, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xcd6c5
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %rbx
jne 0xcd6f6
movb (%r14), %al
testb %al, %al
jne 0xcd611
xorl %eax, %eax
movzbl %al, %ebx
jmp 0xcd6de
xorl %ebx, %ebx
movzbl (%r13), %eax
subl %eax, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %eax, %ebx
jmp 0xcd6e5
movq %r14, %rdi
movq %r13, %rsi
callq 0x296b0
movl %eax, %ebx
jmp 0xcd6e5
|
my_strcasecmp_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rdx
mov al, [rsi]
test al, al
jz loc_CD6DC
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_CD611:
cmp byte ptr [r13+0], 0
jz loc_CD6D7
test al, al
js short loc_CD635
movzx eax, al
lea rax, [rax+rax*2]
mov ebx, [r12+rax*4+4]
mov [rbp+var_30], rbx
inc r14
jmp short loc_CD675
loc_CD635:
lea rcx, [r14+3]
lea rsi, [rbp+var_30]
mov rdx, r14
call my_utf8mb3_uni
test eax, eax
jle loc_CD6FA
mov eax, eax
add r14, rax
mov rax, [r15+8]
mov rbx, [rbp+var_30]
movzx ecx, bh
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_CD675
movzx ecx, bl
lea rcx, [rcx+rcx*2]
mov ebx, [rax+rcx*4+4]
mov [rbp+var_30], rbx
loc_CD675:
movsx rax, byte ptr [r13+0]
test rax, rax
js short loc_CD68D
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc r13
jmp short loc_CD6C5
loc_CD68D:
lea rcx, [r13+3]
lea rsi, [rbp+var_38]
mov rdx, r13
call my_utf8mb3_uni
test eax, eax
jle short loc_CD6FA
mov eax, eax
add r13, rax
mov rcx, [r15+8]
mov rax, [rbp+var_38]
movzx edx, ah
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_CD6C5
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_CD6C5:
cmp rbx, rax
jnz short loc_CD6F6
mov al, [r14]
test al, al
jnz loc_CD611
xor eax, eax
loc_CD6D7:
movzx ebx, al
jmp short loc_CD6DE
loc_CD6DC:
xor ebx, ebx
loc_CD6DE:
movzx eax, byte ptr [r13+0]
sub ebx, eax
loc_CD6E5:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CD6F6:
sub ebx, eax
jmp short loc_CD6E5
loc_CD6FA:
mov rdi, r14
mov rsi, r13
call _strcmp
mov ebx, eax
jmp short loc_CD6E5
|
long long my_strcasecmp_utf8mb3(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // al
unsigned __int8 *v5; // r14
long long v6; // r15
unsigned long long v7; // rbx
int v8; // eax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
int v12; // eax
long long v13; // rcx
int v14; // ebx
unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v18; // [rsp+10h] [rbp-30h] BYREF
v4 = *a2;
if ( *a2 )
{
v5 = a2;
v6 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
if ( !*a3 )
goto LABEL_17;
if ( (v4 & 0x80u) != 0 )
{
v8 = my_utf8mb3_uni(a1, &v18, v5, (unsigned long long)(v5 + 3));
if ( v8 <= 0 )
return (unsigned int)strcmp(v5, a3);
v5 += (unsigned int)v8;
v7 = v18;
v9 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v18));
if ( v9 )
{
v7 = *(unsigned int *)(v9 + 12LL * (unsigned __int8)v18 + 4);
v18 = v7;
}
}
else
{
v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1];
v18 = v7;
++v5;
}
v10 = (char)*a3;
if ( v10 < 0 )
{
v12 = my_utf8mb3_uni(a1, &v17, a3, (unsigned long long)(a3 + 3));
if ( v12 <= 0 )
return (unsigned int)strcmp(v5, a3);
a3 += (unsigned int)v12;
v11 = v17;
v13 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v17));
if ( v13 )
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4);
}
else
{
v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1];
++a3;
}
if ( v7 != v11 )
return (unsigned int)(v7 - v11);
v4 = *v5;
if ( !*v5 )
{
v4 = 0;
LABEL_17:
v14 = v4;
return (unsigned int)(v14 - *a3);
}
}
}
v14 = 0;
return (unsigned int)(v14 - *a3);
}
|
my_strcasecmp_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RDX
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x001cd6dc
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x4d8860]
LAB_001cd611:
CMP byte ptr [R13],0x0
JZ 0x001cd6d7
TEST AL,AL
JS 0x001cd635
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EBX,dword ptr [R12 + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RBX
INC R14
JMP 0x001cd675
LAB_001cd635:
LEA RCX,[R14 + 0x3]
LEA RSI,[RBP + -0x30]
MOV RDX,R14
CALL 0x001cc18b
TEST EAX,EAX
JLE 0x001cd6fa
MOV EAX,EAX
ADD R14,RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV RBX,qword ptr [RBP + -0x30]
MOVZX ECX,BH
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001cd675
MOVZX ECX,BL
LEA RCX,[RCX + RCX*0x2]
MOV EBX,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RBX
LAB_001cd675:
MOVSX RAX,byte ptr [R13]
TEST RAX,RAX
JS 0x001cd68d
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC R13
JMP 0x001cd6c5
LAB_001cd68d:
LEA RCX,[R13 + 0x3]
LEA RSI,[RBP + -0x38]
MOV RDX,R13
CALL 0x001cc18b
TEST EAX,EAX
JLE 0x001cd6fa
MOV EAX,EAX
ADD R13,RAX
MOV RCX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EDX,AH
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001cd6c5
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_001cd6c5:
CMP RBX,RAX
JNZ 0x001cd6f6
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x001cd611
XOR EAX,EAX
LAB_001cd6d7:
MOVZX EBX,AL
JMP 0x001cd6de
LAB_001cd6dc:
XOR EBX,EBX
LAB_001cd6de:
MOVZX EAX,byte ptr [R13]
SUB EBX,EAX
LAB_001cd6e5:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cd6f6:
SUB EBX,EAX
JMP 0x001cd6e5
LAB_001cd6fa:
MOV RDI,R14
MOV RSI,R13
CALL 0x001296b0
MOV EBX,EAX
JMP 0x001cd6e5
|
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
byte bVar3;
uint uVar4;
int iVar5;
ulong uVar6;
ulong local_40;
ulong local_38;
bVar3 = *param_2;
if (bVar3 == 0) {
uVar4 = 0;
}
else {
lVar1 = *(long *)(param_1 + 0x78);
do {
if (*param_3 == 0) goto LAB_001cd6d7;
if ((char)bVar3 < '\0') {
uVar4 = my_utf8mb3_uni();
if ((int)uVar4 < 1) goto LAB_001cd6fa;
param_2 = param_2 + uVar4;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar2 != 0) {
local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc);
}
}
else {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar3 * 0xc + 4);
param_2 = param_2 + 1;
}
bVar3 = *param_3;
if ((long)(char)bVar3 < 0) {
uVar4 = my_utf8mb3_uni();
if ((int)uVar4 < 1) {
LAB_001cd6fa:
iVar5 = strcmp((char *)param_2,(char *)param_3);
return iVar5;
}
param_3 = param_3 + uVar4;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8);
uVar6 = local_40;
if (lVar2 != 0) {
uVar6 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
}
else {
param_3 = param_3 + 1;
uVar6 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar3 * 0xc + 4);
}
if (local_38 != uVar6) {
return (int)local_38 - (int)uVar6;
}
bVar3 = *param_2;
} while (bVar3 != 0);
bVar3 = 0;
LAB_001cd6d7:
uVar4 = (uint)bVar3;
}
return uVar4 - *param_3;
}
|
|
62,159 |
bf_pow_ui
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_pow_ui(bf_t *r, const bf_t *a, limb_t b, limb_t prec,
bf_flags_t flags)
{
int ret, n_bits, i;
assert(r != a);
if (b == 0)
return bf_set_ui(r, 1);
ret = bf_set(r, a);
n_bits = LIMB_BITS - clz(b);
for(i = n_bits - 2; i >= 0; i--) {
ret |= bf_mul(r, r, r, prec, flags);
if ((b >> i) & 1)
ret |= bf_mul(r, r, a, prec, flags);
}
return ret;
}
|
O2
|
c
|
bf_pow_ui:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
testq %rdx, %rdx
je 0x7902c
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r12
movq %r15, %rdi
movq %rsi, 0x8(%rsp)
callq 0x73216
movl %eax, %r13d
movq %r12, 0x10(%rsp)
bsrq %r12, %r12
xorl $-0x40, %r12d
addl $0x3f, %r12d
testl %r12d, %r12d
js 0x7901a
movq %r15, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x74959
movl %eax, %ebp
orl %r13d, %ebp
movq 0x10(%rsp), %rax
btq %r12, %rax
jae 0x79012
movq %r15, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x74959
orl %eax, %ebp
decl %r12d
movl %ebp, %r13d
jmp 0x78fd1
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rsi
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x73106
|
bf_pow_ui:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdi
test rdx, rdx
jz loc_7902C
mov ebx, r8d
mov r14, rcx
mov r12, rdx
mov rdi, r15
mov [rsp+48h+var_40], rsi
call bf_set
mov r13d, eax
mov [rsp+48h+var_38], r12
bsr r12, r12
xor r12d, 0FFFFFFC0h
add r12d, 3Fh ; '?'
loc_78FD1:
test r12d, r12d
js short loc_7901A
mov rdi, r15
mov rsi, r15
mov rdx, r15
mov rcx, r14
mov r8d, ebx
call bf_mul
mov ebp, eax
or ebp, r13d
mov rax, [rsp+48h+var_38]
bt rax, r12
jnb short loc_79012
mov rdi, r15
mov rsi, r15
mov rdx, [rsp+48h+var_40]
mov rcx, r14
mov r8d, ebx
call bf_mul
or ebp, eax
loc_79012:
dec r12d
mov r13d, ebp
jmp short loc_78FD1
loc_7901A:
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7902C:
push 1
pop rsi
mov rdi, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_set_ui
|
long long bf_pow_ui(long long *a1, long long *a2, unsigned long long a3, long long a4, unsigned int a5)
{
unsigned long long v7; // r12
unsigned int v8; // r13d
unsigned long long v9; // r12
unsigned int v10; // ebp
unsigned long long v11; // rax
unsigned long long v13; // [rsp+10h] [rbp-38h]
if ( !a3 )
return bf_set_ui((long long)a1, 1uLL);
v7 = a3;
v8 = bf_set((long long)a1, (long long)a2);
v13 = v7;
_BitScanReverse64(&v7, v7);
v9 = ((unsigned int)v7 ^ 0xFFFFFFC0) + 63;
while ( (v9 & 0x80000000) == 0LL )
{
v10 = v8 | bf_mul(a1, a1, a1, a4, a5);
v11 = v13;
if ( _bittest64((const long long *)&v11, v9) )
v10 |= bf_mul(a1, a1, a2, a4, a5);
v9 = (unsigned int)(v9 - 1);
v8 = v10;
}
return v8;
}
|
bf_pow_ui:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDI
TEST RDX,RDX
JZ 0x0017902c
MOV EBX,R8D
MOV R14,RCX
MOV R12,RDX
MOV RDI,R15
MOV qword ptr [RSP + 0x8],RSI
CALL 0x00173216
MOV R13D,EAX
MOV qword ptr [RSP + 0x10],R12
BSR R12,R12
XOR R12D,0xffffffc0
ADD R12D,0x3f
LAB_00178fd1:
TEST R12D,R12D
JS 0x0017901a
MOV RDI,R15
MOV RSI,R15
MOV RDX,R15
MOV RCX,R14
MOV R8D,EBX
CALL 0x00174959
MOV EBP,EAX
OR EBP,R13D
MOV RAX,qword ptr [RSP + 0x10]
BT RAX,R12
JNC 0x00179012
MOV RDI,R15
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,R14
MOV R8D,EBX
CALL 0x00174959
OR EBP,EAX
LAB_00179012:
DEC R12D
MOV R13D,EBP
JMP 0x00178fd1
LAB_0017901a:
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017902c:
PUSH 0x1
POP RSI
MOV RDI,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00173106
|
ulong bf_pow_ui(int8 param_1,int8 param_2,ulong param_3,int8 param_4,
int4 param_5)
{
long lVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
uint uVar5;
if (param_3 != 0) {
uVar2 = bf_set(param_1);
lVar1 = 0x3f;
if (param_3 != 0) {
for (; param_3 >> lVar1 == 0; lVar1 = lVar1 + -1) {
}
}
uVar5 = ((uint)lVar1 ^ 0xffffffc0) + 0x3f;
while( true ) {
if ((int)uVar5 < 0) break;
uVar3 = bf_mul(param_1,param_1,param_1,param_4,param_5);
uVar2 = uVar3 | uVar2;
if ((param_3 >> ((ulong)uVar5 & 0x3f) & 1) != 0) {
uVar3 = bf_mul(param_1,param_1,param_2,param_4,param_5);
uVar2 = uVar2 | uVar3;
}
uVar5 = uVar5 - 1;
}
return (ulong)uVar2;
}
uVar4 = bf_set_ui(param_1,1);
return uVar4;
}
|
|
62,160 |
safe_lexcstrdup_root
|
eloqsql/mysys/my_alloc.c
|
LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
}
|
O0
|
c
|
safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3bda2
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3bcc0
movq %rax, -0x10(%rbp)
jmp 0x3bdad
leaq 0x4b631(%rip), %rax # 0x873da
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
safe_lexcstrdup_root:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_20], rsi
mov [rbp+var_18], rdx
mov [rbp+var_28], rdi
cmp [rbp+var_18], 0
jz short loc_3BDA2
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call strmake_root
mov [rbp+var_10], rax
jmp short loc_3BDAD
loc_3BDA2:
lea rax, asc_873D6+4; ""
mov [rbp+var_10], rax
loc_3BDAD:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
char * safe_lexcstrdup_root(_QWORD **a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
|
safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x28],RDI
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0013bda2
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0013bcc0
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0013bdad
LAB_0013bda2:
LEA RAX,[0x1873da]
MOV qword ptr [RBP + -0x10],RAX
LAB_0013bdad:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int1 auVar1 [16];
int *local_18;
if (param_3 == 0) {
local_18 = &DAT_001873da;
}
else {
local_18 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar1._8_8_ = param_3;
auVar1._0_8_ = local_18;
return auVar1;
}
|
|
62,161 |
mysql_set_server_option_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_set_server_option_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_set_server_option,
(parms->mysql, parms->option),
parms->mysql,
int,
r_int)
}
|
O0
|
c
|
mysql_set_server_option_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x3c740
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_set_server_option_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov esi, [rax+8]
call mysql_set_server_option
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
_DWORD * mysql_set_server_option_start_internal(long long a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
v2[2] = mysql_set_server_option(*(_QWORD *)a1, *(_DWORD *)(a1 + 8));
result = v2;
*v2 = 0;
return result;
}
|
mysql_set_server_option_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x8]
CALL 0x0013c740
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_set_server_option_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_set_server_option(*param_1,(int)param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
62,162 |
bool fmt::v10::detail::loc_writer<char>::operator()<long long, 0>(long long)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
auto operator()(T value) -> bool {
auto arg = make_write_int_arg(value, specs.sign);
write_int(out, static_cast<uint64_or_128_t<T>>(arg.abs_value), arg.prefix,
specs, digit_grouping<Char>(grouping, sep));
return true;
}
|
O0
|
c
|
bool fmt::v10::detail::loc_writer<char>::operator()<long long, 0>(long long):
subq $0x158, %rsp # imm = 0x158
movq %rsi, 0x140(%rsp)
movq %rdx, 0x148(%rsp)
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
movq %rdi, 0x138(%rsp)
movq %rcx, 0x128(%rsp)
movq %rax, 0x120(%rsp)
movq 0x138(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x120(%rsp), %rax
movq 0x128(%rsp), %rdx
movq 0x8(%rcx), %rcx
movzwl 0x9(%rcx), %ecx
shrl $0x4, %ecx
andl $0x7, %ecx
movq %rdx, 0xf8(%rsp)
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rdx
leaq 0x100(%rsp), %rdi
callq 0xa9350
movq 0x30(%rsp), %rsi
movq (%rsi), %rax
movq %rax, 0xe8(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x28(%rsp)
addq $0x30, %rsi
leaq 0x88(%rsp), %rdi
callq 0x39160
movq 0x30(%rsp), %rsi
addq $0x10, %rsi
leaq 0x68(%rsp), %rdi
callq 0x39160
jmp 0xaee2b
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xaf580
jmp 0xaee47
movq 0x28(%rsp), %r8
movl 0x24(%rsp), %ecx
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rdx
movq 0xe8(%rsp), %rdi
movq %rdx, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0xa8(%rsp), %r9
callq 0xaf8a0
movq %rax, 0x8(%rsp)
jmp 0xaee8a
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x93690
leaq 0x68(%rsp), %rdi
callq 0x1aac0
leaq 0x88(%rsp), %rdi
callq 0x1aac0
movb $0x1, %al
andb $0x1, %al
addq $0x158, %rsp # imm = 0x158
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xaef09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xaeeff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x93690
leaq 0x68(%rsp), %rdi
callq 0x1aac0
leaq 0x88(%rsp), %rdi
callq 0x1aac0
movq 0x60(%rsp), %rdi
callq 0x14c80
|
_ZN3fmt3v106detail10loc_writerIcEclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_:
sub rsp, 158h
mov [rsp+158h+var_18], rsi
mov [rsp+158h+var_10], rdx
mov rax, [rsp+158h+var_18]
mov rcx, [rsp+158h+var_10]
mov [rsp+158h+var_20], rdi
mov [rsp+158h+var_30], rcx
mov [rsp+158h+var_38], rax
mov rcx, [rsp+158h+var_20]
mov [rsp+158h+var_128], rcx
mov rax, [rsp+158h+var_38]
mov rdx, [rsp+158h+var_30]
mov rcx, [rcx+8]
movzx ecx, word ptr [rcx+9]
shr ecx, 4
and ecx, 7
mov [rsp+158h+var_60], rdx
mov [rsp+158h+var_68], rax
mov rsi, [rsp+158h+var_68]
mov rdx, [rsp+158h+var_60]
lea rdi, [rsp+158h+var_58]
call _ZN3fmt3v106detail18make_write_int_argIoEENS1_13write_int_argINSt11conditionalIXaalecl8num_bitsIT_EELi32EntLi0EEjNS4_IXlecl8num_bitsIS5_EELi64EEmoE4typeEE4typeEEES5_NS0_4sign4typeE; fmt::v10::detail::make_write_int_arg<unsigned __int128>(unsigned __int128,fmt::v10::sign::type)
mov rsi, [rsp+158h+var_128]
mov rax, [rsi]
mov [rsp+158h+var_70], rax
mov rax, [rsp+158h+var_58]
mov [rsp+158h+var_148], rax
mov rax, [rsp+158h+var_50]
mov [rsp+158h+var_140], rax
mov eax, [rsp+158h+var_48]
mov [rsp+158h+var_134], eax
mov rax, [rsi+8]
mov [rsp+158h+var_130], rax
add rsi, 30h ; '0'
lea rdi, [rsp+158h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rsi, [rsp+158h+var_128]
add rsi, 10h
lea rdi, [rsp+158h+var_F0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_AEE2B:
lea rdi, [rsp+158h+var_B0]
lea rsi, [rsp+158h+var_D0]
lea rdx, [rsp+158h+var_F0]
call _ZN3fmt3v106detail14digit_groupingIcEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; fmt::v10::detail::digit_grouping<char>::digit_grouping(std::string,std::string)
jmp short $+2
loc_AEE47:
mov r8, [rsp+158h+var_130]
mov ecx, [rsp+158h+var_134]
mov rax, [rsp+158h+var_140]
mov rdx, [rsp+158h+var_148]
mov rdi, [rsp+158h+var_70]
mov [rsp+158h+var_118], rdx
mov [rsp+158h+var_110], rax
mov rsi, [rsp+158h+var_118]
mov rdx, [rsp+158h+var_110]
lea r9, [rsp+158h+var_B0]
call _ZN3fmt3v106detail9write_intINS0_8appenderEocEET_S4_T0_jRKNS0_12format_specsIT1_EERKNS1_14digit_groupingIS7_EE; fmt::v10::detail::write_int<fmt::v10::appender,unsigned __int128,char>(fmt::v10::appender,unsigned __int128,uint,fmt::v10::format_specs<char> const&,fmt::v10::detail::digit_grouping<char> const&)
mov [rsp+158h+var_150], rax
jmp short $+2
loc_AEE8A:
mov rax, [rsp+158h+var_150]
mov [rsp+158h+var_120], rax
lea rdi, [rsp+158h+var_B0]
call _ZN3fmt3v106detail14digit_groupingIcED2Ev; fmt::v10::detail::digit_grouping<char>::~digit_grouping()
lea rdi, [rsp+158h+var_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov al, 1
and al, 1
add rsp, 158h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_AEF09
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_AEEFF
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_A0]
call _ZN3fmt3v106detail14digit_groupingIcED2Ev; fmt::v10::detail::digit_grouping<char>::~digit_grouping()
loc_AEEFF:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_AEF09:
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_58]
call __Unwind_Resume
|
char ZN3fmt3v106detail10loc_writerIcEclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_(
_QWORD *a1,
long long a2,
long long a3)
{
int v3; // ecx
long long v5; // [rsp+10h] [rbp-148h]
long long v6; // [rsp+18h] [rbp-140h]
unsigned int v7; // [rsp+24h] [rbp-134h]
long long v8; // [rsp+28h] [rbp-130h]
_QWORD v9[4]; // [rsp+68h] [rbp-F0h] BYREF
_QWORD v10[4]; // [rsp+88h] [rbp-D0h] BYREF
_BYTE v11[64]; // [rsp+A8h] [rbp-B0h] BYREF
long long v12; // [rsp+E8h] [rbp-70h]
long long v13; // [rsp+F0h] [rbp-68h]
long long v14; // [rsp+F8h] [rbp-60h]
_QWORD v15[2]; // [rsp+100h] [rbp-58h] BYREF
unsigned int v16; // [rsp+110h] [rbp-48h]
long long v17; // [rsp+120h] [rbp-38h]
long long v18; // [rsp+128h] [rbp-30h]
_QWORD *v19; // [rsp+138h] [rbp-20h]
long long v20; // [rsp+140h] [rbp-18h]
long long v21; // [rsp+148h] [rbp-10h]
v20 = a2;
v21 = a3;
v19 = a1;
v18 = a3;
v17 = a2;
v3 = (*(unsigned __int16 *)(a1[1] + 9LL) >> 4) & 7;
v14 = a3;
v13 = a2;
fmt::v10::detail::make_write_int_arg<unsigned __int128>((long long)v15, a2, a3, v3);
v12 = *a1;
v5 = v15[0];
v6 = v15[1];
v7 = v16;
v8 = a1[1];
std::string::basic_string(v10, (long long)(a1 + 6));
std::string::basic_string(v9, (long long)(a1 + 2));
fmt::v10::detail::digit_grouping<char>::digit_grouping(v11, v10, v9);
fmt::v10::detail::write_int<fmt::v10::appender,unsigned __int128,char>(v12, v5, v6, v7, v8, v11);
fmt::v10::detail::digit_grouping<char>::~digit_grouping((long long)v11);
std::string::~string(v9);
std::string::~string(v10);
return 1;
}
|
_ZN3fmt3v106detail10loc_writerIcEclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_:
SUB RSP,0x158
MOV qword ptr [RSP + 0x140],RSI
MOV qword ptr [RSP + 0x148],RDX
MOV RAX,qword ptr [RSP + 0x140]
MOV RCX,qword ptr [RSP + 0x148]
MOV qword ptr [RSP + 0x138],RDI
MOV qword ptr [RSP + 0x128],RCX
MOV qword ptr [RSP + 0x120],RAX
MOV RCX,qword ptr [RSP + 0x138]
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
MOV RCX,qword ptr [RCX + 0x8]
MOVZX ECX,word ptr [RCX + 0x9]
SHR ECX,0x4
AND ECX,0x7
MOV qword ptr [RSP + 0xf8],RDX
MOV qword ptr [RSP + 0xf0],RAX
MOV RSI,qword ptr [RSP + 0xf0]
MOV RDX,qword ptr [RSP + 0xf8]
LEA RDI,[RSP + 0x100]
CALL 0x001a9350
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSI]
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x110]
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x28],RAX
ADD RSI,0x30
LEA RDI,[RSP + 0x88]
CALL 0x00139160
MOV RSI,qword ptr [RSP + 0x30]
ADD RSI,0x10
LAB_001aee1f:
LEA RDI,[RSP + 0x68]
CALL 0x00139160
JMP 0x001aee2b
LAB_001aee2b:
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0x88]
LEA RDX,[RSP + 0x68]
CALL 0x001af580
JMP 0x001aee47
LAB_001aee47:
MOV R8,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x48],RAX
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
LAB_001aee76:
LEA R9,[RSP + 0xa8]
CALL 0x001af8a0
LAB_001aee83:
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001aee8a
LAB_001aee8a:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0xa8]
CALL 0x00193690
LEA RDI,[RSP + 0x68]
CALL 0x0011aac0
LEA RDI,[RSP + 0x88]
CALL 0x0011aac0
MOV AL,0x1
AND AL,0x1
ADD RSP,0x158
RET
|
int8
_ZN3fmt3v106detail10loc_writerIcEclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_
(int8 *param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
string local_f0 [32];
string local_d0 [32];
digit_grouping<char> local_b0 [64];
detail *local_70;
int8 local_68;
int8 local_60;
int8 local_58;
int8 local_50;
int4 local_48;
int8 local_38;
int8 local_30;
int8 *local_20;
int8 local_18;
int8 local_10;
local_68 = param_2;
local_60 = param_3;
local_38 = param_2;
local_30 = param_3;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
fmt::v10::detail::write_int_arg<std::
conditional<(((num_bits<unsigned__int128>)())<=(32))&&(!(0)),unsigned_int,std::
conditional<((num_bits<unsigned__int128>)())<=(64),unsigned_long,unsigned__int128>::type>::
type>fmt::v10::detail::make_write_int_arg<unsigned__int128>
(&local_58,param_2,param_3,*(ushort *)(param_1[1] + 9) >> 4 & 7);
local_70 = (detail *)*param_1;
uVar1 = param_1[1];
std::__cxx11::string::string(local_d0,(string *)(param_1 + 6));
/* try { // try from 001aee1f to 001aee28 has its CatchHandler @ 001aeec4 */
std::__cxx11::string::string(local_f0,(string *)(param_1 + 2));
/* try { // try from 001aee2b to 001aee44 has its CatchHandler @ 001aeed4 */
fmt::v10::detail::digit_grouping<char>::digit_grouping(local_b0,local_d0,local_f0);
/* try { // try from 001aee76 to 001aee82 has its CatchHandler @ 001aeee4 */
fmt::v10::detail::write_int<fmt::v10::appender,unsigned__int128,char>
(local_70,local_58,local_50,local_48,uVar1,local_b0);
fmt::v10::detail::digit_grouping<char>::~digit_grouping(local_b0);
std::__cxx11::string::~string(local_f0);
std::__cxx11::string::~string(local_d0);
return 1;
}
|
|
62,163 |
eth_get_by_number
|
corpus-core[P]colibri-stateless/src/chains/eth/proofer/beacon.c
|
static inline c4_status_t eth_get_by_number(proofer_ctx_t* ctx, uint64_t block_number, bytes32_t sig_root, bytes32_t data_root) {
char tmp[100] = {0};
json_t eth_block = {0};
json_t header = {0};
// if we have the blocknumber, we fetch the next block, since we know this is the signing block
sprintf(tmp, "\"0x%" PRIx64 "\"", block_number + 1);
TRY_ASYNC(eth_get_block(ctx, (json_t) {.start = tmp, .len = strlen(tmp), .type = JSON_TYPE_STRING}, false, ð_block));
// get the beacon block matching the parent hash
return get_beacon_header_from_eth_block(ctx, eth_block, &header, sig_root, data_root);
}
|
O1
|
c
|
eth_get_by_number:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %r12
movaps %xmm0, 0x50(%r12)
movaps %xmm0, 0x40(%r12)
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movl $0x0, 0x60(%r12)
xorl %eax, %eax
leaq 0x50(%rsp), %r13
movq %rax, 0x10(%r13)
movaps %xmm0, (%r13)
movq %rax, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
leaq 0x1(%rsi), %rdx
leaq 0x334cf(%rip), %rsi # 0x3d783
movq %r12, %rdi
xorl %eax, %eax
callq 0x5310
movq %r12, 0x18(%rsp)
movq %r12, %rdi
callq 0x5140
movq %rax, 0x20(%rsp)
movl $0x1, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xa331
testl %eax, %eax
jne 0xa320
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xa3ea
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
eth_get_by_number:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E0h
mov rbx, rcx
mov r14, rdx
mov r15, rdi
xorps xmm0, xmm0
lea r12, [rsp+108h+var_98]
movaps xmmword ptr [r12+50h], xmm0
movaps xmmword ptr [r12+40h], xmm0
movaps xmmword ptr [r12+30h], xmm0
movaps xmmword ptr [r12+20h], xmm0
movaps xmmword ptr [r12+10h], xmm0
movaps xmmword ptr [r12], xmm0
mov dword ptr [r12+60h], 0
xor eax, eax
lea r13, [rsp+108h+var_B8]
mov [r13+10h], rax
movaps xmmword ptr [r13+0], xmm0
mov [rsp+108h+var_C8], rax
movaps [rsp+108h+var_D8], xmm0
lea rdx, [rsi+1]
lea rsi, a0xLx; "\"0x%lx\""
mov rdi, r12
xor eax, eax
call _sprintf
mov qword ptr [rsp+108h+var_F0], r12
mov rdi, r12
call _strlen
mov qword ptr [rsp+108h+var_F0+8], rax
mov dword ptr [rsp+108h+var_E0], 1
mov rax, [rsp+108h+var_E0]
mov [rsp+108h+var_F8], rax
movups xmm0, [rsp+108h+var_F0]
movups [rsp+108h+var_108], xmm0
mov rdi, r15
mov rsi, r13
call eth_get_block
test eax, eax
jnz short loc_A320
mov rax, [rsp+108h+var_A8]
mov [rsp+108h+var_F8], rax
movaps xmm0, [rsp+108h+var_B8]
movups [rsp+108h+var_108], xmm0
lea rsi, [rsp+108h+var_D8]
mov rdi, r15
mov rdx, r14
mov rcx, rbx
call get_beacon_header_from_eth_block
loc_A320:
add rsp, 0E0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long eth_get_by_number(int a1, long long a2, int a3, int a4)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long result; // rax
int v11; // r8d
int v12; // r9d
long long v13; // [rsp+20h] [rbp-E8h]
__int128 v14; // [rsp+30h] [rbp-D8h] BYREF
long long v15; // [rsp+40h] [rbp-C8h]
__int128 v16; // [rsp+50h] [rbp-B8h] BYREF
long long v17; // [rsp+60h] [rbp-A8h]
_BYTE v18[96]; // [rsp+70h] [rbp-98h] BYREF
int v19; // [rsp+D0h] [rbp-38h]
memset(v18, 0, sizeof(v18));
v19 = 0;
v17 = 0LL;
v16 = 0LL;
v15 = 0LL;
v14 = 0LL;
sprintf(v18, "\"0x%lx\"", a2 + 1);
v13 = strlen(v18);
result = eth_get_block(a1, (unsigned int)&v16, v6, v7, v8, v9, (unsigned int)v18, v13, 1LL);
if ( !(_DWORD)result )
return get_beacon_header_from_eth_block(a1, (unsigned int)&v14, a3, a4, v11, v12, v16, v17);
return result;
}
|
eth_get_by_number:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe0
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
XORPS XMM0,XMM0
LEA R12,[RSP + 0x70]
MOVAPS xmmword ptr [R12 + 0x50],XMM0
MOVAPS xmmword ptr [R12 + 0x40],XMM0
MOVAPS xmmword ptr [R12 + 0x30],XMM0
MOVAPS xmmword ptr [R12 + 0x20],XMM0
MOVAPS xmmword ptr [R12 + 0x10],XMM0
MOVAPS xmmword ptr [R12],XMM0
MOV dword ptr [R12 + 0x60],0x0
XOR EAX,EAX
LEA R13,[RSP + 0x50]
MOV qword ptr [R13 + 0x10],RAX
MOVAPS xmmword ptr [R13],XMM0
MOV qword ptr [RSP + 0x40],RAX
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LEA RDX,[RSI + 0x1]
LEA RSI,[0x13d783]
MOV RDI,R12
XOR EAX,EAX
CALL 0x00105310
MOV qword ptr [RSP + 0x18],R12
MOV RDI,R12
CALL 0x00105140
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],0x1
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
MOV RSI,R13
CALL 0x0010a331
TEST EAX,EAX
JNZ 0x0010a320
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[RSP + 0x30]
MOV RDI,R15
MOV RDX,R14
MOV RCX,RBX
CALL 0x0010a3ea
LAB_0010a320:
ADD RSP,0xe0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
void eth_get_by_number(int8 param_1,long param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int iVar1;
size_t sVar2;
char *__s;
int4 uVar3;
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
char local_98 [112];
__s = local_98;
local_98[0x50] = '\0';
local_98[0x51] = '\0';
local_98[0x52] = '\0';
local_98[0x53] = '\0';
local_98[0x54] = '\0';
local_98[0x55] = '\0';
local_98[0x56] = '\0';
local_98[0x57] = '\0';
local_98[0x58] = '\0';
local_98[0x59] = '\0';
local_98[0x5a] = '\0';
local_98[0x5b] = '\0';
local_98[0x5c] = '\0';
local_98[0x5d] = '\0';
local_98[0x5e] = '\0';
local_98[0x5f] = '\0';
local_98[0x40] = '\0';
local_98[0x41] = '\0';
local_98[0x42] = '\0';
local_98[0x43] = '\0';
local_98[0x44] = '\0';
local_98[0x45] = '\0';
local_98[0x46] = '\0';
local_98[0x47] = '\0';
local_98[0x48] = '\0';
local_98[0x49] = '\0';
local_98[0x4a] = '\0';
local_98[0x4b] = '\0';
local_98[0x4c] = '\0';
local_98[0x4d] = '\0';
local_98[0x4e] = '\0';
local_98[0x4f] = '\0';
local_98[0x30] = '\0';
local_98[0x31] = '\0';
local_98[0x32] = '\0';
local_98[0x33] = '\0';
local_98[0x34] = '\0';
local_98[0x35] = '\0';
local_98[0x36] = '\0';
local_98[0x37] = '\0';
local_98[0x38] = '\0';
local_98[0x39] = '\0';
local_98[0x3a] = '\0';
local_98[0x3b] = '\0';
local_98[0x3c] = '\0';
local_98[0x3d] = '\0';
local_98[0x3e] = '\0';
local_98[0x3f] = '\0';
local_98[0x20] = '\0';
local_98[0x21] = '\0';
local_98[0x22] = '\0';
local_98[0x23] = '\0';
local_98[0x24] = '\0';
local_98[0x25] = '\0';
local_98[0x26] = '\0';
local_98[0x27] = '\0';
local_98[0x28] = '\0';
local_98[0x29] = '\0';
local_98[0x2a] = '\0';
local_98[0x2b] = '\0';
local_98[0x2c] = '\0';
local_98[0x2d] = '\0';
local_98[0x2e] = '\0';
local_98[0x2f] = '\0';
local_98[0x10] = '\0';
local_98[0x11] = '\0';
local_98[0x12] = '\0';
local_98[0x13] = '\0';
local_98[0x14] = '\0';
local_98[0x15] = '\0';
local_98[0x16] = '\0';
local_98[0x17] = '\0';
local_98[0x18] = '\0';
local_98[0x19] = '\0';
local_98[0x1a] = '\0';
local_98[0x1b] = '\0';
local_98[0x1c] = '\0';
local_98[0x1d] = '\0';
local_98[0x1e] = '\0';
local_98[0x1f] = '\0';
local_98[0] = '\0';
local_98[1] = '\0';
local_98[2] = '\0';
local_98[3] = '\0';
local_98[4] = '\0';
local_98[5] = '\0';
local_98[6] = '\0';
local_98[7] = '\0';
local_98[8] = '\0';
local_98[9] = '\0';
local_98[10] = '\0';
local_98[0xb] = '\0';
local_98[0xc] = '\0';
local_98[0xd] = '\0';
local_98[0xe] = '\0';
local_98[0xf] = '\0';
local_98[0x60] = '\0';
local_98[0x61] = '\0';
local_98[0x62] = '\0';
local_98[99] = '\0';
local_a8 = 0;
local_b8 = 0;
uStack_b0 = 0;
local_c8 = 0;
local_d8 = 0;
uStack_d0 = 0;
sprintf(__s,"\"0x%lx\"",param_2 + 1);
sVar2 = strlen(__s);
uVar3 = 1;
iVar1 = eth_get_block(param_1,&local_b8);
if (iVar1 == 0) {
get_beacon_header_from_eth_block
(param_1,&local_d8,param_3,param_4,param_5,param_6,(int4)local_b8,
(int4)uStack_b0,local_a8,__s,sVar2,uVar3);
}
return;
}
|
|
62,164 |
unicode_find_name
|
bluesky950520[P]quickjs/libunicode.c
|
static int unicode_find_name(const char *name_table, const char *name)
{
const char *p, *r;
int pos;
size_t name_len, len;
p = name_table;
pos = 0;
name_len = strlen(name);
while (*p) {
for(;;) {
r = strchr(p, ',');
if (!r)
len = strlen(p);
else
len = r - p;
if (len == name_len && !memcmp(p, name, name_len))
return pos;
p += len + 1;
if (!r)
break;
}
pos++;
}
return -1;
}
|
O1
|
c
|
unicode_find_name:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0xe240
movq %rax, %r12
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpb $0x0, (%r15)
je 0x98841
xorl %ebx, %ebx
movq %r15, %rdi
movl $0x2c, %esi
callq 0xe270
movq %rax, %r13
testq %rax, %rax
je 0x98803
movq %r13, %rbp
subq %r15, %rbp
jmp 0x9880e
movq %r15, %rdi
callq 0xe240
movq %rax, %rbp
cmpq %r12, %rbp
jne 0x98825
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xe690
testl %eax, %eax
je 0x9883f
addq %rbp, %r15
incq %r15
testq %r13, %r13
jne 0x987e6
incl %ebx
cmpb $0x0, (%r15)
jne 0x987e6
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x98841
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
unicode_find_name:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
mov rdi, rsi
call _strlen
mov r12, rax
mov eax, 0FFFFFFFFh
cmp byte ptr [r15], 0
jz short loc_98841
xor ebx, ebx
loc_987E6:
mov rdi, r15
mov esi, 2Ch ; ','
call _strchr
mov r13, rax
test rax, rax
jz short loc_98803
mov rbp, r13
sub rbp, r15
jmp short loc_9880E
loc_98803:
mov rdi, r15
call _strlen
mov rbp, rax
loc_9880E:
cmp rbp, r12
jnz short loc_98825
mov rdi, r15
mov rsi, r14
mov rdx, r12
call _bcmp
test eax, eax
jz short loc_9883F
loc_98825:
add r15, rbp
inc r15
test r13, r13
jnz short loc_987E6
inc ebx
cmp byte ptr [r15], 0
jnz short loc_987E6
mov eax, 0FFFFFFFFh
jmp short loc_98841
loc_9883F:
mov eax, ebx
loc_98841:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long unicode_find_name(_BYTE *a1, long long a2)
{
_BYTE *v2; // r15
long long v3; // r12
long long result; // rax
unsigned int v5; // ebx
long long v6; // rax
long long v7; // rcx
long long v8; // r13
long long v9; // rbp
v2 = a1;
v3 = strlen(a2);
result = 0xFFFFFFFFLL;
if ( *a1 )
{
v5 = 0;
while ( 1 )
{
v6 = strchr(v2, 44LL);
v8 = v6;
v9 = v6 ? v6 - (_QWORD)v2 : strlen(v2);
if ( v9 == v3 && !(unsigned int)bcmp(v2, a2, v3, v7) )
break;
v2 += v9 + 1;
if ( !v8 )
{
++v5;
if ( !*v2 )
return 0xFFFFFFFFLL;
}
}
return v5;
}
return result;
}
|
unicode_find_name:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RSI
CALL 0x0010e240
MOV R12,RAX
MOV EAX,0xffffffff
CMP byte ptr [R15],0x0
JZ 0x00198841
XOR EBX,EBX
LAB_001987e6:
MOV RDI,R15
MOV ESI,0x2c
CALL 0x0010e270
MOV R13,RAX
TEST RAX,RAX
JZ 0x00198803
MOV RBP,R13
SUB RBP,R15
JMP 0x0019880e
LAB_00198803:
MOV RDI,R15
CALL 0x0010e240
MOV RBP,RAX
LAB_0019880e:
CMP RBP,R12
JNZ 0x00198825
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x0010e690
TEST EAX,EAX
JZ 0x0019883f
LAB_00198825:
ADD R15,RBP
INC R15
TEST R13,R13
JNZ 0x001987e6
INC EBX
CMP byte ptr [R15],0x0
JNZ 0x001987e6
MOV EAX,0xffffffff
JMP 0x00198841
LAB_0019883f:
MOV EAX,EBX
LAB_00198841:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int unicode_find_name(char *param_1,char *param_2)
{
int iVar1;
size_t __n;
char *pcVar2;
int iVar3;
size_t sVar4;
__n = strlen(param_2);
if (*param_1 != '\0') {
iVar3 = 0;
do {
pcVar2 = strchr(param_1,0x2c);
if (pcVar2 == (char *)0x0) {
sVar4 = strlen(param_1);
}
else {
sVar4 = (long)pcVar2 - (long)param_1;
}
if ((sVar4 == __n) && (iVar1 = bcmp(param_1,param_2,__n), iVar1 == 0)) {
return iVar3;
}
param_1 = param_1 + sVar4 + 1;
} while ((pcVar2 != (char *)0x0) || (iVar3 = iVar3 + 1, *param_1 != '\0'));
}
return -1;
}
|
|
62,165 |
unicode_find_name
|
bluesky950520[P]quickjs/libunicode.c
|
static int unicode_find_name(const char *name_table, const char *name)
{
const char *p, *r;
int pos;
size_t name_len, len;
p = name_table;
pos = 0;
name_len = strlen(name);
while (*p) {
for(;;) {
r = strchr(p, ',');
if (!r)
len = strlen(p);
else
len = r - p;
if (len == name_len && !memcmp(p, name, name_len))
return pos;
p += len + 1;
if (!r)
break;
}
pos++;
}
return -1;
}
|
O3
|
c
|
unicode_find_name:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0xe240
movq %rax, %r12
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpb $0x0, (%r15)
je 0x9b19c
xorl %ebx, %ebx
movq %r15, %rdi
movl $0x2c, %esi
callq 0xe270
movq %rax, %r13
testq %rax, %rax
je 0x9b15e
movq %r13, %rbp
subq %r15, %rbp
jmp 0x9b169
movq %r15, %rdi
callq 0xe240
movq %rax, %rbp
cmpq %r12, %rbp
jne 0x9b180
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xe690
testl %eax, %eax
je 0x9b19a
addq %rbp, %r15
incq %r15
testq %r13, %r13
jne 0x9b141
incl %ebx
cmpb $0x0, (%r15)
jne 0x9b141
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x9b19c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
unicode_find_name:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
mov rdi, rsi
call _strlen
mov r12, rax
mov eax, 0FFFFFFFFh
cmp byte ptr [r15], 0
jz short loc_9B19C
xor ebx, ebx
loc_9B141:
mov rdi, r15
mov esi, 2Ch ; ','
call _strchr
mov r13, rax
test rax, rax
jz short loc_9B15E
mov rbp, r13
sub rbp, r15
jmp short loc_9B169
loc_9B15E:
mov rdi, r15
call _strlen
mov rbp, rax
loc_9B169:
cmp rbp, r12
jnz short loc_9B180
mov rdi, r15
mov rsi, r14
mov rdx, r12
call _bcmp
test eax, eax
jz short loc_9B19A
loc_9B180:
add r15, rbp
inc r15
test r13, r13
jnz short loc_9B141
inc ebx
cmp byte ptr [r15], 0
jnz short loc_9B141
mov eax, 0FFFFFFFFh
jmp short loc_9B19C
loc_9B19A:
mov eax, ebx
loc_9B19C:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long unicode_find_name(_BYTE *a1, long long a2)
{
_BYTE *v2; // r15
long long v3; // r12
long long result; // rax
unsigned int v5; // ebx
long long v6; // rax
long long v7; // rcx
long long v8; // r13
long long v9; // rbp
v2 = a1;
v3 = strlen(a2);
result = 0xFFFFFFFFLL;
if ( *a1 )
{
v5 = 0;
while ( 1 )
{
v6 = strchr(v2, 44LL);
v8 = v6;
v9 = v6 ? v6 - (_QWORD)v2 : strlen(v2);
if ( v9 == v3 && !(unsigned int)bcmp(v2, a2, v3, v7) )
break;
v2 += v9 + 1;
if ( !v8 )
{
++v5;
if ( !*v2 )
return 0xFFFFFFFFLL;
}
}
return v5;
}
return result;
}
|
unicode_find_name:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RSI
CALL 0x0010e240
MOV R12,RAX
MOV EAX,0xffffffff
CMP byte ptr [R15],0x0
JZ 0x0019b19c
XOR EBX,EBX
LAB_0019b141:
MOV RDI,R15
MOV ESI,0x2c
CALL 0x0010e270
MOV R13,RAX
TEST RAX,RAX
JZ 0x0019b15e
MOV RBP,R13
SUB RBP,R15
JMP 0x0019b169
LAB_0019b15e:
MOV RDI,R15
CALL 0x0010e240
MOV RBP,RAX
LAB_0019b169:
CMP RBP,R12
JNZ 0x0019b180
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x0010e690
TEST EAX,EAX
JZ 0x0019b19a
LAB_0019b180:
ADD R15,RBP
INC R15
TEST R13,R13
JNZ 0x0019b141
INC EBX
CMP byte ptr [R15],0x0
JNZ 0x0019b141
MOV EAX,0xffffffff
JMP 0x0019b19c
LAB_0019b19a:
MOV EAX,EBX
LAB_0019b19c:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int unicode_find_name(char *param_1,char *param_2)
{
int iVar1;
size_t __n;
char *pcVar2;
int iVar3;
size_t sVar4;
__n = strlen(param_2);
if (*param_1 != '\0') {
iVar3 = 0;
do {
pcVar2 = strchr(param_1,0x2c);
if (pcVar2 == (char *)0x0) {
sVar4 = strlen(param_1);
}
else {
sVar4 = (long)pcVar2 - (long)param_1;
}
if ((sVar4 == __n) && (iVar1 = bcmp(param_1,param_2,__n), iVar1 == 0)) {
return iVar3;
}
param_1 = param_1 + sVar4 + 1;
} while ((pcVar2 != (char *)0x0) || (iVar3 = iVar3 + 1, *param_1 != '\0'));
}
return -1;
}
|
|
62,166 |
my_malloc
|
eloqsql/mysys/my_malloc.c
|
void *my_malloc(PSI_memory_key key, size_t size, myf my_flags)
{
my_memory_header *mh;
void *point;
DBUG_ENTER("my_malloc");
DBUG_PRINT("my",("size: %zu flags: %lu", size, my_flags));
compile_time_assert(sizeof(my_memory_header) <= HEADER_SIZE);
if (!(my_flags & (MY_WME | MY_FAE)))
my_flags|= my_global_flags;
/* Safety */
if (!size)
size=1;
if (size > SIZE_T_MAX - 1024L*1024L*16L) /* Wrong call */
DBUG_RETURN(0);
/* We have to align size as we store MY_THREAD_SPECIFIC flag in the LSB */
size= ALIGN_SIZE(size);
if (DBUG_EVALUATE_IF("simulate_out_of_memory", 1, 0))
mh= NULL;
else
mh= (my_memory_header*) sf_malloc(size + HEADER_SIZE, my_flags);
if (mh == NULL)
{
my_errno=errno;
if (my_flags & MY_FAE)
error_handler_hook=fatal_error_handler_hook;
if (my_flags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG+ME_FATAL),size);
if (my_flags & MY_FAE)
abort();
point= NULL;
}
else
{
int flag= MY_TEST(my_flags & MY_THREAD_SPECIFIC);
mh->m_size= size | flag;
mh->m_key= PSI_CALL_memory_alloc(key, size, & mh->m_owner);
update_malloc_size(size + HEADER_SIZE, flag);
point= HEADER_TO_USER(mh);
if (my_flags & MY_ZEROFILL)
bzero(point, size);
else
TRASH_ALLOC(point, size);
}
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN(point);
}
|
O0
|
c
|
my_malloc:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x2f575
jmp 0x2f577
jmp 0x2f579
movq -0x20(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
jne 0x2f599
leaq 0x356b8a(%rip), %rax # 0x386118
movq (%rax), %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2f5a8
movq $0x1, -0x18(%rbp)
cmpq $-0x1000001, -0x18(%rbp) # imm = 0xFEFFFFFF
jbe 0x2f5c1
jmp 0x2f5b4
movq $0x0, -0x8(%rbp)
jmp 0x2f718
movq -0x18(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x24400
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2f666
callq 0x24050
movl (%rax), %eax
movl %eax, -0x38(%rbp)
callq 0x26770
movl -0x38(%rbp), %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x2f623
leaq 0x19f292(%rip), %rax # 0x1ce8a8
movq (%rax), %rcx
leaq 0x19f280(%rip), %rax # 0x1ce8a0
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0x2f646
movq -0x18(%rbp), %rdx
movl $0x5, %edi
movl $0x1044, %esi # imm = 0x1044
movb $0x0, %al
callq 0x2e6e0
movq -0x20(%rbp), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x2f659
callq 0x241a0
movq $0x0, -0x30(%rbp)
jmp 0x2f70a
movq -0x20(%rbp), %rdx
andq $0x10000, %rdx # imm = 0x10000
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rcx
movslq -0x34(%rbp), %rax
orq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
leaq 0x19ee94(%rip), %rax # 0x1ce530
movq (%rax), %rax
movq 0x3e0(%rax), %rax
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq *%rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq 0x19f3a5(%rip), %rax # 0x1cea68
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movl -0x34(%rbp), %ecx
movsbl %cl, %esi
callq *%rax
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x2f6fe
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x24190
jmp 0x2f708
jmp 0x2f700
jmp 0x2f702
jmp 0x2f704
jmp 0x2f706
jmp 0x2f708
jmp 0x2f70a
jmp 0x2f70c
jmp 0x2f70e
jmp 0x2f710
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_malloc:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_2F575:
jmp short $+2
loc_2F577:
jmp short $+2
loc_2F579:
mov rax, [rbp+var_20]
and rax, 18h
cmp rax, 0
jnz short loc_2F599
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_20]
mov [rbp+var_20], rax
loc_2F599:
cmp [rbp+var_18], 0
jnz short loc_2F5A8
mov [rbp+var_18], 1
loc_2F5A8:
cmp [rbp+var_18], 0FFFFFFFFFEFFFFFFh
jbe short loc_2F5C1
jmp short $+2
loc_2F5B4:
mov [rbp+var_8], 0
jmp loc_2F718
loc_2F5C1:
mov rax, [rbp+var_18]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
add rdi, 18h
call _malloc
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_2F666
call ___errno_location
mov eax, [rax]
mov [rbp+var_38], eax
call _my_thread_var
mov ecx, [rbp+var_38]
mov [rax], ecx
mov rax, [rbp+var_20]
and rax, 8
cmp rax, 0
jz short loc_2F623
lea rax, fatal_error_handler_hook
mov rcx, [rax]
lea rax, error_handler_hook
mov [rax], rcx
loc_2F623:
mov rax, [rbp+var_20]
and rax, 18h
cmp rax, 0
jz short loc_2F646
mov rdx, [rbp+var_18]
mov edi, 5
mov esi, 1044h
mov al, 0
call my_error
loc_2F646:
mov rax, [rbp+var_20]
and rax, 8
cmp rax, 0
jz short loc_2F659
call _abort
loc_2F659:
mov [rbp+var_30], 0
jmp loc_2F70A
loc_2F666:
mov rdx, [rbp+var_20]
and rdx, 10000h
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_34], eax
mov rcx, [rbp+var_18]
movsxd rax, [rbp+var_34]
or rcx, rax
mov rax, [rbp+var_28]
mov [rax+8], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+3E0h]
mov edi, [rbp+var_C]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call rax
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+10h], ecx
mov rax, cs:update_malloc_size
mov rdi, [rbp+var_18]
add rdi, 18h
mov ecx, [rbp+var_34]
movsx esi, cl
call rax ; dummy
mov rax, [rbp+var_28]
add rax, 18h
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
and rax, 20h
cmp rax, 0
jz short loc_2F6FE
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_18]
xor esi, esi
call _memset
jmp short loc_2F708
loc_2F6FE:
jmp short $+2
loc_2F700:
jmp short $+2
loc_2F702:
jmp short $+2
loc_2F704:
jmp short $+2
loc_2F706:
jmp short $+2
loc_2F708:
jmp short $+2
loc_2F70A:
jmp short $+2
loc_2F70C:
jmp short $+2
loc_2F70E:
jmp short $+2
loc_2F710:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_2F718:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long my_malloc(unsigned int a1, unsigned long long a2, int a3)
{
int v4; // [rsp+8h] [rbp-38h]
long long v5; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+18h] [rbp-28h]
int v7; // [rsp+20h] [rbp-20h]
unsigned long long v8; // [rsp+28h] [rbp-18h]
unsigned long long v9; // [rsp+28h] [rbp-18h]
v8 = a2;
v7 = a3;
if ( (a3 & 0x18) == 0 )
v7 = a3 | my_global_flags;
if ( !a2 )
v8 = 1LL;
if ( v8 > 0xFFFFFFFFFEFFFFFFLL )
return 0LL;
v9 = (v8 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v6 = malloc(v9 + 24);
if ( v6 )
{
*(_QWORD *)(v6 + 8) = ((v7 & 0x10000) != 0) | v9;
*(_DWORD *)(v6 + 16) = ((long long ( *)(_QWORD, unsigned long long, long long))PSI_server[124])(a1, v9, v6);
((void ( *)(long long, char))update_malloc_size[0])(v9 + 24, (v7 & 0x10000) != 0);
v5 = v6 + 24;
if ( (v7 & 0x20) != 0 )
memset(v5, 0LL, v9);
}
else
{
v4 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v4;
if ( (v7 & 8) != 0 )
error_handler_hook = (long long ( *)(long long, long long, __int16))fatal_error_handler_hook[0];
if ( (v7 & 0x18) != 0 )
my_error(5u, 4164LL, v9);
if ( (v7 & 8) != 0 )
abort();
return 0LL;
}
return v5;
}
|
my_malloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
JMP 0x0012f575
LAB_0012f575:
JMP 0x0012f577
LAB_0012f577:
JMP 0x0012f579
LAB_0012f579:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x18
CMP RAX,0x0
JNZ 0x0012f599
LEA RAX,[0x486118]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012f599:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0012f5a8
MOV qword ptr [RBP + -0x18],0x1
LAB_0012f5a8:
CMP qword ptr [RBP + -0x18],-0x1000001
JBE 0x0012f5c1
JMP 0x0012f5b4
LAB_0012f5b4:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012f718
LAB_0012f5c1:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x00124400
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0012f666
CALL 0x00124050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
CALL 0x00126770
MOV ECX,dword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x8
CMP RAX,0x0
JZ 0x0012f623
LEA RAX,[0x2ce8a8]
MOV RCX,qword ptr [RAX]
LEA RAX,[0x2ce8a0]
MOV qword ptr [RAX],RCX
LAB_0012f623:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x18
CMP RAX,0x0
JZ 0x0012f646
MOV RDX,qword ptr [RBP + -0x18]
MOV EDI,0x5
MOV ESI,0x1044
MOV AL,0x0
CALL 0x0012e6e0
LAB_0012f646:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x8
CMP RAX,0x0
JZ 0x0012f659
CALL 0x001241a0
LAB_0012f659:
MOV qword ptr [RBP + -0x30],0x0
JMP 0x0012f70a
LAB_0012f666:
MOV RDX,qword ptr [RBP + -0x20]
AND RDX,0x10000
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x34],EAX
MOV RCX,qword ptr [RBP + -0x18]
MOVSXD RAX,dword ptr [RBP + -0x34]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
LEA RAX,[0x2ce530]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3e0]
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL RAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [0x002cea68]
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
MOV ECX,dword ptr [RBP + -0x34]
MOVSX ESI,CL
CALL RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x18
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x20
CMP RAX,0x0
JZ 0x0012f6fe
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
XOR ESI,ESI
CALL 0x00124190
JMP 0x0012f708
LAB_0012f6fe:
JMP 0x0012f700
LAB_0012f700:
JMP 0x0012f702
LAB_0012f702:
JMP 0x0012f704
LAB_0012f704:
JMP 0x0012f706
LAB_0012f706:
JMP 0x0012f708
LAB_0012f708:
JMP 0x0012f70a
LAB_0012f70a:
JMP 0x0012f70c
LAB_0012f70c:
JMP 0x0012f70e
LAB_0012f70e:
JMP 0x0012f710
LAB_0012f710:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012f718:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
void * my_malloc(int4 param_1,ulong param_2,ulong param_3)
{
int iVar1;
int4 uVar2;
ulong __n;
int *piVar3;
void *local_38;
ulong local_28;
ulong local_20;
void *local_10;
local_28 = param_3;
if ((param_3 & 0x18) == 0) {
local_28 = my_global_flags | param_3;
}
local_20 = param_2;
if (param_2 == 0) {
local_20 = 1;
}
if (local_20 < 0xffffffffff000000) {
__n = local_20 + 7 & 0xfffffffffffffff8;
local_38 = malloc(__n + 0x18);
if (local_38 == (void *)0x0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((local_28 & 8) != 0) {
error_handler_hook = fatal_error_handler_hook;
}
if ((local_28 & 0x18) != 0) {
my_error(5,0x1044,__n);
}
if ((local_28 & 8) != 0) {
/* WARNING: Subroutine does not return */
abort();
}
local_38 = (void *)0x0;
}
else {
*(ulong *)((long)local_38 + 8) = __n | (long)(int)(uint)((local_28 & 0x10000) != 0);
uVar2 = (**(code **)(PSI_server + 0x3e0))(param_1,__n,local_38);
*(int4 *)((long)local_38 + 0x10) = uVar2;
(*(code *)update_malloc_size)(__n + 0x18);
local_38 = (void *)((long)local_38 + 0x18);
if ((local_28 & 0x20) != 0) {
memset(local_38,0,__n);
}
}
local_10 = local_38;
}
else {
local_10 = (void *)0x0;
}
return local_10;
}
|
|
62,167 |
Catch::SonarQubeReporter::writeTestFile(Catch::StringRef, std::vector<Catch::CumulativeReporterBase::Node<Catch::TestCaseStats, Catch::CumulativeReporterBase::SectionNode> const*, std::allocator<Catch::CumulativeReporterBase::Node<Catch::TestCaseStats, Catch::CumulativeReporterBase::SectionNode> const*>> const&)
|
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
|
void SonarQubeReporter::writeTestFile(StringRef filename, std::vector<TestCaseNode const*> const& testCaseNodes) {
XmlWriter::ScopedElement e = xml.scopedElement("file");
xml.writeAttribute("path"_sr, filename);
for (auto const& child : testCaseNodes)
writeTestCase(*child);
}
|
O3
|
cpp
|
Catch::SonarQubeReporter::writeTestFile(Catch::StringRef, std::vector<Catch::CumulativeReporterBase::Node<Catch::TestCaseStats, Catch::CumulativeReporterBase::SectionNode> const*, std::allocator<Catch::CumulativeReporterBase::Node<Catch::TestCaseStats, Catch::CumulativeReporterBase::SectionNode> const*>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x28(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x6fbf2(%rip), %rsi # 0xdd5ce
leaq 0x6fbef(%rip), %rdx # 0xdd5d2
leaq 0x18(%rsp), %rdi
callq 0x37312
leaq 0xb0(%rbx), %r13
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movl $0x3, %edx
callq 0x642cc
leaq 0x18(%rsp), %rsi
movq %r13, %rdi
movl $0x3, %edx
callq 0x64692
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6da2f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x17150
leaq 0x70b2a(%rip), %rsi # 0xde560
movl $0x4, %edx
movq %r13, %rdi
movq %r12, %rcx
movq %r15, %r8
callq 0x64480
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x6da66
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x6dac6
addq $0x8, %r15
jmp 0x6da50
leaq 0x8(%rsp), %rdi
callq 0x6433c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6dab1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6433c
jmp 0x6da93
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6dabe
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x17150
jmp 0x6dabe
movq %rax, %rbx
jmp 0x6dabe
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6433c
movq %rbx, %rdi
callq 0x17740
|
_ZN5Catch17SonarQubeReporter13writeTestFileENS_9StringRefERKSt6vectorIPKNS_22CumulativeReporterBase4NodeINS_13TestCaseStatsENS3_11SectionNodeEEESaIS9_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
lea rbp, [rsp+68h+var_40]
mov [rbp-10h], rbp
lea rsi, aLoadTestNamesT+1Eh; "file"
lea rdx, aLoadTestNamesT+22h; ""
lea rdi, [rsp+68h+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)
lea r13, [rbx+0B0h]
lea rdi, [rsp+68h+var_60]
mov rsi, r13
mov edx, 3
call _ZN5Catch9XmlWriter13ScopedElementC2EPS0_NS_13XmlFormattingE; Catch::XmlWriter::ScopedElement::ScopedElement(Catch::XmlWriter*,Catch::XmlFormatting)
lea rsi, [rsp+68h+var_50]
mov rdi, r13; this
mov edx, 3
call _ZN5Catch9XmlWriter12startElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13XmlFormattingE; Catch::XmlWriter::startElement(std::string const&,Catch::XmlFormatting)
mov rdi, [rsp+68h+var_50]; void *
cmp rdi, rbp
jz short loc_6DA2F
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6DA2F:
lea rsi, aPath; "path"
mov edx, 4
mov rdi, r13
mov rcx, r12
mov r8, r15
call _ZN5Catch9XmlWriter14writeAttributeENS_9StringRefES1_; Catch::XmlWriter::writeAttribute(Catch::StringRef,Catch::StringRef)
mov r15, [r14]
mov r14, [r14+8]
loc_6DA50:
cmp r15, r14
jz short loc_6DA66
mov rsi, [r15]
mov rdi, rbx; int
call _ZN5Catch17SonarQubeReporter13writeTestCaseERKNS_22CumulativeReporterBase4NodeINS_13TestCaseStatsENS1_11SectionNodeEEE; Catch::SonarQubeReporter::writeTestCase(Catch::CumulativeReporterBase::Node<Catch::TestCaseStats,Catch::CumulativeReporterBase::SectionNode> const&)
add r15, 8
jmp short loc_6DA50
loc_6DA66:
lea rdi, [rsp+68h+var_60]; this
call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement()
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6DAB1
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement()
jmp short loc_6DA93
mov rbx, rax
loc_6DA93:
mov rdi, [rsp+arg_10]; void *
cmp rdi, rbp
jz short loc_6DABE
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6DABE
mov rbx, rax
jmp short loc_6DABE
loc_6DAB1:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement()
loc_6DABE:
mov rdi, rbx
call __Unwind_Resume
|
void Catch::SonarQubeReporter::writeTestFile(long long a1, long long a2, long long a3, long long *a4)
{
long long v6; // r15
long long v7; // r14
int v8; // [rsp+0h] [rbp-68h]
Catch::XmlWriter *v9[2]; // [rsp+8h] [rbp-60h] BYREF
void *v10[2]; // [rsp+18h] [rbp-50h] BYREF
_QWORD v11[8]; // [rsp+28h] [rbp-40h] BYREF
v10[0] = v11;
std::string::_M_construct<char const*>(v10, "file", (long long)"");
Catch::XmlWriter::ScopedElement::ScopedElement((long long)v9, a1 + 176, 3);
Catch::XmlWriter::startElement((Catch::XmlWriter *)(a1 + 176), v10, 3);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
Catch::XmlWriter::writeAttribute(a1 + 176, "path", 4LL, a2, a3);
v6 = *a4;
v7 = a4[1];
while ( v6 != v7 )
{
Catch::SonarQubeReporter::writeTestCase(a1, v8, (long long)v9[0]);
v6 += 8LL;
}
Catch::XmlWriter::ScopedElement::~ScopedElement(v9);
}
|
writeTestFile:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LEA RBP,[RSP + 0x28]
MOV qword ptr [RBP + -0x10],RBP
LAB_0016d9d5:
LEA RSI,[0x1dd5ce]
LEA RDX,[0x1dd5d2]
LEA RDI,[RSP + 0x18]
CALL 0x00137312
LEA R13,[RBX + 0xb0]
LAB_0016d9f4:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV EDX,0x3
CALL 0x001642cc
LAB_0016da06:
LEA RSI,[RSP + 0x18]
MOV RDI,R13
MOV EDX,0x3
CALL 0x00164692
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,RBP
JZ 0x0016da2f
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00117150
LAB_0016da2f:
LEA RSI,[0x1de560]
MOV EDX,0x4
MOV RDI,R13
MOV RCX,R12
MOV R8,R15
CALL 0x00164480
MOV R15,qword ptr [R14]
MOV R14,qword ptr [R14 + 0x8]
LAB_0016da50:
CMP R15,R14
JZ 0x0016da66
MOV RSI,qword ptr [R15]
LAB_0016da58:
MOV RDI,RBX
CALL 0x0016dac6
LAB_0016da60:
ADD R15,0x8
JMP 0x0016da50
LAB_0016da66:
LEA RDI,[RSP + 0x8]
CALL 0x0016433c
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Catch::SonarQubeReporter::writeTestFile(Catch::StringRef,
std::vector<Catch::CumulativeReporterBase::Node<Catch::TestCaseStats,
Catch::CumulativeReporterBase::SectionNode> const*,
std::allocator<Catch::CumulativeReporterBase::Node<Catch::TestCaseStats,
Catch::CumulativeReporterBase::SectionNode> const*> > const&) */
void Catch::SonarQubeReporter::writeTestFile
(SonarQubeReporter *param_1,int8 param_2,int8 param_3,int8 *param_4
)
{
XmlWriter *pXVar1;
int8 *puVar2;
ScopedElement local_60 [16];
long *local_50 [2];
long local_40 [2];
/* try { // try from 0016d9d5 to 0016d9ec has its CatchHandler @ 0016daac */
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char_const*>(local_50,"file","");
pXVar1 = (XmlWriter *)(param_1 + 0xb0);
/* try { // try from 0016d9f4 to 0016da05 has its CatchHandler @ 0016da90 */
XmlWriter::ScopedElement::ScopedElement(local_60,pXVar1,3);
/* try { // try from 0016da06 to 0016da17 has its CatchHandler @ 0016da81 */
XmlWriter::startElement(pXVar1,local_50,3);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
/* try { // try from 0016da2f to 0016da48 has its CatchHandler @ 0016da7f */
XmlWriter::writeAttribute(pXVar1,&DAT_001de560,4,param_2,param_3);
puVar2 = (int8 *)param_4[1];
for (param_4 = (int8 *)*param_4; param_4 != puVar2; param_4 = param_4 + 1) {
/* try { // try from 0016da58 to 0016da5f has its CatchHandler @ 0016dab1 */
writeTestCase(param_1,(Node *)*param_4);
}
XmlWriter::ScopedElement::~ScopedElement(local_60);
return;
}
|
|
62,168 |
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
}
|
O3
|
cpp
|
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp # imm = 0x160
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x2f4(%rip), %rax # 0xde9a6
movq %rax, 0x18(%rsi)
leaq 0x315(%rip), %rax # 0xde9d2
movq %rax, 0x10(%rsi)
movzbl (%rdx), %eax
movzbl 0x1(%rdx), %ecx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0xe1c74
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xde6ee
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r15, (%rsp)
leaq 0x2ea(%rip), %rcx # 0xde9ea
movq %rcx, 0x18(%rsp)
leaq 0x2f0(%rip), %rcx # 0xde9fc
movq %rcx, 0x10(%rsp)
movq %rax, 0x28(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x300(%rip), %rcx # 0xdea22
movq %rcx, 0x38(%rsp)
leaq 0x3a6(%rip), %rcx # 0xdead4
movq %rcx, 0x30(%rsp)
movq %rax, 0x48(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x2e86(%rip), %rcx # 0xe15ca
movq %rcx, 0x58(%rsp)
leaq 0x2ee4(%rip), %rcx # 0xe1634
movq %rcx, 0x50(%rsp)
cmpq %rax, 0x10(%r14)
je 0xde835
movq %rsp, %rsi
movq %r14, %rdi
callq *0x18(%r14)
leaq 0x68(%rsp), %rdi
callq 0xe1e76
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xe203e
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xde799
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xde7b2
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xde7c9
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x148(%rsp), %rdi
callq 0x258a4
leaq 0x130(%rsp), %rdi
callq 0x258a4
leaq 0xf8(%rsp), %rdi
callq 0xa2128
leaq 0xc0(%rsp), %rdi
callq 0xe2852
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0xe2934
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xde825
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
callq 0x1d3e0
jmp 0xde860
jmp 0xde860
jmp 0xde860
jmp 0xde860
jmp 0xde860
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xde87d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xde87d
movq %rax, %rdi
callq 0x25c6b
movq %rax, %rbx
movq %rsp, %rdi
callq 0xe214a
leaq 0x68(%rsp), %rdi
callq 0xe21a0
movq %rbx, %rdi
callq 0x1e660
nop
|
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
push r15
push r14
push rbx
sub rsp, 160h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp; int
movaps xmmword ptr [rsi], xmm0
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
movzx eax, byte ptr [rdx]
movzx ecx, byte ptr [rdx+1]; int
lea r15, [rsp+178h+var_110]
mov rdi, r15; int
mov edx, eax; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<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::string const&)> const&,bool,bool)
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_DE6EE
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_DE6EE:
xor eax, eax
mov [rsp+178h+var_170], rax
mov [rsp+178h+var_178], r15
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&)
mov [rsp+178h+var_160], rcx
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_168], rcx
mov [rsp+178h+var_150], rax
mov [rsp+178h+var_158], r15
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,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&)
mov [rsp+178h+var_140], rcx
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_148], rcx
mov [rsp+178h+var_130], rax
mov [rsp+178h+var_138], r15
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data 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> &)
mov [rsp+178h+var_120], rcx
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_128], rcx
cmp [r14+10h], rax
jz loc_DE835
mov rsi, rsp
mov rdi, r14
call qword ptr [r14+18h]
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
lea rsi, [rsp+178h+var_110]
mov rdi, rbx
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
mov rax, [rsp+178h+var_128]
test rax, rax
jz short loc_DE799
lea rdi, [rsp+178h+var_138]
mov rsi, rdi
mov edx, 3
call rax
loc_DE799:
mov rax, [rsp+178h+var_148]
test rax, rax
jz short loc_DE7B2
lea rdi, [rsp+178h+var_158]
mov rsi, rdi
mov edx, 3
call rax
loc_DE7B2:
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_DE7C9
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_DE7C9:
lea rdi, [rsp+178h+var_30]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_80]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+178h+var_B8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::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>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea r14, [rsp+178h+var_E8]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rax, [r14-18h]
test rax, rax
jz short loc_DE825
lea rdi, [rsp+178h+var_110]
mov rsi, rdi
mov edx, 3
call rax
loc_DE825:
mov rax, rbx
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_DE835:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_DE860
jmp short loc_DE860
jmp short loc_DE860
jmp short loc_DE860
jmp short loc_DE860
mov rbx, rax
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_DE87D
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_DE87D
loc_DE860:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_DE87D:
mov rdi, rbx
call __Unwind_Resume
|
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int *v11; // [rsp+0h] [rbp-178h] BYREF
long long v12; // [rsp+8h] [rbp-170h]
long long ( *v13)(); // [rsp+10h] [rbp-168h]
void *v14; // [rsp+18h] [rbp-160h]
int *v15; // [rsp+20h] [rbp-158h] BYREF
long long v16; // [rsp+28h] [rbp-150h]
long long ( *v17)(); // [rsp+30h] [rbp-148h]
long long ( *v18)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h]
int *v19; // [rsp+40h] [rbp-138h] BYREF
long long v20; // [rsp+48h] [rbp-130h]
long long ( *v21)(); // [rsp+50h] [rbp-128h]
long long ( *v22)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h]
int v23; // [rsp+60h] [rbp-118h]
int v24[4]; // [rsp+68h] [rbp-110h] BYREF
void ( *v25)(int *, int *, long long); // [rsp+78h] [rbp-100h]
_BYTE v26[48]; // [rsp+90h] [rbp-E8h] BYREF
_BYTE v27[56]; // [rsp+C0h] [rbp-B8h] BYREF
_BYTE v28[56]; // [rsp+F8h] [rbp-80h] BYREF
_BYTE v29[24]; // [rsp+130h] [rbp-48h] BYREF
_BYTE v30[48]; // [rsp+148h] [rbp-30h] BYREF
SchemaConverter::SchemaConverter(
(int)v24,
(int)&v11,
*a3,
a3[1],
a5,
a6,
0LL,
0,
(long long)std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager,
(int)std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke,
v15,
v16,
(long long)v17);
if ( v13 )
((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL);
v12 = 0LL;
v11 = v24;
v14 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke;
v13 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager;
v16 = 0LL;
v15 = v24;
v18 = std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke;
v17 = std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager;
v20 = 0LL;
v19 = v24;
v22 = std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke;
v21 = std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, int **))(a2 + 24))(a2, &v11);
SchemaConverter::check_errors((SchemaConverter *)v24);
SchemaConverter::format_grammar[abi:cxx11](
a1,
(unsigned int)v24,
v6,
v7,
v8,
v9,
(_DWORD)v11,
v12,
(_DWORD)v13,
(_DWORD)v14,
(_DWORD)v15,
v16,
(_DWORD)v17,
(_DWORD)v18,
(_DWORD)v19,
v20,
(_DWORD)v21,
(_DWORD)v22,
v23,
v24[0],
v24[2],
(char)v25);
if ( v21 )
((void ( *)(int **, int **, long long))v21)(&v19, &v19, 3LL);
if ( v17 )
((void ( *)(int **, int **, long long))v17)(&v15, &v15, 3LL);
if ( v13 )
((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL);
std::vector<std::string>::~vector((long long)v30);
std::vector<std::string>::~vector((long long)v29);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v28);
std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::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>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v27);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v26);
if ( v25 )
v25(v24, v24, 3LL);
return a1;
}
|
build_grammar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x160
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
LEA RAX,[0x1de9a6]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1de9d2]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EAX,byte ptr [RDX]
MOVZX ECX,byte ptr [RDX + 0x1]
LAB_001de6c8:
LEA R15,[RSP + 0x68]
MOV RDI,R15
MOV EDX,EAX
CALL 0x001e1c74
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001de6ee
LAB_001de6e1:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001de6ee:
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],R15
LEA RCX,[0x1de9ea]
MOV qword ptr [RSP + 0x18],RCX
LEA RCX,[0x1de9fc]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],R15
LEA RCX,[0x1dea22]
MOV qword ptr [RSP + 0x38],RCX
LEA RCX,[0x1dead4]
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x40],R15
LEA RCX,[0x1e15ca]
MOV qword ptr [RSP + 0x58],RCX
LEA RCX,[0x1e1634]
MOV qword ptr [RSP + 0x50],RCX
CMP qword ptr [R14 + 0x10],RAX
JZ 0x001de835
LAB_001de75f:
MOV RSI,RSP
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
LEA RDI,[RSP + 0x68]
CALL 0x001e1e76
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x001e203e
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001de799
LEA RDI,[RSP + 0x40]
LAB_001de78f:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001de799:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001de7b2
LEA RDI,[RSP + 0x20]
LAB_001de7a8:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001de7b2:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001de7c9
LAB_001de7bc:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001de7c9:
LEA RDI,[RSP + 0x148]
CALL 0x001258a4
LEA RDI,[RSP + 0x130]
CALL 0x001258a4
LEA RDI,[RSP + 0xf8]
CALL 0x001a2128
LEA RDI,[RSP + 0xc0]
CALL 0x001e2852
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x001e2934
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001de825
LAB_001de816:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001de825:
MOV RAX,RBX
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001de835:
CALL 0x0011d3e0
|
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&,
common_grammar_options const&) */
function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2)
{
long in_RDX;
SchemaConverter *local_178;
int8 uStack_170;
code *local_168;
code *local_160;
SchemaConverter *local_158;
int8 local_150;
code *local_148;
code *local_140;
SchemaConverter *local_138;
int8 local_130;
code *local_128;
code *local_120;
SchemaConverter local_110 [16];
code *local_100;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_e8 [48];
_Hashtable<std::__cxx11::string,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>>,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>>>,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>>
local_b8 [56];
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
local_80 [56];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24];
local_178 = (SchemaConverter *)0x0;
uStack_170 = 0;
local_160 = std::
_Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_invoke;
local_168 = std::
_Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_manager;
/* try { // try from 001de6c8 to 001de6d6 has its CatchHandler @ 001de844 */
SchemaConverter::SchemaConverter
(local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1));
if (local_168 != (code *)0x0) {
/* try { // try from 001de6e1 to 001de6ed has its CatchHandler @ 001de842 */
(*local_168)(&local_178,&local_178,3);
}
uStack_170 = 0;
local_160 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_invoke;
local_168 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_manager;
local_150 = 0;
local_140 = std::
_Function_handler<std::__cxx11::string(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&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_invoke;
local_148 = std::
_Function_handler<std::__cxx11::string(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&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_manager;
local_130 = 0;
local_120 = std::
_Function_handler<void(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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_invoke;
local_128 = std::
_Function_handler<void(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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_manager;
local_178 = local_110;
local_158 = local_110;
local_138 = local_110;
if (*(long *)(param_2 + 0x10) != 0) {
/* try { // try from 001de75f to 001de77f has its CatchHandler @ 001de868 */
(**(code **)(param_2 + 0x18))(param_2,&local_178);
SchemaConverter::check_errors(local_110);
SchemaConverter::format_grammar_abi_cxx11_();
if (local_128 != (code *)0x0) {
/* try { // try from 001de78f to 001de798 has its CatchHandler @ 001de840 */
(*local_128)(&local_138,&local_138,3);
}
if (local_148 != (code *)0x0) {
/* try { // try from 001de7a8 to 001de7b1 has its CatchHandler @ 001de83e */
(*local_148)(&local_158,&local_158,3);
}
if (local_168 != (code *)0x0) {
/* try { // try from 001de7bc to 001de7c8 has its CatchHandler @ 001de83c */
(*local_168)(&local_178,&local_178,3);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable(local_80);
std::
_Hashtable<std::__cxx11::string,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>>,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_e8);
if (local_100 != (code *)0x0) {
/* try { // try from 001de816 to 001de824 has its CatchHandler @ 001de83a */
(*local_100)(local_110,local_110,3);
}
return param_1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001de835 to 001de839 has its CatchHandler @ 001de868 */
std::__throw_bad_function_call();
}
|
|
62,169 |
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&)
|
llama.cpp/common/minja/minja.hpp
|
inline std::shared_ptr<Context> Context::make(Value && values, const std::shared_ptr<Context> & parent) {
return std::make_shared<Context>(values.is_null() ? Value::object() : std::move(values), parent);
}
|
O3
|
cpp
|
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq 0x10(%rsi), %rdx
movq 0x20(%rsi), %rax
movq %rax, %rcx
orq %rdx, %rcx
sete %cl
cmpb $0x0, 0x40(%rsi)
movq %rdi, %rbx
sete %sil
andb %cl, %sil
movq 0x30(%r15), %rcx
testq %rcx, %rcx
sete %bpl
andb %sil, %bpl
cmpb $0x1, %bpl
jne 0xb68ba
movl $0x30, %edi
callq 0x20220
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xa8ba8(%rip), %rcx # 0x15f430
addq $0x10, %rcx
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
leaq 0x10(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %rcx, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0xbfdf2
jmp 0xb6936
leaq 0x40(%r15), %rdi
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r12
movaps %xmm0, -0x40(%r12)
movq %rdx, -0x30(%r12)
movq 0x18(%r15), %rdx
xorl %r13d, %r13d
movq %r13, 0x18(%r15)
movq %rdx, -0x28(%r12)
movq %r13, 0x10(%r15)
movq %rax, -0x20(%r12)
movq 0x28(%r15), %rax
movq %r13, 0x28(%r15)
movq %rax, -0x18(%r12)
movq %r13, 0x20(%r15)
movq %rcx, -0x10(%r12)
movq 0x38(%r15), %rax
movq %r13, 0x38(%r15)
movq %rax, -0x8(%r12)
movq %r13, 0x30(%r15)
movups (%rdi), %xmm0
movaps %xmm0, (%r12)
xorl %esi, %esi
callq 0x8400e
movb $0x0, 0x40(%r15)
movq %r13, 0x48(%r15)
movq %r12, %rdi
movl $0x1, %esi
callq 0x8400e
leaq 0xf(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq 0xbe986
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x8400e
movq %r14, %rdi
callq 0x88728
leaq 0x58(%rsp), %rdi
callq 0x6f712
leaq 0x48(%rsp), %rdi
callq 0x6f712
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x6f712
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0xb69b8
movq 0xaa605(%rip), %rax # 0x160f98
cmpb $0x0, (%rax)
je 0xb69a3
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xb69ad
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xb69b8
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
je 0xb69c7
leaq 0x18(%rsp), %rdi
callq 0x6f712
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb5050
testb %bpl, %bpl
je 0xb69f5
leaq 0x18(%rsp), %rdi
callq 0x6f712
movq %rbx, %rdi
callq 0x20b00
nop
|
_ZN5minja7Context4makeEONS_5ValueERKSt10shared_ptrIS0_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rdx
mov r15, rsi
mov rdx, [rsi+10h]
mov rax, [rsi+20h]
mov rcx, rax
or rcx, rdx
setz cl
cmp byte ptr [rsi+40h], 0
mov rbx, rdi
setz sil
and sil, cl
mov rcx, [r15+30h]
test rcx, rcx
setz bpl
and bpl, sil
cmp bpl, 1
jnz short loc_B68BA
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
lea rcx, [rax+10h]
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov qword ptr [rax+20h], 0
lea rsi, [rsp+0A8h+var_98]
mov [rsi+8], rax
mov [rsi], rcx
lea rdi, [rsp+0A8h+var_88]
call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&)
jmp short loc_B6936
loc_B68BA:
lea rdi, [r15+40h]
xorps xmm0, xmm0
lea r12, [rsp+0A8h+var_48]
movaps xmmword ptr [r12-40h], xmm0
mov [r12-30h], rdx
mov rdx, [r15+18h]
xor r13d, r13d
mov [r15+18h], r13
mov [r12-28h], rdx
mov [r15+10h], r13
mov [r12-20h], rax
mov rax, [r15+28h]
mov [r15+28h], r13
mov [r12-18h], rax
mov [r15+20h], r13
mov [r12-10h], rcx
mov rax, [r15+38h]
mov [r15+38h], r13
mov [r12-8], rax
mov [r15+30h], r13
movups xmm0, xmmword ptr [rdi]
movaps xmmword ptr [r12], xmm0
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r15+40h], 0
mov [r15+48h], r13
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_B6936:
lea rsi, [rsp+0A8h+var_99]
lea rdx, [rsp+0A8h+var_88]
mov rdi, rbx
mov rcx, r14
call _ZNSt12__shared_ptrIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJNS0_5ValueERKSt10shared_ptrIS1_EEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context> const&>(std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Value,std::shared_ptr<minja::Context> const&)
lea r14, [rsp+0A8h+var_48]
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+0A8h+var_50]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0A8h+var_60]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r14, [rsp+0A8h+var_70]
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_B69B8
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_B69A3
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_B69AD
loc_B69A3:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_B69AD:
cmp eax, 1
jnz short loc_B69B8
mov rax, [rdi]
call qword ptr [rax+18h]
loc_B69B8:
test bpl, bpl
jz short loc_B69C7
lea rdi, [rsp+0A8h+var_90]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_B69C7:
mov rax, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_18]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
test bpl, bpl
jz short loc_B69F5
lea rdi, [rsp+arg_10]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_B69F5:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Context::make(long long a1, long long a2, long long a3)
{
__int128 v4; // rax
volatile signed __int32 *v6; // rcx
bool v7; // bp
long long v8; // rax
volatile signed __int32 *v9; // rax
volatile signed __int32 *v10; // rax
long long v11; // rdi
signed __int32 v12; // eax
char v14; // [rsp+Fh] [rbp-99h] BYREF
long long v15; // [rsp+10h] [rbp-98h] BYREF
volatile signed __int32 *v16; // [rsp+18h] [rbp-90h] BYREF
__int128 v17; // [rsp+20h] [rbp-88h] BYREF
long long v18; // [rsp+30h] [rbp-78h]
volatile signed __int32 *v19[2]; // [rsp+38h] [rbp-70h] BYREF
volatile signed __int32 *v20[2]; // [rsp+48h] [rbp-60h] BYREF
volatile signed __int32 *v21; // [rsp+58h] [rbp-50h] BYREF
_OWORD v22[4]; // [rsp+60h] [rbp-48h] BYREF
*((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 16);
*(_QWORD *)&v4 = *(_QWORD *)(a2 + 32);
v6 = *(volatile signed __int32 **)(a2 + 48);
v7 = v4 == 0 && *(_BYTE *)(a2 + 64) == 0 && v6 == 0LL;
if ( v7 )
{
v8 = operator new(0x30uLL);
*(_QWORD *)(v8 + 8) = 0x100000001LL;
*(_QWORD *)v8 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v8 + 16) = 0LL;
*(_QWORD *)(v8 + 32) = 0LL;
v16 = (volatile signed __int32 *)v8;
v15 = v8 + 16;
minja::Value::Value(&v17, &v15);
}
else
{
v17 = 0LL;
v18 = *((_QWORD *)&v4 + 1);
*((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 24);
*(_QWORD *)(a2 + 24) = 0LL;
v19[0] = *((volatile signed __int32 **)&v4 + 1);
*(_QWORD *)(a2 + 16) = 0LL;
v19[1] = (volatile signed __int32 *)v4;
v9 = *(volatile signed __int32 **)(a2 + 40);
*(_QWORD *)(a2 + 40) = 0LL;
v20[0] = v9;
*(_QWORD *)(a2 + 32) = 0LL;
v20[1] = v6;
v10 = *(volatile signed __int32 **)(a2 + 56);
*(_QWORD *)(a2 + 56) = 0LL;
v21 = v10;
*(_QWORD *)(a2 + 48) = 0LL;
v22[0] = *(_OWORD *)(a2 + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + 64));
*(_BYTE *)(a2 + 64) = 0;
*(_QWORD *)(a2 + 72) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v22);
}
std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context> const&>(
a1,
&v14,
&v17,
a3);
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 *)v22);
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(v22);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v19);
v11 = *((_QWORD *)&v17 + 1);
if ( *((_QWORD *)&v17 + 1) )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v17 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
if ( v7 )
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v16);
return a1;
}
|
make:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RDX
MOV R15,RSI
MOV RDX,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RSI + 0x20]
MOV RCX,RAX
OR RCX,RDX
SETZ CL
CMP byte ptr [RSI + 0x40],0x0
MOV RBX,RDI
SETZ SIL
AND SIL,CL
MOV RCX,qword ptr [R15 + 0x30]
TEST RCX,RCX
SETZ BPL
AND BPL,SIL
CMP BPL,0x1
JNZ 0x001b68ba
MOV EDI,0x30
CALL 0x00120220
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x25f430]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
LEA RCX,[RAX + 0x10]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RAX + 0x20],0x0
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RSI],RCX
LEA RDI,[RSP + 0x20]
CALL 0x001bfdf2
JMP 0x001b6936
LAB_001b68ba:
LEA RDI,[R15 + 0x40]
XORPS XMM0,XMM0
LEA R12,[RSP + 0x60]
MOVAPS xmmword ptr [R12 + -0x40],XMM0
MOV qword ptr [R12 + -0x30],RDX
MOV RDX,qword ptr [R15 + 0x18]
XOR R13D,R13D
MOV qword ptr [R15 + 0x18],R13
MOV qword ptr [R12 + -0x28],RDX
MOV qword ptr [R15 + 0x10],R13
MOV qword ptr [R12 + -0x20],RAX
MOV RAX,qword ptr [R15 + 0x28]
MOV qword ptr [R15 + 0x28],R13
MOV qword ptr [R12 + -0x18],RAX
MOV qword ptr [R15 + 0x20],R13
MOV qword ptr [R12 + -0x10],RCX
MOV RAX,qword ptr [R15 + 0x38]
MOV qword ptr [R15 + 0x38],R13
MOV qword ptr [R12 + -0x8],RAX
MOV qword ptr [R15 + 0x30],R13
MOVUPS XMM0,xmmword ptr [RDI]
MOVAPS xmmword ptr [R12],XMM0
XOR ESI,ESI
CALL 0x0018400e
MOV byte ptr [R15 + 0x40],0x0
MOV qword ptr [R15 + 0x48],R13
MOV RDI,R12
MOV ESI,0x1
CALL 0x0018400e
LAB_001b6936:
LEA RSI,[RSP + 0xf]
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV RCX,R14
CALL 0x001be986
LAB_001b694b:
LEA R14,[RSP + 0x60]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0018400e
MOV RDI,R14
CALL 0x00188728
LEA RDI,[RSP + 0x58]
CALL 0x0016f712
LEA RDI,[RSP + 0x48]
CALL 0x0016f712
LEA R14,[RSP + 0x38]
MOV RDI,R14
CALL 0x0016f712
MOV RDI,qword ptr [R14 + -0x10]
TEST RDI,RDI
JZ 0x001b69b8
MOV RAX,qword ptr [0x00260f98]
CMP byte ptr [RAX],0x0
JZ 0x001b69a3
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001b69ad
LAB_001b69a3:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001b69ad:
CMP EAX,0x1
JNZ 0x001b69b8
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001b69b8:
TEST BPL,BPL
JZ 0x001b69c7
LEA RDI,[RSP + 0x18]
CALL 0x0016f712
LAB_001b69c7:
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) */
Context * __thiscall minja::Context::make(Context *this,Value *param_1,shared_ptr *param_2)
{
int *piVar1;
Value VVar2;
long lVar3;
long lVar4;
long lVar5;
int iVar6;
int1 local_99;
int8 *local_98;
int8 *local_90;
int8 local_88;
long *plStack_80;
long local_78;
int8 local_70;
long local_68;
int8 local_60;
long local_58;
int8 local_50;
int8 local_48;
int8 uStack_40;
lVar3 = *(long *)(param_1 + 0x10);
lVar4 = *(long *)(param_1 + 0x20);
VVar2 = param_1[0x40];
lVar5 = *(long *)(param_1 + 0x30);
if (lVar5 != 0 || (VVar2 != (Value)0x0 || (lVar4 != 0 || lVar3 != 0))) {
local_88 = 0;
plStack_80 = (long *)0x0;
local_70 = *(int8 *)(param_1 + 0x18);
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x10) = 0;
local_60 = *(int8 *)(param_1 + 0x28);
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x20) = 0;
local_50 = *(int8 *)(param_1 + 0x38);
*(int8 *)(param_1 + 0x38) = 0;
*(int8 *)(param_1 + 0x30) = 0;
local_48 = *(int8 *)(param_1 + 0x40);
uStack_40 = *(int8 *)(param_1 + 0x48);
local_78 = lVar3;
local_68 = lVar4;
local_58 = lVar5;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1 + 0x40,0));
param_1[0x40] = (Value)0x0;
*(int8 *)(param_1 + 0x48) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_48,0));
}
else {
local_90 = (int8 *)operator_new(0x30);
local_90[1] = 0x100000001;
*local_90 = &PTR___Sp_counted_base_0025f440;
local_98 = local_90 + 2;
local_90[2] = 0;
local_90[3] = 0;
local_90[4] = 0;
Value::Value((Value *)&local_88,(shared_ptr *)&local_98);
}
/* try { // try from 001b6936 to 001b694a has its CatchHandler @ 001b69d9 */
std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context>const&>
((__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2> *)this,&local_99,&local_88,
param_2);
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((data *)&local_48,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((data *)&local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_50);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70);
if (plStack_80 != (long *)0x0) {
if (*PTR___libc_single_threaded_00260f98 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_80 + 0xc);
iVar6 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar6 = *(int *)((long)plStack_80 + 0xc);
*(int *)((long)plStack_80 + 0xc) = iVar6 + -1;
}
if (iVar6 == 1) {
(**(code **)(*plStack_80 + 0x18))();
}
}
if (lVar5 == 0 && (VVar2 == (Value)0x0 && (lVar4 == 0 && lVar3 == 0))) {
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_90);
}
return this;
}
|
|
62,170 |
init_dynamic_array2
|
eloqsql/mysys/array.c
|
my_bool init_dynamic_array2(PSI_memory_key psi_key, DYNAMIC_ARRAY *array,
uint element_size, void *init_buffer,
uint init_alloc, uint alloc_increment, myf my_flags)
{
DBUG_ENTER("init_dynamic_array2");
if (!alloc_increment)
{
alloc_increment=MY_MAX((8192-MALLOC_OVERHEAD)/element_size,16);
if (init_alloc > 8 && alloc_increment > init_alloc * 2)
alloc_increment=init_alloc*2;
}
array->elements=0;
array->max_element=init_alloc;
array->alloc_increment=alloc_increment;
array->size_of_element=element_size;
array->m_psi_key= psi_key;
array->malloc_flags= my_flags;
DBUG_ASSERT((my_flags & MY_INIT_BUFFER_USED) == 0);
if ((array->buffer= init_buffer))
{
array->malloc_flags|= MY_INIT_BUFFER_USED;
DBUG_RETURN(FALSE);
}
/*
Since the dynamic array is usable even if allocation fails here malloc
should not throw an error
*/
if (init_alloc &&
!(array->buffer= (uchar*) my_malloc(psi_key, element_size*init_alloc,
MYF(my_flags))))
array->max_element=0;
DBUG_RETURN(FALSE);
}
|
O3
|
c
|
init_dynamic_array2:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edx, %r11d
movq %rsi, %rbx
movq 0x10(%rbp), %r10
testl %r9d, %r9d
jne 0x91957
movl $0x10, %r9d
cmpl $0x1e1, %r11d # imm = 0x1E1
ja 0x91946
movw $0x1ff8, %ax # imm = 0x1FF8
xorl %edx, %edx
divw %r11w
movzwl %ax, %r9d
cmpl $0x9, %r8d
jb 0x91957
leal (%r8,%r8), %eax
cmpl %eax, %r9d
cmovael %eax, %r9d
movl $0x0, 0x8(%rbx)
movl %r8d, 0xc(%rbx)
movl %r9d, 0x10(%rbx)
movl %r11d, 0x14(%rbx)
movl %edi, 0x18(%rbx)
movq %r10, 0x20(%rbx)
movq %rcx, (%rbx)
testq %rcx, %rcx
je 0x9198d
orq $0x100, %r10 # imm = 0x100
movq %r10, 0x20(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testl %r8d, %r8d
je 0x91984
imull %r11d, %r8d
movq %r8, %rsi
movq %r10, %rdx
callq 0x9fd41
movq %rax, (%rbx)
testq %rax, %rax
jne 0x91984
movl $0x0, 0xc(%rbx)
jmp 0x91984
|
init_dynamic_array2:
push rbp
mov rbp, rsp
push rbx
push rax
mov r11d, edx
mov rbx, rsi
mov r10, [rbp+arg_0]
test r9d, r9d
jnz short loc_91957
mov r9d, 10h
cmp r11d, 1E1h
ja short loc_91946
mov ax, 1FF8h
xor edx, edx
div r11w
movzx r9d, ax
loc_91946:
cmp r8d, 9
jb short loc_91957
lea eax, [r8+r8]
cmp r9d, eax
cmovnb r9d, eax
loc_91957:
mov dword ptr [rbx+8], 0
mov [rbx+0Ch], r8d
mov [rbx+10h], r9d
mov [rbx+14h], r11d
mov [rbx+18h], edi
mov [rbx+20h], r10
mov [rbx], rcx
test rcx, rcx
jz short loc_9198D
or r10, 100h
mov [rbx+20h], r10
loc_91984:
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
loc_9198D:
test r8d, r8d
jz short loc_91984
imul r8d, r11d
mov rsi, r8
mov rdx, r10
call my_malloc
mov [rbx], rax
test rax, rax
jnz short loc_91984
mov dword ptr [rbx+0Ch], 0
jmp short loc_91984
|
long long init_dynamic_array2(
long long a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
unsigned int a6,
long long a7)
{
long long v8; // rax
if ( !a6 )
{
a6 = 16;
if ( a3 <= 0x1E1 )
a6 = 0x1FF8u / (unsigned __int16)a3;
if ( a5 >= 9 && a6 >= 2 * a5 )
a6 = 2 * a5;
}
*(_DWORD *)(a2 + 8) = 0;
*(_DWORD *)(a2 + 12) = a5;
*(_DWORD *)(a2 + 16) = a6;
*(_DWORD *)(a2 + 20) = a3;
*(_DWORD *)(a2 + 24) = a1;
*(_QWORD *)(a2 + 32) = a7;
*(_QWORD *)a2 = a4;
if ( a4 )
{
*(_QWORD *)(a2 + 32) = a7 | 0x100;
}
else if ( a5 )
{
v8 = my_malloc(a1, a3 * a5, a7);
*(_QWORD *)a2 = v8;
if ( !v8 )
*(_DWORD *)(a2 + 12) = 0;
}
return 0LL;
}
|
init_dynamic_array2:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV R11D,EDX
MOV RBX,RSI
MOV R10,qword ptr [RBP + 0x10]
TEST R9D,R9D
JNZ 0x00191957
MOV R9D,0x10
CMP R11D,0x1e1
JA 0x00191946
MOV AX,0x1ff8
XOR EDX,EDX
DIV R11W
MOVZX R9D,AX
LAB_00191946:
CMP R8D,0x9
JC 0x00191957
LEA EAX,[R8 + R8*0x1]
CMP R9D,EAX
CMOVNC R9D,EAX
LAB_00191957:
MOV dword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0xc],R8D
MOV dword ptr [RBX + 0x10],R9D
MOV dword ptr [RBX + 0x14],R11D
MOV dword ptr [RBX + 0x18],EDI
MOV qword ptr [RBX + 0x20],R10
MOV qword ptr [RBX],RCX
TEST RCX,RCX
JZ 0x0019198d
OR R10,0x100
MOV qword ptr [RBX + 0x20],R10
LAB_00191984:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0019198d:
TEST R8D,R8D
JZ 0x00191984
IMUL R8D,R11D
MOV RSI,R8
MOV RDX,R10
CALL 0x0019fd41
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JNZ 0x00191984
MOV dword ptr [RBX + 0xc],0x0
JMP 0x00191984
|
int8
init_dynamic_array2(int4 param_1,long *param_2,uint param_3,long param_4,uint param_5,
uint param_6,ulong param_7)
{
long lVar1;
if (param_6 == 0) {
param_6 = 0x10;
if (param_3 < 0x1e2) {
param_6 = 0x1ff8 / (param_3 & 0xffff);
}
if ((8 < param_5) && (param_5 * 2 <= param_6)) {
param_6 = param_5 * 2;
}
}
*(int4 *)(param_2 + 1) = 0;
*(uint *)((long)param_2 + 0xc) = param_5;
*(uint *)(param_2 + 2) = param_6;
*(uint *)((long)param_2 + 0x14) = param_3;
*(int4 *)(param_2 + 3) = param_1;
param_2[4] = param_7;
*param_2 = param_4;
if (param_4 == 0) {
if (param_5 != 0) {
lVar1 = my_malloc(param_1,param_5 * param_3,param_7);
*param_2 = lVar1;
if (lVar1 == 0) {
*(int4 *)((long)param_2 + 0xc) = 0;
}
}
}
else {
param_2[4] = param_7 | 0x100;
}
return 0;
}
|
|
62,171 |
js_error_get_prepareStackTrace
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_error_get_prepareStackTrace(JSContext *ctx, JSValue this_val)
{
JSValue val;
val = JS_ToObject(ctx, this_val);
if (JS_IsException(val))
return val;
JS_FreeValue(ctx, val);
return js_dup(ctx->error_prepare_stack);
}
|
O2
|
c
|
js_error_get_prepareStackTrace:
pushq %rbx
movq %rdi, %rbx
callq 0x24742
cmpl $0x6, %edx
je 0x63b5f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1bbce
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rdx
cmpl $-0x9, %edx
jb 0x63b5f
incl (%rax)
popq %rbx
retq
|
js_error_get_prepareStackTrace:
push rbx
mov rbx, rdi
call JS_ToObject
cmp edx, 6
jz short loc_63B5F
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
mov rax, [rbx+128h]
mov rdx, [rbx+130h]
cmp edx, 0FFFFFFF7h
jb short loc_63B5F
inc dword ptr [rax]
loc_63B5F:
pop rbx
retn
|
_DWORD * js_error_get_prepareStackTrace(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_DWORD *result; // rax
long long v15; // rdx
result = (_DWORD *)JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( (_DWORD)v15 != 6 )
{
JS_FreeValue(a1, (long long)result, v15);
result = *(_DWORD **)(a1 + 296);
if ( (unsigned int)*(_QWORD *)(a1 + 304) >= 0xFFFFFFF7 )
++*result;
}
return result;
}
|
js_error_get_prepareStackTrace:
PUSH RBX
MOV RBX,RDI
CALL 0x00124742
CMP EDX,0x6
JZ 0x00163b5f
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011bbce
MOV RAX,qword ptr [RBX + 0x128]
MOV RDX,qword ptr [RBX + 0x130]
CMP EDX,-0x9
JC 0x00163b5f
INC dword ptr [RAX]
LAB_00163b5f:
POP RBX
RET
|
void js_error_get_prepareStackTrace(long param_1)
{
int1 auVar1 [12];
auVar1 = JS_ToObject();
if (auVar1._8_4_ != 6) {
JS_FreeValue(param_1,auVar1._0_8_);
if (0xfffffff6 < (uint)*(int8 *)(param_1 + 0x130)) {
**(int **)(param_1 + 0x128) = **(int **)(param_1 + 0x128) + 1;
}
}
return;
}
|
|
62,172 |
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool)
|
monkey531[P]llama/common/common.cpp
|
void common_batch_add(
struct llama_batch & batch,
llama_token id,
llama_pos pos,
const std::vector<llama_seq_id> & seq_ids,
bool logits) {
GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded");
batch.token [batch.n_tokens] = id;
batch.pos [batch.n_tokens] = pos;
batch.n_seq_id[batch.n_tokens] = seq_ids.size();
for (size_t i = 0; i < seq_ids.size(); ++i) {
batch.seq_id[batch.n_tokens][i] = seq_ids[i];
}
batch.logits [batch.n_tokens] = logits;
batch.n_tokens++;
}
|
O3
|
cpp
|
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool):
pushq %rax
movq 0x28(%rdi), %rax
movslq (%rdi), %r9
cmpq $0x0, (%rax,%r9,8)
je 0x754f7
movq 0x8(%rdi), %r10
movl %esi, (%r10,%r9,4)
movq 0x18(%rdi), %rsi
movslq (%rdi), %r9
movl %edx, (%rsi,%r9,4)
movq (%rcx), %rdx
movq 0x8(%rcx), %rsi
movq %rsi, %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
movq 0x20(%rdi), %r9
movslq (%rdi), %r10
movl %ecx, (%r9,%r10,4)
cmpq %rdx, %rsi
je 0x754e8
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
movl (%rdx,%rsi,4), %r9d
movslq (%rdi), %r10
movq (%rax,%r10,8), %r10
movl %r9d, (%r10,%rsi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x754d1
movq 0x30(%rdi), %rax
movslq (%rdi), %rcx
movb %r8b, (%rax,%rcx)
incl (%rdi)
popq %rax
retq
leaq 0x79733(%rip), %rdi # 0xeec31
leaq 0x76912(%rip), %rdx # 0xebe17
leaq 0x79d69(%rip), %rcx # 0xef275
movl $0x655, %esi # imm = 0x655
xorl %eax, %eax
callq 0x1aed0
|
_Z16common_batch_addR11llama_batchiiRKSt6vectorIiSaIiEEb:
push rax
mov rax, [rdi+28h]
movsxd r9, dword ptr [rdi]
cmp qword ptr [rax+r9*8], 0
jz short loc_754F7
mov r10, [rdi+8]
mov [r10+r9*4], esi
mov rsi, [rdi+18h]
movsxd r9, dword ptr [rdi]
mov [rsi+r9*4], edx
mov rdx, [rcx]
mov rsi, [rcx+8]
mov rcx, rsi
sub rcx, rdx
sar rcx, 2
mov r9, [rdi+20h]
movsxd r10, dword ptr [rdi]
mov [r9+r10*4], ecx
cmp rsi, rdx
jz short loc_754E8
cmp rcx, 1
adc rcx, 0
xor esi, esi
loc_754D1:
mov r9d, [rdx+rsi*4]
movsxd r10, dword ptr [rdi]
mov r10, [rax+r10*8]
mov [r10+rsi*4], r9d
inc rsi
cmp rcx, rsi
jnz short loc_754D1
loc_754E8:
mov rax, [rdi+30h]
movsxd rcx, dword ptr [rdi]
mov [rax+rcx], r8b
inc dword ptr [rdi]
pop rax
retn
loc_754F7:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBatchSeqIdBatc; "batch.seq_id[batch.n_tokens] && \"llama"...
mov esi, 655h
xor eax, eax
call _ggml_abort
|
long long common_batch_add(int *a1, int a2, int a3, long long *a4, char a5)
{
long long v5; // rax
long long v6; // rax
long long v7; // r9
long long v8; // rdx
long long v9; // rsi
long long v10; // rcx
long long v11; // rcx
long long v12; // rsi
long long v14; // [rsp-8h] [rbp-8h]
v14 = v5;
v6 = *((_QWORD *)a1 + 5);
v7 = *a1;
if ( *(_QWORD *)(v6 + 8 * v7) )
{
*(_DWORD *)(*((_QWORD *)a1 + 1) + 4 * v7) = a2;
*(_DWORD *)(*((_QWORD *)a1 + 3) + 4LL * *a1) = a3;
v8 = *a4;
v9 = a4[1];
v10 = (v9 - *a4) >> 2;
*(_DWORD *)(*((_QWORD *)a1 + 4) + 4LL * *a1) = v10;
if ( v9 != v8 )
{
v11 = (v10 == 0) + v10;
v12 = 0LL;
do
{
*(_DWORD *)(*(_QWORD *)(v6 + 8LL * *a1) + 4 * v12) = *(_DWORD *)(v8 + 4 * v12);
++v12;
}
while ( v11 != v12 );
}
*(_BYTE *)(*((_QWORD *)a1 + 6) + (*a1)++) = a5;
return v14;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1621LL,
"GGML_ASSERT(%s) failed",
"batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\"");
return common_lcp();
}
}
|
common_batch_add:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x28]
MOVSXD R9,dword ptr [RDI]
CMP qword ptr [RAX + R9*0x8],0x0
JZ 0x001754f7
MOV R10,qword ptr [RDI + 0x8]
MOV dword ptr [R10 + R9*0x4],ESI
MOV RSI,qword ptr [RDI + 0x18]
MOVSXD R9,dword ptr [RDI]
MOV dword ptr [RSI + R9*0x4],EDX
MOV RDX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x8]
MOV RCX,RSI
SUB RCX,RDX
SAR RCX,0x2
MOV R9,qword ptr [RDI + 0x20]
MOVSXD R10,dword ptr [RDI]
MOV dword ptr [R9 + R10*0x4],ECX
CMP RSI,RDX
JZ 0x001754e8
CMP RCX,0x1
ADC RCX,0x0
XOR ESI,ESI
LAB_001754d1:
MOV R9D,dword ptr [RDX + RSI*0x4]
MOVSXD R10,dword ptr [RDI]
MOV R10,qword ptr [RAX + R10*0x8]
MOV dword ptr [R10 + RSI*0x4],R9D
INC RSI
CMP RCX,RSI
JNZ 0x001754d1
LAB_001754e8:
MOV RAX,qword ptr [RDI + 0x30]
MOVSXD RCX,dword ptr [RDI]
MOV byte ptr [RAX + RCX*0x1],R8B
INC dword ptr [RDI]
POP RAX
RET
LAB_001754f7:
LEA RDI,[0x1eec31]
LEA RDX,[0x1ebe17]
LEA RCX,[0x1ef275]
MOV ESI,0x655
XOR EAX,EAX
CALL 0x0011aed0
|
/* common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int> > const&, bool) */
int8
common_batch_add(llama_batch *param_1,int param_2,int param_3,vector *param_4,bool param_5)
{
long lVar1;
long lVar2;
int8 in_RAX;
long lVar3;
long lVar4;
lVar1 = *(long *)(param_1 + 0x28);
if (*(long *)(lVar1 + (long)*(int *)param_1 * 8) != 0) {
*(int *)(*(long *)(param_1 + 8) + (long)*(int *)param_1 * 4) = param_2;
*(int *)(*(long *)(param_1 + 0x18) + (long)*(int *)param_1 * 4) = param_3;
lVar2 = *(long *)param_4;
lVar4 = *(long *)(param_4 + 8);
lVar3 = lVar4 - lVar2 >> 2;
*(int *)(*(long *)(param_1 + 0x20) + (long)*(int *)param_1 * 4) = (int)lVar3;
if (lVar4 != lVar2) {
lVar4 = 0;
do {
*(int4 *)(*(long *)(lVar1 + (long)*(int *)param_1 * 8) + lVar4 * 4) =
*(int4 *)(lVar2 + lVar4 * 4);
lVar4 = lVar4 + 1;
} while (lVar3 + (ulong)(lVar3 == 0) != lVar4);
}
*(bool *)(*(long *)(param_1 + 0x30) + (long)*(int *)param_1) = param_5;
*(int *)param_1 = *(int *)param_1 + 1;
return in_RAX;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x655,
"GGML_ASSERT(%s) failed",
"batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\"");
}
|
|
62,173 |
match_pins
|
eloqsql/mysys/lf_alloc-pin.c
|
static int match_pins(LF_PINS *el, void *addr)
{
int i;
LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH;
for (; el < el_end; el++)
for (i= 0; i < LF_PINBOX_PINS; i++)
if (el->pin[i] == addr)
return 1;
return 0;
}
|
O0
|
c
|
match_pins:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x7800, %rax # imm = 0x7800
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xfcc89
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0xfcc79
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0xfcc6c
movl $0x1, -0x4(%rbp)
jmp 0xfcc90
jmp 0xfcc6e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xfcc4b
jmp 0xfcc7b
movq -0x10(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x10(%rbp)
jmp 0xfcc3a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
match_pins:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
add rax, 7800h
mov [rbp+var_28], rax
loc_FCC3A:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_28]
jnb short loc_FCC89
mov [rbp+var_1C], 0
loc_FCC4B:
cmp [rbp+var_1C], 4
jge short loc_FCC79
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov rax, [rax+rcx*8]
cmp rax, [rbp+var_18]
jnz short loc_FCC6C
mov [rbp+var_4], 1
jmp short loc_FCC90
loc_FCC6C:
jmp short $+2
loc_FCC6E:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_FCC4B
loc_FCC79:
jmp short $+2
loc_FCC7B:
mov rax, [rbp+var_10]
add rax, 78h ; 'x'
mov [rbp+var_10], rax
jmp short loc_FCC3A
loc_FCC89:
mov [rbp+var_4], 0
loc_FCC90:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long match_pins(unsigned long long a1, long long a2)
{
int j; // [rsp+Ch] [rbp-1Ch]
unsigned long long i; // [rsp+18h] [rbp-10h]
for ( i = a1; i < a1 + 30720; i += 120LL )
{
for ( j = 0; j < 4; ++j )
{
if ( *(_QWORD *)(i + 8LL * j) == a2 )
return 1;
}
}
return 0;
}
|
match_pins:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x7800
MOV qword ptr [RBP + -0x28],RAX
LAB_001fcc3a:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001fcc89
MOV dword ptr [RBP + -0x1c],0x0
LAB_001fcc4b:
CMP dword ptr [RBP + -0x1c],0x4
JGE 0x001fcc79
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x001fcc6c
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001fcc90
LAB_001fcc6c:
JMP 0x001fcc6e
LAB_001fcc6e:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001fcc4b
LAB_001fcc79:
JMP 0x001fcc7b
LAB_001fcc7b:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x78
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001fcc3a
LAB_001fcc89:
MOV dword ptr [RBP + -0x4],0x0
LAB_001fcc90:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 match_pins(ulong param_1,long param_2)
{
int local_24;
ulong local_18;
local_18 = param_1;
do {
if (param_1 + 0x7800 <= local_18) {
return 0;
}
for (local_24 = 0; local_24 < 4; local_24 = local_24 + 1) {
if (*(long *)(local_18 + (long)local_24 * 8) == param_2) {
return 1;
}
}
local_18 = local_18 + 0x78;
} while( true );
}
|
|
62,174 |
match_pins
|
eloqsql/mysys/lf_alloc-pin.c
|
static int match_pins(LF_PINS *el, void *addr)
{
int i;
LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH;
for (; el < el_end; el++)
for (i= 0; i < LF_PINBOX_PINS; i++)
if (el->pin[i] == addr)
return 1;
return 0;
}
|
O3
|
c
|
match_pins:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
movq (%rdi,%rcx,8), %rdx
cmpq %rsi, %rdx
je 0xa5916
incq %rcx
cmpq $0x4, %rcx
jne 0xa58ed
leaq 0x78(%rax), %rcx
addq $0x78, %rdi
cmpq $0x7788, %rax # imm = 0x7788
movq %rcx, %rax
jb 0xa58eb
xorl %eax, %eax
jmp 0xa591b
movl $0x1, %eax
popq %rbp
retq
nopl (%rax)
|
match_pins:
push rbp
mov rbp, rsp
xor eax, eax
loc_A58EB:
xor ecx, ecx
loc_A58ED:
mov rdx, [rdi+rcx*8]
cmp rdx, rsi
jz short loc_A5916
inc rcx
cmp rcx, 4
jnz short loc_A58ED
lea rcx, [rax+78h]
add rdi, 78h ; 'x'
cmp rax, 7788h
mov rax, rcx
jb short loc_A58EB
xor eax, eax
jmp short loc_A591B
loc_A5916:
mov eax, 1
loc_A591B:
pop rbp
retn
|
long long match_pins(long long a1, long long a2)
{
unsigned long long v2; // rax
long long i; // rcx
bool v4; // cf
v2 = 0LL;
while ( 2 )
{
for ( i = 0LL; i != 4; ++i )
{
if ( *(_QWORD *)(a1 + 8 * i) == a2 )
return 1LL;
}
a1 += 120LL;
v4 = v2 < 0x7788;
v2 += 120LL;
if ( v4 )
continue;
break;
}
return 0LL;
}
|
match_pins:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001a58eb:
XOR ECX,ECX
LAB_001a58ed:
MOV RDX,qword ptr [RDI + RCX*0x8]
CMP RDX,RSI
JZ 0x001a5916
INC RCX
CMP RCX,0x4
JNZ 0x001a58ed
LEA RCX,[RAX + 0x78]
ADD RDI,0x78
CMP RAX,0x7788
MOV RAX,RCX
JC 0x001a58eb
XOR EAX,EAX
JMP 0x001a591b
LAB_001a5916:
MOV EAX,0x1
LAB_001a591b:
POP RBP
RET
|
int8 match_pins(long param_1,long param_2)
{
ulong uVar1;
long lVar2;
bool bVar3;
uVar1 = 0;
do {
lVar2 = 0;
do {
if (*(long *)(param_1 + lVar2 * 8) == param_2) {
return 1;
}
lVar2 = lVar2 + 1;
} while (lVar2 != 4);
param_1 = param_1 + 0x78;
bVar3 = uVar1 < 0x7788;
uVar1 = uVar1 + 0x78;
} while (bVar3);
return 0;
}
|
|
62,175 |
google::protobuf::Descriptor::map_value() const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
const FieldDescriptor* Descriptor::map_value() const {
if (!options().map_entry()) return nullptr;
GOOGLE_DCHECK_EQ(field_count(), 2);
return field(1);
}
|
O0
|
cpp
|
google::protobuf::Descriptor::map_value() const:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1e62d0
movq %rax, %rdi
callq 0x1e62e0
testb $0x1, %al
jne 0x244892
movq $0x0, 0x70(%rsp)
jmp 0x244952
jmp 0x244894
xorl %eax, %eax
testb $0x1, %al
jne 0x24489f
jmp 0x24493e
movq 0x10(%rsp), %rdi
callq 0x1bab00
movb $0x0, 0x2f(%rsp)
cmpl $0x2, %eax
jne 0x2448b5
jmp 0x244903
leaq 0x1a7917(%rip), %rdx # 0x3ec1d3
leaq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x3, %esi
movl $0x8f5, %ecx # imm = 0x8F5
callq 0x19a670
movq (%rsp), %rdi
movb $0x1, 0x2f(%rsp)
leaq 0x1a7aed(%rip), %rsi # 0x3ec3d1
callq 0x199f30
movq %rax, 0x8(%rsp)
jmp 0x2448f0
movq 0x8(%rsp), %rsi
leaq 0x1b(%rsp), %rdi
callq 0x19a0e0
jmp 0x244901
jmp 0x244903
testb $0x1, 0x2f(%rsp)
jne 0x24490c
jmp 0x244916
leaq 0x30(%rsp), %rdi
callq 0x19a6b0
jmp 0x244894
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
testb $0x1, 0x2f(%rsp)
jne 0x244932
jmp 0x24493c
leaq 0x30(%rsp), %rdi
callq 0x19a6b0
jmp 0x24495c
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x1bad70
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x90db0
nopw %cs:(%rax,%rax)
|
_ZNK6google8protobuf10Descriptor9map_valueEv:
sub rsp, 78h
mov [rsp+78h+var_10], rdi
mov rdi, [rsp+78h+var_10]; this
mov [rsp+78h+var_68], rdi
call _ZNK6google8protobuf10Descriptor7optionsEv; google::protobuf::Descriptor::options(void)
mov rdi, rax; this
call _ZNK6google8protobuf14MessageOptions9map_entryEv; google::protobuf::MessageOptions::map_entry(void)
test al, 1
jnz short loc_244892
mov [rsp+78h+var_8], 0
jmp loc_244952
loc_244892:
jmp short $+2
loc_244894:
xor eax, eax
test al, 1
jnz short loc_24489F
jmp loc_24493E
loc_24489F:
mov rdi, [rsp+78h+var_68]; this
call _ZNK6google8protobuf10Descriptor11field_countEv; google::protobuf::Descriptor::field_count(void)
mov [rsp+78h+var_49], 0
cmp eax, 2
jnz short loc_2448B5
jmp short loc_244903
loc_2448B5:
lea rdx, aWorkspaceLlm4b_54; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+78h+var_48]
mov [rsp+78h+var_78], rdi
mov esi, 3
mov ecx, 8F5h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+78h+var_78]
mov [rsp+78h+var_49], 1
lea rsi, aCheckFailedFie_7; "CHECK failed: (field_count()) == (2): "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+78h+var_70], rax
jmp short $+2
loc_2448F0:
mov rsi, [rsp+78h+var_70]
lea rdi, [rsp+78h+var_5D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_244901:
jmp short $+2
loc_244903:
test [rsp+78h+var_49], 1
jnz short loc_24490C
jmp short loc_244916
loc_24490C:
lea rdi, [rsp+78h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_244916:
jmp loc_244894
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
test [rsp+arg_27], 1
jnz short loc_244932
jmp short loc_24493C
loc_244932:
lea rdi, [rsp+arg_28]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_24493C:
jmp short loc_24495C
loc_24493E:
mov rdi, [rsp+78h+var_68]; this
mov esi, 1; int
call _ZNK6google8protobuf10Descriptor5fieldEi; google::protobuf::Descriptor::field(int)
mov [rsp+78h+var_8], rax
loc_244952:
mov rax, [rsp+78h+var_8]
add rsp, 78h
retn
loc_24495C:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
|
long long google::protobuf::Descriptor::map_value(google::protobuf::Descriptor *this)
{
google::protobuf::MessageOptions *v1; // rax
v1 = (google::protobuf::MessageOptions *)google::protobuf::Descriptor::options(this);
if ( (google::protobuf::MessageOptions::map_entry(v1) & 1) != 0 )
return google::protobuf::Descriptor::field(this, 1);
else
return 0LL;
}
|
__copy_move_backward_a1<false,YAML::CollectionType::value**,YAML::CollectionType::value**>:
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 + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP]
CALL 0x00244890
ADD RSP,0x18
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* YAML::CollectionType::value** std::__copy_move_backward_a1<false, YAML::CollectionType::value**,
YAML::CollectionType::value**>(YAML::CollectionType::value**, YAML::CollectionType::value**,
YAML::CollectionType::value**) */
value ** std::
__copy_move_backward_a1<false,YAML::CollectionType::value**,YAML::CollectionType::value**>
(value **param_1,value **param_2,value **param_3)
{
value **ppvVar1;
ppvVar1 = __copy_move_backward_a2<false,YAML::CollectionType::value**,YAML::CollectionType::value**>
(param_1,param_2,param_3);
return ppvVar1;
}
|
|
62,176 |
release_whole_queue
|
eloqsql/mysys/mf_keycache.c
|
static void release_whole_queue(KEYCACHE_WQUEUE *wqueue)
{
struct st_my_thread_var *last;
struct st_my_thread_var *next;
struct st_my_thread_var *thread;
/* Queue may be empty. */
if (!(last= wqueue->last_thread))
return;
next= last->next; /* First (oldest) element */
do
{
thread=next;
DBUG_ASSERT(thread && thread->init == 1);
KEYCACHE_DBUG_PRINT("release_whole_queue: signal",
("thread %ld", (ulong) thread->id));
/* Take thread from queue. */
next= thread->next;
thread->next= NULL;
/* Signal the thread. */
keycache_pthread_cond_signal(&thread->suspend);
}
while (thread != last);
/* Now queue is definitely empty. */
wqueue->last_thread= NULL;
}
|
O3
|
c
|
release_whole_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x5467c
movq %rdi, %rbx
movq 0x88(%r14), %r12
leaq 0x2e2290(%rip), %r15 # 0x3368c8
movq 0x38(%r12), %rdi
movq 0x88(%r12), %r13
movq $0x0, 0x88(%r12)
testq %rdi, %rdi
jne 0x5466a
leaq 0x8(%r12), %rdi
callq 0x28040
cmpq %r14, %r12
movq %r13, %r12
jne 0x54638
jmp 0x54675
movq (%r15), %rax
callq *0x170(%rax)
jmp 0x54656
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
release_whole_queue:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, [rdi]
test r14, r14
jz short loc_5467C
mov rbx, rdi
mov r12, [r14+88h]
lea r15, PSI_server
loc_54638:
mov rdi, [r12+38h]
mov r13, [r12+88h]
mov qword ptr [r12+88h], 0
test rdi, rdi
jnz short loc_5466A
loc_54656:
lea rdi, [r12+8]
call _pthread_cond_signal
cmp r12, r14
mov r12, r13
jnz short loc_54638
jmp short loc_54675
loc_5466A:
mov rax, [r15]
call qword ptr [rax+170h]
jmp short loc_54656
loc_54675:
mov qword ptr [rbx], 0
loc_5467C:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long release_whole_queue(long long *a1)
{
long long v1; // r14
long long v3; // r12
long long v4; // rdi
long long v5; // r13
long long result; // rax
bool v7; // zf
v1 = *a1;
if ( *a1 )
{
v3 = *(_QWORD *)(v1 + 136);
do
{
v4 = *(_QWORD *)(v3 + 56);
v5 = *(_QWORD *)(v3 + 136);
*(_QWORD *)(v3 + 136) = 0LL;
if ( v4 )
(*((void ( **)(long long))PSI_server + 46))(v4);
result = pthread_cond_signal(v3 + 8);
v7 = v3 == v1;
v3 = v5;
}
while ( !v7 );
*a1 = 0LL;
}
return result;
}
|
release_whole_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,qword ptr [RDI]
TEST R14,R14
JZ 0x0015467c
MOV RBX,RDI
MOV R12,qword ptr [R14 + 0x88]
LEA R15,[0x4368c8]
LAB_00154638:
MOV RDI,qword ptr [R12 + 0x38]
MOV R13,qword ptr [R12 + 0x88]
MOV qword ptr [R12 + 0x88],0x0
TEST RDI,RDI
JNZ 0x0015466a
LAB_00154656:
LEA RDI,[R12 + 0x8]
CALL 0x00128040
CMP R12,R14
MOV R12,R13
JNZ 0x00154638
JMP 0x00154675
LAB_0015466a:
MOV RAX,qword ptr [R15]
CALL qword ptr [RAX + 0x170]
JMP 0x00154656
LAB_00154675:
MOV qword ptr [RBX],0x0
LAB_0015467c:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void release_whole_queue(long *param_1)
{
long lVar1;
long lVar2;
long lVar3;
bool bVar4;
lVar1 = *param_1;
if (lVar1 != 0) {
lVar3 = *(long *)(lVar1 + 0x88);
do {
lVar2 = *(long *)(lVar3 + 0x88);
*(int8 *)(lVar3 + 0x88) = 0;
if (*(long *)(lVar3 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar3 + 8));
bVar4 = lVar3 != lVar1;
lVar3 = lVar2;
} while (bVar4);
*param_1 = 0;
}
return;
}
|
|
62,177 |
google::protobuf::safe_strtou32(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
|
bool safe_strtou32(const std::string &str, uint32_t *value) {
return safe_uint_internal(str, value);
}
|
O3
|
cpp
|
google::protobuf::safe_strtou32(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x2c640
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8a30c
movl %eax, %ebx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x8894c
callq 0x2d160
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x88969
callq 0x2d160
movq %rbx, %rdi
callq 0x2e220
|
_ZN6google8protobuf13safe_strtou32ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPj:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rsi
lea r15, [rsp+38h+var_28]
mov [r15-10h], r15
mov rsi, [rdi]
mov rdx, [rdi+8]
add rdx, rsi
mov r14, rsp
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, r14
mov rsi, rbx
call _ZN6google8protobuf18safe_uint_internalIjEEbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_; google::protobuf::safe_uint_internal<uint>(std::string,uint *)
mov ebx, eax
mov rdi, [rsp+38h+var_38]; void *
cmp rdi, r15
jz short loc_8894C
call __ZdlPv; operator delete(void *)
loc_8894C:
mov eax, ebx
add rsp, 20h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r15
jz short loc_88969
call __ZdlPv; operator delete(void *)
loc_88969:
mov rdi, rbx
call __Unwind_Resume
|
long long google::protobuf::safe_strtou32(_QWORD *a1, long long a2)
{
unsigned int v2; // ebx
void *v4[2]; // [rsp+0h] [rbp-38h] BYREF
_BYTE v5[40]; // [rsp+10h] [rbp-28h] BYREF
v4[0] = v5;
std::string::_M_construct<char *>(v4, *a1, *a1 + a1[1]);
v2 = google::protobuf::safe_uint_internal<unsigned int>(v4, a2);
if ( v4[0] != v5 )
operator delete(v4[0]);
return v2;
}
|
safe_strtou32:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RSI
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
ADD RDX,RSI
MOV R14,RSP
MOV RDI,R14
CALL 0x0012c640
LAB_00188931:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0018a30c
LAB_0018893c:
MOV EBX,EAX
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x0018894c
CALL 0x0012d160
LAB_0018894c:
MOV EAX,EBX
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::safe_strtou32(std::__cxx11::string const&, unsigned int*) */
ulong google::protobuf::safe_strtou32(string *param_1,uint *param_2)
{
bool bVar1;
int7 extraout_var;
int1 *local_38 [2];
int1 local_28 [16];
local_38[0] = local_28;
std::__cxx11::string::_M_construct<char*>
(local_38,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 00188931 to 0018893b has its CatchHandler @ 00188958 */
bVar1 = safe_uint_internal<unsigned_int>(local_38,param_2);
if (local_38[0] != local_28) {
operator_delete(local_38[0]);
}
return CONCAT71(extraout_var,bVar1) & 0xffffffff;
}
|
|
62,178 |
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512])
|
monkey531[P]llama/common/common.cpp
|
bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
}
|
O2
|
cpp
|
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x2d
popq %rsi
xorl %edx, %edx
callq 0x24d40
movq %rax, %r12
testq %rax, %rax
je 0x55f6c
cmpq $-0x1, %r12
jne 0x55f71
leaq 0xac686(%rip), %rax # 0x1025d8
cmpl $0x0, (%rax)
js 0x56047
callq 0x9904a
leaq 0x5edd4(%rip), %rdx # 0xb4d3b
jmp 0x56025
movq %r12, %r14
jmp 0x55fc3
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x24ab0
pushq $0xa
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x5b215
movq %rax, %r14
movq %rsp, %rdi
callq 0x25478
cmpq $0x200, %r14 # imm = 0x200
jb 0x55fc3
leaq 0xac62c(%rip), %rax # 0x1025d8
cmpl $0x0, (%rax)
js 0x56047
callq 0x9904a
leaq 0x5edb7(%rip), %rdx # 0xb4d78
jmp 0x56025
movq 0x8(%r15), %rax
decq %rax
movl $0x1ff, %r13d # imm = 0x1FF
cmpq %rax, %r12
je 0x5603e
incq %r12
movq %rsp, %r13
pushq $-0x1
popq %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x24ab0
pushq $0xa
popq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x5b215
movq %rax, %r13
movq %rsp, %rdi
callq 0x25478
cmpq $0x200, %r13 # imm = 0x200
jb 0x5603e
leaq 0xac5c4(%rip), %rax # 0x1025d8
cmpl $0x0, (%rax)
js 0x56047
callq 0x9904a
leaq 0x5ed6f(%rip), %rdx # 0xb4d94
xorl %ebx, %ebx
pushq $0x4
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
callq 0x990e2
jmp 0x56049
movb $0x1, (%rbx,%r14)
incq %r14
cmpq %r13, %r14
jbe 0x56036
movb $0x1, %bl
jmp 0x56049
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x5605b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x25478
movq %rbx, %rdi
callq 0x251e0
|
_Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov rbx, rsi
mov r15, rdi
push 2Dh ; '-'
pop rsi
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
test rax, rax
jz short loc_55F6C
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_55F71
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_56047
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
jmp loc_56025
loc_55F6C:
mov r14, r12
jmp short loc_55FC3
loc_55F71:
mov r14, rsp
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
push 0Ah
pop rdx
mov rdi, r14
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov r14, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r14, 200h
jb short loc_55FC3
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_56047
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
jmp short loc_56025
loc_55FC3:
mov rax, [r15+8]
dec rax
mov r13d, 1FFh
cmp r12, rax
jz short loc_5603E
inc r12
mov r13, rsp
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rdi, r13
mov rsi, r15
mov rdx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
push 0Ah
pop rdx
mov rdi, r13
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov r13, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r13, 200h
jb short loc_5603E
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_56047
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
loc_56025:
xor ebx, ebx
push 4
pop rsi
mov rdi, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_56049
loc_56036:
mov byte ptr [rbx+r14], 1
inc r14
loc_5603E:
cmp r14, r13
jbe short loc_56036
mov bl, 1
jmp short loc_56049
loc_56047:
xor ebx, ebx
loc_56049:
mov eax, ebx
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_5605B:
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
long long parse_cpu_range(long long a1, long long a2)
{
unsigned int v2; // ebx
long long v3; // rax
long long v4; // r12
int v5; // eax
int v6; // ecx
int v7; // r8d
int v8; // r9d
const char *v9; // rdx
unsigned long long v10; // r14
unsigned long long v11; // r13
char v13[72]; // [rsp+0h] [rbp-48h] BYREF
v2 = a2;
v3 = std::string::find(a1, 45LL, 0LL);
v4 = v3;
if ( v3 )
{
if ( v3 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
LABEL_13:
v2 = 0;
common_log_add(v5, 4, (_DWORD)v9, v6, v7, v8, v13[0]);
return v2;
}
return 0;
}
std::string::substr(v13, a1, 0LL, v3);
v10 = std::stoull(v13, 0LL, 10LL);
std::string::~string(v13);
if ( v10 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "Start index out of bounds!\n";
goto LABEL_13;
}
return 0;
}
}
else
{
v10 = 0LL;
}
v11 = 511LL;
if ( v4 != *(_QWORD *)(a1 + 8) - 1LL )
{
std::string::substr(v13, a1, v4 + 1, -1LL);
v11 = std::stoull(v13, 0LL, 10LL);
std::string::~string(v13);
if ( v11 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "End index out of bounds!\n";
goto LABEL_13;
}
return 0;
}
}
while ( v10 <= v11 )
*(_BYTE *)(a2 + v10++) = 1;
LOBYTE(v2) = 1;
return v2;
}
|
parse_cpu_range:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RSI
MOV R15,RDI
PUSH 0x2d
POP RSI
XOR EDX,EDX
CALL 0x00124d40
MOV R12,RAX
TEST RAX,RAX
JZ 0x00155f6c
CMP R12,-0x1
JNZ 0x00155f71
LEA RAX,[0x2025d8]
CMP dword ptr [RAX],0x0
JS 0x00156047
CALL 0x0019904a
LEA RDX,[0x1b4d3b]
JMP 0x00156025
LAB_00155f6c:
MOV R14,R12
JMP 0x00155fc3
LAB_00155f71:
MOV R14,RSP
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x00124ab0
LAB_00155f84:
PUSH 0xa
POP RDX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015b215
LAB_00155f91:
MOV R14,RAX
MOV RDI,RSP
CALL 0x00125478
CMP R14,0x200
JC 0x00155fc3
LEA RAX,[0x2025d8]
CMP dword ptr [RAX],0x0
JS 0x00156047
CALL 0x0019904a
LEA RDX,[0x1b4d78]
JMP 0x00156025
LAB_00155fc3:
MOV RAX,qword ptr [R15 + 0x8]
DEC RAX
MOV R13D,0x1ff
CMP R12,RAX
JZ 0x0015603e
INC R12
MOV R13,RSP
PUSH -0x1
POP RCX
MOV RDI,R13
MOV RSI,R15
MOV RDX,R12
CALL 0x00124ab0
LAB_00155fec:
PUSH 0xa
POP RDX
MOV RDI,R13
XOR ESI,ESI
CALL 0x0015b215
LAB_00155ff9:
MOV R13,RAX
MOV RDI,RSP
CALL 0x00125478
CMP R13,0x200
JC 0x0015603e
LEA RAX,[0x2025d8]
CMP dword ptr [RAX],0x0
JS 0x00156047
CALL 0x0019904a
LEA RDX,[0x1b4d94]
LAB_00156025:
XOR EBX,EBX
PUSH 0x4
POP RSI
MOV RDI,RAX
XOR EAX,EAX
CALL 0x001990e2
JMP 0x00156049
LAB_00156036:
MOV byte ptr [RBX + R14*0x1],0x1
INC R14
LAB_0015603e:
CMP R14,R13
JBE 0x00156036
MOV BL,0x1
JMP 0x00156049
LAB_00156047:
XOR EBX,EBX
LAB_00156049:
MOV EAX,EBX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_range(string *param_1,bool *param_2)
{
long lVar1;
int8 uVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
string asStack_48 [32];
lVar1 = std::__cxx11::string::find((char)param_1,0x2d);
if (lVar1 == 0) {
uVar3 = 0;
LAB_00155fc3:
uVar5 = 0x1ff;
if (lVar1 != *(long *)(param_1 + 8) + -1) {
std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1);
/* try { // try from 00155fec to 00155ff8 has its CatchHandler @ 00156059 */
uVar5 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10);
std::__cxx11::string::~string(asStack_48);
if (0x1ff < uVar5) {
if (common_log_verbosity_thold < 0) goto LAB_00156047;
uVar2 = common_log_main();
pcVar4 = "End index out of bounds!\n";
goto LAB_00156025;
}
}
for (; uVar3 <= uVar5; uVar3 = uVar3 + 1) {
param_2[uVar3] = true;
}
uVar3 = CONCAT71((int7)((ulong)param_2 >> 8),1);
}
else {
if (lVar1 == -1) {
if (common_log_verbosity_thold < 0) {
LAB_00156047:
uVar3 = 0;
goto LAB_00156049;
}
uVar2 = common_log_main();
pcVar4 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
}
else {
std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1);
/* try { // try from 00155f84 to 00155f90 has its CatchHandler @ 0015605b */
uVar3 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10);
std::__cxx11::string::~string(asStack_48);
if (uVar3 < 0x200) goto LAB_00155fc3;
if (common_log_verbosity_thold < 0) goto LAB_00156047;
uVar2 = common_log_main();
pcVar4 = "Start index out of bounds!\n";
}
LAB_00156025:
uVar3 = 0;
common_log_add(uVar2,4,pcVar4);
}
LAB_00156049:
return uVar3 & 0xffffffff;
}
|
|
62,179 |
CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*) const
|
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp
|
CLI11_INLINE std::string Formatter::make_positionals(const App *app) const {
std::vector<const Option *> opts =
app->get_options([](const Option *opt) { return !opt->get_group().empty() && opt->get_positional(); });
if(opts.empty())
return {};
return make_group(get_label("Positionals"), true, opts);
}
|
O0
|
cpp
|
CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq %rdi, -0xf0(%rbp)
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
leaq -0x51(%rbp), %rsi
callq 0x4b1e0
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0xd980
jmp 0x124cb
leaq -0x50(%rbp), %rdi
callq 0xdc40
leaq -0x30(%rbp), %rdi
callq 0x4a8b0
testb $0x1, %al
jne 0x124e3
jmp 0x12515
movq -0xf0(%rbp), %rdi
callq 0x9890
movl $0x1, -0x68(%rbp)
jmp 0x12648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xdc40
jmp 0x12661
leaq -0xa9(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x9a80
movq -0xf8(%rbp), %rdx
leaq 0x5dac2(%rip), %rsi # 0x6fff8
leaq -0xa8(%rbp), %rdi
callq 0xbb20
jmp 0x12544
movq -0xe0(%rbp), %rsi
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0x4b270
jmp 0x12560
leaq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4a8f0
jmp 0x12572
movq -0xe0(%rbp), %rsi
movq -0xf0(%rbp), %rdi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x88(%rbp), %rdx
movl $0x1, %ecx
leaq -0xc8(%rbp), %r8
callq *%rax
jmp 0x1259e
leaq -0xc8(%rbp), %rdi
callq 0xf150
leaq -0x88(%rbp), %rdi
callq 0x9b90
leaq -0xa8(%rbp), %rdi
callq 0x9b90
leaq -0xa9(%rbp), %rdi
callq 0x9690
movl $0x1, -0x68(%rbp)
jmp 0x12648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x12631
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x12625
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x12619
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0xf150
leaq -0x88(%rbp), %rdi
callq 0x9b90
leaq -0xa8(%rbp), %rdi
callq 0x9b90
leaq -0xa9(%rbp), %rdi
callq 0x9690
leaq -0x30(%rbp), %rdi
callq 0xf150
jmp 0x12661
leaq -0x30(%rbp), %rdi
callq 0xf150
movq -0xe8(%rbp), %rax
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x9a70
nopw (%rax,%rax)
|
_ZNK3CLI9Formatter16make_positionalsB5cxx11EPKNS_3AppE:
push rbp
mov rbp, rsp
sub rsp, 100h
mov [rbp+var_F0], rdi
mov rax, rdi
mov [rbp+var_E8], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_E0], rax
mov rax, [rbp+var_18]
mov [rbp+var_D8], rax
lea rdi, [rbp+var_50]
mov [rbp+var_D0], rdi
lea rsi, [rbp+var_51]
call _ZNSt8functionIFbPKN3CLI6OptionEEEC2IZNKS0_9Formatter16make_positionalsB5cxx11EPKNS0_3AppEEUlS3_E_vEEOT_; std::function<bool ()(CLI::Option const*)>::function<CLI::Formatter::make_positionals(CLI::App const*)::{lambda(CLI::Option const*)#1},void>(CLI::Formatter::make_positionals(CLI::App const*)::{lambda(CLI::Option const*)#1} &&)
mov rsi, [rbp+var_D8]
mov rdx, [rbp+var_D0]
lea rdi, [rbp+var_30]
call _ZNK3CLI3App11get_optionsESt8functionIFbPKNS_6OptionEEE; CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)
jmp short $+2
loc_124CB:
lea rdi, [rbp+var_50]
call _ZNSt8functionIFbPKN3CLI6OptionEEED2Ev; std::function<bool ()(CLI::Option const*)>::~function()
lea rdi, [rbp+var_30]
call _ZNKSt6vectorIPKN3CLI6OptionESaIS3_EE5emptyEv; std::vector<CLI::Option const*>::empty(void)
test al, 1
jnz short loc_124E3
jmp short loc_12515
loc_124E3:
mov rdi, [rbp+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov [rbp+var_68], 1
jmp loc_12648
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
lea rdi, [rbp+var_50]
call _ZNSt8functionIFbPKN3CLI6OptionEEED2Ev; std::function<bool ()(CLI::Option const*)>::~function()
jmp loc_12661
loc_12515:
lea rdi, [rbp+var_A9]
mov [rbp+var_F8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_F8]
lea rsi, aPositionals; "Positionals"
lea rdi, [rbp+var_A8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_12544:
mov rsi, [rbp+var_E0]
lea rdi, [rbp+var_88]
lea rdx, [rbp+var_A8]
call _ZNK3CLI13FormatterBase9get_labelENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::FormatterBase::get_label(std::string)
jmp short $+2
loc_12560:
lea rdi, [rbp+var_C8]
lea rsi, [rbp+var_30]
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EEC2ERKS5_; std::vector<CLI::Option const*>::vector(std::vector<CLI::Option const*> const&)
jmp short $+2
loc_12572:
mov rsi, [rbp+var_E0]
mov rdi, [rbp+var_F0]
mov rax, [rsi]
mov rax, [rax+18h]
lea rdx, [rbp+var_88]
mov ecx, 1
lea r8, [rbp+var_C8]
call rax
jmp short $+2
loc_1259E:
lea rdi, [rbp+var_C8]
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EED2Ev; std::vector<CLI::Option const*>::~vector()
lea rdi, [rbp+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_A9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rbp+var_68], 1
jmp short loc_12648
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
jmp short loc_12631
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
jmp short loc_12625
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
jmp short loc_12619
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
lea rdi, [rbp+var_C8]
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EED2Ev; std::vector<CLI::Option const*>::~vector()
loc_12619:
lea rdi, [rbp+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_12625:
lea rdi, [rbp+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_12631:
lea rdi, [rbp+var_A9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rbp+var_30]
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EED2Ev; std::vector<CLI::Option const*>::~vector()
jmp short loc_12661
loc_12648:
lea rdi, [rbp+var_30]
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EED2Ev; std::vector<CLI::Option const*>::~vector()
mov rax, [rbp+var_E8]
add rsp, 100h
pop rbp
retn
loc_12661:
mov rdi, [rbp+var_60]
call __Unwind_Resume
|
long long CLI::Formatter::make_positionals[abi:cxx11](long long a1, long long a2, long long a3)
{
long long v3; // rdx
long long v4; // rcx
long long v5; // r8
long long v6; // r9
long long v9[3]; // [rsp+38h] [rbp-C8h] BYREF
char v10; // [rsp+57h] [rbp-A9h] BYREF
_BYTE v11[32]; // [rsp+58h] [rbp-A8h] BYREF
_BYTE v12[32]; // [rsp+78h] [rbp-88h] BYREF
int v13; // [rsp+98h] [rbp-68h]
char v14; // [rsp+AFh] [rbp-51h] BYREF
_BYTE v15[32]; // [rsp+B0h] [rbp-50h] BYREF
long long v16[6]; // [rsp+D0h] [rbp-30h] BYREF
v16[5] = a1;
v16[4] = a2;
v16[3] = a3;
std::function<bool ()(CLI::Option const*)>::function<CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*)::{lambda(CLI::Option const*)#1},void>(
v15,
&v14);
CLI::App::get_options((long long)v16, a3, (long long)v15);
std::function<bool ()(CLI::Option const*)>::~function((std::_Function_base *)v15);
if ( (std::vector<CLI::Option const*>::empty(v16) & 1) != 0 )
{
std::string::basic_string(a1, a3, v3, v4, v5, v6);
}
else
{
std::allocator<char>::allocator(&v10, a3, v3);
std::string::basic_string<std::allocator<char>>((long long)v11, (long long)"Positionals", (long long)&v10);
CLI::FormatterBase::get_label(v12, a2, v11);
std::vector<CLI::Option const*>::vector(v9, v16);
(*(void ( **)(long long, long long, _BYTE *, long long, long long *))(*(_QWORD *)a2 + 24LL))(a1, a2, v12, 1LL, v9);
std::vector<CLI::Option const*>::~vector(v9);
std::string::~string(v12);
std::string::~string(v11);
std::allocator<char>::~allocator(&v10);
}
v13 = 1;
std::vector<CLI::Option const*>::~vector(v16);
return a1;
}
|
make_positionals[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV qword ptr [RBP + -0xf0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xe8],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xe0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0xd8],RAX
LEA RDI,[RBP + -0x50]
MOV qword ptr [RBP + -0xd0],RDI
LEA RSI,[RBP + -0x51]
CALL 0x0014b1e0
MOV RSI,qword ptr [RBP + -0xd8]
MOV RDX,qword ptr [RBP + -0xd0]
LAB_001124c0:
LEA RDI,[RBP + -0x30]
CALL 0x0010d980
JMP 0x001124cb
LAB_001124cb:
LEA RDI,[RBP + -0x50]
CALL 0x0010dc40
LEA RDI,[RBP + -0x30]
CALL 0x0014a8b0
TEST AL,0x1
JNZ 0x001124e3
JMP 0x00112515
LAB_001124e3:
MOV RDI,qword ptr [RBP + -0xf0]
CALL 0x00109890
MOV dword ptr [RBP + -0x68],0x1
JMP 0x00112648
LAB_00112515:
LEA RDI,[RBP + -0xa9]
MOV qword ptr [RBP + -0xf8],RDI
CALL 0x00109a80
MOV RDX,qword ptr [RBP + -0xf8]
LAB_0011252f:
LEA RSI,[0x16fff8]
LEA RDI,[RBP + -0xa8]
CALL 0x0010bb20
JMP 0x00112544
LAB_00112544:
MOV RSI,qword ptr [RBP + -0xe0]
LEA RDI,[RBP + -0x88]
LEA RDX,[RBP + -0xa8]
CALL 0x0014b270
JMP 0x00112560
LAB_00112560:
LEA RDI,[RBP + -0xc8]
LEA RSI,[RBP + -0x30]
CALL 0x0014a8f0
JMP 0x00112572
LAB_00112572:
MOV RSI,qword ptr [RBP + -0xe0]
MOV RDI,qword ptr [RBP + -0xf0]
MOV RAX,qword ptr [RSI]
MOV RAX,qword ptr [RAX + 0x18]
LAB_00112587:
LEA RDX,[RBP + -0x88]
MOV ECX,0x1
LEA R8,[RBP + -0xc8]
CALL RAX
LAB_0011259c:
JMP 0x0011259e
LAB_0011259e:
LEA RDI,[RBP + -0xc8]
CALL 0x0010f150
LEA RDI,[RBP + -0x88]
CALL 0x00109b90
LEA RDI,[RBP + -0xa8]
CALL 0x00109b90
LEA RDI,[RBP + -0xa9]
CALL 0x00109690
MOV dword ptr [RBP + -0x68],0x1
JMP 0x00112648
LAB_00112648:
LEA RDI,[RBP + -0x30]
CALL 0x0010f150
MOV RAX,qword ptr [RBP + -0xe8]
ADD RSP,0x100
POP RBP
RET
|
/* CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*) const */
App * CLI::Formatter::make_positionals_abi_cxx11_(App *param_1)
{
ulong uVar1;
int8 in_RDX;
long *in_RSI;
vector<CLI::Option_const*,std::allocator<CLI::Option_const*>> local_d0 [31];
allocator local_b1;
string local_b0 [32];
string local_90 [32];
int4 local_70;
_lambda_CLI__Option_const___1_ local_59;
function<bool(CLI::Option_const*)> local_58 [32];
vector<CLI::Option_const*,std::allocator<CLI::Option_const*>> local_38 [40];
App *local_10;
local_10 = param_1;
std::function<bool(CLI::Option_const*)>::
function<CLI::Formatter::make_positionals[abi:cxx11](CLI::App_const*)const::_lambda(CLI::Option_const*)_1_,void>
(local_58,&local_59);
/* try { // try from 001124c0 to 001124c8 has its CatchHandler @ 001124fb */
App::get_options(local_38,in_RDX,local_58);
std::function<bool(CLI::Option_const*)>::~function(local_58);
uVar1 = std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::empty(local_38);
if ((uVar1 & 1) == 0) {
std::allocator<char>::allocator();
/* try { // try from 0011252f to 00112541 has its CatchHandler @ 001125d7 */
std::__cxx11::string::string<std::allocator<char>>(local_b0,"Positionals",&local_b1);
/* try { // try from 00112544 to 0011255d has its CatchHandler @ 001125e5 */
FormatterBase::get_label(local_90,in_RSI,local_b0);
/* try { // try from 00112560 to 0011256f has its CatchHandler @ 001125f3 */
std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::vector
(local_d0,(vector *)local_38);
/* try { // try from 00112587 to 0011259b has its CatchHandler @ 00112601 */
(**(code **)(*in_RSI + 0x18))(param_1,in_RSI,local_90,1,local_d0);
std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::~vector(local_d0);
std::__cxx11::string::~string(local_90);
std::__cxx11::string::~string(local_b0);
std::allocator<char>::~allocator((allocator<char> *)&local_b1);
}
else {
std::__cxx11::string::string((string *)param_1);
}
local_70 = 1;
std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::~vector(local_38);
return param_1;
}
|
|
62,180 |
server_context::receive_cmpl_results_stream(std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>> const&, std::function<bool (std::unique_ptr<server_task_result, std::default_delete<server_task_result>>&)> const&, std::function<void (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&, std::function<bool ()> const&)
|
monkey531[P]llama/examples/server/server.cpp
|
void receive_cmpl_results_stream(
const std::unordered_set<int> & id_tasks,
const std::function<bool(server_task_result_ptr&)> & result_handler,
const std::function<void(json)> & error_handler,
const std::function<bool()> & is_connection_closed) {
size_t n_finished = 0;
while (true) {
server_task_result_ptr result = queue_results.recv_with_timeout(id_tasks, HTTP_POLLING_SECONDS);
if (is_connection_closed()) {
cancel_tasks(id_tasks);
return;
}
if (result == nullptr) {
continue; // retry
}
if (result->is_error()) {
error_handler(result->to_json());
cancel_tasks(id_tasks);
return;
}
GGML_ASSERT(
dynamic_cast<server_task_result_cmpl_partial*>(result.get()) != nullptr
|| dynamic_cast<server_task_result_cmpl_final*>(result.get()) != nullptr
);
if (!result_handler(result)) {
cancel_tasks(id_tasks);
break;
}
if (result->is_stop()) {
if (++n_finished == id_tasks.size()) {
break;
}
}
}
}
|
O1
|
cpp
|
server_context::receive_cmpl_results_stream(std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>> const&, std::function<bool (std::unique_ptr<server_task_result, std::default_delete<server_task_result>>&)> const&, std::function<void (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&, std::function<bool ()> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r12
movq %rdi, %r13
leaq 0x1578(%rdi), %rbp
leaq 0x8(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x8b028
cmpq $0x0, 0x10(%rbx)
je 0x8b945
movq $0x0, 0x10(%rsp)
leaq 0xc0152(%rip), %r14 # 0x14b92c
movq %rbx, %rdi
callq *0x18(%rbx)
testb %al, %al
jne 0x8b837
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8b84d
movq (%rdi), %rax
callq *(%rax)
movq 0x8(%rsp), %r15
testb %al, %al
je 0x8b858
movq (%r15), %rax
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq 0x20(%rsp), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x8b97a
leaq 0x28(%rsp), %r15
movq %r15, %rsi
callq *0x18(%rdi)
movq %r15, %rdi
xorl %esi, %esi
callq 0x449aa
movq %r15, %rdi
callq 0x45236
movl $0x1, %r15d
movq %r13, %rdi
movq %r12, %rsi
callq 0x8b1f4
jmp 0x8b909
movl $0x2, %r15d
jmp 0x8b909
testq %r15, %r15
je 0x8b959
movq %r15, %rdi
leaq 0x11d545(%rip), %rsi # 0x1a8db0
leaq 0x11d63e(%rip), %rdx # 0x1a8eb0
xorl %ecx, %ecx
callq 0x1fc40
testq %rax, %rax
jne 0x8b8a8
testq %r15, %r15
je 0x8b959
movq %r15, %rdi
leaq 0x11d51f(%rip), %rsi # 0x1a8db0
leaq 0x11d5c0(%rip), %rdx # 0x1a8e58
xorl %ecx, %ecx
callq 0x1fc40
testq %rax, %rax
je 0x8b959
movq 0x18(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x8b945
movq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq *0x18(%rdi)
testb %al, %al
je 0x8b8f8
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
xorl %r15d, %r15d
testb %al, %al
je 0x8b909
movq 0x10(%rsp), %rdx
incq %rdx
xorl %eax, %eax
movq %rdx, 0x10(%rsp)
cmpq 0x18(%r12), %rdx
sete %al
leal (%rax,%rax,2), %r15d
jmp 0x8b909
movl $0x3, %r15d
movq %r13, %rdi
movq %r12, %rsi
callq 0x8b1f4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8b919
movq (%rdi), %rax
callq *0x28(%rax)
movl %r15d, %eax
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
leaq 0x8(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x8b028
cmpq $0x0, 0x10(%rbx)
jne 0x8b7da
callq 0x1f3e0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc10a9(%rip), %rdi # 0x14ca09
leaq 0xc0473(%rip), %rdx # 0x14bdda
leaq 0xc4403(%rip), %rcx # 0x14fd71
movl $0xa03, %esi # imm = 0xA03
xorl %eax, %eax
callq 0x20250
callq 0x1f3e0
jmp 0x8b981
movq %rax, %rbx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x449aa
movq %r14, %rdi
callq 0x45236
jmp 0x8b9a2
jmp 0x8b99f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8b9b2
movq (%rdi), %rax
callq *0x28(%rax)
movq %rbx, %rdi
callq 0x20380
|
_ZN14server_context27receive_cmpl_results_streamERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEERKSt8functionIFbRSt10unique_ptrI18server_task_resultSt14default_deleteISB_EEEERKS9_IFvN8nlohmann16json_abi_v3_11_310basic_jsonINSL_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNSL_14adl_serializerESO_IhSaIhEEvEEEERKS9_IFbvEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r8
mov [rsp+68h+var_48], rcx
mov [rsp+68h+var_50], rdx
mov r12, rsi
mov r13, rdi
lea rbp, [rdi+1578h]
lea rdi, [rsp+68h+lpsrc]
mov rsi, rbp
mov rdx, r12
mov ecx, 1
call _ZN15server_response17recv_with_timeoutERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEi; server_response::recv_with_timeout(std::unordered_set<int> const&,int)
cmp qword ptr [rbx+10h], 0
jz loc_8B945
mov [rsp+68h+var_58], 0
lea r14, jpt_8B923
loc_8B7DA:
mov rdi, rbx
call qword ptr [rbx+18h]
test al, al
jnz short loc_8B837
mov rdi, [rsp+68h+lpsrc]
test rdi, rdi
jz short loc_8B84D
mov rax, [rdi]
call qword ptr [rax]
mov r15, [rsp+68h+lpsrc]
test al, al
jz short loc_8B858
mov rax, [r15]
lea rdi, [rsp+68h+var_40]
mov rsi, r15
call qword ptr [rax+18h]
mov rdi, [rsp+68h+var_48]
cmp qword ptr [rdi+10h], 0
jz loc_8B97A
lea r15, [rsp+68h+var_40]
mov rsi, r15
call qword ptr [rdi+18h]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_8B837:
mov r15d, 1
mov rdi, r13
mov rsi, r12
call _ZN14server_context12cancel_tasksERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE; server_context::cancel_tasks(std::unordered_set<int> const&)
jmp loc_8B909
loc_8B84D:
mov r15d, 2
jmp loc_8B909
loc_8B858:
test r15, r15
jz loc_8B959
mov rdi, r15; lpsrc
lea rsi, _ZTI18server_task_result; lpstype
lea rdx, _ZTI31server_task_result_cmpl_partial; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jnz short loc_8B8A8
test r15, r15
jz loc_8B959
mov rdi, r15; lpsrc
lea rsi, _ZTI18server_task_result; lpstype
lea rdx, _ZTI29server_task_result_cmpl_final; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz loc_8B959
loc_8B8A8:
mov rax, [rsp+68h+var_50]
cmp qword ptr [rax+10h], 0
jz loc_8B945
mov rdi, [rsp+68h+var_50]
lea rsi, [rsp+68h+lpsrc]
call qword ptr [rdi+18h]
test al, al
jz short loc_8B8F8
mov rdi, [rsp+68h+lpsrc]
mov rax, [rdi]
call qword ptr [rax+8]
xor r15d, r15d
test al, al
jz short loc_8B909
mov rdx, [rsp+68h+var_58]
inc rdx
xor eax, eax
mov [rsp+68h+var_58], rdx
cmp rdx, [r12+18h]
setz al
lea r15d, [rax+rax*2]
jmp short loc_8B909
loc_8B8F8:
mov r15d, 3
mov rdi, r13
mov rsi, r12
call _ZN14server_context12cancel_tasksERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE; server_context::cancel_tasks(std::unordered_set<int> const&)
loc_8B909:
mov rdi, [rsp+68h+lpsrc]
test rdi, rdi
jz short loc_8B919
mov rax, [rdi]
call qword ptr [rax+28h]
loc_8B919:
mov eax, r15d
movsxd rax, ds:(jpt_8B923 - 14B92Ch)[r14+rax*4]; switch 4 cases
add rax, r14
jmp rax; switch jump
loc_8B925:
lea rdi, [rsp+68h+lpsrc]; jumptable 000000000008B923 cases 0,2
mov rsi, rbp
mov rdx, r12
mov ecx, 1
call _ZN15server_response17recv_with_timeoutERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEi; server_response::recv_with_timeout(std::unordered_set<int> const&,int)
cmp qword ptr [rbx+10h], 0
jnz loc_8B7DA
loc_8B945:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_8B94A:
add rsp, 38h; jumptable 000000000008B923 cases 1,3
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8B959:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDynamicCastSer_5; "dynamic_cast<server_task_result_cmpl_pa"...
mov esi, 0A03h
xor eax, eax
call _ggml_abort
loc_8B97A:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short $+2
loc_8B981:
mov rbx, rax
lea r14, [rsp+68h+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()
jmp short loc_8B9A2
jmp short $+2
loc_8B99F:
mov rbx, rax
loc_8B9A2:
mov rdi, [rsp+68h+lpsrc]
test rdi, rdi
jz short loc_8B9B2
mov rax, [rdi]
call qword ptr [rax+28h]
loc_8B9B2:
mov rdi, rbx
call __Unwind_Resume
|
long long server_context::receive_cmpl_results_stream(
long long a1,
std::chrono::_V2::steady_clock *a2,
long long a3,
long long a4,
long long a5)
{
char v6; // al
void *v7; // r15
unsigned int v8; // r15d
long long result; // rax
void *lpsrc; // [rsp+8h] [rbp-60h] BYREF
long long v11; // [rsp+10h] [rbp-58h]
long long v12; // [rsp+18h] [rbp-50h]
long long v13; // [rsp+20h] [rbp-48h]
char v14[64]; // [rsp+28h] [rbp-40h] BYREF
v13 = a4;
v12 = a3;
server_response::recv_with_timeout(&lpsrc, a1 + 5496, a2, 1);
if ( !*(_QWORD *)(a5 + 16) )
goto LABEL_23;
v11 = 0LL;
while ( 2 )
{
if ( (*(unsigned __int8 ( **)(long long))(a5 + 24))(a5) )
goto LABEL_8;
if ( !lpsrc )
{
v8 = 2;
goto LABEL_19;
}
v6 = (**(long long ( ***)(void *))lpsrc)(lpsrc);
v7 = lpsrc;
if ( v6 )
{
(*(void ( **)(char *, void *))(*(_QWORD *)lpsrc + 24LL))(v14, lpsrc);
if ( *(_QWORD *)(v13 + 16) )
{
(*(void ( **)(long long, char *))(v13 + 24))(v13, v14);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v14);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v14);
LABEL_8:
v8 = 1;
server_context::cancel_tasks(a1, (long long)a2);
goto LABEL_19;
}
LABEL_25:
std::__throw_bad_function_call();
}
if ( !lpsrc
|| !__dynamic_cast(
lpsrc,
(const struct __class_type_info *)&`typeinfo for'server_task_result,
(const struct __class_type_info *)&`typeinfo for'server_task_result_cmpl_partial,
0LL)
&& (!v7
|| !__dynamic_cast(
v7,
(const struct __class_type_info *)&`typeinfo for'server_task_result,
(const struct __class_type_info *)&`typeinfo for'server_task_result_cmpl_final,
0LL)) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp",
2563LL,
"GGML_ASSERT(%s) failed",
"dynamic_cast<server_task_result_cmpl_partial*>(result.get()) != nullptr || dynamic_cast<server_task_result_cmpl_"
"final*>(result.get()) != nullptr");
goto LABEL_25;
}
if ( !*(_QWORD *)(v12 + 16) )
LABEL_23:
std::__throw_bad_function_call();
if ( (*(unsigned __int8 ( **)(long long, void **))(v12 + 24))(v12, &lpsrc) )
{
v8 = 0;
if ( (*(unsigned __int8 ( **)(void *))(*(_QWORD *)lpsrc + 8LL))(lpsrc) )
v8 = 3 * (++v11 == *((_QWORD *)a2 + 3));
}
else
{
v8 = 3;
server_context::cancel_tasks(a1, (long long)a2);
}
LABEL_19:
if ( lpsrc )
(*(void ( **)(void *))(*(_QWORD *)lpsrc + 40LL))(lpsrc);
result = v8;
switch ( v8 )
{
case 0u:
case 2u:
server_response::recv_with_timeout(&lpsrc, a1 + 5496, a2, 1);
if ( !*(_QWORD *)(a5 + 16) )
goto LABEL_23;
continue;
case 1u:
case 3u:
return result;
}
}
}
|
receive_cmpl_results_stream:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R8
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV R12,RSI
MOV R13,RDI
LEA RBP,[RDI + 0x1578]
LEA RDI,[RSP + 0x8]
MOV RSI,RBP
MOV RDX,R12
MOV ECX,0x1
CALL 0x0018b028
CMP qword ptr [RBX + 0x10],0x0
JZ 0x0018b945
MOV qword ptr [RSP + 0x10],0x0
LEA R14,[0x24b92c]
LAB_0018b7da:
MOV RDI,RBX
CALL qword ptr [RBX + 0x18]
TEST AL,AL
JNZ 0x0018b837
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018b84d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX]
MOV R15,qword ptr [RSP + 0x8]
TEST AL,AL
JZ 0x0018b858
MOV RAX,qword ptr [R15]
LEA RDI,[RSP + 0x28]
MOV RSI,R15
CALL qword ptr [RAX + 0x18]
MOV RDI,qword ptr [RSP + 0x20]
CMP qword ptr [RDI + 0x10],0x0
JZ 0x0018b97a
LAB_0018b81a:
LEA R15,[RSP + 0x28]
MOV RSI,R15
CALL qword ptr [RDI + 0x18]
MOV RDI,R15
XOR ESI,ESI
CALL 0x001449aa
MOV RDI,R15
CALL 0x00145236
LAB_0018b837:
MOV R15D,0x1
LAB_0018b83d:
MOV RDI,R13
MOV RSI,R12
CALL 0x0018b1f4
JMP 0x0018b909
LAB_0018b84d:
MOV R15D,0x2
JMP 0x0018b909
LAB_0018b858:
TEST R15,R15
JZ 0x0018b959
MOV RDI,R15
LEA RSI,[0x2a8db0]
LEA RDX,[0x2a8eb0]
XOR ECX,ECX
CALL 0x0011fc40
TEST RAX,RAX
JNZ 0x0018b8a8
TEST R15,R15
JZ 0x0018b959
MOV RDI,R15
LEA RSI,[0x2a8db0]
LEA RDX,[0x2a8e58]
XOR ECX,ECX
CALL 0x0011fc40
TEST RAX,RAX
JZ 0x0018b959
LAB_0018b8a8:
MOV RAX,qword ptr [RSP + 0x18]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0018b945
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x8]
CALL qword ptr [RDI + 0x18]
TEST AL,AL
JZ 0x0018b8f8
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
XOR R15D,R15D
TEST AL,AL
JZ 0x0018b909
MOV RDX,qword ptr [RSP + 0x10]
INC RDX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],RDX
CMP RDX,qword ptr [R12 + 0x18]
SETZ AL
LEA R15D,[RAX + RAX*0x2]
JMP 0x0018b909
LAB_0018b8f8:
MOV R15D,0x3
MOV RDI,R13
MOV RSI,R12
CALL 0x0018b1f4
LAB_0018b909:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018b919
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
LAB_0018b919:
MOV EAX,R15D
MOVSXD RAX,dword ptr [R14 + RAX*0x4]
ADD RAX,R14
JMP RAX
LAB_0018b945:
CALL 0x0011f3e0
LAB_0018b959:
LEA RDI,[0x24ca09]
LEA RDX,[0x24bdda]
LEA RCX,[0x24fd71]
MOV ESI,0xa03
XOR EAX,EAX
CALL 0x00120250
LAB_0018b97a:
CALL 0x0011f3e0
|
/* server_context::receive_cmpl_results_stream(std::unordered_set<int, std::hash<int>,
std::equal_to<int>, std::allocator<int> > const&, std::function<bool
(std::unique_ptr<server_task_result, std::default_delete<server_task_result> >&)> const&,
std::function<void
(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&, std::function<bool ()> const&) */
void __thiscall
server_context::receive_cmpl_results_stream
(server_context *this,unordered_set *param_1,function *param_2,function *param_3,
function *param_4)
{
long *plVar1;
char cVar2;
long lVar3;
uint uVar4;
long *local_60;
long local_58;
function *local_50;
function *local_48;
data local_40 [16];
local_50 = param_2;
local_48 = param_3;
server_response::recv_with_timeout((unordered_set *)&local_60,(int)this + 0x1578);
if (*(long *)(param_4 + 0x10) == 0) {
LAB_0018b945:
/* WARNING: Subroutine does not return */
/* try { // try from 0018b945 to 0018b979 has its CatchHandler @ 0018b99d */
std::__throw_bad_function_call();
}
local_58 = 0;
/* try { // try from 0018b7da to 0018b809 has its CatchHandler @ 0018b99f */
cVar2 = (**(code **)(param_4 + 0x18))(param_4);
if (cVar2 == '\0') {
if (local_60 == (long *)0x0) {
uVar4 = 2;
goto LAB_0018b909;
}
cVar2 = (**(code **)*local_60)();
plVar1 = local_60;
if (cVar2 == '\0') {
if (local_60 == (long *)0x0) goto LAB_0018b959;
lVar3 = __dynamic_cast(local_60,&server_task_result::typeinfo,
&server_task_result_cmpl_partial::typeinfo,0);
if (lVar3 == 0) {
if (plVar1 == (long *)0x0) {
LAB_0018b959:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp"
,0xa03,"GGML_ASSERT(%s) failed",
"dynamic_cast<server_task_result_cmpl_partial*>(result.get()) != nullptr || dynamic_cast<server_task_result_cmpl_final*>(result.get()) != nullptr"
);
}
lVar3 = __dynamic_cast(plVar1,&server_task_result::typeinfo,
&server_task_result_cmpl_final::typeinfo,0);
if (lVar3 == 0) goto LAB_0018b959;
}
if (*(long *)(local_50 + 0x10) == 0) goto LAB_0018b945;
cVar2 = (**(code **)(local_50 + 0x18))(local_50,&local_60);
if (cVar2 == '\0') {
uVar4 = 3;
cancel_tasks(this,param_1);
}
else {
cVar2 = (**(code **)(*local_60 + 8))();
uVar4 = 0;
if (cVar2 != '\0') {
local_58 = local_58 + 1;
uVar4 = (uint)(local_58 == *(long *)(param_1 + 0x18)) * 3;
}
}
goto LAB_0018b909;
}
(**(code **)(*local_60 + 0x18))(local_40,local_60);
if (*(long *)(local_48 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0018b97a to 0018b97e has its CatchHandler @ 0018b97f */
std::__throw_bad_function_call();
}
/* try { // try from 0018b81a to 0018b824 has its CatchHandler @ 0018b981 */
(**(code **)(local_48 + 0x18))(local_48,local_40);
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);
}
uVar4 = 1;
/* try { // try from 0018b83d to 0018b908 has its CatchHandler @ 0018b99f */
cancel_tasks(this,param_1);
LAB_0018b909:
if (local_60 != (long *)0x0) {
(**(code **)(*local_60 + 0x28))();
}
/* WARNING: Could not recover jumptable at 0x0018b923. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_0024b92c + *(int *)(&DAT_0024b92c + (ulong)uVar4 * 4)))();
return;
}
|
|
62,181 |
server_context::receive_cmpl_results_stream(std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>> const&, std::function<bool (std::unique_ptr<server_task_result, std::default_delete<server_task_result>>&)> const&, std::function<void (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&, std::function<bool ()> const&)
|
monkey531[P]llama/examples/server/server.cpp
|
void receive_cmpl_results_stream(
const std::unordered_set<int> & id_tasks,
const std::function<bool(server_task_result_ptr&)> & result_handler,
const std::function<void(json)> & error_handler,
const std::function<bool()> & is_connection_closed) {
size_t n_finished = 0;
while (true) {
server_task_result_ptr result = queue_results.recv_with_timeout(id_tasks, HTTP_POLLING_SECONDS);
if (is_connection_closed()) {
cancel_tasks(id_tasks);
return;
}
if (result == nullptr) {
continue; // retry
}
if (result->is_error()) {
error_handler(result->to_json());
cancel_tasks(id_tasks);
return;
}
GGML_ASSERT(
dynamic_cast<server_task_result_cmpl_partial*>(result.get()) != nullptr
|| dynamic_cast<server_task_result_cmpl_final*>(result.get()) != nullptr
);
if (!result_handler(result)) {
cancel_tasks(id_tasks);
break;
}
if (result->is_stop()) {
if (++n_finished == id_tasks.size()) {
break;
}
}
}
}
|
O2
|
cpp
|
server_context::receive_cmpl_results_stream(std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>> const&, std::function<bool (std::unique_ptr<server_task_result, std::default_delete<server_task_result>>&)> const&, std::function<void (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&, std::function<bool ()> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
leaq 0x1578(%rdi), %rbp
movq $0x0, 0x8(%rsp)
movq %rsp, %r14
pushq $0x1
popq %r15
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl %r15d, %ecx
callq 0x79998
movq %rbx, %rdi
callq 0x79ad2
testb %al, %al
jne 0x7a146
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7a0ea
movq (%rdi), %rax
callq *(%rax)
movq (%rsp), %r13
testb %al, %al
je 0x7a178
movq (%r13), %rax
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
callq *0x18(%rax)
movq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %r13
movq %r13, %rsi
callq 0x79bf8
movq %r13, %rdi
callq 0x3ec50
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x79ae2
movl %r15d, %r13d
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7a165
movq (%rdi), %rax
callq *0x28(%rax)
movl %r13d, %eax
leaq 0x77745(%rip), %rcx # 0xf18b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testq %r13, %r13
je 0x7a226
movq %r13, %rdi
leaq 0xeac65(%rip), %rsi # 0x164df0
leaq 0xead5e(%rip), %rdx # 0x164ef0
xorl %ecx, %ecx
callq 0x28ca0
testq %rax, %rax
jne 0x7a1bb
movq %r13, %rdi
leaq 0xeac48(%rip), %rsi # 0x164df0
leaq 0xeace9(%rip), %rdx # 0x164e98
xorl %ecx, %ecx
callq 0x28ca0
testq %rax, %rax
je 0x7a226
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x7a274
testb %al, %al
je 0x7a201
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
xorl %r13d, %r13d
testb %al, %al
je 0x7a156
movq 0x8(%rsp), %rdx
incq %rdx
xorl %eax, %eax
movq %rdx, 0x8(%rsp)
cmpq 0x18(%r12), %rdx
sete %al
leal (%rax,%rax,2), %r13d
jmp 0x7a156
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x79ae2
pushq $0x3
popq %r13
jmp 0x7a156
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78728(%rip), %rdi # 0xf2955
leaq 0x77b2e(%rip), %rdx # 0xf1d62
leaq 0x7babe(%rip), %rcx # 0xf5cf9
movl $0xa03, %esi # imm = 0xA03
xorl %eax, %eax
callq 0x292a0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3ec50
jmp 0x7a25d
jmp 0x7a25a
jmp 0x7a25a
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7a26c
movq (%rdi), %rax
callq *0x28(%rax)
movq %rbx, %rdi
callq 0x293c0
|
_ZN14server_context27receive_cmpl_results_streamERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEERKSt8functionIFbRSt10unique_ptrI18server_task_resultSt14default_deleteISB_EEEERKS9_IFvN8nlohmann16json_abi_v3_11_310basic_jsonINSL_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNSL_14adl_serializerESO_IhSaIhEEvEEEERKS9_IFbvEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r8
mov [rsp+68h+var_48], rcx
mov [rsp+68h+var_50], rdx
mov r12, rsi
mov [rsp+68h+var_58], rdi
lea rbp, [rdi+1578h]
mov [rsp+68h+var_60], 0
mov r14, rsp
push 1
pop r15
loc_7A0EA:
mov rdi, r14; jumptable 000000000007A176 cases 0,2
mov rsi, rbp
mov rdx, r12
mov ecx, r15d
call _ZN15server_response17recv_with_timeoutERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEi; server_response::recv_with_timeout(std::unordered_set<int> const&,int)
mov rdi, rbx
call _ZNKSt8functionIFbvEEclEv; std::function<bool ()(void)>::operator()(void)
test al, al
jnz short loc_7A146
mov rdi, [rsp+68h+lpsrc]
test rdi, rdi
jz short loc_7A0EA; jumptable 000000000007A176 cases 0,2
mov rax, [rdi]
call qword ptr [rax]
mov r13, [rsp+68h+lpsrc]
test al, al
jz short loc_7A178
mov rax, [r13+0]
lea rdi, [rsp+68h+var_40]
mov rsi, r13
call qword ptr [rax+18h]
mov rdi, [rsp+68h+var_48]
lea r13, [rsp+68h+var_40]
mov rsi, r13
call _ZNKSt8functionIFvN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEEclESE_; std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)>::operator()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_7A146:
mov rdi, [rsp+68h+var_58]
mov rsi, r12
call _ZN14server_context12cancel_tasksERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE; server_context::cancel_tasks(std::unordered_set<int> const&)
mov r13d, r15d
loc_7A156:
mov rdi, [rsp+68h+lpsrc]
test rdi, rdi
jz short loc_7A165
mov rax, [rdi]
call qword ptr [rax+28h]
loc_7A165:
mov eax, r13d
lea rcx, jpt_7A176
movsxd rax, ds:(jpt_7A176 - 0F18B4h)[rcx+rax*4]; switch 4 cases
add rax, rcx
jmp rax; switch jump
loc_7A178:
test r13, r13
jz loc_7A226
mov rdi, r13; lpsrc
lea rsi, _ZTI18server_task_result; lpstype
lea rdx, _ZTI31server_task_result_cmpl_partial; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jnz short loc_7A1BB
mov rdi, r13; lpsrc
lea rsi, _ZTI18server_task_result; lpstype
lea rdx, _ZTI29server_task_result_cmpl_final; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz short loc_7A226
loc_7A1BB:
mov rdi, [rsp+68h+var_50]
mov rsi, r14
call _ZNKSt8functionIFbRSt10unique_ptrI18server_task_resultSt14default_deleteIS1_EEEEclES5_; std::function<bool ()(std::unique_ptr<server_task_result> &)>::operator()(std::unique_ptr<server_task_result> &)
test al, al
jz short loc_7A201
mov rdi, [rsp+68h+lpsrc]
mov rax, [rdi]
call qword ptr [rax+8]
xor r13d, r13d
test al, al
jz loc_7A156
mov rdx, [rsp+68h+var_60]
inc rdx
xor eax, eax
mov [rsp+68h+var_60], rdx
cmp rdx, [r12+18h]
setz al
lea r13d, [rax+rax*2]
jmp loc_7A156
loc_7A201:
mov rdi, [rsp+68h+var_58]
mov rsi, r12
call _ZN14server_context12cancel_tasksERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE; server_context::cancel_tasks(std::unordered_set<int> const&)
push 3
pop r13
jmp loc_7A156
loc_7A217:
add rsp, 38h; jumptable 000000000007A176 cases 1,3
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7A226:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDynamicCastSer_5; "dynamic_cast<server_task_result_cmpl_pa"...
mov esi, 0A03h
xor eax, eax
call _ggml_abort
mov rbx, rax
lea rdi, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_7A25D
jmp short loc_7A25A
jmp short $+2
loc_7A25A:
mov rbx, rax
loc_7A25D:
mov rdi, [rsp+68h+lpsrc]
test rdi, rdi
jz short loc_7A26C
mov rax, [rdi]
call qword ptr [rax+28h]
loc_7A26C:
mov rdi, rbx
call __Unwind_Resume
|
long long server_context::receive_cmpl_results_stream(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5)
{
char v6; // al
void *v7; // r13
unsigned int v8; // r13d
long long result; // rax
long long v10; // rbx
void *lpsrc; // [rsp+0h] [rbp-68h] BYREF
long long v12; // [rsp+8h] [rbp-60h]
long long v13; // [rsp+10h] [rbp-58h]
long long v14; // [rsp+18h] [rbp-50h]
long long v15; // [rsp+20h] [rbp-48h]
_BYTE v16[64]; // [rsp+28h] [rbp-40h] BYREF
v15 = a4;
v14 = a3;
v13 = a1;
v12 = 0LL;
while ( 1 )
{
do
{
LABEL_2:
server_response::recv_with_timeout(&lpsrc, a1 + 5496, a2, 1);
if ( (unsigned __int8)std::function<bool ()(void)>::operator()(a5) )
goto LABEL_6;
}
while ( !lpsrc );
v6 = (**(long long ( ***)(void *))lpsrc)(lpsrc);
v7 = lpsrc;
if ( v6 )
{
(*(void ( **)(_BYTE *, void *))(*(_QWORD *)lpsrc + 24LL))(v16, lpsrc);
std::function<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>)>::operator()(v15);
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)v16);
LABEL_6:
server_context::cancel_tasks(v13, a2);
v8 = 1;
goto LABEL_7;
}
if ( !lpsrc
|| !__dynamic_cast(
lpsrc,
(const struct __class_type_info *)&`typeinfo for'server_task_result,
(const struct __class_type_info *)&`typeinfo for'server_task_result_cmpl_partial,
0LL)
&& !__dynamic_cast(
v7,
(const struct __class_type_info *)&`typeinfo for'server_task_result,
(const struct __class_type_info *)&`typeinfo for'server_task_result_cmpl_final,
0LL) )
{
v10 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp",
2563LL,
"GGML_ASSERT(%s) failed",
"dynamic_cast<server_task_result_cmpl_partial*>(result.get()) != nullptr || dynamic_cast<server_task_result"
"_cmpl_final*>(result.get()) != nullptr");
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)v16);
if ( lpsrc )
(*(void ( **)(void *))(*(_QWORD *)lpsrc + 40LL))(lpsrc);
_Unwind_Resume(v10);
}
if ( (unsigned __int8)std::function<bool ()(std::unique_ptr<server_task_result> &)>::operator()(v14, &lpsrc) )
{
v8 = 0;
if ( (*(unsigned __int8 ( **)(void *))(*(_QWORD *)lpsrc + 8LL))(lpsrc) )
v8 = 3 * (++v12 == *(_QWORD *)(a2 + 24));
}
else
{
server_context::cancel_tasks(v13, a2);
v8 = 3;
}
LABEL_7:
if ( lpsrc )
(*(void ( **)(void *))(*(_QWORD *)lpsrc + 40LL))(lpsrc);
result = v8;
switch ( v8 )
{
case 0u:
case 2u:
goto LABEL_2;
case 1u:
case 3u:
return result;
}
}
}
|
receive_cmpl_results_stream:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R8
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV R12,RSI
MOV qword ptr [RSP + 0x10],RDI
LEA RBP,[RDI + 0x1578]
MOV qword ptr [RSP + 0x8],0x0
MOV R14,RSP
PUSH 0x1
POP R15
LAB_0017a0ea:
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R12
MOV ECX,R15D
CALL 0x00179998
LAB_0017a0fb:
MOV RDI,RBX
CALL 0x00179ad2
TEST AL,AL
JNZ 0x0017a146
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x0017a0ea
MOV RAX,qword ptr [RDI]
LAB_0017a113:
CALL qword ptr [RAX]
MOV R13,qword ptr [RSP]
TEST AL,AL
JZ 0x0017a178
MOV RAX,qword ptr [R13]
LEA RDI,[RSP + 0x28]
MOV RSI,R13
CALL qword ptr [RAX + 0x18]
LAB_0017a12c:
MOV RDI,qword ptr [RSP + 0x20]
LEA R13,[RSP + 0x28]
MOV RSI,R13
CALL 0x00179bf8
MOV RDI,R13
CALL 0x0013ec50
LAB_0017a146:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,R12
CALL 0x00179ae2
LAB_0017a153:
MOV R13D,R15D
LAB_0017a156:
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x0017a165
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
LAB_0017a165:
MOV EAX,R13D
LEA RCX,[0x1f18b4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_0017a178:
TEST R13,R13
JZ 0x0017a226
MOV RDI,R13
LEA RSI,[0x264df0]
LEA RDX,[0x264ef0]
XOR ECX,ECX
CALL 0x00128ca0
TEST RAX,RAX
JNZ 0x0017a1bb
MOV RDI,R13
LEA RSI,[0x264df0]
LEA RDX,[0x264e98]
XOR ECX,ECX
CALL 0x00128ca0
TEST RAX,RAX
JZ 0x0017a226
LAB_0017a1bb:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R14
CALL 0x0017a274
TEST AL,AL
JZ 0x0017a201
MOV RDI,qword ptr [RSP]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
XOR R13D,R13D
TEST AL,AL
JZ 0x0017a156
MOV RDX,qword ptr [RSP + 0x8]
INC RDX
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RDX
CMP RDX,qword ptr [R12 + 0x18]
SETZ AL
LEA R13D,[RAX + RAX*0x2]
JMP 0x0017a156
LAB_0017a201:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,R12
CALL 0x00179ae2
PUSH 0x3
POP R13
JMP 0x0017a156
LAB_0017a226:
LEA RDI,[0x1f2955]
LEA RDX,[0x1f1d62]
LEA RCX,[0x1f5cf9]
MOV ESI,0xa03
XOR EAX,EAX
CALL 0x001292a0
|
/* server_context::receive_cmpl_results_stream(std::unordered_set<int, std::hash<int>,
std::equal_to<int>, std::allocator<int> > const&, std::function<bool
(std::unique_ptr<server_task_result, std::default_delete<server_task_result> >&)> const&,
std::function<void
(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&, std::function<bool ()> const&) */
void __thiscall
server_context::receive_cmpl_results_stream
(server_context *this,unordered_set *param_1,function *param_2,function *param_3,
function *param_4)
{
long *plVar1;
char cVar2;
long lVar3;
ulong uStack_70;
long *local_68;
long local_60;
server_context *local_58;
function<bool(std::unique_ptr<server_task_result,std::default_delete<server_task_result>>&)>
*local_50;
function<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>)>
*local_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 [16];
local_60 = 0;
local_58 = this;
local_50 = (function<bool(std::unique_ptr<server_task_result,std::default_delete<server_task_result>>&)>
*)param_2;
local_48 = (function<void(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>)>
*)param_3;
do {
server_response::recv_with_timeout((unordered_set *)&local_68,(int)this + 0x1578);
/* try { // try from 0017a0fb to 0017a102 has its CatchHandler @ 0017a25a */
cVar2 = std::function<bool()>::operator()((function<bool()> *)param_4);
if (cVar2 != '\0') goto LAB_0017a146;
} while (local_68 == (long *)0x0);
/* try { // try from 0017a113 to 0017a12b has its CatchHandler @ 0017a258 */
cVar2 = (**(code **)*local_68)();
plVar1 = local_68;
if (cVar2 == '\0') {
if (local_68 == (long *)0x0) {
LAB_0017a226:
/* try { // try from 0017a226 to 0017a246 has its CatchHandler @ 0017a256 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp"
,0xa03,"GGML_ASSERT(%s) failed",
"dynamic_cast<server_task_result_cmpl_partial*>(result.get()) != nullptr || dynamic_cast<server_task_result_cmpl_final*>(result.get()) != nullptr"
);
}
lVar3 = __dynamic_cast(local_68,&server_task_result::typeinfo,
&server_task_result_cmpl_partial::typeinfo,0);
if (lVar3 == 0) {
lVar3 = __dynamic_cast(plVar1,&server_task_result::typeinfo,
&server_task_result_cmpl_final::typeinfo,0);
if (lVar3 == 0) goto LAB_0017a226;
}
/* try { // try from 0017a1bb to 0017a20d has its CatchHandler @ 0017a258 */
cVar2 = std::
function<bool(std::unique_ptr<server_task_result,std::default_delete<server_task_result>>&)>
::operator()(local_50,(unique_ptr *)&local_68);
if (cVar2 == '\0') {
cancel_tasks(local_58,param_1);
uStack_70 = 3;
}
else {
cVar2 = (**(code **)(*local_68 + 8))();
uStack_70 = 0;
if (cVar2 != '\0') {
local_60 = local_60 + 1;
uStack_70 = (ulong)((uint)(local_60 == *(long *)(param_1 + 0x18)) * 3);
}
}
}
else {
(**(code **)(*local_68 + 0x18))(local_40,local_68);
/* try { // try from 0017a12c to 0017a13d has its CatchHandler @ 0017a247 */
std::
function<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>)>
::operator()(local_48,local_40);
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(local_40);
LAB_0017a146:
/* try { // try from 0017a146 to 0017a152 has its CatchHandler @ 0017a258 */
cancel_tasks(local_58,param_1);
uStack_70 = 1;
}
if (local_68 != (long *)0x0) {
(**(code **)(*local_68 + 0x28))();
}
/* WARNING: Could not recover jumptable at 0x0017a176. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_001f18b4 + *(int *)(&DAT_001f18b4 + uStack_70 * 4)))();
return;
}
|
|
62,182 |
CutSegment
|
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
|
segment_t *CutSegment(segment_t *s, int size_to_cut) {
if (s->size <= size_to_cut) {
HEAP_LOG("Cannot cut segment: segment size %d <= requested size %d\n", s->size, size_to_cut);
return s;
}
uintptr_t addr = (uintptr_t) s;
addr += (s->size - size_to_cut) * BLOCK_SIZE;
// Ensure new segment is aligned
uintptr_t original_addr = addr;
addr = (addr + ALIGNMENT - 1) & ~(ALIGNMENT - 1);
if (original_addr != addr) {
HEAP_LOG("Adjusted segment address for alignment: %p -> %p\n", (void*)original_addr, (void*)addr);
}
segment_t *result = (segment_t *) addr;
// Update sizes accounting for alignment adjustments
int actual_size = (addr - (uintptr_t) s) / BLOCK_SIZE;
s->size -= size_to_cut;
// Initialize new segment
result->size = size_to_cut;
result->prev = s;
result->next = s->next;
result->is_free = s->is_free;
result->magic = SEGMENT_MAGIC;
result->allocation_file = NULL;
result->allocation_line = 0;
result->allocation_id = 0;
// Update linked list pointers
if (s->next) s->next->prev = result;
s->next = result;
HEAP_LOG("Segment cut: original=%p (size=%d), new=%p (size=%d)\n",
s, s->size, result, result->size);
initialize_segment_integrity(result);
return result;
}
|
O3
|
c
|
CutSegment:
movq %rdi, %rax
movl 0x4(%rdi), %ecx
subl %esi, %ecx
jle 0x1eca
pushq %rbx
movl %ecx, %edx
shll $0xc, %edx
movslq %edx, %rdx
leaq (%rax,%rdx), %rbx
addq $0xf, %rbx
andq $-0x10, %rbx
movl %ecx, 0x4(%rax)
movl %esi, 0x4(%rbx)
movq %rax, 0x10(%rbx)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %edx
movl %edx, (%rbx)
movl $0xcafebafe, 0x28(%rbx) # imm = 0xCAFEBAFE
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
testq %rcx, %rcx
je 0x1eba
movq %rbx, 0x10(%rcx)
movq %rbx, 0x8(%rax)
movq %rbx, %rdi
callq 0x1ecb
movq %rbx, %rax
popq %rbx
retq
|
CutSegment:
mov rax, rdi
mov ecx, [rdi+4]
sub ecx, esi
jle short locret_1ECA
push rbx
mov edx, ecx
shl edx, 0Ch
movsxd rdx, edx
lea rbx, [rax+rdx]
add rbx, 0Fh
and rbx, 0FFFFFFFFFFFFFFF0h
mov [rax+4], ecx
mov [rbx+4], esi
mov [rbx+10h], rax
mov rcx, [rax+8]
mov [rbx+8], rcx
mov edx, [rax]
mov [rbx], edx
mov dword ptr [rbx+28h], 0CAFEBAFEh
xorps xmm0, xmm0
movups xmmword ptr [rbx+18h], xmm0
test rcx, rcx
jz short loc_1EBA
mov [rcx+10h], rbx
loc_1EBA:
mov [rax+8], rbx
mov rdi, rbx
call initialize_segment_integrity
mov rax, rbx
pop rbx
locret_1ECA:
retn
|
unsigned long long CutSegment(unsigned long long a1, int a2)
{
unsigned long long result; // rax
int v3; // ecx
bool v4; // cc
int v5; // ecx
unsigned long long v6; // rbx
long long v7; // rcx
result = a1;
v3 = *(_DWORD *)(a1 + 4);
v4 = v3 <= a2;
v5 = v3 - a2;
if ( !v4 )
{
v6 = (a1 + (v5 << 12) + 15) & 0xFFFFFFFFFFFFFFF0LL;
*(_DWORD *)(a1 + 4) = v5;
*(_DWORD *)(v6 + 4) = a2;
*(_QWORD *)(v6 + 16) = a1;
v7 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(v6 + 8) = v7;
*(_DWORD *)v6 = *(_DWORD *)a1;
*(_DWORD *)(v6 + 40) = -889275650;
*(_OWORD *)(v6 + 24) = 0LL;
if ( v7 )
*(_QWORD *)(v7 + 16) = v6;
*(_QWORD *)(a1 + 8) = v6;
initialize_segment_integrity(v6);
return v6;
}
return result;
}
|
CutSegment:
MOV RAX,RDI
MOV ECX,dword ptr [RDI + 0x4]
SUB ECX,ESI
JLE 0x00101eca
PUSH RBX
MOV EDX,ECX
SHL EDX,0xc
MOVSXD RDX,EDX
LEA RBX,[RAX + RDX*0x1]
ADD RBX,0xf
AND RBX,-0x10
MOV dword ptr [RAX + 0x4],ECX
MOV dword ptr [RBX + 0x4],ESI
MOV qword ptr [RBX + 0x10],RAX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RCX
MOV EDX,dword ptr [RAX]
MOV dword ptr [RBX],EDX
MOV dword ptr [RBX + 0x28],0xcafebafe
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x18],XMM0
TEST RCX,RCX
JZ 0x00101eba
MOV qword ptr [RCX + 0x10],RBX
LAB_00101eba:
MOV qword ptr [RAX + 0x8],RBX
MOV RDI,RBX
CALL 0x00101ecb
MOV RAX,RBX
POP RBX
LAB_00101eca:
RET
|
int4 * CutSegment(int4 *param_1,int param_2)
{
long lVar1;
int iVar2;
int4 *puVar3;
iVar2 = param_1[1] - param_2;
puVar3 = param_1;
if (iVar2 != 0 && param_2 <= (int)param_1[1]) {
puVar3 = (int4 *)((long)param_1 + (long)(iVar2 * 0x1000) + 0xf & 0xfffffffffffffff0);
param_1[1] = iVar2;
puVar3[1] = param_2;
*(int4 **)(puVar3 + 4) = param_1;
lVar1 = *(long *)(param_1 + 2);
*(long *)(puVar3 + 2) = lVar1;
*puVar3 = *param_1;
puVar3[10] = 0xcafebafe;
*(int8 *)(puVar3 + 6) = 0;
*(int8 *)(puVar3 + 8) = 0;
if (lVar1 != 0) {
*(int4 **)(lVar1 + 0x10) = puVar3;
}
*(int4 **)(param_1 + 2) = puVar3;
initialize_segment_integrity(puVar3);
}
return puVar3;
}
|
|
62,183 |
Vector2ClampValue
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector2 Vector2ClampValue(Vector2 v, float min, float max)
{
Vector2 result = v;
float length = (v.x*v.x) + (v.y*v.y);
if (length > 0.0f)
{
length = sqrtf(length);
float scale = 1; // By default, 1 as the neutral element.
if (length < min)
{
scale = min/length;
}
else if (length > max)
{
scale = max/length;
}
result.x = v.x*scale;
result.y = v.y*scale;
}
return result;
}
|
O0
|
c
|
Vector2ClampValue:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movlpd %xmm0, -0x10(%rbp)
movss %xmm1, -0x14(%rbp)
movss %xmm2, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movss -0x10(%rbp), %xmm0
movss -0x10(%rbp), %xmm2
movss -0xc(%rbp), %xmm1
mulss -0xc(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xb8d93
movss -0x1c(%rbp), %xmm0
callq 0xaa30
movss %xmm0, -0x1c(%rbp)
movss 0xeb3c0(%rip), %xmm0 # 0x1a40f4
movss %xmm0, -0x20(%rbp)
movss -0x1c(%rbp), %xmm1
movss -0x14(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xb8d59
movss -0x14(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
jmp 0xb8d75
movss -0x1c(%rbp), %xmm0
ucomiss -0x18(%rbp), %xmm0
jbe 0xb8d73
movss -0x18(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
jmp 0xb8d75
movss -0x10(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movss -0xc(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nop
|
Vector2ClampValue:
push rbp
mov rbp, rsp
sub rsp, 20h
movlpd [rbp+var_10], xmm0
movss [rbp+var_14], xmm1
movss [rbp+var_18], xmm2
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
movss xmm0, dword ptr [rbp+var_10]
movss xmm2, dword ptr [rbp+var_10]
movss xmm1, dword ptr [rbp+var_10+4]
mulss xmm1, dword ptr [rbp+var_10+4]
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_1C], xmm0
movss xmm0, [rbp+var_1C]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jbe short loc_B8D93
movss xmm0, [rbp+var_1C]
call _sqrtf
movss [rbp+var_1C], xmm0
movss xmm0, cs:dword_1A40F4
movss [rbp+var_20], xmm0
movss xmm1, [rbp+var_1C]
movss xmm0, [rbp+var_14]
ucomiss xmm0, xmm1
jbe short loc_B8D59
movss xmm0, [rbp+var_14]
divss xmm0, [rbp+var_1C]
movss [rbp+var_20], xmm0
jmp short loc_B8D75
loc_B8D59:
movss xmm0, [rbp+var_1C]
ucomiss xmm0, [rbp+var_18]
jbe short loc_B8D73
movss xmm0, [rbp+var_18]
divss xmm0, [rbp+var_1C]
movss [rbp+var_20], xmm0
loc_B8D73:
jmp short $+2
loc_B8D75:
movss xmm0, dword ptr [rbp+var_10]
mulss xmm0, [rbp+var_20]
movss dword ptr [rbp+var_8], xmm0
movss xmm0, dword ptr [rbp+var_10+4]
mulss xmm0, [rbp+var_20]
movss dword ptr [rbp+var_8+4], xmm0
loc_B8D93:
movsd xmm0, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
double Vector2ClampValue(double a1, float a2, float a3)
{
double v3; // xmm0_8
float v5; // [rsp+0h] [rbp-20h]
float v6; // [rsp+4h] [rbp-1Ch]
double v8; // [rsp+18h] [rbp-8h]
v8 = a1;
v6 = (float)(*(float *)&a1 * *(float *)&a1) + (float)(*((float *)&a1 + 1) * *((float *)&a1 + 1));
if ( v6 > 0.0 )
{
v3 = sqrtf(v6);
v5 = 1.0;
if ( a2 <= *(float *)&v3 )
{
if ( *(float *)&v3 > a3 )
v5 = a3 / *(float *)&v3;
}
else
{
v5 = a2 / *(float *)&v3;
}
*(float *)&v8 = *(float *)&a1 * v5;
*((float *)&v8 + 1) = *((float *)&a1 + 1) * v5;
}
return v8;
}
|
Vector2ClampValue:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVLPD qword ptr [RBP + -0x10],XMM0
MOVSS dword ptr [RBP + -0x14],XMM1
MOVSS dword ptr [RBP + -0x18],XMM2
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
MOVSS XMM0,dword ptr [RBP + -0x10]
MOVSS XMM2,dword ptr [RBP + -0x10]
MOVSS XMM1,dword ptr [RBP + -0xc]
MULSS XMM1,dword ptr [RBP + -0xc]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x1c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x1c]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JBE 0x001b8d93
MOVSS XMM0,dword ptr [RBP + -0x1c]
CALL 0x0010aa30
MOVSS dword ptr [RBP + -0x1c],XMM0
MOVSS XMM0,dword ptr [0x002a40f4]
MOVSS dword ptr [RBP + -0x20],XMM0
MOVSS XMM1,dword ptr [RBP + -0x1c]
MOVSS XMM0,dword ptr [RBP + -0x14]
UCOMISS XMM0,XMM1
JBE 0x001b8d59
MOVSS XMM0,dword ptr [RBP + -0x14]
DIVSS XMM0,dword ptr [RBP + -0x1c]
MOVSS dword ptr [RBP + -0x20],XMM0
JMP 0x001b8d75
LAB_001b8d59:
MOVSS XMM0,dword ptr [RBP + -0x1c]
UCOMISS XMM0,dword ptr [RBP + -0x18]
JBE 0x001b8d73
MOVSS XMM0,dword ptr [RBP + -0x18]
DIVSS XMM0,dword ptr [RBP + -0x1c]
MOVSS dword ptr [RBP + -0x20],XMM0
LAB_001b8d73:
JMP 0x001b8d75
LAB_001b8d75:
MOVSS XMM0,dword ptr [RBP + -0x10]
MULSS XMM0,dword ptr [RBP + -0x20]
MOVSS dword ptr [RBP + -0x8],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MULSS XMM0,dword ptr [RBP + -0x20]
MOVSS dword ptr [RBP + -0x4],XMM0
LAB_001b8d93:
MOVSD XMM0,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int8 Vector2ClampValue(int8 param_1,float param_2,float param_3)
{
float fVar1;
int4 local_28;
int4 local_18;
int4 uStack_14;
int8 local_10;
local_18 = (float)param_1;
uStack_14 = (float)((ulong)param_1 >> 0x20);
fVar1 = local_18 * local_18 + uStack_14 * uStack_14;
local_10 = param_1;
if (0.0 < fVar1) {
fVar1 = sqrtf(fVar1);
local_28 = DAT_002a40f4;
if (param_2 <= fVar1) {
if (param_3 < fVar1) {
local_28 = param_3 / fVar1;
}
}
else {
local_28 = param_2 / fVar1;
}
local_10 = CONCAT44(uStack_14 * local_28,local_18 * local_28);
}
return local_10;
}
|
|
62,184 |
Vector2ClampValue
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector2 Vector2ClampValue(Vector2 v, float min, float max)
{
Vector2 result = v;
float length = (v.x*v.x) + (v.y*v.y);
if (length > 0.0f)
{
length = sqrtf(length);
float scale = 1; // By default, 1 as the neutral element.
if (length < min)
{
scale = min/length;
}
else if (length > max)
{
scale = max/length;
}
result.x = v.x*scale;
result.y = v.y*scale;
}
return result;
}
|
O1
|
c
|
Vector2ClampValue:
movaps %xmm0, %xmm5
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3 # xmm3 = xmm3[1,1],xmm0[1,1]
movaps %xmm3, %xmm4
mulss %xmm3, %xmm4
mulss %xmm0, %xmm0
addss %xmm4, %xmm0
xorps %xmm4, %xmm4
ucomiss %xmm4, %xmm0
jbe 0x67c91
leaq -0x38(%rsp), %rsp
jb 0x67c30
sqrtss %xmm0, %xmm0
jmp 0x67c61
movaps %xmm5, 0x20(%rsp)
movaps %xmm3, 0x10(%rsp)
movss %xmm1, 0xc(%rsp)
movss %xmm2, 0x8(%rsp)
callq 0x99f0
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm1
movaps 0x10(%rsp), %xmm3
movaps 0x20(%rsp), %xmm5
ucomiss %xmm0, %xmm1
jbe 0x67c6c
divss %xmm0, %xmm1
jmp 0x67c82
ucomiss %xmm2, %xmm0
jbe 0x67c7a
divss %xmm0, %xmm2
movaps %xmm2, %xmm1
jmp 0x67c82
movss 0x71cc2(%rip), %xmm1 # 0xd9944
mulss %xmm1, %xmm5
mulss %xmm1, %xmm3
unpcklps %xmm3, %xmm5 # xmm5 = xmm5[0],xmm3[0],xmm5[1],xmm3[1]
addq $0x38, %rsp
movaps %xmm5, %xmm0
retq
|
Vector2ClampValue:
movaps xmm5, xmm0
movaps xmm3, xmm0
shufps xmm3, xmm0, 55h ; 'U'
movaps xmm4, xmm3
mulss xmm4, xmm3
mulss xmm0, xmm0
addss xmm0, xmm4
xorps xmm4, xmm4
ucomiss xmm0, xmm4
jbe short loc_67C91
lea rsp, [rsp-38h]
jb short loc_67C30
sqrtss xmm0, xmm0
jmp short loc_67C61
loc_67C30:
movaps [rsp+38h+var_18], xmm5
movaps [rsp+38h+var_28], xmm3
movss [rsp+38h+var_2C], xmm1
movss [rsp+38h+var_30], xmm2
call _sqrtf
movss xmm2, [rsp+38h+var_30]
movss xmm1, [rsp+38h+var_2C]
movaps xmm3, [rsp+38h+var_28]
movaps xmm5, [rsp+38h+var_18]
loc_67C61:
ucomiss xmm1, xmm0
jbe short loc_67C6C
divss xmm1, xmm0
jmp short loc_67C82
loc_67C6C:
ucomiss xmm0, xmm2
jbe short loc_67C7A
divss xmm2, xmm0
movaps xmm1, xmm2
jmp short loc_67C82
loc_67C7A:
movss xmm1, cs:dword_D9944
loc_67C82:
mulss xmm5, xmm1
mulss xmm3, xmm1
unpcklps xmm5, xmm3
add rsp, 38h
loc_67C91:
movaps xmm0, xmm5
retn
|
__m128 Vector2ClampValue(__m128 a1, float a2, float a3)
{
__m128 v3; // xmm5
__m128 v4; // xmm3
float v5; // xmm1_4
__m128 v7; // [rsp+18h] [rbp-18h]
v3 = a1;
v4 = _mm_shuffle_ps(a1, a1, 85);
a1.m128_f32[0] = (float)(a1.m128_f32[0] * a1.m128_f32[0]) + (float)(v4.m128_f32[0] * v4.m128_f32[0]);
if ( a1.m128_f32[0] > 0.0 )
{
if ( a1.m128_f32[0] < 0.0 )
{
v7 = v3;
*(double *)a1.m128_u64 = sqrtf(*(double *)a1.m128_u64);
v3 = v7;
}
else
{
a1.m128_f32[0] = fsqrt(a1.m128_f32[0]);
}
if ( a2 <= a1.m128_f32[0] )
{
if ( a1.m128_f32[0] <= a3 )
v5 = 1.0;
else
v5 = a3 / a1.m128_f32[0];
}
else
{
v5 = a2 / a1.m128_f32[0];
}
v3.m128_f32[0] = v3.m128_f32[0] * v5;
v4.m128_f32[0] = v4.m128_f32[0] * v5;
return _mm_unpacklo_ps(v3, v4);
}
return v3;
}
|
Vector2ClampValue:
MOVAPS XMM5,XMM0
MOVAPS XMM3,XMM0
SHUFPS XMM3,XMM0,0x55
MOVAPS XMM4,XMM3
MULSS XMM4,XMM3
MULSS XMM0,XMM0
ADDSS XMM0,XMM4
XORPS XMM4,XMM4
UCOMISS XMM0,XMM4
JBE 0x00167c91
LEA RSP,[RSP + -0x38]
JC 0x00167c30
SQRTSS XMM0,XMM0
JMP 0x00167c61
LAB_00167c30:
MOVAPS xmmword ptr [RSP + 0x20],XMM5
MOVAPS xmmword ptr [RSP + 0x10],XMM3
MOVSS dword ptr [RSP + 0xc],XMM1
MOVSS dword ptr [RSP + 0x8],XMM2
CALL 0x001099f0
MOVSS XMM2,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0xc]
MOVAPS XMM3,xmmword ptr [RSP + 0x10]
MOVAPS XMM5,xmmword ptr [RSP + 0x20]
LAB_00167c61:
UCOMISS XMM1,XMM0
JBE 0x00167c6c
DIVSS XMM1,XMM0
JMP 0x00167c82
LAB_00167c6c:
UCOMISS XMM0,XMM2
JBE 0x00167c7a
DIVSS XMM2,XMM0
MOVAPS XMM1,XMM2
JMP 0x00167c82
LAB_00167c7a:
MOVSS XMM1,dword ptr [0x001d9944]
LAB_00167c82:
MULSS XMM5,XMM1
MULSS XMM3,XMM1
UNPCKLPS XMM5,XMM3
ADD RSP,0x38
LAB_00167c91:
MOVAPS XMM0,XMM5
RET
|
int8 Vector2ClampValue(int8 param_1,float param_2,float param_3)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
fVar3 = (float)((ulong)param_1 >> 0x20);
fVar4 = (float)param_1;
fVar1 = fVar4 * fVar4 + fVar3 * fVar3;
if (0.0 < fVar1) {
if (fVar1 < 0.0) {
fVar1 = sqrtf(fVar1);
}
else {
fVar1 = SQRT(fVar1);
}
if (param_2 <= fVar1) {
fVar2 = DAT_001d9944;
if (param_3 < fVar1) {
fVar2 = param_3 / fVar1;
}
}
else {
fVar2 = param_2 / fVar1;
}
fVar4 = fVar4 * fVar2;
fVar3 = fVar3 * fVar2;
}
return CONCAT44(fVar3,fVar4);
}
|
|
62,185 |
Vector2ClampValue
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector2 Vector2ClampValue(Vector2 v, float min, float max)
{
Vector2 result = v;
float length = (v.x*v.x) + (v.y*v.y);
if (length > 0.0f)
{
length = sqrtf(length);
float scale = 1; // By default, 1 as the neutral element.
if (length < min)
{
scale = min/length;
}
else if (length > max)
{
scale = max/length;
}
result.x = v.x*scale;
result.y = v.y*scale;
}
return result;
}
|
O3
|
c
|
Vector2ClampValue:
movaps %xmm0, %xmm3
mulps %xmm0, %xmm3
shufps $0x55, %xmm3, %xmm3 # xmm3 = xmm3[1,1,1,1]
movaps %xmm0, %xmm4
mulss %xmm0, %xmm4
addss %xmm3, %xmm4
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm4
movaps %xmm0, %xmm3
jbe 0x6621e
xorps %xmm3, %xmm3
sqrtss %xmm4, %xmm3
ucomiss %xmm3, %xmm1
jbe 0x66201
divss %xmm3, %xmm1
movaps %xmm1, %xmm3
jmp 0x66217
ucomiss %xmm2, %xmm3
jbe 0x6620f
divss %xmm3, %xmm2
movaps %xmm2, %xmm3
jmp 0x66217
movss 0x6d905(%rip), %xmm3 # 0xd3b1c
shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0]
mulps %xmm0, %xmm3
movaps %xmm3, %xmm0
retq
|
Vector2ClampValue:
movaps xmm3, xmm0
mulps xmm3, xmm0
shufps xmm3, xmm3, 55h ; 'U'
movaps xmm4, xmm0
mulss xmm4, xmm0
addss xmm4, xmm3
xorps xmm3, xmm3
ucomiss xmm4, xmm3
movaps xmm3, xmm0
jbe short loc_6621E
xorps xmm3, xmm3
sqrtss xmm3, xmm4
ucomiss xmm1, xmm3
jbe short loc_66201
divss xmm1, xmm3
movaps xmm3, xmm1
jmp short loc_66217
loc_66201:
ucomiss xmm3, xmm2
jbe short loc_6620F
divss xmm2, xmm3
movaps xmm3, xmm2
jmp short loc_66217
loc_6620F:
movss xmm3, cs:dword_D3B1C
loc_66217:
shufps xmm3, xmm3, 0
mulps xmm3, xmm0
loc_6621E:
movaps xmm0, xmm3
retn
|
__m128 Vector2ClampValue(__m128 a1, __m128 a2, __m128 a3)
{
__m128 v3; // xmm3
float v4; // xmm4_4
__m128 v5; // xmm3
float v6; // xmm3_4
__m128 v7; // xmm3
v3 = _mm_mul_ps(a1, a1);
v4 = (float)(a1.m128_f32[0] * a1.m128_f32[0]) + _mm_shuffle_ps(v3, v3, 85).m128_f32[0];
v5 = a1;
if ( v4 > 0.0 )
{
v6 = fsqrt(v4);
if ( a2.m128_f32[0] <= v6 )
{
if ( v6 <= a3.m128_f32[0] )
{
v7 = (__m128)0x3F800000u;
}
else
{
a3.m128_f32[0] = a3.m128_f32[0] / v6;
v7 = a3;
}
}
else
{
a2.m128_f32[0] = a2.m128_f32[0] / v6;
v7 = a2;
}
return _mm_mul_ps(_mm_shuffle_ps(v7, v7, 0), a1);
}
return v5;
}
|
Vector2ClampValue:
MOVAPS XMM3,XMM0
MULPS XMM3,XMM0
SHUFPS XMM3,XMM3,0x55
MOVAPS XMM4,XMM0
MULSS XMM4,XMM0
ADDSS XMM4,XMM3
XORPS XMM3,XMM3
UCOMISS XMM4,XMM3
MOVAPS XMM3,XMM0
JBE 0x0016621e
XORPS XMM3,XMM3
SQRTSS XMM3,XMM4
UCOMISS XMM1,XMM3
JBE 0x00166201
DIVSS XMM1,XMM3
MOVAPS XMM3,XMM1
JMP 0x00166217
LAB_00166201:
UCOMISS XMM3,XMM2
JBE 0x0016620f
DIVSS XMM2,XMM3
MOVAPS XMM3,XMM2
JMP 0x00166217
LAB_0016620f:
MOVSS XMM3,dword ptr [0x001d3b1c]
LAB_00166217:
SHUFPS XMM3,XMM3,0x0
MULPS XMM3,XMM0
LAB_0016621e:
MOVAPS XMM0,XMM3
RET
|
int8 Vector2ClampValue(int8 param_1,float param_2,float param_3)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
fVar3 = (float)((ulong)param_1 >> 0x20);
fVar2 = (float)param_1;
fVar4 = fVar2 * fVar2 + fVar3 * fVar3;
if (0.0 < fVar4) {
fVar4 = SQRT(fVar4);
if (param_2 <= fVar4) {
fVar1 = DAT_001d3b1c;
if (param_3 < fVar4) {
fVar1 = param_3 / fVar4;
}
}
else {
fVar1 = param_2 / fVar4;
}
fVar2 = fVar1 * fVar2;
fVar3 = fVar1 * fVar3;
}
return CONCAT44(fVar3,fVar2);
}
|
|
62,186 |
google::protobuf::internal::ExtensionSet::Extension::Free()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc
|
void ExtensionSet::Extension::Free() {
if (is_repeated) {
switch (cpp_type(type)) {
#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \
case WireFormatLite::CPPTYPE_##UPPERCASE: \
delete repeated_##LOWERCASE##_value; \
break
HANDLE_TYPE(INT32, int32_t);
HANDLE_TYPE(INT64, int64_t);
HANDLE_TYPE(UINT32, uint32_t);
HANDLE_TYPE(UINT64, uint64_t);
HANDLE_TYPE(FLOAT, float);
HANDLE_TYPE(DOUBLE, double);
HANDLE_TYPE(BOOL, bool);
HANDLE_TYPE(ENUM, enum);
HANDLE_TYPE(STRING, string);
HANDLE_TYPE(MESSAGE, message);
#undef HANDLE_TYPE
}
} else {
switch (cpp_type(type)) {
case WireFormatLite::CPPTYPE_STRING:
delete string_value;
break;
case WireFormatLite::CPPTYPE_MESSAGE:
if (is_lazy) {
delete lazymessage_value;
} else {
delete message_value;
}
break;
default:
break;
}
}
}
|
O0
|
cpp
|
google::protobuf::internal::ExtensionSet::Extension::Free():
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x78(%rsp)
testb $0x1, 0x9(%rax)
je 0x3992dc
movq 0x78(%rsp), %rax
movzbl 0x8(%rax), %edi
callq 0x383920
decl %eax
movl %eax, %ecx
movq %rcx, 0x70(%rsp)
subl $0x9, %eax
ja 0x3992d7
movq 0x70(%rsp), %rax
leaq 0x703de(%rip), %rcx # 0x409500
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, %rax
je 0x399152
movq 0x68(%rsp), %rdi
callq 0x201ee0
movq 0x68(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
cmpq $0x0, %rax
je 0x39917e
movq 0x60(%rsp), %rdi
callq 0x207510
movq 0x60(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, %rax
je 0x3991aa
movq 0x58(%rsp), %rdi
callq 0x2049e0
movq 0x58(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
je 0x3991d6
movq 0x50(%rsp), %rdi
callq 0x20a040
movq 0x50(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
je 0x399202
movq 0x48(%rsp), %rdi
callq 0x20cb70
movq 0x48(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, %rax
je 0x39922e
movq 0x40(%rsp), %rdi
callq 0x20f700
movq 0x40(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x39925a
movq 0x38(%rsp), %rdi
callq 0x1ff250
movq 0x38(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x399283
movq 0x30(%rsp), %rdi
callq 0x201ee0
movq 0x30(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x3992ac
movq 0x28(%rsp), %rdi
callq 0x211770
movq 0x28(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x3992d5
movq 0x20(%rsp), %rdi
callq 0x306c90
movq 0x20(%rsp), %rdi
callq 0x21620
jmp 0x3992d7
jmp 0x39937e
movq 0x78(%rsp), %rax
movzbl 0x8(%rax), %edi
callq 0x383920
movl %eax, %ecx
movl %ecx, 0x1c(%rsp)
subl $0x9, %eax
je 0x399302
jmp 0x3992f7
movl 0x1c(%rsp), %eax
subl $0xa, %eax
je 0x39932b
jmp 0x39937a
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x399329
movq 0x10(%rsp), %rdi
callq 0x21cc8
movq 0x10(%rsp), %rdi
callq 0x21620
jmp 0x39937c
movq 0x78(%rsp), %rax
movb 0xa(%rax), %al
shrb $0x4, %al
testb $0x1, %al
je 0x39935a
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x399358
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x399378
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x399376
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x399378
jmp 0x39937c
jmp 0x39937c
jmp 0x39937e
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf8internal12ExtensionSet9Extension4FreeEv:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_10], rax
test byte ptr [rax+9], 1
jz loc_3992DC
mov rax, [rsp+88h+var_10]
movzx edi, byte ptr [rax+8]; this
call _ZN6google8protobuf8internal12_GLOBAL__N_18cpp_typeEh; google::protobuf::internal::`anonymous namespace'::cpp_type(uchar)
dec eax; switch 10 cases
mov ecx, eax
mov [rsp+88h+var_18], rcx
sub eax, 9
ja def_399129; jumptable 0000000000399129 default case
mov rax, [rsp+88h+var_18]
lea rcx, jpt_399129
movsxd rax, ds:(jpt_399129 - 409500h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_39912B:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 1
mov rax, [rax]
mov [rsp+88h+var_20], rax
cmp rax, 0
jz short loc_399152
mov rdi, [rsp+88h+var_20]
call _ZN6google8protobuf13RepeatedFieldIiED2Ev; google::protobuf::RepeatedField<int>::~RepeatedField()
mov rdi, [rsp+88h+var_20]; void *
call __ZdlPv; operator delete(void *)
loc_399152:
jmp def_399129; jumptable 0000000000399129 default case
loc_399157:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 2
mov rax, [rax]
mov [rsp+88h+var_28], rax
cmp rax, 0
jz short loc_39917E
mov rdi, [rsp+88h+var_28]
call _ZN6google8protobuf13RepeatedFieldIlED2Ev; google::protobuf::RepeatedField<long>::~RepeatedField()
mov rdi, [rsp+88h+var_28]; void *
call __ZdlPv; operator delete(void *)
loc_39917E:
jmp def_399129; jumptable 0000000000399129 default case
loc_399183:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 3
mov rax, [rax]
mov [rsp+88h+var_30], rax
cmp rax, 0
jz short loc_3991AA
mov rdi, [rsp+88h+var_30]
call _ZN6google8protobuf13RepeatedFieldIjED2Ev; google::protobuf::RepeatedField<uint>::~RepeatedField()
mov rdi, [rsp+88h+var_30]; void *
call __ZdlPv; operator delete(void *)
loc_3991AA:
jmp def_399129; jumptable 0000000000399129 default case
loc_3991AF:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 4
mov rax, [rax]
mov [rsp+88h+var_38], rax
cmp rax, 0
jz short loc_3991D6
mov rdi, [rsp+88h+var_38]
call _ZN6google8protobuf13RepeatedFieldImED2Ev; google::protobuf::RepeatedField<ulong>::~RepeatedField()
mov rdi, [rsp+88h+var_38]; void *
call __ZdlPv; operator delete(void *)
loc_3991D6:
jmp def_399129; jumptable 0000000000399129 default case
loc_3991DB:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 6
mov rax, [rax]
mov [rsp+88h+var_40], rax
cmp rax, 0
jz short loc_399202
mov rdi, [rsp+88h+var_40]
call _ZN6google8protobuf13RepeatedFieldIfED2Ev; google::protobuf::RepeatedField<float>::~RepeatedField()
mov rdi, [rsp+88h+var_40]; void *
call __ZdlPv; operator delete(void *)
loc_399202:
jmp def_399129; jumptable 0000000000399129 default case
loc_399207:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 5
mov rax, [rax]
mov [rsp+88h+var_48], rax
cmp rax, 0
jz short loc_39922E
mov rdi, [rsp+88h+var_48]
call _ZN6google8protobuf13RepeatedFieldIdED2Ev; google::protobuf::RepeatedField<double>::~RepeatedField()
mov rdi, [rsp+88h+var_48]; void *
call __ZdlPv; operator delete(void *)
loc_39922E:
jmp def_399129; jumptable 0000000000399129 default case
loc_399233:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 7
mov rax, [rax]
mov [rsp+88h+var_50], rax
cmp rax, 0
jz short loc_39925A
mov rdi, [rsp+88h+var_50]
call _ZN6google8protobuf13RepeatedFieldIbED2Ev; google::protobuf::RepeatedField<bool>::~RepeatedField()
mov rdi, [rsp+88h+var_50]; void *
call __ZdlPv; operator delete(void *)
loc_39925A:
jmp short def_399129; jumptable 0000000000399129 default case
loc_39925C:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 8
mov rax, [rax]
mov [rsp+88h+var_58], rax
cmp rax, 0
jz short loc_399283
mov rdi, [rsp+88h+var_58]
call _ZN6google8protobuf13RepeatedFieldIiED2Ev; google::protobuf::RepeatedField<int>::~RepeatedField()
mov rdi, [rsp+88h+var_58]; void *
call __ZdlPv; operator delete(void *)
loc_399283:
jmp short def_399129; jumptable 0000000000399129 default case
loc_399285:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 9
mov rax, [rax]
mov [rsp+88h+var_60], rax
cmp rax, 0
jz short loc_3992AC
mov rdi, [rsp+88h+var_60]
call _ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; google::protobuf::RepeatedPtrField<std::string>::~RepeatedPtrField()
mov rdi, [rsp+88h+var_60]; void *
call __ZdlPv; operator delete(void *)
loc_3992AC:
jmp short def_399129; jumptable 0000000000399129 default case
loc_3992AE:
mov rax, [rsp+88h+var_10]; jumptable 0000000000399129 case 10
mov rax, [rax]
mov [rsp+88h+var_68], rax
cmp rax, 0
jz short loc_3992D5
mov rdi, [rsp+88h+var_68]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_11MessageLiteEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::~RepeatedPtrField()
mov rdi, [rsp+88h+var_68]; void *
call __ZdlPv; operator delete(void *)
loc_3992D5:
jmp short $+2; jumptable 0000000000399129 default case
def_399129:
jmp loc_39937E; jumptable 0000000000399129 default case
loc_3992DC:
mov rax, [rsp+88h+var_10]
movzx edi, byte ptr [rax+8]; this
call _ZN6google8protobuf8internal12_GLOBAL__N_18cpp_typeEh; google::protobuf::internal::`anonymous namespace'::cpp_type(uchar)
mov ecx, eax
mov [rsp+88h+var_6C], ecx
sub eax, 9
jz short loc_399302
jmp short $+2
loc_3992F7:
mov eax, [rsp+88h+var_6C]
sub eax, 0Ah
jz short loc_39932B
jmp short loc_39937A
loc_399302:
mov rax, [rsp+88h+var_10]
mov rax, [rax]
mov [rsp+88h+var_78], rax
cmp rax, 0
jz short loc_399329
mov rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+88h+var_78]; void *
call __ZdlPv; operator delete(void *)
loc_399329:
jmp short loc_39937C
loc_39932B:
mov rax, [rsp+88h+var_10]
mov al, [rax+0Ah]
shr al, 4
test al, 1
jz short loc_39935A
mov rax, [rsp+88h+var_10]
mov rax, [rax]
mov [rsp+88h+var_80], rax
cmp rax, 0
jz short loc_399358
mov rdi, [rsp+88h+var_80]
mov rax, [rdi]
call qword ptr [rax+8]
loc_399358:
jmp short loc_399378
loc_39935A:
mov rax, [rsp+88h+var_10]
mov rax, [rax]
mov [rsp+88h+var_88], rax
cmp rax, 0
jz short loc_399376
mov rdi, [rsp+88h+var_88]
mov rax, [rdi]
call qword ptr [rax+8]
loc_399376:
jmp short $+2
loc_399378:
jmp short loc_39937C
loc_39937A:
jmp short $+2
loc_39937C:
jmp short $+2
loc_39937E:
add rsp, 88h
retn
|
void google::protobuf::internal::ExtensionSet::Extension::Free(
google::protobuf::internal::RepeatedPtrFieldBase **this,
unsigned __int8 a2)
{
google::protobuf::internal::RepeatedPtrFieldBase *v2; // [rsp+10h] [rbp-78h]
int v3; // [rsp+1Ch] [rbp-6Ch]
google::protobuf::internal::RepeatedPtrFieldBase *v4; // [rsp+20h] [rbp-68h]
google::protobuf::internal::RepeatedPtrFieldBase *v5; // [rsp+28h] [rbp-60h]
google::protobuf::internal::RepeatedPtrFieldBase *v6; // [rsp+30h] [rbp-58h]
google::protobuf::internal::RepeatedPtrFieldBase *v7; // [rsp+38h] [rbp-50h]
google::protobuf::internal::RepeatedPtrFieldBase *v8; // [rsp+40h] [rbp-48h]
google::protobuf::internal::RepeatedPtrFieldBase *v9; // [rsp+48h] [rbp-40h]
google::protobuf::internal::RepeatedPtrFieldBase *v10; // [rsp+50h] [rbp-38h]
google::protobuf::internal::RepeatedPtrFieldBase *v11; // [rsp+58h] [rbp-30h]
google::protobuf::internal::RepeatedPtrFieldBase *v12; // [rsp+60h] [rbp-28h]
google::protobuf::internal::RepeatedPtrFieldBase *v13; // [rsp+68h] [rbp-20h]
if ( (*((_BYTE *)this + 9) & 1) != 0 )
{
switch ( (unsigned int)google::protobuf::internal::`anonymous namespace'::cpp_type(
(google::protobuf::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + 8),
a2) )
{
case 1u:
v13 = *this;
if ( *this )
{
google::protobuf::RepeatedField<int>::~RepeatedField((long long)v13);
operator delete(v13);
}
break;
case 2u:
v12 = *this;
if ( *this )
{
google::protobuf::RepeatedField<long>::~RepeatedField((long long)v12);
operator delete(v12);
}
break;
case 3u:
v11 = *this;
if ( *this )
{
google::protobuf::RepeatedField<unsigned int>::~RepeatedField((long long)v11);
operator delete(v11);
}
break;
case 4u:
v10 = *this;
if ( *this )
{
google::protobuf::RepeatedField<unsigned long>::~RepeatedField((long long)v10);
operator delete(v10);
}
break;
case 5u:
v8 = *this;
if ( *this )
{
google::protobuf::RepeatedField<double>::~RepeatedField((long long)v8);
operator delete(v8);
}
break;
case 6u:
v9 = *this;
if ( *this )
{
google::protobuf::RepeatedField<float>::~RepeatedField((long long)v9);
operator delete(v9);
}
break;
case 7u:
v7 = *this;
if ( *this )
{
google::protobuf::RepeatedField<bool>::~RepeatedField((long long)v7);
operator delete(v7);
}
break;
case 8u:
v6 = *this;
if ( *this )
{
google::protobuf::RepeatedField<int>::~RepeatedField((long long)v6);
operator delete(v6);
}
break;
case 9u:
v5 = *this;
if ( *this )
{
google::protobuf::RepeatedPtrField<std::string>::~RepeatedPtrField(v5);
operator delete(v5);
}
break;
case 0xAu:
v4 = *this;
if ( *this )
{
google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::~RepeatedPtrField(v4);
operator delete(v4);
}
break;
default:
return;
}
}
else
{
v3 = google::protobuf::internal::`anonymous namespace'::cpp_type(
(google::protobuf::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + 8),
a2);
if ( v3 == 9 )
{
v2 = *this;
if ( *this )
{
std::string::~string(v2);
operator delete(v2);
}
}
else if ( v3 == 10 )
{
if ( (*((_BYTE *)this + 10) & 0x10) != 0 )
{
if ( *this )
(*(void ( **)(google::protobuf::internal::RepeatedPtrFieldBase *))(*(_QWORD *)*this + 8LL))(*this);
}
else if ( *this )
{
(*(void ( **)(google::protobuf::internal::RepeatedPtrFieldBase *))(*(_QWORD *)*this + 8LL))(*this);
}
}
}
}
|
allocator:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x003990f0
POP RAX
RET
|
/* std::allocator<std::_Rb_tree_node<std::pair<std::vector<int, std::allocator<int> > const,
std::vector<int, std::allocator<int> > > > >::allocator() */
allocator<std::_Rb_tree_node<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>>
* __thiscall
std::
allocator<std::_Rb_tree_node<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>>
::allocator(allocator<std::_Rb_tree_node<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>>
*this)
{
__gnu_cxx::
new_allocator<std::_Rb_tree_node<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>>
::new_allocator();
return this;
}
|
|
62,187 |
pcmp
|
eloqsql/strings/ctype-simple.c
|
static int pcmp(const void * f, const void * s)
{
const uni_idx *F= (const uni_idx*) f;
const uni_idx *S= (const uni_idx*) s;
int res;
if (!(res=((S->nchars)-(F->nchars))))
res=((F->uidx.from)-(S->uidx.to));
return res;
}
|
O0
|
c
|
pcmp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x46a65
movq -0x18(%rbp), %rax
movzwl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
|
pcmp:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax]
mov rcx, [rbp+var_18]
sub eax, [rcx]
mov [rbp+var_24], eax
cmp eax, 0
jnz short loc_46A65
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+8]
mov rcx, [rbp+var_20]
movzx ecx, word ptr [rcx+0Ah]
sub eax, ecx
mov [rbp+var_24], eax
loc_46A65:
mov eax, [rbp+var_24]
pop rbp
retn
|
long long pcmp(long long a1, long long a2)
{
unsigned int v3; // [rsp+0h] [rbp-24h]
v3 = *(_DWORD *)a2 - *(_DWORD *)a1;
if ( !v3 )
return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10);
return v3;
}
|
pcmp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
SUB EAX,dword ptr [RCX]
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JNZ 0x00146a65
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RCX + 0xa]
SUB EAX,ECX
MOV dword ptr [RBP + -0x24],EAX
LAB_00146a65:
MOV EAX,dword ptr [RBP + -0x24]
POP RBP
RET
|
int pcmp(int *param_1,int *param_2)
{
int local_2c;
local_2c = *param_2 - *param_1;
if (local_2c == 0) {
local_2c = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10);
}
return local_2c;
}
|
|
62,188 |
pcmp
|
eloqsql/strings/ctype-simple.c
|
static int pcmp(const void * f, const void * s)
{
const uni_idx *F= (const uni_idx*) f;
const uni_idx *S= (const uni_idx*) s;
int res;
if (!(res=((S->nchars)-(F->nchars))))
res=((F->uidx.from)-(S->uidx.to));
return res;
}
|
O3
|
c
|
pcmp:
pushq %rbp
movq %rsp, %rbp
movl (%rsi), %eax
subl (%rdi), %eax
jne 0x39e09
movzwl 0x8(%rdi), %eax
movzwl 0xa(%rsi), %ecx
subl %ecx, %eax
popq %rbp
retq
nop
|
pcmp:
push rbp
mov rbp, rsp
mov eax, [rsi]
sub eax, [rdi]
jnz short loc_39E09
movzx eax, word ptr [rdi+8]
movzx ecx, word ptr [rsi+0Ah]
sub eax, ecx
loc_39E09:
pop rbp
retn
|
long long pcmp(long long a1, long long a2)
{
long long result; // rax
result = (unsigned int)(*(_DWORD *)a2 - *(_DWORD *)a1);
if ( *(_DWORD *)a2 == *(_DWORD *)a1 )
return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10);
return result;
}
|
pcmp:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RSI]
SUB EAX,dword ptr [RDI]
JNZ 0x00139e09
MOVZX EAX,word ptr [RDI + 0x8]
MOVZX ECX,word ptr [RSI + 0xa]
SUB EAX,ECX
LAB_00139e09:
POP RBP
RET
|
int pcmp(int *param_1,int *param_2)
{
int iVar1;
iVar1 = *param_2 - *param_1;
if (iVar1 == 0) {
iVar1 = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10);
}
return iVar1;
}
|
|
62,189 |
Settings::setHeight(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
std::string Settings::setHeight(const std::string& N) {
std::lock_guard<std::mutex> lock(settings_mutex);
std::regex valid_number_regex("^\\d+$");
if (!std::regex_match(N, valid_number_regex)) {
return "failed";
}
uint64_t value = std::stoull(N);
height = value;
return "ok";
}
|
O1
|
cpp
|
Settings::setHeight(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 $0x48, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5500
testl %eax, %eax
jne 0x66d1
leaq 0x13c6d(%rip), %rsi # 0x1a23f
leaq 0x28(%rsp), %rdi
movl $0x10, %edx
callq 0x7400
movq (%r15), %rdi
movq 0x8(%r15), %rsi
addq %rdi, %rsi
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x28(%rsp), %rcx
xorl %r8d, %r8d
callq 0x12c11
movl %eax, %ebp
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x661d
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x5380
testb %bpl, %bpl
je 0x666a
movq (%r15), %r12
callq 0x5050
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x5460
cmpq %r12, (%r13)
je 0x66d8
movl (%r15), %ecx
testl %ecx, %ecx
je 0x6689
cmpl $0x22, %ecx
jne 0x668c
leaq 0x13e2f(%rip), %rdi # 0x1a494
callq 0x54e0
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x13bc0(%rip), %rsi # 0x1a238
leaq 0x13bbf(%rip), %rdx # 0x1a23e
movq %r14, %rdi
callq 0x6106
jmp 0x66ad
movl %ebp, (%r15)
movq %rax, 0x50(%rbx)
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x13b97(%rip), %rsi # 0x1a235
leaq 0x13b92(%rip), %rdx # 0x1a237
movq %r14, %rdi
callq 0x6106
leaq 0x28(%rsp), %rdi
callq 0x7468
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x5260
leaq 0x13db5(%rip), %rdi # 0x1a494
callq 0x5200
jmp 0x66e6
movq %rax, %r14
jmp 0x6712
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x6712
movl %ebp, (%r15)
jmp 0x6712
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6712
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x5380
leaq 0x28(%rsp), %rdi
callq 0x7468
jmp 0x6721
movq %rax, %r14
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rdi
callq 0x55e0
nop
|
_ZN8Settings9setHeightERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rdi, rsi
call _pthread_mutex_lock
test eax, eax
jnz loc_66D1
lea rsi, aD; "^\\d+$"
lea rdi, [rsp+78h+var_50]
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
mov rdi, [r15]
mov rsi, [r15+8]
add rsi, rdi
xorps xmm0, xmm0
mov rdx, rsp
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rcx, [rsp+78h+var_50]
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb1EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
mov ebp, eax
mov rdi, [rsp+78h+var_78]; void *
test rdi, rdi
jz short loc_661D
mov rsi, [rsp+78h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_661D:
test bpl, bpl
jz short loc_666A
mov r12, [r15]
call ___errno_location
mov r15, rax
mov ebp, [rax]
mov dword ptr [rax], 0
mov r13, rsp
mov rdi, r12
mov rsi, r13
mov edx, 0Ah
call _strtoull
cmp [r13+0], r12
jz loc_66D8
mov ecx, [r15]
test ecx, ecx
jz short loc_6689
cmp ecx, 22h ; '"'
jnz short loc_668C
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_666A:
lea rax, [r14+10h]
mov [r14], rax
lea rsi, aFailed; "failed"
lea rdx, aFailed+6; ""
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)
jmp short loc_66AD
loc_6689:
mov [r15], ebp
loc_668C:
mov [rbx+50h], rax
lea rax, [r14+10h]
mov [r14], rax
lea rsi, aOk; "ok"
lea rdx, aOk+2; ""
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)
loc_66AD:
lea rdi, [rsp+78h+var_50]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rdi, rbx
call _pthread_mutex_unlock
mov rax, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_66D1:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_66D8:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
jmp short $+2
loc_66E6:
mov r14, rax
jmp short loc_6712
mov r14, rax
cmp dword ptr [r15], 0
jnz short loc_6712
mov [r15], ebp
jmp short loc_6712
mov r14, rax
mov rdi, [rsp+78h+var_78]; void *
test rdi, rdi
jz short loc_6712
mov rsi, [rsp+78h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6712:
lea rdi, [rsp+78h+var_50]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
jmp short loc_6721
mov r14, rax
loc_6721:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
_QWORD * Settings::setHeight(_QWORD *a1, long long a2, long long *a3)
{
int v6; // eax
long long v7; // rdi
long long v8; // rsi
char v9; // bp
long long v10; // r12
int *v11; // r15
int v12; // ebp
long long v13; // rax
long long v15; // r14
__int128 v16; // [rsp+0h] [rbp-78h] BYREF
__int128 v17; // [rsp+10h] [rbp-68h]
_BYTE v18[80]; // [rsp+28h] [rbp-50h] BYREF
v6 = pthread_mutex_lock(a2);
if ( v6 )
std::__throw_system_error(v6);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v18, "^\\d+$", 16LL);
v7 = *a3;
v8 = *a3 + a3[1];
v17 = 0LL;
v16 = 0LL;
v9 = std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(
v7,
v8,
&v16,
v18,
0LL);
if ( (_QWORD)v16 )
operator delete((void *)v16, v17 - v16);
if ( v9 )
{
v10 = *a3;
v11 = (int *)__errno_location();
v12 = *v11;
*v11 = 0;
v13 = strtoull(v10, &v16, 10LL);
if ( (_QWORD)v16 == v10 )
{
v15 = std::__throw_invalid_argument("stoull");
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v18);
pthread_mutex_unlock(a2);
_Unwind_Resume(v15);
}
if ( *v11 )
{
if ( *v11 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v11 = v12;
}
*(_QWORD *)(a2 + 80) = v13;
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "ok", (long long)"");
}
else
{
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "failed", (long long)"");
}
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v18);
pthread_mutex_unlock(a2);
return a1;
}
|
setHeight:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x001066d1
LAB_001065cb:
LEA RSI,[0x11a23f]
LEA RDI,[RSP + 0x28]
MOV EDX,0x10
CALL 0x00107400
MOV RDI,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,RDI
XORPS XMM0,XMM0
MOV RDX,RSP
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_001065f8:
LEA RCX,[RSP + 0x28]
XOR R8D,R8D
CALL 0x00112c11
MOV EBP,EAX
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x0010661d
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,RDI
CALL 0x00105380
LAB_0010661d:
TEST BPL,BPL
JZ 0x0010666a
MOV R12,qword ptr [R15]
CALL 0x00105050
MOV R15,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV R13,RSP
MOV RDI,R12
MOV RSI,R13
MOV EDX,0xa
CALL 0x00105460
CMP qword ptr [R13],R12
JZ 0x001066d8
MOV ECX,dword ptr [R15]
TEST ECX,ECX
JZ 0x00106689
CMP ECX,0x22
JNZ 0x0010668c
LAB_0010665e:
LEA RDI,[0x11a494]
CALL 0x001054e0
LAB_0010666a:
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LAB_00106671:
LEA RSI,[0x11a238]
LEA RDX,[0x11a23e]
MOV RDI,R14
CALL 0x00106106
JMP 0x001066ad
LAB_00106689:
MOV dword ptr [R15],EBP
LAB_0010668c:
MOV qword ptr [RBX + 0x50],RAX
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LAB_00106697:
LEA RSI,[0x11a235]
LEA RDX,[0x11a237]
MOV RDI,R14
CALL 0x00106106
LAB_001066ad:
LEA RDI,[RSP + 0x28]
CALL 0x00107468
MOV RDI,RBX
CALL 0x001052d0
MOV RAX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001066d1:
MOV EDI,EAX
CALL 0x00105260
LAB_001066d8:
LEA RDI,[0x11a494]
CALL 0x00105200
LAB_001066e4:
JMP 0x001066e6
LAB_001066e6:
MOV R14,RAX
JMP 0x00106712
LAB_00106712:
LEA RDI,[RSP + 0x28]
CALL 0x00107468
JMP 0x00106721
LAB_00106721:
MOV RDI,RBX
CALL 0x001052d0
MOV RDI,R14
CALL 0x001055e0
|
/* Settings::setHeight(std::__cxx11::string const&) */
string * Settings::setHeight(string *param_1)
{
char *__nptr;
bool bVar1;
int iVar2;
int *piVar3;
ulonglong uVar4;
int8 uVar5;
long *in_RDX;
pthread_mutex_t *in_RSI;
char *local_78;
int8 uStack_70;
long local_68;
int8 uStack_60;
basic_regex<char,std::__cxx11::regex_traits<char>> local_50 [32];
iVar2 = pthread_mutex_lock(in_RSI);
if (iVar2 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
/* try { // try from 001065cb to 001065e0 has its CatchHandler @ 0010671e */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
(local_50,"^\\d+$",0x10);
local_68 = 0;
uStack_60 = 0;
local_78 = (char *)0x0;
uStack_70 = 0;
/* try { // try from 001065f8 to 00106604 has its CatchHandler @ 001066f9 */
bVar1 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>
(*in_RDX,in_RDX[1] + *in_RDX,&local_78,local_50,0);
if (local_78 != (char *)0x0) {
operator_delete(local_78,local_68 - (long)local_78);
}
if (bVar1) {
__nptr = (char *)*in_RDX;
piVar3 = __errno_location();
iVar2 = *piVar3;
*piVar3 = 0;
uVar4 = strtoull(__nptr,&local_78,10);
if (local_78 == __nptr) {
/* try { // try from 001066d8 to 001066e3 has its CatchHandler @ 001066eb */
uVar5 = std::__throw_invalid_argument("stoull");
/* catch() { ... } // from try @ 00106697 with catch @ 001066e4 */
/* catch() { ... } // from try @ 00106671 with catch @ 001066e6 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_50);
pthread_mutex_unlock(in_RSI);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar5);
}
if (*piVar3 == 0) {
*piVar3 = iVar2;
}
else if (*piVar3 == 0x22) {
/* try { // try from 0010665e to 00106669 has its CatchHandler @ 001066eb */
std::__throw_out_of_range("stoull");
goto LAB_0010666a;
}
in_RSI[2].__align = uVar4;
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 00106697 to 001066ac has its CatchHandler @ 001066e4 */
std::__cxx11::string::_M_construct<char_const*>(param_1,&DAT_0011a235,&DAT_0011a237);
}
else {
LAB_0010666a:
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 00106671 to 00106686 has its CatchHandler @ 001066e6 */
std::__cxx11::string::_M_construct<char_const*>(param_1,"failed","");
}
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_50);
pthread_mutex_unlock(in_RSI);
return param_1;
}
|
|
62,190 |
Settings::setHeight(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
std::string Settings::setHeight(const std::string& N) {
std::lock_guard<std::mutex> lock(settings_mutex);
std::regex valid_number_regex("^\\d+$");
if (!std::regex_match(N, valid_number_regex)) {
return "failed";
}
uint64_t value = std::stoull(N);
height = value;
return "ok";
}
|
O2
|
cpp
|
Settings::setHeight(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x6e34
leaq 0x11102(%rip), %rsi # 0x1723f
leaq 0x10(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x6b8c
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x6bf2
testb %al, %al
je 0x6184
pushq $0xa
popq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x6c09
movq %rax, 0x50(%rbx)
leaq 0x110c0(%rip), %rsi # 0x17235
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x6b2a
jmp 0x6198
leaq 0x110ad(%rip), %rsi # 0x17238
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x6b2a
leaq 0x10(%rsp), %rdi
callq 0x6c26
movq %rbx, %rdi
callq 0x52c0
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x61bd
jmp 0x61bd
jmp 0x61bd
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6c26
jmp 0x61cf
movq %rax, %r14
movq %rbx, %rdi
callq 0x52c0
movq %r14, %rdi
callq 0x5590
nop
|
_ZN8Settings9setHeightERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 30h
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rdi, rsi; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
lea rsi, aD; "^\\d+$"
lea rdi, [rsp+48h+var_38]
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rsi, [rsp+48h+var_38]
mov rdi, r15
xor edx, edx
call _ZSt11regex_matchISt11char_traitsIcESaIcEcNSt7__cxx1112regex_traitsIcEEEbRKNS3_12basic_stringIT1_T_T0_EERKNS3_11basic_regexIS7_T2_EENSt15regex_constants15match_flag_typeE; std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, al
jz short loc_6184
push 0Ah
pop rdx
mov rdi, r15
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov [rbx+50h], rax
lea rsi, aOk; "ok"
lea rdx, [rsp+48h+var_39]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short loc_6198
loc_6184:
lea rsi, aFailed; "failed"
lea rdx, [rsp+48h+var_39]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
loc_6198:
lea rdi, [rsp+48h+var_38]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rdi, rbx
call _pthread_mutex_unlock
mov rax, r14
add rsp, 30h
pop rbx
pop r14
pop r15
retn
jmp short loc_61BD
jmp short loc_61BD
jmp short $+2
loc_61BD:
mov r14, rax
lea rdi, [rsp+arg_8]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
jmp short loc_61CF
mov r14, rax
loc_61CF:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
long long Settings::setHeight(long long a1, std::mutex *a2, long long a3)
{
char v5; // [rsp+Fh] [rbp-39h] BYREF
_BYTE v6[56]; // [rsp+10h] [rbp-38h] BYREF
std::mutex::lock(a2);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v6, "^\\d+$", 16LL);
if ( (unsigned __int8)std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(
a3,
v6,
0LL) )
{
*((_QWORD *)a2 + 10) = std::stoull(a3, 0LL, 10LL);
std::string::basic_string<std::allocator<char>>(a1, "ok", &v5);
}
else
{
std::string::basic_string<std::allocator<char>>(a1, "failed", &v5);
}
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v6);
pthread_mutex_unlock(a2);
return a1;
}
|
setHeight:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00106e34
LAB_00106136:
LEA RSI,[0x11723f]
LEA RDI,[RSP + 0x10]
PUSH 0x10
POP RDX
CALL 0x00106b8c
LAB_0010614a:
LEA RSI,[RSP + 0x10]
MOV RDI,R15
XOR EDX,EDX
CALL 0x00106bf2
TEST AL,AL
JZ 0x00106184
LAB_0010615d:
PUSH 0xa
POP RDX
MOV RDI,R15
XOR ESI,ESI
CALL 0x00106c09
MOV qword ptr [RBX + 0x50],RAX
LAB_0010616e:
LEA RSI,[0x117235]
LEA RDX,[RSP + 0xf]
MOV RDI,R14
CALL 0x00106b2a
JMP 0x00106198
LAB_00106184:
LEA RSI,[0x117238]
LEA RDX,[RSP + 0xf]
MOV RDI,R14
CALL 0x00106b2a
LAB_00106198:
LEA RDI,[RSP + 0x10]
CALL 0x00106c26
MOV RDI,RBX
CALL 0x001052c0
MOV RAX,R14
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* Settings::setHeight(std::__cxx11::string const&) */
string * Settings::setHeight(string *param_1)
{
bool bVar1;
long lVar2;
string *in_RDX;
pthread_mutex_t *in_RSI;
allocator local_39;
basic_regex<char,std::__cxx11::regex_traits<char>> local_38 [32];
std::mutex::lock();
/* try { // try from 00106136 to 00106149 has its CatchHandler @ 001061cc */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
(local_38,"^\\d+$",0x10);
/* try { // try from 0010614a to 00106158 has its CatchHandler @ 001061bd */
bVar1 = std::
regex_match<std::char_traits<char>,std::allocator<char>,char,std::__cxx11::regex_traits<char>>
();
if (bVar1) {
/* try { // try from 0010615d to 00106169 has its CatchHandler @ 001061bb */
lVar2 = std::__cxx11::stoull(in_RDX,(ulong *)0x0,10);
in_RSI[2].__align = lVar2;
/* try { // try from 0010616e to 00106181 has its CatchHandler @ 001061b7 */
std::__cxx11::string::string<std::allocator<char>>(param_1,"ok",&local_39);
}
else {
/* try { // try from 00106184 to 00106197 has its CatchHandler @ 001061b9 */
std::__cxx11::string::string<std::allocator<char>>(param_1,"failed",&local_39);
}
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_38);
pthread_mutex_unlock(in_RSI);
return param_1;
}
|
|
62,191 |
Settings::setHeight(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
std::string Settings::setHeight(const std::string& N) {
std::lock_guard<std::mutex> lock(settings_mutex);
std::regex valid_number_regex("^\\d+$");
if (!std::regex_match(N, valid_number_regex)) {
return "failed";
}
uint64_t value = std::stoull(N);
height = value;
return "ok";
}
|
O3
|
cpp
|
Settings::setHeight(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 $0x48, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5500
testl %eax, %eax
jne 0x6685
leaq 0x13cb9(%rip), %rsi # 0x1a23f
leaq 0x28(%rsp), %rdi
movl $0x10, %edx
callq 0x73ac
movq (%r15), %rdi
movq 0x8(%r15), %rsi
addq %rdi, %rsi
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x28(%rsp), %rcx
xorl %r8d, %r8d
callq 0x12bd3
movl %eax, %ebp
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x65d1
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x5380
testb %bpl, %bpl
je 0x661e
movq (%r15), %r12
callq 0x5050
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x5460
cmpq %r12, (%r13)
je 0x668c
movl (%r15), %ecx
testl %ecx, %ecx
je 0x663d
cmpl $0x22, %ecx
jne 0x6640
leaq 0x13e7b(%rip), %rdi # 0x1a494
callq 0x54e0
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x13c0c(%rip), %rsi # 0x1a238
leaq 0x13c0b(%rip), %rdx # 0x1a23e
movq %r14, %rdi
callq 0x60b6
jmp 0x6661
movl %ebp, (%r15)
movq %rax, 0x50(%rbx)
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x13be3(%rip), %rsi # 0x1a235
leaq 0x13bde(%rip), %rdx # 0x1a237
movq %r14, %rdi
callq 0x60b6
leaq 0x28(%rsp), %rdi
callq 0x7414
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x5260
leaq 0x13e01(%rip), %rdi # 0x1a494
callq 0x5200
jmp 0x669a
movq %rax, %r14
jmp 0x66c6
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x66c6
movl %ebp, (%r15)
jmp 0x66c6
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x66c6
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x5380
leaq 0x28(%rsp), %rdi
callq 0x7414
jmp 0x66d5
movq %rax, %r14
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rdi
callq 0x55e0
nop
|
_ZN8Settings9setHeightERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rdi, rsi
call _pthread_mutex_lock
test eax, eax
jnz loc_6685
lea rsi, aD; "^\\d+$"
lea rdi, [rsp+78h+var_50]
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
mov rdi, [r15]
mov rsi, [r15+8]
add rsi, rdi
xorps xmm0, xmm0
mov rdx, rsp
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rcx, [rsp+78h+var_50]
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb1EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
mov ebp, eax
mov rdi, [rsp+78h+var_78]; void *
test rdi, rdi
jz short loc_65D1
mov rsi, [rsp+78h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65D1:
test bpl, bpl
jz short loc_661E
mov r12, [r15]
call ___errno_location
mov r15, rax
mov ebp, [rax]
mov dword ptr [rax], 0
mov r13, rsp
mov rdi, r12
mov rsi, r13
mov edx, 0Ah
call _strtoull
cmp [r13+0], r12
jz loc_668C
mov ecx, [r15]
test ecx, ecx
jz short loc_663D
cmp ecx, 22h ; '"'
jnz short loc_6640
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_661E:
lea rax, [r14+10h]
mov [r14], rax
lea rsi, aFailed; "failed"
lea rdx, aFailed+6; ""
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)
jmp short loc_6661
loc_663D:
mov [r15], ebp
loc_6640:
mov [rbx+50h], rax
lea rax, [r14+10h]
mov [r14], rax
lea rsi, aOk; "ok"
lea rdx, aOk+2; ""
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)
loc_6661:
lea rdi, [rsp+78h+var_50]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rdi, rbx
call _pthread_mutex_unlock
mov rax, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6685:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_668C:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
jmp short $+2
loc_669A:
mov r14, rax
jmp short loc_66C6
mov r14, rax
cmp dword ptr [r15], 0
jnz short loc_66C6
mov [r15], ebp
jmp short loc_66C6
mov r14, rax
mov rdi, [rsp+78h+var_78]; void *
test rdi, rdi
jz short loc_66C6
mov rsi, [rsp+78h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_66C6:
lea rdi, [rsp+78h+var_50]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
jmp short loc_66D5
mov r14, rax
loc_66D5:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
_QWORD * Settings::setHeight(_QWORD *a1, long long a2, long long *a3)
{
int v6; // eax
long long v7; // rdi
long long v8; // rsi
char v9; // bp
long long v10; // r12
int *v11; // r15
int v12; // ebp
long long v13; // rax
long long v15; // r14
__int128 v16; // [rsp+0h] [rbp-78h] BYREF
__int128 v17; // [rsp+10h] [rbp-68h]
_BYTE v18[80]; // [rsp+28h] [rbp-50h] BYREF
v6 = pthread_mutex_lock(a2);
if ( v6 )
std::__throw_system_error(v6);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v18, "^\\d+$", 16LL);
v7 = *a3;
v8 = *a3 + a3[1];
v17 = 0LL;
v16 = 0LL;
v9 = std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(
v7,
v8,
&v16,
v18,
0LL);
if ( (_QWORD)v16 )
operator delete((void *)v16, v17 - v16);
if ( v9 )
{
v10 = *a3;
v11 = (int *)__errno_location();
v12 = *v11;
*v11 = 0;
v13 = strtoull(v10, &v16, 10LL);
if ( (_QWORD)v16 == v10 )
{
v15 = std::__throw_invalid_argument("stoull");
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v18);
pthread_mutex_unlock(a2);
_Unwind_Resume(v15);
}
if ( *v11 )
{
if ( *v11 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v11 = v12;
}
*(_QWORD *)(a2 + 80) = v13;
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "ok", (long long)"");
}
else
{
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "failed", (long long)"");
}
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v18);
pthread_mutex_unlock(a2);
return a1;
}
|
setHeight:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x00106685
LAB_0010657f:
LEA RSI,[0x11a23f]
LEA RDI,[RSP + 0x28]
MOV EDX,0x10
CALL 0x001073ac
MOV RDI,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,RDI
XORPS XMM0,XMM0
MOV RDX,RSP
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_001065ac:
LEA RCX,[RSP + 0x28]
XOR R8D,R8D
CALL 0x00112bd3
MOV EBP,EAX
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x001065d1
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,RDI
CALL 0x00105380
LAB_001065d1:
TEST BPL,BPL
JZ 0x0010661e
MOV R12,qword ptr [R15]
CALL 0x00105050
MOV R15,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV R13,RSP
MOV RDI,R12
MOV RSI,R13
MOV EDX,0xa
CALL 0x00105460
CMP qword ptr [R13],R12
JZ 0x0010668c
MOV ECX,dword ptr [R15]
TEST ECX,ECX
JZ 0x0010663d
CMP ECX,0x22
JNZ 0x00106640
LAB_00106612:
LEA RDI,[0x11a494]
CALL 0x001054e0
LAB_0010661e:
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LAB_00106625:
LEA RSI,[0x11a238]
LEA RDX,[0x11a23e]
MOV RDI,R14
CALL 0x001060b6
JMP 0x00106661
LAB_0010663d:
MOV dword ptr [R15],EBP
LAB_00106640:
MOV qword ptr [RBX + 0x50],RAX
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LAB_0010664b:
LEA RSI,[0x11a235]
LEA RDX,[0x11a237]
MOV RDI,R14
CALL 0x001060b6
LAB_00106661:
LEA RDI,[RSP + 0x28]
CALL 0x00107414
MOV RDI,RBX
CALL 0x001052d0
MOV RAX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00106685:
MOV EDI,EAX
CALL 0x00105260
LAB_0010668c:
LEA RDI,[0x11a494]
CALL 0x00105200
LAB_00106698:
JMP 0x0010669a
LAB_0010669a:
MOV R14,RAX
JMP 0x001066c6
LAB_001066c6:
LEA RDI,[RSP + 0x28]
CALL 0x00107414
JMP 0x001066d5
LAB_001066d5:
MOV RDI,RBX
CALL 0x001052d0
MOV RDI,R14
CALL 0x001055e0
|
/* Settings::setHeight(std::__cxx11::string const&) */
string * Settings::setHeight(string *param_1)
{
char *__nptr;
bool bVar1;
int iVar2;
int *piVar3;
ulonglong uVar4;
int8 uVar5;
long *in_RDX;
pthread_mutex_t *in_RSI;
char *local_78;
int8 uStack_70;
long local_68;
int8 uStack_60;
basic_regex<char,std::__cxx11::regex_traits<char>> local_50 [32];
iVar2 = pthread_mutex_lock(in_RSI);
if (iVar2 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
/* try { // try from 0010657f to 00106594 has its CatchHandler @ 001066d2 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
(local_50,"^\\d+$",0x10);
local_68 = 0;
uStack_60 = 0;
local_78 = (char *)0x0;
uStack_70 = 0;
/* try { // try from 001065ac to 001065b8 has its CatchHandler @ 001066ad */
bVar1 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>
(*in_RDX,in_RDX[1] + *in_RDX,&local_78,local_50,0);
if (local_78 != (char *)0x0) {
operator_delete(local_78,local_68 - (long)local_78);
}
if (bVar1) {
__nptr = (char *)*in_RDX;
piVar3 = __errno_location();
iVar2 = *piVar3;
*piVar3 = 0;
uVar4 = strtoull(__nptr,&local_78,10);
if (local_78 == __nptr) {
/* try { // try from 0010668c to 00106697 has its CatchHandler @ 0010669f */
uVar5 = std::__throw_invalid_argument("stoull");
/* catch() { ... } // from try @ 0010664b with catch @ 00106698 */
/* catch() { ... } // from try @ 00106625 with catch @ 0010669a */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_50);
pthread_mutex_unlock(in_RSI);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar5);
}
if (*piVar3 == 0) {
*piVar3 = iVar2;
}
else if (*piVar3 == 0x22) {
/* try { // try from 00106612 to 0010661d has its CatchHandler @ 0010669f */
std::__throw_out_of_range("stoull");
goto LAB_0010661e;
}
in_RSI[2].__align = uVar4;
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 0010664b to 00106660 has its CatchHandler @ 00106698 */
std::__cxx11::string::_M_construct<char_const*>(param_1,&DAT_0011a235,&DAT_0011a237);
}
else {
LAB_0010661e:
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 00106625 to 0010663a has its CatchHandler @ 0010669a */
std::__cxx11::string::_M_construct<char_const*>(param_1,"failed","");
}
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_50);
pthread_mutex_unlock(in_RSI);
return param_1;
}
|
|
62,192 |
session::invalidate()
|
untodesu[P]voxelius/game/client/session.cc
|
void session::invalidate(void)
{
if(session::peer) {
enet_peer_reset(session::peer);
message_box::reset();
message_box::set_title("disconnected.disconnected");
message_box::set_subtitle("enet.peer_connection_timeout");
message_box::add_button("disconnected.back", [](void) {
globals::gui_screen = GUI_PLAY_MENU;
window_title::update();
});
globals::gui_screen = GUI_MESSAGE_BOX;
}
client_chat::clear();
session::peer = nullptr;
session::client_index = UINT16_MAX;
session::client_identity = UINT64_MAX;
globals::fixed_frametime_us = UINT64_MAX;
globals::fixed_frametime = 0.0f;
globals::fixed_accumulator = 0;
server_password_hash = UINT64_MAX;
delete globals::dimension;
globals::player = entt::null;
globals::dimension = nullptr;
}
|
O0
|
cpp
|
session::invalidate():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpq $0x0, 0x3f3960(%rip) # 0x50f790
je 0x11be85
movq 0x3f3957(%rip), %rdi # 0x50f790
callq 0x33f0a0
callq 0xe5170
leaq 0x25825f(%rip), %rdi # 0x3740a9
callq 0xe51a0
leaq 0x2590de(%rip), %rdi # 0x374f34
callq 0xe51d0
leaq -0x9(%rbp), %rdi
callq 0x11bf30
movq %rax, -0x8(%rbp)
leaq 0x258254(%rip), %rdi # 0x3740c3
leaq -0x8(%rbp), %rsi
callq 0xe5200
leaq 0x3f23f5(%rip), %rax # 0x50e274
movl $0x5, (%rax)
callq 0x58800
movq $0x0, 0x3f38fb(%rip) # 0x50f790
movw $0xffff, 0x3eed12(%rip) # imm = 0xFFFF
movq $-0x1, 0x3eed0f(%rip) # 0x50abb8
leaq 0x3f4be0(%rip), %rax # 0x510a90
movq $-0x1, (%rax)
leaq 0x3f4bca(%rip), %rax # 0x510a88
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
leaq 0x3f232c(%rip), %rax # 0x50e1f8
movq $0x0, (%rax)
movq $-0x1, 0x3eece2(%rip) # 0x50abc0
leaq 0x3f234b(%rip), %rax # 0x50e230
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x11befc
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x24fe40(%rip), %rdi # 0x36bd43
callq 0x44b70
movl %eax, %ecx
leaq 0x3f2327(%rip), %rax # 0x50e238
movl %ecx, (%rax)
leaq 0x3f2316(%rip), %rax # 0x50e230
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN7session10invalidateEv:
push rbp
mov rbp, rsp
sub rsp, 20h
cmp cs:_ZN7session4peerE, 0; session::peer
jz short loc_11BE85
mov rdi, cs:_ZN7session4peerE; this
call enet_peer_reset
call _ZN11message_box5resetEv; message_box::reset(void)
lea rdi, aDisconnectedDi; "disconnected.disconnected"
call _ZN11message_box9set_titleEPKc; message_box::set_title(char const*)
lea rdi, aEnetPeerConnec; "enet.peer_connection_timeout"
call _ZN11message_box12set_subtitleEPKc; message_box::set_subtitle(char const*)
lea rdi, [rbp+var_9]
call _ZZN7session10invalidateEvENK3$_0cvPFvvEEv; session::invalidate(void)::$_0::operator void (*)(void)(void)
mov qword ptr [rbp+var_8], rax
lea rdi, aDisconnectedBa; "disconnected.back"
lea rsi, [rbp+var_8]; char *
call _ZN11message_box10add_buttonEPKcRKPFvvE; message_box::add_button(char const*,void (* const&)(void))
lea rax, _ZN7globals10gui_screenE; globals::gui_screen
mov dword ptr [rax], 5
loc_11BE85:
call _ZN11client_chat5clearEv; client_chat::clear(void)
mov cs:_ZN7session4peerE, 0; session::peer
mov cs:_ZN7session12client_indexE, 0FFFFh; session::client_index
mov cs:_ZN7session15client_identityE, 0FFFFFFFFFFFFFFFFh; session::client_identity
lea rax, _ZN7globals18fixed_frametime_usE; globals::fixed_frametime_us
mov qword ptr [rax], 0FFFFFFFFFFFFFFFFh
lea rax, _ZN7globals15fixed_frametimeE; globals::fixed_frametime
xorps xmm0, xmm0
movss dword ptr [rax], xmm0
lea rax, _ZN7globals17fixed_accumulatorE; globals::fixed_accumulator
mov qword ptr [rax], 0
mov cs:_ZL20server_password_hash, 0FFFFFFFFFFFFFFFFh; server_password_hash
lea rax, _ZN7globals9dimensionE; globals::dimension
mov rax, [rax]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_11BEFC
mov rdi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+8]
loc_11BEFC:
lea rdi, _ZN4entt4nullE; entt::null
call _ZNK4entt6null_tcvT_INS_6entityEEEv; entt::null_t::operator entt::entity<entt::entity>(void)
mov ecx, eax
lea rax, _ZN7globals6playerE; globals::player
mov [rax], ecx
lea rax, _ZN7globals9dimensionE; globals::dimension
mov qword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
_QWORD * session::invalidate(session *this, const char *a2)
{
message_box *v2; // rdi
void (*const *v3)(void); // rdx
_QWORD *result; // rax
char v5; // [rsp+17h] [rbp-9h] BYREF
char v6[8]; // [rsp+18h] [rbp-8h] BYREF
if ( session::peer )
{
v2 = session::peer;
enet_peer_reset(session::peer);
message_box::reset(v2, (long long)a2);
message_box::set_title((message_box *)"disconnected.disconnected", a2);
message_box::set_subtitle((message_box *)"enet.peer_connection_timeout", a2);
*(_QWORD *)v6 = session::invalidate(void)::$_0::operator void (*)(void)(&v5);
this = (session *)"disconnected.back";
message_box::add_button((message_box *)"disconnected.back", v6, v3);
globals::gui_screen = 5;
}
client_chat::clear(this);
session::peer = 0LL;
session::client_index = -1;
session::client_identity = -1LL;
globals::fixed_frametime_us = -1LL;
globals::fixed_frametime = 0;
globals::fixed_accumulator = 0LL;
server_password_hash = -1LL;
if ( globals::dimension )
(*(void ( **)(_QWORD))(*(_QWORD *)globals::dimension + 8LL))(globals::dimension);
globals::player = entt::null_t::operator entt::entity<entt::entity>();
result = &globals::dimension;
globals::dimension = 0LL;
return result;
}
| |||
62,193 |
session::invalidate()
|
untodesu[P]voxelius/game/client/session.cc
|
void session::invalidate(void)
{
if(session::peer) {
enet_peer_reset(session::peer);
message_box::reset();
message_box::set_title("disconnected.disconnected");
message_box::set_subtitle("enet.peer_connection_timeout");
message_box::add_button("disconnected.back", [](void) {
globals::gui_screen = GUI_PLAY_MENU;
window_title::update();
});
globals::gui_screen = GUI_MESSAGE_BOX;
}
client_chat::clear();
session::peer = nullptr;
session::client_index = UINT16_MAX;
session::client_identity = UINT64_MAX;
globals::fixed_frametime_us = UINT64_MAX;
globals::fixed_frametime = 0.0f;
globals::fixed_accumulator = 0;
server_password_hash = UINT64_MAX;
delete globals::dimension;
globals::player = entt::null;
globals::dimension = nullptr;
}
|
O2
|
cpp
|
session::invalidate():
pushq %rbx
subq $0x10, %rsp
movq 0x1f4dd0(%rip), %rdi # 0x2565b0
testq %rdi, %rdi
je 0x6182f
callq 0x15935a
callq 0x5386b
leaq 0x1137fe(%rip), %rdi # 0x174ff4
callq 0x5389b
leaq 0x114635(%rip), %rdi # 0x175e37
callq 0x538b1
leaq 0x2c8(%rip), %rax # 0x61ad6
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x1137f1(%rip), %rdi # 0x17500e
callq 0x538c7
leaq 0x1f3873(%rip), %rax # 0x25509c
movl $0x5, (%rax)
callq 0x330b7
andq $0x0, 0x1f4d74(%rip) # 0x2565b0
orw $-0x1, 0x1f11ac(%rip) # 0x2529f0
orq $-0x1, 0x1f11ac(%rip) # 0x2529f8
leaq 0x1f605d(%rip), %rax # 0x2578b0
orq $-0x1, (%rax)
leaq 0x1f604a(%rip), %rax # 0x2578a8
andl $0x0, (%rax)
leaq 0x1f37b8(%rip), %rax # 0x255020
andq $0x0, (%rax)
orq $-0x1, 0x1f118c(%rip) # 0x252a00
leaq 0x1f37dd(%rip), %rbx # 0x255058
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x61889
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x1f37d0(%rip), %rax # 0x255060
orl $-0x1, (%rax)
andq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
retq
|
_ZN7session10invalidateEv:
push rbx
sub rsp, 10h
mov rdi, cs:_ZN7session4peerE; this
test rdi, rdi
jz short loc_6182F
call enet_peer_reset
call _ZN11message_box5resetEv; message_box::reset(void)
lea rdi, aDisconnectedDi; "disconnected.disconnected"
call _ZN11message_box9set_titleEPKc; message_box::set_title(char const*)
lea rdi, aEnetPeerConnec; "enet.peer_connection_timeout"
call _ZN11message_box12set_subtitleEPKc; message_box::set_subtitle(char const*)
lea rax, _ZZN7session10invalidateEvEN3$_08__invokeEv; session::invalidate(void)::$_0::__invoke(void)
lea rsi, [rsp+18h+var_10]; char *
mov [rsi], rax
lea rdi, aDisconnectedBa; "disconnected.back"
call _ZN11message_box10add_buttonEPKcRKPFvvE; message_box::add_button(char const*,void (* const&)(void))
lea rax, _ZN7globals10gui_screenE; globals::gui_screen
mov dword ptr [rax], 5
loc_6182F:
call _ZN11client_chat5clearEv; client_chat::clear(void)
and cs:_ZN7session4peerE, 0; session::peer
or cs:_ZN7session12client_indexE, 0FFFFh; session::client_index
or cs:_ZN7session15client_identityE, 0FFFFFFFFFFFFFFFFh; session::client_identity
lea rax, _ZN7globals18fixed_frametime_usE; globals::fixed_frametime_us
or qword ptr [rax], 0FFFFFFFFFFFFFFFFh
lea rax, _ZN7globals15fixed_frametimeE; globals::fixed_frametime
and dword ptr [rax], 0
lea rax, _ZN7globals17fixed_accumulatorE; globals::fixed_accumulator
and qword ptr [rax], 0
or cs:_ZL20server_password_hash, 0FFFFFFFFFFFFFFFFh; server_password_hash
lea rbx, _ZN7globals9dimensionE; globals::dimension
mov rdi, [rbx]
test rdi, rdi
jz short loc_61889
mov rax, [rdi]
call qword ptr [rax+8]
loc_61889:
lea rax, _ZN7globals6playerE; globals::player
or dword ptr [rax], 0FFFFFFFFh
and qword ptr [rbx], 0
add rsp, 10h
pop rbx
retn
|
invalidate:
PUSH RBX
SUB RSP,0x10
MOV RDI,qword ptr [0x003565b0]
TEST RDI,RDI
JZ 0x0016182f
CALL 0x0025935a
CALL 0x0015386b
LEA RDI,[0x274ff4]
CALL 0x0015389b
LEA RDI,[0x275e37]
CALL 0x001538b1
LEA RAX,[0x161ad6]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
LEA RDI,[0x27500e]
CALL 0x001538c7
LEA RAX,[0x35509c]
MOV dword ptr [RAX],0x5
LAB_0016182f:
CALL 0x001330b7
AND qword ptr [0x003565b0],0x0
OR word ptr [0x003529f0],0xffff
OR qword ptr [0x003529f8],-0x1
LEA RAX,[0x3578b0]
OR qword ptr [RAX],-0x1
LEA RAX,[0x3578a8]
AND dword ptr [RAX],0x0
LEA RAX,[0x355020]
AND qword ptr [RAX],0x0
OR qword ptr [0x00352a00],-0x1
LEA RBX,[0x355058]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x00161889
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00161889:
LEA RAX,[0x355060]
OR dword ptr [RAX],0xffffffff
AND qword ptr [RBX],0x0
ADD RSP,0x10
POP RBX
RET
|
/* session::invalidate() */
void session::invalidate(void)
{
code *local_10;
if (peer != 0) {
enet_peer_reset();
message_box::reset();
message_box::set_title("disconnected.disconnected");
message_box::set_subtitle("enet.peer_connection_timeout");
local_10 = invalidate()::$_0::__invoke;
message_box::add_button("disconnected.back",(_func_void *)&local_10);
globals::gui_screen = 5;
}
client_chat::clear();
peer = 0;
client_index = 0xffff;
client_identity = 0xffffffffffffffff;
globals::fixed_frametime_us = 0xffffffffffffffff;
globals::fixed_frametime = 0;
globals::fixed_accumulator = 0;
server_password_hash = 0xffffffffffffffff;
if (globals::dimension != (long *)0x0) {
(**(code **)(*globals::dimension + 8))();
}
globals::player = 0xffffffff;
globals::dimension = (long *)0x0;
return;
}
|
||
62,194 |
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw LoopControlException(err.str(), e.control_type);
} catch (const std::exception & e) {
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw std::runtime_error(err.str());
}
}
|
O2
|
cpp
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, %r14
movq (%rdi), %rax
callq *(%rax)
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0x578b9
movq %rbx, %rdi
callq 0x202c0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x208b0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x20690
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x5795f
pushq $0x18
popq %rdi
callq 0x20390
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x20a50
movl 0x10(%rbx), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x57a30
xorl %ebp, %ebp
leaq 0x7876b(%rip), %rsi # 0xd0010
movq 0x796c4(%rip), %rdx # 0xd0f70
movq %r14, %rdi
callq 0x20b30
jmp 0x5795f
cmpl $0x1, %edx
jne 0x57a1f
movq %rbx, %rdi
callq 0x202c0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x208b0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x20690
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x5791d
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x27f9e
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x20600
leaq 0x8(%rsp), %rdi
callq 0x20d88
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x20a50
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x20aa0
xorl %ebp, %ebp
movq 0x79698(%rip), %rsi # 0xd0fe8
movq 0x79609(%rip), %rdx # 0xd0f60
movq %r14, %rdi
callq 0x20b30
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x27f9e
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x20600
leaq 0x8(%rsp), %rdi
callq 0x20d88
jmp 0x5786f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d88
jmp 0x579f2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d88
jmp 0x57a0b
jmp 0x579ef
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d88
testb %bpl, %bpl
jne 0x579c2
jmp 0x579f2
movq %rax, %rbx
movq %r14, %rdi
callq 0x20510
jmp 0x579f2
jmp 0x57a08
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d88
testb %bpl, %bpl
jne 0x579e5
jmp 0x57a0b
movq %rax, %rbx
movq %r14, %rdi
callq 0x20510
jmp 0x57a0b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x20180
jmp 0x57a01
movq %rax, %rbx
callq 0x20ac0
jmp 0x57a1f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x20180
jmp 0x57a1a
movq %rax, %rbx
callq 0x20ac0
movq %rbx, %rdi
callq 0x20b90
movq %rax, %rdi
callq 0x23170
nop
|
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r14
push rbx
sub rsp, 1A0h
mov r14, rdi
mov rax, [rdi]
call qword ptr [rax]
add rsp, 1A0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
cmp edx, 2
jnz loc_578B9
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdi, [rsp+arg_20]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+8]
test rsi, rsi
jnz loc_5795F
loc_5786F:
push 18h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+arg_28]
lea rdi, [rsp+arg_0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov edx, [rbx+10h]
mov bpl, 1
lea rsi, [rsp+arg_0]
mov rdi, r14
call _ZN5minja20LoopControlExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15LoopControlTypeE; minja::LoopControlException::LoopControlException(std::string const&,minja::LoopControlType)
xor ebp, ebp
lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
|
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD))
{
return (**a1)(a1);
}
|
render:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1a0
MOV R14,RDI
MOV RAX,qword ptr [RDI]
LAB_0015781d:
CALL qword ptr [RAX]
LAB_0015781f:
ADD RSP,0x1a0
POP RBX
POP R14
POP RBP
RET
|
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2)
{
/* try { // try from 0015781d to 0015781e has its CatchHandler @ 0015782b */
(*(code *)**(int8 **)param_1)();
return;
}
|
|
62,195 |
YAML::Exp::URI()
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/exp.h
|
inline const RegEx& URI() {
static const RegEx e = Word() | RegEx("#;/?:@&=+$,_.!~*'()[]", REGEX_OR) |
(RegEx('%') + Hex() + Hex());
return e;
}
|
O0
|
c
|
YAML::Exp::URI():
subq $0xf8, %rsp
cmpb $0x0, 0x3be42a(%rip) # 0x50bf38
jne 0x14dc80
leaq 0x3be41d(%rip), %rdi # 0x50bf38
callq 0x8e140
cmpl $0x0, %eax
je 0x14dc80
callq 0x14ddc0
movq %rax, 0x18(%rsp)
jmp 0x14db35
leaq 0x87(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x94520
movq 0x10(%rsp), %rdx
leaq 0x29422a(%rip), %rsi # 0x3e1d7d
leaq 0x88(%rsp), %rdi
callq 0xe0480
jmp 0x14db62
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0x3, %edx
callq 0x14a8a0
jmp 0x14db7e
movq 0x18(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x14a9e0
jmp 0x14db9a
leaq 0x20(%rsp), %rdi
movl $0x25, %esi
callq 0x14a7f0
jmp 0x14dbab
callq 0x14e150
movq %rax, 0x8(%rsp)
jmp 0x14dbb7
movq 0x8(%rsp), %rdx
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x14ab20
jmp 0x14dbcd
callq 0x14e150
movq %rax, (%rsp)
jmp 0x14dbd8
movq (%rsp), %rdx
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x14ab20
jmp 0x14dbed
leaq 0x3be324(%rip), %rdi # 0x50bf18
leaq 0xd8(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x14a9e0
jmp 0x14dc08
leaq 0x60(%rsp), %rdi
callq 0x132ef0
leaq 0x40(%rsp), %rdi
callq 0x132ef0
leaq 0x20(%rsp), %rdi
callq 0x132ef0
leaq 0xd8(%rsp), %rdi
callq 0x132ef0
leaq 0xa8(%rsp), %rdi
callq 0x132ef0
leaq 0x88(%rsp), %rdi
callq 0x96fb8
leaq 0x87(%rsp), %rdi
callq 0x96fa0
leaq -0x1ad71(%rip), %rdi # 0x132ef0
leaq 0x3be2b0(%rip), %rsi # 0x50bf18
leaq 0x3ba371(%rip), %rdx # 0x507fe0
callq 0x93580
leaq 0x3be2bd(%rip), %rdi # 0x50bf38
callq 0x8fe20
leaq 0x3be291(%rip), %rax # 0x50bf18
addq $0xf8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x14dd9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x14dd8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x14dd81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x14dd74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x14dd67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x14dd5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x14dd53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x132ef0
leaq 0x40(%rsp), %rdi
callq 0x132ef0
leaq 0x20(%rsp), %rdi
callq 0x132ef0
leaq 0xd8(%rsp), %rdi
callq 0x132ef0
leaq 0xa8(%rsp), %rdi
callq 0x132ef0
leaq 0x88(%rsp), %rdi
callq 0x96fb8
leaq 0x87(%rsp), %rdi
callq 0x96fa0
leaq 0x3be196(%rip), %rdi # 0x50bf38
callq 0x8e960
movq 0xd0(%rsp), %rdi
callq 0x90db0
nopw %cs:(%rax,%rax)
nop
|
_ZN4YAML3Exp3URIEv:
sub rsp, 0F8h
cmp cs:_ZGVZN4YAML3Exp3URIEvE1e, 0; `guard variable for'YAML::Exp::URI(void)::e
jnz loc_14DC80
lea rdi, _ZGVZN4YAML3Exp3URIEvE1e; this
call ___cxa_guard_acquire
cmp eax, 0
jz loc_14DC80
call _ZN4YAML3Exp4WordEv; YAML::Exp::Word(void)
mov [rsp+0F8h+var_E0], rax; __int64
jmp short $+2
loc_14DB35:
lea rdi, [rsp+0F8h+var_71]
mov qword ptr [rsp+0F8h+var_E8], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+0F8h+var_E8]
lea rsi, asc_3E1D7D; "#;/?:@&=+$,_.!~*'()[]"
lea rdi, [rsp+0F8h+var_71+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_14DB62:
lea rdi, [rsp+0F8h+var_50]
lea rsi, [rsp+0F8h+var_71+1]
mov edx, 3
call _ZN4YAML5RegExC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_8REGEX_OPE; YAML::RegEx::RegEx(std::string const&,YAML::REGEX_OP)
jmp short $+2
loc_14DB7E:
mov rsi, [rsp+0F8h+var_E0]; int
lea rdi, [rsp+0F8h+var_20]; int
lea rdx, [rsp+0F8h+var_50]; int
call _ZN4YAMLorERKNS_5RegExES2_; YAML::operator|(YAML::RegEx const&,YAML::RegEx const&)
jmp short $+2
loc_14DB9A:
lea rdi, [rsp+0F8h+var_D8]; this
mov esi, 25h ; '%'; char
call _ZN4YAML5RegExC2Ec; YAML::RegEx::RegEx(char)
jmp short $+2
loc_14DBAB:
call _ZN4YAML3Exp3HexEv; YAML::Exp::Hex(void)
mov [rsp+0F8h+var_F0], rax; void *
jmp short $+2
loc_14DBB7:
mov rdx, [rsp+0F8h+var_F0]; int
lea rdi, [rsp+0F8h+var_B8]; this
lea rsi, [rsp+0F8h+var_D8]; int
call _ZN4YAMLplERKNS_5RegExES2_; YAML::operator+(YAML::RegEx const&,YAML::RegEx const&)
jmp short $+2
loc_14DBCD:
call _ZN4YAML3Exp3HexEv; YAML::Exp::Hex(void)
mov qword ptr [rsp+0F8h+var_F8], rax; int
jmp short $+2
loc_14DBD8:
mov rdx, qword ptr [rsp+0F8h+var_F8]; int
lea rdi, [rsp+0F8h+var_98]; int
lea rsi, [rsp+0F8h+var_B8]; int
call _ZN4YAMLplERKNS_5RegExES2_; YAML::operator+(YAML::RegEx const&,YAML::RegEx const&)
jmp short $+2
loc_14DBED:
lea rdi, _ZZN4YAML3Exp3URIEvE1e; int
lea rsi, [rsp+0F8h+var_20]; int
lea rdx, [rsp+0F8h+var_98]; int
call _ZN4YAMLorERKNS_5RegExES2_; YAML::operator|(YAML::RegEx const&,YAML::RegEx const&)
jmp short $+2
loc_14DC08:
lea rdi, [rsp+0F8h+var_98]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
lea rdi, [rsp+0F8h+var_B8]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
lea rdi, [rsp+0F8h+var_D8]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
lea rdi, [rsp+0F8h+var_20]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
lea rdi, [rsp+0F8h+var_50]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
lea rdi, [rsp+0F8h+var_71+1]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_71]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, _ZN4YAML5RegExD2Ev; lpfunc
lea rsi, _ZZN4YAML3Exp3URIEvE1e; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN4YAML3Exp3URIEvE1e; __guard *
call ___cxa_guard_release
loc_14DC80:
lea rax, _ZZN4YAML3Exp3URIEvE1e; YAML::Exp::URI(void)::e
add rsp, 0F8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
jmp loc_14DD9B
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
jmp loc_14DD8E
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
jmp loc_14DD81
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
jmp loc_14DD74
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
jmp short loc_14DD67
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
jmp short loc_14DD5D
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
jmp short loc_14DD53
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
lea rdi, [rsp+arg_58]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
loc_14DD53:
lea rdi, [rsp+arg_38]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
loc_14DD5D:
lea rdi, [rsp+arg_18]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
loc_14DD67:
lea rdi, [rsp+arg_D0]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
loc_14DD74:
lea rdi, [rsp+arg_A0]; void *
call _ZN4YAML5RegExD2Ev; YAML::RegEx::~RegEx()
loc_14DD81:
lea rdi, [rsp+arg_80]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_14DD8E:
lea rdi, [rsp+arg_7F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_14DD9B:
lea rdi, _ZGVZN4YAML3Exp3URIEvE1e; __guard *
call ___cxa_guard_abort
mov rdi, [rsp+arg_C8]
call __Unwind_Resume
|
int * YAML::Exp::URI(YAML::Exp *this)
{
long long v2; // [rsp+0h] [rbp-F8h]
void *v3; // [rsp+8h] [rbp-F0h]
long long v4; // [rsp+18h] [rbp-E0h]
char v5[32]; // [rsp+20h] [rbp-D8h] BYREF
char v6[32]; // [rsp+40h] [rbp-B8h] BYREF
char v7[39]; // [rsp+60h] [rbp-98h] BYREF
int v8[8]; // [rsp+87h] [rbp-71h] BYREF
char v9[48]; // [rsp+A8h] [rbp-50h] BYREF
char v10[32]; // [rsp+D8h] [rbp-20h] BYREF
if ( !(_BYTE)`guard variable for'YAML::Exp::URI(void)::e
&& __cxa_guard_acquire(&`guard variable for'YAML::Exp::URI(void)::e) )
{
v4 = YAML::Exp::Word((YAML::Exp *)&`guard variable for'YAML::Exp::URI(void)::e);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v8 + 1, (long long)"#;/?:@&=+$,_.!~*'()[]", (long long)v8);
YAML::RegEx::RegEx((long long)v9, (long long)v8 + 1, 3);
YAML::operator|((long long)v10, v4, (long long)v9);
YAML::RegEx::RegEx((YAML::RegEx *)v5, 37);
v3 = (void *)YAML::Exp::Hex((YAML::Exp *)v5);
YAML::operator+((long long)v6, (long long)v5, (long long)v3);
v2 = YAML::Exp::Hex((YAML::Exp *)v6);
YAML::operator+((long long)v7, (long long)v6, v2);
YAML::operator|((long long)&YAML::Exp::URI(void)::e, (long long)v10, (long long)v7);
YAML::RegEx::~RegEx(v7);
YAML::RegEx::~RegEx(v6);
YAML::RegEx::~RegEx(v5);
YAML::RegEx::~RegEx(v10);
YAML::RegEx::~RegEx(v9);
std::string::~string((char *)v8 + 1);
std::allocator<char>::~allocator(v8);
__cxa_atexit((void (*)(void *))YAML::RegEx::~RegEx, &YAML::Exp::URI(void)::e, &_dso_handle);
__cxa_guard_release(&`guard variable for'YAML::Exp::URI(void)::e);
}
return &YAML::Exp::URI(void)::e;
}
| |||
62,196 |
YAML::Exp::URI()
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/exp.h
|
inline const RegEx& URI() {
static const RegEx e = Word() | RegEx("#;/?:@&=+$,_.!~*'()[]", REGEX_OR) |
(RegEx('%') + Hex() + Hex());
return e;
}
|
O3
|
c
|
YAML::Exp::URI():
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movb 0x1a4113(%rip), %al # 0x2149d8
testb %al, %al
je 0x708db
leaq 0x1a40e8(%rip), %rax # 0x2149b8
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1a40f6(%rip), %rdi # 0x2149d8
callq 0x2e2e0
testl %eax, %eax
je 0x708c9
callq 0x70a99
movq %rax, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xf4afa(%rip), %rsi # 0x1653fd
leaq 0xf4b08(%rip), %rdx # 0x165412
leaq 0x8(%rsp), %rdi
callq 0x2c610
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x3, %edx
callq 0x6f158
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rdx
movq %rbx, %rsi
callq 0x6f1ca
leaq 0x28(%rsp), %rdi
movl $0x25, %esi
callq 0x6f11c
callq 0x70d2a
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %rax, %rdx
callq 0x6f27c
callq 0x70d2a
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %rax, %rdx
callq 0x6f27c
leaq 0x1a4031(%rip), %rdi # 0x2149b8
leaq 0xa8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x6f1ca
leaq 0x70(%rsp), %rdi
callq 0x65eb4
leaq 0x50(%rsp), %rdi
callq 0x65eb4
leaq 0x30(%rsp), %rdi
callq 0x65eb4
leaq 0xb0(%rsp), %rdi
callq 0x65eb4
leaq 0x90(%rsp), %rdi
callq 0x65eb4
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x709e8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2d2d0
leaq -0xb4e5(%rip), %rdi # 0x6550a
leaq 0x1a3fc2(%rip), %rsi # 0x2149b8
leaq 0x1a0933(%rip), %rdx # 0x211330
callq 0x2d030
leaq 0x1a3fcf(%rip), %rdi # 0x2149d8
callq 0x2cb40
jmp 0x708c9
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x65eb4
jmp 0x70a3b
movq %rax, %rbx
jmp 0x70a54
movq %rax, %rbx
jmp 0x70a61
movq %rax, %rbx
jmp 0x70a6e
jmp 0x70a33
movq %rax, %rbx
jmp 0x70a85
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x65eb4
jmp 0x70a4a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x65eb4
leaq 0xb0(%rsp), %rdi
callq 0x65eb4
leaq 0x90(%rsp), %rdi
callq 0x65eb4
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x70a85
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2d2d0
leaq 0x1a3f4c(%rip), %rdi # 0x2149d8
callq 0x2cb10
movq %rbx, %rdi
callq 0x2e220
|
_ZN4YAML3Exp3URIEv:
push r14
push rbx
sub rsp, 0C8h
mov al, cs:_ZGVZN4YAML3Exp3URIEvE1e; `guard variable for'YAML::Exp::URI(void)::e
test al, al
jz short loc_708DB
loc_708C9:
lea rax, _ZZN4YAML3Exp3URIEvE1e; YAML::Exp::URI(void)::e
add rsp, 0C8h
pop rbx
pop r14
retn
loc_708DB:
lea rdi, _ZGVZN4YAML3Exp3URIEvE1e; this
call ___cxa_guard_acquire
test eax, eax
jz short loc_708C9
call _ZN4YAML3Exp4WordEv; YAML::Exp::Word(void)
mov rbx, rax
lea r14, [rsp+0D8h+var_C0]
mov [r14-10h], r14
lea rsi, asc_1653FD; "#;/?:@&=+$,_.!~*'()[]"
lea rdx, asc_1653FD+15h; ""
lea rdi, [rsp+0D8h+var_D0]
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+0D8h+var_50]
lea rsi, [rsp+0D8h+var_D0]
mov edx, 3
call _ZN4YAML5RegExC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_8REGEX_OPE; YAML::RegEx::RegEx(std::string const&,YAML::REGEX_OP)
lea rdi, [rsp+0D8h+var_30]
lea rdx, [rsp+0D8h+var_50]
mov rsi, rbx
call _ZN4YAMLorERKNS_5RegExES2_; YAML::operator|(YAML::RegEx const&,YAML::RegEx const&)
lea rdi, [rsp+0D8h+var_B0]; this
mov esi, 25h ; '%'; char
call _ZN4YAML5RegExC2Ec; YAML::RegEx::RegEx(char)
call _ZN4YAML3Exp3HexEv; YAML::Exp::Hex(void)
lea rdi, [rsp+0D8h+var_90]; this
lea rsi, [rsp+0D8h+var_B0]
mov rdx, rax
call _ZN4YAMLplERKNS_5RegExES2_; YAML::operator+(YAML::RegEx const&,YAML::RegEx const&)
call _ZN4YAML3Exp3HexEv; YAML::Exp::Hex(void)
lea rdi, [rsp+0D8h+var_70]
lea rsi, [rsp+0D8h+var_90]
mov rdx, rax
call _ZN4YAMLplERKNS_5RegExES2_; YAML::operator+(YAML::RegEx const&,YAML::RegEx const&)
lea rdi, _ZZN4YAML3Exp3URIEvE1e; YAML::Exp::URI(void)::e
lea rsi, [rsp+0D8h+var_30]
lea rdx, [rsp+0D8h+var_70]
call _ZN4YAMLorERKNS_5RegExES2_; YAML::operator|(YAML::RegEx const&,YAML::RegEx const&)
lea rdi, [rsp+0D8h+var_68]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
lea rdi, [rsp+0D8h+var_88]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
lea rdi, [rsp+0D8h+var_A8]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
lea rdi, [rsp+0D8h+var_28]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
lea rdi, [rsp+0D8h+var_48]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
mov rdi, [rsp+0D8h+var_D0]; void *
cmp rdi, r14
jz short loc_709E8
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_709E8:
lea rdi, _ZN4YAML5RegExD2Ev; lpfunc
lea rsi, _ZZN4YAML3Exp3URIEvE1e; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN4YAML3Exp3URIEvE1e; __guard *
call ___cxa_guard_release
jmp loc_708C9
mov rbx, rax
lea rdi, [rsp+arg_68]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
jmp short loc_70A3B
mov rbx, rax
jmp short loc_70A54
mov rbx, rax
jmp short loc_70A61
mov rbx, rax
jmp short loc_70A6E
jmp short $+2
loc_70A33:
mov rbx, rax
jmp short loc_70A85
mov rbx, rax
loc_70A3B:
lea rdi, [rsp+arg_48]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
jmp short loc_70A4A
mov rbx, rax
loc_70A4A:
lea rdi, [rsp+arg_28]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
loc_70A54:
lea rdi, [rsp+arg_A8]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
loc_70A61:
lea rdi, [rsp+arg_88]
call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector()
loc_70A6E:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_70A85
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_70A85:
lea rdi, _ZGVZN4YAML3Exp3URIEvE1e; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
|
void * YAML::Exp::URI(YAML::Exp *this)
{
void *v2[2]; // [rsp+8h] [rbp-D0h] BYREF
_QWORD v3[2]; // [rsp+18h] [rbp-C0h] BYREF
_BYTE v4[8]; // [rsp+28h] [rbp-B0h] BYREF
char *v5; // [rsp+30h] [rbp-A8h] BYREF
_BYTE v6[8]; // [rsp+48h] [rbp-90h] BYREF
char *v7; // [rsp+50h] [rbp-88h] BYREF
_BYTE v8[8]; // [rsp+68h] [rbp-70h] BYREF
char *v9; // [rsp+70h] [rbp-68h] BYREF
_BYTE v10[8]; // [rsp+88h] [rbp-50h] BYREF
char *v11; // [rsp+90h] [rbp-48h] BYREF
_BYTE v12[8]; // [rsp+A8h] [rbp-30h] BYREF
char *v13; // [rsp+B0h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'YAML::Exp::URI(void)::e
&& __cxa_guard_acquire(&`guard variable for'YAML::Exp::URI(void)::e) )
{
YAML::Exp::Word((YAML::Exp *)&`guard variable for'YAML::Exp::URI(void)::e);
v2[0] = v3;
std::string::_M_construct<char const*>(v2, "#;/?:@&=+$,_.!~*'()[]", "");
YAML::RegEx::RegEx((long long)v10, v2, 3);
YAML::operator|((long long)v12);
YAML::RegEx::RegEx((YAML::RegEx *)v4, 37);
YAML::Exp::Hex((YAML::Exp *)v4);
YAML::operator+((long long)v6);
YAML::Exp::Hex((YAML::Exp *)v6);
YAML::operator+((long long)v8);
YAML::operator|((long long)&YAML::Exp::URI(void)::e);
std::vector<YAML::RegEx>::~vector(&v9);
std::vector<YAML::RegEx>::~vector(&v7);
std::vector<YAML::RegEx>::~vector(&v5);
std::vector<YAML::RegEx>::~vector(&v13);
std::vector<YAML::RegEx>::~vector(&v11);
if ( v2[0] != v3 )
operator delete(v2[0], v3[0] + 1LL);
__cxa_atexit((void (*)(void *))YAML::RegEx::~RegEx, &YAML::Exp::URI(void)::e, &_dso_handle);
__cxa_guard_release(&`guard variable for'YAML::Exp::URI(void)::e);
}
return &YAML::Exp::URI(void)::e;
}
|
URI:
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV AL,byte ptr [0x003149d8]
TEST AL,AL
JZ 0x001708db
LAB_001708c9:
LEA RAX,[0x3149b8]
ADD RSP,0xc8
POP RBX
POP R14
RET
LAB_001708db:
LEA RDI,[0x3149d8]
CALL 0x0012e2e0
TEST EAX,EAX
JZ 0x001708c9
LAB_001708eb:
CALL 0x00170a99
MOV RBX,RAX
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
LAB_001708fc:
LEA RSI,[0x2653fd]
LEA RDX,[0x265412]
LEA RDI,[RSP + 0x8]
CALL 0x0012c610
LAB_00170914:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x8]
MOV EDX,0x3
CALL 0x0016f158
LAB_0017092b:
LEA RDI,[RSP + 0xa8]
LEA RDX,[RSP + 0x88]
MOV RSI,RBX
CALL 0x0016f1ca
LAB_00170943:
LEA RDI,[RSP + 0x28]
MOV ESI,0x25
CALL 0x0016f11c
LAB_00170952:
CALL 0x00170d2a
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV RDX,RAX
CALL 0x0016f27c
LAB_00170969:
CALL 0x00170d2a
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
MOV RDX,RAX
CALL 0x0016f27c
LAB_00170980:
LEA RDI,[0x3149b8]
LEA RSI,[RSP + 0xa8]
LEA RDX,[RSP + 0x68]
CALL 0x0016f1ca
LAB_00170999:
LEA RDI,[RSP + 0x70]
CALL 0x00165eb4
LEA RDI,[RSP + 0x50]
CALL 0x00165eb4
LEA RDI,[RSP + 0x30]
CALL 0x00165eb4
LEA RDI,[RSP + 0xb0]
CALL 0x00165eb4
LEA RDI,[RSP + 0x90]
CALL 0x00165eb4
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x001709e8
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0012d2d0
LAB_001709e8:
LEA RDI,[0x16550a]
LEA RSI,[0x3149b8]
LEA RDX,[0x311330]
CALL 0x0012d030
LEA RDI,[0x3149d8]
CALL 0x0012cb40
JMP 0x001708c9
|
/* YAML::Exp::URI() */
int1 * YAML::Exp::URI(void)
{
int iVar1;
RegEx *pRVar2;
long *local_d0 [2];
long local_c0 [2];
RegEx local_b0 [8];
vector<YAML::RegEx,std::allocator<YAML::RegEx>> local_a8 [24];
YAML local_90 [8];
vector<YAML::RegEx,std::allocator<YAML::RegEx>> local_88 [24];
YAML local_70 [8];
vector<YAML::RegEx,std::allocator<YAML::RegEx>> local_68 [24];
RegEx local_50 [8];
vector<YAML::RegEx,std::allocator<YAML::RegEx>> local_48 [24];
YAML local_30 [8];
vector<YAML::RegEx,std::allocator<YAML::RegEx>> local_28 [24];
if (URI()::e == '\0') {
iVar1 = __cxa_guard_acquire(&URI()::e);
if (iVar1 != 0) {
/* try { // try from 001708eb to 001708ef has its CatchHandler @ 00170a33 */
pRVar2 = (RegEx *)Word();
/* try { // try from 001708fc to 00170913 has its CatchHandler @ 00170a31 */
local_d0[0] = local_c0;
std::__cxx11::string::_M_construct<char_const*>(local_d0,&DAT_002653fd,&DAT_00265412);
/* try { // try from 00170914 to 0017092a has its CatchHandler @ 00170a2c */
RegEx::RegEx(local_50,local_d0,3);
/* try { // try from 0017092b to 00170942 has its CatchHandler @ 00170a27 */
operator|(local_30,pRVar2,local_50);
/* try { // try from 00170943 to 00170951 has its CatchHandler @ 00170a22 */
RegEx::RegEx(local_b0,'%');
/* try { // try from 00170952 to 00170968 has its CatchHandler @ 00170a47 */
pRVar2 = (RegEx *)Hex();
operator+(local_90,local_b0,pRVar2);
/* try { // try from 00170969 to 0017097f has its CatchHandler @ 00170a38 */
pRVar2 = (RegEx *)Hex();
operator+(local_70,(RegEx *)local_90,pRVar2);
/* try { // try from 00170980 to 00170998 has its CatchHandler @ 00170a13 */
operator|((YAML *)URI()::e,(RegEx *)local_30,(RegEx *)local_70);
std::vector<YAML::RegEx,std::allocator<YAML::RegEx>>::~vector(local_68);
std::vector<YAML::RegEx,std::allocator<YAML::RegEx>>::~vector(local_88);
std::vector<YAML::RegEx,std::allocator<YAML::RegEx>>::~vector(local_a8);
std::vector<YAML::RegEx,std::allocator<YAML::RegEx>>::~vector(local_28);
std::vector<YAML::RegEx,std::allocator<YAML::RegEx>>::~vector(local_48);
if (local_d0[0] != local_c0) {
operator_delete(local_d0[0],local_c0[0] + 1);
}
__cxa_atexit(RegEx::~RegEx,URI()::e,&__dso_handle);
__cxa_guard_release(&URI()::e);
}
}
return URI()::e;
}
|
|
62,197 |
pvio_socket_close
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
my_bool pvio_socket_close(MARIADB_PVIO *pvio)
{
struct st_pvio_socket *csock= NULL;
int r= 0;
if (!pvio)
return 1;
if (pvio->data)
{
csock= (struct st_pvio_socket *)pvio->data;
if (csock && csock->socket != INVALID_SOCKET)
{
r= closesocket(csock->socket);
csock->socket= INVALID_SOCKET;
}
free((gptr)pvio->data);
pvio->data= NULL;
}
return r;
}
|
O3
|
c
|
pvio_socket_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3448f
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x34494
movl (%r15), %edi
cmpl $-0x1, %edi
je 0x34499
callq 0x13850
movl %eax, %r14d
movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF
movq (%rbx), %r15
jmp 0x3449c
movb $0x1, %r14b
jmp 0x344ab
xorl %r14d, %r14d
jmp 0x344ab
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x13570
movq $0x0, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
pvio_socket_close:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
test rdi, rdi
jz short loc_3448F
mov rbx, rdi
mov r15, [rdi]
test r15, r15
jz short loc_34494
mov edi, [r15]
cmp edi, 0FFFFFFFFh
jz short loc_34499
call _close
mov r14d, eax
mov dword ptr [r15], 0FFFFFFFFh
mov r15, [rbx]
jmp short loc_3449C
loc_3448F:
mov r14b, 1
jmp short loc_344AB
loc_34494:
xor r14d, r14d
jmp short loc_344AB
loc_34499:
xor r14d, r14d
loc_3449C:
mov rdi, r15
call _free
mov qword ptr [rbx], 0
loc_344AB:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long pvio_socket_close(_DWORD **a1)
{
unsigned int v1; // r14d
_DWORD *v3; // r15
long long v4; // rdi
if ( a1 )
{
v3 = *a1;
if ( *a1 )
{
v4 = (unsigned int)*v3;
if ( (_DWORD)v4 == -1 )
{
v1 = 0;
}
else
{
v1 = close(v4);
*v3 = -1;
v3 = *a1;
}
free(v3);
*a1 = 0LL;
}
else
{
return 0;
}
}
else
{
LOBYTE(v1) = 1;
}
return v1;
}
|
pvio_socket_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x0013448f
MOV RBX,RDI
MOV R15,qword ptr [RDI]
TEST R15,R15
JZ 0x00134494
MOV EDI,dword ptr [R15]
CMP EDI,-0x1
JZ 0x00134499
CALL 0x00113850
MOV R14D,EAX
MOV dword ptr [R15],0xffffffff
MOV R15,qword ptr [RBX]
JMP 0x0013449c
LAB_0013448f:
MOV R14B,0x1
JMP 0x001344ab
LAB_00134494:
XOR R14D,R14D
JMP 0x001344ab
LAB_00134499:
XOR R14D,R14D
LAB_0013449c:
MOV RDI,R15
CALL 0x00113570
MOV qword ptr [RBX],0x0
LAB_001344ab:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong pvio_socket_close(int8 *param_1)
{
uint uVar1;
int8 unaff_R14;
ulong uVar2;
int *__ptr;
if (param_1 == (int8 *)0x0) {
uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1);
}
else {
__ptr = (int *)*param_1;
if (__ptr == (int *)0x0) {
uVar2 = 0;
}
else {
if (*__ptr == -1) {
uVar2 = 0;
}
else {
uVar1 = close(*__ptr);
uVar2 = (ulong)uVar1;
*__ptr = -1;
__ptr = (int *)*param_1;
}
free(__ptr);
*param_1 = 0;
}
}
return uVar2 & 0xffffffff;
}
|
|
62,198 |
httplib::ClientImpl::create_client_socket(httplib::Error&) const
|
hkr04[P]cpp-mcp/common/httplib.h
|
inline socket_t ClientImpl::create_client_socket(Error &error) const {
if (!proxy_host_.empty() && proxy_port_ != -1) {
return detail::create_client_socket(
proxy_host_, std::string(), proxy_port_, address_family_, tcp_nodelay_,
ipv6_v6only_, socket_options_, connection_timeout_sec_,
connection_timeout_usec_, read_timeout_sec_, read_timeout_usec_,
write_timeout_sec_, write_timeout_usec_, interface_, error);
}
// Check is custom IP specified for host_
std::string ip;
auto it = addr_map_.find(host_);
if (it != addr_map_.end()) { ip = it->second; }
return detail::create_client_socket(
host_, ip, port_, address_family_, tcp_nodelay_, ipv6_v6only_,
socket_options_, connection_timeout_sec_, connection_timeout_usec_,
read_timeout_sec_, read_timeout_usec_, write_timeout_sec_,
write_timeout_usec_, interface_, error);
}
|
O0
|
c
|
httplib::ClientImpl::create_client_socket(httplib::Error&) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x160, %rsp # imm = 0x160
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq 0x150(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
addq $0x278, %rdi # imm = 0x278
callq 0xbce0
testb $0x1, %al
jne 0x683b9
movq 0xa0(%rsp), %rax
cmpl $-0x1, 0x298(%rax)
je 0x683b9
movq 0xa0(%rsp), %rax
addq $0x278, %rax # imm = 0x278
movq %rax, 0x88(%rsp)
leaq 0x128(%rsp), %rdi
callq 0xbb80
movq 0xa0(%rsp), %rsi
movl 0x298(%rsi), %eax
movl %eax, 0x94(%rsp)
movl 0x224(%rsi), %eax
movl %eax, 0x98(%rsp)
movb 0x228(%rsi), %al
movb %al, 0x9e(%rsp)
movb 0x229(%rsi), %al
movb %al, 0x9f(%rsp)
addq $0x230, %rsi # imm = 0x230
leaq 0x108(%rsp), %rdi
callq 0x688b0
jmp 0x6827e
movl 0x98(%rsp), %ecx
movl 0x94(%rsp), %edx
movq 0x88(%rsp), %rdi
movb 0x9f(%rsp), %al
movb 0x9e(%rsp), %sil
movq 0xa0(%rsp), %r12
movq 0x188(%r12), %r9
movq 0x190(%r12), %r10
movq 0x198(%r12), %r11
movq 0x1a0(%r12), %rbx
movq 0x1a8(%r12), %r14
movq 0x1b0(%r12), %r15
addq $0x258, %r12 # imm = 0x258
movq 0x148(%rsp), %r13
movq %rsp, %r8
movq %r8, 0x78(%rsp)
movq %r13, 0x40(%r8)
movq %r12, 0x38(%r8)
movq %r15, 0x30(%r8)
movq %r14, 0x28(%r8)
movq %rbx, 0x20(%r8)
movq %r11, 0x18(%r8)
movq %r10, 0x10(%r8)
movq %r9, 0x8(%r8)
leaq 0x108(%rsp), %r9
movq %r9, (%r8)
movzbl %sil, %r8d
andl $0x1, %r8d
movzbl %al, %r9d
andl $0x1, %r9d
leaq 0x128(%rsp), %rsi
callq 0x685f0
movl %eax, 0x84(%rsp)
jmp 0x68343
movl 0x84(%rsp), %eax
movl %eax, 0x15c(%rsp)
leaq 0x108(%rsp), %rdi
callq 0xeb50
leaq 0x128(%rsp), %rdi
callq 0xbfb0
jmp 0x685c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x683a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x108(%rsp), %rdi
callq 0xeb50
leaq 0x128(%rsp), %rdi
callq 0xbfb0
jmp 0x685db
leaq 0xd8(%rsp), %rdi
callq 0xbb80
movq 0xa0(%rsp), %rsi
movq %rsi, %rdi
addq $0xc0, %rdi
addq $0x8, %rsi
callq 0x5fe00
movq %rax, 0x70(%rsp)
jmp 0x683e8
movq 0xa0(%rsp), %rdi
movq 0x70(%rsp), %rax
movq %rax, 0xd0(%rsp)
addq $0xc0, %rdi
callq 0x5fe50
movq %rax, 0xc8(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x5fe30
testb $0x1, %al
jne 0x6842c
jmp 0x6846a
leaq 0xd0(%rsp), %rdi
callq 0x5fe80
movq %rax, %rsi
addq $0x20, %rsi
leaq 0xd8(%rsp), %rdi
callq 0xb080
jmp 0x6844f
jmp 0x6846a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x685b4
movq 0xa0(%rsp), %rsi
movq %rsi, %rax
addq $0x8, %rax
movq %rax, 0x58(%rsp)
movl 0x28(%rsi), %eax
movl %eax, 0x64(%rsp)
movl 0x224(%rsi), %eax
movl %eax, 0x68(%rsp)
movb 0x228(%rsi), %al
movb %al, 0x6e(%rsp)
movb 0x229(%rsi), %al
movb %al, 0x6f(%rsp)
addq $0x230, %rsi # imm = 0x230
leaq 0xa8(%rsp), %rdi
callq 0x688b0
jmp 0x684b9
movl 0x68(%rsp), %ecx
movl 0x64(%rsp), %edx
movq 0x58(%rsp), %rdi
movb 0x6f(%rsp), %al
movb 0x6e(%rsp), %sil
movq 0xa0(%rsp), %r12
movq 0x188(%r12), %r9
movq 0x190(%r12), %r10
movq 0x198(%r12), %r11
movq 0x1a0(%r12), %rbx
movq 0x1a8(%r12), %r14
movq 0x1b0(%r12), %r15
addq $0x258, %r12 # imm = 0x258
movq 0x148(%rsp), %r13
movq %rsp, %r8
movq %r8, 0x48(%rsp)
movq %r13, 0x40(%r8)
movq %r12, 0x38(%r8)
movq %r15, 0x30(%r8)
movq %r14, 0x28(%r8)
movq %rbx, 0x20(%r8)
movq %r11, 0x18(%r8)
movq %r10, 0x10(%r8)
movq %r9, 0x8(%r8)
leaq 0xa8(%rsp), %r9
movq %r9, (%r8)
movzbl %sil, %r8d
andl $0x1, %r8d
movzbl %al, %r9d
andl $0x1, %r9d
leaq 0xd8(%rsp), %rsi
callq 0x685f0
movl %eax, 0x54(%rsp)
jmp 0x6856c
movl 0x54(%rsp), %eax
movl %eax, 0x15c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xeb50
leaq 0xd8(%rsp), %rdi
callq 0xbfb0
jmp 0x685c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xeb50
leaq 0xd8(%rsp), %rdi
callq 0xbfb0
jmp 0x685db
movl 0x15c(%rsp), %eax
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x100(%rsp), %rdi
callq 0xbe10
nopl (%rax,%rax)
|
_ZNK7httplib10ClientImpl20create_client_socketERNS_5ErrorE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 160h
mov [rsp+188h+var_38], rdi
mov [rsp+188h+var_40], rsi
mov rdi, [rsp+188h+var_38]
mov [rsp+188h+var_E8], rdi
add rdi, 278h
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_683B9
mov rax, [rsp+188h+var_E8]
cmp dword ptr [rax+298h], 0FFFFFFFFh
jz loc_683B9
mov rax, [rsp+188h+var_E8]
add rax, 278h
mov [rsp+188h+var_100], rax
lea rdi, [rsp+188h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rsi, [rsp+188h+var_E8]
mov eax, [rsi+298h]
mov [rsp+188h+var_F4], eax
mov eax, [rsi+224h]
mov [rsp+188h+var_F0], eax
mov al, [rsi+228h]
mov [rsp+188h+var_EA], al
mov al, [rsi+229h]
mov [rsp+188h+var_E9], al
add rsi, 230h
lea rdi, [rsp+188h+var_80]
call _ZNSt8functionIFviEEC2ERKS1_; std::function<void ()(int)>::function(std::function<void ()(int)> const&)
jmp short $+2
loc_6827E:
mov ecx, [rsp+188h+var_F0]
mov edx, [rsp+188h+var_F4]
mov rdi, [rsp+188h+var_100]
mov al, [rsp+188h+var_E9]
mov sil, [rsp+188h+var_EA]
mov r12, [rsp+188h+var_E8]
mov r9, [r12+188h]
mov r10, [r12+190h]
mov r11, [r12+198h]
mov rbx, [r12+1A0h]
mov r14, [r12+1A8h]
mov r15, [r12+1B0h]
add r12, 258h
mov r13, [rsp+188h+var_40]
mov r8, rsp
mov [rsp+188h+var_110], r8
mov [r8+40h], r13
mov [r8+38h], r12
mov [r8+30h], r15
mov [r8+28h], r14
mov [r8+20h], rbx
mov [r8+18h], r11
mov [r8+10h], r10
mov [r8+8], r9
lea r9, [rsp+188h+var_80]
mov [r8], r9
movzx r8d, sil
and r8d, 1
movzx r9d, al
and r9d, 1
lea rsi, [rsp+188h+var_60]
call _ZN7httplib6detail20create_client_socketERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_iibbSt8functionIFviEEllllllS8_RNS_5ErrorE; httplib::detail::create_client_socket(std::string const&,std::string const&,int,int,bool,bool,std::function<void ()(int)>,long,long,long,long,long,long,std::string const&,httplib::Error &)
mov [rsp+188h+var_104], eax
jmp short $+2
loc_68343:
mov eax, [rsp+188h+var_104]
mov [rsp+188h+var_2C], eax
lea rdi, [rsp+188h+var_80]
call _ZNSt8functionIFviEED2Ev; std::function<void ()(int)>::~function()
lea rdi, [rsp+188h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_685C3
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
jmp short loc_683A7
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
lea rdi, [rsp+arg_100]
call _ZNSt8functionIFviEED2Ev; std::function<void ()(int)>::~function()
loc_683A7:
lea rdi, [rsp+arg_120]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_685DB
loc_683B9:
lea rdi, [rsp+188h+var_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rsi, [rsp+188h+var_E8]
mov rdi, rsi
add rdi, 0C0h
add rsi, 8
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE4findERS9_; std::map<std::string,std::string>::find(std::string const&)
mov [rsp+188h+var_118], rax
jmp short $+2
loc_683E8:
mov rdi, [rsp+188h+var_E8]
mov rax, [rsp+188h+var_118]
mov [rsp+188h+var_B8], rax
add rdi, 0C0h
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE3endEv; std::map<std::string,std::string>::end(void)
mov [rsp+188h+var_C0], rax
lea rdi, [rsp+188h+var_B8]
lea rsi, [rsp+188h+var_C0]
call _ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EESB_; std::operator!=(std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>> const&,std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>> const&)
test al, 1
jnz short loc_6842C
jmp short loc_6846A
loc_6842C:
lea rdi, [rsp+188h+var_B8]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>::operator->(void)
mov rsi, rax
add rsi, 20h ; ' '
lea rdi, [rsp+188h+var_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_6844F:
jmp short loc_6846A
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
jmp loc_685B4
loc_6846A:
mov rsi, [rsp+188h+var_E8]
mov rax, rsi
add rax, 8
mov [rsp+188h+var_130], rax
mov eax, [rsi+28h]
mov [rsp+188h+var_124], eax
mov eax, [rsi+224h]
mov [rsp+188h+var_120], eax
mov al, [rsi+228h]
mov [rsp+188h+var_11A], al
mov al, [rsi+229h]
mov [rsp+188h+var_119], al
add rsi, 230h
lea rdi, [rsp+188h+var_E0]
call _ZNSt8functionIFviEEC2ERKS1_; std::function<void ()(int)>::function(std::function<void ()(int)> const&)
jmp short $+2
loc_684B9:
mov ecx, [rsp+188h+var_120]
mov edx, [rsp+188h+var_124]
mov rdi, [rsp+188h+var_130]
mov al, [rsp+188h+var_119]
mov sil, [rsp+188h+var_11A]
mov r12, [rsp+188h+var_E8]
mov r9, [r12+188h]
mov r10, [r12+190h]
mov r11, [r12+198h]
mov rbx, [r12+1A0h]
mov r14, [r12+1A8h]
mov r15, [r12+1B0h]
add r12, 258h
mov r13, [rsp+188h+var_40]
mov r8, rsp
mov [rsp+188h+var_140], r8
mov [r8+40h], r13
mov [r8+38h], r12
mov [r8+30h], r15
mov [r8+28h], r14
mov [r8+20h], rbx
mov [r8+18h], r11
mov [r8+10h], r10
mov [r8+8], r9
lea r9, [rsp+188h+var_E0]
mov [r8], r9
movzx r8d, sil
and r8d, 1
movzx r9d, al
and r9d, 1
lea rsi, [rsp+188h+var_B0]
call _ZN7httplib6detail20create_client_socketERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_iibbSt8functionIFviEEllllllS8_RNS_5ErrorE; httplib::detail::create_client_socket(std::string const&,std::string const&,int,int,bool,bool,std::function<void ()(int)>,long,long,long,long,long,long,std::string const&,httplib::Error &)
mov [rsp+188h+var_134], eax
jmp short $+2
loc_6856C:
mov eax, [rsp+188h+var_134]
mov [rsp+188h+var_2C], eax
lea rdi, [rsp+188h+var_E0]
call _ZNSt8functionIFviEED2Ev; std::function<void ()(int)>::~function()
lea rdi, [rsp+188h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_685C3
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
lea rdi, [rsp+arg_A0]
call _ZNSt8functionIFviEED2Ev; std::function<void ()(int)>::~function()
loc_685B4:
lea rdi, [rsp+arg_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_685DB
loc_685C3:
mov eax, [rsp+188h+var_2C]
add rsp, 160h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_685DB:
mov rdi, [rsp+arg_F8]
call __Unwind_Resume
|
long long httplib::ClientImpl::create_client_socket(long long a1, long long a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // rax
int v12; // [rsp+0h] [rbp-188h] BYREF
long long v13; // [rsp+8h] [rbp-180h]
long long v14; // [rsp+48h] [rbp-140h]
int v15; // [rsp+50h] [rbp-138h]
unsigned int v16; // [rsp+54h] [rbp-134h]
long long v17; // [rsp+58h] [rbp-130h]
int v18; // [rsp+60h] [rbp-128h]
int v19; // [rsp+64h] [rbp-124h]
int v20; // [rsp+68h] [rbp-120h]
char v21; // [rsp+6Eh] [rbp-11Ah]
char v22; // [rsp+6Fh] [rbp-119h]
long long v23; // [rsp+70h] [rbp-118h]
long long v24; // [rsp+78h] [rbp-110h]
int v25; // [rsp+80h] [rbp-108h]
unsigned int client_socket; // [rsp+84h] [rbp-104h]
long long v27; // [rsp+88h] [rbp-100h]
long long v28; // [rsp+90h] [rbp-F8h]
int v29; // [rsp+98h] [rbp-F0h]
char v30; // [rsp+9Eh] [rbp-EAh]
char v31; // [rsp+9Fh] [rbp-E9h]
long long v32; // [rsp+A0h] [rbp-E8h]
_DWORD v33[8]; // [rsp+A8h] [rbp-E0h] BYREF
long long v34; // [rsp+C8h] [rbp-C0h] BYREF
long long v35; // [rsp+D0h] [rbp-B8h] BYREF
int v36; // [rsp+D8h] [rbp-B0h] BYREF
char v37; // [rsp+E0h] [rbp-A8h]
_BYTE v38[32]; // [rsp+108h] [rbp-80h] BYREF
_BYTE v39[32]; // [rsp+128h] [rbp-60h] BYREF
long long v40; // [rsp+148h] [rbp-40h]
long long v41; // [rsp+150h] [rbp-38h]
unsigned int v42; // [rsp+15Ch] [rbp-2Ch]
v41 = a1;
v40 = a2;
v32 = a1;
if ( (std::string::empty(a1 + 632) & 1) != 0 || *(_DWORD *)(v32 + 664) == -1 )
{
std::string::basic_string(&v36);
v23 = std::map<std::string,std::string>::find(v32 + 192, v32 + 8);
v35 = v23;
v34 = std::map<std::string,std::string>::end(v32 + 192);
if ( std::operator!=(&v35, &v34) )
{
v10 = std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>::operator->(&v35);
std::string::operator=(&v36, v10 + 32);
}
v17 = v32 + 8;
v19 = *(_DWORD *)(v32 + 40);
v20 = *(_DWORD *)(v32 + 548);
v21 = *(_BYTE *)(v32 + 552);
v22 = *(_BYTE *)(v32 + 553);
std::function<void ()(int)>::function((unsigned int)v33, v32 + 560, v6, v7, v8, v9, v12, v13);
v16 = ((long long ( *)(_DWORD, unsigned int, int, int, int, int, long long, long long, long long, long long, long long, long long, long long, long long, long long, unsigned int, int, _DWORD, int, int, _DWORD, _DWORD, int, _DWORD, long long, int, _DWORD))httplib::detail::create_client_socket)(
v17,
(unsigned int)&v36,
v19,
v20,
v21 & 1,
v22 & 1,
(long long)v33,
*(_QWORD *)(v32 + 392),
*(_QWORD *)(v32 + 400),
*(_QWORD *)(v32 + 408),
*(_QWORD *)(v32 + 416),
*(_QWORD *)(v32 + 424),
*(_QWORD *)(v32 + 432),
v32 + 600,
v40,
(unsigned int)&v12,
v15,
v17,
v18,
v20,
v23,
v24,
v25,
v27,
v28,
v29,
v32);
v42 = v16;
std::function<void ()(int)>::~function((std::_Function_base *)v33);
std::string::~string(&v36);
}
else
{
v27 = v32 + 632;
std::string::basic_string(v39);
HIDWORD(v28) = *(_DWORD *)(v32 + 664);
v29 = *(_DWORD *)(v32 + 548);
v30 = *(_BYTE *)(v32 + 552);
v31 = *(_BYTE *)(v32 + 553);
std::function<void ()(int)>::function((unsigned int)v38, v32 + 560, v2, v3, v4, v5, v12, v13);
client_socket = httplib::detail::create_client_socket(
v27,
(unsigned int)v39,
HIDWORD(v28),
v29,
v30 & 1,
v31 & 1,
(long long)v38,
*(_QWORD *)(v32 + 392),
*(_QWORD *)(v32 + 400),
*(_QWORD *)(v32 + 408),
*(_QWORD *)(v32 + 416),
*(_QWORD *)(v32 + 424),
*(_QWORD *)(v32 + 432),
v32 + 600,
v40,
v14,
v15,
v17,
v18,
v20,
v23,
(unsigned int)&v12,
v25,
v27,
v28,
v29,
v32,
v33[0],
v33[2],
v33[4],
v33[6],
v34,
v35,
v36,
v37);
v42 = client_socket;
std::function<void ()(int)>::~function((std::_Function_base *)v38);
std::string::~string(v39);
}
return v42;
}
|
create_client_socket:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x160
MOV qword ptr [RSP + 0x150],RDI
MOV qword ptr [RSP + 0x148],RSI
MOV RDI,qword ptr [RSP + 0x150]
MOV qword ptr [RSP + 0xa0],RDI
ADD RDI,0x278
CALL 0x0010bce0
TEST AL,0x1
JNZ 0x001683b9
MOV RAX,qword ptr [RSP + 0xa0]
CMP dword ptr [RAX + 0x298],-0x1
JZ 0x001683b9
MOV RAX,qword ptr [RSP + 0xa0]
ADD RAX,0x278
MOV qword ptr [RSP + 0x88],RAX
LEA RDI,[RSP + 0x128]
CALL 0x0010bb80
MOV RSI,qword ptr [RSP + 0xa0]
MOV EAX,dword ptr [RSI + 0x298]
MOV dword ptr [RSP + 0x94],EAX
MOV EAX,dword ptr [RSI + 0x224]
MOV dword ptr [RSP + 0x98],EAX
MOV AL,byte ptr [RSI + 0x228]
MOV byte ptr [RSP + 0x9e],AL
MOV AL,byte ptr [RSI + 0x229]
MOV byte ptr [RSP + 0x9f],AL
ADD RSI,0x230
LAB_0016826f:
LEA RDI,[RSP + 0x108]
CALL 0x001688b0
JMP 0x0016827e
LAB_0016827e:
MOV ECX,dword ptr [RSP + 0x98]
MOV EDX,dword ptr [RSP + 0x94]
MOV RDI,qword ptr [RSP + 0x88]
MOV AL,byte ptr [RSP + 0x9f]
MOV SIL,byte ptr [RSP + 0x9e]
MOV R12,qword ptr [RSP + 0xa0]
MOV R9,qword ptr [R12 + 0x188]
MOV R10,qword ptr [R12 + 0x190]
MOV R11,qword ptr [R12 + 0x198]
MOV RBX,qword ptr [R12 + 0x1a0]
MOV R14,qword ptr [R12 + 0x1a8]
MOV R15,qword ptr [R12 + 0x1b0]
ADD R12,0x258
MOV R13,qword ptr [RSP + 0x148]
LAB_001682ea:
MOV R8,RSP
MOV qword ptr [RSP + 0x78],R8
MOV qword ptr [R8 + 0x40],R13
MOV qword ptr [R8 + 0x38],R12
MOV qword ptr [R8 + 0x30],R15
MOV qword ptr [R8 + 0x28],R14
MOV qword ptr [R8 + 0x20],RBX
MOV qword ptr [R8 + 0x18],R11
MOV qword ptr [R8 + 0x10],R10
MOV qword ptr [R8 + 0x8],R9
LEA R9,[RSP + 0x108]
MOV qword ptr [R8],R9
MOVZX R8D,SIL
AND R8D,0x1
MOVZX R9D,AL
AND R9D,0x1
LEA RSI,[RSP + 0x128]
CALL 0x001685f0
MOV dword ptr [RSP + 0x84],EAX
JMP 0x00168343
LAB_00168343:
MOV EAX,dword ptr [RSP + 0x84]
MOV dword ptr [RSP + 0x15c],EAX
LEA RDI,[RSP + 0x108]
CALL 0x0010eb50
LEA RDI,[RSP + 0x128]
CALL 0x0010bfb0
JMP 0x001685c3
LAB_001683b9:
LEA RDI,[RSP + 0xd8]
CALL 0x0010bb80
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDI,RSI
ADD RDI,0xc0
ADD RSI,0x8
LAB_001683dc:
CALL 0x0015fe00
MOV qword ptr [RSP + 0x70],RAX
JMP 0x001683e8
LAB_001683e8:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xd0],RAX
ADD RDI,0xc0
CALL 0x0015fe50
MOV qword ptr [RSP + 0xc8],RAX
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0xc8]
CALL 0x0015fe30
TEST AL,0x1
JNZ 0x0016842c
JMP 0x0016846a
LAB_0016842c:
LEA RDI,[RSP + 0xd0]
CALL 0x0015fe80
MOV RSI,RAX
ADD RSI,0x20
LEA RDI,[RSP + 0xd8]
CALL 0x0010b080
JMP 0x0016844f
LAB_0016844f:
JMP 0x0016846a
LAB_0016846a:
MOV RSI,qword ptr [RSP + 0xa0]
MOV RAX,RSI
ADD RAX,0x8
MOV qword ptr [RSP + 0x58],RAX
MOV EAX,dword ptr [RSI + 0x28]
MOV dword ptr [RSP + 0x64],EAX
MOV EAX,dword ptr [RSI + 0x224]
MOV dword ptr [RSP + 0x68],EAX
MOV AL,byte ptr [RSI + 0x228]
MOV byte ptr [RSP + 0x6e],AL
MOV AL,byte ptr [RSI + 0x229]
MOV byte ptr [RSP + 0x6f],AL
ADD RSI,0x230
LEA RDI,[RSP + 0xa8]
CALL 0x001688b0
JMP 0x001684b9
LAB_001684b9:
MOV ECX,dword ptr [RSP + 0x68]
MOV EDX,dword ptr [RSP + 0x64]
MOV RDI,qword ptr [RSP + 0x58]
MOV AL,byte ptr [RSP + 0x6f]
MOV SIL,byte ptr [RSP + 0x6e]
MOV R12,qword ptr [RSP + 0xa0]
MOV R9,qword ptr [R12 + 0x188]
MOV R10,qword ptr [R12 + 0x190]
MOV R11,qword ptr [R12 + 0x198]
MOV RBX,qword ptr [R12 + 0x1a0]
MOV R14,qword ptr [R12 + 0x1a8]
MOV R15,qword ptr [R12 + 0x1b0]
ADD R12,0x258
MOV R13,qword ptr [RSP + 0x148]
LAB_00168516:
MOV R8,RSP
MOV qword ptr [RSP + 0x48],R8
MOV qword ptr [R8 + 0x40],R13
MOV qword ptr [R8 + 0x38],R12
MOV qword ptr [R8 + 0x30],R15
MOV qword ptr [R8 + 0x28],R14
MOV qword ptr [R8 + 0x20],RBX
MOV qword ptr [R8 + 0x18],R11
MOV qword ptr [R8 + 0x10],R10
MOV qword ptr [R8 + 0x8],R9
LEA R9,[RSP + 0xa8]
MOV qword ptr [R8],R9
MOVZX R8D,SIL
AND R8D,0x1
MOVZX R9D,AL
AND R9D,0x1
LEA RSI,[RSP + 0xd8]
CALL 0x001685f0
LAB_00168566:
MOV dword ptr [RSP + 0x54],EAX
JMP 0x0016856c
LAB_0016856c:
MOV EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x15c],EAX
LEA RDI,[RSP + 0xa8]
CALL 0x0010eb50
LEA RDI,[RSP + 0xd8]
CALL 0x0010bfb0
JMP 0x001685c3
LAB_001685c3:
MOV EAX,dword ptr [RSP + 0x15c]
ADD RSP,0x160
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* httplib::ClientImpl::create_client_socket(httplib::Error&) const */
int4 __thiscall httplib::ClientImpl::create_client_socket(ClientImpl *this,Error *param_1)
{
ulong uVar1;
long lVar2;
function<void(int)> *local_188;
int8 local_180;
int8 local_178;
int8 local_170;
int8 local_168;
int8 local_160;
int8 local_158;
ClientImpl *local_150;
Error *local_148;
int1 *local_140;
int4 local_134;
ClientImpl *local_130;
int4 local_124;
int4 local_120;
ClientImpl local_11a;
ClientImpl local_119;
int8 local_118;
int1 *local_110;
int4 local_104;
ClientImpl *local_100;
int4 local_f4;
int4 local_f0;
ClientImpl local_ea;
ClientImpl local_e9;
ClientImpl *local_e8;
function<void(int)> local_e0 [32];
int8 local_c0;
int8 local_b8;
string local_b0 [48];
function<void(int)> local_80 [32];
string local_60 [32];
Error *local_40;
ClientImpl *local_38;
int4 local_2c;
local_e8 = this;
local_40 = param_1;
local_38 = this;
uVar1 = std::__cxx11::string::empty();
if (((uVar1 & 1) == 0) && (*(int *)(local_e8 + 0x298) != -1)) {
local_100 = local_e8 + 0x278;
std::__cxx11::string::string(local_60);
local_f4 = *(int4 *)(local_e8 + 0x298);
local_f0 = *(int4 *)(local_e8 + 0x224);
local_ea = local_e8[0x228];
local_e9 = local_e8[0x229];
/* try { // try from 0016826f to 0016827b has its CatchHandler @ 00168370 */
std::function<void(int)>::function(local_80,(function *)(local_e8 + 0x230));
local_180 = *(int8 *)(local_e8 + 0x188);
local_178 = *(int8 *)(local_e8 + 400);
local_170 = *(int8 *)(local_e8 + 0x198);
local_168 = *(int8 *)(local_e8 + 0x1a0);
local_160 = *(int8 *)(local_e8 + 0x1a8);
local_158 = *(int8 *)(local_e8 + 0x1b0);
local_150 = local_e8 + 600;
/* try { // try from 001682ea to 00168339 has its CatchHandler @ 00168386 */
local_148 = local_40;
local_188 = local_80;
local_110 = (int1 *)&local_188;
local_104 = detail::create_client_socket
(local_100,local_60,local_f4,local_f0,(byte)local_ea & 1,
(byte)local_e9 & 1);
local_2c = local_104;
std::function<void(int)>::~function(local_80);
std::__cxx11::string::~string(local_60);
}
else {
std::__cxx11::string::string(local_b0);
/* try { // try from 001683dc to 001684b6 has its CatchHandler @ 00168451 */
local_118 = std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::find((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(local_e8 + 0xc0),(string *)(local_e8 + 8));
local_b8 = local_118;
local_c0 = std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::end((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(local_e8 + 0xc0));
uVar1 = std::operator!=((_Rb_tree_const_iterator *)&local_b8,
(_Rb_tree_const_iterator *)&local_c0);
if ((uVar1 & 1) != 0) {
lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>::
operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>
*)&local_b8);
std::__cxx11::string::operator=(local_b0,(string *)(lVar2 + 0x20));
}
local_130 = local_e8 + 8;
local_124 = *(int4 *)(local_e8 + 0x28);
local_120 = *(int4 *)(local_e8 + 0x224);
local_11a = local_e8[0x228];
local_119 = local_e8[0x229];
std::function<void(int)>::function(local_e0,(function *)(local_e8 + 0x230));
local_180 = *(int8 *)(local_e8 + 0x188);
local_178 = *(int8 *)(local_e8 + 400);
local_170 = *(int8 *)(local_e8 + 0x198);
local_168 = *(int8 *)(local_e8 + 0x1a0);
local_160 = *(int8 *)(local_e8 + 0x1a8);
local_158 = *(int8 *)(local_e8 + 0x1b0);
local_150 = local_e8 + 600;
/* try { // try from 00168516 to 00168565 has its CatchHandler @ 00168593 */
local_148 = local_40;
local_188 = local_e0;
local_140 = (int1 *)&local_188;
local_134 = detail::create_client_socket
(local_130,local_b0,local_124,local_120,(byte)local_11a & 1,
(byte)local_119 & 1);
local_2c = local_134;
std::function<void(int)>::~function(local_e0);
std::__cxx11::string::~string(local_b0);
}
return local_2c;
}
|
|
62,199 |
minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!condition) throw std::runtime_error("IfExpr.condition is null");
if (!then_expr) throw std::runtime_error("IfExpr.then_expr is null");
if (condition->evaluate(context).to_bool()) {
return then_expr->evaluate(context);
}
if (else_expr) {
return else_expr->evaluate(context);
}
return nullptr;
}
|
O3
|
cpp
|
minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0xa5a47
cmpq $0x0, 0x30(%r15)
je 0xa5a65
movq %rdx, %r14
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x93be4
movq %r12, %rdi
callq 0x93de2
movl %eax, %ebp
leaq 0x40(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x66666
movq %r12, %rdi
callq 0x6bb54
movq -0x8(%r12), %rdi
testq %rdi, %rdi
je 0xa5986
callq 0x7b578
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa5995
callq 0x7b578
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xa59a4
callq 0x7b578
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xa59da
movq 0x955cb(%rip), %rax # 0x13af80
cmpb $0x0, (%rax)
je 0xa59c5
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa59cf
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa59da
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
je 0xa59e5
movq 0x30(%r15), %rsi
jmp 0xa59ee
movq 0x40(%r15), %rsi
testq %rsi, %rsi
je 0xa5a09
movq %rbx, %rdi
movq %r14, %rdx
callq 0x93be4
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x40(%rbx), %r14
movq $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movb $0x0, 0x40(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x66666
movq %r14, %rdi
movl $0x1, %esi
callq 0x66666
jmp 0xa59f9
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x59036(%rip), %rsi # 0xfea91
movq %rax, %rdi
callq 0x1b330
jmp 0xa5a81
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x59031(%rip), %rsi # 0xfeaaa
movq %rax, %rdi
callq 0x1b330
movq 0x95560(%rip), %rsi # 0x13afe8
movq 0x954c9(%rip), %rdx # 0x13af58
movq %r14, %rdi
callq 0x1bf90
jmp 0xa5a99
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b680
jmp 0xa5ab1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x93ed6
movq %rbx, %rdi
callq 0x1c020
nop
|
_ZNK5minja6IfExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_A5A47
cmp qword ptr [r15+30h], 0
jz loc_A5A65
mov r14, rdx
mov rbx, rdi
mov r12, rsp
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r12; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov ebp, eax
lea r12, [rsp+78h+var_38]
mov rdi, r12
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, r12
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, [r12-8]
test rdi, rdi
jz short loc_A5986
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A5986:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_A5995
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A5995:
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_A59A4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A59A4:
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_A59DA
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A59C5
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A59CF
loc_A59C5:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A59CF:
cmp eax, 1
jnz short loc_A59DA
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A59DA:
test bpl, bpl
jz short loc_A59E5
mov rsi, [r15+30h]
jmp short loc_A59EE
loc_A59E5:
mov rsi, [r15+40h]
test rsi, rsi
jz short loc_A5A09
loc_A59EE:
mov rdi, rbx
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
loc_A59F9:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A5A09:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 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)
jmp short loc_A59F9
loc_A5A47:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aIfexprConditio; "IfExpr.condition is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_A5A81
loc_A5A65:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aIfexprThenExpr; "IfExpr.then_expr is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_A5A81:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short $+2
loc_A5A99:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_A5AB1
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_A5AB1:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::IfExpr::do_evaluate(long long a1, _QWORD *a2)
{
void (***v3)(void); // rsi
char v5; // bp
long long v6; // rdi
signed __int32 v7; // eax
void (***v8)(void); // rsi
std::runtime_error *exception; // r14
long long v11; // [rsp+0h] [rbp-78h] BYREF
long long v12; // [rsp+8h] [rbp-70h]
volatile signed __int32 *v13; // [rsp+18h] [rbp-60h]
volatile signed __int32 *v14; // [rsp+28h] [rbp-50h]
volatile signed __int32 *v15; // [rsp+38h] [rbp-40h]
char v16[56]; // [rsp+40h] [rbp-38h] BYREF
v3 = (void (***)(void))a2[4];
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "IfExpr.condition is null");
goto LABEL_23;
}
if ( !a2[6] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "IfExpr.then_expr is null");
LABEL_23:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)&v11, v3);
v5 = minja::Value::to_bool((minja::Value *)&v11);
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(v16);
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(v16);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
v6 = v12;
if ( v12 )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(v12 + 12);
*(_DWORD *)(v12 + 12) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
if ( v5 )
{
v8 = (void (***)(void))a2[6];
}
else
{
v8 = (void (***)(void))a2[8];
if ( !v8 )
{
*(_QWORD *)(a1 + 72) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_BYTE *)(a1 + 64) = 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((char *)(a1 + 64));
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64));
return a1;
}
}
minja::Expression::evaluate(a1, v8);
return a1;
}
|
do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x001a5a47
CMP qword ptr [R15 + 0x30],0x0
JZ 0x001a5a65
MOV R14,RDX
MOV RBX,RDI
MOV R12,RSP
MOV RDI,R12
CALL 0x00193be4
LAB_001a5956:
MOV RDI,R12
CALL 0x00193de2
LAB_001a595e:
MOV EBP,EAX
LEA R12,[RSP + 0x40]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00166666
MOV RDI,R12
CALL 0x0016bb54
MOV RDI,qword ptr [R12 + -0x8]
TEST RDI,RDI
JZ 0x001a5986
CALL 0x0017b578
LAB_001a5986:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001a5995
CALL 0x0017b578
LAB_001a5995:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001a59a4
CALL 0x0017b578
LAB_001a59a4:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001a59da
MOV RAX,qword ptr [0x0023af80]
CMP byte ptr [RAX],0x0
JZ 0x001a59c5
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a59cf
LAB_001a59c5:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a59cf:
CMP EAX,0x1
JNZ 0x001a59da
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a59da:
TEST BPL,BPL
JZ 0x001a59e5
MOV RSI,qword ptr [R15 + 0x30]
JMP 0x001a59ee
LAB_001a59e5:
MOV RSI,qword ptr [R15 + 0x40]
TEST RSI,RSI
JZ 0x001a5a09
LAB_001a59ee:
MOV RDI,RBX
MOV RDX,R14
CALL 0x00193be4
LAB_001a59f9:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a5a09:
LEA R14,[RBX + 0x40]
MOV qword ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV byte ptr [RBX + 0x40],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00166666
MOV RDI,R14
MOV ESI,0x1
CALL 0x00166666
JMP 0x001a59f9
LAB_001a5a47:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_001a5a54:
LEA RSI,[0x1fea91]
MOV RDI,RAX
CALL 0x0011b330
LAB_001a5a63:
JMP 0x001a5a81
LAB_001a5a65:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_001a5a72:
LEA RSI,[0x1feaaa]
MOV RDI,RAX
CALL 0x0011b330
LAB_001a5a81:
MOV RSI,qword ptr [0x0023afe8]
MOV RDX,qword ptr [0x0023af58]
MOV RDI,R14
CALL 0x0011bf90
|
/* minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
IfExpr * __thiscall minja::IfExpr::do_evaluate(IfExpr *this,shared_ptr *param_1)
{
int *piVar1;
char cVar2;
int iVar3;
runtime_error *this_00;
shared_ptr *psVar4;
bool bVar5;
Expression aEStack_78 [8];
long *local_70;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
data local_38 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a5a54 to 001a5a62 has its CatchHandler @ 001a5a99 */
std::runtime_error::runtime_error(this_00,"IfExpr.condition is null");
}
else {
if (*(long *)(param_1 + 0x30) != 0) {
Expression::evaluate(aEStack_78,*(shared_ptr **)(param_1 + 0x20));
/* try { // try from 001a5956 to 001a595d has its CatchHandler @ 001a5aa6 */
cVar2 = Value::to_bool((Value *)aEStack_78);
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_38,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_38);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
if (local_70 != (long *)0x0) {
if (*PTR___libc_single_threaded_0023af80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_70 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_70 + 0xc);
*(int *)((long)local_70 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_70 + 0x18))();
}
}
if (cVar2 == '\0') {
psVar4 = *(shared_ptr **)(param_1 + 0x40);
if (psVar4 == (shared_ptr *)0x0) {
bVar5 = (bool)((char)this + '@');
*(int8 *)(this + 0x48) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
this[0x40] = (IfExpr)0x0;
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(bVar5);
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(bVar5);
return this;
}
}
else {
psVar4 = *(shared_ptr **)(param_1 + 0x30);
}
Expression::evaluate((Expression *)this,psVar4);
return this;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a5a72 to 001a5a80 has its CatchHandler @ 001a5a97 */
std::runtime_error::runtime_error(this_00,"IfExpr.then_expr is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0023afe8,PTR__runtime_error_0023af58);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.