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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
12,200
|
google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc
|
const std::string& NameOfEnum(const EnumDescriptor* descriptor, int value) {
const EnumValueDescriptor* d = descriptor->FindValueByNumber(value);
return (d == nullptr ? GetEmptyString() : d->name());
}
|
O3
|
cpp
|
google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int):
pushq %rbx
callq 0x1efd0
testq %rax, %rax
je 0x6402c
movq 0x8(%rax), %rbx
jmp 0x64040
leaq 0x9f265(%rip), %rax # 0x103298
movb (%rax), %al
leaq 0x9f23c(%rip), %rbx # 0x103278
testb $0x1, %al
je 0x64045
movq %rbx, %rax
popq %rbx
retq
callq 0x9c76d
jmp 0x64040
|
_ZN6google8protobuf8internal10NameOfEnumB5cxx11EPKNS0_14EnumDescriptorEi:
push rbx
call _ZNK6google8protobuf14EnumDescriptor17FindValueByNumberEi; google::protobuf::EnumDescriptor::FindValueByNumber(int)
test rax, rax
jz short loc_6402C
mov rbx, [rax+8]
jmp short loc_64040
loc_6402C:
lea rax, _ZN6google8protobuf8internal28init_protobuf_defaults_stateE; google::protobuf::internal::init_protobuf_defaults_state
mov al, [rax]
lea rbx, _ZN6google8protobuf8internal26fixed_address_empty_stringB5cxx11E; google::protobuf::internal::fixed_address_empty_string
test al, 1
jz short loc_64045
loc_64040:
mov rax, rbx
pop rbx
retn
loc_64045:
call _ZN6google8protobuf8internal24InitProtobufDefaultsSlowEv; google::protobuf::internal::InitProtobufDefaultsSlow(void)
jmp short loc_64040
|
void (* google::protobuf::internal::NameOfEnum[abi:cxx11](
google::protobuf::EnumDescriptor *a1,
int a2))(const void *)
{
unsigned __int8 *ValueByNumber; // rax
void (*v3)(const void *); // rbx
ValueByNumber = google::protobuf::EnumDescriptor::FindValueByNumber(a1, a2);
if ( ValueByNumber )
return (void (*)(const void *))*((_QWORD *)ValueByNumber + 1);
v3 = google::protobuf::internal::fixed_address_empty_string[abi:cxx11];
if ( (google::protobuf::internal::init_protobuf_defaults_state & 1) == 0 )
google::protobuf::internal::InitProtobufDefaultsSlow(a1);
return v3;
}
|
NameOfEnum[abi:cxx11]:
PUSH RBX
CALL 0x0011efd0
TEST RAX,RAX
JZ 0x0016402c
MOV RBX,qword ptr [RAX + 0x8]
JMP 0x00164040
LAB_0016402c:
LEA RAX,[0x203298]
MOV AL,byte ptr [RAX]
LEA RBX,[0x203278]
TEST AL,0x1
JZ 0x00164045
LAB_00164040:
MOV RAX,RBX
POP RBX
RET
LAB_00164045:
CALL 0x0019c76d
JMP 0x00164040
|
/* google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int)
*/
int8 * google::protobuf::internal::NameOfEnum_abi_cxx11_(EnumDescriptor *param_1,int param_2)
{
long lVar1;
int8 *puVar2;
lVar1 = EnumDescriptor::FindValueByNumber(param_1,param_2);
if (lVar1 == 0) {
puVar2 = &fixed_address_empty_string_abi_cxx11_;
if ((init_protobuf_defaults_state & 1) == 0) {
InitProtobufDefaultsSlow();
}
}
else {
puVar2 = *(int8 **)(lVar1 + 8);
}
return puVar2;
}
|
|
12,201
|
minja::Parser::parseVarNames[abi:cxx11]()
|
monkey531[P]llama/common/minja.hpp
|
std::vector<std::string> parseVarNames() {
static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)");
std::vector<std::string> group;
if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names");
std::vector<std::string> varnames;
std::istringstream iss(group[1]);
std::string varname;
while (std::getline(iss, varname, ',')) {
varnames.push_back(strip(varname));
}
return varnames;
}
|
O3
|
cpp
|
minja::Parser::parseVarNames[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp # imm = 0x1E8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xaae5c(%rip), %rax # 0x12f1d0
movb (%rax), %al
testb %al, %al
je 0x844e3
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0xaae1b(%rip), %rdx # 0x12f1b0
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x83d14
leaq 0x20(%rsp), %r14
movaps (%r14), %xmm0
movaps %xmm0, (%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x60(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movaps %xmm0, (%r14)
movq %rax, 0x10(%r14)
callq 0x21ff8
movq (%rsp), %r15
movq 0x8(%rsp), %r12
movq %r14, %rdi
callq 0x21ff8
cmpq %r12, %r15
je 0x8453a
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq (%rsp), %rsi
addq $0x20, %rsi
leaq 0x60(%rsp), %rdi
movl $0x8, %edx
callq 0x1bea0
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x50(%rsp), %rbp
leaq 0x60(%rsp), %r14
leaq 0x20(%rsp), %r15
leaq 0x40(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movl $0x2c, %edx
callq 0x1c050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x84491
movq %r12, %rdi
movq %r15, %rsi
callq 0x7861f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x56246
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x84444
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b8c0
jmp 0x84444
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x844a8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq 0xa9a99(%rip), %rsi # 0x12df48
leaq 0x60(%rsp), %rdi
callq 0x1bc70
leaq 0xd8(%rsp), %rdi
callq 0x1b2b0
movq %rsp, %rdi
callq 0x21ff8
movq %rbx, %rax
addq $0x1e8, %rsp # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaace6(%rip), %rdi # 0x12f1d0
callq 0x1bff0
testl %eax, %eax
je 0x8437e
leaq 0xaacb2(%rip), %rdi # 0x12f1b0
leaq 0x6e317(%rip), %rsi # 0xf281c
movl $0x10, %edx
callq 0x62f54
leaq -0x212be(%rip), %rdi # 0x63258
leaq 0xaac93(%rip), %rsi # 0x12f1b0
leaq 0xaa3b4(%rip), %rdx # 0x12e8d8
callq 0x1b7a0
leaq 0xaaca0(%rip), %rdi # 0x12f1d0
callq 0x1b5a0
jmp 0x8437e
movl $0x10, %edi
callq 0x1b440
movq %rax, %rbx
leaq 0x6e300(%rip), %rsi # 0xf284e
movq %rax, %rdi
callq 0x1b320
movq 0xa9a8b(%rip), %rsi # 0x12dfe8
movq 0xa99ec(%rip), %rdx # 0x12df50
movq %rbx, %rdi
callq 0x1bf00
movq %rax, %r14
leaq 0xaac5a(%rip), %rdi # 0x12f1d0
callq 0x1b590
jmp 0x845fc
jmp 0x84591
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b660
jmp 0x845f4
movq %rax, %r14
jmp 0x845ec
movq %rax, %r14
jmp 0x845f4
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x845b7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b8c0
jmp 0x845b7
jmp 0x845b4
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x845ce
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq 0xa9973(%rip), %rsi # 0x12df48
leaq 0x60(%rsp), %rdi
callq 0x1bc70
leaq 0xd8(%rsp), %rdi
callq 0x1b2b0
movq %rbx, %rdi
callq 0x21ff8
movq %rsp, %rdi
callq 0x21ff8
movq %r14, %rdi
callq 0x1bf90
|
_ZN5minja6Parser13parseVarNamesB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1E8h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex
mov al, [rax]
test al, al
jz loc_844E3
loc_8437E:
xorps xmm0, xmm0
movaps xmmword ptr [rsp+218h+var_218], xmm0; int
mov qword ptr [rsp+218h+var_208], 0; int
lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; int
lea rdi, [rsp+218h+var_1F8]; int
mov rsi, r14; int
mov ecx, 1; int
call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea r14, [rsp+218h+var_1F8]
movaps xmm0, xmmword ptr [r14]
movaps xmmword ptr [rsp+218h+var_218], xmm0
mov rax, [r14+10h]
mov qword ptr [rsp+218h+var_208], rax
lea rdi, [rsp+218h+var_1B8]
xorps xmm0, xmm0
movaps xmmword ptr [rdi], xmm0
xor eax, eax
mov [rdi+10h], rax
movaps xmmword ptr [r14], xmm0
mov [r14+10h], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov r15, qword ptr [rsp+218h+var_218]
mov r12, qword ptr [rsp+218h+var_218+8]
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
cmp r15, r12
jz loc_8453A
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov rsi, qword ptr [rsp+218h+var_218]
add rsi, 20h ; ' '
lea rdi, [rsp+218h+var_1B8]
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea r13, [rsp+218h+var_1E8]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
lea rbp, [rsp+218h+var_1C8]
lea r14, [rsp+218h+var_1B8]
lea r15, [rsp+218h+var_1F8]
lea r12, [rsp+218h+var_1D8]
loc_84444:
mov rdi, r14
mov rsi, r15
mov edx, 2Ch ; ','
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_84491
mov rdi, r12
mov rsi, r15
call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&)
mov rdi, rbx
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+218h+var_1D8]; void *
cmp rdi, rbp
jz short loc_84444
mov rsi, [rsp+218h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_84444
loc_84491:
mov rdi, [rsp+218h+var_1F8]; void *
cmp rdi, r13
jz short loc_844A8
mov rsi, [rsp+218h+var_1E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_844A8:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+218h+var_140]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 1E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_844E3:
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_8437E
lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex
lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"...
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_8437E
loc_8453A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aExpectedVariab; "Expected variable names"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_845FC
jmp short loc_84591
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_845F4
mov r14, rax
jmp short loc_845EC
loc_84591:
mov r14, rax
jmp short loc_845F4
mov r14, rax
mov rdi, [rsp+218h+var_1D8]; void *
cmp rdi, rbp
jz short loc_845B7
mov rsi, [rsp+218h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_845B7
jmp short $+2
loc_845B4:
mov r14, rax
loc_845B7:
mov rdi, [rsp+218h+var_1F8]; void *
cmp rdi, r13
jz short loc_845CE
mov rsi, [rsp+218h+var_1E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_845CE:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+218h+var_140]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_845EC:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_845F4:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_845FC:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2)
{
_QWORD *v2; // rax
std::runtime_error *exception; // rbx
int v5[4]; // [rsp+0h] [rbp-218h] BYREF
int v6[2]; // [rsp+10h] [rbp-208h]
__int128 v7; // [rsp+20h] [rbp-1F8h] BYREF
_QWORD v8[2]; // [rsp+30h] [rbp-1E8h] BYREF
void *v9[2]; // [rsp+40h] [rbp-1D8h] BYREF
long long v10; // [rsp+50h] [rbp-1C8h] BYREF
__int128 v11; // [rsp+60h] [rbp-1B8h] BYREF
long long v12; // [rsp+70h] [rbp-1A8h]
_BYTE v13[320]; // [rsp+D8h] [rbp-140h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
(long long)"((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]);
}
minja::Parser::consumeTokenGroups(
(long long)&v7,
a2,
(long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
1u);
*(_OWORD *)v5 = v7;
*(_QWORD *)v6 = v8[0];
v11 = 0LL;
v12 = 0LL;
v7 = 0LL;
v8[0] = 0LL;
std::vector<std::string>::~vector((long long)&v11);
std::vector<std::string>::~vector((long long)&v7);
if ( *(_QWORD *)v5 == *(_QWORD *)&v5[2] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected variable names");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::istringstream::basic_istringstream(&v11, *(_QWORD *)v5 + 32LL, 8LL);
*(_QWORD *)&v7 = v8;
*((_QWORD *)&v7 + 1) = 0LL;
LOBYTE(v8[0]) = 0;
while ( 1 )
{
v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&v11, &v7, 44LL);
if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 )
break;
minja::strip(v9, (long long)&v7);
std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9);
if ( v9[0] != &v10 )
operator delete(v9[0], v10 + 1);
}
if ( (_QWORD *)v7 != v8 )
operator delete((void *)v7, v8[0] + 1LL);
std::istringstream::~istringstream(&v11, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v13);
std::vector<std::string>::~vector((long long)v5);
return a1;
}
|
parseVarNames[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1e8
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x22f1d0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001844e3
LAB_0018437e:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
LAB_0018438e:
LEA RDX,[0x22f1b0]
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00183d14
LEA R14,[RSP + 0x20]
MOVAPS XMM0,xmmword ptr [R14]
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x60]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RDI],XMM0
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOVAPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],RAX
CALL 0x00121ff8
MOV R15,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x8]
MOV RDI,R14
CALL 0x00121ff8
CMP R15,R12
JZ 0x0018453a
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [RSP]
ADD RSI,0x20
LAB_0018440b:
LEA RDI,[RSP + 0x60]
MOV EDX,0x8
CALL 0x0011bea0
LEA R13,[RSP + 0x30]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
LEA RBP,[RSP + 0x50]
LEA R14,[RSP + 0x60]
LEA R15,[RSP + 0x20]
LEA R12,[RSP + 0x40]
LAB_00184444:
MOV RDI,R14
MOV RSI,R15
MOV EDX,0x2c
CALL 0x0011c050
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00184491
LAB_00184462:
MOV RDI,R12
MOV RSI,R15
CALL 0x0017861f
LAB_0018446d:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00156246
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,RBP
JZ 0x00184444
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0011b8c0
JMP 0x00184444
LAB_00184491:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R13
JZ 0x001844a8
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b8c0
LAB_001844a8:
MOV RSI,qword ptr [0x0022df48]
LEA RDI,[RSP + 0x60]
CALL 0x0011bc70
LEA RDI,[RSP + 0xd8]
CALL 0x0011b2b0
MOV RDI,RSP
CALL 0x00121ff8
MOV RAX,RBX
ADD RSP,0x1e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001844e3:
LEA RDI,[0x22f1d0]
CALL 0x0011bff0
TEST EAX,EAX
JZ 0x0018437e
LAB_001844f7:
LEA RDI,[0x22f1b0]
LEA RSI,[0x1f281c]
MOV EDX,0x10
CALL 0x00162f54
LAB_0018450f:
LEA RDI,[0x163258]
LEA RSI,[0x22f1b0]
LEA RDX,[0x22e8d8]
CALL 0x0011b7a0
LEA RDI,[0x22f1d0]
CALL 0x0011b5a0
JMP 0x0018437e
LAB_0018453a:
MOV EDI,0x10
CALL 0x0011b440
MOV RBX,RAX
LAB_00184547:
LEA RSI,[0x1f284e]
MOV RDI,RAX
CALL 0x0011b320
LAB_00184556:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,RBX
CALL 0x0011bf00
|
/* minja::Parser::parseVarNames[abi:cxx11]() */
void minja::Parser::parseVarNames_abi_cxx11_(void)
{
ulong *puVar1;
ulong *puVar2;
int iVar3;
istream *piVar4;
runtime_error *this;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI;
ulong *local_218;
ulong *puStack_210;
ulong local_208;
ulong *local_1f8;
ulong *puStack_1f0;
ulong local_1e8 [2];
long *local_1d8 [2];
long local_1c8 [2];
int8 local_1b8;
int8 uStack_1b0;
int8 local_1a8;
ios_base local_140 [272];
if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 001844f7 to 0018450e has its CatchHandler @ 0018456c */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,
"((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_);
}
}
local_218 = (ulong *)0x0;
puStack_210 = (ulong *)0x0;
local_208 = 0;
/* try { // try from 0018438e to 001843a6 has its CatchHandler @ 00184591 */
consumeTokenGroups(&local_1f8);
local_218 = local_1f8;
puStack_210 = puStack_1f0;
local_208 = local_1e8[0];
local_1b8 = 0;
uStack_1b0 = 0;
local_1a8 = 0;
local_1f8 = (ulong *)0x0;
puStack_1f0 = (ulong *)0x0;
local_1e8[0] = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1b8);
puVar2 = puStack_210;
puVar1 = local_218;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1f8);
if (puVar1 != puVar2) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
/* try { // try from 0018440b to 00184419 has its CatchHandler @ 0018458c */
std::__cxx11::istringstream::istringstream((istringstream *)&local_1b8,local_218 + 4,8);
puStack_1f0 = (ulong *)0x0;
local_1e8[0] = local_1e8[0] & 0xffffffffffffff00;
local_1f8 = local_1e8;
while( true ) {
/* try { // try from 00184444 to 00184453 has its CatchHandler @ 001845b4 */
piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)&local_1b8,(string *)&local_1f8,',');
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break;
/* try { // try from 00184462 to 0018446c has its CatchHandler @ 001845b2 */
strip((minja *)local_1d8,(string *)&local_1f8);
/* try { // try from 0018446d to 00184477 has its CatchHandler @ 00184596 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1d8);
if (local_1d8[0] != local_1c8) {
operator_delete(local_1d8[0],local_1c8[0] + 1);
}
}
if (local_1f8 != local_1e8) {
operator_delete(local_1f8,local_1e8[0] + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)&local_1b8);
std::ios_base::~ios_base(local_140);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_218);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00184547 to 00184555 has its CatchHandler @ 0018457f */
std::runtime_error::runtime_error(this,"Expected variable names");
/* try { // try from 00184556 to 0018456b has its CatchHandler @ 0018457d */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
|
|
12,202
|
ma_uniquedef_write
|
eloqsql/storage/maria/ma_open.c
|
my_bool _ma_uniquedef_write(File file, MARIA_UNIQUEDEF *def)
{
uchar buff[MARIA_UNIQUEDEF_SIZE];
uchar *ptr=buff;
mi_int2store(ptr,def->keysegs); ptr+=2;
*ptr++= (uchar) def->key;
*ptr++ = (uchar) def->null_are_equal;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
}
|
O3
|
c
|
ma_uniquedef_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movzwl (%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1c(%rbp)
movb 0x2(%rsi), %al
movb %al, -0x1a(%rbp)
movb 0x3(%rsi), %al
movb %al, -0x19(%rbp)
leaq 0x3207a1(%rip), %rax # 0x38f258
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x6eb03
leaq -0x1c(%rbp), %rsi
movl $0x4, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x30a78
testq %rax, %rax
setne %al
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x6eb1d
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x1c(%rbp), %rdx
leaq -0x28(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2e4ad
movq (%r14), %rax
jmp 0x6eae5
callq 0x2a270
|
_ma_uniquedef_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov rax, fs:28h
mov [rbp+var_18], rax
movzx eax, word ptr [rsi]
rol ax, 8
mov ebx, edi
mov [rbp+var_1C], ax
mov al, [rsi+2]
mov [rbp+var_1A], al
mov al, [rsi+3]
mov [rbp+var_19], al
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_70]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_6EB03
lea rsi, [rbp+var_1C]
mov edx, 4
mov ecx, 4
mov edi, ebx
call my_write
loc_6EAE5:
test rax, rax
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_6EB1D
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_6EB03:
lea rdx, [rbp+var_1C]
lea r14, [rbp+var_28]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call _ma_uniquedef_write_cold_1
mov rax, [r14]
jmp short loc_6EAE5
loc_6EB1D:
call ___stack_chk_fail
|
bool ma_uniquedef_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rax
_BYTE v5[72]; // [rsp+0h] [rbp-70h] BYREF
long long v6; // [rsp+48h] [rbp-28h] BYREF
__int16 v7; // [rsp+54h] [rbp-1Ch] BYREF
char v8; // [rsp+56h] [rbp-1Ah]
char v9; // [rsp+57h] [rbp-19h]
unsigned long long v10; // [rsp+58h] [rbp-18h]
v10 = __readfsqword(0x28u);
v7 = __ROL2__(*(_WORD *)a2, 8);
v8 = *(_BYTE *)(a2 + 2);
v9 = *(_BYTE *)(a2 + 3);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a1, 7LL);
if ( v2 )
{
ma_uniquedef_write_cold_1(v2, a1, (long long)&v7, &v6);
v3 = v6;
}
else
{
v3 = my_write(a1, (long long)&v7, 4LL, 4LL);
}
return v3 != 0;
}
|
_ma_uniquedef_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOVZX EAX,word ptr [RSI]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1c],AX
MOV AL,byte ptr [RSI + 0x2]
MOV byte ptr [RBP + -0x1a],AL
MOV AL,byte ptr [RSI + 0x3]
MOV byte ptr [RBP + -0x19],AL
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x70]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0016eb03
LEA RSI,[RBP + -0x1c]
MOV EDX,0x4
MOV ECX,0x4
MOV EDI,EBX
CALL 0x00130a78
LAB_0016eae5:
TEST RAX,RAX
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0016eb1d
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_0016eb03:
LEA RDX,[RBP + -0x1c]
LEA R14,[RBP + -0x28]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012e4ad
MOV RAX,qword ptr [R14]
JMP 0x0016eae5
LAB_0016eb1d:
CALL 0x0012a270
|
bool _ma_uniquedef_write(int4 param_1,ushort *param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_78 [72];
long local_30;
ushort local_24;
int1 local_22;
int1 local_21;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_24 = *param_2 << 8 | *param_2 >> 8;
local_22 = (int1)param_2[1];
local_21 = *(int1 *)((long)param_2 + 3);
lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1,7);
if (lVar1 == 0) {
local_30 = my_write(param_1,&local_24,4,4);
}
else {
_ma_uniquedef_write_cold_1(lVar1,param_1,&local_24,&local_30);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_30 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,203
|
fmt::v10::detail::thousands_sep_result<char> fmt::v10::detail::thousands_sep_impl<char>(fmt::v10::detail::locale_ref)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h
|
FMT_FUNC auto thousands_sep_impl(locale_ref loc) -> thousands_sep_result<Char> {
auto& facet = std::use_facet<std::numpunct<Char>>(loc.get<std::locale>());
auto grouping = facet.grouping();
auto thousands_sep = grouping.empty() ? Char() : facet.thousands_sep();
return {std::move(grouping), thousands_sep};
}
|
O0
|
c
|
fmt::v10::detail::thousands_sep_result<char> fmt::v10::detail::thousands_sep_impl<char>(fmt::v10::detail::locale_ref):
subq $0x88, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
leaq 0x68(%rsp), %rdi
movq %rdi, 0x20(%rsp)
leaq 0x78(%rsp), %rsi
callq 0x87d10
movq 0x20(%rsp), %rdi
callq 0x14290
movq %rax, 0x28(%rsp)
jmp 0x8b606
leaq 0x68(%rsp), %rdi
callq 0x14a30
movq 0x28(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x14920
leaq 0x38(%rsp), %rdi
callq 0x39260
testb $0x1, %al
jne 0x8b639
jmp 0x8b641
xorl %eax, %eax
movb %al, 0xf(%rsp)
jmp 0x8b65b
movq 0x70(%rsp), %rdi
callq 0x14410
movb %al, 0xe(%rsp)
jmp 0x8b651
movb 0xe(%rsp), %al
movb %al, 0xf(%rsp)
jmp 0x8b65b
movq 0x10(%rsp), %rdi
movb 0xf(%rsp), %al
movb %al, 0x37(%rsp)
leaq 0x38(%rsp), %rsi
callq 0x1b560
movq 0x10(%rsp), %rax
movb 0x37(%rsp), %cl
movb %cl, 0x20(%rax)
leaq 0x38(%rsp), %rdi
callq 0x1aac0
movq 0x18(%rsp), %rax
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x14a30
jmp 0x8b6c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1aac0
movq 0x60(%rsp), %rdi
callq 0x14c80
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE:
sub rsp, 88h
mov [rsp+88h+var_78], rdi
mov rax, rdi
mov [rsp+88h+var_70], rax
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
lea rdi, [rsp+88h+var_20]
mov [rsp+88h+var_68], rdi
lea rsi, [rsp+88h+var_10]
call _ZNK3fmt3v106detail10locale_ref3getISt6localeEET_v; fmt::v10::detail::locale_ref::get<std::locale>(void)
mov rdi, [rsp+88h+var_68]
call __ZSt9use_facetINSt7__cxx118numpunctIcEEERKT_RKSt6locale; std::use_facet<std::numpunct<char>>(std::locale const&)
mov [rsp+88h+var_60], rax
jmp short $+2
loc_8B606:
lea rdi, [rsp+88h+var_20]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_18], rax
mov rsi, [rsp+88h+var_18]
lea rdi, [rsp+88h+var_50]
call __ZNKSt7__cxx118numpunctIcE8groupingEv; std::numpunct<char>::grouping(void)
lea rdi, [rsp+88h+var_50]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_8B639
jmp short loc_8B641
loc_8B639:
xor eax, eax
mov [rsp+88h+var_79], al
jmp short loc_8B65B
loc_8B641:
mov rdi, [rsp+88h+var_18]
call __ZNKSt7__cxx118numpunctIcE13thousands_sepEv; std::numpunct<char>::thousands_sep(void)
mov [rsp+88h+var_7A], al
jmp short $+2
loc_8B651:
mov al, [rsp+88h+var_7A]
mov [rsp+88h+var_79], al
jmp short $+2
loc_8B65B:
mov rdi, [rsp+88h+var_78]
mov al, [rsp+88h+var_79]
mov [rsp+88h+var_51], al
lea rsi, [rsp+88h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_; std::string::basic_string(std::string&&)
mov rax, [rsp+88h+var_78]
mov cl, [rsp+88h+var_51]
mov [rax+20h], cl
lea rdi, [rsp+88h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rsp+88h+var_70]
add rsp, 88h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_60]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
jmp short loc_8B6C7
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8B6C7:
mov rdi, [rsp+arg_58]
call __Unwind_Resume
|
const std::locale * fmt::v10::detail::thousands_sep_impl<char>(const std::locale *a1, const std::locale *a2)
{
char v3; // [rsp+Fh] [rbp-79h]
long long v4; // [rsp+28h] [rbp-60h]
_BYTE v5[48]; // [rsp+38h] [rbp-50h] BYREF
_BYTE v6[8]; // [rsp+68h] [rbp-20h] BYREF
long long v7; // [rsp+70h] [rbp-18h]
const std::locale *v8[2]; // [rsp+78h] [rbp-10h] BYREF
v8[1] = a1;
v8[0] = a2;
fmt::v10::detail::locale_ref::get<std::locale>((std::locale *)v6, v8);
v4 = std::use_facet<std::numpunct<char>>(v6);
std::locale::~locale((std::locale *)v6);
v7 = v4;
std::numpunct<char>::grouping(v5, v4);
if ( std::string::empty((long long)v5) )
v3 = 0;
else
v3 = std::numpunct<char>::thousands_sep(v7);
std::string::basic_string((long long)a1, (long long)v5);
*((_BYTE *)a1 + 32) = v3;
std::string::~string(v5);
return a1;
}
|
thousands_sep_impl<char>:
SUB RSP,0x88
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
LEA RDI,[RSP + 0x68]
MOV qword ptr [RSP + 0x20],RDI
LEA RSI,[RSP + 0x78]
CALL 0x00187d10
MOV RDI,qword ptr [RSP + 0x20]
LAB_0018b5fa:
CALL 0x00114290
LAB_0018b5ff:
MOV qword ptr [RSP + 0x28],RAX
JMP 0x0018b606
LAB_0018b606:
LEA RDI,[RSP + 0x68]
CALL 0x00114a30
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x70],RAX
MOV RSI,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x38]
CALL 0x00114920
LEA RDI,[RSP + 0x38]
CALL 0x00139260
TEST AL,0x1
JNZ 0x0018b639
JMP 0x0018b641
LAB_0018b639:
XOR EAX,EAX
MOV byte ptr [RSP + 0xf],AL
JMP 0x0018b65b
LAB_0018b641:
MOV RDI,qword ptr [RSP + 0x70]
LAB_0018b646:
CALL 0x00114410
LAB_0018b64b:
MOV byte ptr [RSP + 0xe],AL
JMP 0x0018b651
LAB_0018b651:
MOV AL,byte ptr [RSP + 0xe]
MOV byte ptr [RSP + 0xf],AL
JMP 0x0018b65b
LAB_0018b65b:
MOV RDI,qword ptr [RSP + 0x10]
MOV AL,byte ptr [RSP + 0xf]
MOV byte ptr [RSP + 0x37],AL
LEA RSI,[RSP + 0x38]
CALL 0x0011b560
MOV RAX,qword ptr [RSP + 0x10]
MOV CL,byte ptr [RSP + 0x37]
MOV byte ptr [RAX + 0x20],CL
LEA RDI,[RSP + 0x38]
CALL 0x0011aac0
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x88
RET
|
/* fmt::v10::detail::thousands_sep_result<char>
fmt::v10::detail::thousands_sep_impl<char>(fmt::v10::detail::locale_ref) */
detail * __thiscall fmt::v10::detail::thousands_sep_impl<char>(detail *this,int8 param_2)
{
numpunct *pnVar1;
ulong uVar2;
detail local_79;
string local_50 [48];
locale local_20 [8];
numpunct *local_18;
int8 local_10;
detail *local_8;
local_10 = param_2;
local_8 = this;
locale_ref::get<std::locale>();
/* try { // try from 0018b5fa to 0018b5fe has its CatchHandler @ 0018b695 */
pnVar1 = std::use_facet<std::__cxx11::numpunct<char>>(local_20);
std::locale::~locale(local_20);
local_18 = pnVar1;
std::__cxx11::numpunct<char>::grouping();
uVar2 = std::__cxx11::string::empty(local_50);
if ((uVar2 & 1) == 0) {
/* try { // try from 0018b646 to 0018b64a has its CatchHandler @ 0018b6af */
local_79 = (detail)std::__cxx11::numpunct<char>::thousands_sep();
}
else {
local_79 = (detail)0x0;
}
std::__cxx11::string::string((string *)this,local_50);
this[0x20] = local_79;
std::__cxx11::string::~string(local_50);
return this;
}
|
|
12,204
|
my_coll_lexem_print_error
|
eloqsql/strings/ctype-uca.c
|
static void my_coll_lexem_print_error(MY_COLL_LEXEM *lexem,
char *errstr, size_t errsize,
const char *txt)
{
char tail[30];
size_t len= lexem->end - lexem->prev;
strmake (tail, lexem->prev, (size_t) MY_MIN(len, sizeof(tail)-1));
errstr[errsize-1]= '\0';
my_snprintf(errstr, errsize - 1,
"%s at '%s'", txt[0] ? txt : "Syntax error", tail);
}
|
O0
|
c
|
my_coll_lexem_print_error:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
cmpq $0x1d, -0x58(%rbp)
jae 0xacf74
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0xacf7f
movl $0x1d, %eax
movq %rax, -0x70(%rbp)
jmp 0xacf7f
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rdx
callq 0xd5860
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xacfcd
movq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0xacfdd
leaq 0x378e3(%rip), %rax # 0xe48b7
movq %rax, -0x88(%rbp)
jmp 0xacfdd
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rcx
leaq 0x378b9(%rip), %rdx # 0xe48ac
xorl %eax, %eax
leaq -0x30(%rbp), %r8
callq 0xd4cd0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xad019
addq $0x90, %rsp
popq %rbp
retq
callq 0x382c0
nop
|
my_coll_lexem_print_error:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov [rbp+var_50], rcx
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov rcx, [rbp+var_38]
mov rcx, [rcx+18h]
sub rax, rcx
mov [rbp+var_58], rax
lea rax, [rbp+var_30]
mov [rbp+var_68], rax
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov [rbp+var_60], rax
cmp [rbp+var_58], 1Dh
jnb short loc_ACF74
mov rax, [rbp+var_58]
mov [rbp+var_70], rax
jmp short loc_ACF7F
loc_ACF74:
mov eax, 1Dh
mov [rbp+var_70], rax
jmp short $+2
loc_ACF7F:
mov rsi, [rbp+var_60]
mov rdi, [rbp+var_68]
mov rdx, [rbp+var_70]
call strmake
mov rax, [rbp+var_40]
mov rcx, [rbp+var_48]
sub rcx, 1
mov byte ptr [rax+rcx], 0
mov rax, [rbp+var_40]
mov [rbp+var_80], rax
mov rax, [rbp+var_48]
sub rax, 1
mov [rbp+var_78], rax
mov rax, [rbp+var_50]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_ACFCD
mov rax, [rbp+var_50]
mov [rbp+var_88], rax
jmp short loc_ACFDD
loc_ACFCD:
lea rax, aSyntaxError; "Syntax error"
mov [rbp+var_88], rax
jmp short $+2
loc_ACFDD:
mov rsi, [rbp+var_78]
mov rdi, [rbp+var_80]
mov rcx, [rbp+var_88]
lea rdx, aSAtS; "%s at '%s'"
xor eax, eax
lea r8, [rbp+var_30]
call my_snprintf
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_AD019
add rsp, 90h
pop rbp
retn
loc_AD019:
call ___stack_chk_fail
|
unsigned long long my_coll_lexem_print_error(long long a1, long long a2, long long a3, _BYTE *a4)
{
int v4; // r9d
int v6; // [rsp+18h] [rbp-78h]
long long v7; // [rsp+30h] [rbp-60h]
unsigned long long v8; // [rsp+38h] [rbp-58h]
_BYTE v11[40]; // [rsp+60h] [rbp-30h] BYREF
unsigned long long v12; // [rsp+88h] [rbp-8h]
v12 = __readfsqword(0x28u);
v8 = *(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 24);
v7 = *(_QWORD *)(a1 + 24);
if ( v8 >= 0x1D )
strmake(v11, v7, 29LL);
else
strmake(v11, v7, v8);
*(_BYTE *)(a2 + a3 - 1) = 0;
v6 = a3 - 1;
if ( *a4 )
my_snprintf(a2, v6, (unsigned int)"%s at '%s'", (_DWORD)a4, (unsigned int)v11, v4);
else
my_snprintf(a2, v6, (unsigned int)"%s at '%s'", (unsigned int)"Syntax error", (unsigned int)v11, v4);
return __readfsqword(0x28u);
}
|
my_coll_lexem_print_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV qword ptr [RBP + -0x50],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x60],RAX
CMP qword ptr [RBP + -0x58],0x1d
JNC 0x001acf74
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x70],RAX
JMP 0x001acf7f
LAB_001acf74:
MOV EAX,0x1d
MOV qword ptr [RBP + -0x70],RAX
JMP 0x001acf7f
LAB_001acf7f:
MOV RSI,qword ptr [RBP + -0x60]
MOV RDI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x001d5860
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x48]
SUB RCX,0x1
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x48]
SUB RAX,0x1
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001acfcd
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x88],RAX
JMP 0x001acfdd
LAB_001acfcd:
LEA RAX,[0x1e48b7]
MOV qword ptr [RBP + -0x88],RAX
JMP 0x001acfdd
LAB_001acfdd:
MOV RSI,qword ptr [RBP + -0x78]
MOV RDI,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x88]
LEA RDX,[0x1e48ac]
XOR EAX,EAX
LEA R8,[RBP + -0x30]
CALL 0x001d4cd0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001ad019
ADD RSP,0x90
POP RBP
RET
LAB_001ad019:
CALL 0x001382c0
|
void my_coll_lexem_print_error(long param_1,long param_2,long param_3,char *param_4)
{
long in_FS_OFFSET;
char *local_90;
ulong local_78;
int1 local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_78 = *(long *)(param_1 + 0x10) - *(long *)(param_1 + 0x18);
if (0x1c < local_78) {
local_78 = 0x1d;
}
strmake(local_38,*(int8 *)(param_1 + 0x18),local_78);
*(int1 *)(param_2 + param_3 + -1) = 0;
local_90 = param_4;
if (*param_4 == '\0') {
local_90 = "Syntax error";
}
my_snprintf(param_2,param_3 + -1,"%s at \'%s\'",local_90,local_38);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
12,205
|
YAML::Node YAML::Node::operator[]<char [7]>(char const (&) [7])
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/impl.h
|
inline Node Node::operator[](const Key& key) {
EnsureNodeExists();
detail::node& value = m_pNode->get(key, m_pMemory);
return Node(value, m_pMemory);
}
|
O0
|
c
|
YAML::Node YAML::Node::operator[]<char [7]>(char const (&) [7]):
subq $0x98, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xe3390
movq 0x20(%rsp), %rsi
movq 0x38(%rsi), %rax
movq %rax, 0x28(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
addq $0x28, %rsi
leaq 0x68(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xda5a0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x10f660
movq %rax, 0x40(%rsp)
jmp 0x10e157
leaq 0x68(%rsp), %rdi
callq 0xda6e0
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rsi
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, (%rsp)
addq $0x28, %rsi
leaq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xda5a0
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0xe35d0
jmp 0x10e1a1
leaq 0x48(%rsp), %rdi
callq 0xda6e0
movq 0x18(%rsp), %rax
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0xda6e0
jmp 0x10e1ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xda6e0
movq 0x60(%rsp), %rdi
callq 0x90db0
nopw %cs:(%rax,%rax)
nop
|
_ZN4YAML4NodeixIA11_cEES0_RKT_:
sub rsp, 98h
mov [rsp+98h+var_88], rdi
mov rax, rdi
mov [rsp+98h+var_80], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov [rsp+98h+var_18], rdx
mov rdi, [rsp+98h+var_10]; this
mov [rsp+98h+var_78], rdi
call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void)
mov rsi, [rsp+98h+var_78]
mov rax, [rsi+38h]
mov [rsp+98h+var_70], rax
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_68], rax
add rsi, 28h ; '('
lea rdi, [rsp+98h+var_30]
mov [rsp+98h+var_60], rdi
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&)
mov rdi, [rsp+98h+var_70]
mov rsi, [rsp+98h+var_68]
mov rdx, [rsp+98h+var_60]
call _ZN4YAML6detail4node3getIA11_cEERS1_RKT_St10shared_ptrINS0_13memory_holderEE; YAML::detail::node::get<char [11]>(char [11] const&,std::shared_ptr<YAML::detail::memory_holder>)
mov [rsp+98h+var_58], rax
jmp short $+2
loc_10E157:
lea rdi, [rsp+98h+var_30]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
mov rax, [rsp+98h+var_58]
mov rsi, [rsp+98h+var_78]
mov [rsp+98h+var_20], rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_98], rax
add rsi, 28h ; '('
lea rdi, [rsp+98h+var_50]
mov [rsp+98h+var_90], rdi
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&)
mov rdi, [rsp+98h+var_88]
mov rsi, [rsp+98h+var_98]
mov rdx, [rsp+98h+var_90]
call _ZN4YAML4NodeC2ERNS_6detail4nodeESt10shared_ptrINS1_13memory_holderEE; YAML::Node::Node(YAML::detail::node &,std::shared_ptr<YAML::detail::memory_holder>)
jmp short $+2
loc_10E1A1:
lea rdi, [rsp+98h+var_50]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
mov rax, [rsp+98h+var_80]
add rsp, 98h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_60]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
jmp short loc_10E1EA
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_40]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
loc_10E1EA:
mov rdi, [rsp+arg_58]
call __Unwind_Resume
|
long long YAML::Node::operator[]<char [11]>(long long a1, YAML::Node *a2, long long a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v7; // [rsp+28h] [rbp-70h]
int v8; // [rsp+30h] [rbp-68h]
long long v9; // [rsp+40h] [rbp-58h]
_BYTE v10[32]; // [rsp+48h] [rbp-50h] BYREF
_BYTE v11[16]; // [rsp+68h] [rbp-30h] BYREF
long long v12; // [rsp+78h] [rbp-20h]
long long v13; // [rsp+80h] [rbp-18h]
YAML::Node *v14; // [rsp+88h] [rbp-10h]
long long v15; // [rsp+90h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
YAML::Node::EnsureNodeExists((YAML::detail::node **)a2);
v7 = *((_QWORD *)a2 + 7);
v8 = v13;
std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v11, (long long)a2 + 40);
v9 = YAML::detail::node::get<char [11]>(v7, v8, (unsigned int)v11, v3, v4, v5);
std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v11);
v12 = v9;
std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v10, (long long)a2 + 40);
YAML::Node::Node(a1, v9, (long long)v10);
std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v10);
return a1;
}
| |||
12,206
|
YAML::Node YAML::Node::operator[]<char [7]>(char const (&) [7])
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/impl.h
|
inline Node Node::operator[](const Key& key) {
EnsureNodeExists();
detail::node& value = m_pNode->get(key, m_pMemory);
return Node(value, m_pMemory);
}
|
O3
|
c
|
YAML::Node YAML::Node::operator[]<char [7]>(char const (&) [7]):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4a4ba
movq 0x28(%r15), %rax
movq 0x38(%r15), %rdi
movq %rax, (%rsp)
movq 0x30(%r15), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x519d1
movq 0x1be565(%rip), %rcx # 0x20ff28
cmpb $0x0, (%rcx)
je 0x519cd
incl 0x8(%rax)
jmp 0x519d1
lock
incl 0x8(%rax)
movq %rsp, %rdx
movq %r14, %rsi
callq 0x5257e
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x519ee
callq 0x466d6
movq 0x28(%r15), %rax
movq 0x30(%r15), %rdi
testq %rdi, %rdi
je 0x51a2b
movq 0x1be526(%rip), %rdx # 0x20ff28
leaq 0x18(%rbx), %rcx
cmpb $0x0, (%rdx)
je 0x51a4e
incl 0x8(%rdi)
movb $0x1, (%rbx)
movq %rcx, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
movq %rax, 0x28(%rbx)
movq %rdi, 0x30(%rbx)
jmp 0x51a72
movb $0x1, (%rbx)
leaq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
movq %rax, 0x28(%rbx)
movq %rcx, 0x30(%rbx)
movq %r14, 0x38(%rbx)
jmp 0x51a7e
lock
incl 0x8(%rdi)
cmpb $0x0, (%rdx)
movb $0x1, (%rbx)
movq %rcx, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
movq %rax, 0x28(%rbx)
movq %rdi, 0x30(%rbx)
je 0x51a8b
incl 0x8(%rdi)
movq %r14, 0x38(%rbx)
callq 0x466d6
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
lock
incl 0x8(%rdi)
jmp 0x51a75
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x51aa3
callq 0x466d6
movq %rbx, %rdi
callq 0x2e220
nop
|
_ZN4YAML4NodeixIA19_cEES0_RKT_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, rsi; this
call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void)
mov rax, [r15+28h]
mov rdi, [r15+38h]; YAML::detail::node *
mov qword ptr [rsp+28h+var_28], rax; int
mov rax, [r15+30h]
mov [rsp+28h+var_20], rax; __int64
test rax, rax
jz short loc_519D1
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_519CD
inc dword ptr [rax+8]
jmp short loc_519D1
loc_519CD:
lock inc dword ptr [rax+8]
loc_519D1:
mov rdx, rsp
mov rsi, r14
call _ZN4YAML6detail4node3getIA19_cEERS1_RKT_St10shared_ptrINS0_13memory_holderEE; YAML::detail::node::get<char [19]>(char [19] const&,std::shared_ptr<YAML::detail::memory_holder>)
mov r14, rax
mov rdi, [rsp+28h+var_20]
test rdi, rdi
jz short loc_519EE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_519EE:
mov rax, [r15+28h]
mov rdi, [r15+30h]
test rdi, rdi
jz short loc_51A2B
mov rdx, cs:__libc_single_threaded_ptr
lea rcx, [rbx+18h]
cmp byte ptr [rdx], 0
jz short loc_51A4E
inc dword ptr [rdi+8]
mov byte ptr [rbx], 1
mov [rbx+8], rcx
mov qword ptr [rbx+10h], 0
mov byte ptr [rbx+18h], 0
mov [rbx+28h], rax
mov [rbx+30h], rdi
jmp short loc_51A72
loc_51A2B:
mov byte ptr [rbx], 1
lea rcx, [rbx+18h]
mov [rbx+8], rcx
xor ecx, ecx
mov [rbx+10h], rcx
mov byte ptr [rbx+18h], 0
mov [rbx+28h], rax
mov [rbx+30h], rcx
mov [rbx+38h], r14
jmp short loc_51A7E
loc_51A4E:
lock inc dword ptr [rdi+8]
cmp byte ptr [rdx], 0
mov byte ptr [rbx], 1
mov [rbx+8], rcx
mov qword ptr [rbx+10h], 0
mov byte ptr [rbx+18h], 0
mov [rbx+28h], rax
mov [rbx+30h], rdi
jz short loc_51A8B
loc_51A72:
inc dword ptr [rdi+8]
loc_51A75:
mov [rbx+38h], r14
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_51A7E:
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_51A8B:
lock inc dword ptr [rdi+8]
jmp short loc_51A75
mov rbx, rax
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_51AA3
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_51AA3:
mov rdi, rbx
call __Unwind_Resume
|
long long YAML::Node::operator[]<char [19]>(long long a1, long long a2)
{
YAML::detail::node *v3; // rdi
long long v4; // rax
long long v5; // r14
long long v6; // rax
volatile signed __int32 *v7; // rdi
long long v8; // rcx
bool v9; // zf
int v11[2]; // [rsp+0h] [rbp-28h]
volatile signed __int32 *v12; // [rsp+8h] [rbp-20h]
YAML::Node::EnsureNodeExists((YAML::detail::memory ***)a2);
v3 = *(YAML::detail::node **)(a2 + 56);
*(_QWORD *)v11 = *(_QWORD *)(a2 + 40);
v4 = *(_QWORD *)(a2 + 48);
if ( v4 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v4 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v4 + 8));
}
v5 = YAML::detail::node::get<char [19]>(v3, v11[0], v4);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
v6 = *(_QWORD *)(a2 + 40);
v7 = *(volatile signed __int32 **)(a2 + 48);
if ( v7 )
{
v8 = a1 + 24;
if ( _libc_single_threaded )
{
++*((_DWORD *)v7 + 2);
*(_BYTE *)a1 = 1;
*(_QWORD *)(a1 + 8) = v8;
*(_QWORD *)(a1 + 16) = 0LL;
*(_BYTE *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 40) = v6;
*(_QWORD *)(a1 + 48) = v7;
}
else
{
_InterlockedIncrement(v7 + 2);
v9 = _libc_single_threaded == 0;
*(_BYTE *)a1 = 1;
*(_QWORD *)(a1 + 8) = v8;
*(_QWORD *)(a1 + 16) = 0LL;
*(_BYTE *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 40) = v6;
*(_QWORD *)(a1 + 48) = v7;
if ( v9 )
{
_InterlockedIncrement(v7 + 2);
goto LABEL_13;
}
}
++*((_DWORD *)v7 + 2);
LABEL_13:
*(_QWORD *)(a1 + 56) = v5;
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7);
return a1;
}
*(_BYTE *)a1 = 1;
*(_QWORD *)(a1 + 8) = a1 + 24;
*(_QWORD *)(a1 + 16) = 0LL;
*(_BYTE *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 40) = v6;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 56) = v5;
return a1;
}
|
operator[]<char[19]>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x0014a4ba
MOV RAX,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [R15 + 0x38]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [R15 + 0x30]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x001519d1
MOV RCX,qword ptr [0x0030ff28]
CMP byte ptr [RCX],0x0
JZ 0x001519cd
INC dword ptr [RAX + 0x8]
JMP 0x001519d1
LAB_001519cd:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001519d1:
MOV RDX,RSP
MOV RSI,R14
CALL 0x0015257e
LAB_001519dc:
MOV R14,RAX
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001519ee
CALL 0x001466d6
LAB_001519ee:
MOV RAX,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [R15 + 0x30]
TEST RDI,RDI
JZ 0x00151a2b
MOV RDX,qword ptr [0x0030ff28]
LEA RCX,[RBX + 0x18]
CMP byte ptr [RDX],0x0
JZ 0x00151a4e
INC dword ptr [RDI + 0x8]
MOV byte ptr [RBX],0x1
MOV qword ptr [RBX + 0x8],RCX
MOV qword ptr [RBX + 0x10],0x0
MOV byte ptr [RBX + 0x18],0x0
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x30],RDI
JMP 0x00151a72
LAB_00151a2b:
MOV byte ptr [RBX],0x1
LEA RCX,[RBX + 0x18]
MOV qword ptr [RBX + 0x8],RCX
XOR ECX,ECX
MOV qword ptr [RBX + 0x10],RCX
MOV byte ptr [RBX + 0x18],0x0
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x30],RCX
MOV qword ptr [RBX + 0x38],R14
JMP 0x00151a7e
LAB_00151a4e:
INC.LOCK dword ptr [RDI + 0x8]
CMP byte ptr [RDX],0x0
MOV byte ptr [RBX],0x1
MOV qword ptr [RBX + 0x8],RCX
MOV qword ptr [RBX + 0x10],0x0
MOV byte ptr [RBX + 0x18],0x0
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x30],RDI
JZ 0x00151a8b
LAB_00151a72:
INC dword ptr [RDI + 0x8]
LAB_00151a75:
MOV qword ptr [RBX + 0x38],R14
CALL 0x001466d6
LAB_00151a7e:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_00151a8b:
INC.LOCK dword ptr [RDI + 0x8]
JMP 0x00151a75
|
/* YAML::Node YAML::Node::operator[]<char [19]>(char const (&) [19]) */
char * YAML::Node::operator[]<char[19]>(char *param_1)
{
char cVar1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2;
int8 uVar3;
int *puVar4;
node *pnVar5;
Node *in_RSI;
EnsureNodeExists(in_RSI);
pnVar5 = *(node **)(in_RSI + 0x38);
p_Var2 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 0x30);
if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0030ff28 == '\0') {
LOCK();
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
UNLOCK();
}
else {
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
}
}
/* try { // try from 001519d1 to 001519db has its CatchHandler @ 00151a91 */
pnVar5 = detail::node::get<char[19]>(pnVar5);
if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2);
}
puVar4 = PTR___libc_single_threaded_0030ff28;
uVar3 = *(int8 *)(in_RSI + 0x28);
p_Var2 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 0x30);
if (p_Var2 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
*param_1 = '\x01';
*(char **)(param_1 + 8) = param_1 + 0x18;
param_1[0x10] = '\0';
param_1[0x11] = '\0';
param_1[0x12] = '\0';
param_1[0x13] = '\0';
param_1[0x14] = '\0';
param_1[0x15] = '\0';
param_1[0x16] = '\0';
param_1[0x17] = '\0';
param_1[0x18] = '\0';
*(int8 *)(param_1 + 0x28) = uVar3;
param_1[0x30] = '\0';
param_1[0x31] = '\0';
param_1[0x32] = '\0';
param_1[0x33] = '\0';
param_1[0x34] = '\0';
param_1[0x35] = '\0';
param_1[0x36] = '\0';
param_1[0x37] = '\0';
*(node **)(param_1 + 0x38) = pnVar5;
return param_1;
}
if (*PTR___libc_single_threaded_0030ff28 == '\0') {
LOCK();
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
UNLOCK();
cVar1 = *puVar4;
*param_1 = '\x01';
*(char **)(param_1 + 8) = param_1 + 0x18;
param_1[0x10] = '\0';
param_1[0x11] = '\0';
param_1[0x12] = '\0';
param_1[0x13] = '\0';
param_1[0x14] = '\0';
param_1[0x15] = '\0';
param_1[0x16] = '\0';
param_1[0x17] = '\0';
param_1[0x18] = '\0';
*(int8 *)(param_1 + 0x28) = uVar3;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x30) = p_Var2;
if (cVar1 == '\0') {
LOCK();
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
UNLOCK();
goto LAB_00151a75;
}
}
else {
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
*param_1 = '\x01';
*(char **)(param_1 + 8) = param_1 + 0x18;
param_1[0x10] = '\0';
param_1[0x11] = '\0';
param_1[0x12] = '\0';
param_1[0x13] = '\0';
param_1[0x14] = '\0';
param_1[0x15] = '\0';
param_1[0x16] = '\0';
param_1[0x17] = '\0';
param_1[0x18] = '\0';
*(int8 *)(param_1 + 0x28) = uVar3;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x30) = p_Var2;
}
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
LAB_00151a75:
*(node **)(param_1 + 0x38) = pnVar5;
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2);
return param_1;
}
|
|
12,207
|
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
LiteralExpr(const Location & location, const Value& v)
: Expression(location), value(v) {}
|
O3
|
cpp
|
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8c141(%rip), %r15 # 0xdb278
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x4f167
movq 0x8de2f(%rip), %rcx # 0xdcf88
cmpb $0x0, (%rcx)
je 0x4f163
incl 0x8(%rax)
jmp 0x4f167
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8c3c2(%rip), %rax # 0xdb538
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %rdx, %rsi
callq 0x4eb90
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4f1a3
callq 0x2f99c
movq %r14, %rdi
callq 0x18b90
nop
|
_ZN5minja11LiteralExprC2ERKNS_8LocationERKNS_5ValueE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_4F167
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_4F163
inc dword ptr [rax+8]
jmp short loc_4F167
loc_4F163:
lock inc dword ptr [rax+8]
loc_4F167:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja11LiteralExprE; `vtable for'minja::LiteralExpr
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]; this
mov rsi, rdx; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_4F1A3
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_4F1A3:
mov rdi, r14
call __Unwind_Resume
|
long long minja::LiteralExpr::LiteralExpr(_QWORD *a1, _QWORD *a2, const minja::Value *a3)
{
long long v3; // rax
*a1 = &`vtable for'minja::Expression + 2;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &`vtable for'minja::LiteralExpr + 2;
return minja::Value::Value((minja::Value *)(a1 + 4), a3);
}
|
LiteralExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x1db278]
ADD R15,0x10
MOV qword ptr [RDI],R15
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 0x0014f167
MOV RCX,qword ptr [0x001dcf88]
CMP byte ptr [RCX],0x0
JZ 0x0014f163
INC dword ptr [RAX + 0x8]
JMP 0x0014f167
LAB_0014f163:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0014f167:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1db538]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_0014f181:
MOV RSI,RDX
CALL 0x0014eb90
LAB_0014f189:
POP RBX
POP R14
POP R15
RET
|
/* minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&) */
void __thiscall minja::LiteralExpr::LiteralExpr(LiteralExpr *this,Location *param_1,Value *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_001db288;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001dcf88 == '\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_evaluate_001db548;
/* try { // try from 0014f181 to 0014f188 has its CatchHandler @ 0014f18f */
Value::Value((Value *)(this + 0x20),param_2);
return;
}
|
|
12,208
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/json.hpp
|
void push_back(basic_json&& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (move semantics)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(std::move(val));
set_parent(m_data.m_value.array->back(), old_capacity);
// if val is moved from, basic_json move constructor marks it null, so we do not call the destructor
}
|
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0x93300
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x196c0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x31156
jmp 0x93305
cmpl $0x2, %eax
jne 0x93319
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x35b82
movl $0x20, %edi
callq 0x19370
movq %rax, %rbx
movq %r14, %rdi
callq 0x374f2
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2839b(%rip), %rsi # 0xbb6d8
leaq 0x10(%rsp), %rdi
callq 0x46958
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x3729e
xorl %ebp, %ebp
leaq 0x55e20(%rip), %rsi # 0xe9188
leaq -0x5fbed(%rip), %rdx # 0x33782
movq %rbx, %rdi
callq 0x19ba0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93395
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x196d0
testb %bpl, %bpl
jne 0x9339f
jmp 0x933a7
movq %rax, %r14
movq %rbx, %rdi
callq 0x19510
movq %r14, %rdi
callq 0x19c00
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_93300
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)
jmp short loc_93305
loc_93300:
cmp eax, 2
jnz short loc_93319
loc_93305:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
loc_93319:
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, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93395
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93395:
test bpl, bpl
jnz short loc_9339F
jmp short loc_933A7
mov r14, rax
loc_9339F:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_933A7:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"cannot use push_back() with ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
else
{
*(_BYTE *)a1 = 2;
v2 = operator new(0x18uLL);
*(_OWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*(_QWORD *)(a1 + 8),
a2);
}
|
push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x00193300
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x001196c0
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 0x00131156
JMP 0x00193305
LAB_00193300:
CMP EAX,0x2
JNZ 0x00193319
LAB_00193305:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x00135b82
LAB_00193319:
MOV EDI,0x20
CALL 0x00119370
MOV RBX,RAX
MOV RDI,R14
CALL 0x001374f2
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00193336:
LEA RSI,[0x1bb6d8]
LEA RDI,[RSP + 0x10]
CALL 0x00146958
MOV BPL,0x1
LAB_0019334a:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x0013729e
XOR EBP,EBP
LEA RSI,[0x1e9188]
LEA RDX,[0x133782]
MOV RDI,RBX
CALL 0x00119ba0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
int8 *puVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar1 = (int8 *)operator_new(0x18);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00193336 to 00193346 has its CatchHandler @ 0019339c */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 0019334a to 00193376 has its CatchHandler @ 00193377 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return;
}
|
|
12,209
|
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/regularPatchBuilder.cpp
|
int
RegularPatchBuilder::GetBoundaryMask(int faceSize, Index const cvs[]) {
bool isQuad = (faceSize == 4);
if (isQuad) {
int eMask = ((cvs[ 1] < 0) << 0) |
((cvs[ 7] < 0) << 1) |
((cvs[14] < 0) << 2) |
((cvs[ 8] < 0) << 3);
return eMask;
} else {
int eMask = ((cvs[ 1] < 0) << 0) |
((cvs[ 9] < 0) << 1) |
((cvs[ 7] < 0) << 2) ;
int vMask = (((cvs[ 0] < 0) | (cvs[ 3] < 0)) << 0) |
(((cvs[ 2] < 0) | (cvs[ 6] < 0)) << 1) |
(((cvs[10] < 0) | (cvs[11] < 0)) << 2) ;
return encodeTriBoundaryMask(eMask, vMask);
}
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x8(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x1aa013
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setl %al
andb $0x1, %al
movzbl %al, %eax
shll $0x0, %eax
movq -0x10(%rbp), %rcx
cmpl $0x0, 0x1c(%rcx)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
cmpl $0x0, 0x38(%rcx)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x2, %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
cmpl $0x0, 0x20(%rcx)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x3, %ecx
orl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1aa0db
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setl %al
andb $0x1, %al
movzbl %al, %eax
shll $0x0, %eax
movq -0x10(%rbp), %rcx
cmpl $0x0, 0x24(%rcx)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
cmpl $0x0, 0x1c(%rcx)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
setl %al
andb $0x1, %al
movzbl %al, %eax
movq -0x10(%rbp), %rcx
cmpl $0x0, 0xc(%rcx)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
shll $0x0, %eax
movq -0x10(%rbp), %rcx
cmpl $0x0, 0x8(%rcx)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
movq -0x10(%rbp), %rdx
cmpl $0x0, 0x18(%rdx)
setl %dl
andb $0x1, %dl
movzbl %dl, %edx
orl %edx, %ecx
shll %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
cmpl $0x0, 0x28(%rcx)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
movq -0x10(%rbp), %rdx
cmpl $0x0, 0x2c(%rdx)
setl %dl
andb $0x1, %dl
movzbl %dl, %edx
orl %edx, %ecx
shll $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
callq 0x1aa0f0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder15GetBoundaryMaskEiPKi:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
cmp [rbp+var_8], 4
setz al
and al, 1
mov [rbp+var_11], al
test [rbp+var_11], 1
jz short loc_1AA013
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
setl al
and al, 1
movzx eax, al
shl eax, 0
mov rcx, [rbp+var_10]
cmp dword ptr [rcx+1Ch], 0
setl cl
and cl, 1
movzx ecx, cl
shl ecx, 1
or eax, ecx
mov rcx, [rbp+var_10]
cmp dword ptr [rcx+38h], 0
setl cl
and cl, 1
movzx ecx, cl
shl ecx, 2
or eax, ecx
mov rcx, [rbp+var_10]
cmp dword ptr [rcx+20h], 0
setl cl
and cl, 1
movzx ecx, cl
shl ecx, 3
or eax, ecx
mov dword ptr [rbp+var_1C+4], eax
mov eax, dword ptr [rbp+var_1C+4]
mov [rbp+var_4], eax
jmp loc_1AA0DB
loc_1AA013:
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
setl al
and al, 1
movzx eax, al
shl eax, 0
mov rcx, [rbp+var_10]
cmp dword ptr [rcx+24h], 0
setl cl
and cl, 1
movzx ecx, cl
shl ecx, 1
or eax, ecx
mov rcx, [rbp+var_10]
cmp dword ptr [rcx+1Ch], 0
setl cl
and cl, 1
movzx ecx, cl
shl ecx, 2
or eax, ecx
mov dword ptr [rbp+var_1C], eax
mov rax, [rbp+var_10]
cmp dword ptr [rax], 0
setl al
and al, 1
movzx eax, al
mov rcx, [rbp+var_10]
cmp dword ptr [rcx+0Ch], 0
setl cl
and cl, 1
movzx ecx, cl
or eax, ecx
shl eax, 0
mov rcx, [rbp+var_10]
cmp dword ptr [rcx+8], 0
setl cl
and cl, 1
movzx ecx, cl
mov rdx, [rbp+var_10]
cmp dword ptr [rdx+18h], 0
setl dl
and dl, 1
movzx edx, dl
or ecx, edx
shl ecx, 1
or eax, ecx
mov rcx, [rbp+var_10]
cmp dword ptr [rcx+28h], 0
setl cl
and cl, 1
movzx ecx, cl
mov rdx, [rbp+var_10]
cmp dword ptr [rdx+2Ch], 0
setl dl
and dl, 1
movzx edx, dl; int
or ecx, edx
shl ecx, 2
or eax, ecx
mov [rbp+var_20], eax
mov edi, dword ptr [rbp+var_1C]; this
mov esi, [rbp+var_20]; int
call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::encodeTriBoundaryMask(int,int)
mov [rbp+var_4], eax
loc_1AA0DB:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder *this,
int *a2,
const int *a3)
{
if ( (_DWORD)this == 4 )
return (unsigned int)((8 * (a2[8] < 0)) | (4 * (a2[14] < 0)) | (2 * (a2[7] < 0)) | (a2[1] < 0));
else
return (unsigned int)OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::encodeTriBoundaryMask(
(OpenSubdiv::v3_6_0::Bfr::_anonymous_namespace_ *)((4 * (a2[7] < 0)) | (2 * (a2[9] < 0)) | (unsigned int)(a2[1] < 0)),
(4 * (a2[11] < 0 || a2[10] < 0)) | (2 * (a2[6] < 0 || a2[2] < 0)) | (a2[3] < 0) | (unsigned int)(*a2 < 0),
a2[11] < 0);
}
| |||
12,210
|
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/regularPatchBuilder.cpp
|
int
RegularPatchBuilder::GetBoundaryMask(int faceSize, Index const cvs[]) {
bool isQuad = (faceSize == 4);
if (isQuad) {
int eMask = ((cvs[ 1] < 0) << 0) |
((cvs[ 7] < 0) << 1) |
((cvs[14] < 0) << 2) |
((cvs[ 8] < 0) << 3);
return eMask;
} else {
int eMask = ((cvs[ 1] < 0) << 0) |
((cvs[ 9] < 0) << 1) |
((cvs[ 7] < 0) << 2) ;
int vMask = (((cvs[ 0] < 0) | (cvs[ 3] < 0)) << 0) |
(((cvs[ 2] < 0) | (cvs[ 6] < 0)) << 1) |
(((cvs[10] < 0) | (cvs[11] < 0)) << 2) ;
return encodeTriBoundaryMask(eMask, vMask);
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*):
movl 0x4(%rsi), %edx
shrl $0x1f, %edx
cmpl $0x4, %edi
jne 0x956a0
movl 0x1c(%rsi), %eax
movl 0x20(%rsi), %ecx
shrl $0x1f, %eax
movl 0x38(%rsi), %esi
shrl $0x1f, %esi
shll $0x2, %esi
leal (%rsi,%rax,2), %eax
shrl $0x1f, %ecx
leal (%rax,%rcx,8), %eax
jmp 0x9570e
movl 0x24(%rsi), %eax
shrl $0x1f, %eax
movl 0x1c(%rsi), %ecx
shrl $0x1f, %ecx
shll $0x2, %ecx
leal (%rcx,%rax,2), %ecx
orl %edx, %ecx
movl 0xc(%rsi), %eax
movl 0x18(%rsi), %edx
orl (%rsi), %eax
shrl $0x1f, %eax
orl 0x8(%rsi), %edx
shrl $0x1f, %edx
leal (%rax,%rdx,2), %edi
movl 0x2c(%rsi), %edx
orl 0x28(%rsi), %edx
shrl $0x1d, %edx
andl $-0x4, %edx
xorl %eax, %eax
orl %edi, %edx
je 0x95705
testl %ecx, %ecx
je 0x95709
cmpl $0x7, %edx
jne 0x95705
cmpl $0x4, %ecx
ja 0x95705
movl $0x17, %edx
btl %ecx, %edx
jae 0x95705
movl %ecx, %eax
leaq 0x2b995(%rip), %rcx # 0xc1090
movl (%rcx,%rax,4), %edx
movl $0x10, %eax
jmp 0x9570e
movl %ecx, %edx
jmp 0x9570e
movl $0x8, %eax
orl %edx, %eax
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder15GetBoundaryMaskEiPKi:
mov edx, [rsi+4]
shr edx, 1Fh
cmp edi, 4
jnz short loc_956A0
mov eax, [rsi+1Ch]
mov ecx, [rsi+20h]
shr eax, 1Fh
mov esi, [rsi+38h]
shr esi, 1Fh
shl esi, 2
lea eax, [rsi+rax*2]
shr ecx, 1Fh
lea eax, [rax+rcx*8]
jmp short loc_9570E
loc_956A0:
mov eax, [rsi+24h]
shr eax, 1Fh
mov ecx, [rsi+1Ch]
shr ecx, 1Fh
shl ecx, 2
lea ecx, [rcx+rax*2]
or ecx, edx
mov eax, [rsi+0Ch]
mov edx, [rsi+18h]
or eax, [rsi]
shr eax, 1Fh
or edx, [rsi+8]
shr edx, 1Fh
lea edi, [rax+rdx*2]
mov edx, [rsi+2Ch]
or edx, [rsi+28h]
shr edx, 1Dh
and edx, 0FFFFFFFCh
xor eax, eax
or edx, edi
jz short loc_95705
test ecx, ecx
jz short loc_95709
cmp edx, 7
jnz short loc_95705
cmp ecx, 4
ja short loc_95705
mov edx, 17h
bt edx, ecx
jnb short loc_95705
mov eax, ecx
lea rcx, unk_C1090
mov edx, [rcx+rax*4]
mov eax, 10h
jmp short loc_9570E
loc_95705:
mov edx, ecx
jmp short loc_9570E
loc_95709:
mov eax, 8
loc_9570E:
or eax, edx
retn
|
long long OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder *this,
_DWORD *a2,
const int *a3)
{
int v3; // edx
int v4; // eax
unsigned int v5; // ecx
int v6; // edx
v3 = a2[1] >> 31;
if ( (_DWORD)this == 4 )
{
v4 = 4 * (a2[14] >> 31) + 2 * (a2[7] >> 31) + 8 * (a2[8] >> 31);
}
else
{
v5 = v3 | (4 * (a2[7] >> 31) + 2 * (a2[9] >> 31));
v4 = 0;
v3 = (((unsigned int)(*a2 | a2[3]) >> 31) + 2 * ((unsigned int)(a2[2] | a2[6]) >> 31)) | ((unsigned int)(a2[10] | a2[11]) >> 29) & 0xFFFFFFFC;
if ( !v3 )
goto LABEL_9;
if ( !v5 )
{
v4 = 8;
return v3 | (unsigned int)v4;
}
if ( v3 == 7 && v5 <= 4 && (v6 = 23, _bittest(&v6, v5)) )
{
v3 = dword_C1090[v5];
v4 = 16;
}
else
{
LABEL_9:
v3 = v5;
}
}
return v3 | (unsigned int)v4;
}
|
GetBoundaryMask:
MOV EDX,dword ptr [RSI + 0x4]
SHR EDX,0x1f
CMP EDI,0x4
JNZ 0x001956a0
MOV EAX,dword ptr [RSI + 0x1c]
MOV ECX,dword ptr [RSI + 0x20]
SHR EAX,0x1f
MOV ESI,dword ptr [RSI + 0x38]
SHR ESI,0x1f
SHL ESI,0x2
LEA EAX,[RSI + RAX*0x2]
SHR ECX,0x1f
LEA EAX,[RAX + RCX*0x8]
JMP 0x0019570e
LAB_001956a0:
MOV EAX,dword ptr [RSI + 0x24]
SHR EAX,0x1f
MOV ECX,dword ptr [RSI + 0x1c]
SHR ECX,0x1f
SHL ECX,0x2
LEA ECX,[RCX + RAX*0x2]
OR ECX,EDX
MOV EAX,dword ptr [RSI + 0xc]
MOV EDX,dword ptr [RSI + 0x18]
OR EAX,dword ptr [RSI]
SHR EAX,0x1f
OR EDX,dword ptr [RSI + 0x8]
SHR EDX,0x1f
LEA EDI,[RAX + RDX*0x2]
MOV EDX,dword ptr [RSI + 0x2c]
OR EDX,dword ptr [RSI + 0x28]
SHR EDX,0x1d
AND EDX,0xfffffffc
XOR EAX,EAX
OR EDX,EDI
JZ 0x00195705
TEST ECX,ECX
JZ 0x00195709
CMP EDX,0x7
JNZ 0x00195705
CMP ECX,0x4
JA 0x00195705
MOV EDX,0x17
BT EDX,ECX
JNC 0x00195705
MOV EAX,ECX
LEA RCX,[0x1c1090]
MOV EDX,dword ptr [RCX + RAX*0x4]
MOV EAX,0x10
JMP 0x0019570e
LAB_00195705:
MOV EDX,ECX
JMP 0x0019570e
LAB_00195709:
MOV EAX,0x8
LAB_0019570e:
OR EAX,EDX
RET
|
/* OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*) */
uint OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int param_1,int *param_2)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uVar4 = (uint)param_2[1] >> 0x1f;
if (param_1 == 4) {
uVar2 = (param_2[0xe] >> 0x1f) * -4 + (param_2[7] >> 0x1f) * -2 + (param_2[8] >> 0x1f) * -8;
uVar3 = uVar4;
}
else {
uVar1 = (param_2[7] >> 0x1f) * -4 + (param_2[9] >> 0x1f) * -2;
uVar3 = uVar1 | uVar4;
uVar2 = 0;
uVar5 = (uint)(param_2[0xb] | param_2[10]) >> 0x1d & 0xfffffffc |
((param_2[6] | param_2[2]) >> 0x1f) * -2 - ((param_2[3] | *param_2) >> 0x1f);
if (uVar5 != 0) {
if (uVar3 == 0) {
uVar2 = 8;
uVar3 = uVar5;
}
else if (((uVar5 == 7) && (uVar3 < 5)) && ((0x17U >> (uVar1 & 0x1f | uVar4) & 1) != 0)) {
uVar2 = 0x10;
uVar3 = *(uint *)(&DAT_001c1090 + (ulong)uVar3 * 4);
}
}
}
return uVar2 | uVar3;
}
|
|
12,211
|
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/regularPatchBuilder.cpp
|
int
RegularPatchBuilder::GetBoundaryMask(int faceSize, Index const cvs[]) {
bool isQuad = (faceSize == 4);
if (isQuad) {
int eMask = ((cvs[ 1] < 0) << 0) |
((cvs[ 7] < 0) << 1) |
((cvs[14] < 0) << 2) |
((cvs[ 8] < 0) << 3);
return eMask;
} else {
int eMask = ((cvs[ 1] < 0) << 0) |
((cvs[ 9] < 0) << 1) |
((cvs[ 7] < 0) << 2) ;
int vMask = (((cvs[ 0] < 0) | (cvs[ 3] < 0)) << 0) |
(((cvs[ 2] < 0) | (cvs[ 6] < 0)) << 1) |
(((cvs[10] < 0) | (cvs[11] < 0)) << 2) ;
return encodeTriBoundaryMask(eMask, vMask);
}
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*):
movl 0x4(%rsi), %ecx
shrl $0x1f, %ecx
cmpl $0x4, %edi
jne 0xa2a6d
movl 0x1c(%rsi), %eax
movl 0x20(%rsi), %edx
shrl $0x1f, %eax
movl 0x38(%rsi), %esi
shrl $0x1f, %esi
shll $0x2, %esi
leal (%rsi,%rax,2), %eax
shrl $0x1f, %edx
leal (%rax,%rdx,8), %eax
orl %ecx, %eax
retq
movl 0x24(%rsi), %eax
shrl $0x1f, %eax
movl 0x1c(%rsi), %edx
shrl $0x1f, %edx
shll $0x2, %edx
leal (%rdx,%rax,2), %edi
orl %ecx, %edi
movl 0xc(%rsi), %eax
movl 0x18(%rsi), %ecx
orl (%rsi), %eax
shrl $0x1f, %eax
orl 0x8(%rsi), %ecx
shrl $0x1f, %ecx
leal (%rax,%rcx,2), %eax
movl 0x2c(%rsi), %ecx
orl 0x28(%rsi), %ecx
shrl $0x1f, %ecx
leal (%rax,%rcx,4), %esi
jmp 0xa2aa3
|
_ZN10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder15GetBoundaryMaskEiPKi:
mov ecx, [rsi+4]
shr ecx, 1Fh
cmp edi, 4
jnz short loc_A2A6D
mov eax, [rsi+1Ch]
mov edx, [rsi+20h]
shr eax, 1Fh
mov esi, [rsi+38h]
shr esi, 1Fh
shl esi, 2
lea eax, [rsi+rax*2]
shr edx, 1Fh
lea eax, [rax+rdx*8]
or eax, ecx
retn
loc_A2A6D:
mov eax, [rsi+24h]
shr eax, 1Fh
mov edx, [rsi+1Ch]
shr edx, 1Fh
shl edx, 2; int
lea edi, [rdx+rax*2]
or edi, ecx; this
mov eax, [rsi+0Ch]
mov ecx, [rsi+18h]
or eax, [rsi]
shr eax, 1Fh
or ecx, [rsi+8]
shr ecx, 1Fh
lea eax, [rax+rcx*2]
mov ecx, [rsi+2Ch]
or ecx, [rsi+28h]
shr ecx, 1Fh
lea esi, [rax+rcx*4]; int
jmp short $+2; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::encodeTriBoundaryMask(int,int)
|
long long OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder *this,
_DWORD *a2,
const int *a3)
{
int v3; // ecx
v3 = a2[1] >> 31;
if ( (_DWORD)this == 4 )
return v3 | (unsigned int)(4 * (a2[14] >> 31) + 2 * (a2[7] >> 31) + 8 * (a2[8] >> 31));
else
return OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::encodeTriBoundaryMask(
(OpenSubdiv::v3_6_0::Bfr::_anonymous_namespace_ *)(v3 | (unsigned int)(4 * (a2[7] >> 31) + 2 * (a2[9] >> 31))),
((unsigned int)(*a2 | a2[3]) >> 31)
+ 2 * ((unsigned int)(a2[2] | a2[6]) >> 31)
+ 4 * ((unsigned int)(a2[10] | a2[11]) >> 31),
4 * (a2[7] >> 31));
}
|
GetBoundaryMask:
MOV ECX,dword ptr [RSI + 0x4]
SHR ECX,0x1f
CMP EDI,0x4
JNZ 0x001a2a6d
MOV EAX,dword ptr [RSI + 0x1c]
MOV EDX,dword ptr [RSI + 0x20]
SHR EAX,0x1f
MOV ESI,dword ptr [RSI + 0x38]
SHR ESI,0x1f
SHL ESI,0x2
LEA EAX,[RSI + RAX*0x2]
SHR EDX,0x1f
LEA EAX,[RAX + RDX*0x8]
OR EAX,ECX
RET
LAB_001a2a6d:
MOV EAX,dword ptr [RSI + 0x24]
SHR EAX,0x1f
MOV EDX,dword ptr [RSI + 0x1c]
SHR EDX,0x1f
SHL EDX,0x2
LEA EDI,[RDX + RAX*0x2]
OR EDI,ECX
MOV EAX,dword ptr [RSI + 0xc]
MOV ECX,dword ptr [RSI + 0x18]
OR EAX,dword ptr [RSI]
SHR EAX,0x1f
OR ECX,dword ptr [RSI + 0x8]
SHR ECX,0x1f
LEA EAX,[RAX + RCX*0x2]
MOV ECX,dword ptr [RSI + 0x2c]
OR ECX,dword ptr [RSI + 0x28]
SHR ECX,0x1f
LEA ESI,[RAX + RCX*0x4]
JMP 0x001a2aa3
|
/* OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*) */
ulong OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int param_1,int *param_2)
{
ulong uVar1;
if (param_1 == 4) {
return (ulong)((param_2[0xe] >> 0x1f) * -4 + (param_2[7] >> 0x1f) * -2 +
(param_2[8] >> 0x1f) * -8 | (uint)param_2[1] >> 0x1f);
}
uVar1 = (anonymous_namespace)::encodeTriBoundaryMask
((param_2[7] >> 0x1f) * -4 + (param_2[9] >> 0x1f) * -2 |
(uint)param_2[1] >> 0x1f,
(((param_2[6] | param_2[2]) >> 0x1f) * -2 - ((param_2[3] | *param_2) >> 0x1f))
+ ((param_2[0xb] | param_2[10]) >> 0x1f) * -4);
return uVar1;
}
|
|
12,212
|
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/regularPatchBuilder.cpp
|
int
RegularPatchBuilder::GetBoundaryMask(int faceSize, Index const cvs[]) {
bool isQuad = (faceSize == 4);
if (isQuad) {
int eMask = ((cvs[ 1] < 0) << 0) |
((cvs[ 7] < 0) << 1) |
((cvs[14] < 0) << 2) |
((cvs[ 8] < 0) << 3);
return eMask;
} else {
int eMask = ((cvs[ 1] < 0) << 0) |
((cvs[ 9] < 0) << 1) |
((cvs[ 7] < 0) << 2) ;
int vMask = (((cvs[ 0] < 0) | (cvs[ 3] < 0)) << 0) |
(((cvs[ 2] < 0) | (cvs[ 6] < 0)) << 1) |
(((cvs[10] < 0) | (cvs[11] < 0)) << 2) ;
return encodeTriBoundaryMask(eMask, vMask);
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*):
movl 0x4(%rsi), %edx
shrl $0x1f, %edx
cmpl $0x4, %edi
jne 0x983bc
movl 0x1c(%rsi), %eax
movl 0x20(%rsi), %ecx
shrl $0x1f, %eax
movl 0x38(%rsi), %esi
shrl $0x1f, %esi
shll $0x2, %esi
leal (%rsi,%rax,2), %eax
shrl $0x1f, %ecx
leal (%rax,%rcx,8), %eax
jmp 0x9841c
movl 0x24(%rsi), %eax
shrl $0x1f, %eax
movl 0x1c(%rsi), %ecx
shrl $0x1f, %ecx
shll $0x2, %ecx
leal (%rcx,%rax,2), %ecx
orl %edx, %ecx
movl 0xc(%rsi), %eax
movl 0x18(%rsi), %edx
orl (%rsi), %eax
shrl $0x1f, %eax
orl 0x8(%rsi), %edx
shrl $0x1f, %edx
leal (%rax,%rdx,2), %edi
movl 0x2c(%rsi), %edx
orl 0x28(%rsi), %edx
shrl $0x1d, %edx
andl $-0x4, %edx
xorl %eax, %eax
orl %edi, %edx
je 0x98413
testl %ecx, %ecx
je 0x98417
cmpl $0x7, %edx
jne 0x98413
cmpl $0x4, %ecx
ja 0x98413
movl $0x16, %edx
btl %ecx, %edx
jae 0x98413
movl $0x10, %eax
movl %ecx, %edx
jmp 0x9841c
movl $0x8, %eax
orl %edx, %eax
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder15GetBoundaryMaskEiPKi:
mov edx, [rsi+4]
shr edx, 1Fh
cmp edi, 4
jnz short loc_983BC
mov eax, [rsi+1Ch]
mov ecx, [rsi+20h]
shr eax, 1Fh
mov esi, [rsi+38h]
shr esi, 1Fh
shl esi, 2
lea eax, [rsi+rax*2]
shr ecx, 1Fh
lea eax, [rax+rcx*8]
jmp short loc_9841C
loc_983BC:
mov eax, [rsi+24h]
shr eax, 1Fh
mov ecx, [rsi+1Ch]
shr ecx, 1Fh
shl ecx, 2
lea ecx, [rcx+rax*2]
or ecx, edx
mov eax, [rsi+0Ch]
mov edx, [rsi+18h]
or eax, [rsi]
shr eax, 1Fh
or edx, [rsi+8]
shr edx, 1Fh
lea edi, [rax+rdx*2]
mov edx, [rsi+2Ch]
or edx, [rsi+28h]
shr edx, 1Dh
and edx, 0FFFFFFFCh
xor eax, eax
or edx, edi
jz short loc_98413
test ecx, ecx
jz short loc_98417
cmp edx, 7
jnz short loc_98413
cmp ecx, 4
ja short loc_98413
mov edx, 16h
bt edx, ecx
jnb short loc_98413
mov eax, 10h
loc_98413:
mov edx, ecx
jmp short loc_9841C
loc_98417:
mov eax, 8
loc_9841C:
or eax, edx
retn
|
long long OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder *this,
_DWORD *a2,
const int *a3)
{
int v3; // edx
int v4; // eax
unsigned int v5; // ecx
int v6; // edx
v3 = a2[1] >> 31;
if ( (_DWORD)this == 4 )
{
v4 = 4 * (a2[14] >> 31) + 2 * (a2[7] >> 31) + 8 * (a2[8] >> 31);
}
else
{
v5 = v3 | (4 * (a2[7] >> 31) + 2 * (a2[9] >> 31));
v4 = 0;
v3 = (((unsigned int)(*a2 | a2[3]) >> 31) + 2 * ((unsigned int)(a2[2] | a2[6]) >> 31)) | ((unsigned int)(a2[10] | a2[11]) >> 29) & 0xFFFFFFFC;
if ( v3 )
{
if ( !v5 )
{
v4 = 8;
return v3 | (unsigned int)v4;
}
if ( v3 == 7 && v5 <= 4 )
{
v6 = 22;
if ( _bittest(&v6, v5) )
v4 = 16;
}
}
v3 = v5;
}
return v3 | (unsigned int)v4;
}
|
GetBoundaryMask:
MOV EDX,dword ptr [RSI + 0x4]
SHR EDX,0x1f
CMP EDI,0x4
JNZ 0x001983bc
MOV EAX,dword ptr [RSI + 0x1c]
MOV ECX,dword ptr [RSI + 0x20]
SHR EAX,0x1f
MOV ESI,dword ptr [RSI + 0x38]
SHR ESI,0x1f
SHL ESI,0x2
LEA EAX,[RSI + RAX*0x2]
SHR ECX,0x1f
LEA EAX,[RAX + RCX*0x8]
JMP 0x0019841c
LAB_001983bc:
MOV EAX,dword ptr [RSI + 0x24]
SHR EAX,0x1f
MOV ECX,dword ptr [RSI + 0x1c]
SHR ECX,0x1f
SHL ECX,0x2
LEA ECX,[RCX + RAX*0x2]
OR ECX,EDX
MOV EAX,dword ptr [RSI + 0xc]
MOV EDX,dword ptr [RSI + 0x18]
OR EAX,dword ptr [RSI]
SHR EAX,0x1f
OR EDX,dword ptr [RSI + 0x8]
SHR EDX,0x1f
LEA EDI,[RAX + RDX*0x2]
MOV EDX,dword ptr [RSI + 0x2c]
OR EDX,dword ptr [RSI + 0x28]
SHR EDX,0x1d
AND EDX,0xfffffffc
XOR EAX,EAX
OR EDX,EDI
JZ 0x00198413
TEST ECX,ECX
JZ 0x00198417
CMP EDX,0x7
JNZ 0x00198413
CMP ECX,0x4
JA 0x00198413
MOV EDX,0x16
BT EDX,ECX
JNC 0x00198413
MOV EAX,0x10
LAB_00198413:
MOV EDX,ECX
JMP 0x0019841c
LAB_00198417:
MOV EAX,0x8
LAB_0019841c:
OR EAX,EDX
RET
|
/* OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int, int const*) */
uint OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GetBoundaryMask(int param_1,int *param_2)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uVar4 = (uint)param_2[1] >> 0x1f;
if (param_1 == 4) {
uVar2 = (param_2[0xe] >> 0x1f) * -4 + (param_2[7] >> 0x1f) * -2 + (param_2[8] >> 0x1f) * -8;
uVar3 = uVar4;
}
else {
uVar1 = (param_2[7] >> 0x1f) * -4 + (param_2[9] >> 0x1f) * -2;
uVar3 = uVar1 | uVar4;
uVar2 = 0;
uVar5 = (uint)(param_2[0xb] | param_2[10]) >> 0x1d & 0xfffffffc |
((param_2[6] | param_2[2]) >> 0x1f) * -2 - ((param_2[3] | *param_2) >> 0x1f);
if (uVar5 != 0) {
if (uVar3 == 0) {
uVar2 = 8;
uVar3 = uVar5;
}
else if (((uVar5 == 7) && (uVar3 < 5)) && ((0x16U >> (uVar1 & 0x1f | uVar4) & 1) != 0)) {
uVar2 = 0x10;
}
}
}
return uVar2 | uVar3;
}
|
|
12,213
|
add_value_to_list(THD*, Item*)
|
eloqsql/sql/sql_class.h
|
inline bool add_value_to_list(THD *thd, Item *value)
{
return thd->lex->value_list.push_back(value, thd->mem_root);
}
|
O3
|
c
|
add_value_to_list(THD*, Item*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x28(%rdi), %rax
movq 0x58(%rdi), %r14
movl $0x10, %esi
movq %rax, %rdi
callq 0xcf03ef
testq %rax, %rax
je 0x95632a
leaq 0xb9b7e1(%rip), %rcx # 0x14f1ae0
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
movq 0xf90(%r14), %rcx
movq %rax, (%rcx)
movq 0xf90(%r14), %rcx
movq (%rcx), %rcx
movq %rcx, 0xf90(%r14)
incl 0xf98(%r14)
jmp 0x956338
movq 0xf90(%r14), %rcx
movq $0x0, (%rcx)
testq %rax, %rax
sete %al
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x6da8ee
nop
|
_Z17add_value_to_listP3THDP4Item:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov rax, [rdi+28h]
mov r14, [rdi+58h]
mov esi, 10h
mov rdi, rax
call alloc_root
test rax, rax
jz short loc_95632A
lea rcx, end_of_list
mov [rax], rcx
mov [rax+8], rbx
mov rcx, [r14+0F90h]
mov [rcx], rax
mov rcx, [r14+0F90h]
mov rcx, [rcx]
mov [r14+0F90h], rcx
inc dword ptr [r14+0F98h]
jmp short loc_956338
loc_95632A:
mov rcx, [r14+0F90h]
mov qword ptr [rcx], 0
loc_956338:
test rax, rax
setz al
pop rbx
pop r14
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
|
bool add_value_to_list(THD *a1, Item *a2)
{
long long v2; // r14
_QWORD *v3; // rax
v2 = *((_QWORD *)a1 + 11);
v3 = (_QWORD *)alloc_root(*((_QWORD *)a1 + 5), 16LL);
if ( v3 )
{
*v3 = &end_of_list;
v3[1] = a2;
**(_QWORD **)(v2 + 3984) = v3;
*(_QWORD *)(v2 + 3984) = **(_QWORD **)(v2 + 3984);
++*(_DWORD *)(v2 + 3992);
}
else
{
**(_QWORD **)(v2 + 3984) = 0LL;
}
return v3 == 0LL;
}
|
update_stat:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x009564f8
TEST AL,AL
JZ 0x00956318
MOV RAX,qword ptr [RBX + 0x30]
MOV RDI,qword ptr [RAX + 0x58]
MOV RCX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x50]
MOV RDX,qword ptr [RCX + 0x328]
CALL 0x007281d0
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x18]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0095744c
LAB_00956318:
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x18]
MOV RDI,qword ptr [RBX + 0x8]
MOV RSI,qword ptr [RBX + 0x18]
CALL 0x00755f36
MOV ECX,EAX
MOV AL,0x1
TEST ECX,ECX
JNZ 0x0095634a
MOV RDI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RDI]
MOV ESI,0x16
CALL qword ptr [RAX + 0x298]
XOR EAX,EAX
LAB_0095634a:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* Stat_table::update_stat() */
int1 __thiscall Stat_table::update_stat(Stat_table *this)
{
long *plVar1;
char cVar2;
int1 uVar3;
int iVar4;
cVar2 = find_stat(this);
if (cVar2 != '\0') {
plVar1 = *(long **)(this + 0x30);
memcpy((void *)plVar1[0xb],(void *)plVar1[10],*(size_t *)(*plVar1 + 0x328));
(**(code **)(*(long *)this + 0x18))(this);
uVar3 = update_record(this);
return uVar3;
}
(**(code **)(*(long *)this + 0x18))(this);
iVar4 = handler::ha_write_row(*(handler **)(this + 8),*(uchar **)(this + 0x18));
if (iVar4 == 0) {
(**(code **)(**(long **)(this + 8) + 0x298))(*(long **)(this + 8),0x16);
}
return iVar4 != 0;
}
|
|
12,214
|
my_charset_is_8bit_pure_ascii
|
eloqsql/strings/ctype-simple.c
|
static my_bool
my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs)
{
size_t code;
if (!cs->tab_to_uni)
return 0;
for (code= 0; code < 256; code++)
{
if (cs->tab_to_uni[code] > 0x7F)
return 0;
}
return 1;
}
|
O0
|
c
|
my_charset_is_8bit_pure_ascii:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0xa42c9
movb $0x0, -0x1(%rbp)
jmp 0xa430a
movq $0x0, -0x18(%rbp)
cmpq $0x100, -0x18(%rbp) # imm = 0x100
jae 0xa4306
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x7f, %eax
jle 0xa42f6
movb $0x0, -0x1(%rbp)
jmp 0xa430a
jmp 0xa42f8
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xa42d1
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nop
|
my_charset_is_8bit_pure_ascii:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_A42C9
mov [rbp+var_1], 0
jmp short loc_A430A
loc_A42C9:
mov [rbp+var_18], 0
loc_A42D1:
cmp [rbp+var_18], 100h
jnb short loc_A4306
mov rax, [rbp+var_10]
mov rax, [rax+68h]
mov rcx, [rbp+var_18]
movzx eax, word ptr [rax+rcx*2]
cmp eax, 7Fh
jle short loc_A42F6
mov [rbp+var_1], 0
jmp short loc_A430A
loc_A42F6:
jmp short $+2
loc_A42F8:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_A42D1
loc_A4306:
mov [rbp+var_1], 1
loc_A430A:
mov al, [rbp+var_1]
pop rbp
retn
|
char my_charset_is_8bit_pure_ascii(long long a1)
{
unsigned long long i; // [rsp+0h] [rbp-18h]
if ( !*(_QWORD *)(a1 + 104) )
return 0;
for ( i = 0LL; i < 0x100; ++i )
{
if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i) > 0x7Fu )
return 0;
}
return 1;
}
|
my_charset_is_8bit_pure_ascii:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x001a42c9
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001a430a
LAB_001a42c9:
MOV qword ptr [RBP + -0x18],0x0
LAB_001a42d1:
CMP qword ptr [RBP + -0x18],0x100
JNC 0x001a4306
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,0x7f
JLE 0x001a42f6
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001a430a
LAB_001a42f6:
JMP 0x001a42f8
LAB_001a42f8:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001a42d1
LAB_001a4306:
MOV byte ptr [RBP + -0x1],0x1
LAB_001a430a:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 my_charset_is_8bit_pure_ascii(long param_1)
{
ulong local_20;
int1 local_9;
if (*(long *)(param_1 + 0x68) == 0) {
local_9 = 0;
}
else {
for (local_20 = 0; local_20 < 0x100; local_20 = local_20 + 1) {
if (0x7f < *(ushort *)(*(long *)(param_1 + 0x68) + local_20 * 2)) {
return 0;
}
}
local_9 = 1;
}
return local_9;
}
|
|
12,215
|
js_bigint_to_string1
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_bigint_to_string1(JSContext *ctx, JSValue val, int radix)
{
JSValue ret;
bf_t a_s, *a;
char *str;
int saved_sign;
size_t len;
a = JS_ToBigInt(ctx, &a_s, val);
if (!a)
return JS_EXCEPTION;
saved_sign = a->sign;
if (a->expn == BF_EXP_ZERO)
a->sign = 0;
str = bf_ftoa(&len, a, radix, 0, BF_RNDZ | BF_FTOA_FORMAT_FRAC |
BF_FTOA_JS_QUIRKS);
a->sign = saved_sign;
JS_FreeBigInt(ctx, a, &a_s);
if (!str)
return JS_ThrowOutOfMemory(ctx);
ret = js_new_string8_len(ctx, str, len);
bf_free(ctx->bf_ctx, str);
return ret;
}
|
O1
|
c
|
js_bigint_to_string1:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
movq %rsi, 0x10(%rsp)
cmpl $-0x9, %ecx
jb 0x3e30e
movq 0x10(%rsp), %rax
incl (%rax)
leaq 0x10(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x3e45b
movl $0x6, %ebx
testq %rax, %rax
je 0x3e3fe
movq %rax, %r12
movl 0x8(%rax), %ebx
xorl %eax, %eax
cmpq 0x10(%r12), %rax
jno 0x3e344
movl $0x0, 0x8(%r12)
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
movl $0x410001, %r8d # imm = 0x410001
callq 0x89abc
movq %rax, %r15
movl %ebx, 0x8(%r12)
cmpq %r13, %r12
je 0x3e398
movq 0x18(%r14), %rdi
movl -0x8(%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x8(%r12)
cmpl $0x1, %eax
movl $0x6, %ebx
jg 0x3e3b8
addq $-0x8, %r12
movq %r12, %rsi
movq $-0x9, %rdx
callq 0x21266
jmp 0x3e3b8
movq (%r12), %rax
testq %rax, %rax
movl $0x6, %ebx
je 0x3e3b8
movq 0x20(%r12), %rsi
testq %rsi, %rsi
je 0x3e3b8
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testq %r15, %r15
je 0x3e3f6
movl 0x8(%rsp), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x201dd
movq %rax, %r12
movq %rdx, %rbx
movq 0x1d0(%r14), %rax
movq (%rax), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq *0x8(%rax)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r12, %rcx
movl %r12d, %eax
jmp 0x3e402
movq %r14, %rdi
callq 0x1cb63
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_bigint_to_string1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, ecx
mov rcx, rdx
mov rdx, rsi
mov r14, rdi
mov [rsp+68h+var_58], rsi
cmp ecx, 0FFFFFFF7h
jb short loc_3E30E
mov rax, [rsp+68h+var_58]
inc dword ptr [rax]
loc_3E30E:
lea r13, [rsp+68h+var_58]
mov rdi, r14
mov rsi, r13
call JS_ToBigIntFree
mov ebx, 6
test rax, rax
jz loc_3E3FE
mov r12, rax
mov ebx, [rax+8]
xor eax, eax
cmp rax, [r12+10h]
jno short loc_3E344
mov dword ptr [r12+8], 0
loc_3E344:
lea rdi, [rsp+68h+var_60]
mov rsi, r12
mov edx, ebp
xor ecx, ecx
mov r8d, 410001h
call bf_ftoa
mov r15, rax
mov [r12+8], ebx
cmp r12, r13
jz short loc_3E398
mov rdi, [r14+18h]
mov eax, [r12-8]
lea ecx, [rax-1]
mov [r12-8], ecx
cmp eax, 1
mov ebx, 6
jg short loc_3E3B8
add r12, 0FFFFFFFFFFFFFFF8h
mov rsi, r12
mov rdx, 0FFFFFFFFFFFFFFF7h
call js_free_value_rt
jmp short loc_3E3B8
loc_3E398:
mov rax, [r12]
test rax, rax
mov ebx, 6
jz short loc_3E3B8
mov rsi, [r12+20h]
test rsi, rsi
jz short loc_3E3B8
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_3E3B8:
test r15, r15
jz short loc_3E3F6
mov edx, [rsp+68h+var_60]
mov rdi, r14
mov rsi, r15
call js_new_string8_len
mov r12, rax
mov rbx, rdx
mov rax, [r14+1D0h]
mov rdi, [rax]
mov rsi, r15
xor edx, edx
call qword ptr [rax+8]
mov rcx, 0FFFFFFFF00000000h
and rcx, r12
mov eax, r12d
jmp short loc_3E402
loc_3E3F6:
mov rdi, r14
call JS_ThrowOutOfMemory
loc_3E3FE:
xor eax, eax
xor ecx, ecx
loc_3E402:
or rax, rcx
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_bigint_to_string1(long long a1, long long a2, unsigned int a3, unsigned int a4)
{
long long v6; // rax
_QWORD *v7; // r12
int v8; // ebx
long long v9; // rsi
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // r15
long long v15; // rdi
int v16; // eax
long long v17; // r12
unsigned long long v18; // rcx
long long v19; // rax
unsigned int v21; // [rsp+8h] [rbp-60h] BYREF
_QWORD v22[11]; // [rsp+10h] [rbp-58h] BYREF
v22[0] = a2;
if ( a3 >= 0xFFFFFFF7 )
++*(_DWORD *)v22[0];
v6 = JS_ToBigIntFree(a1, v22);
if ( !v6 )
goto LABEL_15;
v7 = (_QWORD *)v6;
v8 = *(_DWORD *)(v6 + 8);
if ( __OFSUB__(0LL, *(_QWORD *)(v6 + 16)) )
*(_DWORD *)(v6 + 8) = 0;
v9 = v6;
v14 = bf_ftoa(&v21, v6, a4, 0LL, 4259841LL);
*((_DWORD *)v7 + 2) = v8;
if ( v7 == v22 )
{
if ( *v7 )
{
v9 = v7[4];
if ( v9 )
(*(void ( **)(_QWORD, long long, _QWORD))(*v7 + 8LL))(*(_QWORD *)*v7, v9, 0LL);
}
}
else
{
v15 = *(_QWORD *)(a1 + 24);
v16 = *((_DWORD *)v7 - 2);
v11 = v16 - 1;
*((_DWORD *)v7 - 2) = v16 - 1;
if ( v16 <= 1 )
{
v9 = (long long)(v7 - 1);
js_free_value_rt(v15, v7 - 1, -9);
}
}
if ( !v14 )
{
JS_ThrowOutOfMemory(a1, v9, v10, v11, v12, v13);
LABEL_15:
v19 = 0LL;
v18 = 0LL;
return v18 | v19;
}
v17 = js_new_string8_len(a1, v14, v21);
(*(void ( **)(_QWORD, long long, _QWORD))(*(_QWORD *)(a1 + 464) + 8LL))(**(_QWORD **)(a1 + 464), v14, 0LL);
v18 = v17 & 0xFFFFFFFF00000000LL;
v19 = (unsigned int)v17;
return v18 | v19;
}
| |||
12,216
|
js_bigint_to_string1
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_bigint_to_string1(JSContext *ctx, JSValue val, int radix)
{
JSValue ret;
bf_t a_s, *a;
char *str;
int saved_sign;
size_t len;
a = JS_ToBigInt(ctx, &a_s, val);
if (!a)
return JS_EXCEPTION;
saved_sign = a->sign;
if (a->expn == BF_EXP_ZERO)
a->sign = 0;
str = bf_ftoa(&len, a, radix, 0, BF_RNDZ | BF_FTOA_FORMAT_FRAC |
BF_FTOA_JS_QUIRKS);
a->sign = saved_sign;
JS_FreeBigInt(ctx, a, &a_s);
if (!str)
return JS_ThrowOutOfMemory(ctx);
ret = js_new_string8_len(ctx, str, len);
bf_free(ctx->bf_ctx, str);
return ret;
}
|
O2
|
c
|
js_bigint_to_string1:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x10(%rsp), %rsi
callq 0x36a4c
pushq $0x6
popq %rbx
testq %rax, %rax
je 0x36a33
movq %rax, %r15
movl 0x8(%rax), %r13d
xorl %eax, %eax
cmpq 0x10(%r15), %rax
jno 0x369bf
andl $0x0, 0x8(%r15)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
movl $0x410001, %r8d # imm = 0x410001
callq 0x73479
movq %rax, %r12
movl %r13d, 0x8(%r15)
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x36a55
testq %r12, %r12
je 0x36a2b
movl 0x8(%rsp), %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1a4e8
movq %rax, %r15
movq %rdx, %rbx
movq 0x1d0(%r14), %rax
movq (%rax), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq *0x8(%rax)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r15, %rcx
movl %r15d, %eax
jmp 0x36a37
movq %r14, %rdi
callq 0x171e0
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_bigint_to_string1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, ecx
mov rcx, rdx
mov rdx, rsi
mov r14, rdi
lea rsi, [rsp+68h+var_58]
call JS_ToBigInt
push 6
pop rbx
test rax, rax
jz loc_36A33
mov r15, rax
mov r13d, [rax+8]
xor eax, eax
cmp rax, [r15+10h]
jno short loc_369BF
and dword ptr [r15+8], 0
loc_369BF:
lea rdi, [rsp+68h+var_60]
mov rsi, r15
mov edx, ebp
xor ecx, ecx
mov r8d, 410001h
call bf_ftoa
mov r12, rax
mov [r15+8], r13d
lea rdx, [rsp+68h+var_58]
mov rdi, r14
mov rsi, r15
call JS_FreeBigInt
test r12, r12
jz short loc_36A2B
mov edx, [rsp+68h+var_60]
mov rdi, r14
mov rsi, r12
call js_new_string8_len
mov r15, rax
mov rbx, rdx
mov rax, [r14+1D0h]
mov rdi, [rax]
mov rsi, r12
xor edx, edx
call qword ptr [rax+8]
mov rcx, 0FFFFFFFF00000000h
and rcx, r15
mov eax, r15d
jmp short loc_36A37
loc_36A2B:
mov rdi, r14
call JS_ThrowOutOfMemory
loc_36A33:
xor eax, eax
xor ecx, ecx
loc_36A37:
or rax, rcx
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_bigint_to_string1(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v5; // rax
long long v6; // r15
int v7; // r13d
long long v8; // r12
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
long long v13; // r15
unsigned long long v14; // rcx
long long v15; // rax
unsigned int v17; // [rsp+8h] [rbp-60h] BYREF
_BYTE v18[88]; // [rsp+10h] [rbp-58h] BYREF
v5 = JS_ToBigInt(a1, v18, a2, a3);
if ( !v5 )
goto LABEL_7;
v6 = v5;
v7 = *(_DWORD *)(v5 + 8);
if ( __OFSUB__(0LL, *(_QWORD *)(v5 + 16)) )
*(_DWORD *)(v5 + 8) = 0;
v8 = bf_ftoa(&v17, v5, a4, 0LL, 4259841LL);
*(_DWORD *)(v6 + 8) = v7;
JS_FreeBigInt(a1, v6, v18);
if ( !v8 )
{
JS_ThrowOutOfMemory(a1, v6, v9, v10, v11, v12);
LABEL_7:
v15 = 0LL;
v14 = 0LL;
return v14 | v15;
}
v13 = js_new_string8_len(a1, v8, v17);
(*(void ( **)(_QWORD, long long, _QWORD))(*(_QWORD *)(a1 + 464) + 8LL))(**(_QWORD **)(a1 + 464), v8, 0LL);
v14 = v13 & 0xFFFFFFFF00000000LL;
v15 = (unsigned int)v13;
return v14 | v15;
}
|
js_bigint_to_string1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x10]
CALL 0x00136a4c
PUSH 0x6
POP RBX
TEST RAX,RAX
JZ 0x00136a33
MOV R15,RAX
MOV R13D,dword ptr [RAX + 0x8]
XOR EAX,EAX
CMP RAX,qword ptr [R15 + 0x10]
JNO 0x001369bf
AND dword ptr [R15 + 0x8],0x0
LAB_001369bf:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
MOV EDX,EBP
XOR ECX,ECX
MOV R8D,0x410001
CALL 0x00173479
MOV R12,RAX
MOV dword ptr [R15 + 0x8],R13D
LEA RDX,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00136a55
TEST R12,R12
JZ 0x00136a2b
MOV EDX,dword ptr [RSP + 0x8]
MOV RDI,R14
MOV RSI,R12
CALL 0x0011a4e8
MOV R15,RAX
MOV RBX,RDX
MOV RAX,qword ptr [R14 + 0x1d0]
MOV RDI,qword ptr [RAX]
MOV RSI,R12
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV RCX,-0x100000000
AND RCX,R15
MOV EAX,R15D
JMP 0x00136a37
LAB_00136a2b:
MOV RDI,R14
CALL 0x001171e0
LAB_00136a33:
XOR EAX,EAX
XOR ECX,ECX
LAB_00136a37:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001369ba) */
int1 [16]
js_bigint_to_string1(long param_1,int8 param_2,int8 param_3,int4 param_4)
{
int4 uVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
int1 auVar7 [16];
int4 local_60 [2];
int1 local_58 [40];
lVar2 = JS_ToBigInt(param_1,local_58,param_2,param_3);
uVar6 = 6;
if (lVar2 != 0) {
uVar1 = *(int4 *)(lVar2 + 8);
lVar3 = bf_ftoa(local_60,lVar2,param_4,0,0x410001);
*(int4 *)(lVar2 + 8) = uVar1;
JS_FreeBigInt(param_1,lVar2,local_58);
if (lVar3 != 0) {
auVar7 = js_new_string8_len(param_1,lVar3,local_60[0]);
uVar6 = auVar7._8_8_;
(*(code *)(*(int8 **)(param_1 + 0x1d0))[1])(**(int8 **)(param_1 + 0x1d0),lVar3,0);
uVar5 = auVar7._0_8_ & 0xffffffff00000000;
uVar4 = auVar7._0_8_ & 0xffffffff;
goto LAB_00136a37;
}
JS_ThrowOutOfMemory(param_1);
}
uVar4 = 0;
uVar5 = 0;
LAB_00136a37:
auVar7._0_8_ = uVar4 | uVar5;
auVar7._8_8_ = uVar6;
return auVar7;
}
|
|
12,217
|
my_fill_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static void
my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill)
{
if (fill < 0x80)
my_fill_8bit(cs, str, length, fill);
else
my_fill_utf8mb3_mb(cs, str, length, fill);
}
|
O3
|
c
|
my_fill_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpl $0x7f, %ecx
jg 0x2fb1d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2fba1
movq %rbx, %rsi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e40b
leaq (%rbx,%r15), %r14
movq 0xb8(%rdi), %rax
movl %ecx, %esi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0xd8(%rax)
movsbq %al, %r12
cmpq %r15, %r12
jle 0x2fb46
movq %rbx, %r13
jmp 0x2fb6b
movsbq %al, %r15
movq %rbx, %r13
movq %rbx, %rdi
leaq -0x3a(%rbp), %rsi
movq %r15, %rdx
callq 0x24240
addq %r12, %rbx
addq %r12, %r13
leaq (%rbx,%r12), %rax
cmpq %r14, %rax
jbe 0x2fb4d
cmpq %r14, %rbx
jae 0x2fb83
subq %r13, %r14
movq %rbx, %rdi
movl $0x20, %esi
movq %r14, %rdx
callq 0x24180
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2fba1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24320
|
my_fill_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp ecx, 7Fh
jg short loc_2FB1D
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_2FBA1
mov rsi, rbx
mov rdx, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_fill_8bit
loc_2FB1D:
lea r14, [rbx+r15]
mov rax, [rdi+0B8h]
mov esi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+0D8h]
movsx r12, al
cmp r12, r15
jle short loc_2FB46
mov r13, rbx
jmp short loc_2FB6B
loc_2FB46:
movsx r15, al
mov r13, rbx
loc_2FB4D:
mov rdi, rbx
lea rsi, [rbp+var_3A]
mov rdx, r15
call _memcpy
add rbx, r12
add r13, r12
lea rax, [rbx+r12]
cmp rax, r14
jbe short loc_2FB4D
loc_2FB6B:
cmp rbx, r14
jnb short loc_2FB83
sub r14, r13
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r14
call _memset
loc_2FB83:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_2FBA1
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2FBA1:
call ___stack_chk_fail
|
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4)
{
unsigned long long v5; // rbx
unsigned long long v7; // r14
char v8; // al
long long v9; // rcx
long long v10; // r8
long long v11; // r9
long long v12; // r12
long long v13; // r13
long long v14; // r15
_BYTE v15[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v16[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v16[0] = __readfsqword(0x28u);
if ( a4 <= 127 )
return my_fill_8bit(a1, a2, a3, a4);
v7 = a2 + a3;
v8 = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))(
a1,
(unsigned int)a4,
v15,
v16);
v12 = v8;
if ( v8 <= a3 )
{
v14 = v8;
v13 = a2;
do
{
memcpy(v5, v15, v14, v9, v10, v11);
v5 += v12;
v13 += v12;
}
while ( v5 + v12 <= v7 );
}
else
{
v13 = a2;
}
if ( v5 < v7 )
memset(v5, 32LL, v7 - v13);
return __readfsqword(0x28u);
}
|
my_fill_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP ECX,0x7f
JG 0x0012fb1d
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012fba1
MOV RSI,RBX
MOV RDX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0012e40b
LAB_0012fb1d:
LEA R14,[RBX + R15*0x1]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ESI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0xd8]
MOVSX R12,AL
CMP R12,R15
JLE 0x0012fb46
MOV R13,RBX
JMP 0x0012fb6b
LAB_0012fb46:
MOVSX R15,AL
MOV R13,RBX
LAB_0012fb4d:
MOV RDI,RBX
LEA RSI,[RBP + -0x3a]
MOV RDX,R15
CALL 0x00124240
ADD RBX,R12
ADD R13,R12
LEA RAX,[RBX + R12*0x1]
CMP RAX,R14
JBE 0x0012fb4d
LAB_0012fb6b:
CMP RBX,R14
JNC 0x0012fb83
SUB R14,R13
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R14
CALL 0x00124180
LAB_0012fb83:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012fba1
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012fba1:
CALL 0x00124320
|
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4)
{
void *pvVar1;
char cVar2;
long lVar3;
void *pvVar4;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (param_4 < 0x80) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
my_fill_8bit(param_1,param_2,param_3);
return;
}
}
else {
pvVar1 = (void *)((long)param_2 + param_3);
cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38);
lVar3 = (long)cVar2;
pvVar4 = param_2;
if (lVar3 <= param_3) {
do {
memcpy(param_2,local_42,(long)cVar2);
param_2 = (void *)((long)param_2 + lVar3);
pvVar4 = (void *)((long)pvVar4 + lVar3);
} while ((void *)((long)param_2 + lVar3) <= pvVar1);
}
if (param_2 < pvVar1) {
memset(param_2,0x20,(long)pvVar1 - (long)pvVar4);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,218
|
my_strntoll_8bit
|
eloqsql/strings/ctype-simple.c
|
longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *nptr, size_t l, int base,
char **endptr,int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (negative)
{
if (i > (ulonglong) LONGLONG_MIN)
overflow = 1;
}
else if (i > (ulonglong) LONGLONG_MAX)
overflow = 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? LONGLONG_MIN : LONGLONG_MAX;
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
}
|
O0
|
c
|
my_strntoll_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rcx
xorl %eax, %eax
cmpq -0x68(%rbp), %rcx
movb %al, -0x76(%rbp)
jae 0x43f88
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x60(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x76(%rbp)
movb -0x76(%rbp), %al
testb $0x1, %al
jne 0x43f91
jmp 0x43fa1
jmp 0x43f93
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x43f59
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x43fb0
jmp 0x441c6
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x43fd1
movl $0x1, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x43ffb
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x43ff2
movl $0x0, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x43ff9
movl $0x0, -0x3c(%rbp)
jmp 0x43ffb
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x48(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x74(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
je 0x44115
movq -0x60(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
movzbl -0x75(%rbp), %eax
cmpl $0x30, %eax
jl 0x44070
movzbl -0x75(%rbp), %eax
cmpl $0x39, %eax
jg 0x44070
movzbl -0x75(%rbp), %eax
subl $0x30, %eax
movb %al, -0x75(%rbp)
jmp 0x440b8
movzbl -0x75(%rbp), %eax
cmpl $0x41, %eax
jl 0x44091
movzbl -0x75(%rbp), %eax
cmpl $0x5a, %eax
jg 0x44091
movzbl -0x75(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x440b6
movzbl -0x75(%rbp), %eax
cmpl $0x61, %eax
jl 0x440b2
movzbl -0x75(%rbp), %eax
cmpl $0x7a, %eax
jg 0x440b2
movzbl -0x75(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x440b4
jmp 0x44115
jmp 0x440b6
jmp 0x440b8
movzbl -0x75(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x440c3
jmp 0x44115
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x440e0
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x440e9
movzbl -0x75(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jbe 0x440e9
movl $0x1, -0x74(%rbp)
jmp 0x44102
movslq -0x24(%rbp), %rax
imulq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movzbl -0x75(%rbp), %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x44104
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x4403b
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jne 0x44124
jmp 0x441c6
cmpq $0x0, -0x30(%rbp)
je 0x44136
movq -0x60(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x3c(%rbp)
je 0x44155
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x58(%rbp)
jbe 0x44153
movl $0x1, -0x74(%rbp)
jmp 0x4416e
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x58(%rbp)
jbe 0x4416c
movl $0x1, -0x74(%rbp)
jmp 0x4416e
cmpl $0x0, -0x74(%rbp)
je 0x441a2
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl -0x3c(%rbp), %edx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x441ea
cmpl $0x0, -0x3c(%rbp)
je 0x441b4
xorl %eax, %eax
subq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x441bc
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x441ea
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x441e2
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
|
my_strntoll_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_68], rax
loc_43F59:
mov rcx, [rbp+var_60]
xor eax, eax
cmp rcx, [rbp+var_68]
mov [rbp+var_76], al
jnb short loc_43F88
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_60]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_76], al
loc_43F88:
mov al, [rbp+var_76]
test al, 1
jnz short loc_43F91
jmp short loc_43FA1
loc_43F91:
jmp short $+2
loc_43F93:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_43F59
loc_43FA1:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jnz short loc_43FB0
jmp loc_441C6
loc_43FB0:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_43FD1
mov [rbp+var_3C], 1
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_43FFB
loc_43FD1:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_43FF2
mov [rbp+var_3C], 0
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_43FF9
loc_43FF2:
mov [rbp+var_3C], 0
loc_43FF9:
jmp short $+2
loc_43FFB:
mov rax, [rbp+var_60]
mov [rbp+var_70], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov [rbp+var_48], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_4C], eax
mov [rbp+var_74], 0
mov [rbp+var_58], 0
loc_4403B:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jz loc_44115
mov rax, [rbp+var_60]
mov al, [rax]
mov [rbp+var_75], al
movzx eax, [rbp+var_75]
cmp eax, 30h ; '0'
jl short loc_44070
movzx eax, [rbp+var_75]
cmp eax, 39h ; '9'
jg short loc_44070
movzx eax, [rbp+var_75]
sub eax, 30h ; '0'
mov [rbp+var_75], al
jmp short loc_440B8
loc_44070:
movzx eax, [rbp+var_75]
cmp eax, 41h ; 'A'
jl short loc_44091
movzx eax, [rbp+var_75]
cmp eax, 5Ah ; 'Z'
jg short loc_44091
movzx eax, [rbp+var_75]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_440B6
loc_44091:
movzx eax, [rbp+var_75]
cmp eax, 61h ; 'a'
jl short loc_440B2
movzx eax, [rbp+var_75]
cmp eax, 7Ah ; 'z'
jg short loc_440B2
movzx eax, [rbp+var_75]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_440B4
loc_440B2:
jmp short loc_44115
loc_440B4:
jmp short $+2
loc_440B6:
jmp short $+2
loc_440B8:
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_24]
jl short loc_440C3
jmp short loc_44115
loc_440C3:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
ja short loc_440E0
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
jnz short loc_440E9
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_4C]
jbe short loc_440E9
loc_440E0:
mov [rbp+var_74], 1
jmp short loc_44102
loc_440E9:
movsxd rax, [rbp+var_24]
imul rax, [rbp+var_58]
mov [rbp+var_58], rax
movzx eax, [rbp+var_75]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_44102:
jmp short $+2
loc_44104:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp loc_4403B
loc_44115:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_70]
jnz short loc_44124
jmp loc_441C6
loc_44124:
cmp [rbp+var_30], 0
jz short loc_44136
mov rcx, [rbp+var_60]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_44136:
cmp [rbp+var_3C], 0
jz short loc_44155
mov rax, 8000000000000000h
cmp [rbp+var_58], rax
jbe short loc_44153
mov [rbp+var_74], 1
loc_44153:
jmp short loc_4416E
loc_44155:
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbp+var_58], rax
jbe short loc_4416C
mov [rbp+var_74], 1
loc_4416C:
jmp short $+2
loc_4416E:
cmp [rbp+var_74], 0
jz short loc_441A2
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov edx, [rbp+var_3C]
mov rax, 7FFFFFFFFFFFFFFFh
mov rcx, 8000000000000000h
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_8], rax
jmp short loc_441EA
loc_441A2:
cmp [rbp+var_3C], 0
jz short loc_441B4
xor eax, eax
sub rax, [rbp+var_58]
mov [rbp+var_80], rax
jmp short loc_441BC
loc_441B4:
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
loc_441BC:
mov rax, [rbp+var_80]
mov [rbp+var_8], rax
jmp short loc_441EA
loc_441C6:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_441E2
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_441E2:
mov [rbp+var_8], 0
loc_441EA:
mov rax, [rbp+var_8]
pop rbp
retn
|
unsigned long long my_strntoll_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6)
{
long long v6; // rax
bool v9; // [rsp+Ah] [rbp-76h]
unsigned __int8 v10; // [rsp+Bh] [rbp-75h]
unsigned __int8 v11; // [rsp+Bh] [rbp-75h]
int v12; // [rsp+Ch] [rbp-74h]
_BYTE *v13; // [rsp+10h] [rbp-70h]
_BYTE *v14; // [rsp+18h] [rbp-68h]
_BYTE *v15; // [rsp+20h] [rbp-60h]
unsigned long long v16; // [rsp+28h] [rbp-58h]
unsigned long long v17; // [rsp+38h] [rbp-48h]
int v18; // [rsp+44h] [rbp-3Ch]
*a6 = 0;
v15 = a2;
v14 = &a2[a3];
while ( 1 )
{
v9 = 0;
if ( v15 < v14 )
v9 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v15 + 1LL) & 8) != 0;
if ( !v9 )
break;
++v15;
}
if ( v15 == v14 )
goto LABEL_47;
if ( *v15 == 45 )
{
v18 = 1;
++v15;
}
else
{
v18 = 0;
if ( *v15 == 43 )
++v15;
}
v13 = v15;
v17 = 0xFFFFFFFFFFFFFFFFLL / a4;
v12 = 0;
v16 = 0LL;
while ( v15 != v14 )
{
v10 = *v15;
if ( (unsigned __int8)*v15 < 0x30u || v10 > 0x39u )
{
if ( v10 < 0x41u || v10 > 0x5Au )
{
if ( v10 < 0x61u || v10 > 0x7Au )
break;
v11 = v10 - 97 + 10;
}
else
{
v11 = v10 - 65 + 10;
}
}
else
{
v11 = v10 - 48;
}
if ( v11 >= a4 )
break;
if ( v16 > v17 || v16 == v17 && v11 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) )
v12 = 1;
else
v16 = v16 * a4 + v11;
++v15;
}
if ( v15 == v13 )
{
LABEL_47:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v15;
if ( v18 )
{
if ( v16 > 0x8000000000000000LL )
v12 = 1;
}
else if ( v16 > 0x7FFFFFFFFFFFFFFFLL )
{
v12 = 1;
}
if ( v12 )
{
*a6 = 34;
v6 = 0x7FFFFFFFFFFFFFFFLL;
if ( v18 )
return 0x8000000000000000LL;
return v6;
}
else if ( v18 )
{
return -(long long)v16;
}
else
{
return v16;
}
}
}
|
my_strntoll_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x68],RAX
LAB_00143f59:
MOV RCX,qword ptr [RBP + -0x60]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x68]
MOV byte ptr [RBP + -0x76],AL
JNC 0x00143f88
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x76],AL
LAB_00143f88:
MOV AL,byte ptr [RBP + -0x76]
TEST AL,0x1
JNZ 0x00143f91
JMP 0x00143fa1
LAB_00143f91:
JMP 0x00143f93
LAB_00143f93:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00143f59
LAB_00143fa1:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x00143fb0
JMP 0x001441c6
LAB_00143fb0:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x00143fd1
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00143ffb
LAB_00143fd1:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x00143ff2
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00143ff9
LAB_00143ff2:
MOV dword ptr [RBP + -0x3c],0x0
LAB_00143ff9:
JMP 0x00143ffb
LAB_00143ffb:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x48],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x4c],EAX
MOV dword ptr [RBP + -0x74],0x0
MOV qword ptr [RBP + -0x58],0x0
LAB_0014403b:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JZ 0x00144115
MOV RAX,qword ptr [RBP + -0x60]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x75],AL
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x30
JL 0x00144070
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x39
JG 0x00144070
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x30
MOV byte ptr [RBP + -0x75],AL
JMP 0x001440b8
LAB_00144070:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x41
JL 0x00144091
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x5a
JG 0x00144091
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x41
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x001440b6
LAB_00144091:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x61
JL 0x001440b2
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x7a
JG 0x001440b2
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x61
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x001440b4
LAB_001440b2:
JMP 0x00144115
LAB_001440b4:
JMP 0x001440b6
LAB_001440b6:
JMP 0x001440b8
LAB_001440b8:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x001440c3
JMP 0x00144115
LAB_001440c3:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JA 0x001440e0
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x001440e9
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x4c]
JBE 0x001440e9
LAB_001440e0:
MOV dword ptr [RBP + -0x74],0x1
JMP 0x00144102
LAB_001440e9:
MOVSXD RAX,dword ptr [RBP + -0x24]
IMUL RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOVZX EAX,byte ptr [RBP + -0x75]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
LAB_00144102:
JMP 0x00144104
LAB_00144104:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0014403b
LAB_00144115:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x70]
JNZ 0x00144124
JMP 0x001441c6
LAB_00144124:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00144136
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00144136:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00144155
MOV RAX,-0x8000000000000000
CMP qword ptr [RBP + -0x58],RAX
JBE 0x00144153
MOV dword ptr [RBP + -0x74],0x1
LAB_00144153:
JMP 0x0014416e
LAB_00144155:
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBP + -0x58],RAX
JBE 0x0014416c
MOV dword ptr [RBP + -0x74],0x1
LAB_0014416c:
JMP 0x0014416e
LAB_0014416e:
CMP dword ptr [RBP + -0x74],0x0
JZ 0x001441a2
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EDX,dword ptr [RBP + -0x3c]
MOV RAX,0x7fffffffffffffff
MOV RCX,-0x8000000000000000
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001441ea
LAB_001441a2:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001441b4
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x001441bc
LAB_001441b4:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
LAB_001441bc:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001441ea
LAB_001441c6:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001441e2
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001441e2:
MOV qword ptr [RBP + -0x8],0x0
LAB_001441ea:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_strntoll_8bit(long param_1,byte *param_2,long param_3,int param_4,int8 *param_5,
int4 *param_6)
{
int1 auVar1 [16];
int1 auVar2 [16];
bool bVar3;
byte *pbVar4;
byte *pbVar5;
ulong uVar6;
bool bVar7;
ulong local_88;
byte local_7d;
byte *local_68;
ulong local_60;
*param_6 = 0;
pbVar5 = param_2 + param_3;
local_68 = param_2;
while( true ) {
bVar7 = false;
if (local_68 < pbVar5) {
bVar7 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_68) & 8) != 0;
}
if (!bVar7) break;
local_68 = local_68 + 1;
}
if (local_68 != pbVar5) {
if (*local_68 == 0x2d) {
bVar7 = true;
local_68 = local_68 + 1;
}
else {
if (*local_68 == 0x2b) {
local_68 = local_68 + 1;
}
bVar7 = false;
}
pbVar4 = local_68;
auVar1._8_8_ = 0;
auVar1._0_8_ = (long)param_4;
uVar6 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0);
auVar2._8_8_ = 0;
auVar2._0_8_ = (long)param_4;
bVar3 = false;
local_60 = 0;
for (; local_68 != pbVar5; local_68 = local_68 + 1) {
local_7d = *local_68;
if ((local_7d < 0x30) || (0x39 < local_7d)) {
if ((local_7d < 0x41) || (0x5a < local_7d)) {
if ((local_7d < 0x61) || (0x7a < local_7d)) break;
local_7d = local_7d + 0xa9;
}
else {
local_7d = local_7d - 0x37;
}
}
else {
local_7d = local_7d - 0x30;
}
if (param_4 <= (int)(uint)local_7d) break;
if ((uVar6 < local_60) ||
((local_60 == uVar6 &&
(SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar2,0) < (uint)local_7d)))
) {
bVar3 = true;
}
else {
local_60 = (ulong)local_7d + (long)param_4 * local_60;
}
}
if (local_68 != pbVar4) {
if (param_5 != (int8 *)0x0) {
*param_5 = local_68;
}
if (bVar7) {
if (0x8000000000000000 < local_60) {
bVar3 = true;
}
}
else if (0x7fffffffffffffff < local_60) {
bVar3 = true;
}
if (bVar3) {
*param_6 = 0x22;
if (!bVar7) {
return 0x7fffffffffffffff;
}
return 0x8000000000000000;
}
if (bVar7) {
local_88 = -local_60;
}
else {
local_88 = local_60;
}
return local_88;
}
}
*param_6 = 0x21;
if (param_5 != (int8 *)0x0) {
*param_5 = param_2;
}
return 0;
}
|
|
12,219
|
scramble_323
|
eloqsql/sql/password.c
|
void scramble_323(char *to, const char *message, const char *password)
{
struct my_rnd_struct rand_st;
ulong hash_pass[2], hash_message[2];
if (password && password[0])
{
char extra, *to_start=to;
const char *message_end= message + SCRAMBLE_LENGTH_323;
hash_password(hash_pass,password, (uint) strlen(password));
hash_password(hash_message, message, SCRAMBLE_LENGTH_323);
my_rnd_init(&rand_st,hash_pass[0] ^ hash_message[0],
hash_pass[1] ^ hash_message[1]);
for (; message < message_end; message++)
*to++= (char) (floor(my_rnd(&rand_st)*31)+64);
extra=(char) (floor(my_rnd(&rand_st)*31));
while (to_start != to)
*(to_start++)^=extra;
}
*to= 0;
}
|
O0
|
c
|
scramble_323:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3a6cd
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3a6cd
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x78(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x36400
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movl %eax, %edx
callq 0x3a420
leaq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x3a420
movq -0x50(%rbp), %rsi
xorq -0x60(%rbp), %rsi
movq -0x48(%rbp), %rdx
xorq -0x58(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x814e0
movq -0x10(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0x3a684
leaq -0x38(%rbp), %rdi
callq 0x81560
movsd 0x998ce(%rip), %xmm1 # 0xd3f18
mulsd %xmm1, %xmm0
callq 0x36110
movsd 0x998c5(%rip), %xmm1 # 0xd3f20
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3a62f
leaq -0x38(%rbp), %rdi
callq 0x81560
movsd 0x99883(%rip), %xmm1 # 0xd3f18
mulsd %xmm1, %xmm0
callq 0x36110
cvttsd2si %xmm0, %eax
movb %al, -0x61(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x3a6cb
movsbl -0x61(%rbp), %edx
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movsbl (%rax), %ecx
xorl %edx, %ecx
movb %cl, (%rax)
jmp 0x3a6a5
jmp 0x3a6cd
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
|
scramble_323:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_18], 0
jz loc_3A6CD
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_3A6CD
mov rax, [rbp+var_8]
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_78], rax
lea rax, [rbp+var_50]
mov [rbp+var_88], rax
mov rax, [rbp+var_18]
mov [rbp+var_80], rax
mov rdi, [rbp+var_18]
call _strlen
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_80]
mov edx, eax
call hash_password
lea rdi, [rbp+var_60]
mov rsi, [rbp+var_10]
mov edx, 8
call hash_password
mov rsi, [rbp+var_50]
xor rsi, [rbp+var_60]
mov rdx, [rbp+var_48]
xor rdx, [rbp+var_58]
lea rdi, [rbp+var_38]
call my_rnd_init
loc_3A62F:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_78]
jnb short loc_3A684
lea rdi, [rbp+var_38]
call my_rnd
movsd xmm1, cs:qword_D3F18
mulsd xmm0, xmm1
call _floor
movsd xmm1, cs:qword_D3F20
addsd xmm0, xmm1
cvttsd2si eax, xmm0
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_3A62F
loc_3A684:
lea rdi, [rbp+var_38]
call my_rnd
movsd xmm1, cs:qword_D3F18
mulsd xmm0, xmm1
call _floor
cvttsd2si eax, xmm0
mov [rbp+var_61], al
loc_3A6A5:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_8]
jz short loc_3A6CB
movsx edx, [rbp+var_61]
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
movsx ecx, byte ptr [rax]
xor ecx, edx
mov [rax], cl
jmp short loc_3A6A5
loc_3A6CB:
jmp short $+2
loc_3A6CD:
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
add rsp, 90h
pop rbp
retn
|
_BYTE * scramble_323(_BYTE *a1, _BYTE *a2, _BYTE *a3)
{
int v3; // eax
double v4; // xmm0_8
double v5; // xmm0_8
_BYTE *v6; // rax
double v7; // xmm0_8
_BYTE *v8; // rax
_BYTE *result; // rax
_BYTE *v10; // [rsp+10h] [rbp-80h]
_BYTE *v11; // [rsp+18h] [rbp-78h]
_BYTE *v12; // [rsp+20h] [rbp-70h]
char v13; // [rsp+2Fh] [rbp-61h]
_QWORD v14[2]; // [rsp+30h] [rbp-60h] BYREF
_QWORD v15[3]; // [rsp+40h] [rbp-50h] BYREF
_BYTE v16[32]; // [rsp+58h] [rbp-38h] BYREF
_BYTE *v17; // [rsp+78h] [rbp-18h]
_BYTE *v18; // [rsp+80h] [rbp-10h]
_BYTE *v19; // [rsp+88h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
if ( a3 && *v17 )
{
v12 = v19;
v11 = v18 + 8;
v10 = v17;
v3 = strlen(v17);
hash_password(v15, v10, v3);
hash_password(v14, v18, 8);
my_rnd_init(v16, v14[0] ^ v15[0], v14[1] ^ v15[1]);
while ( v18 < v11 )
{
v4 = my_rnd(v16);
v5 = floor(v4 * 31.0);
v6 = v19++;
*v6 = (int)(v5 + 64.0);
++v18;
}
v7 = my_rnd(v16);
v13 = (int)floor(v7 * 31.0);
while ( v12 != v19 )
{
v8 = v12++;
*v8 ^= v13;
}
}
result = v19;
*v19 = 0;
return result;
}
|
scramble_323:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0013a6cd
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0013a6cd
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x78],RAX
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00136400
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x80]
MOV EDX,EAX
CALL 0x0013a420
LEA RDI,[RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x8
CALL 0x0013a420
MOV RSI,qword ptr [RBP + -0x50]
XOR RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x48]
XOR RDX,qword ptr [RBP + -0x58]
LEA RDI,[RBP + -0x38]
CALL 0x001814e0
LAB_0013a62f:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x78]
JNC 0x0013a684
LEA RDI,[RBP + -0x38]
CALL 0x00181560
MOVSD XMM1,qword ptr [0x001d3f18]
MULSD XMM0,XMM1
CALL 0x00136110
MOVSD XMM1,qword ptr [0x001d3f20]
ADDSD XMM0,XMM1
CVTTSD2SI EAX,XMM0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0013a62f
LAB_0013a684:
LEA RDI,[RBP + -0x38]
CALL 0x00181560
MOVSD XMM1,qword ptr [0x001d3f18]
MULSD XMM0,XMM1
CALL 0x00136110
CVTTSD2SI EAX,XMM0
MOV byte ptr [RBP + -0x61],AL
LAB_0013a6a5:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x8]
JZ 0x0013a6cb
MOVSX EDX,byte ptr [RBP + -0x61]
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x70],RCX
MOVSX ECX,byte ptr [RAX]
XOR ECX,EDX
MOV byte ptr [RAX],CL
JMP 0x0013a6a5
LAB_0013a6cb:
JMP 0x0013a6cd
LAB_0013a6cd:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
ADD RSP,0x90
POP RBP
RET
|
void scramble_323(byte *param_1,ulong param_2,char *param_3)
{
size_t sVar1;
double dVar2;
byte *local_78;
ulong local_68;
ulong local_60;
ulong local_58;
ulong local_50;
int1 local_40 [32];
char *local_20;
ulong local_18;
byte *local_10;
local_10 = param_1;
if ((param_3 != (char *)0x0) && (*param_3 != '\0')) {
local_20 = param_3;
local_18 = param_2;
sVar1 = strlen(param_3);
hash_password(&local_58,param_3,sVar1 & 0xffffffff);
hash_password(&local_68,local_18,8);
my_rnd_init(local_40,local_58 ^ local_68,local_50 ^ local_60);
for (; local_18 < param_2 + 8; local_18 = local_18 + 1) {
dVar2 = (double)my_rnd(local_40);
dVar2 = floor(dVar2 * DAT_001d3f18);
*local_10 = (byte)(int)(dVar2 + DAT_001d3f20);
local_10 = local_10 + 1;
}
dVar2 = (double)my_rnd(local_40);
dVar2 = floor(dVar2 * DAT_001d3f18);
local_78 = param_1;
while (local_78 != local_10) {
*local_78 = *local_78 ^ (byte)(int)dVar2;
local_78 = local_78 + 1;
}
}
*local_10 = 0;
return;
}
|
|
12,220
|
js_string_substring
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_substring(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str, ret;
int a, b, start, end;
JSString *p;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
if (JS_ToInt32Clamp(ctx, &a, argv[0], 0, p->len, 0)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
b = p->len;
if (!JS_IsUndefined(argv[1])) {
if (JS_ToInt32Clamp(ctx, &b, argv[1], 0, p->len, 0)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
}
if (a < b) {
start = a;
end = b;
} else {
start = b;
end = a;
}
ret = js_sub_string(ctx, p, start, end);
JS_FreeValue(ctx, str);
return ret;
}
|
O1
|
c
|
js_string_substring:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbp
movq %rdi, %r14
callq 0x425ff
movq %rdx, %rbx
movq %rax, 0x10(%rsp)
cmpl $0x6, %ebx
jne 0x7bf03
movq %rax, %r15
jmp 0x7bfb3
movq 0x10(%rsp), %r12
movl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
movl 0x4(%r12), %r9d
andl %r13d, %r9d
movq (%rbp), %rdx
movq 0x8(%rbp), %rcx
movl $0x0, (%rsp)
leaq 0xc(%rsp), %rsi
xorl %r15d, %r15d
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x27756
testl %eax, %eax
je 0x7bf44
movl $0x6, %r12d
jmp 0x7bf9f
andl 0x4(%r12), %r13d
movl %r13d, 0x8(%rsp)
movq 0x18(%rbp), %rcx
cmpl $0x3, %ecx
je 0x7bf7c
movq 0x10(%rbp), %rdx
movl $0x0, (%rsp)
leaq 0x8(%rsp), %rsi
xorl %r15d, %r15d
movq %r14, %rdi
xorl %r8d, %r8d
movl %r13d, %r9d
callq 0x27756
testl %eax, %eax
jne 0x7bf3c
movl 0xc(%rsp), %eax
movl 0x8(%rsp), %edx
cmpl %edx, %eax
movl %edx, %ecx
cmovgl %eax, %ecx
cmovll %eax, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x347cf
movq %rax, %r15
movq %rdx, %r12
movq 0x10(%rsp), %rsi
movq 0x18(%r14), %rdi
movq %rbx, %rdx
callq 0x1d8c6
movq %r12, %rbx
movq %r15, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_string_substring:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbp, r8
mov r14, rdi
call JS_ToStringCheckObject
mov rbx, rdx
mov [rsp+48h+var_38], rax
cmp ebx, 6
jnz short loc_7BF03
mov r15, rax
jmp loc_7BFB3
loc_7BF03:
mov r12, [rsp+48h+var_38]
mov r13d, 7FFFFFFFh
mov r9d, [r12+4]
and r9d, r13d
mov rdx, [rbp+0]
mov rcx, [rbp+8]
mov [rsp+48h+var_48], 0
lea rsi, [rsp+48h+var_3C]
xor r15d, r15d
mov rdi, r14
xor r8d, r8d
call JS_ToInt32Clamp
test eax, eax
jz short loc_7BF44
loc_7BF3C:
mov r12d, 6
jmp short loc_7BF9F
loc_7BF44:
and r13d, [r12+4]
mov [rsp+48h+var_40], r13d
mov rcx, [rbp+18h]
cmp ecx, 3
jz short loc_7BF7C
mov rdx, [rbp+10h]
mov [rsp+48h+var_48], 0
lea rsi, [rsp+48h+var_40]
xor r15d, r15d
mov rdi, r14
xor r8d, r8d
mov r9d, r13d
call JS_ToInt32Clamp
test eax, eax
jnz short loc_7BF3C
loc_7BF7C:
mov eax, [rsp+48h+var_3C]
mov edx, [rsp+48h+var_40]
cmp eax, edx
mov ecx, edx
cmovg ecx, eax
cmovl edx, eax
mov rdi, r14
mov rsi, r12
call js_sub_string
mov r15, rax
mov r12, rdx
loc_7BF9F:
mov rsi, [rsp+48h+var_38]
mov rdi, [r14+18h]
mov rdx, rbx
call JS_FreeValueRT
mov rbx, r12
loc_7BFB3:
mov rax, r15
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_DWORD * js_string_substring(
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 *v15; // rax
long long v16; // rdx
long long v17; // rbx
long long v18; // r15
_DWORD *v19; // r12
int v20; // r13d
long long v21; // rcx
int v22; // edx
int v23; // ecx
int v25; // [rsp+8h] [rbp-40h] BYREF
int v26; // [rsp+Ch] [rbp-3Ch] BYREF
_DWORD *v27; // [rsp+10h] [rbp-38h]
v15 = (_DWORD *)JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v17 = v16;
v27 = v15;
if ( (_DWORD)v16 == 6 )
return v15;
v19 = v27;
v18 = 0LL;
if ( !(unsigned int)JS_ToInt32Clamp(a1, &v26, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v27[1] & 0x7FFFFFFF, 0) )
{
v20 = v19[1] & 0x7FFFFFFF;
v25 = v20;
v21 = *(_QWORD *)(a5 + 24);
if ( (_DWORD)v21 == 3
|| (v18 = 0LL, !(unsigned int)JS_ToInt32Clamp(a1, &v25, *(_DWORD **)(a5 + 16), v21, 0, v20, 0)) )
{
v22 = v25;
v23 = v25;
if ( v26 > v25 )
v23 = v26;
if ( v26 < v25 )
v22 = v26;
v18 = js_sub_string(a1, (long long)v19, v22, v23);
}
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v27, v17);
return (_DWORD *)v18;
}
| |||
12,221
|
js_string_substring
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_substring(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str, ret;
int a, b, start, end;
JSString *p;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
if (JS_ToInt32Clamp(ctx, &a, argv[0], 0, p->len, 0)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
b = p->len;
if (!JS_IsUndefined(argv[1])) {
if (JS_ToInt32Clamp(ctx, &b, argv[1], 0, p->len, 0)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
}
if (a < b) {
start = a;
end = b;
} else {
start = b;
end = a;
}
ret = js_sub_string(ctx, p, start, end);
JS_FreeValue(ctx, str);
return ret;
}
|
O2
|
c
|
js_string_substring:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r13
movq %rdi, %r15
callq 0x3a290
movq %rax, %rbx
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x68326
movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
movl 0x4(%rbx), %r9d
andl %ebp, %r9d
movq (%r13), %rdx
movq 0x8(%r13), %rcx
andl $0x0, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x213d5
testl %eax, %eax
je 0x682bb
pushq $0x6
popq %r13
jmp 0x68312
andl 0x4(%rbx), %ebp
movl %ebp, 0x10(%rsp)
movq 0x18(%r13), %rcx
cmpl $0x3, %ecx
je 0x682f1
movq 0x10(%r13), %rdx
andl $0x0, (%rsp)
leaq 0x10(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x213d5
testl %eax, %eax
jne 0x682b5
movl 0x10(%rsp), %ebp
movl 0x14(%rsp), %eax
cmpl %ebp, %eax
movl %ebp, %ecx
cmovgl %eax, %ecx
cmovll %eax, %ebp
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2e21d
movq %rax, %r12
movq %rdx, %r13
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1801e
movq %r12, %rbx
movq %r13, %r14
movq %rbx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_string_substring:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, r8
mov r15, rdi
call JS_ToStringCheckObject
mov rbx, rax
mov r14, rdx
cmp r14d, 6
jz loc_68326
mov ebp, 7FFFFFFFh
mov r9d, [rbx+4]
and r9d, ebp
mov rdx, [r13+0]
mov rcx, [r13+8]
and [rsp+48h+var_48], 0
lea rsi, [rsp+48h+var_34]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
call JS_ToInt32Clamp
test eax, eax
jz short loc_682BB
loc_682B5:
push 6
pop r13
jmp short loc_68312
loc_682BB:
and ebp, [rbx+4]
mov [rsp+48h+var_38], ebp
mov rcx, [r13+18h]
cmp ecx, 3
jz short loc_682F1
mov rdx, [r13+10h]
and [rsp+48h+var_48], 0
lea rsi, [rsp+48h+var_38]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
mov r9d, ebp
call JS_ToInt32Clamp
test eax, eax
jnz short loc_682B5
mov ebp, [rsp+48h+var_38]
loc_682F1:
mov eax, [rsp+48h+var_34]
cmp eax, ebp
mov ecx, ebp
cmovg ecx, eax
cmovl ebp, eax
mov rdi, r15
mov rsi, rbx
mov edx, ebp
call js_sub_string
mov r12, rax
mov r13, rdx
loc_68312:
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call JS_FreeValue
mov rbx, r12
mov r14, r13
loc_68326:
mov rax, rbx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_DWORD * js_string_substring(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // rax
_DWORD *v16; // rbx
long long v17; // rdx
long long v18; // r14
long long v19; // r12
int v20; // ebp
long long v21; // rcx
int v22; // ecx
int v24; // [rsp+10h] [rbp-38h] BYREF
int v25[13]; // [rsp+14h] [rbp-34h] BYREF
v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v16 = (_DWORD *)v15;
v18 = v17;
if ( (_DWORD)v17 != 6 )
{
v19 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(
a1,
v25,
*(_DWORD **)a5,
*(_QWORD *)(a5 + 8),
0,
*(_DWORD *)(v15 + 4) & 0x7FFFFFFF,
0) )
{
LABEL_12:
JS_FreeValue(a1, (long long)v16, v18);
return (_DWORD *)v19;
}
v20 = v16[1] & 0x7FFFFFFF;
v24 = v20;
v21 = *(_QWORD *)(a5 + 24);
if ( (_DWORD)v21 != 3 )
{
v19 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v24, *(_DWORD **)(a5 + 16), v21, 0, v20, 0) )
goto LABEL_12;
v20 = v24;
}
v22 = v20;
if ( v25[0] > v20 )
v22 = v25[0];
if ( v25[0] < v20 )
v20 = v25[0];
v19 = js_sub_string(a1, v16, (unsigned int)v20, v22);
goto LABEL_12;
}
return v16;
}
|
js_string_substring:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,R8
MOV R15,RDI
CALL 0x0013a290
MOV RBX,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x00168326
MOV EBP,0x7fffffff
MOV R9D,dword ptr [RBX + 0x4]
AND R9D,EBP
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
AND dword ptr [RSP],0x0
LEA RSI,[RSP + 0x14]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
CALL 0x001213d5
TEST EAX,EAX
JZ 0x001682bb
LAB_001682b5:
PUSH 0x6
POP R13
JMP 0x00168312
LAB_001682bb:
AND EBP,dword ptr [RBX + 0x4]
MOV dword ptr [RSP + 0x10],EBP
MOV RCX,qword ptr [R13 + 0x18]
CMP ECX,0x3
JZ 0x001682f1
MOV RDX,qword ptr [R13 + 0x10]
AND dword ptr [RSP],0x0
LEA RSI,[RSP + 0x10]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
MOV R9D,EBP
CALL 0x001213d5
TEST EAX,EAX
JNZ 0x001682b5
MOV EBP,dword ptr [RSP + 0x10]
LAB_001682f1:
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,EBP
MOV ECX,EBP
CMOVG ECX,EAX
CMOVL EBP,EAX
MOV RDI,R15
MOV RSI,RBX
MOV EDX,EBP
CALL 0x0012e21d
MOV R12,RAX
MOV R13,RDX
LAB_00168312:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011801e
MOV RBX,R12
MOV R14,R13
LAB_00168326:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_string_substring(int8 param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
long lVar4;
int8 *in_R8;
int1 auVar5 [16];
int1 auVar6 [16];
uint local_38;
uint local_34;
auVar5 = JS_ToStringCheckObject();
lVar4 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
return auVar5;
}
iVar3 = JS_ToInt32Clamp(param_1,&local_34,*in_R8,in_R8[1],0,*(uint *)(lVar4 + 4) & 0x7fffffff,0);
if (iVar3 == 0) {
local_38 = *(uint *)(lVar4 + 4) & 0x7fffffff;
if (((int)in_R8[3] == 3) ||
(iVar3 = JS_ToInt32Clamp(param_1,&local_38,in_R8[2],in_R8[3],0,local_38,0), iVar3 == 0)) {
uVar2 = local_38;
if ((int)local_38 < (int)local_34) {
uVar2 = local_34;
}
uVar1 = local_38;
if ((int)local_34 < (int)local_38) {
uVar1 = local_34;
}
auVar6 = js_sub_string(param_1,lVar4,uVar1,uVar2);
goto LAB_00168312;
}
}
auVar6 = ZEXT816(6) << 0x40;
LAB_00168312:
JS_FreeValue(param_1,lVar4,auVar5._8_8_);
return auVar6;
}
|
|
12,222
|
getopt_double_limit_value
|
eloqsql/mysys/my_getopt.c
|
double getopt_double_limit_value(double num, const struct my_option *optp,
my_bool *fix)
{
my_bool adjusted= FALSE;
double old= num;
double min, max;
DBUG_ENTER("getopt_double_limit_value");
max= getopt_ulonglong2double(optp->max_value);
min= getopt_ulonglong2double(optp->min_value);
if (max && num > max)
{
num= max;
adjusted= TRUE;
}
if (num < min)
{
num= min;
adjusted= TRUE;
}
if (fix)
*fix= adjusted;
else if (adjusted)
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': value %g adjusted to %g",
optp->name, old, num);
DBUG_RETURN(num);
}
|
O0
|
c
|
getopt_double_limit_value:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movsd %xmm0, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x29820
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x29820
movsd %xmm0, -0x30(%rbp)
movsd -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2bb29
jp 0x2bb29
jmp 0x2bb43
movsd -0x8(%rbp), %xmm0
ucomisd -0x38(%rbp), %xmm0
jbe 0x2bb43
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movb $0x1, -0x19(%rbp)
movsd -0x8(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2bb61
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movb $0x1, -0x19(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2bb73
movb -0x19(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
jmp 0x2bba6
cmpb $0x0, -0x19(%rbp)
je 0x2bba4
leaq 0x1adab0(%rip), %rax # 0x1d9630
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movsd -0x28(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
movl $0x1, %edi
leaq 0x57482(%rip), %rsi # 0x83022
movb $0x2, %al
callq *%rcx
jmp 0x2bba6
jmp 0x2bba8
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
getopt_double_limit_value:
push rbp
mov rbp, rsp
sub rsp, 40h
movsd [rbp+var_8], xmm0
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_19], 0
movsd xmm0, [rbp+var_8]
movsd [rbp+var_28], xmm0
mov rax, [rbp+var_10]
mov rdi, [rax+50h]
call getopt_ulonglong2double
movsd [rbp+var_38], xmm0
mov rax, [rbp+var_10]
mov rdi, [rax+48h]
call getopt_ulonglong2double
movsd [rbp+var_30], xmm0
movsd xmm0, [rbp+var_38]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_2BB29
jp short loc_2BB29
jmp short loc_2BB43
loc_2BB29:
movsd xmm0, [rbp+var_8]
ucomisd xmm0, [rbp+var_38]
jbe short loc_2BB43
movsd xmm0, [rbp+var_38]
movsd [rbp+var_8], xmm0
mov [rbp+var_19], 1
loc_2BB43:
movsd xmm1, [rbp+var_8]
movsd xmm0, [rbp+var_30]
ucomisd xmm0, xmm1
jbe short loc_2BB61
movsd xmm0, [rbp+var_30]
movsd [rbp+var_8], xmm0
mov [rbp+var_19], 1
loc_2BB61:
cmp [rbp+var_18], 0
jz short loc_2BB73
mov cl, [rbp+var_19]
mov rax, [rbp+var_18]
mov [rax], cl
jmp short loc_2BBA6
loc_2BB73:
cmp [rbp+var_19], 0
jz short loc_2BBA4
lea rax, my_getopt_error_reporter
mov rcx, [rax]
mov rax, [rbp+var_10]
mov rdx, [rax]
movsd xmm0, [rbp+var_28]
movsd xmm1, [rbp+var_8]
mov edi, 1
lea rsi, aOptionSValueGA; "option '%s': value %g adjusted to %g"
mov al, 2
call rcx
loc_2BBA4:
jmp short $+2
loc_2BBA6:
jmp short $+2
loc_2BBA8:
movsd xmm0, [rbp+var_8]
movsd [rbp+var_40], xmm0
movsd xmm0, [rbp+var_40]
add rsp, 40h
pop rbp
retn
|
double getopt_double_limit_value(_QWORD *a1, char *a2, double a3)
{
double v4; // [rsp+8h] [rbp-38h]
double v5; // [rsp+10h] [rbp-30h]
char v7; // [rsp+27h] [rbp-19h]
double v8; // [rsp+38h] [rbp-8h]
v8 = a3;
v7 = 0;
v4 = getopt_ulonglong2double(a1[10]);
v5 = getopt_ulonglong2double(a1[9]);
if ( v4 != 0.0 && v8 > v4 )
{
v8 = v4;
v7 = 1;
}
if ( v5 > v8 )
{
v8 = v5;
v7 = 1;
}
if ( a2 )
{
*a2 = v7;
}
else if ( v7 )
{
my_getopt_error_reporter(1, (long long)"option '%s': value %g adjusted to %g", *a1, a3, v8);
}
return v8;
}
|
getopt_double_limit_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOVSD qword ptr [RBP + -0x8],XMM0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x19],0x0
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD qword ptr [RBP + -0x28],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x00129820
MOVSD qword ptr [RBP + -0x38],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x00129820
MOVSD qword ptr [RBP + -0x30],XMM0
MOVSD XMM0,qword ptr [RBP + -0x38]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x0012bb29
JP 0x0012bb29
JMP 0x0012bb43
LAB_0012bb29:
MOVSD XMM0,qword ptr [RBP + -0x8]
UCOMISD XMM0,qword ptr [RBP + -0x38]
JBE 0x0012bb43
MOVSD XMM0,qword ptr [RBP + -0x38]
MOVSD qword ptr [RBP + -0x8],XMM0
MOV byte ptr [RBP + -0x19],0x1
LAB_0012bb43:
MOVSD XMM1,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RBP + -0x30]
UCOMISD XMM0,XMM1
JBE 0x0012bb61
MOVSD XMM0,qword ptr [RBP + -0x30]
MOVSD qword ptr [RBP + -0x8],XMM0
MOV byte ptr [RBP + -0x19],0x1
LAB_0012bb61:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012bb73
MOV CL,byte ptr [RBP + -0x19]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
JMP 0x0012bba6
LAB_0012bb73:
CMP byte ptr [RBP + -0x19],0x0
JZ 0x0012bba4
LEA RAX,[0x2d9630]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX]
MOVSD XMM0,qword ptr [RBP + -0x28]
MOVSD XMM1,qword ptr [RBP + -0x8]
MOV EDI,0x1
LEA RSI,[0x183022]
MOV AL,0x2
CALL RCX
LAB_0012bba4:
JMP 0x0012bba6
LAB_0012bba6:
JMP 0x0012bba8
LAB_0012bba8:
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD qword ptr [RBP + -0x40],XMM0
MOVSD XMM0,qword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
|
double getopt_double_limit_value(double param_1,int8 *param_2,char *param_3)
{
double dVar1;
double dVar2;
char local_21;
double local_10;
local_21 = '\0';
dVar1 = (double)getopt_ulonglong2double(param_2[10]);
dVar2 = (double)getopt_ulonglong2double(param_2[9]);
if (((dVar1 != 0.0) || (local_10 = param_1, NAN(dVar1))) && (local_10 = param_1, dVar1 < param_1))
{
local_21 = '\x01';
local_10 = dVar1;
}
if (local_10 < dVar2) {
local_21 = '\x01';
local_10 = dVar2;
}
if (param_3 == (char *)0x0) {
if (local_21 != '\0') {
(*(code *)my_getopt_error_reporter)
(param_1,local_10,1,"option \'%s\': value %g adjusted to %g",*param_2);
}
}
else {
*param_3 = local_21;
}
return local_10;
}
|
|
12,223
|
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;
}
|
O0
|
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&):
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movl %edx, 0x114(%rsp)
movq %rcx, 0x108(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x10(%rsp)
movb $0x0, 0x107(%rsp)
leaq 0x106(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5b0e0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x1675be(%rip), %rsi # 0x210539
callq 0x630d0
jmp 0xa8f82
leaq 0x106(%rsp), %rdi
callq 0x5b560
movq 0x108(%rsp), %rdi
callq 0x5a4e0
testb $0x1, %al
jne 0xa905a
movq 0x108(%rsp), %rdx
movb $0x20, 0xcf(%rsp)
leaq 0x17391b(%rip), %rsi # 0x21c8d6
leaq 0xd0(%rsp), %rdi
leaq 0xcf(%rsp), %rcx
callq 0xbb030
jmp 0xa8fd2
movq 0x18(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x5a150
jmp 0xa8fe6
leaq 0xd0(%rsp), %rdi
callq 0x5b588
jmp 0xa905a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x106(%rsp), %rdi
callq 0x5b560
jmp 0xa9262
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0xa9258
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x5b588
jmp 0xa9258
movq 0x18(%rsp), %rdi
leaq 0x1674e1(%rip), %rsi # 0x210547
callq 0x5a220
jmp 0xa906d
movq 0x10(%rsp), %rax
cmpl $0xe, 0x20(%rax)
jne 0xa9155
movq 0x10(%rsp), %rdi
addq $0x28, %rdi
movq %rdi, (%rsp)
callq 0xbb1c0
movq (%rsp), %rsi
movq %rax, 0xa0(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xa8b60
jmp 0xa90a9
movb $0x27, 0x7f(%rsp)
leaq 0x167495(%rip), %rdx # 0x21054a
leaq 0xa8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x80(%rsp), %rcx
leaq 0x7f(%rsp), %r8
callq 0xbb0f0
jmp 0xa90d9
movq 0x18(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5a150
jmp 0xa90ed
leaq 0xa8(%rsp), %rdi
callq 0x5b588
leaq 0x80(%rsp), %rdi
callq 0x5b588
jmp 0xa91bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0xa9143
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x5b588
leaq 0x80(%rsp), %rdi
callq 0x5b588
jmp 0xa9258
movq 0x10(%rsp), %rax
movl 0x20(%rax), %edi
callq 0xbb280
movq %rax, 0x50(%rsp)
leaq 0x1673eb(%rip), %rsi # 0x210559
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0xbb1d0
jmp 0xa917f
movq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x5a150
jmp 0xa9190
leaq 0x58(%rsp), %rdi
callq 0x5b588
jmp 0xa91bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x5b588
jmp 0xa9258
cmpl $0x0, 0x114(%rsp)
je 0xa922f
movl 0x114(%rsp), %edi
callq 0xbb280
movq %rax, 0x28(%rsp)
leaq 0x167384(%rip), %rsi # 0x210565
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0xbb1d0
jmp 0xa91f2
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a150
jmp 0xa9203
leaq 0x30(%rsp), %rdi
callq 0x5b588
jmp 0xa922f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x5b588
jmp 0xa9258
movb $0x1, 0x107(%rsp)
testb $0x1, 0x107(%rsp)
jne 0xa924b
movq 0x18(%rsp), %rdi
callq 0x5b588
movq 0x8(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
retq
movq 0x18(%rsp), %rdi
callq 0x5b588
movq 0xf8(%rsp), %rdi
callq 0x5aba0
nop
|
_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_:
sub rsp, 128h
mov [rsp+128h+var_110], rdi; __int64
mov rax, rdi
mov [rsp+128h+var_120], rax; void *
mov [rsp+128h+var_8], rdi
mov qword ptr [rsp+128h+var_10], rsi
mov [rsp+128h+var_14], edx
mov [rsp+128h+var_22+2], rcx
mov rax, qword ptr [rsp+128h+var_10]
mov qword ptr [rsp+128h+var_118], rax; int
mov byte ptr [rsp+128h+var_22+1], 0
lea rdi, [rsp+128h+var_22]
mov [rsp+128h+var_108], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+128h+var_110]
mov rdx, [rsp+128h+var_108]
lea rsi, aSyntaxError; "syntax error "
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_A8F82:
lea rdi, [rsp+128h+var_22]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+128h+var_22+2]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_A905A
mov rdx, [rsp+128h+var_22+2]; int
mov byte ptr [rsp+128h+var_59], 20h ; ' '
lea rsi, aSyntaxErrorWhi+0Dh; int
lea rdi, [rsp+128h+var_59+1]; int
lea rcx, [rsp+128h+var_59]; int
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 &&)
jmp short $+2
loc_A8FD2:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_59+1]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_A8FE6:
lea rdi, [rsp+128h+var_59+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_A905A
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_FE]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_A9262
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
jmp loc_A9258
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_A9258
loc_A905A:
mov rdi, [rsp+128h+var_110]
lea rsi, asc_210547; "- "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_A906D:
mov rax, qword ptr [rsp+128h+var_118]
cmp dword ptr [rax+20h], 0Eh
jnz loc_A9155
mov rdi, qword ptr [rsp+128h+var_118]
add rdi, 28h ; '('
mov qword ptr [rsp+128h+var_128], rdi; int
call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_error_messageEv; 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_error_message(void)
mov rsi, qword ptr [rsp+128h+var_128]; int
mov [rsp+128h+var_88], rax
lea rdi, [rsp+128h+var_A8]; int
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)
jmp short $+2
loc_A90A9:
mov [rsp+128h+var_A9], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+128h+var_80]
lea rsi, [rsp+128h+var_88]
lea rcx, [rsp+128h+var_A8]
lea r8, [rsp+128h+var_A9]
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 &&)
jmp short $+2
loc_A90D9:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_A90ED:
lea rdi, [rsp+128h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_A91BF
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
jmp short loc_A9143
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A9143:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_A9258
loc_A9155:
mov rax, qword ptr [rsp+128h+var_118]
mov edi, [rax+20h]
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)
mov qword ptr [rsp+128h+var_D8], rax
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+128h+var_D0]; int
lea rdx, [rsp+128h+var_D8]; int
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* &&)
jmp short $+2
loc_A917F:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_A9190:
lea rdi, [rsp+128h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_A91BF
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_A9258
loc_A91BF:
cmp [rsp+128h+var_14], 0
jz short loc_A922F
mov edi, [rsp+128h+var_14]
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)
mov qword ptr [rsp+128h+var_100], rax
lea rsi, aExpected; "; expected "
lea rdi, [rsp+128h+var_F8]; int
lea rdx, [rsp+128h+var_100]; int
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* &&)
jmp short $+2
loc_A91F2:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_A9203:
lea rdi, [rsp+128h+var_F8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_A922F
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_A9258
loc_A922F:
mov byte ptr [rsp+128h+var_22+1], 1
test byte ptr [rsp+128h+var_22+1], 1
jnz short loc_A924B
mov rdi, [rsp+128h+var_110]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A924B:
mov rax, [rsp+128h+var_120]
add rsp, 128h
retn
loc_A9258:
mov rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A9262:
mov rdi, [rsp+arg_F0]
call __Unwind_Resume
|
void * 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(
long long a1,
long long a2,
unsigned int a3,
long long a4)
{
int v4; // r8d
int v5; // r9d
int v6; // r9d
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // ecx
int v11; // r8d
int v12; // r9d
void *v14; // [rsp+0h] [rbp-128h]
int v15; // [rsp+0h] [rbp-128h]
void *v16; // [rsp+8h] [rbp-120h]
void *v17; // [rsp+8h] [rbp-120h]
int v18[2]; // [rsp+10h] [rbp-118h]
int v19; // [rsp+10h] [rbp-118h]
void *v20; // [rsp+18h] [rbp-110h]
void *v21; // [rsp+18h] [rbp-110h]
void *v22; // [rsp+18h] [rbp-110h]
int v23[2]; // [rsp+28h] [rbp-100h] BYREF
int v24[8]; // [rsp+30h] [rbp-F8h] BYREF
int v25[2]; // [rsp+50h] [rbp-D8h] BYREF
int v26[9]; // [rsp+58h] [rbp-D0h] BYREF
char v27; // [rsp+7Fh] [rbp-A9h] BYREF
int v28[8]; // [rsp+80h] [rbp-A8h] BYREF
long long error_message; // [rsp+A0h] [rbp-88h] BYREF
_BYTE v30[39]; // [rsp+A8h] [rbp-80h] BYREF
char v31; // [rsp+CFh] [rbp-59h] BYREF
_BYTE v32[54]; // [rsp+D0h] [rbp-58h] BYREF
_BYTE v33[14]; // [rsp+106h] [rbp-22h] BYREF
unsigned int v34; // [rsp+114h] [rbp-14h]
int v35[2]; // [rsp+118h] [rbp-10h]
long long v36; // [rsp+120h] [rbp-8h]
v20 = (void *)a1;
v16 = (void *)a1;
v36 = a1;
*(_QWORD *)v35 = a2;
v34 = a3;
*(_QWORD *)&v33[2] = a4;
*(_QWORD *)v18 = a2;
v33[1] = 0;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error ", (long long)v33);
std::allocator<char>::~allocator(v33);
if ( (std::string::empty(*(_QWORD *)&v33[2]) & 1) == 0 )
{
v31 = 32;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(
(int)v32,
(int)"while parsing ",
*(int *)&v33[2],
(int)&v31,
v4,
v5,
v14,
a1,
a2,
a1,
(long long)v33);
std::string::operator+=(v20, v32);
std::string::~string(v32);
}
std::string::operator+=(v20, "- ");
if ( *(_DWORD *)(*(_QWORD *)v18 + 32LL) == 14 )
{
error_message = 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_error_message();
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)v28,
*(_QWORD *)v18 + 40LL);
v27 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
(unsigned int)v30,
(unsigned int)&error_message,
(unsigned int)"; last read: '",
(unsigned int)v28,
(unsigned int)&v27,
v6,
v18[0] + 40,
(_DWORD)v16,
v18[0],
(long long)v20);
std::string::operator+=(v21, v30);
std::string::~string(v30);
std::string::~string(v28);
}
else
{
*(_QWORD *)v25 = 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(*(unsigned int *)(*(_QWORD *)v18 + 32LL));
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(
(int)v26,
(int)"unexpected ",
(int)v25,
v7,
v8,
v9,
(int)v14,
v16,
v18[0],
(long long)v20);
std::string::operator+=(v21, v26);
std::string::~string(v26);
}
if ( v34 )
{
*(_QWORD *)v23 = 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(v34);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(
(int)v24,
(int)"; expected ",
(int)v23,
v10,
v11,
v12,
v15,
v17,
v19,
(long long)v21);
std::string::operator+=(v22, v24);
std::string::~string(v24);
}
return v17;
}
|
exception_message:
SUB RSP,0x128
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x120],RDI
MOV qword ptr [RSP + 0x118],RSI
MOV dword ptr [RSP + 0x114],EDX
MOV qword ptr [RSP + 0x108],RCX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x10],RAX
MOV byte ptr [RSP + 0x107],0x0
LEA RDI,[RSP + 0x106]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x0015b0e0
MOV RDI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_001a8f74:
LEA RSI,[0x310539]
CALL 0x001630d0
JMP 0x001a8f82
LAB_001a8f82:
LEA RDI,[RSP + 0x106]
CALL 0x0015b560
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x0015a4e0
TEST AL,0x1
JNZ 0x001a905a
MOV RDX,qword ptr [RSP + 0x108]
MOV byte ptr [RSP + 0xcf],0x20
LAB_001a8fb4:
LEA RSI,[0x31c8d6]
LEA RDI,[RSP + 0xd0]
LEA RCX,[RSP + 0xcf]
CALL 0x001bb030
JMP 0x001a8fd2
LAB_001a8fd2:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xd0]
CALL 0x0015a150
JMP 0x001a8fe6
LAB_001a8fe6:
LEA RDI,[RSP + 0xd0]
CALL 0x0015b588
JMP 0x001a905a
LAB_001a905a:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x310547]
CALL 0x0015a220
JMP 0x001a906d
LAB_001a906d:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x20],0xe
JNZ 0x001a9155
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x28
MOV qword ptr [RSP],RDI
CALL 0x001bb1c0
MOV RSI,qword ptr [RSP]
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0x80]
CALL 0x001a8b60
JMP 0x001a90a9
LAB_001a90a9:
MOV byte ptr [RSP + 0x7f],0x27
LAB_001a90ae:
LEA RDX,[0x31054a]
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0xa0]
LEA RCX,[RSP + 0x80]
LEA R8,[RSP + 0x7f]
CALL 0x001bb0f0
JMP 0x001a90d9
LAB_001a90d9:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xa8]
CALL 0x0015a150
JMP 0x001a90ed
LAB_001a90ed:
LEA RDI,[RSP + 0xa8]
CALL 0x0015b588
LEA RDI,[RSP + 0x80]
CALL 0x0015b588
JMP 0x001a91bf
LAB_001a9155:
MOV RAX,qword ptr [RSP + 0x10]
MOV EDI,dword ptr [RAX + 0x20]
CALL 0x001bb280
MOV qword ptr [RSP + 0x50],RAX
LAB_001a9167:
LEA RSI,[0x310559]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x50]
CALL 0x001bb1d0
JMP 0x001a917f
LAB_001a917f:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x58]
CALL 0x0015a150
JMP 0x001a9190
LAB_001a9190:
LEA RDI,[RSP + 0x58]
CALL 0x0015b588
JMP 0x001a91bf
LAB_001a91bf:
CMP dword ptr [RSP + 0x114],0x0
JZ 0x001a922f
MOV EDI,dword ptr [RSP + 0x114]
CALL 0x001bb280
MOV qword ptr [RSP + 0x28],RAX
LAB_001a91da:
LEA RSI,[0x310565]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x28]
CALL 0x001bb1d0
JMP 0x001a91f2
LAB_001a91f2:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x30]
CALL 0x0015a150
LAB_001a9201:
JMP 0x001a9203
LAB_001a9203:
LEA RDI,[RSP + 0x30]
CALL 0x0015b588
JMP 0x001a922f
LAB_001a922f:
MOV byte ptr [RSP + 0x107],0x1
TEST byte ptr [RSP + 0x107],0x1
JNZ 0x001a924b
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0015b588
LAB_001a924b:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x128
RET
|
/* WARNING: Removing unreachable block (ram,0x001a9241) */
/* 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)
{
ulong uVar1;
char *local_100;
detail local_f8 [32];
char *local_d8;
detail local_d0 [39];
char local_a9;
string local_a8 [32];
char *local_88;
detail local_80 [39];
char local_59;
detail local_58 [54];
allocator local_22;
int1 local_21;
string *local_20;
int local_14;
long local_10;
string *local_8;
local_21 = 0;
local_20 = param_4;
local_14 = param_3;
local_10 = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 001a8f74 to 001a8f7f has its CatchHandler @ 001a8ff5 */
std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",&local_22);
std::allocator<char>::~allocator((allocator<char> *)&local_22);
uVar1 = std::__cxx11::string::empty();
if ((uVar1 & 1) == 0) {
local_59 = ' ';
/* try { // try from 001a8fb4 to 001a8fcf has its CatchHandler @ 001a901b */
concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char>
(local_58,"while parsing ",local_20,&local_59);
/* try { // try from 001a8fd2 to 001a8fe3 has its CatchHandler @ 001a9034 */
std::__cxx11::string::operator+=(param_1,(string *)local_58);
std::__cxx11::string::~string((string *)local_58);
}
/* try { // try from 001a905a to 001a90a6 has its CatchHandler @ 001a901b */
std::__cxx11::string::operator+=(param_1,"- ");
if (*(int *)(param_2 + 0x20) == 0xe) {
local_88 = (char *)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_error_message((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_2 + 0x28));
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_a9 = '\'';
/* try { // try from 001a90ae to 001a90d6 has its CatchHandler @ 001a910c */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
(local_80,&local_88,"; last read: \'",local_a8,&local_a9);
/* try { // try from 001a90d9 to 001a90ea has its CatchHandler @ 001a9122 */
std::__cxx11::string::operator+=(param_1,(string *)local_80);
std::__cxx11::string::~string((string *)local_80);
std::__cxx11::string::~string(local_a8);
}
else {
local_d8 = (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(*(int4 *)(param_2 + 0x20));
/* try { // try from 001a9167 to 001a917c has its CatchHandler @ 001a901b */
concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_d0,"unexpected ",&local_d8);
/* try { // try from 001a917f to 001a918d has its CatchHandler @ 001a919c */
std::__cxx11::string::operator+=(param_1,(string *)local_d0);
std::__cxx11::string::~string((string *)local_d0);
}
if (local_14 != 0) {
local_100 = (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(local_14);
/* try { // try from 001a91da to 001a91ef has its CatchHandler @ 001a901b */
concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_f8,"; expected ",&local_100);
/* try { // try from 001a91f2 to 001a9200 has its CatchHandler @ 001a920f */
std::__cxx11::string::operator+=(param_1,(string *)local_f8);
std::__cxx11::string::~string((string *)local_f8);
}
return param_1;
}
|
|
12,224
|
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;
}
|
O3
|
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 %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0x92647(%rip), %rsi # 0xecf7a
leaq 0x9264d(%rip), %rdx # 0xecf87
callq 0x21af4
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x5a9c6
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
addq $0xf, %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ada0
leaq 0x92615(%rip), %rsi # 0xecf88
leaq 0x8(%rsp), %rdi
callq 0x1b120
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1a270
leaq 0x8(%rsp), %rdi
movl $0x20, %esi
callq 0x1a770
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1a270
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5a9c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x925ca(%rip), %rsi # 0xecf97
movq %rbx, %rdi
callq 0x1b120
movl 0x20(%r14), %edi
cmpl $0xe, %edi
jne 0x5aa69
movq 0x98(%r14), %rax
addq $0x28, %r14
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x5a650
leaq 0x2f(%rsp), %r8
movb $0x27, (%r8)
leaq 0x9258b(%rip), %rdx # 0xecf9a
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %rcx
callq 0x60c88
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1a270
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5aa50
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5aae3
movq 0x48(%rsp), %rsi
jmp 0x5aadb
callq 0x60d4a
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, %rdi
callq 0x1a400
leaq 0xb(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ada0
leaq 0x92506(%rip), %rsi # 0xecfa9
leaq 0x8(%rsp), %rdi
callq 0x1b120
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x1b120
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1a270
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5aae3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testl %ebp, %ebp
je 0x5ab63
movl %ebp, %edi
callq 0x60d4a
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, %rdi
callq 0x1a400
leaq 0xb(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ada0
leaq 0x92492(%rip), %rsi # 0xecfb5
leaq 0x8(%rsp), %rdi
callq 0x1b120
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x1b120
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1a270
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5ab63
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5abbc
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ab9a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x5ab9a
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5abe5
movq 0x48(%rsp), %rsi
jmp 0x5abdd
jmp 0x5abb5
jmp 0x5abbc
jmp 0x5abcb
movq %rax, %r14
jmp 0x5abe5
jmp 0x5abbc
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x5abd8
jmp 0x5abe5
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5abe5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x5abf9
movq (%r12), %rsi
incq %rsi
callq 0x1a8f0
movq %r14, %rdi
callq 0x1afd0
nop
|
_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 r13
push r12
push rbx
sub rsp, 58h
mov r15, rcx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
lea rsi, aSyntaxError; "syntax error "
lea rdx, aSyntaxError+0Dh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [r15+8]
test rsi, rsi
jz short loc_5A9C6
lea r13, [rsp+88h+var_70]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
add rsi, 0Fh
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rdi, [rsp+88h+var_80]
mov esi, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r13
jz short loc_5A9C6
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5A9C6:
lea rsi, asc_ECF97; "- "
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov edi, [r14+20h]
cmp edi, 0Eh
jnz loc_5AA69
mov rax, [r14+98h]
add r14, 28h ; '('
mov [rsp+88h+var_58], rax
lea rdi, [rsp+88h+var_50]
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+88h+var_59]
mov byte ptr [r8], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_58]
lea rcx, [rsp+88h+var_50]
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 &&)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5AA50
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5AA50:
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_5AAE3
mov rsi, [rsp+88h+var_40]
jmp short loc_5AADB
loc_5AA69:
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)
mov r14, rax
lea r15, [rsp+88h+var_70]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov rdi, rax
call _strlen
lea rsi, [rax+0Bh]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r15
jz short loc_5AAE3
mov rsi, [rsp+88h+var_70]
loc_5AADB:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5AAE3:
test ebp, ebp
jz short loc_5AB63
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)
mov r14, rax
lea r15, [rsp+88h+var_70]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov rdi, rax
call _strlen
lea rsi, [rax+0Bh]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aExpected; "; expected "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r15
jz short loc_5AB63
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5AB63:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_5ABBC
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5AB9A
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5AB9A
mov r14, rax
loc_5AB9A:
lea rax, [rsp+arg_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_5ABE5
mov rsi, [rsp+arg_40]
jmp short loc_5ABDD
jmp short loc_5ABB5
jmp short loc_5ABBC
jmp short loc_5ABCB
loc_5ABB5:
mov r14, rax
jmp short loc_5ABE5
jmp short $+2
loc_5ABBC:
mov r14, rax
mov rdi, [rsp+arg_0]
cmp rdi, r15
jnz short loc_5ABD8
jmp short loc_5ABE5
loc_5ABCB:
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_5ABE5
loc_5ABD8:
mov rsi, [rsp+arg_10]
loc_5ABDD:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5ABE5:
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_5ABF9
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5ABF9:
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,
_QWORD *a4)
{
long long v8; // rsi
void *v9; // rdi
long long v10; // rsi
long long v11; // r14
long long v12; // rax
long long v13; // r14
long long v14; // rax
void *v16; // [rsp+8h] [rbp-80h] BYREF
long long v17; // [rsp+10h] [rbp-78h]
_QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF
char v19; // [rsp+2Fh] [rbp-59h] BYREF
long long v20; // [rsp+30h] [rbp-58h] BYREF
_QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF
long long v22; // [rsp+48h] [rbp-40h] BYREF
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "syntax error ", (long long)"");
v8 = a4[1];
if ( v8 )
{
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
std::string::reserve(&v16, v8 + 15);
std::string::append(&v16, "while parsing ");
std::string::_M_append(&v16, *a4, a4[1]);
std::string::push_back(&v16, 32LL);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
std::string::append(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 14 )
{
v20 = *(_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)v21,
a2 + 40);
v19 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
&v16,
&v20,
"; last read: '",
v21,
&v19);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
v9 = (void *)v21[0];
if ( (long long *)v21[0] != &v22 )
{
v10 = v22;
LABEL_11:
operator delete(v9, v10 + 1);
}
}
else
{
v11 = ((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)();
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
v12 = strlen(v11);
std::string::reserve(&v16, v12 + 11);
std::string::append(&v16, "unexpected ");
std::string::append(&v16, v11);
std::string::_M_append(a1, v16, v17);
v9 = v16;
if ( v16 != v18 )
{
v10 = v18[0];
goto LABEL_11;
}
}
if ( a3 )
{
v13 = 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);
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
v14 = strlen(v13);
std::string::reserve(&v16, v14 + 11);
std::string::append(&v16, "; expected ");
std::string::append(&v16, v13);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
return a1;
}
|
exception_message:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RCX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
LEA RSI,[0x1ecf7a]
LEA RDX,[0x1ecf87]
CALL 0x00121af4
MOV RSI,qword ptr [R15 + 0x8]
TEST RSI,RSI
JZ 0x0015a9c6
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
ADD RSI,0xf
LAB_0015a962:
LEA RDI,[RSP + 0x8]
CALL 0x0011ada0
LEA RSI,[0x1ecf88]
LEA RDI,[RSP + 0x8]
CALL 0x0011b120
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x0011a270
LEA RDI,[RSP + 0x8]
MOV ESI,0x20
CALL 0x0011a770
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0015a9a7:
MOV RDI,RBX
CALL 0x0011a270
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x0015a9c6
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8f0
LAB_0015a9c6:
LEA RSI,[0x1ecf97]
MOV RDI,RBX
CALL 0x0011b120
MOV EDI,dword ptr [R14 + 0x20]
CMP EDI,0xe
JNZ 0x0015aa69
MOV RAX,qword ptr [R14 + 0x98]
ADD R14,0x28
MOV qword ptr [RSP + 0x30],RAX
LAB_0015a9f2:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x0015a650
LEA R8,[RSP + 0x2f]
MOV byte ptr [R8],0x27
LAB_0015aa08:
LEA RDX,[0x1ecf9a]
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x30]
LEA RCX,[RSP + 0x38]
CALL 0x00160c88
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0015aa2d:
MOV RDI,RBX
CALL 0x0011a270
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015aa50
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8f0
LAB_0015aa50:
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015aae3
MOV RSI,qword ptr [RSP + 0x48]
JMP 0x0015aadb
LAB_0015aa69:
CALL 0x00160d4a
MOV R14,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV RDI,RAX
CALL 0x0011a400
LEA RSI,[RAX + 0xb]
LAB_0015aa92:
LEA RDI,[RSP + 0x8]
CALL 0x0011ada0
LEA RSI,[0x1ecfa9]
LEA RDI,[RSP + 0x8]
CALL 0x0011b120
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x0011b120
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0015aac4:
MOV RDI,RBX
CALL 0x0011a270
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0015aae3
MOV RSI,qword ptr [RSP + 0x18]
LAB_0015aadb:
INC RSI
CALL 0x0011a8f0
LAB_0015aae3:
TEST EBP,EBP
JZ 0x0015ab63
MOV EDI,EBP
CALL 0x00160d4a
MOV R14,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV RDI,RAX
CALL 0x0011a400
LEA RSI,[RAX + 0xb]
LAB_0015ab12:
LEA RDI,[RSP + 0x8]
CALL 0x0011ada0
LEA RSI,[0x1ecfb5]
LEA RDI,[RSP + 0x8]
CALL 0x0011b120
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x0011b120
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0015ab44:
MOV RDI,RBX
CALL 0x0011a270
LAB_0015ab4c:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0015ab63
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8f0
LAB_0015ab63:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
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&) */
long * 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(long *param_1,long param_2,int param_3,ulong *param_4)
{
char *pcVar1;
long *local_80;
int8 local_78;
int1 local_70;
int7 uStack_6f;
int1 local_59;
int8 local_58;
long *local_50 [2];
long local_40 [2];
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ","");
if (param_4[1] != 0) {
local_78 = 0;
local_70 = 0;
/* try { // try from 0015a962 to 0015a99c has its CatchHandler @ 0015abcb */
local_80 = (long *)&local_70;
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::_M_append((char *)&local_80,*param_4);
std::__cxx11::string::push_back((char)&local_80);
/* try { // try from 0015a9a7 to 0015a9ae has its CatchHandler @ 0015abb3 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
}
/* try { // try from 0015a9c6 to 0015a9d4 has its CatchHandler @ 0015abb5 */
std::__cxx11::string::append((char *)param_1);
if (*(int *)(param_2 + 0x20) == 0xe) {
local_58 = *(int8 *)(param_2 + 0x98);
/* try { // try from 0015a9f2 to 0015a9fe has its CatchHandler @ 0015abaf */
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_59 = 0x27;
/* try { // try from 0015aa08 to 0015aa22 has its CatchHandler @ 0015ab97 */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50);
/* try { // try from 0015aa2d to 0015aa34 has its CatchHandler @ 0015ab77 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
if (local_50[0] == local_40) goto LAB_0015aae3;
}
else {
pcVar1 = (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();
local_78 = 0;
local_70 = 0;
local_80 = (long *)&local_70;
strlen(pcVar1);
/* try { // try from 0015aa92 to 0015aab9 has its CatchHandler @ 0015abba */
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::append((char *)&local_80);
/* try { // try from 0015aac4 to 0015aacb has its CatchHandler @ 0015ab75 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 == (long *)&local_70) goto LAB_0015aae3;
local_40[0] = CONCAT71(uStack_6f,local_70);
local_50[0] = local_80;
}
operator_delete(local_50[0],local_40[0] + 1);
LAB_0015aae3:
if (param_3 != 0) {
pcVar1 = (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);
local_78 = 0;
local_70 = 0;
local_80 = (long *)&local_70;
strlen(pcVar1);
/* try { // try from 0015ab12 to 0015ab39 has its CatchHandler @ 0015abbc */
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::append((char *)&local_80);
/* try { // try from 0015ab44 to 0015ab4b has its CatchHandler @ 0015abb1 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
}
return param_1;
}
|
|
12,225
|
minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const
|
monkey531[P]llama/common/chat-template.hpp
|
std::string try_raw_render(
const nlohmann::ordered_json & messages,
const nlohmann::ordered_json & tools,
bool add_generation_prompt,
const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const
{
try {
auto prompt = apply(messages, tools, add_generation_prompt, extra_context, /* adjust_inputs= */ false);
// fprintf(stderr, "try_raw_render: %s\n", prompt.c_str());
return prompt;
} catch (const std::exception & e) {
// fprintf(stderr, "try_raw_render error: %s\n", e.what());
return "";
}
}
|
O3
|
cpp
|
minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, (%rsp)
callq 0xa13b6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x7eb5e
movq %r14, %rdi
callq 0x1a370
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x6c002(%rip), %rdx # 0xeab46
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x21b26
callq 0x1ae30
jmp 0x7eb1b
movq %rax, %r14
callq 0x1ae30
movq %r14, %rdi
callq 0x1af80
movq %rax, %rdi
callq 0x21927
|
_ZNK5minja13chat_template14try_raw_renderERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_:
push r14
push rbx
push rax
mov rbx, rdi
mov [rsp+18h+var_18], 0
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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&,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> const&,bool)
loc_7EB1B:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
cmp edx, 1
jnz short loc_7EB5E
mov rdi, r14; void *
call ___cxa_begin_catch
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aErrorWhileHand_0+34h; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
call ___cxa_end_catch
jmp short loc_7EB1B
mov r14, rax
call ___cxa_end_catch
loc_7EB5E:
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
|
long long minja::chat_template::try_raw_render(long long a1)
{
minja::chat_template::apply(a1);
return a1;
}
|
try_raw_render:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LAB_0017eb0f:
MOV dword ptr [RSP],0x0
CALL 0x001a13b6
LAB_0017eb1b:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, bool,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) const */
chat_template * __thiscall
minja::chat_template::try_raw_render
(chat_template *this,basic_json *param_1,basic_json *param_2,bool param_3,
basic_json *param_4)
{
int7 in_register_00000009;
/* try { // try from 0017eb0f to 0017eb1a has its CatchHandler @ 0017eb26 */
apply((basic_json *)this,param_1,SUB81(param_2,0),
(basic_json *)CONCAT71(in_register_00000009,param_3),SUB81(param_4,0));
return this;
}
|
|
12,226
|
bf_integer_from_radix
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_integer_from_radix(bf_t *r, const limb_t *tab,
limb_t n, limb_t radix)
{
bf_context_t *s = r->ctx;
int pow_tab_len, i, ret;
limb_t radixl;
bf_t *pow_tab;
radixl = get_limb_radix(radix);
pow_tab_len = ceil_log2(n) + 2; /* XXX: check */
pow_tab = bf_malloc(s, sizeof(pow_tab[0]) * pow_tab_len);
if (!pow_tab)
return -1;
for(i = 0; i < pow_tab_len; i++)
bf_init(r->ctx, &pow_tab[i]);
ret = bf_integer_from_radix_rec(r, tab, n, 0, n, radixl, pow_tab);
for(i = 0; i < pow_tab_len; i++) {
bf_delete(&pow_tab[i]);
}
bf_free(s, pow_tab);
return ret;
}
|
O0
|
c
|
bf_integer_from_radix:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movl %eax, %edi
callq 0xf7530
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0xebad0
addl $0x2, %eax
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movslq 0x24(%rsp), %rax
imulq $0x28, %rax, %rsi
callq 0xe8060
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xf7434
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xf74ea
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0xf7471
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
movslq 0x20(%rsp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rsi
callq 0xe5f70
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xf743c
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x38(%rsp), %r8
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %rax
xorl %ecx, %ecx
movq %rax, (%rsp)
callq 0xf7590
movl %eax, 0x1c(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0xf74d3
movq 0x8(%rsp), %rdi
movslq 0x20(%rsp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0xe93d0
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xf74a6
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xe63d0
movl 0x1c(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
|
bf_integer_from_radix:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_20], rdx
mov [rsp+58h+var_28], rcx
mov rax, [rsp+58h+var_10]
mov rax, [rax]
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_28]
mov edi, eax
call get_limb_radix
mov [rsp+58h+var_48], rax
mov rdi, [rsp+58h+var_20]
call ceil_log2
add eax, 2
mov [rsp+58h+var_34], eax
mov rdi, [rsp+58h+var_30]
movsxd rax, [rsp+58h+var_34]
imul rsi, rax, 28h ; '('
call bf_malloc
mov [rsp+58h+var_50], rax
cmp [rsp+58h+var_50], 0
jnz short loc_F7434
mov [rsp+58h+var_4], 0FFFFFFFFh
jmp loc_F74EA
loc_F7434:
mov [rsp+58h+var_38], 0
loc_F743C:
mov eax, [rsp+58h+var_38]
cmp eax, [rsp+58h+var_34]
jge short loc_F7471
mov rax, [rsp+58h+var_10]
mov rdi, [rax]
mov rsi, [rsp+58h+var_50]
movsxd rax, [rsp+58h+var_38]
imul rax, 28h ; '('
add rsi, rax
call bf_init
mov eax, [rsp+58h+var_38]
add eax, 1
mov [rsp+58h+var_38], eax
jmp short loc_F743C
loc_F7471:
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_20]
mov r8, [rsp+58h+var_20]
mov r9, [rsp+58h+var_48]
mov rax, [rsp+58h+var_50]
xor ecx, ecx
mov [rsp+58h+var_58], rax
call bf_integer_from_radix_rec
mov [rsp+58h+var_3C], eax
mov [rsp+58h+var_38], 0
loc_F74A6:
mov eax, [rsp+58h+var_38]
cmp eax, [rsp+58h+var_34]
jge short loc_F74D3
mov rdi, [rsp+58h+var_50]
movsxd rax, [rsp+58h+var_38]
imul rax, 28h ; '('
add rdi, rax
call bf_delete_0
mov eax, [rsp+58h+var_38]
add eax, 1
mov [rsp+58h+var_38], eax
jmp short loc_F74A6
loc_F74D3:
mov rdi, [rsp+58h+var_30]
mov rsi, [rsp+58h+var_50]
call bf_free_0
mov eax, [rsp+58h+var_3C]
mov [rsp+58h+var_4], eax
loc_F74EA:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
|
long long bf_integer_from_radix(long long *a1, long long a2, unsigned 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; // [rsp+8h] [rbp-50h]
int limb_radix; // [rsp+10h] [rbp-48h]
unsigned int v15; // [rsp+1Ch] [rbp-3Ch]
int i; // [rsp+20h] [rbp-38h]
int j; // [rsp+20h] [rbp-38h]
int v18; // [rsp+24h] [rbp-34h]
long long v19; // [rsp+28h] [rbp-30h]
v19 = *a1;
limb_radix = get_limb_radix(a4);
v18 = ceil_log2(a3) + 2;
v13 = bf_malloc(v19, 40LL * v18, v4, v5, v6, v7);
if ( v13 )
{
for ( i = 0; i < v18; ++i )
bf_init(*a1, 40LL * i + v13);
v15 = bf_integer_from_radix_rec((_DWORD)a1, a2, a3, 0, a3, limb_radix, v13);
for ( j = 0; j < v18; ++j )
bf_delete_0((long long *)(40LL * j + v13), a2, v8, v9, v10, v11);
bf_free_0(v19, v13, v8, v9, v10, v11);
return v15;
}
else
{
return (unsigned int)-1;
}
}
|
bf_integer_from_radix:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EDI,EAX
CALL 0x001f7530
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001ebad0
ADD EAX,0x2
MOV dword ptr [RSP + 0x24],EAX
MOV RDI,qword ptr [RSP + 0x28]
MOVSXD RAX,dword ptr [RSP + 0x24]
IMUL RSI,RAX,0x28
CALL 0x001e8060
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001f7434
MOV dword ptr [RSP + 0x54],0xffffffff
JMP 0x001f74ea
LAB_001f7434:
MOV dword ptr [RSP + 0x20],0x0
LAB_001f743c:
MOV EAX,dword ptr [RSP + 0x20]
CMP EAX,dword ptr [RSP + 0x24]
JGE 0x001f7471
MOV RAX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x8]
MOVSXD RAX,dword ptr [RSP + 0x20]
IMUL RAX,RAX,0x28
ADD RSI,RAX
CALL 0x001e5f70
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001f743c
LAB_001f7471:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x38]
MOV R9,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
XOR ECX,ECX
MOV qword ptr [RSP],RAX
CALL 0x001f7590
MOV dword ptr [RSP + 0x1c],EAX
MOV dword ptr [RSP + 0x20],0x0
LAB_001f74a6:
MOV EAX,dword ptr [RSP + 0x20]
CMP EAX,dword ptr [RSP + 0x24]
JGE 0x001f74d3
MOV RDI,qword ptr [RSP + 0x8]
MOVSXD RAX,dword ptr [RSP + 0x20]
IMUL RAX,RAX,0x28
ADD RDI,RAX
CALL 0x001e93d0
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001f74a6
LAB_001f74d3:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001e63d0
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x54],EAX
LAB_001f74ea:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
int4
bf_integer_from_radix(int8 *param_1,int8 param_2,int8 param_3,int4 param_4)
{
int8 uVar1;
int iVar2;
int8 uVar3;
long lVar4;
int4 local_38;
int4 local_4;
uVar1 = *param_1;
uVar3 = get_limb_radix(param_4);
iVar2 = ceil_log2(param_3);
iVar2 = iVar2 + 2;
lVar4 = bf_malloc(uVar1,(long)iVar2 * 0x28);
if (lVar4 == 0) {
local_4 = 0xffffffff;
}
else {
for (local_38 = 0; local_38 < iVar2; local_38 = local_38 + 1) {
bf_init(*param_1,lVar4 + (long)local_38 * 0x28);
}
local_4 = bf_integer_from_radix_rec(param_1,param_2,param_3,0,param_3,uVar3,lVar4);
for (local_38 = 0; local_38 < iVar2; local_38 = local_38 + 1) {
bf_delete(lVar4 + (long)local_38 * 0x28);
}
bf_free(uVar1,lVar4);
}
return local_4;
}
|
|
12,227
|
bf_integer_from_radix
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_integer_from_radix(bf_t *r, const limb_t *tab,
limb_t n, limb_t radix)
{
bf_context_t *s = r->ctx;
int pow_tab_len, i, ret;
limb_t radixl;
bf_t *pow_tab;
radixl = get_limb_radix(radix);
pow_tab_len = ceil_log2(n) + 2; /* XXX: check */
pow_tab = bf_malloc(s, sizeof(pow_tab[0]) * pow_tab_len);
if (!pow_tab)
return -1;
for(i = 0; i < pow_tab_len; i++)
bf_init(r->ctx, &pow_tab[i]);
ret = bf_integer_from_radix_rec(r, tab, n, 0, n, radixl, pow_tab);
for(i = 0; i < pow_tab_len; i++) {
bf_delete(&pow_tab[i]);
}
bf_free(s, pow_tab);
return ret;
}
|
O1
|
c
|
bf_integer_from_radix:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movslq %ecx, %rax
leal -0x2(%rax), %ecx
movslq %ecx, %rcx
leaq 0x12219(%rip), %rdx # 0xa2ef0
movzbl (%rcx,%rdx), %ecx
cmpb $0x3, %cl
movl $0x2, %edx
cmovael %ecx, %edx
movq (%rdi), %r8
movzbl %dl, %ecx
decl %ecx
movq %rax, %r12
imulq %rax, %r12
decl %ecx
jne 0x90cf1
movq %rbx, %rax
decq %rax
je 0x90d0b
bsrq %rax, %rax
xorq $0x3f, %rax
jmp 0x90d10
movl $0x40, %eax
movl $0x42, %ecx
subl %eax, %ecx
cmpq $0x2, %rbx
movl $0x2, %r14d
cmovael %ecx, %r14d
leal (,%r14,8), %ebp
leal (%rbp,%rbp,4), %edx
movq (%r8), %rdi
xorl %esi, %esi
movq %r8, 0x10(%rsp)
callq *0x8(%r8)
testq %rax, %rax
je 0x90de6
movq %rax, %r13
leaq (,%rbp,4), %rax
addq %rbp, %rax
xorl %ecx, %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorps %xmm0, %xmm0
movq (%r15), %rsi
movq %rsi, (%r13,%rcx)
movl $0x0, 0x8(%r13,%rcx)
movq %rdx, 0x10(%r13,%rcx)
movups %xmm0, 0x18(%r13,%rcx)
addq $0x28, %rcx
cmpq %rcx, %rax
jne 0x90d65
movq %r13, (%rsp)
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
movq %r12, %r9
callq 0x90dfc
movl %eax, %ebx
movl %r14d, %r14d
movq %r13, %r15
addq $0x20, %r15
movq -0x20(%r15), %rax
testq %rax, %rax
je 0x90dcb
movq (%r15), %rsi
testq %rsi, %rsi
je 0x90dcb
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
addq $0x28, %r15
decq %r14
jne 0x90db2
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x90deb
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_integer_from_radix:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov [rsp+48h+var_40], rsi
mov r15, rdi
movsxd rax, ecx
lea ecx, [rax-2]
movsxd rcx, ecx
lea rdx, digits_per_limb_table
movzx ecx, byte ptr [rcx+rdx]
cmp cl, 3
mov edx, 2
cmovnb edx, ecx
mov r8, [rdi]
movzx ecx, dl
dec ecx
mov r12, rax
loc_90CF1:
imul r12, rax
dec ecx
jnz short loc_90CF1
mov rax, rbx
dec rax
jz short loc_90D0B
bsr rax, rax
xor rax, 3Fh
jmp short loc_90D10
loc_90D0B:
mov eax, 40h ; '@'
loc_90D10:
mov ecx, 42h ; 'B'
sub ecx, eax
cmp rbx, 2
mov r14d, 2
cmovnb r14d, ecx
lea ebp, ds:0[r14*8]
lea edx, [rbp+rbp*4+0]
mov rdi, [r8]
xor esi, esi
mov [rsp+48h+var_38], r8
call qword ptr [r8+8]
test rax, rax
jz loc_90DE6
mov r13, rax
lea rax, ds:0[rbp*4]
add rax, rbp
xor ecx, ecx
mov rdx, 8000000000000000h
xorps xmm0, xmm0
loc_90D65:
mov rsi, [r15]
mov [r13+rcx+0], rsi
mov dword ptr [r13+rcx+8], 0
mov [r13+rcx+10h], rdx
movups xmmword ptr [r13+rcx+18h], xmm0
add rcx, 28h ; '('
cmp rax, rcx
jnz short loc_90D65
mov [rsp+48h+var_48], r13
mov rdi, r15
mov rsi, [rsp+48h+var_40]
mov rdx, rbx
xor ecx, ecx
mov r8, rbx
mov r9, r12
call bf_integer_from_radix_rec
mov ebx, eax
mov r14d, r14d
mov r15, r13
add r15, 20h ; ' '
loc_90DB2:
mov rax, [r15-20h]
test rax, rax
jz short loc_90DCB
mov rsi, [r15]
test rsi, rsi
jz short loc_90DCB
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_90DCB:
add r15, 28h ; '('
dec r14
jnz short loc_90DB2
mov rax, [rsp+48h+var_38]
mov rdi, [rax]
mov rsi, r13
xor edx, edx
call qword ptr [rax+8]
jmp short loc_90DEB
loc_90DE6:
mov ebx, 0FFFFFFFFh
loc_90DEB:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_integer_from_radix(_QWORD **a1, int a2, unsigned long long a3, int a4)
{
unsigned __int8 v6; // cl
unsigned __int8 v7; // dl
int v8; // ecx
int v9; // r12d
unsigned long long v10; // rax
int v11; // eax
long long v12; // r14
long long v13; // rax
long long v14; // r13
long long v15; // rcx
unsigned int v16; // ebx
_QWORD *v17; // r15
long long v18; // rax
_QWORD *v20; // [rsp+10h] [rbp-38h]
v6 = digits_per_limb_table[a4 - 2];
v7 = 2;
if ( v6 >= 3u )
v7 = v6;
v8 = v7 - 1;
v9 = a4;
do
{
v9 *= a4;
--v8;
}
while ( v8 );
if ( a3 == 1 )
{
v11 = 64;
}
else
{
_BitScanReverse64(&v10, a3 - 1);
v11 = v10 ^ 0x3F;
}
LODWORD(v12) = 2;
if ( a3 >= 2 )
LODWORD(v12) = 66 - v11;
v20 = *a1;
v13 = ((long long ( *)(_QWORD, _QWORD, _QWORD))(*a1)[1])(**a1, 0LL, (unsigned int)(40 * v12));
if ( v13 )
{
v14 = v13;
v15 = 0LL;
do
{
*(_QWORD *)(v13 + v15) = *a1;
*(_DWORD *)(v13 + v15 + 8) = 0;
*(_QWORD *)(v13 + v15 + 16) = 0x8000000000000000LL;
*(_OWORD *)(v13 + v15 + 24) = 0LL;
v15 += 40LL;
}
while ( 5LL * (unsigned int)(8 * v12) != v15 );
v16 = bf_integer_from_radix_rec((_DWORD)a1, a2, a3, 0, a3, v9, v13);
v12 = (unsigned int)v12;
v17 = (_QWORD *)(v14 + 32);
do
{
v18 = *(v17 - 4);
if ( v18 && *v17 )
(*(void ( **)(_QWORD, _QWORD, _QWORD, double))(v18 + 8))(*(_QWORD *)v18, *v17, 0LL, 0.0);
v17 += 5;
--v12;
}
while ( v12 );
((void ( *)(_QWORD, long long, _QWORD, double))v20[1])(*v20, v14, 0LL, 0.0);
}
else
{
return (unsigned int)-1;
}
return v16;
}
|
bf_integer_from_radix:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV qword ptr [RSP + 0x8],RSI
MOV R15,RDI
MOVSXD RAX,ECX
LEA ECX,[RAX + -0x2]
MOVSXD RCX,ECX
LEA RDX,[0x1a2ef0]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP CL,0x3
MOV EDX,0x2
CMOVNC EDX,ECX
MOV R8,qword ptr [RDI]
MOVZX ECX,DL
DEC ECX
MOV R12,RAX
LAB_00190cf1:
IMUL R12,RAX
DEC ECX
JNZ 0x00190cf1
MOV RAX,RBX
DEC RAX
JZ 0x00190d0b
BSR RAX,RAX
XOR RAX,0x3f
JMP 0x00190d10
LAB_00190d0b:
MOV EAX,0x40
LAB_00190d10:
MOV ECX,0x42
SUB ECX,EAX
CMP RBX,0x2
MOV R14D,0x2
CMOVNC R14D,ECX
LEA EBP,[R14*0x8]
LEA EDX,[RBP + RBP*0x4]
MOV RDI,qword ptr [R8]
XOR ESI,ESI
MOV qword ptr [RSP + 0x10],R8
CALL qword ptr [R8 + 0x8]
TEST RAX,RAX
JZ 0x00190de6
MOV R13,RAX
LEA RAX,[RBP*0x4]
ADD RAX,RBP
XOR ECX,ECX
MOV RDX,-0x8000000000000000
XORPS XMM0,XMM0
LAB_00190d65:
MOV RSI,qword ptr [R15]
MOV qword ptr [R13 + RCX*0x1],RSI
MOV dword ptr [R13 + RCX*0x1 + 0x8],0x0
MOV qword ptr [R13 + RCX*0x1 + 0x10],RDX
MOVUPS xmmword ptr [R13 + RCX*0x1 + 0x18],XMM0
ADD RCX,0x28
CMP RAX,RCX
JNZ 0x00190d65
MOV qword ptr [RSP],R13
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBX
XOR ECX,ECX
MOV R8,RBX
MOV R9,R12
CALL 0x00190dfc
MOV EBX,EAX
MOV R14D,R14D
MOV R15,R13
ADD R15,0x20
LAB_00190db2:
MOV RAX,qword ptr [R15 + -0x20]
TEST RAX,RAX
JZ 0x00190dcb
MOV RSI,qword ptr [R15]
TEST RSI,RSI
JZ 0x00190dcb
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_00190dcb:
ADD R15,0x28
DEC R14
JNZ 0x00190db2
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,R13
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x00190deb
LAB_00190de6:
MOV EBX,0xffffffff
LAB_00190deb:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 bf_integer_from_radix(long *param_1,int8 param_2,ulong param_3,int param_4)
{
int8 *puVar1;
int8 *puVar2;
uint uVar3;
int4 uVar4;
ulong uVar5;
long lVar6;
int iVar7;
long lVar8;
byte bVar9;
long lVar10;
uint uVar11;
long *plVar12;
bVar9 = 2;
if (2 < (byte)digits_per_limb_table[param_4 + -2]) {
bVar9 = digits_per_limb_table[param_4 + -2];
}
puVar2 = (int8 *)*param_1;
iVar7 = bVar9 - 1;
lVar10 = (long)param_4;
do {
lVar10 = lVar10 * param_4;
iVar7 = iVar7 + -1;
} while (iVar7 != 0);
uVar5 = param_3 - 1;
if (uVar5 == 0) {
uVar3 = 0x40;
}
else {
lVar6 = 0x3f;
if (uVar5 != 0) {
for (; uVar5 >> lVar6 == 0; lVar6 = lVar6 + -1) {
}
}
uVar3 = (uint)lVar6 ^ 0x3f;
}
uVar11 = 2;
if (1 < param_3) {
uVar11 = 0x42 - uVar3;
}
lVar6 = (*(code *)puVar2[1])(*puVar2,0,uVar11 * 0x28);
if (lVar6 == 0) {
uVar4 = 0xffffffff;
}
else {
lVar8 = 0;
do {
*(long *)(lVar6 + lVar8) = *param_1;
*(int4 *)(lVar6 + 8 + lVar8) = 0;
*(int8 *)(lVar6 + 0x10 + lVar8) = 0x8000000000000000;
puVar1 = (int8 *)(lVar6 + 0x18 + lVar8);
*puVar1 = 0;
puVar1[1] = 0;
lVar8 = lVar8 + 0x28;
} while ((ulong)(uVar11 * 8) * 5 != lVar8);
uVar4 = bf_integer_from_radix_rec(param_1,param_2,param_3,0,param_3,lVar10,lVar6);
uVar5 = (ulong)uVar11;
plVar12 = (long *)(lVar6 + 0x20);
do {
puVar1 = (int8 *)plVar12[-4];
if ((puVar1 != (int8 *)0x0) && (*plVar12 != 0)) {
(*(code *)puVar1[1])(*puVar1,*plVar12,0);
}
plVar12 = plVar12 + 5;
uVar5 = uVar5 - 1;
} while (uVar5 != 0);
(*(code *)puVar2[1])(*puVar2,lVar6,0);
}
return uVar4;
}
|
|
12,228
|
minja::Value::dump_string(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::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, char)
|
llama.cpp/common/minja/minja.hpp
|
static void dump_string(const json & primitive, std::ostringstream & out, char string_quote = '\'') {
if (!primitive.is_string()) throw std::runtime_error("Value is not a string: " + primitive.dump());
auto s = primitive.dump();
if (string_quote == '"' || s.find('\'') != std::string::npos) {
out << s;
return;
}
// Reuse json dump, just changing string quotes
out << string_quote;
for (size_t i = 1, n = s.size() - 1; i < n; ++i) {
if (s[i] == '\\' && s[i + 1] == '"') {
out << '"';
i++;
} else if (s[i] == string_quote) {
out << '\\' << string_quote;
} else {
out << s[i];
}
}
out << string_quote;
}
|
O3
|
cpp
|
minja::Value::dump_string(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::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xbeda2
movl %edx, %ebp
movq %rsi, %rbx
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xafaa2
cmpb $0x22, %bpl
je 0xbebd7
leaq 0x28(%rsp), %rdi
movl $0x27, %esi
xorl %edx, %edx
callq 0x21230
cmpq $-0x1, %rax
je 0xbec13
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x21070
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbec04
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x20180
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb %bpl, 0x8(%rsp)
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpq $0x0, 0x10(%rbx,%rax)
je 0xbec3b
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21070
jmp 0xbec47
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x20920
movq 0x30(%rsp), %r12
decq %r12
cmpq $0x2, %r12
jb 0xbed66
movl $0x1, %r13d
leaq 0x8(%rsp), %r14
movsbl %bpl, %r15d
movq 0x28(%rsp), %rcx
movb (%rcx,%r13), %al
cmpb $0x5c, %al
jne 0xbecaa
cmpb $0x22, 0x1(%rcx,%r13)
jne 0xbecaa
movb $0x22, 0x8(%rsp)
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpq $0x0, 0x10(%rbx,%rax)
je 0xbed4a
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21070
jmp 0xbed57
cmpb %bpl, %al
jne 0xbecd5
movb $0x5c, 0x8(%rsp)
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpq $0x0, 0x10(%rbx,%rax)
je 0xbecfa
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21070
jmp 0xbed0a
movb %al, 0x8(%rsp)
movq (%rbx), %rcx
movq -0x18(%rcx), %rcx
cmpq $0x0, 0x10(%rbx,%rcx)
je 0xbed30
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21070
jmp 0xbed5a
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x20920
movq %rbx, %rax
movb %bpl, 0x8(%rsp)
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
cmpq $0x0, 0x10(%rax,%rcx)
je 0xbed3d
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21070
jmp 0xbed5a
movsbl %al, %esi
movq %rbx, %rdi
callq 0x20920
jmp 0xbed5a
movq %rax, %rdi
movl %r15d, %esi
callq 0x20920
jmp 0xbed5a
movq %rbx, %rdi
movl $0x22, %esi
callq 0x20920
incq %r13
incq %r13
cmpq %r12, %r13
jb 0xbec68
movb %bpl, 0x8(%rsp)
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpq $0x0, 0x10(%rbx,%rax)
je 0xbed91
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21070
jmp 0xbebe9
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x20920
jmp 0xbebe9
movl $0x10, %edi
callq 0x20650
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xafaa2
leaq 0x6090f(%rip), %rsi # 0x11f6e2
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xafa18
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x20480
xorl %ebp, %ebp
movq 0xa31c5(%rip), %rsi # 0x161fc0
movq 0xa317e(%rip), %rdx # 0x161f80
movq %rbx, %rdi
callq 0x20a50
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbee28
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbee43
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xbee6d
jmp 0xbee97
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbee6d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xbee6d
movq %rax, %r14
movq %rbx, %rdi
callq 0x20ef0
jmp 0xbee97
jmp 0xbee79
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbee97
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x20180
movq %r14, %rdi
callq 0x20af0
nop
|
_ZN5minja5Value11dump_stringERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERNS6_19basic_ostringstreamIcS9_SA_EEc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz loc_BEDA2
mov ebp, edx
mov rbx, rsi
lea rdi, [rsp+78h+var_50]
mov rsi, r14
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
cmp bpl, 22h ; '"'
jz short loc_BEBD7
lea rdi, [rsp+78h+var_50]
mov esi, 27h ; '''
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_BEC13
loc_BEBD7:
mov rsi, [rsp+78h+var_50]
mov rdx, [rsp+78h+var_48]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_BEBE9:
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BEC04
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BEC04:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_BEC13:
mov [rsp+78h+var_70], bpl
mov rax, [rbx]
mov rax, [rax-18h]
cmp qword ptr [rbx+rax+10h], 0
jz short loc_BEC3B
lea rsi, [rsp+78h+var_70]
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_BEC47
loc_BEC3B:
movsx esi, bpl; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
loc_BEC47:
mov r12, [rsp+78h+var_48]
dec r12
cmp r12, 2
jb loc_BED66
mov r13d, 1
lea r14, [rsp+78h+var_70]
movsx r15d, bpl
loc_BEC68:
mov rcx, [rsp+78h+var_50]
mov al, [rcx+r13]
cmp al, 5Ch ; '\'
jnz short loc_BECAA
cmp byte ptr [rcx+r13+1], 22h ; '"'
jnz short loc_BECAA
mov [rsp+78h+var_70], 22h ; '"'
mov rax, [rbx]
mov rax, [rax-18h]
cmp qword ptr [rbx+rax+10h], 0
jz loc_BED4A
mov edx, 1
mov rdi, rbx
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_BED57
loc_BECAA:
cmp al, bpl
jnz short loc_BECD5
mov [rsp+78h+var_70], 5Ch ; '\'
mov rax, [rbx]
mov rax, [rax-18h]
cmp qword ptr [rbx+rax+10h], 0
jz short loc_BECFA
mov edx, 1
mov rdi, rbx
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_BED0A
loc_BECD5:
mov [rsp+78h+var_70], al
mov rcx, [rbx]
mov rcx, [rcx-18h]
cmp qword ptr [rbx+rcx+10h], 0
jz short loc_BED30
mov edx, 1
mov rdi, rbx
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_BED5A
loc_BECFA:
mov rdi, rbx; this
mov esi, 5Ch ; '\'; char
call __ZNSo3putEc; std::ostream::put(char)
mov rax, rbx
loc_BED0A:
mov [rsp+78h+var_70], bpl
mov rcx, [rax]
mov rcx, [rcx-18h]
cmp qword ptr [rax+rcx+10h], 0
jz short loc_BED3D
mov edx, 1
mov rdi, rax
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_BED5A
loc_BED30:
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
jmp short loc_BED5A
loc_BED3D:
mov rdi, rax; this
mov esi, r15d; char
call __ZNSo3putEc; std::ostream::put(char)
jmp short loc_BED5A
loc_BED4A:
mov rdi, rbx; this
mov esi, 22h ; '"'; char
call __ZNSo3putEc; std::ostream::put(char)
loc_BED57:
inc r13
loc_BED5A:
inc r13
cmp r13, r12
jb loc_BEC68
loc_BED66:
mov [rsp+78h+var_70], bpl
mov rax, [rbx]
mov rax, [rax-18h]
cmp qword ptr [rbx+rax+10h], 0
jz short loc_BED91
lea rsi, [rsp+78h+var_70]
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_BEBE9
loc_BED91:
movsx esi, bpl; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
jmp loc_BEBE9
loc_BEDA2:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+78h+var_70]
mov rsi, r14
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
lea rsi, aValueIsNotAStr; "Value is not a string: "
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BEE28
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BEE28:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BEE43
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BEE43:
test bpl, bpl
jnz short loc_BEE6D
jmp short loc_BEE97
mov r14, rax
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BEE6D
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BEE6D
mov r14, rax
loc_BEE6D:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_BEE97
jmp short $+2
loc_BEE79:
mov r14, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BEE97
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BEE97:
mov rdi, r14
call __Unwind_Resume
|
void minja::Value::dump_string(_BYTE *a1, std::ostream *a2, char a3)
{
unsigned long long v4; // r12
unsigned long long v5; // r13
char v6; // al
std::ostream *v7; // rax
void *exception; // rbx
_BYTE v9[16]; // [rsp+8h] [rbp-70h] BYREF
long long *v10; // [rsp+28h] [rbp-50h] BYREF
long long v11; // [rsp+30h] [rbp-48h]
long long v12; // [rsp+38h] [rbp-40h] BYREF
if ( *a1 != 3 )
{
exception = __cxa_allocate_exception(0x10uLL);
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>::dump(
(long long)v9,
(long long)a1,
-1,
32,
0,
0);
std::operator+<char>(&v10, (long long)"Value is not a string: ", (long long)v9);
std::runtime_error::runtime_error(exception, &v10);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
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>::dump(
(long long)&v10,
(long long)a1,
-1,
32,
0,
0);
if ( a3 != 34 && std::string::find(&v10, 39LL, 0LL) == -1 )
{
v9[0] = a3;
if ( *(_QWORD *)((char *)a2 + *(_QWORD *)(*(_QWORD *)a2 - 24LL) + 16) )
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, 1LL);
else
std::ostream::put(a2, a3);
v4 = v11 - 1;
if ( (unsigned long long)(v11 - 1) >= 2 )
{
v5 = 1LL;
do
{
v6 = *((_BYTE *)v10 + v5);
if ( v6 == 92 && *((_BYTE *)v10 + v5 + 1) == 34 )
{
v9[0] = 34;
if ( *(_QWORD *)((char *)a2 + *(_QWORD *)(*(_QWORD *)a2 - 24LL) + 16) )
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, 1LL);
else
std::ostream::put(a2, 34);
++v5;
}
else if ( v6 == a3 )
{
v9[0] = 92;
if ( *(_QWORD *)((char *)a2 + *(_QWORD *)(*(_QWORD *)a2 - 24LL) + 16) )
{
v7 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(a2, v9, 1LL);
}
else
{
std::ostream::put(a2, 92);
v7 = a2;
}
v9[0] = a3;
if ( *(_QWORD *)((char *)v7 + *(_QWORD *)(*(_QWORD *)v7 - 24LL) + 16) )
std::__ostream_insert<char,std::char_traits<char>>(v7, v9, 1LL);
else
std::ostream::put(v7, a3);
}
else
{
v9[0] = *((_BYTE *)v10 + v5);
if ( *(_QWORD *)((char *)a2 + *(_QWORD *)(*(_QWORD *)a2 - 24LL) + 16) )
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, 1LL);
else
std::ostream::put(a2, v6);
}
++v5;
}
while ( v5 < v4 );
}
v9[0] = a3;
if ( *(_QWORD *)((char *)a2 + *(_QWORD *)(*(_QWORD *)a2 - 24LL) + 16) )
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, 1LL);
else
std::ostream::put(a2, a3);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(a2, v10, v11);
}
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
}
|
dump_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001beda2
MOV EBP,EDX
MOV RBX,RSI
LEA RDI,[RSP + 0x28]
MOV RSI,R14
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001afaa2
CMP BPL,0x22
JZ 0x001bebd7
LEA RDI,[RSP + 0x28]
MOV ESI,0x27
XOR EDX,EDX
CALL 0x00121230
CMP RAX,-0x1
JZ 0x001bec13
LAB_001bebd7:
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LAB_001bebe1:
MOV RDI,RBX
CALL 0x00121070
LAB_001bebe9:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001bec04
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00120180
LAB_001bec04:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001bec13:
MOV byte ptr [RSP + 0x8],BPL
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
CMP qword ptr [RBX + RAX*0x1 + 0x10],0x0
JZ 0x001bec3b
LEA RSI,[RSP + 0x8]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x00121070
JMP 0x001bec47
LAB_001bec3b:
MOVSX ESI,BPL
MOV RDI,RBX
CALL 0x00120920
LAB_001bec47:
MOV R12,qword ptr [RSP + 0x30]
DEC R12
CMP R12,0x2
JC 0x001bed66
MOV R13D,0x1
LEA R14,[RSP + 0x8]
MOVSX R15D,BPL
LAB_001bec68:
MOV RCX,qword ptr [RSP + 0x28]
MOV AL,byte ptr [RCX + R13*0x1]
CMP AL,0x5c
JNZ 0x001becaa
CMP byte ptr [RCX + R13*0x1 + 0x1],0x22
JNZ 0x001becaa
MOV byte ptr [RSP + 0x8],0x22
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
CMP qword ptr [RBX + RAX*0x1 + 0x10],0x0
JZ 0x001bed4a
LAB_001bec95:
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R14
CALL 0x00121070
JMP 0x001bed57
LAB_001becaa:
CMP AL,BPL
JNZ 0x001becd5
MOV byte ptr [RSP + 0x8],0x5c
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
CMP qword ptr [RBX + RAX*0x1 + 0x10],0x0
JZ 0x001becfa
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R14
CALL 0x00121070
JMP 0x001bed0a
LAB_001becd5:
MOV byte ptr [RSP + 0x8],AL
MOV RCX,qword ptr [RBX]
MOV RCX,qword ptr [RCX + -0x18]
CMP qword ptr [RBX + RCX*0x1 + 0x10],0x0
JZ 0x001bed30
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R14
CALL 0x00121070
JMP 0x001bed5a
LAB_001becfa:
MOV RDI,RBX
MOV ESI,0x5c
CALL 0x00120920
MOV RAX,RBX
LAB_001bed0a:
MOV byte ptr [RSP + 0x8],BPL
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
CMP qword ptr [RAX + RCX*0x1 + 0x10],0x0
JZ 0x001bed3d
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R14
CALL 0x00121070
JMP 0x001bed5a
LAB_001bed30:
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00120920
JMP 0x001bed5a
LAB_001bed3d:
MOV RDI,RAX
MOV ESI,R15D
CALL 0x00120920
JMP 0x001bed5a
LAB_001bed4a:
MOV RDI,RBX
MOV ESI,0x22
CALL 0x00120920
LAB_001bed57:
INC R13
LAB_001bed5a:
INC R13
CMP R13,R12
JC 0x001bec68
LAB_001bed66:
MOV byte ptr [RSP + 0x8],BPL
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
CMP qword ptr [RBX + RAX*0x1 + 0x10],0x0
JZ 0x001bed91
LAB_001bed7a:
LEA RSI,[RSP + 0x8]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x00121070
JMP 0x001bebe9
LAB_001bed91:
MOVSX ESI,BPL
MOV RDI,RBX
CALL 0x00120920
LAB_001bed9d:
JMP 0x001bebe9
LAB_001beda2:
MOV EDI,0x10
CALL 0x00120650
MOV RBX,RAX
LAB_001bedaf:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001afaa2
LAB_001bedcc:
LEA RSI,[0x21f6e2]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001afa18
MOV BPL,0x1
LAB_001bede5:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00120480
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,RBX
CALL 0x00120a50
|
/* minja::Value::dump_string(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, std::__cxx11::ostringstream&, char) */
void minja::Value::dump_string(basic_json *param_1,ostringstream *param_2,char param_3)
{
long lVar1;
ostream *poVar2;
runtime_error *this;
char cVar3;
ulong uVar4;
char local_70 [32];
long *local_50;
long local_48;
long local_40 [2];
if (*param_1 != (basic_json)0x3) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001bedaf to 001bedcb has its CatchHandler @ 001bee6a */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_70,param_1,0xffffffff,0x20,0,0);
/* try { // try from 001bedcc to 001bede1 has its CatchHandler @ 001bee4a */
std::operator+((char *)&local_50,(string *)"Value is not a string: ");
/* try { // try from 001bede5 to 001bee09 has its CatchHandler @ 001bee0a */
std::runtime_error::runtime_error(this,(string *)&local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(&local_50,param_1,0xffffffff,0x20,0,0);
if (param_3 != '\"') {
lVar1 = std::__cxx11::string::find((char)&local_50,0x27);
if (lVar1 == -1) {
cVar3 = (char)param_2;
local_70[0] = param_3;
if (*(long *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x10) == 0) {
std::ostream::put(cVar3);
}
else {
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,local_70,1);
}
if (1 < local_48 - 1U) {
uVar4 = 1;
do {
local_70[0] = *(char *)((long)local_50 + uVar4);
if ((local_70[0] == '\\') && (*(char *)((long)local_50 + uVar4 + 1) == '\"')) {
local_70[0] = '\"';
if (*(long *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x10) == 0) {
std::ostream::put(cVar3);
}
else {
/* try { // try from 001bec95 to 001bed56 has its CatchHandler @ 001bee79 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,local_70,1);
}
uVar4 = uVar4 + 1;
}
else if (local_70[0] == param_3) {
local_70[0] = '\\';
if (*(long *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x10) == 0) {
std::ostream::put(cVar3);
poVar2 = (ostream *)param_2;
}
else {
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,local_70,1);
}
if (*(long *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x10) == 0) {
local_70[0] = param_3;
std::ostream::put((char)poVar2);
}
else {
local_70[0] = param_3;
std::__ostream_insert<char,std::char_traits<char>>(poVar2,local_70,1);
}
}
else if (*(long *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x10) == 0) {
std::ostream::put(cVar3);
}
else {
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,local_70,1);
}
uVar4 = uVar4 + 1;
} while (uVar4 < local_48 - 1U);
}
if (*(long *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x10) == 0) {
local_70[0] = param_3;
std::ostream::put(cVar3);
}
else {
/* try { // try from 001bed7a to 001bed9c has its CatchHandler @ 001bee77 */
local_70[0] = param_3;
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,local_70,1);
}
goto LAB_001bebe9;
}
}
/* try { // try from 001bebe1 to 001bec46 has its CatchHandler @ 001bee77 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,(char *)local_50,local_48);
LAB_001bebe9:
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return;
}
|
|
12,229
|
my_caseup_str_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->caseup_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
*dst= '\0';
return (size_t) (dst - dst0);
}
|
O3
|
c
|
my_caseup_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %r14
je 0x53d3b
movq 0x78(%rdi), %r13
leaq -0x30(%rbp), %r15
movq %rbx, %r12
movq %rbx, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x54614
testl %eax, %eax
je 0x53d3b
movq 0x8(%r13), %rdx
movq -0x30(%rbp), %rcx
movzbl %ch, %esi
movq (%rdx,%rsi,8), %rdx
testq %rdx, %rdx
je 0x53cca
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rdx,%rcx,4), %ecx
movq %rcx, -0x30(%rbp)
movl $0x1, %edx
cmpq $0x80, %rcx
jb 0x53d24
movl $0x2, %edx
cmpq $0x800, %rcx # imm = 0x800
jb 0x53d0b
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0x53d3b
movl %ecx, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%r14)
shrq $0x6, %rcx
orq $0x800, %rcx # imm = 0x800
movl $0x3, %edx
movl %ecx, %esi
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%r14)
shrq $0x6, %rcx
orq $0xc0, %rcx
movb %cl, (%r14)
movl %eax, %eax
addq %rdx, %r14
cmpb $0x0, (%r12,%rax)
leaq (%r12,%rax), %r12
jne 0x53c95
movb $0x0, (%r14)
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_caseup_str_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp byte ptr [rsi], 0
mov r14, rsi
jz loc_53D3B
mov r13, [rdi+78h]
lea r15, [rbp+var_30]
mov r12, rbx
mov r14, rbx
loc_53C95:
mov rdi, r15
mov rsi, r12
call my_utf8mb3_uni_no_range
test eax, eax
jz loc_53D3B
mov rdx, [r13+8]
mov rcx, [rbp+var_30]
movzx esi, ch
mov rdx, [rdx+rsi*8]
test rdx, rdx
jz short loc_53CCA
movzx ecx, cl
lea rcx, [rcx+rcx*2]
mov ecx, [rdx+rcx*4]
mov [rbp+var_30], rcx
loc_53CCA:
mov edx, 1
cmp rcx, 80h
jb short loc_53D24
mov edx, 2
cmp rcx, 800h
jb short loc_53D0B
cmp rcx, 0FFFFh
ja short loc_53D3B
mov edx, ecx
and dl, 3Fh
or dl, 80h
mov [r14+2], dl
shr rcx, 6
or rcx, 800h
mov edx, 3
loc_53D0B:
mov esi, ecx
and sil, 3Fh
or sil, 80h
mov [r14+1], sil
shr rcx, 6
or rcx, 0C0h
loc_53D24:
mov [r14], cl
mov eax, eax
add r14, rdx
cmp byte ptr [r12+rax], 0
lea r12, [r12+rax]
jnz loc_53C95
loc_53D3B:
mov byte ptr [r14], 0
sub r14, rbx
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_caseup_str_utf8mb3(long long a1, _BYTE *a2)
{
unsigned long long v2; // rax
_BYTE *v3; // r14
long long v4; // r13
_BYTE *v5; // r12
unsigned int v6; // eax
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // rdx
bool v10; // zf
unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF
v12 = v2;
v3 = a2;
if ( *a2 )
{
v4 = *(_QWORD *)(a1 + 120);
v5 = a2;
v3 = a2;
do
{
v6 = my_utf8mb3_uni_no_range(&v12, v5);
if ( !v6 )
break;
v7 = v12;
v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12));
if ( v8 )
{
v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12);
v12 = v7;
}
v9 = 1LL;
if ( v7 >= 0x80 )
{
v9 = 2LL;
if ( v7 >= 0x800 )
{
if ( v7 > 0xFFFF )
break;
v3[2] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0x800;
v9 = 3LL;
}
v3[1] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0xC0;
}
*v3 = v7;
v3 += v9;
v10 = v5[v6] == 0;
v5 += v6;
}
while ( !v10 );
}
*v3 = 0;
return v3 - a2;
}
|
my_caseup_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV R14,RSI
JZ 0x00153d3b
MOV R13,qword ptr [RDI + 0x78]
LEA R15,[RBP + -0x30]
MOV R12,RBX
MOV R14,RBX
LAB_00153c95:
MOV RDI,R15
MOV RSI,R12
CALL 0x00154614
TEST EAX,EAX
JZ 0x00153d3b
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ESI,CH
MOV RDX,qword ptr [RDX + RSI*0x8]
TEST RDX,RDX
JZ 0x00153cca
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
MOV ECX,dword ptr [RDX + RCX*0x4]
MOV qword ptr [RBP + -0x30],RCX
LAB_00153cca:
MOV EDX,0x1
CMP RCX,0x80
JC 0x00153d24
MOV EDX,0x2
CMP RCX,0x800
JC 0x00153d0b
CMP RCX,0xffff
JA 0x00153d3b
MOV EDX,ECX
AND DL,0x3f
OR DL,0x80
MOV byte ptr [R14 + 0x2],DL
SHR RCX,0x6
OR RCX,0x800
MOV EDX,0x3
LAB_00153d0b:
MOV ESI,ECX
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [R14 + 0x1],SIL
SHR RCX,0x6
OR RCX,0xc0
LAB_00153d24:
MOV byte ptr [R14],CL
MOV EAX,EAX
ADD R14,RDX
CMP byte ptr [R12 + RAX*0x1],0x0
LEA R12,[R12 + RAX*0x1]
JNZ 0x00153c95
LAB_00153d3b:
MOV byte ptr [R14],0x0
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_str_utf8mb3(long param_1,char *param_2)
{
char *pcVar1;
long lVar2;
uint uVar3;
ulong in_RAX;
ulong uVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
ulong local_38;
pcVar7 = param_2;
if (*param_2 != '\0') {
lVar2 = *(long *)(param_1 + 0x78);
pcVar6 = param_2;
local_38 = in_RAX;
do {
uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6);
if (uVar3 == 0) break;
lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar5 != 0) {
local_38 = (ulong)*(uint *)(lVar5 + (local_38 & 0xff) * 0xc);
}
lVar5 = 1;
uVar4 = local_38;
if (0x7f < local_38) {
lVar5 = 2;
if (0x7ff < local_38) {
if (0xffff < local_38) break;
pcVar7[2] = (byte)local_38 & 0x3f | 0x80;
uVar4 = local_38 >> 6 | 0x800;
lVar5 = 3;
}
pcVar7[1] = (byte)uVar4 & 0x3f | 0x80;
uVar4 = uVar4 >> 6 | 0xc0;
}
*pcVar7 = (char)uVar4;
pcVar7 = pcVar7 + lVar5;
pcVar1 = pcVar6 + uVar3;
pcVar6 = pcVar6 + uVar3;
} while (*pcVar1 != '\0');
}
*pcVar7 = '\0';
return (long)pcVar7 - (long)param_2;
}
|
|
12,230
|
YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/node_data.cpp
|
void node_data::convert_to_map(const shared_memory_holder& pMemory) {
switch (m_type) {
case NodeType::Undefined:
case NodeType::Null:
reset_map();
m_type = NodeType::Map;
break;
case NodeType::Sequence:
convert_sequence_to_map(pMemory);
break;
case NodeType::Map:
break;
case NodeType::Scalar:
assert(false);
break;
}
}
|
O0
|
cpp
|
YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x10(%rax), %eax
movq %rax, 0x10(%rsp)
subq $0x4, %rax
ja 0x1a0cf8
movq 0x10(%rsp), %rax
leaq 0x155a2(%rip), %rcx # 0x1b6264
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rdi
callq 0x1a0490
movq 0x8(%rsp), %rax
movl $0x4, 0x10(%rax)
jmp 0x1a0cf8
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1a1260
jmp 0x1a0cf8
jmp 0x1a0cf8
jmp 0x1a0cf8
addq $0x28, %rsp
retq
nopl (%rax)
|
_ZN4YAML6detail9node_data14convert_to_mapERKSt10shared_ptrINS0_13memory_holderEE:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
mov eax, [rax+10h]
mov [rsp+28h+var_18], rax
sub rax, 4; switch 5 cases
ja short def_1A0CC9; jumptable 00000000001A0CC9 default case
mov rax, [rsp+28h+var_18]
lea rcx, jpt_1A0CC9
movsxd rax, ds:(jpt_1A0CC9 - 1B6264h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1A0CCB:
mov rdi, [rsp+28h+var_20]; jumptable 00000000001A0CC9 cases 0,1
call _ZN4YAML6detail9node_data9reset_mapEv; YAML::detail::node_data::reset_map(void)
mov rax, [rsp+28h+var_20]
mov dword ptr [rax+10h], 4
jmp short def_1A0CC9; jumptable 00000000001A0CC9 default case
loc_1A0CE3:
mov rdi, [rsp+28h+var_20]; jumptable 00000000001A0CC9 case 3
mov rsi, [rsp+28h+var_10]
call _ZN4YAML6detail9node_data23convert_sequence_to_mapERKSt10shared_ptrINS0_13memory_holderEE; YAML::detail::node_data::convert_sequence_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)
jmp short def_1A0CC9; jumptable 00000000001A0CC9 default case
loc_1A0CF4:
jmp short def_1A0CC9; jumptable 00000000001A0CC9 case 4
loc_1A0CF6:
jmp short $+2; jumptable 00000000001A0CC9 case 2
def_1A0CC9:
add rsp, 28h; jumptable 00000000001A0CC9 default case
retn
| ||||
12,231
|
YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/node_data.cpp
|
void node_data::convert_to_map(const shared_memory_holder& pMemory) {
switch (m_type) {
case NodeType::Undefined:
case NodeType::Null:
reset_map();
m_type = NodeType::Map;
break;
case NodeType::Sequence:
convert_sequence_to_map(pMemory);
break;
case NodeType::Map:
break;
case NodeType::Scalar:
assert(false);
break;
}
}
|
O3
|
cpp
|
YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&):
pushq %rbx
movq %rdi, %rbx
movl 0x10(%rdi), %eax
cmpl $0x2, %eax
jae 0x8162c
movq 0x80(%rbx), %rax
cmpq %rax, 0x88(%rbx)
je 0x81617
movq %rax, 0x88(%rbx)
leaq 0x98(%rbx), %rdi
callq 0x81cec
movl $0x4, 0x10(%rbx)
jmp 0x8163a
cmpl $0x3, %eax
jne 0x8163a
movq %rbx, %rdi
popq %rbx
jmp 0x8192a
popq %rbx
retq
|
_ZN4YAML6detail9node_data14convert_to_mapERKSt10shared_ptrINS0_13memory_holderEE:
push rbx
mov rbx, rdi
mov eax, [rdi+10h]
cmp eax, 2
jnb short loc_8162C
mov rax, [rbx+80h]
cmp [rbx+88h], rax
jz short loc_81617
mov [rbx+88h], rax
loc_81617:
lea rdi, [rbx+98h]
call _ZNSt7__cxx114listISt4pairIPN4YAML6detail4nodeES5_ESaIS6_EE5clearEv; std::list<std::pair<YAML::detail::node *,YAML::detail::node *>>::clear(void)
mov dword ptr [rbx+10h], 4
jmp short loc_8163A
loc_8162C:
cmp eax, 3
jnz short loc_8163A
mov rdi, rbx; this
pop rbx
jmp _ZN4YAML6detail9node_data23convert_sequence_to_mapERKSt10shared_ptrINS0_13memory_holderEE; YAML::detail::node_data::convert_sequence_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)
loc_8163A:
pop rbx
retn
|
long long YAML::detail::node_data::convert_to_map(
YAML::detail::node_data *this,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
int a7,
long long a8,
int a9,
char a10,
int a11,
int a12,
int a13,
int a14,
int a15,
int a16,
int a17,
int a18,
int a19,
int a20,
int a21,
int a22,
int a23,
int a24,
int a25,
char a26)
{
long long result; // rax
long long v27; // rax
result = *((unsigned int *)this + 4);
if ( (unsigned int)result >= 2 )
{
if ( (_DWORD)result == 3 )
return YAML::detail::node_data::convert_sequence_to_map(
this,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a15,
a16,
a17,
a18,
a19,
a20,
a21,
a22,
a23,
a24,
a25,
a26);
}
else
{
v27 = *((_QWORD *)this + 16);
if ( *((_QWORD *)this + 17) != v27 )
*((_QWORD *)this + 17) = v27;
result = std::list<std::pair<YAML::detail::node *,YAML::detail::node *>>::clear((char *)this + 152);
*((_DWORD *)this + 4) = 4;
}
return result;
}
|
convert_to_map:
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x10]
CMP EAX,0x2
JNC 0x0018162c
MOV RAX,qword ptr [RBX + 0x80]
CMP qword ptr [RBX + 0x88],RAX
JZ 0x00181617
MOV qword ptr [RBX + 0x88],RAX
LAB_00181617:
LEA RDI,[RBX + 0x98]
CALL 0x00181cec
MOV dword ptr [RBX + 0x10],0x4
JMP 0x0018163a
LAB_0018162c:
CMP EAX,0x3
JNZ 0x0018163a
MOV RDI,RBX
POP RBX
JMP 0x0018192a
LAB_0018163a:
POP RBX
RET
|
/* YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&) */
void __thiscall YAML::detail::node_data::convert_to_map(node_data *this,shared_ptr *param_1)
{
if (*(uint *)(this + 0x10) < 2) {
if (*(long *)(this + 0x88) != *(long *)(this + 0x80)) {
*(long *)(this + 0x88) = *(long *)(this + 0x80);
}
std::__cxx11::
list<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>
::clear((list<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>
*)(this + 0x98));
*(int4 *)(this + 0x10) = 4;
}
else if (*(uint *)(this + 0x10) == 3) {
convert_sequence_to_map(this,param_1);
return;
}
return;
}
|
|
12,232
|
QuaternionScale
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Quaternion QuaternionScale(Quaternion q, float mul)
{
Quaternion result = { 0 };
result.x = q.x*mul;
result.y = q.y*mul;
result.z = q.z*mul;
result.w = q.w*mul;
return result;
}
|
O1
|
c
|
QuaternionScale:
movaps %xmm0, %xmm3
mulss %xmm2, %xmm3
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
mulss %xmm2, %xmm0
unpcklps %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
movaps %xmm1, %xmm4
mulss %xmm2, %xmm4
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
mulss %xmm2, %xmm1
unpcklps %xmm1, %xmm4 # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
movaps %xmm3, %xmm0
movaps %xmm4, %xmm1
retq
|
QuaternionScale:
movaps xmm3, xmm0
mulss xmm3, xmm2
shufps xmm0, xmm0, 55h ; 'U'
mulss xmm0, xmm2
unpcklps xmm3, xmm0
movaps xmm4, xmm1
mulss xmm4, xmm2
shufps xmm1, xmm1, 55h ; 'U'
mulss xmm1, xmm2
unpcklps xmm4, xmm1
movaps xmm0, xmm3
movaps xmm1, xmm4
retn
|
__m128 QuaternionScale(__m128 a1, double a2, float a3)
{
__m128 v3; // xmm3
__m128 v4; // xmm0
v3 = a1;
v3.m128_f32[0] = a1.m128_f32[0] * a3;
v4 = _mm_shuffle_ps(a1, a1, 85);
v4.m128_f32[0] = v4.m128_f32[0] * a3;
return _mm_unpacklo_ps(v3, v4);
}
|
QuaternionScale:
MOVAPS XMM3,XMM0
MULSS XMM3,XMM2
SHUFPS XMM0,XMM0,0x55
MULSS XMM0,XMM2
UNPCKLPS XMM3,XMM0
MOVAPS XMM4,XMM1
MULSS XMM4,XMM2
SHUFPS XMM1,XMM1,0x55
MULSS XMM1,XMM2
UNPCKLPS XMM4,XMM1
MOVAPS XMM0,XMM3
MOVAPS XMM1,XMM4
RET
|
int8 QuaternionScale(int8 param_1,int8 param_2,float param_3)
{
return CONCAT44((float)((ulong)param_1 >> 0x20) * param_3,(float)param_1 * param_3);
}
|
|
12,233
|
multadd
|
eloqsql/strings/dtoa.c
|
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc)
{
int i, wds;
ULong *x;
ULLong carry, y;
Bigint *b1;
wds= b->wds;
x= b->p.x;
i= 0;
carry= a;
do
{
y= *x * (ULLong)m + carry;
carry= y >> 32;
*x++= (ULong)(y & FFFFFFFF);
}
while (++i < wds);
if (carry)
{
if (wds >= b->maxwds)
{
b1= Balloc(b->k+1, alloc);
Bcopy(b1, b);
Bfree(b, alloc);
b= b1;
}
b->p.x[wds++]= (ULong) carry;
b->wds= wds;
}
return b;
}
|
O0
|
c
|
multadd:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movslq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movslq -0xc(%rbp), %rcx
imulq %rcx, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x30(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x28(%rbp)
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl -0x20(%rbp), %eax
jl 0x78e8a
cmpq $0x0, -0x30(%rbp)
je 0x78f6b
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0x78f43
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edi
addl $0x1, %edi
movq -0x18(%rbp), %rsi
callq 0x781c0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rsi
addq $0x10, %rsi
movq -0x8(%rbp), %rax
movslq 0x14(%rax), %rdx
shlq $0x2, %rdx
addq $0x8, %rdx
callq 0x24200
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78870
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x30(%rbp), %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
multadd:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_18], rcx
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov [rbp+var_20], eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_28], rax
mov [rbp+var_1C], 0
movsxd rax, [rbp+var_10]
mov [rbp+var_30], rax
loc_78E8A:
mov rax, [rbp+var_28]
mov eax, [rax]
movsxd rcx, [rbp+var_C]
imul rax, rcx
add rax, [rbp+var_30]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
shr rax, 20h
mov [rbp+var_30], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_38]
mov ecx, eax
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 4
mov [rbp+var_28], rdx
mov [rax], ecx
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
cmp eax, [rbp+var_20]
jl short loc_78E8A
cmp [rbp+var_30], 0
jz loc_78F6B
mov eax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp eax, [rcx+0Ch]
jl short loc_78F43
mov rax, [rbp+var_8]
mov edi, [rax+8]
add edi, 1
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
add rdi, 10h
mov rsi, [rbp+var_8]
add rsi, 10h
mov rax, [rbp+var_8]
movsxd rdx, dword ptr [rax+14h]
shl rdx, 2
add rdx, 8
call _memcpy
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call Bfree
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_78F43:
mov rax, [rbp+var_30]
mov edx, eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov esi, ecx
add esi, 1
mov [rbp+var_20], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov ecx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+14h], ecx
loc_78F6B:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4)
{
unsigned int *v4; // rax
long long v6; // [rsp+0h] [rbp-40h]
unsigned long long v7; // [rsp+8h] [rbp-38h]
unsigned long long v8; // [rsp+10h] [rbp-30h]
unsigned int *v9; // [rsp+18h] [rbp-28h]
int v10; // [rsp+20h] [rbp-20h]
int v11; // [rsp+24h] [rbp-1Ch]
unsigned long long v13; // [rsp+38h] [rbp-8h]
v13 = a1;
v10 = *(_DWORD *)(a1 + 20);
v9 = *(unsigned int **)a1;
v11 = 0;
v8 = a3;
do
{
v7 = v8 + a2 * (unsigned long long)*v9;
v8 = HIDWORD(v7);
v4 = v9++;
*v4 = v7;
++v11;
}
while ( v11 < v10 );
if ( v8 )
{
if ( v10 >= *(_DWORD *)(a1 + 12) )
{
v6 = Balloc(*(_DWORD *)(a1 + 8) + 1, (long long)a4);
memcpy(v6 + 16, a1 + 16, 4LL * *(int *)(a1 + 20) + 8);
Bfree(a1, a4);
v13 = v6;
}
*(_DWORD *)(*(_QWORD *)v13 + 4LL * v10) = HIDWORD(v7);
*(_DWORD *)(v13 + 20) = v10 + 1;
}
return v13;
}
|
multadd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x1c],0x0
MOVSXD RAX,dword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
LAB_00178e8a:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RAX,RCX
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x20
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x38]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,dword ptr [RBP + -0x20]
JL 0x00178e8a
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00178f6b
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x00178f43
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x8]
ADD EDI,0x1
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001781c0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x10
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x10
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RAX + 0x14]
SHL RDX,0x2
ADD RDX,0x8
CALL 0x00124200
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00178870
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00178f43:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RBP + -0x20],ESI
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x14],ECX
LAB_00178f6b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long * multadd(long *param_1,int param_2,int param_3,int8 param_4)
{
int iVar1;
ulong uVar2;
ulong local_38;
uint *local_30;
int local_24;
long *local_10;
iVar1 = *(int *)((long)param_1 + 0x14);
local_24 = 0;
local_38 = (ulong)param_3;
local_30 = (uint *)*param_1;
do {
uVar2 = (ulong)*local_30 * (long)param_2 + local_38;
local_38 = uVar2 >> 0x20;
*local_30 = (uint)uVar2;
local_24 = local_24 + 1;
local_30 = local_30 + 1;
} while (local_24 < iVar1);
local_10 = param_1;
if (local_38 != 0) {
if (*(int *)((long)param_1 + 0xc) <= iVar1) {
local_10 = (long *)Balloc((int)param_1[1] + 1,param_4);
memcpy(local_10 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8);
Bfree(param_1,param_4);
}
*(int *)(*local_10 + (long)iVar1 * 4) = (int)(uVar2 >> 0x20);
*(int *)((long)local_10 + 0x14) = iVar1 + 1;
}
return local_10;
}
|
|
12,234
|
put_lvalue
|
bluesky950520[P]quickjs/quickjs.c
|
static void put_lvalue(JSParseState *s, int opcode, int scope,
JSAtom name, int label, PutLValueEnum special,
BOOL is_let)
{
switch(opcode) {
case OP_get_field:
case OP_scope_get_private_field:
/* depth = 1 */
switch(special) {
case PUT_LVALUE_NOKEEP:
case PUT_LVALUE_NOKEEP_DEPTH:
break;
case PUT_LVALUE_KEEP_TOP:
emit_op(s, OP_insert2); /* obj v -> v obj v */
break;
case PUT_LVALUE_KEEP_SECOND:
emit_op(s, OP_perm3); /* obj v0 v -> v0 obj v */
break;
case PUT_LVALUE_NOKEEP_BOTTOM:
emit_op(s, OP_swap);
break;
default:
abort();
}
break;
case OP_get_array_el:
case OP_get_ref_value:
/* depth = 2 */
if (opcode == OP_get_ref_value) {
JS_FreeAtom(s->ctx, name);
emit_label(s, label);
}
switch(special) {
case PUT_LVALUE_NOKEEP:
emit_op(s, OP_nop); /* will trigger optimization */
break;
case PUT_LVALUE_NOKEEP_DEPTH:
break;
case PUT_LVALUE_KEEP_TOP:
emit_op(s, OP_insert3); /* obj prop v -> v obj prop v */
break;
case PUT_LVALUE_KEEP_SECOND:
emit_op(s, OP_perm4); /* obj prop v0 v -> v0 obj prop v */
break;
case PUT_LVALUE_NOKEEP_BOTTOM:
emit_op(s, OP_rot3l);
break;
default:
abort();
}
break;
case OP_get_super_value:
/* depth = 3 */
switch(special) {
case PUT_LVALUE_NOKEEP:
case PUT_LVALUE_NOKEEP_DEPTH:
break;
case PUT_LVALUE_KEEP_TOP:
emit_op(s, OP_insert4); /* this obj prop v -> v this obj prop v */
break;
case PUT_LVALUE_KEEP_SECOND:
emit_op(s, OP_perm5); /* this obj prop v0 v -> v0 this obj prop v */
break;
case PUT_LVALUE_NOKEEP_BOTTOM:
emit_op(s, OP_rot4l);
break;
default:
abort();
}
break;
default:
break;
}
switch(opcode) {
case OP_scope_get_var: /* val -- */
assert(special == PUT_LVALUE_NOKEEP ||
special == PUT_LVALUE_NOKEEP_DEPTH);
emit_op(s, is_let ? OP_scope_put_var_init : OP_scope_put_var);
emit_u32(s, name); /* has refcount */
emit_u16(s, scope);
break;
case OP_get_field:
emit_op(s, OP_put_field);
emit_u32(s, name); /* name has refcount */
emit_ic(s, name);
break;
case OP_scope_get_private_field:
emit_op(s, OP_scope_put_private_field);
emit_u32(s, name); /* name has refcount */
emit_u16(s, scope);
break;
case OP_get_array_el:
emit_op(s, OP_put_array_el);
break;
case OP_get_ref_value:
emit_op(s, OP_put_ref_value);
break;
case OP_get_super_value:
emit_op(s, OP_put_super_value);
break;
default:
abort();
}
}
|
O1
|
c
|
put_lvalue:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r12d
movl %ecx, %r14d
movl %edx, 0x8(%rsp)
movl %esi, %r15d
movq %rdi, %rbx
movl 0x50(%rsp), %ebp
cmpl $0x49, %esi
jg 0x66086
cmpl $0x3c, %r15d
je 0x660bd
cmpl $0x41, %r15d
je 0x660a6
cmpl $0x47, %r15d
je 0x660d6
jmp 0x662d4
cmpl $0x4a, %r15d
je 0x660ed
cmpl $0xb7, %r15d
je 0x6616e
cmpl $0xbd, %r15d
jne 0x662d4
movl %r12d, %eax
leaq 0x37374(%rip), %rcx # 0x9d424
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x15, %al
jmp 0x6611e
movl %r8d, %r13d
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x207d8
movq %rbx, %rdi
movl %r13d, %esi
callq 0x64ef1
movl %r12d, %eax
leaq 0x3731c(%rip), %rcx # 0x9d3fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $-0x4e, %al
jmp 0x6611e
movl %r12d, %eax
leaq 0x37319(%rip), %rcx # 0x9d410
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x17, %al
jmp 0x6611e
movb $0x1b, %al
jmp 0x6611e
movb $0x1d, %al
jmp 0x6611e
movb $0x16, %al
jmp 0x6611e
movb $0x18, %al
jmp 0x6611e
movb $0x19, %al
jmp 0x6611e
movb $0x1f, %al
jmp 0x6611e
movb $0x1a, %al
movq 0x90(%rbx), %rcx
leaq 0x138(%rcx), %rdi
movl 0x140(%rcx), %edx
movl %edx, 0x168(%rcx)
movzbl %al, %esi
callq 0x1b4d0
cmpl $0x49, %r15d
jle 0x661cb
cmpl $0x4a, %r15d
je 0x661fc
cmpl $0xbd, %r15d
je 0x6624f
cmpl $0xb7, %r15d
jne 0x662d4
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movq 0x90(%rbx), %rcx
movl $0x138, %r15d # imm = 0x138
leaq (%rcx,%r15), %rdi
movl 0x140(%rcx), %edx
movl %edx, 0x168(%rcx)
leal 0xb8(,%rax,4), %esi
callq 0x1b4d0
movq 0x90(%rbx), %rdi
addq %r15, %rdi
leaq 0x10(%rsp), %rsi
movl %r14d, (%rsi)
movl $0x4, %edx
callq 0x1b422
addq 0x90(%rbx), %r15
leaq 0xc(%rsp), %rsi
jmp 0x6629e
cmpl $0x3c, %r15d
je 0x6621d
cmpl $0x47, %r15d
jne 0x662c1
movq 0x90(%rbx), %rax
leaq 0x138(%rax), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0x49, %esi
jmp 0x6623c
movq 0x90(%rbx), %rax
leaq 0x138(%rax), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0x4b, %esi
jmp 0x6623c
movq 0x90(%rbx), %rax
leaq 0x138(%rax), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0x3d, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b4d0
movq 0x90(%rbx), %rax
movl $0x138, %r15d # imm = 0x138
leaq (%rax,%r15), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xbf, %esi
callq 0x1b4d0
movq 0x90(%rbx), %rdi
addq %r15, %rdi
leaq 0x14(%rsp), %rsi
movl %r14d, (%rsi)
movl $0x4, %edx
callq 0x1b422
addq 0x90(%rbx), %r15
leaq 0xe(%rsp), %rsi
movl 0x8(%rsp), %eax
movw %ax, (%rsi)
movl $0x2, %edx
movq %r15, %rdi
callq 0x1b422
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x41, %r15d
jne 0x662d4
movq %rbx, %rdi
movl %r14d, %esi
callq 0x13759
jmp 0x662b2
callq 0xe090
|
put_lvalue:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12d, r9d
mov r14d, ecx
mov [rsp+48h+var_40], edx
mov r15d, esi
mov rbx, rdi
mov ebp, [rsp+48h+arg_0]
cmp esi, 49h ; 'I'
jg short loc_66086
cmp r15d, 3Ch ; '<'
jz short loc_660BD
cmp r15d, 41h ; 'A'
jz short loc_660A6
cmp r15d, 47h ; 'G'
jz short loc_660D6
jmp loc_662D4
loc_66086:
cmp r15d, 4Ah ; 'J'
jz short loc_660ED
cmp r15d, 0B7h
jz loc_6616E
cmp r15d, 0BDh
jnz loc_662D4
loc_660A6:
mov eax, r12d
lea rcx, jpt_660B7
movsxd rax, ds:(jpt_660B7 - 9D424h)[rcx+rax*4]; switch 5 cases
add rax, rcx
jmp rax; switch jump
loc_660B9:
mov al, 15h; jumptable 00000000000660B7 case 2
jmp short loc_6611E
loc_660BD:
mov r13d, r8d
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
mov rdi, rbx
mov esi, r13d
call emit_label
loc_660D6:
mov eax, r12d
lea rcx, jpt_660E7
movsxd rax, ds:(jpt_660E7 - 9D3FCh)[rcx+rax*4]; switch 5 cases
add rax, rcx
jmp rax; switch jump
loc_660E9:
mov al, 0B2h; jumptable 00000000000660E7 case 0
jmp short loc_6611E
loc_660ED:
mov eax, r12d
lea rcx, jpt_660FE
movsxd rax, ds:(jpt_660FE - 9D410h)[rcx+rax*4]; switch 5 cases
add rax, rcx
jmp rax; switch jump
loc_66100:
mov al, 17h; jumptable 00000000000660FE case 2
jmp short loc_6611E
loc_66104:
mov al, 1Bh; jumptable 00000000000660B7 case 4
jmp short loc_6611E
loc_66108:
mov al, 1Dh; jumptable 00000000000660E7 case 4
jmp short loc_6611E
loc_6610C:
mov al, 16h; jumptable 00000000000660E7 case 2
jmp short loc_6611E
loc_66110:
mov al, 18h; jumptable 00000000000660B7 case 3
jmp short loc_6611E
loc_66114:
mov al, 19h; jumptable 00000000000660E7 case 3
jmp short loc_6611E
loc_66118:
mov al, 1Fh; jumptable 00000000000660FE case 4
jmp short loc_6611E
loc_6611C:
mov al, 1Ah; jumptable 00000000000660FE case 3
loc_6611E:
mov rcx, [rbx+90h]
lea rdi, [rcx+138h]
mov edx, [rcx+140h]
mov [rcx+168h], edx
movzx esi, al
call dbuf_putc
loc_66140:
cmp r15d, 49h ; 'I'; jumptable 00000000000660B7 cases 0,1
jle loc_661CB
cmp r15d, 4Ah ; 'J'
jz loc_661FC
cmp r15d, 0BDh
jz loc_6624F
cmp r15d, 0B7h
jnz loc_662D4
loc_6616E:
xor eax, eax
test ebp, ebp
setnz al
mov rcx, [rbx+90h]
mov r15d, 138h
lea rdi, [rcx+r15]
mov edx, [rcx+140h]
mov [rcx+168h], edx
lea esi, ds:0B8h[rax*4]
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r15
lea rsi, [rsp+48h+var_38]
mov [rsi], r14d
mov edx, 4
call dbuf_put
add r15, [rbx+90h]
lea rsi, [rsp+48h+var_3C]
jmp loc_6629E
loc_661CB:
cmp r15d, 3Ch ; '<'
jz short loc_6621D
cmp r15d, 47h ; 'G'
jnz loc_662C1
mov rax, [rbx+90h]
lea rdi, [rax+138h]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 49h ; 'I'
jmp short loc_6623C
loc_661FC:
mov rax, [rbx+90h]
lea rdi, [rax+138h]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 4Bh ; 'K'
jmp short loc_6623C
loc_6621D:
mov rax, [rbx+90h]
lea rdi, [rax+138h]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 3Dh ; '='
loc_6623C:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp dbuf_putc
loc_6624F:
mov rax, [rbx+90h]
mov r15d, 138h
lea rdi, [rax+r15]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0BFh
call dbuf_putc
mov rdi, [rbx+90h]
add rdi, r15
lea rsi, [rsp+48h+var_34]
mov [rsi], r14d
mov edx, 4
call dbuf_put
add r15, [rbx+90h]
lea rsi, [rsp+48h+var_3A]
loc_6629E:
mov eax, [rsp+48h+var_40]
mov [rsi], ax
mov edx, 2
mov rdi, r15
call dbuf_put
loc_662B2:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_662C1:
cmp r15d, 41h ; 'A'
jnz short loc_662D4
mov rdi, rbx
mov esi, r14d
call put_lvalue_cold_1
jmp short loc_662B2
loc_662D4:
call _abort
|
long long put_lvalue(long long *a1, int a2, __int16 a3, int a4, int a5, int a6, int a7)
{
char v10; // al
long long v12; // rcx
long long v13; // rcx
_QWORD *v14; // rdi
long long v15; // rax
long long v17; // rax
long long v18; // rax
long long v19; // rax
_QWORD *v20; // rdi
_QWORD *v21; // r15
char *v22; // rsi
char v24; // [rsp+Ch] [rbp-3Ch] BYREF
char v25; // [rsp+Eh] [rbp-3Ah] BYREF
int v26; // [rsp+10h] [rbp-38h] BYREF
int v27[13]; // [rsp+14h] [rbp-34h] BYREF
if ( a2 <= 73 )
{
if ( a2 == 60 )
{
JS_FreeAtom(*a1, a4);
emit_label((long long)a1, a5);
LABEL_12:
switch ( a6 )
{
case 0:
v10 = -78;
goto LABEL_23;
case 1:
goto LABEL_24;
case 2:
v10 = 22;
goto LABEL_23;
case 3:
v10 = 25;
goto LABEL_23;
case 4:
v10 = 29;
goto LABEL_23;
}
goto LABEL_24;
}
if ( a2 != 65 )
{
if ( a2 != 71 )
LABEL_35:
abort((const char *)a1);
goto LABEL_12;
}
goto LABEL_9;
}
if ( a2 != 74 )
{
if ( a2 == 183 )
{
v13 = a1[18];
*(_DWORD *)(v13 + 360) = *(_DWORD *)(v13 + 320);
dbuf_putc((_QWORD *)(v13 + 312), 4 * (a7 != 0) - 72);
v14 = (_QWORD *)(a1[18] + 312);
v26 = a4;
dbuf_put(v14, (long long)&v26, 4LL);
v21 = (_QWORD *)(a1[18] + 312);
v22 = &v24;
LABEL_33:
*(_WORD *)v22 = a3;
return dbuf_put(v21, (long long)v22, 2LL);
}
if ( a2 != 189 )
goto LABEL_35;
LABEL_9:
switch ( a6 )
{
case 0:
case 1:
goto LABEL_24;
case 2:
v10 = 21;
goto LABEL_23;
case 3:
v10 = 24;
goto LABEL_23;
case 4:
v10 = 27;
goto LABEL_23;
}
goto LABEL_24;
}
switch ( a6 )
{
case 0:
case 1:
break;
case 2:
v10 = 23;
goto LABEL_23;
case 3:
v10 = 26;
goto LABEL_23;
case 4:
v10 = 31;
LABEL_23:
v12 = a1[18];
*(_DWORD *)(v12 + 360) = *(_DWORD *)(v12 + 320);
dbuf_putc((_QWORD *)(v12 + 312), v10);
break;
}
LABEL_24:
if ( a2 > 73 )
{
if ( a2 == 74 )
{
v17 = a1[18];
*(_DWORD *)(v17 + 360) = *(_DWORD *)(v17 + 320);
return dbuf_putc((_QWORD *)(v17 + 312), 75);
}
v19 = a1[18];
*(_DWORD *)(v19 + 360) = *(_DWORD *)(v19 + 320);
dbuf_putc((_QWORD *)(v19 + 312), 191);
v20 = (_QWORD *)(a1[18] + 312);
v27[0] = a4;
dbuf_put(v20, (long long)v27, 4LL);
v21 = (_QWORD *)(a1[18] + 312);
v22 = &v25;
goto LABEL_33;
}
if ( a2 == 60 )
{
v18 = a1[18];
*(_DWORD *)(v18 + 360) = *(_DWORD *)(v18 + 320);
return dbuf_putc((_QWORD *)(v18 + 312), 61);
}
else if ( a2 == 71 )
{
v15 = a1[18];
*(_DWORD *)(v15 + 360) = *(_DWORD *)(v15 + 320);
return dbuf_putc((_QWORD *)(v15 + 312), 73);
}
else
{
return put_lvalue_cold_1(a1, a4);
}
}
| |||
12,235
|
put_lvalue
|
bluesky950520[P]quickjs/quickjs.c
|
static void put_lvalue(JSParseState *s, int opcode, int scope,
JSAtom name, int label, PutLValueEnum special,
BOOL is_let)
{
switch(opcode) {
case OP_get_field:
case OP_scope_get_private_field:
/* depth = 1 */
switch(special) {
case PUT_LVALUE_NOKEEP:
case PUT_LVALUE_NOKEEP_DEPTH:
break;
case PUT_LVALUE_KEEP_TOP:
emit_op(s, OP_insert2); /* obj v -> v obj v */
break;
case PUT_LVALUE_KEEP_SECOND:
emit_op(s, OP_perm3); /* obj v0 v -> v0 obj v */
break;
case PUT_LVALUE_NOKEEP_BOTTOM:
emit_op(s, OP_swap);
break;
default:
abort();
}
break;
case OP_get_array_el:
case OP_get_ref_value:
/* depth = 2 */
if (opcode == OP_get_ref_value) {
JS_FreeAtom(s->ctx, name);
emit_label(s, label);
}
switch(special) {
case PUT_LVALUE_NOKEEP:
emit_op(s, OP_nop); /* will trigger optimization */
break;
case PUT_LVALUE_NOKEEP_DEPTH:
break;
case PUT_LVALUE_KEEP_TOP:
emit_op(s, OP_insert3); /* obj prop v -> v obj prop v */
break;
case PUT_LVALUE_KEEP_SECOND:
emit_op(s, OP_perm4); /* obj prop v0 v -> v0 obj prop v */
break;
case PUT_LVALUE_NOKEEP_BOTTOM:
emit_op(s, OP_rot3l);
break;
default:
abort();
}
break;
case OP_get_super_value:
/* depth = 3 */
switch(special) {
case PUT_LVALUE_NOKEEP:
case PUT_LVALUE_NOKEEP_DEPTH:
break;
case PUT_LVALUE_KEEP_TOP:
emit_op(s, OP_insert4); /* this obj prop v -> v this obj prop v */
break;
case PUT_LVALUE_KEEP_SECOND:
emit_op(s, OP_perm5); /* this obj prop v0 v -> v0 this obj prop v */
break;
case PUT_LVALUE_NOKEEP_BOTTOM:
emit_op(s, OP_rot4l);
break;
default:
abort();
}
break;
default:
break;
}
switch(opcode) {
case OP_scope_get_var: /* val -- */
assert(special == PUT_LVALUE_NOKEEP ||
special == PUT_LVALUE_NOKEEP_DEPTH);
emit_op(s, is_let ? OP_scope_put_var_init : OP_scope_put_var);
emit_u32(s, name); /* has refcount */
emit_u16(s, scope);
break;
case OP_get_field:
emit_op(s, OP_put_field);
emit_u32(s, name); /* name has refcount */
emit_ic(s, name);
break;
case OP_scope_get_private_field:
emit_op(s, OP_scope_put_private_field);
emit_u32(s, name); /* name has refcount */
emit_u16(s, scope);
break;
case OP_get_array_el:
emit_op(s, OP_put_array_el);
break;
case OP_get_ref_value:
emit_op(s, OP_put_ref_value);
break;
case OP_get_super_value:
emit_op(s, OP_put_super_value);
break;
default:
abort();
}
}
|
O2
|
c
|
put_lvalue:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r12d
movl %ecx, %ebp
movl %edx, 0x4(%rsp)
movl %esi, %r15d
movq %rdi, %rbx
movl 0x40(%rsp), %r14d
cmpl $0x3c, %esi
je 0x57133
cmpl $0xbd, %r15d
je 0x57102
cmpl $0x47, %r15d
je 0x5714b
cmpl $0x4a, %r15d
je 0x57119
cmpl $0xb7, %r15d
je 0x571b9
cmpl $0x41, %r15d
jne 0x5725e
movl %r12d, %eax
leaq 0x2d300(%rip), %rcx # 0x8440c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x15, %al
jmp 0x57174
movl %r12d, %eax
leaq 0x2d2d5(%rip), %rcx # 0x843f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x17, %al
jmp 0x5723a
movl %r8d, %r13d
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x1a995
movq %rbx, %rdi
movl %r13d, %esi
callq 0x5617c
movl %r12d, %eax
leaq 0x2d28f(%rip), %rcx # 0x843e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $-0x4e, %al
jmp 0x57174
movb $0x1b, %al
jmp 0x57174
movb $0x1d, %al
jmp 0x57174
movb $0x18, %al
jmp 0x57174
movb $0x16, %al
jmp 0x57174
movb $0x19, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x4fa1b
cmpl $0x3c, %r15d
je 0x57230
cmpl $0x41, %r15d
je 0x571ff
cmpl $0x47, %r15d
je 0x5722c
cmpl $0x4a, %r15d
je 0x57245
cmpl $0xbd, %r15d
je 0x571cd
cmpl $0xb7, %r15d
jne 0x5725e
xorl %eax, %eax
testl %r14d, %r14d
setne %al
leal 0xb8(,%rax,4), %esi
movq %rbx, %rdi
jmp 0x571d5
movq %rbx, %rdi
movl $0xbf, %esi
callq 0x4fa1b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x563de
movzwl 0x4(%rsp), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4fa3a
pushq $0x43
popq %rsi
movq %rbx, %rdi
callq 0x4fa1b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x563de
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x56ec6
pushq $0x49
jmp 0x57247
pushq $0x3d
jmp 0x57247
movb $0x1f, %al
jmp 0x5723a
movb $0x1a, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x4fa1b
pushq $0x4b
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4fa1b
callq 0xe090
|
put_lvalue:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, r9d
mov ebp, ecx
mov [rsp+38h+var_34], edx
mov r15d, esi
mov rbx, rdi
mov r14d, [rsp+38h+arg_0]
cmp esi, 3Ch ; '<'
jz short loc_57133
cmp r15d, 0BDh
jz short loc_57102
cmp r15d, 47h ; 'G'
jz short loc_5714B
cmp r15d, 4Ah ; 'J'
jz short loc_57119
cmp r15d, 0B7h
jz loc_571B9
cmp r15d, 41h ; 'A'
jnz loc_5725E
loc_57102:
mov eax, r12d
lea rcx, jpt_57113
movsxd rax, ds:(jpt_57113 - 8440Ch)[rcx+rax*4]; switch 5 cases
add rax, rcx
jmp rax; switch jump
loc_57115:
mov al, 15h; jumptable 0000000000057113 case 2
jmp short loc_57174
loc_57119:
mov eax, r12d
lea rcx, jpt_5712A
movsxd rax, ds:(jpt_5712A - 843F8h)[rcx+rax*4]; switch 5 cases
add rax, rcx
jmp rax; switch jump
loc_5712C:
mov al, 17h; jumptable 000000000005712A case 2
jmp loc_5723A
loc_57133:
mov r13d, r8d
mov rdi, [rbx]
mov esi, ebp
call JS_FreeAtom
mov rdi, rbx
mov esi, r13d
call emit_label
loc_5714B:
mov eax, r12d
lea rcx, jpt_5715C
movsxd rax, ds:(jpt_5715C - 843E4h)[rcx+rax*4]; switch 5 cases
add rax, rcx
jmp rax; switch jump
loc_5715E:
mov al, 0B2h; jumptable 000000000005715C case 0
jmp short loc_57174
loc_57162:
mov al, 1Bh; jumptable 0000000000057113 case 4
jmp short loc_57174
loc_57166:
mov al, 1Dh; jumptable 000000000005715C case 4
jmp short loc_57174
loc_5716A:
mov al, 18h; jumptable 0000000000057113 case 3
jmp short loc_57174
loc_5716E:
mov al, 16h; jumptable 000000000005715C case 2
jmp short loc_57174
loc_57172:
mov al, 19h; jumptable 000000000005715C case 3
loc_57174:
movzx esi, al
mov rdi, rbx
call emit_op
loc_5717F:
cmp r15d, 3Ch ; '<'; jumptable 0000000000057113 cases 0,1
jz loc_57230
cmp r15d, 41h ; 'A'
jz short loc_571FF
cmp r15d, 47h ; 'G'
jz loc_5722C
cmp r15d, 4Ah ; 'J'
jz loc_57245; jumptable 000000000005712A cases 0,1
cmp r15d, 0BDh
jz short loc_571CD
cmp r15d, 0B7h
jnz loc_5725E
loc_571B9:
xor eax, eax
test r14d, r14d
setnz al
lea esi, ds:0B8h[rax*4]
mov rdi, rbx
jmp short loc_571D5
loc_571CD:
mov rdi, rbx
mov esi, 0BFh
loc_571D5:
call emit_op
mov rdi, rbx
mov esi, ebp
call emit_u32
movzx esi, word ptr [rsp+38h+var_34]
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp emit_u16
loc_571FF:
push 43h ; 'C'
pop rsi
mov rdi, rbx
call emit_op
mov rdi, rbx
mov esi, ebp
call emit_u32
mov rdi, rbx
mov esi, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp emit_ic
loc_5722C:
push 49h ; 'I'
jmp short loc_57247
loc_57230:
push 3Dh ; '='
jmp short loc_57247
loc_57234:
mov al, 1Fh; jumptable 000000000005712A case 4
jmp short loc_5723A
loc_57238:
mov al, 1Ah; jumptable 000000000005712A case 3
loc_5723A:
movzx esi, al
mov rdi, rbx
call emit_op
loc_57245:
push 4Bh ; 'K'; jumptable 000000000005712A cases 0,1
loc_57247:
pop rsi
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp emit_op
loc_5725E:
call _abort
|
long long put_lvalue(long long *a1, int a2, __int16 a3, unsigned int a4, int a5, int a6, int a7)
{
char v9; // al
char v10; // al
char v12; // si
long long result; // rax
switch ( a2 )
{
case 60:
JS_FreeAtom(*a1, a4);
emit_label((long long)a1, a5);
break;
case 189:
LABEL_7:
switch ( a6 )
{
case 0:
case 1:
goto LABEL_20;
case 2:
v9 = 21;
goto LABEL_19;
case 3:
v9 = 24;
goto LABEL_19;
case 4:
v9 = 27;
goto LABEL_19;
}
goto LABEL_20;
case 71:
break;
case 74:
switch ( a6 )
{
case 0:
case 1:
goto LABEL_32;
case 2:
v10 = 23;
goto LABEL_31;
case 3:
v10 = 26;
goto LABEL_31;
case 4:
v10 = 31;
LABEL_31:
emit_op((long long)a1, v10);
LABEL_32:
result = emit_op((long long)a1, 75);
break;
}
return result;
case 183:
v12 = 4 * (a7 != 0) - 72;
goto LABEL_25;
case 65:
goto LABEL_7;
default:
abort((const char *)a1);
}
switch ( a6 )
{
case 0:
v9 = -78;
goto LABEL_19;
case 1:
break;
case 2:
v9 = 22;
goto LABEL_19;
case 3:
v9 = 25;
goto LABEL_19;
case 4:
v9 = 29;
LABEL_19:
emit_op((long long)a1, v9);
break;
}
LABEL_20:
switch ( a2 )
{
case '<':
return emit_op((long long)a1, 61);
case 'A':
emit_op((long long)a1, 67);
emit_u32((long long)a1, a4);
return emit_ic(a1, a4);
case 'G':
return emit_op((long long)a1, 73);
default:
v12 = -65;
LABEL_25:
emit_op((long long)a1, v12);
emit_u32((long long)a1, a4);
return emit_u16((long long)a1, a3);
}
}
|
put_lvalue:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,R9D
MOV EBP,ECX
MOV dword ptr [RSP + 0x4],EDX
MOV R15D,ESI
MOV RBX,RDI
MOV R14D,dword ptr [RSP + 0x40]
CMP ESI,0x3c
JZ 0x00157133
CMP R15D,0xbd
JZ 0x00157102
CMP R15D,0x47
JZ 0x0015714b
CMP R15D,0x4a
JZ 0x00157119
CMP R15D,0xb7
JZ 0x001571b9
CMP R15D,0x41
JNZ 0x0015725e
LAB_00157102:
MOV EAX,R12D
LEA RCX,[0x18440c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_00157119:
MOV EAX,R12D
LEA RCX,[0x1843f8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_00157133:
MOV R13D,R8D
MOV RDI,qword ptr [RBX]
MOV ESI,EBP
CALL 0x0011a995
MOV RDI,RBX
MOV ESI,R13D
CALL 0x0015617c
LAB_0015714b:
MOV EAX,R12D
LEA RCX,[0x1843e4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_001571b9:
XOR EAX,EAX
TEST R14D,R14D
SETNZ AL
LEA ESI,[0xb8 + RAX*0x4]
MOV RDI,RBX
JMP 0x001571d5
LAB_001571d5:
CALL 0x0014fa1b
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001563de
MOVZX ESI,word ptr [RSP + 0x4]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0014fa3a
LAB_0015725e:
CALL 0x0010e090
|
void put_lvalue(int8 *param_1,int param_2,int2 param_3,int4 param_4,
int4 param_5,uint param_6,int param_7)
{
if (param_2 != 0x3c) {
if (param_2 != 0xbd) {
if (param_2 == 0x47) goto LAB_0015714b;
if (param_2 == 0x4a) {
/* WARNING: Could not recover jumptable at 0x0015712a. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_001843f8 + *(int *)(&DAT_001843f8 + (ulong)param_6 * 4)))();
return;
}
if (param_2 == 0xb7) {
emit_op(param_1,(uint)(param_7 != 0) * 4 + 0xb8);
emit_u32(param_1,param_4);
emit_u16(param_1,param_3);
return;
}
if (param_2 != 0x41) {
/* WARNING: Subroutine does not return */
abort();
}
}
/* WARNING: Could not recover jumptable at 0x00157113. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_0018440c + *(int *)(&DAT_0018440c + (ulong)param_6 * 4)))();
return;
}
JS_FreeAtom(*param_1,param_4);
emit_label(param_1,param_5);
LAB_0015714b:
/* WARNING: Could not recover jumptable at 0x0015715c. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_001843e4 + *(int *)(&DAT_001843e4 + (ulong)param_6 * 4)))();
return;
}
|
|
12,236
|
make_empty_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type,
my_bool create_dir_entry)
{
uint block_size= info->s->block_size;
DBUG_ENTER("make_empty_page");
bzero(buff, PAGE_HEADER_SIZE(info->s));
#if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind)
/*
We zero the rest of the block to avoid getting old memory information
to disk and to allow the file to be compressed better if archived.
The code does not assume the block is zeroed.
*/
if (page_type != BLOB_PAGE)
bzero(buff+ PAGE_HEADER_SIZE(info->s),
block_size - PAGE_HEADER_SIZE(info->s));
#endif
buff[PAGE_TYPE_OFFSET]= (uchar) page_type;
buff[DIR_COUNT_OFFSET]= (int) create_dir_entry;
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
if (create_dir_entry)
{
/* Create directory entry to point to start of page with size 0 */
buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
int2store(buff, PAGE_HEADER_SIZE(info->s));
int2store(buff+2, 0);
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
make_empty_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
cmpl $0x3, -0x14(%rbp)
je 0x57fe6
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, %eax
addq %rax, %rdi
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl 0xc18(%rcx), %ecx
addl $0xc, %ecx
subl %ecx, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movsbl -0x15(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $-0x1, 0x9(%rax)
cmpb $0x0, -0x15(%rbp)
je 0x5805e
movl -0x1c(%rbp), %ecx
subl $0x4, %ecx
subl $0x4, %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
jmp 0x58047
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movw $0x0, (%rax)
jmp 0x5805e
jmp 0x58060
jmp 0x58062
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
make_empty_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_15], al
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+7BCh]
mov [rbp+var_1C], eax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
cmp [rbp+var_14], 3
jz short loc_57FE6
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov eax, eax
add rdi, rax
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov ecx, [rcx+0C18h]
add ecx, 0Ch
sub eax, ecx
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
loc_57FE6:
mov eax, [rbp+var_14]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
movsx eax, [rbp+var_15]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+8], cl
mov rax, [rbp+var_10]
mov byte ptr [rax+9], 0FFh
cmp [rbp+var_15], 0
jz short loc_5805E
mov ecx, [rbp+var_1C]
sub ecx, 4
sub ecx, 4
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov cx, ax
mov rax, [rbp+var_28]
mov [rax], cx
jmp short $+2
loc_58047:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov word ptr [rax], 0
jmp short $+2
loc_5805E:
jmp short $+2
loc_58060:
jmp short $+2
loc_58062:
add rsp, 30h
pop rbp
retn
|
_WORD * make_empty_page(long long a1, _BYTE *a2, int a3, char a4)
{
_WORD *result; // rax
_WORD *v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+14h] [rbp-1Ch]
v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12));
if ( a3 != 3 )
memset(
&a2[*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12],
0LL,
(unsigned int)(v6 - (*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12)));
a2[7] = a3;
a2[8] = a4;
result = a2;
a2[9] = -1;
if ( a4 )
{
v5 = &a2[v6 - 8];
*v5 = *(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12;
result = v5 + 1;
v5[1] = 0;
}
return result;
}
|
make_empty_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV byte ptr [RBP + -0x15],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
CMP dword ptr [RBP + -0x14],0x3
JZ 0x00157fe6
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV EAX,EAX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0xc18]
ADD ECX,0xc
SUB EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
LAB_00157fe6:
MOV EAX,dword ptr [RBP + -0x14]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
MOVSX EAX,byte ptr [RBP + -0x15]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x9],0xff
CMP byte ptr [RBP + -0x15],0x0
JZ 0x0015805e
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x4
SUB ECX,0x4
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX],CX
JMP 0x00158047
LAB_00158047:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],0x0
JMP 0x0015805e
LAB_0015805e:
JMP 0x00158060
LAB_00158060:
JMP 0x00158062
LAB_00158062:
ADD RSP,0x30
POP RBP
RET
|
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4)
{
int iVar1;
short *psVar2;
iVar1 = *(int *)(*param_1 + 0x7bc);
memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc));
if (param_3 != 3) {
memset((void *)((long)param_2 + (ulong)(*(int *)(*param_1 + 0xc18) + 0xc)),0,
(ulong)(uint)(iVar1 - (*(int *)(*param_1 + 0xc18) + 0xc)));
}
*(char *)((long)param_2 + 7) = (char)param_3;
*(char *)((long)param_2 + 8) = param_4;
*(int1 *)((long)param_2 + 9) = 0xff;
if (param_4 != '\0') {
psVar2 = (short *)((long)param_2 + (ulong)(iVar1 - 8));
*psVar2 = (short)*(int4 *)(*param_1 + 0xc18) + 0xc;
psVar2[1] = 0;
}
return;
}
|
|
12,237
|
make_empty_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type,
my_bool create_dir_entry)
{
uint block_size= info->s->block_size;
DBUG_ENTER("make_empty_page");
bzero(buff, PAGE_HEADER_SIZE(info->s));
#if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind)
/*
We zero the rest of the block to avoid getting old memory information
to disk and to allow the file to be compressed better if archived.
The code does not assume the block is zeroed.
*/
if (page_type != BLOB_PAGE)
bzero(buff+ PAGE_HEADER_SIZE(info->s),
block_size - PAGE_HEADER_SIZE(info->s));
#endif
buff[PAGE_TYPE_OFFSET]= (uchar) page_type;
buff[DIR_COUNT_OFFSET]= (int) create_dir_entry;
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
if (create_dir_entry)
{
/* Create directory entry to point to start of page with size 0 */
buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
int2store(buff, PAGE_HEADER_SIZE(info->s));
int2store(buff+2, 0);
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
make_empty_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0x7bc(%rax), %r13d
movl 0xc18(%rax), %edx
addl $0xc, %edx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x2a290
cmpl $0x3, %r12d
je 0x4c28b
movq (%r14), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
leaq (%rbx,%rax), %rdi
movl %r13d, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x2a290
movb %r12b, 0x7(%rbx)
movb %r15b, 0x8(%rbx)
movb $-0x1, 0x9(%rbx)
testb %r15b, %r15b
je 0x4c2b9
addl $-0x8, %r13d
movq (%r14), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movw %ax, (%rbx,%r13)
movw $0x0, 0x2(%rbx,%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
make_empty_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov r12d, edx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi]
mov r13d, [rax+7BCh]
mov edx, [rax+0C18h]
add edx, 0Ch
mov rdi, rsi
xor esi, esi
call _memset
cmp r12d, 3
jz short loc_4C28B
mov rax, [r14]
mov eax, [rax+0C18h]
add eax, 0Ch
lea rdi, [rbx+rax]
mov edx, r13d
sub edx, eax
xor esi, esi
call _memset
loc_4C28B:
mov [rbx+7], r12b
mov [rbx+8], r15b
mov byte ptr [rbx+9], 0FFh
test r15b, r15b
jz short loc_4C2B9
add r13d, 0FFFFFFF8h
mov rax, [r14]
mov eax, [rax+0C18h]
add eax, 0Ch
mov [rbx+r13], ax
mov word ptr [rbx+r13+2], 0
loc_4C2B9:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long make_empty_page(long long a1, _BYTE *a2, int a3, char a4)
{
int v6; // r13d
long long result; // rax
long long v8; // rax
v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
result = memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12));
if ( a3 != 3 )
{
v8 = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12);
result = memset(&a2[v8], 0LL, (unsigned int)(v6 - v8));
}
a2[7] = a3;
a2[8] = a4;
a2[9] = -1;
if ( a4 )
{
result = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12);
*(_DWORD *)&a2[v6 - 8] = (unsigned __int16)(*(_WORD *)(*(_QWORD *)a1 + 3096LL) + 12);
}
return result;
}
|
make_empty_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV R12D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOV R13D,dword ptr [RAX + 0x7bc]
MOV EDX,dword ptr [RAX + 0xc18]
ADD EDX,0xc
MOV RDI,RSI
XOR ESI,ESI
CALL 0x0012a290
CMP R12D,0x3
JZ 0x0014c28b
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
LEA RDI,[RBX + RAX*0x1]
MOV EDX,R13D
SUB EDX,EAX
XOR ESI,ESI
CALL 0x0012a290
LAB_0014c28b:
MOV byte ptr [RBX + 0x7],R12B
MOV byte ptr [RBX + 0x8],R15B
MOV byte ptr [RBX + 0x9],0xff
TEST R15B,R15B
JZ 0x0014c2b9
ADD R13D,-0x8
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV word ptr [RBX + R13*0x1],AX
MOV word ptr [RBX + R13*0x1 + 0x2],0x0
LAB_0014c2b9:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4)
{
int iVar1;
uint uVar2;
ulong uVar3;
iVar1 = *(int *)(*param_1 + 0x7bc);
memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc));
if (param_3 != 3) {
uVar2 = *(int *)(*param_1 + 0xc18) + 0xc;
memset((void *)((long)param_2 + (ulong)uVar2),0,(ulong)(iVar1 - uVar2));
}
*(char *)((long)param_2 + 7) = (char)param_3;
*(char *)((long)param_2 + 8) = param_4;
*(int1 *)((long)param_2 + 9) = 0xff;
if (param_4 != '\0') {
uVar3 = (ulong)(iVar1 - 8);
*(short *)((long)param_2 + uVar3) = (short)*(int4 *)(*param_1 + 0xc18) + 0xc;
*(int2 *)((long)param_2 + uVar3 + 2) = 0;
}
return;
}
|
|
12,238
|
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0, emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent&&)
|
angrymouse[P]emittra/include/concurrentqueue.h
|
inline bool enqueue(U&& element)
{
index_t currentTailIndex = this->tailIndex.load(std::memory_order_relaxed);
index_t newTailIndex = 1 + currentTailIndex;
if ((currentTailIndex & static_cast<index_t>(BLOCK_SIZE - 1)) == 0) {
// We reached the end of a block, start a new one
auto startBlock = this->tailBlock;
auto originalBlockIndexSlotsUsed = pr_blockIndexSlotsUsed;
if (this->tailBlock != nullptr && this->tailBlock->next->ConcurrentQueue::Block::template is_empty<explicit_context>()) {
// We can re-use the block ahead of us, it's empty!
this->tailBlock = this->tailBlock->next;
this->tailBlock->ConcurrentQueue::Block::template reset_empty<explicit_context>();
// We'll put the block on the block index (guaranteed to be room since we're conceptually removing the
// last block from it first -- except instead of removing then adding, we can just overwrite).
// Note that there must be a valid block index here, since even if allocation failed in the ctor,
// it would have been re-attempted when adding the first block to the queue; since there is such
// a block, a block index must have been successfully allocated.
}
else {
// Whatever head value we see here is >= the last value we saw here (relatively),
// and <= its current value. Since we have the most recent tail, the head must be
// <= to it.
auto head = this->headIndex.load(std::memory_order_relaxed);
assert(!details::circular_less_than<index_t>(currentTailIndex, head));
if (!details::circular_less_than<index_t>(head, currentTailIndex + BLOCK_SIZE)
|| (MAX_SUBQUEUE_SIZE != details::const_numeric_max<size_t>::value && (MAX_SUBQUEUE_SIZE == 0 || MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head))) {
// We can't enqueue in another block because there's not enough leeway -- the
// tail could surpass the head by the time the block fills up! (Or we'll exceed
// the size limit, if the second part of the condition was true.)
return false;
}
// We're going to need a new block; check that the block index has room
if (pr_blockIndexRaw == nullptr || pr_blockIndexSlotsUsed == pr_blockIndexSize) {
// Hmm, the circular block index is already full -- we'll need
// to allocate a new index. Note pr_blockIndexRaw can only be nullptr if
// the initial allocation failed in the constructor.
MOODYCAMEL_CONSTEXPR_IF (allocMode == CannotAlloc) {
return false;
}
else if (!new_block_index(pr_blockIndexSlotsUsed)) {
return false;
}
}
// Insert a new block in the circular linked list
auto newBlock = this->parent->ConcurrentQueue::template requisition_block<allocMode>();
if (newBlock == nullptr) {
return false;
}
#ifdef MCDBGQ_TRACKMEM
newBlock->owner = this;
#endif
newBlock->ConcurrentQueue::Block::template reset_empty<explicit_context>();
if (this->tailBlock == nullptr) {
newBlock->next = newBlock;
}
else {
newBlock->next = this->tailBlock->next;
this->tailBlock->next = newBlock;
}
this->tailBlock = newBlock;
++pr_blockIndexSlotsUsed;
}
MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (static_cast<T*>(nullptr)) T(std::forward<U>(element)))) {
// The constructor may throw. We want the element not to appear in the queue in
// that case (without corrupting the queue):
MOODYCAMEL_TRY {
new ((*this->tailBlock)[currentTailIndex]) T(std::forward<U>(element));
}
MOODYCAMEL_CATCH (...) {
// Revert change to the current block, but leave the new block available
// for next time
pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed;
this->tailBlock = startBlock == nullptr ? this->tailBlock : startBlock;
MOODYCAMEL_RETHROW;
}
}
else {
(void)startBlock;
(void)originalBlockIndexSlotsUsed;
}
// Add block to block index
auto& entry = blockIndex.load(std::memory_order_relaxed)->entries[pr_blockIndexFront];
entry.base = currentTailIndex;
entry.block = this->tailBlock;
blockIndex.load(std::memory_order_relaxed)->front.store(pr_blockIndexFront, std::memory_order_release);
pr_blockIndexFront = (pr_blockIndexFront + 1) & (pr_blockIndexSize - 1);
MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (static_cast<T*>(nullptr)) T(std::forward<U>(element)))) {
this->tailIndex.store(newTailIndex, std::memory_order_release);
return true;
}
}
|
O0
|
c
|
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0, emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent&&):
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
addq $0x20, %rax
movq %rax, 0x110(%rsp)
movl $0x0, 0x10c(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x48(%rsp)
movl 0x10c(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x6420
movl %eax, 0x108(%rsp)
movl 0x10c(%rsp), %eax
movl %eax, 0x54(%rsp)
decl %eax
subl $0x2, %eax
jb 0x19dd1
jmp 0x19db4
movl 0x54(%rsp), %eax
subl $0x5, %eax
je 0x19de3
jmp 0x19dbf
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x100(%rsp)
jmp 0x19df3
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x100(%rsp)
jmp 0x19df3
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rax
andq $0x1f, %rax
cmpq $0x0, %rax
jne 0x1a153
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq 0x60(%rax), %rcx
movq %rcx, 0x70(%rsp)
cmpq $0x0, 0x40(%rax)
je 0x19e88
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x500(%rax), %rdi
callq 0x16a80
testb $0x1, %al
jne 0x19e66
jmp 0x19e88
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x500(%rcx), %rcx
movq %rcx, 0x40(%rax)
movq 0x40(%rax), %rdi
callq 0x1a240
jmp 0x1a026
movq 0x40(%rsp), %rax
addq $0x28, %rax
movq %rax, 0xf8(%rsp)
movl $0x0, 0xf4(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0xf4(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x6420
movl %eax, 0xf0(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, 0x3c(%rsp)
decl %eax
subl $0x2, %eax
jb 0x19efa
jmp 0x19edd
movl 0x3c(%rsp), %eax
subl $0x5, %eax
je 0x19f0c
jmp 0x19ee8
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
jmp 0x19f1c
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
jmp 0x19f1c
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movq 0x88(%rsp), %rsi
addq $0x20, %rsi
callq 0xc700
testb $0x1, %al
jne 0x19f50
movb $0x0, 0xa7(%rsp)
jmp 0x1a22f
movq 0x40(%rsp), %rax
cmpq $0x0, 0x80(%rax)
je 0x19f6e
movq 0x40(%rsp), %rcx
movq 0x60(%rcx), %rax
cmpq 0x68(%rcx), %rax
jne 0x19f8f
movq 0x40(%rsp), %rdi
movq 0x60(%rdi), %rsi
callq 0x16080
testb $0x1, %al
jne 0x19f8d
movb $0x0, 0xa7(%rsp)
jmp 0x1a22f
jmp 0x19f8f
movq 0x40(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x186a0
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x19fb7
movb $0x0, 0xa7(%rsp)
jmp 0x1a22f
movq 0x60(%rsp), %rdi
callq 0x1a240
movq 0x40(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x19fe0
movq 0x60(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x500(%rax)
jmp 0x1a00c
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x500(%rcx), %rdx
movq 0x60(%rsp), %rcx
movq %rdx, 0x500(%rcx)
movq 0x60(%rsp), %rcx
movq 0x40(%rax), %rax
movq %rcx, 0x500(%rax)
movq 0x40(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x40(%rax)
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x60(%rax)
movq 0x40(%rsp), %rdi
addq $0x58, %rdi
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
movl %esi, 0x1c(%rsp)
callq 0x1a2a0
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq 0x10(%rcx), %rcx
movq 0x70(%rax), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq %rcx, 0x58(%rsp)
movq 0x88(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq %rdx, (%rcx)
movq 0x40(%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x8(%rax)
callq 0x1a2a0
movq %rax, %rcx
movq 0x40(%rsp), %rax
addq $0x8, %rcx
movq 0x70(%rax), %rax
movq %rcx, 0xe0(%rsp)
movq %rax, 0xd8(%rsp)
movl $0x3, 0xd4(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0xd4(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x6420
movl %eax, 0xd0(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0xd8(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
subl $0x3, %eax
je 0x1a115
jmp 0x1a0f8
movl 0x2c(%rsp), %eax
subl $0x5, %eax
je 0x1a127
jmp 0x1a103
movq 0x20(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x1a137
movq 0x20(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x1a137
movq 0x20(%rsp), %rcx
movq 0xc8(%rsp), %rax
xchgq %rax, (%rcx)
movq 0x40(%rsp), %rax
movq 0x70(%rax), %rcx
addq $0x1, %rcx
movq 0x68(%rax), %rdx
subq $0x1, %rdx
andq %rdx, %rcx
movq %rcx, 0x70(%rax)
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x88(%rsp), %rsi
callq 0x16b20
movq %rax, %rdi
movq 0x90(%rsp), %rsi
callq 0x188f0
movq 0x40(%rsp), %rcx
addq $0x20, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0xc0(%rsp)
movq %rax, 0xb8(%rsp)
movl $0x3, 0xb4(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, (%rsp)
movl 0xb4(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x6420
movl %eax, 0xb0(%rsp)
movl 0xb4(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0xb8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
subl $0x3, %eax
je 0x1a207
jmp 0x1a1eb
movl 0xc(%rsp), %eax
subl $0x5, %eax
je 0x1a218
jmp 0x1a1f6
movq (%rsp), %rax
movq 0xa8(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x1a227
movq (%rsp), %rax
movq 0xa8(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x1a227
movq (%rsp), %rcx
movq 0xa8(%rsp), %rax
xchgq %rax, (%rcx)
movb $0x1, 0xa7(%rsp)
movb 0xa7(%rsp), %al
andb $0x1, %al
addq $0x118, %rsp # imm = 0x118
retq
|
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer7enqueueILNS5_14AllocationModeE0ES3_EEbOT0_:
sub rsp, 118h
mov [rsp+118h+var_80], rdi
mov [rsp+118h+var_88], rsi
mov rax, [rsp+118h+var_80]
mov [rsp+118h+var_D8], rax
add rax, 20h ; ' '
mov [rsp+118h+var_8], rax
mov [rsp+118h+var_C], 0
mov rax, [rsp+118h+var_8]
mov [rsp+118h+var_D0], rax
mov edi, [rsp+118h+var_C]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+118h+var_10], eax
mov eax, [rsp+118h+var_C]
mov [rsp+118h+var_C4], eax
dec eax
sub eax, 2
jb short loc_19DD1
jmp short $+2
loc_19DB4:
mov eax, [rsp+118h+var_C4]
sub eax, 5
jz short loc_19DE3
jmp short $+2
loc_19DBF:
mov rax, [rsp+118h+var_D0]
mov rax, [rax]
mov [rsp+118h+var_18], rax
jmp short loc_19DF3
loc_19DD1:
mov rax, [rsp+118h+var_D0]
mov rax, [rax]
mov [rsp+118h+var_18], rax
jmp short loc_19DF3
loc_19DE3:
mov rax, [rsp+118h+var_D0]
mov rax, [rax]
mov [rsp+118h+var_18], rax
loc_19DF3:
mov rax, [rsp+118h+var_18]
mov [rsp+118h+var_90], rax
mov rax, [rsp+118h+var_90]
add rax, 1
mov [rsp+118h+var_98], rax
mov rax, [rsp+118h+var_90]
and rax, 1Fh
cmp rax, 0
jnz loc_1A153
mov rax, [rsp+118h+var_D8]
mov rcx, [rax+40h]
mov [rsp+118h+var_A0], rcx
mov rcx, [rax+60h]
mov [rsp+118h+var_A8], rcx
cmp qword ptr [rax+40h], 0
jz short loc_19E88
mov rax, [rsp+118h+var_D8]
mov rax, [rax+40h]
mov rdi, [rax+500h]
call _ZNK10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE5Block8is_emptyILNS5_17InnerQueueContextE1EEEbv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block::is_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>(void)
test al, 1
jnz short loc_19E66
jmp short loc_19E88
loc_19E66:
mov rax, [rsp+118h+var_D8]
mov rcx, [rax+40h]
mov rcx, [rcx+500h]
mov [rax+40h], rcx
mov rdi, [rax+40h]
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE5Block11reset_emptyILNS5_17InnerQueueContextE1EEEvv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block::reset_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>(void)
jmp loc_1A026
loc_19E88:
mov rax, [rsp+118h+var_D8]
add rax, 28h ; '('
mov [rsp+118h+var_20], rax
mov [rsp+118h+var_24], 0
mov rax, [rsp+118h+var_20]
mov [rsp+118h+var_E8], rax
mov edi, [rsp+118h+var_24]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+118h+var_28], eax
mov eax, [rsp+118h+var_24]
mov [rsp+118h+var_DC], eax
dec eax
sub eax, 2
jb short loc_19EFA
jmp short $+2
loc_19EDD:
mov eax, [rsp+118h+var_DC]
sub eax, 5
jz short loc_19F0C
jmp short $+2
loc_19EE8:
mov rax, [rsp+118h+var_E8]
mov rax, [rax]
mov [rsp+118h+var_30], rax
jmp short loc_19F1C
loc_19EFA:
mov rax, [rsp+118h+var_E8]
mov rax, [rax]
mov [rsp+118h+var_30], rax
jmp short loc_19F1C
loc_19F0C:
mov rax, [rsp+118h+var_E8]
mov rax, [rax]
mov [rsp+118h+var_30], rax
loc_19F1C:
mov rax, [rsp+118h+var_30]
mov [rsp+118h+var_B0], rax
mov rdi, [rsp+118h+var_B0]
mov rsi, [rsp+118h+var_90]
add rsi, 20h ; ' '
call _ZN10moodycamel7detailsL18circular_less_thanImEEbT_S2_; moodycamel::details::circular_less_than<ulong>(ulong,ulong)
test al, 1
jnz short loc_19F50
mov [rsp+118h+var_71], 0
jmp loc_1A22F
loc_19F50:
mov rax, [rsp+118h+var_D8]
cmp qword ptr [rax+80h], 0
jz short loc_19F6E
mov rcx, [rsp+118h+var_D8]
mov rax, [rcx+60h]
cmp rax, [rcx+68h]
jnz short loc_19F8F
loc_19F6E:
mov rdi, [rsp+118h+var_D8]
mov rsi, [rdi+60h]
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer15new_block_indexEm; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::new_block_index(ulong)
test al, 1
jnz short loc_19F8D
mov [rsp+118h+var_71], 0
jmp loc_1A22F
loc_19F8D:
jmp short $+2
loc_19F8F:
mov rax, [rsp+118h+var_D8]
mov rdi, [rax+50h]
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE17requisition_blockILNS5_14AllocationModeE0EEEPNS5_5BlockEv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>(void)
mov [rsp+118h+var_B8], rax
cmp [rsp+118h+var_B8], 0
jnz short loc_19FB7
mov [rsp+118h+var_71], 0
jmp loc_1A22F
loc_19FB7:
mov rdi, [rsp+118h+var_B8]
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE5Block11reset_emptyILNS5_17InnerQueueContextE1EEEvv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block::reset_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>(void)
mov rax, [rsp+118h+var_D8]
cmp qword ptr [rax+40h], 0
jnz short loc_19FE0
mov rcx, [rsp+118h+var_B8]
mov rax, [rsp+118h+var_B8]
mov [rax+500h], rcx
jmp short loc_1A00C
loc_19FE0:
mov rax, [rsp+118h+var_D8]
mov rcx, [rax+40h]
mov rdx, [rcx+500h]
mov rcx, [rsp+118h+var_B8]
mov [rcx+500h], rdx
mov rcx, [rsp+118h+var_B8]
mov rax, [rax+40h]
mov [rax+500h], rcx
loc_1A00C:
mov rax, [rsp+118h+var_D8]
mov rcx, [rsp+118h+var_B8]
mov [rax+40h], rcx
mov rcx, [rax+60h]
add rcx, 1
mov [rax+60h], rcx
loc_1A026:
mov rdi, [rsp+118h+var_D8]
add rdi, 58h ; 'X'
mov [rsp+118h+var_108], rdi
xor esi, esi
mov [rsp+118h+var_FC], esi
call _ZNKSt6atomicIPN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer16BlockIndexHeaderEE4loadESt12memory_order; std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader *>::load(std::memory_order)
mov rdi, [rsp+118h+var_108]
mov esi, [rsp+118h+var_FC]
mov rcx, rax
mov rax, [rsp+118h+var_D8]
mov rcx, [rcx+10h]
mov rdx, [rax+70h]
shl rdx, 4
add rcx, rdx
mov [rsp+118h+var_C0], rcx
mov rdx, [rsp+118h+var_90]
mov rcx, [rsp+118h+var_C0]
mov [rcx], rdx
mov rcx, [rax+40h]
mov rax, [rsp+118h+var_C0]
mov [rax+8], rcx
call _ZNKSt6atomicIPN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer16BlockIndexHeaderEE4loadESt12memory_order; std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader *>::load(std::memory_order)
mov rcx, rax
mov rax, [rsp+118h+var_D8]
add rcx, 8
mov rax, [rax+70h]
mov [rsp+118h+var_38], rcx
mov [rsp+118h+var_40], rax
mov [rsp+118h+var_44], 3
mov rax, [rsp+118h+var_38]
mov [rsp+118h+var_F8], rax
mov edi, [rsp+118h+var_44]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+118h+var_48], eax
mov eax, [rsp+118h+var_44]
mov [rsp+118h+var_EC], eax
mov rcx, [rsp+118h+var_40]
mov [rsp+118h+var_50], rcx
sub eax, 3
jz short loc_1A115
jmp short $+2
loc_1A0F8:
mov eax, [rsp+118h+var_EC]
sub eax, 5
jz short loc_1A127
jmp short $+2
loc_1A103:
mov rax, [rsp+118h+var_F8]
mov rcx, [rsp+118h+var_50]
mov [rax], rcx
jmp short loc_1A137
loc_1A115:
mov rax, [rsp+118h+var_F8]
mov rcx, [rsp+118h+var_50]
mov [rax], rcx
jmp short loc_1A137
loc_1A127:
mov rcx, [rsp+118h+var_F8]
mov rax, [rsp+118h+var_50]
xchg rax, [rcx]
loc_1A137:
mov rax, [rsp+118h+var_D8]
mov rcx, [rax+70h]
add rcx, 1
mov rdx, [rax+68h]
sub rdx, 1
and rcx, rdx
mov [rax+70h], rcx
loc_1A153:
mov rax, [rsp+118h+var_D8]
mov rdi, [rax+40h]
mov rsi, [rsp+118h+var_90]
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE5BlockixEm; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block::operator[](ulong)
mov rdi, rax
mov rsi, [rsp+118h+var_88]
call _ZN7emittra7Emittra11QueuedEventC2EOS1_; emittra::Emittra::QueuedEvent::QueuedEvent(emittra::Emittra::QueuedEvent&&)
mov rcx, [rsp+118h+var_D8]
add rcx, 20h ; ' '
mov rax, [rsp+118h+var_98]
mov [rsp+118h+var_58], rcx
mov [rsp+118h+var_60], rax
mov [rsp+118h+var_64], 3
mov rax, [rsp+118h+var_58]
mov [rsp+118h+var_118], rax
mov edi, [rsp+118h+var_64]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+118h+var_68], eax
mov eax, [rsp+118h+var_64]
mov [rsp+118h+var_10C], eax
mov rcx, [rsp+118h+var_60]
mov [rsp+118h+var_70], rcx
sub eax, 3
jz short loc_1A207
jmp short $+2
loc_1A1EB:
mov eax, [rsp+118h+var_10C]
sub eax, 5
jz short loc_1A218
jmp short $+2
loc_1A1F6:
mov rax, [rsp+118h+var_118]
mov rcx, [rsp+118h+var_70]
mov [rax], rcx
jmp short loc_1A227
loc_1A207:
mov rax, [rsp+118h+var_118]
mov rcx, [rsp+118h+var_70]
mov [rax], rcx
jmp short loc_1A227
loc_1A218:
mov rcx, [rsp+118h+var_118]
mov rax, [rsp+118h+var_70]
xchg rax, [rcx]
loc_1A227:
mov [rsp+118h+var_71], 1
loc_1A22F:
mov al, [rsp+118h+var_71]
and al, 1
add rsp, 118h
retn
|
char moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent>(
_QWORD *a1,
long long a2)
{
long long v2; // rax
_QWORD *v4; // [rsp+58h] [rbp-C0h]
long long v5; // [rsp+60h] [rbp-B8h]
long long v7; // [rsp+D8h] [rbp-40h]
_QWORD *v8; // [rsp+E0h] [rbp-38h]
long long v9; // [rsp+100h] [rbp-18h]
std::operator&(0, 0xFFFF);
v9 = a1[4];
if ( (v9 & 0x1F) != 0 )
goto LABEL_18;
if ( a1[8]
&& (moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block::is_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>(*(_QWORD *)(a1[8] + 1280LL)) & 1) != 0 )
{
a1[8] = *(_QWORD *)(a1[8] + 1280LL);
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block::reset_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>(a1[8]);
LABEL_17:
v4 = (_QWORD *)(16LL * a1[14]
+ *(_QWORD *)(((long long (*)(void))std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader *>::load)()
+ 16));
*v4 = v9;
v4[1] = a1[8];
v8 = (_QWORD *)(std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader *>::load(
a1 + 11,
0LL)
+ 8);
v7 = a1[14];
std::operator&(3u, 0xFFFF);
*v8 = v7;
a1[14] = (a1[13] - 1LL) & (a1[14] + 1LL);
LABEL_18:
v2 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block::operator[](
a1[8],
v9);
emittra::Emittra::QueuedEvent::QueuedEvent(v2, a2);
std::operator&(3u, 0xFFFF);
a1[4] = v9 + 1;
return 1;
}
std::operator&(0, 0xFFFF);
if ( !moodycamel::details::circular_less_than<unsigned long>(a1[5], v9 + 32) )
return 0;
if ( (!a1[16] || a1[12] == a1[13])
&& (moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::new_block_index(
a1,
a1[12]) & 1) == 0 )
{
return 0;
}
v5 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>(a1[10]);
if ( v5 )
{
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block::reset_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>(v5);
if ( a1[8] )
{
*(_QWORD *)(v5 + 1280) = *(_QWORD *)(a1[8] + 1280LL);
*(_QWORD *)(a1[8] + 1280LL) = v5;
}
else
{
*(_QWORD *)(v5 + 1280) = v5;
}
a1[8] = v5;
++a1[12];
goto LABEL_17;
}
return 0;
}
|
enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent>:
SUB RSP,0x118
MOV qword ptr [RSP + 0x98],RDI
MOV qword ptr [RSP + 0x90],RSI
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x40],RAX
ADD RAX,0x20
MOV qword ptr [RSP + 0x110],RAX
MOV dword ptr [RSP + 0x10c],0x0
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x48],RAX
MOV EDI,dword ptr [RSP + 0x10c]
MOV ESI,0xffff
CALL 0x00106420
MOV dword ptr [RSP + 0x108],EAX
MOV EAX,dword ptr [RSP + 0x10c]
MOV dword ptr [RSP + 0x54],EAX
DEC EAX
SUB EAX,0x2
JC 0x00119dd1
JMP 0x00119db4
LAB_00119db4:
MOV EAX,dword ptr [RSP + 0x54]
SUB EAX,0x5
JZ 0x00119de3
JMP 0x00119dbf
LAB_00119dbf:
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x100],RAX
JMP 0x00119df3
LAB_00119dd1:
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x100],RAX
JMP 0x00119df3
LAB_00119de3:
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x100],RAX
LAB_00119df3:
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x88]
ADD RAX,0x1
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x88]
AND RAX,0x1f
CMP RAX,0x0
JNZ 0x0011a153
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x78],RCX
MOV RCX,qword ptr [RAX + 0x60]
MOV qword ptr [RSP + 0x70],RCX
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00119e88
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x40]
MOV RDI,qword ptr [RAX + 0x500]
CALL 0x00116a80
TEST AL,0x1
JNZ 0x00119e66
JMP 0x00119e88
LAB_00119e66:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RCX + 0x500]
MOV qword ptr [RAX + 0x40],RCX
MOV RDI,qword ptr [RAX + 0x40]
CALL 0x0011a240
JMP 0x0011a026
LAB_00119e88:
MOV RAX,qword ptr [RSP + 0x40]
ADD RAX,0x28
MOV qword ptr [RSP + 0xf8],RAX
MOV dword ptr [RSP + 0xf4],0x0
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x30],RAX
MOV EDI,dword ptr [RSP + 0xf4]
MOV ESI,0xffff
CALL 0x00106420
MOV dword ptr [RSP + 0xf0],EAX
MOV EAX,dword ptr [RSP + 0xf4]
MOV dword ptr [RSP + 0x3c],EAX
DEC EAX
SUB EAX,0x2
JC 0x00119efa
JMP 0x00119edd
LAB_00119edd:
MOV EAX,dword ptr [RSP + 0x3c]
SUB EAX,0x5
JZ 0x00119f0c
JMP 0x00119ee8
LAB_00119ee8:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xe8],RAX
JMP 0x00119f1c
LAB_00119efa:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xe8],RAX
JMP 0x00119f1c
LAB_00119f0c:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xe8],RAX
LAB_00119f1c:
MOV RAX,qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x88]
ADD RSI,0x20
CALL 0x0010c700
TEST AL,0x1
JNZ 0x00119f50
MOV byte ptr [RSP + 0xa7],0x0
JMP 0x0011a22f
LAB_00119f50:
MOV RAX,qword ptr [RSP + 0x40]
CMP qword ptr [RAX + 0x80],0x0
JZ 0x00119f6e
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RCX + 0x60]
CMP RAX,qword ptr [RCX + 0x68]
JNZ 0x00119f8f
LAB_00119f6e:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RDI + 0x60]
CALL 0x00116080
TEST AL,0x1
JNZ 0x00119f8d
MOV byte ptr [RSP + 0xa7],0x0
JMP 0x0011a22f
LAB_00119f8d:
JMP 0x00119f8f
LAB_00119f8f:
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x001186a0
MOV qword ptr [RSP + 0x60],RAX
CMP qword ptr [RSP + 0x60],0x0
JNZ 0x00119fb7
MOV byte ptr [RSP + 0xa7],0x0
JMP 0x0011a22f
LAB_00119fb7:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0011a240
MOV RAX,qword ptr [RSP + 0x40]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x00119fe0
MOV RCX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX + 0x500],RCX
JMP 0x0011a00c
LAB_00119fe0:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + 0x40]
MOV RDX,qword ptr [RCX + 0x500]
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RCX + 0x500],RDX
MOV RCX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x500],RCX
LAB_0011a00c:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RAX + 0x60]
ADD RCX,0x1
MOV qword ptr [RAX + 0x60],RCX
LAB_0011a026:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x58
MOV qword ptr [RSP + 0x10],RDI
XOR ESI,ESI
MOV dword ptr [RSP + 0x1c],ESI
CALL 0x0011a2a0
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x1c]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RAX + 0x70]
SHL RDX,0x4
ADD RCX,RDX
MOV qword ptr [RSP + 0x58],RCX
MOV RDX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RCX],RDX
MOV RCX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x8],RCX
CALL 0x0011a2a0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x40]
ADD RCX,0x8
MOV RAX,qword ptr [RAX + 0x70]
MOV qword ptr [RSP + 0xe0],RCX
MOV qword ptr [RSP + 0xd8],RAX
MOV dword ptr [RSP + 0xd4],0x3
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x20],RAX
MOV EDI,dword ptr [RSP + 0xd4]
MOV ESI,0xffff
CALL 0x00106420
MOV dword ptr [RSP + 0xd0],EAX
MOV EAX,dword ptr [RSP + 0xd4]
MOV dword ptr [RSP + 0x2c],EAX
MOV RCX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xc8],RCX
SUB EAX,0x3
JZ 0x0011a115
JMP 0x0011a0f8
LAB_0011a0f8:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x5
JZ 0x0011a127
JMP 0x0011a103
LAB_0011a103:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0xc8]
MOV qword ptr [RAX],RCX
JMP 0x0011a137
LAB_0011a115:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0xc8]
MOV qword ptr [RAX],RCX
JMP 0x0011a137
LAB_0011a127:
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0xc8]
XCHG qword ptr [RCX],RAX
LAB_0011a137:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + 0x70]
ADD RCX,0x1
MOV RDX,qword ptr [RAX + 0x68]
SUB RDX,0x1
AND RCX,RDX
MOV qword ptr [RAX + 0x70],RCX
LAB_0011a153:
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RSP + 0x88]
CALL 0x00116b20
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x90]
CALL 0x001188f0
MOV RCX,qword ptr [RSP + 0x40]
ADD RCX,0x20
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xc0],RCX
MOV qword ptr [RSP + 0xb8],RAX
MOV dword ptr [RSP + 0xb4],0x3
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP],RAX
MOV EDI,dword ptr [RSP + 0xb4]
MOV ESI,0xffff
CALL 0x00106420
MOV dword ptr [RSP + 0xb0],EAX
MOV EAX,dword ptr [RSP + 0xb4]
MOV dword ptr [RSP + 0xc],EAX
MOV RCX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xa8],RCX
SUB EAX,0x3
JZ 0x0011a207
JMP 0x0011a1eb
LAB_0011a1eb:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x5
JZ 0x0011a218
JMP 0x0011a1f6
LAB_0011a1f6:
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0xa8]
MOV qword ptr [RAX],RCX
JMP 0x0011a227
LAB_0011a207:
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0xa8]
MOV qword ptr [RAX],RCX
JMP 0x0011a227
LAB_0011a218:
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0xa8]
XCHG qword ptr [RCX],RAX
LAB_0011a227:
MOV byte ptr [RSP + 0xa7],0x1
LAB_0011a22f:
MOV AL,byte ptr [RSP + 0xa7]
AND AL,0x1
ADD RSP,0x118
RET
|
/* WARNING: Removing unreachable block (ram,0x0011a1e9) */
/* WARNING: Removing unreachable block (ram,0x0011a1f4) */
/* WARNING: Removing unreachable block (ram,0x0011a0f6) */
/* WARNING: Removing unreachable block (ram,0x0011a101) */
/* WARNING: Removing unreachable block (ram,0x00119f0c) */
/* WARNING: Removing unreachable block (ram,0x00119de3) */
/* WARNING: Removing unreachable block (ram,0x00119dd1) */
/* WARNING: Removing unreachable block (ram,0x00119efa) */
/* WARNING: Removing unreachable block (ram,0x0011a127) */
/* WARNING: Removing unreachable block (ram,0x0011a218) */
/* bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,
emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent&&) */
bool __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::ExplicitProducer::
enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent>
(ExplicitProducer *this,QueuedEvent *param_1)
{
ulong uVar1;
int8 uVar2;
bool bVar3;
ulong uVar4;
Block *this_00;
long lVar5;
QueuedEvent *this_01;
ulong *puVar6;
std::operator&(0);
uVar1 = *(ulong *)(this + 0x20);
if ((uVar1 & 0x1f) == 0) {
if ((*(long *)(this + 0x40) == 0) ||
(bVar3 = Block::
is_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>
(*(Block **)(*(long *)(this + 0x40) + 0x500)), !bVar3)) {
std::operator&(0,0xffff);
bVar3 = details::circular_less_than<unsigned_long>(*(ulong *)(this + 0x28),uVar1 + 0x20);
if (!bVar3) {
return false;
}
if (((*(long *)(this + 0x80) == 0) || (*(long *)(this + 0x60) == *(long *)(this + 0x68))) &&
(uVar4 = new_block_index(this,*(ulong *)(this + 0x60)), (uVar4 & 1) == 0)) {
return false;
}
this_00 = requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>
(*(ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
**)(this + 0x50));
if (this_00 == (Block *)0x0) {
return false;
}
Block::
reset_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>
(this_00);
if (*(long *)(this + 0x40) == 0) {
*(Block **)(this_00 + 0x500) = this_00;
}
else {
*(int8 *)(this_00 + 0x500) = *(int8 *)(*(long *)(this + 0x40) + 0x500);
*(Block **)(*(long *)(this + 0x40) + 0x500) = this_00;
}
*(Block **)(this + 0x40) = this_00;
*(long *)(this + 0x60) = *(long *)(this + 0x60) + 1;
}
else {
*(int8 *)(this + 0x40) = *(int8 *)(*(long *)(this + 0x40) + 0x500);
Block::
reset_empty<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>
(*(Block **)(this + 0x40));
}
lVar5 = std::
atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader*>
::load();
puVar6 = (ulong *)(*(long *)(lVar5 + 0x10) + *(long *)(this + 0x70) * 0x10);
*puVar6 = uVar1;
puVar6[1] = *(ulong *)(this + 0x40);
lVar5 = std::
atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader*>
::load((atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader*>
*)(this + 0x58),0);
uVar2 = *(int8 *)(this + 0x70);
std::operator&(3,0xffff);
*(int8 *)(lVar5 + 8) = uVar2;
*(ulong *)(this + 0x70) = *(long *)(this + 0x70) + 1U & *(long *)(this + 0x68) - 1U;
}
this_01 = (QueuedEvent *)Block::operator[](*(Block **)(this + 0x40),uVar1);
emittra::Emittra::QueuedEvent::QueuedEvent(this_01,param_1);
std::operator&(3,0xffff);
*(ulong *)(this + 0x20) = uVar1 + 1;
return true;
}
|
|
12,239
|
rlglInit
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
|
void rlglInit(int width, int height)
{
// Enable OpenGL debug context if required
#if defined(RLGL_ENABLE_OPENGL_DEBUG_CONTEXT) && defined(GRAPHICS_API_OPENGL_43)
if ((glDebugMessageCallback != NULL) && (glDebugMessageControl != NULL))
{
glDebugMessageCallback(rlDebugMessageCallback, 0);
// glDebugMessageControl(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, GL_DEBUG_SEVERITY_HIGH, 0, 0, GL_TRUE);
// Debug context options:
// - GL_DEBUG_OUTPUT - Faster version but not useful for breakpoints
// - GL_DEBUG_OUTPUT_SYNCHRONUS - Callback is in sync with errors, so a breakpoint can be placed on the callback in order to get a stacktrace for the GL error
glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
#endif
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Init default white texture
unsigned char pixels[4] = { 255, 255, 255, 255 }; // 1 pixel RGBA (4 bytes)
RLGL.State.defaultTextureId = rlLoadTexture(pixels, 1, 1, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, 1);
if (RLGL.State.defaultTextureId != 0) TRACELOG(RL_LOG_INFO, "TEXTURE: [ID %i] Default texture loaded successfully", RLGL.State.defaultTextureId);
else TRACELOG(RL_LOG_WARNING, "TEXTURE: Failed to load default texture");
// Init default Shader (customized for GL 3.3 and ES2)
// Loaded: RLGL.State.defaultShaderId + RLGL.State.defaultShaderLocs
rlLoadShaderDefault();
RLGL.State.currentShaderId = RLGL.State.defaultShaderId;
RLGL.State.currentShaderLocs = RLGL.State.defaultShaderLocs;
// Init default vertex arrays buffers
// Simulate that the default shader has the location RL_SHADER_LOC_VERTEX_NORMAL to bind the normal buffer for the default render batch
RLGL.State.currentShaderLocs[RL_SHADER_LOC_VERTEX_NORMAL] = RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL;
RLGL.defaultBatch = rlLoadRenderBatch(RL_DEFAULT_BATCH_BUFFERS, RL_DEFAULT_BATCH_BUFFER_ELEMENTS);
RLGL.State.currentShaderLocs[RL_SHADER_LOC_VERTEX_NORMAL] = -1;
RLGL.currentBatch = &RLGL.defaultBatch;
// Init stack matrices (emulating OpenGL 1.1)
for (int i = 0; i < RL_MAX_MATRIX_STACK_SIZE; i++) RLGL.State.stack[i] = rlMatrixIdentity();
// Init internal matrices
RLGL.State.transform = rlMatrixIdentity();
RLGL.State.projection = rlMatrixIdentity();
RLGL.State.modelview = rlMatrixIdentity();
RLGL.State.currentMatrix = &RLGL.State.modelview;
#endif // GRAPHICS_API_OPENGL_33 || GRAPHICS_API_OPENGL_ES2
// Initialize OpenGL default states
//----------------------------------------------------------
// Init state: Depth test
glDepthFunc(GL_LEQUAL); // Type of depth testing to apply
glDisable(GL_DEPTH_TEST); // Disable depth testing for 2D (only used for 3D)
// Init state: Blending mode
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Color blending function (how colors are mixed)
glEnable(GL_BLEND); // Enable color blending (required to work with transparencies)
// Init state: Culling
// NOTE: All shapes/models triangles are drawn CCW
glCullFace(GL_BACK); // Cull the back face (default)
glFrontFace(GL_CCW); // Front face are defined counter clockwise (default)
glEnable(GL_CULL_FACE); // Enable backface culling
// Init state: Cubemap seamless
#if defined(GRAPHICS_API_OPENGL_33)
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); // Seamless cubemaps (not supported on OpenGL ES 2.0)
#endif
#if defined(GRAPHICS_API_OPENGL_11)
// Init state: Color hints (deprecated in OpenGL 3.0+)
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Improve quality of color and texture coordinate interpolation
glShadeModel(GL_SMOOTH); // Smooth shading between vertex (vertex colors interpolation)
#endif
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Store screen size into global variables
RLGL.State.framebufferWidth = width;
RLGL.State.framebufferHeight = height;
TRACELOG(RL_LOG_INFO, "RLGL: Default OpenGL state initialized successfully");
//----------------------------------------------------------
#endif
// Init state: Color/Depth buffers clear
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set clear color (black)
glClearDepth(1.0f); // Set clear depth value (default)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear color and depth buffers (depth buffer required for 3D)
}
|
O0
|
c
|
rlglInit:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl 0xfff2d(%rip), %eax # 0x1b3384
movl %eax, -0xc(%rbp)
leaq -0xc(%rbp), %rdi
movl $0x1, %r8d
movl $0x7, %ecx
movl %r8d, %esi
movl %r8d, %edx
callq 0xb36f0
movl %eax, 0x167676(%rip) # 0x21aaf0
cmpl $0x0, 0x16766f(%rip) # 0x21aaf0
je 0xb349e
movl 0x167667(%rip), %edx # 0x21aaf0
movl $0x3, %edi
leaq 0x1010f9(%rip), %rsi # 0x1b458e
movb $0x0, %al
callq 0x182c40
jmp 0xb34b1
movl $0x4, %edi
leaq 0x101119(%rip), %rsi # 0x1b45c3
movb $0x0, %al
callq 0x182c40
callq 0xb3b20
movl 0x167650(%rip), %eax # 0x21ab0c
movl %eax, 0x167656(%rip) # 0x21ab18
movq 0x167647(%rip), %rax # 0x21ab10
movq %rax, 0x167650(%rip) # 0x21ab20
movq 0x167649(%rip), %rax # 0x21ab20
movl $0x2, 0xc(%rax)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
movl $0x2000, %edx # imm = 0x2000
callq 0xb3cd0
movq -0x30(%rbp), %rax
movq %rax, 0x166ce4(%rip) # 0x21a1e0
movq -0x28(%rbp), %rax
movq %rax, 0x166ce1(%rip) # 0x21a1e8
movq -0x20(%rbp), %rax
movq %rax, 0x166cde(%rip) # 0x21a1f0
movq -0x18(%rbp), %rax
movq %rax, 0x166cdb(%rip) # 0x21a1f8
movq 0x1675fc(%rip), %rax # 0x21ab20
movl $0xffffffff, 0xc(%rax) # imm = 0xFFFFFFFF
leaq 0x166ca6(%rip), %rax # 0x21a1d8
addq $0x8, %rax
movq %rax, 0x166c9b(%rip) # 0x21a1d8
movl $0x0, -0x34(%rbp)
cmpl $0x20, -0x34(%rbp)
jge 0xb3596
movslq -0x34(%rbp), %rcx
leaq 0x166c83(%rip), %rax # 0x21a1d8
addq $0x28, %rax
addq $0xec, %rax
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
leaq -0x74(%rbp), %rdi
callq 0xaf680
movq -0x140(%rbp), %rdi
leaq -0x74(%rbp), %rsi
movl $0x40, %edx
callq 0xa400
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xb3544
leaq -0xb4(%rbp), %rdi
callq 0xaf680
leaq 0x166c2f(%rip), %rdi # 0x21a1d8
addq $0x28, %rdi
addq $0xa8, %rdi
leaq -0xb4(%rbp), %rsi
movl $0x40, %edx
callq 0xa400
leaq -0xf4(%rbp), %rdi
callq 0xaf680
leaq 0x166c00(%rip), %rdi # 0x21a1d8
addq $0x28, %rdi
addq $0x68, %rdi
leaq -0xf4(%rbp), %rsi
movl $0x40, %edx
callq 0xa400
leaq -0x134(%rbp), %rdi
callq 0xaf680
leaq 0x166bd4(%rip), %rdi # 0x21a1d8
addq $0x28, %rdi
addq $0x28, %rdi
leaq -0x134(%rbp), %rsi
movl $0x40, %edx
callq 0xa400
leaq 0x166bb4(%rip), %rax # 0x21a1d8
addq $0x28, %rax
addq $0x28, %rax
movq %rax, 0x166bed(%rip) # 0x21a220
movl $0x203, %edi # imm = 0x203
callq *0x16516a(%rip) # 0x2187a8
movl $0xb71, %edi # imm = 0xB71
callq *0x1651a7(%rip) # 0x2187f0
movl $0x302, %edi # imm = 0x302
movl $0x303, %esi # imm = 0x303
callq *0x164d87(%rip) # 0x2183e0
movl $0xbe2, %edi # imm = 0xBE2
callq *0x16528c(%rip) # 0x2188f0
movl $0x405, %edi # imm = 0x405
callq *0x165069(%rip) # 0x2186d8
movl $0x901, %edi # imm = 0x901
callq *0x1653ce(%rip) # 0x218a48
movl $0xb44, %edi # imm = 0xB44
callq *0x16526b(%rip) # 0x2188f0
movl $0x884f, %edi # imm = 0x884F
callq *0x165260(%rip) # 0x2188f0
movl -0x4(%rbp), %eax
movl %eax, 0x1675bf(%rip) # 0x21ac58
movl -0x8(%rbp), %eax
movl %eax, 0x1675ba(%rip) # 0x21ac5c
movl $0x3, %edi
leaq 0x100f3d(%rip), %rsi # 0x1b45eb
movb $0x0, %al
callq 0x182c40
xorps %xmm2, %xmm2
movss 0xf0a34(%rip), %xmm3 # 0x1a40f4
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq *0x164dec(%rip) # 0x2184b8
movsd 0xf49a4(%rip), %xmm0 # 0x1a8078
callq *0x164dee(%rip) # 0x2184c8
movl $0x4100, %edi # imm = 0x4100
callq *0x164d93(%rip) # 0x218478
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
nop
|
rlglInit:
push rbp
mov rbp, rsp
sub rsp, 140h
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov eax, cs:dword_1B3384
mov [rbp+var_C], eax
lea rdi, [rbp+var_C]
mov r8d, 1
mov ecx, 7
mov esi, r8d
mov edx, r8d
call rlLoadTexture
mov cs:dword_21AAF0, eax
cmp cs:dword_21AAF0, 0
jz short loc_B349E
mov edx, cs:dword_21AAF0
mov edi, 3
lea rsi, aTextureIdIDefa; "TEXTURE: [ID %i] Default texture loaded"...
mov al, 0
call TraceLog
jmp short loc_B34B1
loc_B349E:
mov edi, 4
lea rsi, aTextureFailedT; "TEXTURE: Failed to load default texture"
mov al, 0
call TraceLog
loc_B34B1:
call rlLoadShaderDefault
mov eax, cs:dword_21AB0C
mov cs:dword_21AB18, eax
mov rax, cs:qword_21AB10
mov cs:qword_21AB20, rax
mov rax, cs:qword_21AB20
mov dword ptr [rax+0Ch], 2
lea rdi, [rbp+var_30]
mov esi, 1
mov edx, 2000h
call rlLoadRenderBatch
mov rax, [rbp+var_30]
mov cs:qword_21A1E0, rax
mov rax, [rbp+var_28]
mov cs:qword_21A1E8, rax
mov rax, [rbp+var_20]
mov cs:qword_21A1F0, rax
mov rax, [rbp+var_18]
mov cs:qword_21A1F8, rax
mov rax, cs:qword_21AB20
mov dword ptr [rax+0Ch], 0FFFFFFFFh
lea rax, RLGL
add rax, 8
mov cs:RLGL, rax
mov [rbp+var_34], 0
loc_B3544:
cmp [rbp+var_34], 20h ; ' '
jge short loc_B3596
movsxd rcx, [rbp+var_34]
lea rax, RLGL
add rax, 28h ; '('
add rax, 0ECh
shl rcx, 6
add rax, rcx
mov [rbp+var_140], rax
lea rdi, [rbp+var_74]
call rlMatrixIdentity
mov rdi, [rbp+var_140]
lea rsi, [rbp+var_74]
mov edx, 40h ; '@'
call _memcpy
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp short loc_B3544
loc_B3596:
lea rdi, [rbp+var_B4]
call rlMatrixIdentity
lea rdi, RLGL
add rdi, 28h ; '('
add rdi, 0A8h
lea rsi, [rbp+var_B4]
mov edx, 40h ; '@'
call _memcpy
lea rdi, [rbp+var_F4]
call rlMatrixIdentity
lea rdi, RLGL
add rdi, 28h ; '('
add rdi, 68h ; 'h'
lea rsi, [rbp+var_F4]
mov edx, 40h ; '@'
call _memcpy
lea rdi, [rbp+var_134]
call rlMatrixIdentity
lea rdi, RLGL
add rdi, 28h ; '('
add rdi, 28h ; '('
lea rsi, [rbp+var_134]
mov edx, 40h ; '@'
call _memcpy
lea rax, RLGL
add rax, 28h ; '('
add rax, 28h ; '('
mov cs:qword_21A220, rax
mov edi, 203h
call cs:glad_glDepthFunc
mov edi, 0B71h
call cs:glad_glDisable
mov edi, 302h
mov esi, 303h
call cs:glad_glBlendFunc
mov edi, 0BE2h
call cs:glad_glEnable
mov edi, 405h
call cs:glad_glCullFace
mov edi, 901h
call cs:glad_glFrontFace
mov edi, 0B44h
call cs:glad_glEnable
mov edi, 884Fh
call cs:glad_glEnable
mov eax, [rbp+var_4]
mov cs:dword_21AC58, eax
mov eax, [rbp+var_8]
mov cs:dword_21AC5C, eax
mov edi, 3
lea rsi, aRlglDefaultOpe; "RLGL: Default OpenGL state initialized "...
mov al, 0
call TraceLog
xorps xmm2, xmm2
movss xmm3, cs:dword_1A40F4
movaps xmm0, xmm2
movaps xmm1, xmm2
call cs:glad_glClearColor
movsd xmm0, cs:qword_1A8078
call cs:glad_glClearDepth
mov edi, 4100h
call cs:glad_glClear
add rsp, 140h
pop rbp
retn
|
long long rlglInit(int a1, int 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
char *v11; // [rsp+0h] [rbp-140h]
_DWORD v12[16]; // [rsp+Ch] [rbp-134h] BYREF
_DWORD v13[16]; // [rsp+4Ch] [rbp-F4h] BYREF
_DWORD v14[16]; // [rsp+8Ch] [rbp-B4h] BYREF
_DWORD v15[16]; // [rsp+CCh] [rbp-74h] BYREF
int i; // [rsp+10Ch] [rbp-34h]
_QWORD v17[4]; // [rsp+110h] [rbp-30h] BYREF
int v18; // [rsp+134h] [rbp-Ch] BYREF
int v19; // [rsp+138h] [rbp-8h]
int v20; // [rsp+13Ch] [rbp-4h]
v20 = a1;
v19 = a2;
v18 = -1;
dword_21AAF0 = rlLoadTexture(&v18, 1LL, 1LL, 7LL);
if ( dword_21AAF0 )
TraceLog(3, (unsigned int)"TEXTURE: [ID %i] Default texture loaded successfully", dword_21AAF0, v3, v4, v5);
else
TraceLog(4, (unsigned int)"TEXTURE: Failed to load default texture", v2, v3, v4, v5);
rlLoadShaderDefault();
dword_21AB18 = dword_21AB0C;
qword_21AB20 = qword_21AB10;
*(_DWORD *)(qword_21AB10 + 12) = 2;
rlLoadRenderBatch(v17, 1LL, 0x2000LL);
qword_21A1E0 = v17[0];
qword_21A1E8 = v17[1];
qword_21A1F0 = v17[2];
qword_21A1F8 = v17[3];
*(_DWORD *)(qword_21AB20 + 12) = -1;
RLGL[0] = (long long)&RLGL[1];
for ( i = 0; i < 32; ++i )
{
v11 = (char *)&RLGL[8 * (long long)i + 34] + 4;
rlMatrixIdentity(v15);
memcpy(v11, v15, 64LL);
}
rlMatrixIdentity(v14);
memcpy(&RLGL[26], v14, 64LL);
rlMatrixIdentity(v13);
memcpy(&RLGL[18], v13, 64LL);
rlMatrixIdentity(v12);
memcpy(&RLGL[10], v12, 64LL);
qword_21A220 = (long long)&RLGL[10];
glad_glDepthFunc(515LL);
glad_glDisable(2929LL);
glad_glBlendFunc(770LL, 771LL);
glad_glEnable(3042LL);
glad_glCullFace(1029LL);
glad_glFrontFace(2305LL);
glad_glEnable(2884LL);
glad_glEnable(34895LL);
dword_21AC58 = v20;
dword_21AC5C = v19;
TraceLog(3, (unsigned int)"RLGL: Default OpenGL state initialized successfully", v6, v7, v8, v9);
glad_glClearColor(0.0, 0.0, 0.0, 1.0);
glad_glClearDepth(1.0);
return glad_glClear(16640LL);
}
|
rlglInit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV EAX,dword ptr [0x002b3384]
MOV dword ptr [RBP + -0xc],EAX
LEA RDI,[RBP + -0xc]
MOV R8D,0x1
MOV ECX,0x7
MOV ESI,R8D
MOV EDX,R8D
CALL 0x001b36f0
MOV dword ptr [0x0031aaf0],EAX
CMP dword ptr [0x0031aaf0],0x0
JZ 0x001b349e
MOV EDX,dword ptr [0x0031aaf0]
MOV EDI,0x3
LEA RSI,[0x2b458e]
MOV AL,0x0
CALL 0x00282c40
JMP 0x001b34b1
LAB_001b349e:
MOV EDI,0x4
LEA RSI,[0x2b45c3]
MOV AL,0x0
CALL 0x00282c40
LAB_001b34b1:
CALL 0x001b3b20
MOV EAX,dword ptr [0x0031ab0c]
MOV dword ptr [0x0031ab18],EAX
MOV RAX,qword ptr [0x0031ab10]
MOV qword ptr [0x0031ab20],RAX
MOV RAX,qword ptr [0x0031ab20]
MOV dword ptr [RAX + 0xc],0x2
LEA RDI,[RBP + -0x30]
MOV ESI,0x1
MOV EDX,0x2000
CALL 0x001b3cd0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [0x0031a1e0],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [0x0031a1e8],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [0x0031a1f0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [0x0031a1f8],RAX
MOV RAX,qword ptr [0x0031ab20]
MOV dword ptr [RAX + 0xc],0xffffffff
LEA RAX,[0x31a1d8]
ADD RAX,0x8
MOV qword ptr [0x0031a1d8],RAX
MOV dword ptr [RBP + -0x34],0x0
LAB_001b3544:
CMP dword ptr [RBP + -0x34],0x20
JGE 0x001b3596
MOVSXD RCX,dword ptr [RBP + -0x34]
LEA RAX,[0x31a1d8]
ADD RAX,0x28
ADD RAX,0xec
SHL RCX,0x6
ADD RAX,RCX
MOV qword ptr [RBP + -0x140],RAX
LEA RDI,[RBP + -0x74]
CALL 0x001af680
MOV RDI,qword ptr [RBP + -0x140]
LEA RSI,[RBP + -0x74]
MOV EDX,0x40
CALL 0x0010a400
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001b3544
LAB_001b3596:
LEA RDI,[RBP + -0xb4]
CALL 0x001af680
LEA RDI,[0x31a1d8]
ADD RDI,0x28
ADD RDI,0xa8
LEA RSI,[RBP + -0xb4]
MOV EDX,0x40
CALL 0x0010a400
LEA RDI,[RBP + -0xf4]
CALL 0x001af680
LEA RDI,[0x31a1d8]
ADD RDI,0x28
ADD RDI,0x68
LEA RSI,[RBP + -0xf4]
MOV EDX,0x40
CALL 0x0010a400
LEA RDI,[RBP + -0x134]
CALL 0x001af680
LEA RDI,[0x31a1d8]
ADD RDI,0x28
ADD RDI,0x28
LEA RSI,[RBP + -0x134]
MOV EDX,0x40
CALL 0x0010a400
LEA RAX,[0x31a1d8]
ADD RAX,0x28
ADD RAX,0x28
MOV qword ptr [0x0031a220],RAX
MOV EDI,0x203
CALL qword ptr [0x003187a8]
MOV EDI,0xb71
CALL qword ptr [0x003187f0]
MOV EDI,0x302
MOV ESI,0x303
CALL qword ptr [0x003183e0]
MOV EDI,0xbe2
CALL qword ptr [0x003188f0]
MOV EDI,0x405
CALL qword ptr [0x003186d8]
MOV EDI,0x901
CALL qword ptr [0x00318a48]
MOV EDI,0xb44
CALL qword ptr [0x003188f0]
MOV EDI,0x884f
CALL qword ptr [0x003188f0]
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [0x0031ac58],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [0x0031ac5c],EAX
MOV EDI,0x3
LEA RSI,[0x2b45eb]
MOV AL,0x0
CALL 0x00282c40
XORPS XMM2,XMM2
MOVSS XMM3,dword ptr [0x002a40f4]
MOVAPS XMM0,XMM2
MOVAPS XMM1,XMM2
CALL qword ptr [0x003184b8]
MOVSD XMM0,qword ptr [0x002a8078]
CALL qword ptr [0x003184c8]
MOV EDI,0x4100
CALL qword ptr [0x00318478]
ADD RSP,0x140
POP RBP
RET
|
void rlglInit(int4 param_1,int4 param_2)
{
long lVar1;
int1 local_13c [64];
int1 local_fc [64];
int1 local_bc [64];
int1 local_7c [64];
int local_3c;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = DAT_002b3384;
local_10 = param_2;
local_c = param_1;
DAT_0031aaf0 = rlLoadTexture(&local_14,1,1,7);
if (DAT_0031aaf0 == 0) {
TraceLog(4,"TEXTURE: Failed to load default texture");
}
else {
TraceLog(3,"TEXTURE: [ID %i] Default texture loaded successfully",DAT_0031aaf0);
}
rlLoadShaderDefault();
DAT_0031ab18 = DAT_0031ab0c;
DAT_0031ab20 = DAT_0031ab10;
*(int4 *)(DAT_0031ab10 + 0xc) = 2;
rlLoadRenderBatch(&local_38,1,0x2000);
DAT_0031a1e0 = local_38;
DAT_0031a1e8 = local_30;
DAT_0031a1f0 = local_28;
DAT_0031a1f8 = local_20;
*(int4 *)(DAT_0031ab20 + 0xc) = 0xffffffff;
RLGL = &DAT_0031a1e0;
for (local_3c = 0; local_3c < 0x20; local_3c = local_3c + 1) {
lVar1 = (long)local_3c;
rlMatrixIdentity(local_7c);
memcpy((void *)(lVar1 * 0x40 + 0x31a2ec),local_7c,0x40);
}
rlMatrixIdentity(local_bc);
memcpy(&DAT_0031a2a8,local_bc,0x40);
rlMatrixIdentity(local_fc);
memcpy(&DAT_0031a268,local_fc,0x40);
rlMatrixIdentity(local_13c);
memcpy(&DAT_0031a228,local_13c,0x40);
DAT_0031a220 = &DAT_0031a228;
(*glad_glDepthFunc)(0x203);
(*glad_glDisable)(0xb71);
(*glad_glBlendFunc)(0x302,0x303);
(*glad_glEnable)(0xbe2);
(*glad_glCullFace)(0x405);
(*glad_glFrontFace)(0x901);
(*glad_glEnable)(0xb44);
(*glad_glEnable)(0x884f);
DAT_0031ac58 = local_c;
DAT_0031ac5c = local_10;
TraceLog(3,"RLGL: Default OpenGL state initialized successfully");
(*glad_glClearColor)(0,0,0,DAT_002a40f4);
(*glad_glClearDepth)(DAT_002a8078);
(*glad_glClear)(0x4100);
return;
}
|
|
12,240
|
rlglInit
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
|
void rlglInit(int width, int height)
{
// Enable OpenGL debug context if required
#if defined(RLGL_ENABLE_OPENGL_DEBUG_CONTEXT) && defined(GRAPHICS_API_OPENGL_43)
if ((glDebugMessageCallback != NULL) && (glDebugMessageControl != NULL))
{
glDebugMessageCallback(rlDebugMessageCallback, 0);
// glDebugMessageControl(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, GL_DEBUG_SEVERITY_HIGH, 0, 0, GL_TRUE);
// Debug context options:
// - GL_DEBUG_OUTPUT - Faster version but not useful for breakpoints
// - GL_DEBUG_OUTPUT_SYNCHRONUS - Callback is in sync with errors, so a breakpoint can be placed on the callback in order to get a stacktrace for the GL error
glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
#endif
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Init default white texture
unsigned char pixels[4] = { 255, 255, 255, 255 }; // 1 pixel RGBA (4 bytes)
RLGL.State.defaultTextureId = rlLoadTexture(pixels, 1, 1, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, 1);
if (RLGL.State.defaultTextureId != 0) TRACELOG(RL_LOG_INFO, "TEXTURE: [ID %i] Default texture loaded successfully", RLGL.State.defaultTextureId);
else TRACELOG(RL_LOG_WARNING, "TEXTURE: Failed to load default texture");
// Init default Shader (customized for GL 3.3 and ES2)
// Loaded: RLGL.State.defaultShaderId + RLGL.State.defaultShaderLocs
rlLoadShaderDefault();
RLGL.State.currentShaderId = RLGL.State.defaultShaderId;
RLGL.State.currentShaderLocs = RLGL.State.defaultShaderLocs;
// Init default vertex arrays buffers
// Simulate that the default shader has the location RL_SHADER_LOC_VERTEX_NORMAL to bind the normal buffer for the default render batch
RLGL.State.currentShaderLocs[RL_SHADER_LOC_VERTEX_NORMAL] = RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL;
RLGL.defaultBatch = rlLoadRenderBatch(RL_DEFAULT_BATCH_BUFFERS, RL_DEFAULT_BATCH_BUFFER_ELEMENTS);
RLGL.State.currentShaderLocs[RL_SHADER_LOC_VERTEX_NORMAL] = -1;
RLGL.currentBatch = &RLGL.defaultBatch;
// Init stack matrices (emulating OpenGL 1.1)
for (int i = 0; i < RL_MAX_MATRIX_STACK_SIZE; i++) RLGL.State.stack[i] = rlMatrixIdentity();
// Init internal matrices
RLGL.State.transform = rlMatrixIdentity();
RLGL.State.projection = rlMatrixIdentity();
RLGL.State.modelview = rlMatrixIdentity();
RLGL.State.currentMatrix = &RLGL.State.modelview;
#endif // GRAPHICS_API_OPENGL_33 || GRAPHICS_API_OPENGL_ES2
// Initialize OpenGL default states
//----------------------------------------------------------
// Init state: Depth test
glDepthFunc(GL_LEQUAL); // Type of depth testing to apply
glDisable(GL_DEPTH_TEST); // Disable depth testing for 2D (only used for 3D)
// Init state: Blending mode
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Color blending function (how colors are mixed)
glEnable(GL_BLEND); // Enable color blending (required to work with transparencies)
// Init state: Culling
// NOTE: All shapes/models triangles are drawn CCW
glCullFace(GL_BACK); // Cull the back face (default)
glFrontFace(GL_CCW); // Front face are defined counter clockwise (default)
glEnable(GL_CULL_FACE); // Enable backface culling
// Init state: Cubemap seamless
#if defined(GRAPHICS_API_OPENGL_33)
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); // Seamless cubemaps (not supported on OpenGL ES 2.0)
#endif
#if defined(GRAPHICS_API_OPENGL_11)
// Init state: Color hints (deprecated in OpenGL 3.0+)
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Improve quality of color and texture coordinate interpolation
glShadeModel(GL_SMOOTH); // Smooth shading between vertex (vertex colors interpolation)
#endif
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Store screen size into global variables
RLGL.State.framebufferWidth = width;
RLGL.State.framebufferHeight = height;
TRACELOG(RL_LOG_INFO, "RLGL: Default OpenGL state initialized successfully");
//----------------------------------------------------------
#endif
// Init state: Color/Depth buffers clear
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set clear color (black)
glClearDepth(1.0f); // Set clear depth value (default)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear color and depth buffers (depth buffer required for 3D)
}
|
O1
|
c
|
rlglInit:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0xc(%rsp), %rdi
movl $0xffffffff, (%rdi) # imm = 0xFFFFFFFF
movl $0x1, %esi
movl $0x1, %edx
movl $0x7, %ecx
movl $0x1, %r8d
callq 0x64d8d
movl %eax, 0xdd020(%rip) # 0x141a20
testl %eax, %eax
je 0x64a1b
leaq 0x800ab(%rip), %rsi # 0xe4ab6
movl $0x3, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0xbfa73
jmp 0x64a2e
leaq 0x800c9(%rip), %rsi # 0xe4aeb
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfa73
movl $0x20, %edi
movl $0x4, %esi
callq 0x9330
movq %rax, 0xdcffc(%rip) # 0x141a40
xorl %eax, %eax
movq 0xdcff3(%rip), %rcx # 0x141a40
movl $0xffffffff, (%rcx,%rax,4) # imm = 0xFFFFFFFF
incq %rax
cmpq $0x20, %rax
jne 0x64a46
leaq 0x87745(%rip), %rdi # 0xec1a9
movl $0x8b31, %esi # imm = 0x8B31
callq 0x66b65
movl %eax, 0xdcfc0(%rip) # 0x141a34
leaq 0x87911(%rip), %rdi # 0xec38c
movl $0x8b30, %esi # imm = 0x8B30
callq 0x66b65
movl %eax, 0xdcfad(%rip) # 0x141a38
movl 0xdcfa3(%rip), %edi # 0x141a34
movl %eax, %esi
callq 0x66ccf
movl %eax, 0xdcf9e(%rip) # 0x141a3c
testl %eax, %eax
je 0x64b6a
leaq 0x87a88(%rip), %rsi # 0xec535
movl $0x3, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0xbfa73
movl 0xdcf7b(%rip), %edi # 0x141a3c
leaq 0x80a5b(%rip), %rsi # 0xe5523
callq *0xdafb2(%rip) # 0x13fa80
movq 0xdcf6b(%rip), %rcx # 0x141a40
movl %eax, (%rcx)
movl 0xdcf5f(%rip), %edi # 0x141a3c
leaq 0x80a4e(%rip), %rsi # 0xe5532
callq *0xdaf96(%rip) # 0x13fa80
movq 0xdcf4f(%rip), %rcx # 0x141a40
movl %eax, 0x4(%rcx)
movl 0xdcf42(%rip), %edi # 0x141a3c
leaq 0x80a4d(%rip), %rsi # 0xe554e
callq *0xdaf79(%rip) # 0x13fa80
movq 0xdcf32(%rip), %rcx # 0x141a40
movl %eax, 0x14(%rcx)
movl 0xdcf25(%rip), %edi # 0x141a3c
leaq 0x8150c(%rip), %rsi # 0xe602a
callq *0xdb36c(%rip) # 0x13fe90
movq 0xdcf15(%rip), %rcx # 0x141a40
movl %eax, 0x18(%rcx)
movl 0xdcf08(%rip), %edi # 0x141a3c
leaq 0x81529(%rip), %rsi # 0xe6064
callq *0xdb34f(%rip) # 0x13fe90
movq 0xdcef8(%rip), %rcx # 0x141a40
movl %eax, 0x30(%rcx)
movl 0xdceeb(%rip), %edi # 0x141a3c
leaq 0x81517(%rip), %rsi # 0xe606f
callq *0xdb332(%rip) # 0x13fe90
movq 0xdcedb(%rip), %rcx # 0x141a40
movl %eax, 0x3c(%rcx)
jmp 0x64b7f
leaq 0x879f7(%rip), %rsi # 0xec568
movl $0x4, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0xbfa73
movl 0xdceb7(%rip), %eax # 0x141a3c
movl %eax, 0xdcebd(%rip) # 0x141a48
movq 0xdceae(%rip), %rax # 0x141a40
movq %rax, 0xdceb7(%rip) # 0x141a50
movl $0x2, 0xc(%rax)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x1, %esi
movl $0x2000, %edx # imm = 0x2000
callq 0x650ab
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0xdc559(%rip) # 0x141120
movups %xmm0, 0xdc542(%rip) # 0x141110
leaq 0xdc53b(%rip), %rax # 0x141110
movq 0xdce74(%rip), %rcx # 0x141a50
movl $0xffffffff, 0xc(%rcx) # imm = 0xFFFFFFFF
movq %rax, 0xdc51e(%rip) # 0x141108
xorl %eax, %eax
leaq 0xdc515(%rip), %rcx # 0x141108
movl $0x3f800000, %edx # imm = 0x3F800000
xorps %xmm0, %xmm0
movl %edx, 0x114(%rax,%rcx)
movups %xmm0, 0x118(%rax,%rcx)
movl %edx, 0x128(%rax,%rcx)
movups %xmm0, 0x12c(%rax,%rcx)
movl %edx, 0x13c(%rax,%rcx)
movups %xmm0, 0x140(%rax,%rcx)
movl %edx, 0x150(%rax,%rcx)
addq $0x40, %rax
cmpq $0x800, %rax # imm = 0x800
jne 0x64bfb
xorps %xmm0, %xmm0
movups %xmm0, 0xdc597(%rip) # 0x1411dc
movl $0x3f800000, %eax # imm = 0x3F800000
movl %eax, 0xdc59c(%rip) # 0x1411ec
movups %xmm0, 0xdc599(%rip) # 0x1411f0
movl %eax, 0xdc5a3(%rip) # 0x141200
movups %xmm0, 0xdc5a0(%rip) # 0x141204
movl %eax, 0xdc5aa(%rip) # 0x141214
movups %xmm0, 0xdc52b(%rip) # 0x14119c
movl %eax, 0xdc535(%rip) # 0x1411ac
movups %xmm0, 0xdc532(%rip) # 0x1411b0
movl %eax, 0xdc53c(%rip) # 0x1411c0
movups %xmm0, 0xdc539(%rip) # 0x1411c4
movabsq $0x3f8000003f800000, %rcx # imm = 0x3F8000003F800000
movq %rcx, 0xdc538(%rip) # 0x1411d4
movl %eax, 0xdc4b6(%rip) # 0x141158
leaq 0xdc4af(%rip), %rdx # 0x141158
movups %xmm0, 0xdc4ac(%rip) # 0x14115c
movl %eax, 0xdc4b6(%rip) # 0x14116c
movups %xmm0, 0xdc4b3(%rip) # 0x141170
movl %eax, 0xdc4bd(%rip) # 0x141180
movups %xmm0, 0xdc4ba(%rip) # 0x141184
movq %rcx, 0xdc4c3(%rip) # 0x141194
movq %rdx, 0xdc478(%rip) # 0x141150
movl $0x203, %edi # imm = 0x203
callq *0xda9f5(%rip) # 0x13f6d8
movl $0xb71, %edi # imm = 0xB71
callq *0xdaa32(%rip) # 0x13f720
movl $0x302, %edi # imm = 0x302
movl $0x303, %esi # imm = 0x303
callq *0xda612(%rip) # 0x13f310
movl $0xbe2, %edi # imm = 0xBE2
callq *0xdab17(%rip) # 0x13f820
movl $0x405, %edi # imm = 0x405
callq *0xda8f4(%rip) # 0x13f608
movl $0x901, %edi # imm = 0x901
callq *0xdac59(%rip) # 0x13f978
movl $0xb44, %edi # imm = 0xB44
callq *0xdaaf6(%rip) # 0x13f820
movl $0x884f, %edi # imm = 0x884F
callq *0xdaaeb(%rip) # 0x13f820
movl %ebp, 0xdce4d(%rip) # 0x141b88
movl %ebx, 0xdce4b(%rip) # 0x141b8c
leaq 0x7fdcb(%rip), %rsi # 0xe4b13
movl $0x3, %edi
xorl %eax, %eax
callq 0xbfa73
movss 0x74be8(%rip), %xmm3 # 0xd9944
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq *0xda67d(%rip) # 0x13f3e8
movsd 0x74d45(%rip), %xmm0 # 0xd9ab8
callq *0xda67f(%rip) # 0x13f3f8
movl $0x4100, %edi # imm = 0x4100
callq *0xda624(%rip) # 0x13f3a8
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
|
rlglInit:
push rbp
push r14
push rbx
sub rsp, 30h
mov ebx, esi
mov ebp, edi
lea rdi, [rsp+48h+var_3C]
mov dword ptr [rdi], 0FFFFFFFFh
mov esi, 1
mov edx, 1
mov ecx, 7
mov r8d, 1
call rlLoadTexture
mov cs:dword_141A20, eax
test eax, eax
jz short loc_64A1B
lea rsi, aTextureIdIDefa; "TEXTURE: [ID %i] Default texture loaded"...
mov edi, 3
mov edx, eax
xor eax, eax
call TraceLog
jmp short loc_64A2E
loc_64A1B:
lea rsi, aTextureFailedT; "TEXTURE: Failed to load default texture"
mov edi, 4
xor eax, eax
call TraceLog
loc_64A2E:
mov edi, 20h ; ' '
mov esi, 4
call _calloc
mov cs:qword_141A40, rax
xor eax, eax
loc_64A46:
mov rcx, cs:qword_141A40
mov dword ptr [rcx+rax*4], 0FFFFFFFFh
inc rax
cmp rax, 20h ; ' '
jnz short loc_64A46
lea rdi, aVersion330InVe; "#version 330 \nin"...
mov esi, 8B31h
call rlCompileShader
mov cs:dword_141A34, eax
lea rdi, aVersion330InVe_0; "#version 330 \nin vec2 fragTexCoo"...
mov esi, 8B30h
call rlCompileShader
mov cs:dword_141A38, eax
mov edi, cs:dword_141A34
mov esi, eax
call rlLoadShaderProgram
mov cs:dword_141A3C, eax
test eax, eax
jz loc_64B6A
lea rsi, aShaderIdIDefau; "SHADER: [ID %i] Default shader loaded s"...
mov edi, 3
mov edx, eax
xor eax, eax
call TraceLog
mov edi, cs:dword_141A3C
lea rsi, aVertexposition; "vertexPosition"
call cs:glad_glGetAttribLocation
mov rcx, cs:qword_141A40
mov [rcx], eax
mov edi, cs:dword_141A3C
lea rsi, aVertextexcoord; "vertexTexCoord"
call cs:glad_glGetAttribLocation
mov rcx, cs:qword_141A40
mov [rcx+4], eax
mov edi, cs:dword_141A3C
lea rsi, aVertexcolor; "vertexColor"
call cs:glad_glGetAttribLocation
mov rcx, cs:qword_141A40
mov [rcx+14h], eax
mov edi, cs:dword_141A3C
lea rsi, aMvp; "mvp"
call cs:glad_glGetUniformLocation
mov rcx, cs:qword_141A40
mov [rcx+18h], eax
mov edi, cs:dword_141A3C
lea rsi, aColdiffuse; "colDiffuse"
call cs:glad_glGetUniformLocation
mov rcx, cs:qword_141A40
mov [rcx+30h], eax
mov edi, cs:dword_141A3C
lea rsi, aTexture0; "texture0"
call cs:glad_glGetUniformLocation
mov rcx, cs:qword_141A40
mov [rcx+3Ch], eax
jmp short loc_64B7F
loc_64B6A:
lea rsi, aShaderIdIFaile; "SHADER: [ID %i] Failed to load default "...
mov edi, 4
xor edx, edx
xor eax, eax
call TraceLog
loc_64B7F:
mov eax, cs:dword_141A3C
mov cs:dword_141A48, eax
mov rax, cs:qword_141A40
mov cs:qword_141A50, rax
mov dword ptr [rax+0Ch], 2
lea r14, [rsp+48h+var_38]
mov rdi, r14
mov esi, 1
mov edx, 2000h
call rlLoadRenderBatch
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
movups cs:xmmword_141120, xmm1
movups cs:xmmword_141110, xmm0
lea rax, xmmword_141110
mov rcx, cs:qword_141A50
mov dword ptr [rcx+0Ch], 0FFFFFFFFh
mov cs:RLGL, rax
xor eax, eax
lea rcx, RLGL
mov edx, 3F800000h
xorps xmm0, xmm0
loc_64BFB:
mov [rax+rcx+114h], edx
movups xmmword ptr [rax+rcx+118h], xmm0
mov [rax+rcx+128h], edx
movups xmmword ptr [rax+rcx+12Ch], xmm0
mov [rax+rcx+13Ch], edx
movups xmmword ptr [rax+rcx+140h], xmm0
mov [rax+rcx+150h], edx
add rax, 40h ; '@'
cmp rax, 800h
jnz short loc_64BFB
xorps xmm0, xmm0
movups cs:xmmword_1411D8+4, xmm0
mov eax, 3F800000h
mov dword ptr cs:xmmword_1411E8+4, eax
movups cs:xmmword_1411E8+8, xmm0
mov cs:dword_141200, eax
movups cs:xmmword_141204, xmm0
mov cs:dword_141214, eax
movups cs:xmmword_141198+4, xmm0
mov dword ptr cs:xmmword_1411A8+4, eax
movups cs:xmmword_1411A8+8, xmm0
mov dword ptr cs:xmmword_1411B8+8, eax
movups cs:xmmword_1411B8+0Ch, xmm0
mov rcx, 3F8000003F800000h
mov qword ptr cs:xmmword_1411C8+0Ch, rcx
mov dword ptr cs:xmmword_141158, eax
lea rdx, xmmword_141158
movups cs:xmmword_141158+4, xmm0
mov dword ptr cs:xmmword_141168+4, eax
movups cs:xmmword_141168+8, xmm0
mov dword ptr cs:xmmword_141178+8, eax
movups cs:xmmword_141178+0Ch, xmm0
mov qword ptr cs:xmmword_141188+0Ch, rcx
mov cs:qword_141150, rdx
mov edi, 203h
call cs:glad_glDepthFunc
mov edi, 0B71h
call cs:glad_glDisable
mov edi, 302h
mov esi, 303h
call cs:glad_glBlendFunc
mov edi, 0BE2h
call cs:glad_glEnable
mov edi, 405h
call cs:glad_glCullFace
mov edi, 901h
call cs:glad_glFrontFace
mov edi, 0B44h
call cs:glad_glEnable
mov edi, 884Fh
call cs:glad_glEnable
mov cs:dword_141B88, ebp
mov cs:dword_141B8C, ebx
lea rsi, aRlglDefaultOpe; "RLGL: Default OpenGL state initialized "...
mov edi, 3
xor eax, eax
call TraceLog
movss xmm3, cs:dword_D9944
xorps xmm0, xmm0
xorps xmm1, xmm1
xorps xmm2, xmm2
call cs:glad_glClearColor
movsd xmm0, cs:qword_D9AB8
call cs:glad_glClearDepth
mov edi, 4100h
call cs:glad_glClear
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
|
long long rlglInit(int a1, int a2)
{
int v2; // eax
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long i; // rax
int ShaderProgram; // eax
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long j; // rax
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
int v18; // [rsp+Ch] [rbp-3Ch] BYREF
_OWORD v19[3]; // [rsp+10h] [rbp-38h] BYREF
v18 = -1;
v2 = rlLoadTexture(&v18, 1LL, 1LL, 7LL, 1LL);
dword_141A20 = v2;
if ( v2 )
TraceLog(3, (unsigned int)"TEXTURE: [ID %i] Default texture loaded successfully", v2, v4, v5, v6);
else
TraceLog(4, (unsigned int)"TEXTURE: Failed to load default texture", v3, v4, v5, v6);
qword_141A40 = calloc(32LL, 4LL);
for ( i = 0LL; i != 32; ++i )
*(_DWORD *)(qword_141A40 + 4 * i) = -1;
dword_141A34 = rlCompileShader(
"#version 330 \n"
"in vec3 vertexPosition; \n"
"in vec2 vertexTexCoord; \n"
"in vec4 vertexColor; \n"
"out vec2 fragTexCoord; \n"
"out vec4 fragColor; \n"
"uniform mat4 mvp; \n"
"void main() \n"
"{ \n"
" fragTexCoord = vertexTexCoord; \n"
" fragColor = vertexColor; \n"
" gl_Position = mvp*vec4(vertexPosition, 1.0); \n"
"} \n",
35633LL);
dword_141A38 = rlCompileShader(
"#version 330 \n"
"in vec2 fragTexCoord; \n"
"in vec4 fragColor; \n"
"out vec4 finalColor; \n"
"uniform sampler2D texture0; \n"
"uniform vec4 colDiffuse; \n"
"void main() \n"
"{ \n"
" vec4 texelColor = texture(texture0, fragTexCoord); \n"
" finalColor = texelColor*colDiffuse*fragColor; \n"
"} \n",
35632LL);
ShaderProgram = rlLoadShaderProgram((unsigned int)dword_141A34, (unsigned int)dword_141A38);
dword_141A3C = ShaderProgram;
if ( ShaderProgram )
{
TraceLog(3, (unsigned int)"SHADER: [ID %i] Default shader loaded successfully", ShaderProgram, v9, v10, v11);
*(_DWORD *)qword_141A40 = glad_glGetAttribLocation((unsigned int)dword_141A3C, "vertexPosition");
*(_DWORD *)(qword_141A40 + 4) = glad_glGetAttribLocation((unsigned int)dword_141A3C, "vertexTexCoord");
*(_DWORD *)(qword_141A40 + 20) = glad_glGetAttribLocation((unsigned int)dword_141A3C, "vertexColor");
*(_DWORD *)(qword_141A40 + 24) = glad_glGetUniformLocation((unsigned int)dword_141A3C, "mvp");
*(_DWORD *)(qword_141A40 + 48) = glad_glGetUniformLocation((unsigned int)dword_141A3C, "colDiffuse");
*(_DWORD *)(qword_141A40 + 60) = glad_glGetUniformLocation((unsigned int)dword_141A3C, "texture0");
}
else
{
TraceLog(4, (unsigned int)"SHADER: [ID %i] Failed to load default shader", 0, v9, v10, v11);
}
dword_141A48 = dword_141A3C;
qword_141A50 = qword_141A40;
*(_DWORD *)(qword_141A40 + 12) = 2;
rlLoadRenderBatch(v19, 1LL, 0x2000LL);
xmmword_141120 = v19[1];
xmmword_141110 = v19[0];
*(_DWORD *)(qword_141A50 + 12) = -1;
RLGL[0] = (long long)&xmmword_141110;
for ( j = 0LL; j != 256; j += 8LL )
{
HIDWORD(RLGL[j + 34]) = 1065353216;
*(_OWORD *)&RLGL[j + 35] = 0LL;
LODWORD(RLGL[j + 37]) = 1065353216;
*(_OWORD *)((char *)&RLGL[j + 37] + 4) = 0LL;
HIDWORD(RLGL[j + 39]) = 1065353216;
*(_OWORD *)&RLGL[j + 40] = 0LL;
LODWORD(RLGL[j + 42]) = 1065353216;
}
*(__int128 *)((char *)&xmmword_1411D8 + 4) = 0LL;
DWORD1(xmmword_1411E8) = 1065353216;
*(__int128 *)((char *)&xmmword_1411E8 + 8) = 0LL;
dword_141200 = 1065353216;
xmmword_141204 = 0LL;
dword_141214 = 1065353216;
*(__int128 *)((char *)&xmmword_141198 + 4) = 0LL;
DWORD1(xmmword_1411A8) = 1065353216;
*(__int128 *)((char *)&xmmword_1411A8 + 8) = 0LL;
DWORD2(xmmword_1411B8) = 1065353216;
*(__int128 *)((char *)&xmmword_1411B8 + 12) = 0LL;
*(_QWORD *)((char *)&xmmword_1411C8 + 12) = 0x3F8000003F800000LL;
LODWORD(xmmword_141158) = 1065353216;
*(__int128 *)((char *)&xmmword_141158 + 4) = 0LL;
DWORD1(xmmword_141168) = 1065353216;
*(__int128 *)((char *)&xmmword_141168 + 8) = 0LL;
DWORD2(xmmword_141178) = 1065353216;
*(__int128 *)((char *)&xmmword_141178 + 12) = 0LL;
*(_QWORD *)((char *)&xmmword_141188 + 12) = 0x3F8000003F800000LL;
qword_141150 = (long long)&xmmword_141158;
glad_glDepthFunc(515LL);
glad_glDisable(2929LL);
glad_glBlendFunc(770LL, 771LL);
glad_glEnable(3042LL);
glad_glCullFace(1029LL);
glad_glFrontFace(2305LL);
glad_glEnable(2884LL);
glad_glEnable(34895LL);
dword_141B88 = a1;
dword_141B8C = a2;
TraceLog(3, (unsigned int)"RLGL: Default OpenGL state initialized successfully", v13, v14, v15, v16);
glad_glClearColor(0.0, 0.0, 0.0, 1.0);
glad_glClearDepth(1.0);
return glad_glClear(16640LL);
}
|
rlglInit:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV EBX,ESI
MOV EBP,EDI
LEA RDI,[RSP + 0xc]
MOV dword ptr [RDI],0xffffffff
MOV ESI,0x1
MOV EDX,0x1
MOV ECX,0x7
MOV R8D,0x1
CALL 0x00164d8d
MOV dword ptr [0x00241a20],EAX
TEST EAX,EAX
JZ 0x00164a1b
LEA RSI,[0x1e4ab6]
MOV EDI,0x3
MOV EDX,EAX
XOR EAX,EAX
CALL 0x001bfa73
JMP 0x00164a2e
LAB_00164a1b:
LEA RSI,[0x1e4aeb]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfa73
LAB_00164a2e:
MOV EDI,0x20
MOV ESI,0x4
CALL 0x00109330
MOV qword ptr [0x00241a40],RAX
XOR EAX,EAX
LAB_00164a46:
MOV RCX,qword ptr [0x00241a40]
MOV dword ptr [RCX + RAX*0x4],0xffffffff
INC RAX
CMP RAX,0x20
JNZ 0x00164a46
LEA RDI,[0x1ec1a9]
MOV ESI,0x8b31
CALL 0x00166b65
MOV dword ptr [0x00241a34],EAX
LEA RDI,[0x1ec38c]
MOV ESI,0x8b30
CALL 0x00166b65
MOV dword ptr [0x00241a38],EAX
MOV EDI,dword ptr [0x00241a34]
MOV ESI,EAX
CALL 0x00166ccf
MOV dword ptr [0x00241a3c],EAX
TEST EAX,EAX
JZ 0x00164b6a
LEA RSI,[0x1ec535]
MOV EDI,0x3
MOV EDX,EAX
XOR EAX,EAX
CALL 0x001bfa73
MOV EDI,dword ptr [0x00241a3c]
LEA RSI,[0x1e5523]
CALL qword ptr [0x0023fa80]
MOV RCX,qword ptr [0x00241a40]
MOV dword ptr [RCX],EAX
MOV EDI,dword ptr [0x00241a3c]
LEA RSI,[0x1e5532]
CALL qword ptr [0x0023fa80]
MOV RCX,qword ptr [0x00241a40]
MOV dword ptr [RCX + 0x4],EAX
MOV EDI,dword ptr [0x00241a3c]
LEA RSI,[0x1e554e]
CALL qword ptr [0x0023fa80]
MOV RCX,qword ptr [0x00241a40]
MOV dword ptr [RCX + 0x14],EAX
MOV EDI,dword ptr [0x00241a3c]
LEA RSI,[0x1e602a]
CALL qword ptr [0x0023fe90]
MOV RCX,qword ptr [0x00241a40]
MOV dword ptr [RCX + 0x18],EAX
MOV EDI,dword ptr [0x00241a3c]
LEA RSI,[0x1e6064]
CALL qword ptr [0x0023fe90]
MOV RCX,qword ptr [0x00241a40]
MOV dword ptr [RCX + 0x30],EAX
MOV EDI,dword ptr [0x00241a3c]
LEA RSI,[0x1e606f]
CALL qword ptr [0x0023fe90]
MOV RCX,qword ptr [0x00241a40]
MOV dword ptr [RCX + 0x3c],EAX
JMP 0x00164b7f
LAB_00164b6a:
LEA RSI,[0x1ec568]
MOV EDI,0x4
XOR EDX,EDX
XOR EAX,EAX
CALL 0x001bfa73
LAB_00164b7f:
MOV EAX,dword ptr [0x00241a3c]
MOV dword ptr [0x00241a48],EAX
MOV RAX,qword ptr [0x00241a40]
MOV qword ptr [0x00241a50],RAX
MOV dword ptr [RAX + 0xc],0x2
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV ESI,0x1
MOV EDX,0x2000
CALL 0x001650ab
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
MOVUPS xmmword ptr [0x00241120],XMM1
MOVUPS xmmword ptr [0x00241110],XMM0
LEA RAX,[0x241110]
MOV RCX,qword ptr [0x00241a50]
MOV dword ptr [RCX + 0xc],0xffffffff
MOV qword ptr [0x00241108],RAX
XOR EAX,EAX
LEA RCX,[0x241108]
MOV EDX,0x3f800000
XORPS XMM0,XMM0
LAB_00164bfb:
MOV dword ptr [RAX + RCX*0x1 + 0x114],EDX
MOVUPS xmmword ptr [RAX + RCX*0x1 + 0x118],XMM0
MOV dword ptr [RAX + RCX*0x1 + 0x128],EDX
MOVUPS xmmword ptr [RAX + RCX*0x1 + 0x12c],XMM0
MOV dword ptr [RAX + RCX*0x1 + 0x13c],EDX
MOVUPS xmmword ptr [RAX + RCX*0x1 + 0x140],XMM0
MOV dword ptr [RAX + RCX*0x1 + 0x150],EDX
ADD RAX,0x40
CMP RAX,0x800
JNZ 0x00164bfb
XORPS XMM0,XMM0
MOVUPS xmmword ptr [0x002411dc],XMM0
MOV EAX,0x3f800000
MOV dword ptr [0x002411ec],EAX
MOVUPS xmmword ptr [0x002411f0],XMM0
MOV dword ptr [0x00241200],EAX
MOVUPS xmmword ptr [0x00241204],XMM0
MOV dword ptr [0x00241214],EAX
MOVUPS xmmword ptr [0x0024119c],XMM0
MOV dword ptr [0x002411ac],EAX
MOVUPS xmmword ptr [0x002411b0],XMM0
MOV dword ptr [0x002411c0],EAX
MOVUPS xmmword ptr [0x002411c4],XMM0
MOV RCX,0x3f8000003f800000
MOV qword ptr [0x002411d4],RCX
MOV dword ptr [0x00241158],EAX
LEA RDX,[0x241158]
MOVUPS xmmword ptr [0x0024115c],XMM0
MOV dword ptr [0x0024116c],EAX
MOVUPS xmmword ptr [0x00241170],XMM0
MOV dword ptr [0x00241180],EAX
MOVUPS xmmword ptr [0x00241184],XMM0
MOV qword ptr [0x00241194],RCX
MOV qword ptr [0x00241150],RDX
MOV EDI,0x203
CALL qword ptr [0x0023f6d8]
MOV EDI,0xb71
CALL qword ptr [0x0023f720]
MOV EDI,0x302
MOV ESI,0x303
CALL qword ptr [0x0023f310]
MOV EDI,0xbe2
CALL qword ptr [0x0023f820]
MOV EDI,0x405
CALL qword ptr [0x0023f608]
MOV EDI,0x901
CALL qword ptr [0x0023f978]
MOV EDI,0xb44
CALL qword ptr [0x0023f820]
MOV EDI,0x884f
CALL qword ptr [0x0023f820]
MOV dword ptr [0x00241b88],EBP
MOV dword ptr [0x00241b8c],EBX
LEA RSI,[0x1e4b13]
MOV EDI,0x3
XOR EAX,EAX
CALL 0x001bfa73
MOVSS XMM3,dword ptr [0x001d9944]
XORPS XMM0,XMM0
XORPS XMM1,XMM1
XORPS XMM2,XMM2
CALL qword ptr [0x0023f3e8]
MOVSD XMM0,qword ptr [0x001d9ab8]
CALL qword ptr [0x0023f3f8]
MOV EDI,0x4100
CALL qword ptr [0x0023f3a8]
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void rlglInit(int4 param_1,int4 param_2)
{
int4 uVar1;
long lVar2;
int4 local_3c;
int8 local_38;
int8 uStack_30;
int4 local_28;
int4 uStack_24;
int4 uStack_20;
int4 uStack_1c;
local_3c = 0xffffffff;
DAT_00241a20 = rlLoadTexture(&local_3c,1,1,7,1);
if (DAT_00241a20 == 0) {
TraceLog(4,"TEXTURE: Failed to load default texture");
}
else {
TraceLog(3,"TEXTURE: [ID %i] Default texture loaded successfully",DAT_00241a20);
}
DAT_00241a40 = (int4 *)calloc(0x20,4);
lVar2 = 0;
do {
DAT_00241a40[lVar2] = 0xffffffff;
lVar2 = lVar2 + 1;
} while (lVar2 != 0x20);
DAT_00241a34 = rlCompileShader("#version 330 \nin vec3 vertexPosition; \nin vec2 vertexTexCoord; \nin vec4 vertexColor; \nout vec2 fragTexCoord; \nout vec4 fragColor; \nuniform mat4 mvp; \nvoid main() \n{ \n fragTexCoord = vertexTexCoord; \n fragColor = vertexColor; \n gl_Position = mvp*vec4(vertexPosition, 1.0); \n} \n"
,0x8b31);
DAT_00241a38 = rlCompileShader("#version 330 \nin vec2 fragTexCoord; \nin vec4 fragColor; \nout vec4 finalColor; \nuniform sampler2D texture0; \nuniform vec4 colDiffuse; \nvoid main() \n{ \n vec4 texelColor = texture(texture0, fragTexCoord); \n finalColor = texelColor*colDiffuse*fragColor; \n} \n"
,0x8b30);
DAT_00241a3c = rlLoadShaderProgram(DAT_00241a34,DAT_00241a38);
if (DAT_00241a3c == 0) {
TraceLog(4,"SHADER: [ID %i] Failed to load default shader",0);
}
else {
TraceLog(3,"SHADER: [ID %i] Default shader loaded successfully",DAT_00241a3c);
uVar1 = (*glad_glGetAttribLocation)(DAT_00241a3c,"vertexPosition");
*DAT_00241a40 = uVar1;
uVar1 = (*glad_glGetAttribLocation)(DAT_00241a3c,"vertexTexCoord");
DAT_00241a40[1] = uVar1;
uVar1 = (*glad_glGetAttribLocation)(DAT_00241a3c,"vertexColor");
DAT_00241a40[5] = uVar1;
uVar1 = (*glad_glGetUniformLocation)(DAT_00241a3c,&DAT_001e602a);
DAT_00241a40[6] = uVar1;
uVar1 = (*glad_glGetUniformLocation)(DAT_00241a3c,"colDiffuse");
DAT_00241a40[0xc] = uVar1;
uVar1 = (*glad_glGetUniformLocation)(DAT_00241a3c,"texture0");
DAT_00241a40[0xf] = uVar1;
}
DAT_00241a48 = DAT_00241a3c;
DAT_00241a50 = DAT_00241a40;
DAT_00241a40[3] = 2;
rlLoadRenderBatch(&local_38,1,0x2000);
_DAT_00241120 = local_28;
uRam0000000000241124 = uStack_24;
uRam0000000000241128 = uStack_20;
uRam000000000024112c = uStack_1c;
_DAT_00241110 = local_38;
uRam0000000000241118 = uStack_30;
DAT_00241a50[3] = 0xffffffff;
RLGL = &DAT_00241110;
lVar2 = 0;
do {
*(int4 *)((long)&DAT_0024121c + lVar2) = 0x3f800000;
*(int8 *)(&DAT_00241220 + lVar2) = 0;
*(int8 *)(lVar2 + 0x241228) = 0;
*(int4 *)((long)&DAT_00241230 + lVar2) = 0x3f800000;
*(int8 *)(&DAT_00241234 + lVar2) = 0;
*(int8 *)(&DAT_0024123c + lVar2) = 0;
*(int4 *)((long)&DAT_00241244 + lVar2) = 0x3f800000;
*(int8 *)(&DAT_00241248 + lVar2) = 0;
*(int8 *)(lVar2 + 0x241250) = 0;
*(int4 *)((long)&DAT_00241258 + lVar2) = 0x3f800000;
lVar2 = lVar2 + 0x40;
} while (lVar2 != 0x800);
_DAT_002411dc = 0;
_DAT_002411e4 = 0;
DAT_002411ec = 0x3f800000;
_DAT_002411f0 = 0;
_DAT_002411f8 = 0;
DAT_00241200 = 0x3f800000;
_DAT_00241204 = 0;
_DAT_0024120c = 0;
DAT_00241214 = 0x3f800000;
_DAT_0024119c = 0;
_DAT_002411a4 = 0;
DAT_002411ac = 0x3f800000;
_DAT_002411b0 = 0;
_DAT_002411b8 = 0;
DAT_002411c0 = 0x3f800000;
_DAT_002411c4 = 0;
_DAT_002411cc = 0;
_DAT_002411d4 = 0x3f8000003f800000;
DAT_00241158 = 0x3f800000;
_DAT_0024115c = 0;
_DAT_00241164 = 0;
DAT_0024116c = 0x3f800000;
_DAT_00241170 = 0;
_DAT_00241178 = 0;
DAT_00241180 = 0x3f800000;
_DAT_00241184 = 0;
_DAT_0024118c = 0;
_DAT_00241194 = 0x3f8000003f800000;
DAT_00241150 = &DAT_00241158;
(*glad_glDepthFunc)(0x203);
(*glad_glDisable)(0xb71);
(*glad_glBlendFunc)(0x302,0x303);
(*glad_glEnable)(0xbe2);
(*glad_glCullFace)(0x405);
(*glad_glFrontFace)(0x901);
(*glad_glEnable)(0xb44);
(*glad_glEnable)(0x884f);
DAT_00241b88 = param_1;
DAT_00241b8c = param_2;
TraceLog(3,"RLGL: Default OpenGL state initialized successfully");
(*glad_glClearColor)(0,0,0,DAT_001d9944);
(*glad_glClearDepth)((int)DAT_001d9ab8);
(*glad_glClear)(0x4100);
return;
}
|
|
12,241
|
rlglInit
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
|
void rlglInit(int width, int height)
{
// Enable OpenGL debug context if required
#if defined(RLGL_ENABLE_OPENGL_DEBUG_CONTEXT) && defined(GRAPHICS_API_OPENGL_43)
if ((glDebugMessageCallback != NULL) && (glDebugMessageControl != NULL))
{
glDebugMessageCallback(rlDebugMessageCallback, 0);
// glDebugMessageControl(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, GL_DEBUG_SEVERITY_HIGH, 0, 0, GL_TRUE);
// Debug context options:
// - GL_DEBUG_OUTPUT - Faster version but not useful for breakpoints
// - GL_DEBUG_OUTPUT_SYNCHRONUS - Callback is in sync with errors, so a breakpoint can be placed on the callback in order to get a stacktrace for the GL error
glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
#endif
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Init default white texture
unsigned char pixels[4] = { 255, 255, 255, 255 }; // 1 pixel RGBA (4 bytes)
RLGL.State.defaultTextureId = rlLoadTexture(pixels, 1, 1, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, 1);
if (RLGL.State.defaultTextureId != 0) TRACELOG(RL_LOG_INFO, "TEXTURE: [ID %i] Default texture loaded successfully", RLGL.State.defaultTextureId);
else TRACELOG(RL_LOG_WARNING, "TEXTURE: Failed to load default texture");
// Init default Shader (customized for GL 3.3 and ES2)
// Loaded: RLGL.State.defaultShaderId + RLGL.State.defaultShaderLocs
rlLoadShaderDefault();
RLGL.State.currentShaderId = RLGL.State.defaultShaderId;
RLGL.State.currentShaderLocs = RLGL.State.defaultShaderLocs;
// Init default vertex arrays buffers
// Simulate that the default shader has the location RL_SHADER_LOC_VERTEX_NORMAL to bind the normal buffer for the default render batch
RLGL.State.currentShaderLocs[RL_SHADER_LOC_VERTEX_NORMAL] = RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL;
RLGL.defaultBatch = rlLoadRenderBatch(RL_DEFAULT_BATCH_BUFFERS, RL_DEFAULT_BATCH_BUFFER_ELEMENTS);
RLGL.State.currentShaderLocs[RL_SHADER_LOC_VERTEX_NORMAL] = -1;
RLGL.currentBatch = &RLGL.defaultBatch;
// Init stack matrices (emulating OpenGL 1.1)
for (int i = 0; i < RL_MAX_MATRIX_STACK_SIZE; i++) RLGL.State.stack[i] = rlMatrixIdentity();
// Init internal matrices
RLGL.State.transform = rlMatrixIdentity();
RLGL.State.projection = rlMatrixIdentity();
RLGL.State.modelview = rlMatrixIdentity();
RLGL.State.currentMatrix = &RLGL.State.modelview;
#endif // GRAPHICS_API_OPENGL_33 || GRAPHICS_API_OPENGL_ES2
// Initialize OpenGL default states
//----------------------------------------------------------
// Init state: Depth test
glDepthFunc(GL_LEQUAL); // Type of depth testing to apply
glDisable(GL_DEPTH_TEST); // Disable depth testing for 2D (only used for 3D)
// Init state: Blending mode
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Color blending function (how colors are mixed)
glEnable(GL_BLEND); // Enable color blending (required to work with transparencies)
// Init state: Culling
// NOTE: All shapes/models triangles are drawn CCW
glCullFace(GL_BACK); // Cull the back face (default)
glFrontFace(GL_CCW); // Front face are defined counter clockwise (default)
glEnable(GL_CULL_FACE); // Enable backface culling
// Init state: Cubemap seamless
#if defined(GRAPHICS_API_OPENGL_33)
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); // Seamless cubemaps (not supported on OpenGL ES 2.0)
#endif
#if defined(GRAPHICS_API_OPENGL_11)
// Init state: Color hints (deprecated in OpenGL 3.0+)
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Improve quality of color and texture coordinate interpolation
glShadeModel(GL_SMOOTH); // Smooth shading between vertex (vertex colors interpolation)
#endif
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Store screen size into global variables
RLGL.State.framebufferWidth = width;
RLGL.State.framebufferHeight = height;
TRACELOG(RL_LOG_INFO, "RLGL: Default OpenGL state initialized successfully");
//----------------------------------------------------------
#endif
// Init state: Color/Depth buffers clear
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set clear color (black)
glClearDepth(1.0f); // Set clear depth value (default)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear color and depth buffers (depth buffer required for 3D)
}
|
O2
|
c
|
rlglInit:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0xc(%rsp), %rdi
orl $-0x1, (%rdi)
pushq $0x7
popq %rcx
pushq $0x1
popq %rdx
movl %edx, %esi
movl %edx, %r8d
callq 0x537c7
movl %eax, 0xd4604(%rip) # 0x127a50
testl %eax, %eax
je 0x53465
leaq 0x7185f(%rip), %rsi # 0xc4cb6
pushq $0x3
popq %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xa128b
jmp 0x53476
leaq 0x7187f(%rip), %rsi # 0xc4ceb
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa128b
pushq $0x20
popq %rdi
pushq $0x4
popq %rsi
callq 0x9320
movq %rax, 0xd45e8(%rip) # 0x127a70
xorl %eax, %eax
cmpq $0x20, %rax
je 0x534a0
movq 0xd45d9(%rip), %rcx # 0x127a70
orl $-0x1, (%rcx,%rax,4)
incq %rax
jmp 0x5348a
leaq 0x78efc(%rip), %rdi # 0xcc3a3
movl $0x8b31, %esi # imm = 0x8B31
callq 0x5549b
movl %eax, 0xd45ad(%rip) # 0x127a64
leaq 0x790c8(%rip), %rdi # 0xcc586
movl $0x8b30, %esi # imm = 0x8B30
callq 0x5549b
movl %eax, 0xd459a(%rip) # 0x127a68
movl 0xd4590(%rip), %edi # 0x127a64
movl %eax, %esi
callq 0x555ef
movl %eax, 0xd458b(%rip) # 0x127a6c
testl %eax, %eax
je 0x535ab
leaq 0x7923f(%rip), %rsi # 0xcc72f
pushq $0x3
popq %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xa128b
movl 0xd456a(%rip), %edi # 0x127a6c
leaq 0x7221a(%rip), %rsi # 0xc5723
callq *0xd25a1(%rip) # 0x125ab0
movq 0xd455a(%rip), %rcx # 0x127a70
movl %eax, (%rcx)
movl 0xd454e(%rip), %edi # 0x127a6c
leaq 0x7220d(%rip), %rsi # 0xc5732
callq *0xd2585(%rip) # 0x125ab0
movq 0xd453e(%rip), %rcx # 0x127a70
movl %eax, 0x4(%rcx)
movl 0xd4531(%rip), %edi # 0x127a6c
leaq 0x7220c(%rip), %rsi # 0xc574e
callq *0xd2568(%rip) # 0x125ab0
movq 0xd4521(%rip), %rcx # 0x127a70
movl %eax, 0x14(%rcx)
movl 0xd4514(%rip), %edi # 0x127a6c
leaq 0x72ccb(%rip), %rsi # 0xc622a
callq *0xd295b(%rip) # 0x125ec0
movq 0xd4504(%rip), %rcx # 0x127a70
movl %eax, 0x18(%rcx)
movl 0xd44f7(%rip), %edi # 0x127a6c
leaq 0x72ce8(%rip), %rsi # 0xc6264
callq *0xd293e(%rip) # 0x125ec0
movq 0xd44e7(%rip), %rcx # 0x127a70
movl %eax, 0x30(%rcx)
movl 0xd44da(%rip), %edi # 0x127a6c
leaq 0x72cd6(%rip), %rsi # 0xc626f
callq *0xd2921(%rip) # 0x125ec0
movq 0xd44ca(%rip), %rcx # 0x127a70
movl %eax, 0x3c(%rcx)
jmp 0x535be
leaq 0x791b0(%rip), %rsi # 0xcc762
pushq $0x4
popq %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xa128b
movl 0xd44a8(%rip), %eax # 0x127a6c
movl %eax, 0xd44ae(%rip) # 0x127a78
movq 0xd449f(%rip), %rax # 0x127a70
movq %rax, 0xd44a8(%rip) # 0x127a80
movl $0x2, 0xc(%rax)
leaq 0x10(%rsp), %r14
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x2000, %edx # imm = 0x2000
callq 0x53add
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0xd3b4c(%rip) # 0x127150
movups %xmm0, 0xd3b35(%rip) # 0x127140
leaq 0xd3b2e(%rip), %rax # 0x127140
movq 0xd4467(%rip), %rcx # 0x127a80
orl $-0x1, 0xc(%rcx)
movq %rax, 0xd3b14(%rip) # 0x127138
xorl %eax, %eax
leaq 0xd3b0b(%rip), %rcx # 0x127138
movl $0x3f800000, %edx # imm = 0x3F800000
xorps %xmm0, %xmm0
cmpq $0x800, %rax # imm = 0x800
je 0x53677
movl %edx, 0x114(%rax,%rcx)
movups %xmm0, 0x118(%rax,%rcx)
movl %edx, 0x128(%rax,%rcx)
movups %xmm0, 0x12c(%rax,%rcx)
movl %edx, 0x13c(%rax,%rcx)
movups %xmm0, 0x140(%rax,%rcx)
movl %edx, 0x150(%rax,%rcx)
addq $0x40, %rax
jmp 0x53635
xorps %xmm0, %xmm0
movups %xmm0, 0xd3b8b(%rip) # 0x12720c
movl $0x3f800000, %eax # imm = 0x3F800000
movl %eax, 0xd3b90(%rip) # 0x12721c
movups %xmm0, 0xd3b8d(%rip) # 0x127220
movl %eax, 0xd3b97(%rip) # 0x127230
movups %xmm0, 0xd3b94(%rip) # 0x127234
movl %eax, 0xd3b9e(%rip) # 0x127244
movups %xmm0, 0xd3b1f(%rip) # 0x1271cc
movl %eax, 0xd3b29(%rip) # 0x1271dc
movups %xmm0, 0xd3b26(%rip) # 0x1271e0
movl %eax, 0xd3b30(%rip) # 0x1271f0
movups %xmm0, 0xd3b2d(%rip) # 0x1271f4
movsd 0x66301(%rip), %xmm1 # 0xb99d0
movsd %xmm1, 0xd3b2d(%rip) # 0x127204
movl %eax, 0xd3aab(%rip) # 0x127188
leaq 0xd3aa4(%rip), %rcx # 0x127188
movups %xmm0, 0xd3aa1(%rip) # 0x12718c
movl %eax, 0xd3aab(%rip) # 0x12719c
movups %xmm0, 0xd3aa8(%rip) # 0x1271a0
movl %eax, 0xd3ab2(%rip) # 0x1271b0
movups %xmm0, 0xd3aaf(%rip) # 0x1271b4
movsd %xmm1, 0xd3ab7(%rip) # 0x1271c4
movq %rcx, 0xd3a6c(%rip) # 0x127180
movl $0x203, %edi # imm = 0x203
callq *0xd1fe9(%rip) # 0x125708
movl $0xb71, %edi # imm = 0xB71
callq *0xd2026(%rip) # 0x125750
movl $0x302, %edi # imm = 0x302
movl $0x303, %esi # imm = 0x303
callq *0xd1c06(%rip) # 0x125340
movl $0xbe2, %edi # imm = 0xBE2
callq *0xd210b(%rip) # 0x125850
movl $0x405, %edi # imm = 0x405
callq *0xd1ee8(%rip) # 0x125638
movl $0x901, %edi # imm = 0x901
callq *0xd224d(%rip) # 0x1259a8
movl $0xb44, %edi # imm = 0xB44
callq *0xd20ea(%rip) # 0x125850
movl $0x884f, %edi # imm = 0x884F
callq *0xd20df(%rip) # 0x125850
movl %ebp, 0xd4441(%rip) # 0x127bb8
movl %ebx, 0xd443f(%rip) # 0x127bbc
leaq 0x7158f(%rip), %rsi # 0xc4d13
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0xa128b
movss 0x65f06(%rip), %xmm3 # 0xb969c
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq *0xd1c73(%rip) # 0x125418
movsd 0x66053(%rip), %xmm0 # 0xb9800
callq *0xd1c75(%rip) # 0x125428
movl $0x4100, %edi # imm = 0x4100
callq *0xd1c1a(%rip) # 0x1253d8
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
|
rlglInit:
push rbp
push r14
push rbx
sub rsp, 30h
mov ebx, esi
mov ebp, edi
lea rdi, [rsp+48h+var_3C]
or dword ptr [rdi], 0FFFFFFFFh
push 7
pop rcx
push 1
pop rdx
mov esi, edx
mov r8d, edx
call rlLoadTexture
mov cs:dword_127A50, eax
test eax, eax
jz short loc_53465
lea rsi, aTextureIdIDefa; "TEXTURE: [ID %i] Default texture loaded"...
push 3
pop rdi
mov edx, eax
xor eax, eax
call TraceLog
jmp short loc_53476
loc_53465:
lea rsi, aTextureFailedT; "TEXTURE: Failed to load default texture"
push 4
pop rdi
xor eax, eax
call TraceLog
loc_53476:
push 20h ; ' '
pop rdi
push 4
pop rsi
call _calloc
mov cs:qword_127A70, rax
xor eax, eax
loc_5348A:
cmp rax, 20h ; ' '
jz short loc_534A0
mov rcx, cs:qword_127A70
or dword ptr [rcx+rax*4], 0FFFFFFFFh
inc rax
jmp short loc_5348A
loc_534A0:
lea rdi, aVersion330InVe; "#version 330 \nin"...
mov esi, 8B31h
call rlCompileShader
mov cs:dword_127A64, eax
lea rdi, aVersion330InVe_0; "#version 330 \nin vec2 fragTexCoo"...
mov esi, 8B30h
call rlCompileShader
mov cs:dword_127A68, eax
mov edi, cs:dword_127A64
mov esi, eax
call rlLoadShaderProgram
mov cs:dword_127A6C, eax
test eax, eax
jz loc_535AB
lea rsi, aShaderIdIDefau; "SHADER: [ID %i] Default shader loaded s"...
push 3
pop rdi
mov edx, eax
xor eax, eax
call TraceLog
mov edi, cs:dword_127A6C
lea rsi, aVertexposition; "vertexPosition"
call cs:glad_glGetAttribLocation
mov rcx, cs:qword_127A70
mov [rcx], eax
mov edi, cs:dword_127A6C
lea rsi, aVertextexcoord; "vertexTexCoord"
call cs:glad_glGetAttribLocation
mov rcx, cs:qword_127A70
mov [rcx+4], eax
mov edi, cs:dword_127A6C
lea rsi, aVertexcolor; "vertexColor"
call cs:glad_glGetAttribLocation
mov rcx, cs:qword_127A70
mov [rcx+14h], eax
mov edi, cs:dword_127A6C
lea rsi, aMvp; "mvp"
call cs:glad_glGetUniformLocation
mov rcx, cs:qword_127A70
mov [rcx+18h], eax
mov edi, cs:dword_127A6C
lea rsi, aColdiffuse; "colDiffuse"
call cs:glad_glGetUniformLocation
mov rcx, cs:qword_127A70
mov [rcx+30h], eax
mov edi, cs:dword_127A6C
lea rsi, aTexture0; "texture0"
call cs:glad_glGetUniformLocation
mov rcx, cs:qword_127A70
mov [rcx+3Ch], eax
jmp short loc_535BE
loc_535AB:
lea rsi, aShaderIdIFaile; "SHADER: [ID %i] Failed to load default "...
push 4
pop rdi
xor edx, edx
xor eax, eax
call TraceLog
loc_535BE:
mov eax, cs:dword_127A6C
mov cs:dword_127A78, eax
mov rax, cs:qword_127A70
mov cs:qword_127A80, rax
mov dword ptr [rax+0Ch], 2
lea r14, [rsp+48h+var_38]
push 1
pop rsi
mov rdi, r14
mov edx, 2000h
call rlLoadRenderBatch
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
movups cs:xmmword_127150, xmm1
movups cs:xmmword_127140, xmm0
lea rax, xmmword_127140
mov rcx, cs:qword_127A80
or dword ptr [rcx+0Ch], 0FFFFFFFFh
mov cs:RLGL, rax
xor eax, eax
lea rcx, RLGL
mov edx, 3F800000h
xorps xmm0, xmm0
loc_53635:
cmp rax, 800h
jz short loc_53677
mov [rax+rcx+114h], edx
movups xmmword ptr [rax+rcx+118h], xmm0
mov [rax+rcx+128h], edx
movups xmmword ptr [rax+rcx+12Ch], xmm0
mov [rax+rcx+13Ch], edx
movups xmmword ptr [rax+rcx+140h], xmm0
mov [rax+rcx+150h], edx
add rax, 40h ; '@'
jmp short loc_53635
loc_53677:
xorps xmm0, xmm0
movups cs:xmmword_127208+4, xmm0
mov eax, 3F800000h
mov dword ptr cs:xmmword_127218+4, eax
movups cs:xmmword_127218+8, xmm0
mov dword ptr cs:xmmword_127228+8, eax
movups cs:xmmword_127228+0Ch, xmm0
mov dword ptr cs:xmmword_127238+0Ch, eax
movups cs:xmmword_1271C8+4, xmm0
mov dword ptr cs:xmmword_1271D8+4, eax
movups cs:xmmword_1271D8+8, xmm0
mov dword ptr cs:xmmword_1271E8+8, eax
movups cs:xmmword_1271E8+0Ch, xmm0
movsd xmm1, qword ptr cs:xmmword_B99D0
movsd qword ptr cs:xmmword_1271F8+0Ch, xmm1
mov dword ptr cs:xmmword_127188, eax
lea rcx, xmmword_127188
movups cs:xmmword_127188+4, xmm0
mov dword ptr cs:xmmword_127198+4, eax
movups cs:xmmword_127198+8, xmm0
mov dword ptr cs:xmmword_1271A8+8, eax
movups cs:xmmword_1271A8+0Ch, xmm0
movsd qword ptr cs:xmmword_1271B8+0Ch, xmm1
mov cs:qword_127180, rcx
mov edi, 203h
call cs:glad_glDepthFunc
mov edi, 0B71h
call cs:glad_glDisable
mov edi, 302h
mov esi, 303h
call cs:glad_glBlendFunc
mov edi, 0BE2h
call cs:glad_glEnable
mov edi, 405h
call cs:glad_glCullFace
mov edi, 901h
call cs:glad_glFrontFace
mov edi, 0B44h
call cs:glad_glEnable
mov edi, 884Fh
call cs:glad_glEnable
mov cs:dword_127BB8, ebp
mov cs:dword_127BBC, ebx
lea rsi, aRlglDefaultOpe; "RLGL: Default OpenGL state initialized "...
push 3
pop rdi
xor eax, eax
call TraceLog
movss xmm3, cs:dword_B969C
xorps xmm0, xmm0
xorps xmm1, xmm1
xorps xmm2, xmm2
call cs:glad_glClearColor
movsd xmm0, cs:qword_B9800
call cs:glad_glClearDepth
mov edi, 4100h
call cs:glad_glClear
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
|
long long rlglInit(int a1, int a2)
{
int v2; // eax
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long i; // rax
int ShaderProgram; // eax
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long j; // rax
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
int v18; // [rsp+Ch] [rbp-3Ch] BYREF
_OWORD v19[3]; // [rsp+10h] [rbp-38h] BYREF
v18 = -1;
v2 = rlLoadTexture(&v18, 1LL, 1LL, 7LL, 1LL);
dword_127A50 = v2;
if ( v2 )
TraceLog(3, (unsigned int)"TEXTURE: [ID %i] Default texture loaded successfully", v2, v4, v5, v6);
else
TraceLog(4, (unsigned int)"TEXTURE: Failed to load default texture", v3, v4, v5, v6);
qword_127A70 = calloc(32LL, 4LL);
for ( i = 0LL; i != 32; ++i )
*(_DWORD *)(qword_127A70 + 4 * i) = -1;
dword_127A64 = rlCompileShader(
"#version 330 \n"
"in vec3 vertexPosition; \n"
"in vec2 vertexTexCoord; \n"
"in vec4 vertexColor; \n"
"out vec2 fragTexCoord; \n"
"out vec4 fragColor; \n"
"uniform mat4 mvp; \n"
"void main() \n"
"{ \n"
" fragTexCoord = vertexTexCoord; \n"
" fragColor = vertexColor; \n"
" gl_Position = mvp*vec4(vertexPosition, 1.0); \n"
"} \n",
35633LL);
dword_127A68 = rlCompileShader(
"#version 330 \n"
"in vec2 fragTexCoord; \n"
"in vec4 fragColor; \n"
"out vec4 finalColor; \n"
"uniform sampler2D texture0; \n"
"uniform vec4 colDiffuse; \n"
"void main() \n"
"{ \n"
" vec4 texelColor = texture(texture0, fragTexCoord); \n"
" finalColor = texelColor*colDiffuse*fragColor; \n"
"} \n",
35632LL);
ShaderProgram = rlLoadShaderProgram((unsigned int)dword_127A64, (unsigned int)dword_127A68);
dword_127A6C = ShaderProgram;
if ( ShaderProgram )
{
TraceLog(3, (unsigned int)"SHADER: [ID %i] Default shader loaded successfully", ShaderProgram, v9, v10, v11);
*(_DWORD *)qword_127A70 = glad_glGetAttribLocation((unsigned int)dword_127A6C, "vertexPosition");
*(_DWORD *)(qword_127A70 + 4) = glad_glGetAttribLocation((unsigned int)dword_127A6C, "vertexTexCoord");
*(_DWORD *)(qword_127A70 + 20) = glad_glGetAttribLocation((unsigned int)dword_127A6C, "vertexColor");
*(_DWORD *)(qword_127A70 + 24) = glad_glGetUniformLocation((unsigned int)dword_127A6C, "mvp");
*(_DWORD *)(qword_127A70 + 48) = glad_glGetUniformLocation((unsigned int)dword_127A6C, "colDiffuse");
*(_DWORD *)(qword_127A70 + 60) = glad_glGetUniformLocation((unsigned int)dword_127A6C, "texture0");
}
else
{
TraceLog(4, (unsigned int)"SHADER: [ID %i] Failed to load default shader", 0, v9, v10, v11);
}
dword_127A78 = dword_127A6C;
qword_127A80 = qword_127A70;
*(_DWORD *)(qword_127A70 + 12) = 2;
rlLoadRenderBatch(v19, 1LL, 0x2000LL);
xmmword_127150 = v19[1];
xmmword_127140 = v19[0];
*(_DWORD *)(qword_127A80 + 12) = -1;
RLGL[0] = (long long)&xmmword_127140;
for ( j = 0LL; j != 256; j += 8LL )
{
HIDWORD(RLGL[j + 34]) = 1065353216;
*(_OWORD *)&RLGL[j + 35] = 0LL;
LODWORD(RLGL[j + 37]) = 1065353216;
*(_OWORD *)((char *)&RLGL[j + 37] + 4) = 0LL;
HIDWORD(RLGL[j + 39]) = 1065353216;
*(_OWORD *)&RLGL[j + 40] = 0LL;
LODWORD(RLGL[j + 42]) = 1065353216;
}
*(__int128 *)((char *)&xmmword_127208 + 4) = 0LL;
DWORD1(xmmword_127218) = 1065353216;
*(__int128 *)((char *)&xmmword_127218 + 8) = 0LL;
DWORD2(xmmword_127228) = 1065353216;
*(__int128 *)((char *)&xmmword_127228 + 12) = 0LL;
HIDWORD(xmmword_127238) = 1065353216;
*(__int128 *)((char *)&xmmword_1271C8 + 4) = 0LL;
DWORD1(xmmword_1271D8) = 1065353216;
*(__int128 *)((char *)&xmmword_1271D8 + 8) = 0LL;
DWORD2(xmmword_1271E8) = 1065353216;
*(__int128 *)((char *)&xmmword_1271E8 + 12) = 0LL;
*(_QWORD *)((char *)&xmmword_1271F8 + 12) = 0x3F8000003F800000LL;
LODWORD(xmmword_127188) = 1065353216;
*(__int128 *)((char *)&xmmword_127188 + 4) = 0LL;
DWORD1(xmmword_127198) = 1065353216;
*(__int128 *)((char *)&xmmword_127198 + 8) = 0LL;
DWORD2(xmmword_1271A8) = 1065353216;
*(__int128 *)((char *)&xmmword_1271A8 + 12) = 0LL;
*(_QWORD *)((char *)&xmmword_1271B8 + 12) = 0x3F8000003F800000LL;
qword_127180 = (long long)&xmmword_127188;
glad_glDepthFunc(515LL, 1LL, 1065353216LL);
glad_glDisable(2929LL);
glad_glBlendFunc(770LL, 771LL);
glad_glEnable(3042LL);
glad_glCullFace(1029LL);
glad_glFrontFace(2305LL);
glad_glEnable(2884LL);
glad_glEnable(34895LL);
dword_127BB8 = a1;
dword_127BBC = a2;
TraceLog(3, (unsigned int)"RLGL: Default OpenGL state initialized successfully", v13, v14, v15, v16);
glad_glClearColor(0.0, 0.0, 0.0, 1.0);
glad_glClearDepth(1.0);
return glad_glClear(16640LL);
}
|
rlglInit:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV EBX,ESI
MOV EBP,EDI
LEA RDI,[RSP + 0xc]
OR dword ptr [RDI],0xffffffff
PUSH 0x7
POP RCX
PUSH 0x1
POP RDX
MOV ESI,EDX
MOV R8D,EDX
CALL 0x001537c7
MOV dword ptr [0x00227a50],EAX
TEST EAX,EAX
JZ 0x00153465
LEA RSI,[0x1c4cb6]
PUSH 0x3
POP RDI
MOV EDX,EAX
XOR EAX,EAX
CALL 0x001a128b
JMP 0x00153476
LAB_00153465:
LEA RSI,[0x1c4ceb]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a128b
LAB_00153476:
PUSH 0x20
POP RDI
PUSH 0x4
POP RSI
CALL 0x00109320
MOV qword ptr [0x00227a70],RAX
XOR EAX,EAX
LAB_0015348a:
CMP RAX,0x20
JZ 0x001534a0
MOV RCX,qword ptr [0x00227a70]
OR dword ptr [RCX + RAX*0x4],0xffffffff
INC RAX
JMP 0x0015348a
LAB_001534a0:
LEA RDI,[0x1cc3a3]
MOV ESI,0x8b31
CALL 0x0015549b
MOV dword ptr [0x00227a64],EAX
LEA RDI,[0x1cc586]
MOV ESI,0x8b30
CALL 0x0015549b
MOV dword ptr [0x00227a68],EAX
MOV EDI,dword ptr [0x00227a64]
MOV ESI,EAX
CALL 0x001555ef
MOV dword ptr [0x00227a6c],EAX
TEST EAX,EAX
JZ 0x001535ab
LEA RSI,[0x1cc72f]
PUSH 0x3
POP RDI
MOV EDX,EAX
XOR EAX,EAX
CALL 0x001a128b
MOV EDI,dword ptr [0x00227a6c]
LEA RSI,[0x1c5723]
CALL qword ptr [0x00225ab0]
MOV RCX,qword ptr [0x00227a70]
MOV dword ptr [RCX],EAX
MOV EDI,dword ptr [0x00227a6c]
LEA RSI,[0x1c5732]
CALL qword ptr [0x00225ab0]
MOV RCX,qword ptr [0x00227a70]
MOV dword ptr [RCX + 0x4],EAX
MOV EDI,dword ptr [0x00227a6c]
LEA RSI,[0x1c574e]
CALL qword ptr [0x00225ab0]
MOV RCX,qword ptr [0x00227a70]
MOV dword ptr [RCX + 0x14],EAX
MOV EDI,dword ptr [0x00227a6c]
LEA RSI,[0x1c622a]
CALL qword ptr [0x00225ec0]
MOV RCX,qword ptr [0x00227a70]
MOV dword ptr [RCX + 0x18],EAX
MOV EDI,dword ptr [0x00227a6c]
LEA RSI,[0x1c6264]
CALL qword ptr [0x00225ec0]
MOV RCX,qword ptr [0x00227a70]
MOV dword ptr [RCX + 0x30],EAX
MOV EDI,dword ptr [0x00227a6c]
LEA RSI,[0x1c626f]
CALL qword ptr [0x00225ec0]
MOV RCX,qword ptr [0x00227a70]
MOV dword ptr [RCX + 0x3c],EAX
JMP 0x001535be
LAB_001535ab:
LEA RSI,[0x1cc762]
PUSH 0x4
POP RDI
XOR EDX,EDX
XOR EAX,EAX
CALL 0x001a128b
LAB_001535be:
MOV EAX,dword ptr [0x00227a6c]
MOV dword ptr [0x00227a78],EAX
MOV RAX,qword ptr [0x00227a70]
MOV qword ptr [0x00227a80],RAX
MOV dword ptr [RAX + 0xc],0x2
LEA R14,[RSP + 0x10]
PUSH 0x1
POP RSI
MOV RDI,R14
MOV EDX,0x2000
CALL 0x00153add
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
MOVUPS xmmword ptr [0x00227150],XMM1
MOVUPS xmmword ptr [0x00227140],XMM0
LEA RAX,[0x227140]
MOV RCX,qword ptr [0x00227a80]
OR dword ptr [RCX + 0xc],0xffffffff
MOV qword ptr [0x00227138],RAX
XOR EAX,EAX
LEA RCX,[0x227138]
MOV EDX,0x3f800000
XORPS XMM0,XMM0
LAB_00153635:
CMP RAX,0x800
JZ 0x00153677
MOV dword ptr [RAX + RCX*0x1 + 0x114],EDX
MOVUPS xmmword ptr [RAX + RCX*0x1 + 0x118],XMM0
MOV dword ptr [RAX + RCX*0x1 + 0x128],EDX
MOVUPS xmmword ptr [RAX + RCX*0x1 + 0x12c],XMM0
MOV dword ptr [RAX + RCX*0x1 + 0x13c],EDX
MOVUPS xmmword ptr [RAX + RCX*0x1 + 0x140],XMM0
MOV dword ptr [RAX + RCX*0x1 + 0x150],EDX
ADD RAX,0x40
JMP 0x00153635
LAB_00153677:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [0x0022720c],XMM0
MOV EAX,0x3f800000
MOV dword ptr [0x0022721c],EAX
MOVUPS xmmword ptr [0x00227220],XMM0
MOV dword ptr [0x00227230],EAX
MOVUPS xmmword ptr [0x00227234],XMM0
MOV dword ptr [0x00227244],EAX
MOVUPS xmmword ptr [0x002271cc],XMM0
MOV dword ptr [0x002271dc],EAX
MOVUPS xmmword ptr [0x002271e0],XMM0
MOV dword ptr [0x002271f0],EAX
MOVUPS xmmword ptr [0x002271f4],XMM0
MOVSD XMM1,qword ptr [0x001b99d0]
MOVSD qword ptr [0x00227204],XMM1
MOV dword ptr [0x00227188],EAX
LEA RCX,[0x227188]
MOVUPS xmmword ptr [0x0022718c],XMM0
MOV dword ptr [0x0022719c],EAX
MOVUPS xmmword ptr [0x002271a0],XMM0
MOV dword ptr [0x002271b0],EAX
MOVUPS xmmword ptr [0x002271b4],XMM0
MOVSD qword ptr [0x002271c4],XMM1
MOV qword ptr [0x00227180],RCX
MOV EDI,0x203
CALL qword ptr [0x00225708]
MOV EDI,0xb71
CALL qword ptr [0x00225750]
MOV EDI,0x302
MOV ESI,0x303
CALL qword ptr [0x00225340]
MOV EDI,0xbe2
CALL qword ptr [0x00225850]
MOV EDI,0x405
CALL qword ptr [0x00225638]
MOV EDI,0x901
CALL qword ptr [0x002259a8]
MOV EDI,0xb44
CALL qword ptr [0x00225850]
MOV EDI,0x884f
CALL qword ptr [0x00225850]
MOV dword ptr [0x00227bb8],EBP
MOV dword ptr [0x00227bbc],EBX
LEA RSI,[0x1c4d13]
PUSH 0x3
POP RDI
XOR EAX,EAX
CALL 0x001a128b
MOVSS XMM3,dword ptr [0x001b969c]
XORPS XMM0,XMM0
XORPS XMM1,XMM1
XORPS XMM2,XMM2
CALL qword ptr [0x00225418]
MOVSD XMM0,qword ptr [0x001b9800]
CALL qword ptr [0x00225428]
MOV EDI,0x4100
CALL qword ptr [0x002253d8]
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void rlglInit(int4 param_1,int4 param_2)
{
int4 uVar1;
long lVar2;
int4 local_3c;
int8 local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
local_3c = 0xffffffff;
DAT_00227a50 = rlLoadTexture(&local_3c,1,1,7,1);
if (DAT_00227a50 == 0) {
TraceLog(4,"TEXTURE: Failed to load default texture");
}
else {
TraceLog(3,"TEXTURE: [ID %i] Default texture loaded successfully",DAT_00227a50);
}
DAT_00227a70 = (int4 *)calloc(0x20,4);
for (lVar2 = 0; lVar2 != 0x20; lVar2 = lVar2 + 1) {
DAT_00227a70[lVar2] = 0xffffffff;
}
DAT_00227a64 = rlCompileShader("#version 330 \nin vec3 vertexPosition; \nin vec2 vertexTexCoord; \nin vec4 vertexColor; \nout vec2 fragTexCoord; \nout vec4 fragColor; \nuniform mat4 mvp; \nvoid main() \n{ \n fragTexCoord = vertexTexCoord; \n fragColor = vertexColor; \n gl_Position = mvp*vec4(vertexPosition, 1.0); \n} \n"
,0x8b31);
DAT_00227a68 = rlCompileShader("#version 330 \nin vec2 fragTexCoord; \nin vec4 fragColor; \nout vec4 finalColor; \nuniform sampler2D texture0; \nuniform vec4 colDiffuse; \nvoid main() \n{ \n vec4 texelColor = texture(texture0, fragTexCoord); \n finalColor = texelColor*colDiffuse*fragColor; \n} \n"
,0x8b30);
DAT_00227a6c = rlLoadShaderProgram(DAT_00227a64,DAT_00227a68);
if (DAT_00227a6c == 0) {
TraceLog(4,"SHADER: [ID %i] Failed to load default shader",0);
}
else {
TraceLog(3,"SHADER: [ID %i] Default shader loaded successfully",DAT_00227a6c);
uVar1 = (*glad_glGetAttribLocation)(DAT_00227a6c,"vertexPosition");
*DAT_00227a70 = uVar1;
uVar1 = (*glad_glGetAttribLocation)(DAT_00227a6c,"vertexTexCoord");
DAT_00227a70[1] = uVar1;
uVar1 = (*glad_glGetAttribLocation)(DAT_00227a6c,"vertexColor");
DAT_00227a70[5] = uVar1;
uVar1 = (*glad_glGetUniformLocation)(DAT_00227a6c,&DAT_001c622a);
DAT_00227a70[6] = uVar1;
uVar1 = (*glad_glGetUniformLocation)(DAT_00227a6c,"colDiffuse");
DAT_00227a70[0xc] = uVar1;
uVar1 = (*glad_glGetUniformLocation)(DAT_00227a6c,"texture0");
DAT_00227a70[0xf] = uVar1;
}
DAT_00227a78 = DAT_00227a6c;
DAT_00227a80 = DAT_00227a70;
DAT_00227a70[3] = 2;
rlLoadRenderBatch(&local_38,1,0x2000);
_DAT_00227150 = local_28;
uRam0000000000227158 = uStack_20;
_DAT_00227140 = local_38;
uRam0000000000227148 = uStack_30;
DAT_00227a80[3] = 0xffffffff;
RLGL = &DAT_00227140;
for (lVar2 = 0; lVar2 != 0x800; lVar2 = lVar2 + 0x40) {
*(int4 *)((long)&DAT_0022724c + lVar2) = 0x3f800000;
*(int8 *)(&DAT_00227250 + lVar2) = 0;
*(int8 *)(lVar2 + 0x227258) = 0;
*(int4 *)((long)&DAT_00227260 + lVar2) = 0x3f800000;
*(int8 *)(&DAT_00227264 + lVar2) = 0;
*(int8 *)(&DAT_0022726c + lVar2) = 0;
*(int4 *)((long)&DAT_00227274 + lVar2) = 0x3f800000;
*(int8 *)(&DAT_00227278 + lVar2) = 0;
*(int8 *)(lVar2 + 0x227280) = 0;
*(int4 *)((long)&DAT_00227288 + lVar2) = 0x3f800000;
}
_DAT_0022720c = 0;
_DAT_00227214 = 0;
DAT_0022721c = 0x3f800000;
_DAT_00227220 = 0;
_DAT_00227228 = 0;
DAT_00227230 = 0x3f800000;
_DAT_00227234 = 0;
_DAT_0022723c = 0;
DAT_00227244 = 0x3f800000;
_DAT_002271cc = 0;
_DAT_002271d4 = 0;
DAT_002271dc = 0x3f800000;
_DAT_002271e0 = 0;
_DAT_002271e8 = 0;
DAT_002271f0 = 0x3f800000;
_DAT_002271f4 = 0;
_DAT_002271fc = 0;
_DAT_00227204 = DAT_001b99d0;
DAT_00227188 = 0x3f800000;
_DAT_0022718c = 0;
_DAT_00227194 = 0;
DAT_0022719c = 0x3f800000;
_DAT_002271a0 = 0;
_DAT_002271a8 = 0;
DAT_002271b0 = 0x3f800000;
_DAT_002271b4 = 0;
_DAT_002271bc = 0;
_DAT_002271c4 = DAT_001b99d0;
DAT_00227180 = &DAT_00227188;
(*glad_glDepthFunc)(0x203);
(*glad_glDisable)(0xb71);
(*glad_glBlendFunc)(0x302,0x303);
(*glad_glEnable)(0xbe2);
(*glad_glCullFace)(0x405);
(*glad_glFrontFace)(0x901);
(*glad_glEnable)(0xb44);
(*glad_glEnable)(0x884f);
DAT_00227bb8 = param_1;
DAT_00227bbc = param_2;
TraceLog(3,"RLGL: Default OpenGL state initialized successfully");
(*glad_glClearColor)(0,0,0,DAT_001b969c);
(*glad_glClearDepth)((int)DAT_001b9800);
(*glad_glClear)(0x4100);
return;
}
|
|
12,242
|
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&)
|
llama.cpp/common/minja/minja.hpp
|
static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) {
Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options);
auto tokens = parser.tokenize();
TemplateTokenIterator begin = tokens.begin();
auto it = begin;
TemplateTokenIterator end = tokens.end();
return parser.parseTemplate(begin, it, end, /* fully= */ true);
}
|
O3
|
cpp
|
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r13
movq %rdi, %r15
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x289c0
movl $0x30, %edi
callq 0x20200
movq %rax, %r12
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r12)
leaq 0x86229(%rip), %rax # 0x160888
addq $0x10, %rax
movq %rax, (%r12)
leaq 0x10(%r12), %rbp
movq %r12, %rdi
addq $0x20, %rdi
movq %rdi, 0x10(%r12)
movq 0x8(%rsp), %rax
cmpq %r14, %rax
movq %r14, %rcx
movq %r13, %r14
je 0xda69b
movq %rax, (%rbp)
movq 0x18(%rsp), %rax
movq %rax, (%rdi)
movq 0x10(%rsp), %rbx
jmp 0xda6b2
movq 0x10(%rsp), %rbx
leaq 0x1(%rbx), %rdx
movq %rcx, %r13
movq %rcx, %rsi
callq 0x200e0
movq %r13, %rcx
leaq 0x30(%rsp), %r13
movq %rbx, 0x18(%r12)
movq %rcx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %r12, (%r13)
movq %rbp, -0x8(%r13)
leaq 0x48(%rsp), %rdi
movq %rcx, %rbx
leaq 0x28(%rsp), %rsi
movq %r14, %rdx
callq 0xdb37c
movq %r13, %rdi
callq 0x71092
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xda70b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xdb444
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x40(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x38(%rsp), %r8
movq %rsi, (%r8)
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
movl $0x1, %r9d
callq 0xddaf8
leaq 0x8(%rsp), %rdi
callq 0xdee1a
leaq 0x50(%rsp), %rdi
callq 0x71092
movq %r15, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xdee1a
jmp 0xda787
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x71092
jmp 0xda7bd
movq %rbx, %r14
movq %rax, %rbx
movq %r13, %rdi
callq 0x71092
jmp 0xda7a6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xda7bd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
movq %rbx, %rdi
callq 0x20ad0
nop
|
_ZN5minja6Parser5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r13, rdx
mov r15, rdi
lea r14, [rsp+0A8h+var_90]
mov [r14-10h], r14
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
lea rdi, [rsp+0A8h+var_A0]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rax, 100000001h
mov [r12+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<std::string,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r12], rax
lea rbp, [r12+10h]
mov rdi, r12
add rdi, 20h ; ' '
mov [r12+10h], rdi
mov rax, [rsp+0A8h+var_A0]
cmp rax, r14
mov rcx, r14
mov r14, r13
jz short loc_DA69B
mov [rbp+0], rax
mov rax, [rsp+0A8h+var_90]
mov [rdi], rax
mov rbx, [rsp+0A8h+var_98]
jmp short loc_DA6B2
loc_DA69B:
mov rbx, [rsp+0A8h+var_98]
lea rdx, [rbx+1]
mov r13, rcx
mov rsi, rcx
call _memcpy
mov rcx, r13
loc_DA6B2:
lea r13, [rsp+0A8h+var_78]
mov [r12+18h], rbx
mov [rsp+0A8h+var_A0], rcx
mov [rsp+0A8h+var_98], 0
mov byte ptr [rsp+0A8h+var_90], 0
mov [r13+0], r12
mov [r13-8], rbp
lea rdi, [rsp+0A8h+var_60]
mov rbx, rcx
lea rsi, [rsp+0A8h+var_80]
mov rdx, r14
call _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE; minja::Parser::Parser(std::shared_ptr<std::string> const&,minja::Options const&)
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, rbx
jz short loc_DA70B
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DA70B:
lea rdi, [rsp+0A8h+var_A0]; this
lea rsi, [rsp+0A8h+var_60]
call _ZN5minja6Parser8tokenizeEv; minja::Parser::tokenize(void)
mov rax, [rsp+0A8h+var_A0]
mov rsi, [rsp+0A8h+var_98]
lea rdx, [rsp+0A8h+var_80]
mov [rdx], rax
lea rcx, [rsp+0A8h+var_68]
mov [rcx], rax
lea r8, [rsp+0A8h+var_70]
mov [r8], rsi
lea rsi, [rsp+0A8h+var_60]
mov rdi, r15
mov r9d, 1
call _ZNK5minja6Parser13parseTemplateERKN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrINS_13TemplateTokenESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEERSD_SF_b; minja::Parser::parseTemplate(__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,bool)
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
lea rdi, [rsp+0A8h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, r15
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
jmp short loc_DA787
mov rbx, rax
loc_DA787:
lea rdi, [rsp+arg_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_DA7BD
mov r14, rbx
mov rbx, rax
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_DA7A6
mov rbx, rax
loc_DA7A6:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_DA7BD
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DA7BD:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Parser::parse(long long a1, long long a2, long long a3)
{
long long v5; // r12
_QWORD *v6; // rdi
long long v7; // rbx
void *v9; // [rsp+8h] [rbp-A0h] BYREF
long long v10; // [rsp+10h] [rbp-98h]
_QWORD v11[2]; // [rsp+18h] [rbp-90h] BYREF
void *v12; // [rsp+28h] [rbp-80h] BYREF
volatile signed __int32 *v13; // [rsp+30h] [rbp-78h] BYREF
long long v14; // [rsp+38h] [rbp-70h] BYREF
void *v15; // [rsp+40h] [rbp-68h] BYREF
_BYTE v16[8]; // [rsp+48h] [rbp-60h] BYREF
volatile signed __int32 *v17; // [rsp+50h] [rbp-58h] BYREF
v9 = v11;
std::string::_M_construct<char *>((long long)&v9, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
v5 = operator new(0x30uLL);
*(_QWORD *)(v5 + 8) = 0x100000001LL;
*(_QWORD *)v5 = &`vtable for'std::_Sp_counted_ptr_inplace<std::string,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
v6 = (_QWORD *)(v5 + 32);
*(_QWORD *)(v5 + 16) = v5 + 32;
if ( v9 == v11 )
{
v7 = v10;
memcpy(v6, v11, v10 + 1);
}
else
{
*(_QWORD *)(v5 + 16) = v9;
*v6 = v11[0];
v7 = v10;
}
*(_QWORD *)(v5 + 24) = v7;
v9 = v11;
v10 = 0LL;
LOBYTE(v11[0]) = 0;
v13 = (volatile signed __int32 *)v5;
v12 = (void *)(v5 + 16);
minja::Parser::Parser(v16, &v12, a3);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13);
if ( v9 != v11 )
operator delete(v9, v11[0] + 1LL);
minja::Parser::tokenize((minja::Parser *)&v9);
v12 = v9;
v15 = v9;
v14 = v10;
minja::Parser::parseTemplate(a1, v16, &v12, &v15, &v14, 1LL);
std::vector<std::unique_ptr<minja::TemplateToken>>::~vector(&v9);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v17);
return a1;
}
|
parse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R13,RDX
MOV R15,RDI
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x001289c0
LAB_001da63c:
MOV EDI,0x30
CALL 0x00120200
LAB_001da646:
MOV R12,RAX
MOV RAX,0x100000001
MOV qword ptr [R12 + 0x8],RAX
LEA RAX,[0x260888]
ADD RAX,0x10
MOV qword ptr [R12],RAX
LEA RBP,[R12 + 0x10]
MOV RDI,R12
ADD RDI,0x20
MOV qword ptr [R12 + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,R14
MOV RCX,R14
MOV R14,R13
JZ 0x001da69b
MOV qword ptr [RBP],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RDI],RAX
MOV RBX,qword ptr [RSP + 0x10]
JMP 0x001da6b2
LAB_001da69b:
MOV RBX,qword ptr [RSP + 0x10]
LEA RDX,[RBX + 0x1]
MOV R13,RCX
MOV RSI,RCX
CALL 0x001200e0
MOV RCX,R13
LAB_001da6b2:
LEA R13,[RSP + 0x30]
MOV qword ptr [R12 + 0x18],RBX
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],0x0
MOV byte ptr [RSP + 0x18],0x0
MOV qword ptr [R13],R12
MOV qword ptr [R13 + -0x8],RBP
LAB_001da6d7:
LEA RDI,[RSP + 0x48]
MOV RBX,RCX
LEA RSI,[RSP + 0x28]
MOV RDX,R14
CALL 0x001db37c
MOV RDI,R13
CALL 0x00171092
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBX
JZ 0x001da70b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120170
LAB_001da70b:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x48]
CALL 0x001db444
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LEA RCX,[RSP + 0x40]
MOV qword ptr [RCX],RAX
LEA R8,[RSP + 0x38]
MOV qword ptr [R8],RSI
LAB_001da73c:
LEA RSI,[RSP + 0x48]
MOV RDI,R15
MOV R9D,0x1
CALL 0x001ddaf8
LAB_001da74f:
LEA RDI,[RSP + 0x8]
CALL 0x001dee1a
LEA RDI,[RSP + 0x50]
CALL 0x00171092
MOV RAX,R15
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Parser::parse(std::__cxx11::string const&, minja::Options const&) */
Parser * __thiscall minja::Parser::parse(Parser *this,string *param_1,Options *param_2)
{
int8 *__dest;
int8 *local_a0;
long local_98;
int1 local_90;
int7 uStack_8f;
int8 *local_80;
int8 *local_78;
int8 local_70;
int8 *local_68;
Parser local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [40];
local_a0 = (int8 *)&local_90;
std::__cxx11::string::_M_construct<char*>
(&local_a0,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 001da63c to 001da645 has its CatchHandler @ 001da7a3 */
local_78 = (int8 *)operator_new(0x30);
local_78[1] = 0x100000001;
*local_78 = &PTR___Sp_counted_base_00260898;
local_80 = local_78 + 2;
__dest = local_78 + 4;
local_78[2] = __dest;
if (local_a0 == (int8 *)&local_90) {
memcpy(__dest,&local_90,local_98 + 1);
}
else {
*local_80 = local_a0;
*__dest = CONCAT71(uStack_8f,local_90);
}
local_78[3] = local_98;
local_98 = 0;
local_90 = 0;
/* try { // try from 001da6d7 to 001da6eb has its CatchHandler @ 001da793 */
local_a0 = (int8 *)&local_90;
Parser(local_60,(shared_ptr *)&local_80,param_2);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_78);
if (local_a0 != (int8 *)&local_90) {
operator_delete(local_a0,CONCAT71(uStack_8f,local_90) + 1);
}
/* try { // try from 001da70b to 001da719 has its CatchHandler @ 001da784 */
tokenize();
local_80 = local_a0;
local_68 = local_a0;
local_70 = local_98;
/* try { // try from 001da73c to 001da74e has its CatchHandler @ 001da775 */
parseTemplate(this,local_60,(__normal_iterator *)&local_80,SUB81(&local_68,0));
std::
vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
::~vector((vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
*)&local_a0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
return this;
}
|
|
12,243
|
nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*)
|
ng-log[P]ng-log/src/symbolize.cc
|
bool GetSectionHeaderByName(int fd, const char* name, size_t name_len,
ElfW(Shdr) * out) {
ElfW(Ehdr) elf_header;
if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) {
return false;
}
ElfW(Shdr) shstrtab;
size_t shstrtab_offset =
(elf_header.e_shoff + static_cast<size_t>(elf_header.e_shentsize) *
static_cast<size_t>(elf_header.e_shstrndx));
if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) {
return false;
}
for (size_t i = 0; i < elf_header.e_shnum; ++i) {
size_t section_header_offset =
(elf_header.e_shoff + elf_header.e_shentsize * i);
if (!ReadFromOffsetExact(fd, out, sizeof(*out), section_header_offset)) {
return false;
}
char header_name[kMaxSectionNameLen];
if (sizeof(header_name) < name_len) {
RAW_LOG(WARNING,
"Section name '%s' is too long (%zu); "
"section will not be found (even if present).",
name, name_len);
// No point in even trying.
return false;
}
size_t name_offset = shstrtab.sh_offset + out->sh_name;
ssize_t n_read = ReadFromOffset(fd, &header_name, name_len, name_offset);
if (n_read == -1) {
return false;
} else if (static_cast<size_t>(n_read) != name_len) {
// Short read -- name could be at end of file.
continue;
}
if (memcmp(header_name, name, name_len) == 0) {
return true;
}
}
return false;
}
|
O1
|
cpp
|
nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %rbx
movq %rdx, 0x20(%rsp)
movq %rsi, 0x10(%rsp)
movl %edi, %ebp
xorl %r13d, %r13d
leaq 0x30(%rsp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x20644
cmpq $0x40, %rax
jne 0x2062b
movq 0x58(%rsp), %r12
movzwl 0x6a(%rsp), %eax
movzwl 0x6e(%rsp), %ecx
movq %rax, 0x28(%rsp)
imulq %rax, %rcx
addq %r12, %rcx
leaq 0xb8(%rsp), %rsi
movl $0x40, %edx
movl %ebp, %edi
callq 0x20644
cmpq $0x40, %rax
jne 0x20628
movzwl 0x6c(%rsp), %r15d
testq %r15, %r15
je 0x20628
movq 0xd0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rbx, 0x8(%rsp)
movl $0x40, %edx
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x20644
cmpq $0x40, %rax
jne 0x205b1
movq 0x20(%rsp), %rax
cmpq $0x41, %rax
jb 0x205bc
xorl %r13d, %r13d
movl $0x1, %r14d
movl $0x1, %edi
leaq 0x38a4(%rip), %rsi # 0x23e38
movl $0x10d, %edx # imm = 0x10D
leaq 0x38e1(%rip), %rcx # 0x23e81
movq 0x10(%rsp), %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1f44c
jmp 0x20614
movl $0x1, %r14d
xorl %r13d, %r13d
jmp 0x20614
movl (%rbx), %ecx
addq 0x18(%rsp), %rcx
movl %ebp, %edi
leaq 0x70(%rsp), %rsi
movq %rax, %rdx
movq %rax, %rbx
callq 0x20644
cmpq $-0x1, %rax
je 0x20606
movl $0x4, %r14d
cmpq %rbx, %rax
jne 0x2060f
leaq 0x70(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x7560
xorl %r14d, %r14d
testl %eax, %eax
sete %r14b
orb %r14b, %r13b
jmp 0x2060f
movl $0x1, %r14d
xorl %r13d, %r13d
movq 0x8(%rsp), %rbx
testb $0x3, %r14b
jne 0x2062b
addq 0x28(%rsp), %r12
decq %r15
jne 0x2055c
xorl %r13d, %r13d
andb $0x1, %r13b
movl %r13d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN5nglog5tools22GetSectionHeaderByNameEiPKcmP10Elf64_Shdr:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov rbx, rcx
mov [rsp+128h+var_108], rdx
mov [rsp+128h+var_118], rsi
mov ebp, edi
xor r13d, r13d
lea rsi, [rsp+128h+var_F8]; int
mov edx, offset dword_40; void *
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_2062B
mov r12, [rsp+128h+var_D0]
movzx eax, [rsp+128h+var_BE]
movzx ecx, [rsp+128h+var_BA]
mov [rsp+128h+var_100], rax
imul rcx, rax
add rcx, r12; unsigned __int64
lea rsi, [rsp+128h+var_70]; int
mov edx, offset dword_40; void *
mov edi, ebp; this
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_20628
movzx r15d, [rsp+128h+var_BC]
test r15, r15
jz loc_20628
mov rax, [rsp+128h+var_58]
mov [rsp+128h+var_110], rax
mov [rsp+128h+var_120], rbx
loc_2055C:
mov edx, offset dword_40; void *
mov edi, ebp; this
mov rsi, rbx; int
mov rcx, r12; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz short loc_205B1
mov rax, [rsp+128h+var_108]
cmp rax, 41h ; 'A'
jb short loc_205BC
xor r13d, r13d
mov r14d, 1
mov edi, 1
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 10Dh
lea rcx, aSectionNameSIs; "Section name '%s' is too long (%zu); se"...
mov r8, [rsp+128h+var_118]
mov r9, rax
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
jmp short loc_20614
loc_205B1:
mov r14d, 1
xor r13d, r13d
jmp short loc_20614
loc_205BC:
mov ecx, [rbx]
add rcx, [rsp+128h+var_110]; unsigned __int64
mov edi, ebp; this
lea rsi, [rsp+128h+var_B8]; int
mov rdx, rax; void *
mov rbx, rax
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_20606
mov r14d, 4
cmp rax, rbx
jnz short loc_2060F
lea rdi, [rsp+128h+var_B8]
mov rsi, [rsp+128h+var_118]
mov rdx, rbx
call _bcmp
xor r14d, r14d
test eax, eax
setz r14b
or r13b, r14b
jmp short loc_2060F
loc_20606:
mov r14d, 1
xor r13d, r13d
loc_2060F:
mov rbx, [rsp+128h+var_120]
loc_20614:
test r14b, 3
jnz short loc_2062B
add r12, [rsp+128h+var_100]
dec r15
jnz loc_2055C
loc_20628:
xor r13d, r13d
loc_2062B:
and r13b, 1
mov eax, r13d
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nglog::tools::GetSectionHeaderByName(
nglog::tools *this,
long long a2,
void *a3,
unsigned int *a4,
unsigned long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned int v14; // r13d
unsigned long long v15; // r8
unsigned long long v16; // r12
unsigned long long v17; // r8
long long v18; // r15
__m128 v19; // xmm4
__m128 v20; // xmm5
char v21; // r14
long long v22; // rax
char v24; // [rsp+0h] [rbp-128h]
unsigned int *v25; // [rsp+8h] [rbp-120h]
long long v26; // [rsp+18h] [rbp-110h]
long long v28; // [rsp+28h] [rbp-100h]
int v29; // [rsp+30h] [rbp-F8h] BYREF
unsigned long long v30; // [rsp+58h] [rbp-D0h]
unsigned __int16 v31; // [rsp+6Ah] [rbp-BEh]
unsigned __int16 v32; // [rsp+6Ch] [rbp-BCh]
unsigned __int16 v33; // [rsp+6Eh] [rbp-BAh]
int v34[18]; // [rsp+70h] [rbp-B8h] BYREF
int v35; // [rsp+B8h] [rbp-70h] BYREF
long long v36; // [rsp+D0h] [rbp-58h]
v14 = 0;
if ( nglog::tools::ReadFromOffset(this, (int)&v29, &dword_40, 0LL, a5) == 64 )
{
v16 = v30;
v28 = v31;
if ( nglog::tools::ReadFromOffset(
(nglog::tools *)(unsigned int)this,
(int)&v35,
&dword_40,
v30 + v31 * (unsigned long long)v33,
v15) == 64
&& (v18 = v32) != 0 )
{
v26 = v36;
v25 = a4;
while ( 1 )
{
if ( nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)a4, &dword_40, v16, v17) == 64 )
{
if ( (unsigned long long)a3 < 0x41 )
{
v22 = nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)v34, a3, v26 + *a4, v17);
if ( v22 == -1 )
{
v21 = 1;
v14 = 0;
}
else
{
v21 = 4;
if ( (void *)v22 == a3 )
{
v21 = (unsigned int)bcmp(v34, a2) == 0;
LOBYTE(v14) = v21 | v14;
}
}
a4 = v25;
}
else
{
v14 = 0;
v21 = 1;
nglog::RawLog(
(nglog *)((char *)&dword_0 + 1),
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",
269,
(long long)"Section name '%s' is too long (%zu); section will not be found (even if present).",
a2,
(long long)a3,
a6,
a7,
a8,
a9,
v19,
v20,
a12,
a13,
v24);
}
}
else
{
v21 = 1;
v14 = 0;
}
if ( (v21 & 3) != 0 )
break;
v16 += v28;
if ( !--v18 )
goto LABEL_16;
}
}
else
{
LABEL_16:
v14 = 0;
}
}
LOBYTE(v14) = v14 & 1;
return v14;
}
|
GetSectionHeaderByName:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV RBX,RCX
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RSI
MOV EBP,EDI
XOR R13D,R13D
LEA RSI,[RSP + 0x30]
MOV EDX,0x40
XOR ECX,ECX
CALL 0x00120644
CMP RAX,0x40
JNZ 0x0012062b
MOV R12,qword ptr [RSP + 0x58]
MOVZX EAX,word ptr [RSP + 0x6a]
MOVZX ECX,word ptr [RSP + 0x6e]
MOV qword ptr [RSP + 0x28],RAX
IMUL RCX,RAX
ADD RCX,R12
LEA RSI,[RSP + 0xb8]
MOV EDX,0x40
MOV EDI,EBP
CALL 0x00120644
CMP RAX,0x40
JNZ 0x00120628
MOVZX R15D,word ptr [RSP + 0x6c]
TEST R15,R15
JZ 0x00120628
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x8],RBX
LAB_0012055c:
MOV EDX,0x40
MOV EDI,EBP
MOV RSI,RBX
MOV RCX,R12
CALL 0x00120644
CMP RAX,0x40
JNZ 0x001205b1
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,0x41
JC 0x001205bc
XOR R13D,R13D
MOV R14D,0x1
MOV EDI,0x1
LEA RSI,[0x123e38]
MOV EDX,0x10d
LEA RCX,[0x123e81]
MOV R8,qword ptr [RSP + 0x10]
MOV R9,RAX
XOR EAX,EAX
CALL 0x0011f44c
JMP 0x00120614
LAB_001205b1:
MOV R14D,0x1
XOR R13D,R13D
JMP 0x00120614
LAB_001205bc:
MOV ECX,dword ptr [RBX]
ADD RCX,qword ptr [RSP + 0x18]
MOV EDI,EBP
LEA RSI,[RSP + 0x70]
MOV RDX,RAX
MOV RBX,RAX
CALL 0x00120644
CMP RAX,-0x1
JZ 0x00120606
MOV R14D,0x4
CMP RAX,RBX
JNZ 0x0012060f
LEA RDI,[RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBX
CALL 0x00107560
XOR R14D,R14D
TEST EAX,EAX
SETZ R14B
OR R13B,R14B
JMP 0x0012060f
LAB_00120606:
MOV R14D,0x1
XOR R13D,R13D
LAB_0012060f:
MOV RBX,qword ptr [RSP + 0x8]
LAB_00120614:
TEST R14B,0x3
JNZ 0x0012062b
ADD R12,qword ptr [RSP + 0x28]
DEC R15
JNZ 0x0012055c
LAB_00120628:
XOR R13D,R13D
LAB_0012062b:
AND R13B,0x1
MOV EAX,R13D
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) */
byte nglog::tools::GetSectionHeaderByName
(int param_1,char *param_2,ulong param_3,Elf64_Shdr *param_4)
{
int iVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
byte bVar5;
ulong uVar6;
bool bVar7;
int1 local_f8 [40];
ulong local_d0;
ushort local_be;
ushort local_bc;
ushort local_ba;
int1 local_b8 [72];
int1 local_70 [24];
long local_58;
bVar5 = 0;
lVar2 = ReadFromOffset(param_1,local_f8,0x40,0);
if (lVar2 == 0x40) {
lVar2 = ReadFromOffset(param_1,local_70,0x40,(ulong)local_ba * (ulong)local_be + local_d0);
if (lVar2 == 0x40) {
uVar4 = local_d0;
for (uVar6 = (ulong)local_bc; uVar6 != 0; uVar6 = uVar6 - 1) {
lVar2 = ReadFromOffset(param_1,param_4,0x40,uVar4);
if (lVar2 == 0x40) {
if (param_3 < 0x41) {
uVar3 = ReadFromOffset(param_1,local_b8,param_3,(ulong)param_4->sh_name + local_58);
if (uVar3 == 0xffffffffffffffff) {
bVar7 = true;
bVar5 = 0;
}
else {
bVar7 = false;
if (uVar3 == param_3) {
iVar1 = bcmp(local_b8,param_2,param_3);
bVar7 = iVar1 == 0;
bVar5 = bVar5 | bVar7;
}
}
}
else {
bVar5 = 0;
bVar7 = true;
RawLog(1,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",
0x10d,
"Section name \'%s\' is too long (%zu); section will not be found (even if present)."
,param_2,param_3);
}
}
else {
bVar7 = true;
bVar5 = 0;
}
if (bVar7) {
return bVar5;
}
uVar4 = uVar4 + local_be;
}
}
}
return 0;
}
|
|
12,244
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
|
monkey531[P]llama/common/json.hpp
|
static diyfp mul(const diyfp& x, const diyfp& y) noexcept
{
static_assert(kPrecision == 64, "internal error");
// Computes:
// f = round((x.f * y.f) / 2^q)
// e = x.e + y.e + q
// Emulate the 64-bit * 64-bit multiplication:
//
// p = u * v
// = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)
// = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi )
// = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 )
// = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 )
// = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3)
// = (p0_lo ) + 2^32 (Q ) + 2^64 (H )
// = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H )
//
// (Since Q might be larger than 2^32 - 1)
//
// = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)
//
// (Q_hi + H does not overflow a 64-bit int)
//
// = p_lo + 2^64 p_hi
const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;
const std::uint64_t u_hi = x.f >> 32u;
const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;
const std::uint64_t v_hi = y.f >> 32u;
const std::uint64_t p0 = u_lo * v_lo;
const std::uint64_t p1 = u_lo * v_hi;
const std::uint64_t p2 = u_hi * v_lo;
const std::uint64_t p3 = u_hi * v_hi;
const std::uint64_t p0_hi = p0 >> 32u;
const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
const std::uint64_t p1_hi = p1 >> 32u;
const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
const std::uint64_t p2_hi = p2 >> 32u;
std::uint64_t Q = p0_hi + p1_lo + p2_lo;
// The full product might now be computed as
//
// p_hi = p3 + p2_hi + p1_hi + (Q >> 32)
// p_lo = p0_lo + (Q << 32)
//
// But in this particular case here, the full p_lo is not required.
// Effectively we only need to add the highest bit in p_lo to p_hi (and
// Q_hi + 1 does not overflow).
Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up
const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);
return {h, x.e + y.e + 64};
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&):
movq (%rdi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq (%rsi), %r8
movl %r8d, %edx
shrq $0x20, %r8
movq %rdx, %r9
imulq %rcx, %r9
imulq %r8, %rcx
imulq %rax, %rdx
imulq %rax, %r8
shrq $0x20, %r9
movl %ecx, %r10d
addq %r9, %r10
shrq $0x20, %rcx
movl %edx, %eax
addq %r10, %rax
shrq $0x20, %rdx
addq %r8, %rdx
addq %rcx, %rdx
subq $-0x80000000, %rax # imm = 0x80000000
shrq $0x20, %rax
addq %rdx, %rax
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %edx
addl %ecx, %edx
addl $0x40, %edx
retq
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_:
mov rax, [rdi]
mov ecx, eax
shr rax, 20h
mov r8, [rsi]
mov edx, r8d
shr r8, 20h
mov r9, rdx
imul r9, rcx
imul rcx, r8
imul rdx, rax
imul r8, rax
shr r9, 20h
mov r10d, ecx
add r10, r9
shr rcx, 20h
mov eax, edx
add rax, r10
shr rdx, 20h
add rdx, r8
add rdx, rcx
sub rax, 0FFFFFFFF80000000h
shr rax, 20h
add rax, rdx
mov ecx, [rdi+8]
mov edx, [rsi+8]
add edx, ecx
add edx, 40h ; '@'
retn
|
unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2)
{
long long v2; // rcx
v2 = (unsigned int)*a1;
return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32)
+ HIDWORD(*a1) * HIDWORD(*a2)
+ ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32)
+ ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32)
+ (unsigned int)(HIDWORD(*a2) * v2)
+ (unsigned int)(HIDWORD(*a1) * *a2)
+ 0x80000000) >> 32);
}
|
mul:
MOV RAX,qword ptr [RDI]
MOV ECX,EAX
SHR RAX,0x20
MOV R8,qword ptr [RSI]
MOV EDX,R8D
SHR R8,0x20
MOV R9,RDX
IMUL R9,RCX
IMUL RCX,R8
IMUL RDX,RAX
IMUL R8,RAX
SHR R9,0x20
MOV R10D,ECX
ADD R10,R9
SHR RCX,0x20
MOV EAX,EDX
ADD RAX,R10
SHR RDX,0x20
ADD RDX,R8
ADD RDX,RCX
SUB RAX,-0x80000000
SHR RAX,0x20
ADD RAX,RDX
MOV ECX,dword ptr [RDI + 0x8]
MOV EDX,dword ptr [RSI + 0x8]
ADD EDX,ECX
ADD EDX,0x40
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp
const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */
int1 [16]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [16];
uVar2 = *(ulong *)param_1 & 0xffffffff;
uVar1 = *(ulong *)param_1 >> 0x20;
uVar4 = *(ulong *)param_2 & 0xffffffff;
uVar6 = *(ulong *)param_2 >> 0x20;
uVar3 = uVar2 * uVar6;
uVar5 = uVar4 * uVar1;
auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000
>> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20);
auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40;
auVar7._12_4_ = 0;
return auVar7;
}
|
|
12,245
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
|
monkey531[P]llama/common/json.hpp
|
static diyfp mul(const diyfp& x, const diyfp& y) noexcept
{
static_assert(kPrecision == 64, "internal error");
// Computes:
// f = round((x.f * y.f) / 2^q)
// e = x.e + y.e + q
// Emulate the 64-bit * 64-bit multiplication:
//
// p = u * v
// = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)
// = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi )
// = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 )
// = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 )
// = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3)
// = (p0_lo ) + 2^32 (Q ) + 2^64 (H )
// = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H )
//
// (Since Q might be larger than 2^32 - 1)
//
// = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)
//
// (Q_hi + H does not overflow a 64-bit int)
//
// = p_lo + 2^64 p_hi
const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;
const std::uint64_t u_hi = x.f >> 32u;
const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;
const std::uint64_t v_hi = y.f >> 32u;
const std::uint64_t p0 = u_lo * v_lo;
const std::uint64_t p1 = u_lo * v_hi;
const std::uint64_t p2 = u_hi * v_lo;
const std::uint64_t p3 = u_hi * v_hi;
const std::uint64_t p0_hi = p0 >> 32u;
const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
const std::uint64_t p1_hi = p1 >> 32u;
const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
const std::uint64_t p2_hi = p2 >> 32u;
std::uint64_t Q = p0_hi + p1_lo + p2_lo;
// The full product might now be computed as
//
// p_hi = p3 + p2_hi + p1_hi + (Q >> 32)
// p_lo = p0_lo + (Q << 32)
//
// But in this particular case here, the full p_lo is not required.
// Effectively we only need to add the highest bit in p_lo to p_hi (and
// Q_hi + 1 does not overflow).
Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up
const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);
return {h, x.e + y.e + 64};
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&):
movq (%rdi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq (%rsi), %r8
movl %r8d, %edx
shrq $0x20, %r8
movq %rdx, %r9
imulq %rcx, %r9
imulq %r8, %rcx
imulq %rax, %rdx
imulq %rax, %r8
shrq $0x20, %r9
movl %ecx, %r10d
addq %r9, %r10
shrq $0x20, %rcx
movl %edx, %eax
addq %r10, %rax
shrq $0x20, %rdx
addq %r8, %rdx
addq %rcx, %rdx
subq $-0x80000000, %rax # imm = 0x80000000
shrq $0x20, %rax
addq %rdx, %rax
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %edx
addl %ecx, %edx
addl $0x40, %edx
retq
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_:
mov rax, [rdi]
mov ecx, eax
shr rax, 20h
mov r8, [rsi]
mov edx, r8d
shr r8, 20h
mov r9, rdx
imul r9, rcx
imul rcx, r8
imul rdx, rax
imul r8, rax
shr r9, 20h
mov r10d, ecx
add r10, r9
shr rcx, 20h
mov eax, edx
add rax, r10
shr rdx, 20h
add rdx, r8
add rdx, rcx
sub rax, 0FFFFFFFF80000000h
shr rax, 20h
add rax, rdx
mov ecx, [rdi+8]
mov edx, [rsi+8]
add edx, ecx
add edx, 40h ; '@'
retn
|
unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2)
{
long long v2; // rcx
v2 = (unsigned int)*a1;
return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32)
+ HIDWORD(*a1) * HIDWORD(*a2)
+ ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32)
+ ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32)
+ (unsigned int)(HIDWORD(*a2) * v2)
+ (unsigned int)(HIDWORD(*a1) * *a2)
+ 0x80000000) >> 32);
}
|
mul:
MOV RAX,qword ptr [RDI]
MOV ECX,EAX
SHR RAX,0x20
MOV R8,qword ptr [RSI]
MOV EDX,R8D
SHR R8,0x20
MOV R9,RDX
IMUL R9,RCX
IMUL RCX,R8
IMUL RDX,RAX
IMUL R8,RAX
SHR R9,0x20
MOV R10D,ECX
ADD R10,R9
SHR RCX,0x20
MOV EAX,EDX
ADD RAX,R10
SHR RDX,0x20
ADD RDX,R8
ADD RDX,RCX
SUB RAX,-0x80000000
SHR RAX,0x20
ADD RAX,RDX
MOV ECX,dword ptr [RDI + 0x8]
MOV EDX,dword ptr [RSI + 0x8]
ADD EDX,ECX
ADD EDX,0x40
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp
const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */
int1 [16]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [16];
uVar2 = *(ulong *)param_1 & 0xffffffff;
uVar1 = *(ulong *)param_1 >> 0x20;
uVar4 = *(ulong *)param_2 & 0xffffffff;
uVar6 = *(ulong *)param_2 >> 0x20;
uVar3 = uVar2 * uVar6;
uVar5 = uVar4 * uVar1;
auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000
>> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20);
auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40;
auVar7._12_4_ = 0;
return auVar7;
}
|
|
12,246
|
common_log_entry::print(_IO_FILE*) const
|
monkey531[P]llama/common/log.cpp
|
void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
}
|
O0
|
cpp
|
common_log_entry::print(_IO_FILE*) const:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq $0x0, 0x80(%rsp)
jne 0x19656a
movq 0x78(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x19653a
leaq 0xc5e80(%rip), %rax # 0x25c3b0
cmpl $0x1, (%rax)
jge 0x19653a
jmp 0x196866
movq 0x78(%rsp), %rax
movq 0xc49f2(%rip), %rcx # 0x25af38
movq (%rcx), %rcx
movq %rcx, 0x80(%rsp)
cmpl $0x0, (%rax)
je 0x196568
movq 0xc49e3(%rip), %rax # 0x25af40
movq (%rax), %rax
movq %rax, 0x80(%rsp)
jmp 0x19656a
movq 0x78(%rsp), %rax
cmpl $0x0, (%rax)
je 0x1967d7
movq 0x78(%rsp), %rax
cmpl $0x5, (%rax)
je 0x1967d7
movq 0x78(%rsp), %rax
testb $0x1, 0x4(%rax)
je 0x1967d7
movq 0x78(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x196698
movq 0x80(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0xc5dff(%rip), %rdi # 0x25c3b8
movl $0x5, %esi
callq 0x196e90
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq (%rcx), %rcx
movq %rcx, 0x60(%rsp)
movq 0x8(%rax), %rax
movl $0xf4240, %ecx # imm = 0xF4240
cqto
idivq %rcx
movl $0x3c, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq 0x78(%rsp), %rax
movl %ecx, 0x68(%rsp)
movq 0x8(%rax), %rax
movl $0xf4240, %ecx # imm = 0xF4240
cqto
idivq %rcx
movl $0x3c, %ecx
cqto
idivq %rcx
movq 0x78(%rsp), %rax
movl %edx, %ecx
movl %ecx, 0x6c(%rsp)
movq 0x8(%rax), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movq 0x78(%rsp), %rax
movl %edx, %ecx
movl %ecx, 0x70(%rsp)
movq 0x8(%rax), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movl %edx, %eax
movl %eax, 0x74(%rsp)
leaq 0xc5d60(%rip), %rdi # 0x25c3b8
xorl %eax, %eax
movl %eax, %esi
callq 0x196e90
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rdx
movl 0x68(%rsp), %ecx
movl 0x6c(%rsp), %r8d
movl 0x70(%rsp), %r9d
movl 0x74(%rsp), %r10d
movq (%rax), %rax
leaq 0x4a79c(%rip), %rsi # 0x1e0e24
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x55270
movq 0x78(%rsp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x50(%rsp)
subl $0x3, %eax
ja 0x1967d3
movq 0x50(%rsp), %rax
leaq 0x4a757(%rip), %rcx # 0x1e0e14
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x80(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0xc5cde(%rip), %rdi # 0x25c3b8
movl $0x3, %esi
callq 0x196e90
movq (%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0xc5cc5(%rip), %rdi # 0x25c3b8
xorl %eax, %eax
movl %eax, %esi
callq 0x196e90
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq (%rax), %rcx
leaq 0x4a72b(%rip), %rsi # 0x1e0e3b
movb $0x0, %al
callq 0x55270
jmp 0x1967d5
movq 0x80(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xc5c88(%rip), %rdi # 0x25c3b8
movl $0x6, %esi
callq 0x196e90
movq 0x38(%rsp), %rdi
movq (%rax), %rdx
leaq 0x4a6f9(%rip), %rsi # 0x1e0e42
leaq 0x3ea46(%rip), %rcx # 0x1d5196
movb $0x0, %al
callq 0x55270
jmp 0x1967d5
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xc5c4b(%rip), %rdi # 0x25c3b8
movl $0x2, %esi
callq 0x196e90
movq 0x30(%rsp), %rdi
movq (%rax), %rdx
leaq 0x4a6c3(%rip), %rsi # 0x1e0e49
leaq 0x3ea09(%rip), %rcx # 0x1d5196
movb $0x0, %al
callq 0x55270
jmp 0x1967d5
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xc5c0e(%rip), %rdi # 0x25c3b8
movl $0x4, %esi
callq 0x196e90
movq 0x28(%rsp), %rdi
movq (%rax), %rdx
leaq 0x4a68d(%rip), %rsi # 0x1e0e50
leaq 0x3e9cc(%rip), %rcx # 0x1d5196
movb $0x0, %al
callq 0x55270
jmp 0x1967d5
jmp 0x1967d5
jmp 0x1967d7
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
addq $0x10, %rdi
callq 0x196eb0
movq 0x20(%rsp), %rdi
movq %rax, %rdx
leaq 0x4d171(%rip), %rsi # 0x1e3972
movb $0x0, %al
callq 0x55270
movq 0x78(%rsp), %rax
cmpl $0x3, (%rax)
je 0x196826
movq 0x78(%rsp), %rax
cmpl $0x4, (%rax)
je 0x196826
movq 0x78(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x196859
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xc5b7e(%rip), %rdi # 0x25c3b8
xorl %eax, %eax
movl %eax, %esi
callq 0x196e90
movq 0x18(%rsp), %rdi
movq (%rax), %rdx
leaq 0x4d120(%rip), %rsi # 0x1e3972
movb $0x0, %al
callq 0x55270
movq 0x80(%rsp), %rdi
callq 0x55760
addq $0x98, %rsp
retq
nop
|
_ZNK16common_log_entry5printEP8_IO_FILE:
sub rsp, 98h
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov rax, [rsp+98h+var_8]
mov [rsp+98h+var_20], rax
mov rax, [rsp+98h+var_10]
mov [rsp+98h+var_18], rax
cmp [rsp+98h+var_18], 0
jnz short loc_19656A
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 1
jnz short loc_19653A
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 1
jge short loc_19653A
jmp loc_196866
loc_19653A:
mov rax, [rsp+98h+var_20]
mov rcx, cs:stdout_ptr
mov rcx, [rcx]
mov [rsp+98h+var_18], rcx
cmp dword ptr [rax], 0
jz short loc_196568
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rsp+98h+var_18], rax
loc_196568:
jmp short $+2
loc_19656A:
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 0
jz loc_1967D7
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 5
jz loc_1967D7
mov rax, [rsp+98h+var_20]
test byte ptr [rax+4], 1
jz loc_1967D7
mov rax, [rsp+98h+var_20]
cmp qword ptr [rax+8], 0
jz loc_196698
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_40], rax
lea rdi, _ZL5g_col; g_col
mov esi, 5
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rcx, rax
mov rax, [rsp+98h+var_20]
mov rcx, [rcx]
mov [rsp+98h+var_38], rcx
mov rax, [rax+8]
mov ecx, offset loc_F4240
cqo
idiv rcx
mov ecx, 3Ch ; '<'
cqo
idiv rcx
mov rcx, rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_30], ecx
mov rax, [rax+8]
mov ecx, offset loc_F4240
cqo
idiv rcx
mov ecx, 3Ch ; '<'
cqo
idiv rcx
mov rax, [rsp+98h+var_20]
mov ecx, edx
mov [rsp+98h+var_2C], ecx
mov rax, [rax+8]
mov ecx, 3E8h
cqo
idiv rcx
mov ecx, 3E8h
cqo
idiv rcx
mov rax, [rsp+98h+var_20]
mov ecx, edx
mov [rsp+98h+var_28], ecx
mov rax, [rax+8]
mov ecx, 3E8h
cqo
idiv rcx
mov eax, edx
mov [rsp+98h+var_24], eax
lea rdi, _ZL5g_col; g_col
xor eax, eax
mov esi, eax
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_40]
mov rdx, [rsp+98h+var_38]
mov ecx, [rsp+98h+var_30]
mov r8d, [rsp+98h+var_2C]
mov r9d, [rsp+98h+var_28]
mov r10d, [rsp+98h+var_24]
mov rax, [rax]
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov [rsp+98h+var_98], r10d
mov [rsp+98h+var_90], rax
mov al, 0
call _fprintf
loc_196698:
mov rax, [rsp+98h+var_20]
mov eax, [rax]
dec eax; switch 4 cases
mov ecx, eax
mov [rsp+98h+var_48], rcx
sub eax, 3
ja def_1966C4; jumptable 00000000001966C4 default case
mov rax, [rsp+98h+var_48]
lea rcx, jpt_1966C4
movsxd rax, ds:(jpt_1966C4 - 1E0E14h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1966C6:
mov rax, [rsp+98h+var_18]; jumptable 00000000001966C4 case 2
mov [rsp+98h+var_58], rax
lea rdi, _ZL5g_col; g_col
mov esi, 3
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rax, [rax]
mov [rsp+98h+var_50], rax
lea rdi, _ZL5g_col; g_col
xor eax, eax
mov esi, eax
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_58]
mov rdx, [rsp+98h+var_50]
mov rcx, [rax]
lea rsi, aSiS; "%sI %s"
mov al, 0
call _fprintf
jmp loc_1967D5
loc_19671C:
mov rax, [rsp+98h+var_18]; jumptable 00000000001966C4 case 3
mov [rsp+98h+var_60], rax
lea rdi, _ZL5g_col; g_col
mov esi, 6
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_60]
mov rdx, [rax]
lea rsi, aSwS; "%sW %s"
lea rcx, aNoteDebugGramm+0CAh; ""
mov al, 0
call _fprintf
jmp short loc_1967D5
loc_196759:
mov rax, [rsp+98h+var_18]; jumptable 00000000001966C4 case 4
mov [rsp+98h+var_68], rax
lea rdi, _ZL5g_col; g_col
mov esi, 2
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_68]
mov rdx, [rax]
lea rsi, aSeS; "%sE %s"
lea rcx, aNoteDebugGramm+0CAh; ""
mov al, 0
call _fprintf
jmp short loc_1967D5
loc_196796:
mov rax, [rsp+98h+var_18]; jumptable 00000000001966C4 case 1
mov [rsp+98h+var_70], rax
lea rdi, _ZL5g_col; g_col
mov esi, 4
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_70]
mov rdx, [rax]
lea rsi, aSdS; "%sD %s"
lea rcx, aNoteDebugGramm+0CAh; ""
mov al, 0
call _fprintf
jmp short loc_1967D5
def_1966C4:
jmp short $+2; jumptable 00000000001966C4 default case
loc_1967D5:
jmp short $+2
loc_1967D7:
mov rdi, [rsp+98h+var_20]
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_78], rax
add rdi, 10h
call _ZNKSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void)
mov rdi, [rsp+98h+var_78]
mov rdx, rax
lea rsi, aSkippingToolWi+20h; "%s"
mov al, 0
call _fprintf
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 3
jz short loc_196826
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 4
jz short loc_196826
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 1
jnz short loc_196859
loc_196826:
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_80], rax
lea rdi, _ZL5g_col; g_col
xor eax, eax
mov esi, eax
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_80]
mov rdx, [rax]
lea rsi, aSkippingToolWi+20h; "%s"
mov al, 0
call _fprintf
loc_196859:
mov rdi, [rsp+98h+var_18]
call _fflush
loc_196866:
add rsp, 98h
retn
|
_DWORD * common_log_entry::print(long long a1, long long a2)
{
_DWORD *result; // rax
_QWORD *v3; // rax
_QWORD *v4; // rax
_QWORD *v5; // rax
long long v6; // rax
_QWORD *v7; // rax
long long v8; // [rsp+48h] [rbp-50h]
long long v9; // [rsp+60h] [rbp-38h]
long long v10; // [rsp+80h] [rbp-18h]
v10 = a2;
if ( !a2 )
{
if ( *(_DWORD *)a1 == 1 )
{
result = common_log_verbosity_thold;
if ( common_log_verbosity_thold[0] < 1 )
return result;
}
v10 = stdout;
if ( *(_DWORD *)a1 )
v10 = stderr;
}
if ( *(_DWORD *)a1 && *(_DWORD *)a1 != 5 && (*(_BYTE *)(a1 + 4) & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 8) )
{
v9 = *(_QWORD *)std::vector<char const*>::operator[](&g_col, 5LL);
std::vector<char const*>::operator[](&g_col, 0LL);
fprintf(v10, "%s%d.%02d.%03d.%03d%s ", v9);
}
switch ( *(_DWORD *)a1 )
{
case 1:
v5 = (_QWORD *)std::vector<char const*>::operator[](&g_col, 4LL);
fprintf(v10, "%sD %s", *v5);
break;
case 2:
v8 = *(_QWORD *)std::vector<char const*>::operator[](&g_col, 3LL);
std::vector<char const*>::operator[](&g_col, 0LL);
fprintf(v10, "%sI %s", v8);
break;
case 3:
v3 = (_QWORD *)std::vector<char const*>::operator[](&g_col, 6LL);
fprintf(v10, "%sW %s", *v3);
break;
case 4:
v4 = (_QWORD *)std::vector<char const*>::operator[](&g_col, 2LL);
fprintf(v10, "%sE %s", *v4);
break;
default:
break;
}
}
v6 = std::vector<char>::data(a1 + 16);
fprintf(v10, "%s", v6);
if ( *(_DWORD *)a1 == 3 || *(_DWORD *)a1 == 4 || *(_DWORD *)a1 == 1 )
{
v7 = (_QWORD *)std::vector<char const*>::operator[](&g_col, 0LL);
fprintf(v10, "%s", *v7);
}
return (_DWORD *)fflush(v10);
}
| |||
12,247
|
common_log_entry::print(_IO_FILE*) const
|
monkey531[P]llama/common/log.cpp
|
void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
}
|
O1
|
cpp
|
common_log_entry::print(_IO_FILE*) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x9d95e
movl (%rbx), %eax
cmpl $0x1, %eax
jne 0x9d947
leaq 0x528b4(%rip), %rcx # 0xf01f0
cmpl $0x0, (%rcx)
jg 0x9d947
popq %rbx
popq %r14
popq %r15
retq
testl %eax, %eax
jne 0x9d954
movq 0x515ce(%rip), %rax # 0xeef20
jmp 0x9d95b
movq 0x5163d(%rip), %rax # 0xeef98
movq (%rax), %r14
movl (%rbx), %eax
testl %eax, %eax
je 0x9dadd
cmpl $0x5, %eax
je 0x9dadd
cmpb $0x1, 0x4(%rbx)
jne 0x9dadd
movq 0x8(%rbx), %r10
testq %r10, %r10
je 0x9da62
movq 0x52869(%rip), %r15 # 0xf01f8
movq 0x28(%r15), %r9
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %r10, %rax
imulq %rcx
movq %rdx, %rcx
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x12, %rcx
movabsq $-0x70d59cc6bc5928d7, %rdx # imm = 0x8F2A633943A6D729
movq %r10, %rax
imulq %rdx
addq %rcx, %r8
leaq (%rdx,%r10), %rcx
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x19, %rcx
addl %eax, %ecx
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
movq %r8, %rax
imulq %rdx
addq %r8, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x5, %rdx
addl %eax, %edx
imull $0x3c, %edx, %eax
subl %eax, %r8d
movabsq $0x20c49ba5e353f7cf, %rsi # imm = 0x20C49BA5E353F7CF
movq %r10, %rax
imulq %rsi
movq %rdx, %r11
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r11
addq %rax, %r11
movq %r11, %rax
imulq %rsi
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
imull $0x3e8, %edx, %eax # imm = 0x3E8
imull $0x3e8, %r11d, %edx # imm = 0x3E8
subl %eax, %r11d
subl %edx, %r10d
leaq 0x2392f(%rip), %rsi # 0xc1378
movq %r14, %rdi
movq %r9, %rdx
movl %r11d, %r9d
xorl %eax, %eax
pushq (%r15)
pushq %r10
callq 0x199c0
addq $0x10, %rsp
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0x9dadd
leaq 0x238f6(%rip), %rcx # 0xc1368
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x52776(%rip), %rax # 0xf01f8
movq 0x20(%rax), %rdx
leaq 0x23917(%rip), %rsi # 0xc13a4
jmp 0x9dab5
movq 0x52762(%rip), %rax # 0xf01f8
movq 0x30(%rax), %rdx
leaq 0x238f5(%rip), %rsi # 0xc1396
jmp 0x9dab5
movq 0x5274e(%rip), %rax # 0xf01f8
movq 0x10(%rax), %rdx
leaq 0x238e8(%rip), %rsi # 0xc139d
leaq 0x18180(%rip), %rcx # 0xb5c3c
jmp 0x9dad3
movq 0x52733(%rip), %rax # 0xf01f8
movq (%rax), %rcx
movq 0x18(%rax), %rdx
leaq 0x238bc(%rip), %rsi # 0xc138f
movq %r14, %rdi
xorl %eax, %eax
callq 0x199c0
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x19750
movl (%rbx), %eax
cmpl $0x4, %eax
ja 0x9db0c
movl $0x1a, %ecx
btl %eax, %ecx
jae 0x9db0c
movq 0x526f7(%rip), %rax # 0xf01f8
movq (%rax), %rdi
movq %r14, %rsi
callq 0x19750
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x197c0
nop
|
_ZNK16common_log_entry5printEP8_IO_FILE:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
test rsi, rsi
jnz short loc_9D95E
mov eax, [rbx]
cmp eax, 1
jnz short loc_9D947
lea rcx, common_log_verbosity_thold
cmp dword ptr [rcx], 0
jg short loc_9D947
pop rbx
pop r14
pop r15
retn
loc_9D947:
test eax, eax
jnz short loc_9D954
mov rax, cs:stdout_ptr
jmp short loc_9D95B
loc_9D954:
mov rax, cs:stderr_ptr
loc_9D95B:
mov r14, [rax]
loc_9D95E:
mov eax, [rbx]
test eax, eax
jz def_9DA79; jumptable 000000000009DA79 default case
cmp eax, 5
jz def_9DA79; jumptable 000000000009DA79 default case
cmp byte ptr [rbx+4], 1
jnz def_9DA79; jumptable 000000000009DA79 default case
mov r10, [rbx+8]
test r10, r10
jz loc_9DA62
mov r15, cs:_ZL5g_col; g_col
mov r9, [r15+28h]
mov rcx, 431BDE82D7B634DBh
mov rax, r10
imul rcx
mov rcx, rdx
mov r8, rdx
shr r8, 3Fh
sar rcx, 12h
mov rdx, 8F2A633943A6D729h
mov rax, r10
imul rdx
add r8, rcx
lea rcx, [rdx+r10]
mov rax, rcx
shr rax, 3Fh
shr rcx, 19h
add ecx, eax
mov rdx, 8888888888888889h
mov rax, r8
imul rdx
add rdx, r8
mov rax, rdx
shr rax, 3Fh
shr rdx, 5
add edx, eax
imul eax, edx, 3Ch ; '<'
sub r8d, eax
mov rsi, 20C49BA5E353F7CFh
mov rax, r10
imul rsi
mov r11, rdx
mov rax, rdx
shr rax, 3Fh
sar r11, 7
add r11, rax
mov rax, r11
imul rsi
mov rax, rdx
shr rax, 3Fh
shr rdx, 7
add edx, eax
imul eax, edx, 3E8h
imul edx, r11d, 3E8h
sub r11d, eax
sub r10d, edx
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov rdi, r14
mov rdx, r9
mov r9d, r11d
xor eax, eax
push qword ptr [r15]
push r10
call _fprintf
add rsp, 10h
loc_9DA62:
mov eax, [rbx]
dec eax; switch 4 cases
cmp eax, 3
ja short def_9DA79; jumptable 000000000009DA79 default case
lea rcx, jpt_9DA79
movsxd rax, ds:(jpt_9DA79 - 0C1368h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9DA7B:
mov rax, cs:_ZL5g_col; jumptable 000000000009DA79 case 1
mov rdx, [rax+20h]
lea rsi, aSdS; "%sD %s"
jmp short loc_9DAB5
loc_9DA8F:
mov rax, cs:_ZL5g_col; jumptable 000000000009DA79 case 3
mov rdx, [rax+30h]
lea rsi, aSwS; "%sW %s"
jmp short loc_9DAB5
loc_9DAA3:
mov rax, cs:_ZL5g_col; jumptable 000000000009DA79 case 4
mov rdx, [rax+10h]
lea rsi, aSeS; "%sE %s"
loc_9DAB5:
lea rcx, aNoteDebugGramm+0CAh; ""
jmp short loc_9DAD3
loc_9DABE:
mov rax, cs:_ZL5g_col; jumptable 000000000009DA79 case 2
mov rcx, [rax]
mov rdx, [rax+18h]
lea rsi, aSiS; "%sI %s"
loc_9DAD3:
mov rdi, r14
xor eax, eax
call _fprintf
def_9DA79:
mov rdi, [rbx+10h]; jumptable 000000000009DA79 default case
mov rsi, r14
call _fputs
mov eax, [rbx]
cmp eax, 4
ja short loc_9DB0C
mov ecx, 1Ah
bt ecx, eax
jnb short loc_9DB0C
mov rax, cs:_ZL5g_col; g_col
mov rdi, [rax]
mov rsi, r14
call _fputs
loc_9DB0C:
mov rdi, r14
pop rbx
pop r14
pop r15
jmp _fflush
|
long long common_log_entry::print(unsigned int *a1, long long a2)
{
long long v2; // r14
long long result; // rax
long long *v4; // rax
long long v5; // r10
long long v6; // rdx
const char *v7; // rsi
char *v8; // rcx
int v9; // ecx
v2 = a2;
if ( !a2 )
{
result = *a1;
if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 )
return result;
if ( (_DWORD)result )
v4 = (long long *)&stderr;
else
v4 = (long long *)&stdout;
v2 = *v4;
}
if ( *a1 && *a1 != 5 && *((_BYTE *)a1 + 4) == 1 )
{
v5 = *((_QWORD *)a1 + 1);
if ( v5 )
fprintf(
v2,
"%s%d.%02d.%03d.%03d%s ",
*(const char **)(g_col + 40),
(int)v5 / 60000000,
(int)(v5 / 1000000) % 60,
(int)(v5 / 1000) % 1000,
v5 % 1000,
*(const char **)g_col);
switch ( *a1 )
{
case 1u:
v6 = *(_QWORD *)(g_col + 32);
v7 = "%sD %s";
goto LABEL_17;
case 2u:
v8 = *(char **)g_col;
v6 = *(_QWORD *)(g_col + 24);
v7 = "%sI %s";
goto LABEL_19;
case 3u:
v6 = *(_QWORD *)(g_col + 48);
v7 = "%sW %s";
goto LABEL_17;
case 4u:
v6 = *(_QWORD *)(g_col + 16);
v7 = "%sE %s";
LABEL_17:
v8 = "";
LABEL_19:
fprintf(v2, v7, v6, v8);
break;
default:
break;
}
}
fputs(*((_QWORD *)a1 + 2), v2);
if ( *a1 <= 4 )
{
v9 = 26;
if ( _bittest(&v9, *a1) )
fputs(*(_QWORD *)g_col, v2);
}
return fflush(v2);
}
|
print:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
TEST RSI,RSI
JNZ 0x0019d95e
MOV EAX,dword ptr [RBX]
CMP EAX,0x1
JNZ 0x0019d947
LEA RCX,[0x1f01f0]
CMP dword ptr [RCX],0x0
JG 0x0019d947
POP RBX
POP R14
POP R15
RET
LAB_0019d947:
TEST EAX,EAX
JNZ 0x0019d954
MOV RAX,qword ptr [0x001eef20]
JMP 0x0019d95b
LAB_0019d954:
MOV RAX,qword ptr [0x001eef98]
LAB_0019d95b:
MOV R14,qword ptr [RAX]
LAB_0019d95e:
MOV EAX,dword ptr [RBX]
TEST EAX,EAX
JZ 0x0019dadd
CMP EAX,0x5
JZ 0x0019dadd
CMP byte ptr [RBX + 0x4],0x1
JNZ 0x0019dadd
MOV R10,qword ptr [RBX + 0x8]
TEST R10,R10
JZ 0x0019da62
MOV R15,qword ptr [0x001f01f8]
MOV R9,qword ptr [R15 + 0x28]
MOV RCX,0x431bde82d7b634db
MOV RAX,R10
IMUL RCX
MOV RCX,RDX
MOV R8,RDX
SHR R8,0x3f
SAR RCX,0x12
MOV RDX,-0x70d59cc6bc5928d7
MOV RAX,R10
IMUL RDX
ADD R8,RCX
LEA RCX,[RDX + R10*0x1]
MOV RAX,RCX
SHR RAX,0x3f
SHR RCX,0x19
ADD ECX,EAX
MOV RDX,-0x7777777777777777
MOV RAX,R8
IMUL RDX
ADD RDX,R8
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x5
ADD EDX,EAX
IMUL EAX,EDX,0x3c
SUB R8D,EAX
MOV RSI,0x20c49ba5e353f7cf
MOV RAX,R10
IMUL RSI
MOV R11,RDX
MOV RAX,RDX
SHR RAX,0x3f
SAR R11,0x7
ADD R11,RAX
MOV RAX,R11
IMUL RSI
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x7
ADD EDX,EAX
IMUL EAX,EDX,0x3e8
IMUL EDX,R11D,0x3e8
SUB R11D,EAX
SUB R10D,EDX
LEA RSI,[0x1c1378]
MOV RDI,R14
MOV RDX,R9
MOV R9D,R11D
XOR EAX,EAX
PUSH qword ptr [R15]
PUSH R10
CALL 0x001199c0
ADD RSP,0x10
LAB_0019da62:
MOV EAX,dword ptr [RBX]
DEC EAX
CMP EAX,0x3
JA 0x0019dadd
LEA RCX,[0x1c1368]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [0x001f01f8]
MOV RDX,qword ptr [RAX + 0x20]
LEA RSI,[0x1c13a4]
JMP 0x0019dab5
caseD_3:
MOV RAX,qword ptr [0x001f01f8]
MOV RDX,qword ptr [RAX + 0x30]
LEA RSI,[0x1c1396]
JMP 0x0019dab5
caseD_4:
MOV RAX,qword ptr [0x001f01f8]
MOV RDX,qword ptr [RAX + 0x10]
LEA RSI,[0x1c139d]
LAB_0019dab5:
LEA RCX,[0x1b5c3c]
JMP 0x0019dad3
caseD_2:
MOV RAX,qword ptr [0x001f01f8]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x18]
LEA RSI,[0x1c138f]
LAB_0019dad3:
MOV RDI,R14
XOR EAX,EAX
CALL 0x001199c0
default:
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x00119750
MOV EAX,dword ptr [RBX]
CMP EAX,0x4
JA 0x0019db0c
MOV ECX,0x1a
BT ECX,EAX
JNC 0x0019db0c
MOV RAX,qword ptr [0x001f01f8]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x00119750
LAB_0019db0c:
MOV RDI,R14
POP RBX
POP R14
POP R15
JMP 0x001197c0
|
/* common_log_entry::print(_IO_FILE*) const */
void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int8 *puVar4;
char *pcVar5;
int8 uVar6;
char *__format;
int iVar7;
if (param_1 == (_IO_FILE *)0x0) {
if ((*(int *)this == 1) && (common_log_verbosity_thold < 1)) {
return;
}
puVar4 = (int8 *)PTR_stderr_001eef98;
if (*(int *)this == 0) {
puVar4 = (int8 *)PTR_stdout_001eef20;
}
param_1 = (_IO_FILE *)*puVar4;
}
if (((*(int *)this == 0) || (*(int *)this == 5)) || (this[4] != (common_log_entry)0x1))
goto switchD_0019da79_default;
lVar1 = *(long *)(this + 8);
if (lVar1 != 0) {
auVar3 = SEXT816(lVar1 / 1000000) * ZEXT816(0x8888888888888889);
auVar2 = SEXT816(lVar1 / 1000) * SEXT816(0x20c49ba5e353f7cf);
iVar7 = (int)(lVar1 / 1000);
fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5],
(ulong)(uint)((int)(SUB168(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),8) >> 0x19) -
(SUB164(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),0xc) >> 0x1f)),
(ulong)(uint)((int)(lVar1 / 1000000) +
((int)(auVar3._8_8_ >> 5) - (auVar3._12_4_ >> 0x1f)) * -0x3c),
(ulong)(uint)(iVar7 + ((int)(auVar2._8_8_ >> 7) - (auVar2._12_4_ >> 0x1f)) * -1000),
(ulong)(uint)((int)lVar1 + iVar7 * -1000),*g_col);
}
switch(*(int4 *)this) {
case 1:
uVar6 = g_col[4];
__format = "%sD %s";
break;
case 2:
pcVar5 = (char *)*g_col;
uVar6 = g_col[3];
__format = "%sI %s";
goto LAB_0019dad3;
case 3:
uVar6 = g_col[6];
__format = "%sW %s";
break;
case 4:
uVar6 = g_col[2];
__format = "%sE %s";
break;
default:
goto switchD_0019da79_default;
}
pcVar5 = "";
LAB_0019dad3:
fprintf(param_1,__format,uVar6,pcVar5);
switchD_0019da79_default:
fputs(*(char **)(this + 0x10),param_1);
if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) {
fputs((char *)*g_col,param_1);
}
fflush(param_1);
return;
}
|
|
12,248
|
common_log_entry::print(_IO_FILE*) const
|
monkey531[P]llama/common/log.cpp
|
void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
}
|
O2
|
cpp
|
common_log_entry::print(_IO_FILE*) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
testq %rsi, %rsi
jne 0x84463
cmpl $0x1, %eax
jne 0x8444c
leaq 0x58dd1(%rip), %rcx # 0xdd210
cmpl $0x0, (%rcx)
jg 0x8444c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testl %eax, %eax
jne 0x84459
movq 0x57ad9(%rip), %rcx # 0xdbf30
jmp 0x84460
movq 0x57b30(%rip), %rcx # 0xdbf90
movq (%rcx), %r14
testl %eax, %eax
je 0x8457b
cmpl $0x5, %eax
je 0x8457b
cmpb $0x1, 0x4(%rbx)
jne 0x8457b
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x84502
movq 0x58d8a(%rip), %rax # 0xdd218
movq (%rax), %r11
movq 0x28(%rax), %rcx
movl $0xf4240, %edi # imm = 0xF4240
movq %rsi, %rax
cqto
idivq %rdi
movq %rax, %rdi
movl $0x3938700, %r8d # imm = 0x3938700
movq %rsi, %rax
cqto
idivq %r8
movq %rax, %r8
pushq $0x3c
popq %r9
movq %rdi, %rax
cqto
idivq %r9
movq %rdx, %r9
movl $0x3e8, %edi # imm = 0x3E8
movq %rsi, %rax
cqto
idivq %rdi
movq %rdx, %r10
cqto
idivq %rdi
movq %rdx, %rax
leaq 0x1be84(%rip), %rsi # 0xa0368
movq %r14, %rdi
movq %rcx, %rdx
movl %r8d, %ecx
movl %r9d, %r8d
movl %eax, %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x219e0
popq %rcx
popq %rdx
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0x8457b
leaq 0x1be48(%rip), %rcx # 0xa0358
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x58cf8(%rip), %rax # 0xdd218
movq 0x20(%rax), %rdx
leaq 0x1be69(%rip), %rsi # 0xa0394
jmp 0x84553
movq 0x58ce4(%rip), %rax # 0xdd218
movq 0x30(%rax), %rdx
leaq 0x1be47(%rip), %rsi # 0xa0386
jmp 0x84553
movq 0x58cd0(%rip), %rax # 0xdd218
movq 0x10(%rax), %rdx
leaq 0x1be3a(%rip), %rsi # 0xa038d
leaq 0x106e2(%rip), %rcx # 0x94c3c
jmp 0x84571
movq 0x58cb5(%rip), %rax # 0xdd218
movq (%rax), %rcx
movq 0x18(%rax), %rdx
leaq 0x1be0e(%rip), %rsi # 0xa037f
movq %r14, %rdi
xorl %eax, %eax
callq 0x219e0
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x21780
movl (%rbx), %eax
cmpl $0x4, %eax
ja 0x845a8
pushq $0x1a
popq %rcx
btl %eax, %ecx
jae 0x845a8
movq 0x58c7b(%rip), %rax # 0xdd218
movq (%rax), %rdi
movq %r14, %rsi
callq 0x21780
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x217e0
nop
|
_ZNK16common_log_entry5printEP8_IO_FILE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov eax, [rdi]
test rsi, rsi
jnz short loc_84463
cmp eax, 1
jnz short loc_8444C
lea rcx, common_log_verbosity_thold
cmp dword ptr [rcx], 0
jg short loc_8444C
add rsp, 8
pop rbx
pop r14
retn
loc_8444C:
test eax, eax
jnz short loc_84459
mov rcx, cs:stdout_ptr
jmp short loc_84460
loc_84459:
mov rcx, cs:stderr_ptr
loc_84460:
mov r14, [rcx]
loc_84463:
test eax, eax
jz def_84517; jumptable 0000000000084517 default case
cmp eax, 5
jz def_84517; jumptable 0000000000084517 default case
cmp byte ptr [rbx+4], 1
jnz def_84517; jumptable 0000000000084517 default case
mov rsi, [rbx+8]
test rsi, rsi
jz short loc_84502
mov rax, cs:_ZL5g_col; g_col
mov r11, [rax]
mov rcx, [rax+28h]
mov edi, 0F4240h
mov rax, rsi
cqo
idiv rdi
mov rdi, rax
mov r8d, 3938700h
mov rax, rsi
cqo
idiv r8
mov r8, rax
push 3Ch ; '<'
pop r9
mov rax, rdi
cqo
idiv r9
mov r9, rdx
mov edi, 3E8h
mov rax, rsi
cqo
idiv rdi
mov r10, rdx
cqo
idiv rdi
mov rax, rdx
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov rdi, r14
mov rdx, rcx
mov ecx, r8d
mov r8d, r9d
mov r9d, eax
xor eax, eax
push r11
push r10
call _fprintf
pop rcx
pop rdx
mov eax, [rbx]
loc_84502:
dec eax; switch 4 cases
cmp eax, 3
ja short def_84517; jumptable 0000000000084517 default case
lea rcx, jpt_84517
movsxd rax, ds:(jpt_84517 - 0A0358h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_84519:
mov rax, cs:_ZL5g_col; jumptable 0000000000084517 case 1
mov rdx, [rax+20h]
lea rsi, aSdS; "%sD %s"
jmp short loc_84553
loc_8452D:
mov rax, cs:_ZL5g_col; jumptable 0000000000084517 case 3
mov rdx, [rax+30h]
lea rsi, aSwS; "%sW %s"
jmp short loc_84553
loc_84541:
mov rax, cs:_ZL5g_col; jumptable 0000000000084517 case 4
mov rdx, [rax+10h]
lea rsi, aSeS; "%sE %s"
loc_84553:
lea rcx, aNoteDebugGramm+0CAh; ""
jmp short loc_84571
loc_8455C:
mov rax, cs:_ZL5g_col; jumptable 0000000000084517 case 2
mov rcx, [rax]
mov rdx, [rax+18h]
lea rsi, aSiS; "%sI %s"
loc_84571:
mov rdi, r14
xor eax, eax
call _fprintf
def_84517:
mov rdi, [rbx+10h]; jumptable 0000000000084517 default case
mov rsi, r14
call _fputs
mov eax, [rbx]
cmp eax, 4
ja short loc_845A8
push 1Ah
pop rcx
bt ecx, eax
jnb short loc_845A8
mov rax, cs:_ZL5g_col; g_col
mov rdi, [rax]
mov rsi, r14
call _fputs
loc_845A8:
mov rdi, r14
add rsp, 8
pop rbx
pop r14
jmp _fflush
|
long long common_log_entry::print(unsigned int *a1, long long a2)
{
long long v2; // r14
long long result; // rax
long long *v4; // rcx
long long v5; // rsi
long long v6; // rdx
const char *v7; // rsi
char *v8; // rcx
int v9; // ecx
v2 = a2;
result = *a1;
if ( !a2 )
{
if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 )
return result;
if ( (_DWORD)result )
v4 = (long long *)&stderr;
else
v4 = (long long *)&stdout;
v2 = *v4;
}
if ( (_DWORD)result && (_DWORD)result != 5 && *((_BYTE *)a1 + 4) == 1 )
{
v5 = *((_QWORD *)a1 + 1);
if ( v5 )
{
fprintf(
v2,
"%s%d.%02d.%03d.%03d%s ",
*(const char **)(g_col + 40),
v5 / 60000000,
v5 / 1000000 % 60,
v5 / 1000 % 1000,
v5 % 1000,
*(const char **)g_col);
LODWORD(result) = *a1;
}
switch ( (int)result )
{
case 1:
v6 = *(_QWORD *)(g_col + 32);
v7 = "%sD %s";
goto LABEL_17;
case 2:
v8 = *(char **)g_col;
v6 = *(_QWORD *)(g_col + 24);
v7 = "%sI %s";
goto LABEL_19;
case 3:
v6 = *(_QWORD *)(g_col + 48);
v7 = "%sW %s";
goto LABEL_17;
case 4:
v6 = *(_QWORD *)(g_col + 16);
v7 = "%sE %s";
LABEL_17:
v8 = "";
LABEL_19:
fprintf(v2, v7, v6, v8);
break;
default:
break;
}
}
fputs(*((_QWORD *)a1 + 2), v2);
if ( *a1 <= 4 )
{
v9 = 26;
if ( _bittest(&v9, *a1) )
fputs(*(_QWORD *)g_col, v2);
}
return fflush(v2);
}
|
print:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
TEST RSI,RSI
JNZ 0x00184463
CMP EAX,0x1
JNZ 0x0018444c
LEA RCX,[0x1dd210]
CMP dword ptr [RCX],0x0
JG 0x0018444c
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0018444c:
TEST EAX,EAX
JNZ 0x00184459
MOV RCX,qword ptr [0x001dbf30]
JMP 0x00184460
LAB_00184459:
MOV RCX,qword ptr [0x001dbf90]
LAB_00184460:
MOV R14,qword ptr [RCX]
LAB_00184463:
TEST EAX,EAX
JZ 0x0018457b
CMP EAX,0x5
JZ 0x0018457b
CMP byte ptr [RBX + 0x4],0x1
JNZ 0x0018457b
MOV RSI,qword ptr [RBX + 0x8]
TEST RSI,RSI
JZ 0x00184502
MOV RAX,qword ptr [0x001dd218]
MOV R11,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x28]
MOV EDI,0xf4240
MOV RAX,RSI
CQO
IDIV RDI
MOV RDI,RAX
MOV R8D,0x3938700
MOV RAX,RSI
CQO
IDIV R8
MOV R8,RAX
PUSH 0x3c
POP R9
MOV RAX,RDI
CQO
IDIV R9
MOV R9,RDX
MOV EDI,0x3e8
MOV RAX,RSI
CQO
IDIV RDI
MOV R10,RDX
CQO
IDIV RDI
MOV RAX,RDX
LEA RSI,[0x1a0368]
MOV RDI,R14
MOV RDX,RCX
MOV ECX,R8D
MOV R8D,R9D
MOV R9D,EAX
XOR EAX,EAX
PUSH R11
PUSH R10
CALL 0x001219e0
POP RCX
POP RDX
MOV EAX,dword ptr [RBX]
LAB_00184502:
DEC EAX
CMP EAX,0x3
JA 0x0018457b
LEA RCX,[0x1a0358]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [0x001dd218]
MOV RDX,qword ptr [RAX + 0x20]
LEA RSI,[0x1a0394]
JMP 0x00184553
caseD_3:
MOV RAX,qword ptr [0x001dd218]
MOV RDX,qword ptr [RAX + 0x30]
LEA RSI,[0x1a0386]
JMP 0x00184553
caseD_4:
MOV RAX,qword ptr [0x001dd218]
MOV RDX,qword ptr [RAX + 0x10]
LEA RSI,[0x1a038d]
LAB_00184553:
LEA RCX,[0x194c3c]
JMP 0x00184571
caseD_2:
MOV RAX,qword ptr [0x001dd218]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x18]
LEA RSI,[0x1a037f]
LAB_00184571:
MOV RDI,R14
XOR EAX,EAX
CALL 0x001219e0
default:
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x00121780
MOV EAX,dword ptr [RBX]
CMP EAX,0x4
JA 0x001845a8
PUSH 0x1a
POP RCX
BT ECX,EAX
JNC 0x001845a8
MOV RAX,qword ptr [0x001dd218]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x00121780
LAB_001845a8:
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001217e0
|
/* common_log_entry::print(_IO_FILE*) const */
void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1)
{
long lVar1;
int iVar2;
int8 *puVar3;
char *pcVar4;
int8 uVar5;
char *__format;
iVar2 = *(int *)this;
if (param_1 == (_IO_FILE *)0x0) {
if ((iVar2 == 1) && (common_log_verbosity_thold < 1)) {
return;
}
puVar3 = (int8 *)PTR_stderr_001dbf90;
if (iVar2 == 0) {
puVar3 = (int8 *)PTR_stdout_001dbf30;
}
param_1 = (_IO_FILE *)*puVar3;
}
if (((iVar2 == 0) || (iVar2 == 5)) || (this[4] != (common_log_entry)0x1))
goto switchD_00184517_default;
lVar1 = *(long *)(this + 8);
if (lVar1 != 0) {
fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5],lVar1 / 60000000 & 0xffffffff,
(lVar1 / 1000000) % 0x3c & 0xffffffff,(lVar1 / 1000) % 1000 & 0xffffffff,lVar1 % 1000,
*g_col);
iVar2 = *(int *)this;
}
switch(iVar2) {
case 1:
uVar5 = g_col[4];
__format = "%sD %s";
break;
case 2:
pcVar4 = (char *)*g_col;
uVar5 = g_col[3];
__format = "%sI %s";
goto LAB_00184571;
case 3:
uVar5 = g_col[6];
__format = "%sW %s";
break;
case 4:
uVar5 = g_col[2];
__format = "%sE %s";
break;
default:
goto switchD_00184517_default;
}
pcVar4 = "";
LAB_00184571:
fprintf(param_1,__format,uVar5,pcVar4);
switchD_00184517_default:
fputs(*(char **)(this + 0x10),param_1);
if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) {
fputs((char *)*g_col,param_1);
}
fflush(param_1);
return;
}
|
|
12,249
|
double minco::MINCO_op<3, 3, 1>::getEnergyPartialGradByTimes_edge_final<0, 0, 1>(Eigen::Matrix<double, -1, 3, 0, -1, 3> const&, Eigen::Matrix<double, 6, 1, 0, 6, 1> const&, int, std::integer_sequence<int, 0, 1>)
|
zusiliang[P]myMINCO/minco.hpp
|
static inline double getEnergyPartialGradByTimes_edge_final(const C_Type &c, const T_Type &T, const int Ti, int_sequence<j...>)
{
return ((
(double)perm<s + i, s>::val * perm<s + i + j + 1, s>::val * c.row((2 * Ti + 1) * s + i).dot(c.row((2 * Ti + 1) * s + i + j + 1)) * T_op::template get_pow_T<2 * i + j + 1>(T, Ti)
) + ... + 0);
}
|
O2
|
cpp
|
double minco::MINCO_op<3, 3, 1>::getEnergyPartialGradByTimes_edge_final<0, 0, 1>(Eigen::Matrix<double, -1, 3, 0, -1, 3> const&, Eigen::Matrix<double, 6, 1, 0, 6, 1> const&, int, std::integer_sequence<int, 0, 1>):
pushq %rbp
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %rbx
imull $0x6, %edx, %ecx
leal 0x4(%rcx), %eax
movslq %eax, %rdx
movq (%rdi), %rsi
leaq (%rsi,%rdx,8), %r8
leaq 0x38(%rsp), %rax
movq %r8, (%rax)
movq %rdi, 0x10(%rax)
movq %rdx, 0x18(%rax)
andq $0x0, 0x20(%rax)
pushq $0x1
popq %rdx
movq %rdx, 0x28(%rax)
addl $0x5, %ecx
movslq %ecx, %rcx
leaq (%rsi,%rcx,8), %r8
leaq 0x8(%rsp), %rsi
movq %r8, (%rsi)
movq %rdi, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
andq $0x0, 0x20(%rsi)
movq %rdx, 0x28(%rsi)
movq %rax, %rdi
callq 0x8774
mulsd 0xdaa(%rip), %xmm0 # 0xa0b0
movslq %ebp, %rax
movq (%rbx), %rcx
imulq $0x30, %rax, %rax
mulsd 0x18(%rcx,%rax), %xmm0
xorpd %xmm1, %xmm1
addsd %xmm1, %xmm0
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
|
_ZN5minco8MINCO_opILi3ELi2ELi0EE38getEnergyPartialGradByTimes_edge_finalILi1EJLi0EEEEdRKN5Eigen6MatrixIdLin1ELi2ELi0ELin1ELi2EEERKNS4_IdLi6ELin1ELi0ELi6ELin1EEEiSt16integer_sequenceIiJXspT0_EEE:
push rbp
push rbx
sub rsp, 68h
mov ebp, edx
mov rbx, rsi
imul ecx, edx, 6
lea eax, [rcx+4]
movsxd rdx, eax
mov rsi, [rdi]
lea r8, [rsi+rdx*8]
lea rax, [rsp+78h+var_40]
mov [rax], r8
mov [rax+10h], rdi
mov [rax+18h], rdx
and qword ptr [rax+20h], 0
push 1
pop rdx
mov [rax+28h], rdx
add ecx, 5
movsxd rcx, ecx
lea r8, [rsi+rcx*8]
lea rsi, [rsp+78h+var_70]
mov [rsi], r8
mov [rsi+10h], rdi
mov [rsi+18h], rcx
and qword ptr [rsi+20h], 0
mov [rsi+28h], rdx
mov rdi, rax
call _ZN5Eigen8internal11dot_nocheckINS_5BlockIKNS_6MatrixIdLin1ELi2ELi0ELin1ELi2EEELi1ELi2ELb0EEES6_Lb0EE3runERKNS_10MatrixBaseIS6_EESB_; Eigen::internal::dot_nocheck<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false>,Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false>,false>::run(Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false>> const&,Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false>> const&)
mulsd xmm0, cs:qword_A0B0
movsxd rax, ebp
mov rcx, [rbx]
imul rax, 30h ; '0'
mulsd xmm0, qword ptr [rcx+rax+18h]
xorpd xmm1, xmm1
addsd xmm0, xmm1
add rsp, 68h
pop rbx
pop rbp
retn
|
double minco::MINCO_op<3,2,0>::getEnergyPartialGradByTimes_edge_final<1,0>(
_QWORD *a1,
_QWORD *a2,
int a3,
double a4,
long long a5,
long long a6,
long long a7)
{
int v9; // ecx
long long v10; // rdx
long long v11; // rsi
long long v12; // rcx
__int128 v14; // [rsp+8h] [rbp-70h] BYREF
_QWORD *v15; // [rsp+18h] [rbp-60h]
long long v16; // [rsp+20h] [rbp-58h]
long long v17; // [rsp+28h] [rbp-50h]
long long v18; // [rsp+30h] [rbp-48h]
__int128 v19; // [rsp+38h] [rbp-40h] BYREF
_QWORD *v20; // [rsp+48h] [rbp-30h]
long long v21; // [rsp+50h] [rbp-28h]
long long v22; // [rsp+58h] [rbp-20h]
long long v23; // [rsp+60h] [rbp-18h]
v9 = 6 * a3;
v10 = 6 * a3 + 4;
v11 = *a1;
*(_QWORD *)&v19 = *a1 + 8 * v10;
v20 = a1;
v21 = v10;
v22 = 0LL;
v23 = 1LL;
v12 = v9 + 5;
*(_QWORD *)&v14 = v11 + 8 * v12;
v15 = a1;
v16 = v12;
v17 = 0LL;
v18 = 1LL;
Eigen::internal::dot_nocheck<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false>,Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false>,false>::run(
&v19,
&v14,
1LL,
v12,
v14,
a7);
return a4 * 1440.0 * *(double *)(*a2 + 48LL * a3 + 24) + 0.0;
}
|
getEnergyPartialGradByTimes_edge_final<1,0>:
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV EBP,EDX
MOV RBX,RSI
IMUL ECX,EDX,0x6
LEA EAX,[RCX + 0x4]
MOVSXD RDX,EAX
MOV RSI,qword ptr [RDI]
LEA R8,[RSI + RDX*0x8]
LEA RAX,[RSP + 0x38]
MOV qword ptr [RAX],R8
MOV qword ptr [RAX + 0x10],RDI
MOV qword ptr [RAX + 0x18],RDX
AND qword ptr [RAX + 0x20],0x0
PUSH 0x1
POP RDX
MOV qword ptr [RAX + 0x28],RDX
ADD ECX,0x5
MOVSXD RCX,ECX
LEA R8,[RSI + RCX*0x8]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],R8
MOV qword ptr [RSI + 0x10],RDI
MOV qword ptr [RSI + 0x18],RCX
AND qword ptr [RSI + 0x20],0x0
MOV qword ptr [RSI + 0x28],RDX
MOV RDI,RAX
CALL 0x00108774
MULSD XMM0,qword ptr [0x0010a0b0]
MOVSXD RAX,EBP
MOV RCX,qword ptr [RBX]
IMUL RAX,RAX,0x30
MULSD XMM0,qword ptr [RCX + RAX*0x1 + 0x18]
XORPD XMM1,XMM1
ADDSD XMM0,XMM1
ADD RSP,0x68
POP RBX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* double minco::MINCO_op<3, 2, 0>::getEnergyPartialGradByTimes_edge_final<1,
0>(Eigen::Matrix<double, -1, 2, 0, -1, 2> const&, Eigen::Matrix<double, 6, -1, 0, 6, -1> const&,
int, std::integer_sequence<int, 0>) */
double minco::MINCO_op<3,2,0>::getEnergyPartialGradByTimes_edge_final<1,0>
(long *param_1,long *param_2,int param_3)
{
double dVar1;
long local_70 [2];
long *local_60;
long local_58;
int8 local_50;
int8 local_48;
long local_40 [2];
long *local_30;
long local_28;
int8 local_20;
int8 local_18;
local_28 = (long)(param_3 * 6 + 4);
local_40[0] = *param_1 + local_28 * 8;
local_20 = 0;
local_18 = 1;
local_58 = (long)(param_3 * 6 + 5);
local_70[0] = *param_1 + local_58 * 8;
local_50 = 0;
local_48 = 1;
local_60 = param_1;
local_30 = param_1;
dVar1 = (double)Eigen::internal::
dot_nocheck<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>const,1,2,false>,Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>const,1,2,false>,false>
::run((MatrixBase *)local_40,(MatrixBase *)local_70);
return dVar1 * _DAT_0010a0b0 * *(double *)(*param_2 + 0x18 + (long)param_3 * 0x30) + 0.0;
}
|
|
12,250
|
pfs_refine_statement_v1
|
eloqsql/storage/perfschema/pfs.cc
|
PSI_statement_locker*
pfs_refine_statement_v1(PSI_statement_locker *locker,
PSI_statement_key key)
{
PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker);
if (state == NULL)
return NULL;
assert(state->m_class != NULL);
PFS_statement_class *klass;
/* Only refine statements for mutable instrumentation */
klass= reinterpret_cast<PFS_statement_class*> (state->m_class);
assert(klass->is_mutable());
klass= find_statement_class(key);
uint flags= state->m_flags;
if (unlikely(klass == NULL) || !klass->m_enabled)
{
/* pop statement stack */
if (flags & STATE_FLAG_THREAD)
{
PFS_thread *pfs_thread= reinterpret_cast<PFS_thread *> (state->m_thread);
assert(pfs_thread != NULL);
if (pfs_thread->m_events_statements_count > 0)
pfs_thread->m_events_statements_count--;
}
state->m_discarded= true;
return NULL;
}
if ((flags & STATE_FLAG_TIMED) && ! klass->m_timed)
flags= flags & ~STATE_FLAG_TIMED;
if (flags & STATE_FLAG_EVENT)
{
PFS_events_statements *pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement);
assert(pfs != NULL);
/* mutate EVENTS_STATEMENTS_CURRENT.EVENT_NAME */
pfs->m_event.m_class= klass;
}
state->m_class= klass;
state->m_flags= flags;
return reinterpret_cast<PSI_statement_locker*> (state);
}
|
O0
|
cpp
|
pfs_refine_statement_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4a9bb
movq $0x0, -0x8(%rbp)
jmp 0x4aaa2
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %edi
callq 0x3b120
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4a9f9
movq -0x28(%rbp), %rax
testb $0x1, 0x4(%rax)
jne 0x4aa43
movl -0x2c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4aa32
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x14b8(%rax)
jbe 0x4aa30
movq -0x38(%rbp), %rax
movl 0x14b8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x14b8(%rax)
jmp 0x4aa32
movq -0x20(%rbp), %rax
movb $0x1, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x4aaa2
movl -0x2c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4aa61
movq -0x28(%rbp), %rax
testb $0x1, 0x5(%rax)
jne 0x4aa61
movl -0x2c(%rbp), %eax
andl $-0x2, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4aa84
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
pfs_refine_statement_v1:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_4A9BB
mov [rbp+var_8], 0
jmp loc_4AAA2
loc_4A9BB:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov [rbp+var_28], rax
mov edi, [rbp+var_14]; unsigned int
call _Z20find_statement_classj; find_statement_class(uint)
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov [rbp+var_2C], eax
cmp [rbp+var_28], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jnz short loc_4A9F9
mov rax, [rbp+var_28]
test byte ptr [rax+4], 1
jnz short loc_4AA43
loc_4A9F9:
mov eax, [rbp+var_2C]
and eax, 2
cmp eax, 0
jz short loc_4AA32
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
cmp dword ptr [rax+14B8h], 0
jbe short loc_4AA30
mov rax, [rbp+var_38]
mov ecx, [rax+14B8h]
add ecx, 0FFFFFFFFh
mov [rax+14B8h], ecx
loc_4AA30:
jmp short $+2
loc_4AA32:
mov rax, [rbp+var_20]
mov byte ptr [rax], 1
mov [rbp+var_8], 0
jmp short loc_4AAA2
loc_4AA43:
mov eax, [rbp+var_2C]
and eax, 1
cmp eax, 0
jz short loc_4AA61
mov rax, [rbp+var_28]
test byte ptr [rax+5], 1
jnz short loc_4AA61
mov eax, [rbp+var_2C]
and eax, 0FFFFFFFEh
mov [rbp+var_2C], eax
loc_4AA61:
mov eax, [rbp+var_2C]
and eax, 4
cmp eax, 0
jz short loc_4AA84
mov rax, [rbp+var_20]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_40]
mov [rax+30h], rcx
loc_4AA84:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_20]
mov [rax+4], ecx
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_4AAA2:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long pfs_refine_statement_v1(long long a1, unsigned int a2)
{
long long v3; // [rsp+8h] [rbp-38h]
int v4; // [rsp+14h] [rbp-2Ch]
long long statement_class; // [rsp+18h] [rbp-28h]
if ( !a1 )
return 0LL;
statement_class = find_statement_class(a2);
v4 = *(_DWORD *)(a1 + 4);
if ( statement_class && (*(_BYTE *)(statement_class + 4) & 1) != 0 )
{
if ( (v4 & 1) != 0 && (*(_BYTE *)(statement_class + 5) & 1) == 0 )
v4 &= ~1u;
if ( (v4 & 4) != 0 )
*(_QWORD *)(*(_QWORD *)(a1 + 40) + 48LL) = statement_class;
*(_QWORD *)(a1 + 8) = statement_class;
*(_DWORD *)(a1 + 4) = v4;
return a1;
}
else
{
if ( (v4 & 2) != 0 )
{
v3 = *(_QWORD *)(a1 + 16);
if ( *(_DWORD *)(v3 + 5304) )
--*(_DWORD *)(v3 + 5304);
}
*(_BYTE *)a1 = 1;
return 0LL;
}
}
|
pfs_refine_statement_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0014a9bb
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014aaa2
LAB_0014a9bb:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x0013b120
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x2c],EAX
CMP qword ptr [RBP + -0x28],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JNZ 0x0014a9f9
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x0014aa43
LAB_0014a9f9:
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0014aa32
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x14b8],0x0
JBE 0x0014aa30
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x14b8]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x14b8],ECX
LAB_0014aa30:
JMP 0x0014aa32
LAB_0014aa32:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x1
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014aaa2
LAB_0014aa43:
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0014aa61
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x5],0x1
JNZ 0x0014aa61
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xfffffffe
MOV dword ptr [RBP + -0x2c],EAX
LAB_0014aa61:
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0014aa84
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x30],RCX
LAB_0014aa84:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014aaa2:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int1 * pfs_refine_statement_v1(int1 *param_1,uint param_2)
{
long lVar1;
uint local_34;
int1 *local_10;
if (param_1 == (int1 *)0x0) {
local_10 = (int1 *)0x0;
}
else {
lVar1 = find_statement_class(param_2);
local_34 = *(uint *)(param_1 + 4);
if ((lVar1 == 0) || ((*(byte *)(lVar1 + 4) & 1) == 0)) {
if (((local_34 & 2) != 0) &&
(lVar1 = *(long *)(param_1 + 0x10), *(int *)(lVar1 + 0x14b8) != 0)) {
*(int *)(lVar1 + 0x14b8) = *(int *)(lVar1 + 0x14b8) + -1;
}
*param_1 = 1;
local_10 = (int1 *)0x0;
}
else {
if (((local_34 & 1) != 0) && ((*(byte *)(lVar1 + 5) & 1) == 0)) {
local_34 = local_34 & 0xfffffffe;
}
if ((local_34 & 4) != 0) {
*(long *)(*(long *)(param_1 + 0x28) + 0x30) = lVar1;
}
*(long *)(param_1 + 8) = lVar1;
*(uint *)(param_1 + 4) = local_34;
local_10 = param_1;
}
}
return local_10;
}
|
|
12,251
|
PAIRING_Aggregate_PK_in_G2
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/aggregate.c
|
static BLST_ERROR PAIRING_Aggregate_PK_in_G2(PAIRING *ctx,
const POINTonE2_affine *PK,
size_t pk_groupcheck,
const POINTonE1_affine *sig,
size_t sig_groupcheck,
const byte *scalar, size_t nbits,
const void *msg, size_t msg_len,
const void *aug, size_t aug_len)
{
if (ctx->ctrl & AGGR_MIN_PK)
return BLST_AGGR_TYPE_MISMATCH;
ctx->ctrl |= AGGR_MIN_SIG;
/*
* Since we don't know if the signature is individual or aggregated,
* the only sensible thing to do is to skip over infinite one and
* count on the corresponding infinite public key to be rejected,
* in case the signature is non-aggregated that is.
*/
if (sig != NULL && !vec_is_zero(sig, sizeof(*sig))) {
POINTonE1 *S = &ctx->AggrSign.e1;
POINTonE1 P[1];
FROM_AFFINE(P, sig);
if (sig_groupcheck && !POINTonE1_in_G1(P))
return BLST_POINT_NOT_IN_GROUP;
if (ctx->ctrl & AGGR_SIGN_SET) {
if (nbits != 0 && scalar != NULL) {
POINTonE1_mult_w5(P, P, scalar, nbits);
POINTonE1_dadd(S, S, P, NULL);
} else {
POINTonE1_dadd_affine(S, S, sig);
}
} else {
ctx->ctrl |= AGGR_SIGN_SET;
if (nbits != 0 && scalar != NULL)
POINTonE1_mult_w5(S, P, scalar, nbits);
else
vec_copy(S, P, sizeof(P));
}
}
if (PK != NULL) {
unsigned int n;
POINTonE1 H[1];
const void *DST = pairing_get_dst(ctx);
/*
* Reject infinite public keys.
*/
if (vec_is_zero(PK, sizeof(*PK)))
return BLST_PK_IS_INFINITY;
if (pk_groupcheck) {
POINTonE2 P[1];
FROM_AFFINE(P, PK);
if (!POINTonE2_in_G2(P))
return BLST_POINT_NOT_IN_GROUP;
}
if (ctx->ctrl & AGGR_HASH_OR_ENCODE)
Hash_to_G1(H, msg, msg_len, DST, ctx->DST_len, aug, aug_len);
else
Encode_to_G1(H, msg, msg_len, DST, ctx->DST_len, aug, aug_len);
if (nbits != 0 && scalar != NULL)
POINTonE1_mult_w5(H, H, scalar, nbits);
POINTonE1_from_Jacobian(H, H);
n = ctx->nelems;
vec_copy(ctx->Q + n, PK, sizeof(POINTonE2_affine));
vec_copy(ctx->P + n, H, sizeof(POINTonE1_affine));
if (++n == N_MAX) {
if (ctx->ctrl & AGGR_GT_SET) {
vec384fp12 GT;
miller_loop_n(GT, ctx->Q, ctx->P, n);
mul_fp12(ctx->GT, ctx->GT, GT);
} else {
miller_loop_n(ctx->GT, ctx->Q, ctx->P, n);
ctx->ctrl |= AGGR_GT_SET;
}
n = 0;
}
ctx->nelems = n;
}
return BLST_SUCCESS;
}
|
O2
|
c
|
PAIRING_Aggregate_PK_in_G2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp # imm = 0x2E8
movq %r9, -0x30(%rbp)
movl (%rdi), %eax
testb $0x2, %al
jne 0x57275
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
orl $0x1, %eax
movl %eax, (%rdi)
testq %rcx, %rcx
je 0x57240
movq %r8, %r15
pushq $0x60
popq %rsi
movq %r13, %rdi
callq 0x510f5
testq %rax, %rax
je 0x5728e
xorl %r13d, %r13d
testq %r14, %r14
je 0x57279
movq 0x8(%rbx), %rax
leaq 0xc78(%rbx), %r15
cmpq $0x2a, %rax
cmovneq %rax, %r15
movl $0xc0, %esi
movq %r14, %rdi
callq 0x510f5
testq %rax, %rax
je 0x57329
pushq $0x6
jmp 0x57277
pushq $0x4
popq %r13
movl %r13d, %eax
addq $0x2e8, %rsp # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x300(%rbp), %rdi
pushq $0x60
popq %rdx
movq %r13, %rsi
callq 0x51055
movq %r13, %rdi
pushq $0x60
popq %rsi
callq 0x510f5
leaq 0x28a36(%rip), %rdx # 0x7fce8
pushq $0x30
popq %rcx
leaq -0x2a0(%rbp), %rdi
movq %r13, %rsi
movq %rax, %r8
callq 0x51073
testq %r15, %r15
je 0x572e1
leaq -0x300(%rbp), %rdi
callq 0x5333d
testq %rax, %rax
je 0x573a9
leaq 0x258(%rbx), %r15
movl (%rbx), %eax
testb $0x10, %al
jne 0x573b0
orl $0x10, %eax
movl %eax, (%rbx)
movq 0x10(%rbp), %rcx
testq %rcx, %rcx
sete %al
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
sete %sil
orb %al, %sil
jne 0x574ae
leaq -0x300(%rbp), %rsi
movq %r15, %rdi
callq 0x52d67
jmp 0x57240
testq %r12, %r12
je 0x5737b
leaq -0x300(%rbp), %r12
movl $0xc0, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x51055
movl $0xc0, %esi
movq %r14, %rdi
callq 0x510f5
leaq 0x2898f(%rip), %rdx # 0x7fce8
pushq $0x60
popq %rcx
leaq -0x240(%rbp), %rdi
movq %r14, %rsi
movq %rax, %r8
callq 0x51073
movq %r12, %rdi
callq 0x55b00
testq %rax, %rax
je 0x573a9
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %r9
movq 0x20(%rbp), %rdx
movq 0x18(%rbp), %rsi
testb $0x40, (%rbx)
movq 0x10(%rbx), %r8
jne 0x573f5
movq %rax, (%rsp)
leaq -0xc0(%rbp), %rdi
movq %r15, %rcx
callq 0x5328b
jmp 0x57408
pushq $0x3
jmp 0x57277
movq 0x10(%rbp), %rcx
testq %rcx, %rcx
sete %al
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
sete %sil
orb %al, %sil
jne 0x574c7
leaq -0x300(%rbp), %r13
movq %r13, %rdi
movq %r13, %rsi
callq 0x52d67
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x51a8a
jmp 0x57240
movq %rax, (%rsp)
leaq -0xc0(%rbp), %rdi
movq %r15, %rcx
callq 0x532e3
movq 0x10(%rbp), %rcx
testq %rcx, %rcx
sete %al
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
sete %sil
orb %al, %sil
jne 0x57431
leaq -0xc0(%rbp), %rdi
movq %rdi, %rsi
callq 0x52d67
leaq -0xc0(%rbp), %r15
movq %r15, %rdi
movq %r15, %rsi
callq 0x50f03
movl 0x4(%rbx), %r12d
imulq $0xc0, %r12, %rax
leaq (%rbx,%rax), %rdi
addq $0x378, %rdi # imm = 0x378
movl $0xc0, %edx
movq %r14, %rsi
callq 0x51055
imulq $0x60, %r12, %rax
leaq (%rbx,%rax), %rdi
addq $0x978, %rdi # imm = 0x978
pushq $0x60
popq %rdx
movq %r15, %rsi
callq 0x51055
leal 0x1(%r12), %eax
cmpl $0x8, %eax
jne 0x574fd
leaq 0x378(%rbx), %rsi
leaq 0x978(%rbx), %rdx
testb $0x20, (%rbx)
jne 0x574da
leaq 0x18(%rbx), %rdi
pushq $0x8
popq %rcx
callq 0x56653
orb $0x20, (%rbx)
jmp 0x574fb
leaq -0x300(%rbp), %rsi
movl $0x90, %edx
movq %r15, %rdi
callq 0x51055
jmp 0x57240
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x51fc5
jmp 0x57240
leaq -0x300(%rbp), %r14
pushq $0x8
popq %rcx
movq %r14, %rdi
callq 0x56653
leaq 0x18(%rbx), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x55f2f
xorl %eax, %eax
movl %eax, 0x4(%rbx)
jmp 0x57279
|
PAIRING_Aggregate_PK_in_G2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2E8h
mov [rbp+var_30], r9
mov eax, [rdi]
test al, 2
jnz short loc_57275
mov r13, rcx
mov r12, rdx
mov r14, rsi
mov rbx, rdi
or eax, 1
mov [rdi], eax
test rcx, rcx
jz short loc_57240
mov r15, r8
push 60h ; '`'
pop rsi
mov rdi, r13
call vec_is_zero
test rax, rax
jz short loc_5728E
loc_57240:
xor r13d, r13d
test r14, r14
jz short loc_57279
mov rax, [rbx+8]
lea r15, [rbx+0C78h]
cmp rax, 2Ah ; '*'
cmovnz r15, rax
mov esi, 0C0h
mov rdi, r14
call vec_is_zero
test rax, rax
jz loc_57329
push 6
jmp short loc_57277
loc_57275:
push 4
loc_57277:
pop r13
loc_57279:
mov eax, r13d
add rsp, 2E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5728E:
lea rdi, [rbp+var_300]
push 60h ; '`'
pop rdx
mov rsi, r13
call vec_copy
mov rdi, r13
push 60h ; '`'
pop rsi
call vec_is_zero
lea rdx, BLS12_381_Rx
push 30h ; '0'
pop rcx
lea rdi, [rbp+var_2A0]
mov rsi, r13
mov r8, rax
call vec_select
test r15, r15
jz short loc_572E1
lea rdi, [rbp+var_300]
call POINTonE1_in_G1
test rax, rax
jz loc_573A9
loc_572E1:
lea r15, [rbx+258h]
mov eax, [rbx]
test al, 10h
jnz loc_573B0
or eax, 10h
mov [rbx], eax
mov rcx, [rbp+arg_0]
test rcx, rcx
setz al
mov rdx, [rbp+var_30]
test rdx, rdx
setz sil
or sil, al
jnz loc_574AE
lea rsi, [rbp+var_300]
mov rdi, r15
call POINTonE1_mult_w5
jmp loc_57240
loc_57329:
test r12, r12
jz short loc_5737B
lea r12, [rbp+var_300]
mov edx, 0C0h
mov rdi, r12
mov rsi, r14
call vec_copy
mov esi, 0C0h
mov rdi, r14
call vec_is_zero
lea rdx, BLS12_381_Rx
push 60h ; '`'
pop rcx
lea rdi, [rbp+var_240]
mov rsi, r14
mov r8, rax
call vec_select
mov rdi, r12
call POINTonE2_in_G2
test rax, rax
jz short loc_573A9
loc_5737B:
mov rax, [rbp+arg_20]
mov r9, [rbp+arg_18]
mov rdx, [rbp+arg_10]
mov rsi, [rbp+arg_8]
test byte ptr [rbx], 40h
mov r8, [rbx+10h]
jnz short loc_573F5
mov [rsp+310h+var_310], rax
lea rdi, [rbp+var_C0]
mov rcx, r15
call Encode_to_G1
jmp short loc_57408
loc_573A9:
push 3
jmp loc_57277
loc_573B0:
mov rcx, [rbp+arg_0]
test rcx, rcx
setz al
mov rdx, [rbp+var_30]
test rdx, rdx
setz sil
or sil, al
jnz loc_574C7
lea r13, [rbp+var_300]
mov rdi, r13
mov rsi, r13
call POINTonE1_mult_w5
mov rdi, r15
mov rsi, r15
mov rdx, r13
xor ecx, ecx
call POINTonE1_dadd
jmp loc_57240
loc_573F5:
mov [rsp+310h+var_310], rax
lea rdi, [rbp+var_C0]
mov rcx, r15
call Hash_to_G1
loc_57408:
mov rcx, [rbp+arg_0]
test rcx, rcx
setz al
mov rdx, [rbp+var_30]
test rdx, rdx
setz sil
or sil, al
jnz short loc_57431
lea rdi, [rbp+var_C0]
mov rsi, rdi
call POINTonE1_mult_w5
loc_57431:
lea r15, [rbp+var_C0]
mov rdi, r15
mov rsi, r15
call POINTonE1_from_Jacobian
mov r12d, [rbx+4]
imul rax, r12, 0C0h
lea rdi, [rbx+rax]
add rdi, 378h
mov edx, 0C0h
mov rsi, r14
call vec_copy
imul rax, r12, 60h ; '`'
lea rdi, [rbx+rax]
add rdi, 978h
push 60h ; '`'
pop rdx
mov rsi, r15
call vec_copy
lea eax, [r12+1]
cmp eax, 8
jnz short loc_574FD
lea rsi, [rbx+378h]
lea rdx, [rbx+978h]
test byte ptr [rbx], 20h
jnz short loc_574DA
lea rdi, [rbx+18h]
push 8
pop rcx
call miller_loop_n
or byte ptr [rbx], 20h
jmp short loc_574FB
loc_574AE:
lea rsi, [rbp+var_300]
mov edx, 90h
mov rdi, r15
call vec_copy
jmp loc_57240
loc_574C7:
mov rdi, r15
mov rsi, r15
mov rdx, r13
call POINTonE1_dadd_affine
jmp loc_57240
loc_574DA:
lea r14, [rbp+var_300]
push 8
pop rcx
mov rdi, r14
call miller_loop_n
lea rdi, [rbx+18h]
mov rsi, rdi
mov rdx, r14
call mul_fp12
loc_574FB:
xor eax, eax
loc_574FD:
mov [rbx+4], eax
jmp loc_57279
|
long long PAIRING_Aggregate_PK_in_G2(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
_BYTE *a6,
unsigned long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
unsigned int v14; // r13d
long long v15; // r15
unsigned long long is_zero; // rax
unsigned long long v18; // rax
long long v19; // r8
long long v20; // r12
int v21; // eax
long long v22; // rsi
long long v23; // rdx
_BYTE v25[96]; // [rsp+10h] [rbp-300h] BYREF
_BYTE v26[96]; // [rsp+70h] [rbp-2A0h] BYREF
_BYTE v27[384]; // [rsp+D0h] [rbp-240h] BYREF
_BYTE v28[144]; // [rsp+250h] [rbp-C0h] BYREF
_BYTE *v29; // [rsp+2E0h] [rbp-30h]
v29 = a6;
if ( (*(_DWORD *)a1 & 2) != 0 )
return 4;
*(_DWORD *)a1 |= 1u;
if ( a4 && !vec_is_zero(a4, 0x60uLL) )
{
vec_copy((long long)v25, a4, 0x60uLL);
is_zero = vec_is_zero(a4, 0x60uLL);
vec_select((long long)v26, a4, (long long)&BLS12_381_Rx, 0x30uLL, is_zero);
if ( a5 && !POINTonE1_in_G1((long long)v25) )
return 3;
if ( (*(_DWORD *)a1 & 0x10) != 0 )
{
if ( a7 == 0 || v29 == 0LL )
{
POINTonE1_dadd_affine(a1 + 600, a1 + 600, a4);
}
else
{
POINTonE1_mult_w5((long long)v25, (long long)v25, v29, a7);
POINTonE1_dadd(a1 + 600, a1 + 600, (long long)v25, 0LL);
}
}
else
{
*(_DWORD *)a1 |= 0x10u;
if ( a7 == 0 || v29 == 0LL )
vec_copy(a1 + 600, (long long)v25, 0x90uLL);
else
POINTonE1_mult_w5(a1 + 600, (long long)v25, v29, a7);
}
}
v14 = 0;
if ( !a2 )
return v14;
v15 = a1 + 3192;
if ( *(_QWORD *)(a1 + 8) != 42LL )
v15 = *(_QWORD *)(a1 + 8);
if ( vec_is_zero(a2, 0xC0uLL) )
return 6;
if ( a3 )
{
vec_copy((long long)v25, a2, 0xC0uLL);
v18 = vec_is_zero(a2, 0xC0uLL);
vec_select((long long)v27, a2, (long long)&BLS12_381_Rx, 0x60uLL, v18);
if ( !POINTonE2_in_G2((long long)v25) )
return 3;
}
v19 = *(_QWORD *)(a1 + 16);
if ( (*(_BYTE *)a1 & 0x40) != 0 )
Hash_to_G1((long long)v28, a8, a9, v15, v19, a10, a11);
else
Encode_to_G1((long long)v28, a8, a9, v15, v19, a10, a11);
if ( a7 != 0 && v29 != 0LL )
POINTonE1_mult_w5((long long)v28, (long long)v28, v29, a7);
POINTonE1_from_Jacobian((long long)v28, (long long)v28);
v20 = *(unsigned int *)(a1 + 4);
vec_copy(a1 + 192 * v20 + 888, a2, 0xC0uLL);
vec_copy(a1 + 96 * v20 + 2424, (long long)v28, 0x60uLL);
v21 = v20 + 1;
if ( (_DWORD)v20 == 7 )
{
v22 = a1 + 888;
v23 = a1 + 2424;
if ( (*(_BYTE *)a1 & 0x20) != 0 )
{
miller_loop_n((long long)v25, v22, v23, 8LL);
mul_fp12(a1 + 24, a1 + 24, (long long)v25);
}
else
{
miller_loop_n(a1 + 24, v22, v23, 8LL);
*(_BYTE *)a1 |= 0x20u;
}
v21 = 0;
}
*(_DWORD *)(a1 + 4) = v21;
return v14;
}
|
PAIRING_Aggregate_PK_in_G2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2e8
MOV qword ptr [RBP + -0x30],R9
MOV EAX,dword ptr [RDI]
TEST AL,0x2
JNZ 0x00157275
MOV R13,RCX
MOV R12,RDX
MOV R14,RSI
MOV RBX,RDI
OR EAX,0x1
MOV dword ptr [RDI],EAX
TEST RCX,RCX
JZ 0x00157240
MOV R15,R8
PUSH 0x60
POP RSI
MOV RDI,R13
CALL 0x001510f5
TEST RAX,RAX
JZ 0x0015728e
LAB_00157240:
XOR R13D,R13D
TEST R14,R14
JZ 0x00157279
MOV RAX,qword ptr [RBX + 0x8]
LEA R15,[RBX + 0xc78]
CMP RAX,0x2a
CMOVNZ R15,RAX
MOV ESI,0xc0
MOV RDI,R14
CALL 0x001510f5
TEST RAX,RAX
JZ 0x00157329
PUSH 0x6
JMP 0x00157277
LAB_00157275:
PUSH 0x4
LAB_00157277:
POP R13
LAB_00157279:
MOV EAX,R13D
ADD RSP,0x2e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015728e:
LEA RDI,[RBP + -0x300]
PUSH 0x60
POP RDX
MOV RSI,R13
CALL 0x00151055
MOV RDI,R13
PUSH 0x60
POP RSI
CALL 0x001510f5
LEA RDX,[0x17fce8]
PUSH 0x30
POP RCX
LEA RDI,[RBP + -0x2a0]
MOV RSI,R13
MOV R8,RAX
CALL 0x00151073
TEST R15,R15
JZ 0x001572e1
LEA RDI,[RBP + -0x300]
CALL 0x0015333d
TEST RAX,RAX
JZ 0x001573a9
LAB_001572e1:
LEA R15,[RBX + 0x258]
MOV EAX,dword ptr [RBX]
TEST AL,0x10
JNZ 0x001573b0
OR EAX,0x10
MOV dword ptr [RBX],EAX
MOV RCX,qword ptr [RBP + 0x10]
TEST RCX,RCX
SETZ AL
MOV RDX,qword ptr [RBP + -0x30]
TEST RDX,RDX
SETZ SIL
OR SIL,AL
JNZ 0x001574ae
LEA RSI,[RBP + -0x300]
MOV RDI,R15
CALL 0x00152d67
JMP 0x00157240
LAB_00157329:
TEST R12,R12
JZ 0x0015737b
LEA R12,[RBP + -0x300]
MOV EDX,0xc0
MOV RDI,R12
MOV RSI,R14
CALL 0x00151055
MOV ESI,0xc0
MOV RDI,R14
CALL 0x001510f5
LEA RDX,[0x17fce8]
PUSH 0x60
POP RCX
LEA RDI,[RBP + -0x240]
MOV RSI,R14
MOV R8,RAX
CALL 0x00151073
MOV RDI,R12
CALL 0x00155b00
TEST RAX,RAX
JZ 0x001573a9
LAB_0015737b:
MOV RAX,qword ptr [RBP + 0x30]
MOV R9,qword ptr [RBP + 0x28]
MOV RDX,qword ptr [RBP + 0x20]
MOV RSI,qword ptr [RBP + 0x18]
TEST byte ptr [RBX],0x40
MOV R8,qword ptr [RBX + 0x10]
JNZ 0x001573f5
MOV qword ptr [RSP],RAX
LEA RDI,[RBP + -0xc0]
MOV RCX,R15
CALL 0x0015328b
JMP 0x00157408
LAB_001573a9:
PUSH 0x3
JMP 0x00157277
LAB_001573b0:
MOV RCX,qword ptr [RBP + 0x10]
TEST RCX,RCX
SETZ AL
MOV RDX,qword ptr [RBP + -0x30]
TEST RDX,RDX
SETZ SIL
OR SIL,AL
JNZ 0x001574c7
LEA R13,[RBP + -0x300]
MOV RDI,R13
MOV RSI,R13
CALL 0x00152d67
MOV RDI,R15
MOV RSI,R15
MOV RDX,R13
XOR ECX,ECX
CALL 0x00151a8a
JMP 0x00157240
LAB_001573f5:
MOV qword ptr [RSP],RAX
LEA RDI,[RBP + -0xc0]
MOV RCX,R15
CALL 0x001532e3
LAB_00157408:
MOV RCX,qword ptr [RBP + 0x10]
TEST RCX,RCX
SETZ AL
MOV RDX,qword ptr [RBP + -0x30]
TEST RDX,RDX
SETZ SIL
OR SIL,AL
JNZ 0x00157431
LEA RDI,[RBP + -0xc0]
MOV RSI,RDI
CALL 0x00152d67
LAB_00157431:
LEA R15,[RBP + -0xc0]
MOV RDI,R15
MOV RSI,R15
CALL 0x00150f03
MOV R12D,dword ptr [RBX + 0x4]
IMUL RAX,R12,0xc0
LEA RDI,[RBX + RAX*0x1]
ADD RDI,0x378
MOV EDX,0xc0
MOV RSI,R14
CALL 0x00151055
IMUL RAX,R12,0x60
LEA RDI,[RBX + RAX*0x1]
ADD RDI,0x978
PUSH 0x60
POP RDX
MOV RSI,R15
CALL 0x00151055
LEA EAX,[R12 + 0x1]
CMP EAX,0x8
JNZ 0x001574fd
LEA RSI,[RBX + 0x378]
LEA RDX,[RBX + 0x978]
TEST byte ptr [RBX],0x20
JNZ 0x001574da
LEA RDI,[RBX + 0x18]
PUSH 0x8
POP RCX
CALL 0x00156653
OR byte ptr [RBX],0x20
JMP 0x001574fb
LAB_001574ae:
LEA RSI,[RBP + -0x300]
MOV EDX,0x90
MOV RDI,R15
CALL 0x00151055
JMP 0x00157240
LAB_001574c7:
MOV RDI,R15
MOV RSI,R15
MOV RDX,R13
CALL 0x00151fc5
JMP 0x00157240
LAB_001574da:
LEA R14,[RBP + -0x300]
PUSH 0x8
POP RCX
MOV RDI,R14
CALL 0x00156653
LEA RDI,[RBX + 0x18]
MOV RSI,RDI
MOV RDX,R14
CALL 0x00155f2f
LAB_001574fb:
XOR EAX,EAX
LAB_001574fd:
MOV dword ptr [RBX + 0x4],EAX
JMP 0x00157279
|
int8
PAIRING_Aggregate_PK_in_G2
(uint *param_1,long param_2,long param_3,long param_4,long param_5,long param_6,
long param_7,int8 param_8,int8 param_9,int8 param_10,int8 param_11
)
{
uint uVar1;
long lVar2;
int8 uVar3;
uint *puVar4;
int8 uStackY_320;
int1 local_308 [96];
int1 local_2a8 [96];
int1 local_248 [384];
int1 local_c8 [144];
long local_38;
if ((*param_1 & 2) != 0) {
return 4;
}
*param_1 = *param_1 | 1;
local_38 = param_6;
if ((param_4 == 0) || (lVar2 = vec_is_zero(param_4,0x60), lVar2 != 0)) {
LAB_00157240:
uStackY_320 = 0;
if (param_2 == 0) {
return 0;
}
puVar4 = param_1 + 0x31e;
if (*(uint **)(param_1 + 2) != (uint *)0x2a) {
puVar4 = *(uint **)(param_1 + 2);
}
lVar2 = vec_is_zero(param_2,0xc0);
if (lVar2 != 0) {
return 6;
}
if (param_3 != 0) {
vec_copy(local_308,param_2,0xc0);
uVar3 = vec_is_zero(param_2,0xc0);
vec_select(local_248,param_2,BLS12_381_Rx,0x60,uVar3);
lVar2 = POINTonE2_in_G2(local_308);
if (lVar2 == 0) goto LAB_001573a9;
}
if ((*param_1 & 0x40) == 0) {
Encode_to_G1(local_c8,param_8,param_9,puVar4,*(int8 *)(param_1 + 4),param_10,param_11);
}
else {
Hash_to_G1(local_c8,param_8,param_9,puVar4,*(int8 *)(param_1 + 4),param_10,param_11);
}
if (local_38 != 0 && param_7 != 0) {
POINTonE1_mult_w5(local_c8,local_c8);
}
POINTonE1_from_Jacobian(local_c8,local_c8);
uVar1 = param_1[1];
vec_copy(param_1 + (ulong)uVar1 * 0x30 + 0xde,param_2,0xc0);
vec_copy(param_1 + (ulong)uVar1 * 0x18 + 0x25e,local_c8,0x60);
uVar1 = uVar1 + 1;
if (uVar1 == 8) {
if ((*param_1 & 0x20) == 0) {
miller_loop_n(param_1 + 6,param_1 + 0xde,param_1 + 0x25e,8);
*(byte *)param_1 = (byte)*param_1 | 0x20;
}
else {
miller_loop_n(local_308,param_1 + 0xde,param_1 + 0x25e,8);
mul_fp12(param_1 + 6,param_1 + 6,local_308);
}
uVar1 = 0;
}
param_1[1] = uVar1;
}
else {
vec_copy(local_308,param_4,0x60);
uVar3 = vec_is_zero(param_4,0x60);
vec_select(local_2a8,param_4,BLS12_381_Rx,0x30,uVar3);
if ((param_5 == 0) || (lVar2 = POINTonE1_in_G1(local_308), lVar2 != 0)) {
puVar4 = param_1 + 0x96;
if ((*param_1 & 0x10) == 0) {
*param_1 = *param_1 | 0x10;
if (local_38 == 0 || param_7 == 0) {
vec_copy(puVar4,local_308,0x90);
}
else {
POINTonE1_mult_w5(puVar4,local_308);
}
}
else if (local_38 == 0 || param_7 == 0) {
POINTonE1_dadd_affine(puVar4,puVar4,param_4);
}
else {
POINTonE1_mult_w5(local_308,local_308);
POINTonE1_dadd(puVar4,puVar4,local_308,0);
}
goto LAB_00157240;
}
LAB_001573a9:
uStackY_320 = 3;
}
return uStackY_320;
}
|
|
12,252
|
u07toa_shift
|
bluesky950520[P]quickjs/cutils.c
|
static size_t u07toa_shift(char dest[minimum_length(8)], uint32_t n, size_t len)
{
size_t i;
dest += len;
dest[7] = '\0';
for (i = 7; i-- > 1;) {
uint32_t quo = n % 10;
n /= 10;
dest[i] = (char)('0' + quo);
}
dest[i] = (char)('0' + n);
return len + 7;
}
|
O0
|
c
|
u07toa_shift:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x18(%rsp), %rax
addq -0x8(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
movb $0x0, 0x7(%rax)
movq $0x7, -0x20(%rsp)
movq -0x20(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rsp)
cmpq $0x1, %rax
jbe 0x1f940
movl -0xc(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, -0x24(%rsp)
movl -0xc(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0xc(%rsp)
movl -0x24(%rsp), %eax
addl $0x30, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movq -0x20(%rsp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x1f8ef
movl -0xc(%rsp), %eax
addl $0x30, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movq -0x20(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rsp), %rax
addq $0x7, %rax
retq
|
u07toa_shift:
mov [rsp+var_8], rdi
mov [rsp+var_C], esi
mov [rsp+var_18], rdx
mov rax, [rsp+var_18]
add rax, [rsp+var_8]
mov [rsp+var_8], rax
mov rax, [rsp+var_8]
mov byte ptr [rax+7], 0
mov [rsp+var_20], 7
loc_1F8EF:
mov rax, [rsp+var_20]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_20], rcx
cmp rax, 1
jbe short loc_1F940
mov eax, [rsp+var_C]
mov ecx, 0Ah
xor edx, edx
div ecx
mov [rsp+var_24], edx
mov eax, [rsp+var_C]
mov ecx, 0Ah
xor edx, edx
div ecx
mov [rsp+var_C], eax
mov eax, [rsp+var_24]
add eax, 30h ; '0'
mov dl, al
mov rax, [rsp+var_8]
mov rcx, [rsp+var_20]
mov [rax+rcx], dl
jmp short loc_1F8EF
loc_1F940:
mov eax, [rsp+var_C]
add eax, 30h ; '0'
mov dl, al
mov rax, [rsp+var_8]
mov rcx, [rsp+var_20]
mov [rax+rcx], dl
mov rax, [rsp+var_18]
add rax, 7
retn
|
long long u07toa_shift(long long a1, unsigned int a2, long long a3)
{
unsigned long long v3; // rax
unsigned int v5; // [rsp+0h] [rbp-24h]
long long i; // [rsp+4h] [rbp-20h]
long long v8; // [rsp+1Ch] [rbp-8h]
v8 = a1 + a3;
*(_BYTE *)(a1 + a3 + 7) = 0;
for ( i = 7LL; ; *(_BYTE *)(v8 + i) = v5 + 48 )
{
v3 = i--;
if ( v3 <= 1 )
break;
v5 = a2 % 0xA;
a2 /= 0xAu;
}
*(_BYTE *)(v8 + i) = a2 + 48;
return a3 + 7;
}
|
u07toa_shift:
MOV qword ptr [RSP + -0x8],RDI
MOV dword ptr [RSP + -0xc],ESI
MOV qword ptr [RSP + -0x18],RDX
MOV RAX,qword ptr [RSP + -0x18]
ADD RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x8],RAX
MOV RAX,qword ptr [RSP + -0x8]
MOV byte ptr [RAX + 0x7],0x0
MOV qword ptr [RSP + -0x20],0x7
LAB_0011f8ef:
MOV RAX,qword ptr [RSP + -0x20]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + -0x20],RCX
CMP RAX,0x1
JBE 0x0011f940
MOV EAX,dword ptr [RSP + -0xc]
MOV ECX,0xa
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + -0x24],EDX
MOV EAX,dword ptr [RSP + -0xc]
MOV ECX,0xa
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + -0xc],EAX
MOV EAX,dword ptr [RSP + -0x24]
ADD EAX,0x30
MOV DL,AL
MOV RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RSP + -0x20]
MOV byte ptr [RAX + RCX*0x1],DL
JMP 0x0011f8ef
LAB_0011f940:
MOV EAX,dword ptr [RSP + -0xc]
ADD EAX,0x30
MOV DL,AL
MOV RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RSP + -0x20]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RSP + -0x18]
ADD RAX,0x7
RET
|
long u07toa_shift(long param_1,uint param_2,long param_3)
{
ulong uVar1;
uint uVar2;
int8 local_20;
int4 local_c;
param_1 = param_3 + param_1;
*(int1 *)(param_1 + 7) = 0;
local_20 = 7;
local_c = param_2;
while (uVar1 = local_20 - 1, 1 < local_20) {
uVar2 = local_c % 10;
local_c = local_c / 10;
*(char *)(param_1 + uVar1) = (char)uVar2 + '0';
local_20 = uVar1;
}
*(char *)(param_1 + uVar1) = (char)local_c + '0';
return param_3 + 7;
}
|
|
12,253
|
u07toa_shift
|
bluesky950520[P]quickjs/cutils.c
|
static size_t u07toa_shift(char dest[minimum_length(8)], uint32_t n, size_t len)
{
size_t i;
dest += len;
dest[7] = '\0';
for (i = 7; i-- > 1;) {
uint32_t quo = n % 10;
n /= 10;
dest[i] = (char)('0' + quo);
}
dest[i] = (char)('0' + n);
return len + 7;
}
|
O2
|
c
|
u07toa_shift:
movq %rdx, %rcx
movl %esi, %eax
addq %rdx, %rdi
pushq $0x7
popq %rsi
xorl %edx, %edx
pushq $0xa
popq %r8
movb %dl, (%rdi,%rsi)
cmpq $0x2, %rsi
jb 0x1653c
decq %rsi
xorl %edx, %edx
divl %r8d
orb $0x30, %dl
jmp 0x16526
addb $0x30, %al
movb %al, (%rdi)
addq $0x7, %rcx
movq %rcx, %rax
retq
|
u07toa_shift:
mov rcx, rdx
mov eax, esi
add rdi, rdx
push 7
pop rsi
xor edx, edx
push 0Ah
pop r8
loc_16526:
mov [rdi+rsi], dl
cmp rsi, 2
jb short loc_1653C
dec rsi
xor edx, edx
div r8d
or dl, 30h
jmp short loc_16526
loc_1653C:
add al, 30h ; '0'
mov [rdi], al
add rcx, 7
mov rax, rcx
retn
|
long long u07toa_shift(long long a1, unsigned int a2, long long a3)
{
_BYTE *v5; // rdi
unsigned long long v6; // rsi
char i; // dl
unsigned int v8; // et2
v5 = (_BYTE *)(a3 + a1);
v6 = 7LL;
for ( i = 0; ; i = v8 | 0x30 )
{
v5[v6] = i;
if ( v6 < 2 )
break;
--v6;
v8 = a2 % 0xA;
a2 /= 0xAu;
}
*v5 = a2 + 48;
return a3 + 7;
}
|
u07toa_shift:
MOV RCX,RDX
MOV EAX,ESI
ADD RDI,RDX
PUSH 0x7
POP RSI
XOR EDX,EDX
PUSH 0xa
POP R8
LAB_00116526:
MOV byte ptr [RDI + RSI*0x1],DL
CMP RSI,0x2
JC 0x0011653c
DEC RSI
XOR EDX,EDX
DIV R8D
OR DL,0x30
JMP 0x00116526
LAB_0011653c:
ADD AL,0x30
MOV byte ptr [RDI],AL
ADD RCX,0x7
MOV RAX,RCX
RET
|
long u07toa_shift(long param_1,uint param_2,long param_3)
{
ulong uVar1;
ulong uVar2;
uVar1 = 0;
for (uVar2 = 7; ((char *)(param_1 + param_3))[uVar2] = (char)uVar1, 1 < uVar2; uVar2 = uVar2 - 1)
{
uVar1 = (ulong)param_2;
param_2 = param_2 / 10;
uVar1 = uVar1 % 10 | 0x30;
}
*(char *)(param_1 + param_3) = (char)param_2 + '0';
return param_3 + 7;
}
|
|
12,254
|
trnman_can_read_from
|
eloqsql/storage/maria/trnman.c
|
int trnman_can_read_from(TRN *trn, TrID trid)
{
TRN **found;
my_bool can;
if (trid < trn->min_read_from)
return 1; /* Row is visible by all transactions in the system */
if (trid >= trn->trid)
{
/*
We have now two cases
trid > trn->trid, in which case the row is from a new transaction
and not visible, in which case we should return 0.
trid == trn->trid in which case the row is from the current transaction
and we should return 1
*/
return trid == trn->trid;
}
found= lf_hash_search(&trid_to_trn, trn->pins, &trid, sizeof(trid));
if (found == NULL)
return 0; /* not in the hash of transactions = cannot read */
if (found == MY_ERRPTR)
return -1;
can= (*found)->commit_trid < trn->trid;
lf_hash_search_unpin(trn->pins);
return can;
}
|
O0
|
c
|
trnman_can_read_from:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x77d4d
movl $0x1, -0x4(%rbp)
jmp 0x77dfe
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jb 0x77d77
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x77dfe
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x40f333(%rip), %rdi # 0x4870b8
leaq -0x18(%rbp), %rdx
movl $0x8, %ecx
callq 0x107870
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x77da7
movl $0x0, -0x4(%rbp)
jmp 0x77dfe
movl $0x1, %eax
cmpq %rax, -0x20(%rbp)
jne 0x77dbb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x77dfe
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x88(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x21(%rbp)
jmp 0x77dde
jmp 0x77de0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movsbl -0x21(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
trnman_can_read_from:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+80h]
jnb short loc_77D4D
mov [rbp+var_4], 1
jmp loc_77DFE
loc_77D4D:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
jb short loc_77D77
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
setz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_77DFE
loc_77D77:
mov rax, [rbp+var_10]
mov rsi, [rax]
lea rdi, trid_to_trn
lea rdx, [rbp+var_18]
mov ecx, 8
call lf_hash_search
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_77DA7
mov [rbp+var_4], 0
jmp short loc_77DFE
loc_77DA7:
mov eax, 1
cmp [rbp+var_20], rax
jnz short loc_77DBB
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_77DFE
loc_77DBB:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+88h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
setb al
and al, 1
movzx eax, al
mov [rbp+var_21], al
jmp short $+2
loc_77DDE:
jmp short $+2
loc_77DE0:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rbp+var_30], 0
mov rax, [rbp+var_30]
xchg rax, [rcx+10h]
movsx eax, [rbp+var_21]
mov [rbp+var_4], eax
loc_77DFE:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long trnman_can_read_from(_QWORD *a1, unsigned long long a2)
{
bool v3; // [rsp+Fh] [rbp-21h]
long long v4; // [rsp+10h] [rbp-20h]
unsigned long long v5; // [rsp+18h] [rbp-18h] BYREF
_QWORD *v6; // [rsp+20h] [rbp-10h]
v6 = a1;
v5 = a2;
if ( a2 >= a1[16] )
{
if ( v5 < v6[15] )
{
v4 = lf_hash_search(&trid_to_trn, *v6, &v5, 8LL);
if ( v4 )
{
if ( v4 == 1 )
{
return (unsigned int)-1;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)v4 + 136LL) < v6[15];
_InterlockedExchange64((volatile long long *)(*v6 + 16LL), 0LL);
return v3;
}
}
else
{
return 0;
}
}
else
{
return v5 == v6[15];
}
}
else
{
return 1;
}
}
|
trnman_can_read_from:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x80]
JNC 0x00177d4d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00177dfe
LAB_00177d4d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
JC 0x00177d77
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00177dfe
LAB_00177d77:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x5870b8]
LEA RDX,[RBP + -0x18]
MOV ECX,0x8
CALL 0x00207870
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00177da7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00177dfe
LAB_00177da7:
MOV EAX,0x1
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x00177dbb
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00177dfe
LAB_00177dbb:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x88]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
SETC AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x21],AL
JMP 0x00177dde
LAB_00177dde:
JMP 0x00177de0
LAB_00177de0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x30]
XCHG qword ptr [RCX + 0x10],RAX
MOVSX EAX,byte ptr [RBP + -0x21]
MOV dword ptr [RBP + -0x4],EAX
LAB_00177dfe:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
uint trnman_can_read_from(long *param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
long *plVar3;
ulong local_20;
long *local_18;
uint local_c;
if (param_2 < (ulong)param_1[0x10]) {
local_c = 1;
}
else if (param_2 < (ulong)param_1[0xf]) {
local_20 = param_2;
local_18 = param_1;
plVar3 = (long *)lf_hash_search(trid_to_trn,*param_1,&local_20,8);
if (plVar3 == (long *)0x0) {
local_c = 0;
}
else if (plVar3 == (long *)0x1) {
local_c = 0xffffffff;
}
else {
uVar1 = *(ulong *)(*plVar3 + 0x88);
uVar2 = local_18[0xf];
LOCK();
*(int8 *)(*local_18 + 0x10) = 0;
UNLOCK();
local_c = (uint)(uVar1 < uVar2);
}
}
else {
local_c = (uint)(param_2 == param_1[0xf]);
}
return local_c;
}
|
|
12,255
|
minja::Parser::parseDictionary()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseDictionary() {
if (consumeToken("{").empty()) return nullptr;
std::vector<std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>>> elements;
if (!consumeToken("}").empty()) {
return std::make_shared<DictExpr>(get_location(), std::move(elements));
}
auto parseKeyValuePair = [&]() {
auto key = parseExpression();
if (!key) throw std::runtime_error("Expected key in dictionary");
if (consumeToken(":").empty()) throw std::runtime_error("Expected colon betweek key & value in dictionary");
auto value = parseExpression();
if (!value) throw std::runtime_error("Expected value in dictionary");
elements.emplace_back(std::pair(std::move(key), std::move(value)));
};
parseKeyValuePair();
while (it != end) {
if (!consumeToken(",").empty()) {
parseKeyValuePair();
} else if (!consumeToken("}").empty()) {
return std::make_shared<DictExpr>(get_location(), std::move(elements));
} else {
throw std::runtime_error("Expected comma or closing brace in dictionary");
}
}
throw std::runtime_error("Expected closing brace");
}
|
O3
|
cpp
|
minja::Parser::parseDictionary():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %r12
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x64f11(%rip), %rsi # 0xefc5d
leaq 0x64f0b(%rip), %rdx # 0xefc5e
movq %rsp, %rdi
callq 0x21af4
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x839d4
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %rbx
cmpq %rax, %rdi
je 0x8ad8f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8adaa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
xorps %xmm0, %xmm0
testq %rbx, %rbx
je 0x8ae64
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x69669(%rip), %rsi # 0xf443f
leaq 0x69663(%rip), %rdx # 0xf4440
callq 0x21af4
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x839d4
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rbx
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x8ae18
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8ae33
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testq %rbx, %rbx
je 0x8ae6e
movq %r12, %r13
movq (%r14), %r12
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x8afc2
movq 0xa1136(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0x8afbd
incl 0x8(%r15)
jmp 0x8afc2
movups %xmm0, (%r12)
jmp 0x8b0e0
movq %r12, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x40(%rsp), %rax
movq %rax, 0x8(%rdi)
callq 0x8e08e
leaq 0x652c7(%rip), %r12 # 0xf0157
movq %rsp, %r13
leaq 0x20(%rsp), %rbp
leaq 0x68(%rsp), %rbx
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x8b0f2
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
leaq 0x65298(%rip), %rsi # 0xf0156
movq %r12, %rdx
callq 0x21af4
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x839d4
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %r15
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x8aefa
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8af15
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testq %r15, %r15
je 0x8af27
movq %rbx, %rdi
callq 0x8e08e
jmp 0x8ae9d
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x69506(%rip), %rsi # 0xf443f
leaq 0x69500(%rip), %rdx # 0xf4440
callq 0x21af4
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x839d4
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rbx
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x8af7b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8af96
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testq %rbx, %rbx
je 0x8b124
movq (%r14), %r12
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x8b01d
movq 0xa0fd6(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0x8b018
incl 0x8(%r15)
jmp 0x8b01d
lock
incl 0x8(%r15)
movq 0x20(%r14), %rbx
subq 0x10(%r14), %rbx
movl $0x48, %edi
callq 0x1a8c0
leaq 0x9f62d(%rip), %rdx # 0x12a608
addq $0x10, %rdx
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x9f3cb(%rip), %rsi # 0x12a3b8
addq $0x10, %rsi
movabsq $0x100000001, %rdi # imm = 0x100000001
movq %rdi, 0x8(%rax)
movq %rdx, (%rax)
movq %rsi, 0x10(%rax)
movq %r12, 0x18(%rax)
movq %r15, 0x20(%rax)
testq %r15, %r15
movq %r13, %r12
jne 0x8b073
jmp 0x8b08a
lock
incl 0x8(%r15)
movq 0x20(%r14), %rbx
subq 0x10(%r14), %rbx
movl $0x48, %edi
callq 0x1a8c0
leaq 0x9f5d2(%rip), %rdx # 0x12a608
addq $0x10, %rdx
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x9f370(%rip), %rsi # 0x12a3b8
addq $0x10, %rsi
movabsq $0x100000001, %rdi # imm = 0x100000001
movq %rdi, 0x8(%rax)
movq %rdx, (%rax)
movq %rsi, 0x10(%rax)
movq %r12, 0x18(%rax)
movq %r15, 0x20(%rax)
testq %r15, %r15
movq 0x60(%rsp), %r12
je 0x8b08a
movq 0xa0f0e(%rip), %rdx # 0x12bf88
cmpb $0x0, (%rdx)
je 0x8b085
incl 0x8(%r15)
jmp 0x8b08a
lock
incl 0x8(%r15)
leaq 0x9f5c7(%rip), %rdx # 0x12a658
addq $0x10, %rdx
movq %rbx, 0x28(%rax)
movq %rdx, 0x10(%rax)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x30(%rax)
movq 0x50(%rsp), %rdx
movq %rdx, 0x40(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq %rcx, (%r12)
movq %rax, 0x8(%r12)
testq %r15, %r15
je 0x8b0d6
movq %r15, %rdi
callq 0x6d396
leaq 0x40(%rsp), %rdi
callq 0x8e2c6
movq %r12, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a460
movq %rax, %r14
leaq 0x65184(%rip), %rsi # 0xf028a
movq %rax, %rdi
callq 0x1a340
movq 0xa0edb(%rip), %rsi # 0x12bff0
movq 0xa0e44(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af30
movl $0x10, %edi
callq 0x1a460
movq %rax, %r14
leaq 0x65124(%rip), %rsi # 0xf025c
movq %rax, %rdi
callq 0x1a340
jmp 0x8b10e
jmp 0x8b185
jmp 0x8b14a
jmp 0x8b1ab
jmp 0x8b196
movq %rax, %rbx
testq %r15, %r15
je 0x8b199
movq %r15, %rdi
callq 0x6d396
jmp 0x8b199
jmp 0x8b1ab
jmp 0x8b196
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8b1a3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x8b1a3
movq %rax, %rbx
jmp 0x8b1a3
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a690
jmp 0x8b199
jmp 0x8b196
jmp 0x8b196
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8e2c6
movq %rbx, %rdi
callq 0x1afd0
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8b199
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x8b199
nop
|
_ZN5minja6Parser15parseDictionaryEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rsi
mov r12, rdi
lea rax, [rsp+0A8h+var_98]
mov [rax-10h], rax
lea rsi, asc_EFC5D; "{"
lea rdx, asc_EFC5D+1; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0A8h+var_88]
mov rdx, rsp
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
lea rax, [rsp+0A8h+var_78]
mov rdi, [rax-10h]; void *
mov rbx, [rax-8]
cmp rdi, rax
jz short loc_8AD8F
mov rsi, [rsp+0A8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AD8F:
mov rdi, [rsp+0A8h+var_A8]; void *
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_8ADAA
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8ADAA:
xorps xmm0, xmm0
test rbx, rbx
jz loc_8AE64
movaps [rsp+0A8h+var_68], xmm0
mov [rsp+0A8h+var_58], 0
mov rdi, rsp
lea rax, [rsp+0A8h+var_98]
mov [rdi], rax
lea rsi, aT020+7; "}"
lea rdx, aT020+8; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0A8h+var_88]
mov rdx, rsp
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+0A8h+var_88]; void *
mov rbx, [rsp+0A8h+var_80]
lea rax, [rsp+0A8h+var_78]
cmp rdi, rax
jz short loc_8AE18
mov rsi, [rsp+0A8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AE18:
mov rdi, [rsp+0A8h+var_A8]; void *
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_8AE33
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AE33:
test rbx, rbx
jz short loc_8AE6E
mov r13, r12
mov r12, [r14]
mov r15, [r14+8]
test r15, r15
jz loc_8AFC2
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz loc_8AFBD
inc dword ptr [r15+8]
jmp loc_8AFC2
loc_8AE64:
movups xmmword ptr [r12], xmm0
jmp loc_8B0E0
loc_8AE6E:
mov [rsp+0A8h+var_48], r12
lea rdi, [rsp+0A8h+var_40]
mov [rdi], r14
lea rax, [rsp+0A8h+var_68]
mov [rdi+8], rax
call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void)
lea r12, asc_F0156+1; ""
mov r13, rsp
lea rbp, [rsp+0A8h+var_88]
lea rbx, [rsp+0A8h+var_40]
loc_8AE9D:
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz loc_8B0F2
lea rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_A8], rax
mov rdi, r13
lea rsi, asc_F0156; ","
mov rdx, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, rbp
mov rsi, r14
mov rdx, r13
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+0A8h+var_88]; void *
mov r15, [rsp+0A8h+var_80]
lea rax, [rsp+0A8h+var_78]
cmp rdi, rax
jz short loc_8AEFA
mov rsi, [rsp+0A8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AEFA:
mov rdi, [rsp+0A8h+var_A8]; void *
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_8AF15
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AF15:
test r15, r15
jz short loc_8AF27
mov rdi, rbx
call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void)
jmp loc_8AE9D
loc_8AF27:
mov rdi, rsp
lea rax, [rsp+0A8h+var_98]
mov [rdi], rax
lea rsi, aT020+7; "}"
lea rdx, aT020+8; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0A8h+var_88]
mov rdx, rsp
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+0A8h+var_88]; void *
mov rbx, [rsp+0A8h+var_80]
lea rax, [rsp+0A8h+var_78]
cmp rdi, rax
jz short loc_8AF7B
mov rsi, [rsp+0A8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AF7B:
mov rdi, [rsp+0A8h+var_A8]; void *
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_8AF96
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AF96:
test rbx, rbx
jz loc_8B124
mov r12, [r14]
mov r15, [r14+8]
test r15, r15
jz short loc_8B01D
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_8B018
inc dword ptr [r15+8]
jmp short loc_8B01D
loc_8AFBD:
lock inc dword ptr [r15+8]
loc_8AFC2:
mov rbx, [r14+20h]
sub rbx, [r14+10h]
mov edi, 48h ; 'H'; unsigned __int64
call __Znwm; operator new(ulong)
lea rdx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja8DictExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2>
add rdx, 10h
mov rcx, rax
add rcx, 10h
lea rsi, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rsi, 10h
mov rdi, 100000001h
mov [rax+8], rdi
mov [rax], rdx
mov [rax+10h], rsi
mov [rax+18h], r12
mov [rax+20h], r15
test r15, r15
mov r12, r13
jnz short loc_8B073
jmp short loc_8B08A
loc_8B018:
lock inc dword ptr [r15+8]
loc_8B01D:
mov rbx, [r14+20h]
sub rbx, [r14+10h]
mov edi, 48h ; 'H'; unsigned __int64
call __Znwm; operator new(ulong)
lea rdx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja8DictExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2>
add rdx, 10h
mov rcx, rax
add rcx, 10h
lea rsi, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rsi, 10h
mov rdi, 100000001h
mov [rax+8], rdi
mov [rax], rdx
mov [rax+10h], rsi
mov [rax+18h], r12
mov [rax+20h], r15
test r15, r15
mov r12, [rsp+0A8h+var_48]
jz short loc_8B08A
loc_8B073:
mov rdx, cs:__libc_single_threaded_ptr
cmp byte ptr [rdx], 0
jz short loc_8B085
inc dword ptr [r15+8]
jmp short loc_8B08A
loc_8B085:
lock inc dword ptr [r15+8]
loc_8B08A:
lea rdx, _ZTVN5minja8DictExprE; `vtable for'minja::DictExpr
add rdx, 10h
mov [rax+28h], rbx
mov [rax+10h], rdx
movaps xmm0, [rsp+0A8h+var_68]
movups xmmword ptr [rax+30h], xmm0
mov rdx, [rsp+0A8h+var_58]
mov [rax+40h], rdx
xorps xmm0, xmm0
movaps [rsp+0A8h+var_68], xmm0
mov [rsp+0A8h+var_58], 0
mov [r12], rcx
mov [r12+8], rax
test r15, r15
jz short loc_8B0D6
mov rdi, r15
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8B0D6:
lea rdi, [rsp+0A8h+var_68]
call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector()
loc_8B0E0:
mov rax, r12
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8B0F2:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedClosin_5; "Expected closing brace"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_8B10E:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_8B124:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedCommaO_0; "Expected comma or closing brace in dict"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_8B10E
jmp short loc_8B185
jmp short loc_8B14A
jmp short loc_8B1AB
jmp short loc_8B196
loc_8B14A:
mov rbx, rax
test r15, r15
jz short loc_8B199
mov rdi, r15
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_8B199
jmp short loc_8B1AB
jmp short loc_8B196
mov rbx, rax
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_8B1A3
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8B1A3
mov rbx, rax
jmp short loc_8B1A3
loc_8B185:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_8B199
jmp short loc_8B196
jmp short $+2
loc_8B196:
mov rbx, rax
loc_8B199:
lea rdi, [rsp+arg_38]
call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector()
loc_8B1A3:
mov rdi, rbx
call __Unwind_Resume
loc_8B1AB:
mov rbx, rax
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_8B199
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8B199
|
minja::Parser * minja::Parser::parseDictionary(minja::Parser *this, _QWORD *a2)
{
minja::Parser *v2; // r12
long long v3; // rbx
long long v4; // rbx
long long v5; // r12
volatile signed __int32 *v6; // r15
long long v7; // r15
long long v8; // rbx
long long v9; // r12
long long v10; // rbx
long long v11; // rax
long long v12; // rcx
std::runtime_error *exception; // r14
void *v15[2]; // [rsp+0h] [rbp-A8h] BYREF
_QWORD v16[2]; // [rsp+10h] [rbp-98h] BYREF
void *v17; // [rsp+20h] [rbp-88h] BYREF
long long v18; // [rsp+28h] [rbp-80h]
_QWORD v19[2]; // [rsp+30h] [rbp-78h] BYREF
__int128 v20; // [rsp+40h] [rbp-68h] BYREF
long long v21; // [rsp+50h] [rbp-58h]
minja::Parser *v22; // [rsp+60h] [rbp-48h]
_QWORD *v23; // [rsp+68h] [rbp-40h]
__int128 *v24; // [rsp+70h] [rbp-38h]
v2 = this;
v15[0] = v16;
std::string::_M_construct<char const*>((long long)v15, "{", (long long)"");
minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u);
v3 = v18;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
if ( !v3 )
{
*(_OWORD *)this = 0LL;
return v2;
}
v20 = 0LL;
v21 = 0LL;
v15[0] = v16;
std::string::_M_construct<char const*>((long long)v15, "}", (long long)"");
minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u);
v4 = v18;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
if ( v4 )
{
v5 = *a2;
v6 = (volatile signed __int32 *)a2[1];
if ( v6 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v6 + 2);
else
_InterlockedIncrement(v6 + 2);
}
v10 = a2[4] - a2[2];
v11 = operator new(0x48uLL);
v12 = v11 + 16;
*(_QWORD *)(v11 + 8) = 0x100000001LL;
*(_QWORD *)v11 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_QWORD *)(v11 + 16) = &`vtable for'minja::Expression + 2;
*(_QWORD *)(v11 + 24) = v5;
*(_QWORD *)(v11 + 32) = v6;
v2 = this;
if ( v6 )
goto LABEL_36;
goto LABEL_39;
}
v22 = this;
v23 = a2;
v24 = &v20;
minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0);
while ( 1 )
{
if ( a2[4] == a2[3] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected closing brace");
goto LABEL_44;
}
v15[0] = v16;
std::string::_M_construct<char const*>((long long)v15, ",", (long long)"");
minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u);
v7 = v18;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
if ( !v7 )
break;
minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0);
}
v15[0] = v16;
std::string::_M_construct<char const*>((long long)v15, "}", (long long)"");
minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u);
v8 = v18;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
if ( !v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected comma or closing brace in dictionary");
LABEL_44:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v9 = *a2;
v6 = (volatile signed __int32 *)a2[1];
if ( v6 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v6 + 2);
else
_InterlockedIncrement(v6 + 2);
}
v10 = a2[4] - a2[2];
v11 = operator new(0x48uLL);
v12 = v11 + 16;
*(_QWORD *)(v11 + 8) = 0x100000001LL;
*(_QWORD *)v11 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_QWORD *)(v11 + 16) = &`vtable for'minja::Expression + 2;
*(_QWORD *)(v11 + 24) = v9;
*(_QWORD *)(v11 + 32) = v6;
v2 = v22;
if ( v6 )
{
LABEL_36:
if ( _libc_single_threaded )
++*((_DWORD *)v6 + 2);
else
_InterlockedIncrement(v6 + 2);
}
LABEL_39:
*(_QWORD *)(v11 + 40) = v10;
*(_QWORD *)(v11 + 16) = &`vtable for'minja::DictExpr + 2;
*(_OWORD *)(v11 + 48) = v20;
*(_QWORD *)(v11 + 64) = v21;
v20 = 0LL;
v21 = 0LL;
*(_QWORD *)v2 = v12;
*((_QWORD *)v2 + 1) = v11;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector(&v20);
return v2;
}
|
parseDictionary:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RSI
MOV R12,RDI
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
LAB_0018ad45:
LEA RSI,[0x1efc5d]
LEA RDX,[0x1efc5e]
MOV RDI,RSP
CALL 0x00121af4
LAB_0018ad5b:
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
MOV RSI,R14
MOV ECX,0x1
CALL 0x001839d4
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
MOV RBX,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x0018ad8f
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a8f0
LAB_0018ad8f:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0018adaa
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a8f0
LAB_0018adaa:
XORPS XMM0,XMM0
TEST RBX,RBX
JZ 0x0018ae64
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV qword ptr [RSP + 0x50],0x0
MOV RDI,RSP
LEA RAX,[RSP + 0x10]
MOV qword ptr [RDI],RAX
LAB_0018adcf:
LEA RSI,[0x1f443f]
LEA RDX,[0x1f4440]
CALL 0x00121af4
LAB_0018ade2:
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
MOV RSI,R14
MOV ECX,0x1
CALL 0x001839d4
MOV RDI,qword ptr [RSP + 0x20]
MOV RBX,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0018ae18
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a8f0
LAB_0018ae18:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0018ae33
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a8f0
LAB_0018ae33:
TEST RBX,RBX
JZ 0x0018ae6e
MOV R13,R12
MOV R12,qword ptr [R14]
MOV R15,qword ptr [R14 + 0x8]
TEST R15,R15
JZ 0x0018afc2
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x0018afbd
INC dword ptr [R15 + 0x8]
JMP 0x0018afc2
LAB_0018ae64:
MOVUPS xmmword ptr [R12],XMM0
JMP 0x0018b0e0
LAB_0018ae6e:
MOV qword ptr [RSP + 0x60],R12
LEA RDI,[RSP + 0x68]
MOV qword ptr [RDI],R14
LEA RAX,[RSP + 0x40]
MOV qword ptr [RDI + 0x8],RAX
LAB_0018ae84:
CALL 0x0018e08e
LEA R12,[0x1f0157]
MOV R13,RSP
LEA RBP,[RSP + 0x20]
LEA RBX,[RSP + 0x68]
LAB_0018ae9d:
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x0018b0f2
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
LAB_0018aeb4:
MOV RDI,R13
LEA RSI,[0x1f0156]
MOV RDX,R12
CALL 0x00121af4
LAB_0018aec6:
MOV RDI,RBP
MOV RSI,R14
MOV RDX,R13
MOV ECX,0x1
CALL 0x001839d4
MOV RDI,qword ptr [RSP + 0x20]
MOV R15,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0018aefa
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a8f0
LAB_0018aefa:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0018af15
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a8f0
LAB_0018af15:
TEST R15,R15
JZ 0x0018af27
LAB_0018af1a:
MOV RDI,RBX
CALL 0x0018e08e
JMP 0x0018ae9d
LAB_0018af27:
MOV RDI,RSP
LEA RAX,[RSP + 0x10]
MOV qword ptr [RDI],RAX
LAB_0018af32:
LEA RSI,[0x1f443f]
LEA RDX,[0x1f4440]
CALL 0x00121af4
LAB_0018af45:
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
MOV RSI,R14
MOV ECX,0x1
CALL 0x001839d4
MOV RDI,qword ptr [RSP + 0x20]
MOV RBX,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0018af7b
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a8f0
LAB_0018af7b:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0018af96
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a8f0
LAB_0018af96:
TEST RBX,RBX
JZ 0x0018b124
MOV R12,qword ptr [R14]
MOV R15,qword ptr [R14 + 0x8]
TEST R15,R15
JZ 0x0018b01d
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x0018b018
INC dword ptr [R15 + 0x8]
JMP 0x0018b01d
LAB_0018afbd:
INC.LOCK dword ptr [R15 + 0x8]
LAB_0018afc2:
MOV RBX,qword ptr [R14 + 0x20]
SUB RBX,qword ptr [R14 + 0x10]
LAB_0018afca:
MOV EDI,0x48
CALL 0x0011a8c0
LEA RDX,[0x22a608]
ADD RDX,0x10
MOV RCX,RAX
ADD RCX,0x10
LEA RSI,[0x22a3b8]
ADD RSI,0x10
MOV RDI,0x100000001
MOV qword ptr [RAX + 0x8],RDI
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x10],RSI
MOV qword ptr [RAX + 0x18],R12
MOV qword ptr [RAX + 0x20],R15
TEST R15,R15
MOV R12,R13
JNZ 0x0018b073
JMP 0x0018b08a
LAB_0018b018:
INC.LOCK dword ptr [R15 + 0x8]
LAB_0018b01d:
MOV RBX,qword ptr [R14 + 0x20]
SUB RBX,qword ptr [R14 + 0x10]
LAB_0018b025:
MOV EDI,0x48
CALL 0x0011a8c0
LAB_0018b02f:
LEA RDX,[0x22a608]
ADD RDX,0x10
MOV RCX,RAX
ADD RCX,0x10
LEA RSI,[0x22a3b8]
ADD RSI,0x10
MOV RDI,0x100000001
MOV qword ptr [RAX + 0x8],RDI
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x10],RSI
MOV qword ptr [RAX + 0x18],R12
MOV qword ptr [RAX + 0x20],R15
TEST R15,R15
MOV R12,qword ptr [RSP + 0x60]
JZ 0x0018b08a
LAB_0018b073:
MOV RDX,qword ptr [0x0022bf88]
CMP byte ptr [RDX],0x0
JZ 0x0018b085
INC dword ptr [R15 + 0x8]
JMP 0x0018b08a
LAB_0018b085:
INC.LOCK dword ptr [R15 + 0x8]
LAB_0018b08a:
LEA RDX,[0x22a658]
ADD RDX,0x10
MOV qword ptr [RAX + 0x28],RBX
MOV qword ptr [RAX + 0x10],RDX
MOVAPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RAX + 0x30],XMM0
MOV RDX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x40],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV qword ptr [RSP + 0x50],0x0
MOV qword ptr [R12],RCX
MOV qword ptr [R12 + 0x8],RAX
TEST R15,R15
JZ 0x0018b0d6
MOV RDI,R15
CALL 0x0016d396
LAB_0018b0d6:
LEA RDI,[RSP + 0x40]
CALL 0x0018e2c6
LAB_0018b0e0:
MOV RAX,R12
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018b0f2:
MOV EDI,0x10
CALL 0x0011a460
MOV R14,RAX
LAB_0018b0ff:
LEA RSI,[0x1f028a]
MOV RDI,RAX
CALL 0x0011a340
LAB_0018b10e:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af30
LAB_0018b124:
MOV EDI,0x10
CALL 0x0011a460
MOV R14,RAX
LAB_0018b131:
LEA RSI,[0x1f025c]
MOV RDI,RAX
CALL 0x0011a340
LAB_0018b140:
JMP 0x0018b10e
|
/* minja::Parser::parseDictionary() */
int8 * minja::Parser::parseDictionary(void)
{
int8 uVar1;
int8 *puVar2;
runtime_error *this;
int8 *puVar3;
long lVar4;
int8 *in_RSI;
int8 *in_RDI;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00;
long *local_a8 [2];
long local_98 [2];
long *local_88;
long local_80;
long local_78 [2];
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 *local_48;
_lambda___1_ local_40 [8];
int8 *local_38;
local_a8[0] = local_98;
/* try { // try from 0018ad45 to 0018ad5a has its CatchHandler @ 0018b180 */
std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001efc5d,&DAT_001efc5e);
/* try { // try from 0018ad5b to 0018ad6f has its CatchHandler @ 0018b160 */
consumeToken(&local_88);
lVar4 = local_80;
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
if (lVar4 == 0) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
local_a8[0] = local_98;
/* try { // try from 0018adcf to 0018ade1 has its CatchHandler @ 0018b15e */
std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f443f,&DAT_001f4440);
/* try { // try from 0018ade2 to 0018adf6 has its CatchHandler @ 0018b15c */
consumeToken(&local_88);
lVar4 = local_80;
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
if (lVar4 == 0) {
local_38 = &local_68;
local_48 = in_RDI;
/* try { // try from 0018ae84 to 0018ae88 has its CatchHandler @ 0018b192 */
parseDictionary()::{lambda()#1}::operator()(local_40);
do {
if (in_RSI[4] == in_RSI[3]) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018b0ff to 0018b10d has its CatchHandler @ 0018b185 */
std::runtime_error::runtime_error(this,"Expected closing brace");
LAB_0018b10e:
/* try { // try from 0018b10e to 0018b123 has its CatchHandler @ 0018b192 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
local_a8[0] = local_98;
/* try { // try from 0018aeb4 to 0018aec5 has its CatchHandler @ 0018b196 */
std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f0156,&DAT_001f0157);
/* try { // try from 0018aec6 to 0018aed8 has its CatchHandler @ 0018b1ab */
consumeToken(&local_88);
lVar4 = local_80;
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
if (lVar4 == 0) {
local_a8[0] = local_98;
/* try { // try from 0018af32 to 0018af44 has its CatchHandler @ 0018b148 */
std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f443f,&DAT_001f4440);
/* try { // try from 0018af45 to 0018af59 has its CatchHandler @ 0018b146 */
consumeToken(&local_88);
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
if (local_80 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018b131 to 0018b13f has its CatchHandler @ 0018b142 */
std::runtime_error::runtime_error(this,"Expected comma or closing brace in dictionary");
goto LAB_0018b10e;
}
uVar1 = *in_RSI;
this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
UNLOCK();
}
else {
*(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
}
}
lVar4 = in_RSI[4] - in_RSI[2];
/* try { // try from 0018b025 to 0018b02e has its CatchHandler @ 0018b144 */
puVar2 = (int8 *)operator_new(0x48);
puVar3 = puVar2 + 2;
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_ptr_inplace_0022a618;
puVar2[2] = &PTR___cxa_pure_virtual_0022a3c8;
puVar2[3] = uVar1;
puVar2[4] = this_00;
in_RDI = local_48;
if (this_00 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) goto LAB_0018b08a;
goto LAB_0018b073;
}
/* try { // try from 0018af1a to 0018af21 has its CatchHandler @ 0018b194 */
parseDictionary()::{lambda()#1}::operator()(local_40);
} while( true );
}
uVar1 = *in_RSI;
this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
UNLOCK();
}
else {
*(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
}
}
lVar4 = in_RSI[4] - in_RSI[2];
/* try { // try from 0018afca to 0018afd3 has its CatchHandler @ 0018b14a */
puVar2 = (int8 *)operator_new(0x48);
puVar3 = puVar2 + 2;
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_ptr_inplace_0022a618;
puVar2[2] = &PTR___cxa_pure_virtual_0022a3c8;
puVar2[3] = uVar1;
puVar2[4] = this_00;
if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
LAB_0018b073:
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
UNLOCK();
}
else {
*(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
}
}
LAB_0018b08a:
puVar2[5] = lVar4;
puVar2[2] = &PTR_do_evaluate_0022a668;
puVar2[6] = local_68;
puVar2[7] = uStack_60;
puVar2[8] = local_58;
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
*in_RDI = puVar3;
in_RDI[1] = puVar2;
if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00);
}
std::
vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>
::~vector((vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>
*)&local_68);
}
return in_RDI;
}
|
|
12,256
|
LefDefParser::lefwMacroPinPortDesignRuleWidth(char const*, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwMacroPinPortDesignRuleWidth(const char *layerName,
double width)
{
lefw54Num = LEFW_DESIGNRULEWIDTH;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (!lefwIsMacroPinPort)
return LEFW_BAD_ORDER;
if (!layerName || layerName == 0 || *layerName == 0)
return LEFW_BAD_DATA;
if (lefwSpacingVal)
return LEFW_BAD_DATA;
if (versionNum < 5.4)
return LEFW_WRONG_VERSION;
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) " LAYER %s ", layerName);
if (width)
encPrint(lefwFile, (char*) "DESIGNRULEWIDTH %.11g ", width);
encPrint(lefwFile, (char*) ";\n ");
} else {
fprintf(lefwFile, " LAYER %s ", layerName);
if (width)
fprintf(lefwFile, "DESIGNRULEWIDTH %.11g ", width);
fprintf(lefwFile, ";\n ");
}
lefwLines++;
lefwIsMacroPinPortLayer = 1;
lefwWidthVal = 1;
return LEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::lefwMacroPinPortDesignRuleWidth(char const*, double):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movsd %xmm0, (%rsp)
movl $0x7e, 0xf1d4(%rip) # 0x32d4c
leaq 0xf281(%rip), %rax # 0x32e00
cmpq $0x0, (%rax)
jne 0x23b92
movl $0x1, 0x14(%rsp)
jmp 0x23d2a
leaq 0xf4bb(%rip), %rax # 0x33054
cmpl $0x0, (%rax)
jne 0x23bab
movl $0x2, 0x14(%rsp)
jmp 0x23d2a
leaq 0xf4f6(%rip), %rax # 0x330a8
cmpl $0x0, (%rax)
jne 0x23bc4
movl $0x2, 0x14(%rsp)
jmp 0x23d2a
cmpq $0x0, 0x8(%rsp)
je 0x23be1
cmpq $0x0, 0x8(%rsp)
je 0x23be1
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x23bee
movl $0x3, 0x14(%rsp)
jmp 0x23d2a
cmpl $0x0, 0xf52b(%rip) # 0x33120
je 0x23c04
movl $0x3, 0x14(%rsp)
jmp 0x23d2a
movsd 0x55f4(%rip), %xmm0 # 0x29200
ucomisd 0xf12c(%rip), %xmm0 # 0x32d40
jbe 0x23c23
movl $0x5, 0x14(%rsp)
jmp 0x23d2a
cmpl $0x0, 0xf4c2(%rip) # 0x330ec
je 0x23c92
leaq 0xf1cd(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x7eff(%rip), %rsi # 0x2bb41
movb $0x0, %al
callq 0x289b0
movsd (%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x23c5b
jp 0x23c5b
jmp 0x23c78
leaq 0xf19e(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd (%rsp), %xmm0
leaq 0x7ee7(%rip), %rsi # 0x2bb58
movb $0x1, %al
callq 0x289b0
leaq 0xf181(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x7ecb(%rip), %rsi # 0x2bb54
movb $0x0, %al
callq 0x289b0
jmp 0x23cf6
leaq 0xf167(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x7e99(%rip), %rsi # 0x2bb41
movb $0x0, %al
callq 0x1100
movsd (%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x23cc1
jp 0x23cc1
jmp 0x23cde
leaq 0xf138(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd (%rsp), %xmm0
leaq 0x7e81(%rip), %rsi # 0x2bb58
movb $0x1, %al
callq 0x1100
leaq 0xf11b(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x7e65(%rip), %rsi # 0x2bb54
movb $0x0, %al
callq 0x1100
leaq 0xf34f(%rip), %rax # 0x3304c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xf343(%rip), %rax # 0x3304c
movl %ecx, (%rax)
leaq 0xf392(%rip), %rax # 0x330a4
movl $0x1, (%rax)
movl $0x1, 0xf402(%rip) # 0x33124
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser31lefwMacroPinPortDesignRuleWidthEPKcd:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
movsd [rsp+18h+var_18], xmm0
mov cs:_ZN12LefDefParserL9lefw54NumE, 7Eh ; '~'; LefDefParser::lefw54Num
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_23B92
mov [rsp+18h+var_4], 1
jmp loc_23D2A
loc_23B92:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_23BAB
mov [rsp+18h+var_4], 2
jmp loc_23D2A
loc_23BAB:
lea rax, _ZN12LefDefParser18lefwIsMacroPinPortE; LefDefParser::lefwIsMacroPinPort
cmp dword ptr [rax], 0
jnz short loc_23BC4
mov [rsp+18h+var_4], 2
jmp loc_23D2A
loc_23BC4:
cmp [rsp+18h+var_10], 0
jz short loc_23BE1
cmp [rsp+18h+var_10], 0
jz short loc_23BE1
mov rax, [rsp+18h+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_23BEE
loc_23BE1:
mov [rsp+18h+var_4], 3
jmp loc_23D2A
loc_23BEE:
cmp cs:_ZN12LefDefParserL14lefwSpacingValE, 0; LefDefParser::lefwSpacingVal
jz short loc_23C04
mov [rsp+18h+var_4], 3
jmp loc_23D2A
loc_23C04:
movsd xmm0, cs:dbl_29200
ucomisd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
jbe short loc_23C23
mov [rsp+18h+var_4], 5
jmp loc_23D2A
loc_23C23:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_23C92
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aLayerS_2; " LAYER %s "
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
movsd xmm0, [rsp+18h+var_18]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_23C5B
jp short loc_23C5B
jmp short loc_23C78
loc_23C5B:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_18]
lea rsi, aDesignrulewidt; "DESIGNRULEWIDTH %.11g "
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
loc_23C78:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, asc_2BB54; ";\n "
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_23CF6
loc_23C92:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aLayerS_2; " LAYER %s "
mov al, 0
call _fprintf
movsd xmm0, [rsp+18h+var_18]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_23CC1
jp short loc_23CC1
jmp short loc_23CDE
loc_23CC1:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_18]
lea rsi, aDesignrulewidt; "DESIGNRULEWIDTH %.11g "
mov al, 1
call _fprintf
loc_23CDE:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, asc_2BB54; ";\n "
mov al, 0
call _fprintf
loc_23CF6:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser23lefwIsMacroPinPortLayerE; LefDefParser::lefwIsMacroPinPortLayer
mov dword ptr [rax], 1
mov cs:_ZN12LefDefParserL12lefwWidthValE, 1; LefDefParser::lefwWidthVal
mov [rsp+18h+var_4], 0
loc_23D2A:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long LefDefParser::lefwMacroPinPortDesignRuleWidth(
LefDefParser *this,
const char *a2,
double a3,
long long a4,
int a5,
int a6,
int a7)
{
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
LefDefParser::lefw54Num = 126;
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwIsMacroPinPort )
{
if ( this && *(_BYTE *)this )
{
if ( LefDefParser::lefwSpacingVal )
{
return 3;
}
else if ( *(double *)&LefDefParser::versionNum >= 5.4 )
{
if ( LefDefParser::lefwWriteEncrypt )
{
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" LAYER %s ",
(_DWORD)this,
a5,
a6,
a7);
if ( a3 != 0.0 )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"DESIGNRULEWIDTH %.11g ", v7, v8, v9, v10);
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n ", v7, v8, v9, v10);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " LAYER %s ", (const char *)this);
if ( a3 != 0.0 )
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "DESIGNRULEWIDTH %.11g ", a3);
fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n ");
}
++LefDefParser::lefwLines;
LefDefParser::lefwIsMacroPinPortLayer = 1;
LefDefParser::lefwWidthVal = 1;
return 0;
}
else
{
return 5;
}
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
lefwMacroPinPortDesignRuleWidth:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOVSD qword ptr [RSP],XMM0
MOV dword ptr [0x00132d4c],0x7e
LEA RAX,[0x132e00]
CMP qword ptr [RAX],0x0
JNZ 0x00123b92
MOV dword ptr [RSP + 0x14],0x1
JMP 0x00123d2a
LAB_00123b92:
LEA RAX,[0x133054]
CMP dword ptr [RAX],0x0
JNZ 0x00123bab
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00123d2a
LAB_00123bab:
LEA RAX,[0x1330a8]
CMP dword ptr [RAX],0x0
JNZ 0x00123bc4
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00123d2a
LAB_00123bc4:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00123be1
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00123be1
MOV RAX,qword ptr [RSP + 0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x00123bee
LAB_00123be1:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x00123d2a
LAB_00123bee:
CMP dword ptr [0x00133120],0x0
JZ 0x00123c04
MOV dword ptr [RSP + 0x14],0x3
JMP 0x00123d2a
LAB_00123c04:
MOVSD XMM0,qword ptr [0x00129200]
UCOMISD XMM0,qword ptr [0x00132d40]
JBE 0x00123c23
MOV dword ptr [RSP + 0x14],0x5
JMP 0x00123d2a
LAB_00123c23:
CMP dword ptr [0x001330ec],0x0
JZ 0x00123c92
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x12bb41]
MOV AL,0x0
CALL 0x001289b0
MOVSD XMM0,qword ptr [RSP]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x00123c5b
JP 0x00123c5b
JMP 0x00123c78
LAB_00123c5b:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP]
LEA RSI,[0x12bb58]
MOV AL,0x1
CALL 0x001289b0
LAB_00123c78:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x12bb54]
MOV AL,0x0
CALL 0x001289b0
JMP 0x00123cf6
LAB_00123c92:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x12bb41]
MOV AL,0x0
CALL 0x00101100
MOVSD XMM0,qword ptr [RSP]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x00123cc1
JP 0x00123cc1
JMP 0x00123cde
LAB_00123cc1:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP]
LEA RSI,[0x12bb58]
MOV AL,0x1
CALL 0x00101100
LAB_00123cde:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x12bb54]
MOV AL,0x0
CALL 0x00101100
LAB_00123cf6:
LEA RAX,[0x13304c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x13304c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x1330a4]
MOV dword ptr [RAX],0x1
MOV dword ptr [0x00133124],0x1
MOV dword ptr [RSP + 0x14],0x0
LAB_00123d2a:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwMacroPinPortDesignRuleWidth(char const*, double) */
int4 LefDefParser::lefwMacroPinPortDesignRuleWidth(char *param_1,double param_2)
{
int4 local_4;
lefw54Num = 0x7e;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if (lefwIsMacroPinPort == 0) {
local_4 = 2;
}
else if (((param_1 == (char *)0x0) || (param_1 == (char *)0x0)) || (*param_1 == '\0')) {
local_4 = 3;
}
else if (lefwSpacingVal == 0) {
if (DAT_00129200 <= versionNum) {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," LAYER %s ",param_1);
if ((param_2 != 0.0) || (NAN(param_2))) {
fprintf(lefwFile,"DESIGNRULEWIDTH %.11g ",param_2);
}
fprintf(lefwFile,";\n ");
}
else {
encPrint(lefwFile," LAYER %s ",param_1);
if ((param_2 != 0.0) || (NAN(param_2))) {
encPrint(lefwFile,"DESIGNRULEWIDTH %.11g ",param_2);
}
encPrint(lefwFile,";\n ");
}
lefwLines = lefwLines + 1;
lefwIsMacroPinPortLayer = 1;
lefwWidthVal = 1;
local_4 = 0;
}
else {
local_4 = 5;
}
}
else {
local_4 = 3;
}
return local_4;
}
|
|
12,257
|
test_bootstrap()
|
eloqsql/storage/perfschema/unittest/pfs-t.cc
|
void test_bootstrap()
{
void *psi;
void *psi_2;
PSI_bootstrap *boot;
PFS_global_param param;
diag("test_bootstrap");
memset(& param, 0xFF, sizeof(param));
param.m_enabled= true;
param.m_mutex_class_sizing= 0;
param.m_rwlock_class_sizing= 0;
param.m_cond_class_sizing= 0;
param.m_thread_class_sizing= 0;
param.m_table_share_sizing= 0;
param.m_file_class_sizing= 0;
param.m_socket_class_sizing= 0;
param.m_mutex_sizing= 0;
param.m_rwlock_sizing= 0;
param.m_cond_sizing= 0;
param.m_thread_sizing= 0;
param.m_table_sizing= 0;
param.m_file_sizing= 0;
param.m_file_handle_sizing= 0;
param.m_socket_sizing= 0;
param.m_events_waits_history_sizing= 0;
param.m_events_waits_history_long_sizing= 0;
param.m_setup_actor_sizing= 0;
param.m_setup_object_sizing= 0;
param.m_user_sizing= 0;
param.m_account_sizing= 0;
param.m_host_sizing= 0;
param.m_stage_class_sizing= 0;
param.m_events_stages_history_sizing= 0;
param.m_events_stages_history_long_sizing= 0;
param.m_statement_class_sizing= 0;
param.m_events_statements_history_sizing= 0;
param.m_events_statements_history_long_sizing= 0;
param.m_events_transactions_history_sizing= 0;
param.m_events_transactions_history_long_sizing= 0;
param.m_digest_sizing= 0;
param.m_session_connect_attrs_sizing= 0;
param.m_program_sizing= 0;
param.m_statement_stack_sizing= 0;
param.m_memory_class_sizing= 0;
param.m_metadata_lock_sizing= 0;
param.m_max_digest_length= 0;
param.m_max_sql_text_length= 0;
param.m_hints.m_table_definition_cache = 100;
param.m_hints.m_table_open_cache = 100;
param.m_hints.m_max_connections = 100;
param.m_hints.m_open_files_limit = 100;
param.m_hints.m_max_prepared_stmt_count= 100;
pre_initialize_performance_schema();
boot= initialize_performance_schema(& param);
ok(boot != NULL, "boot");
ok(boot->get_interface != NULL, "boot->get_interface");
psi= boot->get_interface(0);
ok(psi == NULL, "no version 0");
psi= boot->get_interface(PSI_VERSION_1);
ok(psi != NULL, "version 1");
psi_2= boot->get_interface(PSI_VERSION_2);
ok(psi_2 == NULL, "version 2");
unload_performance_schema();
}
|
O3
|
cpp
|
test_bootstrap():
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x190, %rsp # imm = 0x190
leaq 0x5216d(%rip), %rdi # 0x7f004
xorl %eax, %eax
callq 0x3092b
leaq -0x198(%rbp), %rbx
movl $0x120, %edx # imm = 0x120
movq %rbx, %rdi
movl $0xff, %esi
callq 0x261c0
movb $0x1, (%rbx)
leaq -0x148(%rbp), %r14
xorps %xmm0, %xmm0
movups %xmm0, -0x38(%r14)
movups %xmm0, -0x28(%r14)
movq $0x0, -0x18(%r14)
movl $0xc8, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x261c0
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%r14)
movups %xmm0, 0xe0(%r14)
movups %xmm0, 0xf0(%r14)
movups %xmm0, 0x100(%r14)
movl $0x64, %eax
movq %rax, 0x110(%r14)
movq %rax, 0x118(%r14)
movq %rax, 0x120(%r14)
movq %rax, 0x128(%r14)
movq %rax, 0x130(%r14)
callq 0x3e640
movq %rbx, %rdi
callq 0x3e891
movq %rax, %rbx
xorl %edi, %edi
testq %rax, %rax
setne %dil
leaq 0x520c3(%rip), %rsi # 0x7f013
xorl %eax, %eax
callq 0x30b8b
xorl %edi, %edi
cmpq $0x0, (%rbx)
setne %dil
leaq 0x520b0(%rip), %rsi # 0x7f018
xorl %eax, %eax
callq 0x30b8b
xorl %edi, %edi
callq *(%rbx)
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0x520a9(%rip), %rsi # 0x7f02c
xorl %eax, %eax
callq 0x30b8b
movl $0x1, %edi
callq *(%rbx)
xorl %edi, %edi
testq %rax, %rax
setne %dil
leaq 0x52098(%rip), %rsi # 0x7f039
xorl %eax, %eax
callq 0x30b8b
movl $0x2, %edi
callq *(%rbx)
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0x52084(%rip), %rsi # 0x7f043
xorl %eax, %eax
callq 0x30b8b
callq 0x2cfd7
addq $0x190, %rsp # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
|
_Z14test_bootstrapv:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 190h
lea rdi, aTestBootstrap; "test_bootstrap"
xor eax, eax
call diag
lea rbx, [rbp+var_198]
mov edx, 120h
mov rdi, rbx
mov esi, 0FFh
call _memset
mov byte ptr [rbx], 1
lea r14, [rbp+var_148]
xorps xmm0, xmm0
movups xmmword ptr [r14-38h], xmm0
movups xmmword ptr [r14-28h], xmm0
mov qword ptr [r14-18h], 0
mov edx, 0C8h
mov rdi, r14
xor esi, esi
call _memset
xorps xmm0, xmm0
movups xmmword ptr [r14+0D0h], xmm0
movups xmmword ptr [r14+0E0h], xmm0
movups xmmword ptr [r14+0F0h], xmm0
movups xmmword ptr [r14+100h], xmm0
mov eax, 64h ; 'd'
mov [r14+110h], rax
mov [r14+118h], rax
mov [r14+120h], rax
mov [r14+128h], rax
mov [r14+130h], rax
call _Z33pre_initialize_performance_schemav; pre_initialize_performance_schema(void)
mov rdi, rbx
call _Z29initialize_performance_schemaP16PFS_global_param; initialize_performance_schema(PFS_global_param *)
mov rbx, rax
xor edi, edi
test rax, rax
setnz dil
lea rsi, aBoot; "boot"
xor eax, eax
call ok
xor edi, edi
cmp qword ptr [rbx], 0
setnz dil
lea rsi, aBootGetInterfa; "boot->get_interface"
xor eax, eax
call ok
xor edi, edi
call qword ptr [rbx]
xor edi, edi
test rax, rax
setz dil
lea rsi, aNoVersion0; "no version 0"
xor eax, eax
call ok
mov edi, 1
call qword ptr [rbx]
xor edi, edi
test rax, rax
setnz dil
lea rsi, aVersion1; "version 1"
xor eax, eax
call ok
mov edi, 2
call qword ptr [rbx]
xor edi, edi
test rax, rax
setz dil
lea rsi, aVersion2; "version 2"
xor eax, eax
call ok
call _Z25unload_performance_schemav; unload_performance_schema(void)
add rsp, 190h
pop rbx
pop r14
pop rbp
retn
|
long long test_bootstrap(long long a1, int a2, int a3, int a4, int a5, int a6)
{
_QWORD *v6; // rbx
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
long long v15; // rax
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
long long v20; // rax
int v21; // edx
int v22; // ecx
int v23; // r8d
int v24; // r9d
long long v25; // rax
int v26; // edx
int v27; // ecx
int v28; // r8d
int v29; // r9d
_BYTE v31[24]; // [rsp+8h] [rbp-198h] BYREF
__int128 v32; // [rsp+20h] [rbp-180h]
__int128 v33; // [rsp+30h] [rbp-170h]
long long v34; // [rsp+40h] [rbp-160h]
_BYTE v35[208]; // [rsp+58h] [rbp-148h] BYREF
__int128 v36; // [rsp+128h] [rbp-78h]
__int128 v37; // [rsp+138h] [rbp-68h]
__int128 v38; // [rsp+148h] [rbp-58h]
__int128 v39; // [rsp+158h] [rbp-48h]
long long v40; // [rsp+168h] [rbp-38h]
long long v41; // [rsp+170h] [rbp-30h]
long long v42; // [rsp+178h] [rbp-28h]
long long v43; // [rsp+180h] [rbp-20h]
long long v44; // [rsp+188h] [rbp-18h]
diag((unsigned int)"test_bootstrap", a2, a3, a4, a5, a6);
memset(v31, 255LL, 288LL);
v31[0] = 1;
v32 = 0LL;
v33 = 0LL;
v34 = 0LL;
memset(v35, 0LL, 200LL);
v36 = 0LL;
v37 = 0LL;
v38 = 0LL;
v39 = 0LL;
v40 = 100LL;
v41 = 100LL;
v42 = 100LL;
v43 = 100LL;
v44 = 100LL;
pre_initialize_performance_schema();
v6 = (_QWORD *)initialize_performance_schema(v31);
ok(v6 != 0LL, (unsigned int)"boot", v7, v8, v9, v10);
ok(*v6 != 0LL, (unsigned int)"boot->get_interface", v11, v12, v13, v14);
v15 = ((long long ( *)(_QWORD))*v6)(0LL);
ok(v15 == 0, (unsigned int)"no version 0", v16, v17, v18, v19);
v20 = ((long long ( *)(long long))*v6)(1LL);
ok(v20 != 0, (unsigned int)"version 1", v21, v22, v23, v24);
v25 = ((long long ( *)(long long))*v6)(2LL);
ok(v25 == 0, (unsigned int)"version 2", v26, v27, v28, v29);
return unload_performance_schema();
}
|
test_bootstrap:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x190
LEA RDI,[0x17f004]
XOR EAX,EAX
CALL 0x0013092b
LEA RBX,[RBP + -0x198]
MOV EDX,0x120
MOV RDI,RBX
MOV ESI,0xff
CALL 0x001261c0
MOV byte ptr [RBX],0x1
LEA R14,[RBP + -0x148]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + -0x38],XMM0
MOVUPS xmmword ptr [R14 + -0x28],XMM0
MOV qword ptr [R14 + -0x18],0x0
MOV EDX,0xc8
MOV RDI,R14
XOR ESI,ESI
CALL 0x001261c0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0xd0],XMM0
MOVUPS xmmword ptr [R14 + 0xe0],XMM0
MOVUPS xmmword ptr [R14 + 0xf0],XMM0
MOVUPS xmmword ptr [R14 + 0x100],XMM0
MOV EAX,0x64
MOV qword ptr [R14 + 0x110],RAX
MOV qword ptr [R14 + 0x118],RAX
MOV qword ptr [R14 + 0x120],RAX
MOV qword ptr [R14 + 0x128],RAX
MOV qword ptr [R14 + 0x130],RAX
CALL 0x0013e640
MOV RDI,RBX
CALL 0x0013e891
MOV RBX,RAX
XOR EDI,EDI
TEST RAX,RAX
SETNZ DIL
LEA RSI,[0x17f013]
XOR EAX,EAX
CALL 0x00130b8b
XOR EDI,EDI
CMP qword ptr [RBX],0x0
SETNZ DIL
LEA RSI,[0x17f018]
XOR EAX,EAX
CALL 0x00130b8b
XOR EDI,EDI
CALL qword ptr [RBX]
XOR EDI,EDI
TEST RAX,RAX
SETZ DIL
LEA RSI,[0x17f02c]
XOR EAX,EAX
CALL 0x00130b8b
MOV EDI,0x1
CALL qword ptr [RBX]
XOR EDI,EDI
TEST RAX,RAX
SETNZ DIL
LEA RSI,[0x17f039]
XOR EAX,EAX
CALL 0x00130b8b
MOV EDI,0x2
CALL qword ptr [RBX]
XOR EDI,EDI
TEST RAX,RAX
SETZ DIL
LEA RSI,[0x17f043]
XOR EAX,EAX
CALL 0x00130b8b
CALL 0x0012cfd7
ADD RSP,0x190
POP RBX
POP R14
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* test_bootstrap() */
void test_bootstrap(void)
{
long *plVar1;
long lVar2;
PFS_global_param local_1a0 [24];
int8 local_188;
int8 uStack_180;
int8 local_178;
int8 uStack_170;
int8 local_168;
int1 local_150 [208];
int8 local_80;
int8 uStack_78;
int8 local_70;
int8 uStack_68;
int8 local_60;
int8 uStack_58;
int8 local_50;
int8 uStack_48;
int8 local_40;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
diag("test_bootstrap");
memset(local_1a0,0xff,0x120);
local_1a0[0] = (PFS_global_param)0x1;
local_188 = 0;
uStack_180 = 0;
local_178 = 0;
uStack_170 = 0;
local_168 = 0;
memset(local_150,0,200);
local_80 = 0;
uStack_78 = 0;
local_70 = 0;
uStack_68 = 0;
local_60 = 0;
uStack_58 = 0;
local_50 = 0;
uStack_48 = 0;
local_40 = 100;
local_38 = 100;
local_30 = 100;
local_28 = 100;
local_20 = 100;
pre_initialize_performance_schema();
plVar1 = (long *)initialize_performance_schema(local_1a0);
ok(plVar1 != (long *)0x0,&DAT_0017f013);
ok(*plVar1 != 0,"boot->get_interface");
lVar2 = (*(code *)*plVar1)(0);
ok(lVar2 == 0,"no version 0");
lVar2 = (*(code *)*plVar1)(1);
ok(lVar2 != 0,"version 1");
lVar2 = (*(code *)*plVar1)(2);
ok(lVar2 == 0,"version 2");
unload_performance_schema();
return;
}
|
|
12,258
|
cr_invert
|
bluesky950520[P]quickjs/libunicode.c
|
int cr_invert(CharRange *cr)
{
int len;
len = cr->len;
if (cr_realloc(cr, len + 2))
return -1;
memmove(cr->points + 1, cr->points, len * sizeof(cr->points[0]));
cr->points[0] = 0;
cr->points[len + 1] = UINT32_MAX;
cr->len = len + 2;
cr_compress(cr);
return 0;
}
|
O2
|
c
|
cr_invert:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq (%rdi), %r14
leal 0x2(%r14), %ebp
movl %ebp, %esi
callq 0x82fdc
testl %eax, %eax
je 0x8326e
pushq $-0x1
popq %rax
jmp 0x8329c
movq 0x8(%rbx), %rsi
leaq 0x4(%rsi), %rdi
leaq (,%r14,4), %rdx
callq 0xe7b0
movq 0x8(%rbx), %rax
andl $0x0, (%rax)
orl $-0x1, 0x4(%rax,%r14,4)
movl %ebp, (%rbx)
movq %rbx, %rdi
callq 0x83185
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
cr_invert:
push rbp
push r14
push rbx
mov rbx, rdi
movsxd r14, dword ptr [rdi]
lea ebp, [r14+2]
mov esi, ebp
call cr_realloc
test eax, eax
jz short loc_8326E
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_8329C
loc_8326E:
mov rsi, [rbx+8]
lea rdi, [rsi+4]
lea rdx, ds:0[r14*4]
call _memmove
mov rax, [rbx+8]
and dword ptr [rax], 0
or dword ptr [rax+r14*4+4], 0FFFFFFFFh
mov [rbx], ebp
mov rdi, rbx
call cr_compress
xor eax, eax
loc_8329C:
pop rbx
pop r14
pop rbp
retn
|
long long cr_invert(int *a1)
{
long long v1; // r14
_DWORD *v3; // rax
v1 = *a1;
if ( (unsigned int)cr_realloc((long long)a1, (int)v1 + 2) )
return -1LL;
memmove(*((_QWORD *)a1 + 1) + 4LL, *((_QWORD *)a1 + 1), 4 * v1);
v3 = (_DWORD *)*((_QWORD *)a1 + 1);
*v3 = 0;
v3[v1 + 1] = -1;
*a1 = v1 + 2;
cr_compress(a1);
return 0LL;
}
|
cr_invert:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOVSXD R14,dword ptr [RDI]
LEA EBP,[R14 + 0x2]
MOV ESI,EBP
CALL 0x00182fdc
TEST EAX,EAX
JZ 0x0018326e
PUSH -0x1
POP RAX
JMP 0x0018329c
LAB_0018326e:
MOV RSI,qword ptr [RBX + 0x8]
LEA RDI,[RSI + 0x4]
LEA RDX,[R14*0x4]
CALL 0x0010e7b0
MOV RAX,qword ptr [RBX + 0x8]
AND dword ptr [RAX],0x0
OR dword ptr [RAX + R14*0x4 + 0x4],0xffffffff
MOV dword ptr [RBX],EBP
MOV RDI,RBX
CALL 0x00183185
XOR EAX,EAX
LAB_0018329c:
POP RBX
POP R14
POP RBP
RET
|
int8 cr_invert(int *param_1)
{
int iVar1;
int4 *puVar2;
int iVar3;
int8 uVar4;
iVar1 = *param_1;
iVar3 = cr_realloc(param_1,iVar1 + 2);
if (iVar3 == 0) {
memmove((void *)((long)*(void **)(param_1 + 2) + 4),*(void **)(param_1 + 2),(long)iVar1 * 4);
puVar2 = *(int4 **)(param_1 + 2);
*puVar2 = 0;
puVar2[(long)iVar1 + 1] = 0xffffffff;
*param_1 = iVar1 + 2;
cr_compress(param_1);
uVar4 = 0;
}
else {
uVar4 = 0xffffffffffffffff;
}
return uVar4;
}
|
|
12,259
|
Log_event::get_type_str(Log_event_type)
|
eloqsql/sql/log_event.cc
|
const char* Log_event::get_type_str(Log_event_type type)
{
switch(type) {
case START_EVENT_V3: return "Start_v3";
case STOP_EVENT: return "Stop";
case QUERY_EVENT: return "Query";
case ROTATE_EVENT: return "Rotate";
case INTVAR_EVENT: return "Intvar";
case LOAD_EVENT: return "Load";
case NEW_LOAD_EVENT: return "New_load";
case SLAVE_EVENT: return "Slave";
case CREATE_FILE_EVENT: return "Create_file";
case APPEND_BLOCK_EVENT: return "Append_block";
case DELETE_FILE_EVENT: return "Delete_file";
case EXEC_LOAD_EVENT: return "Exec_load";
case RAND_EVENT: return "RAND";
case XID_EVENT: return "Xid";
case USER_VAR_EVENT: return "User var";
case FORMAT_DESCRIPTION_EVENT: return "Format_desc";
case TABLE_MAP_EVENT: return "Table_map";
case PRE_GA_WRITE_ROWS_EVENT: return "Write_rows_event_old";
case PRE_GA_UPDATE_ROWS_EVENT: return "Update_rows_event_old";
case PRE_GA_DELETE_ROWS_EVENT: return "Delete_rows_event_old";
case WRITE_ROWS_EVENT_V1: return "Write_rows_v1";
case UPDATE_ROWS_EVENT_V1: return "Update_rows_v1";
case DELETE_ROWS_EVENT_V1: return "Delete_rows_v1";
case WRITE_ROWS_EVENT: return "Write_rows";
case UPDATE_ROWS_EVENT: return "Update_rows";
case DELETE_ROWS_EVENT: return "Delete_rows";
case BEGIN_LOAD_QUERY_EVENT: return "Begin_load_query";
case EXECUTE_LOAD_QUERY_EVENT: return "Execute_load_query";
case INCIDENT_EVENT: return "Incident";
case ANNOTATE_ROWS_EVENT: return "Annotate_rows";
case BINLOG_CHECKPOINT_EVENT: return "Binlog_checkpoint";
case GTID_EVENT: return "Gtid";
case GTID_LIST_EVENT: return "Gtid_list";
case START_ENCRYPTION_EVENT: return "Start_encryption";
/* The following is only for mysqlbinlog */
case IGNORABLE_LOG_EVENT: return "Ignorable log event";
case ROWS_QUERY_LOG_EVENT: return "MySQL Rows_query";
case GTID_LOG_EVENT: return "MySQL Gtid";
case ANONYMOUS_GTID_LOG_EVENT: return "MySQL Anonymous_Gtid";
case PREVIOUS_GTIDS_LOG_EVENT: return "MySQL Previous_gtids";
case HEARTBEAT_LOG_EVENT: return "Heartbeat";
case TRANSACTION_CONTEXT_EVENT: return "Transaction_context";
case VIEW_CHANGE_EVENT: return "View_change";
case XA_PREPARE_LOG_EVENT: return "XA_prepare";
case QUERY_COMPRESSED_EVENT: return "Query_compressed";
case WRITE_ROWS_COMPRESSED_EVENT: return "Write_rows_compressed";
case UPDATE_ROWS_COMPRESSED_EVENT: return "Update_rows_compressed";
case DELETE_ROWS_COMPRESSED_EVENT: return "Delete_rows_compressed";
case WRITE_ROWS_COMPRESSED_EVENT_V1: return "Write_rows_compressed_v1";
case UPDATE_ROWS_COMPRESSED_EVENT_V1: return "Update_rows_compressed_v1";
case DELETE_ROWS_COMPRESSED_EVENT_V1: return "Delete_rows_compressed_v1";
default: return "Unknown"; /* impossible */
}
}
|
O3
|
cpp
|
Log_event::get_type_str(Log_event_type):
pushq %rbp
movq %rsp, %rbp
leal -0x1(%rdi), %eax
cmpl $0x25, %eax
ja 0x479a8
leaq 0x708f1(%rip), %rcx # 0xb8284
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x71e96(%rip), %rax # 0xb9839
jmp 0x47bf0
addl $0xffffff60, %edi # imm = 0xFFFFFF60
cmpl $0xb, %edi
ja 0x47be9
leaq 0x7095e(%rip), %rax # 0xb831c
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x71fb5(%rip), %rax # 0xb9983
jmp 0x47bf0
leaq 0x72068(%rip), %rax # 0xb9a42
jmp 0x47bf0
leaq 0x7203c(%rip), %rax # 0xb9a22
jmp 0x47bf0
leaq 0x72044(%rip), %rax # 0xb9a36
jmp 0x47bf0
leaq 0x71fc0(%rip), %rax # 0xb99be
jmp 0x47bf0
leaq 0x71ff9(%rip), %rax # 0xb9a03
jmp 0x47bf0
leaq 0x71f40(%rip), %rax # 0xb9956
jmp 0x47bf0
leaq 0x71e8e(%rip), %rax # 0xb98b0
jmp 0x47bf0
leaq 0x71fc0(%rip), %rax # 0xb99ee
jmp 0x47bf0
leaq 0x72051(%rip), %rax # 0xb9a8b
jmp 0x47bf0
leaq 0x71e1a(%rip), %rax # 0xb9860
jmp 0x47bf0
leaq 0x71f5b(%rip), %rax # 0xb99ad
jmp 0x47bf0
leaq 0x72000(%rip), %rax # 0xb9a5e
jmp 0x47bf0
leaq 0x71dea(%rip), %rax # 0xb9854
jmp 0x47bf0
leaq 0x71f73(%rip), %rax # 0xb99e9
jmp 0x47bf0
leaq 0x71e1c(%rip), %rax # 0xb989e
jmp 0x47bf0
leaq 0x71e06(%rip), %rax # 0xb9894
jmp 0x47bf0
leaq 0x71ee0(%rip), %rax # 0xb997a
jmp 0x47bf0
leaq 0x71e7e(%rip), %rax # 0xb9924
jmp 0x47bf0
leaq 0x71ef1(%rip), %rax # 0xb99a3
jmp 0x47bf0
leaq 0x71d84(%rip), %rax # 0xb9842
jmp 0x47bf0
leaq 0x71ff1(%rip), %rax # 0xb9abb
jmp 0x47bf0
leaq 0x71ebb(%rip), %rax # 0xb9991
jmp 0x47bf0
leaq 0x71dc1(%rip), %rax # 0xb98a3
jmp 0x47bf0
leaq 0x71d5f(%rip), %rax # 0xb984d
jmp 0x47bf0
leaq 0x71d75(%rip), %rax # 0xb986f
jmp 0x47bf0
leaq 0x71d41(%rip), %rax # 0xb9847
jmp 0x47bf0
leaq 0x71f3b(%rip), %rax # 0xb9a4d
jmp 0x47bf0
leaq 0x71f84(%rip), %rax # 0xb9aa2
jmp 0x47bf0
leaq 0x71e20(%rip), %rax # 0xb994a
jmp 0x47bf0
leaq 0x71e31(%rip), %rax # 0xb9967
jmp 0x47bf0
leaq 0x71f32(%rip), %rax # 0xb9a74
jmp 0x47bf0
leaq 0x71f87(%rip), %rax # 0xb9ad5
jmp 0x47bf0
leaq 0x71d81(%rip), %rax # 0xb98db
jmp 0x47bf0
leaq 0x71cf5(%rip), %rax # 0xb985b
jmp 0x47bf0
leaq 0x71d7f(%rip), %rax # 0xb98f1
jmp 0x47bf0
leaq 0x71d2c(%rip), %rax # 0xb98a7
jmp 0x47bf0
leaq 0x71ce5(%rip), %rax # 0xb9869
jmp 0x47bf0
leaq 0x71d2f(%rip), %rax # 0xb98bc
jmp 0x47bf0
leaq 0x71cf2(%rip), %rax # 0xb9888
jmp 0x47bf0
leaq 0x71cdc(%rip), %rax # 0xb987b
jmp 0x47bf0
leaq 0x71d96(%rip), %rax # 0xb993e
jmp 0x47bf0
leaq 0x71e32(%rip), %rax # 0xb99e3
jmp 0x47bf0
leaq 0x71d4d(%rip), %rax # 0xb9907
jmp 0x47bf0
leaq 0x71d03(%rip), %rax # 0xb98c6
jmp 0x47bf0
leaq 0x71d49(%rip), %rax # 0xb9915
jmp 0x47bf0
leaq 0x71dfd(%rip), %rax # 0xb99d2
jmp 0x47bf0
leaq 0x71d55(%rip), %rax # 0xb9933
jmp 0x47bf0
leaq 0x71e31(%rip), %rax # 0xb9a18
jmp 0x47bf0
leaq 0x71eff(%rip), %rax # 0xb9aef
popq %rbp
retq
|
_ZN9Log_event12get_type_strE14Log_event_type:
push rbp
mov rbp, rsp
lea eax, [rdi-1]; switch 38 cases
cmp eax, 25h
ja short def_4799A; jumptable 000000000004799A default case
lea rcx, jpt_4799A
movsxd rax, ds:(jpt_4799A - 0B8284h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4799C:
lea rax, aStartV3; jumptable 000000000004799A case 1
jmp loc_47BF0
def_4799A:
add edi, 0FFFFFF60h; jumptable 000000000004799A default case
cmp edi, 0Bh
ja def_479C5; jumptable 00000000000479C5 default case
lea rax, jpt_479C5
movsxd rcx, ds:(jpt_479C5 - 0B831Ch)[rax+rdi*4]
add rcx, rax
jmp rcx; switch jump
loc_479C7:
lea rax, aAnnotateRows; jumptable 00000000000479C5 case 160
jmp loc_47BF0
loc_479D3:
lea rax, aXaPrepare; jumptable 000000000004799A case 38
jmp loc_47BF0
loc_479DF:
lea rax, aTransactionCon; jumptable 000000000004799A case 36
jmp loc_47BF0
loc_479EB:
lea rax, aViewChange; jumptable 000000000004799A case 37
jmp loc_47BF0
loc_479F7:
lea rax, aIgnorableLogEv; jumptable 000000000004799A case 28
jmp loc_47BF0
loc_47A03:
lea rax, aMysqlPreviousG; jumptable 000000000004799A case 35
jmp loc_47BF0
loc_47A0F:
lea rax, aBeginLoadQuery; jumptable 000000000004799A case 17
jmp loc_47BF0
loc_47A1B:
lea rax, aFormatDesc; jumptable 000000000004799A case 15
jmp loc_47BF0
loc_47A27:
lea rax, aMysqlAnonymous; jumptable 000000000004799A case 34
jmp loc_47BF0
loc_47A33:
lea rax, aDeleteRowsComp; jumptable 00000000000479C5 case 171
jmp loc_47BF0
loc_47A3F:
lea rax, aNewLoad; jumptable 000000000004799A case 12
jmp loc_47BF0
loc_47A4B:
lea rax, aStartEncryptio; jumptable 00000000000479C5 case 164
jmp loc_47BF0
loc_47A57:
lea rax, aWriteRowsCompr; jumptable 00000000000479C5 case 169
jmp loc_47BF0
loc_47A63:
lea rax, aIntvar; jumptable 000000000004799A case 5
jmp loc_47BF0
loc_47A6F:
lea rax, aMysqlGtid+6; jumptable 00000000000479C5 case 162
jmp loc_47BF0
loc_47A7B:
lea rax, aRand; jumptable 000000000004799A case 13
jmp loc_47BF0
loc_47A87:
lea rax, aExecLoad; jumptable 000000000004799A case 10
jmp loc_47BF0
loc_47A93:
lea rax, aIncident; jumptable 000000000004799A case 26
jmp loc_47BF0
loc_47A9F:
lea rax, aDeleteRowsV1; jumptable 000000000004799A case 25
jmp loc_47BF0
loc_47AAB:
lea rax, aGtidList; jumptable 00000000000479C5 case 163
jmp loc_47BF0
loc_47AB7:
lea rax, aStop; jumptable 000000000004799A case 3
jmp loc_47BF0
loc_47AC3:
lea rax, aUpdateRowsComp; jumptable 00000000000479C5 case 167
jmp loc_47BF0
loc_47ACF:
lea rax, aBinlogCheckpoi; jumptable 00000000000479C5 case 161
jmp loc_47BF0
loc_47ADB:
lea rax, aXid; jumptable 000000000004799A case 16
jmp loc_47BF0
loc_47AE7:
lea rax, aRotate_0; jumptable 000000000004799A case 4
jmp loc_47BF0
loc_47AF3:
lea rax, aCreateFile; jumptable 000000000004799A case 8
jmp loc_47BF0
loc_47AFF:
lea rax, aQuery; jumptable 000000000004799A case 2
jmp loc_47BF0
loc_47B0B:
lea rax, aQueryCompresse; jumptable 00000000000479C5 case 165
jmp loc_47BF0
loc_47B17:
lea rax, aWriteRowsCompr_0; jumptable 00000000000479C5 case 166
jmp loc_47BF0
loc_47B23:
lea rax, aDeleteRows; jumptable 000000000004799A case 32
jmp loc_47BF0
loc_47B2F:
lea rax, aExecuteLoadQue; jumptable 000000000004799A case 18
jmp loc_47BF0
loc_47B3B:
lea rax, aUpdateRowsComp_0; jumptable 00000000000479C5 case 170
jmp loc_47BF0
loc_47B47:
lea rax, aDeleteRowsComp_0; jumptable 00000000000479C5 case 168
jmp loc_47BF0
loc_47B53:
lea rax, aUpdateRowsEven; jumptable 000000000004799A case 21
jmp loc_47BF0
loc_47B5F:
lea rax, aLoad; jumptable 000000000004799A case 6
jmp loc_47BF0
loc_47B6B:
lea rax, aDeleteRowsEven; jumptable 000000000004799A case 22
jmp short loc_47BF0
loc_47B74:
lea rax, aUserVar; jumptable 000000000004799A case 14
jmp short loc_47BF0
loc_47B7D:
lea rax, aSlave; jumptable 000000000004799A case 7
jmp short loc_47BF0
loc_47B86:
lea rax, aTableMap; jumptable 000000000004799A case 19
jmp short loc_47BF0
loc_47B8F:
lea rax, aDeleteFile; jumptable 000000000004799A case 11
jmp short loc_47BF0
loc_47B98:
lea rax, aAppendBlock; jumptable 000000000004799A case 9
jmp short loc_47BF0
loc_47BA1:
lea rax, aUpdateRows; jumptable 000000000004799A case 31
jmp short loc_47BF0
loc_47BAA:
lea rax, aMysqlGtid; jumptable 000000000004799A case 33
jmp short loc_47BF0
loc_47BB3:
lea rax, aWriteRowsV1; jumptable 000000000004799A case 23
jmp short loc_47BF0
loc_47BBC:
lea rax, aWriteRowsEvent; jumptable 000000000004799A case 20
jmp short loc_47BF0
loc_47BC5:
lea rax, aUpdateRowsV1; jumptable 000000000004799A case 24
jmp short loc_47BF0
loc_47BCE:
lea rax, aMysqlRowsQuery; jumptable 000000000004799A case 29
jmp short loc_47BF0
loc_47BD7:
lea rax, aWriteRows; jumptable 000000000004799A case 30
jmp short loc_47BF0
loc_47BE0:
lea rax, aHeartbeat; jumptable 000000000004799A case 27
jmp short loc_47BF0
def_479C5:
lea rax, aUnknown; jumptable 00000000000479C5 default case
loc_47BF0:
pop rbp
retn
|
char * Log_event::get_type_str(int a1)
{
char *result; // rax
switch ( a1 )
{
case 1:
result = "Start_v3";
break;
case 2:
result = "Query";
break;
case 3:
result = "Stop";
break;
case 4:
result = "Rotate";
break;
case 5:
result = "Intvar";
break;
case 6:
result = "Load";
break;
case 7:
result = "Slave";
break;
case 8:
result = "Create_file";
break;
case 9:
result = "Append_block";
break;
case 10:
result = "Exec_load";
break;
case 11:
result = "Delete_file";
break;
case 12:
result = "New_load";
break;
case 13:
result = "RAND";
break;
case 14:
result = "User var";
break;
case 15:
result = "Format_desc";
break;
case 16:
result = "Xid";
break;
case 17:
result = "Begin_load_query";
break;
case 18:
result = "Execute_load_query";
break;
case 19:
result = "Table_map";
break;
case 20:
result = "Write_rows_event_old";
break;
case 21:
result = "Update_rows_event_old";
break;
case 22:
result = "Delete_rows_event_old";
break;
case 23:
result = "Write_rows_v1";
break;
case 24:
result = "Update_rows_v1";
break;
case 25:
result = "Delete_rows_v1";
break;
case 26:
result = "Incident";
break;
case 27:
result = "Heartbeat";
break;
case 28:
result = "Ignorable log event";
break;
case 29:
result = "MySQL Rows_query";
break;
case 30:
result = "Write_rows";
break;
case 31:
result = "Update_rows";
break;
case 32:
result = "Delete_rows";
break;
case 33:
result = "MySQL Gtid";
break;
case 34:
result = "MySQL Anonymous_Gtid";
break;
case 35:
result = "MySQL Previous_gtids";
break;
case 36:
result = "Transaction_context";
break;
case 37:
result = "View_change";
break;
case 38:
result = "XA_prepare";
break;
default:
switch ( a1 )
{
case 160:
result = "Annotate_rows";
break;
case 161:
result = "Binlog_checkpoint";
break;
case 162:
result = "Gtid";
break;
case 163:
result = "Gtid_list";
break;
case 164:
result = "Start_encryption";
break;
case 165:
result = "Query_compressed";
break;
case 166:
result = "Write_rows_compressed_v1";
break;
case 167:
result = "Update_rows_compressed_v1";
break;
case 168:
result = "Delete_rows_compressed_v1";
break;
case 169:
result = "Write_rows_compressed";
break;
case 170:
result = "Update_rows_compressed";
break;
case 171:
result = "Delete_rows_compressed";
break;
default:
result = "Unknown";
break;
}
break;
}
return result;
}
|
get_type_str:
PUSH RBP
MOV RBP,RSP
LEA EAX,[RDI + -0x1]
CMP EAX,0x25
JA 0x001479a8
LEA RCX,[0x1b8284]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
LEA RAX,[0x1b9839]
JMP 0x00147bf0
default:
ADD EDI,0xffffff60
CMP EDI,0xb
JA 0x00147be9
LEA RAX,[0x1b831c]
MOVSXD RCX,dword ptr [RAX + RDI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_a0:
LEA RAX,[0x1b9983]
JMP 0x00147bf0
caseD_26:
LEA RAX,[0x1b9a42]
JMP 0x00147bf0
caseD_24:
LEA RAX,[0x1b9a22]
JMP 0x00147bf0
caseD_25:
LEA RAX,[0x1b9a36]
JMP 0x00147bf0
caseD_1c:
LEA RAX,[0x1b99be]
JMP 0x00147bf0
caseD_23:
LEA RAX,[0x1b9a03]
JMP 0x00147bf0
caseD_11:
LEA RAX,[0x1b9956]
JMP 0x00147bf0
caseD_f:
LEA RAX,[0x1b98b0]
JMP 0x00147bf0
caseD_22:
LEA RAX,[0x1b99ee]
JMP 0x00147bf0
caseD_ab:
LEA RAX,[0x1b9a8b]
JMP 0x00147bf0
caseD_c:
LEA RAX,[0x1b9860]
JMP 0x00147bf0
caseD_a4:
LEA RAX,[0x1b99ad]
JMP 0x00147bf0
caseD_a9:
LEA RAX,[0x1b9a5e]
JMP 0x00147bf0
caseD_5:
LEA RAX,[0x1b9854]
JMP 0x00147bf0
caseD_a2:
LEA RAX,[0x1b99e9]
JMP 0x00147bf0
caseD_d:
LEA RAX,[0x1b989e]
JMP 0x00147bf0
caseD_a:
LEA RAX,[0x1b9894]
JMP 0x00147bf0
caseD_1a:
LEA RAX,[0x1b997a]
JMP 0x00147bf0
caseD_19:
LEA RAX,[0x1b9924]
JMP 0x00147bf0
caseD_a3:
LEA RAX,[0x1b99a3]
JMP 0x00147bf0
caseD_3:
LEA RAX,[0x1b9842]
JMP 0x00147bf0
caseD_a7:
LEA RAX,[0x1b9abb]
JMP 0x00147bf0
caseD_a1:
LEA RAX,[0x1b9991]
JMP 0x00147bf0
caseD_10:
LEA RAX,[0x1b98a3]
JMP 0x00147bf0
caseD_4:
LEA RAX,[0x1b984d]
JMP 0x00147bf0
caseD_8:
LEA RAX,[0x1b986f]
JMP 0x00147bf0
caseD_2:
LEA RAX,[0x1b9847]
JMP 0x00147bf0
caseD_a5:
LEA RAX,[0x1b9a4d]
JMP 0x00147bf0
caseD_a6:
LEA RAX,[0x1b9aa2]
JMP 0x00147bf0
caseD_20:
LEA RAX,[0x1b994a]
JMP 0x00147bf0
caseD_12:
LEA RAX,[0x1b9967]
JMP 0x00147bf0
caseD_aa:
LEA RAX,[0x1b9a74]
JMP 0x00147bf0
caseD_a8:
LEA RAX,[0x1b9ad5]
JMP 0x00147bf0
caseD_15:
LEA RAX,[0x1b98db]
JMP 0x00147bf0
caseD_6:
LEA RAX,[0x1b985b]
JMP 0x00147bf0
caseD_16:
LEA RAX,[0x1b98f1]
JMP 0x00147bf0
caseD_e:
LEA RAX,[0x1b98a7]
JMP 0x00147bf0
caseD_7:
LEA RAX,[0x1b9869]
JMP 0x00147bf0
caseD_13:
LEA RAX,[0x1b98bc]
JMP 0x00147bf0
caseD_b:
LEA RAX,[0x1b9888]
JMP 0x00147bf0
caseD_9:
LEA RAX,[0x1b987b]
JMP 0x00147bf0
caseD_1f:
LEA RAX,[0x1b993e]
JMP 0x00147bf0
caseD_21:
LEA RAX,[0x1b99e3]
JMP 0x00147bf0
caseD_17:
LEA RAX,[0x1b9907]
JMP 0x00147bf0
caseD_14:
LEA RAX,[0x1b98c6]
JMP 0x00147bf0
caseD_18:
LEA RAX,[0x1b9915]
JMP 0x00147bf0
caseD_1d:
LEA RAX,[0x1b99d2]
JMP 0x00147bf0
caseD_1e:
LEA RAX,[0x1b9933]
JMP 0x00147bf0
caseD_1b:
LEA RAX,[0x1b9a18]
JMP 0x00147bf0
default:
LEA RAX,[0x1b9aef]
LAB_00147bf0:
POP RBP
RET
|
/* Log_event::get_type_str(Log_event_type) */
char * Log_event::get_type_str(int4 param_1)
{
char *pcVar1;
switch(param_1) {
case 1:
pcVar1 = "Start_v3";
break;
case 2:
pcVar1 = "Query";
break;
case 3:
pcVar1 = "Stop";
break;
case 4:
pcVar1 = "Rotate";
break;
case 5:
pcVar1 = "Intvar";
break;
case 6:
pcVar1 = "Load";
break;
case 7:
pcVar1 = "Slave";
break;
case 8:
pcVar1 = "Create_file";
break;
case 9:
pcVar1 = "Append_block";
break;
case 10:
pcVar1 = "Exec_load";
break;
case 0xb:
pcVar1 = "Delete_file";
break;
case 0xc:
pcVar1 = "New_load";
break;
case 0xd:
pcVar1 = "RAND";
break;
case 0xe:
pcVar1 = "User var";
break;
case 0xf:
pcVar1 = "Format_desc";
break;
case 0x10:
pcVar1 = "Xid";
break;
case 0x11:
pcVar1 = "Begin_load_query";
break;
case 0x12:
pcVar1 = "Execute_load_query";
break;
case 0x13:
pcVar1 = "Table_map";
break;
case 0x14:
pcVar1 = "Write_rows_event_old";
break;
case 0x15:
pcVar1 = "Update_rows_event_old";
break;
case 0x16:
pcVar1 = "Delete_rows_event_old";
break;
case 0x17:
pcVar1 = "Write_rows_v1";
break;
case 0x18:
pcVar1 = "Update_rows_v1";
break;
case 0x19:
pcVar1 = "Delete_rows_v1";
break;
case 0x1a:
pcVar1 = "Incident";
break;
case 0x1b:
pcVar1 = "Heartbeat";
break;
case 0x1c:
pcVar1 = "Ignorable log event";
break;
case 0x1d:
pcVar1 = "MySQL Rows_query";
break;
case 0x1e:
pcVar1 = "Write_rows";
break;
case 0x1f:
pcVar1 = "Update_rows";
break;
case 0x20:
pcVar1 = "Delete_rows";
break;
case 0x21:
pcVar1 = "MySQL Gtid";
break;
case 0x22:
pcVar1 = "MySQL Anonymous_Gtid";
break;
case 0x23:
pcVar1 = "MySQL Previous_gtids";
break;
case 0x24:
pcVar1 = "Transaction_context";
break;
case 0x25:
pcVar1 = "View_change";
break;
case 0x26:
pcVar1 = "XA_prepare";
break;
default:
switch(param_1) {
case 0xa0:
pcVar1 = "Annotate_rows";
break;
case 0xa1:
pcVar1 = "Binlog_checkpoint";
break;
case 0xa2:
pcVar1 = "Gtid";
break;
case 0xa3:
pcVar1 = "Gtid_list";
break;
case 0xa4:
pcVar1 = "Start_encryption";
break;
case 0xa5:
pcVar1 = "Query_compressed";
break;
case 0xa6:
pcVar1 = "Write_rows_compressed_v1";
break;
case 0xa7:
pcVar1 = "Update_rows_compressed_v1";
break;
case 0xa8:
pcVar1 = "Delete_rows_compressed_v1";
break;
case 0xa9:
pcVar1 = "Write_rows_compressed";
break;
case 0xaa:
pcVar1 = "Update_rows_compressed";
break;
case 0xab:
pcVar1 = "Delete_rows_compressed";
break;
default:
pcVar1 = "Unknown";
}
}
return pcVar1;
}
|
|
12,260
|
bool CLI::detail::lexical_cast<double, (CLI::detail::enabler)0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, double&)
|
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/TypeTools.hpp
|
bool lexical_cast(const std::string &input, T &output) {
if(input.empty()) {
return false;
}
char *val = nullptr;
auto output_ld = std::strtold(input.c_str(), &val);
output = static_cast<T>(output_ld);
return val == (input.c_str() + input.size());
}
|
O0
|
cpp
|
bool CLI::detail::lexical_cast<double, (CLI::detail::enabler)0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, double&):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x99c0
testb $0x1, %al
jne 0x2155f
jmp 0x21565
movb $0x0, -0x1(%rbp)
jmp 0x215cf
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9230
movq %rax, %rdi
leaq -0x20(%rbp), %rsi
callq 0x99e0
fstpt -0x30(%rbp)
fldt -0x30(%rbp)
fstpl -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9230
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9410
movq -0x48(%rbp), %rcx
movq %rax, %rdx
movq -0x40(%rbp), %rax
addq %rdx, %rcx
cmpq %rcx, %rax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_2155F
jmp short loc_21565
loc_2155F:
mov [rbp+var_1], 0
jmp short loc_215CF
loc_21565:
mov [rbp+var_20], 0
mov rdi, [rbp+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
lea rsi, [rbp+var_20]
call _strtold
fstp [rbp+var_30]
fld [rbp+var_30]
fstp [rbp+var_38]
movsd xmm0, [rbp+var_38]
mov rax, [rbp+var_18]
movsd qword ptr [rax], xmm0
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_48], rax
mov rdi, [rbp+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, [rbp+var_48]
mov rdx, rax
mov rax, [rbp+var_40]
add rcx, rdx
cmp rax, rcx
setz al
and al, 1
mov [rbp+var_1], al
loc_215CF:
mov al, [rbp+var_1]
and al, 1
add rsp, 50h
pop rbp
retn
|
bool ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_(
long long a1,
double *a2)
{
long long v2; // rax
long long v4; // [rsp+8h] [rbp-48h]
long long v5; // [rsp+10h] [rbp-40h]
double v6; // [rsp+18h] [rbp-38h]
long long v7; // [rsp+30h] [rbp-20h] BYREF
double *v8; // [rsp+38h] [rbp-18h]
long long v9; // [rsp+40h] [rbp-10h]
v9 = a1;
v8 = a2;
if ( (std::string::empty(a1) & 1) != 0 )
{
return 0;
}
else
{
v7 = 0LL;
v2 = std::string::c_str(v9);
v6 = strtold(v2, &v7);
*v8 = v6;
v5 = v7;
v4 = std::string::c_str(v9);
return v5 == std::string::size(v9) + v4;
}
}
|
_ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001099c0
TEST AL,0x1
JNZ 0x0012155f
JMP 0x00121565
LAB_0012155f:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001215cf
LAB_00121565:
MOV qword ptr [RBP + -0x20],0x0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00109230
MOV RDI,RAX
LEA RSI,[RBP + -0x20]
CALL 0x001099e0
FSTP tword ptr [RBP + -0x30]
FLD tword ptr [RBP + -0x30]
FSTP qword ptr [RBP + -0x38]
MOVSD XMM0,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x18]
MOVSD qword ptr [RAX],XMM0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00109230
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00109410
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RCX,RDX
CMP RAX,RCX
SETZ AL
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_001215cf:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x50
POP RBP
RET
|
bool _ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_
(int8 param_1,double *param_2)
{
ulong uVar1;
char *pcVar2;
long lVar3;
long lVar4;
longdouble in_ST0;
char *local_28;
double *local_20;
int8 local_18;
bool local_9;
local_20 = param_2;
local_18 = param_1;
uVar1 = std::__cxx11::string::empty();
if ((uVar1 & 1) == 0) {
local_28 = (char *)0x0;
pcVar2 = (char *)std::__cxx11::string::c_str();
strtold(pcVar2,&local_28);
pcVar2 = local_28;
*local_20 = (double)in_ST0;
lVar3 = std::__cxx11::string::c_str();
lVar4 = std::__cxx11::string::size();
local_9 = pcVar2 == (char *)(lVar3 + lVar4);
}
else {
local_9 = false;
}
return local_9;
}
|
|
12,261
|
UNetModel::build_graph(ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*)
|
7CodeWizard[P]stablediffusion/unet.hpp
|
struct ggml_cgraph* build_graph(struct ggml_tensor* x,
struct ggml_tensor* timesteps,
struct ggml_tensor* context,
struct ggml_tensor* t_emb = NULL,
struct ggml_tensor* y = NULL) {
// since we are using ggml-alloc, this buffer only needs enough space to hold the ggml_tensor and ggml_cgraph structs, but not the tensor data
static size_t buf_size = ggml_tensor_overhead() * UNET_GRAPH_SIZE + ggml_graph_overhead();
static std::vector<uint8_t> buf(buf_size);
struct ggml_init_params params = {
/*.mem_size =*/buf_size,
/*.mem_buffer =*/buf.data(),
/*.no_alloc =*/true, // the tensors will be allocated later by ggml_allocr_alloc_graph()
};
// LOG_DEBUG("mem_size %u ", params.mem_size);
struct ggml_context* ctx0 = ggml_init(params);
struct ggml_cgraph* gf = ggml_new_graph_custom(ctx0, UNET_GRAPH_SIZE, false);
// temporal tensors for transfer tensors from cpu to gpu if needed
struct ggml_tensor* x_t = NULL;
struct ggml_tensor* timesteps_t = NULL;
struct ggml_tensor* context_t = NULL;
struct ggml_tensor* t_emb_t = NULL;
struct ggml_tensor* y_t = NULL;
// it's performing a compute, check if backend isn't cpu
if (!ggml_backend_is_cpu(backend)) {
// pass input tensors to gpu memory
x_t = ggml_dup_tensor(ctx0, x);
context_t = ggml_dup_tensor(ctx0, context);
ggml_allocr_alloc(compute_allocr, x_t);
if (timesteps != NULL) {
timesteps_t = ggml_dup_tensor(ctx0, timesteps);
ggml_allocr_alloc(compute_allocr, timesteps_t);
}
ggml_allocr_alloc(compute_allocr, context_t);
if (t_emb != NULL) {
t_emb_t = ggml_dup_tensor(ctx0, t_emb);
ggml_allocr_alloc(compute_allocr, t_emb_t);
}
if (y != NULL) {
y_t = ggml_dup_tensor(ctx0, y);
ggml_allocr_alloc(compute_allocr, y_t);
}
// pass data to device backend
if (!ggml_allocr_is_measure(compute_allocr)) {
ggml_backend_tensor_set(x_t, x->data, 0, ggml_nbytes(x));
ggml_backend_tensor_set(context_t, context->data, 0, ggml_nbytes(context));
if (timesteps_t != NULL) {
ggml_backend_tensor_set(timesteps_t, timesteps->data, 0, ggml_nbytes(timesteps));
}
if (t_emb_t != NULL) {
ggml_backend_tensor_set(t_emb_t, t_emb->data, 0, ggml_nbytes(t_emb));
}
if (y != NULL) {
ggml_backend_tensor_set(y_t, y->data, 0, ggml_nbytes(y));
}
}
} else {
// if it's cpu backend just pass the same tensors
x_t = x;
timesteps_t = timesteps;
context_t = context;
t_emb_t = t_emb;
y_t = y;
}
struct ggml_tensor* out = forward(ctx0, x_t, timesteps_t, context_t, t_emb_t, y_t);
ggml_build_forward_expand(gf, out);
ggml_free(ctx0);
return gf;
}
|
O0
|
cpp
|
UNetModel::build_graph(ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*):
subq $0x148, %rsp # imm = 0x148
movq %rdi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
movq %rdx, 0x130(%rsp)
movq %rcx, 0x128(%rsp)
movq %r8, 0x120(%rsp)
movq %r9, 0x118(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x90(%rsp)
cmpb $0x0, 0x1f32ca(%rip) # 0x259c18
jne 0x669b7
leaq 0x1f32c1(%rip), %rdi # 0x259c18
callq 0xbda0
cmpl $0x0, %eax
je 0x669b7
callq 0x11b480
movq %rax, 0x88(%rsp)
jmp 0x66970
movq 0x88(%rsp), %rax
shlq $0xb, %rax
leaq (%rax,%rax,4), %rax
movq %rax, 0x78(%rsp)
callq 0x12d820
movq %rax, 0x80(%rsp)
jmp 0x66994
movq 0x80(%rsp), %rcx
movq 0x78(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x1f3265(%rip) # 0x259c10
leaq 0x1f3266(%rip), %rdi # 0x259c18
callq 0xb480
cmpb $0x0, 0x1f327a(%rip) # 0x259c38
jne 0x66a3a
leaq 0x1f3271(%rip), %rdi # 0x259c38
callq 0xbda0
cmpl $0x0, %eax
je 0x66a3a
movq 0x1f3238(%rip), %rax # 0x259c10
movq %rax, 0x68(%rsp)
leaq 0x10b(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x66f40
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x1f3220(%rip), %rdi # 0x259c20
callq 0x66f50
jmp 0x66a07
leaq 0x10b(%rsp), %rdi
callq 0x66fd0
leaq 0x5c5(%rip), %rdi # 0x66fe0
leaq 0x1f31fe(%rip), %rsi # 0x259c20
leaq 0x171d5f(%rip), %rdx # 0x1d8788
callq 0xb670
leaq 0x1f3203(%rip), %rdi # 0x259c38
callq 0xb480
movq 0x1f31cf(%rip), %rax # 0x259c10
movq %rax, 0xf0(%rsp)
leaq 0x1f31d0(%rip), %rdi # 0x259c20
callq 0x67040
movq %rax, 0xf8(%rsp)
movb $0x1, 0x100(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0xd0(%rsp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x11b680
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rdi
movl $0x2800, %esi # imm = 0x2800
xorl %edx, %edx
callq 0x12d830
movq %rax, %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0xc8(%rsp)
movq $0x0, 0xc0(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0xb0(%rsp)
movq $0x0, 0xa8(%rsp)
movq $0x0, 0xa0(%rsp)
movq 0x60(%rax), %rdi
callq 0x167bb0
testb $0x1, %al
jne 0x66e61
movq 0xe8(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x11cfc0
movq %rax, 0xc0(%rsp)
movq 0xe8(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x11cfc0
movq %rax, %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0xb0(%rsp)
movq 0x50(%rax), %rdi
movq 0xc0(%rsp), %rsi
callq 0x165aa0
cmpq $0x0, 0x130(%rsp)
je 0x66c2e
movq 0xe8(%rsp), %rdi
movq 0x130(%rsp), %rsi
callq 0x11cfc0
movq %rax, %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0xb8(%rsp)
movq 0x50(%rax), %rdi
movq 0xb8(%rsp), %rsi
callq 0x165aa0
jmp 0x66c2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x1f3026(%rip), %rdi # 0x259c18
callq 0xb470
jmp 0x66f2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x10b(%rsp), %rdi
callq 0x66fd0
leaq 0x1f3014(%rip), %rdi # 0x259c38
callq 0xb470
jmp 0x66f2c
movq 0x90(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x165aa0
cmpq $0x0, 0x120(%rsp)
je 0x66c8b
movq 0xe8(%rsp), %rdi
movq 0x120(%rsp), %rsi
callq 0x11cfc0
movq %rax, %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0xa8(%rsp)
movq 0x50(%rax), %rdi
movq 0xa8(%rsp), %rsi
callq 0x165aa0
cmpq $0x0, 0x118(%rsp)
je 0x66ccf
movq 0xe8(%rsp), %rdi
movq 0x118(%rsp), %rsi
callq 0x11cfc0
movq %rax, %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0xa0(%rsp)
movq 0x50(%rax), %rdi
movq 0xa0(%rsp), %rsi
callq 0x165aa0
movq 0x90(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x165a60
testb $0x1, %al
jne 0x66e5f
movq 0xc0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x138(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x138(%rsp), %rdi
callq 0x11ae90
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x166e30
movq 0xb0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x128(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x128(%rsp), %rdi
callq 0x11ae90
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x166e30
cmpq $0x0, 0xb8(%rsp)
je 0x66dbf
movq 0xb8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x130(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x130(%rsp), %rdi
callq 0x11ae90
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x166e30
cmpq $0x0, 0xa8(%rsp)
je 0x66e0e
movq 0xa8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x120(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x120(%rsp), %rdi
callq 0x11ae90
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x166e30
cmpq $0x0, 0x118(%rsp)
je 0x66e5d
movq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x118(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x118(%rsp), %rdi
callq 0x11ae90
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x166e30
jmp 0x66e5f
jmp 0x66eb1
movq 0x138(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x90(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movq 0xb8(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0xa8(%rsp), %r9
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
callq 0x67060
movq %rax, 0x98(%rsp)
movq 0xc8(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x12a100
movq 0xe8(%rsp), %rdi
callq 0x11bfa0
movq 0xc8(%rsp), %rax
addq $0x148, %rsp # imm = 0x148
retq
movq 0x110(%rsp), %rdi
callq 0xbd30
nopl (%rax)
|
_ZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_:
sub rsp, 148h
mov [rsp+148h+var_8], rdi
mov [rsp+148h+var_10], rsi
mov [rsp+148h+var_18], rdx
mov [rsp+148h+var_20], rcx
mov [rsp+148h+var_28], r8
mov [rsp+148h+var_30], r9
mov rax, [rsp+148h+var_8]
mov [rsp+148h+var_B8], rax
cmp cs:_ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size, 0; `guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
jnz short loc_669B7
lea rdi, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_669B7
call ggml_tensor_overhead
mov [rsp+148h+var_C0], rax
jmp short $+2
loc_66970:
mov rax, [rsp+148h+var_C0]
shl rax, 0Bh
lea rax, [rax+rax*4]
mov [rsp+148h+var_D0], rax
call ggml_graph_overhead
mov [rsp+148h+var_C8], rax
jmp short $+2
loc_66994:
mov rcx, [rsp+148h+var_C8]
mov rax, [rsp+148h+var_D0]
add rax, rcx
mov cs:_ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size, rax; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
lea rdi, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; __guard *
call ___cxa_guard_release
loc_669B7:
cmp cs:_ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf, 0; `guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf
jnz short loc_66A3A
lea rdi, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_66A3A
mov rax, cs:_ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
mov [rsp+148h+var_E0], rax
lea rdi, [rsp+148h+var_3D]
mov [rsp+148h+var_D8], rdi
call _ZNSaIhEC2Ev; std::allocator<uchar>::allocator(void)
mov rsi, [rsp+148h+var_E0]
mov rdx, [rsp+148h+var_D8]
lea rdi, _ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf
call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
jmp short $+2
loc_66A07:
lea rdi, [rsp+148h+var_3D]
call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator()
lea rdi, _ZNSt6vectorIhSaIhEED2Ev; lpfunc
lea rsi, _ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; __guard *
call ___cxa_guard_release
loc_66A3A:
mov rax, cs:_ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
mov [rsp+148h+var_58], rax
lea rdi, _ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf
call _ZNSt6vectorIhSaIhEE4dataEv; std::vector<uchar>::data(void)
mov [rsp+148h+var_50], rax
mov byte ptr [rsp+148h+var_48], 1
mov rax, [rsp+148h+var_58]
mov [rsp+148h+var_78], rax
mov rax, [rsp+148h+var_50]
mov [rsp+148h+var_70], rax
mov rax, [rsp+148h+var_48]
mov [rsp+148h+var_68], rax
lea rax, [rsp+148h+var_78]
mov rcx, [rax]
mov [rsp+148h+var_148], rcx
mov rcx, [rax+8]
mov [rsp+148h+var_140], rcx
mov rax, [rax+10h]
mov [rsp+148h+var_138], rax
call ggml_init
mov [rsp+148h+var_60], rax
mov rdi, [rsp+148h+var_60]
mov esi, 2800h
xor edx, edx
call ggml_new_graph_custom
mov rcx, rax
mov rax, [rsp+148h+var_B8]
mov [rsp+148h+var_80], rcx
mov [rsp+148h+var_88], 0
mov [rsp+148h+var_90], 0
mov [rsp+148h+var_98], 0
mov [rsp+148h+var_A0], 0
mov [rsp+148h+var_A8], 0
mov rdi, [rax+60h]
call ggml_backend_is_cpu
test al, 1
jnz loc_66E61
mov rdi, [rsp+148h+var_60]
mov rsi, [rsp+148h+var_10]
call ggml_dup_tensor
mov [rsp+148h+var_88], rax
mov rdi, [rsp+148h+var_60]
mov rsi, [rsp+148h+var_20]
call ggml_dup_tensor
mov rcx, rax
mov rax, [rsp+148h+var_B8]
mov [rsp+148h+var_98], rcx
mov rdi, [rax+50h]
mov rsi, [rsp+148h+var_88]
call ggml_allocr_alloc
cmp [rsp+148h+var_18], 0
jz loc_66C2E
mov rdi, [rsp+148h+var_60]
mov rsi, [rsp+148h+var_18]
call ggml_dup_tensor
mov rcx, rax
mov rax, [rsp+148h+var_B8]
mov [rsp+148h+var_90], rcx
mov rdi, [rax+50h]
mov rsi, [rsp+148h+var_90]
call ggml_allocr_alloc
jmp short loc_66C2E
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
lea rdi, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; __guard *
call ___cxa_guard_abort
jmp loc_66F2C
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
lea rdi, [rsp+arg_103]
call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator()
lea rdi, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; __guard *
call ___cxa_guard_abort
jmp loc_66F2C
loc_66C2E:
mov rax, [rsp+148h+var_B8]
mov rdi, [rax+50h]
mov rsi, [rsp+148h+var_98]
call ggml_allocr_alloc
cmp [rsp+148h+var_28], 0
jz short loc_66C8B
mov rdi, [rsp+148h+var_60]
mov rsi, [rsp+148h+var_28]
call ggml_dup_tensor
mov rcx, rax
mov rax, [rsp+148h+var_B8]
mov [rsp+148h+var_A0], rcx
mov rdi, [rax+50h]
mov rsi, [rsp+148h+var_A0]
call ggml_allocr_alloc
loc_66C8B:
cmp [rsp+148h+var_30], 0
jz short loc_66CCF
mov rdi, [rsp+148h+var_60]
mov rsi, [rsp+148h+var_30]
call ggml_dup_tensor
mov rcx, rax
mov rax, [rsp+148h+var_B8]
mov [rsp+148h+var_A8], rcx
mov rdi, [rax+50h]
mov rsi, [rsp+148h+var_A8]
call ggml_allocr_alloc
loc_66CCF:
mov rax, [rsp+148h+var_B8]
mov rdi, [rax+50h]
call ggml_allocr_is_measure
test al, 1
jnz loc_66E5F
mov rax, [rsp+148h+var_88]
mov [rsp+148h+var_100], rax
mov rax, [rsp+148h+var_10]
mov rax, [rax+118h]
mov [rsp+148h+var_F8], rax
mov rdi, [rsp+148h+var_10]
call ggml_nbytes
mov rdi, [rsp+148h+var_100]
mov rsi, [rsp+148h+var_F8]
mov rcx, rax
xor eax, eax
mov edx, eax
call ggml_backend_tensor_set
mov rax, [rsp+148h+var_98]
mov [rsp+148h+var_F0], rax
mov rax, [rsp+148h+var_20]
mov rax, [rax+118h]
mov [rsp+148h+var_E8], rax
mov rdi, [rsp+148h+var_20]
call ggml_nbytes
mov rdi, [rsp+148h+var_F0]
mov rsi, [rsp+148h+var_E8]
mov rcx, rax
xor eax, eax
mov edx, eax
call ggml_backend_tensor_set
cmp [rsp+148h+var_90], 0
jz short loc_66DBF
mov rax, [rsp+148h+var_90]
mov [rsp+148h+var_110], rax
mov rax, [rsp+148h+var_18]
mov rax, [rax+118h]
mov [rsp+148h+var_108], rax
mov rdi, [rsp+148h+var_18]
call ggml_nbytes
mov rdi, [rsp+148h+var_110]
mov rsi, [rsp+148h+var_108]
mov rcx, rax
xor eax, eax
mov edx, eax
call ggml_backend_tensor_set
loc_66DBF:
cmp [rsp+148h+var_A0], 0
jz short loc_66E0E
mov rax, [rsp+148h+var_A0]
mov [rsp+148h+var_120], rax
mov rax, [rsp+148h+var_28]
mov rax, [rax+118h]
mov [rsp+148h+var_118], rax
mov rdi, [rsp+148h+var_28]
call ggml_nbytes
mov rdi, [rsp+148h+var_120]
mov rsi, [rsp+148h+var_118]
mov rcx, rax
xor eax, eax
mov edx, eax
call ggml_backend_tensor_set
loc_66E0E:
cmp [rsp+148h+var_30], 0
jz short loc_66E5D
mov rax, [rsp+148h+var_A8]
mov [rsp+148h+var_130], rax
mov rax, [rsp+148h+var_30]
mov rax, [rax+118h]
mov [rsp+148h+var_128], rax
mov rdi, [rsp+148h+var_30]
call ggml_nbytes
mov rdi, [rsp+148h+var_130]
mov rsi, [rsp+148h+var_128]
mov rcx, rax
xor eax, eax
mov edx, eax
call ggml_backend_tensor_set
loc_66E5D:
jmp short $+2
loc_66E5F:
jmp short loc_66EB1
loc_66E61:
mov rax, [rsp+148h+var_10]
mov [rsp+148h+var_88], rax
mov rax, [rsp+148h+var_18]
mov [rsp+148h+var_90], rax
mov rax, [rsp+148h+var_20]
mov [rsp+148h+var_98], rax
mov rax, [rsp+148h+var_28]
mov [rsp+148h+var_A0], rax
mov rax, [rsp+148h+var_30]
mov [rsp+148h+var_A8], rax
loc_66EB1:
mov rdi, [rsp+148h+var_B8]
mov rsi, [rsp+148h+var_60]
mov rdx, [rsp+148h+var_88]
mov rcx, [rsp+148h+var_90]
mov r8, [rsp+148h+var_98]
mov r9, [rsp+148h+var_A0]
mov rax, [rsp+148h+var_A8]
mov [rsp+148h+var_148], rax
call _ZN9UNetModel7forwardEP12ggml_contextP11ggml_tensorS3_S3_S3_S3_; UNetModel::forward(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)
mov [rsp+148h+var_B0], rax
mov rdi, [rsp+148h+var_80]
mov rsi, [rsp+148h+var_B0]
call ggml_build_forward_expand
mov rdi, [rsp+148h+var_60]
call ggml_free
mov rax, [rsp+148h+var_80]
add rsp, 148h
retn
loc_66F2C:
mov rdi, [rsp+arg_108]
call __Unwind_Resume
|
build_graph:
SUB RSP,0x148
MOV qword ptr [RSP + 0x140],RDI
MOV qword ptr [RSP + 0x138],RSI
MOV qword ptr [RSP + 0x130],RDX
MOV qword ptr [RSP + 0x128],RCX
MOV qword ptr [RSP + 0x120],R8
MOV qword ptr [RSP + 0x118],R9
MOV RAX,qword ptr [RSP + 0x140]
MOV qword ptr [RSP + 0x90],RAX
CMP byte ptr [0x00359c18],0x0
JNZ 0x001669b7
LEA RDI,[0x359c18]
CALL 0x0010bda0
CMP EAX,0x0
JZ 0x001669b7
LAB_00166961:
CALL 0x0021b480
MOV qword ptr [RSP + 0x88],RAX
JMP 0x00166970
LAB_00166970:
MOV RAX,qword ptr [RSP + 0x88]
SHL RAX,0xb
LEA RAX,[RAX + RAX*0x4]
MOV qword ptr [RSP + 0x78],RAX
CALL 0x0022d820
MOV qword ptr [RSP + 0x80],RAX
JMP 0x00166994
LAB_00166994:
MOV RCX,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x78]
ADD RAX,RCX
MOV qword ptr [0x00359c10],RAX
LEA RDI,[0x359c18]
CALL 0x0010b480
LAB_001669b7:
CMP byte ptr [0x00359c38],0x0
JNZ 0x00166a3a
LEA RDI,[0x359c38]
CALL 0x0010bda0
CMP EAX,0x0
JZ 0x00166a3a
MOV RAX,qword ptr [0x00359c10]
MOV qword ptr [RSP + 0x68],RAX
LEA RDI,[RSP + 0x10b]
MOV qword ptr [RSP + 0x70],RDI
CALL 0x00166f40
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LAB_001669f9:
LEA RDI,[0x359c20]
CALL 0x00166f50
LAB_00166a05:
JMP 0x00166a07
LAB_00166a07:
LEA RDI,[RSP + 0x10b]
CALL 0x00166fd0
LEA RDI,[0x166fe0]
LEA RSI,[0x359c20]
LEA RDX,[0x2d8788]
CALL 0x0010b670
LEA RDI,[0x359c38]
CALL 0x0010b480
LAB_00166a3a:
MOV RAX,qword ptr [0x00359c10]
MOV qword ptr [RSP + 0xf0],RAX
LEA RDI,[0x359c20]
CALL 0x00167040
MOV qword ptr [RSP + 0xf8],RAX
MOV byte ptr [RSP + 0x100],0x1
MOV RAX,qword ptr [RSP + 0xf0]
MOV qword ptr [RSP + 0xd0],RAX
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0xe0],RAX
LEA RAX,[RSP + 0xd0]
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 0x0021b680
MOV qword ptr [RSP + 0xe8],RAX
MOV RDI,qword ptr [RSP + 0xe8]
MOV ESI,0x2800
XOR EDX,EDX
CALL 0x0022d830
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xc8],RCX
MOV qword ptr [RSP + 0xc0],0x0
MOV qword ptr [RSP + 0xb8],0x0
MOV qword ptr [RSP + 0xb0],0x0
MOV qword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xa0],0x0
MOV RDI,qword ptr [RAX + 0x60]
CALL 0x00267bb0
TEST AL,0x1
JNZ 0x00166e61
MOV RDI,qword ptr [RSP + 0xe8]
MOV RSI,qword ptr [RSP + 0x138]
CALL 0x0021cfc0
MOV qword ptr [RSP + 0xc0],RAX
MOV RDI,qword ptr [RSP + 0xe8]
MOV RSI,qword ptr [RSP + 0x128]
CALL 0x0021cfc0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xb0],RCX
MOV RDI,qword ptr [RAX + 0x50]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x00265aa0
CMP qword ptr [RSP + 0x130],0x0
JZ 0x00166c2e
MOV RDI,qword ptr [RSP + 0xe8]
MOV RSI,qword ptr [RSP + 0x130]
CALL 0x0021cfc0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xb8],RCX
MOV RDI,qword ptr [RAX + 0x50]
MOV RSI,qword ptr [RSP + 0xb8]
CALL 0x00265aa0
JMP 0x00166c2e
LAB_00166c2e:
MOV RAX,qword ptr [RSP + 0x90]
MOV RDI,qword ptr [RAX + 0x50]
MOV RSI,qword ptr [RSP + 0xb0]
CALL 0x00265aa0
CMP qword ptr [RSP + 0x120],0x0
JZ 0x00166c8b
MOV RDI,qword ptr [RSP + 0xe8]
MOV RSI,qword ptr [RSP + 0x120]
CALL 0x0021cfc0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xa8],RCX
MOV RDI,qword ptr [RAX + 0x50]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x00265aa0
LAB_00166c8b:
CMP qword ptr [RSP + 0x118],0x0
JZ 0x00166ccf
MOV RDI,qword ptr [RSP + 0xe8]
MOV RSI,qword ptr [RSP + 0x118]
CALL 0x0021cfc0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xa0],RCX
MOV RDI,qword ptr [RAX + 0x50]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x00265aa0
LAB_00166ccf:
MOV RAX,qword ptr [RSP + 0x90]
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x00265a60
TEST AL,0x1
JNZ 0x00166e5f
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x138]
MOV RAX,qword ptr [RAX + 0x118]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x138]
CALL 0x0021ae90
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
MOV RCX,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00266e30
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x118]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x128]
CALL 0x0021ae90
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
MOV RCX,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00266e30
CMP qword ptr [RSP + 0xb8],0x0
JZ 0x00166dbf
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x130]
MOV RAX,qword ptr [RAX + 0x118]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x130]
CALL 0x0021ae90
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
MOV RCX,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00266e30
LAB_00166dbf:
CMP qword ptr [RSP + 0xa8],0x0
JZ 0x00166e0e
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x118]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x120]
CALL 0x0021ae90
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
MOV RCX,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00266e30
LAB_00166e0e:
CMP qword ptr [RSP + 0x118],0x0
JZ 0x00166e5d
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x118]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0021ae90
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV RCX,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00266e30
LAB_00166e5d:
JMP 0x00166e5f
LAB_00166e5f:
JMP 0x00166eb1
LAB_00166e61:
MOV RAX,qword ptr [RSP + 0x138]
MOV qword ptr [RSP + 0xc0],RAX
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0xa0],RAX
LAB_00166eb1:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xc0]
MOV RCX,qword ptr [RSP + 0xb8]
MOV R8,qword ptr [RSP + 0xb0]
MOV R9,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP],RAX
CALL 0x00167060
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xc8]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x0022a100
MOV RDI,qword ptr [RSP + 0xe8]
CALL 0x0021bfa0
MOV RAX,qword ptr [RSP + 0xc8]
ADD RSP,0x148
RET
|
/* UNetModel::build_graph(ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*) */
int8 __thiscall
UNetModel::build_graph
(UNetModel *this,ggml_tensor *param_1,ggml_tensor *param_2,ggml_tensor *param_3,
ggml_tensor *param_4,ggml_tensor *param_5)
{
int iVar1;
long lVar2;
long lVar3;
ggml_context *pgVar4;
int8 uVar5;
ulong uVar6;
int8 uVar7;
int8 uVar8;
ggml_tensor *local_a8;
ggml_tensor *local_a0;
ggml_tensor *local_98;
ggml_tensor *local_90;
ggml_tensor *local_88;
allocator<unsigned_char> local_3d [13];
ggml_tensor *local_30;
ggml_tensor *local_28;
ggml_tensor *local_20;
ggml_tensor *local_18;
ggml_tensor *local_10;
UNetModel *local_8;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
if ((build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)::buf_size ==
'\0') &&
(iVar1 = __cxa_guard_acquire(&build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)
::buf_size), iVar1 != 0)) {
/* try { // try from 00166961 to 00166989 has its CatchHandler @ 00166bd7 */
lVar2 = ggml_tensor_overhead();
lVar3 = ggml_graph_overhead();
build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)::buf_size =
lVar2 * 0x2800 + lVar3;
__cxa_guard_release(&build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)
::buf_size);
}
if ((build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)::buf == '\0')
&& (iVar1 = __cxa_guard_acquire(&build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)
::buf),
uVar6 = build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)::
buf_size, iVar1 != 0)) {
std::allocator<unsigned_char>::allocator(local_3d);
/* try { // try from 001669f9 to 00166a04 has its CatchHandler @ 00166bfc */
std::vector<unsigned_char,std::allocator<unsigned_char>>::vector
((vector<unsigned_char,std::allocator<unsigned_char>> *)
build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)::buf,
uVar6,(allocator *)local_3d);
std::allocator<unsigned_char>::~allocator(local_3d);
__cxa_atexit(std::vector<unsigned_char,std::allocator<unsigned_char>>::~vector,
build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)::buf,
&__dso_handle);
__cxa_guard_release(&build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)
::buf);
}
std::vector<unsigned_char,std::allocator<unsigned_char>>::data
((vector<unsigned_char,std::allocator<unsigned_char>> *)
build_graph(ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*,ggml_tensor*)::buf);
pgVar4 = (ggml_context *)ggml_init();
uVar5 = ggml_new_graph_custom(pgVar4,0x2800,0);
local_90 = (ggml_tensor *)0x0;
local_a0 = (ggml_tensor *)0x0;
local_a8 = (ggml_tensor *)0x0;
uVar6 = ggml_backend_is_cpu(*(int8 *)(this + 0x60));
if ((uVar6 & 1) == 0) {
local_88 = (ggml_tensor *)ggml_dup_tensor(pgVar4,local_10);
local_98 = (ggml_tensor *)ggml_dup_tensor(pgVar4,local_20);
ggml_allocr_alloc(*(int8 *)(this + 0x50),local_88);
if (local_18 != (ggml_tensor *)0x0) {
local_90 = (ggml_tensor *)ggml_dup_tensor(pgVar4,local_18);
ggml_allocr_alloc(*(int8 *)(this + 0x50),local_90);
}
ggml_allocr_alloc(*(int8 *)(this + 0x50),local_98);
if (local_28 != (ggml_tensor *)0x0) {
local_a0 = (ggml_tensor *)ggml_dup_tensor(pgVar4,local_28);
ggml_allocr_alloc(*(int8 *)(this + 0x50),local_a0);
}
if (local_30 != (ggml_tensor *)0x0) {
local_a8 = (ggml_tensor *)ggml_dup_tensor(pgVar4,local_30);
ggml_allocr_alloc(*(int8 *)(this + 0x50),local_a8);
}
uVar6 = ggml_allocr_is_measure(*(int8 *)(this + 0x50));
if ((uVar6 & 1) == 0) {
uVar8 = *(int8 *)(local_10 + 0x118);
uVar7 = ggml_nbytes(local_10);
ggml_backend_tensor_set(local_88,uVar8,0,uVar7);
uVar8 = *(int8 *)(local_20 + 0x118);
uVar7 = ggml_nbytes(local_20);
ggml_backend_tensor_set(local_98,uVar8,0,uVar7);
if (local_90 != (ggml_tensor *)0x0) {
uVar8 = *(int8 *)(local_18 + 0x118);
uVar7 = ggml_nbytes(local_18);
ggml_backend_tensor_set(local_90,uVar8,0,uVar7);
}
if (local_a0 != (ggml_tensor *)0x0) {
uVar8 = *(int8 *)(local_28 + 0x118);
uVar7 = ggml_nbytes(local_28);
ggml_backend_tensor_set(local_a0,uVar8,0,uVar7);
}
if (local_30 != (ggml_tensor *)0x0) {
uVar8 = *(int8 *)(local_30 + 0x118);
uVar7 = ggml_nbytes(local_30);
ggml_backend_tensor_set(local_a8,uVar8,0,uVar7);
}
}
}
else {
local_88 = local_10;
local_90 = local_18;
local_98 = local_20;
local_a0 = local_28;
local_a8 = local_30;
}
uVar8 = forward(this,pgVar4,local_88,local_90,local_98,local_a0,local_a8);
ggml_build_forward_expand(uVar5,uVar8);
ggml_free(pgVar4);
return uVar5;
}
|
||
12,262
|
UNetModel::build_graph(ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*)
|
7CodeWizard[P]stablediffusion/unet.hpp
|
struct ggml_cgraph* build_graph(struct ggml_tensor* x,
struct ggml_tensor* timesteps,
struct ggml_tensor* context,
struct ggml_tensor* t_emb = NULL,
struct ggml_tensor* y = NULL) {
// since we are using ggml-alloc, this buffer only needs enough space to hold the ggml_tensor and ggml_cgraph structs, but not the tensor data
static size_t buf_size = ggml_tensor_overhead() * UNET_GRAPH_SIZE + ggml_graph_overhead();
static std::vector<uint8_t> buf(buf_size);
struct ggml_init_params params = {
/*.mem_size =*/buf_size,
/*.mem_buffer =*/buf.data(),
/*.no_alloc =*/true, // the tensors will be allocated later by ggml_allocr_alloc_graph()
};
// LOG_DEBUG("mem_size %u ", params.mem_size);
struct ggml_context* ctx0 = ggml_init(params);
struct ggml_cgraph* gf = ggml_new_graph_custom(ctx0, UNET_GRAPH_SIZE, false);
// temporal tensors for transfer tensors from cpu to gpu if needed
struct ggml_tensor* x_t = NULL;
struct ggml_tensor* timesteps_t = NULL;
struct ggml_tensor* context_t = NULL;
struct ggml_tensor* t_emb_t = NULL;
struct ggml_tensor* y_t = NULL;
// it's performing a compute, check if backend isn't cpu
if (!ggml_backend_is_cpu(backend)) {
// pass input tensors to gpu memory
x_t = ggml_dup_tensor(ctx0, x);
context_t = ggml_dup_tensor(ctx0, context);
ggml_allocr_alloc(compute_allocr, x_t);
if (timesteps != NULL) {
timesteps_t = ggml_dup_tensor(ctx0, timesteps);
ggml_allocr_alloc(compute_allocr, timesteps_t);
}
ggml_allocr_alloc(compute_allocr, context_t);
if (t_emb != NULL) {
t_emb_t = ggml_dup_tensor(ctx0, t_emb);
ggml_allocr_alloc(compute_allocr, t_emb_t);
}
if (y != NULL) {
y_t = ggml_dup_tensor(ctx0, y);
ggml_allocr_alloc(compute_allocr, y_t);
}
// pass data to device backend
if (!ggml_allocr_is_measure(compute_allocr)) {
ggml_backend_tensor_set(x_t, x->data, 0, ggml_nbytes(x));
ggml_backend_tensor_set(context_t, context->data, 0, ggml_nbytes(context));
if (timesteps_t != NULL) {
ggml_backend_tensor_set(timesteps_t, timesteps->data, 0, ggml_nbytes(timesteps));
}
if (t_emb_t != NULL) {
ggml_backend_tensor_set(t_emb_t, t_emb->data, 0, ggml_nbytes(t_emb));
}
if (y != NULL) {
ggml_backend_tensor_set(y_t, y->data, 0, ggml_nbytes(y));
}
}
} else {
// if it's cpu backend just pass the same tensors
x_t = x;
timesteps_t = timesteps;
context_t = context;
t_emb_t = t_emb;
y_t = y;
}
struct ggml_tensor* out = forward(ctx0, x_t, timesteps_t, context_t, t_emb_t, y_t);
ggml_build_forward_expand(gf, out);
ggml_free(ctx0);
return gf;
}
|
O1
|
cpp
|
UNetModel::build_graph(ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*, ggml_tensor*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x40(%rsp)
movq %r8, %rbp
movq %rcx, 0x38(%rsp)
movq %rdx, %r12
movq %rsi, 0x30(%rsp)
movq %rdi, %rbx
movb 0x130348(%rip), %al # 0x177ee8
testb %al, %al
je 0x47df0
movb 0x13035a(%rip), %al # 0x177f08
testb %al, %al
je 0x47e37
movq 0x130323(%rip), %rax # 0x177ee0
movq 0x13032c(%rip), %rcx # 0x177ef0
movq %rax, 0x60(%rsp)
movq %rcx, 0x68(%rsp)
movb $0x1, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8e3d1
movq %rax, %r13
movl $0x2800, %esi # imm = 0x2800
movq %rax, %rdi
xorl %edx, %edx
callq 0x9772e
movq %rax, %r15
movq 0x60(%rbx), %rdi
callq 0xb464a
testb %al, %al
je 0x47c21
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %r14
jmp 0x47db6
movq %r13, %rdi
movq 0x30(%rsp), %rsi
callq 0x902bc
movq %rax, %r14
movq %r13, %rdi
movq 0x38(%rsp), %rsi
callq 0x902bc
movq %rax, 0x20(%rsp)
movq 0x50(%rbx), %rdi
movq %r14, 0x28(%rsp)
movq %r14, %rsi
callq 0xb37b1
testq %r12, %r12
movq %r12, 0x50(%rsp)
je 0x47c7a
movq %r13, %rdi
movq %r12, %rsi
callq 0x902bc
movq %rax, %r12
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq 0xb37b1
jmp 0x47c7d
xorl %r12d, %r12d
movq 0x50(%rbx), %rdi
movq 0x20(%rsp), %rsi
callq 0xb37b1
testq %rbp, %rbp
movq %rbp, 0x58(%rsp)
je 0x47cb1
movq %r13, %rdi
movq %rbp, %rsi
callq 0x902bc
movq %rax, %rbp
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq 0xb37b1
jmp 0x47cb3
xorl %ebp, %ebp
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x47cd6
movq %r13, %rdi
callq 0x902bc
movq %rax, %r14
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq 0xb37b1
jmp 0x47cd9
xorl %r14d, %r14d
movq 0x50(%rbx), %rdi
callq 0xb379f
testb %al, %al
jne 0x47dac
movq %r15, 0x48(%rsp)
movq 0x30(%rsp), %rdi
movq 0x118(%rdi), %r15
callq 0x8e066
movq 0x28(%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xb3fb5
movq 0x38(%rsp), %rdi
movq 0x118(%rdi), %r15
callq 0x8e066
movq 0x20(%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xb3fb5
testq %r12, %r12
je 0x47d5b
movq 0x50(%rsp), %rdi
movq 0x118(%rdi), %r15
callq 0x8e066
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xb3fb5
testq %rbp, %rbp
je 0x47d81
movq 0x58(%rsp), %rdi
movq 0x118(%rdi), %r15
callq 0x8e066
movq %rbp, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xb3fb5
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x47da7
movq 0x118(%rdi), %r15
callq 0x8e066
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xb3fb5
movq 0x48(%rsp), %r15
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %r8
movq %r14, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %rbp, %r9
callq 0x47f1e
movq %r15, %rdi
movq %rax, %rsi
callq 0x9675b
movq %r13, %rdi
callq 0x8e752
movq %r15, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1300f1(%rip), %r14 # 0x177ee8
movq %r14, %rdi
callq 0xab30
testl %eax, %eax
je 0x47ba8
callq 0x8e322
movq %rax, %r15
callq 0x976df
leaq (%r15,%r15,4), %rcx
shlq $0xb, %rcx
addq %rcx, %rax
movq %rax, 0x1300ba(%rip) # 0x177ee0
leaq 0x1300bb(%rip), %rdi # 0x177ee8
callq 0xa380
jmp 0x47ba8
leaq 0x1300ca(%rip), %r14 # 0x177f08
movq %r14, %rdi
callq 0xab30
testl %eax, %eax
je 0x47bb6
movq 0x13008b(%rip), %rsi # 0x177ee0
leaq 0x130094(%rip), %rdi # 0x177ef0
leaq 0x1f(%rsp), %rdx
callq 0x47ea6
leaq 0x99(%rip), %rdi # 0x47f06
leaq 0x13007c(%rip), %rsi # 0x177ef0
leaq 0xaf7bd(%rip), %rdx # 0xf7638
callq 0xa510
leaq 0x130081(%rip), %rdi # 0x177f08
callq 0xa380
jmp 0x47bb6
jmp 0x47e93
movq %rax, %rbx
movq %r14, %rdi
callq 0xa370
movq %rbx, %rdi
callq 0xaae0
|
_ZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_68], r9
mov rbp, r8
mov [rsp+0A8h+var_70], rcx
mov r12, rdx
mov [rsp+0A8h+var_78], rsi
mov rbx, rdi
mov al, cs:_ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; `guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
test al, al
jz loc_47DF0
loc_47BA8:
mov al, cs:_ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; `guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf
test al, al
jz loc_47E37
loc_47BB6:
mov rax, cs:_ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
mov rcx, cs:_ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf
mov qword ptr [rsp+0A8h+var_48], rax
mov qword ptr [rsp+0A8h+var_48+8], rcx
mov byte ptr [rsp+0A8h+var_38], 1
mov rax, qword ptr [rsp+0A8h+var_38]
mov qword ptr [rsp+0A8h+var_98], rax; int
movups xmm0, [rsp+0A8h+var_48]
movups xmmword ptr [rsp+0A8h+var_A8], xmm0
call ggml_init
mov r13, rax
mov esi, 2800h
mov rdi, rax
xor edx, edx
call ggml_new_graph_custom
mov r15, rax
mov rdi, [rbx+60h]
call ggml_backend_is_cpu
test al, al
jz short loc_47C21
mov rdx, [rsp+0A8h+var_78]
mov r8, [rsp+0A8h+var_70]
mov r14, [rsp+0A8h+var_68]
jmp loc_47DB6
loc_47C21:
mov rdi, r13
mov rsi, [rsp+0A8h+var_78]
call ggml_dup_tensor
mov r14, rax
mov rdi, r13
mov rsi, [rsp+0A8h+var_70]
call ggml_dup_tensor
mov qword ptr [rsp+0A8h+var_88], rax; int
mov rdi, [rbx+50h]
mov [rsp+0A8h+var_80], r14; __int64
mov rsi, r14
call ggml_allocr_alloc
test r12, r12
mov [rsp+0A8h+var_58], r12
jz short loc_47C7A
mov rdi, r13
mov rsi, r12
call ggml_dup_tensor
mov r12, rax
mov rdi, [rbx+50h]
mov rsi, rax
call ggml_allocr_alloc
jmp short loc_47C7D
loc_47C7A:
xor r12d, r12d
loc_47C7D:
mov rdi, [rbx+50h]
mov rsi, qword ptr [rsp+0A8h+var_88]
call ggml_allocr_alloc
test rbp, rbp
mov [rsp+0A8h+var_50], rbp
jz short loc_47CB1
mov rdi, r13
mov rsi, rbp
call ggml_dup_tensor
mov rbp, rax
mov rdi, [rbx+50h]
mov rsi, rax
call ggml_allocr_alloc
jmp short loc_47CB3
loc_47CB1:
xor ebp, ebp
loc_47CB3:
mov rsi, [rsp+0A8h+var_68]
test rsi, rsi
jz short loc_47CD6
mov rdi, r13
call ggml_dup_tensor
mov r14, rax
mov rdi, [rbx+50h]
mov rsi, rax
call ggml_allocr_alloc
jmp short loc_47CD9
loc_47CD6:
xor r14d, r14d
loc_47CD9:
mov rdi, [rbx+50h]
call ggml_allocr_is_measure
test al, al
jnz loc_47DAC
mov [rsp+0A8h+var_60], r15
mov rdi, [rsp+0A8h+var_78]
mov r15, [rdi+118h]
call ggml_nbytes
mov rdi, [rsp+0A8h+var_80]
mov rsi, r15
xor edx, edx
mov rcx, rax
call ggml_backend_tensor_set
mov rdi, [rsp+0A8h+var_70]
mov r15, [rdi+118h]
call ggml_nbytes
mov rdi, qword ptr [rsp+0A8h+var_88]
mov rsi, r15
xor edx, edx
mov rcx, rax
call ggml_backend_tensor_set
test r12, r12
jz short loc_47D5B
mov rdi, [rsp+0A8h+var_58]
mov r15, [rdi+118h]
call ggml_nbytes
mov rdi, r12
mov rsi, r15
xor edx, edx
mov rcx, rax
call ggml_backend_tensor_set
loc_47D5B:
test rbp, rbp
jz short loc_47D81
mov rdi, [rsp+0A8h+var_50]
mov r15, [rdi+118h]
call ggml_nbytes
mov rdi, rbp
mov rsi, r15
xor edx, edx
mov rcx, rax
call ggml_backend_tensor_set
loc_47D81:
mov rdi, [rsp+0A8h+var_68]
test rdi, rdi
jz short loc_47DA7
mov r15, [rdi+118h]
call ggml_nbytes
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, rax
call ggml_backend_tensor_set
loc_47DA7:
mov r15, [rsp+0A8h+var_60]
loc_47DAC:
mov rdx, [rsp+0A8h+var_80]; int
mov r8, qword ptr [rsp+0A8h+var_88]; int
loc_47DB6:
mov [rsp+0A8h+var_A8], r14; __int64
mov rdi, rbx; int
mov rsi, r13; int
mov rcx, r12; int
mov r9, rbp; int
call _ZN9UNetModel7forwardEP12ggml_contextP11ggml_tensorS3_S3_S3_S3_; UNetModel::forward(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)
mov rdi, r15
mov rsi, rax
call ggml_build_forward_expand
mov rdi, r13
call ggml_free
mov rax, r15
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_47DF0:
lea r14, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; `guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
mov rdi, r14; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_47BA8
call ggml_tensor_overhead
mov r15, rax
call ggml_graph_overhead
lea rcx, [r15+r15*4]
shl rcx, 0Bh
add rax, rcx
mov cs:_ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size, rax; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
lea rdi, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; __guard *
call ___cxa_guard_release
jmp loc_47BA8
loc_47E37:
lea r14, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; `guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf
mov rdi, r14; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_47BB6
mov rsi, cs:_ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E8buf_size; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size
lea rdi, _ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf
lea rdx, [rsp+0A8h+var_89]
call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
lea rdi, _ZNSt6vectorIhSaIhEED2Ev; lpfunc
lea rsi, _ZZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN9UNetModel11build_graphEP11ggml_tensorS1_S1_S1_S1_E3buf; __guard *
call ___cxa_guard_release
jmp loc_47BB6
jmp short $+2
loc_47E93:
mov rbx, rax
mov rdi, r14; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
|
long long UNetModel::build_graph(
__guard *a1,
long long *a2,
long long a3,
long long a4,
long long a5,
long long a6,
double a7)
{
long long v7; // rbp
long long v8; // r12
__guard *v9; // rbx
long long v10; // r13
long long v11; // r15
int v12; // edx
int v13; // r8d
long long v14; // r14
long long v15; // r14
__guard v16; // rdi
long long v17; // r15
long long v18; // rax
long long v19; // r15
long long v20; // rax
long long v21; // r15
long long v22; // rax
long long v23; // r15
long long v24; // rax
long long v25; // r15
long long v26; // rax
long long v27; // rax
long long v29; // r15
int v30; // [rsp+8h] [rbp-A0h]
int v31; // [rsp+10h] [rbp-98h]
void *v32; // [rsp+18h] [rbp-90h] BYREF
int v33[2]; // [rsp+20h] [rbp-88h]
long long v34; // [rsp+28h] [rbp-80h]
long long *v35; // [rsp+30h] [rbp-78h]
long long v36; // [rsp+38h] [rbp-70h]
long long v37; // [rsp+40h] [rbp-68h]
long long v38; // [rsp+48h] [rbp-60h]
long long v39; // [rsp+50h] [rbp-58h]
long long v40; // [rsp+58h] [rbp-50h]
long long v41; // [rsp+60h] [rbp-48h]
long long v42; // [rsp+68h] [rbp-40h]
int v43[14]; // [rsp+70h] [rbp-38h]
v37 = a6;
v7 = a5;
v36 = a4;
v8 = a3;
v35 = a2;
v9 = a1;
if ( !(_BYTE)`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size )
{
a1 = &`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size;
if ( __cxa_guard_acquire(&`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size) )
{
v29 = ggml_tensor_overhead(a7);
UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size = 10240 * v29 + ggml_graph_overhead();
a1 = &`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size;
__cxa_guard_release(&`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size);
}
}
if ( !(_BYTE)`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf )
{
a1 = &`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf;
if ( __cxa_guard_acquire(&`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf) )
{
std::vector<unsigned char>::vector(
&UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf,
UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size,
(char *)&v32 + 7);
a2 = &UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf;
__cxa_atexit(
std::vector<unsigned char>::~vector,
&UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf,
&_dso_handle);
a1 = &`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf;
__cxa_guard_release(&`guard variable for'UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf);
}
}
v41 = UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size;
v42 = UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf;
LOBYTE(v43[0]) = 1;
v31 = v43[0];
v30 = UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf;
v10 = ggml_init(
(_DWORD)a1,
(_DWORD)a2,
a3,
UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf,
a5,
a6,
UNetModel::build_graph(ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *,ggml_tensor *)::buf_size);
v11 = ggml_new_graph_custom(v10, 10240LL, 0LL);
if ( (unsigned __int8)ggml_backend_is_cpu(v9[12]) )
{
v12 = (int)v35;
v13 = v36;
v14 = v37;
}
else
{
v15 = ggml_dup_tensor(v10, v35);
*(_QWORD *)v33 = ggml_dup_tensor(v10, v36);
v16 = v9[10];
v34 = v15;
ggml_allocr_alloc(v16, v15);
v39 = v8;
if ( v8 )
{
v8 = ggml_dup_tensor(v10, v8);
ggml_allocr_alloc(v9[10], v8);
}
else
{
v8 = 0LL;
}
ggml_allocr_alloc(v9[10], *(_QWORD *)v33);
v40 = v7;
if ( v7 )
{
v7 = ggml_dup_tensor(v10, v7);
ggml_allocr_alloc(v9[10], v7);
}
else
{
v7 = 0LL;
}
if ( v37 )
{
v14 = ggml_dup_tensor(v10, v37);
ggml_allocr_alloc(v9[10], v14);
}
else
{
v14 = 0LL;
}
if ( !(unsigned __int8)ggml_allocr_is_measure(v9[10]) )
{
v38 = v11;
v17 = v35[35];
v18 = ggml_nbytes(v35);
ggml_backend_tensor_set(v34, v17, 0LL, v18);
v19 = *(_QWORD *)(v36 + 280);
v20 = ggml_nbytes(v36);
ggml_backend_tensor_set(*(_QWORD *)v33, v19, 0LL, v20);
if ( v8 )
{
v21 = *(_QWORD *)(v39 + 280);
v22 = ggml_nbytes(v39);
ggml_backend_tensor_set(v8, v21, 0LL, v22);
}
if ( v7 )
{
v23 = *(_QWORD *)(v40 + 280);
v24 = ggml_nbytes(v40);
ggml_backend_tensor_set(v7, v23, 0LL, v24);
}
if ( v37 )
{
v25 = *(_QWORD *)(v37 + 280);
v26 = ggml_nbytes(v37);
ggml_backend_tensor_set(v14, v25, 0LL, v26);
}
v11 = v38;
}
v12 = v34;
v13 = v33[0];
}
v27 = UNetModel::forward((int)v9, v10, v12, v8, v13, v7, v14, v30, v31, v32, v33[0], v34);
ggml_build_forward_expand(v11, v27);
ggml_free(v10);
return v11;
}
| |||
12,263
|
set_page_bits
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool set_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page, uint fill_pattern)
{
pgcache_page_no_t bitmap_page;
uint offset_page, offset, tmp, org_tmp, used_offset;
uchar *data;
DBUG_ENTER("set_page_bits");
DBUG_ASSERT(fill_pattern <= 7);
bitmap_page= page - page % bitmap->pages_covered;
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset_page= (uint) (page - bitmap->page - 1);
/*
Mark place used by reading/writing 2 bytes at a time to handle
bitmaps in overlapping bytes
*/
offset_page*= 3;
offset= offset_page & 7;
data= bitmap->map + offset_page / 8;
org_tmp= tmp= uint2korr(data);
tmp= (tmp & ~(7 << offset)) | (fill_pattern << offset);
if (tmp == org_tmp)
DBUG_RETURN(0); /* No changes */
/*
Take care to not write bytes outside of bitmap.
fill_pattern is 3 bits, so we need to write two bytes
if bit position we write to is > (8-3)
*/
if (offset > 5)
int2store(data, tmp);
else
data[0]= tmp;
/*
Reset full_head_size or full_tail_size if we are releasing data before
it. Increase used_size if we are allocating data.
*/
used_offset= (uint) (data - bitmap->map);
if (fill_pattern < 4)
set_if_smaller(bitmap->full_head_size, used_offset);
if (fill_pattern == 0 || (fill_pattern > 4 && fill_pattern < 7))
set_if_smaller(bitmap->full_tail_size, used_offset);
if (fill_pattern != 0)
{
/* Calulcate which was the last changed byte */
used_offset+= offset > 5 ? 2 : 1;
set_if_bigger(bitmap->used_size, used_offset);
}
_ma_check_bitmap(bitmap);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
if (fill_pattern != FULL_HEAD_PAGE && fill_pattern != FULL_TAIL_PAGE)
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
/*
Note that if the condition above is false (page is full), and all pages of
this bitmap are now full, and that bitmap page was
first_bitmap_with_space, we don't modify first_bitmap_with_space, indeed
its value still tells us where to start our search for a bitmap with space
(which is for sure after this full one).
That does mean that first_bitmap_with_space is only a lower bound.
*/
DBUG_RETURN(0);
}
|
O3
|
c
|
set_page_bits:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, %rax
xorl %edx, %edx
divq 0x138(%rsi)
movq %r13, %r14
subq %rdx, %r14
movq %r14, %rax
cmpq 0x10(%rsi), %r14
je 0x415d0
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x40bb5
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x41698
movq 0x10(%r12), %rax
notl %eax
addl %eax, %r13d
leal (%r13,%r13,2), %edx
movl %edx, %ecx
andl $0x7, %ecx
movq 0x8(%r12), %rax
shrl $0x3, %edx
movzwl (%rax,%rdx), %edi
movl $0x7, %r8d
shll %cl, %r8d
movl %r15d, %esi
shll %cl, %esi
notl %r8d
andl %edi, %r8d
orl %r8d, %esi
cmpl %edi, %esi
je 0x41696
addq %rdx, %rax
cmpl $0x6, %ecx
jb 0x41617
movw %si, (%rax)
jmp 0x4161a
movb %sil, (%rax)
subl 0x8(%r12), %eax
cmpl $0x3, %r15d
ja 0x41631
cmpl %eax, 0x28(%r12)
jbe 0x41631
movl %eax, 0x28(%r12)
cmpl $0x6, %r15d
ja 0x41653
movl $0x61, %edx
btl %r15d, %edx
jae 0x41653
cmpl %eax, 0x2c(%r12)
jbe 0x4164e
movl %eax, 0x2c(%r12)
testl %r15d, %r15d
je 0x4167d
cmpl $0x6, %ecx
sbbl $-0x1, %eax
incl %eax
cmpl %eax, 0x24(%r12)
jae 0x41667
movl %eax, 0x24(%r12)
movb $0x1, 0x20(%r12)
xorl %eax, %eax
cmpl $0x4, %r15d
je 0x41698
cmpl $0x7, %r15d
je 0x41698
jmp 0x41683
movb $0x1, 0x20(%r12)
movq (%rbx), %rax
cmpq %r14, 0xd0(%rax)
jbe 0x41696
movq %r14, 0xd0(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
set_page_bits:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov rax, rdx
xor edx, edx
div qword ptr [rsi+138h]
mov r14, r13
sub r14, rdx
mov rax, r14
cmp r14, [rsi+10h]
jz short loc_415D0
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call _ma_change_bitmap_page
mov ecx, eax
mov al, 1
test cl, cl
jnz loc_41698
mov rax, [r12+10h]
loc_415D0:
not eax
add r13d, eax
lea edx, [r13+r13*2+0]
mov ecx, edx
and ecx, 7
mov rax, [r12+8]
shr edx, 3
movzx edi, word ptr [rax+rdx]
mov r8d, 7
shl r8d, cl
mov esi, r15d
shl esi, cl
not r8d
and r8d, edi
or esi, r8d
cmp esi, edi
jz loc_41696
add rax, rdx
cmp ecx, 6
jb short loc_41617
mov [rax], si
jmp short loc_4161A
loc_41617:
mov [rax], sil
loc_4161A:
sub eax, [r12+8]
cmp r15d, 3
ja short loc_41631
cmp [r12+28h], eax
jbe short loc_41631
mov [r12+28h], eax
loc_41631:
cmp r15d, 6
ja short loc_41653
mov edx, 61h ; 'a'
bt edx, r15d
jnb short loc_41653
cmp [r12+2Ch], eax
jbe short loc_4164E
mov [r12+2Ch], eax
loc_4164E:
test r15d, r15d
jz short loc_4167D
loc_41653:
cmp ecx, 6
sbb eax, 0FFFFFFFFh
inc eax
cmp [r12+24h], eax
jnb short loc_41667
mov [r12+24h], eax
loc_41667:
mov byte ptr [r12+20h], 1
xor eax, eax
cmp r15d, 4
jz short loc_41698
cmp r15d, 7
jz short loc_41698
jmp short loc_41683
loc_4167D:
mov byte ptr [r12+20h], 1
loc_41683:
mov rax, [rbx]
cmp [rax+0D0h], r14
jbe short loc_41696
mov [rax+0D0h], r14
loc_41696:
xor eax, eax
loc_41698:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char set_page_bits(long long *a1, long long a2, unsigned long long a3, long long a4, long long a5)
{
unsigned int v5; // r15d
int v6; // r13d
unsigned long long v9; // r14
long long v10; // rax
char v11; // cl
char result; // al
int v13; // r13d
unsigned int v14; // ecx
long long v15; // rax
long long v16; // rdx
int v17; // edi
int v18; // esi
_BYTE *v19; // rax
unsigned int v20; // eax
int v21; // edx
unsigned int v22; // eax
v5 = a4;
v6 = a3;
v9 = a3 - a3 % *(_QWORD *)(a2 + 312);
LODWORD(v10) = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v9 != *(_QWORD *)(a2 + 16) )
{
v11 = ma_change_bitmap_page(a1, a2, a3 - a3 % *(_QWORD *)(a2 + 312), a4, a5);
result = 1;
if ( v11 )
return result;
v10 = *(_QWORD *)(a2 + 16);
}
v13 = ~(_DWORD)v10 + v6;
v14 = (3 * (_BYTE)v13) & 7;
v15 = *(_QWORD *)(a2 + 8);
v16 = (unsigned int)(3 * v13) >> 3;
v17 = *(unsigned __int16 *)(v15 + v16);
v18 = v17 & ~(7 << v14) | (v5 << v14);
if ( v18 == v17 )
return 0;
v19 = (_BYTE *)(v16 + v15);
if ( v14 < 6 )
*v19 = v18;
else
*(_WORD *)v19 = v18;
v20 = (_DWORD)v19 - *(_DWORD *)(a2 + 8);
if ( v5 <= 3 && *(_DWORD *)(a2 + 40) > v20 )
*(_DWORD *)(a2 + 40) = v20;
if ( v5 <= 6 )
{
v21 = 97;
if ( _bittest(&v21, v5) )
{
if ( *(_DWORD *)(a2 + 44) > v20 )
*(_DWORD *)(a2 + 44) = v20;
if ( !v5 )
{
*(_BYTE *)(a2 + 32) = 1;
LABEL_22:
if ( *(_QWORD *)(*a1 + 208) > v9 )
*(_QWORD *)(*a1 + 208) = v9;
return 0;
}
}
}
v22 = v20 - ((v14 < 6) - 1) + 1;
if ( *(_DWORD *)(a2 + 36) < v22 )
*(_DWORD *)(a2 + 36) = v22;
*(_BYTE *)(a2 + 32) = 1;
result = 0;
if ( v5 != 4 && v5 != 7 )
goto LABEL_22;
return result;
}
|
set_page_bits:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RAX,RDX
XOR EDX,EDX
DIV qword ptr [RSI + 0x138]
MOV R14,R13
SUB R14,RDX
MOV RAX,R14
CMP R14,qword ptr [RSI + 0x10]
JZ 0x001415d0
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x00140bb5
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x00141698
MOV RAX,qword ptr [R12 + 0x10]
LAB_001415d0:
NOT EAX
ADD R13D,EAX
LEA EDX,[R13 + R13*0x2]
MOV ECX,EDX
AND ECX,0x7
MOV RAX,qword ptr [R12 + 0x8]
SHR EDX,0x3
MOVZX EDI,word ptr [RAX + RDX*0x1]
MOV R8D,0x7
SHL R8D,CL
MOV ESI,R15D
SHL ESI,CL
NOT R8D
AND R8D,EDI
OR ESI,R8D
CMP ESI,EDI
JZ 0x00141696
ADD RAX,RDX
CMP ECX,0x6
JC 0x00141617
MOV word ptr [RAX],SI
JMP 0x0014161a
LAB_00141617:
MOV byte ptr [RAX],SIL
LAB_0014161a:
SUB EAX,dword ptr [R12 + 0x8]
CMP R15D,0x3
JA 0x00141631
CMP dword ptr [R12 + 0x28],EAX
JBE 0x00141631
MOV dword ptr [R12 + 0x28],EAX
LAB_00141631:
CMP R15D,0x6
JA 0x00141653
MOV EDX,0x61
BT EDX,R15D
JNC 0x00141653
CMP dword ptr [R12 + 0x2c],EAX
JBE 0x0014164e
MOV dword ptr [R12 + 0x2c],EAX
LAB_0014164e:
TEST R15D,R15D
JZ 0x0014167d
LAB_00141653:
CMP ECX,0x6
SBB EAX,-0x1
INC EAX
CMP dword ptr [R12 + 0x24],EAX
JNC 0x00141667
MOV dword ptr [R12 + 0x24],EAX
LAB_00141667:
MOV byte ptr [R12 + 0x20],0x1
XOR EAX,EAX
CMP R15D,0x4
JZ 0x00141698
CMP R15D,0x7
JZ 0x00141698
JMP 0x00141683
LAB_0014167d:
MOV byte ptr [R12 + 0x20],0x1
LAB_00141683:
MOV RAX,qword ptr [RBX]
CMP qword ptr [RAX + 0xd0],R14
JBE 0x00141696
MOV qword ptr [RAX + 0xd0],R14
LAB_00141696:
XOR EAX,EAX
LAB_00141698:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 set_page_bits(long *param_1,long param_2,ulong param_3,uint param_4)
{
char cVar1;
int2 *puVar2;
uint uVar3;
ulong uVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
uVar7 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
uVar5 = (uint)uVar7;
if (uVar7 != *(ulong *)(param_2 + 0x10)) {
cVar1 = _ma_change_bitmap_page(param_1,param_2,uVar7);
if (cVar1 != '\0') {
return 1;
}
uVar5 = (uint)*(int8 *)(param_2 + 0x10);
}
uVar5 = ((int)param_3 + ~uVar5) * 3;
uVar3 = uVar5 & 7;
uVar4 = (ulong)(uVar5 >> 3);
uVar6 = (uint)*(ushort *)(*(long *)(param_2 + 8) + uVar4);
uVar5 = param_4 << (sbyte)uVar3 | ~(7 << (sbyte)uVar3) & uVar6;
if (uVar5 == uVar6) {
return 0;
}
puVar2 = (int2 *)(*(long *)(param_2 + 8) + uVar4);
if (uVar3 < 6) {
*(char *)puVar2 = (char)uVar5;
}
else {
*puVar2 = (short)uVar5;
}
uVar5 = (int)puVar2 - *(int *)(param_2 + 8);
if ((param_4 < 4) && (uVar5 < *(uint *)(param_2 + 0x28))) {
*(uint *)(param_2 + 0x28) = uVar5;
}
if ((param_4 < 7) && ((0x61U >> (param_4 & 0x1f) & 1) != 0)) {
if (uVar5 < *(uint *)(param_2 + 0x2c)) {
*(uint *)(param_2 + 0x2c) = uVar5;
}
if (param_4 == 0) {
*(int1 *)(param_2 + 0x20) = 1;
goto LAB_00141683;
}
}
uVar5 = (uVar5 - (uVar3 < 6)) + 2;
if (*(uint *)(param_2 + 0x24) < uVar5) {
*(uint *)(param_2 + 0x24) = uVar5;
}
*(int1 *)(param_2 + 0x20) = 1;
if (param_4 == 4) {
return 0;
}
if (param_4 == 7) {
return 0;
}
LAB_00141683:
if (uVar7 < *(ulong *)(*param_1 + 0xd0)) {
*(ulong *)(*param_1 + 0xd0) = uVar7;
}
return 0;
}
|
|
12,264
|
translog_scanner_eof
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_scanner_eof(TRANSLOG_SCANNER_DATA *scanner)
{
DBUG_ENTER("translog_scanner_eof");
DBUG_ASSERT(LSN_FILE_NO(scanner->page_addr) ==
LSN_FILE_NO(scanner->last_file_page));
DBUG_PRINT("enter", ("curr Page: 0x%lx last page: 0x%lx "
"normal EOF: %d",
(ulong) LSN_OFFSET(scanner->page_addr),
(ulong) LSN_OFFSET(scanner->last_file_page),
LSN_OFFSET(scanner->page_addr) ==
LSN_OFFSET(scanner->last_file_page)));
/*
TODO: detect damaged file EOF,
TODO: issue warning if damaged file EOF detected
*/
DBUG_RETURN(scanner->page_addr ==
scanner->last_file_page);
}
|
O0
|
c
|
translog_scanner_eof:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
jmp 0x3bc9a
jmp 0x3bc9c
jmp 0x3bc9e
jmp 0x3bca0
movq -0x8(%rbp), %rax
movq 0x2000(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x2010(%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_scanner_eof:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
jmp short $+2
loc_3BC9A:
jmp short $+2
loc_3BC9C:
jmp short $+2
loc_3BC9E:
jmp short $+2
loc_3BCA0:
mov rax, [rbp+var_8]
mov rax, [rax+2000h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+2010h]
setz al
and al, 1
movzx eax, al
mov [rbp+var_9], al
mov al, [rbp+var_9]
pop rbp
retn
|
_BOOL8 translog_scanner_eof(long long a1)
{
return *(_QWORD *)(a1 + 0x2000) == *(_QWORD *)(a1 + 8208);
}
|
translog_scanner_eof:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0013bc9a
LAB_0013bc9a:
JMP 0x0013bc9c
LAB_0013bc9c:
JMP 0x0013bc9e
LAB_0013bc9e:
JMP 0x0013bca0
LAB_0013bca0:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2000]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x2010]
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x9],AL
MOV AL,byte ptr [RBP + -0x9]
POP RBP
RET
|
bool translog_scanner_eof(long param_1)
{
return *(long *)(param_1 + 0x2000) == *(long *)(param_1 + 0x2010);
}
|
|
12,265
|
nglog::ColoredWriteToStdout(nglog::LogSeverity, char const*, unsigned long)
|
ng-log[P]ng-log/src/logging.cc
|
static void ColoredWriteToStdout(LogSeverity severity, const char* message,
size_t len) {
FILE* output = stdout;
// We also need to send logs to the stderr when the severity is
// higher or equal to the stderr threshold.
if (severity >= FLAGS_stderrthreshold) {
output = stderr;
}
ColoredWriteToStderrOrStdout(output, severity, message, len);
}
|
O2
|
cpp
|
nglog::ColoredWriteToStdout(nglog::LogSeverity, char const*, unsigned long):
movq %rdx, %rcx
movq %rsi, %rdx
movl %edi, %esi
leaq 0x25745(%rip), %rax # 0x31af0
cmpl %edi, (%rax)
jle 0xc3b8
movq 0x24b6a(%rip), %rax # 0x30f20
jmp 0xc3bf
movq 0x24bd1(%rip), %rax # 0x30f90
movq (%rax), %rdi
jmp 0xfd37
|
_ZN5nglogL20ColoredWriteToStdoutENS_11LogSeverityEPKcm:
mov rcx, rdx
mov rdx, rsi
mov esi, edi
lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold
cmp [rax], edi
jle short loc_C3B8
mov rax, cs:stdout_ptr
jmp short loc_C3BF
loc_C3B8:
mov rax, cs:stderr_ptr
loc_C3BF:
mov rdi, [rax]
jmp _ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderrOrStdout(_IO_FILE *,nglog::LogSeverity,char const*,ulong)
|
long long nglog::ColoredWriteToStdout(int a1, long long a2, long long a3)
{
_QWORD *v3; // rax
if ( fLI::FLAGS_stderrthreshold <= a1 )
v3 = &stderr;
else
v3 = &stdout;
return nglog::ColoredWriteToStderrOrStdout(*v3, (unsigned int)a1, a2, a3);
}
|
ColoredWriteToStdout:
MOV RCX,RDX
MOV RDX,RSI
MOV ESI,EDI
LEA RAX,[0x131af0]
CMP dword ptr [RAX],EDI
JLE 0x0010c3b8
MOV RAX,qword ptr [0x00130f20]
JMP 0x0010c3bf
LAB_0010c3b8:
MOV RAX,qword ptr [0x00130f90]
LAB_0010c3bf:
MOV RDI,qword ptr [RAX]
JMP 0x0010fd37
|
/* nglog::ColoredWriteToStdout(nglog::LogSeverity, char const*, unsigned long) */
void nglog::ColoredWriteToStdout(int param_1,int8 param_2,int8 param_3)
{
int8 *puVar1;
puVar1 = (int8 *)PTR_stderr_00130f90;
if (param_1 < fLI::FLAGS_stderrthreshold) {
puVar1 = (int8 *)PTR_stdout_00130f20;
}
ColoredWriteToStderrOrStdout(*puVar1,param_1,param_2,param_3);
return;
}
|
|
12,266
|
minja::Value::for_each(std::function<void (minja::Value&)> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void for_each(const std::function<void(Value &)> & callback) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (array_) {
for (auto& item : *array_) {
callback(item);
}
} else if (object_) {
for (auto & item : *object_) {
Value key(item.first);
callback(key);
}
} else if (is_string()) {
for (char c : primitive_.get<std::string>()) {
auto val = Value(std::string(1, c));
callback(val);
}
} else {
throw std::runtime_error("Value is not iterable: " + dump());
}
}
|
O2
|
cpp
|
minja::Value::for_each(std::function<void (minja::Value&)> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4e678
testb %al, %al
jne 0x6049e
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x603c2
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
je 0x6048c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x605dc
addq $0x50, %r14
jmp 0x603a8
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x60404
movq (%rax), %r14
movq 0x8(%rax), %r12
leaq 0x48(%rsp), %r15
cmpq %r12, %r14
je 0x6048c
movq %r15, %rdi
movq %r14, %rsi
callq 0x5a298
movq %rbx, %rdi
movq %r15, %rsi
callq 0x605dc
movq %r15, %rdi
callq 0x4da04
addq $0x60, %r14
jmp 0x603d7
cmpb $0x3, 0x40(%r14)
jne 0x604ce
addq $0x40, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4f438
movq (%r15), %r13
movq 0x8(%r15), %rbp
xorl %r15d, %r15d
leaq 0x28(%rsp), %r14
leaq 0x48(%rsp), %r12
cmpq %r15, %rbp
je 0x60482
movsbl (%r13,%r15), %edx
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0x22900
movq %r12, %rdi
movq %r14, %rsi
callq 0x51596
movq %r14, %rdi
callq 0x22f98
movq %rbx, %rdi
movq %r12, %rsi
callq 0x605dc
movq %r12, %rdi
callq 0x4da04
incq %r15
jmp 0x60437
leaq 0x8(%rsp), %rdi
callq 0x22f98
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %rbx
leaq 0x3da7f(%rip), %rsi # 0x9df2f
movq %rax, %rdi
callq 0x222b0
movq 0x82b31(%rip), %rsi # 0xe2ff0
movq 0x82aa2(%rip), %rdx # 0xe2f68
movq %rbx, %rdi
callq 0x22d40
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x4dcc6
leaq 0x3f4ff(%rip), %rsi # 0x9f9f1
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3a58f
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x22c80
xorl %ebp, %ebp
movq 0x82ad6(%rip), %rsi # 0xe2ff0
movq 0x82a47(%rip), %rdx # 0xe2f68
movq %rbx, %rdi
callq 0x22d40
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x22f98
jmp 0x6053e
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x22f98
testb %bpl, %bpl
jne 0x60554
jmp 0x60598
jmp 0x60551
movq %rax, %r14
movq %rbx, %rdi
callq 0x225c0
jmp 0x60598
movq %rax, %r14
jmp 0x6057f
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x22f98
jmp 0x6057f
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x4da04
leaq 0x8(%rsp), %rdi
callq 0x22f98
jmp 0x60598
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x4da04
movq %r14, %rdi
callq 0x22da0
|
_ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov rbx, rsi
mov r14, rdi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jnz loc_6049E
mov rax, [r14+10h]
test rax, rax
jz short loc_603C2
mov r14, [rax]
mov r15, [rax+8]
loc_603A8:
cmp r14, r15
jz loc_6048C
mov rdi, rbx
mov rsi, r14
call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &)
add r14, 50h ; 'P'
jmp short loc_603A8
loc_603C2:
mov rax, [r14+20h]
test rax, rax
jz short loc_60404
mov r14, [rax]
mov r12, [rax+8]
lea r15, [rsp+0C8h+var_80]
loc_603D7:
cmp r14, r12
jz loc_6048C
mov rdi, r15
mov rsi, r14
call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::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&)
mov rdi, rbx
mov rsi, r15
call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &)
mov rdi, r15; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add r14, 60h ; '`'
jmp short loc_603D7
loc_60404:
cmp byte ptr [r14+40h], 3
jnz loc_604CE
add r14, 40h ; '@'
lea r15, [rsp+0C8h+var_C0]
mov rdi, r15
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov r13, [r15]
mov rbp, [r15+8]
xor r15d, r15d
lea r14, [rsp+0C8h+var_A0]
lea r12, [rsp+0C8h+var_80]
loc_60437:
cmp rbp, r15
jz short loc_60482
movsx edx, byte ptr [r13+r15+0]
lea rax, [rsp+0C8h+var_90]
mov [rsp+0C8h+var_A0], rax
mov rdi, r14
push 1
pop rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, r12
mov rsi, r14
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
mov rsi, r12
call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &)
mov rdi, r12; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
inc r15
jmp short loc_60437
loc_60482:
lea rdi, [rsp+0C8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_6048C:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6049E:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_604CE:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0C8h+var_C0]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotIter; "Value is not iterable: "
lea rdi, [rsp+0C8h+var_80]
lea rdx, [rsp+0C8h+var_C0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+0C8h+var_80]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+0C8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6053E
mov r14, rax
mov bpl, 1
loc_6053E:
lea rdi, [rsp+0C8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_60554
jmp short loc_60598
jmp short $+2
loc_60551:
mov r14, rax
loc_60554:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_60598
mov r14, rax
jmp short loc_6057F
mov r14, rax
lea rdi, [rsp+0C8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6057F
mov r14, rax
lea rdi, [rsp+0C8h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6057F:
lea rdi, [rsp+0C8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_60598
mov r14, rax
lea rdi, [rsp+0C8h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_60598:
mov rdi, r14
call __Unwind_Resume
|
void minja::Value::for_each(long long a1, long long a2)
{
long long *v2; // rax
long long v3; // r14
long long v4; // r15
unsigned __int8 **v5; // rax
unsigned __int8 *v6; // r14
unsigned __int8 *v7; // r12
long long v8; // r13
long long v9; // rbp
long long i; // r15
long long v11; // rdx
std::runtime_error *exception; // rbx
void *v13; // rbx
_QWORD v14[4]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v15[2]; // [rsp+28h] [rbp-A0h] BYREF
char v16; // [rsp+38h] [rbp-90h] BYREF
_OWORD v17[8]; // [rsp+48h] [rbp-80h] BYREF
if ( minja::Value::is_null((minja::Value *)a1) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v2 = *(long long **)(a1 + 16);
if ( v2 )
{
v3 = *v2;
v4 = v2[1];
while ( v3 != v4 )
{
std::function<void ()(minja::Value &)>::operator()(a2, v3);
v3 += 80LL;
}
}
else
{
v5 = *(unsigned __int8 ***)(a1 + 32);
if ( v5 )
{
v6 = *v5;
v7 = v5[1];
while ( v6 != v7 )
{
minja::Value::Value((long long)v17, v6);
std::function<void ()(minja::Value &)>::operator()(a2, v17);
minja::Value::~Value((minja::Value *)v17);
v6 += 96;
}
}
else
{
if ( *(_BYTE *)(a1 + 64) != 3 )
{
v13 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v14, a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v17, (long long)"Value is not iterable: ", (long long)v14);
std::runtime_error::runtime_error(v13, v17);
__cxa_throw(
v13,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v14,
a1 + 64);
v8 = v14[0];
v9 = v14[1];
for ( i = 0LL; v9 != i; ++i )
{
v11 = (unsigned int)*(char *)(v8 + i);
v15[0] = &v16;
std::string::_M_construct(v15, 1LL, v11);
minja::Value::Value(v17);
std::string::~string(v15);
std::function<void ()(minja::Value &)>::operator()(a2, v17);
minja::Value::~Value((minja::Value *)v17);
}
std::string::~string(v14);
}
}
}
|
for_each:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV RBX,RSI
MOV R14,RDI
CALL 0x0014e678
TEST AL,AL
JNZ 0x0016049e
MOV RAX,qword ptr [R14 + 0x10]
TEST RAX,RAX
JZ 0x001603c2
MOV R14,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
LAB_001603a8:
CMP R14,R15
JZ 0x0016048c
MOV RDI,RBX
MOV RSI,R14
CALL 0x001605dc
ADD R14,0x50
JMP 0x001603a8
LAB_001603c2:
MOV RAX,qword ptr [R14 + 0x20]
TEST RAX,RAX
JZ 0x00160404
MOV R14,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
LEA R15,[RSP + 0x48]
LAB_001603d7:
CMP R14,R12
JZ 0x0016048c
MOV RDI,R15
MOV RSI,R14
CALL 0x0015a298
LAB_001603eb:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001605dc
LAB_001603f6:
MOV RDI,R15
CALL 0x0014da04
ADD R14,0x60
JMP 0x001603d7
LAB_00160404:
CMP byte ptr [R14 + 0x40],0x3
JNZ 0x001604ce
ADD R14,0x40
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV RSI,R14
CALL 0x0014f438
MOV R13,qword ptr [R15]
MOV RBP,qword ptr [R15 + 0x8]
XOR R15D,R15D
LEA R14,[RSP + 0x28]
LEA R12,[RSP + 0x48]
LAB_00160437:
CMP RBP,R15
JZ 0x00160482
MOVSX EDX,byte ptr [R13 + R15*0x1]
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
LAB_0016044c:
MOV RDI,R14
PUSH 0x1
POP RSI
CALL 0x00122900
LAB_00160457:
MOV RDI,R12
MOV RSI,R14
CALL 0x00151596
MOV RDI,R14
CALL 0x00122f98
LAB_0016046a:
MOV RDI,RBX
MOV RSI,R12
CALL 0x001605dc
LAB_00160475:
MOV RDI,R12
CALL 0x0014da04
INC R15
JMP 0x00160437
LAB_00160482:
LEA RDI,[RSP + 0x8]
CALL 0x00122f98
LAB_0016048c:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016049e:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV RBX,RAX
LAB_001604a9:
LEA RSI,[0x19df2f]
MOV RDI,RAX
CALL 0x001222b0
LAB_001604b8:
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,RBX
CALL 0x00122d40
LAB_001604ce:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV RBX,RAX
LAB_001604d9:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0014dcc6
LAB_001604eb:
LEA RSI,[0x19f9f1]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
CALL 0x0013a58f
MOV BPL,0x1
LAB_00160504:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00122c80
XOR EBP,EBP
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,RBX
CALL 0x00122d40
|
/* minja::Value::for_each(std::function<void (minja::Value&)> const&) const */
void __thiscall minja::Value::for_each(Value *this,function *param_1)
{
int8 *puVar1;
Value *pVVar2;
basic_json *pbVar3;
char cVar4;
runtime_error *prVar5;
Value *pVVar6;
basic_json *pbVar7;
long lVar8;
string local_c0 [8];
long local_b8;
int1 *local_a0 [2];
int1 local_90 [16];
Value local_80 [80];
cVar4 = is_null(this);
if (cVar4 != '\0') {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001604a9 to 001604b7 has its CatchHandler @ 00160551 */
std::runtime_error::runtime_error(prVar5,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
puVar1 = *(int8 **)(this + 0x10);
if (puVar1 == (int8 *)0x0) {
puVar1 = *(int8 **)(this + 0x20);
if (puVar1 == (int8 *)0x0) {
if (this[0x40] != (Value)0x3) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001604d9 to 001604ea has its CatchHandler @ 0016054f */
dump_abi_cxx11_((int)local_c0,SUB81(this,0));
/* try { // try from 001604eb to 00160500 has its CatchHandler @ 00160538 */
std::operator+((char *)local_80,(string *)"Value is not iterable: ");
/* try { // try from 00160504 to 00160528 has its CatchHandler @ 00160529 */
std::runtime_error::runtime_error(prVar5,(string *)local_80);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_c0,this + 0x40);
for (lVar8 = 0; local_b8 != lVar8; lVar8 = lVar8 + 1) {
local_a0[0] = local_90;
/* try { // try from 0016044c to 00160456 has its CatchHandler @ 0016055e */
std::__cxx11::string::_M_construct((ulong)local_a0,'\x01');
/* try { // try from 00160457 to 00160461 has its CatchHandler @ 00160563 */
Value(local_80,(string *)local_a0);
std::__cxx11::string::~string((string *)local_a0);
/* try { // try from 0016046a to 00160474 has its CatchHandler @ 00160572 */
std::function<void(minja::Value&)>::operator()
((function<void(minja::Value&)> *)param_1,local_80);
~Value(local_80);
}
std::__cxx11::string::~string(local_c0);
}
else {
pbVar3 = (basic_json *)puVar1[1];
for (pbVar7 = (basic_json *)*puVar1; pbVar7 != pbVar3; pbVar7 = pbVar7 + 0x60) {
Value(local_80,pbVar7);
/* try { // try from 001603eb to 001603f5 has its CatchHandler @ 0016058b */
std::function<void(minja::Value&)>::operator()
((function<void(minja::Value&)> *)param_1,local_80);
~Value(local_80);
}
}
}
else {
pVVar2 = (Value *)puVar1[1];
for (pVVar6 = (Value *)*puVar1; pVVar6 != pVVar2; pVVar6 = pVVar6 + 0x50) {
std::function<void(minja::Value&)>::operator()
((function<void(minja::Value&)> *)param_1,pVVar6);
}
}
return;
}
|
|
12,267
|
rw_pr_wrlock
|
eloqsql/mysys/thr_rwlock.c
|
int rw_pr_wrlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
if (rwlock->active_readers != 0)
{
/* There are active readers. We have to wait until they are gone. */
rwlock->writers_waiting_readers++;
while (rwlock->active_readers != 0)
pthread_cond_wait(&rwlock->no_active_readers, &rwlock->lock);
rwlock->writers_waiting_readers--;
}
/*
We own 'lock' mutex so there is no active writers.
Also there are no active readers.
This means that we can grant wr-lock.
Not releasing 'lock' mutex until unlock will block
both requests for rd and wr-locks.
Set 'active_writer' flag to simplify unlock.
Thanks to the fact wr-lock/unlock in the absence of
contention from readers is essentially mutex lock/unlock
with a few simple checks make this rwlock implementation
wr-lock optimized.
*/
rwlock->active_writer= TRUE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= pthread_self();
#endif
return 0;
}
|
O0
|
c
|
rw_pr_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x254f0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0x30ab6
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x5c(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0x30aa9
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
callq 0x25590
jmp 0x30a8c
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x5c(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x60(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
rw_pr_wrlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
cmp dword ptr [rax+58h], 0
jz short loc_30AB6
mov rax, [rbp+var_8]
mov ecx, [rax+5Ch]
add ecx, 1
mov [rax+5Ch], ecx
loc_30A8C:
mov rax, [rbp+var_8]
cmp dword ptr [rax+58h], 0
jz short loc_30AA9
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
mov rsi, [rbp+var_8]
call _pthread_cond_wait
jmp short loc_30A8C
loc_30AA9:
mov rax, [rbp+var_8]
mov ecx, [rax+5Ch]
add ecx, 0FFFFFFFFh
mov [rax+5Ch], ecx
loc_30AB6:
mov rax, [rbp+var_8]
mov byte ptr [rax+60h], 1
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long rw_pr_wrlock(long long a1)
{
pthread_mutex_lock(a1);
if ( *(_DWORD *)(a1 + 88) )
{
++*(_DWORD *)(a1 + 92);
while ( *(_DWORD *)(a1 + 88) )
pthread_cond_wait(a1 + 40, a1);
--*(_DWORD *)(a1 + 92);
}
*(_BYTE *)(a1 + 96) = 1;
return 0LL;
}
|
rw_pr_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001254f0
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x58],0x0
JZ 0x00130ab6
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x5c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x5c],ECX
LAB_00130a8c:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x58],0x0
JZ 0x00130aa9
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00125590
JMP 0x00130a8c
LAB_00130aa9:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x5c]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x5c],ECX
LAB_00130ab6:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x60],0x1
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_wrlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
if (*(int *)((long)param_1 + 0x58) != 0) {
*(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + 1;
while (*(int *)((long)param_1 + 0x58) != 0) {
pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1);
}
*(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + -1;
}
*(int1 *)((long)param_1 + 0x60) = 1;
return 0;
}
|
|
12,268
|
dirname_length
|
eloqsql/mysys/mf_dirname.c
|
size_t dirname_length(const char *name)
{
register char *pos, *gpos;
#ifdef BASKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
#ifdef FN_DEVCHAR
if ((pos=(char*)strrchr(name,FN_DEVCHAR)) == 0)
#endif
pos=(char*) name-1;
gpos= pos++;
for ( ; *pos ; pos++) /* Find last FN_LIBCHAR */
{
#ifdef BASKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, pos, pos + 3)))
{
pos+= l - 1;
continue;
}
#endif
if (*pos == FN_LIBCHAR || *pos == '/')
gpos=pos;
}
return (size_t) (gpos+1-(char*) name);
}
|
O0
|
c
|
dirname_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2d660
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x2d648
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2d650
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2d652
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2d627
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
dirname_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov [rbp+var_18], rax
loc_2D627:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_2D660
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jz short loc_2D648
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2D650
loc_2D648:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
loc_2D650:
jmp short $+2
loc_2D652:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_2D627
loc_2D660:
mov rax, [rbp+var_18]
add rax, 1
mov rcx, [rbp+var_8]
sub rax, rcx
pop rbp
retn
|
long long dirname_length(_BYTE *a1)
{
_BYTE *v2; // [rsp+0h] [rbp-18h]
_BYTE *v3; // [rsp+8h] [rbp-10h]
v3 = a1;
v2 = a1 - 1;
while ( *v3 )
{
if ( *v3 == 47 )
v2 = v3;
++v3;
}
return v2 + 1 - a1;
}
|
dirname_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_0012d627:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0012d660
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JZ 0x0012d648
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012d650
LAB_0012d648:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
LAB_0012d650:
JMP 0x0012d652
LAB_0012d652:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0012d627
LAB_0012d660:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
POP RBP
RET
|
char * dirname_length(char *param_1)
{
char *local_20;
char *local_18;
local_20 = param_1 + -1;
for (local_18 = param_1; *local_18 != '\0'; local_18 = local_18 + 1) {
if ((*local_18 == '/') || (*local_18 == '/')) {
local_20 = local_18;
}
}
return local_20 + (1 - (long)param_1);
}
|
|
12,269
|
maria_indexes_are_disabled
|
eloqsql/storage/maria/ma_open.c
|
int maria_indexes_are_disabled(MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
/*
No keys or all are enabled. keys is the number of keys. Left shifted
gives us only one bit set. When decreased by one, gives us all all bits
up to this one set and it gets unset.
*/
if (!share->base.keys ||
(maria_is_all_keys_active(share->state.key_map, share->base.keys)))
return 0;
/* All are disabled */
if (maria_is_any_key_active(share->state.key_map))
return 1;
/*
We have keys. Some enabled, some disabled.
Don't check for any non-unique disabled but return directly 2
*/
return 2;
}
|
O3
|
c
|
maria_indexes_are_disabled:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movl 0x3e8(%rdx), %ecx
xorl %eax, %eax
testq %rcx, %rcx
je 0x3b2cd
movq 0x140(%rdx), %rdx
movq $-0x1, %rsi
movq $-0x1, %rdi
shlq %cl, %rdi
cmpl $0x40, %ecx
notq %rdi
cmovaeq %rsi, %rdi
cmpq %rdi, %rdx
je 0x3b2cd
xorl %eax, %eax
cmpq $0x1, %rdx
adcl $0x1, %eax
popq %rbp
retq
nop
|
maria_indexes_are_disabled:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov ecx, [rdx+3E8h]
xor eax, eax
test rcx, rcx
jz short loc_3B2CD
mov rdx, [rdx+140h]
mov rsi, 0FFFFFFFFFFFFFFFFh
mov rdi, 0FFFFFFFFFFFFFFFFh
shl rdi, cl
cmp ecx, 40h ; '@'
not rdi
cmovnb rdi, rsi
cmp rdx, rdi
jz short loc_3B2CD
xor eax, eax
cmp rdx, 1
adc eax, 1
loc_3B2CD:
pop rbp
retn
|
long long maria_indexes_are_disabled(long long a1)
{
unsigned int v1; // ecx
long long result; // rax
long long v3; // rdx
long long v4; // rdi
v1 = *(_DWORD *)(*(_QWORD *)a1 + 1000LL);
result = 0LL;
if ( v1 )
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 320LL);
v4 = ~(-1LL << v1);
if ( v1 >= 0x40 )
v4 = -1LL;
if ( v3 != v4 )
return (unsigned int)(v3 == 0) + 1;
}
return result;
}
|
maria_indexes_are_disabled:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV ECX,dword ptr [RDX + 0x3e8]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x0013b2cd
MOV RDX,qword ptr [RDX + 0x140]
MOV RSI,-0x1
MOV RDI,-0x1
SHL RDI,CL
CMP ECX,0x40
NOT RDI
CMOVNC RDI,RSI
CMP RDX,RDI
JZ 0x0013b2cd
XOR EAX,EAX
CMP RDX,0x1
ADC EAX,0x1
LAB_0013b2cd:
POP RBP
RET
|
char maria_indexes_are_disabled(long *param_1)
{
uint uVar1;
ulong uVar2;
char cVar3;
ulong uVar4;
uVar1 = *(uint *)(*param_1 + 1000);
cVar3 = '\0';
if (uVar1 != 0) {
uVar2 = *(ulong *)(*param_1 + 0x140);
uVar4 = ~(-1L << ((byte)uVar1 & 0x3f));
if (0x3f < uVar1) {
uVar4 = 0xffffffffffffffff;
}
if (uVar2 != uVar4) {
cVar3 = (uVar2 == 0) + '\x01';
}
}
return cVar3;
}
|
|
12,270
|
yarrpudp_transmit
|
xtate/src/scan-modules/yarrp-udp-scan.c
|
static bool yarrpudp_transmit(uint64_t entropy, ScanTarget *target,
unsigned char *px, size_t *len) {
if (target->target.ip_proto != IP_PROTO_Other)
return false;
unsigned ttl = target->target.port_them;
unsigned port_them = yarrpudp_conf.port_them_offset + ttl;
unsigned port_me = yarrpudp_conf.fixed_port_me_set
? yarrpudp_conf.port_me
: yarrpudp_conf.port_me_offset - ttl;
*len = udp_create_packet(target->target.ip_them, port_them,
target->target.ip_me, port_me, ttl, NULL, 0, px,
PKT_BUF_SIZE);
/*doesn't need timeout*/
return false;
}
|
O3
|
c
|
yarrpudp_transmit:
cmpl $0xff, (%rsi)
jne 0x3c1d3
pushq %rbx
subq $0x40, %rsp
movq %rcx, %rbx
movq %rdx, %r9
movl 0x38(%rsi), %edx
movl 0x167dfc(%rip), %edi # 0x1a3f74
addl %edx, %edi
testb $0x1, 0x167df7(%rip) # 0x1a3f78
je 0x3c18b
movl 0x167de3(%rip), %eax # 0x1a3f6c
jmp 0x3c193
movl 0x167ddf(%rip), %eax # 0x1a3f70
subl %edx, %eax
movq 0x30(%rsi), %rcx
movq %rcx, 0x28(%rsp)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x18(%rsi), %rcx
movq %rcx, 0x10(%rsp)
movups 0x8(%rsi), %xmm0
movups %xmm0, (%rsp)
movq $0x800, 0x30(%rsp) # imm = 0x800
movl %eax, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4cf24
movq %rax, (%rbx)
addq $0x40, %rsp
popq %rbx
xorl %eax, %eax
retq
|
yarrpudp_transmit:
cmp dword ptr [rsi], 0FFh
jnz short loc_3C1D3
push rbx
sub rsp, 40h
mov rbx, rcx
mov r9, rdx
mov edx, [rsi+38h]
mov edi, cs:yarrpudp_conf_2
add edi, edx
test cs:yarrpudp_conf_3, 1
jz short loc_3C18B
mov eax, cs:yarrpudp_conf_0
jmp short loc_3C193
loc_3C18B:
mov eax, cs:yarrpudp_conf_1
sub eax, edx
loc_3C193:
mov rcx, [rsi+30h]
mov [rsp+48h+var_20], rcx
movups xmm0, xmmword ptr [rsi+20h]
movups [rsp+48h+var_30], xmm0
mov rcx, [rsi+18h]
mov [rsp+48h+var_38], rcx
movups xmm0, xmmword ptr [rsi+8]
movups [rsp+48h+var_48], xmm0
mov [rsp+48h+var_18], 800h
mov esi, eax
xor ecx, ecx
xor r8d, r8d
call udp_create_packet
mov [rbx], rax
add rsp, 40h
pop rbx
loc_3C1D3:
xor eax, eax
retn
|
long long yarrpudp_transmit(long long a1, long long a2, int a3, _QWORD *a4)
{
int v5; // edx
int v6; // eax
if ( *(_DWORD *)a2 == 255 )
{
v5 = *(_DWORD *)(a2 + 56);
if ( (yarrpudp_conf_3 & 1) != 0 )
v6 = yarrpudp_conf_0;
else
v6 = yarrpudp_conf_1 - v5;
*a4 = udp_create_packet(
v5 + yarrpudp_conf_2,
v6,
v5,
0,
0,
a3,
*(_OWORD *)(a2 + 8),
*(_QWORD *)(a2 + 24),
*(_OWORD *)(a2 + 32),
*(_QWORD *)(a2 + 48),
2048LL);
}
return 0LL;
}
|
yarrpudp_transmit:
CMP dword ptr [RSI],0xff
JNZ 0x0013c1d3
PUSH RBX
SUB RSP,0x40
MOV RBX,RCX
MOV R9,RDX
MOV EDX,dword ptr [RSI + 0x38]
MOV EDI,dword ptr [0x002a3f74]
ADD EDI,EDX
TEST byte ptr [0x002a3f78],0x1
JZ 0x0013c18b
MOV EAX,dword ptr [0x002a3f6c]
JMP 0x0013c193
LAB_0013c18b:
MOV EAX,dword ptr [0x002a3f70]
SUB EAX,EDX
LAB_0013c193:
MOV RCX,qword ptr [RSI + 0x30]
MOV qword ptr [RSP + 0x28],RCX
MOVUPS XMM0,xmmword ptr [RSI + 0x20]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV RCX,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RSI + 0x8]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x30],0x800
MOV ESI,EAX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0014cf24
MOV qword ptr [RBX],RAX
ADD RSP,0x40
POP RBX
LAB_0013c1d3:
XOR EAX,EAX
RET
|
int8 yarrpudp_transmit(int8 param_1,int *param_2,int8 param_3,int8 *param_4)
{
int iVar1;
int iVar2;
int8 uVar3;
if (*param_2 == 0xff) {
iVar1 = param_2[0xe];
iVar2 = yarrpudp_conf_0;
if ((yarrpudp_conf_3 & 1) == 0) {
iVar2 = yarrpudp_conf_1 - iVar1;
}
uVar3 = udp_create_packet(yarrpudp_conf_2 + iVar1,iVar2,iVar1,0,0,param_3,param_2[2],param_2[4],
*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8),
*(int8 *)(param_2 + 10),*(int8 *)(param_2 + 0xc),0x800);
*param_4 = uVar3;
}
return 0;
}
|
|
12,271
|
YogaTest_aspect_ratio_width_as_flex_basis_Test::YogaTest_aspect_ratio_width_as_flex_basis_Test()
|
yoga-mod/tests/YGAspectRatioTest.cpp
|
TEST(YogaTest, aspect_ratio_width_as_flex_basis) {
YGNodeRef root = YGNodeNew();
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
YGNodeStyleSetWidth(root, 200);
YGNodeStyleSetHeight(root, 200);
YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetWidth(root_child0, 50);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetAspectRatio(root_child0, 1);
YGNodeInsertChild(root, root_child0, 0);
YGNodeRef root_child1 = YGNodeNew();
YGNodeStyleSetWidth(root_child1, 100);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetAspectRatio(root_child1, 1);
YGNodeInsertChild(root, root_child1, 1);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_EQ(75, YGNodeLayoutGetWidth(root_child0));
ASSERT_EQ(75, YGNodeLayoutGetHeight(root_child0));
ASSERT_EQ(0, YGNodeLayoutGetLeft(root_child1));
ASSERT_EQ(75, YGNodeLayoutGetTop(root_child1));
ASSERT_EQ(125, YGNodeLayoutGetWidth(root_child1));
ASSERT_EQ(125, YGNodeLayoutGetHeight(root_child1));
YGNodeFreeRecursive(root);
}
|
O0
|
cpp
|
YogaTest_aspect_ratio_width_as_flex_basis_Test::YogaTest_aspect_ratio_width_as_flex_basis_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x7047d0
movq -0x10(%rbp), %rax
leaq 0x77cfec(%rip), %rcx # 0x85d5b0
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN46YogaTest_aspect_ratio_width_as_flex_basis_TestC2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN7testing4TestC2Ev; testing::Test::Test(void)
mov rax, [rbp+var_10]
lea rcx, _ZTV46YogaTest_aspect_ratio_width_as_flex_basis_Test; `vtable for'YogaTest_aspect_ratio_width_as_flex_basis_Test
add rcx, 10h
mov [rax], rcx
add rsp, 10h
pop rbp
retn
|
void YogaTest_aspect_ratio_width_as_flex_basis_Test::YogaTest_aspect_ratio_width_as_flex_basis_Test(
YogaTest_aspect_ratio_width_as_flex_basis_Test *this)
{
testing::Test::Test(this);
*(_QWORD *)this = (char *)&`vtable for'YogaTest_aspect_ratio_width_as_flex_basis_Test + 16;
}
|
YogaTest_aspect_ratio_width_as_flex_basis_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x008047d0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x95d5b0]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x10
POP RBP
RET
|
/* YogaTest_aspect_ratio_width_as_flex_basis_Test::YogaTest_aspect_ratio_width_as_flex_basis_Test()
*/
void __thiscall
YogaTest_aspect_ratio_width_as_flex_basis_Test::YogaTest_aspect_ratio_width_as_flex_basis_Test
(YogaTest_aspect_ratio_width_as_flex_basis_Test *this)
{
testing::Test::Test((Test *)this);
*(int ***)this = &PTR__YogaTest_aspect_ratio_width_as_flex_basis_Test_0095d5c0;
return;
}
|
|
12,272
|
ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*)
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp
|
static bool ggml_backend_cpu_device_supports_op(ggml_backend_dev_t dev, const struct ggml_tensor * op) {
const struct ggml_tensor * src0 = op->src[0];
const struct ggml_tensor * src1 = op->src[1];
if (op->op == GGML_OP_NONE || op->op == GGML_OP_RESHAPE || op->op == GGML_OP_VIEW || op->op == GGML_OP_PERMUTE || op->op == GGML_OP_TRANSPOSE) {
return true;
}
// extra_buffer_op?
for (auto extra : ggml_backend_cpu_get_extra_buffers_type()) {
if (extra) {
auto buf_extra = (ggml::cpu::extra_buffer_type*) extra->context;
if (buf_extra && buf_extra->supports_op(dev, op)) {
return true;
}
}
}
// the other case need host buffer.
for (int i = 0; i < GGML_MAX_SRC; i++) {
if (op->src[i] && op->src[i]->buffer && !ggml_backend_buft_is_host(op->src[i]->buffer->buft)) {
return false;
}
}
switch (op->op) {
case GGML_OP_CPY:
return
op->type != GGML_TYPE_IQ3_XXS &&
op->type != GGML_TYPE_IQ3_S &&
op->type != GGML_TYPE_IQ2_XXS &&
op->type != GGML_TYPE_IQ2_XS &&
op->type != GGML_TYPE_IQ2_S &&
op->type != GGML_TYPE_IQ1_S &&
op->type != GGML_TYPE_IQ1_M; // missing type_traits.from_float
case GGML_OP_MUL_MAT:
return src1->type == GGML_TYPE_F32 || src1->type == ggml_get_type_traits_cpu(src0->type)->vec_dot_type;
case GGML_OP_ROPE_BACK:
return op->src[2] == NULL && (op->op_params[2] & 4) == 0;
case GGML_OP_IM2COL_BACK:
return src0->type == GGML_TYPE_F32 && src1->type == GGML_TYPE_F32;
case GGML_OP_OUT_PROD:
return (src0->type == GGML_TYPE_F32 || ggml_is_quantized(src0->type)) && src1->type == GGML_TYPE_F32;
default:
return true;
}
}
|
O2
|
cpp
|
ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rsi), %r12
movq 0xa0(%rsi), %r15
movl 0x50(%rsi), %ecx
cmpq $0x25, %rcx
jae 0x260cd
movb $0x1, %al
movabsq $0x1e00000001, %rdx # imm = 0x1E00000001
btq %rcx, %rdx
jb 0x261ba
callq 0x8160
movq 0x64767(%rip), %r13 # 0x8a840
movq 0x64768(%rip), %rbp # 0x8a848
cmpq %rbp, %r13
je 0x2610d
movq (%r13), %rax
testq %rax, %rax
je 0x26107
movq 0x38(%rax), %rdi
testq %rdi, %rdi
je 0x26107
movq (%rdi), %rax
movq %r14, %rsi
movq %rbx, %rdx
callq *0x10(%rax)
testb %al, %al
jne 0x2616c
addq $0x8, %r13
jmp 0x260e0
pushq $0x13
popq %r14
cmpq $0x1d, %r14
je 0x2613b
movq (%rbx,%r14,8), %rax
testq %rax, %rax
je 0x26136
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x26136
movq 0x48(%rax), %rdi
callq 0x8770
testb %al, %al
je 0x2619a
incq %r14
jmp 0x26111
movl 0x50(%rbx), %ecx
movb $0x1, %al
cmpl $0x1a, %ecx
je 0x261a4
cmpl $0x1c, %ecx
je 0x26170
cmpl $0x31, %ecx
je 0x26193
cmpl $0x2d, %ecx
je 0x26183
cmpl $0x1f, %ecx
jne 0x261ba
movl (%rbx), %ecx
cmpl $0x1e, %ecx
jae 0x261ba
movl $0x1f90ffff, %eax # imm = 0x1F90FFFF
shrxl %ecx, %eax, %eax
jmp 0x261ba
movb $0x1, %al
jmp 0x261ba
movl (%r12), %edi
testl %edi, %edi
je 0x2619e
callq 0x8420
testb %al, %al
je 0x2619a
jmp 0x2619e
cmpq $0x0, 0xa8(%rbx)
jne 0x2619a
testb $0x4, 0x5c(%rbx)
jmp 0x261b7
cmpl $0x0, (%r12)
je 0x2619e
xorl %eax, %eax
jmp 0x261ba
cmpl $0x0, (%r15)
jmp 0x261b7
movl (%r15), %ebx
testl %ebx, %ebx
je 0x261ba
movl (%r12), %edi
callq 0x8100
cmpl 0x10(%rax), %ebx
sete %al
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZL35ggml_backend_cpu_device_supports_opP19ggml_backend_devicePK11ggml_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r12, [rsi+98h]
mov r15, [rsi+0A0h]
mov ecx, [rsi+50h]
cmp rcx, 25h ; '%'
jnb short loc_260CD
mov al, 1
mov rdx, 1E00000001h
bt rdx, rcx
jb loc_261BA
loc_260CD:
call __Z39ggml_backend_cpu_get_extra_buffers_typev; ggml_backend_cpu_get_extra_buffers_type(void)
mov r13, qword ptr cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts
mov rbp, qword ptr cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts+8; ggml_backend_cpu_get_extra_buffers_type(void)::bufts
loc_260E0:
cmp r13, rbp
jz short loc_2610D
mov rax, [r13+0]
test rax, rax
jz short loc_26107
mov rdi, [rax+38h]
test rdi, rdi
jz short loc_26107
mov rax, [rdi]
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+10h]
test al, al
jnz short loc_2616C
loc_26107:
add r13, 8
jmp short loc_260E0
loc_2610D:
push 13h
pop r14
loc_26111:
cmp r14, 1Dh
jz short loc_2613B
mov rax, [rbx+r14*8]
test rax, rax
jz short loc_26136
mov rax, [rax+8]
test rax, rax
jz short loc_26136
mov rdi, [rax+48h]
call _ggml_backend_buft_is_host
test al, al
jz short loc_2619A
loc_26136:
inc r14
jmp short loc_26111
loc_2613B:
mov ecx, [rbx+50h]
mov al, 1
cmp ecx, 1Ah
jz short loc_261A4
cmp ecx, 1Ch
jz short loc_26170
cmp ecx, 31h ; '1'
jz short loc_26193
cmp ecx, 2Dh ; '-'
jz short loc_26183
cmp ecx, 1Fh
jnz short loc_261BA
mov ecx, [rbx]
cmp ecx, 1Eh
jnb short loc_261BA
mov eax, 1F90FFFFh
shrx eax, eax, ecx
jmp short loc_261BA
loc_2616C:
mov al, 1
jmp short loc_261BA
loc_26170:
mov edi, [r12]
test edi, edi
jz short loc_2619E
call _ggml_is_quantized
test al, al
jz short loc_2619A
jmp short loc_2619E
loc_26183:
cmp qword ptr [rbx+0A8h], 0
jnz short loc_2619A
test byte ptr [rbx+5Ch], 4
jmp short loc_261B7
loc_26193:
cmp dword ptr [r12], 0
jz short loc_2619E
loc_2619A:
xor eax, eax
jmp short loc_261BA
loc_2619E:
cmp dword ptr [r15], 0
jmp short loc_261B7
loc_261A4:
mov ebx, [r15]
test ebx, ebx
jz short loc_261BA
mov edi, [r12]
call _ggml_get_type_traits_cpu
cmp ebx, [rax+10h]
loc_261B7:
setz al
loc_261BA:
and al, 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char ggml_backend_cpu_device_supports_op(long long a1, long long a2)
{
unsigned int *v3; // r12
int *v4; // r15
unsigned long long v5; // rcx
unsigned int v6; // eax
long long v7; // rdx
long long v8; // rbp
long long i; // r13
long long v10; // rdi
long long j; // r14
long long v12; // rax
long long v13; // rax
int v14; // ecx
long long v15; // rdi
bool v16; // zf
int v17; // ebx
v3 = *(unsigned int **)(a2 + 152);
v4 = *(int **)(a2 + 160);
v5 = *(unsigned int *)(a2 + 80);
if ( v5 < 0x25 )
{
LOBYTE(v6) = 1;
v7 = 0x1E00000001LL;
if ( _bittest64(&v7, v5) )
return v6 & 1;
}
ggml_backend_cpu_get_extra_buffers_type();
v8 = *((_QWORD *)&ggml_backend_cpu_get_extra_buffers_type(void)::bufts + 1);
for ( i = ggml_backend_cpu_get_extra_buffers_type(void)::bufts; i != v8; i += 8LL )
{
if ( *(_QWORD *)i )
{
v10 = *(_QWORD *)(*(_QWORD *)i + 56LL);
if ( v10 )
{
if ( (*(unsigned __int8 ( **)(long long, long long, long long))(*(_QWORD *)v10 + 16LL))(v10, a1, a2) )
{
LOBYTE(v6) = 1;
return v6 & 1;
}
}
}
}
for ( j = 19LL; j != 29; ++j )
{
v12 = *(_QWORD *)(a2 + 8 * j);
if ( v12 )
{
v13 = *(_QWORD *)(v12 + 8);
if ( v13 )
{
if ( !(unsigned __int8)ggml_backend_buft_is_host(*(_QWORD *)(v13 + 72)) )
goto LABEL_29;
}
}
}
v14 = *(_DWORD *)(a2 + 80);
LOBYTE(v6) = 1;
switch ( v14 )
{
case 26:
if ( !*v4 )
return v6 & 1;
v17 = *v4;
v16 = v17 == *((_DWORD *)ggml_get_type_traits_cpu(*v3) + 4);
LABEL_33:
LOBYTE(v6) = v16;
return v6 & 1;
case 28:
v15 = *v3;
if ( (_DWORD)v15 && !(unsigned __int8)ggml_is_quantized(v15) )
goto LABEL_29;
goto LABEL_30;
case 49:
if ( *v3 )
goto LABEL_29;
LABEL_30:
v16 = *v4 == 0;
goto LABEL_33;
case 45:
if ( !*(_QWORD *)(a2 + 168) )
{
v16 = (*(_BYTE *)(a2 + 92) & 4) == 0;
goto LABEL_33;
}
LABEL_29:
LOBYTE(v6) = 0;
return v6 & 1;
}
if ( v14 == 31 && *(_DWORD *)a2 < 0x1Eu )
v6 = 0x1F90FFFFu >> *(_DWORD *)a2;
return v6 & 1;
}
|
ggml_backend_cpu_device_supports_op:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R12,qword ptr [RSI + 0x98]
MOV R15,qword ptr [RSI + 0xa0]
MOV ECX,dword ptr [RSI + 0x50]
CMP RCX,0x25
JNC 0x001260cd
MOV AL,0x1
MOV RDX,0x1e00000001
BT RDX,RCX
JC 0x001261ba
LAB_001260cd:
CALL 0x00108160
MOV R13,qword ptr [0x0018a840]
MOV RBP,qword ptr [0x0018a848]
LAB_001260e0:
CMP R13,RBP
JZ 0x0012610d
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x00126107
MOV RDI,qword ptr [RAX + 0x38]
TEST RDI,RDI
JZ 0x00126107
MOV RAX,qword ptr [RDI]
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x10]
TEST AL,AL
JNZ 0x0012616c
LAB_00126107:
ADD R13,0x8
JMP 0x001260e0
LAB_0012610d:
PUSH 0x13
POP R14
LAB_00126111:
CMP R14,0x1d
JZ 0x0012613b
MOV RAX,qword ptr [RBX + R14*0x8]
TEST RAX,RAX
JZ 0x00126136
MOV RAX,qword ptr [RAX + 0x8]
TEST RAX,RAX
JZ 0x00126136
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x00108770
TEST AL,AL
JZ 0x0012619a
LAB_00126136:
INC R14
JMP 0x00126111
LAB_0012613b:
MOV ECX,dword ptr [RBX + 0x50]
MOV AL,0x1
CMP ECX,0x1a
JZ 0x001261a4
CMP ECX,0x1c
JZ 0x00126170
CMP ECX,0x31
JZ 0x00126193
CMP ECX,0x2d
JZ 0x00126183
CMP ECX,0x1f
JNZ 0x001261ba
MOV ECX,dword ptr [RBX]
CMP ECX,0x1e
JNC 0x001261ba
MOV EAX,0x1f90ffff
SHRX EAX,EAX,ECX
JMP 0x001261ba
LAB_0012616c:
MOV AL,0x1
JMP 0x001261ba
LAB_00126170:
MOV EDI,dword ptr [R12]
TEST EDI,EDI
JZ 0x0012619e
CALL 0x00108420
TEST AL,AL
JZ 0x0012619a
JMP 0x0012619e
LAB_00126183:
CMP qword ptr [RBX + 0xa8],0x0
JNZ 0x0012619a
TEST byte ptr [RBX + 0x5c],0x4
JMP 0x001261b7
LAB_00126193:
CMP dword ptr [R12],0x0
JZ 0x0012619e
LAB_0012619a:
XOR EAX,EAX
JMP 0x001261ba
LAB_0012619e:
CMP dword ptr [R15],0x0
JMP 0x001261b7
LAB_001261a4:
MOV EBX,dword ptr [R15]
TEST EBX,EBX
JZ 0x001261ba
MOV EDI,dword ptr [R12]
CALL 0x00108100
CMP EBX,dword ptr [RAX + 0x10]
LAB_001261b7:
SETZ AL
LAB_001261ba:
AND AL,0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*) */
ulong ggml_backend_cpu_device_supports_op(ggml_backend_device *param_1,ggml_tensor *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
long *plVar4;
long *plVar5;
int8 in_RAX;
long lVar6;
ulong uVar7;
long *plVar8;
long lVar9;
bool bVar10;
piVar2 = *(int **)(param_2 + 0x98);
piVar3 = *(int **)(param_2 + 0xa0);
if (((ulong)*(uint *)(param_2 + 0x50) < 0x25) &&
(uVar7 = CONCAT71((int7)((ulong)in_RAX >> 8),1),
(0x1e00000001U >> ((ulong)*(uint *)(param_2 + 0x50) & 0x3f) & 1) != 0)) goto LAB_001261ba;
lVar6 = ggml_backend_cpu_get_extra_buffers_type();
plVar5 = DAT_0018a848;
for (plVar8 = ggml_backend_cpu_get_extra_buffers_type()::bufts; plVar8 != plVar5;
plVar8 = plVar8 + 1) {
lVar6 = *plVar8;
if (((lVar6 != 0) && (plVar4 = *(long **)(lVar6 + 0x38), plVar4 != (long *)0x0)) &&
(lVar6 = (**(code **)(*plVar4 + 0x10))(plVar4,param_1,param_2), (char)lVar6 != '\0')) {
uVar7 = CONCAT71((int7)((ulong)lVar6 >> 8),1);
goto LAB_001261ba;
}
}
for (lVar9 = 0x13; lVar9 != 0x1d; lVar9 = lVar9 + 1) {
lVar6 = *(long *)(param_2 + lVar9 * 8);
if (((lVar6 != 0) && (lVar6 = *(long *)(lVar6 + 8), lVar6 != 0)) &&
(lVar6 = ggml_backend_buft_is_host(*(int8 *)(lVar6 + 0x48)), (char)lVar6 == '\0'))
goto LAB_0012619a;
}
iVar1 = *(int *)(param_2 + 0x50);
uVar7 = CONCAT71((int7)((ulong)lVar6 >> 8),1);
if (iVar1 == 0x1a) {
iVar1 = *piVar3;
if (iVar1 == 0) goto LAB_001261ba;
uVar7 = ggml_get_type_traits_cpu(*piVar2);
bVar10 = iVar1 == *(int *)(uVar7 + 0x10);
LAB_001261b7:
uVar7 = CONCAT71((int7)(uVar7 >> 8),bVar10);
}
else {
if (iVar1 == 0x1c) {
if ((*piVar2 == 0) || (uVar7 = ggml_is_quantized(), (char)uVar7 != '\0')) {
LAB_0012619e:
bVar10 = *piVar3 == 0;
goto LAB_001261b7;
}
}
else if (iVar1 == 0x31) {
if (*piVar2 == 0) goto LAB_0012619e;
}
else {
if (iVar1 != 0x2d) {
if ((iVar1 == 0x1f) && (*(uint *)param_2 < 0x1e)) {
uVar7 = (ulong)(0x1f90ffff >> (*(uint *)param_2 & 0x1f));
}
goto LAB_001261ba;
}
if (*(long *)(param_2 + 0xa8) == 0) {
bVar10 = ((byte)param_2[0x5c] & 4) == 0;
goto LAB_001261b7;
}
}
LAB_0012619a:
uVar7 = 0;
}
LAB_001261ba:
return uVar7 & 0xffffffffffffff01;
}
|
|
12,273
|
dummy_fallback_auth_client
|
eloqsql/libmariadb/plugins/auth/my_auth.c
|
static int dummy_fallback_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql __attribute__((unused)))
{
char last_error[MYSQL_ERRMSG_SIZE];
unsigned int i, last_errno= ((MCPVIO_EXT *)vio)->mysql->net.last_errno;
if (last_errno)
{
strncpy(last_error, ((MCPVIO_EXT *)vio)->mysql->net.last_error,
sizeof(last_error) - 1);
last_error[sizeof(last_error) - 1]= 0;
}
/* safety-wise we only do 10 round-trips */
for (i=0; i < 10; i++)
{
uchar *pkt;
if (vio->read_packet(vio, &pkt) < 0)
break;
if (vio->write_packet(vio, 0, 0))
break;
}
if (last_errno)
{
MYSQL *mysql= ((MCPVIO_EXT *)vio)->mysql;
strncpy(mysql->net.last_error, last_error,
sizeof(mysql->net.last_error) - 1);
mysql->net.last_error[sizeof(mysql->net.last_error) - 1]= 0;
}
return CR_ERROR;
}
|
O0
|
c
|
dummy_fallback_auth_client:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x218(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x90(%rax), %eax
movl %eax, -0x228(%rbp)
cmpl $0x0, -0x228(%rbp)
je 0x7132d
leaq -0x210(%rbp), %rdi
movq -0x218(%rbp), %rax
movq 0x18(%rax), %rsi
addq $0x97, %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x38140
movb $0x0, -0x11(%rbp)
movl $0x0, -0x224(%rbp)
cmpl $0xa, -0x224(%rbp)
jae 0x71395
movq -0x218(%rbp), %rax
movq (%rax), %rax
movq -0x218(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
jge 0x71361
jmp 0x71395
movq -0x218(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x218(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
xorl %edx, %edx
callq *%rax
cmpl $0x0, %eax
je 0x71382
jmp 0x71395
jmp 0x71384
movl -0x224(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x224(%rbp)
jmp 0x71337
cmpl $0x0, -0x228(%rbp)
je 0x713dd
movq -0x218(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rdi
addq $0x97, %rdi
leaq -0x210(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x38140
movq -0x238(%rbp), %rax
movb $0x0, 0x296(%rax)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x713fa
xorl %eax, %eax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x382c0
nop
|
dummy_fallback_auth_client:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rax, [rbp+var_218]
mov rax, [rax+18h]
mov eax, [rax+90h]
mov [rbp+var_228], eax
cmp [rbp+var_228], 0
jz short loc_7132D
lea rdi, [rbp+var_210]
mov rax, [rbp+var_218]
mov rsi, [rax+18h]
add rsi, 97h
mov edx, 1FFh
call _strncpy
mov [rbp+var_11], 0
loc_7132D:
mov [rbp+var_224], 0
loc_71337:
cmp [rbp+var_224], 0Ah
jnb short loc_71395
mov rax, [rbp+var_218]
mov rax, [rax]
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_230]
call rax
cmp eax, 0
jge short loc_71361
jmp short loc_71395
loc_71361:
mov rax, [rbp+var_218]
mov rax, [rax+8]
mov rdi, [rbp+var_218]
xor ecx, ecx
mov esi, ecx
xor edx, edx
call rax
cmp eax, 0
jz short loc_71382
jmp short loc_71395
loc_71382:
jmp short $+2
loc_71384:
mov eax, [rbp+var_224]
add eax, 1
mov [rbp+var_224], eax
jmp short loc_71337
loc_71395:
cmp [rbp+var_228], 0
jz short loc_713DD
mov rax, [rbp+var_218]
mov rax, [rax+18h]
mov [rbp+var_238], rax
mov rdi, [rbp+var_238]
add rdi, 97h
lea rsi, [rbp+var_210]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_238]
mov byte ptr [rax+296h], 0
loc_713DD:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_713FA
xor eax, eax
add rsp, 240h
pop rbp
retn
loc_713FA:
call ___stack_chk_fail
|
long long dummy_fallback_auth_client(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-238h]
_BYTE v4[8]; // [rsp+10h] [rbp-230h] BYREF
int v5; // [rsp+18h] [rbp-228h]
unsigned int i; // [rsp+1Ch] [rbp-224h]
long long v7; // [rsp+20h] [rbp-220h]
long long v8; // [rsp+28h] [rbp-218h]
_BYTE v9[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v10; // [rsp+238h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
v7 = a2;
v5 = *(_DWORD *)(*(_QWORD *)(a1 + 24) + 144LL);
if ( v5 )
{
strncpy(v9, *(_QWORD *)(v8 + 24) + 151LL, 511LL);
v9[511] = 0;
}
for ( i = 0;
i < 0xA
&& (*(int ( **)(long long, _BYTE *))v8)(v8, v4) >= 0
&& !(*(unsigned int ( **)(long long, _QWORD, _QWORD))(v8 + 8))(v8, 0LL, 0LL);
++i )
{
;
}
if ( v5 )
{
v3 = *(_QWORD *)(v8 + 24);
strncpy(v3 + 151, v9, 511LL);
*(_BYTE *)(v3 + 662) = 0;
}
return 0LL;
}
|
dummy_fallback_auth_client:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RAX,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RAX + 0x90]
MOV dword ptr [RBP + -0x228],EAX
CMP dword ptr [RBP + -0x228],0x0
JZ 0x0017132d
LEA RDI,[RBP + -0x210]
MOV RAX,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RAX + 0x18]
ADD RSI,0x97
MOV EDX,0x1ff
CALL 0x00138140
MOV byte ptr [RBP + -0x11],0x0
LAB_0017132d:
MOV dword ptr [RBP + -0x224],0x0
LAB_00171337:
CMP dword ptr [RBP + -0x224],0xa
JNC 0x00171395
MOV RAX,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x230]
CALL RAX
CMP EAX,0x0
JGE 0x00171361
JMP 0x00171395
LAB_00171361:
MOV RAX,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x218]
XOR ECX,ECX
MOV ESI,ECX
XOR EDX,EDX
CALL RAX
CMP EAX,0x0
JZ 0x00171382
JMP 0x00171395
LAB_00171382:
JMP 0x00171384
LAB_00171384:
MOV EAX,dword ptr [RBP + -0x224]
ADD EAX,0x1
MOV dword ptr [RBP + -0x224],EAX
JMP 0x00171337
LAB_00171395:
CMP dword ptr [RBP + -0x228],0x0
JZ 0x001713dd
MOV RAX,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x238],RAX
MOV RDI,qword ptr [RBP + -0x238]
ADD RDI,0x97
LEA RSI,[RBP + -0x210]
MOV EDX,0x1ff
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x238]
MOV byte ptr [RAX + 0x296],0x0
LAB_001713dd:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001713fa
XOR EAX,EAX
ADD RSP,0x240
POP RBP
RET
LAB_001713fa:
CALL 0x001382c0
|
int8 dummy_fallback_auth_client(int8 *param_1,int8 param_2)
{
long lVar1;
int iVar2;
long in_FS_OFFSET;
int1 local_238 [8];
int local_230;
uint local_22c;
int8 local_228;
int8 *local_220;
char local_218 [511];
int1 local_19;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_230 = *(int *)(param_1[3] + 0x90);
local_228 = param_2;
local_220 = param_1;
if (local_230 != 0) {
strncpy(local_218,(char *)(param_1[3] + 0x97),0x1ff);
local_19 = 0;
}
local_22c = 0;
while (((local_22c < 10 && (iVar2 = (*(code *)*local_220)(local_220,local_238), -1 < iVar2)) &&
(iVar2 = (*(code *)local_220[1])(local_220,0,0), iVar2 == 0))) {
local_22c = local_22c + 1;
}
if (local_230 != 0) {
lVar1 = local_220[3];
strncpy((char *)(lVar1 + 0x97),local_218,0x1ff);
*(int1 *)(lVar1 + 0x296) = 0;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return 0;
}
|
|
12,274
|
parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512])
|
monkey531[P]llama/common/common.cpp
|
bool parse_cpu_mask(const std::string & mask, bool (&boolmask)[GGML_MAX_N_THREADS]) {
// Discard potential 0x prefix
size_t start_i = 0;
if (mask.length() >= 2 && mask.substr(0, 2) == "0x") {
start_i = 2;
}
size_t num_digits = mask.length() - start_i;
if (num_digits > 128) num_digits = 128;
size_t end_i = num_digits + start_i;
for (size_t i = start_i, n = (num_digits*4 - 1); i < end_i; i++, n-=4) {
char c = mask.at(i);
int8_t id = c;
if ((c >= '0' && c <= '9')) {
id -= '0';
} else if (c >= 'a' && c <= 'f') {
id -= 'a' - 10;
} else if (c >= 'A' && c <= 'F') {
id -= 'A' - 10;
} else {
LOG_ERR("Invalid hex character '%c' at position %d\n", c, int32_t(i));
return false;
}
boolmask[ n ] = boolmask[ n ] || ((id & 8) != 0);
boolmask[n - 1] = boolmask[n - 1] || ((id & 4) != 0);
boolmask[n - 2] = boolmask[n - 2] || ((id & 2) != 0);
boolmask[n - 3] = boolmask[n - 3] || ((id & 1) != 0);
}
return true;
}
|
O2
|
cpp
|
parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq $0x2, %rax
jb 0x57d47
leaq 0x8(%rsp), %r14
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x24970
leaq 0x61bf8(%rip), %rsi # 0xb9920
movq %r14, %rdi
callq 0x28d1d
movl %eax, %ebp
movq %r14, %rdi
callq 0x25288
movzbl %bpl, %r14d
addl %r14d, %r14d
movq 0x8(%rbx), %rax
jmp 0x57d4a
xorl %r14d, %r14d
subq %r14, %rax
movl $0x80, %ecx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
leaq (%rax,%r14), %r12
movl %eax, %eax
leaq (%r15,%rax,4), %r13
addq $-0x4, %r13
cmpq %r12, %r14
jae 0x57e1f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24ac0
movsbl (%rax), %r15d
leal -0x30(%r15), %eax
cmpb $0xa, %al
jb 0x57da4
leal -0x61(%r15), %eax
cmpb $0x5, %al
ja 0x57d95
addb $-0x57, %r15b
jmp 0x57da1
leal -0x41(%r15), %eax
cmpb $0x5, %al
ja 0x57df4
addb $-0x37, %r15b
movl %r15d, %eax
movzbl %al, %eax
movd (%r13), %xmm0
punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3]
movd %eax, %xmm1
pshufd $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0]
movdqa 0x5efca(%rip), %xmm2 # 0xb6d90
pand %xmm2, %xmm1
pcmpeqd %xmm2, %xmm1
por %xmm0, %xmm1
pand 0x5efc6(%rip), %xmm1 # 0xb6da0
packuswb %xmm1, %xmm1
packuswb %xmm1, %xmm1
movd %xmm1, (%r13)
incq %r14
addq $-0x4, %r13
jmp 0x57d67
leaq 0xada1d(%rip), %rax # 0x105818
cmpl $0x0, (%rax)
js 0x57e1f
callq 0x9a772
leaq 0x5f2ae(%rip), %rdx # 0xb70ba
pushq $0x4
popq %rsi
movq %rax, %rdi
movl %r15d, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x9a80a
cmpq %r12, %r14
setae %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_Z14parse_cpu_maskRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rsi
mov rbx, rdi
mov rax, [rdi+8]
cmp rax, 2
jb short loc_57D47
lea r14, [rsp+58h+var_50]
push 2
pop rcx
mov rdi, r14
mov rsi, rbx
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, aIncompleteUtf8+24h; "0x"
mov rdi, r14
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov ebp, eax
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
movzx r14d, bpl
add r14d, r14d
mov rax, [rbx+8]
jmp short loc_57D4A
loc_57D47:
xor r14d, r14d
loc_57D4A:
sub rax, r14
mov ecx, 80h
cmp rax, rcx
cmovnb rax, rcx
lea r12, [rax+r14]
mov eax, eax
lea r13, [r15+rax*4]
add r13, 0FFFFFFFFFFFFFFFCh
loc_57D67:
cmp r14, r12
jnb loc_57E1F
mov rdi, rbx
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm; std::string::at(ulong)
movsx r15d, byte ptr [rax]
lea eax, [r15-30h]
cmp al, 0Ah
jb short loc_57DA4
lea eax, [r15-61h]
cmp al, 5
ja short loc_57D95
add r15b, 0A9h
jmp short loc_57DA1
loc_57D95:
lea eax, [r15-41h]
cmp al, 5
ja short loc_57DF4
add r15b, 0C9h
loc_57DA1:
mov eax, r15d
loc_57DA4:
movzx eax, al
movd xmm0, dword ptr [r13+0]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
movd xmm1, eax
pshufd xmm1, xmm1, 0
movdqa xmm2, cs:xmmword_B6D90
pand xmm1, xmm2
pcmpeqd xmm1, xmm2
por xmm1, xmm0
pand xmm1, cs:xmmword_B6DA0
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd dword ptr [r13+0], xmm1
inc r14
add r13, 0FFFFFFFFFFFFFFFCh
jmp loc_57D67
loc_57DF4:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_57E1F
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aInvalidHexChar; "Invalid hex character '%c' at position "...
push 4
pop rsi
mov rdi, rax
mov ecx, r15d
mov r8d, r14d
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_57E1F:
cmp r14, r12
setnb al
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
bool parse_cpu_mask(long long a1, long long a2)
{
unsigned long long v2; // rax
bool v3; // bp
unsigned long long v4; // r14
unsigned long long v5; // rax
unsigned long long v6; // r12
unsigned int *v7; // r13
int v8; // r15d
unsigned __int8 v9; // al
unsigned __int8 v10; // r15
__m128i v11; // xmm0
__m128i v12; // xmm0
__m128i si128; // xmm2
__m128i v14; // xmm1
__m128i v15; // xmm1
int v16; // eax
int v17; // r9d
_BYTE v19[80]; // [rsp+8h] [rbp-50h] BYREF
v2 = *(_QWORD *)(a1 + 8);
if ( v2 < 2 )
{
v4 = 0LL;
}
else
{
std::string::substr(v19, a1, 0LL, 2LL);
v3 = std::operator==<char>((long long)v19);
std::string::~string(v19);
v4 = 2 * (unsigned int)v3;
v2 = *(_QWORD *)(a1 + 8);
}
v5 = v2 - v4;
if ( v5 >= 0x80 )
v5 = 128LL;
v6 = v5 + v4;
v7 = (unsigned int *)(a2 + 4LL * (unsigned int)v5 - 4);
while ( v4 < v6 )
{
v8 = *(char *)std::string::at(a1, v4);
v9 = v8 - 48;
if ( (unsigned __int8)(v8 - 48) >= 0xAu )
{
if ( (unsigned __int8)(v8 - 97) > 5u )
{
if ( (unsigned __int8)(v8 - 65) > 5u )
{
if ( common_log_verbosity_thold >= 0 )
{
v16 = common_log_main();
common_log_add(v16, 4, (unsigned int)"Invalid hex character '%c' at position %d\n", v8, v4, v17);
}
return v4 >= v6;
}
v10 = v8 - 55;
}
else
{
v10 = v8 - 87;
}
v9 = v10;
}
v11 = _mm_cvtsi32_si128(*v7);
v12 = _mm_unpacklo_epi8(v11, v11);
si128 = _mm_load_si128((const __m128i *)&xmmword_B6D90);
v14 = _mm_and_si128(
_mm_or_si128(
_mm_cmpeq_epi32(_mm_and_si128(_mm_shuffle_epi32(_mm_cvtsi32_si128(v9), 0), si128), si128),
_mm_unpacklo_epi16(v12, v12)),
(__m128i)xmmword_B6DA0);
v15 = _mm_packus_epi16(v14, v14);
*v7 = _mm_cvtsi128_si32(_mm_packus_epi16(v15, v15));
++v4;
--v7;
}
return v4 >= v6;
}
|
parse_cpu_mask:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,0x2
JC 0x00157d47
LEA R14,[RSP + 0x8]
PUSH 0x2
POP RCX
MOV RDI,R14
MOV RSI,RBX
XOR EDX,EDX
CALL 0x00124970
LEA RSI,[0x1b9920]
MOV RDI,R14
CALL 0x00128d1d
MOV EBP,EAX
MOV RDI,R14
CALL 0x00125288
MOVZX R14D,BPL
ADD R14D,R14D
MOV RAX,qword ptr [RBX + 0x8]
JMP 0x00157d4a
LAB_00157d47:
XOR R14D,R14D
LAB_00157d4a:
SUB RAX,R14
MOV ECX,0x80
CMP RAX,RCX
CMOVNC RAX,RCX
LEA R12,[RAX + R14*0x1]
MOV EAX,EAX
LEA R13,[R15 + RAX*0x4]
ADD R13,-0x4
LAB_00157d67:
CMP R14,R12
JNC 0x00157e1f
MOV RDI,RBX
MOV RSI,R14
CALL 0x00124ac0
MOVSX R15D,byte ptr [RAX]
LEA EAX,[R15 + -0x30]
CMP AL,0xa
JC 0x00157da4
LEA EAX,[R15 + -0x61]
CMP AL,0x5
JA 0x00157d95
ADD R15B,0xa9
JMP 0x00157da1
LAB_00157d95:
LEA EAX,[R15 + -0x41]
CMP AL,0x5
JA 0x00157df4
ADD R15B,0xc9
LAB_00157da1:
MOV EAX,R15D
LAB_00157da4:
MOVZX EAX,AL
MOVD XMM0,dword ptr [R13]
PUNPCKLBW XMM0,XMM0
PUNPCKLWD XMM0,XMM0
MOVD XMM1,EAX
PSHUFD XMM1,XMM1,0x0
MOVDQA XMM2,xmmword ptr [0x001b6d90]
PAND XMM1,XMM2
PCMPEQD XMM1,XMM2
POR XMM1,XMM0
PAND XMM1,xmmword ptr [0x001b6da0]
PACKUSWB XMM1,XMM1
PACKUSWB XMM1,XMM1
MOVD dword ptr [R13],XMM1
INC R14
ADD R13,-0x4
JMP 0x00157d67
LAB_00157df4:
LEA RAX,[0x205818]
CMP dword ptr [RAX],0x0
JS 0x00157e1f
CALL 0x0019a772
LEA RDX,[0x1b70ba]
PUSH 0x4
POP RSI
MOV RDI,RAX
MOV ECX,R15D
MOV R8D,R14D
XOR EAX,EAX
CALL 0x0019a80a
LAB_00157e1f:
CMP R14,R12
SETNC AL
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* parse_cpu_mask(std::__cxx11::string const&, bool (&) [512]) */
bool parse_cpu_mask(string *param_1,bool *param_2)
{
ulong uVar1;
char cVar2;
char cVar3;
short sVar6;
short sVar7;
short sVar8;
bool bVar9;
ulong uVar10;
char *pcVar11;
int8 uVar12;
bool *pbVar13;
ulong uVar14;
byte bVar15;
int1 uVar19;
int1 auVar16 [16];
short sVar21;
int1 auVar24 [16];
int1 auVar25 [16];
int1 auVar26 [16];
string local_50 [32];
char cVar4;
char cVar5;
int1 auVar17 [16];
int1 auVar18 [16];
int2 uVar20;
int4 uVar22;
int6 uVar23;
uVar10 = *(ulong *)(param_1 + 8);
if (uVar10 < 2) {
uVar14 = 0;
}
else {
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
bVar9 = std::operator==(local_50,"0x");
std::__cxx11::string::~string(local_50);
uVar14 = (ulong)((uint)bVar9 * 2);
uVar10 = *(ulong *)(param_1 + 8);
}
uVar10 = uVar10 - uVar14;
if (0x7f < uVar10) {
uVar10 = 0x80;
}
uVar1 = uVar10 + uVar14;
pbVar13 = param_2 + (uVar10 & 0xffffffff) * 4;
do {
pbVar13 = pbVar13 + -4;
if (uVar1 <= uVar14) {
LAB_00157e1f:
return uVar1 <= uVar14;
}
pcVar11 = (char *)std::__cxx11::string::at((ulong)param_1);
cVar2 = *pcVar11;
bVar15 = cVar2 - 0x30;
if (9 < bVar15) {
if ((byte)(cVar2 + 0x9fU) < 6) {
bVar15 = cVar2 + 0xa9;
}
else {
if (5 < (byte)(cVar2 + 0xbfU)) {
if (-1 < common_log_verbosity_thold) {
uVar12 = common_log_main();
common_log_add(uVar12,4,"Invalid hex character \'%c\' at position %d\n",(int)cVar2,
uVar14 & 0xffffffff);
}
goto LAB_00157e1f;
}
bVar15 = cVar2 - 0x37;
}
}
uVar22 = *(int4 *)pbVar13;
uVar19 = (int1)((uint)uVar22 >> 0x18);
uVar20 = CONCAT11(uVar19,uVar19);
uVar19 = (int1)((uint)uVar22 >> 0x10);
uVar12 = CONCAT35(CONCAT21(uVar20,uVar19),CONCAT14(uVar19,uVar22));
uVar19 = (int1)((uint)uVar22 >> 8);
uVar23 = CONCAT51(CONCAT41((int)((ulong)uVar12 >> 0x20),uVar19),uVar19);
auVar26._0_2_ = CONCAT11((char)uVar22,(char)uVar22);
uVar10 = CONCAT62(uVar23,auVar26._0_2_);
auVar18._8_4_ = 0;
auVar18._0_8_ = uVar10;
auVar18._12_2_ = uVar20;
auVar18._14_2_ = uVar20;
uVar20 = (int2)((ulong)uVar12 >> 0x20);
auVar17._12_4_ = auVar18._12_4_;
auVar17._8_2_ = 0;
auVar17._0_8_ = uVar10;
auVar17._10_2_ = uVar20;
auVar16._10_6_ = auVar17._10_6_;
auVar16._8_2_ = uVar20;
auVar16._0_8_ = uVar10;
uVar20 = (int2)uVar23;
auVar26._8_8_ = auVar16._8_8_;
auVar26._6_2_ = uVar20;
auVar26._4_2_ = uVar20;
auVar26._2_2_ = auVar26._0_2_;
auVar24._1_3_ = 0;
auVar24[0] = bVar15;
auVar24[4] = bVar15;
auVar24._5_3_ = 0;
auVar24[8] = bVar15;
auVar24._9_3_ = 0;
auVar24[0xc] = bVar15;
auVar24._13_3_ = 0;
auVar24 = auVar24 & _DAT_001b6d90;
auVar25._0_4_ = -(uint)(auVar24._0_4_ == SUB164(_DAT_001b6d90,0));
auVar25._4_4_ = -(uint)(auVar24._4_4_ == SUB164(_DAT_001b6d90,4));
auVar25._8_4_ = -(uint)(auVar24._8_4_ == SUB164(_DAT_001b6d90,8));
auVar25._12_4_ = -(uint)(auVar24._12_4_ == SUB164(_DAT_001b6d90,0xc));
auVar26 = (auVar25 | auVar26) & _DAT_001b6da0;
sVar6 = auVar26._0_2_;
cVar2 = (0 < sVar6) * (sVar6 < 0x100) * auVar26[0] - (0xff < sVar6);
sVar6 = auVar26._2_2_;
sVar21 = CONCAT11((0 < sVar6) * (sVar6 < 0x100) * auVar26[2] - (0xff < sVar6),cVar2);
sVar6 = auVar26._4_2_;
cVar3 = (0 < sVar6) * (sVar6 < 0x100) * auVar26[4] - (0xff < sVar6);
sVar6 = auVar26._6_2_;
uVar22 = CONCAT13((0 < sVar6) * (sVar6 < 0x100) * auVar26[6] - (0xff < sVar6),
CONCAT12(cVar3,sVar21));
sVar6 = auVar26._8_2_;
cVar4 = (0 < sVar6) * (sVar6 < 0x100) * auVar26[8] - (0xff < sVar6);
sVar6 = auVar26._10_2_;
uVar23 = CONCAT15((0 < sVar6) * (sVar6 < 0x100) * auVar26[10] - (0xff < sVar6),
CONCAT14(cVar4,uVar22));
sVar6 = auVar26._12_2_;
cVar5 = (0 < sVar6) * (sVar6 < 0x100) * auVar26[0xc] - (0xff < sVar6);
sVar8 = auVar26._14_2_;
sVar6 = (short)((uint)uVar22 >> 0x10);
sVar7 = (short)((uint6)uVar23 >> 0x20);
sVar8 = (short)(CONCAT17((0 < sVar8) * (sVar8 < 0x100) * auVar26[0xe] - (0xff < sVar8),
CONCAT16(cVar5,uVar23)) >> 0x30);
*(uint *)pbVar13 =
CONCAT13((0 < sVar8) * (sVar8 < 0x100) * cVar5 - (0xff < sVar8),
CONCAT12((0 < sVar7) * (sVar7 < 0x100) * cVar4 - (0xff < sVar7),
CONCAT11((0 < sVar6) * (sVar6 < 0x100) * cVar3 - (0xff < sVar6),
(0 < sVar21) * (sVar21 < 0x100) * cVar2 - (0xff < sVar21))));
uVar14 = uVar14 + 1;
} while( true );
}
|
|
12,275
|
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 0x33ebf7(%rip), %rcx # 0x3681b0
movq %rdi, (%rcx,%rax,8)
orb $0x2, 0xd(%rdi)
leaq 0x342be8(%rip), %rdi # 0x36c1b0
popq %rbp
jmp 0x2af7e
|
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,[0x4681b0]
MOV qword ptr [RCX + RAX*0x8],RDI
OR byte ptr [RDI + 0xd],0x2
LEA RDI,[0x46c1b0]
POP RBP
JMP 0x0012af7e
|
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;
}
|
|
12,276
|
js_promise_withResolvers
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_promise_withResolvers(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue result_promise, resolving_funcs[2], obj;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
result_promise = js_new_promise_capability(ctx, resolving_funcs, this_val);
if (JS_IsException(result_promise))
return JS_EXCEPTION;
obj = JS_NewObject(ctx);
if (JS_IsException(obj)) {
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
JS_FreeValue(ctx, result_promise);
return JS_EXCEPTION;
}
JS_DefinePropertyValue(ctx, obj, JS_ATOM_promise, result_promise, JS_PROP_C_W_E);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_resolve, resolving_funcs[0], JS_PROP_C_W_E);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_reject, resolving_funcs[1], JS_PROP_C_W_E);
return obj;
}
|
O1
|
c
|
js_promise_withResolvers:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rcx
movq %rdi, %rbx
cmpl $-0x1, %ecx
jne 0x54928
movq %rsi, %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x362b6
movq %rdx, %r15
movl $0x6, %r14d
cmpl $0x6, %r15d
je 0x54923
movq %rax, %r12
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rdx, %r13
cmpl $0x6, %r13d
jne 0x5495c
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1d8c6
xorl %r15d, %r15d
jmp 0x54942
leaq 0x4a6f6(%rip), %rsi # 0x9f025
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r14d
xorl %eax, %eax
orq %rax, %r15
movq %r15, %rax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movl $0x7, %r14d
movl %r14d, (%rsp)
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
movl $0x83, %ecx
movq %r12, %r8
movq %r15, %r9
callq 0x26abb
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
movl %r14d, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl $0x81, %ecx
callq 0x26abb
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
movl %r14d, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl $0x82, %ecx
callq 0x26abb
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rbp, %rax
movl %ebp, %r15d
movq %r13, %r14
jmp 0x54944
|
js_promise_withResolvers:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rcx, rdx
mov rbx, rdi
cmp ecx, 0FFFFFFFFh
jnz short loc_54928
mov rdx, rsi
lea rsi, [rsp+68h+var_58]
mov rdi, rbx
call js_new_promise_capability
mov r15, rdx
mov r14d, 6
cmp r15d, 6
jz short loc_54923
mov r12, rax
mov rax, [rbx+40h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov r13, rdx
cmp r13d, 6
jnz short loc_5495C
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_40]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, r15
call JS_FreeValueRT
loc_54923:
xor r15d, r15d
jmp short loc_54942
loc_54928:
lea rsi, aOperandPrototy+20h; "not an object"
xor r15d, r15d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
loc_54942:
xor eax, eax
loc_54944:
or r15, rax
mov rax, r15
mov rdx, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5495C:
mov rbp, rax
mov r14d, 7
mov [rsp+68h+var_68], r14d
mov rdi, rbx
mov rsi, rax
mov rdx, r13
mov ecx, 83h
mov r8, r12
mov r9, r15
call JS_DefinePropertyValue
mov r8, [rsp+68h+var_58]
mov r9, [rsp+68h+var_50]
mov [rsp+68h+var_68], r14d
mov rdi, rbx
mov rsi, rbp
mov rdx, r13
mov ecx, 81h
call JS_DefinePropertyValue
mov r8, [rsp+68h+var_48]
mov r9, [rsp+68h+var_40]
mov [rsp+68h+var_68], r14d
mov rdi, rbx
mov rsi, rbp
mov rdx, r13
mov ecx, 82h
call JS_DefinePropertyValue
mov rax, 0FFFFFFFF00000000h
and rax, rbp
mov r15d, ebp
mov r14, r13
jmp loc_54944
|
unsigned long long js_promise_withResolvers(
long long *a1,
unsigned long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
unsigned long long v14; // rax
long long v15; // rdx
long long v16; // r15
_DWORD *v17; // r12
unsigned long long v18; // rax
long long v19; // rdx
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // r13
long long v23; // r15
unsigned long long v24; // rax
unsigned long long v26; // rbp
__m128 v27; // xmm4
__m128 v28; // xmm5
__m128 v29; // xmm4
__m128 v30; // xmm5
char v31; // [rsp+0h] [rbp-68h]
_DWORD *v32; // [rsp+10h] [rbp-58h] BYREF
long long v33; // [rsp+18h] [rbp-50h]
_DWORD *v34; // [rsp+20h] [rbp-48h]
long long v35; // [rsp+28h] [rbp-40h]
if ( (_DWORD)a3 == -1 )
{
v14 = js_new_promise_capability(
a1,
(long long)&v32,
a2,
a3,
a4,
a5,
a6,
a7,
*(double *)a8.m128_u64,
*(double *)a9.m128_u64,
a10,
a11);
v16 = v15;
if ( (_DWORD)v15 != 6 )
{
v17 = (_DWORD *)v14;
v18 = JS_NewObjectProtoClass((long long)a1, *(_QWORD *)(a1[8] + 16), *(_QWORD *)(a1[8] + 24), 1u);
v22 = v19;
if ( (_DWORD)v19 != 6 )
{
v26 = v18;
JS_DefinePropertyValue(
(long long)a1,
v18,
v19,
131LL,
v17,
v16,
*(double *)a4.m128_u64,
a5,
a6,
a7,
v20,
v21,
a10,
a11,
7);
JS_DefinePropertyValue(
(long long)a1,
v26,
v22,
129LL,
v32,
v33,
*(double *)a4.m128_u64,
a5,
a6,
a7,
v27,
v28,
a10,
a11,
7);
JS_DefinePropertyValue(
(long long)a1,
v26,
v22,
130LL,
v34,
v35,
*(double *)a4.m128_u64,
a5,
a6,
a7,
v29,
v30,
a10,
a11,
7);
v24 = v26 & 0xFFFFFFFF00000000LL;
v23 = (unsigned int)v26;
return v24 | v23;
}
JS_FreeValueRT(a1[3], v32, v33);
JS_FreeValueRT(a1[3], v34, v35);
JS_FreeValueRT(a1[3], v17, v16);
}
v23 = 0LL;
}
else
{
v23 = 0LL;
JS_ThrowTypeError((long long)a1, (long long)"not an object", a3, a3, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v31);
}
v24 = 0LL;
return v24 | v23;
}
|
js_promise_withResolvers:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RCX,RDX
MOV RBX,RDI
CMP ECX,-0x1
JNZ 0x00154928
MOV RDX,RSI
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001362b6
MOV R15,RDX
MOV R14D,0x6
CMP R15D,0x6
JZ 0x00154923
MOV R12,RAX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120f05
MOV R13,RDX
CMP R13D,0x6
JNZ 0x0015495c
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,R15
CALL 0x0011d8c6
LAB_00154923:
XOR R15D,R15D
JMP 0x00154942
LAB_00154928:
LEA RSI,[0x19f025]
XOR R15D,R15D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
MOV R14D,0x6
LAB_00154942:
XOR EAX,EAX
LAB_00154944:
OR R15,RAX
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015495c:
MOV RBP,RAX
MOV R14D,0x7
MOV dword ptr [RSP],R14D
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R13
MOV ECX,0x83
MOV R8,R12
MOV R9,R15
CALL 0x00126abb
MOV R8,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
MOV dword ptr [RSP],R14D
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R13
MOV ECX,0x81
CALL 0x00126abb
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x28]
MOV dword ptr [RSP],R14D
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R13
MOV ECX,0x82
CALL 0x00126abb
MOV RAX,-0x100000000
AND RAX,RBP
MOV R15D,EBP
MOV R14,R13
JMP 0x00154944
|
int1 [16] js_promise_withResolvers(long param_1,int8 param_2,int param_3)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
if (param_3 == -1) {
auVar4 = js_new_promise_capability(param_1,&local_58,param_2);
if (auVar4._8_4_ != 6) {
auVar5 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1);
uVar2 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
if (auVar5._8_4_ != 6) {
JS_DefinePropertyValue(param_1,uVar3,uVar2,0x83,auVar4._0_8_,auVar4._8_8_,7);
JS_DefinePropertyValue(param_1,uVar3,uVar2,0x81,local_58,local_50,7);
JS_DefinePropertyValue(param_1,uVar3,uVar2,0x82,local_48,local_40,7);
uVar1 = uVar3 & 0xffffffff00000000;
uVar3 = uVar3 & 0xffffffff;
goto LAB_00154944;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,local_50);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,local_40);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar4._0_8_,auVar4._8_8_);
}
}
else {
JS_ThrowTypeError(param_1,"not an object");
}
uVar3 = 0;
uVar2 = 6;
uVar1 = 0;
LAB_00154944:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = uVar3 | uVar1;
return auVar4;
}
|
|
12,277
|
js_promise_withResolvers
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_promise_withResolvers(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue result_promise, resolving_funcs[2], obj;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
result_promise = js_new_promise_capability(ctx, resolving_funcs, this_val);
if (JS_IsException(result_promise))
return JS_EXCEPTION;
obj = JS_NewObject(ctx);
if (JS_IsException(obj)) {
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
JS_FreeValue(ctx, result_promise);
return JS_EXCEPTION;
}
JS_DefinePropertyValue(ctx, obj, JS_ATOM_promise, result_promise, JS_PROP_C_W_E);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_resolve, resolving_funcs[0], JS_PROP_C_W_E);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_reject, resolving_funcs[1], JS_PROP_C_W_E);
return obj;
}
|
O2
|
c
|
js_promise_withResolvers:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rcx
movq %rdi, %rbx
cmpl $-0x1, %ecx
jne 0x48888
movq %rsi, %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2f970
movq %rdx, %r13
pushq $0x6
popq %r14
cmpl $0x6, %r13d
je 0x48894
movq %rax, %rbp
movq %rbx, %rdi
callq 0x1b2c9
movq %rdx, %r15
cmpl $0x6, %r15d
jne 0x488ad
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x1801e
jmp 0x48894
movq %rbx, %rdi
callq 0x1d5e1
pushq $0x6
popq %r14
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
pushq $0x7
popq %r14
movl %r14d, (%rsp)
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
movl $0x83, %ecx
movq %rbp, %r8
movq %r13, %r9
callq 0x20872
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
movl %r14d, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x81, %ecx
callq 0x20872
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
movl %r14d, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x82, %ecx
callq 0x20872
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r12, %rcx
movl %r12d, %eax
movq %r15, %r14
jmp 0x48898
|
js_promise_withResolvers:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rcx, rdx
mov rbx, rdi
cmp ecx, 0FFFFFFFFh
jnz short loc_48888
mov rdx, rsi
lea rsi, [rsp+68h+var_58]
mov rdi, rbx
call js_new_promise_capability
mov r13, rdx
push 6
pop r14
cmp r13d, 6
jz short loc_48894
mov rbp, rax
mov rdi, rbx
call JS_NewObject
mov r15, rdx
cmp r15d, 6
jnz short loc_488AD
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, rbx
call JS_FreeValue
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_40]
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
mov rsi, rbp
mov rdx, r13
call JS_FreeValue
jmp short loc_48894
loc_48888:
mov rdi, rbx
call JS_ThrowTypeErrorNotAnObject
push 6
pop r14
loc_48894:
xor eax, eax
xor ecx, ecx
loc_48898:
or rax, rcx
mov rdx, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_488AD:
mov r12, rax
push 7
pop r14
mov [rsp+68h+var_68], r14d
mov rdi, rbx
mov rsi, rax
mov rdx, r15
mov ecx, 83h
mov r8, rbp
mov r9, r13
call JS_DefinePropertyValue
mov r8, [rsp+68h+var_58]
mov r9, [rsp+68h+var_50]
mov [rsp+68h+var_68], r14d
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, 81h
call JS_DefinePropertyValue
mov r8, [rsp+68h+var_48]
mov r9, [rsp+68h+var_40]
mov [rsp+68h+var_68], r14d
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, 82h
call JS_DefinePropertyValue
mov rcx, 0FFFFFFFF00000000h
and rcx, r12
mov eax, r12d
mov r14, r15
jmp loc_48898
|
unsigned long long js_promise_withResolvers(
long long a1,
unsigned long long a2,
unsigned long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
unsigned long long v14; // rax
long long v15; // rdx
long long v16; // r13
_DWORD *v17; // rbp
long long v18; // rax
long long v19; // rdx
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // r15
long long v23; // rax
unsigned long long v24; // rcx
long long v26; // r12
__m128 v27; // xmm4
__m128 v28; // xmm5
__m128 v29; // xmm4
__m128 v30; // xmm5
char v31; // [rsp+0h] [rbp-68h]
_DWORD *v32; // [rsp+10h] [rbp-58h] BYREF
long long v33; // [rsp+18h] [rbp-50h]
_DWORD *v34; // [rsp+20h] [rbp-48h]
long long v35; // [rsp+28h] [rbp-40h]
if ( (_DWORD)a3 == -1 )
{
v14 = js_new_promise_capability(
a1,
(long long)&v32,
a2,
a3,
a4,
a5,
a6,
a7,
*(double *)a8.m128_u64,
*(double *)a9.m128_u64,
a10,
a11);
v16 = v15;
if ( (_DWORD)v15 != 6 )
{
v17 = (_DWORD *)v14;
v18 = JS_NewObject(a1);
v22 = v19;
if ( (_DWORD)v19 != 6 )
{
v26 = v18;
JS_DefinePropertyValue(a1, v18, v19, 131LL, v17, v16, *(double *)a4.m128_u64, a5, a6, a7, v20, v21, a10, a11, 7);
JS_DefinePropertyValue(a1, v26, v22, 129LL, v32, v33, *(double *)a4.m128_u64, a5, a6, a7, v27, v28, a10, a11, 7);
JS_DefinePropertyValue(a1, v26, v22, 130LL, v34, v35, *(double *)a4.m128_u64, a5, a6, a7, v29, v30, a10, a11, 7);
v24 = v26 & 0xFFFFFFFF00000000LL;
v23 = (unsigned int)v26;
return v24 | v23;
}
JS_FreeValue(a1, (long long)v32, v33);
JS_FreeValue(a1, (long long)v34, v35);
JS_FreeValue(a1, (long long)v17, v16);
}
}
else
{
JS_ThrowTypeErrorNotAnObject(a1, a4, a5, a6, a7, a8, a9, a10, a11, a2, a3, a3, a13, a14, v31);
}
v23 = 0LL;
v24 = 0LL;
return v24 | v23;
}
|
js_promise_withResolvers:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RCX,RDX
MOV RBX,RDI
CMP ECX,-0x1
JNZ 0x00148888
MOV RDX,RSI
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0012f970
MOV R13,RDX
PUSH 0x6
POP R14
CMP R13D,0x6
JZ 0x00148894
MOV RBP,RAX
MOV RDI,RBX
CALL 0x0011b2c9
MOV R15,RDX
CMP R15D,0x6
JNZ 0x001488ad
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,RBX
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,RBX
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R13
CALL 0x0011801e
JMP 0x00148894
LAB_00148888:
MOV RDI,RBX
CALL 0x0011d5e1
PUSH 0x6
POP R14
LAB_00148894:
XOR EAX,EAX
XOR ECX,ECX
LAB_00148898:
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001488ad:
MOV R12,RAX
PUSH 0x7
POP R14
MOV dword ptr [RSP],R14D
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
MOV ECX,0x83
MOV R8,RBP
MOV R9,R13
CALL 0x00120872
MOV R8,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
MOV dword ptr [RSP],R14D
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,0x81
CALL 0x00120872
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x28]
MOV dword ptr [RSP],R14D
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,0x82
CALL 0x00120872
MOV RCX,-0x100000000
AND RCX,R12
MOV EAX,R12D
MOV R14,R15
JMP 0x00148898
|
int1 [16] js_promise_withResolvers(int8 param_1,int8 param_2,int param_3)
{
ulong uVar1;
ulong uVar2;
int8 uVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
if (param_3 == -1) {
auVar4 = js_new_promise_capability(param_1,&local_58,param_2);
if (auVar4._8_4_ != 6) {
auVar5 = JS_NewObject(param_1);
uVar3 = auVar5._8_8_;
uVar1 = auVar5._0_8_;
if (auVar5._8_4_ != 6) {
JS_DefinePropertyValue(param_1,uVar1,uVar3,0x83,auVar4._0_8_,auVar4._8_8_,7);
JS_DefinePropertyValue(param_1,uVar1,uVar3,0x81,local_58,local_50,7);
JS_DefinePropertyValue(param_1,uVar1,uVar3,0x82,local_48,local_40,7);
uVar2 = uVar1 & 0xffffffff00000000;
uVar1 = uVar1 & 0xffffffff;
goto LAB_00148898;
}
JS_FreeValue(param_1,local_58,local_50);
JS_FreeValue(param_1,local_48,local_40);
JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_);
}
}
else {
JS_ThrowTypeErrorNotAnObject(param_1);
}
uVar3 = 6;
uVar1 = 0;
uVar2 = 0;
LAB_00148898:
auVar4._0_8_ = uVar1 | uVar2;
auVar4._8_8_ = uVar3;
return auVar4;
}
|
|
12,278
|
uf_endspace_selected
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_endspace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill((uchar*) end-spaces,spaces,' ');
}
else
decode_bytes(rec,bit_buff,to,end);
}
|
O3
|
c
|
uf_endspace_selected:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x83185
movl (%r15), %r14d
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r14d
jb 0x831c4
jmp 0x831a3
movq %r15, %rdi
movq %rdx, %r14
callq 0x823a5
movq %r14, %rdx
movl $0x1f, 0x4(%r15)
movl (%r15), %r14d
testl %r14d, %r14d
js 0x831bf
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82c96
movl $0x1f, %eax
movl 0x1c(%r12), %r13d
movl %eax, %ecx
subl %r13d, %ecx
jae 0x83218
subl %eax, %r13d
movl %eax, %eax
leaq 0x5e894(%rip), %rcx # 0xe1a70
andl (%rcx,%rax,4), %r14d
movl %r13d, %ecx
shll %cl, %r14d
movq %r15, %rdi
movq %r12, -0x30(%rbp)
movq %rdx, %r12
callq 0x823a5
movq %r12, %rdx
movq -0x30(%rbp), %r12
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r14d
jmp 0x8322f
movl %ecx, 0x4(%r15)
shrl %cl, %r14d
movl 0x1c(%r12), %eax
leaq 0x5e845(%rip), %rcx # 0xe1a70
andl (%rcx,%rax,4), %r14d
movl %r14d, %r13d
leaq (%rdx,%r13), %rax
cmpq %rbx, %rax
jbe 0x83252
movl $0x1, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r14
negq %r14
cmpq %rbx, %rax
je 0x8326c
leaq (%rbx,%r14), %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x82c96
addq %r14, %rbx
movq %rbx, %rdi
movl $0x20, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
|
uf_endspace_selected_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r15, rsi
mov r12, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_83185
mov r14d, [r15]
dec eax
mov [r15+4], eax
bt r14d, eax
jb short loc_831C4
jmp short loc_831A3
loc_83185:
mov rdi, r15
mov r14, rdx
call fill_buffer_0
mov rdx, r14
mov dword ptr [r15+4], 1Fh
mov r14d, [r15]
test r14d, r14d
js short loc_831BF
loc_831A3:
mov rdi, r12
mov rsi, r15
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
loc_831BF:
mov eax, 1Fh
loc_831C4:
mov r13d, [r12+1Ch]
mov ecx, eax
sub ecx, r13d
jnb short loc_83218
sub r13d, eax
mov eax, eax
lea rcx, mask_0
and r14d, [rcx+rax*4]
mov ecx, r13d
shl r14d, cl
mov rdi, r15
mov [rbp+var_30], r12
mov r12, rdx
call fill_buffer_0
mov rdx, r12
mov r12, [rbp+var_30]
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add r14d, eax
jmp short loc_8322F
loc_83218:
mov [r15+4], ecx
shr r14d, cl
mov eax, [r12+1Ch]
lea rcx, mask_0
and r14d, [rcx+rax*4]
loc_8322F:
mov r13d, r14d
lea rax, [rdx+r13]
cmp rax, rbx
jbe short loc_83252
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_83252:
mov r14, r13
neg r14
cmp rax, rbx
jz short loc_8326C
lea rcx, [rbx+r14]
mov rdi, r12
mov rsi, r15
call decode_bytes_0
loc_8326C:
add rbx, r14
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
|
_BYTE * uf_endspace_selected_0(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4)
{
long long v5; // r12
unsigned int v6; // eax
unsigned int v7; // r14d
unsigned int v8; // eax
_BYTE *v9; // r14
_BYTE *result; // rax
unsigned int v11; // r13d
unsigned int v12; // ecx
int v13; // r13d
int v14; // r14d
_BYTE *v15; // r12
unsigned int v16; // r14d
v5 = a1;
v6 = a2[1];
if ( v6 )
{
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( !_bittest((const int *)&v7, v8) )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
else
{
v9 = a3;
fill_buffer_0((long long)a2);
a3 = v9;
a2[1] = 31;
v7 = *a2;
if ( (*a2 & 0x80000000) == 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
v8 = 31;
}
v11 = *(_DWORD *)(a1 + 28);
v12 = v8 - v11;
if ( v8 >= v11 )
{
a2[1] = v12;
v16 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v12);
}
else
{
v13 = v11 - v8;
v14 = (mask_0[v8] & v7) << v13;
v15 = a3;
fill_buffer_0((long long)a2);
a3 = v15;
v5 = a1;
a2[1] = 32 - v13;
v16 = (*a2 >> -(char)v13) + v14;
}
result = &a3[v16];
if ( result <= a4 )
{
if ( result != a4 )
decode_bytes_0(v5, (long long)a2, a3, &a4[-v16]);
return (_BYTE *)memset(&a4[-v16], 32LL, v16);
}
else
{
a2[10] = 1;
}
return result;
}
|
uf_endspace_selected:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R15,RSI
MOV R12,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x00183185
MOV R14D,dword ptr [R15]
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R14D,EAX
JC 0x001831c4
JMP 0x001831a3
LAB_00183185:
MOV RDI,R15
MOV R14,RDX
CALL 0x001823a5
MOV RDX,R14
MOV dword ptr [R15 + 0x4],0x1f
MOV R14D,dword ptr [R15]
TEST R14D,R14D
JS 0x001831bf
LAB_001831a3:
MOV RDI,R12
MOV RSI,R15
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00182c96
LAB_001831bf:
MOV EAX,0x1f
LAB_001831c4:
MOV R13D,dword ptr [R12 + 0x1c]
MOV ECX,EAX
SUB ECX,R13D
JNC 0x00183218
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e1a70]
AND R14D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R14D,CL
MOV RDI,R15
MOV qword ptr [RBP + -0x30],R12
MOV R12,RDX
CALL 0x001823a5
MOV RDX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R14D,EAX
JMP 0x0018322f
LAB_00183218:
MOV dword ptr [R15 + 0x4],ECX
SHR R14D,CL
MOV EAX,dword ptr [R12 + 0x1c]
LEA RCX,[0x1e1a70]
AND R14D,dword ptr [RCX + RAX*0x4]
LAB_0018322f:
MOV R13D,R14D
LEA RAX,[RDX + R13*0x1]
CMP RAX,RBX
JBE 0x00183252
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00183252:
MOV R14,R13
NEG R14
CMP RAX,RBX
JZ 0x0018326c
LEA RCX,[RBX + R14*0x1]
MOV RDI,R12
MOV RSI,R15
CALL 0x00182c96
LAB_0018326c:
ADD RBX,R14
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
|
void uf_endspace_selected(long param_1,uint *param_2,long param_3,ulong param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
ulong __n;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
if ((int)uVar5 < 0) {
uVar3 = 0x1f;
goto LAB_001831c4;
}
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) {
LAB_001831c4:
uVar1 = *(uint *)(param_1 + 0x1c);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
__n = (ulong)uVar5;
if (param_3 + __n <= param_4) {
if (param_3 + __n != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 + -__n);
}
memset((void *)(param_4 + -__n),0x20,__n);
return;
}
param_2[10] = 1;
return;
}
}
decode_bytes(param_1,param_2,param_3,param_4);
return;
}
|
|
12,279
|
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
llama.cpp/common/common.cpp
|
bool fs_create_directory_with_parents(const std::string & path) {
#ifdef _WIN32
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
std::wstring wpath = converter.from_bytes(path);
// if the path already exists, check whether it's a directory
const DWORD attributes = GetFileAttributesW(wpath.c_str());
if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) {
return true;
}
size_t pos_slash = 0;
// process path from front to back, procedurally creating directories
while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) {
const std::wstring subpath = wpath.substr(0, pos_slash);
const wchar_t * test = subpath.c_str();
const bool success = CreateDirectoryW(test, NULL);
if (!success) {
const DWORD error = GetLastError();
// if the path already exists, ensure that it's a directory
if (error == ERROR_ALREADY_EXISTS) {
const DWORD attributes = GetFileAttributesW(subpath.c_str());
if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) {
return false;
}
} else {
return false;
}
}
pos_slash += 1;
}
return true;
#else
// if the path already exists, check whether it's a directory
struct stat info;
if (stat(path.c_str(), &info) == 0) {
return S_ISDIR(info.st_mode);
}
size_t pos_slash = 1; // skip leading slashes for directory creation
// process path from front to back, procedurally creating directories
while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) {
const std::string subpath = path.substr(0, pos_slash);
struct stat info;
// if the path already exists, ensure that it's a directory
if (stat(subpath.c_str(), &info) == 0) {
if (!S_ISDIR(info.st_mode)) {
return false;
}
} else {
// create parent directories
const int ret = mkdir(subpath.c_str(), 0755);
if (ret != 0) {
return false;
}
}
pos_slash += 1;
}
return true;
#endif // _WIN32
}
|
O3
|
cpp
|
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x21130
testl %eax, %eax
je 0xf8943
movl $0x1, %r14d
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r12
movq %rbx, %rdi
movl $0x2f, %esi
movq %r14, %rdx
callq 0x22230
cmpq $-0x1, %rax
sete %bpl
je 0xf8958
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x220d0
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x21130
testl %eax, %eax
je 0xf8904
movq 0x8(%rsp), %rdi
movl $0x1ed, %esi # imm = 0x1ED
callq 0x21440
testl %eax, %eax
je 0xf8916
xorl %r13d, %r13d
jmp 0xf891c
movl 0x40(%rsp), %eax
movl $0xf000, %ecx # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax # imm = 0x4000
jne 0xf88ff
incq %r14
movb $0x1, %r13b
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf8938
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21170
testb %r13b, %r13b
jne 0xf88aa
jmp 0xf8958
movl $0xf000, %eax # imm = 0xF000
andl 0xd0(%rsp), %eax
cmpl $0x4000, %eax # imm = 0x4000
sete %bpl
movl %ebp, %eax
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 148h
mov rbx, rdi
mov rdi, [rdi]
lea rsi, [rsp+178h+var_C0]
call _stat
test eax, eax
jz loc_F8943
mov r14d, 1
lea r15, [rsp+178h+var_170]
lea r12, [rsp+178h+var_150]
loc_F88AA:
mov rdi, rbx
mov esi, 2Fh ; '/'
mov rdx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
setz bpl
jz loc_F8958
mov r14, rax
mov rdi, r15
mov rsi, rbx
xor edx, edx
mov rcx, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rsp+178h+var_170]
mov rsi, r12
call _stat
test eax, eax
jz short loc_F8904
mov rdi, [rsp+178h+var_170]
mov esi, 1EDh
call _mkdir
test eax, eax
jz short loc_F8916
loc_F88FF:
xor r13d, r13d
jmp short loc_F891C
loc_F8904:
mov eax, [rsp+178h+var_138]
mov ecx, 0F000h
and eax, ecx
cmp eax, 4000h
jnz short loc_F88FF
loc_F8916:
inc r14
mov r13b, 1
loc_F891C:
mov rdi, [rsp+178h+var_170]; void *
lea rax, [rsp+178h+var_160]
cmp rdi, rax
jz short loc_F8938
mov rsi, [rsp+178h+var_160]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F8938:
test r13b, r13b
jnz loc_F88AA
jmp short loc_F8958
loc_F8943:
mov eax, 0F000h
and eax, [rsp+178h+var_A8]
cmp eax, 4000h
setz bpl
loc_F8958:
mov eax, ebp
add rsp, 148h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long fs_create_directory_with_parents(_QWORD *a1)
{
unsigned int v1; // ebp
long long v2; // r14
long long v3; // rax
char v4; // r13
void *v6; // [rsp+8h] [rbp-170h] BYREF
long long v7; // [rsp+18h] [rbp-160h] BYREF
_BYTE v8[24]; // [rsp+28h] [rbp-150h] BYREF
int v9; // [rsp+40h] [rbp-138h]
_BYTE v10[24]; // [rsp+B8h] [rbp-C0h] BYREF
int v11; // [rsp+D0h] [rbp-A8h]
if ( (unsigned int)stat(*a1, v10) )
{
v2 = 1LL;
while ( 1 )
{
v3 = std::string::find(a1, 47LL, v2);
LOBYTE(v1) = v3 == -1;
if ( v3 == -1 )
return v1;
v2 = v3;
std::string::substr(&v6, a1, 0LL, v3);
if ( (unsigned int)stat(v6, v8) )
{
if ( !(unsigned int)mkdir(v6, 493LL) )
goto LABEL_8;
}
else if ( (v9 & 0xF000) == 0x4000 )
{
LABEL_8:
++v2;
v4 = 1;
goto LABEL_9;
}
v4 = 0;
LABEL_9:
if ( v6 != &v7 )
operator delete(v6, v7 + 1);
if ( !v4 )
return v1;
}
}
LOBYTE(v1) = (v11 & 0xF000) == 0x4000;
return v1;
}
|
fs_create_directory_with_parents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x148
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
LEA RSI,[RSP + 0xb8]
CALL 0x00121130
TEST EAX,EAX
JZ 0x001f8943
MOV R14D,0x1
LEA R15,[RSP + 0x8]
LEA R12,[RSP + 0x28]
LAB_001f88aa:
MOV RDI,RBX
MOV ESI,0x2f
MOV RDX,R14
CALL 0x00122230
CMP RAX,-0x1
SETZ BPL
JZ 0x001f8958
MOV R14,RAX
MOV RDI,R15
MOV RSI,RBX
XOR EDX,EDX
MOV RCX,RAX
CALL 0x001220d0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R12
CALL 0x00121130
TEST EAX,EAX
JZ 0x001f8904
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1ed
CALL 0x00121440
TEST EAX,EAX
JZ 0x001f8916
LAB_001f88ff:
XOR R13D,R13D
JMP 0x001f891c
LAB_001f8904:
MOV EAX,dword ptr [RSP + 0x40]
MOV ECX,0xf000
AND EAX,ECX
CMP EAX,0x4000
JNZ 0x001f88ff
LAB_001f8916:
INC R14
MOV R13B,0x1
LAB_001f891c:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001f8938
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00121170
LAB_001f8938:
TEST R13B,R13B
JNZ 0x001f88aa
JMP 0x001f8958
LAB_001f8943:
MOV EAX,0xf000
AND EAX,dword ptr [RSP + 0xd0]
CMP EAX,0x4000
SETZ BPL
LAB_001f8958:
MOV EAX,EBP
ADD RSP,0x148
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* fs_create_directory_with_parents(std::__cxx11::string const&) */
ulong fs_create_directory_with_parents(string *param_1)
{
bool bVar1;
int iVar2;
long lVar3;
ulong unaff_RBP;
long *local_170 [2];
long local_160 [2];
stat local_150;
stat local_c0;
iVar2 = stat(*(char **)param_1,&local_c0);
if (iVar2 == 0) {
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),(local_c0.st_mode & 0xf000) == 0x4000);
}
else {
do {
lVar3 = std::__cxx11::string::find((char)param_1,0x2f);
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),lVar3 == -1);
if (lVar3 == -1) break;
std::__cxx11::string::substr((ulong)local_170,(ulong)param_1);
iVar2 = stat((char *)local_170[0],&local_150);
if (iVar2 == 0) {
if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_001f88ff;
LAB_001f8916:
bVar1 = true;
}
else {
iVar2 = mkdir((char *)local_170[0],0x1ed);
if (iVar2 == 0) goto LAB_001f8916;
LAB_001f88ff:
bVar1 = false;
}
if (local_170[0] != local_160) {
operator_delete(local_170[0],local_160[0] + 1);
}
} while (bVar1);
}
return unaff_RBP & 0xffffffff;
}
|
|
12,280
|
stbi__compute_transparency16(stbi__png*, unsigned short*, int)
|
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
|
static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n)
{
stbi__context *s = z->s;
stbi__uint32 i, pixel_count = s->img_x * s->img_y;
stbi__uint16 *p = (stbi__uint16*) z->out;
// compute color-based transparency, assuming we've
// already got 65535 as the alpha value in the output
STBI_ASSERT(out_n == 2 || out_n == 4);
if (out_n == 2) {
for (i = 0; i < pixel_count; ++i) {
p[1] = (p[0] == tc[0] ? 0 : 65535);
p += 2;
}
} else {
for (i = 0; i < pixel_count; ++i) {
if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])
p[3] = 0;
p += 4;
}
}
return 1;
}
|
O0
|
c
|
stbi__compute_transparency16(stbi__png*, unsigned short*, int):
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movq -0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
movl (%rax), %eax
movq -0x20(%rsp), %rcx
imull 0x4(%rcx), %eax
movl %eax, -0x28(%rsp)
movq -0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rsp)
cmpl $0x2, -0x14(%rsp)
jne 0x1a5cb
movl $0x0, -0x24(%rsp)
movl -0x24(%rsp), %eax
cmpl -0x28(%rsp), %eax
jae 0x1a5c9
movq -0x30(%rsp), %rax
movzwl (%rax), %edx
movq -0x10(%rsp), %rax
movzwl (%rax), %esi
movl $0xffff, %eax # imm = 0xFFFF
xorl %ecx, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movw %ax, %cx
movq -0x30(%rsp), %rax
movw %cx, 0x2(%rax)
movq -0x30(%rsp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rsp)
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x1a57c
jmp 0x1a645
movl $0x0, -0x24(%rsp)
movl -0x24(%rsp), %eax
cmpl -0x28(%rsp), %eax
jae 0x1a643
movq -0x30(%rsp), %rax
movzwl (%rax), %eax
movq -0x10(%rsp), %rcx
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x1a628
movq -0x30(%rsp), %rax
movzwl 0x2(%rax), %eax
movq -0x10(%rsp), %rcx
movzwl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jne 0x1a628
movq -0x30(%rsp), %rax
movzwl 0x4(%rax), %eax
movq -0x10(%rsp), %rcx
movzwl 0x4(%rcx), %ecx
cmpl %ecx, %eax
jne 0x1a628
movq -0x30(%rsp), %rax
movw $0x0, 0x6(%rax)
movq -0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rsp)
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x1a5d3
jmp 0x1a645
movl $0x1, %eax
retq
nopl (%rax,%rax)
|
_ZL28stbi__compute_transparency16P9stbi__pngPti:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_14], edx
mov rax, [rsp+var_8]
mov rax, [rax]
mov [rsp+var_20], rax
mov rax, [rsp+var_20]
mov eax, [rax]
mov rcx, [rsp+var_20]
imul eax, [rcx+4]
mov [rsp+var_28], eax
mov rax, [rsp+var_8]
mov rax, [rax+18h]
mov [rsp+var_30], rax
cmp [rsp+var_14], 2
jnz short loc_1A5CB
mov [rsp+var_24], 0
loc_1A57C:
mov eax, [rsp+var_24]
cmp eax, [rsp+var_28]
jnb short loc_1A5C9
mov rax, [rsp+var_30]
movzx edx, word ptr [rax]
mov rax, [rsp+var_10]
movzx esi, word ptr [rax]
mov eax, 0FFFFh
xor ecx, ecx
cmp edx, esi
cmovz eax, ecx
mov cx, ax
mov rax, [rsp+var_30]
mov [rax+2], cx
mov rax, [rsp+var_30]
add rax, 4
mov [rsp+var_30], rax
mov eax, [rsp+var_24]
add eax, 1
mov [rsp+var_24], eax
jmp short loc_1A57C
loc_1A5C9:
jmp short loc_1A645
loc_1A5CB:
mov [rsp+var_24], 0
loc_1A5D3:
mov eax, [rsp+var_24]
cmp eax, [rsp+var_28]
jnb short loc_1A643
mov rax, [rsp+var_30]
movzx eax, word ptr [rax]
mov rcx, [rsp+var_10]
movzx ecx, word ptr [rcx]
cmp eax, ecx
jnz short loc_1A628
mov rax, [rsp+var_30]
movzx eax, word ptr [rax+2]
mov rcx, [rsp+var_10]
movzx ecx, word ptr [rcx+2]
cmp eax, ecx
jnz short loc_1A628
mov rax, [rsp+var_30]
movzx eax, word ptr [rax+4]
mov rcx, [rsp+var_10]
movzx ecx, word ptr [rcx+4]
cmp eax, ecx
jnz short loc_1A628
mov rax, [rsp+var_30]
mov word ptr [rax+6], 0
loc_1A628:
mov rax, [rsp+var_30]
add rax, 8
mov [rsp+var_30], rax
mov eax, [rsp+var_24]
add eax, 1
mov [rsp+var_24], eax
jmp short loc_1A5D3
loc_1A643:
jmp short $+2
loc_1A645:
mov eax, 1
retn
|
long long stbi__compute_transparency16(_QWORD *a1, unsigned __int16 *a2, int a3)
{
__int16 v3; // ax
unsigned __int16 *v5; // [rsp+0h] [rbp-30h]
unsigned int v6; // [rsp+8h] [rbp-28h]
unsigned int i; // [rsp+Ch] [rbp-24h]
unsigned int j; // [rsp+Ch] [rbp-24h]
v6 = *(_DWORD *)(*a1 + 4LL) * *(_DWORD *)*a1;
v5 = (unsigned __int16 *)a1[3];
if ( a3 == 2 )
{
for ( i = 0; i < v6; ++i )
{
v3 = -1;
if ( *v5 == *a2 )
v3 = 0;
v5[1] = v3;
v5 += 2;
}
}
else
{
for ( j = 0; j < v6; ++j )
{
if ( *v5 == *a2 && v5[1] == a2[1] && v5[2] == a2[2] )
v5[3] = 0;
v5 += 4;
}
}
return 1LL;
}
|
stbi__compute_transparency16:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV dword ptr [RSP + -0x14],EDX
MOV RAX,qword ptr [RSP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RSP + -0x20]
IMUL EAX,dword ptr [RCX + 0x4]
MOV dword ptr [RSP + -0x28],EAX
MOV RAX,qword ptr [RSP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + -0x30],RAX
CMP dword ptr [RSP + -0x14],0x2
JNZ 0x0011a5cb
MOV dword ptr [RSP + -0x24],0x0
LAB_0011a57c:
MOV EAX,dword ptr [RSP + -0x24]
CMP EAX,dword ptr [RSP + -0x28]
JNC 0x0011a5c9
MOV RAX,qword ptr [RSP + -0x30]
MOVZX EDX,word ptr [RAX]
MOV RAX,qword ptr [RSP + -0x10]
MOVZX ESI,word ptr [RAX]
MOV EAX,0xffff
XOR ECX,ECX
CMP EDX,ESI
CMOVZ EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RSP + -0x30]
MOV word ptr [RAX + 0x2],CX
MOV RAX,qword ptr [RSP + -0x30]
ADD RAX,0x4
MOV qword ptr [RSP + -0x30],RAX
MOV EAX,dword ptr [RSP + -0x24]
ADD EAX,0x1
MOV dword ptr [RSP + -0x24],EAX
JMP 0x0011a57c
LAB_0011a5c9:
JMP 0x0011a645
LAB_0011a5cb:
MOV dword ptr [RSP + -0x24],0x0
LAB_0011a5d3:
MOV EAX,dword ptr [RSP + -0x24]
CMP EAX,dword ptr [RSP + -0x28]
JNC 0x0011a643
MOV RAX,qword ptr [RSP + -0x30]
MOVZX EAX,word ptr [RAX]
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,word ptr [RCX]
CMP EAX,ECX
JNZ 0x0011a628
MOV RAX,qword ptr [RSP + -0x30]
MOVZX EAX,word ptr [RAX + 0x2]
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,word ptr [RCX + 0x2]
CMP EAX,ECX
JNZ 0x0011a628
MOV RAX,qword ptr [RSP + -0x30]
MOVZX EAX,word ptr [RAX + 0x4]
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,word ptr [RCX + 0x4]
CMP EAX,ECX
JNZ 0x0011a628
MOV RAX,qword ptr [RSP + -0x30]
MOV word ptr [RAX + 0x6],0x0
LAB_0011a628:
MOV RAX,qword ptr [RSP + -0x30]
ADD RAX,0x8
MOV qword ptr [RSP + -0x30],RAX
MOV EAX,dword ptr [RSP + -0x24]
ADD EAX,0x1
MOV dword ptr [RSP + -0x24],EAX
JMP 0x0011a5d3
LAB_0011a643:
JMP 0x0011a645
LAB_0011a645:
MOV EAX,0x1
RET
|
/* stbi__compute_transparency16(stbi__png*, unsigned short*, int) */
int8 stbi__compute_transparency16(stbi__png *param_1,ushort *param_2,int param_3)
{
ushort uVar1;
uint uVar2;
ushort *local_30;
uint local_24;
uVar2 = **(int **)param_1 * (*(int **)param_1)[1];
local_30 = *(ushort **)(param_1 + 0x18);
if (param_3 == 2) {
for (local_24 = 0; local_24 < uVar2; local_24 = local_24 + 1) {
uVar1 = 0xffff;
if (*local_30 == *param_2) {
uVar1 = 0;
}
local_30[1] = uVar1;
local_30 = local_30 + 2;
}
}
else {
for (local_24 = 0; local_24 < uVar2; local_24 = local_24 + 1) {
if (((*local_30 == *param_2) && (local_30[1] == param_2[1])) && (local_30[2] == param_2[2])) {
local_30[3] = 0;
}
local_30 = local_30 + 4;
}
}
return 1;
}
|
|
12,281
|
translog_assign_id_to_share
|
eloqsql/storage/maria/ma_loghandler.c
|
int translog_assign_id_to_share(MARIA_HA *tbl_info, TRN *trn)
{
uint16 id;
MARIA_SHARE *share= tbl_info->s;
/*
If you give an id to a non-BLOCK_RECORD table, you also need to release
this id somewhere. Then you can change the assertion.
*/
DBUG_ASSERT(share->data_file_type == BLOCK_RECORD);
/* re-check under mutex to avoid having 2 ids for the same share */
mysql_mutex_lock(&share->intern_lock);
if (unlikely(share->id == 0))
{
LSN lsn;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
uchar log_data[FILEID_STORE_SIZE];
/* Inspired by set_short_trid() of trnman.c */
uint i= share->kfile.file % SHARE_ID_MAX + 1;
id= 0;
do
{
for ( ; i <= SHARE_ID_MAX ; i++) /* the range is [1..SHARE_ID_MAX] */
{
void *tmp= NULL;
if (id_to_share[i] == NULL &&
my_atomic_casptr((void **)&id_to_share[i], &tmp, share))
{
id= (uint16) i;
break;
}
}
i= 1; /* scan the whole array */
} while (id == 0);
DBUG_PRINT("info", ("id_to_share: %p -> %u", share, id));
fileid_store(log_data, id);
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
/*
open_file_name is an unresolved name (symlinks are not resolved, datadir
is not realpath-ed, etc) which is good: the log can be moved to another
directory and continue working.
*/
log_array[TRANSLOG_INTERNAL_PARTS + 1].str=
(uchar *)share->open_file_name.str;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length=
share->open_file_name.length + 1;
/*
We can't unlock share->intern_lock before the log entry is written to
ensure no one uses the id before it's logged.
*/
if (unlikely(translog_write_record(&lsn, LOGREC_FILE_ID, trn, tbl_info,
(translog_size_t)
(sizeof(log_data) +
log_array[TRANSLOG_INTERNAL_PARTS +
1].length),
sizeof(log_array)/sizeof(log_array[0]),
log_array, NULL, NULL)))
{
mysql_mutex_unlock(&share->intern_lock);
return 1;
}
/*
Now when translog record is done, we can set share->id.
If we set it before, then translog_write_record may pick up the id
before it's written to the log.
*/
share->id= id;
share->state.logrec_file_id= lsn;
}
mysql_mutex_unlock(&share->intern_lock);
return 0;
}
|
O0
|
c
|
translog_assign_id_to_share:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x4f950
movq -0x28(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x10abef(%rip), %rsi # 0x15a551
movl $0x206a, %edx # imm = 0x206A
callq 0x4b220
movq -0x28(%rbp), %rax
movzwl 0x620(%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4fb4f
movq -0x28(%rbp), %rax
movl 0x760(%rax), %eax
movl $0xffff, %ecx # imm = 0xFFFF
cltd
idivl %ecx
addl $0x1, %edx
movl %edx, -0x78(%rbp)
movw $0x0, -0x1a(%rbp)
jmp 0x4f9b9
cmpl $0xffff, -0x78(%rbp) # imm = 0xFFFF
ja 0x4fa59
movq $0x0, -0x80(%rbp)
movq 0xc35853(%rip), %rax # 0xc85228
movl -0x78(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
jne 0x4fa49
movq 0xc35842(%rip), %rcx # 0xc85228
movl -0x78(%rbp), %eax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
movq -0x88(%rbp), %rsi
lock
cmpxchgq %rsi, (%rcx,%rdx,8)
movq %rax, %rcx
sete %al
movb %al, -0xa1(%rbp)
movq %rcx, -0xa0(%rbp)
testb $0x1, %al
jne 0x4fa29
movq -0xa0(%rbp), %rax
movq %rax, -0x80(%rbp)
movb -0xa1(%rbp), %al
andb $0x1, %al
movb %al, -0x89(%rbp)
testb $0x1, -0x89(%rbp)
je 0x4fa49
movl -0x78(%rbp), %eax
movw %ax, -0x1a(%rbp)
jmp 0x4fa59
jmp 0x4fa4b
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x4f9b9
movl $0x1, -0x78(%rbp)
movzwl -0x1a(%rbp), %eax
cmpl $0x0, %eax
je 0x4f9b7
jmp 0x4fa6f
jmp 0x4fa71
jmp 0x4fa73
leaq -0x72(%rbp), %rax
movq %rax, -0x98(%rbp)
movw -0x1a(%rbp), %cx
movq -0x98(%rbp), %rax
movw %cx, (%rax)
leaq -0x72(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x2, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x5e0(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq 0x5e8(%rax), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
addq $0x2, %rax
movl %eax, %r8d
leaq -0x70(%rbp), %rax
leaq -0x30(%rbp), %rdi
movl $0x23, %esi
movl $0x4, %r9d
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x4f4f0
movsbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4fb31
movq -0x28(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x4b290
movl $0x1, -0x4(%rbp)
jmp 0x4fb66
movw -0x1a(%rbp), %cx
movq -0x28(%rbp), %rax
movw %cx, 0x620(%rax)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x190(%rax)
movq -0x28(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x4b290
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_assign_id_to_share:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short $+2
loc_4F950:
mov rdi, [rbp+var_28]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 206Ah
call inline_mysql_mutex_lock_7
mov rax, [rbp+var_28]
movzx eax, word ptr [rax+620h]
cmp eax, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_4FB4F
mov rax, [rbp+var_28]
mov eax, [rax+760h]
mov ecx, 0FFFFh
cdq
idiv ecx
add edx, 1
mov [rbp+var_78], edx
mov [rbp+var_1A], 0
loc_4F9B7:
jmp short $+2
loc_4F9B9:
cmp [rbp+var_78], 0FFFFh
ja loc_4FA59
mov [rbp+var_80], 0
mov rax, cs:id_to_share
mov ecx, [rbp+var_78]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_4FA49
mov rcx, cs:id_to_share
mov eax, [rbp+var_78]
mov edx, eax
mov rax, [rbp+var_28]
mov [rbp+var_88], rax
mov rax, [rbp+var_80]
mov rsi, [rbp+var_88]
lock cmpxchg [rcx+rdx*8], rsi
mov rcx, rax
setz al
mov [rbp+var_A1], al
mov [rbp+var_A0], rcx
test al, 1
jnz short loc_4FA29
mov rax, [rbp+var_A0]
mov [rbp+var_80], rax
loc_4FA29:
mov al, [rbp+var_A1]
and al, 1
mov [rbp+var_89], al
test [rbp+var_89], 1
jz short loc_4FA49
mov eax, [rbp+var_78]
mov [rbp+var_1A], ax
jmp short loc_4FA59
loc_4FA49:
jmp short $+2
loc_4FA4B:
mov eax, [rbp+var_78]
add eax, 1
mov [rbp+var_78], eax
jmp loc_4F9B9
loc_4FA59:
mov [rbp+var_78], 1
movzx eax, [rbp+var_1A]
cmp eax, 0
jz loc_4F9B7
jmp short $+2
loc_4FA6F:
jmp short $+2
loc_4FA71:
jmp short $+2
loc_4FA73:
lea rax, [rbp+var_72]
mov [rbp+var_98], rax
mov cx, [rbp+var_1A]
mov rax, [rbp+var_98]
mov [rax], cx
lea rax, [rbp+var_72]
mov [rbp+var_50], rax
mov [rbp+var_48], 2
mov rax, [rbp+var_28]
mov rax, [rax+5E0h]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov rax, [rax+5E8h]
add rax, 1
mov [rbp+var_38], rax
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rax, [rbp+var_38]
add rax, 2
mov r8d, eax
lea rax, [rbp+var_70]
lea rdi, [rbp+var_30]
mov esi, 23h ; '#'
mov r9d, 4
xor r10d, r10d
mov [rsp+0C0h+var_C0], rax
mov [rsp+0C0h+var_B8], 0
mov [rsp+0C0h+var_B0], 0
call translog_write_record
movsx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_4FB31
mov rdi, [rbp+var_28]
add rdi, 8F0h
call inline_mysql_mutex_unlock_7
mov [rbp+var_4], 1
jmp short loc_4FB66
loc_4FB31:
mov cx, [rbp+var_1A]
mov rax, [rbp+var_28]
mov [rax+620h], cx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+190h], rcx
loc_4FB4F:
mov rdi, [rbp+var_28]
add rdi, 8F0h
call inline_mysql_mutex_unlock_7
mov [rbp+var_4], 0
loc_4FB66:
mov eax, [rbp+var_4]
add rsp, 0C0h
pop rbp
retn
|
long long translog_assign_id_to_share(long long *a1, long long a2)
{
unsigned int v3; // [rsp+48h] [rbp-78h]
__int16 v4; // [rsp+4Eh] [rbp-72h] BYREF
_QWORD v5[7]; // [rsp+50h] [rbp-70h] BYREF
long long v6; // [rsp+88h] [rbp-38h]
long long v7; // [rsp+90h] [rbp-30h] BYREF
signed long long v8; // [rsp+98h] [rbp-28h]
__int16 v9; // [rsp+A6h] [rbp-1Ah]
long long v10; // [rsp+A8h] [rbp-18h]
long long *v11; // [rsp+B0h] [rbp-10h]
v11 = a1;
v10 = a2;
v8 = *a1;
inline_mysql_mutex_lock_7(
v8 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x206Au);
if ( *(_WORD *)(v8 + 1568) )
goto LABEL_12;
v3 = *(_DWORD *)(v8 + 1888) % 0xFFFF + 1;
v9 = 0;
do
{
while ( 1 )
{
if ( v3 > 0xFFFF )
goto LABEL_8;
if ( !*(_QWORD *)(id_to_share + 8LL * v3)
&& !_InterlockedCompareExchange64((volatile signed long long *)(id_to_share + 8LL * v3), v8, 0LL) )
{
break;
}
++v3;
}
v9 = v3;
LABEL_8:
v3 = 1;
}
while ( !v9 );
v4 = v9;
v5[4] = &v4;
v5[5] = 2LL;
v5[6] = *(_QWORD *)(v8 + 1504);
v6 = *(_QWORD *)(v8 + 1512) + 1LL;
if ( !translog_write_record((long long)&v7, 0x23u, v10, v11, v6 + 2, 4u, v5, 0LL, 0LL) )
{
*(_WORD *)(v8 + 1568) = v9;
*(_QWORD *)(v8 + 400) = v7;
LABEL_12:
inline_mysql_mutex_unlock_7(v8 + 2288);
return 0;
}
inline_mysql_mutex_unlock_7(v8 + 2288);
return 1;
}
|
translog_assign_id_to_share:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0014f950
LAB_0014f950:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8f0
LEA RSI,[0x25a551]
MOV EDX,0x206a
CALL 0x0014b220
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,word ptr [RAX + 0x620]
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0014fb4f
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x760]
MOV ECX,0xffff
CDQ
IDIV ECX
ADD EDX,0x1
MOV dword ptr [RBP + -0x78],EDX
MOV word ptr [RBP + -0x1a],0x0
LAB_0014f9b7:
JMP 0x0014f9b9
LAB_0014f9b9:
CMP dword ptr [RBP + -0x78],0xffff
JA 0x0014fa59
MOV qword ptr [RBP + -0x80],0x0
MOV RAX,qword ptr [0x00d85228]
MOV ECX,dword ptr [RBP + -0x78]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x0014fa49
MOV RCX,qword ptr [0x00d85228]
MOV EAX,dword ptr [RBP + -0x78]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x88]
CMPXCHG.LOCK qword ptr [RCX + RDX*0x8],RSI
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0xa1],AL
MOV qword ptr [RBP + -0xa0],RCX
TEST AL,0x1
JNZ 0x0014fa29
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x80],RAX
LAB_0014fa29:
MOV AL,byte ptr [RBP + -0xa1]
AND AL,0x1
MOV byte ptr [RBP + -0x89],AL
TEST byte ptr [RBP + -0x89],0x1
JZ 0x0014fa49
MOV EAX,dword ptr [RBP + -0x78]
MOV word ptr [RBP + -0x1a],AX
JMP 0x0014fa59
LAB_0014fa49:
JMP 0x0014fa4b
LAB_0014fa4b:
MOV EAX,dword ptr [RBP + -0x78]
ADD EAX,0x1
MOV dword ptr [RBP + -0x78],EAX
JMP 0x0014f9b9
LAB_0014fa59:
MOV dword ptr [RBP + -0x78],0x1
MOVZX EAX,word ptr [RBP + -0x1a]
CMP EAX,0x0
JZ 0x0014f9b7
JMP 0x0014fa6f
LAB_0014fa6f:
JMP 0x0014fa71
LAB_0014fa71:
JMP 0x0014fa73
LAB_0014fa73:
LEA RAX,[RBP + -0x72]
MOV qword ptr [RBP + -0x98],RAX
MOV CX,word ptr [RBP + -0x1a]
MOV RAX,qword ptr [RBP + -0x98]
MOV word ptr [RAX],CX
LEA RAX,[RBP + -0x72]
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x48],0x2
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x5e0]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x5e8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV R8D,EAX
LEA RAX,[RBP + -0x70]
LEA RDI,[RBP + -0x30]
MOV ESI,0x23
MOV R9D,0x4
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
CALL 0x0014f4f0
MOVSX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0014fb31
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8f0
CALL 0x0014b290
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014fb66
LAB_0014fb31:
MOV CX,word ptr [RBP + -0x1a]
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX + 0x620],CX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x190],RCX
LAB_0014fb4f:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8f0
CALL 0x0014b290
MOV dword ptr [RBP + -0x4],0x0
LAB_0014fb66:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xc0
POP RBP
RET
|
int4 translog_assign_id_to_share(long *param_1,int8 param_2)
{
long *plVar1;
char cVar2;
bool bVar3;
uint local_80;
short local_7a;
int1 local_78 [32];
short *local_58;
int8 local_50;
int8 local_48;
long local_40;
int8 local_38;
long local_30;
short local_22;
int8 local_20;
long *local_18;
local_30 = *param_1;
local_20 = param_2;
local_18 = param_1;
inline_mysql_mutex_lock
(local_30 + 0x8f0,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x206a);
if (*(short *)(local_30 + 0x620) == 0) {
local_80 = *(int *)(local_30 + 0x760) % 0xffff + 1;
local_22 = 0;
do {
for (; local_80 < 0x10000; local_80 = local_80 + 1) {
if (*(long *)(id_to_share + (ulong)local_80 * 8) == 0) {
plVar1 = (long *)(id_to_share + (ulong)local_80 * 8);
LOCK();
bVar3 = *plVar1 == 0;
if (bVar3) {
*plVar1 = local_30;
}
UNLOCK();
if (bVar3) {
local_22 = (short)local_80;
break;
}
}
}
local_80 = 1;
} while (local_22 == 0);
local_7a = local_22;
local_58 = &local_7a;
local_50 = 2;
local_48 = *(int8 *)(local_30 + 0x5e0);
local_40 = *(long *)(local_30 + 0x5e8) + 1;
cVar2 = translog_write_record(&local_38,0x23,local_20,local_18,(int)local_40 + 2,4,local_78,0,0)
;
if (cVar2 != '\0') {
inline_mysql_mutex_unlock(local_30 + 0x8f0);
return 1;
}
*(short *)(local_30 + 0x620) = local_22;
*(int8 *)(local_30 + 400) = local_38;
}
inline_mysql_mutex_unlock(local_30 + 0x8f0);
return 0;
}
|
|
12,282
|
google::protobuf::Descriptor::ExtensionRange::CopyTo(google::protobuf::DescriptorProto_ExtensionRange*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
void Descriptor::ExtensionRange::CopyTo(
DescriptorProto_ExtensionRange* proto) const {
proto->set_start(this->start);
proto->set_end(this->end);
if (options_ != &ExtensionRangeOptions::default_instance()) {
*proto->mutable_options() = *options_;
}
}
|
O3
|
cpp
|
google::protobuf::Descriptor::ExtensionRange::CopyTo(google::protobuf::DescriptorProto_ExtensionRange*) const:
pushq %r14
pushq %rbx
pushq %rax
movl (%rdi), %ecx
movl 0x10(%rsi), %eax
movl %eax, %edx
orl $0x2, %edx
movl %edx, 0x10(%rsi)
movl %ecx, 0x20(%rsi)
movl 0x4(%rdi), %ecx
movl %eax, %edx
orl $0x6, %edx
movl %edx, 0x10(%rsi)
movl %ecx, 0x24(%rsi)
movq 0x8(%rdi), %r14
cmpq 0x14e5c9(%rip), %r14 # 0x20ff20
je 0xc1995
movq %rsi, %rbx
orl $0x7, %eax
movl %eax, 0x10(%rsi)
movq 0x18(%rsi), %rdi
testq %rdi, %rdi
jne 0xc1986
movq 0x8(%rbx), %rax
movq %rax, %rdi
andq $-0x4, %rdi
testb $0x1, %al
jne 0xc199d
callq 0xfa418
movq %rax, %rdi
movq %rax, 0x18(%rbx)
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xedf50
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%rdi), %rdi
jmp 0xc197a
|
_ZNK6google8protobuf10Descriptor14ExtensionRange6CopyToEPNS0_30DescriptorProto_ExtensionRangeE:
push r14
push rbx
push rax
mov ecx, [rdi]
mov eax, [rsi+10h]
mov edx, eax
or edx, 2
mov [rsi+10h], edx
mov [rsi+20h], ecx
mov ecx, [rdi+4]
mov edx, eax
or edx, 6
mov [rsi+10h], edx
mov [rsi+24h], ecx
mov r14, [rdi+8]
cmp r14, cs:_ZN6google8protobuf40_ExtensionRangeOptions_default_instance_E_ptr
jz short loc_C1995
mov rbx, rsi
or eax, 7
mov [rsi+10h], eax
mov rdi, [rsi+18h]
test rdi, rdi
jnz short loc_C1986
mov rax, [rbx+8]
mov rdi, rax
and rdi, 0FFFFFFFFFFFFFFFCh
test al, 1
jnz short loc_C199D
loc_C197A:
call _ZN6google8protobuf5Arena18CreateMaybeMessageINS0_21ExtensionRangeOptionsEJEEEPT_PS1_DpOT0_; google::protobuf::Arena::CreateMaybeMessage<google::protobuf::ExtensionRangeOptions>(google::protobuf::Arena*)
mov rdi, rax; this
mov [rbx+18h], rax
loc_C1986:
mov rsi, r14; google::protobuf::ExtensionRangeOptions *
add rsp, 8
pop rbx
pop r14
jmp _ZN6google8protobuf21ExtensionRangeOptions8CopyFromERKS1_; google::protobuf::ExtensionRangeOptions::CopyFrom(google::protobuf::ExtensionRangeOptions const&)
loc_C1995:
add rsp, 8
pop rbx
pop r14
retn
loc_C199D:
mov rdi, [rdi]
jmp short loc_C197A
|
long long google::protobuf::Descriptor::ExtensionRange::CopyTo(
google::protobuf::Descriptor::ExtensionRange *this,
google::protobuf::DescriptorProto_ExtensionRange *a2)
{
int v2; // ecx
long long result; // rax
int v4; // ecx
const google::protobuf::ExtensionRangeOptions *v5; // r14
google::protobuf::ExtensionRangeOptions *v6; // rdi
_QWORD *v7; // rdi
v2 = *(_DWORD *)this;
result = *((unsigned int *)a2 + 4);
*((_DWORD *)a2 + 4) |= 2u;
*((_DWORD *)a2 + 8) = v2;
v4 = *((_DWORD *)this + 1);
*((_DWORD *)a2 + 4) = result | 6;
*((_DWORD *)a2 + 9) = v4;
v5 = (const google::protobuf::ExtensionRangeOptions *)*((_QWORD *)this + 1);
if ( v5 != (const google::protobuf::ExtensionRangeOptions *)&google::protobuf::_ExtensionRangeOptions_default_instance_ )
{
*((_DWORD *)a2 + 4) = result | 7;
v6 = (google::protobuf::ExtensionRangeOptions *)*((_QWORD *)a2 + 3);
if ( !v6 )
{
v7 = (_QWORD *)(*((_QWORD *)a2 + 1) & 0xFFFFFFFFFFFFFFFCLL);
if ( (*((_QWORD *)a2 + 1) & 1) != 0 )
v7 = (_QWORD *)*v7;
v6 = (google::protobuf::ExtensionRangeOptions *)google::protobuf::Arena::CreateMaybeMessage<google::protobuf::ExtensionRangeOptions>(v7);
*((_QWORD *)a2 + 3) = v6;
}
return google::protobuf::ExtensionRangeOptions::CopyFrom(v6, v5);
}
return result;
}
|
CopyTo:
PUSH R14
PUSH RBX
PUSH RAX
MOV ECX,dword ptr [RDI]
MOV EAX,dword ptr [RSI + 0x10]
MOV EDX,EAX
OR EDX,0x2
MOV dword ptr [RSI + 0x10],EDX
MOV dword ptr [RSI + 0x20],ECX
MOV ECX,dword ptr [RDI + 0x4]
MOV EDX,EAX
OR EDX,0x6
MOV dword ptr [RSI + 0x10],EDX
MOV dword ptr [RSI + 0x24],ECX
MOV R14,qword ptr [RDI + 0x8]
CMP R14,qword ptr [0x0030ff20]
JZ 0x001c1995
MOV RBX,RSI
OR EAX,0x7
MOV dword ptr [RSI + 0x10],EAX
MOV RDI,qword ptr [RSI + 0x18]
TEST RDI,RDI
JNZ 0x001c1986
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,RAX
AND RDI,-0x4
TEST AL,0x1
JNZ 0x001c199d
LAB_001c197a:
CALL 0x001fa418
MOV RDI,RAX
MOV qword ptr [RBX + 0x18],RAX
LAB_001c1986:
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001edf50
LAB_001c1995:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001c199d:
MOV RDI,qword ptr [RDI]
JMP 0x001c197a
|
/* google::protobuf::Descriptor::ExtensionRange::CopyTo(google::protobuf::DescriptorProto_ExtensionRange*)
const */
void __thiscall
google::protobuf::Descriptor::ExtensionRange::CopyTo
(ExtensionRange *this,DescriptorProto_ExtensionRange *param_1)
{
int4 uVar1;
uint uVar2;
ExtensionRangeOptions *pEVar3;
ExtensionRangeOptions *this_00;
Arena *pAVar4;
uVar1 = *(int4 *)this;
uVar2 = *(uint *)(param_1 + 0x10);
*(uint *)(param_1 + 0x10) = uVar2 | 2;
*(int4 *)(param_1 + 0x20) = uVar1;
uVar1 = *(int4 *)(this + 4);
*(uint *)(param_1 + 0x10) = uVar2 | 6;
*(int4 *)(param_1 + 0x24) = uVar1;
pEVar3 = *(ExtensionRangeOptions **)(this + 8);
if (pEVar3 != (ExtensionRangeOptions *)PTR__ExtensionRangeOptions_default_instance__0030ff20) {
*(uint *)(param_1 + 0x10) = uVar2 | 7;
this_00 = *(ExtensionRangeOptions **)(param_1 + 0x18);
if (this_00 == (ExtensionRangeOptions *)0x0) {
pAVar4 = (Arena *)(*(ulong *)(param_1 + 8) & 0xfffffffffffffffc);
if ((*(ulong *)(param_1 + 8) & 1) != 0) {
pAVar4 = *(Arena **)pAVar4;
}
this_00 = Arena::CreateMaybeMessage<google::protobuf::ExtensionRangeOptions>(pAVar4);
*(ExtensionRangeOptions **)(param_1 + 0x18) = this_00;
}
ExtensionRangeOptions::CopyFrom(this_00,pEVar3);
return;
}
return;
}
|
|
12,283
|
testing::internal::CodePointToUtf8[abi:cxx11](unsigned int)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
std::string CodePointToUtf8(uint32_t code_point) {
if (code_point > kMaxCodePoint4) {
return "(Invalid Unicode 0x" + String::FormatHexUInt32(code_point) + ")";
}
char str[5]; // Big enough for the largest valid code point.
if (code_point <= kMaxCodePoint1) {
str[1] = '\0';
str[0] = static_cast<char>(code_point); // 0xxxxxxx
} else if (code_point <= kMaxCodePoint2) {
str[2] = '\0';
str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx
} else if (code_point <= kMaxCodePoint3) {
str[3] = '\0';
str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx
} else { // code_point <= kMaxCodePoint4
str[4] = '\0';
str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[0] = static_cast<char>(0xF0 | code_point); // 11110xxx
}
return str;
}
|
O0
|
cpp
|
testing::internal::CodePointToUtf8[abi:cxx11](unsigned int):
subq $0x88, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
cmpl $0x1fffff, 0x7c(%rsp) # imm = 0x1FFFFF
jbe 0x26c01
movl 0x7c(%rsp), %esi
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x26d60
movq 0x8(%rsp), %rdx
leaq 0x4e08a(%rip), %rsi # 0x74c17
leaq 0x58(%rsp), %rdi
callq 0x45b10
jmp 0x26b99
movq 0x10(%rsp), %rdi
leaq 0x4e497(%rip), %rdx # 0x7503c
leaq 0x58(%rsp), %rsi
callq 0x45200
jmp 0x26bb1
leaq 0x58(%rsp), %rdi
callq 0xec60
leaq 0x38(%rsp), %rdi
callq 0xec60
jmp 0x26d48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x26bf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xec60
leaq 0x38(%rsp), %rdi
callq 0xec60
jmp 0x26d55
cmpl $0x7f, 0x7c(%rsp)
ja 0x26c1a
movb $0x0, 0x28(%rsp)
movl 0x7c(%rsp), %eax
movb %al, 0x27(%rsp)
jmp 0x26cff
cmpl $0x7ff, 0x7c(%rsp) # imm = 0x7FF
ja 0x26c53
movb $0x0, 0x29(%rsp)
leaq 0x7c(%rsp), %rdi
movl $0x6, %esi
callq 0x4a100
orl $0x80, %eax
movb %al, 0x28(%rsp)
movl 0x7c(%rsp), %eax
orl $0xc0, %eax
movb %al, 0x27(%rsp)
jmp 0x26cfd
cmpl $0xffff, 0x7c(%rsp) # imm = 0xFFFF
ja 0x26ca1
movb $0x0, 0x2a(%rsp)
leaq 0x7c(%rsp), %rdi
movl $0x6, %esi
callq 0x4a100
orl $0x80, %eax
movb %al, 0x29(%rsp)
leaq 0x7c(%rsp), %rdi
movl $0x6, %esi
callq 0x4a100
orl $0x80, %eax
movb %al, 0x28(%rsp)
movl 0x7c(%rsp), %eax
orl $0xe0, %eax
movb %al, 0x27(%rsp)
jmp 0x26cfb
movb $0x0, 0x2b(%rsp)
leaq 0x7c(%rsp), %rdi
movl $0x6, %esi
callq 0x4a100
orl $0x80, %eax
movb %al, 0x2a(%rsp)
leaq 0x7c(%rsp), %rdi
movl $0x6, %esi
callq 0x4a100
orl $0x80, %eax
movb %al, 0x29(%rsp)
leaq 0x7c(%rsp), %rdi
movl $0x6, %esi
callq 0x4a100
orl $0x80, %eax
movb %al, 0x28(%rsp)
movl 0x7c(%rsp), %eax
orl $0xf0, %eax
movb %al, 0x27(%rsp)
jmp 0x26cfd
jmp 0x26cff
leaq 0x26(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xb920
movq 0x10(%rsp), %rdi
movq (%rsp), %rdx
leaq 0x27(%rsp), %rsi
callq 0xe840
jmp 0x26d22
leaq 0x26(%rsp), %rdi
callq 0xb500
jmp 0x26d48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x26(%rsp), %rdi
callq 0xb500
jmp 0x26d55
movq 0x18(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0xb910
nop
|
_ZN7testing8internal15CodePointToUtf8B5cxx11Ej:
sub rsp, 88h
mov [rsp+88h+var_78], rdi
mov rax, rdi
mov [rsp+88h+var_70], rax
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_C], esi
cmp [rsp+88h+var_C], 1FFFFFh
jbe loc_26C01
mov esi, [rsp+88h+var_C]
lea rdi, [rsp+88h+var_50]
mov [rsp+88h+var_80], rdi
call _ZN7testing8internal6String15FormatHexUInt32B5cxx11Ej; testing::internal::String::FormatHexUInt32(uint)
mov rdx, [rsp+88h+var_80]
lea rsi, aInvalidUnicode; "(Invalid Unicode 0x"
lea rdi, [rsp+88h+var_30]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_26B99:
mov rdi, [rsp+88h+var_78]
lea rdx, aTeardowntestsu+12h; ")"
lea rsi, [rsp+88h+var_30]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_26BB1:
lea rdi, [rsp+88h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_26D48
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_26BF2
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26BF2:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_26D55
loc_26C01:
cmp [rsp+88h+var_C], 7Fh
ja short loc_26C1A
mov [rsp+88h+var_60], 0
mov eax, [rsp+88h+var_C]
mov [rsp+88h+var_61], al
jmp loc_26CFF
loc_26C1A:
cmp [rsp+88h+var_C], 7FFh
ja short loc_26C53
mov [rsp+88h+var_5F], 0
lea rdi, [rsp+88h+var_C]; this
mov esi, offset byte_6; unsigned int *
call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int)
or eax, 80h
mov [rsp+88h+var_60], al
mov eax, [rsp+88h+var_C]
or eax, 0C0h
mov [rsp+88h+var_61], al
jmp loc_26CFD
loc_26C53:
cmp [rsp+88h+var_C], 0FFFFh
ja short loc_26CA1
mov [rsp+88h+var_5E], 0
lea rdi, [rsp+88h+var_C]; this
mov esi, offset byte_6; unsigned int *
call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int)
or eax, 80h
mov [rsp+88h+var_5F], al
lea rdi, [rsp+88h+var_C]; this
mov esi, offset byte_6; unsigned int *
call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int)
or eax, 80h
mov [rsp+88h+var_60], al
mov eax, [rsp+88h+var_C]
or eax, 0E0h
mov [rsp+88h+var_61], al
jmp short loc_26CFB
loc_26CA1:
mov [rsp+88h+var_5D], 0
lea rdi, [rsp+88h+var_C]; this
mov esi, offset byte_6; unsigned int *
call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int)
or eax, 80h
mov [rsp+88h+var_5E], al
lea rdi, [rsp+88h+var_C]; this
mov esi, offset byte_6; unsigned int *
call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int)
or eax, 80h
mov [rsp+88h+var_5F], al
lea rdi, [rsp+88h+var_C]; this
mov esi, offset byte_6; unsigned int *
call _ZN7testing8internal11ChopLowBitsEPji; testing::internal::ChopLowBits(uint *,int)
or eax, 80h
mov [rsp+88h+var_60], al
mov eax, [rsp+88h+var_C]
or eax, 0F0h
mov [rsp+88h+var_61], al
loc_26CFB:
jmp short $+2
loc_26CFD:
jmp short $+2
loc_26CFF:
lea rdi, [rsp+88h+var_62]
mov [rsp+88h+var_88], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+88h+var_78]
mov rdx, [rsp+88h+var_88]
lea rsi, [rsp+88h+var_61]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_26D22:
lea rdi, [rsp+88h+var_62]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_26D48
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_1E]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_26D55
loc_26D48:
mov rax, [rsp+88h+var_70]
add rsp, 88h
retn
loc_26D55:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
|
long long testing::internal::CodePointToUtf8[abi:cxx11](
long long a1,
unsigned int a2,
int a3,
int a4,
int a5,
int a6)
{
int v6; // edx
int v7; // edx
int v8; // edx
char v10; // [rsp+26h] [rbp-62h] BYREF
char v11; // [rsp+27h] [rbp-61h] BYREF
char v12; // [rsp+28h] [rbp-60h]
char v13; // [rsp+29h] [rbp-5Fh]
char v14; // [rsp+2Ah] [rbp-5Eh]
char v15; // [rsp+2Bh] [rbp-5Dh]
_BYTE v16[32]; // [rsp+38h] [rbp-50h] BYREF
_BYTE v17[36]; // [rsp+58h] [rbp-30h] BYREF
unsigned int v18; // [rsp+7Ch] [rbp-Ch] BYREF
long long v19; // [rsp+80h] [rbp-8h]
v19 = a1;
v18 = a2;
if ( a2 <= 0x1FFFFF )
{
if ( v18 > 0x7F )
{
if ( v18 > 0x7FF )
{
if ( v18 > 0xFFFF )
{
v15 = 0;
v14 = testing::internal::ChopLowBits((testing::internal *)&v18, (unsigned int *)&byte_6, a3) | 0x80;
v13 = testing::internal::ChopLowBits((testing::internal *)&v18, (unsigned int *)&byte_6, v7) | 0x80;
v12 = testing::internal::ChopLowBits((testing::internal *)&v18, (unsigned int *)&byte_6, v8) | 0x80;
v11 = v18 | 0xF0;
}
else
{
v14 = 0;
v13 = testing::internal::ChopLowBits((testing::internal *)&v18, (unsigned int *)&byte_6, a3) | 0x80;
v12 = testing::internal::ChopLowBits((testing::internal *)&v18, (unsigned int *)&byte_6, v6) | 0x80;
v11 = v18 | 0xE0;
}
}
else
{
v13 = 0;
v12 = testing::internal::ChopLowBits((testing::internal *)&v18, (unsigned int *)&byte_6, a3) | 0x80;
v11 = v18 | 0xC0;
}
}
else
{
v12 = 0;
v11 = v18;
}
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)&v11, (long long)&v10);
std::allocator<char>::~allocator(&v10, &v11);
}
else
{
testing::internal::String::FormatHexUInt32[abi:cxx11]((unsigned int)v16, v18, a3, a4, a5, a6);
std::operator+<char>(v17, "(Invalid Unicode 0x", v16);
std::operator+<char>(a1, v17, ")");
std::string::~string(v17);
std::string::~string(v16);
}
return a1;
}
|
CodePointToUtf8[abi:cxx11]:
SUB RSP,0x88
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x80],RDI
MOV dword ptr [RSP + 0x7c],ESI
CMP dword ptr [RSP + 0x7c],0x1fffff
JBE 0x00126c01
MOV ESI,dword ptr [RSP + 0x7c]
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00126d60
MOV RDX,qword ptr [RSP + 0x8]
LAB_00126b86:
LEA RSI,[0x174c17]
LEA RDI,[RSP + 0x58]
CALL 0x00145b10
JMP 0x00126b99
LAB_00126b99:
MOV RDI,qword ptr [RSP + 0x10]
LEA RDX,[0x17503c]
LEA RSI,[RSP + 0x58]
CALL 0x00145200
JMP 0x00126bb1
LAB_00126bb1:
LEA RDI,[RSP + 0x58]
CALL 0x0010ec60
LEA RDI,[RSP + 0x38]
CALL 0x0010ec60
JMP 0x00126d48
LAB_00126c01:
CMP dword ptr [RSP + 0x7c],0x7f
JA 0x00126c1a
MOV byte ptr [RSP + 0x28],0x0
MOV EAX,dword ptr [RSP + 0x7c]
MOV byte ptr [RSP + 0x27],AL
JMP 0x00126cff
LAB_00126c1a:
CMP dword ptr [RSP + 0x7c],0x7ff
JA 0x00126c53
MOV byte ptr [RSP + 0x29],0x0
LEA RDI,[RSP + 0x7c]
MOV ESI,0x6
CALL 0x0014a100
OR EAX,0x80
MOV byte ptr [RSP + 0x28],AL
MOV EAX,dword ptr [RSP + 0x7c]
OR EAX,0xc0
MOV byte ptr [RSP + 0x27],AL
JMP 0x00126cfd
LAB_00126c53:
CMP dword ptr [RSP + 0x7c],0xffff
JA 0x00126ca1
MOV byte ptr [RSP + 0x2a],0x0
LEA RDI,[RSP + 0x7c]
MOV ESI,0x6
CALL 0x0014a100
OR EAX,0x80
MOV byte ptr [RSP + 0x29],AL
LEA RDI,[RSP + 0x7c]
MOV ESI,0x6
CALL 0x0014a100
OR EAX,0x80
MOV byte ptr [RSP + 0x28],AL
MOV EAX,dword ptr [RSP + 0x7c]
OR EAX,0xe0
MOV byte ptr [RSP + 0x27],AL
JMP 0x00126cfb
LAB_00126ca1:
MOV byte ptr [RSP + 0x2b],0x0
LEA RDI,[RSP + 0x7c]
MOV ESI,0x6
CALL 0x0014a100
OR EAX,0x80
MOV byte ptr [RSP + 0x2a],AL
LEA RDI,[RSP + 0x7c]
MOV ESI,0x6
CALL 0x0014a100
OR EAX,0x80
MOV byte ptr [RSP + 0x29],AL
LEA RDI,[RSP + 0x7c]
MOV ESI,0x6
CALL 0x0014a100
OR EAX,0x80
MOV byte ptr [RSP + 0x28],AL
MOV EAX,dword ptr [RSP + 0x7c]
OR EAX,0xf0
MOV byte ptr [RSP + 0x27],AL
LAB_00126cfb:
JMP 0x00126cfd
LAB_00126cfd:
JMP 0x00126cff
LAB_00126cff:
LEA RDI,[RSP + 0x26]
MOV qword ptr [RSP],RDI
CALL 0x0010b920
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP]
LAB_00126d16:
LEA RSI,[RSP + 0x27]
CALL 0x0010e840
LAB_00126d20:
JMP 0x00126d22
LAB_00126d22:
LEA RDI,[RSP + 0x26]
CALL 0x0010b500
JMP 0x00126d48
LAB_00126d48:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x88
RET
|
/* testing::internal::CodePointToUtf8[abi:cxx11](unsigned int) */
internal * __thiscall testing::internal::CodePointToUtf8_abi_cxx11_(internal *this,uint param_1)
{
allocator local_62;
byte local_61;
byte local_60;
byte local_5f;
byte local_5e;
int1 local_5d;
String local_50 [32];
string local_30 [36];
uint local_c;
internal *local_8;
local_c = param_1;
local_8 = this;
if (param_1 < 0x200000) {
if (param_1 < 0x80) {
local_60 = 0;
local_61 = (byte)param_1;
}
else {
if (param_1 < 0x800) {
local_5f = 0;
local_60 = ChopLowBits(&local_c,6);
local_61 = (byte)local_c | 0xc0;
}
else if (param_1 < 0x10000) {
local_5e = 0;
local_5f = ChopLowBits(&local_c,6);
local_5f = local_5f | 0x80;
local_60 = ChopLowBits(&local_c,6);
local_61 = (byte)local_c | 0xe0;
}
else {
local_5d = 0;
local_5e = ChopLowBits(&local_c,6);
local_5e = local_5e | 0x80;
local_5f = ChopLowBits(&local_c,6);
local_5f = local_5f | 0x80;
local_60 = ChopLowBits(&local_c,6);
local_61 = (byte)local_c | 0xf0;
}
local_60 = local_60 | 0x80;
}
std::allocator<char>::allocator();
/* try { // try from 00126d16 to 00126d1f has its CatchHandler @ 00126d2e */
std::__cxx11::string::string<std::allocator<char>>((string *)this,(char *)&local_61,&local_62);
std::allocator<char>::~allocator((allocator<char> *)&local_62);
}
else {
String::FormatHexUInt32_abi_cxx11_(local_50,param_1);
/* try { // try from 00126b86 to 00126b96 has its CatchHandler @ 00126bca */
std::operator+((char *)local_30,(string *)"(Invalid Unicode 0x");
/* try { // try from 00126b99 to 00126bae has its CatchHandler @ 00126bda */
std::operator+((string *)this,(char *)local_30);
std::__cxx11::string::~string(local_30);
std::__cxx11::string::~string((string *)local_50);
}
return this;
}
|
|
12,284
|
psi_rwlock_rdlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_rdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_rwlock_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1b81ee(%rip), %rax # 0x1ea0d8
movq (%rax), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x324e0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x31f40
leaq 0x1b81ab(%rip), %rax # 0x1ea0d8
movq (%rax), %rax
movq 0x1a8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_rwlock_rdlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_rdlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_31F40
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_31F40:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_rwlock_rdlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[0] + 52))(
v6,
*(_QWORD *)(a1 + 144),
0LL,
a2,
a3);
v4 = my_rw_rdlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 53))(v5, v4);
return v4;
}
|
psi_rwlock_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2ea0d8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001324e0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00131f40
LEA RAX,[0x2ea0d8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00131f40:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),0,param_2,param_3);
uVar1 = my_rw_rdlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
|
|
12,285
|
blst_core_verify_pk_in_g2
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/aggregate.c
|
BLST_ERROR blst_core_verify_pk_in_g2(const POINTonE2_affine *pk,
const POINTonE1_affine *signature,
int hash_or_encode,
const void *msg, size_t msg_len,
const void *DST, size_t DST_len,
const void *aug, size_t aug_len)
{
PAIRING ctx;
BLST_ERROR ret;
ctx.ctrl = AGGR_UNDEFINED | (hash_or_encode ? AGGR_HASH_OR_ENCODE : 0);
ctx.nelems = 0;
ctx.DST = DST;
ctx.DST_len = DST_len;
ret = PAIRING_Aggregate_PK_in_G2(&ctx, pk, 1, signature, 1, NULL, 0,
msg, msg_len, aug, aug_len);
if (ret != BLST_SUCCESS)
return ret;
PAIRING_Commit(&ctx);
return PAIRING_FinalVerify(&ctx, NULL) ? BLST_SUCCESS : BLST_VERIFY_FAIL;
}
|
O0
|
c
|
blst_core_verify_pk_in_g2:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xce8, %rsp # imm = 0xCE8
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movl -0x24(%rbp), %edx
xorl %eax, %eax
movl $0x40, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl $0x0, %eax
movl %eax, -0xcb8(%rbp)
movl $0x0, -0xcb4(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xcb0(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0xca8(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rbx
movq -0x38(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rax
leaq -0xcb8(%rbp), %rdi
movl $0x1, %r8d
xorl %edx, %edx
movl %edx, %r9d
movq %r8, %rdx
movq $0x0, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0xaf340
movl %eax, -0xcbc(%rbp)
cmpl $0x0, -0xcbc(%rbp)
je 0xb0be0
movl -0xcbc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xb0c10
leaq -0xcb8(%rbp), %rdi
callq 0xb0090
leaq -0xcb8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb03b0
movq %rax, %rdx
movl $0x5, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0xce8, %rsp # imm = 0xCE8
popq %rbx
popq %rbp
retq
nopl (%rax)
|
blst_core_verify_pk_in_g2:
push rbp
mov rbp, rsp
push rbx
sub rsp, 0CE8h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_30], rcx
mov [rbp+var_38], r8
mov [rbp+var_40], r9
mov edx, [rbp+var_24]
xor eax, eax
mov ecx, 40h ; '@'
cmp edx, 0
cmovnz eax, ecx
or eax, 0
mov [rbp+var_CB8], eax
mov [rbp+var_CB4], 0
mov rax, [rbp+var_40]
mov [rbp+var_CB0], rax
mov rax, [rbp+arg_0]
mov [rbp+var_CA8], rax
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_20]
mov rbx, [rbp+var_30]
mov r11, [rbp+var_38]
mov r10, [rbp+arg_8]
mov rax, [rbp+arg_10]
lea rdi, [rbp+var_CB8]
mov r8d, 1
xor edx, edx
mov r9d, edx
mov rdx, r8
mov [rsp+0CF0h+var_CF0], 0
mov [rsp+0CF0h+var_CE8], rbx
mov [rsp+0CF0h+var_CE0], r11
mov [rsp+0CF0h+var_CD8], r10
mov [rsp+0CF0h+var_CD0], rax
call PAIRING_Aggregate_PK_in_G2
mov [rbp+var_CBC], eax
cmp [rbp+var_CBC], 0
jz short loc_B0BE0
mov eax, [rbp+var_CBC]
mov [rbp+var_C], eax
jmp short loc_B0C10
loc_B0BE0:
lea rdi, [rbp+var_CB8]
call PAIRING_Commit
lea rdi, [rbp+var_CB8]
xor eax, eax
mov esi, eax
call PAIRING_FinalVerify
mov rdx, rax
mov eax, 5
xor ecx, ecx
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_C], eax
loc_B0C10:
mov eax, [rbp+var_C]
add rsp, 0CE8h
pop rbx
pop rbp
retn
|
long long blst_core_verify_pk_in_g2(
long long a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
int v9; // eax
unsigned long long v10; // rdx
unsigned int v11; // eax
unsigned int v13; // [rsp+34h] [rbp-CBCh]
_DWORD v14[2]; // [rsp+38h] [rbp-CB8h] BYREF
long long v15; // [rsp+40h] [rbp-CB0h]
long long v16; // [rsp+48h] [rbp-CA8h]
long long v17; // [rsp+CB0h] [rbp-40h]
long long v18; // [rsp+CB8h] [rbp-38h]
long long v19; // [rsp+CC0h] [rbp-30h]
int v20; // [rsp+CCCh] [rbp-24h]
long long v21; // [rsp+CD0h] [rbp-20h]
long long v22; // [rsp+CD8h] [rbp-18h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v9 = 0;
if ( a3 )
v9 = 64;
v14[0] = v9;
v14[1] = 0;
v15 = v17;
v16 = a7;
v13 = PAIRING_Aggregate_PK_in_G2(v14, v22, 1LL, v21, 1LL, 0LL, 0LL, v19, v18, a8, a9);
if ( v13 )
{
return v13;
}
else
{
PAIRING_Commit(v14);
v10 = PAIRING_FinalVerify(v14, 0LL);
v11 = 5;
if ( v10 )
return 0;
return v11;
}
}
|
blst_core_verify_pk_in_g2:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xce8
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV qword ptr [RBP + -0x30],RCX
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x40],R9
MOV EDX,dword ptr [RBP + -0x24]
XOR EAX,EAX
MOV ECX,0x40
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x0
MOV dword ptr [RBP + -0xcb8],EAX
MOV dword ptr [RBP + -0xcb4],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0xcb0],RAX
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0xca8],RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV RBX,qword ptr [RBP + -0x30]
MOV R11,qword ptr [RBP + -0x38]
MOV R10,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x20]
LEA RDI,[RBP + -0xcb8]
MOV R8D,0x1
XOR EDX,EDX
MOV R9D,EDX
MOV RDX,R8
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x10],R11
MOV qword ptr [RSP + 0x18],R10
MOV qword ptr [RSP + 0x20],RAX
CALL 0x001af340
MOV dword ptr [RBP + -0xcbc],EAX
CMP dword ptr [RBP + -0xcbc],0x0
JZ 0x001b0be0
MOV EAX,dword ptr [RBP + -0xcbc]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001b0c10
LAB_001b0be0:
LEA RDI,[RBP + -0xcb8]
CALL 0x001b0090
LEA RDI,[RBP + -0xcb8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001b03b0
MOV RDX,RAX
MOV EAX,0x5
XOR ECX,ECX
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0xc],EAX
LAB_001b0c10:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0xce8
POP RBX
POP RBP
RET
|
int blst_core_verify_pk_in_g2
(int8 param_1,int8 param_2,int param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9)
{
long lVar1;
int4 local_cc0;
int4 local_cbc;
int8 local_cb8;
int8 local_cb0;
int8 local_48;
int8 local_40;
int8 local_38;
int local_2c;
int8 local_28;
int8 local_20;
int local_14;
local_cc0 = 0;
if (param_3 != 0) {
local_cc0 = 0x40;
}
local_cbc = 0;
local_cb0 = param_7;
local_cb8 = param_6;
local_48 = param_6;
local_40 = param_5;
local_38 = param_4;
local_2c = param_3;
local_28 = param_2;
local_20 = param_1;
local_14 = PAIRING_Aggregate_PK_in_G2
(&local_cc0,param_1,1,param_2,1,0,0,param_4,param_5,param_8,param_9);
if (local_14 == 0) {
PAIRING_Commit(&local_cc0);
lVar1 = PAIRING_FinalVerify(&local_cc0,0);
local_14 = 5;
if (lVar1 != 0) {
local_14 = 0;
}
}
return local_14;
}
|
|
12,286
|
my_wc_mb_gbk
|
eloqsql/strings/ctype-gbk.c
|
static int
my_wc_mb_gbk(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gbk_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_gbk:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3d8bb
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x3d934
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x3d8db
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3d934
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x3dc00
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x3d8f7
movl $0x0, -0x4(%rbp)
jmp 0x3d934
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x3d90e
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x3d934
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_gbk:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_3D8BB
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_3D934
loc_3D8BB:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_3D8DB
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_3D934
loc_3D8DB:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gbk_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_3D8F7
mov [rbp+var_4], 0
jmp short loc_3D934
loc_3D8F7:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_3D90E
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_3D934
loc_3D90E:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_3D934:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_gbk(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gbk_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_gbk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0013d8bb
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0013d934
LAB_0013d8bb:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0013d8db
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013d934
LAB_0013d8db:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x0013dc00
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0013d8f7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013d934
LAB_0013d8f7:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0013d90e
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0013d934
LAB_0013d90e:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_0013d934:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gbk(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_gbk_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
12,287
|
utf8_decode
|
bluesky950520[P]quickjs/cutils.c
|
uint32_t utf8_decode(const uint8_t *p, const uint8_t **pp)
{
uint32_t c;
uint8_t lower, upper;
c = *p++;
if (c < 0x80) {
*pp = p;
return c;
}
switch(c) {
case 0xC2: case 0xC3:
case 0xC4: case 0xC5: case 0xC6: case 0xC7:
case 0xC8: case 0xC9: case 0xCA: case 0xCB:
case 0xCC: case 0xCD: case 0xCE: case 0xCF:
case 0xD0: case 0xD1: case 0xD2: case 0xD3:
case 0xD4: case 0xD5: case 0xD6: case 0xD7:
case 0xD8: case 0xD9: case 0xDA: case 0xDB:
case 0xDC: case 0xDD: case 0xDE: case 0xDF:
if (*p >= 0x80 && *p <= 0xBF) {
*pp = p + 1;
return ((c - 0xC0) << 6) + (*p - 0x80);
}
// otherwise encoding error
break;
case 0xE0:
lower = 0xA0; /* reject invalid encoding */
goto need2;
case 0xE1: case 0xE2: case 0xE3:
case 0xE4: case 0xE5: case 0xE6: case 0xE7:
case 0xE8: case 0xE9: case 0xEA: case 0xEB:
case 0xEC: case 0xED: case 0xEE: case 0xEF:
lower = 0x80;
need2:
if (*p >= lower && *p <= 0xBF && p[1] >= 0x80 && p[1] <= 0xBF) {
*pp = p + 2;
return ((c - 0xE0) << 12) + ((*p - 0x80) << 6) + (p[1] - 0x80);
}
// otherwise encoding error
break;
case 0xF0:
lower = 0x90; /* reject invalid encoding */
upper = 0xBF;
goto need3;
case 0xF4:
lower = 0x80;
upper = 0x8F; /* reject values above 0x10FFFF */
goto need3;
case 0xF1: case 0xF2: case 0xF3:
lower = 0x80;
upper = 0xBF;
need3:
if (*p >= lower && *p <= upper && p[1] >= 0x80 && p[1] <= 0xBF
&& p[2] >= 0x80 && p[2] <= 0xBF) {
*pp = p + 3;
return ((c - 0xF0) << 18) + ((*p - 0x80) << 12) +
((p[1] - 0x80) << 6) + (p[2] - 0x80);
}
// otherwise encoding error
break;
default:
// invalid lead byte
break;
}
*pp = p;
return 0xFFFD;
}
|
O0
|
c
|
utf8_decode:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rsp)
movzbl (%rax), %eax
movl %eax, -0x1c(%rsp)
cmpl $0x80, -0x1c(%rsp)
jae 0x1d8d6
movq -0x10(%rsp), %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movl -0x1c(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x1dafc
movl -0x1c(%rsp), %eax
addl $0xffffff3e, %eax # imm = 0xFFFFFF3E
movl %eax, %ecx
movq %rcx, -0x28(%rsp)
subl $0x32, %eax
ja 0x1dae5
movq -0x28(%rsp), %rax
leaq 0xeb2a5(%rip), %rcx # 0x108ba0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jl 0x1d958
movq -0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xbf, %eax
jg 0x1d958
movq -0x10(%rsp), %rcx
addq $0x1, %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movl -0x1c(%rsp), %eax
subl $0xc0, %eax
shll $0x6, %eax
movq -0x10(%rsp), %rcx
movzbl (%rcx), %ecx
subl $0x80, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rsp)
jmp 0x1dafc
jmp 0x1dae7
movb $-0x60, -0x1d(%rsp)
jmp 0x1d969
movb $-0x80, -0x1d(%rsp)
movq -0x10(%rsp), %rax
movzbl (%rax), %eax
movzbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
jl 0x1d9f3
movq -0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xbf, %eax
jg 0x1d9f3
movq -0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x80, %eax
jl 0x1d9f3
movq -0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xbf, %eax
jg 0x1d9f3
movq -0x10(%rsp), %rcx
addq $0x2, %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movl -0x1c(%rsp), %eax
subl $0xe0, %eax
shll $0xc, %eax
movq -0x10(%rsp), %rcx
movzbl (%rcx), %ecx
subl $0x80, %ecx
shll $0x6, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
subl $0x80, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rsp)
jmp 0x1dafc
jmp 0x1dae7
movb $-0x70, -0x1d(%rsp)
movb $-0x41, -0x1e(%rsp)
jmp 0x1da1a
movb $-0x80, -0x1d(%rsp)
movb $-0x71, -0x1e(%rsp)
jmp 0x1da1a
movb $-0x80, -0x1d(%rsp)
movb $-0x41, -0x1e(%rsp)
movq -0x10(%rsp), %rax
movzbl (%rax), %eax
movzbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
jl 0x1dae3
movq -0x10(%rsp), %rax
movzbl (%rax), %eax
movzbl -0x1e(%rsp), %ecx
cmpl %ecx, %eax
jg 0x1dae3
movq -0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x80, %eax
jl 0x1dae3
movq -0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xbf, %eax
jg 0x1dae3
movq -0x10(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x80, %eax
jl 0x1dae3
movq -0x10(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xbf, %eax
jg 0x1dae3
movq -0x10(%rsp), %rcx
addq $0x3, %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movl -0x1c(%rsp), %eax
subl $0xf0, %eax
shll $0x12, %eax
movq -0x10(%rsp), %rcx
movzbl (%rcx), %ecx
subl $0x80, %ecx
shll $0xc, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
subl $0x80, %ecx
shll $0x6, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movzbl 0x2(%rcx), %ecx
subl $0x80, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rsp)
jmp 0x1dafc
jmp 0x1dae7
jmp 0x1dae7
movq -0x10(%rsp), %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movl $0xfffd, -0x4(%rsp) # imm = 0xFFFD
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
|
utf8_decode:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov rax, [rsp+var_10]
mov rcx, rax
add rcx, 1
mov [rsp+var_10], rcx
movzx eax, byte ptr [rax]
mov [rsp+var_1C], eax
cmp [rsp+var_1C], 80h
jnb short loc_1D8D6
mov rcx, [rsp+var_10]
mov rax, [rsp+var_18]
mov [rax], rcx
mov eax, [rsp+var_1C]
mov [rsp+var_4], eax
jmp loc_1DAFC
loc_1D8D6:
mov eax, [rsp+var_1C]
add eax, 0FFFFFF3Eh; switch 51 cases
mov ecx, eax
mov [rsp+var_28], rcx
sub eax, 32h
ja def_1D902; jumptable 000000000001D902 default case
mov rax, [rsp+var_28]
lea rcx, jpt_1D902
movsxd rax, ds:(jpt_1D902 - 108BA0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1D904:
mov rax, [rsp+var_10]; jumptable 000000000001D902 cases 194-223
movzx eax, byte ptr [rax]
cmp eax, 80h
jl short loc_1D958
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0BFh
jg short loc_1D958
mov rcx, [rsp+var_10]
add rcx, 1
mov rax, [rsp+var_18]
mov [rax], rcx
mov eax, [rsp+var_1C]
sub eax, 0C0h
shl eax, 6
mov rcx, [rsp+var_10]
movzx ecx, byte ptr [rcx]
sub ecx, 80h
add eax, ecx
mov [rsp+var_4], eax
jmp loc_1DAFC
loc_1D958:
jmp loc_1DAE7
loc_1D95D:
mov [rsp+var_1D], 0A0h; jumptable 000000000001D902 case 224
jmp short loc_1D969
loc_1D964:
mov [rsp+var_1D], 80h; jumptable 000000000001D902 cases 225-239
loc_1D969:
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax]
movzx ecx, [rsp+var_1D]
cmp eax, ecx
jl short loc_1D9F3
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0BFh
jg short loc_1D9F3
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 80h
jl short loc_1D9F3
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0BFh
jg short loc_1D9F3
mov rcx, [rsp+var_10]
add rcx, 2
mov rax, [rsp+var_18]
mov [rax], rcx
mov eax, [rsp+var_1C]
sub eax, 0E0h
shl eax, 0Ch
mov rcx, [rsp+var_10]
movzx ecx, byte ptr [rcx]
sub ecx, 80h
shl ecx, 6
add eax, ecx
mov rcx, [rsp+var_10]
movzx ecx, byte ptr [rcx+1]
sub ecx, 80h
add eax, ecx
mov [rsp+var_4], eax
jmp loc_1DAFC
loc_1D9F3:
jmp loc_1DAE7
loc_1D9F8:
mov [rsp+var_1D], 90h; jumptable 000000000001D902 case 240
mov [rsp+var_1E], 0BFh
jmp short loc_1DA1A
loc_1DA04:
mov [rsp+var_1D], 80h; jumptable 000000000001D902 case 244
mov [rsp+var_1E], 8Fh
jmp short loc_1DA1A
loc_1DA10:
mov [rsp+var_1D], 80h; jumptable 000000000001D902 cases 241-243
mov [rsp+var_1E], 0BFh
loc_1DA1A:
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax]
movzx ecx, [rsp+var_1D]
cmp eax, ecx
jl loc_1DAE3
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax]
movzx ecx, [rsp+var_1E]
cmp eax, ecx
jg loc_1DAE3
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 80h
jl loc_1DAE3
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0BFh
jg short loc_1DAE3
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax+2]
cmp eax, 80h
jl short loc_1DAE3
mov rax, [rsp+var_10]
movzx eax, byte ptr [rax+2]
cmp eax, 0BFh
jg short loc_1DAE3
mov rcx, [rsp+var_10]
add rcx, 3
mov rax, [rsp+var_18]
mov [rax], rcx
mov eax, [rsp+var_1C]
sub eax, 0F0h
shl eax, 12h
mov rcx, [rsp+var_10]
movzx ecx, byte ptr [rcx]
sub ecx, 80h
shl ecx, 0Ch
add eax, ecx
mov rcx, [rsp+var_10]
movzx ecx, byte ptr [rcx+1]
sub ecx, 80h
shl ecx, 6
add eax, ecx
mov rcx, [rsp+var_10]
movzx ecx, byte ptr [rcx+2]
sub ecx, 80h
add eax, ecx
mov [rsp+var_4], eax
jmp short loc_1DAFC
loc_1DAE3:
jmp short loc_1DAE7
def_1D902:
jmp short $+2; jumptable 000000000001D902 default case
loc_1DAE7:
mov rcx, [rsp+var_10]
mov rax, [rsp+var_18]
mov [rax], rcx
mov [rsp+var_4], 0FFFDh
loc_1DAFC:
mov eax, [rsp+var_4]
retn
|
long long utf8_decode(unsigned __int8 *a1, _QWORD *a2)
{
unsigned __int8 v3; // [rsp+Ah] [rbp-1Eh]
unsigned __int8 v4; // [rsp+Bh] [rbp-1Dh]
unsigned __int8 v5; // [rsp+Bh] [rbp-1Dh]
unsigned int v6; // [rsp+Ch] [rbp-1Ch]
unsigned __int8 *v7; // [rsp+18h] [rbp-10h]
unsigned int v8; // [rsp+24h] [rbp-4h]
v7 = a1 + 1;
v6 = *a1;
if ( v6 >= 0x80 )
{
switch ( *a1 )
{
case 0xC2u:
case 0xC3u:
case 0xC4u:
case 0xC5u:
case 0xC6u:
case 0xC7u:
case 0xC8u:
case 0xC9u:
case 0xCAu:
case 0xCBu:
case 0xCCu:
case 0xCDu:
case 0xCEu:
case 0xCFu:
case 0xD0u:
case 0xD1u:
case 0xD2u:
case 0xD3u:
case 0xD4u:
case 0xD5u:
case 0xD6u:
case 0xD7u:
case 0xD8u:
case 0xD9u:
case 0xDAu:
case 0xDBu:
case 0xDCu:
case 0xDDu:
case 0xDEu:
case 0xDFu:
if ( *v7 < 0x80u || *v7 > 0xBFu )
goto LABEL_26;
*a2 = a1 + 2;
return *v7 - 128 + ((v6 - 192) << 6);
case 0xE0u:
v4 = -96;
goto LABEL_10;
case 0xE1u:
case 0xE2u:
case 0xE3u:
case 0xE4u:
case 0xE5u:
case 0xE6u:
case 0xE7u:
case 0xE8u:
case 0xE9u:
case 0xEAu:
case 0xEBu:
case 0xECu:
case 0xEDu:
case 0xEEu:
case 0xEFu:
v4 = 0x80;
LABEL_10:
if ( *v7 < (int)v4 || *v7 > 0xBFu || a1[2] < 0x80u || a1[2] > 0xBFu )
goto LABEL_26;
*a2 = a1 + 3;
return a1[2] - 128 + ((a1[1] - 128) << 6) + ((v6 - 224) << 12);
case 0xF0u:
v5 = -112;
v3 = -65;
goto LABEL_19;
case 0xF1u:
case 0xF2u:
case 0xF3u:
v5 = 0x80;
v3 = -65;
goto LABEL_19;
case 0xF4u:
v5 = 0x80;
v3 = -113;
LABEL_19:
if ( *v7 < (int)v5 || *v7 > (int)v3 || a1[2] < 0x80u || a1[2] > 0xBFu || a1[3] < 0x80u || a1[3] > 0xBFu )
goto LABEL_26;
*a2 = a1 + 4;
v8 = a1[3] - 128 + ((a1[2] - 128) << 6) + ((a1[1] - 128) << 12) + ((v6 - 240) << 18);
break;
default:
LABEL_26:
*a2 = v7;
v8 = 65533;
break;
}
}
else
{
*a2 = v7;
return v6;
}
return v8;
}
|
utf8_decode:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV RAX,qword ptr [RSP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RSP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RSP + -0x1c],EAX
CMP dword ptr [RSP + -0x1c],0x80
JNC 0x0011d8d6
MOV RCX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RSP + -0x1c]
MOV dword ptr [RSP + -0x4],EAX
JMP 0x0011dafc
LAB_0011d8d6:
MOV EAX,dword ptr [RSP + -0x1c]
ADD EAX,0xffffff3e
MOV ECX,EAX
MOV qword ptr [RSP + -0x28],RCX
SUB EAX,0x32
JA 0x0011dae5
MOV RAX,qword ptr [RSP + -0x28]
LEA RCX,[0x208ba0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_c2:
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JL 0x0011d958
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xbf
JG 0x0011d958
MOV RCX,qword ptr [RSP + -0x10]
ADD RCX,0x1
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RSP + -0x1c]
SUB EAX,0xc0
SHL EAX,0x6
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,byte ptr [RCX]
SUB ECX,0x80
ADD EAX,ECX
MOV dword ptr [RSP + -0x4],EAX
JMP 0x0011dafc
LAB_0011d958:
JMP 0x0011dae7
caseD_e0:
MOV byte ptr [RSP + -0x1d],0xa0
JMP 0x0011d969
caseD_e1:
MOV byte ptr [RSP + -0x1d],0x80
LAB_0011d969:
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOVZX ECX,byte ptr [RSP + -0x1d]
CMP EAX,ECX
JL 0x0011d9f3
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xbf
JG 0x0011d9f3
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x80
JL 0x0011d9f3
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xbf
JG 0x0011d9f3
MOV RCX,qword ptr [RSP + -0x10]
ADD RCX,0x2
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RSP + -0x1c]
SUB EAX,0xe0
SHL EAX,0xc
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,byte ptr [RCX]
SUB ECX,0x80
SHL ECX,0x6
ADD EAX,ECX
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x1]
SUB ECX,0x80
ADD EAX,ECX
MOV dword ptr [RSP + -0x4],EAX
JMP 0x0011dafc
LAB_0011d9f3:
JMP 0x0011dae7
caseD_f0:
MOV byte ptr [RSP + -0x1d],0x90
MOV byte ptr [RSP + -0x1e],0xbf
JMP 0x0011da1a
caseD_f4:
MOV byte ptr [RSP + -0x1d],0x80
MOV byte ptr [RSP + -0x1e],0x8f
JMP 0x0011da1a
caseD_f1:
MOV byte ptr [RSP + -0x1d],0x80
MOV byte ptr [RSP + -0x1e],0xbf
LAB_0011da1a:
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOVZX ECX,byte ptr [RSP + -0x1d]
CMP EAX,ECX
JL 0x0011dae3
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOVZX ECX,byte ptr [RSP + -0x1e]
CMP EAX,ECX
JG 0x0011dae3
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x80
JL 0x0011dae3
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xbf
JG 0x0011dae3
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0x80
JL 0x0011dae3
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xbf
JG 0x0011dae3
MOV RCX,qword ptr [RSP + -0x10]
ADD RCX,0x3
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RSP + -0x1c]
SUB EAX,0xf0
SHL EAX,0x12
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,byte ptr [RCX]
SUB ECX,0x80
SHL ECX,0xc
ADD EAX,ECX
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x1]
SUB ECX,0x80
SHL ECX,0x6
ADD EAX,ECX
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
SUB ECX,0x80
ADD EAX,ECX
MOV dword ptr [RSP + -0x4],EAX
JMP 0x0011dafc
LAB_0011dae3:
JMP 0x0011dae7
LAB_0011dae5:
JMP 0x0011dae7
default:
MOV RCX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RSP + -0x4],0xfffd
LAB_0011dafc:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
uint utf8_decode(byte *param_1,int8 *param_2)
{
uint uVar1;
byte *pbVar2;
byte local_1e;
byte local_1d;
pbVar2 = param_1 + 1;
uVar1 = (uint)*param_1;
if (uVar1 < 0x80) {
*param_2 = pbVar2;
return uVar1;
}
switch(uVar1) {
case 0xc2:
case 0xc3:
case 0xc4:
case 0xc5:
case 0xc6:
case 199:
case 200:
case 0xc9:
case 0xca:
case 0xcb:
case 0xcc:
case 0xcd:
case 0xce:
case 0xcf:
case 0xd0:
case 0xd1:
case 0xd2:
case 0xd3:
case 0xd4:
case 0xd5:
case 0xd6:
case 0xd7:
case 0xd8:
case 0xd9:
case 0xda:
case 0xdb:
case 0xdc:
case 0xdd:
case 0xde:
case 0xdf:
if ((0x7f < *pbVar2) && (*pbVar2 < 0xc0)) {
*param_2 = param_1 + 2;
return (uVar1 - 0xc0) * 0x40 + (*pbVar2 - 0x80);
}
goto switchD_0011d902_default;
case 0xe0:
local_1d = 0xa0;
goto LAB_0011d969;
case 0xe1:
case 0xe2:
case 0xe3:
case 0xe4:
case 0xe5:
case 0xe6:
case 0xe7:
case 0xe8:
case 0xe9:
case 0xea:
case 0xeb:
case 0xec:
case 0xed:
case 0xee:
case 0xef:
local_1d = 0x80;
LAB_0011d969:
if (((local_1d <= *pbVar2) && (*pbVar2 < 0xc0)) && ((0x7f < param_1[2] && (param_1[2] < 0xc0))))
{
*param_2 = param_1 + 3;
return (uVar1 - 0xe0) * 0x1000 + (*pbVar2 - 0x80) * 0x40 + (param_1[2] - 0x80);
}
goto switchD_0011d902_default;
case 0xf0:
local_1d = 0x90;
local_1e = 0xbf;
break;
case 0xf1:
case 0xf2:
case 0xf3:
local_1d = 0x80;
local_1e = 0xbf;
break;
case 0xf4:
local_1d = 0x80;
local_1e = 0x8f;
break;
default:
goto switchD_0011d902_default;
}
if (((((local_1d <= *pbVar2) && (*pbVar2 <= local_1e)) && (0x7f < param_1[2])) &&
((param_1[2] < 0xc0 && (0x7f < param_1[3])))) && (param_1[3] < 0xc0)) {
*param_2 = param_1 + 4;
return (uVar1 - 0xf0) * 0x40000 + (*pbVar2 - 0x80) * 0x1000 + (param_1[2] - 0x80) * 0x40 +
(param_1[3] - 0x80);
}
switchD_0011d902_default:
*param_2 = pbVar2;
return 0xfffd;
}
|
|
12,288
|
utf8_decode
|
bluesky950520[P]quickjs/cutils.c
|
uint32_t utf8_decode(const uint8_t *p, const uint8_t **pp)
{
uint32_t c;
uint8_t lower, upper;
c = *p++;
if (c < 0x80) {
*pp = p;
return c;
}
switch(c) {
case 0xC2: case 0xC3:
case 0xC4: case 0xC5: case 0xC6: case 0xC7:
case 0xC8: case 0xC9: case 0xCA: case 0xCB:
case 0xCC: case 0xCD: case 0xCE: case 0xCF:
case 0xD0: case 0xD1: case 0xD2: case 0xD3:
case 0xD4: case 0xD5: case 0xD6: case 0xD7:
case 0xD8: case 0xD9: case 0xDA: case 0xDB:
case 0xDC: case 0xDD: case 0xDE: case 0xDF:
if (*p >= 0x80 && *p <= 0xBF) {
*pp = p + 1;
return ((c - 0xC0) << 6) + (*p - 0x80);
}
// otherwise encoding error
break;
case 0xE0:
lower = 0xA0; /* reject invalid encoding */
goto need2;
case 0xE1: case 0xE2: case 0xE3:
case 0xE4: case 0xE5: case 0xE6: case 0xE7:
case 0xE8: case 0xE9: case 0xEA: case 0xEB:
case 0xEC: case 0xED: case 0xEE: case 0xEF:
lower = 0x80;
need2:
if (*p >= lower && *p <= 0xBF && p[1] >= 0x80 && p[1] <= 0xBF) {
*pp = p + 2;
return ((c - 0xE0) << 12) + ((*p - 0x80) << 6) + (p[1] - 0x80);
}
// otherwise encoding error
break;
case 0xF0:
lower = 0x90; /* reject invalid encoding */
upper = 0xBF;
goto need3;
case 0xF4:
lower = 0x80;
upper = 0x8F; /* reject values above 0x10FFFF */
goto need3;
case 0xF1: case 0xF2: case 0xF3:
lower = 0x80;
upper = 0xBF;
need3:
if (*p >= lower && *p <= upper && p[1] >= 0x80 && p[1] <= 0xBF
&& p[2] >= 0x80 && p[2] <= 0xBF) {
*pp = p + 3;
return ((c - 0xF0) << 18) + ((*p - 0x80) << 12) +
((p[1] - 0x80) << 6) + (p[2] - 0x80);
}
// otherwise encoding error
break;
default:
// invalid lead byte
break;
}
*pp = p;
return 0xFFFD;
}
|
O3
|
c
|
utf8_decode:
leaq 0x1(%rdi), %rcx
movzbl (%rdi), %eax
testb %al, %al
js 0x1b42d
movq %rcx, (%rsi)
retq
leal -0xc2(%rax), %r8d
cmpl $0x32, %r8d
ja 0x1b523
movl $0xbf, %edx
leaq 0x82656(%rip), %r9 # 0x9daa0
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
cmpb $-0x41, (%rcx)
jg 0x1b523
leaq 0x2(%rdi), %rcx
movq %rcx, (%rsi)
shll $0x6, %eax
movzbl 0x1(%rdi), %ecx
addl %ecx, %eax
addl $0xffffcf80, %eax # imm = 0xFFFFCF80
retq
movl $0x80, %edx
movzbl (%rcx), %r8d
cmpl $0xc0, %r8d
setae %r9b
cmpl %r8d, %edx
seta %dl
orb %r9b, %dl
jne 0x1b523
cmpb $-0x41, 0x2(%rdi)
jg 0x1b523
leaq 0x3(%rdi), %rcx
movq %rcx, (%rsi)
shll $0xc, %eax
movzbl 0x1(%rdi), %ecx
shll $0x6, %ecx
addl %eax, %ecx
movzbl 0x2(%rdi), %eax
addl %ecx, %eax
addl $0xfff1df80, %eax # imm = 0xFFF1DF80
retq
movl $0xa0, %edx
jmp 0x1b478
movl $0x90, %r8d
jmp 0x1b4d9
movl $0x8f, %edx
movl $0x80, %r8d
movzbl (%rcx), %r9d
cmpl %r9d, %r8d
seta %r8b
cmpl %r9d, %edx
setb %dl
orb %r8b, %dl
jne 0x1b523
cmpb $-0x41, 0x2(%rdi)
jg 0x1b523
cmpb $-0x41, 0x3(%rdi)
jg 0x1b523
leaq 0x4(%rdi), %rcx
movq %rcx, (%rsi)
shll $0x12, %eax
movzbl 0x1(%rdi), %ecx
shll $0xc, %ecx
addl %eax, %ecx
movzbl 0x2(%rdi), %eax
shll $0x6, %eax
addl %ecx, %eax
movzbl 0x3(%rdi), %ecx
addl %ecx, %eax
addl $0xfc37df80, %eax # imm = 0xFC37DF80
retq
movq %rcx, (%rsi)
movl $0xfffd, %eax # imm = 0xFFFD
retq
|
utf8_decode:
lea rcx, [rdi+1]
movzx eax, byte ptr [rdi]
test al, al
js short loc_1B42D
mov [rsi], rcx
retn
loc_1B42D:
lea r8d, [rax-0C2h]; switch 51 cases
cmp r8d, 32h
ja def_1B451; jumptable 000000000001B451 default case
mov edx, 0BFh
lea r9, jpt_1B451
movsxd r8, ds:(jpt_1B451 - 9DAA0h)[r9+r8*4]
add r8, r9
jmp r8; switch jump
loc_1B454:
cmp byte ptr [rcx], 0BFh; jumptable 000000000001B451 cases 194-223
jg def_1B451; jumptable 000000000001B451 default case
lea rcx, [rdi+2]
mov [rsi], rcx
shl eax, 6
movzx ecx, byte ptr [rdi+1]
add eax, ecx
add eax, 0FFFFCF80h
retn
loc_1B473:
mov edx, 80h; jumptable 000000000001B451 cases 225-239
loc_1B478:
movzx r8d, byte ptr [rcx]
cmp r8d, 0C0h
setnb r9b
cmp edx, r8d
setnbe dl
or dl, r9b
jnz def_1B451; jumptable 000000000001B451 default case
cmp byte ptr [rdi+2], 0BFh
jg def_1B451; jumptable 000000000001B451 default case
lea rcx, [rdi+3]
mov [rsi], rcx
shl eax, 0Ch
movzx ecx, byte ptr [rdi+1]
shl ecx, 6
add ecx, eax
movzx eax, byte ptr [rdi+2]
add eax, ecx
add eax, 0FFF1DF80h
retn
loc_1B4BF:
mov edx, 0A0h; jumptable 000000000001B451 case 224
jmp short loc_1B478
loc_1B4C6:
mov r8d, 90h; jumptable 000000000001B451 case 240
jmp short loc_1B4D9
loc_1B4CE:
mov edx, 8Fh; jumptable 000000000001B451 case 244
loc_1B4D3:
mov r8d, 80h; jumptable 000000000001B451 cases 241-243
loc_1B4D9:
movzx r9d, byte ptr [rcx]
cmp r8d, r9d
setnbe r8b
cmp edx, r9d
setb dl
or dl, r8b
jnz short def_1B451; jumptable 000000000001B451 default case
cmp byte ptr [rdi+2], 0BFh
jg short def_1B451; jumptable 000000000001B451 default case
cmp byte ptr [rdi+3], 0BFh
jg short def_1B451; jumptable 000000000001B451 default case
lea rcx, [rdi+4]
mov [rsi], rcx
shl eax, 12h
movzx ecx, byte ptr [rdi+1]
shl ecx, 0Ch
add ecx, eax
movzx eax, byte ptr [rdi+2]
shl eax, 6
add eax, ecx
movzx ecx, byte ptr [rdi+3]
add eax, ecx
add eax, 0FC37DF80h
retn
def_1B451:
mov [rsi], rcx; jumptable 000000000001B451 default case
mov eax, 0FFFDh
retn
|
long long utf8_decode(char *a1, char **a2)
{
char *v2; // rcx
long long result; // rax
unsigned int v4; // edx
unsigned int v5; // edx
unsigned int v6; // r8d
v2 = a1 + 1;
result = (unsigned __int8)*a1;
if ( (result & 0x80u) != 0LL )
{
v4 = 191;
switch ( *a1 )
{
case -62:
case -61:
case -60:
case -59:
case -58:
case -57:
case -56:
case -55:
case -54:
case -53:
case -52:
case -51:
case -50:
case -49:
case -48:
case -47:
case -46:
case -45:
case -44:
case -43:
case -42:
case -41:
case -40:
case -39:
case -38:
case -37:
case -36:
case -35:
case -34:
case -33:
if ( *v2 > -65 )
goto LABEL_18;
*a2 = a1 + 2;
return (unsigned int)(unsigned __int8)a1[1] + ((_DWORD)result << 6) - 12416;
case -32:
v5 = 160;
goto LABEL_7;
case -31:
case -30:
case -29:
case -28:
case -27:
case -26:
case -25:
case -24:
case -23:
case -22:
case -21:
case -20:
case -19:
case -18:
case -17:
v5 = 128;
LABEL_7:
if ( (unsigned __int8)*v2 >= 0xC0u || v5 > (unsigned __int8)*v2 || a1[2] > -65 )
goto LABEL_18;
*a2 = a1 + 3;
return ((_DWORD)result << 12) + ((unsigned __int8)a1[1] << 6) + (unsigned int)(unsigned __int8)a1[2] - 925824;
case -16:
v6 = 144;
goto LABEL_14;
case -15:
case -14:
case -13:
goto LABEL_13;
case -12:
v4 = 143;
LABEL_13:
v6 = 128;
LABEL_14:
if ( v6 > (unsigned __int8)*v2 || v4 < (unsigned __int8)*v2 || a1[2] > -65 || a1[3] > -65 )
goto LABEL_18;
*a2 = a1 + 4;
result = (unsigned __int8)a1[3]
+ ((_DWORD)result << 18)
+ ((unsigned __int8)a1[1] << 12)
+ ((unsigned __int8)a1[2] << 6)
- 63447168;
break;
default:
LABEL_18:
*a2 = v2;
result = 65533LL;
break;
}
}
else
{
*a2 = v2;
}
return result;
}
|
utf8_decode:
LEA RCX,[RDI + 0x1]
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JS 0x0011b42d
MOV qword ptr [RSI],RCX
RET
LAB_0011b42d:
LEA R8D,[RAX + -0xc2]
CMP R8D,0x32
JA 0x0011b523
MOV EDX,0xbf
LEA R9,[0x19daa0]
MOVSXD R8,dword ptr [R9 + R8*0x4]
ADD R8,R9
switchD:
JMP R8
caseD_c2:
CMP byte ptr [RCX],0xbf
JG 0x0011b523
LEA RCX,[RDI + 0x2]
MOV qword ptr [RSI],RCX
SHL EAX,0x6
MOVZX ECX,byte ptr [RDI + 0x1]
ADD EAX,ECX
ADD EAX,0xffffcf80
RET
caseD_e1:
MOV EDX,0x80
LAB_0011b478:
MOVZX R8D,byte ptr [RCX]
CMP R8D,0xc0
SETNC R9B
CMP EDX,R8D
SETA DL
OR DL,R9B
JNZ 0x0011b523
CMP byte ptr [RDI + 0x2],0xbf
JG 0x0011b523
LEA RCX,[RDI + 0x3]
MOV qword ptr [RSI],RCX
SHL EAX,0xc
MOVZX ECX,byte ptr [RDI + 0x1]
SHL ECX,0x6
ADD ECX,EAX
MOVZX EAX,byte ptr [RDI + 0x2]
ADD EAX,ECX
ADD EAX,0xfff1df80
RET
caseD_e0:
MOV EDX,0xa0
JMP 0x0011b478
caseD_f0:
MOV R8D,0x90
JMP 0x0011b4d9
caseD_f4:
MOV EDX,0x8f
caseD_f1:
MOV R8D,0x80
LAB_0011b4d9:
MOVZX R9D,byte ptr [RCX]
CMP R8D,R9D
SETA R8B
CMP EDX,R9D
SETC DL
OR DL,R8B
JNZ 0x0011b523
CMP byte ptr [RDI + 0x2],0xbf
JG 0x0011b523
CMP byte ptr [RDI + 0x3],0xbf
JG 0x0011b523
LEA RCX,[RDI + 0x4]
MOV qword ptr [RSI],RCX
SHL EAX,0x12
MOVZX ECX,byte ptr [RDI + 0x1]
SHL ECX,0xc
ADD ECX,EAX
MOVZX EAX,byte ptr [RDI + 0x2]
SHL EAX,0x6
ADD EAX,ECX
MOVZX ECX,byte ptr [RDI + 0x3]
ADD EAX,ECX
ADD EAX,0xfc37df80
RET
default:
MOV qword ptr [RSI],RCX
MOV EAX,0xfffd
RET
|
uint utf8_decode(byte *param_1,long *param_2)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
byte bVar4;
pbVar1 = param_1 + 1;
bVar2 = *param_1;
if (-1 < (char)bVar2) {
*param_2 = (long)pbVar1;
return (uint)bVar2;
}
bVar4 = 0xbf;
bVar3 = 0xbf;
switch(bVar2) {
case 0xc2:
case 0xc3:
case 0xc4:
case 0xc5:
case 0xc6:
case 199:
case 200:
case 0xc9:
case 0xca:
case 0xcb:
case 0xcc:
case 0xcd:
case 0xce:
case 0xcf:
case 0xd0:
case 0xd1:
case 0xd2:
case 0xd3:
case 0xd4:
case 0xd5:
case 0xd6:
case 0xd7:
case 0xd8:
case 0xd9:
case 0xda:
case 0xdb:
case 0xdc:
case 0xdd:
case 0xde:
case 0xdf:
if ((char)*pbVar1 < -0x40) {
*param_2 = (long)(param_1 + 2);
return ((uint)bVar2 * 0x40 + (uint)param_1[1]) - 0x3080;
}
goto switchD_0011b451_default;
case 0xe0:
bVar3 = 0xa0;
break;
case 0xe1:
case 0xe2:
case 0xe3:
case 0xe4:
case 0xe5:
case 0xe6:
case 0xe7:
case 0xe8:
case 0xe9:
case 0xea:
case 0xeb:
case 0xec:
case 0xed:
case 0xee:
case 0xef:
bVar3 = 0x80;
break;
case 0xf0:
bVar3 = 0x90;
goto LAB_0011b4d9;
case 0xf4:
bVar3 = 0x8f;
case 0xf1:
case 0xf2:
case 0xf3:
bVar4 = bVar3;
bVar3 = 0x80;
LAB_0011b4d9:
if (((*pbVar1 <= bVar4 && bVar3 <= *pbVar1) && ((char)param_1[2] < -0x40)) &&
((char)param_1[3] < -0x40)) {
*param_2 = (long)(param_1 + 4);
return (uint)param_1[2] * 0x40 + (uint)param_1[1] * 0x1000 + (uint)bVar2 * 0x40000 +
(uint)param_1[3] + 0xfc37df80;
}
default:
goto switchD_0011b451_default;
}
if ((bVar3 <= *pbVar1 && *pbVar1 < 0xc0) && ((char)param_1[2] < -0x40)) {
*param_2 = (long)(param_1 + 3);
return ((uint)param_1[2] + (uint)param_1[1] * 0x40 + (uint)bVar2 * 0x1000) - 0xe2080;
}
switchD_0011b451_default:
*param_2 = (long)pbVar1;
return 0xfffd;
}
|
|
12,289
|
void vec_binary_op_non_contiguous<&op_add(float, float), unsigned short, unsigned short, unsigned short>(long, long, long, unsigned short*, unsigned short const*, unsigned short const*)
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/binary-ops.cpp
|
static inline void vec_binary_op_non_contiguous(const int64_t n, const int64_t ne10, const int64_t nb10, dst_t * z, const src0_t * x, const src1_t * y) {
constexpr auto src0_to_f32 = type_conversion_table<src0_t>::to_f32;
constexpr auto src1_to_f32 = type_conversion_table<src1_t>::to_f32;
constexpr auto f32_to_dst = type_conversion_table<dst_t >::from_f32;
for (int i = 0; i < n; i++) {
int i10 = i % ne10;
const src1_t * y_ptr = (const src1_t *)((const char *)y + i10*nb10);
z[i] = f32_to_dst(op(src0_to_f32(x[i]), src1_to_f32(*y_ptr)));
}
}
|
O0
|
cpp
|
void vec_binary_op_non_contiguous<&op_add(float, float), unsigned short, unsigned short, unsigned short>(long, long, long, unsigned short*, unsigned short const*, unsigned short const*):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x38(%rsp)
leaq -0xaaf9(%rip), %rax # 0x5ddb0
movq %rax, 0x30(%rsp)
leaq -0xacc5(%rip), %rax # 0x5dbf0
movq %rax, 0x28(%rsp)
leaq -0xacd1(%rip), %rax # 0x5dbf0
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rax
cmpq 0x60(%rsp), %rax
jge 0x68962
movslq 0x1c(%rsp), %rax
cqto
idivq 0x58(%rsp)
movl %edx, %eax
movl %eax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movslq 0x18(%rsp), %rcx
imulq 0x50(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movzwl (%rax,%rcx,2), %edi
callq 0x5ddb0
vmovss %xmm0, 0xc(%rsp)
movq 0x10(%rsp), %rax
vmovss (%rax), %xmm0
callq 0x5dbf0
vmovaps %xmm0, %xmm1
vmovss 0xc(%rsp), %xmm0
callq 0x65390
callq 0x5dbf0
movq 0x48(%rsp), %rax
movslq 0x1c(%rsp), %rcx
vmovss %xmm0, (%rax,%rcx,4)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x688ce
addq $0x68, %rsp
retq
nopw (%rax,%rax)
|
_ZL28vec_binary_op_non_contiguousIXadL_ZL6op_divffEEtffEvlllPT2_PKT0_PKT1_:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_20], rcx
mov [rsp+68h+var_28], r8
mov [rsp+68h+var_30], r9
lea rax, _ZL10f16_to_f32t; f16_to_f32(ushort)
mov [rsp+68h+var_38], rax
lea rax, _ZL10f32_to_f32f; f32_to_f32(float)
mov [rsp+68h+var_40], rax
lea rax, _ZL10f32_to_f32f; f32_to_f32(float)
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_4C], 0
loc_688CE:
movsxd rax, [rsp+68h+var_4C]
cmp rax, [rsp+68h+var_8]
jge loc_68962
movsxd rax, [rsp+68h+var_4C]
cqo
idiv [rsp+68h+var_10]
mov eax, edx
mov [rsp+68h+var_50], eax
mov rax, [rsp+68h+var_30]
movsxd rcx, [rsp+68h+var_50]
imul rcx, [rsp+68h+var_18]
add rax, rcx
mov [rsp+68h+var_58], rax
mov rax, [rsp+68h+var_28]
movsxd rcx, [rsp+68h+var_4C]
movzx edi, word ptr [rax+rcx*2]; unsigned __int16
call _ZL10f16_to_f32t; f16_to_f32(ushort)
vmovss [rsp+68h+var_5C], xmm0
mov rax, [rsp+68h+var_58]
vmovss xmm0, dword ptr [rax]; float
call _ZL10f32_to_f32f; f32_to_f32(float)
vmovaps xmm1, xmm0; float
vmovss xmm0, [rsp+68h+var_5C]; float
call _ZL6op_divff; op_div(float,float)
call _ZL10f32_to_f32f; f32_to_f32(float)
mov rax, [rsp+68h+var_20]
movsxd rcx, [rsp+68h+var_4C]
vmovss dword ptr [rax+rcx*4], xmm0
mov eax, [rsp+68h+var_4C]
add eax, 1
mov [rsp+68h+var_4C], eax
jmp loc_688CE
loc_68962:
add rsp, 68h
retn
|
long long vec_binary_op_non_contiguous<&(op_div(float,float)),unsigned short,float,float>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 _XMM0)
{
long long result; // rax
__int128 v13; // xmm0
int i; // [rsp+1Ch] [rbp-4Ch]
for ( i = 0; ; ++i )
{
result = i;
if ( i >= a1 )
break;
f16_to_f32(*(_WORD *)(a5 + 2LL * i));
__asm { vmovss [rsp+68h+var_5C], xmm0 }
_RAX = a3 * (i % a2) + a6;
__asm { vmovss xmm0, dword ptr [rax]; float }
_XMM0 = f32_to_f32(_XMM0);
__asm
{
vmovaps xmm1, xmm0; float
vmovss xmm0, [rsp+68h+var_5C]; float
}
v13 = op_div(_XMM0, _XMM1);
_XMM0 = (__m128)f32_to_f32((__m128)v13);
_RAX = a4;
_RCX = i;
__asm { vmovss dword ptr [rax+rcx*4], xmm0 }
}
return result;
}
|
vec_binary_op_non_contiguous<&(op_div(float,float)),unsigned_short,float,float>:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x40],R8
MOV qword ptr [RSP + 0x38],R9
LEA RAX,[0x15ddb0]
MOV qword ptr [RSP + 0x30],RAX
LEA RAX,[0x15dbf0]
MOV qword ptr [RSP + 0x28],RAX
LEA RAX,[0x15dbf0]
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x1c],0x0
LAB_001688ce:
MOVSXD RAX,dword ptr [RSP + 0x1c]
CMP RAX,qword ptr [RSP + 0x60]
JGE 0x00168962
MOVSXD RAX,dword ptr [RSP + 0x1c]
CQO
IDIV qword ptr [RSP + 0x58]
MOV EAX,EDX
MOV dword ptr [RSP + 0x18],EAX
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0x18]
IMUL RCX,qword ptr [RSP + 0x50]
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RCX,dword ptr [RSP + 0x1c]
MOVZX EDI,word ptr [RAX + RCX*0x2]
CALL 0x0015ddb0
VMOVSS dword ptr [RSP + 0xc],XMM0
MOV RAX,qword ptr [RSP + 0x10]
VMOVSS XMM0,dword ptr [RAX]
CALL 0x0015dbf0
VMOVAPS XMM1,XMM0
VMOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x00165390
CALL 0x0015dbf0
MOV RAX,qword ptr [RSP + 0x48]
MOVSXD RCX,dword ptr [RSP + 0x1c]
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x001688ce
LAB_00168962:
ADD RSP,0x68
RET
|
/* void vec_binary_op_non_contiguous<&(op_div(float, float)), unsigned short, float, float>(long,
long, long, float*, unsigned short const*, float const*) */
void vec_binary_op_non_contiguous<&(op_div(float,float)),unsigned_short,float,float>
(long param_1,long param_2,long param_3,float *param_4,ushort *param_5,float *param_6
)
{
float fVar1;
float fVar2;
int local_4c;
for (local_4c = 0; local_4c < param_1; local_4c = local_4c + 1) {
fVar1 = (float)f16_to_f32(param_5[local_4c]);
fVar2 = (float)f32_to_f32(*(float *)((long)param_6 + (int)((long)local_4c % param_2) * param_3))
;
fVar1 = (float)op_div(fVar1,fVar2);
fVar1 = (float)f32_to_f32(fVar1);
param_4[local_4c] = fVar1;
}
return;
}
|
|
12,290
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,
std::uint64_t rest, std::uint64_t ten_k)
{
JSON_ASSERT(len >= 1);
JSON_ASSERT(dist <= delta);
JSON_ASSERT(rest <= delta);
JSON_ASSERT(ten_k > 0);
// <--------------------------- delta ---->
// <---- dist --------->
// --------------[------------------+-------------------]--------------
// M- w M+
//
// ten_k
// <------>
// <---- rest ---->
// --------------[------------------+----+--------------]--------------
// w V
// = buf * 10^k
//
// ten_k represents a unit-in-the-last-place in the decimal representation
// stored in buf.
// Decrement buf by ten_k while this takes buf closer to w.
// The tests are written in this order to avoid overflow in unsigned
// integer arithmetic.
while (rest < dist
&& delta - rest >= ten_k
&& (rest + ten_k < dist || dist - rest > rest + ten_k - dist))
{
JSON_ASSERT(buf[len - 1] != '0');
buf[len - 1]--;
rest += ten_k;
}
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long):
pushq %rax
testl %esi, %esi
jle 0x54c0a
cmpq %rcx, %rdx
ja 0x54c26
movq %rcx, %r10
subq %r8, %r10
jb 0x54c42
testq %r9, %r9
je 0x54c5e
movq %rdx, %rax
subq %r8, %rax
setbe %r11b
cmpq %r9, %r10
setb %r10b
orb %r11b, %r10b
jne 0x54be7
movl %esi, %esi
addq %r9, %r8
subq %r8, %rcx
movq %rdx, %r10
negq %r10
cmpq %rdx, %r8
jb 0x54bbd
leaq (%r10,%r8), %r11
cmpq %r11, %rax
jbe 0x54be7
movb -0x1(%rdi,%rsi), %r11b
cmpb $0x30, %r11b
je 0x54be9
decb %r11b
movb %r11b, -0x1(%rdi,%rsi)
subq %r9, %rcx
setb %r11b
cmpq %rdx, %r8
jae 0x54be7
subq %r9, %rax
addq %r9, %r8
testb %r11b, %r11b
je 0x54baf
popq %rax
retq
leaq 0x62842(%rip), %rdi # 0xb7432
leaq 0x5e1e3(%rip), %rdx # 0xb2dda
leaq 0x639b6(%rip), %rcx # 0xb85b4
movl $0x444d, %esi # imm = 0x444D
xorl %eax, %eax
callq 0x19b10
leaq 0x62821(%rip), %rdi # 0xb7432
leaq 0x5e1c2(%rip), %rdx # 0xb2dda
leaq 0x63966(%rip), %rcx # 0xb8585
movl $0x4431, %esi # imm = 0x4431
jmp 0x54c03
leaq 0x62805(%rip), %rdi # 0xb7432
leaq 0x5e1a6(%rip), %rdx # 0xb2dda
leaq 0x63953(%rip), %rcx # 0xb858e
movl $0x4432, %esi # imm = 0x4432
jmp 0x54c03
leaq 0x627e9(%rip), %rdi # 0xb7432
leaq 0x5e18a(%rip), %rdx # 0xb2dda
leaq 0x63945(%rip), %rcx # 0xb859c
movl $0x4433, %esi # imm = 0x4433
jmp 0x54c03
leaq 0x627cd(%rip), %rdi # 0xb7432
leaq 0x5e16e(%rip), %rdx # 0xb2dda
leaq 0x63937(%rip), %rcx # 0xb85aa
movl $0x4434, %esi # imm = 0x4434
jmp 0x54c03
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm:
push rax
test esi, esi
jle loc_54C0A
cmp rdx, rcx
ja loc_54C26
mov r10, rcx
sub r10, r8
jb loc_54C42
test r9, r9
jz loc_54C5E
mov rax, rdx
sub rax, r8
setbe r11b
cmp r10, r9
setb r10b
or r10b, r11b
jnz short loc_54BE7
mov esi, esi
add r8, r9
sub rcx, r8
mov r10, rdx
neg r10
loc_54BAF:
cmp r8, rdx
jb short loc_54BBD
lea r11, [r10+r8]
cmp rax, r11
jbe short loc_54BE7
loc_54BBD:
mov r11b, [rdi+rsi-1]
cmp r11b, 30h ; '0'
jz short loc_54BE9
dec r11b
mov [rdi+rsi-1], r11b
sub rcx, r9
setb r11b
cmp r8, rdx
jnb short loc_54BE7
sub rax, r9
add r8, r9
test r11b, r11b
jz short loc_54BAF
loc_54BE7:
pop rax
retn
loc_54BE9:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufLen10; "buf[len - 1] != '0'"
mov esi, 444Dh
loc_54C03:
xor eax, eax
call _ggml_abort
loc_54C0A:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLen1; "len >= 1"
mov esi, 4431h
jmp short loc_54C03
loc_54C26:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDistDelta; "dist <= delta"
mov esi, 4432h
jmp short loc_54C03
loc_54C42:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRestDelta; "rest <= delta"
mov esi, 4433h
jmp short loc_54C03
loc_54C5E:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTenK0; "ten_k > 0"
mov esi, 4434h
jmp short loc_54C03
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
unsigned long long a6)
{
unsigned long long v6; // rax
unsigned long long v7; // r8
unsigned long long v8; // rcx
char v9; // r11
bool v10; // cf
if ( (int)a2 <= 0 )
goto LABEL_14;
if ( a3 > a4 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17458LL,
"GGML_ASSERT(%s) failed",
"dist <= delta");
goto LABEL_14;
}
if ( a4 < a5 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17459LL,
"GGML_ASSERT(%s) failed",
"rest <= delta");
goto LABEL_14;
}
if ( !a6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17460LL,
"GGML_ASSERT(%s) failed",
"ten_k > 0");
goto LABEL_14;
}
v6 = a3 - a5;
if ( a3 > a5 && a4 - a5 >= a6 )
{
v7 = a6 + a5;
v8 = a4 - v7;
while ( 1 )
{
if ( v7 >= a3 && v6 <= v7 - a3 )
return;
v9 = *((_BYTE *)this + (unsigned int)a2 - 1);
if ( v9 == 48 )
break;
*((_BYTE *)this + (unsigned int)a2 - 1) = v9 - 1;
v10 = v8 < a6;
v8 -= a6;
if ( v7 < a3 )
{
v6 -= a6;
v7 += a6;
if ( !v10 )
continue;
}
return;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17485LL,
"GGML_ASSERT(%s) failed",
"buf[len - 1] != '0'");
while ( 1 )
LABEL_14:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17457LL,
"GGML_ASSERT(%s) failed",
"len >= 1");
}
}
|
grisu2_round:
PUSH RAX
TEST ESI,ESI
JLE 0x00154c0a
CMP RDX,RCX
JA 0x00154c26
MOV R10,RCX
SUB R10,R8
JC 0x00154c42
TEST R9,R9
JZ 0x00154c5e
MOV RAX,RDX
SUB RAX,R8
SETBE R11B
CMP R10,R9
SETC R10B
OR R10B,R11B
JNZ 0x00154be7
MOV ESI,ESI
ADD R8,R9
SUB RCX,R8
MOV R10,RDX
NEG R10
LAB_00154baf:
CMP R8,RDX
JC 0x00154bbd
LEA R11,[R10 + R8*0x1]
CMP RAX,R11
JBE 0x00154be7
LAB_00154bbd:
MOV R11B,byte ptr [RDI + RSI*0x1 + -0x1]
CMP R11B,0x30
JZ 0x00154be9
DEC R11B
MOV byte ptr [RDI + RSI*0x1 + -0x1],R11B
SUB RCX,R9
SETC R11B
CMP R8,RDX
JNC 0x00154be7
SUB RAX,R9
ADD R8,R9
TEST R11B,R11B
JZ 0x00154baf
LAB_00154be7:
POP RAX
RET
LAB_00154be9:
LEA RDI,[0x1b7432]
LEA RDX,[0x1b2dda]
LEA RCX,[0x1b85b4]
MOV ESI,0x444d
LAB_00154c03:
XOR EAX,EAX
CALL 0x00119b10
LAB_00154c0a:
LEA RDI,[0x1b7432]
LEA RDX,[0x1b2dda]
LEA RCX,[0x1b8585]
MOV ESI,0x4431
JMP 0x00154c03
LAB_00154c26:
LEA RDI,[0x1b7432]
LEA RDX,[0x1b2dda]
LEA RCX,[0x1b858e]
MOV ESI,0x4432
JMP 0x00154c03
LAB_00154c42:
LEA RDI,[0x1b7432]
LEA RDX,[0x1b2dda]
LEA RCX,[0x1b859c]
MOV ESI,0x4433
JMP 0x00154c03
LAB_00154c5e:
LEA RDI,[0x1b7432]
LEA RDX,[0x1b2dda]
LEA RCX,[0x1b85aa]
MOV ESI,0x4434
JMP 0x00154c03
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned
long, unsigned long, unsigned long) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round
(char *param_1,int param_2,ulong param_3,ulong param_4,ulong param_5,ulong param_6)
{
int8 in_RAX;
ulong uVar1;
ulong uVar2;
char *pcVar3;
int8 uVar4;
ulong uVar5;
bool bVar6;
if (param_2 < 1) {
pcVar3 = "len >= 1";
uVar4 = 0x4431;
}
else if (param_4 < param_3) {
pcVar3 = "dist <= delta";
uVar4 = 0x4432;
}
else if (param_4 < param_5) {
pcVar3 = "rest <= delta";
uVar4 = 0x4433;
}
else {
if (param_6 != 0) {
uVar1 = param_3 - param_5;
if (param_6 <= param_4 - param_5 && (param_5 <= param_3 && uVar1 != 0)) {
uVar5 = param_5 + param_6;
uVar2 = param_4 - uVar5;
do {
if ((param_3 <= uVar5) && (uVar1 <= uVar5 - param_3)) {
return in_RAX;
}
if (param_1[(ulong)(uint)param_2 - 1] == '0') {
pcVar3 = "buf[len - 1] != \'0\'";
uVar4 = 0x444d;
goto LAB_00154c03;
}
param_1[(ulong)(uint)param_2 - 1] = param_1[(ulong)(uint)param_2 - 1] + -1;
bVar6 = param_6 <= uVar2;
uVar2 = uVar2 - param_6;
if (param_3 <= uVar5) {
return in_RAX;
}
uVar1 = uVar1 - param_6;
uVar5 = uVar5 + param_6;
} while (bVar6);
}
return in_RAX;
}
pcVar3 = "ten_k > 0";
uVar4 = 0x4434;
}
LAB_00154c03:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
|
|
12,291
|
my_strnncoll_latin1_de
|
eloqsql/strings/ctype-latin1.c
|
static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length,
my_bool b_is_prefix)
{
const uchar *a_end= a + a_length;
const uchar *b_end= b + b_length;
uchar a_char, a_extend= 0, b_char, b_extend= 0;
while ((a < a_end || a_extend) && (b < b_end || b_extend))
{
if (a_extend)
{
a_char=a_extend; a_extend=0;
}
else
{
a_extend=combo2map[*a];
a_char=combo1map[*a++];
}
if (b_extend)
{
b_char=b_extend; b_extend=0;
}
else
{
b_extend=combo2map[*b];
b_char=combo1map[*b++];
}
if (a_char != b_char)
return (int) a_char - (int) b_char;
}
/*
A simple test of string lengths won't work -- we test to see
which string ran out first
*/
return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) :
(b < b_end || b_extend) ? -1 : 0);
}
|
O3
|
c
|
my_strnncoll_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
addq %rsi, %rdx
addq %rcx, %r8
xorl %r10d, %r10d
leaq 0x16b898(%rip), %rax # 0x1a1af0
leaq 0x16b791(%rip), %rdi # 0x1a19f0
xorl %r11d, %r11d
cmpq %r8, %rcx
setb %r14b
testb %r11b, %r11b
setne %bl
orb %r14b, %bl
cmpq %rdx, %rsi
jb 0x3627c
testb %r10b, %r10b
je 0x362c6
testb %bl, %bl
je 0x362cd
testb %r10b, %r10b
je 0x3628d
movl %r10d, %ebx
xorl %r10d, %r10d
jmp 0x3629a
movzbl (%rsi), %ebx
movb (%rbx,%rax), %r10b
incq %rsi
movb (%rbx,%rdi), %bl
testb %r11b, %r11b
je 0x362a7
movl %r11d, %r14d
xorl %r11d, %r11d
jmp 0x362b6
movzbl (%rcx), %r14d
movb (%r14,%rax), %r11b
incq %rcx
movb (%r14,%rdi), %r14b
cmpb %r14b, %bl
je 0x36262
movzbl %r14b, %ecx
movzbl %bl, %eax
subl %ecx, %eax
jmp 0x362d5
movzbl %bl, %eax
negl %eax
jmp 0x362d5
xorl %eax, %eax
testb %r9b, %r9b
sete %al
popq %rbx
popq %r14
popq %rbp
retq
|
my_strnncoll_latin1_de:
push rbp
mov rbp, rsp
push r14
push rbx
add rdx, rsi
add r8, rcx
xor r10d, r10d
lea rax, combo2map
lea rdi, combo1map
xor r11d, r11d
loc_36262:
cmp rcx, r8
setb r14b
test r11b, r11b
setnz bl
or bl, r14b
cmp rsi, rdx
jb short loc_3627C
test r10b, r10b
jz short loc_362C6
loc_3627C:
test bl, bl
jz short loc_362CD
test r10b, r10b
jz short loc_3628D
mov ebx, r10d
xor r10d, r10d
jmp short loc_3629A
loc_3628D:
movzx ebx, byte ptr [rsi]
mov r10b, [rbx+rax]
inc rsi
mov bl, [rbx+rdi]
loc_3629A:
test r11b, r11b
jz short loc_362A7
mov r14d, r11d
xor r11d, r11d
jmp short loc_362B6
loc_362A7:
movzx r14d, byte ptr [rcx]
mov r11b, [r14+rax]
inc rcx
mov r14b, [r14+rdi]
loc_362B6:
cmp bl, r14b
jz short loc_36262
movzx ecx, r14b
movzx eax, bl
sub eax, ecx
jmp short loc_362D5
loc_362C6:
movzx eax, bl
neg eax
jmp short loc_362D5
loc_362CD:
xor eax, eax
test r9b, r9b
setz al
loc_362D5:
pop rbx
pop r14
pop rbp
retn
|
long long my_strnncoll_latin1_de(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
char a6)
{
unsigned __int8 *v6; // rdx
unsigned __int8 *v7; // r8
unsigned __int8 v8; // r10
unsigned __int8 v9; // r11
bool v10; // bl
unsigned __int8 v11; // bl
long long v12; // rbx
unsigned __int8 v13; // r14
long long v14; // r14
v6 = &a2[a3];
v7 = &a4[a5];
v8 = 0;
v9 = 0;
while ( 1 )
{
v10 = a4 < v7 || v9 != 0;
if ( a2 >= v6 && !v8 )
return (unsigned int)-v10;
if ( !v10 )
break;
if ( v8 )
{
v11 = v8;
v8 = 0;
}
else
{
v12 = *a2;
v8 = combo2map[v12];
++a2;
v11 = combo1map[v12];
}
if ( v9 )
{
v13 = v9;
v9 = 0;
}
else
{
v14 = *a4;
v9 = combo2map[v14];
++a4;
v13 = combo1map[v14];
}
if ( v11 != v13 )
return v11 - (unsigned int)v13;
}
return a6 == 0;
}
|
my_strnncoll_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
ADD RDX,RSI
ADD R8,RCX
XOR R10D,R10D
LEA RAX,[0x2a1af0]
LEA RDI,[0x2a19f0]
XOR R11D,R11D
LAB_00136262:
CMP RCX,R8
SETC R14B
TEST R11B,R11B
SETNZ BL
OR BL,R14B
CMP RSI,RDX
JC 0x0013627c
TEST R10B,R10B
JZ 0x001362c6
LAB_0013627c:
TEST BL,BL
JZ 0x001362cd
TEST R10B,R10B
JZ 0x0013628d
MOV EBX,R10D
XOR R10D,R10D
JMP 0x0013629a
LAB_0013628d:
MOVZX EBX,byte ptr [RSI]
MOV R10B,byte ptr [RBX + RAX*0x1]
INC RSI
MOV BL,byte ptr [RBX + RDI*0x1]
LAB_0013629a:
TEST R11B,R11B
JZ 0x001362a7
MOV R14D,R11D
XOR R11D,R11D
JMP 0x001362b6
LAB_001362a7:
MOVZX R14D,byte ptr [RCX]
MOV R11B,byte ptr [R14 + RAX*0x1]
INC RCX
MOV R14B,byte ptr [R14 + RDI*0x1]
LAB_001362b6:
CMP BL,R14B
JZ 0x00136262
MOVZX ECX,R14B
MOVZX EAX,BL
SUB EAX,ECX
JMP 0x001362d5
LAB_001362c6:
MOVZX EAX,BL
NEG EAX
JMP 0x001362d5
LAB_001362cd:
XOR EAX,EAX
TEST R9B,R9B
SETZ AL
LAB_001362d5:
POP RBX
POP R14
POP RBP
RET
|
uint my_strnncoll_latin1_de
(int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5,
char param_6)
{
byte *pbVar1;
byte bVar2;
byte *pbVar3;
byte bVar4;
byte bVar5;
byte bVar6;
pbVar1 = param_2 + param_3;
pbVar3 = param_4 + param_5;
bVar4 = 0;
bVar5 = 0;
do {
if ((pbVar1 <= param_2) && (bVar4 == 0)) {
return -(uint)(bVar5 != 0 || param_4 < pbVar3);
}
if (bVar5 == 0 && param_4 >= pbVar3) {
return (uint)(param_6 == '\0');
}
if (bVar4 == 0) {
bVar2 = *param_2;
bVar4 = combo2map[bVar2];
param_2 = param_2 + 1;
bVar2 = combo1map[bVar2];
}
else {
bVar2 = bVar4;
bVar4 = 0;
}
if (bVar5 == 0) {
bVar6 = *param_4;
bVar5 = combo2map[bVar6];
param_4 = param_4 + 1;
bVar6 = combo1map[bVar6];
}
else {
bVar6 = bVar5;
bVar5 = 0;
}
} while (bVar2 == bVar6);
return (uint)bVar2 - (uint)bVar6;
}
|
|
12,292
|
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 0x6b831
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x6b83d
jmp 0x6b966
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x6b877
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2f7b95(%rip), %rax # 0x3633f0
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 0x6b8c4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x30(%rbp), %rsi
callq 0x6af70
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0x6b8a6
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x243c0
movl %eax, -0x4(%rbp)
jmp 0x6b979
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 0x6b360
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x6b8fe
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2f7b0e(%rip), %rax # 0x3633f0
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 0x6b948
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x6af70
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x6b92a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x243c0
movl %eax, -0x4(%rbp)
jmp 0x6b979
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 0x6b360
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x6b961
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x6b979
jmp 0x6b810
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_6B810:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_6B831
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_6B831:
mov al, [rbp+var_41]
test al, 1
jnz short loc_6B83D
jmp loc_6B966
loc_6B83D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_6B877
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_6B8C4
loc_6B877:
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_6B8A6
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_6B979
loc_6B8A6:
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_6B8C4:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_6B8FE
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_6B948
loc_6B8FE:
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_6B92A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_6B979
loc_6B92A:
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_6B948:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_6B961
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_6B979
loc_6B961:
jmp loc_6B810
loc_6B966:
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_6B979:
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_0016b810:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x0016b831
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_0016b831:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0016b83d
JMP 0x0016b966
LAB_0016b83d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x0016b877
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x4633f0]
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 0x0016b8c4
LAB_0016b877:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
CALL 0x0016af70
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x0016b8a6
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001243c0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016b979
LAB_0016b8a6:
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 0x0016b360
LAB_0016b8c4:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x0016b8fe
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x4633f0]
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 0x0016b948
LAB_0016b8fe:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x38]
CALL 0x0016af70
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x0016b92a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001243c0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016b979
LAB_0016b92a:
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 0x0016b360
LAB_0016b948:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x0016b961
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016b979
LAB_0016b961:
JMP 0x0016b810
LAB_0016b966:
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_0016b979:
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;
}
|
|
12,293
|
my_strxfrm_flag_normalize
|
eloqsql/strings/ctype-simple.c
|
uint my_strxfrm_flag_normalize(uint flags, uint maximum)
{
DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS);
/* If levels are omitted, then 1-maximum is assumed*/
if (!(flags & MY_STRXFRM_LEVEL_ALL))
{
static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F };
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
flags= def_level_flags[maximum] | flag_pad;
}
else
{
uint i;
uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL;
uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
/*
If any level number is greater than the maximum,
it is treated as the maximum.
*/
for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++)
{
uint src_bit= 1 << i;
if (flag_lev & src_bit)
{
uint dst_bit= 1 << MY_MIN(i, maximum);
flags|= dst_bit;
flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT;
flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT;
}
}
flags|= flag_pad;
}
return flags;
}
|
O3
|
c
|
my_strxfrm_flag_normalize:
movl %edi, %eax
movl %edi, %edx
andl $0x3f, %edx
je 0x42614
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
decl %esi
movl %eax, %r8d
andl $0x3f00, %r8d # imm = 0x3F00
movl %eax, %r9d
andl $0x3f0000, %r9d # imm = 0x3F0000
xorl %edi, %edi
xorl %r10d, %r10d
btl %r10d, %edx
jae 0x425ff
cmpl %esi, %r10d
movl %esi, %ecx
cmovbl %r10d, %ecx
movl $0x1, %r11d
shll %cl, %r11d
movl $0x100, %ebx # imm = 0x100
shll %cl, %ebx
andl %r8d, %ebx
movl $0x10000, %r14d # imm = 0x10000
shll %cl, %r14d
addl %r11d, %ebx
andl %r9d, %r14d
addl %ebx, %r14d
orl %r14d, %edi
incl %r10d
cmpl $0x6, %r10d
jne 0x425c8
andl $0xc0, %eax
orl %edi, %eax
popq %rbx
popq %r14
popq %rbp
retq
andl $0xc0, %eax
movl %esi, %ecx
leaq 0x1699ce(%rip), %rdx # 0x1abff0
orl (%rdx,%rcx,4), %eax
retq
|
my_strxfrm_flag_normalize:
mov eax, edi
mov edx, edi
and edx, 3Fh
jz short loc_42614
push rbp
mov rbp, rsp
push r14
push rbx
dec esi
mov r8d, eax
and r8d, 3F00h
mov r9d, eax
and r9d, 3F0000h
xor edi, edi
xor r10d, r10d
loc_425C8:
bt edx, r10d
jnb short loc_425FF
cmp r10d, esi
mov ecx, esi
cmovb ecx, r10d
mov r11d, 1
shl r11d, cl
mov ebx, 100h
shl ebx, cl
and ebx, r8d
mov r14d, offset stru_10000
shl r14d, cl
add ebx, r11d
and r14d, r9d
add r14d, ebx
or edi, r14d
loc_425FF:
inc r10d
cmp r10d, 6
jnz short loc_425C8
and eax, 0C0h
or eax, edi
pop rbx
pop r14
pop rbp
retn
loc_42614:
and eax, 0C0h
mov ecx, esi
lea rdx, my_strxfrm_flag_normalize_def_level_flags
or eax, [rdx+rcx*4]
retn
|
long long my_strxfrm_flag_normalize(int a1, int a2)
{
int v3; // edx
unsigned int v4; // esi
int v5; // r8d
int v6; // edi
unsigned int i; // r10d
char v8; // cl
v3 = a1 & 0x3F;
if ( (a1 & 0x3F) == 0 )
return my_strxfrm_flag_normalize_def_level_flags[a2] | a1 & 0xC0u;
v4 = a2 - 1;
v5 = a1 & 0x3F00;
v6 = 0;
for ( i = 0; i != 6; ++i )
{
if ( _bittest(&v3, i) )
{
v8 = v4;
if ( i < v4 )
v8 = i;
v6 |= (1 << v8) + (v5 & (256 << v8)) + (a1 & 0x3F0000 & ((_DWORD)&stru_10000 << v8));
}
}
return v6 | a1 & 0xC0u;
}
|
my_strxfrm_flag_normalize:
MOV EAX,EDI
MOV EDX,EDI
AND EDX,0x3f
JZ 0x00142614
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
DEC ESI
MOV R8D,EAX
AND R8D,0x3f00
MOV R9D,EAX
AND R9D,0x3f0000
XOR EDI,EDI
XOR R10D,R10D
LAB_001425c8:
BT EDX,R10D
JNC 0x001425ff
CMP R10D,ESI
MOV ECX,ESI
CMOVC ECX,R10D
MOV R11D,0x1
SHL R11D,CL
MOV EBX,0x100
SHL EBX,CL
AND EBX,R8D
MOV R14D,0x10000
SHL R14D,CL
ADD EBX,R11D
AND R14D,R9D
ADD R14D,EBX
OR EDI,R14D
LAB_001425ff:
INC R10D
CMP R10D,0x6
JNZ 0x001425c8
AND EAX,0xc0
OR EAX,EDI
POP RBX
POP R14
POP RBP
RET
LAB_00142614:
AND EAX,0xc0
MOV ECX,ESI
LEA RDX,[0x2abff0]
OR EAX,dword ptr [RDX + RCX*0x4]
RET
|
uint my_strxfrm_flag_normalize(uint param_1,uint param_2)
{
uint uVar1;
byte bVar2;
uint uVar3;
uint uVar4;
if ((param_1 & 0x3f) != 0) {
uVar3 = 0;
uVar4 = 0;
do {
if (((param_1 & 0x3f) >> (uVar4 & 0x1f) & 1) != 0) {
uVar1 = param_2 - 1;
if (uVar4 < param_2 - 1) {
uVar1 = uVar4;
}
bVar2 = (byte)uVar1;
uVar3 = uVar3 | (0x10000 << (bVar2 & 0x1f) & param_1 & 0x3f0000) +
(0x100 << (bVar2 & 0x1f) & param_1 & 0x3f00) + (1 << (bVar2 & 0x1f));
}
uVar4 = uVar4 + 1;
} while (uVar4 != 6);
return param_1 & 0xc0 | uVar3;
}
return param_1 & 0xc0 | *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4);
}
|
|
12,294
|
ma_send_connect_attr
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
char *ma_send_connect_attr(MYSQL *mysql, unsigned char *buffer)
{
if (mysql->server_capabilities & CLIENT_CONNECT_ATTRS)
{
buffer= (unsigned char *)mysql_net_store_length((unsigned char *)buffer, (mysql->options.extension) ?
mysql->options.extension->connect_attrs_len : 0);
if (mysql->options.extension &&
ma_hashtbl_inited(&mysql->options.extension->connect_attrs))
{
uint i;
for (i=0; i < mysql->options.extension->connect_attrs.records; i++)
{
size_t len;
uchar *p= ma_hashtbl_element(&mysql->options.extension->connect_attrs, i);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= (len);
p+= (len + 1);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= len;
}
}
}
return (char *)buffer;
}
|
O0
|
c
|
ma_send_connect_attr:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x100000, %rax # imm = 0x100000
cmpq $0x0, %rax
je 0x1ba88
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x1b976
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x1b97e
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x1b97e
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x273c0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x1ba86
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0x1ba86
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x480(%rcx), %rcx
cmpl 0x38(%rcx), %eax
jae 0x1ba84
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rdi
addq $0x30, %rdi
movl -0x14(%rbp), %esi
callq 0x464d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x131a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x273c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x13360
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x131a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x273c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x13360
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1b9be
jmp 0x1ba86
jmp 0x1ba88
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_send_connect_attr:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+370h]
and rax, 100000h
cmp rax, 0
jz loc_1BA88
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz short loc_1B976
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short loc_1B97E
loc_1B976:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_1B97E:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz loc_1BA86
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+48h], 0
jz loc_1BA86
mov [rbp+var_14], 0
loc_1B9BE:
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
mov rcx, [rcx+480h]
cmp eax, [rcx+38h]
jnb loc_1BA84
mov rax, [rbp+var_8]
mov rdi, [rax+480h]
add rdi, 30h ; '0'
mov esi, [rbp+var_14]
call ma_hashtbl_element
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call _strlen
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_20]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call _strlen
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_20]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_1B9BE
loc_1BA84:
jmp short $+2
loc_1BA86:
jmp short $+2
loc_1BA88:
mov rax, [rbp+var_10]
add rsp, 40h
pop rbp
retn
|
long long ma_send_connect_attr(long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-28h]
long long v5; // [rsp+18h] [rbp-28h]
long long v6; // [rsp+20h] [rbp-20h]
long long v7; // [rsp+20h] [rbp-20h]
unsigned int i; // [rsp+2Ch] [rbp-14h]
long long v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+30h] [rbp-10h]
long long v11; // [rsp+30h] [rbp-10h]
long long v12; // [rsp+30h] [rbp-10h]
v9 = a2;
if ( (*(_QWORD *)(a1 + 880) & 0x100000LL) != 0 )
{
if ( *(_QWORD *)(a1 + 1152) )
v2 = mysql_net_store_length(a2, *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 120LL));
else
v2 = mysql_net_store_length(a2, 0LL);
v9 = v2;
if ( *(_QWORD *)(a1 + 1152) && *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 72LL) )
{
for ( i = 0; i < *(_DWORD *)(*(_QWORD *)(a1 + 1152) + 56LL); ++i )
{
v4 = ma_hashtbl_element(*(_QWORD *)(a1 + 1152) + 48LL, i);
v6 = strlen(v4);
v10 = mysql_net_store_length(v9, v6);
memcpy(v10, v4, v6);
v11 = v10 + v6;
v5 = v4 + v6 + 1;
v7 = strlen(v5);
v12 = mysql_net_store_length(v11, v7);
memcpy(v12, v5, v7);
v9 = v12 + v7;
}
}
}
return v9;
}
|
ma_send_connect_attr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x100000
CMP RAX,0x0
JZ 0x0011ba88
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0011b976
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0011b97e
LAB_0011b976:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0011b97e
LAB_0011b97e:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001273c0
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0011ba86
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x0011ba86
MOV dword ptr [RBP + -0x14],0x0
LAB_0011b9be:
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x480]
CMP EAX,dword ptr [RCX + 0x38]
JNC 0x0011ba84
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x480]
ADD RDI,0x30
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001464d0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001131a0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001273c0
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00113360
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001131a0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001273c0
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00113360
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0011b9be
LAB_0011ba84:
JMP 0x0011ba86
LAB_0011ba86:
JMP 0x0011ba88
LAB_0011ba88:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x40
POP RBP
RET
|
long ma_send_connect_attr(long param_1,long param_2)
{
char *__s;
size_t __n;
void *pvVar1;
size_t __n_00;
int8 local_40;
uint local_1c;
long local_18;
local_18 = param_2;
if ((*(ulong *)(param_1 + 0x370) & 0x100000) != 0) {
if (*(long *)(param_1 + 0x480) == 0) {
local_40 = 0;
}
else {
local_40 = *(int8 *)(*(long *)(param_1 + 0x480) + 0x78);
}
local_18 = mysql_net_store_length(param_2,local_40);
if ((*(long *)(param_1 + 0x480) != 0) && (*(long *)(*(long *)(param_1 + 0x480) + 0x48) != 0)) {
for (local_1c = 0; local_1c < *(uint *)(*(long *)(param_1 + 0x480) + 0x38);
local_1c = local_1c + 1) {
__s = (char *)ma_hashtbl_element(*(long *)(param_1 + 0x480) + 0x30,local_1c);
__n = strlen(__s);
pvVar1 = (void *)mysql_net_store_length(local_18,__n);
memcpy(pvVar1,__s,__n);
__n_00 = strlen(__s + __n + 1);
pvVar1 = (void *)mysql_net_store_length(__n + (long)pvVar1,__n_00);
memcpy(pvVar1,__s + __n + 1,__n_00);
local_18 = __n_00 + (long)pvVar1;
}
}
}
return local_18;
}
|
|
12,295
|
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&))
|
monkey531[P]llama/common/arg.h
|
common_arg(
const std::initializer_list<const char *> & args,
const std::string & help,
void (*handler)(common_params & params)
) : args(args), help(help), handler_void(handler) {}
|
O1
|
c
|
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0xb(%rsp), %rcx
leaq 0xa(%rsp), %r8
movl $0x1, %edx
callq 0x5aac2
leaq 0x38(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x30(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movq $0x0, 0x58(%rbx)
leaq 0x60(%rbx), %r12
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x9(%rsp), %rcx
movq %r12, %rdi
callq 0x5ab44
leaq 0x90(%rbx), %rdi
leaq 0xa0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
movq $0x0, 0x88(%rbx)
movq %rax, 0x90(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x261d6
movb $0x0, 0xb0(%rbx)
movq %r14, 0xb8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%rbx)
movq $0x0, 0xd0(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%r12), %rdi
testq %rdi, %rdi
je 0x578e0
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x1ba60
jmp 0x578e0
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x5ab8a
movq %rbx, %rdi
callq 0x5ab8a
movq %r14, %rdi
callq 0x1c250
nop
|
_ZN10common_argC2ERKSt16initializer_listIPKcERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r14, rcx
mov r15, rdx
mov r13, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_2C]
mov dword ptr [rsi], 0
lea rcx, [rsp+38h+var_2D]
lea r8, [rsp+38h+var_2E]
mov edx, 1
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+40h], xmm0
movups xmmword ptr [rbx+50h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov [rbx+48h], rax
mov [rbx+50h], rax
mov qword ptr [rbx+58h], 0
lea r12, [rbx+60h]
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+38h+var_2F]
mov rdi, r12
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
lea rdi, [rbx+90h]
lea rax, [rbx+0A0h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+78h], xmm0
mov qword ptr [rbx+88h], 0
mov [rbx+90h], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov byte ptr [rbx+0B0h], 0
mov [rbx+0B8h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+0C0h], xmm0
mov qword ptr [rbx+0D0h], 0
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [r12]; void *
test rdi, rdi
jz short loc_578E0
mov rsi, [rbx+70h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_578E0
mov r14, rax
loc_578E0:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
|
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4)
{
long long result; // rax
char v7; // [rsp+9h] [rbp-2Fh] BYREF
char v8; // [rsp+Ah] [rbp-2Eh] BYREF
char v9; // [rsp+Bh] [rbp-2Dh] BYREF
_DWORD v10[11]; // [rsp+Ch] [rbp-2Ch] BYREF
v10[0] = 0;
std::set<llama_example>::set(a1, v10, 1LL, &v9, &v8);
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 80) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v7);
*(_OWORD *)(a1 + 120) = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
*(_QWORD *)(a1 + 144) = a1 + 160;
result = std::string::_M_construct<char *>((_QWORD *)(a1 + 144), *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
*(_BYTE *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 184) = a4;
*(_OWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 208) = 0LL;
return result;
}
|
common_arg:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RCX
MOV R15,RDX
MOV R13,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],0x0
LEA RCX,[RSP + 0xb]
LEA R8,[RSP + 0xa]
MOV EDX,0x1
CALL 0x0015aac2
LEA RAX,[RBX + 0x38]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOVUPS xmmword ptr [RBX + 0x50],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
MOV qword ptr [RBX + 0x58],0x0
LEA R12,[RBX + 0x60]
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LAB_0015784f:
LEA RCX,[RSP + 0x9]
MOV RDI,R12
CALL 0x0015ab44
LEA RDI,[RBX + 0x90]
LEA RAX,[RBX + 0xa0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x78],XMM0
MOV qword ptr [RBX + 0x88],0x0
MOV qword ptr [RBX + 0x90],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_0015788d:
CALL 0x001261d6
LAB_00157892:
MOV byte ptr [RBX + 0xb0],0x0
MOV qword ptr [RBX + 0xb8],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
MOV qword ptr [RBX + 0xd0],0x0
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::string const&,
void (*)(common_params&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,string *param_2,
_func_void_common_params_ptr *param_3)
{
int1 local_2f;
int1 local_2e;
int1 local_2d;
int4 local_2c;
local_2c = 0;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&local_2c,1,&local_2d,&local_2e);
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 0015784f to 0015785b has its CatchHandler @ 001578dd */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&local_2f);
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(common_arg **)(this + 0x90) = this + 0xa0;
/* try { // try from 0015788d to 00157891 has its CatchHandler @ 001578c3 */
std::__cxx11::string::_M_construct<char*>
(this + 0x90,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
this[0xb0] = (common_arg)0x0;
*(_func_void_common_params_ptr **)(this + 0xb8) = param_3;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
return;
}
|
|
12,296
|
testing::internal::CmpHelperSTRNE(char const*, char const*, wchar_t const*, wchar_t const*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
AssertionResult CmpHelperSTRNE(const char* s1_expression,
const char* s2_expression, const wchar_t* s1,
const wchar_t* s2) {
if (!String::WideCStringEquals(s1, s2)) {
return AssertionSuccess();
}
return AssertionFailure()
<< "Expected: (" << s1_expression << ") != (" << s2_expression
<< "), actual: " << PrintToString(s1) << " vs " << PrintToString(s2);
}
|
O0
|
cpp
|
testing::internal::CmpHelperSTRNE(char const*, char const*, wchar_t const*, wchar_t const*):
subq $0xe8, %rsp
movq %rdi, 0x50(%rsp)
movq %rdi, %rax
movq %rax, 0x58(%rsp)
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rcx, 0xc8(%rsp)
movq %r8, 0xc0(%rsp)
movq 0xc8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x26fe0
testb $0x1, %al
jne 0x271c4
movq 0x50(%rsp), %rdi
callq 0x13220
jmp 0x2735f
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x13250
movq 0x40(%rsp), %rdi
leaq 0x4b1a2(%rip), %rsi # 0x72384
callq 0x11290
movq %rax, 0x48(%rsp)
jmp 0x271ee
movq 0x48(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x11320
movq %rax, 0x38(%rsp)
jmp 0x27207
movq 0x38(%rsp), %rdi
leaq 0x4d9d9(%rip), %rsi # 0x74bec
callq 0x496a0
movq %rax, 0x30(%rsp)
jmp 0x2721f
movq 0x30(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x11320
movq %rax, 0x28(%rsp)
jmp 0x27238
movq 0x28(%rsp), %rdi
leaq 0x4b14f(%rip), %rsi # 0x72393
callq 0x11290
movq %rax, 0x20(%rsp)
jmp 0x27250
leaq 0x80(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x4a180
jmp 0x27267
movq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x11440
movq %rax, 0x18(%rsp)
jmp 0x27280
movq 0x18(%rsp), %rdi
leaq 0x4b113(%rip), %rsi # 0x7239f
callq 0x11500
movq %rax, 0x10(%rsp)
jmp 0x27298
leaq 0x60(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x4a180
jmp 0x272ac
movq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x11440
movq %rax, 0x8(%rsp)
jmp 0x272c2
movq 0x8(%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0x13020
jmp 0x272d3
leaq 0x60(%rsp), %rdi
callq 0xec60
leaq 0x80(%rsp), %rdi
callq 0xec60
leaq 0xb0(%rsp), %rdi
callq 0xee60
jmp 0x2735f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x27350
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x27343
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xec60
leaq 0x80(%rsp), %rdi
callq 0xec60
leaq 0xb0(%rsp), %rdi
callq 0xee60
jmp 0x2736c
movq 0x58(%rsp), %rax
addq $0xe8, %rsp
retq
movq 0xa8(%rsp), %rdi
callq 0xb910
nopl (%rax)
|
_ZN7testing8internal14CmpHelperSTRNEEPKcS2_PKwS4_:
sub rsp, 0E8h
mov [rsp+0E8h+var_98], rdi
mov rax, rdi
mov [rsp+0E8h+var_90], rax
mov [rsp+0E8h+var_8], rdi
mov [rsp+0E8h+var_10], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_20], rcx
mov [rsp+0E8h+var_28], r8
mov rdi, [rsp+0E8h+var_20]
mov rsi, [rsp+0E8h+var_28]
call _ZN7testing8internal6String17WideCStringEqualsEPKwS3_; testing::internal::String::WideCStringEquals(wchar_t const*,wchar_t const*)
test al, 1
jnz short loc_271C4
mov rdi, [rsp+0E8h+var_98]; this
call _ZN7testing16AssertionSuccessEv; testing::AssertionSuccess(void)
jmp loc_2735F
loc_271C4:
lea rdi, [rsp+0E8h+var_38]; this
mov [rsp+0E8h+var_A8], rdi
call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void)
mov rdi, [rsp+0E8h+var_A8]
lea rsi, aExpected; "Expected: ("
call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&)
mov [rsp+0E8h+var_A0], rax
jmp short $+2
loc_271EE:
mov rdi, [rsp+0E8h+var_A0]
lea rsi, [rsp+0E8h+var_10]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov [rsp+0E8h+var_B0], rax
jmp short $+2
loc_27207:
mov rdi, [rsp+0E8h+var_B0]
lea rsi, asc_74BEC; ") != ("
call _ZN7testing15AssertionResultlsIA7_cEERS0_RKT_; testing::AssertionResult::operator<<<char [7]>(char [7] const&)
mov [rsp+0E8h+var_B8], rax
jmp short $+2
loc_2721F:
mov rdi, [rsp+0E8h+var_B8]
lea rsi, [rsp+0E8h+var_18]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov [rsp+0E8h+var_C0], rax
jmp short $+2
loc_27238:
mov rdi, [rsp+0E8h+var_C0]
lea rsi, aActual; "), actual: "
call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&)
mov [rsp+0E8h+var_C8], rax
jmp short $+2
loc_27250:
lea rdi, [rsp+0E8h+var_68]
lea rsi, [rsp+0E8h+var_20]
call _ZN7testing13PrintToStringIPKwEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<wchar_t const*>(wchar_t const* const&)
jmp short $+2
loc_27267:
mov rdi, [rsp+0E8h+var_C8]
lea rsi, [rsp+0E8h+var_68]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov [rsp+0E8h+var_D0], rax
jmp short $+2
loc_27280:
mov rdi, [rsp+0E8h+var_D0]
lea rsi, aVs; " vs "
call _ZN7testing15AssertionResultlsIA5_cEERS0_RKT_; testing::AssertionResult::operator<<<char [5]>(char [5] const&)
mov [rsp+0E8h+var_D8], rax
jmp short $+2
loc_27298:
lea rdi, [rsp+0E8h+var_88]
lea rsi, [rsp+0E8h+var_28]
call _ZN7testing13PrintToStringIPKwEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<wchar_t const*>(wchar_t const* const&)
jmp short $+2
loc_272AC:
mov rdi, [rsp+0E8h+var_D8]
lea rsi, [rsp+0E8h+var_88]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov [rsp+0E8h+var_E0], rax
jmp short $+2
loc_272C2:
mov rsi, [rsp+0E8h+var_E0]; testing::AssertionResult *
mov rdi, [rsp+0E8h+var_98]; this
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
jmp short $+2
loc_272D3:
lea rdi, [rsp+0E8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_38]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp short loc_2735F
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
jmp short loc_27350
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
jmp short loc_27343
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_27343:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_27350:
lea rdi, [rsp+arg_A8]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp short loc_2736C
loc_2735F:
mov rax, [rsp+0E8h+var_90]
add rsp, 0E8h
retn
loc_2736C:
mov rdi, [rsp+arg_A0]
call __Unwind_Resume
|
testing::AssertionResult * testing::internal::CmpHelperSTRNE(
testing::AssertionResult *a1,
long long a2,
long long a3,
long long a4,
long long a5)
{
long long v6; // rdx
long long v7; // rcx
long long v8; // r8
long long v9; // r9
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
int v18; // edx
int v19; // ecx
int v20; // r8d
int v21; // r9d
int v23; // [rsp+0h] [rbp-E8h]
int v24; // [rsp+0h] [rbp-E8h]
int v25; // [rsp+8h] [rbp-E0h]
int v26; // [rsp+8h] [rbp-E0h]
const testing::AssertionResult *v27; // [rsp+8h] [rbp-E0h]
int v28; // [rsp+10h] [rbp-D8h]
unsigned int v29; // [rsp+10h] [rbp-D8h]
testing::AssertionResult *v30; // [rsp+10h] [rbp-D8h]
int v31; // [rsp+18h] [rbp-D0h]
testing::AssertionResult *v32; // [rsp+18h] [rbp-D0h]
testing::AssertionResult *v33; // [rsp+20h] [rbp-C8h]
testing::AssertionResult *v34; // [rsp+28h] [rbp-C0h]
testing::AssertionResult *v35; // [rsp+30h] [rbp-B8h]
unsigned int v36; // [rsp+38h] [rbp-B0h]
testing::AssertionResult *v37; // [rsp+48h] [rbp-A0h]
_BYTE v38[32]; // [rsp+60h] [rbp-88h] BYREF
_BYTE v39[48]; // [rsp+80h] [rbp-68h] BYREF
_BYTE v40[16]; // [rsp+B0h] [rbp-38h] BYREF
long long v41; // [rsp+C0h] [rbp-28h] BYREF
long long v42; // [rsp+C8h] [rbp-20h] BYREF
long long v43; // [rsp+D0h] [rbp-18h] BYREF
_QWORD v44[2]; // [rsp+D8h] [rbp-10h] BYREF
v44[1] = a1;
v44[0] = a2;
v43 = a3;
v42 = a4;
v41 = a5;
if ( testing::internal::String::WideCStringEquals(a4, a5) )
{
testing::AssertionFailure((testing *)v40, a5, v6, v7, v8, v9);
v37 = testing::AssertionResult::operator<<<char [12]>((testing::AssertionResult *)v40, (long long)"Expected: (");
v36 = (unsigned int)testing::AssertionResult::operator<<<char const*>(v37, (long long)v44);
v35 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [7]>(
v36,
(unsigned int)") != (",
v10,
v11,
v12,
v13);
v34 = testing::AssertionResult::operator<<<char const*>(v35, (long long)&v43);
v33 = testing::AssertionResult::operator<<<char [12]>(v34, (long long)"), actual: ");
testing::PrintToString<wchar_t const*>(
(unsigned int)v39,
(unsigned int)&v42,
v14,
v15,
v16,
v17,
v23,
v25,
v28,
v31);
v32 = testing::AssertionResult::operator<<<std::string>(v33, (long long)v39);
v29 = (unsigned int)testing::AssertionResult::operator<<<char [5]>(v32, (long long)" vs ");
testing::PrintToString<wchar_t const*>(
(unsigned int)v38,
(unsigned int)&v41,
v18,
v19,
v20,
v21,
v24,
v26,
v29,
(_DWORD)v32);
v27 = testing::AssertionResult::operator<<<std::string>(v30, (long long)v38);
testing::AssertionResult::AssertionResult(a1, v27);
std::string::~string(v38);
std::string::~string(v39);
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v40);
}
else
{
testing::AssertionSuccess(a1, a5, v6, v7, v8, v9);
}
return a1;
}
|
CmpHelperSTRNE:
SUB RSP,0xe8
MOV qword ptr [RSP + 0x50],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0xe0],RDI
MOV qword ptr [RSP + 0xd8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xc8],RCX
MOV qword ptr [RSP + 0xc0],R8
MOV RDI,qword ptr [RSP + 0xc8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x00126fe0
TEST AL,0x1
JNZ 0x001271c4
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00113220
JMP 0x0012735f
LAB_001271c4:
LEA RDI,[RSP + 0xb0]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x00113250
MOV RDI,qword ptr [RSP + 0x40]
LAB_001271db:
LEA RSI,[0x172384]
CALL 0x00111290
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001271ee
LAB_001271ee:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0xd8]
CALL 0x00111320
MOV qword ptr [RSP + 0x38],RAX
JMP 0x00127207
LAB_00127207:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[0x174bec]
CALL 0x001496a0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0012721f
LAB_0012721f:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0xd0]
CALL 0x00111320
MOV qword ptr [RSP + 0x28],RAX
JMP 0x00127238
LAB_00127238:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x172393]
CALL 0x00111290
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00127250
LAB_00127250:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0xc8]
CALL 0x0014a180
JMP 0x00127267
LAB_00127267:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x80]
CALL 0x00111440
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00127280
LAB_00127280:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x17239f]
CALL 0x00111500
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00127298
LAB_00127298:
LEA RDI,[RSP + 0x60]
LEA RSI,[RSP + 0xc0]
CALL 0x0014a180
JMP 0x001272ac
LAB_001272ac:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x60]
CALL 0x00111440
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001272c2
LAB_001272c2:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00113020
LAB_001272d1:
JMP 0x001272d3
LAB_001272d3:
LEA RDI,[RSP + 0x60]
CALL 0x0010ec60
LEA RDI,[RSP + 0x80]
CALL 0x0010ec60
LEA RDI,[RSP + 0xb0]
CALL 0x0010ee60
JMP 0x0012735f
LAB_0012735f:
MOV RAX,qword ptr [RSP + 0x58]
ADD RSP,0xe8
RET
|
/* testing::internal::CmpHelperSTRNE(char const*, char const*, wchar_t const*, wchar_t const*) */
internal * __thiscall
testing::internal::CmpHelperSTRNE
(internal *this,char *param_1,char *param_2,wchar_t *param_3,wchar_t *param_4)
{
ulong uVar1;
AssertionResult *pAVar2;
testing local_88 [32];
testing local_68 [48];
testing local_38 [16];
wchar_t *local_28;
wchar_t *local_20;
char *local_18;
char *local_10;
internal *local_8;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
uVar1 = String::WideCStringEquals(param_3,param_4);
if ((uVar1 & 1) == 0) {
AssertionSuccess((testing *)this);
}
else {
AssertionFailure(local_38);
/* try { // try from 001271db to 00127264 has its CatchHandler @ 001272f9 */
pAVar2 = AssertionResult::operator<<((AssertionResult *)local_38,"Expected: (");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_10);
pAVar2 = AssertionResult::operator<<(pAVar2,") != (");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_18);
pAVar2 = AssertionResult::operator<<(pAVar2,"), actual: ");
PrintToString<wchar_t_const*>(local_68,&local_20);
/* try { // try from 00127267 to 001272a9 has its CatchHandler @ 0012730f */
pAVar2 = AssertionResult::operator<<(pAVar2,(string *)local_68);
pAVar2 = AssertionResult::operator<<(pAVar2," vs ");
PrintToString<wchar_t_const*>(local_88,&local_28);
/* try { // try from 001272ac to 001272d0 has its CatchHandler @ 00127325 */
pAVar2 = AssertionResult::operator<<(pAVar2,(string *)local_88);
AssertionResult::AssertionResult((AssertionResult *)this,pAVar2);
std::__cxx11::string::~string((string *)local_88);
std::__cxx11::string::~string((string *)local_68);
AssertionResult::~AssertionResult((AssertionResult *)local_38);
}
return this;
}
|
|
12,297
|
SceneTitle::loadData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
GhostEscape/src/scene_title.cpp
|
void SceneTitle::loadData(const std::string &file_path)
{
int score = 0;
std::ifstream file(file_path, std::ios::binary); // 以二进制形式保存
if (file.is_open()) {
file.read(reinterpret_cast<char*>(&score), sizeof(score));
file.close();
}
game_.setHighScore(score);
}
|
O0
|
cpp
|
SceneTitle::loadData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x240(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x220(%rbp), %rdi
movq %rdi, -0x238(%rbp)
movl $0x4, %edx
callq 0x66b0
movq -0x238(%rbp), %rdi
callq 0x6690
movb %al, -0x22d(%rbp)
jmp 0x1f825
movb -0x22d(%rbp), %al
testb $0x1, %al
jne 0x1f831
jmp 0x1f878
leaq -0x220(%rbp), %rdi
leaq -0x14(%rbp), %rsi
movl $0x4, %edx
callq 0x6540
jmp 0x1f848
leaq -0x220(%rbp), %rdi
callq 0x60c0
jmp 0x1f856
jmp 0x1f878
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x60e0
jmp 0x1f8a2
movq -0x240(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x14(%rbp), %esi
callq 0x1f970
jmp 0x1f88d
leaq -0x220(%rbp), %rdi
callq 0x60e0
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
movq -0x228(%rbp), %rdi
callq 0x6750
nop
|
_ZN10SceneTitle8loadDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 240h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_240], rax
mov dword ptr [rbp+var_14], 0
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_220]
mov [rbp+var_238], rdi
mov edx, 4
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
mov rdi, [rbp+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv; std::ifstream::is_open(void)
mov [rbp+var_22D], al
jmp short $+2
loc_1F825:
mov al, [rbp+var_22D]
test al, 1
jnz short loc_1F831
jmp short loc_1F878
loc_1F831:
lea rdi, [rbp+var_220]; this
lea rsi, [rbp+var_14]; char *
mov edx, 4; __int64
call __ZNSi4readEPcl; std::istream::read(char *,long)
jmp short $+2
loc_1F848:
lea rdi, [rbp+var_220]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv; std::ifstream::close(void)
jmp short $+2
loc_1F856:
jmp short loc_1F878
mov rcx, rax
mov eax, edx
mov [rbp+var_228], rcx
mov [rbp+var_22C], eax
lea rdi, [rbp+var_220]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
jmp short loc_1F8A2
loc_1F878:
mov rax, [rbp+var_240]
mov rdi, [rax+10h]; this
mov esi, dword ptr [rbp+var_14]; int
call _ZN4Game12setHighScoreEi; Game::setHighScore(int)
jmp short $+2
loc_1F88D:
lea rdi, [rbp+var_220]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
add rsp, 240h
pop rbp
retn
loc_1F8A2:
mov rdi, [rbp+var_228]
call __Unwind_Resume
|
long long SceneTitle::loadData(long long a1, long long a2)
{
char v3[524]; // [rsp+20h] [rbp-220h] BYREF
char v4[4]; // [rsp+22Ch] [rbp-14h] BYREF
long long v5; // [rsp+230h] [rbp-10h]
long long v6; // [rsp+238h] [rbp-8h]
v6 = a1;
v5 = a2;
*(_DWORD *)v4 = 0;
std::ifstream::basic_ifstream(v3, a2, 4LL);
if ( (std::ifstream::is_open(v3) & 1) != 0 )
{
std::istream::read((std::istream *)v3, v4, 4LL);
std::ifstream::close(v3);
}
Game::setHighScore(*(Game **)(a1 + 16), *(int *)v4);
return std::ifstream::~ifstream(v3);
}
|
loadData:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x240],RAX
MOV dword ptr [RBP + -0x14],0x0
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x220]
MOV qword ptr [RBP + -0x238],RDI
MOV EDX,0x4
CALL 0x001066b0
MOV RDI,qword ptr [RBP + -0x238]
LAB_0011f818:
CALL 0x00106690
MOV byte ptr [RBP + -0x22d],AL
JMP 0x0011f825
LAB_0011f825:
MOV AL,byte ptr [RBP + -0x22d]
TEST AL,0x1
JNZ 0x0011f831
JMP 0x0011f878
LAB_0011f831:
LEA RDI,[RBP + -0x220]
LEA RSI,[RBP + -0x14]
MOV EDX,0x4
CALL 0x00106540
JMP 0x0011f848
LAB_0011f848:
LEA RDI,[RBP + -0x220]
CALL 0x001060c0
JMP 0x0011f856
LAB_0011f856:
JMP 0x0011f878
LAB_0011f878:
MOV RAX,qword ptr [RBP + -0x240]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0011f970
LAB_0011f88b:
JMP 0x0011f88d
LAB_0011f88d:
LEA RDI,[RBP + -0x220]
CALL 0x001060e0
ADD RSP,0x240
POP RBP
RET
|
/* SceneTitle::loadData(std::__cxx11::string const&) */
void __thiscall SceneTitle::loadData(SceneTitle *this,string *param_1)
{
byte bVar1;
ifstream local_228 [524];
int local_1c;
string *local_18;
SceneTitle *local_10;
local_1c = 0;
local_18 = param_1;
local_10 = this;
std::ifstream::ifstream(local_228,param_1,4);
/* try { // try from 0011f818 to 0011f88a has its CatchHandler @ 0011f858 */
bVar1 = std::ifstream::is_open();
if ((bVar1 & 1) != 0) {
std::istream::read((char *)local_228,(long)&local_1c);
std::ifstream::close();
}
Game::setHighScore(*(Game **)(this + 0x10),local_1c);
std::ifstream::~ifstream(local_228);
return;
}
|
|
12,298
|
SceneTitle::loadData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
GhostEscape/src/scene_title.cpp
|
void SceneTitle::loadData(const std::string &file_path)
{
int score = 0;
std::ifstream file(file_path, std::ios::binary); // 以二进制形式保存
if (file.is_open()) {
file.read(reinterpret_cast<char*>(&score), sizeof(score));
file.close();
}
game_.setHighScore(score);
}
|
O3
|
cpp
|
SceneTitle::loadData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rdi, %rbx
movl $0x0, -0xc(%rbp)
leaq -0x218(%rbp), %rdi
movl $0x4, %edx
callq 0x5570
leaq -0x1a0(%rbp), %rdi
callq 0x50b0
xorl %ecx, %ecx
testb %al, %al
je 0xeb8d
leaq -0x218(%rbp), %rdi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x5460
leaq -0x218(%rbp), %rdi
callq 0x50a0
movl -0xc(%rbp), %ecx
movq 0x10(%rbx), %rax
movl %ecx, 0x48(%rax)
leaq -0x218(%rbp), %rdi
callq 0x50c0
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x50c0
movq %rbx, %rdi
callq 0x5600
nop
|
_ZN10SceneTitle8loadDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
push rbx
sub rsp, 218h
mov rbx, rdi
mov dword ptr [rbp+var_C], 0
lea rdi, [rbp+var_218]
mov edx, 4
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rbp+var_1A0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
xor ecx, ecx
test al, al
jz short loc_EB8D
lea rdi, [rbp+var_218]; this
lea rsi, [rbp+var_C]; char *
mov edx, 4; __int64
call __ZNSi4readEPcl; std::istream::read(char *,long)
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv; std::ifstream::close(void)
mov ecx, dword ptr [rbp+var_C]
loc_EB8D:
mov rax, [rbx+10h]
mov [rax+48h], ecx
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
add rsp, 218h
pop rbx
pop rbp
retn
mov rbx, rax
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, rbx
call __Unwind_Resume
|
long long SceneTitle::loadData(long long a1, long long a2)
{
char is_open; // al
int v3; // ecx
_BYTE v5[120]; // [rsp+8h] [rbp-218h] BYREF
_BYTE v6[404]; // [rsp+80h] [rbp-1A0h] BYREF
char v7[12]; // [rsp+214h] [rbp-Ch] BYREF
*(_DWORD *)v7 = 0;
std::ifstream::basic_ifstream(v5, a2, 4LL);
is_open = std::__basic_file<char>::is_open(v6);
v3 = 0;
if ( is_open )
{
std::istream::read((std::istream *)v5, v7, 4LL);
std::ifstream::close(v5);
v3 = *(_DWORD *)v7;
}
*(_DWORD *)(*(_QWORD *)(a1 + 16) + 72LL) = v3;
return std::ifstream::~ifstream(v5);
}
|
loadData:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x218
MOV RBX,RDI
MOV dword ptr [RBP + -0xc],0x0
LEA RDI,[RBP + -0x218]
MOV EDX,0x4
CALL 0x00105570
LEA RDI,[RBP + -0x1a0]
CALL 0x001050b0
XOR ECX,ECX
TEST AL,AL
JZ 0x0010eb8d
LAB_0010eb69:
LEA RDI,[RBP + -0x218]
LEA RSI,[RBP + -0xc]
MOV EDX,0x4
CALL 0x00105460
LEA RDI,[RBP + -0x218]
CALL 0x001050a0
LAB_0010eb8a:
MOV ECX,dword ptr [RBP + -0xc]
LAB_0010eb8d:
MOV RAX,qword ptr [RBX + 0x10]
MOV dword ptr [RAX + 0x48],ECX
LEA RDI,[RBP + -0x218]
CALL 0x001050c0
ADD RSP,0x218
POP RBX
POP RBP
RET
|
/* SceneTitle::loadData(std::__cxx11::string const&) */
void __thiscall SceneTitle::loadData(SceneTitle *this,string *param_1)
{
char cVar1;
int4 uVar2;
ifstream local_220 [524];
int4 local_14;
local_14 = 0;
std::ifstream::ifstream(local_220,param_1,4);
cVar1 = std::__basic_file<char>::is_open();
uVar2 = 0;
if (cVar1 != '\0') {
/* try { // try from 0010eb69 to 0010eb89 has its CatchHandler @ 0010ebaa */
std::istream::read((char *)local_220,(long)&local_14);
std::ifstream::close();
uVar2 = local_14;
}
*(int4 *)(*(long *)(this + 0x10) + 0x48) = uVar2;
std::ifstream::~ifstream(local_220);
return;
}
|
|
12,299
|
inline_mysql_file_pwrite
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline size_t
inline_mysql_file_pwrite(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, const uchar *buffer, size_t count, my_off_t offset, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_written;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_pwrite(file, buffer, count, offset, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_written= (result == 0) ? count : 0;
else
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
return result;
}
#endif
result= my_pwrite(file, buffer, count, offset, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_pwrite:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x218294(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x7, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xb335f
leaq 0x21824a(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0xfd050
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xb330a
cmpq $0x0, -0x38(%rbp)
jne 0xb32ef
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0xb32fa
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0xb32fa
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0xb3337
cmpq $-0x1, -0x38(%rbp)
je 0xb331e
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0xb3329
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0xb3329
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x2181a2(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xb3383
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0xfd050
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
|
inline_mysql_file_pwrite_1:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 7
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_B335F
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
call my_pwrite
mov [rbp+var_38], rax
mov rax, [rbp+arg_0]
and rax, 6
cmp rax, 0
jz short loc_B330A
cmp [rbp+var_38], 0
jnz short loc_B32EF
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_B32FA
loc_B32EF:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_B32FA:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_B3337
loc_B330A:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_B331E
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_B3329
loc_B331E:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_B3329:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_B3337:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_B3383
loc_B335F:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
call my_pwrite
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_B3383:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
|
long long inline_mysql_file_pwrite_1(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
long long v8; // [rsp+0h] [rbp-A0h]
long long v9; // [rsp+8h] [rbp-98h]
_BYTE v10[72]; // [rsp+18h] [rbp-88h] BYREF
long long v11; // [rsp+60h] [rbp-40h]
long long v12; // [rsp+68h] [rbp-38h]
long long v13; // [rsp+70h] [rbp-30h]
long long v14; // [rsp+78h] [rbp-28h]
long long v15; // [rsp+80h] [rbp-20h]
unsigned int v16; // [rsp+88h] [rbp-18h]
unsigned int v17; // [rsp+8Ch] [rbp-14h]
long long v18; // [rsp+90h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v10, a3, 7LL);
if ( v11 )
{
((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v11, v14, v18, v17);
v12 = my_pwrite(v16, v15, v14, v13, a7);
if ( (a7 & 6) != 0 )
{
if ( v12 )
v9 = 0LL;
else
v9 = v14;
((void ( *)(long long, long long))PSI_server[67])(v11, v9);
}
else
{
if ( v12 == -1 )
v8 = 0LL;
else
v8 = v12;
((void ( *)(long long, long long))PSI_server[67])(v11, v8);
}
return v12;
}
else
{
return my_pwrite(v16, v15, v14, v13, a7);
}
}
|
inline_mysql_file_pwrite:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x7
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001b335f
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x001fd050
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + 0x10]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001b330a
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x001b32ef
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001b32fa
LAB_001b32ef:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001b32fa
LAB_001b32fa:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001b3337
LAB_001b330a:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x001b331e
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001b3329
LAB_001b331e:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001b3329
LAB_001b3329:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_001b3337:
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x90]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001b3383
LAB_001b335f:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x001fd050
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001b3383:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
long inline_mysql_file_pwrite
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
long param_5,int8 param_6,ulong param_7)
{
long local_a8;
long local_a0;
long local_98;
int1 local_90 [72];
long local_48;
long local_40;
int8 local_38;
long local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7);
if (local_48 == 0) {
local_10 = my_pwrite(local_20,local_28,local_30,local_38,param_7);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c);
local_40 = my_pwrite(local_20,local_28,local_30,local_38,param_7);
if ((param_7 & 6) == 0) {
local_a8 = local_40;
if (local_40 == -1) {
local_a8 = 0;
}
local_98 = local_a8;
}
else {
if (local_40 == 0) {
local_a0 = local_30;
}
else {
local_a0 = 0;
}
local_98 = local_a0;
}
(**(code **)(PSI_server + 0x218))(local_48,local_98);
local_10 = local_40;
}
return local_10;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.