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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
57,300
|
u64toa
|
bluesky950520[P]quickjs/cutils.c
|
size_t u64toa(char buf[minimum_length(21)], uint64_t n)
{
if (likely(n < 0x100000000))
return u32toa(buf, n);
size_t len;
if (n >= TEN_POW_7) {
uint64_t n1 = n / TEN_POW_7;
n %= TEN_POW_7;
if (n1 >= TEN_POW_7) {
uint32_t quo = n1 / TEN_POW_7;
n1 %= TEN_POW_7;
len = u7toa_shift(buf, quo);
len = u07toa_shift(buf, n1, len);
} else {
len = u7toa_shift(buf, n1);
}
return u07toa_shift(buf, n, len);
}
return u7toa_shift(buf, n);
}
|
O2
|
c
|
u64toa:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rax
shrq $0x20, %rax
jne 0x16566
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x16482
movl $0x989680, %edi # imm = 0x989680
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movq %rax, %rcx
movq %rdx, %r14
movabsq $0x5af3107a4000, %r8 # imm = 0x5AF3107A4000
cmpq %r8, %rsi
jb 0x165b6
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
movq %rdx, %r15
movq %rbx, %rdi
callq 0x164dc
movq %rbx, %rdi
movl %r15d, %esi
movq %rax, %rdx
callq 0x16515
jmp 0x165c0
movq %rbx, %rdi
movl %ecx, %esi
callq 0x164dc
movq %rbx, %rdi
movl %r14d, %esi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x16515
|
u64toa:
push r15
push r14
push rbx
mov rbx, rdi
mov rax, rsi
shr rax, 20h
jnz short loc_16566
mov rdi, rbx
pop rbx
pop r14
pop r15
jmp u32toa
loc_16566:
mov edi, 989680h
mov rax, rsi
xor edx, edx
div rdi
mov rcx, rax
mov r14, rdx
mov r8, 5AF3107A4000h
cmp rsi, r8
jb short loc_165B6
mov rax, rsi
xor edx, edx
div r8
mov rsi, rax
mov rax, rcx
xor edx, edx
div rdi
mov r15, rdx
mov rdi, rbx
call u7toa_shift
mov rdi, rbx
mov esi, r15d
mov rdx, rax
call u07toa_shift
jmp short loc_165C0
loc_165B6:
mov rdi, rbx
mov esi, ecx
call u7toa_shift
loc_165C0:
mov rdi, rbx
mov esi, r14d
mov rdx, rax
pop rbx
pop r14
pop r15
jmp u07toa_shift
|
long long u64toa(_BYTE *a1, unsigned long long a2)
{
unsigned long long v3; // rcx
unsigned long long v4; // r15
long long v5; // rax
long long v6; // rax
if ( !HIDWORD(a2) )
return u32toa(a1, a2);
v3 = a2 / 0x989680;
if ( a2 < 0x5AF3107A4000LL )
{
v6 = u7toa_shift(a1, v3);
}
else
{
v4 = v3 % 0x989680;
v5 = u7toa_shift(a1, a2 / 0x5AF3107A4000LL);
v6 = u07toa_shift((long long)a1, v4, v5);
}
return u07toa_shift((long long)a1, a2 % 0x989680, v6);
}
|
u64toa:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,RSI
SHR RAX,0x20
JNZ 0x00116566
MOV RDI,RBX
POP RBX
POP R14
POP R15
JMP 0x00116482
LAB_00116566:
MOV EDI,0x989680
MOV RAX,RSI
XOR EDX,EDX
DIV RDI
MOV RCX,RAX
MOV R14,RDX
MOV R8,0x5af3107a4000
CMP RSI,R8
JC 0x001165b6
MOV RAX,RSI
XOR EDX,EDX
DIV R8
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RDI
MOV R15,RDX
MOV RDI,RBX
CALL 0x001164dc
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,RAX
CALL 0x00116515
JMP 0x001165c0
LAB_001165b6:
MOV RDI,RBX
MOV ESI,ECX
CALL 0x001164dc
LAB_001165c0:
MOV RDI,RBX
MOV ESI,R14D
MOV RDX,RAX
POP RBX
POP R14
POP R15
JMP 0x00116515
|
void u64toa(int8 param_1,ulong param_2)
{
int8 uVar1;
if (param_2 >> 0x20 == 0) {
u32toa(param_1);
return;
}
if (param_2 < 100000000000000) {
uVar1 = u7toa_shift(param_1,param_2 / 10000000 & 0xffffffff);
}
else {
uVar1 = u7toa_shift(param_1,param_2 / 100000000000000);
uVar1 = u07toa_shift(param_1,(param_2 / 10000000) % 10000000,uVar1);
}
u07toa_shift(param_1,param_2 % 10000000,uVar1);
return;
}
|
|
57,301
|
minja::Parser::parseLogicalNot()
|
monkey531[P]llama/common/./minja.hpp
|
std::shared_ptr<Expression> parseLogicalNot() {
static std::regex not_tok(R"(not\b)");
auto location = get_location();
if (!consumeToken(not_tok).empty()) {
auto sub = parseLogicalNot();
if (!sub) throw std::runtime_error("Expected expression after 'not' keyword");
return std::make_shared<UnaryOpExpr>(location, std::move(sub), UnaryOpExpr::Op::LogicalNot);
}
return parseLogicalCompare();
}
|
O2
|
cpp
|
minja::Parser::parseLogicalNot():
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb 0xa8937(%rip), %al # 0xe2df0
testb %al, %al
je 0x3a578
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x2efae
leaq 0xa88fb(%rip), %rdx # 0xe2dd0
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x2f3f2
leaq 0x8(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x20d78
testq %r15, %r15
je 0x3a556
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x3a4a4
cmpq $0x0, 0x8(%rsp)
je 0x3a5cd
leaq 0x4(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x3a645
leaq 0x48(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x2eeb2
leaq 0x10(%rsp), %rdi
callq 0x2eeb2
jmp 0x3a561
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a66a
leaq 0x30(%rsp), %rdi
callq 0x2eeb2
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xa8871(%rip), %rdi # 0xe2df0
callq 0x20bf0
testl %eax, %eax
je 0x3a4c1
leaq 0xa883d(%rip), %rdi # 0xe2dd0
leaq 0x5f7aa(%rip), %rsi # 0x99d44
pushq $0x10
popq %rdx
callq 0x2ef2e
leaq -0xb615(%rip), %rdi # 0x2ef94
leaq 0xa8820(%rip), %rsi # 0xe2dd0
leaq 0xa8111(%rip), %rdx # 0xe26c8
callq 0x205f0
leaq 0xa882d(%rip), %rdi # 0xe2df0
callq 0x20480
jmp 0x3a4c1
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %r14
leaq 0x5f76b(%rip), %rsi # 0x99d4a
movq %rax, %rdi
callq 0x20280
movq 0xa79fa(%rip), %rsi # 0xe1fe8
movq 0xa797b(%rip), %rdx # 0xe1f70
movq %r14, %rdi
callq 0x20b30
movq %rax, %rbx
leaq 0xa87e9(%rip), %rdi # 0xe2df0
callq 0x20470
jmp 0x3a63d
jmp 0x3a61f
movq %rax, %rbx
movq %r14, %rdi
callq 0x20520
jmp 0x3a622
jmp 0x3a630
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2eeb2
jmp 0x3a633
jmp 0x3a630
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2eeb2
movq %rbx, %rdi
callq 0x20b90
|
_ZN5minja6Parser15parseLogicalNotEv:
push r15
push r14
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
mov al, cs:_ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalNot(void)::not_tok
test al, al
jz loc_3A578
loc_3A4C1:
lea rdi, [rsp+68h+var_40]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdx, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rdi, [rsp+68h+var_60]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+68h+var_60]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_3A556
lea rdi, [rsp+68h+var_60]; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+68h+var_60], 0
jz loc_3A5CD
lea rcx, [rsp+68h+var_64]
mov dword ptr [rcx], 2
lea rdi, [rsp+68h+var_28]
lea rsi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZSt11make_sharedIN5minja11UnaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEENS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
lea rdi, [rsp+68h+var_20]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+68h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_3A561
loc_3A556:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void)
loc_3A561:
lea rdi, [rsp+68h+var_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
loc_3A578:
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_3A4C1
lea rdi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rsi, aNotB; "not\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_3A4C1
loc_3A5CD:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_2; "Expected expression after 'not' keyword"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_3A63D
jmp short loc_3A61F
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_3A622
jmp short loc_3A630
loc_3A61F:
mov rbx, rax
loc_3A622:
lea rdi, [rsp+68h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_3A633
jmp short $+2
loc_3A630:
mov rbx, rax
loc_3A633:
lea rdi, [rsp+68h+var_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_3A63D:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalNot(minja::Parser *this, _QWORD *a2)
{
long long v2; // r15
__int128 v3; // xmm0
std::runtime_error *exception; // r14
int v6; // [rsp+4h] [rbp-64h] BYREF
long long v7; // [rsp+8h] [rbp-60h] BYREF
_QWORD v8[3]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v9[8]; // [rsp+28h] [rbp-40h] BYREF
long long v10; // [rsp+30h] [rbp-38h] BYREF
_OWORD v11[2]; // [rsp+40h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
"not\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)v9, a2);
minja::Parser::consumeToken(&v7, (long long)a2, (int)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], 1u);
v2 = v8[0];
std::string::~string(&v7);
if ( v2 )
{
minja::Parser::parseLogicalNot((minja::Parser *)&v7);
if ( !v7 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expression after 'not' keyword");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v6 = 2;
std::make_shared<minja::UnaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
v11,
v9,
&v7,
&v6);
v3 = v11[0];
*((_QWORD *)&v11[0] + 1) = 0LL;
*(_OWORD *)this = v3;
*(_QWORD *)&v11[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v11 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8);
}
else
{
minja::Parser::parseLogicalCompare(this);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
return this;
}
| |||
57,302
|
minja::Parser::parseLogicalNot()
|
monkey531[P]llama/common/./minja.hpp
|
std::shared_ptr<Expression> parseLogicalNot() {
static std::regex not_tok(R"(not\b)");
auto location = get_location();
if (!consumeToken(not_tok).empty()) {
auto sub = parseLogicalNot();
if (!sub) throw std::runtime_error("Expected expression after 'not' keyword");
return std::make_shared<UnaryOpExpr>(location, std::move(sub), UnaryOpExpr::Op::LogicalNot);
}
return parseLogicalCompare();
}
|
O3
|
cpp
|
minja::Parser::parseLogicalNot():
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb 0xb4475(%rip), %al # 0xf0dc0
testb %al, %al
je 0x3ca53
movq (%r14), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x3c97e
movq 0xb3630(%rip), %rcx # 0xeffa0
cmpb $0x0, (%rcx)
je 0x3c97a
incl 0x8(%rax)
jmp 0x3c97e
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x40(%rsp)
leaq 0xb440e(%rip), %rdx # 0xf0da0
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x2fd6a
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x3c9c3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
testq %r15, %r15
je 0x3ca2c
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x3c936
cmpq $0x0, 0x10(%rsp)
je 0x3caaa
leaq 0x4c(%rsp), %r9
movl $0x2, (%r9)
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x3d1e4
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3ca37
callq 0x2f80e
jmp 0x3ca37
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3cb2e
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3ca46
callq 0x2f80e
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb4366(%rip), %rdi # 0xf0dc0
callq 0x18be0
testl %eax, %eax
je 0x3c953
leaq 0xb4332(%rip), %rdi # 0xf0da0
leaq 0x7a147(%rip), %rsi # 0xb6bbc
movl $0x10, %edx
callq 0x2f87e
leaq -0xd1a0(%rip), %rdi # 0x2f8e6
leaq 0xb4313(%rip), %rsi # 0xf0da0
leaq 0xb3c04(%rip), %rdx # 0xf0698
callq 0x185d0
leaq 0xb4320(%rip), %rdi # 0xf0dc0
callq 0x18450
jmp 0x3c953
movl $0x10, %edi
callq 0x18360
movq %rax, %r14
leaq 0x7a104(%rip), %rsi # 0xb6bc2
movq %rax, %rdi
callq 0x18270
movq 0xb3523(%rip), %rsi # 0xefff0
movq 0xb34ac(%rip), %rdx # 0xeff80
movq %r14, %rdi
callq 0x18b30
movq %rax, %rbx
leaq 0xb42da(%rip), %rdi # 0xf0dc0
callq 0x18440
jmp 0x3cb26
jmp 0x3cafe
movq %rax, %rbx
movq %r14, %rdi
callq 0x18500
jmp 0x3cb01
jmp 0x3cb14
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3cb17
callq 0x2f80e
jmp 0x3cb17
jmp 0x3cb14
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3cb26
callq 0x2f80e
movq %rbx, %rdi
callq 0x18b90
|
_ZN5minja6Parser15parseLogicalNotEv:
push r15
push r14
push rbx
sub rsp, 60h
mov r14, rsi
mov rbx, rdi
mov al, cs:_ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalNot(void)::not_tok
test al, al
jz loc_3CA53
loc_3C953:
mov rax, [r14]
mov [rsp+78h+var_48], rax
mov rax, [r14+8]
mov [rsp+78h+var_40], rax
test rax, rax
jz short loc_3C97E
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_3C97A
inc dword ptr [rax+8]
jmp short loc_3C97E
loc_3C97A:
lock inc dword ptr [rax+8]
loc_3C97E:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_38], rax
lea rdx, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rdi, [rsp+78h+var_68]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_3C9C3
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C9C3:
test r15, r15
jz short loc_3CA2C
lea rdi, [rsp+78h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+78h+var_68], 0
jz loc_3CAAA
lea r9, [rsp+78h+var_2C]
mov dword ptr [r9], 2
lea rdi, [rsp+78h+var_28+8]
mov qword ptr [rdi-8], 0
lea rsi, [rsp+78h+var_28]
lea rdx, [rsp+78h+var_69]
lea rcx, [rsp+78h+var_48]
lea r8, [rsp+78h+var_68]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJRNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
movaps xmm0, [rsp+78h+var_28]
movups xmmword ptr [rbx], xmm0
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_3CA37
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_3CA37
loc_3CA2C:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void)
loc_3CA37:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_3CA46
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3CA46:
mov rax, rbx
add rsp, 60h
pop rbx
pop r14
pop r15
retn
loc_3CA53:
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_3C953
lea rdi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rsi, aNotB; "not\\b"
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, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_3C953
loc_3CAAA:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_2; "Expected expression after 'not' keyword"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_3CB26
jmp short loc_3CAFE
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_3CB01
jmp short loc_3CB14
loc_3CAFE:
mov rbx, rax
loc_3CB01:
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_3CB17
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_3CB17
jmp short $+2
loc_3CB14:
mov rbx, rax
loc_3CB17:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_3CB26
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3CB26:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalNot(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
volatile signed __int32 *v3; // r15
std::runtime_error *exception; // r14
char v6; // [rsp+Fh] [rbp-69h] BYREF
long long *v7; // [rsp+10h] [rbp-68h] BYREF
volatile signed __int32 *v8; // [rsp+18h] [rbp-60h]
long long v9; // [rsp+20h] [rbp-58h] BYREF
long long v10; // [rsp+30h] [rbp-48h] BYREF
volatile signed __int32 *v11; // [rsp+38h] [rbp-40h]
long long v12; // [rsp+40h] [rbp-38h]
int v13; // [rsp+4Ch] [rbp-2Ch]
_OWORD v14[2]; // [rsp+50h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
"not\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]);
}
v10 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v11 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v12 = a2[4] - a2[2];
minja::Parser::consumeToken(
(long long)&v7,
(long long)a2,
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
1u);
v3 = v8;
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
if ( v3 )
{
minja::Parser::parseLogicalNot((minja::Parser *)&v7);
if ( !v7 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expression after 'not' keyword");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13 = 2;
*(_QWORD *)&v14[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(char *)v14 + 8,
v14,
&v6,
&v10,
&v7);
*(_OWORD *)this = v14[0];
if ( v8 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v8);
}
else
{
minja::Parser::parseLogicalCompare(this);
}
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
return this;
}
|
parseLogicalNot:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [0x001f0dc0]
TEST AL,AL
JZ 0x0013ca53
LAB_0013c953:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x38],RAX
TEST RAX,RAX
JZ 0x0013c97e
MOV RCX,qword ptr [0x001effa0]
CMP byte ptr [RCX],0x0
JZ 0x0013c97a
INC dword ptr [RAX + 0x8]
JMP 0x0013c97e
LAB_0013c97a:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0013c97e:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x40],RAX
LAB_0013c98b:
LEA RDX,[0x1f0da0]
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV ECX,0x1
CALL 0x0012fd6a
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x0013c9c3
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001186a0
LAB_0013c9c3:
TEST R15,R15
JZ 0x0013ca2c
LAB_0013c9c8:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0013c936
CMP qword ptr [RSP + 0x10],0x0
JZ 0x0013caaa
LEA R9,[RSP + 0x4c]
MOV dword ptr [R9],0x2
LEA RDI,[RSP + 0x58]
MOV qword ptr [RDI + -0x8],0x0
LAB_0013c9fa:
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x30]
LEA R8,[RSP + 0x10]
CALL 0x0013d1e4
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RBX],XMM0
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0013ca37
CALL 0x0012f80e
JMP 0x0013ca37
LAB_0013ca2c:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0013cb2e
LAB_0013ca37:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0013ca46
CALL 0x0012f80e
LAB_0013ca46:
MOV RAX,RBX
ADD RSP,0x60
POP RBX
POP R14
POP R15
RET
LAB_0013ca53:
LEA RDI,[0x1f0dc0]
CALL 0x00118be0
TEST EAX,EAX
JZ 0x0013c953
LAB_0013ca67:
LEA RDI,[0x1f0da0]
LEA RSI,[0x1b6bbc]
MOV EDX,0x10
CALL 0x0012f87e
LAB_0013ca7f:
LEA RDI,[0x12f8e6]
LEA RSI,[0x1f0da0]
LEA RDX,[0x1f0698]
CALL 0x001185d0
LEA RDI,[0x1f0dc0]
CALL 0x00118450
JMP 0x0013c953
LAB_0013caaa:
MOV EDI,0x10
CALL 0x00118360
MOV R14,RAX
LAB_0013cab7:
LEA RSI,[0x1b6bc2]
MOV RDI,RAX
CALL 0x00118270
LAB_0013cac6:
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,R14
CALL 0x00118b30
|
/* minja::Parser::parseLogicalNot() */
void minja::Parser::parseLogicalNot(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
int8 *in_RDI;
int1 local_69;
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
long local_58 [2];
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
int4 local_2c;
int8 local_28;
int8 uStack_20;
if (parseLogicalNot()::not_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalNot()::not_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 0013ca67 to 0013ca7e has its CatchHandler @ 0013cadc */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalNot()::not_tok_abi_cxx11_,"not\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalNot()::not_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalNot()::not_tok_abi_cxx11_);
}
}
local_48 = *in_RSI;
local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
}
}
local_38 = in_RSI[4] - in_RSI[2];
/* try { // try from 0013c98b to 0013c9a3 has its CatchHandler @ 0013cb14 */
consumeToken(&local_68);
p_Var1 = local_60;
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
/* try { // try from 0013ca2c to 0013ca36 has its CatchHandler @ 0013cafc */
parseLogicalCompare();
}
else {
/* try { // try from 0013c9c8 to 0013c9d4 has its CatchHandler @ 0013cb12 */
parseLogicalNot();
if (local_68 == (long *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0013cab7 to 0013cac5 has its CatchHandler @ 0013caef */
std::runtime_error::runtime_error(this,"Expected expression after \'not\' keyword");
/* try { // try from 0013cac6 to 0013cadb has its CatchHandler @ 0013caed */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
local_2c = 2;
local_28 = 0;
/* try { // try from 0013c9fa to 0013ca12 has its CatchHandler @ 0013cafe */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location&,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20,&local_28,&local_69,
&local_48,&local_68);
*in_RDI = local_28;
in_RDI[1] = uStack_20;
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
return;
}
|
|
57,303
|
init_dynamic_array2
|
eloqsql/mysys/array.c
|
my_bool init_dynamic_array2(PSI_memory_key psi_key, DYNAMIC_ARRAY *array,
uint element_size, void *init_buffer,
uint init_alloc, uint alloc_increment, myf my_flags)
{
DBUG_ENTER("init_dynamic_array2");
if (!alloc_increment)
{
alloc_increment=MY_MAX((8192-MALLOC_OVERHEAD)/element_size,16);
if (init_alloc > 8 && alloc_increment > init_alloc * 2)
alloc_increment=init_alloc*2;
}
array->elements=0;
array->max_element=init_alloc;
array->alloc_increment=alloc_increment;
array->size_of_element=element_size;
array->m_psi_key= psi_key;
array->malloc_flags= my_flags;
DBUG_ASSERT((my_flags & MY_INIT_BUFFER_USED) == 0);
if ((array->buffer= init_buffer))
{
array->malloc_flags|= MY_INIT_BUFFER_USED;
DBUG_RETURN(FALSE);
}
/*
Since the dynamic array is usable even if allocation fails here malloc
should not throw an error
*/
if (init_alloc &&
!(array->buffer= (uchar*) my_malloc(psi_key, element_size*init_alloc,
MYF(my_flags))))
array->max_element=0;
DBUG_RETURN(FALSE);
}
|
O0
|
c
|
init_dynamic_array2:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x3b962
movl $0x1ff8, %eax # imm = 0x1FF8
xorl %edx, %edx
divl -0x14(%rbp)
cmpl $0x10, %eax
jbe 0x3b936
movl $0x1ff8, %eax # imm = 0x1FF8
xorl %edx, %edx
divl -0x14(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3b940
movl $0x10, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3b940
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x8, -0x24(%rbp)
jbe 0x3b960
movl -0x28(%rbp), %eax
movl -0x24(%rbp), %ecx
shll %ecx
cmpl %ecx, %eax
jbe 0x3b960
movl -0x24(%rbp), %eax
shll %eax
movl %eax, -0x28(%rbp)
jmp 0x3b962
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq 0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x3b9a3
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x3b9cd
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x100, %rcx # imm = 0x100
movq %rcx, 0x20(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x3ba08
cmpl $0x0, -0x24(%rbp)
je 0x3ba02
movl -0x8(%rbp), %edi
movl -0x14(%rbp), %eax
imull -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
movq 0x10(%rbp), %rdx
callq 0x36e60
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x3ba02
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
jmp 0x3ba04
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
init_dynamic_array2:
push rbp
mov rbp, rsp
sub rsp, 30h
mov rax, [rbp+arg_0]
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
cmp [rbp+var_28], 0
jnz short loc_3B962
mov eax, 1FF8h
xor edx, edx
div [rbp+var_14]
cmp eax, 10h
jbe short loc_3B936
mov eax, 1FF8h
xor edx, edx
div [rbp+var_14]
mov [rbp+var_2C], eax
jmp short loc_3B940
loc_3B936:
mov eax, 10h
mov [rbp+var_2C], eax
jmp short $+2
loc_3B940:
mov eax, [rbp+var_2C]
mov [rbp+var_28], eax
cmp [rbp+var_24], 8
jbe short loc_3B960
mov eax, [rbp+var_28]
mov ecx, [rbp+var_24]
shl ecx, 1
cmp eax, ecx
jbe short loc_3B960
mov eax, [rbp+var_24]
shl eax, 1
mov [rbp+var_28], eax
loc_3B960:
jmp short $+2
loc_3B962:
mov rax, [rbp+var_10]
mov dword ptr [rax+8], 0
mov ecx, [rbp+var_24]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
mov ecx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+10h], ecx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov ecx, [rbp+var_8]
mov rax, [rbp+var_10]
mov [rax+18h], ecx
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_10]
mov [rax+20h], rcx
jmp short $+2
loc_3B9A3:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jz short loc_3B9CD
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
or rcx, 100h
mov [rax+20h], rcx
mov [rbp+var_1], 0
jmp short loc_3BA08
loc_3B9CD:
cmp [rbp+var_24], 0
jz short loc_3BA02
mov edi, [rbp+var_8]
mov eax, [rbp+var_14]
imul eax, [rbp+var_24]
mov eax, eax
mov esi, eax
mov rdx, [rbp+arg_0]
call my_malloc
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jnz short loc_3BA02
mov rax, [rbp+var_10]
mov dword ptr [rax+0Ch], 0
loc_3BA02:
jmp short $+2
loc_3BA04:
mov [rbp+var_1], 0
loc_3BA08:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char init_dynamic_array2(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
int a6,
long long a7)
{
long long v7; // rax
unsigned int v9; // [rsp+4h] [rbp-2Ch]
int v10; // [rsp+8h] [rbp-28h]
v10 = a6;
if ( !a6 )
{
v9 = 0x1FF8 / a3 <= 0x10 ? 16 : 0x1FF8 / a3;
v10 = v9;
if ( a5 > 8 && v9 > 2 * a5 )
v10 = 2 * a5;
}
*(_DWORD *)(a2 + 8) = 0;
*(_DWORD *)(a2 + 12) = a5;
*(_DWORD *)(a2 + 16) = v10;
*(_DWORD *)(a2 + 20) = a3;
*(_DWORD *)(a2 + 24) = a1;
*(_QWORD *)(a2 + 32) = a7;
*(_QWORD *)a2 = a4;
if ( a4 )
{
*(_QWORD *)(a2 + 32) |= 0x100uLL;
}
else if ( a5 )
{
v7 = my_malloc(a1, a5 * a3, a7);
*(_QWORD *)a2 = v7;
if ( !v7 )
*(_DWORD *)(a2 + 12) = 0;
}
return 0;
}
|
init_dynamic_array2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
CMP dword ptr [RBP + -0x28],0x0
JNZ 0x0013b962
MOV EAX,0x1ff8
XOR EDX,EDX
DIV dword ptr [RBP + -0x14]
CMP EAX,0x10
JBE 0x0013b936
MOV EAX,0x1ff8
XOR EDX,EDX
DIV dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0013b940
LAB_0013b936:
MOV EAX,0x10
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0013b940
LAB_0013b940:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x24],0x8
JBE 0x0013b960
MOV EAX,dword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x24]
SHL ECX,0x1
CMP EAX,ECX
JBE 0x0013b960
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
LAB_0013b960:
JMP 0x0013b962
LAB_0013b962:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],0x0
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
MOV ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV ECX,dword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],ECX
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
JMP 0x0013b9a3
LAB_0013b9a3:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0013b9cd
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x100
MOV qword ptr [RAX + 0x20],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013ba08
LAB_0013b9cd:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x0013ba02
MOV EDI,dword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x24]
MOV EAX,EAX
MOV ESI,EAX
MOV RDX,qword ptr [RBP + 0x10]
CALL 0x00136e60
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x0013ba02
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],0x0
LAB_0013ba02:
JMP 0x0013ba04
LAB_0013ba04:
MOV byte ptr [RBP + -0x1],0x0
LAB_0013ba08:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int8
init_dynamic_array2(int4 param_1,long *param_2,uint param_3,long param_4,uint param_5,
uint param_6,long param_7)
{
long lVar1;
uint local_34;
uint local_30;
local_30 = param_6;
if (param_6 == 0) {
if ((uint)(0x1ff8 / (ulong)param_3) < 0x11) {
local_34 = 0x10;
}
else {
local_34 = (uint)(0x1ff8 / (ulong)param_3);
}
local_30 = local_34;
if ((8 < param_5) && (param_5 * 2 < local_34)) {
local_30 = param_5 << 1;
}
}
*(int4 *)(param_2 + 1) = 0;
*(uint *)((long)param_2 + 0xc) = param_5;
*(uint *)(param_2 + 2) = local_30;
*(uint *)((long)param_2 + 0x14) = param_3;
*(int4 *)(param_2 + 3) = param_1;
param_2[4] = param_7;
*param_2 = param_4;
if (param_4 == 0) {
if (param_5 != 0) {
lVar1 = my_malloc(param_1,param_3 * param_5,param_7);
*param_2 = lVar1;
if (lVar1 == 0) {
*(int4 *)((long)param_2 + 0xc) = 0;
}
}
}
else {
param_2[4] = param_2[4] | 0x100;
}
return 0;
}
|
|
57,304
|
init_dynamic_array2
|
eloqsql/mysys/array.c
|
my_bool init_dynamic_array2(PSI_memory_key psi_key, DYNAMIC_ARRAY *array,
uint element_size, void *init_buffer,
uint init_alloc, uint alloc_increment, myf my_flags)
{
DBUG_ENTER("init_dynamic_array2");
if (!alloc_increment)
{
alloc_increment=MY_MAX((8192-MALLOC_OVERHEAD)/element_size,16);
if (init_alloc > 8 && alloc_increment > init_alloc * 2)
alloc_increment=init_alloc*2;
}
array->elements=0;
array->max_element=init_alloc;
array->alloc_increment=alloc_increment;
array->size_of_element=element_size;
array->m_psi_key= psi_key;
array->malloc_flags= my_flags;
DBUG_ASSERT((my_flags & MY_INIT_BUFFER_USED) == 0);
if ((array->buffer= init_buffer))
{
array->malloc_flags|= MY_INIT_BUFFER_USED;
DBUG_RETURN(FALSE);
}
/*
Since the dynamic array is usable even if allocation fails here malloc
should not throw an error
*/
if (init_alloc &&
!(array->buffer= (uchar*) my_malloc(psi_key, element_size*init_alloc,
MYF(my_flags))))
array->max_element=0;
DBUG_RETURN(FALSE);
}
|
O3
|
c
|
init_dynamic_array2:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edx, %r11d
movq %rsi, %rbx
movq 0x10(%rbp), %r10
testl %r9d, %r9d
jne 0x32c0b
movl $0x10, %r9d
cmpl $0x1e1, %r11d # imm = 0x1E1
ja 0x32bfa
movw $0x1ff8, %ax # imm = 0x1FF8
xorl %edx, %edx
divw %r11w
movzwl %ax, %r9d
cmpl $0x9, %r8d
jb 0x32c0b
leal (%r8,%r8), %eax
cmpl %eax, %r9d
cmovael %eax, %r9d
movl $0x0, 0x8(%rbx)
movl %r8d, 0xc(%rbx)
movl %r9d, 0x10(%rbx)
movl %r11d, 0x14(%rbx)
movl %edi, 0x18(%rbx)
movq %r10, 0x20(%rbx)
movq %rcx, (%rbx)
testq %rcx, %rcx
je 0x32c41
orq $0x100, %r10 # imm = 0x100
movq %r10, 0x20(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testl %r8d, %r8d
je 0x32c38
imull %r11d, %r8d
movq %r8, %rsi
movq %r10, %rdx
callq 0x300d9
movq %rax, (%rbx)
testq %rax, %rax
jne 0x32c38
movl $0x0, 0xc(%rbx)
jmp 0x32c38
|
init_dynamic_array2:
push rbp
mov rbp, rsp
push rbx
push rax
mov r11d, edx
mov rbx, rsi
mov r10, [rbp+arg_0]
test r9d, r9d
jnz short loc_32C0B
mov r9d, 10h
cmp r11d, 1E1h
ja short loc_32BFA
mov ax, 1FF8h
xor edx, edx
div r11w
movzx r9d, ax
loc_32BFA:
cmp r8d, 9
jb short loc_32C0B
lea eax, [r8+r8]
cmp r9d, eax
cmovnb r9d, eax
loc_32C0B:
mov dword ptr [rbx+8], 0
mov [rbx+0Ch], r8d
mov [rbx+10h], r9d
mov [rbx+14h], r11d
mov [rbx+18h], edi
mov [rbx+20h], r10
mov [rbx], rcx
test rcx, rcx
jz short loc_32C41
or r10, 100h
mov [rbx+20h], r10
loc_32C38:
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
loc_32C41:
test r8d, r8d
jz short loc_32C38
imul r8d, r11d
mov rsi, r8
mov rdx, r10
call my_malloc
mov [rbx], rax
test rax, rax
jnz short loc_32C38
mov dword ptr [rbx+0Ch], 0
jmp short loc_32C38
|
long long init_dynamic_array2(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
unsigned int a6,
long long a7)
{
long long v8; // rax
if ( !a6 )
{
a6 = 16;
if ( a3 <= 0x1E1 )
a6 = 0x1FF8u / (unsigned __int16)a3;
if ( a5 >= 9 && a6 >= 2 * a5 )
a6 = 2 * a5;
}
*(_DWORD *)(a2 + 8) = 0;
*(_DWORD *)(a2 + 12) = a5;
*(_DWORD *)(a2 + 16) = a6;
*(_DWORD *)(a2 + 20) = a3;
*(_DWORD *)(a2 + 24) = a1;
*(_QWORD *)(a2 + 32) = a7;
*(_QWORD *)a2 = a4;
if ( a4 )
{
*(_QWORD *)(a2 + 32) = a7 | 0x100;
}
else if ( a5 )
{
v8 = my_malloc(a1, a3 * a5, a7);
*(_QWORD *)a2 = v8;
if ( !v8 )
*(_DWORD *)(a2 + 12) = 0;
}
return 0LL;
}
|
init_dynamic_array2:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV R11D,EDX
MOV RBX,RSI
MOV R10,qword ptr [RBP + 0x10]
TEST R9D,R9D
JNZ 0x00132c0b
MOV R9D,0x10
CMP R11D,0x1e1
JA 0x00132bfa
MOV AX,0x1ff8
XOR EDX,EDX
DIV R11W
MOVZX R9D,AX
LAB_00132bfa:
CMP R8D,0x9
JC 0x00132c0b
LEA EAX,[R8 + R8*0x1]
CMP R9D,EAX
CMOVNC R9D,EAX
LAB_00132c0b:
MOV dword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0xc],R8D
MOV dword ptr [RBX + 0x10],R9D
MOV dword ptr [RBX + 0x14],R11D
MOV dword ptr [RBX + 0x18],EDI
MOV qword ptr [RBX + 0x20],R10
MOV qword ptr [RBX],RCX
TEST RCX,RCX
JZ 0x00132c41
OR R10,0x100
MOV qword ptr [RBX + 0x20],R10
LAB_00132c38:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00132c41:
TEST R8D,R8D
JZ 0x00132c38
IMUL R8D,R11D
MOV RSI,R8
MOV RDX,R10
CALL 0x001300d9
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JNZ 0x00132c38
MOV dword ptr [RBX + 0xc],0x0
JMP 0x00132c38
|
int8
init_dynamic_array2(int4 param_1,long *param_2,uint param_3,long param_4,uint param_5,
uint param_6,ulong param_7)
{
long lVar1;
if (param_6 == 0) {
param_6 = 0x10;
if (param_3 < 0x1e2) {
param_6 = 0x1ff8 / (param_3 & 0xffff);
}
if ((8 < param_5) && (param_5 * 2 <= param_6)) {
param_6 = param_5 * 2;
}
}
*(int4 *)(param_2 + 1) = 0;
*(uint *)((long)param_2 + 0xc) = param_5;
*(uint *)(param_2 + 2) = param_6;
*(uint *)((long)param_2 + 0x14) = param_3;
*(int4 *)(param_2 + 3) = param_1;
param_2[4] = param_7;
*param_2 = param_4;
if (param_4 == 0) {
if (param_5 != 0) {
lVar1 = my_malloc(param_1,param_5 * param_3,param_7);
*param_2 = lVar1;
if (lVar1 == 0) {
*(int4 *)((long)param_2 + 0xc) = 0;
}
}
}
else {
param_2[4] = param_7 | 0x100;
}
return 0;
}
|
|
57,305
|
bitmap_get_next_set
|
eloqsql/mysys/my_bitmap.c
|
uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit)
{
uint word_pos, byte_to_mask, i;
union { my_bitmap_map bitmap ; uchar bitmap_buff[sizeof(my_bitmap_map)]; }
first_word;
uchar *ptr= &first_word.bitmap_buff[0];
my_bitmap_map *data_ptr, *end= map->last_word_ptr;
DBUG_ASSERT(map->bitmap);
/* Look for the next bit */
bitmap_bit++;
if (bitmap_bit >= map->n_bits)
return MY_BIT_NONE;
word_pos= bitmap_bit / 32;
data_ptr= map->bitmap + word_pos;
first_word.bitmap= *data_ptr;
/* Mask out previous bits from first_word */
byte_to_mask= (bitmap_bit % 32) / 8;
for (i= 0; i < byte_to_mask; i++)
ptr[i]= 0;
ptr[byte_to_mask]&= 0xFFU << (bitmap_bit & 7);
if (data_ptr == end)
{
if (first_word.bitmap & ~map->last_word_mask)
return get_first_set(first_word.bitmap, word_pos);
else
return MY_BIT_NONE;
}
if (first_word.bitmap)
return get_first_set(first_word.bitmap, word_pos);
for (data_ptr++, word_pos++; data_ptr < end; data_ptr++, word_pos++)
if (*data_ptr)
return get_first_set(*data_ptr, word_pos);
if (!(*end & ~map->last_word_mask))
return MY_BIT_NONE;
return get_first_set(*end, word_pos);
}
|
O3
|
c
|
bitmap_get_next_set:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
incl %ebx
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %ebx
jae 0x9eaad
movq %rdi, %r15
movq 0x8(%rdi), %r13
movl %ebx, %eax
shrl $0x5, %eax
movq (%rdi), %rcx
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
leaq (%rcx,%rax,4), %rdx
movl (%rdx), %eax
movl %eax, -0x30(%rbp)
movl %ebx, %r12d
shrl $0x3, %r12d
andl $0x3, %r12d
je 0x9ea1e
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movq %rdx, -0x48(%rbp)
movq %r12, %rdx
callq 0x292c0
movq -0x48(%rbp), %rdx
movl %ebx, %ecx
andb $0x7, %cl
movl $0xff, %eax
shll %cl, %eax
andb %al, -0x30(%rbp,%r12)
movl -0x30(%rbp), %eax
cmpq %r13, %rdx
je 0x9ea6c
testl %eax, %eax
je 0x9eabf
movl %eax, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %al, %al
jne 0x9ea5f
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rsi
movb (%rsi), %al
addl $0x8, %ecx
incq %rsi
testb %al, %al
je 0x9ea53
movzbl %al, %eax
btl %edx, %eax
leal 0x1(%rdx), %edx
jae 0x9ea62
jmp 0x9eaa1
movl 0x18(%r15), %ecx
notl %ecx
testl %ecx, %eax
je 0x9eaad
movl %eax, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %al, %al
jne 0x9ea96
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rsi
movb (%rsi), %al
addl $0x8, %ecx
incq %rsi
testb %al, %al
je 0x9ea8a
movzbl %al, %eax
btl %edx, %eax
leal 0x1(%rdx), %edx
jae 0x9ea99
andl $-0x20, %ebx
addl %ebx, %ecx
leal (%rdx,%rcx), %r14d
decl %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rcx
movl %ecx, %eax
shll $0x5, %eax
decl %eax
movq -0x38(%rbp), %rdx
leaq (%rdx,%rcx,4), %rcx
addq $0x4, %rcx
cmpq %r13, %rcx
jae 0x9eb1e
movl (%rcx), %edx
addl $0x20, %eax
addq $0x4, %rcx
testl %edx, %edx
je 0x9ead6
movl %edx, -0x2c(%rbp)
xorl %ecx, %ecx
movl $0x0, %r14d
testb %dl, %dl
jne 0x9eb0b
xorl %r14d, %r14d
leaq -0x2b(%rbp), %rsi
movb (%rsi), %dl
addl $0x8, %r14d
incq %rsi
testb %dl, %dl
je 0x9eafe
movzbl %dl, %edx
btl %ecx, %edx
leal 0x1(%rcx), %ecx
jae 0x9eb0e
addl %eax, %r14d
addl %ecx, %r14d
jmp 0x9eaad
movl (%r13), %esi
movl 0x18(%r15), %ecx
notl %ecx
testl %ecx, %esi
je 0x9eaad
movl %esi, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %sil, %sil
jne 0x9eb4f
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rdi
movb (%rdi), %sil
addl $0x8, %ecx
incq %rdi
testb %sil, %sil
je 0x9eb41
movzbl %sil, %esi
btl %edx, %esi
leal 0x1(%rdx), %edx
jae 0x9eb53
addl %eax, %ecx
leal (%rdx,%rcx), %r14d
addl $0x20, %r14d
jmp 0x9eaad
|
bitmap_get_next_set:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
inc ebx
mov r14d, 0FFFFFFFFh
cmp ebx, [rdi+1Ch]
jnb loc_9EAAD
mov r15, rdi
mov r13, [rdi+8]
mov eax, ebx
shr eax, 5
mov rcx, [rdi]
mov [rbp+var_40], rax
mov [rbp+var_38], rcx
lea rdx, [rcx+rax*4]
mov eax, [rdx]
mov [rbp+var_30], eax
mov r12d, ebx
shr r12d, 3
and r12d, 3
jz short loc_9EA1E
lea rdi, [rbp+var_30]
xor esi, esi
mov [rbp+var_48], rdx
mov rdx, r12
call _memset
mov rdx, [rbp+var_48]
loc_9EA1E:
mov ecx, ebx
and cl, 7
mov eax, 0FFh
shl eax, cl
and byte ptr [rbp+r12+var_30], al
mov eax, [rbp+var_30]
cmp rdx, r13
jz short loc_9EA6C
test eax, eax
jz loc_9EABF
mov [rbp+var_2C], eax
xor edx, edx
mov ecx, 0
test al, al
jnz short loc_9EA5F
xor ecx, ecx
lea rsi, [rbp+var_2C+1]
loc_9EA53:
mov al, [rsi]
add ecx, 8
inc rsi
test al, al
jz short loc_9EA53
loc_9EA5F:
movzx eax, al
loc_9EA62:
bt eax, edx
lea edx, [rdx+1]
jnb short loc_9EA62
jmp short loc_9EAA1
loc_9EA6C:
mov ecx, [r15+18h]
not ecx
test eax, ecx
jz short loc_9EAAD
mov [rbp+var_2C], eax
xor edx, edx
mov ecx, 0
test al, al
jnz short loc_9EA96
xor ecx, ecx
lea rsi, [rbp+var_2C+1]
loc_9EA8A:
mov al, [rsi]
add ecx, 8
inc rsi
test al, al
jz short loc_9EA8A
loc_9EA96:
movzx eax, al
loc_9EA99:
bt eax, edx
lea edx, [rdx+1]
jnb short loc_9EA99
loc_9EAA1:
and ebx, 0FFFFFFE0h
add ecx, ebx
lea r14d, [rdx+rcx]
dec r14d
loc_9EAAD:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9EABF:
mov rcx, [rbp+var_40]
mov eax, ecx
shl eax, 5
dec eax
mov rdx, [rbp+var_38]
lea rcx, [rdx+rcx*4]
add rcx, 4
loc_9EAD6:
cmp rcx, r13
jnb short loc_9EB1E
mov edx, [rcx]
add eax, 20h ; ' '
add rcx, 4
test edx, edx
jz short loc_9EAD6
mov [rbp+var_2C], edx
xor ecx, ecx
mov r14d, 0
test dl, dl
jnz short loc_9EB0B
xor r14d, r14d
lea rsi, [rbp+var_2C+1]
loc_9EAFE:
mov dl, [rsi]
add r14d, 8
inc rsi
test dl, dl
jz short loc_9EAFE
loc_9EB0B:
movzx edx, dl
loc_9EB0E:
bt edx, ecx
lea ecx, [rcx+1]
jnb short loc_9EB0E
add r14d, eax
add r14d, ecx
jmp short loc_9EAAD
loc_9EB1E:
mov esi, [r13+0]
mov ecx, [r15+18h]
not ecx
test esi, ecx
jz short loc_9EAAD
mov [rbp+var_2C], esi
xor edx, edx
mov ecx, 0
test sil, sil
jnz short loc_9EB4F
xor ecx, ecx
lea rdi, [rbp+var_2C+1]
loc_9EB41:
mov sil, [rdi]
add ecx, 8
inc rdi
test sil, sil
jz short loc_9EB41
loc_9EB4F:
movzx esi, sil
loc_9EB53:
bt esi, edx
lea edx, [rdx+1]
jnb short loc_9EB53
add ecx, eax
lea r14d, [rdx+rcx]
add r14d, 20h ; ' '
jmp loc_9EAAD
|
long long bitmap_get_next_set(long long *a1, int a2)
{
unsigned int v2; // ebx
unsigned int v3; // r14d
int *v4; // r13
long long v5; // rcx
int *v6; // rdx
int v7; // eax
unsigned int v8; // edx
int v9; // ecx
_BYTE *v10; // rsi
unsigned __int8 v11; // cf
_BYTE *v12; // rsi
int v14; // eax
int *i; // rcx
int v16; // edx
unsigned int v17; // ecx
int v18; // r14d
_BYTE *v19; // rsi
int v20; // esi
unsigned int v21; // edx
int v22; // ecx
_BYTE *v23; // rdi
int *v24; // [rsp+8h] [rbp-48h]
long long v25; // [rsp+10h] [rbp-40h]
long long v26; // [rsp+18h] [rbp-38h]
int v27; // [rsp+20h] [rbp-30h] BYREF
_DWORD v28[11]; // [rsp+24h] [rbp-2Ch] BYREF
v2 = a2 + 1;
v3 = -1;
if ( (unsigned int)(a2 + 1) < *((_DWORD *)a1 + 7) )
{
v4 = (int *)a1[1];
v5 = *a1;
v25 = v2 >> 5;
v26 = *a1;
v6 = (int *)(*a1 + 4 * v25);
v27 = *v6;
if ( ((v2 >> 3) & 3) != 0 )
{
v24 = (int *)(v5 + 4 * v25);
memset(&v27, 0LL, (v2 >> 3) & 3);
v6 = v24;
}
*((_BYTE *)&v28[-1] + ((v2 >> 3) & 3)) &= 255 << (v2 & 7);
LOBYTE(v7) = v27;
if ( v6 == v4 )
{
if ( (~*((_DWORD *)a1 + 6) & v27) != 0 )
{
v28[0] = v27;
v8 = 0;
v9 = 0;
if ( !(_BYTE)v27 )
{
v9 = 0;
v12 = (char *)v28 + 1;
do
{
LOBYTE(v7) = *v12;
v9 += 8;
++v12;
}
while ( !(_BYTE)v7 );
}
v7 = (unsigned __int8)v7;
do
v11 = _bittest(&v7, v8++);
while ( !v11 );
return v8 + (v2 & 0xFFFFFFE0) + v9 - 1;
}
}
else
{
if ( v27 )
{
v28[0] = v27;
v8 = 0;
v9 = 0;
if ( !(_BYTE)v27 )
{
v9 = 0;
v10 = (char *)v28 + 1;
do
{
LOBYTE(v7) = *v10;
v9 += 8;
++v10;
}
while ( !(_BYTE)v7 );
}
v7 = (unsigned __int8)v7;
do
v11 = _bittest(&v7, v8++);
while ( !v11 );
return v8 + (v2 & 0xFFFFFFE0) + v9 - 1;
}
v14 = 32 * v25 - 1;
for ( i = (int *)(v26 + 4 * v25 + 4); i < v4; ++i )
{
v16 = *i;
v14 += 32;
if ( v16 )
{
v28[0] = v16;
v17 = 0;
v18 = 0;
if ( !(_BYTE)v16 )
{
v18 = 0;
v19 = (char *)v28 + 1;
do
{
LOBYTE(v16) = *v19;
v18 += 8;
++v19;
}
while ( !(_BYTE)v16 );
}
v16 = (unsigned __int8)v16;
do
v11 = _bittest(&v16, v17++);
while ( !v11 );
return v17 + v14 + v18;
}
}
v20 = *v4;
if ( (~*((_DWORD *)a1 + 6) & *v4) != 0 )
{
v28[0] = *v4;
v21 = 0;
v22 = 0;
if ( !(_BYTE)v20 )
{
v22 = 0;
v23 = (char *)v28 + 1;
do
{
LOBYTE(v20) = *v23;
v22 += 8;
++v23;
}
while ( !(_BYTE)v20 );
}
v20 = (unsigned __int8)v20;
do
v11 = _bittest(&v20, v21++);
while ( !v11 );
return v21 + v14 + v22 + 32;
}
}
}
return v3;
}
|
bitmap_get_next_set:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
INC EBX
MOV R14D,0xffffffff
CMP EBX,dword ptr [RDI + 0x1c]
JNC 0x0019eaad
MOV R15,RDI
MOV R13,qword ptr [RDI + 0x8]
MOV EAX,EBX
SHR EAX,0x5
MOV RCX,qword ptr [RDI]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RCX
LEA RDX,[RCX + RAX*0x4]
MOV EAX,dword ptr [RDX]
MOV dword ptr [RBP + -0x30],EAX
MOV R12D,EBX
SHR R12D,0x3
AND R12D,0x3
JZ 0x0019ea1e
LEA RDI,[RBP + -0x30]
XOR ESI,ESI
MOV qword ptr [RBP + -0x48],RDX
MOV RDX,R12
CALL 0x001292c0
MOV RDX,qword ptr [RBP + -0x48]
LAB_0019ea1e:
MOV ECX,EBX
AND CL,0x7
MOV EAX,0xff
SHL EAX,CL
AND byte ptr [RBP + R12*0x1 + -0x30],AL
MOV EAX,dword ptr [RBP + -0x30]
CMP RDX,R13
JZ 0x0019ea6c
TEST EAX,EAX
JZ 0x0019eabf
MOV dword ptr [RBP + -0x2c],EAX
XOR EDX,EDX
MOV ECX,0x0
TEST AL,AL
JNZ 0x0019ea5f
XOR ECX,ECX
LEA RSI,[RBP + -0x2b]
LAB_0019ea53:
MOV AL,byte ptr [RSI]
ADD ECX,0x8
INC RSI
TEST AL,AL
JZ 0x0019ea53
LAB_0019ea5f:
MOVZX EAX,AL
LAB_0019ea62:
BT EAX,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019ea62
JMP 0x0019eaa1
LAB_0019ea6c:
MOV ECX,dword ptr [R15 + 0x18]
NOT ECX
TEST EAX,ECX
JZ 0x0019eaad
MOV dword ptr [RBP + -0x2c],EAX
XOR EDX,EDX
MOV ECX,0x0
TEST AL,AL
JNZ 0x0019ea96
XOR ECX,ECX
LEA RSI,[RBP + -0x2b]
LAB_0019ea8a:
MOV AL,byte ptr [RSI]
ADD ECX,0x8
INC RSI
TEST AL,AL
JZ 0x0019ea8a
LAB_0019ea96:
MOVZX EAX,AL
LAB_0019ea99:
BT EAX,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019ea99
LAB_0019eaa1:
AND EBX,0xffffffe0
ADD ECX,EBX
LEA R14D,[RDX + RCX*0x1]
DEC R14D
LAB_0019eaad:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019eabf:
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,ECX
SHL EAX,0x5
DEC EAX
MOV RDX,qword ptr [RBP + -0x38]
LEA RCX,[RDX + RCX*0x4]
ADD RCX,0x4
LAB_0019ead6:
CMP RCX,R13
JNC 0x0019eb1e
MOV EDX,dword ptr [RCX]
ADD EAX,0x20
ADD RCX,0x4
TEST EDX,EDX
JZ 0x0019ead6
MOV dword ptr [RBP + -0x2c],EDX
XOR ECX,ECX
MOV R14D,0x0
TEST DL,DL
JNZ 0x0019eb0b
XOR R14D,R14D
LEA RSI,[RBP + -0x2b]
LAB_0019eafe:
MOV DL,byte ptr [RSI]
ADD R14D,0x8
INC RSI
TEST DL,DL
JZ 0x0019eafe
LAB_0019eb0b:
MOVZX EDX,DL
LAB_0019eb0e:
BT EDX,ECX
LEA ECX,[RCX + 0x1]
JNC 0x0019eb0e
ADD R14D,EAX
ADD R14D,ECX
JMP 0x0019eaad
LAB_0019eb1e:
MOV ESI,dword ptr [R13]
MOV ECX,dword ptr [R15 + 0x18]
NOT ECX
TEST ESI,ECX
JZ 0x0019eaad
MOV dword ptr [RBP + -0x2c],ESI
XOR EDX,EDX
MOV ECX,0x0
TEST SIL,SIL
JNZ 0x0019eb4f
XOR ECX,ECX
LEA RDI,[RBP + -0x2b]
LAB_0019eb41:
MOV SIL,byte ptr [RDI]
ADD ECX,0x8
INC RDI
TEST SIL,SIL
JZ 0x0019eb41
LAB_0019eb4f:
MOVZX ESI,SIL
LAB_0019eb53:
BT ESI,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019eb53
ADD ECX,EAX
LEA R14D,[RDX + RCX*0x1]
ADD R14D,0x20
JMP 0x0019eaad
|
int bitmap_get_next_set(long *param_1,int param_2)
{
byte bVar1;
uint *puVar2;
long lVar3;
uint uVar4;
int iVar5;
uint *puVar6;
uint uVar7;
byte *pbVar8;
uint uVar9;
int iVar10;
uint local_38;
int4 local_34;
uVar7 = param_2 + 1;
iVar5 = -1;
if (uVar7 < *(uint *)((long)param_1 + 0x1c)) {
puVar2 = (uint *)param_1[1];
uVar4 = uVar7 >> 5;
lVar3 = *param_1;
puVar6 = (uint *)(lVar3 + (ulong)uVar4 * 4);
local_38 = *puVar6;
uVar9 = uVar7 >> 3 & 3;
if (uVar9 != 0) {
memset(&local_38,0,(ulong)uVar9);
}
pbVar8 = (byte *)((long)&local_38 + (ulong)uVar9);
*pbVar8 = *pbVar8 & (byte)(0xff << ((byte)uVar7 & 7));
if (puVar6 == puVar2) {
if ((local_38 & ~*(uint *)(param_1 + 3)) == 0) {
return -1;
}
local_34 = local_38;
uVar4 = 0;
iVar5 = 0;
if ((char)local_38 == '\0') {
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_38 = (uint)bVar1;
iVar5 = iVar5 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar9 = uVar4 & 0x1f;
uVar4 = uVar4 + 1;
} while (((local_38 & 0xff) >> uVar9 & 1) == 0);
}
else {
if (local_38 == 0) {
iVar5 = uVar4 * 0x20 + -1;
puVar6 = (uint *)(lVar3 + (ulong)uVar4 * 4);
do {
puVar6 = puVar6 + 1;
if (puVar2 <= puVar6) {
local_34 = *puVar2;
if ((local_34 & ~*(uint *)(param_1 + 3)) == 0) {
return -1;
}
uVar7 = 0;
iVar10 = 0;
if ((char)local_34 == '\0') {
iVar10 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_34 = (uint)bVar1;
iVar10 = iVar10 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar4 = uVar7 & 0x1f;
uVar7 = uVar7 + 1;
} while (((local_34 & 0xff) >> uVar4 & 1) == 0);
return uVar7 + iVar10 + iVar5 + 0x20;
}
local_34 = *puVar6;
iVar5 = iVar5 + 0x20;
} while (local_34 == 0);
uVar7 = 0;
iVar10 = 0;
if ((char)local_34 == '\0') {
iVar10 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_34 = (uint)bVar1;
iVar10 = iVar10 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar4 = uVar7 & 0x1f;
uVar7 = uVar7 + 1;
} while (((local_34 & 0xff) >> uVar4 & 1) == 0);
return iVar10 + iVar5 + uVar7;
}
local_34 = local_38;
uVar4 = 0;
iVar5 = 0;
if ((char)local_38 == '\0') {
iVar5 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_38 = (uint)bVar1;
iVar5 = iVar5 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar9 = uVar4 & 0x1f;
uVar4 = uVar4 + 1;
} while (((local_38 & 0xff) >> uVar9 & 1) == 0);
}
iVar5 = uVar4 + iVar5 + (uVar7 & 0xffffffe0) + -1;
}
return iVar5;
}
|
|
57,306
|
nglog::GetTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
|
ng-log[P]ng-log/src/logging.cc
|
static void GetTempDirectories(vector<string>& list) {
list.clear();
#ifdef NGLOG_OS_WINDOWS
// On windows we'll try to find a directory in this order:
// C:/Documents & Settings/whomever/TEMP (or whatever GetTempPath() is)
// C:/TMP/
// C:/TEMP/
char tmp[MAX_PATH];
if (GetTempPathA(MAX_PATH, tmp)) list.push_back(tmp);
list.push_back("C:\\TMP\\");
list.push_back("C:\\TEMP\\");
#else
// Directories, in order of preference. If we find a dir that
// exists, we stop adding other less-preferred dirs
const char* candidates[] = {
// Non-null only during unittest/regtest
getenv("TEST_TMPDIR"),
// Explicitly-supplied temp dirs
getenv("TMPDIR"),
getenv("TMP"),
// If all else fails
"/tmp",
};
for (auto d : candidates) {
if (!d) continue; // Empty env var
// Make sure we don't surprise anyone who's expecting a '/'
string dstr = d;
if (dstr[dstr.size() - 1] != '/') {
dstr += "/";
}
list.push_back(dstr);
struct stat statbuf;
if (!stat(d, &statbuf) && S_ISDIR(statbuf.st_mode)) {
// We found a dir that exists - we're done.
return;
}
}
#endif
}
|
O0
|
cpp
|
nglog::GetTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x472d0
leaq 0x3b461(%rip), %rdi # 0x4e610
callq 0x9900
movq %rax, -0x30(%rbp)
leaq 0x3b456(%rip), %rdi # 0x4e615
callq 0x9900
movq %rax, -0x28(%rbp)
leaq 0x3c73f(%rip), %rdi # 0x4f90e
callq 0x9900
movq %rax, -0x20(%rbp)
leaq 0x3c733(%rip), %rax # 0x4f912
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
je 0x1335c
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x13224
jmp 0x1334b
movq -0x50(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x9d20
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0xe810
jmp 0x13258
leaq -0x71(%rbp), %rdi
callq 0x97c0
leaq -0x70(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x94f0
movq -0x140(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x9e50
movq %rax, -0x138(%rbp)
jmp 0x1328c
movq -0x138(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x132e6
leaq 0x3b78f(%rip), %rsi # 0x4ea31
leaq -0x70(%rbp), %rdi
callq 0x96b0
jmp 0x132ad
jmp 0x132e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x97c0
jmp 0x13365
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x9eb8
jmp 0x13365
movq -0x8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x1a550
jmp 0x132f5
movq -0x50(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x9640
cmpl $0x0, %eax
jne 0x13328
movl -0x100(%rbp), %eax
andl $0xf000, %eax # imm = 0xF000
cmpl $0x4000, %eax # imm = 0x4000
jne 0x13328
movl $0x1, -0x11c(%rbp)
jmp 0x13332
movl $0x0, -0x11c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x9eb8
movl -0x11c(%rbp), %eax
testl %eax, %eax
je 0x13349
jmp 0x13347
jmp 0x1335c
jmp 0x1334b
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
jmp 0x131ff
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x9d10
nop
|
_ZN5nglogL18GetTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE:
push rbp
mov rbp, rsp
sub rsp, 140h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5clearEv; std::vector<std::string>::clear(void)
lea rdi, aTestTmpdir; "TEST_TMPDIR"
call _getenv
mov [rbp+var_30], rax
lea rdi, aTestTmpdir+5; "TMPDIR"
call _getenv
mov [rbp+var_28], rax
lea rdi, aTmp_0; "TMP"
call _getenv
mov [rbp+var_20], rax
lea rax, aTmp; "/tmp"
mov [rbp+var_18], rax
lea rax, [rbp+var_30]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
add rax, 20h ; ' '
mov [rbp+var_48], rax
loc_131FF:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jz loc_1335C
mov rax, [rbp+var_40]
mov rax, [rax]
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jnz short loc_13224
jmp loc_1334B
loc_13224:
mov rax, [rbp+var_50]
mov [rbp+var_130], rax
lea rdi, [rbp+var_71]
mov [rbp+var_128], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_130]
mov rdx, [rbp+var_128]
lea rdi, [rbp+var_70]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_13258:
lea rdi, [rbp+var_71]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rbp+var_70]
mov [rbp+var_140], rdi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rbp+var_140]
mov rsi, rax
dec rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rbp+var_138], rax
jmp short $+2
loc_1328C:
mov rax, [rbp+var_138]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jz short loc_132E6
lea rsi, asc_4EA30+1; "/"
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_132AD:
jmp short loc_132E6
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
lea rdi, [rbp+var_71]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_13365
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
lea rdi, [rbp+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_13365
loc_132E6:
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_70]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
jmp short $+2
loc_132F5:
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_118]
call _stat
cmp eax, 0
jnz short loc_13328
mov eax, [rbp+var_100]
and eax, 0F000h
cmp eax, 4000h
jnz short loc_13328
mov [rbp+var_11C], 1
jmp short loc_13332
loc_13328:
mov [rbp+var_11C], 0
loc_13332:
lea rdi, [rbp+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov eax, [rbp+var_11C]
test eax, eax
jz short loc_13349
jmp short $+2
loc_13347:
jmp short loc_1335C
loc_13349:
jmp short $+2
loc_1334B:
mov rax, [rbp+var_40]
add rax, 8
mov [rbp+var_40], rax
jmp loc_131FF
loc_1335C:
add rsp, 140h
pop rbp
retn
loc_13365:
mov rdi, [rbp+var_80]
call __Unwind_Resume
|
long long * nglog::GetTempDirectories(long long a1)
{
long long *result; // rax
long long v2; // rax
long long v3; // [rsp+10h] [rbp-130h]
BOOL v4; // [rsp+24h] [rbp-11Ch]
char v5[24]; // [rsp+28h] [rbp-118h] BYREF
int v6; // [rsp+40h] [rbp-100h]
char v7; // [rsp+CFh] [rbp-71h] BYREF
_BYTE v8[32]; // [rsp+D0h] [rbp-70h] BYREF
long long v9; // [rsp+F0h] [rbp-50h]
long long *v10; // [rsp+F8h] [rbp-48h]
long long *v11; // [rsp+100h] [rbp-40h]
_QWORD *v12; // [rsp+108h] [rbp-38h]
_QWORD v13[4]; // [rsp+110h] [rbp-30h] BYREF
long long v14; // [rsp+130h] [rbp-10h] BYREF
long long v15; // [rsp+138h] [rbp-8h]
v15 = a1;
std::vector<std::string>::clear(a1);
v13[0] = getenv("TEST_TMPDIR");
v13[1] = getenv("TMPDIR");
v13[2] = getenv("TMP");
v13[3] = "/tmp";
v12 = v13;
v11 = v13;
v10 = &v14;
while ( 1 )
{
result = v11;
if ( v11 == v10 )
break;
v9 = *v11;
if ( v9 )
{
v3 = v9;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v8, v3, (long long)&v7);
std::allocator<char>::~allocator(&v7);
v2 = std::string::size();
if ( *(_BYTE *)std::string::operator[](v8, v2 - 1) != 47 )
std::string::operator+=(v8, "/");
std::vector<std::string>::push_back(v15, v8);
v4 = !(unsigned int)stat(v9, v5) && (v6 & 0xF000) == 0x4000;
std::string::~string(v8);
result = (long long *)v4;
if ( v4 )
break;
}
++v11;
}
return result;
}
|
GetTempDirectories:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001472d0
LEA RDI,[0x14e610]
CALL 0x00109900
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0x14e615]
CALL 0x00109900
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[0x14f90e]
CALL 0x00109900
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x14f912]
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
LAB_001131ff:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JZ 0x0011335c
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JNZ 0x00113224
JMP 0x0011334b
LAB_00113224:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x130],RAX
LEA RDI,[RBP + -0x71]
MOV qword ptr [RBP + -0x128],RDI
CALL 0x00109d20
MOV RSI,qword ptr [RBP + -0x130]
MOV RDX,qword ptr [RBP + -0x128]
LAB_0011324d:
LEA RDI,[RBP + -0x70]
CALL 0x0010e810
JMP 0x00113258
LAB_00113258:
LEA RDI,[RBP + -0x71]
CALL 0x001097c0
LEA RDI,[RBP + -0x70]
MOV qword ptr [RBP + -0x140],RDI
CALL 0x001094f0
MOV RDI,qword ptr [RBP + -0x140]
MOV RSI,RAX
DEC RSI
LAB_0011327e:
CALL 0x00109e50
MOV qword ptr [RBP + -0x138],RAX
JMP 0x0011328c
LAB_0011328c:
MOV RAX,qword ptr [RBP + -0x138]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JZ 0x001132e6
LEA RSI,[0x14ea31]
LEA RDI,[RBP + -0x70]
CALL 0x001096b0
JMP 0x001132ad
LAB_001132ad:
JMP 0x001132e6
LAB_001132e6:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x70]
CALL 0x0011a550
LAB_001132f3:
JMP 0x001132f5
LAB_001132f5:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x118]
CALL 0x00109640
CMP EAX,0x0
JNZ 0x00113328
MOV EAX,dword ptr [RBP + -0x100]
AND EAX,0xf000
CMP EAX,0x4000
JNZ 0x00113328
MOV dword ptr [RBP + -0x11c],0x1
JMP 0x00113332
LAB_00113328:
MOV dword ptr [RBP + -0x11c],0x0
LAB_00113332:
LEA RDI,[RBP + -0x70]
CALL 0x00109eb8
MOV EAX,dword ptr [RBP + -0x11c]
TEST EAX,EAX
JZ 0x00113349
JMP 0x00113347
LAB_00113347:
JMP 0x0011335c
LAB_00113349:
JMP 0x0011334b
LAB_0011334b:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x8
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001131ff
LAB_0011335c:
ADD RSP,0x140
POP RBP
RET
|
/* nglog::GetTempDirectories(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string >
>&) */
void nglog::GetTempDirectories(vector *param_1)
{
bool bVar1;
int iVar2;
char *pcVar3;
stat local_120;
allocator local_79;
string local_78 [32];
char *local_58;
char **local_50;
char **local_48;
char **local_40;
char *local_38;
char *local_30;
char *local_28;
int *local_20;
char *pcStack_18;
vector *local_10;
local_10 = param_1;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::clear
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1);
local_38 = getenv("TEST_TMPDIR");
local_30 = getenv("TMPDIR");
local_28 = getenv("TMP");
local_20 = &DAT_0014f912;
local_48 = &local_38;
local_50 = &pcStack_18;
local_40 = local_48;
do {
if (local_48 == local_50) {
return;
}
pcVar3 = *local_48;
if (pcVar3 != (char *)0x0) {
local_58 = pcVar3;
std::allocator<char>::allocator();
/* try { // try from 0011324d to 00113255 has its CatchHandler @ 001132af */
std::__cxx11::string::string<std::allocator<char>>(local_78,pcVar3,&local_79);
std::allocator<char>::~allocator((allocator<char> *)&local_79);
std::__cxx11::string::size();
/* try { // try from 0011327e to 001132f2 has its CatchHandler @ 001132cc */
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_78);
if (*pcVar3 != '/') {
std::__cxx11::string::operator+=(local_78,"/");
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_10,
local_78);
iVar2 = stat(local_58,&local_120);
if ((iVar2 == 0) && ((local_120.st_mode & 0xf000) == 0x4000)) {
bVar1 = true;
}
else {
bVar1 = false;
}
std::__cxx11::string::~string(local_78);
if (bVar1) {
return;
}
}
local_48 = local_48 + 1;
} while( true );
}
|
|
57,307
|
nglog::GetTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
|
ng-log[P]ng-log/src/logging.cc
|
static void GetTempDirectories(vector<string>& list) {
list.clear();
#ifdef NGLOG_OS_WINDOWS
// On windows we'll try to find a directory in this order:
// C:/Documents & Settings/whomever/TEMP (or whatever GetTempPath() is)
// C:/TMP/
// C:/TEMP/
char tmp[MAX_PATH];
if (GetTempPathA(MAX_PATH, tmp)) list.push_back(tmp);
list.push_back("C:\\TMP\\");
list.push_back("C:\\TEMP\\");
#else
// Directories, in order of preference. If we find a dir that
// exists, we stop adding other less-preferred dirs
const char* candidates[] = {
// Non-null only during unittest/regtest
getenv("TEST_TMPDIR"),
// Explicitly-supplied temp dirs
getenv("TMPDIR"),
getenv("TMP"),
// If all else fails
"/tmp",
};
for (auto d : candidates) {
if (!d) continue; // Empty env var
// Make sure we don't surprise anyone who's expecting a '/'
string dstr = d;
if (dstr[dstr.size() - 1] != '/') {
dstr += "/";
}
list.push_back(dstr);
struct stat statbuf;
if (!stat(d, &statbuf) && S_ISDIR(statbuf.st_mode)) {
// We found a dir that exists - we're done.
return;
}
}
#endif
}
|
O2
|
cpp
|
nglog::GetTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
callq 0x1b78e
leaq 0x1242a(%rip), %rdi # 0x1e60e
callq 0x7710
movq %rax, (%rsp)
leaq 0x1241f(%rip), %rdi # 0x1e613
callq 0x7710
movq %rax, 0x8(%rsp)
leaq 0x1363f(%rip), %rdi # 0x1f844
callq 0x7710
movq %rax, 0x10(%rsp)
leaq 0x13632(%rip), %rax # 0x1f848
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
leaq 0x28(%rsp), %r14
leaq 0x48(%rsp), %r15
leaq 0x12743(%rip), %r12 # 0x1e971
cmpq $0x20, %rbp
je 0xc2ab
movq (%rsp,%rbp), %r13
testq %r13, %r13
je 0xc29b
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x9b9e
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0xc267
movq %r14, %rdi
movq %r12, %rsi
callq 0x7aa0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf402
movq %r13, %rdi
movq %r15, %rsi
callq 0x7500
testl %eax, %eax
jne 0xc293
movl 0x60(%rsp), %eax
movl $0xf000, %ecx # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax # imm = 0x4000
je 0xc2a1
movq %r14, %rdi
callq 0x7b58
addq $0x8, %rbp
jmp 0xc22e
leaq 0x28(%rsp), %rdi
callq 0x7b58
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x7b58
movq %rbx, %rdi
callq 0x7a20
|
_ZN5nglogL18GetTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov rbx, rdi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5clearEv; std::vector<std::string>::clear(void)
lea rdi, aTestTmpdir; "TEST_TMPDIR"
call _getenv
mov [rsp+108h+var_108], rax
lea rdi, aTestTmpdir+5; "TMPDIR"
call _getenv
mov [rsp+108h+var_100], rax
lea rdi, aTmp_0; "TMP"
call _getenv
mov [rsp+108h+var_F8], rax
lea rax, aTmp; "/tmp"
mov [rsp+108h+var_F0], rax
xor ebp, ebp
lea r14, [rsp+108h+var_E0]
lea r15, [rsp+108h+var_C0]
lea r12, asc_1E970+1; "/"
loc_C22E:
cmp rbp, 20h ; ' '
jz short loc_C2AB
mov r13, [rsp+rbp+108h+var_108]
test r13, r13
jz short loc_C29B
mov rdi, r14
mov rsi, r13
mov rdx, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rax, [rsp+108h+var_E0]
mov rcx, [rsp+108h+var_D8]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_C267
mov rdi, r14
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_C267:
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
mov rdi, r13
mov rsi, r15
call _stat
test eax, eax
jnz short loc_C293
mov eax, [rsp+108h+var_A8]
mov ecx, 0F000h
and eax, ecx
cmp eax, 4000h
jz short loc_C2A1
loc_C293:
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C29B:
add rbp, 8
jmp short loc_C22E
loc_C2A1:
lea rdi, [rsp+108h+var_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C2AB:
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
void nglog::GetTempDirectories(long long a1)
{
long long i; // rbp
long long v2; // r13
long long v3; // rdx
long long v4; // r8
long long v5; // r9
long long v6; // [rsp+0h] [rbp-108h]
long long v7; // [rsp+8h] [rbp-100h]
long long v8; // [rsp+10h] [rbp-F8h]
const char *v9; // [rsp+18h] [rbp-F0h]
long long v10; // [rsp+28h] [rbp-E0h] BYREF
long long v11; // [rsp+30h] [rbp-D8h]
_BYTE v12[24]; // [rsp+48h] [rbp-C0h] BYREF
int v13; // [rsp+60h] [rbp-A8h]
std::vector<std::string>::clear();
v6 = getenv("TEST_TMPDIR");
v7 = getenv("TMPDIR");
v8 = getenv("TMP");
v9 = "/tmp";
for ( i = 0LL; i != 32; i += 8LL )
{
v2 = *(long long *)((char *)&v6 + i);
if ( v2 )
{
std::string::basic_string<std::allocator<char>>(&v10, *(long long *)((char *)&v6 + i));
if ( *(_BYTE *)(v10 + v11 - 1) != 47 )
std::string::append(&v10, "/", v3, v11, v4, v5, v6, v7, v8, v9);
std::vector<std::string>::push_back(a1, &v10);
if ( !(unsigned int)stat(v2, v12) && (v13 & 0xF000) == 0x4000 )
{
std::string::~string(&v10);
return;
}
std::string::~string(&v10);
}
}
}
|
GetTempDirectories:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV RBX,RDI
CALL 0x0011b78e
LEA RDI,[0x11e60e]
CALL 0x00107710
MOV qword ptr [RSP],RAX
LEA RDI,[0x11e613]
CALL 0x00107710
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[0x11f844]
CALL 0x00107710
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[0x11f848]
MOV qword ptr [RSP + 0x18],RAX
XOR EBP,EBP
LEA R14,[RSP + 0x28]
LEA R15,[RSP + 0x48]
LEA R12,[0x11e971]
LAB_0010c22e:
CMP RBP,0x20
JZ 0x0010c2ab
MOV R13,qword ptr [RSP + RBP*0x1]
TEST R13,R13
JZ 0x0010c29b
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL 0x00109b9e
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x30]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x0010c267
LAB_0010c25c:
MOV RDI,R14
MOV RSI,R12
CALL 0x00107aa0
LAB_0010c267:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010f402
LAB_0010c272:
MOV RDI,R13
MOV RSI,R15
CALL 0x00107500
TEST EAX,EAX
JNZ 0x0010c293
MOV EAX,dword ptr [RSP + 0x60]
MOV ECX,0xf000
AND EAX,ECX
CMP EAX,0x4000
JZ 0x0010c2a1
LAB_0010c293:
MOV RDI,R14
CALL 0x00107b58
LAB_0010c29b:
ADD RBP,0x8
JMP 0x0010c22e
LAB_0010c2a1:
LEA RDI,[RSP + 0x28]
CALL 0x00107b58
LAB_0010c2ab:
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::GetTempDirectories(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string >
>&) */
void nglog::GetTempDirectories(vector *param_1)
{
char *__file;
int iVar1;
long lVar2;
char *local_108 [5];
long local_e0;
long local_d8;
stat local_c0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::clear
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1);
local_108[0] = getenv("TEST_TMPDIR");
local_108[1] = getenv("TMPDIR");
local_108[2] = getenv("TMP");
local_108[3] = "/tmp";
lVar2 = 0;
do {
if (lVar2 == 0x20) {
return;
}
__file = *(char **)((long)local_108 + lVar2);
if (__file != (char *)0x0) {
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_e0,__file,(allocator *)&local_c0);
if (*(char *)(local_e0 + -1 + local_d8) != '/') {
/* try { // try from 0010c25c to 0010c271 has its CatchHandler @ 0010c2bd */
std::__cxx11::string::append((char *)&local_e0);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)&local_e0);
iVar1 = stat(__file,&local_c0);
if ((iVar1 == 0) && ((local_c0.st_mode & 0xf000) == 0x4000)) {
std::__cxx11::string::~string((string *)&local_e0);
return;
}
std::__cxx11::string::~string((string *)&local_e0);
}
lVar2 = lVar2 + 8;
} while( true );
}
|
|
57,308
|
strxmov
|
eloqsql/strings/strxmov.c
|
char *strxmov(char *dst,const char *src, ...)
{
va_list pvar;
va_start(pvar,src);
while (src != NullS) {
while ((*dst++ = *src++)) ;
dst--;
src = va_arg(pvar, char *);
}
va_end(pvar);
*dst = 0; /* there might have been no sources! */
return dst;
}
|
O0
|
c
|
strxmov:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
testb %al, %al
je 0x806d8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x807cc
jmp 0x8072d
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
je 0x80755
jmp 0x8072d
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xe4(%rbp)
cmpl $0x28, %eax
ja 0x8079c
movq -0xf0(%rbp), %rcx
movl -0xe4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xf8(%rbp)
jmp 0x807b9
movq -0xf0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x80720
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
|
strxmov:
push rbp
mov rbp, rsp
sub rsp, 80h
test al, al
jz short loc_806D8
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_806D8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
loc_80720:
cmp [rbp+var_10], 0
jz loc_807CC
jmp short $+2
loc_8072D:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov al, [rax]
mov rcx, [rbp+var_8]
mov rdx, rcx
add rdx, 1
mov [rbp+var_8], rdx
mov [rcx], al
cmp al, 0
jz short loc_80755
jmp short loc_8072D
loc_80755:
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_8], rax
lea rax, [rbp+var_30]
mov [rbp+var_F0], rax
mov eax, [rbp+var_30]
mov [rbp+var_E4], eax
cmp eax, 28h ; '('
ja short loc_8079C
mov rcx, [rbp+var_F0]
mov edx, [rbp+var_E4]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_F8], rax
jmp short loc_807B9
loc_8079C:
mov rcx, [rbp+var_F0]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_F8], rax
loc_807B9:
mov rax, [rbp+var_F8]
mov rax, [rax]
mov [rbp+var_10], rax
jmp loc_80720
loc_807CC:
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
|
_BYTE * strxmov(
_BYTE *a1,
_BYTE *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_BYTE *v15; // rax
_BYTE *v16; // rcx
char *v17; // rax
char v19; // [rsp+18h] [rbp-E0h] BYREF
long long v20; // [rsp+28h] [rbp-D0h]
long long v21; // [rsp+30h] [rbp-C8h]
long long v22; // [rsp+38h] [rbp-C0h]
long long v23; // [rsp+40h] [rbp-B8h]
__m128 v24; // [rsp+48h] [rbp-B0h]
__m128 v25; // [rsp+58h] [rbp-A0h]
__m128 v26; // [rsp+68h] [rbp-90h]
__m128 v27; // [rsp+78h] [rbp-80h]
__m128 v28; // [rsp+88h] [rbp-70h]
__m128 v29; // [rsp+98h] [rbp-60h]
__m128 v30; // [rsp+A8h] [rbp-50h]
__m128 v31; // [rsp+B8h] [rbp-40h]
int v32; // [rsp+C8h] [rbp-30h]
int v33; // [rsp+CCh] [rbp-2Ch]
char *v34; // [rsp+D0h] [rbp-28h]
char *v35; // [rsp+D8h] [rbp-20h]
_BYTE *v36; // [rsp+E8h] [rbp-10h]
_BYTE *v37; // [rsp+F0h] [rbp-8h]
v24 = a7;
v25 = a8;
v26 = a9;
v27 = a10;
v28 = a11;
v29 = a12;
v30 = a13;
v31 = a14;
v23 = a6;
v22 = a5;
v21 = a4;
v20 = a3;
v37 = a1;
v36 = a2;
v35 = &v19;
v34 = &a15;
v33 = 48;
v32 = 16;
while ( v36 )
{
do
{
v15 = v36++;
LOBYTE(v15) = *v15;
v16 = v37++;
*v16 = (_BYTE)v15;
}
while ( (_BYTE)v15 );
--v37;
if ( (unsigned int)v32 > 0x28 )
{
v17 = v34;
v34 += 8;
}
else
{
v17 = &v35[v32];
v32 += 8;
}
v36 = *(_BYTE **)v17;
}
*v37 = 0;
return v37;
}
|
strxmov:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
TEST AL,AL
JZ 0x001806d8
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_001806d8:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LAB_00180720:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001807cc
JMP 0x0018072d
LAB_0018072d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RCX],AL
CMP AL,0x0
JZ 0x00180755
JMP 0x0018072d
LAB_00180755:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xf0],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0xe4],EAX
CMP EAX,0x28
JA 0x0018079c
MOV RCX,qword ptr [RBP + -0xf0]
MOV EDX,dword ptr [RBP + -0xe4]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x001807b9
LAB_0018079c:
MOV RCX,qword ptr [RBP + -0xf0]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0xf8],RAX
LAB_001807b9:
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00180720
LAB_001807cc:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
char * strxmov(char *param_1,char *param_2)
{
char cVar1;
char *pcVar2;
int8 *local_100;
int8 local_e8 [22];
uint local_38;
int8 *local_30;
char *local_18;
char *local_10;
local_30 = (int8 *)&stack0x00000008;
local_38 = 0x10;
local_18 = param_2;
local_10 = param_1;
while (pcVar2 = local_10, local_18 != (char *)0x0) {
do {
local_10 = pcVar2;
cVar1 = *local_18;
*local_10 = cVar1;
local_18 = local_18 + 1;
pcVar2 = local_10 + 1;
} while (cVar1 != '\0');
if (local_38 < 0x29) {
local_100 = (int8 *)((long)local_e8 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_100 = local_30;
local_30 = local_30 + 1;
}
local_18 = (char *)*local_100;
}
*local_10 = '\0';
return local_10;
}
|
|
57,309
|
glfwInputKey
|
untodesu[P]riteg/build_O1/_deps/glfw-src/src/input.c
|
void _glfwInputKey(_GLFWwindow* window, int key, int scancode, int action, int mods)
{
if (key >= 0 && key <= GLFW_KEY_LAST)
{
GLFWbool repeated = GLFW_FALSE;
if (action == GLFW_RELEASE && window->keys[key] == GLFW_RELEASE)
return;
if (action == GLFW_PRESS && window->keys[key] == GLFW_PRESS)
repeated = GLFW_TRUE;
if (action == GLFW_RELEASE && window->stickyKeys)
window->keys[key] = _GLFW_STICK;
else
window->keys[key] = (char) action;
if (repeated)
action = GLFW_REPEAT;
}
if (!window->lockKeyMods)
mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK);
if (window->callbacks.key)
window->callbacks.key((GLFWwindow*) window, key, scancode, action, mods);
}
|
O1
|
c
|
glfwInputKey:
cmpl $0x15c, %esi # imm = 0x15C
ja 0x19739
movl %esi, %eax
testl %ecx, %ecx
jne 0x196fc
cmpb $0x0, 0x80(%rdi,%rax)
je 0x1975a
movl %ecx, %r9d
cmpl $0x1, %ecx
jne 0x19716
cmpb $0x1, 0x80(%rdi,%rax)
movl $0x2, %r9d
cmovnel %ecx, %r9d
testl %ecx, %ecx
je 0x1971f
movl %ecx, %r10d
jmp 0x19728
movb $0x3, %r10b
cmpl $0x0, 0x68(%rdi)
je 0x1971a
movb %r10b, 0x80(%rdi,%rax)
movb $0x1, %al
movl %r9d, %ecx
testb %al, %al
je 0x19759
movq 0x320(%rdi), %r9
testq %r9, %r9
je 0x19759
movl %r8d, %eax
andl $-0x31, %eax
cmpl $0x0, 0x70(%rdi)
cmovnel %r8d, %eax
movl %eax, %r8d
jmpq *%r9
retq
xorl %r9d, %r9d
xorl %eax, %eax
jmp 0x19732
|
_glfwInputKey:
cmp esi, 15Ch
ja short loc_19739
mov eax, esi
test ecx, ecx
jnz short loc_196FC
cmp byte ptr [rdi+rax+80h], 0
jz short loc_1975A
loc_196FC:
mov r9d, ecx
cmp ecx, 1
jnz short loc_19716
cmp byte ptr [rdi+rax+80h], 1
mov r9d, 2
cmovnz r9d, ecx
loc_19716:
test ecx, ecx
jz short loc_1971F
loc_1971A:
mov r10d, ecx
jmp short loc_19728
loc_1971F:
mov r10b, 3
cmp dword ptr [rdi+68h], 0
jz short loc_1971A
loc_19728:
mov [rdi+rax+80h], r10b
mov al, 1
loc_19732:
mov ecx, r9d
test al, al
jz short locret_19759
loc_19739:
mov r9, [rdi+320h]
test r9, r9
jz short locret_19759
mov eax, r8d
and eax, 0FFFFFFCFh
cmp dword ptr [rdi+70h], 0
cmovnz eax, r8d
mov r8d, eax
jmp r9
locret_19759:
retn
loc_1975A:
xor r9d, r9d
xor eax, eax
jmp short loc_19732
|
void glfwInputKey(long long a1, long long a2, long long a3, long long a4, unsigned int a5)
{
unsigned int v5; // r9d
char v6; // r10
char v7; // al
void ( *v8)(long long, long long, long long, long long, _QWORD); // r9
unsigned int v9; // eax
if ( (unsigned int)a2 > 0x15C )
goto LABEL_12;
if ( (_DWORD)a4 || *(_BYTE *)(a1 + (unsigned int)a2 + 128) )
{
v5 = a4;
if ( (_DWORD)a4 == 1 )
{
v5 = 2;
if ( *(_BYTE *)(a1 + (unsigned int)a2 + 128) != 1 )
v5 = 1;
}
if ( (_DWORD)a4 || (v6 = 3, !*(_DWORD *)(a1 + 104)) )
v6 = a4;
*(_BYTE *)(a1 + (unsigned int)a2 + 128) = v6;
v7 = 1;
}
else
{
v5 = 0;
v7 = 0;
}
a4 = v5;
if ( v7 )
{
LABEL_12:
v8 = *(void ( **)(long long, long long, long long, long long, _QWORD))(a1 + 800);
if ( v8 )
{
v9 = a5 & 0xFFFFFFCF;
if ( *(_DWORD *)(a1 + 112) )
v9 = a5;
v8(a1, a2, a3, a4, v9);
}
}
}
|
_glfwInputKey:
CMP ESI,0x15c
JA 0x00119739
MOV EAX,ESI
TEST ECX,ECX
JNZ 0x001196fc
CMP byte ptr [RDI + RAX*0x1 + 0x80],0x0
JZ 0x0011975a
LAB_001196fc:
MOV R9D,ECX
CMP ECX,0x1
JNZ 0x00119716
CMP byte ptr [RDI + RAX*0x1 + 0x80],0x1
MOV R9D,0x2
CMOVNZ R9D,ECX
LAB_00119716:
TEST ECX,ECX
JZ 0x0011971f
LAB_0011971a:
MOV R10D,ECX
JMP 0x00119728
LAB_0011971f:
MOV R10B,0x3
CMP dword ptr [RDI + 0x68],0x0
JZ 0x0011971a
LAB_00119728:
MOV byte ptr [RDI + RAX*0x1 + 0x80],R10B
MOV AL,0x1
LAB_00119732:
MOV ECX,R9D
TEST AL,AL
JZ 0x00119759
LAB_00119739:
MOV R9,qword ptr [RDI + 0x320]
TEST R9,R9
JZ 0x00119759
MOV EAX,R8D
AND EAX,0xffffffcf
CMP dword ptr [RDI + 0x70],0x0
CMOVNZ EAX,R8D
MOV R8D,EAX
JMP R9
LAB_00119759:
RET
LAB_0011975a:
XOR R9D,R9D
XOR EAX,EAX
JMP 0x00119732
|
void _glfwInputKey(long param_1,uint param_2,int8 param_3,int param_4)
{
bool bVar1;
int1 uVar2;
if (param_2 < 0x15d) {
if ((param_4 == 0) && (*(char *)(param_1 + 0x80 + (ulong)param_2) == '\0')) {
bVar1 = false;
}
else {
if ((param_4 != 0) || (uVar2 = 3, *(int *)(param_1 + 0x68) == 0)) {
uVar2 = (int1)param_4;
}
*(int1 *)(param_1 + 0x80 + (ulong)param_2) = uVar2;
bVar1 = true;
}
if (!bVar1) {
return;
}
}
if (*(code **)(param_1 + 800) == (code *)0x0) {
return;
}
/* WARNING: Could not recover jumptable at 0x00119756. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 800))();
return;
}
|
|
57,310
|
my_llama_file::read_raw(void*, unsigned long)
|
monkey531[P]llama/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
|
void read_raw(void * ptr, size_t size) {
if (size == 0) {
return;
}
errno = 0;
std::size_t ret = std::fread(ptr, size, 1, fp);
if (ferror(fp)) {
die_fmt("fread failed: %s", strerror(errno));
}
if (ret != 1) {
die("unexpectedly reached end of file");
}
}
|
O1
|
cpp
|
my_llama_file::read_raw(void*, unsigned long):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x21980
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x1a070
movq %rax, %rbx
movl $0x0, (%rax)
movq (%r14), %rcx
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1ab30
movq %rax, %r15
movq (%r14), %rdi
callq 0x1ae30
testl %eax, %eax
jne 0x2198c
cmpq $0x1, %r15
jne 0x21994
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x1b135
callq 0x1b163
nop
|
_ZN13my_llama_file8read_rawEPvm:
push r15
push r14
push r12
push rbx
push rax
test rdx, rdx
jz short loc_21980
mov r15, rdx
mov r12, rsi
mov r14, rdi
call ___errno_location
mov rbx, rax
mov dword ptr [rax], 0
mov rcx, [r14]
mov edx, 1
mov rdi, r12
mov rsi, r15
call _fread
mov r15, rax
mov rdi, [r14]
call _ferror
test eax, eax
jnz short loc_2198C
cmp r15, 1
jnz short loc_21994
loc_21980:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_2198C:
mov rdi, rbx
call _ZN13my_llama_file8read_rawEPvm_cold_1; my_llama_file::read_raw(void *,ulong) [clone]
loc_21994:
call _ZN13my_llama_file8read_rawEPvm_cold_2; my_llama_file::read_raw(void *,ulong) [clone]
|
long long my_llama_file::read_raw(my_llama_file *this, void *a2, long long a3)
{
unsigned int *v4; // rbx
long long v5; // r15
long long v6; // rdi
long long result; // rax
if ( a3 )
{
v4 = (unsigned int *)__errno_location(this);
*v4 = 0;
v5 = fread(a2, a3, 1LL, *(_QWORD *)this);
v6 = *(_QWORD *)this;
result = ferror(v6);
if ( (_DWORD)result )
my_llama_file::read_raw(v4);
if ( v5 != 1 )
my_llama_file::read_raw(v6);
}
return result;
}
|
read_raw:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST RDX,RDX
JZ 0x00121980
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
CALL 0x0011a070
MOV RBX,RAX
MOV dword ptr [RAX],0x0
MOV RCX,qword ptr [R14]
MOV EDX,0x1
MOV RDI,R12
MOV RSI,R15
CALL 0x0011ab30
MOV R15,RAX
MOV RDI,qword ptr [R14]
CALL 0x0011ae30
TEST EAX,EAX
JNZ 0x0012198c
CMP R15,0x1
JNZ 0x00121994
LAB_00121980:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0012198c:
MOV RDI,RBX
CALL 0x0011b135
LAB_00121994:
CALL 0x0011b163
NOP
|
/* my_llama_file::read_raw(void*, unsigned long) */
void __thiscall my_llama_file::read_raw(my_llama_file *this,void *param_1,ulong param_2)
{
char *pcVar1;
int iVar2;
FILE *this_00;
size_t sVar3;
FILE *__stream;
char *__s;
if (param_2 == 0) {
return;
}
this_00 = (FILE *)__errno_location();
this_00->_flags = 0;
sVar3 = fread(param_1,param_2,1,*(FILE **)this);
__stream = *(FILE **)this;
iVar2 = ferror(__stream);
if (iVar2 == 0) {
this_00 = __stream;
if (sVar3 == 1) {
return;
}
}
else {
read_raw(this_00,param_2);
}
read_raw(this_00,param_2);
if (-1 < (long)param_2) {
*(int8 *)this_00 = 0;
this_00->_IO_read_ptr = (char *)0x0;
this_00->_IO_read_end = (char *)0x0;
std::_Vector_base<char,std::allocator<char>>::_M_create_storage
((_Vector_base<char,std::allocator<char>> *)this_00,param_2);
pcVar1 = *(char **)this_00;
__s = pcVar1;
if (param_2 != 0) {
*pcVar1 = '\0';
__s = pcVar1 + 1;
if (param_2 - 1 != 0) {
memset(__s,0,param_2 - 1);
__s = pcVar1 + param_2;
}
}
this_00->_IO_read_ptr = __s;
return;
}
/* WARNING: Subroutine does not return */
std::__throw_length_error("cannot create std::vector larger than max_size()");
}
|
|
57,311
|
my_llama_file::read_raw(void*, unsigned long)
|
monkey531[P]llama/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
|
void read_raw(void * ptr, size_t size) {
if (size == 0) {
return;
}
errno = 0;
std::size_t ret = std::fread(ptr, size, 1, fp);
if (ferror(fp)) {
die_fmt("fread failed: %s", strerror(errno));
}
if (ret != 1) {
die("unexpectedly reached end of file");
}
}
|
O2
|
cpp
|
my_llama_file::read_raw(void*, unsigned long):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x275c1
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x22060
movq %rax, %rbx
andl $0x0, (%rax)
movq (%r14), %rcx
pushq $0x1
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x22b50
movq %rax, %r15
movq (%r14), %rdi
callq 0x22e30
testl %eax, %eax
jne 0x275cd
cmpq $0x1, %r15
jne 0x275f4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xaf9c4(%rip), %rax # 0xd6f98
movq (%rax), %r14
movl (%rbx), %edi
callq 0x22240
leaq 0x6a523(%rip), %rsi # 0x91b08
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22af0
jmp 0x2760a
movq 0xaf99d(%rip), %rax # 0xd6f98
movq (%rax), %rsi
leaq 0x6a51c(%rip), %rdi # 0x91b21
callq 0x22870
pushq $0x1
popq %rdi
callq 0x22910
|
_ZN13my_llama_file8read_rawEPvm:
push r15
push r14
push r12
push rbx
push rax
test rdx, rdx
jz short loc_275C1
mov r15, rdx
mov r12, rsi
mov r14, rdi
call ___errno_location
mov rbx, rax
and dword ptr [rax], 0
mov rcx, [r14]
push 1
pop rdx
mov rdi, r12
mov rsi, r15
call _fread
mov r15, rax
mov rdi, [r14]
call _ferror
test eax, eax
jnz short loc_275CD
cmp r15, 1
jnz short loc_275F4
loc_275C1:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_275CD:
mov rax, cs:stderr_ptr
mov r14, [rax]
mov edi, [rbx]
call _strerror
lea rsi, aErrorFreadFail; "error: fread failed: %s\n"
mov rdi, r14
mov rdx, rax
xor eax, eax
call _fprintf
jmp short loc_2760A
loc_275F4:
mov rax, cs:stderr_ptr
mov rsi, [rax]
lea rdi, aErrorUnexpecte; "error: unexpectedly reached end of file"...
call _fputs
loc_2760A:
push 1
pop rdi
call _exit
|
long long my_llama_file::read_raw(my_llama_file *this, void *a2, long long a3)
{
_DWORD *v4; // rbx
long long v5; // r15
long long result; // rax
long long v7; // r14
const char *v8; // rax
if ( a3 )
{
v4 = (_DWORD *)__errno_location(this);
*v4 = 0;
v5 = fread(a2, a3, 1LL, *(_QWORD *)this);
result = ferror(*(_QWORD *)this);
if ( (_DWORD)result )
{
v7 = stderr;
v8 = (const char *)strerror((unsigned int)*v4);
fprintf(v7, "error: fread failed: %s\n", v8);
}
else
{
if ( v5 == 1 )
return result;
fputs("error: unexpectedly reached end of file\n", stderr);
}
exit(1LL);
}
return result;
}
|
read_raw:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST RDX,RDX
JZ 0x001275c1
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
CALL 0x00122060
MOV RBX,RAX
AND dword ptr [RAX],0x0
MOV RCX,qword ptr [R14]
PUSH 0x1
POP RDX
MOV RDI,R12
MOV RSI,R15
CALL 0x00122b50
MOV R15,RAX
MOV RDI,qword ptr [R14]
CALL 0x00122e30
TEST EAX,EAX
JNZ 0x001275cd
CMP R15,0x1
JNZ 0x001275f4
LAB_001275c1:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001275cd:
MOV RAX,qword ptr [0x001d6f98]
MOV R14,qword ptr [RAX]
MOV EDI,dword ptr [RBX]
CALL 0x00122240
LEA RSI,[0x191b08]
MOV RDI,R14
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00122af0
JMP 0x0012760a
LAB_001275f4:
MOV RAX,qword ptr [0x001d6f98]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x191b21]
CALL 0x00122870
LAB_0012760a:
PUSH 0x1
POP RDI
CALL 0x00122910
|
/* my_llama_file::read_raw(void*, unsigned long) */
void __thiscall my_llama_file::read_raw(my_llama_file *this,void *param_1,ulong param_2)
{
FILE *__stream;
int iVar1;
int *piVar2;
size_t sVar3;
char *pcVar4;
if (param_2 == 0) {
return;
}
piVar2 = __errno_location();
*piVar2 = 0;
sVar3 = fread(param_1,param_2,1,*(FILE **)this);
iVar1 = ferror(*(FILE **)this);
if (iVar1 == 0) {
if (sVar3 == 1) {
return;
}
fputs("error: unexpectedly reached end of file\n",*(FILE **)PTR_stderr_001d6f98);
}
else {
__stream = *(FILE **)PTR_stderr_001d6f98;
pcVar4 = strerror(*piVar2);
fprintf(__stream,"error: fread failed: %s\n",pcVar4);
}
/* WARNING: Subroutine does not return */
exit(1);
}
|
|
57,312
|
js_std_init_handlers
|
bluesky950520[P]quickjs/quickjs-libc.c
|
void js_std_init_handlers(JSRuntime *rt)
{
JSThreadState *ts;
ts = js_mallocz_rt(rt, sizeof(*ts));
if (!ts) {
fprintf(stderr, "Could not allocate memory for the worker");
exit(1);
}
init_list_head(&ts->os_rw_handlers);
init_list_head(&ts->os_signal_handlers);
init_list_head(&ts->os_timers);
init_list_head(&ts->port_list);
ts->next_timer_id = 1;
ts->exc = JS_UNDEFINED;
js_set_thread_state(rt, ts);
JS_AddRuntimeFinalizer(rt, js_std_finalize, ts);
#ifdef USE_WORKER
/* set the SharedArrayBuffer memory handlers */
{
JSSharedArrayBufferFunctions sf;
memset(&sf, 0, sizeof(sf));
sf.sab_alloc = js_sab_alloc;
sf.sab_free = js_sab_free;
sf.sab_dup = js_sab_dup;
JS_SetSharedArrayBufferFunctions(rt, &sf);
}
#endif
}
|
O0
|
c
|
js_std_init_handlers:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movl $0x80, %esi
callq 0x21b60
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x11217
movq 0x124df4(%rip), %rax # 0x135ff0
movq (%rax), %rdi
leaq 0xf889b(%rip), %rsi # 0x109aa1
movb $0x0, %al
callq 0xe550
movl $0x1, %edi
callq 0xe8b0
movq 0x38(%rsp), %rdi
callq 0x112f0
movq 0x38(%rsp), %rdi
addq $0x10, %rdi
callq 0x112f0
movq 0x38(%rsp), %rdi
addq $0x20, %rdi
callq 0x112f0
movq 0x38(%rsp), %rdi
addq $0x30, %rdi
callq 0x112f0
movq 0x38(%rsp), %rax
movq $0x1, 0x48(%rax)
movq 0x38(%rsp), %rax
movl $0x0, 0x28(%rsp)
movq $0x3, 0x30(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, 0x50(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x58(%rax)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x11320
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0xb0(%rip), %rsi # 0x11350
callq 0x23730
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xe350
leaq 0xd3(%rip), %rax # 0x11390
movq %rax, 0x8(%rsp)
leaq 0x127(%rip), %rax # 0x113f0
movq %rax, 0x10(%rsp)
leaq 0x16b(%rip), %rax # 0x11440
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x238f0
addq $0x48, %rsp
retq
nop
|
js_std_init_handlers:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rdi, [rsp+48h+var_8]
mov esi, 80h
call js_mallocz_rt
mov [rsp+48h+var_10], rax
cmp [rsp+48h+var_10], 0
jnz short loc_11217
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aCouldNotAlloca; "Could not allocate memory for the worke"...
mov al, 0
call _fprintf
mov edi, 1
call _exit
loc_11217:
mov rdi, [rsp+48h+var_10]
call init_list_head
mov rdi, [rsp+48h+var_10]
add rdi, 10h
call init_list_head
mov rdi, [rsp+48h+var_10]
add rdi, 20h ; ' '
call init_list_head
mov rdi, [rsp+48h+var_10]
add rdi, 30h ; '0'
call init_list_head
mov rax, [rsp+48h+var_10]
mov qword ptr [rax+48h], 1
mov rax, [rsp+48h+var_10]
mov dword ptr [rsp+48h+var_20], 0
mov [rsp+48h+var_18], 3
mov rcx, [rsp+48h+var_20]
mov [rax+50h], rcx
mov rcx, [rsp+48h+var_18]
mov [rax+58h], rcx
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_10]
call js_set_thread_state
mov rdi, [rsp+48h+var_8]
mov rdx, [rsp+48h+var_10]
lea rsi, js_std_finalize
call JS_AddRuntimeFinalizer
lea rdi, [rsp+48h+var_40]
xor esi, esi
mov edx, 20h ; ' '
call _memset
lea rax, js_sab_alloc
mov [rsp+48h+var_40], rax
lea rax, js_sab_free
mov [rsp+48h+var_38], rax
lea rax, js_sab_dup
mov [rsp+48h+var_30], rax
mov rdi, [rsp+48h+var_8]
lea rsi, [rsp+48h+var_40]
call JS_SetSharedArrayBufferFunctions
add rsp, 48h
retn
|
long long js_std_init_handlers(long long a1)
{
long long v1; // rax
_QWORD v3[4]; // [rsp+8h] [rbp-40h] BYREF
long long v4; // [rsp+28h] [rbp-20h]
long long v5; // [rsp+30h] [rbp-18h]
long long v6; // [rsp+38h] [rbp-10h]
long long v7; // [rsp+40h] [rbp-8h]
v7 = a1;
v6 = js_mallocz_rt(a1, 128LL);
if ( !v6 )
{
fprintf(stderr, "Could not allocate memory for the worker");
exit(1LL);
}
init_list_head(v6);
init_list_head(v6 + 16);
init_list_head(v6 + 32);
init_list_head(v6 + 48);
*(_QWORD *)(v6 + 72) = 1LL;
v1 = v6;
LODWORD(v4) = 0;
v5 = 3LL;
*(_QWORD *)(v6 + 80) = v4;
*(_QWORD *)(v1 + 88) = v5;
js_set_thread_state(v7, v6);
JS_AddRuntimeFinalizer(v7, js_std_finalize, v6);
memset(v3, 0LL, sizeof(v3));
v3[0] = js_sab_alloc;
v3[1] = js_sab_free;
v3[2] = js_sab_dup;
return JS_SetSharedArrayBufferFunctions(v7, v3);
}
|
js_std_init_handlers:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,0x80
CALL 0x00121b60
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x00111217
MOV RAX,qword ptr [0x00235ff0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x209aa1]
MOV AL,0x0
CALL 0x0010e550
MOV EDI,0x1
CALL 0x0010e8b0
LAB_00111217:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001112f0
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x10
CALL 0x001112f0
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x20
CALL 0x001112f0
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x30
CALL 0x001112f0
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x48],0x1
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x3
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x58],RCX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00111320
MOV RDI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
LEA RSI,[0x111350]
CALL 0x00123730
LEA RDI,[RSP + 0x8]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x0010e350
LEA RAX,[0x111390]
MOV qword ptr [RSP + 0x8],RAX
LEA RAX,[0x1113f0]
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[0x111440]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[RSP + 0x8]
CALL 0x001238f0
ADD RSP,0x48
RET
|
void js_std_init_handlers(int8 param_1)
{
code *local_40;
code *local_38;
code *local_30;
int4 local_20;
uint uStack_1c;
int8 local_18;
long local_10;
int8 local_8;
local_8 = param_1;
local_10 = js_mallocz_rt(param_1,0x80);
if (local_10 == 0) {
fprintf(*(FILE **)PTR_stderr_00235ff0,"Could not allocate memory for the worker");
/* WARNING: Subroutine does not return */
exit(1);
}
init_list_head(local_10);
init_list_head(local_10 + 0x10);
init_list_head(local_10 + 0x20);
init_list_head(local_10 + 0x30);
*(int8 *)(local_10 + 0x48) = 1;
local_20 = 0;
local_18 = 3;
*(ulong *)(local_10 + 0x50) = (ulong)uStack_1c << 0x20;
*(int8 *)(local_10 + 0x58) = 3;
js_set_thread_state(local_8,local_10);
JS_AddRuntimeFinalizer(local_8,js_std_finalize,local_10);
memset(&local_40,0,0x20);
local_40 = js_sab_alloc;
local_38 = js_sab_free;
local_30 = js_sab_dup;
JS_SetSharedArrayBufferFunctions(local_8,&local_40);
return;
}
|
|
57,313
|
js_std_init_handlers
|
bluesky950520[P]quickjs/quickjs-libc.c
|
void js_std_init_handlers(JSRuntime *rt)
{
JSThreadState *ts;
ts = js_mallocz_rt(rt, sizeof(*ts));
if (!ts) {
fprintf(stderr, "Could not allocate memory for the worker");
exit(1);
}
init_list_head(&ts->os_rw_handlers);
init_list_head(&ts->os_signal_handlers);
init_list_head(&ts->os_timers);
init_list_head(&ts->port_list);
ts->next_timer_id = 1;
ts->exc = JS_UNDEFINED;
js_set_thread_state(rt, ts);
JS_AddRuntimeFinalizer(rt, js_std_finalize, ts);
#ifdef USE_WORKER
/* set the SharedArrayBuffer memory handlers */
{
JSSharedArrayBufferFunctions sf;
memset(&sf, 0, sizeof(sf));
sf.sab_alloc = js_sab_alloc;
sf.sab_free = js_sab_free;
sf.sab_dup = js_sab_dup;
JS_SetSharedArrayBufferFunctions(rt, &sf);
}
#endif
}
|
O1
|
c
|
js_std_init_handlers:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x80, %esi
callq 0xedbb
testq %rax, %rax
je 0x1520c
movq %rax, %r14
movq %rax, (%rax)
movq %rax, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%r14)
movq %rax, 0x18(%r14)
leaq 0x20(%r14), %rax
movq %rax, 0x20(%r14)
movq %rax, 0x28(%r14)
movq %r14, %rax
addq $0x30, %rax
movq %rax, 0x30(%r14)
movq %rax, 0x38(%r14)
movq $0x1, 0x48(%r14)
movl $0x0, 0x50(%r14)
movq $0x3, 0x58(%r14)
movl $0x1, %edi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3a5f3
leaq 0x4d(%rip), %rsi # 0x15211
movq %rbx, %rdi
movq %r14, %rdx
callq 0xefdb
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
leaq 0x5b(%rip), %rax # 0x1523e
movq %rax, (%rsi)
leaq 0x70(%rip), %rax # 0x1525d
movq %rax, 0x8(%rsi)
leaq 0x78(%rip), %rax # 0x15270
movq %rax, 0x10(%rsi)
movq %rbx, %rdi
callq 0x1d7bc
addq $0x28, %rsp
popq %rbx
popq %r14
retq
callq 0xea39
|
js_std_init_handlers:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov esi, 80h
call js_mallocz_rt
test rax, rax
jz loc_1520C
mov r14, rax
mov [rax], rax
mov [rax+8], rax
add rax, 10h
mov [r14+10h], rax
mov [r14+18h], rax
lea rax, [r14+20h]
mov [r14+20h], rax
mov [r14+28h], rax
mov rax, r14
add rax, 30h ; '0'
mov [r14+30h], rax
mov [r14+38h], rax
mov qword ptr [r14+48h], 1
mov dword ptr [r14+50h], 0
mov qword ptr [r14+58h], 3
mov edi, 1
mov rsi, rbx
mov rdx, r14
xor eax, eax
call js_std_cmd
lea rsi, js_std_finalize
mov rdi, rbx
mov rdx, r14
call JS_AddRuntimeFinalizer
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
movaps xmmword ptr [rsi+10h], xmm0
lea rax, js_sab_alloc
mov [rsi], rax
lea rax, js_sab_free
mov [rsi+8], rax
lea rax, js_sab_dup
mov [rsi+10h], rax
mov rdi, rbx
call JS_SetSharedArrayBufferFunctions
add rsp, 28h
pop rbx
pop r14
retn
loc_1520C:
call js_std_init_handlers_cold_1
|
long long js_std_init_handlers(long long a1)
{
_QWORD *v1; // rax
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long v5; // r14
_QWORD *v6; // rax
v1 = (_QWORD *)js_mallocz_rt(a1, 0x80uLL);
if ( !v1 )
js_std_init_handlers_cold_1();
v5 = (long long)v1;
*v1 = v1;
v1[1] = v1;
v6 = v1 + 2;
*(_QWORD *)(v5 + 16) = v6;
*(_QWORD *)(v5 + 24) = v6;
*(_QWORD *)(v5 + 32) = v5 + 32;
*(_QWORD *)(v5 + 40) = v5 + 32;
*(_QWORD *)(v5 + 48) = v5 + 48;
*(_QWORD *)(v5 + 56) = v5 + 48;
*(_QWORD *)(v5 + 72) = 1LL;
*(_DWORD *)(v5 + 80) = 0;
*(_QWORD *)(v5 + 88) = 3LL;
js_std_cmd(1, a1, v5, v2, v3, v4);
JS_AddRuntimeFinalizer(a1, (long long)js_std_finalize, v5);
return ((long long ( *)(long long))JS_SetSharedArrayBufferFunctions)(a1);
}
| |||
57,314
|
js_std_init_handlers
|
bluesky950520[P]quickjs/quickjs-libc.c
|
void js_std_init_handlers(JSRuntime *rt)
{
JSThreadState *ts;
ts = js_mallocz_rt(rt, sizeof(*ts));
if (!ts) {
fprintf(stderr, "Could not allocate memory for the worker");
exit(1);
}
init_list_head(&ts->os_rw_handlers);
init_list_head(&ts->os_signal_handlers);
init_list_head(&ts->os_timers);
init_list_head(&ts->port_list);
ts->next_timer_id = 1;
ts->exc = JS_UNDEFINED;
js_set_thread_state(rt, ts);
JS_AddRuntimeFinalizer(rt, js_std_finalize, ts);
#ifdef USE_WORKER
/* set the SharedArrayBuffer memory handlers */
{
JSSharedArrayBufferFunctions sf;
memset(&sf, 0, sizeof(sf));
sf.sab_alloc = js_sab_alloc;
sf.sab_free = js_sab_free;
sf.sab_dup = js_sab_dup;
JS_SetSharedArrayBufferFunctions(rt, &sf);
}
#endif
}
|
O2
|
c
|
js_std_init_handlers:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x80, %esi
callq 0x171a8
testq %rax, %rax
je 0x10174
movq %rax, %r14
movq %rax, (%rax)
movq %rax, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%r14)
movq %rax, 0x18(%r14)
leaq 0x20(%r14), %rax
movq %rax, 0x20(%r14)
movq %rax, 0x28(%r14)
movq %r14, %rax
addq $0x30, %rax
movq %rax, 0x30(%r14)
movq %rax, 0x38(%r14)
movq $0x1, 0x48(%r14)
andl $0x0, 0x50(%r14)
movq $0x3, 0x58(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10198
leaq 0x79(%rip), %rsi # 0x101a8
movq %rbx, %rdi
movq %r14, %rdx
callq 0x17e05
leaq 0x8(%rsp), %rsi
andq $0x0, 0x18(%rsi)
leaq 0x80(%rip), %rax # 0x101cb
movq %rax, (%rsi)
leaq 0x95(%rip), %rax # 0x101ea
movq %rax, 0x8(%rsi)
leaq 0x9d(%rip), %rax # 0x101fd
movq %rax, 0x10(%rsi)
movq %rbx, %rdi
callq 0x17e93
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq 0xaae75(%rip), %rax # 0xbaff0
movq (%rax), %rcx
leaq 0x727b0(%rip), %rdi # 0x82935
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0xe8f0
pushq $0x1
popq %rdi
callq 0xe8e0
|
js_std_init_handlers:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov esi, 80h
call js_mallocz_rt
test rax, rax
jz loc_10174
mov r14, rax
mov [rax], rax
mov [rax+8], rax
add rax, 10h
mov [r14+10h], rax
mov [r14+18h], rax
lea rax, [r14+20h]
mov [r14+20h], rax
mov [r14+28h], rax
mov rax, r14
add rax, 30h ; '0'
mov [r14+30h], rax
mov [r14+38h], rax
mov qword ptr [r14+48h], 1
and dword ptr [r14+50h], 0
mov qword ptr [r14+58h], 3
mov rdi, rbx
mov rsi, r14
call js_set_thread_state
lea rsi, js_std_finalize
mov rdi, rbx
mov rdx, r14
call JS_AddRuntimeFinalizer
lea rsi, [rsp+38h+var_30]
and qword ptr [rsi+18h], 0
lea rax, js_sab_alloc
mov [rsi], rax
lea rax, js_sab_free
mov [rsi+8], rax
lea rax, js_sab_dup
mov [rsi+10h], rax
mov rdi, rbx
call JS_SetSharedArrayBufferFunctions
add rsp, 28h
pop rbx
pop r14
retn
loc_10174:
mov rax, cs:stderr_ptr
mov rcx, [rax]
lea rdi, aCouldNotAlloca; "Could not allocate memory for the worke"...
push 28h ; '('
pop rsi
push 1
pop rdx
call _fwrite
push 1
pop rdi
call _exit
|
long long js_std_init_handlers(long long a1)
{
_QWORD *v1; // rax
_QWORD *v2; // r14
_QWORD *v3; // rax
v1 = (_QWORD *)js_mallocz_rt(a1, 128LL);
if ( !v1 )
{
fwrite("Could not allocate memory for the worker", 40LL, 1LL, stderr);
exit(1LL);
}
v2 = v1;
*v1 = v1;
v1[1] = v1;
v3 = v1 + 2;
v2[2] = v3;
v2[3] = v3;
v2[4] = v2 + 4;
v2[5] = v2 + 4;
v2[6] = v2 + 6;
v2[7] = v2 + 6;
v2[9] = 1LL;
*((_DWORD *)v2 + 20) = 0;
v2[11] = 3LL;
js_set_thread_state(a1, v2);
JS_AddRuntimeFinalizer(a1, js_std_finalize, v2);
return JS_SetSharedArrayBufferFunctions(a1);
}
|
js_std_init_handlers:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV ESI,0x80
CALL 0x001171a8
TEST RAX,RAX
JZ 0x00110174
MOV R14,RAX
MOV qword ptr [RAX],RAX
MOV qword ptr [RAX + 0x8],RAX
ADD RAX,0x10
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [R14 + 0x18],RAX
LEA RAX,[R14 + 0x20]
MOV qword ptr [R14 + 0x20],RAX
MOV qword ptr [R14 + 0x28],RAX
MOV RAX,R14
ADD RAX,0x30
MOV qword ptr [R14 + 0x30],RAX
MOV qword ptr [R14 + 0x38],RAX
MOV qword ptr [R14 + 0x48],0x1
AND dword ptr [R14 + 0x50],0x0
MOV qword ptr [R14 + 0x58],0x3
MOV RDI,RBX
MOV RSI,R14
CALL 0x00110198
LEA RSI,[0x1101a8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x00117e05
LEA RSI,[RSP + 0x8]
AND qword ptr [RSI + 0x18],0x0
LEA RAX,[0x1101cb]
MOV qword ptr [RSI],RAX
LEA RAX,[0x1101ea]
MOV qword ptr [RSI + 0x8],RAX
LEA RAX,[0x1101fd]
MOV qword ptr [RSI + 0x10],RAX
MOV RDI,RBX
CALL 0x00117e93
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_00110174:
MOV RAX,qword ptr [0x001baff0]
MOV RCX,qword ptr [RAX]
LEA RDI,[0x182935]
PUSH 0x28
POP RSI
PUSH 0x1
POP RDX
CALL 0x0010e8f0
PUSH 0x1
POP RDI
CALL 0x0010e8e0
|
void js_std_init_handlers(int8 param_1)
{
long lVar1;
lVar1 = js_mallocz_rt(param_1,0x80);
if (lVar1 != 0) {
*(long *)lVar1 = lVar1;
*(long *)(lVar1 + 8) = lVar1;
*(long *)(lVar1 + 0x10) = lVar1 + 0x10;
*(long *)(lVar1 + 0x18) = lVar1 + 0x10;
*(long *)(lVar1 + 0x20) = lVar1 + 0x20;
*(long *)(lVar1 + 0x28) = lVar1 + 0x20;
*(long *)(lVar1 + 0x30) = lVar1 + 0x30;
*(long *)(lVar1 + 0x38) = lVar1 + 0x30;
*(int8 *)(lVar1 + 0x48) = 1;
*(int4 *)(lVar1 + 0x50) = 0;
*(int8 *)(lVar1 + 0x58) = 3;
js_set_thread_state(param_1,lVar1);
JS_AddRuntimeFinalizer(param_1,js_std_finalize,lVar1);
JS_SetSharedArrayBufferFunctions(param_1);
return;
}
fwrite("Could not allocate memory for the worker",0x28,1,*(FILE **)PTR_stderr_001baff0);
/* WARNING: Subroutine does not return */
exit(1);
}
|
|
57,315
|
mysql_fetch_row
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
MYSQL_ROW STDCALL
mysql_fetch_row(MYSQL_RES *res)
{
if (!res)
return 0;
if (res->handle)
{
if (res->handle->status != MYSQL_STATUS_USE_RESULT &&
res->handle->status != MYSQL_STATUS_GET_RESULT)
return 0;
}
if (!res->data)
{ /* Unbufferred fetch */
if (!res->eof && res->handle)
{
if (!(res->handle->methods->db_read_one_row(res->handle,res->field_count,res->row, res->lengths)))
{
res->row_count++;
return(res->current_row=res->row);
}
res->eof=1;
res->handle->status=MYSQL_STATUS_READY;
/* Don't clear handle in mysql_free_results */
res->handle=0;
}
return((MYSQL_ROW) NULL);
}
{
MYSQL_ROW tmp;
if (!res->data_cursor)
{
return(res->current_row=(MYSQL_ROW) NULL);
}
tmp = res->data_cursor->data;
res->data_cursor = res->data_cursor->next;
return(res->current_row=tmp);
}
}
|
O0
|
c
|
mysql_fetch_row:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x43af0
movq $0x0, -0x8(%rbp)
jmp 0x43c42
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x43b2c
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
cmpl $0x2, 0x488(%rax)
je 0x43b2a
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
cmpl $0x1, 0x488(%rax)
je 0x43b2a
movq $0x0, -0x8(%rbp)
jmp 0x43c42
jmp 0x43b2c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x43bee
movq -0x10(%rbp), %rax
cmpb $0x0, 0x80(%rax)
jne 0x43be4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x43be4
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x78(%rcx), %rdi
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %esi
movq -0x10(%rbp), %rcx
movq 0x60(%rcx), %rdx
movq -0x10(%rbp), %rcx
movq 0x70(%rcx), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x43bbb
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x10(%rbp), %rcx
movq %rax, 0x68(%rcx)
movq %rax, -0x8(%rbp)
jmp 0x43c42
movq -0x10(%rbp), %rax
movb $0x1, 0x80(%rax)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl $0x0, 0x488(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x78(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x43c42
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x43c0f
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x43c42
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rax, 0x68(%rcx)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
mysql_fetch_row:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jnz short loc_43AF0
mov [rbp+var_8], 0
jmp loc_43C42
loc_43AF0:
mov rax, [rbp+var_10]
cmp qword ptr [rax+78h], 0
jz short loc_43B2C
mov rax, [rbp+var_10]
mov rax, [rax+78h]
cmp dword ptr [rax+488h], 2
jz short loc_43B2A
mov rax, [rbp+var_10]
mov rax, [rax+78h]
cmp dword ptr [rax+488h], 1
jz short loc_43B2A
mov [rbp+var_8], 0
jmp loc_43C42
loc_43B2A:
jmp short $+2
loc_43B2C:
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jnz loc_43BEE
mov rax, [rbp+var_10]
cmp byte ptr [rax+80h], 0
jnz loc_43BE4
mov rax, [rbp+var_10]
cmp qword ptr [rax+78h], 0
jz loc_43BE4
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov rax, [rax+4D0h]
mov rax, [rax+30h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+78h]
mov rcx, [rbp+var_10]
mov esi, [rcx+8]
mov rcx, [rbp+var_10]
mov rdx, [rcx+60h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+70h]
call rax
cmp eax, 0
jnz short loc_43BBB
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax+60h]
mov rcx, [rbp+var_10]
mov [rcx+68h], rax
mov [rbp+var_8], rax
jmp loc_43C42
loc_43BBB:
mov rax, [rbp+var_10]
mov byte ptr [rax+80h], 1
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov dword ptr [rax+488h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+78h], 0
loc_43BE4:
mov [rbp+var_8], 0
jmp short loc_43C42
loc_43BEE:
mov rax, [rbp+var_10]
cmp qword ptr [rax+20h], 0
jnz short loc_43C0F
mov rax, [rbp+var_10]
mov qword ptr [rax+68h], 0
mov [rbp+var_8], 0
jmp short loc_43C42
loc_43C0F:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rax, [rax+8]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+20h], rcx
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov [rcx+68h], rax
mov [rbp+var_8], rax
loc_43C42:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long mysql_fetch_row(long long a1)
{
long long v1; // rax
long long v3; // [rsp+8h] [rbp-18h]
if ( !a1 )
return 0LL;
if ( *(_QWORD *)(a1 + 120)
&& *(_DWORD *)(*(_QWORD *)(a1 + 120) + 1160LL) != 2
&& *(_DWORD *)(*(_QWORD *)(a1 + 120) + 1160LL) != 1 )
{
return 0LL;
}
if ( !*(_QWORD *)(a1 + 24) )
{
if ( !*(_BYTE *)(a1 + 128) && *(_QWORD *)(a1 + 120) )
{
if ( !(*(unsigned int ( **)(_QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 1232LL)
+ 48LL))(
*(_QWORD *)(a1 + 120),
*(unsigned int *)(a1 + 8),
*(_QWORD *)(a1 + 96),
*(_QWORD *)(a1 + 112)) )
{
++*(_QWORD *)a1;
v1 = *(_QWORD *)(a1 + 96);
*(_QWORD *)(a1 + 104) = v1;
return v1;
}
*(_BYTE *)(a1 + 128) = 1;
*(_DWORD *)(*(_QWORD *)(a1 + 120) + 1160LL) = 0;
*(_QWORD *)(a1 + 120) = 0LL;
}
return 0LL;
}
if ( *(_QWORD *)(a1 + 32) )
{
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 8LL);
*(_QWORD *)(a1 + 32) = **(_QWORD **)(a1 + 32);
*(_QWORD *)(a1 + 104) = v3;
return v3;
}
else
{
*(_QWORD *)(a1 + 104) = 0LL;
return 0LL;
}
}
|
mysql_fetch_row:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00143af0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00143c42
LAB_00143af0:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x00143b2c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
CMP dword ptr [RAX + 0x488],0x2
JZ 0x00143b2a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
CMP dword ptr [RAX + 0x488],0x1
JZ 0x00143b2a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00143c42
LAB_00143b2a:
JMP 0x00143b2c
LAB_00143b2c:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x00143bee
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x80],0x0
JNZ 0x00143be4
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x00143be4
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x78]
MOV RCX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x60]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x70]
CALL RAX
CMP EAX,0x0
JNZ 0x00143bbb
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x60]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x68],RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00143c42
LAB_00143bbb:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x80],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV dword ptr [RAX + 0x488],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x78],0x0
LAB_00143be4:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00143c42
LAB_00143bee:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x20],0x0
JNZ 0x00143c0f
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00143c42
LAB_00143c0f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x68],RAX
MOV qword ptr [RBP + -0x8],RAX
LAB_00143c42:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long mysql_fetch_row(long *param_1)
{
int iVar1;
long local_10;
if (param_1 == (long *)0x0) {
local_10 = 0;
}
else if (((param_1[0xf] == 0) || (*(int *)(param_1[0xf] + 0x488) == 2)) ||
(*(int *)(param_1[0xf] + 0x488) == 1)) {
if (param_1[3] == 0) {
if (((char)param_1[0x10] == '\0') && (param_1[0xf] != 0)) {
iVar1 = (**(code **)(*(long *)(param_1[0xf] + 0x4d0) + 0x30))
(param_1[0xf],(int)param_1[1],param_1[0xc],param_1[0xe]);
if (iVar1 == 0) {
*param_1 = *param_1 + 1;
param_1[0xd] = param_1[0xc];
return param_1[0xc];
}
*(int1 *)(param_1 + 0x10) = 1;
*(int4 *)(param_1[0xf] + 0x488) = 0;
param_1[0xf] = 0;
}
local_10 = 0;
}
else if (param_1[4] == 0) {
param_1[0xd] = 0;
local_10 = 0;
}
else {
local_10 = *(long *)(param_1[4] + 8);
param_1[4] = *(long *)param_1[4];
param_1[0xd] = local_10;
}
}
else {
local_10 = 0;
}
return local_10;
}
|
|
57,316
|
SchemaConverter::check_errors()
|
llama.cpp/common/json-schema-to-grammar.cpp
|
void check_errors() {
if (!_errors.empty()) {
throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n"));
}
if (!_warnings.empty()) {
fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str());
}
}
|
O3
|
cpp
|
SchemaConverter::check_errors():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq 0xc8(%rdi), %rax
cmpq 0xd0(%rdi), %rax
jne 0x10007d
movq 0xe0(%r14), %rax
cmpq 0xe8(%r14), %rax
jne 0x100022
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x64f0f(%rip), %rax # 0x164f38
movq (%rax), %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x2743d(%rip), %rsi # 0x127479
leaq 0x27438(%rip), %rdx # 0x12747b
leaq 0x8(%rsp), %rdi
callq 0x289fc
addq $0xe0, %r14
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0xf709b
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x23710
jmp 0x100017
movl $0x10, %edi
callq 0x21630
movq %rax, %rbx
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x21476(%rip), %rsi # 0x121510
leaq 0x21470(%rip), %rdx # 0x121511
leaq 0x28(%rsp), %rdi
callq 0x289fc
addq $0xc8, %r14
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq 0xf709b
leaq 0x2735a(%rip), %rsi # 0x127425
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xaf924
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0x64ecd(%rip), %rsi # 0x164fc0
movq 0x64e7e(%rip), %rdx # 0x164f78
movq %rbx, %rdi
callq 0x21a50
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x100128
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0x100128
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x100143
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21170
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x10015a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0x100180
jmp 0x1001a9
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x100180
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0x100180
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f00
jmp 0x1001a9
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1001a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0x1001a9
movq %rax, %r14
movq %r14, %rdi
callq 0x21af0
nop
|
_ZN15SchemaConverter12check_errorsEv:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov r14, rdi
mov rax, [rdi+0C8h]
cmp rax, [rdi+0D0h]
jnz short loc_10007D
mov rax, [r14+0E0h]
cmp rax, [r14+0E8h]
jnz short loc_100022
loc_100017:
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_100022:
mov rax, cs:stderr_ptr
mov r15, [rax]
lea rbx, [rsp+88h+var_70]
mov [rbx-10h], rbx
lea rsi, asc_127479; "; "
lea rdx, asc_127479+2; ""
lea rdi, [rsp+88h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
add r14, 0E0h
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
mov rsi, r15
mov rcx, rbx
call _ZN15SchemaConverter12check_errorsEv_cold_1; SchemaConverter::check_errors(void) [clone]
jmp short loc_100017
loc_10007D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+88h+var_50]
mov [r15-10h], r15
lea rsi, aExampleToolCal+1Ch; "\n"
lea rdx, aExampleToolCal+1Dh; ""
lea rdi, [rsp+88h+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
add r14, 0C8h
lea rdi, [rsp+88h+var_80]
lea rdx, [rsp+88h+var_60]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n"
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+88h+var_40]
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+88h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_100128
mov rsi, [rsp+88h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_100128
mov r14, rax
mov bpl, 1
loc_100128:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_100143
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_100143:
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_10015A
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10015A:
test bpl, bpl
jnz short loc_100180
jmp short loc_1001A9
mov r14, rax
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_100180
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_100180
mov r14, rax
loc_100180:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_1001A9
mov r14, rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, rbx
jz short loc_1001A9
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1001A9
mov r14, rax
loc_1001A9:
mov rdi, r14
call __Unwind_Resume
|
void SchemaConverter::check_errors(SchemaConverter *this)
{
long long v1; // r15
void *exception; // rbx
void *v3[2]; // [rsp+8h] [rbp-80h] BYREF
void *v4[2]; // [rsp+18h] [rbp-70h] BYREF
void *v5[2]; // [rsp+28h] [rbp-60h] BYREF
long long v6; // [rsp+38h] [rbp-50h] BYREF
const char *v7[2]; // [rsp+48h] [rbp-40h] BYREF
if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) )
{
exception = __cxa_allocate_exception(0x10uLL);
v5[0] = &v6;
std::string::_M_construct<char const*>((long long)v5, "\n", (long long)"");
string_join((long long)v3, (long long *)this + 25, v5);
std::operator+<char>(v7, (long long)"JSON schema conversion failed:\n", (long long)v3);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) )
{
v1 = stderr;
v3[0] = v4;
std::string::_M_construct<char const*>((long long)v3, "; ", (long long)"");
string_join((long long)v7, (long long *)this + 28, v3);
SchemaConverter::check_errors(v7, v1, v3, v4);
}
}
|
check_errors:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xc8]
CMP RAX,qword ptr [RDI + 0xd0]
JNZ 0x0020007d
MOV RAX,qword ptr [R14 + 0xe0]
CMP RAX,qword ptr [R14 + 0xe8]
JNZ 0x00200022
LAB_00200017:
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00200022:
MOV RAX,qword ptr [0x00264f38]
MOV R15,qword ptr [RAX]
LEA RBX,[RSP + 0x18]
MOV qword ptr [RBX + -0x10],RBX
LAB_00200035:
LEA RSI,[0x227479]
LEA RDX,[0x22747b]
LEA RDI,[RSP + 0x8]
CALL 0x001289fc
LAB_0020004d:
ADD R14,0xe0
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RSI,R14
CALL 0x001f709b
LAB_00200066:
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RSI,R15
MOV RCX,RBX
CALL 0x00123710
JMP 0x00200017
LAB_0020007d:
MOV EDI,0x10
CALL 0x00121630
MOV RBX,RAX
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
LAB_00200093:
LEA RSI,[0x221510]
LEA RDX,[0x221511]
LEA RDI,[RSP + 0x28]
CALL 0x001289fc
LAB_002000ab:
ADD R14,0xc8
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
MOV RSI,R14
CALL 0x001f709b
LAB_002000c4:
LEA RSI,[0x227425]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
CALL 0x001af924
MOV BPL,0x1
LAB_002000dd:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,RBX
CALL 0x00121a50
|
/* SchemaConverter::check_errors() */
void __thiscall SchemaConverter::check_errors(SchemaConverter *this)
{
runtime_error *this_00;
int1 *local_80 [2];
int1 local_70 [16];
int1 *local_60 [2];
int1 local_50 [16];
vector local_40 [32];
if (*(long *)(this + 200) == *(long *)(this + 0xd0)) {
if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) {
local_80[0] = local_70;
/* try { // try from 00200035 to 0020004c has its CatchHandler @ 002001a6 */
std::__cxx11::string::_M_construct<char_const*>(local_80,&DAT_00227479,&DAT_0022747b);
/* try { // try from 0020004d to 00200065 has its CatchHandler @ 0020018a */
string_join(local_40,(string *)(this + 0xe0));
check_errors();
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
local_60[0] = local_50;
/* try { // try from 00200093 to 002000aa has its CatchHandler @ 0020017d */
std::__cxx11::string::_M_construct<char_const*>(local_60,"\n","");
/* try { // try from 002000ab to 002000c3 has its CatchHandler @ 00200161 */
string_join((vector *)local_80,(string *)(this + 200));
/* try { // try from 002000c4 to 002000d9 has its CatchHandler @ 00200122 */
std::operator+((char *)local_40,(string *)"JSON schema conversion failed:\n");
/* try { // try from 002000dd to 00200101 has its CatchHandler @ 00200102 */
std::runtime_error::runtime_error(this_00,(string *)local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
|
|
57,317
|
js_parse_template
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int js_parse_template(JSParseState *s, int call, int *argc)
{
JSContext *ctx = s->ctx;
JSValue raw_array, template_object;
JSToken cooked;
int depth, ret;
raw_array = JS_UNDEFINED; /* avoid warning */
template_object = JS_UNDEFINED; /* avoid warning */
if (call) {
/* Create a template object: an array of cooked strings */
/* Create an array of raw strings and store it to the raw property */
template_object = JS_NewArray(ctx);
if (JS_IsException(template_object))
return -1;
// pool_idx = s->cur_func->cpool_count;
ret = emit_push_const(s, template_object, 0);
JS_FreeValue(ctx, template_object);
if (ret)
return -1;
raw_array = JS_NewArray(ctx);
if (JS_IsException(raw_array))
return -1;
if (JS_DefinePropertyValue(ctx, template_object, JS_ATOM_raw,
raw_array, JS_PROP_THROW) < 0) {
return -1;
}
}
depth = 0;
while (s->token.val == TOK_TEMPLATE) {
const uint8_t *p = s->token.ptr + 1;
cooked = s->token;
if (call) {
if (JS_DefinePropertyValueUint32(ctx, raw_array, depth,
js_dup(s->token.u.str.str),
JS_PROP_ENUMERABLE | JS_PROP_THROW) < 0) {
return -1;
}
/* re-parse the string with escape sequences but do not throw a
syntax error if it contains invalid sequences
*/
if (js_parse_string(s, '`', FALSE, p, &cooked, &p)) {
cooked.u.str.str = JS_UNDEFINED;
}
if (JS_DefinePropertyValueUint32(ctx, template_object, depth,
cooked.u.str.str,
JS_PROP_ENUMERABLE | JS_PROP_THROW) < 0) {
return -1;
}
} else {
JSString *str;
/* re-parse the string with escape sequences and throw a
syntax error if it contains invalid sequences
*/
JS_FreeValue(ctx, s->token.u.str.str);
s->token.u.str.str = JS_UNDEFINED;
if (js_parse_string(s, '`', TRUE, p, &cooked, &p))
return -1;
str = JS_VALUE_GET_STRING(cooked.u.str.str);
if (str->len != 0 || depth == 0) {
ret = emit_push_const(s, cooked.u.str.str, 1);
JS_FreeValue(s->ctx, cooked.u.str.str);
if (ret)
return -1;
if (depth == 0) {
if (s->token.u.str.sep == '`')
goto done1;
emit_op(s, OP_get_field2);
emit_atom(s, JS_ATOM_concat);
emit_ic(s, JS_ATOM_concat);
}
depth++;
} else {
JS_FreeValue(s->ctx, cooked.u.str.str);
}
}
if (s->token.u.str.sep == '`')
goto done;
if (next_token(s))
return -1;
if (js_parse_expr(s))
return -1;
depth++;
if (s->token.val != '}') {
return js_parse_error(s, "expected '}' after template expression");
}
/* XXX: should convert to string at this stage? */
free_token(s, &s->token);
/* Resume TOK_TEMPLATE parsing (s->token.line_num and
* s->token.ptr are OK) */
s->got_lf = FALSE;
s->last_line_num = s->token.line_num;
s->last_col_num = s->token.col_num;
if (js_parse_template_part(s, s->buf_ptr))
return -1;
}
return js_parse_expect(s, TOK_TEMPLATE);
done:
if (call) {
/* Seal the objects */
seal_template_obj(ctx, raw_array);
seal_template_obj(ctx, template_object);
*argc = depth + 1;
} else {
emit_op(s, OP_call_method);
emit_u16(s, depth - 1);
}
done1:
return next_token(s);
}
|
O1
|
c
|
js_parse_template:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rdi, %rbp
movq (%rdi), %r15
movl %esi, 0x2c(%rsp)
testl %esi, %esi
jne 0x68a5a
movl $0x3, %ebx
xorl %r12d, %r12d
xorl %esi, %esi
movl $0x3, %eax
movq %rax, 0x50(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0xa8(%rsp)
leaq 0x20(%rbp), %r13
leaq 0x90(%rbp), %rax
movq %rax, 0xa0(%rsp)
movl $0x0, 0x14(%rsp)
movq %rsi, 0x18(%rsp)
movq %r12, 0x48(%rsp)
movq %rbx, 0xb0(%rsp)
cmpl $-0x7e, (%r13)
jne 0x689da
movq 0x30(%rbp), %r14
incq %r14
movq %r14, 0x58(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movq 0x30(%r13), %rax
movq %rax, 0x90(%rsp)
cmpl $0x0, 0x2c(%rsp)
je 0x687b3
movq 0x38(%rbp), %rcx
movq %rbp, %rbx
movq 0x40(%rbp), %rax
movq %rcx, 0x30(%rsp)
cmpl $-0x9, %eax
movq 0x20(%rsp), %rdi
jb 0x686c0
movq 0x30(%rsp), %rdx
incl (%rdx)
movq %rcx, 0x30(%rsp)
movl 0x14(%rsp), %edx
movl %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
testl %edx, %edx
movq %xmm0, %r12
cmovnsq %rcx, %r12
movq %rax, 0x38(%rsp)
movl $0x7, %ebp
movl $0x0, %eax
cmovnsq %rax, %rbp
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x50(%rsp), %rdx
movq %r12, %rcx
movq %rbp, %r8
movl $0x4004, %r9d # imm = 0x4004
callq 0x26b2d
movl $0x1, %r15d
testl %eax, %eax
js 0x68808
movq %rbx, %rdi
movl $0x60, %esi
xorl %edx, %edx
movq %r14, %rcx
leaq 0x60(%rsp), %r8
leaq 0x58(%rsp), %r9
callq 0x5f245
testl %eax, %eax
je 0x68752
movl $0x0, 0x78(%rsp)
movq $0x3, 0x80(%rsp)
movl 0x78(%rsp), %eax
movl %eax, 0x30(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0x34(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x38(%rsp)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq %r12, %rcx
movq %rsi, %r12
movq %rbp, %r8
movl $0x4004, %r9d # imm = 0x4004
callq 0x26b2d
testl %eax, %eax
movq %rbx, %rbp
movq 0x18(%rsp), %rsi
jns 0x688aa
jmp 0x6895c
movq 0x38(%rbp), %rsi
movq 0x40(%rbp), %rdx
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1d8c6
movl $0x0, 0x38(%rbp)
movq $0x3, 0x40(%rbp)
movl $0x1, %r15d
movq %rbp, %rdi
movl $0x60, %esi
movl $0x1, %edx
movq %r14, %rcx
leaq 0x60(%rsp), %r8
leaq 0x58(%rsp), %r9
callq 0x5f245
testl %eax, %eax
je 0x68815
xorl %eax, %eax
jmp 0x6889d
movq 0x48(%rsp), %r12
movq %rbx, %rbp
jmp 0x68957
movq 0x78(%rsp), %rax
testl $0x7fffffff, 0x4(%rax) # imm = 0x7FFFFFFF
jne 0x6884b
cmpl $0x0, 0x14(%rsp)
je 0x6884b
movq (%rbp), %rax
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x18(%rax), %rdi
callq 0x1d8c6
xorl %r15d, %r15d
movb $0x1, %al
jmp 0x6889d
movq 0x78(%rsp), %r14
movq 0x80(%rsp), %r12
movl $0x1, %r15d
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x684fe
movq %rbp, %rcx
movl %eax, %ebp
movq %rcx, %rbx
movq (%rcx), %rax
movq 0x18(%rax), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1d8c6
testl %ebp, %ebp
je 0x6891d
xorl %eax, %eax
movq 0x48(%rsp), %r12
movq %rbx, %rbp
movq 0x18(%rsp), %rsi
testb %al, %al
je 0x6895c
movl $0x5, %r15d
cmpl $0x60, 0x48(%rbp)
je 0x6895c
movq %rbp, %rdi
callq 0x5d1cf
movl $0x1, %r15d
testl %eax, %eax
jne 0x68957
movq %rbp, %rdi
movl $0x1, %esi
callq 0x6a9b7
testl %eax, %eax
jne 0x68957
incl 0x14(%rsp)
cmpl $0x7d, (%r13)
jne 0x68946
movq %rbp, %rdi
movq %r13, %rsi
callq 0x344fa
movl $0x0, 0x58(%rbp)
movq 0x24(%rbp), %rax
movq 0x70(%rbp), %rsi
movq %rax, 0x8(%rbp)
movq %rbp, %rdi
callq 0x5f0a7
xorl %r15d, %r15d
testl %eax, %eax
setne %r15b
jmp 0x68957
movl 0x14(%rsp), %r14d
testl %r14d, %r14d
movq 0x48(%rsp), %r12
movq %rbx, %rbp
movq 0x18(%rsp), %rsi
je 0x68967
incl %r14d
movl %r14d, 0x14(%rsp)
xorl %r15d, %r15d
movb $0x1, %al
jmp 0x688a2
movq %rbp, %rdi
leaq 0x38556(%rip), %rsi # 0xa0ea6
xorl %eax, %eax
callq 0x2fce9
movq 0x18(%rsp), %rsi
testl %r15d, %r15d
je 0x68650
jmp 0x68999
cmpl $0x60, 0x48(%rbp)
jne 0x68982
xorl %eax, %eax
movl $0x4, %r15d
movl $0x0, 0x14(%rsp)
jmp 0x688a2
movq 0xa0(%rsp), %rdi
movq %rbp, %rsi
callq 0x1381f
movq 0x18(%rsp), %rsi
jmp 0x68934
cmpl $0x4, %r15d
je 0x68a3a
cmpl $0x5, %r15d
jne 0x689e9
cmpl $0x0, 0x2c(%rsp)
je 0x689f1
movq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x6a54c
movq %r14, %rdi
movq %r12, %rsi
callq 0x6a54c
movl 0x14(%rsp), %ecx
incl %ecx
movq 0xa8(%rsp), %rax
movl %ecx, (%rax)
jmp 0x68a3a
movq %rbp, %rdi
movl $0xffffff82, %esi # imm = 0xFFFFFF82
callq 0x637c4
jmp 0x68a42
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
jmp 0x68a45
movq 0x90(%rbp), %rax
movl $0x138, %r14d # imm = 0x138
leaq (%rax,%r14), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0x24, %esi
callq 0x1b4d0
movl 0x14(%rsp), %eax
decl %eax
addq 0x90(%rbp), %r14
leaq 0x30(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movq %r14, %rdi
callq 0x1b422
movq %rbp, %rdi
callq 0x5d1cf
movl %eax, %r13d
movl %r13d, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x38(%r15), %rsi
incl (%rsi)
movq %r15, %rdi
movl $0x2, %edx
callq 0xf516
movq %rdx, %rbx
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
cmpl $0x6, %ebx
je 0x68a45
movq %rax, %r12
movq %rbp, %rdi
movq %rax, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x684fe
movq %rbp, 0x20(%rsp)
movl %eax, %ebp
movq 0x18(%r15), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1d8c6
testl %ebp, %ebp
jne 0x68a45
movq 0x38(%r15), %rsi
incl (%rsi)
movq %r15, %rdi
movl $0x2, %edx
callq 0xf516
cmpl $0x6, %edx
je 0x68a45
movl $0x4000, (%rsp) # imm = 0x4000
movq %r15, %rdi
movq %rdx, %r9
movq %r12, %rsi
movq %rbx, %rdx
movl $0x71, %ecx
movq %rax, %rbp
movq %rax, %r8
movq %r9, 0x50(%rsp)
callq 0x26abb
movq %rbp, %rsi
testl %eax, %eax
movq 0x20(%rsp), %rbp
jns 0x68616
jmp 0x68a45
|
js_parse_template:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rdx
mov rbp, rdi
mov r15, [rdi]
mov [rsp+0E8h+var_BC], esi
test esi, esi
jnz loc_68A5A
mov ebx, 3
xor r12d, r12d
xor esi, esi
mov eax, 3
mov [rsp+0E8h+var_98], rax
loc_68616:
mov [rsp+0E8h+var_C8], r15
mov [rsp+0E8h+var_40], r14
lea r13, [rbp+20h]
lea rax, [rbp+90h]
mov [rsp+0E8h+var_48], rax
mov [rsp+0E8h+var_D4], 0
mov [rsp+0E8h+var_D0], rsi
mov [rsp+0E8h+var_A0], r12
mov [rsp+0E8h+var_38], rbx
loc_68650:
cmp dword ptr [r13+0], 0FFFFFF82h
jnz loc_689DA
mov r14, [rbp+30h]
inc r14
mov [rsp+0E8h+var_90], r14
movups xmm0, xmmword ptr [r13+0]
movups xmm1, xmmword ptr [r13+10h]
movups xmm2, xmmword ptr [r13+20h]
movaps [rsp+0E8h+var_88], xmm0
movaps [rsp+0E8h+var_78], xmm1
movaps [rsp+0E8h+var_68], xmm2
mov rax, [r13+30h]
mov [rsp+0E8h+var_58], rax
cmp [rsp+0E8h+var_BC], 0
jz loc_687B3
mov rcx, [rbp+38h]
mov rbx, rbp
mov rax, [rbp+40h]
mov qword ptr [rsp+0E8h+var_B8], rcx
cmp eax, 0FFFFFFF7h
mov rdi, [rsp+0E8h+var_C8]
jb short loc_686C0
mov rdx, qword ptr [rsp+0E8h+var_B8]
inc dword ptr [rdx]
loc_686C0:
mov qword ptr [rsp+0E8h+var_B8], rcx
mov edx, [rsp+0E8h+var_D4]
mov ecx, edx
xorps xmm0, xmm0
cvtsi2sd xmm0, rcx
test edx, edx
movq r12, xmm0
cmovns r12, rcx
mov qword ptr [rsp+0E8h+var_B8+8], rax
mov ebp, 7
mov eax, 0
cmovns rbp, rax
movups xmm0, [rsp+0E8h+var_B8]
movups [rsp+0E8h+var_E8], xmm0
mov rdx, [rsp+0E8h+var_98]
mov rcx, r12
mov r8, rbp
mov r9d, 4004h
call JS_DefinePropertyValueValue
mov r15d, 1
test eax, eax
js loc_68808
mov rdi, rbx
mov esi, 60h ; '`'
xor edx, edx
mov rcx, r14
lea r8, [rsp+0E8h+var_88]
lea r9, [rsp+0E8h+var_90]
call js_parse_string
test eax, eax
jz short loc_68752
mov dword ptr [rsp+0E8h+var_78+8], 0
mov qword ptr [rsp+0E8h+var_68], 3
loc_68752:
mov eax, dword ptr [rsp+0E8h+var_78+8]
mov dword ptr [rsp+0E8h+var_B8], eax
mov eax, dword ptr [rsp+0E8h+var_78+0Ch]
mov dword ptr [rsp+0E8h+var_B8+4], eax
mov rax, qword ptr [rsp+0E8h+var_68]
mov qword ptr [rsp+0E8h+var_B8+8], rax
movaps xmm0, [rsp+0E8h+var_B8]
movups [rsp+0E8h+var_E8], xmm0
mov rdi, [rsp+0E8h+var_C8]
mov rsi, [rsp+0E8h+var_A0]
mov rdx, [rsp+0E8h+var_38]
mov rcx, r12
mov r12, rsi
mov r8, rbp
mov r9d, 4004h
call JS_DefinePropertyValueValue
test eax, eax
mov rbp, rbx
mov rsi, [rsp+0E8h+var_D0]
jns loc_688AA
jmp loc_6895C
loc_687B3:
mov rsi, [rbp+38h]
mov rdx, [rbp+40h]
mov rax, [rsp+0E8h+var_C8]
mov rdi, [rax+18h]
call JS_FreeValueRT
mov dword ptr [rbp+38h], 0
mov qword ptr [rbp+40h], 3
mov r15d, 1
mov rdi, rbp
mov esi, 60h ; '`'
mov edx, 1
mov rcx, r14
lea r8, [rsp+0E8h+var_88]
lea r9, [rsp+0E8h+var_90]
call js_parse_string
test eax, eax
jz short loc_68815
xor eax, eax
jmp loc_6889D
loc_68808:
mov r12, [rsp+0E8h+var_A0]
mov rbp, rbx
jmp loc_68957
loc_68815:
mov rax, qword ptr [rsp+0E8h+var_78+8]
test dword ptr [rax+4], 7FFFFFFFh
jnz short loc_6884B
cmp [rsp+0E8h+var_D4], 0
jz short loc_6884B
mov rax, [rbp+0]
mov rsi, qword ptr [rsp+0E8h+var_78+8]
mov rdx, qword ptr [rsp+0E8h+var_68]
mov rdi, [rax+18h]
call JS_FreeValueRT
xor r15d, r15d
mov al, 1
jmp short loc_6889D
loc_6884B:
mov r14, qword ptr [rsp+0E8h+var_78+8]
mov r12, qword ptr [rsp+0E8h+var_68]
mov r15d, 1
mov rdi, rbp
mov rsi, r14
mov rdx, r12
mov ecx, 1
call emit_push_const
mov rcx, rbp
mov ebp, eax
mov rbx, rcx
mov rax, [rcx]
mov rdi, [rax+18h]
mov rsi, r14
mov rdx, r12
call JS_FreeValueRT
test ebp, ebp
jz loc_6891D
xor eax, eax
mov r12, [rsp+0E8h+var_A0]
mov rbp, rbx
loc_6889D:
mov rsi, [rsp+0E8h+var_D0]
loc_688A2:
test al, al
jz loc_6895C
loc_688AA:
mov r15d, 5
cmp dword ptr [rbp+48h], 60h ; '`'
jz loc_6895C
mov rdi, rbp
call next_token
mov r15d, 1
test eax, eax
jnz loc_68957
mov rdi, rbp
mov esi, 1
call js_parse_expr2
test eax, eax
jnz short loc_68957
inc [rsp+0E8h+var_D4]
cmp dword ptr [r13+0], 7Dh ; '}'
jnz short loc_68946
mov rdi, rbp
mov rsi, r13
call free_token
mov dword ptr [rbp+58h], 0
mov rax, [rbp+24h]
mov rsi, [rbp+70h]
mov [rbp+8], rax
mov rdi, rbp
call js_parse_template_part
xor r15d, r15d
test eax, eax
setnz r15b
jmp short loc_68957
loc_6891D:
mov r14d, [rsp+0E8h+var_D4]
test r14d, r14d
mov r12, [rsp+0E8h+var_A0]
mov rbp, rbx
mov rsi, [rsp+0E8h+var_D0]
jz short loc_68967
loc_68934:
inc r14d
mov [rsp+0E8h+var_D4], r14d
xor r15d, r15d
mov al, 1
jmp loc_688A2
loc_68946:
mov rdi, rbp
lea rsi, aExpectedAfterT; "expected '}' after template expression"
xor eax, eax
call js_parse_error
loc_68957:
mov rsi, [rsp+0E8h+var_D0]
loc_6895C:
test r15d, r15d
jz loc_68650
jmp short loc_68999
loc_68967:
cmp dword ptr [rbp+48h], 60h ; '`'
jnz short loc_68982
xor eax, eax
mov r15d, 4
mov [rsp+0E8h+var_D4], 0
jmp loc_688A2
loc_68982:
mov rdi, [rsp+0E8h+var_48]
mov rsi, rbp
call js_parse_template_cold_1
mov rsi, [rsp+0E8h+var_D0]
jmp short loc_68934
loc_68999:
cmp r15d, 4
jz loc_68A3A
cmp r15d, 5
jnz short loc_689E9
cmp [rsp+0E8h+var_BC], 0
jz short loc_689F1
mov r14, [rsp+0E8h+var_C8]
mov rdi, r14
call seal_template_obj
mov rdi, r14
mov rsi, r12
call seal_template_obj
mov ecx, [rsp+0E8h+var_D4]
inc ecx
mov rax, [rsp+0E8h+var_40]
mov [rax], ecx
jmp short loc_68A3A
loc_689DA:
mov rdi, rbp
mov esi, 0FFFFFF82h
call js_parse_expect
jmp short loc_68A42
loc_689E9:
mov r13d, 0FFFFFFFFh
jmp short loc_68A45
loc_689F1:
mov rax, [rbp+90h]
mov r14d, 138h
lea rdi, [rax+r14]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 24h ; '$'
call dbuf_putc
mov eax, [rsp+0E8h+var_D4]
dec eax
add r14, [rbp+90h]
lea rsi, [rsp+0E8h+var_B8]
mov [rsi], ax
mov edx, 2
mov rdi, r14
call dbuf_put
loc_68A3A:
mov rdi, rbp
call next_token
loc_68A42:
mov r13d, eax
loc_68A45:
mov eax, r13d
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_68A5A:
mov rsi, [r15+38h]
inc dword ptr [rsi]
mov rdi, r15
mov edx, 2
call JS_NewObjectFromShape
mov rbx, rdx
mov r13d, 0FFFFFFFFh
cmp ebx, 6
jz short loc_68A45
mov r12, rax
mov rdi, rbp
mov rsi, rax
mov rdx, rbx
xor ecx, ecx
call emit_push_const
mov [rsp+0E8h+var_C8], rbp
mov ebp, eax
mov rdi, [r15+18h]
mov rsi, r12
mov rdx, rbx
call JS_FreeValueRT
test ebp, ebp
jnz short loc_68A45
mov rsi, [r15+38h]
inc dword ptr [rsi]
mov rdi, r15
mov edx, 2
call JS_NewObjectFromShape
cmp edx, 6
jz short loc_68A45
mov dword ptr [rsp+0E8h+var_E8], 4000h
mov rdi, r15
mov r9, rdx
mov rsi, r12
mov rdx, rbx
mov ecx, 71h ; 'q'
mov rbp, rax
mov r8, rax
mov [rsp+0E8h+var_98], r9
call JS_DefinePropertyValue
mov rsi, rbp
test eax, eax
mov rbp, [rsp+0E8h+var_C8]
jns loc_68616
jmp loc_68A45
|
long long js_parse_template(
long long *a1,
int 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; // rbp
long long v16; // r15
long long v17; // rbx
unsigned __int128 *v18; // r12
unsigned __int128 *v19; // rsi
__m128 *v20; // r13
char *v21; // r14
long long v22; // rcx
long long v23; // rbx
long long v24; // rax
double v25; // r12
long long v26; // rbp
int v27; // r15d
double v28; // xmm4_8
double v29; // xmm5_8
double v30; // rcx
int v31; // eax
double v32; // xmm4_8
double v33; // xmm5_8
char v34; // al
_DWORD *v35; // r14
long long v36; // r12
int v37; // eax
long long v38; // rcx
int v39; // ebp
long long v40; // rbx
char *v41; // rsi
double v42; // xmm4_8
double v43; // xmm5_8
unsigned int v45; // r13d
long long v46; // rax
_QWORD *v47; // r14
_DWORD *v49; // rsi
unsigned __int128 *v50; // rax
long long v51; // rdx
int v52; // ebp
_DWORD *v53; // rsi
unsigned __int128 *v54; // rax
long long v55; // rdx
__m128 v56; // xmm4
__m128 v57; // xmm5
char v58; // [rsp+0h] [rbp-E8h]
int v59; // [rsp+14h] [rbp-D4h]
unsigned __int128 *v60; // [rsp+18h] [rbp-D0h]
long long v61; // [rsp+20h] [rbp-C8h]
unsigned __int128 v63; // [rsp+30h] [rbp-B8h] BYREF
unsigned __int128 *v64; // [rsp+48h] [rbp-A0h]
long long v65; // [rsp+50h] [rbp-98h]
char *v66; // [rsp+58h] [rbp-90h] BYREF
__m128 v67; // [rsp+60h] [rbp-88h] BYREF
__m128 v68; // [rsp+70h] [rbp-78h]
__m128 v69; // [rsp+80h] [rbp-68h]
unsigned long long v70; // [rsp+90h] [rbp-58h]
long long *v71; // [rsp+A0h] [rbp-48h]
_DWORD *v72; // [rsp+A8h] [rbp-40h]
long long v73; // [rsp+B0h] [rbp-38h]
v15 = (long long)a1;
v16 = *a1;
if ( a2 )
{
v49 = *(_DWORD **)(v16 + 56);
++*v49;
v50 = (unsigned __int128 *)JS_NewObjectFromShape(v16, v49, 2u);
v17 = v51;
v45 = -1;
if ( (_DWORD)v51 == 6 )
return v45;
v18 = v50;
v52 = emit_push_const(a1, v50, v51, 0);
JS_FreeValueRT(*(_QWORD *)(v16 + 24), v18, v17);
if ( v52 )
return v45;
v53 = *(_DWORD **)(v16 + 56);
++*v53;
v54 = (unsigned __int128 *)JS_NewObjectFromShape(v16, v53, 2u);
if ( (_DWORD)v55 == 6 )
return v45;
v65 = v55;
v19 = v54;
v15 = (long long)a1;
if ( (int)JS_DefinePropertyValue(
v16,
(unsigned long long)v18,
v17,
113LL,
v54,
v55,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v56,
v57,
a13,
a14,
0x4000) < 0 )
return v45;
}
else
{
v17 = 3LL;
v18 = 0LL;
v19 = 0LL;
v65 = 3LL;
}
v61 = v16;
v72 = (_DWORD *)a3;
v20 = (__m128 *)(v15 + 32);
v71 = (long long *)(v15 + 144);
v59 = 0;
v60 = v19;
v64 = v18;
v73 = v17;
do
{
if ( v20->m128_i32[0] != -126 )
return (unsigned int)js_parse_expect(
(long long *)v15,
4294967170LL,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14);
v21 = (char *)(*(_QWORD *)(v15 + 48) + 1LL);
v66 = v21;
a7 = *v20;
a8 = v20[1];
a9 = v20[2];
v67 = *v20;
v68 = a8;
v69 = a9;
v70 = v20[3].m128_u64[0];
if ( !a2 )
{
JS_FreeValueRT(*(_QWORD *)(v61 + 24), *(_DWORD **)(v15 + 56), *(_QWORD *)(v15 + 64));
*(_DWORD *)(v15 + 56) = 0;
*(_QWORD *)(v15 + 64) = 3LL;
v27 = 1;
if ( (unsigned int)js_parse_string(
v15,
96,
1,
v21,
(long long)&v67,
&v66,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v32,
v33,
a13,
a14) )
{
v34 = 0;
}
else if ( (*(_DWORD *)(v68.m128_u64[1] + 4) & 0x7FFFFFFF) != 0 || !v59 )
{
v35 = (_DWORD *)v68.m128_u64[1];
v36 = v69.m128_u64[0];
v27 = 1;
v37 = emit_push_const((long long *)v15, (_DWORD *)v68.m128_u64[1], v69.m128_i64[0], 1);
v38 = v15;
v39 = v37;
v40 = v38;
JS_FreeValueRT(*(_QWORD *)(*(_QWORD *)v38 + 24LL), v35, v36);
if ( !v39 )
{
v18 = v64;
v15 = v40;
v19 = v60;
if ( !v59 )
{
if ( *(_DWORD *)(v40 + 72) == 96 )
{
v34 = 0;
v27 = 4;
v59 = 0;
goto LABEL_26;
}
js_parse_template_cold_1(v71, (long long *)v40);
v19 = v60;
}
++v59;
v27 = 0;
v34 = 1;
LABEL_26:
if ( !v34 )
continue;
LABEL_27:
v27 = 5;
if ( *(_DWORD *)(v15 + 72) == 96 )
continue;
v27 = 1;
if ( !(unsigned int)next_token(v15, a7, a8, a9, a10, a11, a12, a13, a14, (long long)v19, a3, a4, a5, a6)
&& !(unsigned int)js_parse_expr2(v15, 1LL) )
{
++v59;
if ( v20->m128_i32[0] == 125 )
{
free_token((long long *)v15, (int *)v20);
*(_DWORD *)(v15 + 88) = 0;
v41 = *(char **)(v15 + 112);
*(_QWORD *)(v15 + 8) = *(_QWORD *)(v15 + 36);
v27 = js_parse_template_part(v15, v41, *(double *)a7.m128_u64, a8, a9, a10, v42, v43, a13, a14) != 0;
}
else
{
js_parse_error(
(long long *)v15,
(long long)"expected '}' after template expression",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v58);
}
}
LABEL_35:
v19 = v60;
continue;
}
v34 = 0;
v18 = v64;
v15 = v40;
}
else
{
JS_FreeValueRT(*(_QWORD *)(*(_QWORD *)v15 + 24LL), (_DWORD *)v68.m128_u64[1], v69.m128_i64[0]);
v27 = 0;
v34 = 1;
}
v19 = v60;
goto LABEL_26;
}
v22 = *(_QWORD *)(v15 + 56);
v23 = v15;
v24 = *(_QWORD *)(v15 + 64);
*(_QWORD *)&v63 = v22;
if ( (unsigned int)v24 >= 0xFFFFFFF7 )
++*(_DWORD *)v63;
*(_QWORD *)&v63 = v22;
v25 = (double)v59;
if ( v59 >= 0 )
*(_QWORD *)&v25 = (unsigned int)v59;
*((_QWORD *)&v63 + 1) = v24;
v26 = 7LL;
if ( v59 >= 0 )
v26 = 0LL;
a7 = (__m128)v63;
v27 = 1;
if ( (int)JS_DefinePropertyValueValue(
v61,
(unsigned long long)v19,
v65,
*(_DWORD **)&v25,
v26,
16388,
*(double *)&v63,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14,
(_DWORD *)v63,
*((long long *)&v63 + 1)) < 0 )
{
v18 = v64;
v15 = v23;
goto LABEL_35;
}
if ( (unsigned int)js_parse_string(
v23,
96,
0,
v21,
(long long)&v67,
&v66,
*(double *)&v63,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) )
{
v68.m128_i32[2] = 0;
v69.m128_u64[0] = 3LL;
}
v63 = __PAIR128__(v69.m128_u64[0], v68.m128_u64[1]);
a7 = (__m128)__PAIR128__(v69.m128_u64[0], v68.m128_u64[1]);
v30 = v25;
v18 = v64;
v31 = JS_DefinePropertyValueValue(
v61,
(unsigned long long)v64,
v73,
*(_DWORD **)&v30,
v26,
16388,
*(double *)&v68.m128_u64[1],
a8,
a9,
a10,
v28,
v29,
a13,
a14,
(_DWORD *)v68.m128_u64[1],
v69.m128_i64[0]);
v15 = v23;
v19 = v60;
if ( v31 >= 0 )
goto LABEL_27;
}
while ( !v27 );
if ( v27 != 4 )
{
if ( v27 != 5 )
return (unsigned int)-1;
if ( a2 )
{
seal_template_obj(v61, v19);
v19 = v18;
seal_template_obj(v61, v18);
a4 = (unsigned int)(v59 + 1);
*v72 = a4;
}
else
{
v46 = *(_QWORD *)(v15 + 144);
*(_DWORD *)(v46 + 360) = *(_DWORD *)(v46 + 320);
dbuf_putc((_QWORD *)(v46 + 312), 36);
v47 = (_QWORD *)(*(_QWORD *)(v15 + 144) + 312LL);
v19 = &v63;
LOWORD(v63) = v59 - 1;
dbuf_put(v47, (long long)&v63, 2LL);
}
}
return (unsigned int)next_token(v15, a7, a8, a9, a10, a11, a12, a13, a14, (long long)v19, a3, a4, a5, a6);
}
| |||
57,318
|
js_parse_template
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int js_parse_template(JSParseState *s, int call, int *argc)
{
JSContext *ctx = s->ctx;
JSValue raw_array, template_object;
JSToken cooked;
int depth, ret;
raw_array = JS_UNDEFINED; /* avoid warning */
template_object = JS_UNDEFINED; /* avoid warning */
if (call) {
/* Create a template object: an array of cooked strings */
/* Create an array of raw strings and store it to the raw property */
template_object = JS_NewArray(ctx);
if (JS_IsException(template_object))
return -1;
// pool_idx = s->cur_func->cpool_count;
ret = emit_push_const(s, template_object, 0);
JS_FreeValue(ctx, template_object);
if (ret)
return -1;
raw_array = JS_NewArray(ctx);
if (JS_IsException(raw_array))
return -1;
if (JS_DefinePropertyValue(ctx, template_object, JS_ATOM_raw,
raw_array, JS_PROP_THROW) < 0) {
return -1;
}
}
depth = 0;
while (s->token.val == TOK_TEMPLATE) {
const uint8_t *p = s->token.ptr + 1;
cooked = s->token;
if (call) {
if (JS_DefinePropertyValueUint32(ctx, raw_array, depth,
js_dup(s->token.u.str.str),
JS_PROP_ENUMERABLE | JS_PROP_THROW) < 0) {
return -1;
}
/* re-parse the string with escape sequences but do not throw a
syntax error if it contains invalid sequences
*/
if (js_parse_string(s, '`', FALSE, p, &cooked, &p)) {
cooked.u.str.str = JS_UNDEFINED;
}
if (JS_DefinePropertyValueUint32(ctx, template_object, depth,
cooked.u.str.str,
JS_PROP_ENUMERABLE | JS_PROP_THROW) < 0) {
return -1;
}
} else {
JSString *str;
/* re-parse the string with escape sequences and throw a
syntax error if it contains invalid sequences
*/
JS_FreeValue(ctx, s->token.u.str.str);
s->token.u.str.str = JS_UNDEFINED;
if (js_parse_string(s, '`', TRUE, p, &cooked, &p))
return -1;
str = JS_VALUE_GET_STRING(cooked.u.str.str);
if (str->len != 0 || depth == 0) {
ret = emit_push_const(s, cooked.u.str.str, 1);
JS_FreeValue(s->ctx, cooked.u.str.str);
if (ret)
return -1;
if (depth == 0) {
if (s->token.u.str.sep == '`')
goto done1;
emit_op(s, OP_get_field2);
emit_atom(s, JS_ATOM_concat);
emit_ic(s, JS_ATOM_concat);
}
depth++;
} else {
JS_FreeValue(s->ctx, cooked.u.str.str);
}
}
if (s->token.u.str.sep == '`')
goto done;
if (next_token(s))
return -1;
if (js_parse_expr(s))
return -1;
depth++;
if (s->token.val != '}') {
return js_parse_error(s, "expected '}' after template expression");
}
/* XXX: should convert to string at this stage? */
free_token(s, &s->token);
/* Resume TOK_TEMPLATE parsing (s->token.line_num and
* s->token.ptr are OK) */
s->got_lf = FALSE;
s->last_line_num = s->token.line_num;
s->last_col_num = s->token.col_num;
if (js_parse_template_part(s, s->buf_ptr))
return -1;
}
return js_parse_expect(s, TOK_TEMPLATE);
done:
if (call) {
/* Seal the objects */
seal_template_obj(ctx, raw_array);
seal_template_obj(ctx, template_object);
*argc = depth + 1;
} else {
emit_op(s, OP_call_method);
emit_u16(s, depth - 1);
}
done1:
return next_token(s);
}
|
O2
|
c
|
js_parse_template:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbp
movq %rdi, %rbx
movq (%rdi), %rax
movq %rax, 0x10(%rsp)
pushq $0x3
popq %rax
xorl %r14d, %r14d
movl %esi, 0x1c(%rsp)
testl %esi, %esi
je 0x589b3
movq 0x10(%rsp), %rdi
callq 0x1b2bb
movq %rdx, %r15
cmpl $0x6, %r15d
je 0x58c1d
movq %rax, %r13
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x58874
movl %eax, %r12d
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1801e
testl %r12d, %r12d
jne 0x58c1d
movq 0x10(%rsp), %rdi
callq 0x1b2bb
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
cmpl $0x6, %edx
je 0x58c1d
movl $0x4000, (%rsp) # imm = 0x4000
pushq $0x71
popq %rcx
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
callq 0x20872
testl %eax, %eax
jns 0x589c7
jmp 0x58c1d
xorl %r13d, %r13d
movq %rax, %r15
movq $0x0, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq %r15, 0x30(%rsp)
movq %r13, 0x38(%rsp)
movq %rbp, 0x40(%rsp)
leaq 0x20(%rbx), %r13
movl 0x1c(%rsp), %r12d
cmpl $-0x7e, (%r13)
jne 0x58bf0
movq 0x30(%rbx), %r15
incq %r15
movq 0x30(%r13), %rax
movq %rax, 0x80(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movaps %xmm2, 0x70(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movq 0x38(%rbx), %r8
movq 0x40(%rbx), %r9
testl %r12d, %r12d
je 0x58a89
cmpl $-0x9, %r9d
jb 0x58a31
incl (%r8)
movl $0x4004, (%rsp) # imm = 0x4004
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movl %r14d, %ecx
callq 0x20972
testl %eax, %eax
js 0x58c1d
movq %rbx, %rdi
pushq $0x60
popq %rsi
xorl %edx, %edx
movq %r15, %rcx
leaq 0x50(%rsp), %r8
leaq 0x48(%rsp), %r9
callq 0x514ec
testl %eax, %eax
je 0x58af1
andl $0x0, 0x68(%rsp)
movq $0x3, 0x70(%rsp)
pushq $0x3
popq %r9
jmp 0x58af6
movq 0x10(%rsp), %rdi
movq %r8, %rsi
movq %r9, %rdx
callq 0x1801e
andl $0x0, 0x38(%rbx)
movq $0x3, 0x40(%rbx)
movq %rbx, %rdi
pushq $0x60
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
leaq 0x50(%rsp), %r8
leaq 0x48(%rsp), %r9
callq 0x514ec
testl %eax, %eax
jne 0x58c1d
movq 0x68(%rsp), %r15
testl $0x7fffffff, 0x4(%r15) # imm = 0x7FFFFFFF
jne 0x58b2c
testl %r14d, %r14d
je 0x58b2c
movq (%rbx), %rdi
movq 0x70(%rsp), %rdx
movq %r15, %rsi
callq 0x1801e
jmp 0x58b98
movq 0x70(%rsp), %r9
movq 0x30(%rsp), %rdx
movq 0x68(%rsp), %r8
movl $0x4004, (%rsp) # imm = 0x4004
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl %r14d, %ecx
callq 0x20972
testl %eax, %eax
js 0x58c1d
cmpl $0x60, 0x48(%rbx)
jne 0x58ba2
jmp 0x58c32
movq 0x70(%rsp), %rbp
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
pushq $0x1
popq %rcx
callq 0x58874
movl %eax, %r12d
movq (%rbx), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1801e
testl %r12d, %r12d
movl 0x1c(%rsp), %r12d
jne 0x58c1d
testl %r14d, %r14d
jne 0x58b95
cmpl $0x60, 0x48(%rbx)
je 0x58c78
movq %rbx, %rdi
pushq $0x42
popq %rsi
callq 0x4fa1b
movq %rbx, %rdi
pushq $0x5d
popq %r15
movl %r15d, %esi
callq 0x563de
movq %rbx, %rdi
movl %r15d, %esi
callq 0x56ec6
incl %r14d
cmpl $0x60, 0x48(%rbx)
je 0x58c5e
movq %rbx, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x58c1d
movq %rbx, %rdi
callq 0x59f66
testl %eax, %eax
jne 0x58c1d
cmpl $0x7d, (%r13)
jne 0x58c0c
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2da5b
andl $0x0, 0x58(%rbx)
movq 0x24(%rbx), %rax
movq 0x70(%rbx), %rsi
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
callq 0x5138c
testl %eax, %eax
jne 0x58c1d
incl %r14d
jmp 0x589df
pushq $-0x7e
popq %rsi
movq %rbx, %rdi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5523b
leaq 0x2f1cd(%rip), %rsi # 0x87de0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x28457
pushq $-0x1
popq %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq 0x20(%rsp), %rsi
callq 0x59f6e
movq %r15, %rdi
movq 0x38(%rsp), %rsi
callq 0x59f6e
incl %r14d
movq 0x40(%rsp), %rax
movl %r14d, (%rax)
jmp 0x58c78
pushq $0x24
popq %rsi
movq %rbx, %rdi
callq 0x4fa1b
decl %r14d
movzwl %r14w, %esi
movq %rbx, %rdi
callq 0x4fa3a
movq %rbx, %rdi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4fa4e
|
js_parse_template:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rbp, rdx
mov rbx, rdi
mov rax, [rdi]
mov [rsp+0B8h+var_A8], rax
push 3
pop rax
xor r14d, r14d
mov [rsp+0B8h+var_9C], esi
test esi, esi
jz loc_589B3
mov rdi, [rsp+0B8h+var_A8]
call JS_NewArray
mov r15, rdx
cmp r15d, 6
jz loc_58C1D
mov r13, rax
mov rdi, rbx
mov rsi, rax
mov rdx, r15
xor ecx, ecx
call emit_push_const
mov r12d, eax
mov rdi, [rsp+0B8h+var_A8]
mov rsi, r13
mov rdx, r15
call JS_FreeValue
test r12d, r12d
jnz loc_58C1D
mov rdi, [rsp+0B8h+var_A8]
call JS_NewArray
mov [rsp+0B8h+var_98], rax
mov [rsp+0B8h+var_90], rdx
cmp edx, 6
jz loc_58C1D
mov [rsp+0B8h+var_B8], 4000h
push 71h ; 'q'
pop rcx
mov rdi, [rsp+0B8h+var_A8]
mov rsi, r13
mov rdx, r15
mov r8, [rsp+0B8h+var_98]
mov r9, [rsp+0B8h+var_90]
call JS_DefinePropertyValue
test eax, eax
jns short loc_589C7
jmp loc_58C1D
loc_589B3:
xor r13d, r13d
mov r15, rax
mov [rsp+0B8h+var_98], 0
mov [rsp+0B8h+var_90], rax
loc_589C7:
mov [rsp+0B8h+var_88], r15
mov [rsp+0B8h+var_80], r13
mov [rsp+0B8h+var_78], rbp
lea r13, [rbx+20h]
mov r12d, [rsp+0B8h+var_9C]
loc_589DF:
cmp dword ptr [r13+0], 0FFFFFF82h
jnz loc_58BF0
mov r15, [rbx+30h]
inc r15
mov rax, [r13+30h]
mov [rsp+0B8h+var_38], rax
movups xmm0, xmmword ptr [r13+0]
movups xmm1, xmmword ptr [r13+10h]
movups xmm2, xmmword ptr [r13+20h]
movaps [rsp+0B8h+var_48], xmm2
movaps [rsp+0B8h+var_58], xmm1
movaps [rsp+0B8h+var_68], xmm0
mov r8, [rbx+38h]
mov r9, [rbx+40h]
test r12d, r12d
jz short loc_58A89
cmp r9d, 0FFFFFFF7h
jb short loc_58A31
inc dword ptr [r8]
loc_58A31:
mov [rsp+0B8h+var_B8], 4004h
mov rdi, [rsp+0B8h+var_A8]
mov rsi, [rsp+0B8h+var_98]
mov rdx, [rsp+0B8h+var_90]
mov ecx, r14d
call JS_DefinePropertyValueUint32
test eax, eax
js loc_58C1D
mov rdi, rbx
push 60h ; '`'
pop rsi
xor edx, edx
mov rcx, r15
lea r8, [rsp+0B8h+var_68]
lea r9, [rsp+0B8h+var_70]
call js_parse_string
test eax, eax
jz short loc_58AF1
and dword ptr [rsp+0B8h+var_58+8], 0
mov qword ptr [rsp+0B8h+var_48], 3
push 3
pop r9
jmp short loc_58AF6
loc_58A89:
mov rdi, [rsp+0B8h+var_A8]
mov rsi, r8
mov rdx, r9
call JS_FreeValue
and dword ptr [rbx+38h], 0
mov qword ptr [rbx+40h], 3
mov rdi, rbx
push 60h ; '`'
pop rsi
push 1
pop rdx
mov rcx, r15
lea r8, [rsp+0B8h+var_68]
lea r9, [rsp+0B8h+var_70]
call js_parse_string
test eax, eax
jnz loc_58C1D
mov r15, qword ptr [rsp+0B8h+var_58+8]
test dword ptr [r15+4], 7FFFFFFFh
jnz short loc_58B2C
test r14d, r14d
jz short loc_58B2C
mov rdi, [rbx]
mov rdx, qword ptr [rsp+0B8h+var_48]
mov rsi, r15
call JS_FreeValue
jmp loc_58B98
loc_58AF1:
mov r9, qword ptr [rsp+0B8h+var_48]
loc_58AF6:
mov rdx, [rsp+0B8h+var_88]
mov r8, qword ptr [rsp+0B8h+var_58+8]
mov [rsp+0B8h+var_B8], 4004h
mov rdi, [rsp+0B8h+var_A8]
mov rsi, [rsp+0B8h+var_80]
mov ecx, r14d
call JS_DefinePropertyValueUint32
test eax, eax
js loc_58C1D
cmp dword ptr [rbx+48h], 60h ; '`'
jnz short loc_58BA2
jmp loc_58C32
loc_58B2C:
mov rbp, qword ptr [rsp+0B8h+var_48]
mov rdi, rbx
mov rsi, r15
mov rdx, rbp
push 1
pop rcx
call emit_push_const
mov r12d, eax
mov rdi, [rbx]
mov rsi, r15
mov rdx, rbp
call JS_FreeValue
test r12d, r12d
mov r12d, [rsp+0B8h+var_9C]
jnz loc_58C1D
test r14d, r14d
jnz short loc_58B95
cmp dword ptr [rbx+48h], 60h ; '`'
jz loc_58C78
mov rdi, rbx
push 42h ; 'B'
pop rsi
call emit_op
mov rdi, rbx
push 5Dh ; ']'
pop r15
mov esi, r15d
call emit_u32
mov rdi, rbx
mov esi, r15d
call emit_ic
loc_58B95:
inc r14d
loc_58B98:
cmp dword ptr [rbx+48h], 60h ; '`'
jz loc_58C5E
loc_58BA2:
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_58C1D
mov rdi, rbx
call js_parse_expr
test eax, eax
jnz short loc_58C1D
cmp dword ptr [r13+0], 7Dh ; '}'
jnz short loc_58C0C
mov rdi, rbx
mov rsi, r13
call free_token
and dword ptr [rbx+58h], 0
mov rax, [rbx+24h]
mov rsi, [rbx+70h]
mov [rbx+8], rax
mov rdi, rbx
call js_parse_template_part
test eax, eax
jnz short loc_58C1D
inc r14d
jmp loc_589DF
loc_58BF0:
push 0FFFFFFFFFFFFFF82h
pop rsi
mov rdi, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp js_parse_expect
loc_58C0C:
lea rsi, aExpectedAfterT; "expected '}' after template expression"
mov rdi, rbx
xor eax, eax
call js_parse_error
loc_58C1D:
push 0FFFFFFFFFFFFFFFFh
pop rax
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_58C32:
mov r15, [rsp+0B8h+var_A8]
mov rdi, r15
mov rsi, [rsp+0B8h+var_98]
call seal_template_obj
mov rdi, r15
mov rsi, [rsp+0B8h+var_80]
call seal_template_obj
inc r14d
mov rax, [rsp+0B8h+var_78]
mov [rax], r14d
jmp short loc_58C78
loc_58C5E:
push 24h ; '$'
pop rsi
mov rdi, rbx
call emit_op
dec r14d
movzx esi, r14w
mov rdi, rbx
call emit_u16
loc_58C78:
mov rdi, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp next_token
|
long long js_parse_template(
long long a1,
int 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)
{
int v15; // r14d
_DWORD *v16; // rax
long long v17; // rdx
long long v18; // r15
long long v19; // r13
int v20; // r12d
long long v21; // rdx
__m128 v22; // xmm4
__m128 v23; // xmm5
__m128 *v24; // r13
int v25; // r12d
char *v26; // r15
_DWORD *v27; // r8
long long v28; // r9
double v29; // xmm4_8
double v30; // xmm5_8
double v31; // xmm4_8
double v32; // xmm5_8
long long v33; // r9
double v34; // xmm4_8
double v35; // xmm5_8
long long v36; // r15
long long v37; // rsi
long long v38; // rdx
long long v39; // rcx
long long v40; // r8
long long v41; // r9
__m128 v42; // xmm4
__m128 v43; // xmm5
long long v44; // rbp
int v45; // r12d
bool v46; // zf
long long v47; // rdx
long long v48; // rcx
long long v49; // r8
long long v50; // r9
__m128 v51; // xmm4
__m128 v52; // xmm5
char *v53; // rsi
double v54; // xmm4_8
double v55; // xmm5_8
char v57; // [rsp+0h] [rbp-B8h]
long long v58; // [rsp+10h] [rbp-A8h]
_DWORD *v60; // [rsp+20h] [rbp-98h]
long long v61; // [rsp+28h] [rbp-90h]
long long v62; // [rsp+30h] [rbp-88h]
long long v63; // [rsp+38h] [rbp-80h]
_DWORD *v64; // [rsp+40h] [rbp-78h]
char *v65; // [rsp+48h] [rbp-70h] BYREF
__m128 v66; // [rsp+50h] [rbp-68h] BYREF
__m128 v67; // [rsp+60h] [rbp-58h]
__m128 v68; // [rsp+70h] [rbp-48h]
long long v69; // [rsp+80h] [rbp-38h]
v58 = *(_QWORD *)a1;
v15 = 0;
if ( a2 )
{
v16 = (_DWORD *)JS_NewArray(v58);
v18 = v17;
if ( (_DWORD)v17 == 6 )
return -1LL;
v19 = (long long)v16;
v20 = emit_push_const((long long *)a1, v16, v17, 0);
JS_FreeValue(v58, v19, v18);
if ( v20 )
return -1LL;
v60 = (_DWORD *)JS_NewArray(v58);
v61 = v21;
if ( (_DWORD)v21 == 6
|| (int)JS_DefinePropertyValue(
v58,
v19,
v18,
113LL,
v60,
v21,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v22,
v23,
a13,
a14,
0x4000) < 0 )
{
return -1LL;
}
}
else
{
v19 = 0LL;
v18 = 3LL;
v60 = 0LL;
v61 = 3LL;
}
v62 = v18;
v63 = v19;
v64 = (_DWORD *)a3;
v24 = (__m128 *)(a1 + 32);
v25 = a2;
while ( 1 )
{
if ( v24->m128_i32[0] != -126 )
return js_parse_expect(a1, -126LL, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v26 = (char *)(*(_QWORD *)(a1 + 48) + 1LL);
v69 = *(_QWORD *)(a1 + 80);
a7 = *v24;
a8 = *(__m128 *)(a1 + 48);
a9 = *(__m128 *)(a1 + 64);
v68 = a9;
v67 = a8;
v66 = a7;
v27 = *(_DWORD **)(a1 + 56);
v28 = *(_QWORD *)(a1 + 64);
if ( !v25 )
break;
if ( (unsigned int)v28 >= 0xFFFFFFF7 )
++*v27;
if ( (int)JS_DefinePropertyValueUint32(
v58,
(long long)v60,
v61,
v15,
v27,
v28,
*(double *)a7.m128_u64,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14,
16388) < 0 )
return -1LL;
if ( (unsigned int)js_parse_string(a1, 96, 0, v26, (long long)&v66, &v65, a7, a8, a9, a10, v29, v30, a13, a14) )
{
v67.m128_i32[2] = 0;
v68.m128_u64[0] = 3LL;
v33 = 3LL;
}
else
{
v33 = v68.m128_u64[0];
}
v37 = v63;
if ( (int)JS_DefinePropertyValueUint32(
v58,
v63,
v62,
v15,
(_DWORD *)v67.m128_u64[1],
v33,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v31,
v32,
a13,
a14,
16388) < 0 )
return -1LL;
if ( *(_DWORD *)(a1 + 72) == 96 )
{
seal_template_obj(v58, v60);
v37 = v63;
seal_template_obj(v58, v63);
*v64 = v15 + 1;
return next_token(a1, v37, v38, a7, a8, a9, a10, v42, v43, a13, a14, v39, v40, v41);
}
LABEL_30:
if ( (unsigned int)next_token(a1, v37, v38, a7, a8, a9, a10, v42, v43, a13, a14, v39, v40, v41)
|| (unsigned int)js_parse_expr(a1) )
{
return -1LL;
}
if ( v24->m128_i32[0] != 125 )
{
js_parse_error(
(long long *)a1,
(long long)"expected '}' after template expression",
v47,
v48,
v49,
v50,
a7,
a8,
a9,
a10,
v51,
v52,
a13,
a14,
v57);
return -1LL;
}
free_token((long long *)a1, (int *)(a1 + 32));
*(_DWORD *)(a1 + 88) = 0;
v53 = *(char **)(a1 + 112);
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a1 + 36);
if ( (unsigned int)js_parse_template_part(a1, v53, a7, a8, a9, a10, v54, v55, a13, a14) )
return -1LL;
++v15;
}
JS_FreeValue(v58, *(_QWORD *)(a1 + 56), *(_QWORD *)(a1 + 64));
*(_DWORD *)(a1 + 56) = 0;
*(_QWORD *)(a1 + 64) = 3LL;
if ( (unsigned int)js_parse_string(a1, 96, 1, v26, (long long)&v66, &v65, a7, a8, a9, a10, v34, v35, a13, a14) )
return -1LL;
v36 = v67.m128_i64[1];
if ( (*(_DWORD *)(v67.m128_u64[1] + 4) & 0x7FFFFFFF) != 0 || !v15 )
{
v44 = v68.m128_u64[0];
v45 = emit_push_const((long long *)a1, (_DWORD *)v67.m128_u64[1], v68.m128_i64[0], 1);
v37 = v36;
JS_FreeValue(*(_QWORD *)a1, v36, v44);
v46 = v45 == 0;
v25 = a2;
if ( !v46 )
return -1LL;
if ( !v15 )
{
if ( *(_DWORD *)(a1 + 72) == 96 )
return next_token(a1, v37, v38, a7, a8, a9, a10, v42, v43, a13, a14, v39, v40, v41);
emit_op(a1, 66);
emit_u32(a1, 0x5Du);
v37 = 93LL;
emit_ic((long long *)a1, 93);
}
++v15;
}
else
{
v37 = v67.m128_i64[1];
JS_FreeValue(*(_QWORD *)a1, v67.m128_i64[1], v68.m128_i64[0]);
}
if ( *(_DWORD *)(a1 + 72) != 96 )
goto LABEL_30;
emit_op(a1, 36);
v37 = (unsigned __int16)(v15 - 1);
emit_u16(a1, v37);
return next_token(a1, v37, v38, a7, a8, a9, a10, v42, v43, a13, a14, v39, v40, v41);
}
|
js_parse_template:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBP,RDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x10],RAX
PUSH 0x3
POP RAX
XOR R14D,R14D
MOV dword ptr [RSP + 0x1c],ESI
TEST ESI,ESI
JZ 0x001589b3
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011b2bb
MOV R15,RDX
CMP R15D,0x6
JZ 0x00158c1d
MOV R13,RAX
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
XOR ECX,ECX
CALL 0x00158874
MOV R12D,EAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,R13
MOV RDX,R15
CALL 0x0011801e
TEST R12D,R12D
JNZ 0x00158c1d
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011b2bb
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
CMP EDX,0x6
JZ 0x00158c1d
MOV dword ptr [RSP],0x4000
PUSH 0x71
POP RCX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,R13
MOV RDX,R15
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x28]
CALL 0x00120872
TEST EAX,EAX
JNS 0x001589c7
JMP 0x00158c1d
LAB_001589b3:
XOR R13D,R13D
MOV R15,RAX
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],RAX
LAB_001589c7:
MOV qword ptr [RSP + 0x30],R15
MOV qword ptr [RSP + 0x38],R13
MOV qword ptr [RSP + 0x40],RBP
LEA R13,[RBX + 0x20]
MOV R12D,dword ptr [RSP + 0x1c]
LAB_001589df:
CMP dword ptr [R13],-0x7e
JNZ 0x00158bf0
MOV R15,qword ptr [RBX + 0x30]
INC R15
MOV RAX,qword ptr [R13 + 0x30]
MOV qword ptr [RSP + 0x80],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS XMM1,xmmword ptr [R13 + 0x10]
MOVUPS XMM2,xmmword ptr [R13 + 0x20]
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOV R8,qword ptr [RBX + 0x38]
MOV R9,qword ptr [RBX + 0x40]
TEST R12D,R12D
JZ 0x00158a89
CMP R9D,-0x9
JC 0x00158a31
INC dword ptr [R8]
LAB_00158a31:
MOV dword ptr [RSP],0x4004
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV ECX,R14D
CALL 0x00120972
TEST EAX,EAX
JS 0x00158c1d
MOV RDI,RBX
PUSH 0x60
POP RSI
XOR EDX,EDX
MOV RCX,R15
LEA R8,[RSP + 0x50]
LEA R9,[RSP + 0x48]
CALL 0x001514ec
TEST EAX,EAX
JZ 0x00158af1
AND dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x3
PUSH 0x3
POP R9
JMP 0x00158af6
LAB_00158a89:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,R8
MOV RDX,R9
CALL 0x0011801e
AND dword ptr [RBX + 0x38],0x0
MOV qword ptr [RBX + 0x40],0x3
MOV RDI,RBX
PUSH 0x60
POP RSI
PUSH 0x1
POP RDX
MOV RCX,R15
LEA R8,[RSP + 0x50]
LEA R9,[RSP + 0x48]
CALL 0x001514ec
TEST EAX,EAX
JNZ 0x00158c1d
MOV R15,qword ptr [RSP + 0x68]
TEST dword ptr [R15 + 0x4],0x7fffffff
JNZ 0x00158b2c
TEST R14D,R14D
JZ 0x00158b2c
MOV RDI,qword ptr [RBX]
MOV RDX,qword ptr [RSP + 0x70]
MOV RSI,R15
CALL 0x0011801e
JMP 0x00158b98
LAB_00158af1:
MOV R9,qword ptr [RSP + 0x70]
LAB_00158af6:
MOV RDX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x68]
MOV dword ptr [RSP],0x4004
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x38]
MOV ECX,R14D
CALL 0x00120972
TEST EAX,EAX
JS 0x00158c1d
CMP dword ptr [RBX + 0x48],0x60
JNZ 0x00158ba2
JMP 0x00158c32
LAB_00158b2c:
MOV RBP,qword ptr [RSP + 0x70]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RBP
PUSH 0x1
POP RCX
CALL 0x00158874
MOV R12D,EAX
MOV RDI,qword ptr [RBX]
MOV RSI,R15
MOV RDX,RBP
CALL 0x0011801e
TEST R12D,R12D
MOV R12D,dword ptr [RSP + 0x1c]
JNZ 0x00158c1d
TEST R14D,R14D
JNZ 0x00158b95
CMP dword ptr [RBX + 0x48],0x60
JZ 0x00158c78
MOV RDI,RBX
PUSH 0x42
POP RSI
CALL 0x0014fa1b
MOV RDI,RBX
PUSH 0x5d
POP R15
MOV ESI,R15D
CALL 0x001563de
MOV RDI,RBX
MOV ESI,R15D
CALL 0x00156ec6
LAB_00158b95:
INC R14D
LAB_00158b98:
CMP dword ptr [RBX + 0x48],0x60
JZ 0x00158c5e
LAB_00158ba2:
MOV RDI,RBX
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x00158c1d
MOV RDI,RBX
CALL 0x00159f66
TEST EAX,EAX
JNZ 0x00158c1d
CMP dword ptr [R13],0x7d
JNZ 0x00158c0c
MOV RDI,RBX
MOV RSI,R13
CALL 0x0012da5b
AND dword ptr [RBX + 0x58],0x0
MOV RAX,qword ptr [RBX + 0x24]
MOV RSI,qword ptr [RBX + 0x70]
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,RBX
CALL 0x0015138c
TEST EAX,EAX
JNZ 0x00158c1d
INC R14D
JMP 0x001589df
LAB_00158bf0:
PUSH -0x7e
POP RSI
MOV RDI,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015523b
LAB_00158c0c:
LEA RSI,[0x187de0]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00128457
LAB_00158c1d:
PUSH -0x1
POP RAX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00158c32:
MOV R15,qword ptr [RSP + 0x10]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00159f6e
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00159f6e
INC R14D
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RAX],R14D
JMP 0x00158c78
LAB_00158c5e:
PUSH 0x24
POP RSI
MOV RDI,RBX
CALL 0x0014fa1b
DEC R14D
MOVZX ESI,R14W
MOV RDI,RBX
CALL 0x0014fa3a
LAB_00158c78:
MOV RDI,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0014fa4e
|
int8 js_parse_template(int8 *param_1,int param_2,int *param_3)
{
int *piVar1;
long lVar2;
int *piVar3;
int iVar4;
int8 uVar5;
int8 uVar6;
int8 uVar7;
int iVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int8 local_98;
int8 local_90;
int1 local_70 [8];
int local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int8 local_48;
int4 uStack_40;
int4 uStack_3c;
int8 local_38;
uVar6 = *param_1;
iVar8 = 0;
if (param_2 != 0) {
auVar9 = JS_NewArray(uVar6);
uVar7 = auVar9._8_8_;
uVar5 = auVar9._0_8_;
if (auVar9._8_4_ != 6) {
iVar4 = emit_push_const(param_1,uVar5,uVar7,0);
JS_FreeValue(uVar6,uVar5,uVar7);
if (iVar4 == 0) {
auVar10 = JS_NewArray(uVar6);
if ((auVar10._8_4_ != 6) &&
(iVar4 = JS_DefinePropertyValue
(uVar6,uVar5,uVar7,0x71,auVar10._0_8_,auVar10._8_8_,0x4000),
-1 < iVar4)) goto LAB_001589c7;
}
}
return 0xffffffffffffffff;
}
auVar9 = ZEXT816(3) << 0x40;
auVar10 = ZEXT816(3) << 0x40;
LAB_001589c7:
local_90 = auVar10._8_8_;
local_98 = auVar10._0_8_;
piVar1 = (int *)(param_1 + 4);
do {
if (*piVar1 != -0x7e) {
uVar6 = js_parse_expect(param_1,0xffffffffffffff82);
return uVar6;
}
lVar2 = param_1[6];
local_38 = param_1[10];
local_68 = *piVar1;
uStack_64 = *(int4 *)((long)param_1 + 0x24);
uStack_60 = *(int4 *)(param_1 + 5);
uStack_5c = *(int4 *)((long)param_1 + 0x2c);
local_58 = *(int4 *)(param_1 + 6);
uStack_54 = *(int4 *)((long)param_1 + 0x34);
uStack_50 = *(int4 *)(param_1 + 7);
uStack_4c = *(int4 *)((long)param_1 + 0x3c);
local_48 = param_1[8];
uStack_40 = *(int4 *)(param_1 + 9);
uStack_3c = *(int4 *)((long)param_1 + 0x4c);
piVar3 = (int *)param_1[7];
uVar5 = param_1[8];
if (param_2 == 0) {
JS_FreeValue(uVar6,piVar3,uVar5);
*(int4 *)(param_1 + 7) = 0;
param_1[8] = 3;
iVar4 = js_parse_string(param_1,0x60,1,lVar2 + 1,&local_68,local_70);
uVar5 = local_48;
if (iVar4 != 0) {
return 0xffffffffffffffff;
}
lVar2 = CONCAT44(uStack_4c,uStack_50);
if (((*(uint *)(lVar2 + 4) & 0x7fffffff) == 0) && (iVar8 != 0)) {
JS_FreeValue(*param_1,lVar2,local_48);
}
else {
iVar4 = emit_push_const(param_1,lVar2,local_48,1);
JS_FreeValue(*param_1,lVar2,uVar5);
if (iVar4 != 0) {
return 0xffffffffffffffff;
}
if (iVar8 == 0) {
if (*(int *)(param_1 + 9) == 0x60) goto LAB_00158c78;
emit_op(param_1,0x42);
emit_u32(param_1,0x5d);
emit_ic(param_1,0x5d);
}
iVar8 = iVar8 + 1;
}
if (*(int *)(param_1 + 9) == 0x60) {
emit_op(param_1,0x24);
emit_u16(param_1,iVar8 - 1U & 0xffff);
goto LAB_00158c78;
}
}
else {
if (0xfffffff6 < (uint)uVar5) {
*piVar3 = *piVar3 + 1;
}
iVar4 = JS_DefinePropertyValueUint32(uVar6,local_98,local_90,iVar8,piVar3,uVar5,0x4004);
if (iVar4 < 0) {
return 0xffffffffffffffff;
}
iVar4 = js_parse_string(param_1,0x60,0,lVar2 + 1,&local_68,local_70);
if (iVar4 != 0) {
uStack_50 = 0;
local_48 = 3;
}
iVar4 = JS_DefinePropertyValueUint32
(uVar6,auVar9._0_8_,auVar9._8_8_,iVar8,CONCAT44(uStack_4c,uStack_50),
local_48,0x4004);
if (iVar4 < 0) {
return 0xffffffffffffffff;
}
if (*(int *)(param_1 + 9) == 0x60) {
seal_template_obj(uVar6,local_98);
seal_template_obj(uVar6,auVar9._0_8_);
*param_3 = iVar8 + 1;
LAB_00158c78:
uVar6 = next_token(param_1);
return uVar6;
}
}
iVar4 = next_token(param_1);
if (iVar4 != 0) {
return 0xffffffffffffffff;
}
iVar4 = js_parse_expr(param_1);
if (iVar4 != 0) {
return 0xffffffffffffffff;
}
if (*piVar1 != 0x7d) {
js_parse_error(param_1,"expected \'}\' after template expression");
return 0xffffffffffffffff;
}
free_token(param_1,piVar1);
*(int4 *)(param_1 + 0xb) = 0;
param_1[1] = *(int8 *)((long)param_1 + 0x24);
iVar4 = js_parse_template_part(param_1,param_1[0xe]);
if (iVar4 != 0) {
return 0xffffffffffffffff;
}
iVar8 = iVar8 + 1;
} while( true );
}
|
|
57,319
|
inline_mysql_file_fstat
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_fstat(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
int filenr, MY_STAT *stat_area, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, filenr, PSI_FILE_FSTAT);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_fstat(filenr, stat_area, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_fstat(filenr, stat_area, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_fstat:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq 0x211c04(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x80(%rbp), %rdi
movl $0xc, %edx
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%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 0xae546
leaq 0x211bc1(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xf3500
movl %eax, -0x2c(%rbp)
leaq 0x211b8e(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x38(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xae55f
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xf3500
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
inline_mysql_file_fstat:
push rbp
mov rbp, rsp
sub rsp, 80h
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
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_80]
mov edx, 0Ch
call rax
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_AE546
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_38]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call my_fstat
mov [rbp+var_2C], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_38]
xor ecx, ecx
mov esi, ecx
call rax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp short loc_AE55F
loc_AE546:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call my_fstat
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_AE55F:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long inline_mysql_file_fstat(long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5)
{
_BYTE v6[72]; // [rsp+0h] [rbp-80h] BYREF
long long v7; // [rsp+48h] [rbp-38h]
unsigned int v8; // [rsp+54h] [rbp-2Ch]
long long v9; // [rsp+58h] [rbp-28h]
long long v10; // [rsp+60h] [rbp-20h]
unsigned int v11; // [rsp+68h] [rbp-18h]
unsigned int v12; // [rsp+6Ch] [rbp-14h]
long long v13; // [rsp+70h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
v7 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a3, 12LL);
if ( v7 )
{
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v7, 0LL, v13, v12);
v8 = my_fstat(v11, v10, v9);
((void ( *)(long long, _QWORD))PSI_server[67])(v7, 0LL);
}
else
{
return (unsigned int)my_fstat(v11, v10, v9);
}
return v8;
}
|
inline_mysql_file_fstat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
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
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x80]
MOV EDX,0xc
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],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 0x001ae546
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001f3500
MOV dword ptr [RBP + -0x2c],EAX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x38]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001ae55f
LAB_001ae546:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001f3500
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001ae55f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_fstat
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
int8 param_5)
{
int1 local_88 [72];
long local_40;
int4 local_34;
int8 local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_40 = (**(code **)(PSI_server + 0x158))(local_88,param_3,0xc);
if (local_40 == 0) {
local_c = my_fstat(local_20,local_28,local_30);
}
else {
(**(code **)(PSI_server + 0x210))(local_40,0,local_18,local_1c);
local_34 = my_fstat(local_20,local_28,local_30);
(**(code **)(PSI_server + 0x218))(local_40,0);
local_c = local_34;
}
return local_c;
}
|
|
57,320
|
testing::internal::SplitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void SplitString(const ::std::string& str, char delimiter,
::std::vector< ::std::string>* dest) {
::std::vector< ::std::string> parsed;
::std::string::size_type pos = 0;
while (::testing::internal::AlwaysTrue()) {
const ::std::string::size_type colon = str.find(delimiter, pos);
if (colon == ::std::string::npos) {
parsed.push_back(str.substr(pos));
break;
} else {
parsed.push_back(str.substr(pos, colon - pos));
pos = colon + 1;
}
}
dest->swap(parsed);
}
|
O0
|
cpp
|
testing::internal::SplitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*):
subq $0x98, %rsp
movb %sil, %al
movq %rdi, 0x90(%rsp)
movb %al, 0x8f(%rsp)
movq %rdx, 0x80(%rsp)
leaq 0x68(%rsp), %rdi
callq 0xe3180
movq $0x0, 0x60(%rsp)
callq 0xc05e0
movb %al, 0x7(%rsp)
jmp 0xb63cf
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xb63dc
jmp 0xb64e0
movq 0x90(%rsp), %rdi
movb 0x8f(%rsp), %al
movq 0x60(%rsp), %rdx
movsbl %al, %esi
callq 0xe5390
movq %rax, 0x48(%rsp)
cmpq $-0x1, 0x48(%rsp)
jne 0xb6475
movq 0x90(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0x28(%rsp), %rdi
movq $-0x1, %rcx
callq 0x392f0
jmp 0xb6425
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe5450
jmp 0xb6436
leaq 0x28(%rsp), %rdi
callq 0x1aac0
jmp 0xb64e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0xb6504
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x1aac0
jmp 0xb6504
movq 0x90(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x48(%rsp), %rcx
subq %rdx, %rcx
leaq 0x8(%rsp), %rdi
callq 0x392f0
jmp 0xb6496
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe5450
jmp 0xb64a7
leaq 0x8(%rsp), %rdi
callq 0x1aac0
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0xb64db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x1aac0
jmp 0xb6504
jmp 0xb63c4
movq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xe5480
leaq 0x68(%rsp), %rdi
callq 0xe2f70
addq $0x98, %rsp
retq
leaq 0x68(%rsp), %rdi
callq 0xe2f70
movq 0x58(%rsp), %rdi
callq 0x14c80
nopl (%rax,%rax)
|
_ZN7testing8internal11SplitStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcPSt6vectorIS6_SaIS6_EE:
sub rsp, 98h
mov al, sil
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_9], al
mov [rsp+98h+var_18], rdx
lea rdi, [rsp+98h+var_30]; this
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov [rsp+98h+var_38], 0
loc_B63C4:
call _ZN7testing8internal10AlwaysTrueEv; testing::internal::AlwaysTrue(void)
mov [rsp+98h+var_91], al
jmp short $+2
loc_B63CF:
mov al, [rsp+98h+var_91]
test al, 1
jnz short loc_B63DC
jmp loc_B64E0
loc_B63DC:
mov rdi, [rsp+98h+var_8]
mov al, [rsp+98h+var_9]
mov rdx, [rsp+98h+var_38]
movsx esi, al
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov [rsp+98h+var_50], rax
cmp [rsp+98h+var_50], 0FFFFFFFFFFFFFFFFh
jnz short loc_B6475
mov rsi, [rsp+98h+var_8]
mov rdx, [rsp+98h+var_38]
lea rdi, [rsp+98h+var_70]
mov rcx, 0FFFFFFFFFFFFFFFFh
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_B6425:
lea rdi, [rsp+98h+var_30]
lea rsi, [rsp+98h+var_70]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&)
jmp short $+2
loc_B6436:
lea rdi, [rsp+98h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_B64E0
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp loc_B6504
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_B6504
loc_B6475:
mov rsi, [rsp+98h+var_8]
mov rdx, [rsp+98h+var_38]
mov rcx, [rsp+98h+var_50]
sub rcx, rdx
lea rdi, [rsp+98h+var_90]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_B6496:
lea rdi, [rsp+98h+var_30]
lea rsi, [rsp+98h+var_90]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&)
jmp short $+2
loc_B64A7:
lea rdi, [rsp+98h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rsp+98h+var_50]
add rax, 1
mov [rsp+98h+var_38], rax
jmp short loc_B64DB
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_B6504
loc_B64DB:
jmp loc_B63C4
loc_B64E0:
mov rdi, [rsp+98h+var_18]
lea rsi, [rsp+98h+var_30]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4swapERS7_; std::vector<std::string>::swap(std::vector<std::string>&)
lea rdi, [rsp+98h+var_30]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 98h
retn
loc_B6504:
lea rdi, [rsp+arg_60]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_50]
call __Unwind_Resume
|
void testing::internal::SplitString(long long a1, char a2, long long a3)
{
testing::internal *v3; // rdi
_BYTE v4[32]; // [rsp+8h] [rbp-90h] BYREF
_BYTE v5[32]; // [rsp+28h] [rbp-70h] BYREF
long long v6; // [rsp+48h] [rbp-50h]
long long v7; // [rsp+60h] [rbp-38h]
_BYTE v8[24]; // [rsp+68h] [rbp-30h] BYREF
long long v9; // [rsp+80h] [rbp-18h]
char v10; // [rsp+8Fh] [rbp-9h]
long long v11; // [rsp+90h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v3 = (testing::internal *)v8;
std::vector<std::string>::vector(v8);
v7 = 0LL;
while ( (testing::internal::AlwaysTrue(v3) & 1) != 0 )
{
v6 = std::string::find(v11, (unsigned int)v10, v7);
if ( v6 == -1 )
{
std::string::substr(v5, v11, v7, -1LL);
std::vector<std::string>::push_back(v8, v5);
std::string::~string(v5);
break;
}
std::string::substr(v4, v11, v7, v6 - v7);
std::vector<std::string>::push_back(v8, v4);
v3 = (testing::internal *)v4;
std::string::~string(v4);
v7 = v6 + 1;
}
std::vector<std::string>::swap(v9, v8);
std::vector<std::string>::~vector(v8);
}
|
SplitString:
SUB RSP,0x98
MOV AL,SIL
MOV qword ptr [RSP + 0x90],RDI
MOV byte ptr [RSP + 0x8f],AL
MOV qword ptr [RSP + 0x80],RDX
LEA RDI,[RSP + 0x68]
CALL 0x001e3180
MOV qword ptr [RSP + 0x60],0x0
LAB_001b63c4:
CALL 0x001c05e0
MOV byte ptr [RSP + 0x7],AL
JMP 0x001b63cf
LAB_001b63cf:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x001b63dc
JMP 0x001b64e0
LAB_001b63dc:
MOV RDI,qword ptr [RSP + 0x90]
MOV AL,byte ptr [RSP + 0x8f]
MOV RDX,qword ptr [RSP + 0x60]
MOVSX ESI,AL
CALL 0x001e5390
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],-0x1
JNZ 0x001b6475
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x60]
LEA RDI,[RSP + 0x28]
MOV RCX,-0x1
CALL 0x001392f0
JMP 0x001b6425
LAB_001b6425:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x28]
CALL 0x001e5450
JMP 0x001b6436
LAB_001b6436:
LEA RDI,[RSP + 0x28]
CALL 0x0011aac0
JMP 0x001b64e0
LAB_001b6475:
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x48]
SUB RCX,RDX
LAB_001b648a:
LEA RDI,[RSP + 0x8]
CALL 0x001392f0
JMP 0x001b6496
LAB_001b6496:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x8]
CALL 0x001e5450
LAB_001b64a5:
JMP 0x001b64a7
LAB_001b64a7:
LEA RDI,[RSP + 0x8]
CALL 0x0011aac0
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x1
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001b64db
LAB_001b64db:
JMP 0x001b63c4
LAB_001b64e0:
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[RSP + 0x68]
CALL 0x001e5480
LEA RDI,[RSP + 0x68]
CALL 0x001e2f70
ADD RSP,0x98
RET
|
/* testing::internal::SplitString(std::__cxx11::string const&, char,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >*) */
void testing::internal::SplitString(string *param_1,char param_2,vector *param_3)
{
byte bVar1;
string local_90 [32];
string local_70 [32];
long local_50;
ulong local_38;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24];
vector *local_18;
char local_9;
string *local_8;
local_18 = param_3;
local_9 = param_2;
local_8 = param_1;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_30);
local_38 = 0;
do {
/* try { // try from 001b63c4 to 001b6422 has its CatchHandler @ 001b6445 */
bVar1 = AlwaysTrue();
if ((bVar1 & 1) == 0) {
LAB_001b64e0:
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::swap
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_18,
(vector *)local_30);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30);
return;
}
local_50 = std::__cxx11::string::find(local_8,local_9,local_38);
if (local_50 == -1) {
std::__cxx11::string::substr((ulong)local_70,(ulong)local_8);
/* try { // try from 001b6425 to 001b6433 has its CatchHandler @ 001b6458 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
(local_30,local_70);
std::__cxx11::string::~string(local_70);
goto LAB_001b64e0;
}
/* try { // try from 001b648a to 001b6493 has its CatchHandler @ 001b6445 */
std::__cxx11::string::substr((ulong)local_90,(ulong)local_8);
/* try { // try from 001b6496 to 001b64a4 has its CatchHandler @ 001b64c1 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
(local_30,local_90);
std::__cxx11::string::~string(local_90);
local_38 = local_50 + 1;
} while( true );
}
|
|
57,321
|
mbedtls_cipher_info_from_values
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher.c
|
const mbedtls_cipher_info_t *mbedtls_cipher_info_from_values(
const mbedtls_cipher_id_t cipher_id,
int key_bitlen,
const mbedtls_cipher_mode_t mode)
{
const mbedtls_cipher_definition_t *def;
for (def = mbedtls_cipher_definitions; def->info != NULL; def++) {
if (def->info->base->cipher == cipher_id &&
def->info->key_bitlen == (unsigned) key_bitlen &&
def->info->mode == mode) {
return def->info;
}
}
return NULL;
}
|
O3
|
c
|
mbedtls_cipher_info_from_values:
leaq 0x4a25a(%rip), %rcx # 0xe44c0
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0x9a292
addq $0x18, %rcx
movq 0x28(%rax), %r8
cmpl %edi, (%r8)
jne 0x9a286
cmpl %esi, 0x8(%rax)
jne 0x9a286
cmpl %edx, 0x4(%rax)
je 0x9a294
movq (%rcx), %rax
addq $0x10, %rcx
testq %rax, %rax
jne 0x9a273
xorl %eax, %eax
retq
|
mbedtls_cipher_info_from_values:
lea rcx, mbedtls_cipher_definitions
mov rax, [rcx+8]
test rax, rax
jz short loc_9A292
add rcx, 18h
loc_9A273:
mov r8, [rax+28h]
cmp [r8], edi
jnz short loc_9A286
cmp [rax+8], esi
jnz short loc_9A286
cmp [rax+4], edx
jz short locret_9A294
loc_9A286:
mov rax, [rcx]
add rcx, 10h
test rax, rax
jnz short loc_9A273
loc_9A292:
xor eax, eax
locret_9A294:
retn
|
long long mbedtls_cipher_info_from_values(int a1, int a2, int a3)
{
long long result; // rax
long long *v4; // rcx
result = *(_QWORD *)&mbedtls_cipher_definitions[2];
if ( !result )
return 0LL;
v4 = (long long *)&mbedtls_cipher_definitions[6];
while ( **(_DWORD **)(result + 40) != a1 || *(_DWORD *)(result + 8) != a2 || *(_DWORD *)(result + 4) != a3 )
{
result = *v4;
v4 += 2;
if ( !result )
return 0LL;
}
return result;
}
|
mbedtls_cipher_info_from_values:
LEA RCX,[0x1e44c0]
MOV RAX,qword ptr [RCX + 0x8]
TEST RAX,RAX
JZ 0x0019a292
ADD RCX,0x18
LAB_0019a273:
MOV R8,qword ptr [RAX + 0x28]
CMP dword ptr [R8],EDI
JNZ 0x0019a286
CMP dword ptr [RAX + 0x8],ESI
JNZ 0x0019a286
CMP dword ptr [RAX + 0x4],EDX
JZ 0x0019a294
LAB_0019a286:
MOV RAX,qword ptr [RCX]
ADD RCX,0x10
TEST RAX,RAX
JNZ 0x0019a273
LAB_0019a292:
XOR EAX,EAX
LAB_0019a294:
RET
|
int * mbedtls_cipher_info_from_values(int param_1,int param_2,int param_3)
{
int *puVar1;
int **ppuVar2;
if (PTR_aes_128_ecb_info_001e44c8 != (int *)0x0) {
ppuVar2 = &PTR_aes_192_ecb_info_001e44d8;
puVar1 = PTR_aes_128_ecb_info_001e44c8;
do {
if (((**(int **)(puVar1 + 0x28) == param_1) && (*(int *)(puVar1 + 8) == param_2)) &&
(*(int *)(puVar1 + 4) == param_3)) {
return puVar1;
}
puVar1 = *ppuVar2;
ppuVar2 = ppuVar2 + 2;
} while (puVar1 != (int *)0x0);
}
return (int *)0x0;
}
|
|
57,322
|
std::pair<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, bool> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Value&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(KeyType && key, T && t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(std::forward<KeyType>(key), std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O1
|
cpp
|
std::pair<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, bool> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Value&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%rdi), %rbx
sete %bpl
je 0x5429e
leaq 0x18(%r14), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x542cc
testb %al, %al
jne 0x54299
addq $0x60, %rbx
cmpq 0x8(%r14), %rbx
sete %bpl
jne 0x54277
jmp 0x5429e
testb %bpl, %bpl
je 0x542b8
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x54310
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x542ba
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
cmp rbx, [rdi+8]
setz bpl
jz short loc_5429E
lea r13, [r14+18h]
loc_54277:
mov rdi, r13
mov rsi, rbx
mov rdx, r12
call _ZNKSt8equal_toIvEclIRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEERKSC_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSL_OSM_
test al, al
jnz short loc_54299
add rbx, 60h ; '`'
cmp rbx, [r14+8]
setz bpl
jnz short loc_54277
jmp short loc_5429E
loc_54299:
test bpl, bpl
jz short loc_542B8
loc_5429E:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRKSA_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<std::string const&,minja::Value>(std::string const&,minja::Value &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFA0h
mov dl, 1
jmp short loc_542BA
loc_542B8:
xor edx, edx
loc_542BA:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_(
long long *a1,
long long a2,
long long a3)
{
long long v4; // rbx
bool v5; // bp
v4 = *a1;
v5 = *a1 == a1[1];
if ( *a1 == a1[1] )
goto LABEL_6;
while ( !(unsigned __int8)std::equal_to<void>::operator()<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,std::string const&>(
a1 + 3,
v4,
a2) )
{
v4 += 96LL;
v5 = v4 == a1[1];
if ( v4 == a1[1] )
goto LABEL_6;
}
if ( v5 )
{
LABEL_6:
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::emplace_back<std::string const&,minja::Value>(
a1,
a2,
a3);
return a1[1] - 96;
}
return v4;
}
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
CMP RBX,qword ptr [RDI + 0x8]
SETZ BPL
JZ 0x0015429e
LEA R13,[R14 + 0x18]
LAB_00154277:
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R12
CALL 0x001542cc
TEST AL,AL
JNZ 0x00154299
ADD RBX,0x60
CMP RBX,qword ptr [R14 + 0x8]
SETZ BPL
JNZ 0x00154277
JMP 0x0015429e
LAB_00154299:
TEST BPL,BPL
JZ 0x001542b8
LAB_0015429e:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00154310
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x001542ba
LAB_001542b8:
XOR EDX,EDX
LAB_001542ba:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_
(vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*param_1,string *param_2,Value *param_3)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
basic_json *pbVar3;
bool bVar4;
int1 auVar5 [16];
pbVar3 = *(basic_json **)param_1;
bVar4 = pbVar3 == *(basic_json **)(param_1 + 8);
if (!bVar4) {
do {
cVar1 = std::equal_to<void>::operator()((equal_to<void> *)(param_1 + 0x18),pbVar3,param_2);
if (cVar1 != '\0') {
if (!bVar4) {
uVar2 = 0;
goto LAB_001542ba;
}
break;
}
pbVar3 = pbVar3 + 0x60;
bVar4 = pbVar3 == *(basic_json **)(param_1 + 8);
} while (!bVar4);
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::emplace_back<std::__cxx11::string_const&,minja::Value>(param_1,param_2,param_3);
pbVar3 = (basic_json *)(*(long *)(param_1 + 8) + -0x60);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_001542ba:
auVar5._8_8_ = uVar2;
auVar5._0_8_ = pbVar3;
return auVar5;
}
|
|
57,323
|
mi_check_status
|
eloqsql/storage/myisam/mi_locking.c
|
my_bool mi_check_status(void *param)
{
MI_INFO *info=(MI_INFO*) param;
DBUG_ENTER("mi_check_status");
DBUG_PRINT("info",("dellink: %ld r_locks: %u w_locks: %u",
(long) info->s->state.dellink, (uint) info->s->r_locks,
(uint) info->s->w_locks));
/*
The test for w_locks == 1 is here because this thread has already done an
external lock (in other words: w_locks == 1 means no other threads has
a write lock)
*/
DBUG_RETURN((my_bool) !(info->s->state.dellink == HA_OFFSET_ERROR ||
(myisam_concurrent_insert == 2 && info->s->r_locks &&
info->s->w_locks == 1)));
}
|
O0
|
c
|
mi_check_status:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xb5f92
jmp 0xb5f94
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movb $0x1, %al
cmpq $-0x1, 0x58(%rcx)
movb %al, -0x11(%rbp)
je 0xb5fe8
xorl %eax, %eax
leaq 0x217020(%rip), %rcx # 0x2ccfd0
cmpq $0x2, (%rcx)
movb %al, -0x12(%rbp)
jne 0xb5fe2
movq -0x10(%rbp), %rax
movq (%rax), %rcx
xorl %eax, %eax
cmpl $0x0, 0x364(%rcx)
movb %al, -0x12(%rbp)
je 0xb5fe2
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x1, 0x360(%rax)
sete %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x13(%rbp)
movb -0x13(%rbp), %al
popq %rbp
retq
nopw (%rax,%rax)
|
mi_check_status:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
jmp short $+2
loc_B5F92:
jmp short $+2
loc_B5F94:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov al, 1
cmp qword ptr [rcx+58h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_11], al
jz short loc_B5FE8
xor eax, eax
lea rcx, myisam_concurrent_insert
cmp qword ptr [rcx], 2
mov [rbp+var_12], al
jnz short loc_B5FE2
mov rax, [rbp+var_10]
mov rcx, [rax]
xor eax, eax
cmp dword ptr [rcx+364h], 0
mov [rbp+var_12], al
jz short loc_B5FE2
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+360h], 1
setz al
mov [rbp+var_12], al
loc_B5FE2:
mov al, [rbp+var_12]
mov [rbp+var_11], al
loc_B5FE8:
mov al, [rbp+var_11]
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_13], al
mov al, [rbp+var_13]
pop rbp
retn
|
_BOOL8 mi_check_status(long long a1)
{
bool v2; // [rsp+2h] [rbp-12h]
char v3; // [rsp+3h] [rbp-11h]
v3 = 1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 88LL) != -1LL )
{
v2 = 0;
if ( myisam_concurrent_insert == 2LL )
{
v2 = 0;
if ( *(_DWORD *)(*(_QWORD *)a1 + 868LL) )
v2 = *(_DWORD *)(*(_QWORD *)a1 + 864LL) == 1;
}
v3 = v2;
}
return (v3 & 1) == 0;
}
|
mi_check_status:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001b5f92
LAB_001b5f92:
JMP 0x001b5f94
LAB_001b5f94:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV AL,0x1
CMP qword ptr [RCX + 0x58],-0x1
MOV byte ptr [RBP + -0x11],AL
JZ 0x001b5fe8
XOR EAX,EAX
LEA RCX,[0x3ccfd0]
CMP qword ptr [RCX],0x2
MOV byte ptr [RBP + -0x12],AL
JNZ 0x001b5fe2
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
XOR EAX,EAX
CMP dword ptr [RCX + 0x364],0x0
MOV byte ptr [RBP + -0x12],AL
JZ 0x001b5fe2
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x360],0x1
SETZ AL
MOV byte ptr [RBP + -0x12],AL
LAB_001b5fe2:
MOV AL,byte ptr [RBP + -0x12]
MOV byte ptr [RBP + -0x11],AL
LAB_001b5fe8:
MOV AL,byte ptr [RBP + -0x11]
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x13],AL
MOV AL,byte ptr [RBP + -0x13]
POP RBP
RET
|
byte mi_check_status(long *param_1)
{
int1 local_1a;
int1 local_19;
local_19 = true;
if (*(long *)(*param_1 + 0x58) != -1) {
local_1a = false;
if ((myisam_concurrent_insert == 2) && (local_1a = false, *(int *)(*param_1 + 0x364) != 0)) {
local_1a = *(int *)(*param_1 + 0x360) == 1;
}
local_19 = local_1a;
}
return (local_19 ^ 0xffU) & 1;
}
|
|
57,324
|
mi_check_status
|
eloqsql/storage/myisam/mi_locking.c
|
my_bool mi_check_status(void *param)
{
MI_INFO *info=(MI_INFO*) param;
DBUG_ENTER("mi_check_status");
DBUG_PRINT("info",("dellink: %ld r_locks: %u w_locks: %u",
(long) info->s->state.dellink, (uint) info->s->r_locks,
(uint) info->s->w_locks));
/*
The test for w_locks == 1 is here because this thread has already done an
external lock (in other words: w_locks == 1 means no other threads has
a write lock)
*/
DBUG_RETURN((my_bool) !(info->s->state.dellink == HA_OFFSET_ERROR ||
(myisam_concurrent_insert == 2 && info->s->r_locks &&
info->s->w_locks == 1)));
}
|
O3
|
c
|
mi_check_status:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
cmpq $-0x1, 0x58(%rcx)
je 0x819df
leaq 0x30e7ae(%rip), %rdx # 0x390170
movb $0x1, %al
cmpq $0x2, (%rdx)
jne 0x819e1
cmpl $0x0, 0x364(%rcx)
je 0x819e1
cmpl $0x1, 0x360(%rcx)
setne %al
jmp 0x819e1
xorl %eax, %eax
popq %rbp
retq
|
mi_check_status:
push rbp
mov rbp, rsp
mov rcx, [rdi]
cmp qword ptr [rcx+58h], 0FFFFFFFFFFFFFFFFh
jz short loc_819DF
lea rdx, myisam_concurrent_insert
mov al, 1
cmp qword ptr [rdx], 2
jnz short loc_819E1
cmp dword ptr [rcx+364h], 0
jz short loc_819E1
cmp dword ptr [rcx+360h], 1
setnz al
jmp short loc_819E1
loc_819DF:
xor eax, eax
loc_819E1:
pop rbp
retn
|
bool mi_check_status(long long *a1)
{
long long v1; // rcx
bool result; // al
v1 = *a1;
if ( *(_QWORD *)(*a1 + 88) == -1LL )
return 0;
result = 1;
if ( myisam_concurrent_insert == 2LL )
{
if ( *(_DWORD *)(v1 + 868) )
return *(_DWORD *)(v1 + 864) != 1;
}
return result;
}
|
mi_check_status:
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI]
CMP qword ptr [RCX + 0x58],-0x1
JZ 0x001819df
LEA RDX,[0x490170]
MOV AL,0x1
CMP qword ptr [RDX],0x2
JNZ 0x001819e1
CMP dword ptr [RCX + 0x364],0x0
JZ 0x001819e1
CMP dword ptr [RCX + 0x360],0x1
SETNZ AL
JMP 0x001819e1
LAB_001819df:
XOR EAX,EAX
LAB_001819e1:
POP RBP
RET
|
bool mi_check_status(long *param_1)
{
long lVar1;
bool bVar2;
lVar1 = *param_1;
if (*(long *)(lVar1 + 0x58) == -1) {
bVar2 = false;
}
else {
bVar2 = true;
if ((myisam_concurrent_insert == 2) && (*(int *)(lVar1 + 0x364) != 0)) {
bVar2 = *(int *)(lVar1 + 0x360) != 1;
}
}
return bVar2;
}
|
|
57,325
|
ha_partition::pre_calculate_checksum()
|
eloqsql/sql/ha_partition.cc
|
int ha_partition::pre_calculate_checksum()
{
int error;
DBUG_ENTER("ha_partition::pre_calculate_checksum");
m_pre_calling= TRUE;
if ((table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM)))
{
handler **file= m_file;
do
{
if ((error= (*file)->pre_calculate_checksum()))
{
DBUG_RETURN(error);
}
} while (*(++file));
}
DBUG_RETURN(0);
}
|
O0
|
cpp
|
ha_partition::pre_calculate_checksum():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movb $0x1, 0x6bc(%rdi)
callq 0xee6df0
movabsq $0x4001000000, %rcx # imm = 0x4001000000
andq %rcx, %rax
cmpq $0x0, %rax
je 0xeee28e
movq -0x28(%rbp), %rax
movq 0x548(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x3d0(%rax)
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0xeee274
jmp 0xeee26c
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xeee297
jmp 0xeee276
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0xeee252
jmp 0xeee28e
jmp 0xeee290
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
|
_ZN12ha_partition22pre_calculate_checksumEv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]; this
mov [rbp+var_28], rdi
mov byte ptr [rdi+6BCh], 1
call _ZNK12ha_partition11table_flagsEv; ha_partition::table_flags(void)
mov rcx, 4001000000h
and rax, rcx
cmp rax, 0
jz short loc_EEE28E
mov rax, [rbp+var_28]
mov rax, [rax+548h]
mov [rbp+var_20], rax
loc_EEE252:
mov rax, [rbp+var_20]
mov rdi, [rax]
mov rax, [rdi]
call qword ptr [rax+3D0h]
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_EEE274
jmp short $+2
loc_EEE26C:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
jmp short loc_EEE297
loc_EEE274:
jmp short $+2
loc_EEE276:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 8
mov [rbp+var_20], rcx
cmp qword ptr [rax+8], 0
jnz short loc_EEE252
jmp short $+2
loc_EEE28E:
jmp short $+2
loc_EEE290:
mov [rbp+var_4], 0
loc_EEE297:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long ha_partition::pre_calculate_checksum(ha_partition *this)
{
_QWORD *v1; // rax
_QWORD *i; // [rsp+10h] [rbp-20h]
unsigned int v4; // [rsp+1Ch] [rbp-14h]
*((_BYTE *)this + 1724) = 1;
if ( (ha_partition::table_flags(this) & 0x4001000000LL) != 0 )
{
for ( i = (_QWORD *)*((_QWORD *)this + 169); ; ++i )
{
v4 = (*(long long ( **)(_QWORD))(*(_QWORD *)*i + 976LL))(*i);
if ( v4 )
break;
v1 = i;
if ( !v1[1] )
return 0;
}
return v4;
}
else
{
return 0;
}
}
|
single_point:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOVSD qword ptr [RBP + -0x10],XMM0
MOVSD qword ptr [RBP + -0x18],XMM1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RAX + 0x30]
XOR ESI,ESI
LEA RDX,[RBP + -0x1c]
CALL 0x00eed650
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x1d],AL
JNZ 0x00eee268
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x1c]
MOVSD XMM0,qword ptr [RBP + -0x10]
MOVSD XMM1,qword ptr [RBP + -0x18]
CALL 0x00eead60
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x1d],AL
LAB_00eee268:
MOV AL,byte ptr [RBP + -0x1d]
AND AL,0x1
MOVZX EAX,AL
ADD RSP,0x30
POP RBP
RET
|
/* Gcalc_operation_transporter::single_point(double, double) */
bool __thiscall
Gcalc_operation_transporter::single_point
(Gcalc_operation_transporter *this,double param_1,double param_2)
{
int iVar1;
bool local_25;
uint local_24;
double local_20;
double local_18;
Gcalc_operation_transporter *local_10;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
iVar1 = Gcalc_function::single_shape_op(*(Gcalc_function **)(this + 0x30),0,&local_24);
local_25 = true;
if (iVar1 == 0) {
iVar1 = Gcalc_shape_transporter::int_single_point
((Gcalc_shape_transporter *)this,local_24,local_18,local_20);
local_25 = iVar1 != 0;
}
return local_25;
}
|
|
57,326
|
JS_WriteArray
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_WriteArray(BCWriterState *s, JSValue obj)
{
JSObject *p = JS_VALUE_GET_OBJ(obj);
uint32_t i, len;
JSValue val;
int ret;
BOOL is_template;
if (s->allow_bytecode && !p->extensible) {
/* not extensible array: we consider it is a
template when we are saving bytecode */
bc_put_u8(s, BC_TAG_TEMPLATE_OBJECT);
is_template = TRUE;
} else {
bc_put_u8(s, BC_TAG_ARRAY);
is_template = FALSE;
}
if (js_get_length32(s->ctx, &len, obj))
goto fail1;
bc_put_leb128(s, len);
for(i = 0; i < len; i++) {
val = JS_GetPropertyUint32(s->ctx, obj, i);
if (JS_IsException(val))
goto fail1;
ret = JS_WriteObjectRec(s, val);
JS_FreeValue(s->ctx, val);
if (ret)
goto fail1;
}
if (is_template) {
val = JS_GetProperty(s->ctx, obj, JS_ATOM_raw);
if (JS_IsException(val))
goto fail1;
ret = JS_WriteObjectRec(s, val);
JS_FreeValue(s->ctx, val);
if (ret)
goto fail1;
}
return 0;
fail1:
return -1;
}
|
O0
|
c
|
JS_WriteArray:
subq $0x68, %rsp
movq %rsi, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq %rdi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movl 0x38(%rax), %eax
shll $0x18, %eax
sarl $0x18, %eax
cmpl $0x0, %eax
je 0x7ec07
movq 0x40(%rsp), %rax
movb 0x5(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
jne 0x7ec07
movq 0x48(%rsp), %rdi
movl $0xb, %esi
callq 0x7de90
movl $0x1, 0x20(%rsp)
jmp 0x7ec1e
movq 0x48(%rsp), %rdi
movl $0x9, %esi
callq 0x7de90
movl $0x0, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
movq 0x58(%rsp), %rcx
leaq 0x38(%rsp), %rsi
callq 0x73e60
cmpl $0x0, %eax
je 0x7ec44
jmp 0x7eda4
movq 0x48(%rsp), %rdi
movl 0x38(%rsp), %esi
callq 0x7ea20
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x38(%rsp), %eax
jae 0x7ed07
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movl 0x3c(%rsp), %ecx
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x37750
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x7ecba
jmp 0x7eda4
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x51570
movl %eax, 0x24(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x29f80
cmpl $0x0, 0x24(%rsp)
je 0x7ecf5
jmp 0x7eda4
jmp 0x7ecf7
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x7ec5a
cmpl $0x0, 0x20(%rsp)
je 0x7ed9a
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movl $0x71, %ecx
callq 0x30070
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x7ed60
jmp 0x7eda4
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x51570
movl %eax, 0x24(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x29f80
cmpl $0x0, 0x24(%rsp)
je 0x7ed98
jmp 0x7eda4
jmp 0x7ed9a
movl $0x0, 0x64(%rsp)
jmp 0x7edac
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_WriteArray:
sub rsp, 68h
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_10], rdx
mov [rsp+68h+var_20], rdi
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_28], rax
mov rax, [rsp+68h+var_20]
mov eax, [rax+38h]
shl eax, 18h
sar eax, 18h
cmp eax, 0
jz short loc_7EC07
mov rax, [rsp+68h+var_28]
mov al, [rax+5]
and al, 1
cmp al, 0
jnz short loc_7EC07
mov rdi, [rsp+68h+var_20]
mov esi, 0Bh
call bc_put_u8
mov [rsp+68h+var_48], 1
jmp short loc_7EC1E
loc_7EC07:
mov rdi, [rsp+68h+var_20]
mov esi, 9
call bc_put_u8
mov [rsp+68h+var_48], 0
loc_7EC1E:
mov rax, [rsp+68h+var_20]
mov rdi, [rax]
mov rdx, [rsp+68h+var_18]
mov rcx, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_30]
call js_get_length32
cmp eax, 0
jz short loc_7EC44
jmp loc_7EDA4
loc_7EC44:
mov rdi, [rsp+68h+var_20]
mov esi, [rsp+68h+var_30]
call bc_put_leb128
mov [rsp+68h+var_2C], 0
loc_7EC5A:
mov eax, [rsp+68h+var_2C]
cmp eax, [rsp+68h+var_30]
jnb loc_7ED07
mov rax, [rsp+68h+var_20]
mov rdi, [rax]
mov ecx, [rsp+68h+var_2C]
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_10]
call JS_GetPropertyUint32
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_50], rdx
mov rax, [rsp+68h+var_58]
mov [rsp+68h+var_40], rax
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_40]
mov rsi, [rsp+68h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_7ECBA
jmp loc_7EDA4
loc_7ECBA:
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_40]
mov rdx, [rsp+68h+var_38]
call JS_WriteObjectRec
mov [rsp+68h+var_44], eax
mov rax, [rsp+68h+var_20]
mov rdi, [rax]
mov rsi, [rsp+68h+var_40]
mov rdx, [rsp+68h+var_38]
call JS_FreeValue
cmp [rsp+68h+var_44], 0
jz short loc_7ECF5
jmp loc_7EDA4
loc_7ECF5:
jmp short $+2
loc_7ECF7:
mov eax, [rsp+68h+var_2C]
add eax, 1
mov [rsp+68h+var_2C], eax
jmp loc_7EC5A
loc_7ED07:
cmp [rsp+68h+var_48], 0
jz loc_7ED9A
mov rax, [rsp+68h+var_20]
mov rdi, [rax]
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_10]
mov ecx, 71h ; 'q'
call JS_GetProperty
mov [rsp+68h+var_68], rax
mov [rsp+68h+var_60], rdx
mov rax, [rsp+68h+var_68]
mov [rsp+68h+var_40], rax
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_40]
mov rsi, [rsp+68h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_7ED60
jmp short loc_7EDA4
loc_7ED60:
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_40]
mov rdx, [rsp+68h+var_38]
call JS_WriteObjectRec
mov [rsp+68h+var_44], eax
mov rax, [rsp+68h+var_20]
mov rdi, [rax]
mov rsi, [rsp+68h+var_40]
mov rdx, [rsp+68h+var_38]
call JS_FreeValue
cmp [rsp+68h+var_44], 0
jz short loc_7ED98
jmp short loc_7EDA4
loc_7ED98:
jmp short $+2
loc_7ED9A:
mov [rsp+68h+var_4], 0
jmp short loc_7EDAC
loc_7EDA4:
mov [rsp+68h+var_4], 0FFFFFFFFh
loc_7EDAC:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
|
long long JS_WriteArray(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v11; // rdx
double v12; // xmm4_8
double v13; // xmm5_8
long long v14; // rdx
double v15; // xmm4_8
double v16; // xmm5_8
long long Property; // [rsp+0h] [rbp-68h]
long long PropertyUint32; // [rsp+10h] [rbp-58h]
int v20; // [rsp+20h] [rbp-48h]
int v21; // [rsp+24h] [rbp-44h]
int v22; // [rsp+24h] [rbp-44h]
long long v23; // [rsp+30h] [rbp-38h]
long long v24; // [rsp+30h] [rbp-38h]
unsigned int v25; // [rsp+38h] [rbp-30h] BYREF
unsigned int i; // [rsp+3Ch] [rbp-2Ch]
long long v27; // [rsp+40h] [rbp-28h]
long long *v28; // [rsp+48h] [rbp-20h]
long long v29; // [rsp+50h] [rbp-18h]
long long v30; // [rsp+58h] [rbp-10h]
v29 = a2;
v30 = a3;
v28 = (long long *)a1;
v27 = a2;
if ( !(unsigned __int8)*(_DWORD *)(a1 + 56) || (*(_BYTE *)(v27 + 5) & 1) != 0 )
{
bc_put_u8((long long)v28, 9);
v20 = 0;
}
else
{
bc_put_u8((long long)v28, 11);
v20 = 1;
}
if ( (unsigned int)js_get_length32(*v28, &v25, v29, v30) )
return (unsigned int)-1;
bc_put_leb128((long long)v28, v25);
for ( i = 0; i < v25; ++i )
{
PropertyUint32 = JS_GetPropertyUint32(*v28, v29, v30, i);
v23 = v11;
if ( JS_IsException_1(PropertyUint32, v11) )
return (unsigned int)-1;
v21 = JS_WriteObjectRec(v28, PropertyUint32, v23, a4, a5, a6, a7, v12, v13, a10, a11);
JS_FreeValue(*v28, PropertyUint32, v23);
if ( v21 )
return (unsigned int)-1;
}
if ( v20
&& ((Property = JS_GetProperty(*v28, v29, v30, 113), v24 = v14, JS_IsException_1(Property, v14))
|| (v22 = JS_WriteObjectRec(v28, Property, v24, a4, a5, a6, a7, v15, v16, a10, a11),
JS_FreeValue(*v28, Property, v24),
v22)) )
{
return (unsigned int)-1;
}
else
{
return 0;
}
}
|
JS_WriteArray:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RSP + 0x58],RDX
MOV qword ptr [RSP + 0x48],RDI
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV EAX,dword ptr [RAX + 0x38]
SHL EAX,0x18
SAR EAX,0x18
CMP EAX,0x0
JZ 0x0017ec07
MOV RAX,qword ptr [RSP + 0x40]
MOV AL,byte ptr [RAX + 0x5]
AND AL,0x1
CMP AL,0x0
JNZ 0x0017ec07
MOV RDI,qword ptr [RSP + 0x48]
MOV ESI,0xb
CALL 0x0017de90
MOV dword ptr [RSP + 0x20],0x1
JMP 0x0017ec1e
LAB_0017ec07:
MOV RDI,qword ptr [RSP + 0x48]
MOV ESI,0x9
CALL 0x0017de90
MOV dword ptr [RSP + 0x20],0x0
LAB_0017ec1e:
MOV RAX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x58]
LEA RSI,[RSP + 0x38]
CALL 0x00173e60
CMP EAX,0x0
JZ 0x0017ec44
JMP 0x0017eda4
LAB_0017ec44:
MOV RDI,qword ptr [RSP + 0x48]
MOV ESI,dword ptr [RSP + 0x38]
CALL 0x0017ea20
MOV dword ptr [RSP + 0x3c],0x0
LAB_0017ec5a:
MOV EAX,dword ptr [RSP + 0x3c]
CMP EAX,dword ptr [RSP + 0x38]
JNC 0x0017ed07
MOV RAX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RAX]
MOV ECX,dword ptr [RSP + 0x3c]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00137750
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0017ecba
JMP 0x0017eda4
LAB_0017ecba:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00151570
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00129f80
CMP dword ptr [RSP + 0x24],0x0
JZ 0x0017ecf5
JMP 0x0017eda4
LAB_0017ecf5:
JMP 0x0017ecf7
LAB_0017ecf7:
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x0017ec5a
LAB_0017ed07:
CMP dword ptr [RSP + 0x20],0x0
JZ 0x0017ed9a
MOV RAX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV ECX,0x71
CALL 0x00130070
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0017ed60
JMP 0x0017eda4
LAB_0017ed60:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00151570
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00129f80
CMP dword ptr [RSP + 0x24],0x0
JZ 0x0017ed98
JMP 0x0017eda4
LAB_0017ed98:
JMP 0x0017ed9a
LAB_0017ed9a:
MOV dword ptr [RSP + 0x64],0x0
JMP 0x0017edac
LAB_0017eda4:
MOV dword ptr [RSP + 0x64],0xffffffff
LAB_0017edac:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4 JS_WriteArray(int8 *param_1,long param_2,int8 param_3)
{
bool bVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
uint local_30;
uint local_2c;
long local_28;
int8 *local_20;
long local_18;
int8 local_10;
local_28 = param_2;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
if (((char)*(int4 *)(param_1 + 7) == '\0') || ((*(byte *)(param_2 + 5) & 1) != 0)) {
bc_put_u8(param_1,9);
bVar1 = false;
}
else {
bc_put_u8(param_1,0xb);
bVar1 = true;
}
iVar2 = js_get_length32(*local_20,&local_30,local_18,local_10);
if (iVar2 == 0) {
bc_put_leb128(local_20,local_30);
for (local_2c = 0; local_2c < local_30; local_2c = local_2c + 1) {
auVar5 = JS_GetPropertyUint32(*local_20,local_18,local_10,local_2c);
uVar4 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
iVar2 = JS_IsException(uVar3,uVar4);
if (iVar2 != 0) {
return 0xffffffff;
}
iVar2 = JS_WriteObjectRec(local_20,uVar3,uVar4);
JS_FreeValue(*local_20,uVar3,uVar4);
if (iVar2 != 0) {
return 0xffffffff;
}
}
if (!bVar1) {
return 0;
}
auVar5 = JS_GetProperty(*local_20,local_18,local_10,0x71);
uVar4 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
iVar2 = JS_IsException(uVar3,uVar4);
if (iVar2 == 0) {
iVar2 = JS_WriteObjectRec(local_20,uVar3,uVar4);
JS_FreeValue(*local_20,uVar3,uVar4);
if (iVar2 == 0) {
return 0;
}
}
}
return 0xffffffff;
}
|
|
57,327
|
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t)
|
monkey531[P]llama/common/json.hpp
|
json_value(value_t t)
{
switch (t)
{
case value_t::object:
{
object = create<object_t>();
break;
}
case value_t::array:
{
array = create<array_t>();
break;
}
case value_t::string:
{
string = create<string_t>("");
break;
}
case value_t::binary:
{
binary = create<binary_t>();
break;
}
case value_t::boolean:
{
boolean = static_cast<boolean_t>(false);
break;
}
case value_t::number_integer:
{
number_integer = static_cast<number_integer_t>(0);
break;
}
case value_t::number_unsigned:
{
number_unsigned = static_cast<number_unsigned_t>(0);
break;
}
case value_t::number_float:
{
number_float = static_cast<number_float_t>(0.0);
break;
}
case value_t::null:
{
object = nullptr; // silence warning, see #821
break;
}
case value_t::discarded:
default:
{
object = nullptr; // silence warning, see #821
if (JSON_HEDLEY_UNLIKELY(t == value_t::null))
{
JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE
}
break;
}
}
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t):
pushq %rbx
movq %rdi, %rbx
cmpl $0x8, %esi
ja 0x3e3d3
movl %esi, %eax
leaq 0x6c006(%rip), %rcx # 0xaa3d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
andq $0x0, (%rbx)
jmp 0x3e402
callq 0x3e404
jmp 0x3e3ff
movb $0x0, (%rbx)
jmp 0x3e402
callq 0x3e446
jmp 0x3e3ff
leaq 0x7154c(%rip), %rdi # 0xaf93f
callq 0x3e488
jmp 0x3e3ff
callq 0x3e516
movq %rax, (%rbx)
popq %rbx
retq
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE:
push rbx
mov rbx, rdi
cmp esi, 8; switch 9 cases
ja short def_3E3D1; jumptable 000000000003E3D1 default case, cases 0,5-7
mov eax, esi
lea rcx, jpt_3E3D1
movsxd rax, ds:(jpt_3E3D1 - 0AA3D0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_3E3D1:
and qword ptr [rbx], 0; jumptable 000000000003E3D1 default case, cases 0,5-7
jmp short loc_3E402
loc_3E3D9:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; jumptable 000000000003E3D1 case 1
jmp short loc_3E3FF
loc_3E3E0:
mov byte ptr [rbx], 0; jumptable 000000000003E3D1 case 4
jmp short loc_3E402
loc_3E3E5:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; jumptable 000000000003E3D1 case 2
jmp short loc_3E3FF
loc_3E3EC:
lea rdi, aErrorWhileHand_0+34h; jumptable 000000000003E3D1 case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRA1_KcEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,char const(&)[1]>(char const(&)[1] &&)
jmp short loc_3E3FF
loc_3E3FA:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJEEEPT_DpOT0_; jumptable 000000000003E3D1 case 8
loc_3E3FF:
mov [rbx], rax
loc_3E402:
pop rbx
retn
|
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>::json_value::json_value(
_BYTE *a1,
unsigned int a2)
{
long long result; // rax
result = a2;
switch ( a2 )
{
case 1u:
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>();
goto LABEL_8;
case 2u:
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>();
goto LABEL_8;
case 3u:
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::string,char const(&)[1]>("");
goto LABEL_8;
case 4u:
*a1 = 0;
return result;
case 8u:
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>>();
LABEL_8:
*(_QWORD *)a1 = result;
break;
default:
*(_QWORD *)a1 = 0LL;
break;
}
return result;
}
|
json_value:
PUSH RBX
MOV RBX,RDI
CMP ESI,0x8
JA 0x0013e3d3
MOV EAX,ESI
LEA RCX,[0x1aa3d0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
AND qword ptr [RBX],0x0
JMP 0x0013e402
caseD_1:
CALL 0x0013e404
JMP 0x0013e3ff
caseD_4:
MOV byte ptr [RBX],0x0
JMP 0x0013e402
caseD_2:
CALL 0x0013e446
JMP 0x0013e3ff
caseD_3:
LEA RDI,[0x1af93f]
CALL 0x0013e488
JMP 0x0013e3ff
caseD_8:
CALL 0x0013e516
LAB_0013e3ff:
MOV qword ptr [RBX],RAX
LAB_0013e402:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) */
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>
::json_value::json_value(json_value *this,int4 param_2)
{
ordered_map *poVar1;
switch(param_2) {
default:
*(int8 *)this = 0;
return;
case 1:
poVar1 = create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
();
break;
case 2:
poVar1 = (ordered_map *)
create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
();
break;
case 3:
poVar1 = (ordered_map *)create<std::__cxx11::string,char_const(&)[1]>("");
break;
case 4:
*this = (json_value)0x0;
return;
case 8:
poVar1 = (ordered_map *)
create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>>
();
}
*(ordered_map **)this = poVar1;
return;
}
|
|
57,328
|
JS_ReadBigInt
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_ReadBigInt(BCReaderState *s)
{
JSValue obj;
uint8_t v8;
int32_t e;
uint32_t len;
limb_t l, i, n;
limb_t v;
bf_t *a;
obj = JS_NewBigInt(s->ctx);
if (JS_IsException(obj))
goto fail;
/* sign + exponent */
if (bc_get_sleb128(s, &e))
goto fail;
a = JS_GetBigInt(obj);
a->sign = e & 1;
e >>= 1;
if (e == 0)
a->expn = BF_EXP_ZERO;
else if (e == 1)
a->expn = BF_EXP_INF;
else if (e == 2)
a->expn = BF_EXP_NAN;
else if (e >= 3)
a->expn = e - 3;
else
a->expn = e;
/* mantissa */
if (a->expn != BF_EXP_ZERO &&
a->expn != BF_EXP_INF &&
a->expn != BF_EXP_NAN) {
if (bc_get_leb128(s, &len))
goto fail;
bc_read_trace(s, "len=%" PRId64 "\n", (int64_t)len);
if (len == 0) {
JS_ThrowRangeError(s->ctx, "maximum BigInt size exceeded");
goto fail;
}
l = (len + sizeof(limb_t) - 1) / sizeof(limb_t);
if (bf_resize(a, l)) {
JS_ThrowOutOfMemory(s->ctx);
goto fail;
}
n = len & (sizeof(limb_t) - 1);
if (n != 0) {
v = 0;
for(i = 0; i < n; i++) {
if (bc_get_u8(s, &v8))
goto fail;
v |= (limb_t)v8 << ((sizeof(limb_t) - n + i) * 8);
}
a->tab[0] = v;
i = 1;
} else {
i = 0;
}
for(; i < l; i++) {
#if LIMB_BITS == 32
if (bc_get_u32(s, &v))
goto fail;
#else
if (bc_get_u64(s, &v))
goto fail;
#endif
a->tab[i] = v;
}
}
return obj;
fail:
JS_FreeValue(s->ctx, obj);
return JS_EXCEPTION;
}
|
O0
|
c
|
JS_ReadBigInt:
subq $0x98, %rsp
movq %rdi, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rdi
callq 0x400c0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x82e16
jmp 0x830da
movq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x807d0
cmpl $0x0, %eax
je 0x82e32
jmp 0x830da
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x40140
movq %rax, 0x38(%rsp)
movl 0x68(%rsp), %ecx
andl $0x1, %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x8(%rax)
movl 0x68(%rsp), %eax
sarl %eax
movl %eax, 0x68(%rsp)
cmpl $0x0, 0x68(%rsp)
jne 0x82e7b
movq 0x38(%rsp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0x10(%rax)
jmp 0x82ee3
cmpl $0x1, 0x68(%rsp)
jne 0x82e97
movq 0x38(%rsp), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
movq %rcx, 0x10(%rax)
jmp 0x82ee1
cmpl $0x2, 0x68(%rsp)
jne 0x82eb3
movq 0x38(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq %rcx, 0x10(%rax)
jmp 0x82edf
cmpl $0x3, 0x68(%rsp)
jl 0x82ecf
movl 0x68(%rsp), %eax
subl $0x3, %eax
movslq %eax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x82edd
movslq 0x68(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x82edf
jmp 0x82ee1
jmp 0x82ee3
movq 0x38(%rsp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpq %rcx, 0x10(%rax)
je 0x830be
movq 0x38(%rsp), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, 0x10(%rax)
je 0x830be
movq 0x38(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
je 0x830be
movq 0x80(%rsp), %rdi
leaq 0x64(%rsp), %rsi
callq 0x804d0
cmpl $0x0, %eax
je 0x82f4a
jmp 0x830da
cmpl $0x0, 0x64(%rsp)
jne 0x82f79
movq 0x80(%rsp), %rax
movq (%rax), %rdi
leaq 0x91bac(%rip), %rsi # 0x114b0f
movb $0x0, %al
callq 0x2f960
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
jmp 0x830da
movl 0x64(%rsp), %eax
addq $0x8, %rax
subq $0x1, %rax
shrq $0x3, %rax
movq %rax, 0x58(%rsp)
movq 0x38(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xec2c0
cmpl $0x0, %eax
je 0x82fc1
movq 0x80(%rsp), %rax
movq (%rax), %rdi
callq 0x27f00
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
jmp 0x830da
movl 0x64(%rsp), %eax
andq $0x7, %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x83065
movq $0x0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0x83049
movq 0x80(%rsp), %rdi
leaq 0x6f(%rsp), %rsi
callq 0x80450
cmpl $0x0, %eax
je 0x83014
jmp 0x830da
movzbl 0x6f(%rsp), %eax
movl $0x8, %ecx
subq 0x48(%rsp), %rcx
addq 0x50(%rsp), %rcx
shlq $0x3, %rcx
shlq %cl, %rax
orq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x82fec
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rax
movq %rcx, (%rax)
movq $0x1, 0x50(%rsp)
jmp 0x8306e
movq $0x0, 0x50(%rsp)
jmp 0x83070
movq 0x50(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x830bc
movq 0x80(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x80850
cmpl $0x0, %eax
je 0x83095
jmp 0x830da
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x50(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x83070
jmp 0x830be
movq 0x70(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0x8310b
movq 0x80(%rsp), %rax
movq (%rax), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x29f80
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_ReadBigInt:
sub rsp, 98h
mov [rsp+98h+var_18], rdi
mov rax, [rsp+98h+var_18]
mov rdi, [rax]
call JS_NewBigInt
mov [rsp+98h+var_70], rax
mov [rsp+98h+var_68], rdx
mov rax, [rsp+98h+var_70]
mov [rsp+98h+var_28], rax
mov rax, [rsp+98h+var_68]
mov [rsp+98h+var_20], rax
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_20]
call JS_IsException_1
cmp eax, 0
jz short loc_82E16
jmp loc_830DA
loc_82E16:
mov rdi, [rsp+98h+var_18]
lea rsi, [rsp+98h+var_30]
call bc_get_sleb128
cmp eax, 0
jz short loc_82E32
jmp loc_830DA
loc_82E32:
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_20]
call JS_GetBigInt
mov [rsp+98h+var_60], rax
mov ecx, [rsp+98h+var_30]
and ecx, 1
mov rax, [rsp+98h+var_60]
mov [rax+8], ecx
mov eax, [rsp+98h+var_30]
sar eax, 1
mov [rsp+98h+var_30], eax
cmp [rsp+98h+var_30], 0
jnz short loc_82E7B
mov rax, [rsp+98h+var_60]
mov rcx, 8000000000000000h
mov [rax+10h], rcx
jmp short loc_82EE3
loc_82E7B:
cmp [rsp+98h+var_30], 1
jnz short loc_82E97
mov rax, [rsp+98h+var_60]
mov rcx, 7FFFFFFFFFFFFFFEh
mov [rax+10h], rcx
jmp short loc_82EE1
loc_82E97:
cmp [rsp+98h+var_30], 2
jnz short loc_82EB3
mov rax, [rsp+98h+var_60]
mov rcx, 7FFFFFFFFFFFFFFFh
mov [rax+10h], rcx
jmp short loc_82EDF
loc_82EB3:
cmp [rsp+98h+var_30], 3
jl short loc_82ECF
mov eax, [rsp+98h+var_30]
sub eax, 3
movsxd rcx, eax
mov rax, [rsp+98h+var_60]
mov [rax+10h], rcx
jmp short loc_82EDD
loc_82ECF:
movsxd rcx, [rsp+98h+var_30]
mov rax, [rsp+98h+var_60]
mov [rax+10h], rcx
loc_82EDD:
jmp short $+2
loc_82EDF:
jmp short $+2
loc_82EE1:
jmp short $+2
loc_82EE3:
mov rax, [rsp+98h+var_60]
mov rcx, 8000000000000000h
cmp [rax+10h], rcx
jz loc_830BE
mov rax, [rsp+98h+var_60]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp [rax+10h], rcx
jz loc_830BE
mov rax, [rsp+98h+var_60]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jz loc_830BE
mov rdi, [rsp+98h+var_18]
lea rsi, [rsp+98h+var_34]
call bc_get_leb128
cmp eax, 0
jz short loc_82F4A
jmp loc_830DA
loc_82F4A:
cmp [rsp+98h+var_34], 0
jnz short loc_82F79
mov rax, [rsp+98h+var_18]
mov rdi, [rax]
lea rsi, aMaximumBigintS; "maximum BigInt size exceeded"
mov al, 0
call JS_ThrowRangeError
mov [rsp+98h+var_80], rax
mov [rsp+98h+var_78], rdx
jmp loc_830DA
loc_82F79:
mov eax, [rsp+98h+var_34]
add rax, 8
sub rax, 1
shr rax, 3
mov [rsp+98h+var_40], rax
mov rdi, [rsp+98h+var_60]
mov rsi, [rsp+98h+var_40]
call bf_resize
cmp eax, 0
jz short loc_82FC1
mov rax, [rsp+98h+var_18]
mov rdi, [rax]
call JS_ThrowOutOfMemory
mov [rsp+98h+var_90], rax
mov [rsp+98h+var_88], rdx
jmp loc_830DA
loc_82FC1:
mov eax, [rsp+98h+var_34]
and rax, 7
mov [rsp+98h+var_50], rax
cmp [rsp+98h+var_50], 0
jz loc_83065
mov [rsp+98h+var_58], 0
mov [rsp+98h+var_48], 0
loc_82FEC:
mov rax, [rsp+98h+var_48]
cmp rax, [rsp+98h+var_50]
jnb short loc_83049
mov rdi, [rsp+98h+var_18]
lea rsi, [rsp+98h+var_29]
call bc_get_u8
cmp eax, 0
jz short loc_83014
jmp loc_830DA
loc_83014:
movzx eax, [rsp+98h+var_29]
mov ecx, 8
sub rcx, [rsp+98h+var_50]
add rcx, [rsp+98h+var_48]
shl rcx, 3
shl rax, cl
or rax, [rsp+98h+var_58]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_48]
add rax, 1
mov [rsp+98h+var_48], rax
jmp short loc_82FEC
loc_83049:
mov rcx, [rsp+98h+var_58]
mov rax, [rsp+98h+var_60]
mov rax, [rax+20h]
mov [rax], rcx
mov [rsp+98h+var_48], 1
jmp short loc_8306E
loc_83065:
mov [rsp+98h+var_48], 0
loc_8306E:
jmp short $+2
loc_83070:
mov rax, [rsp+98h+var_48]
cmp rax, [rsp+98h+var_40]
jnb short loc_830BC
mov rdi, [rsp+98h+var_18]
lea rsi, [rsp+98h+var_58]
call bc_get_u64
cmp eax, 0
jz short loc_83095
jmp short loc_830DA
loc_83095:
mov rdx, [rsp+98h+var_58]
mov rax, [rsp+98h+var_60]
mov rax, [rax+20h]
mov rcx, [rsp+98h+var_48]
mov [rax+rcx*8], rdx
mov rax, [rsp+98h+var_48]
add rax, 1
mov [rsp+98h+var_48], rax
jmp short loc_83070
loc_830BC:
jmp short $+2
loc_830BE:
mov rax, [rsp+98h+var_28]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_8], rax
jmp short loc_8310B
loc_830DA:
mov rax, [rsp+98h+var_18]
mov rdi, [rax]
mov rsi, [rsp+98h+var_28]
mov rdx, [rsp+98h+var_20]
call JS_FreeValue
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
loc_8310B:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
|
_DWORD * JS_ReadBigInt(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // rdx
double v10; // xmm4_8
double v11; // xmm5_8
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
unsigned long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
char v25; // [rsp+0h] [rbp-98h]
long long BigInt; // [rsp+38h] [rbp-60h]
unsigned long long v27; // [rsp+40h] [rbp-58h] BYREF
unsigned long long v28; // [rsp+48h] [rbp-50h]
unsigned long long i; // [rsp+50h] [rbp-48h]
unsigned long long v30; // [rsp+58h] [rbp-40h]
unsigned int v31; // [rsp+64h] [rbp-34h] BYREF
int v32; // [rsp+68h] [rbp-30h] BYREF
unsigned __int8 v33; // [rsp+6Fh] [rbp-29h] BYREF
_DWORD *v34; // [rsp+70h] [rbp-28h]
long long v35; // [rsp+78h] [rbp-20h]
long long *v36; // [rsp+80h] [rbp-18h]
_DWORD *v37; // [rsp+88h] [rbp-10h]
long long v38; // [rsp+90h] [rbp-8h]
v36 = a1;
v34 = JS_NewBigInt(*a1);
v35 = v9;
if ( JS_IsException_1((long long)v34, v9)
|| (unsigned int)bc_get_sleb128((long long)v36, &v32, a2, a3, a4, a5, v10, v11, a8, a9) )
{
goto LABEL_30;
}
BigInt = JS_GetBigInt((long long)v34);
*(_DWORD *)(BigInt + 8) = v32 & 1;
v32 >>= 1;
if ( v32 )
{
if ( v32 == 1 )
{
*(_QWORD *)(BigInt + 16) = 0x7FFFFFFFFFFFFFFELL;
}
else if ( v32 == 2 )
{
*(_QWORD *)(BigInt + 16) = 0x7FFFFFFFFFFFFFFFLL;
}
else if ( v32 < 3 )
{
*(_QWORD *)(BigInt + 16) = v32;
}
else
{
*(_QWORD *)(BigInt + 16) = v32 - 3;
}
}
else
{
*(_QWORD *)(BigInt + 16) = 0x8000000000000000LL;
}
if ( *(_QWORD *)(BigInt + 16) != 0x8000000000000000LL && *(long long *)(BigInt + 16) <= 0x7FFFFFFFFFFFFFFDLL )
{
if ( (unsigned int)bc_get_leb128((long long)v36, &v31) )
{
LABEL_30:
JS_FreeValue(*v36, (long long)v34, v35);
LODWORD(v37) = 0;
v38 = 6LL;
return v37;
}
if ( !v31 )
{
JS_ThrowRangeError(
*v36,
(long long)"maximum BigInt size exceeded",
v12,
v13,
v14,
v15,
a2,
a3,
a4,
a5,
v16,
v17,
a8,
a9,
v25);
goto LABEL_30;
}
v30 = ((unsigned long long)v31 + 7) >> 3;
if ( (unsigned int)bf_resize(BigInt, v30) )
{
JS_ThrowOutOfMemory(*v36, v30, v18, v19, v20, v21);
goto LABEL_30;
}
v28 = v31 & 7;
if ( (v31 & 7) != 0 )
{
v27 = 0LL;
for ( i = 0LL; ; ++i )
{
if ( i >= v28 )
{
v19 = v27;
**(_QWORD **)(BigInt + 32) = v27;
i = 1LL;
goto LABEL_26;
}
if ( (unsigned int)bc_get_u8((long long)v36, &v33) )
break;
v27 |= (unsigned long long)v33 << (8 * ((unsigned __int8)i + 8 - (unsigned __int8)v28));
}
goto LABEL_30;
}
i = 0LL;
LABEL_26:
while ( i < v30 )
{
if ( (unsigned int)bc_get_u64((long long)v36, &v27, v18, a2, a3, a4, a5, v22, v23, a8, a9, v19, v20, v21) )
goto LABEL_30;
v18 = v27;
v19 = i;
*(_QWORD *)(*(_QWORD *)(BigInt + 32) + 8 * i++) = v27;
}
}
v37 = v34;
v38 = v35;
return v37;
}
|
JS_ReadBigInt:
SUB RSP,0x98
MOV qword ptr [RSP + 0x80],RDI
MOV RAX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RAX]
CALL 0x001400c0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00182e16
JMP 0x001830da
LAB_00182e16:
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[RSP + 0x68]
CALL 0x001807d0
CMP EAX,0x0
JZ 0x00182e32
JMP 0x001830da
LAB_00182e32:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00140140
MOV qword ptr [RSP + 0x38],RAX
MOV ECX,dword ptr [RSP + 0x68]
AND ECX,0x1
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX + 0x8],ECX
MOV EAX,dword ptr [RSP + 0x68]
SAR EAX,0x1
MOV dword ptr [RSP + 0x68],EAX
CMP dword ptr [RSP + 0x68],0x0
JNZ 0x00182e7b
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,-0x8000000000000000
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00182ee3
LAB_00182e7b:
CMP dword ptr [RSP + 0x68],0x1
JNZ 0x00182e97
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,0x7ffffffffffffffe
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00182ee1
LAB_00182e97:
CMP dword ptr [RSP + 0x68],0x2
JNZ 0x00182eb3
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,0x7fffffffffffffff
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00182edf
LAB_00182eb3:
CMP dword ptr [RSP + 0x68],0x3
JL 0x00182ecf
MOV EAX,dword ptr [RSP + 0x68]
SUB EAX,0x3
MOVSXD RCX,EAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00182edd
LAB_00182ecf:
MOVSXD RCX,dword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x10],RCX
LAB_00182edd:
JMP 0x00182edf
LAB_00182edf:
JMP 0x00182ee1
LAB_00182ee1:
JMP 0x00182ee3
LAB_00182ee3:
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,-0x8000000000000000
CMP qword ptr [RAX + 0x10],RCX
JZ 0x001830be
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,0x7ffffffffffffffe
CMP qword ptr [RAX + 0x10],RCX
JZ 0x001830be
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,0x7fffffffffffffff
CMP qword ptr [RAX + 0x10],RCX
JZ 0x001830be
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[RSP + 0x64]
CALL 0x001804d0
CMP EAX,0x0
JZ 0x00182f4a
JMP 0x001830da
LAB_00182f4a:
CMP dword ptr [RSP + 0x64],0x0
JNZ 0x00182f79
MOV RAX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x214b0f]
MOV AL,0x0
CALL 0x0012f960
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
JMP 0x001830da
LAB_00182f79:
MOV EAX,dword ptr [RSP + 0x64]
ADD RAX,0x8
SUB RAX,0x1
SHR RAX,0x3
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001ec2c0
CMP EAX,0x0
JZ 0x00182fc1
MOV RAX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RAX]
CALL 0x00127f00
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
JMP 0x001830da
LAB_00182fc1:
MOV EAX,dword ptr [RSP + 0x64]
AND RAX,0x7
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JZ 0x00183065
MOV qword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x50],0x0
LAB_00182fec:
MOV RAX,qword ptr [RSP + 0x50]
CMP RAX,qword ptr [RSP + 0x48]
JNC 0x00183049
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[RSP + 0x6f]
CALL 0x00180450
CMP EAX,0x0
JZ 0x00183014
JMP 0x001830da
LAB_00183014:
MOVZX EAX,byte ptr [RSP + 0x6f]
MOV ECX,0x8
SUB RCX,qword ptr [RSP + 0x48]
ADD RCX,qword ptr [RSP + 0x50]
SHL RCX,0x3
SHL RAX,CL
OR RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x50]
ADD RAX,0x1
MOV qword ptr [RSP + 0x50],RAX
JMP 0x00182fec
LAB_00183049:
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RAX],RCX
MOV qword ptr [RSP + 0x50],0x1
JMP 0x0018306e
LAB_00183065:
MOV qword ptr [RSP + 0x50],0x0
LAB_0018306e:
JMP 0x00183070
LAB_00183070:
MOV RAX,qword ptr [RSP + 0x50]
CMP RAX,qword ptr [RSP + 0x58]
JNC 0x001830bc
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[RSP + 0x40]
CALL 0x00180850
CMP EAX,0x0
JZ 0x00183095
JMP 0x001830da
LAB_00183095:
MOV RDX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RSP + 0x50]
ADD RAX,0x1
MOV qword ptr [RSP + 0x50],RAX
JMP 0x00183070
LAB_001830bc:
JMP 0x001830be
LAB_001830be:
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x90],RAX
JMP 0x0018310b
LAB_001830da:
MOV RAX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x00129f80
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
LAB_0018310b:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16] JS_ReadBigInt(int8 *param_1)
{
int1 auVar1 [16];
int iVar2;
long lVar3;
ulong local_58;
ulong local_50;
ulong local_48;
ulong local_40;
uint local_34;
uint local_30;
byte local_29;
int1 local_28 [16];
int8 *local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_18 = param_1;
local_28 = JS_NewBigInt(*param_1);
iVar2 = JS_IsException(local_28._0_8_,local_28._8_8_);
if (iVar2 == 0) {
iVar2 = bc_get_sleb128(local_18,&local_30);
if (iVar2 == 0) {
lVar3 = JS_GetBigInt(local_28._0_8_,local_28._8_8_);
*(uint *)(lVar3 + 8) = local_30 & 1;
local_30 = (int)local_30 >> 1;
if (local_30 == 0) {
*(int8 *)(lVar3 + 0x10) = 0x8000000000000000;
}
else if (local_30 == 1) {
*(int8 *)(lVar3 + 0x10) = 0x7ffffffffffffffe;
}
else if (local_30 == 2) {
*(int8 *)(lVar3 + 0x10) = 0x7fffffffffffffff;
}
else if ((int)local_30 < 3) {
*(long *)(lVar3 + 0x10) = (long)(int)local_30;
}
else {
*(long *)(lVar3 + 0x10) = (long)(int)(local_30 - 3);
}
if (((*(long *)(lVar3 + 0x10) == -0x8000000000000000) ||
(*(long *)(lVar3 + 0x10) == 0x7ffffffffffffffe)) ||
(*(long *)(lVar3 + 0x10) == 0x7fffffffffffffff)) {
LAB_001830be:
local_10 = local_28._0_4_;
uStack_c = local_28._4_4_;
local_8 = local_28._8_8_;
goto LAB_0018310b;
}
iVar2 = bc_get_leb128(local_18,&local_34);
if (iVar2 == 0) {
if (local_34 == 0) {
JS_ThrowRangeError(*local_18,"maximum BigInt size exceeded");
}
else {
local_40 = (ulong)local_34 + 7 >> 3;
iVar2 = bf_resize(lVar3,local_40);
if (iVar2 == 0) {
local_50 = (ulong)local_34 & 7;
if ((local_34 & 7) == 0) {
local_48 = 0;
}
else {
local_58 = 0;
for (local_48 = 0; local_48 < local_50; local_48 = local_48 + 1) {
iVar2 = bc_get_u8(local_18,&local_29);
if (iVar2 != 0) goto LAB_001830da;
local_58 = (ulong)local_29 <<
((('\b' - (char)local_50) + (char)local_48) * '\b' & 0x3fU) | local_58;
}
**(ulong **)(lVar3 + 0x20) = local_58;
local_48 = 1;
}
for (; local_48 < local_40; local_48 = local_48 + 1) {
iVar2 = bc_get_u64(local_18,&local_58);
if (iVar2 != 0) goto LAB_001830da;
*(ulong *)(*(long *)(lVar3 + 0x20) + local_48 * 8) = local_58;
}
goto LAB_001830be;
}
JS_ThrowOutOfMemory(*local_18);
}
}
}
}
LAB_001830da:
JS_FreeValue(*local_18,local_28._0_8_,local_28._8_8_);
local_10 = 0;
local_8 = 6;
LAB_0018310b:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
57,329
|
my_string_metadata_get
|
eloqsql/strings/ctype.c
|
void
my_string_metadata_get(MY_STRING_METADATA *metadata,
CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbmaxlen == 1 && !(cs->state & MY_CS_NONASCII))
{
metadata->char_length= length;
metadata->repertoire= my_string_repertoire_8bit(cs, str, (ulong)length);
}
else
{
my_string_metadata_get_mb(metadata, cs, str, (ulong)length);
}
}
|
O3
|
c
|
my_string_metadata_get:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
cmpl $0x1, 0x9c(%rsi)
jne 0x8ca7d
testb $0x20, 0xd(%r12)
jne 0x8ca7d
movq %r14, (%rbx)
movl $0x3, %eax
testq %r14, %r14
je 0x8ca5d
movl $0x2000, %ecx # imm = 0x2000
andl 0xc(%r12), %ecx
jne 0x8ca78
testq %r14, %r14
jle 0x8ca73
addq %r15, %r14
cmpb $0x0, (%r15)
js 0x8ca78
incq %r15
cmpq %r14, %r15
jb 0x8ca65
movl $0x1, %eax
movl %eax, 0x8(%rbx)
jmp 0x8cae7
movl $0x1, 0x8(%rbx)
movq $0x0, (%rbx)
testq %r14, %r14
jle 0x8cae7
addq %r15, %r14
leaq -0x30(%rbp), %r13
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x28(%rax)
testl %eax, %eax
jle 0x8cac2
cmpq $0x80, -0x30(%rbp)
jb 0x8cada
orb $0x2, 0x8(%rbx)
jmp 0x8cada
je 0x8cad1
orb $0x2, 0x8(%rbx)
cmpl $-0x64, %eax
jb 0x8cae7
negl %eax
jmp 0x8cada
orb $0x2, 0x8(%rbx)
movl $0x1, %eax
movl %eax, %eax
addq %rax, %r15
incq (%rbx)
cmpq %r14, %r15
jb 0x8ca97
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_string_metadata_get:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
cmp dword ptr [rsi+9Ch], 1
jnz short loc_8CA7D
test byte ptr [r12+0Dh], 20h
jnz short loc_8CA7D
mov [rbx], r14
mov eax, 3
test r14, r14
jz short loc_8CA5D
mov ecx, 2000h
and ecx, [r12+0Ch]
jnz short loc_8CA78
loc_8CA5D:
test r14, r14
jle short loc_8CA73
add r14, r15
loc_8CA65:
cmp byte ptr [r15], 0
js short loc_8CA78
inc r15
cmp r15, r14
jb short loc_8CA65
loc_8CA73:
mov eax, 1
loc_8CA78:
mov [rbx+8], eax
jmp short loc_8CAE7
loc_8CA7D:
mov dword ptr [rbx+8], 1
mov qword ptr [rbx], 0
test r14, r14
jle short loc_8CAE7
add r14, r15
lea r13, [rbp+var_30]
loc_8CA97:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r13
mov rdx, r15
mov rcx, r14
call qword ptr [rax+28h]
test eax, eax
jle short loc_8CAC2
cmp [rbp+var_30], 80h
jb short loc_8CADA
or byte ptr [rbx+8], 2
jmp short loc_8CADA
loc_8CAC2:
jz short loc_8CAD1
or byte ptr [rbx+8], 2
cmp eax, 0FFFFFF9Ch
jb short loc_8CAE7
neg eax
jmp short loc_8CADA
loc_8CAD1:
or byte ptr [rbx+8], 2
mov eax, 1
loc_8CADA:
mov eax, eax
add r15, rax
inc qword ptr [rbx]
cmp r15, r14
jb short loc_8CA97
loc_8CAE7:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_string_metadata_get(long long a1, long long a2, char *a3, long long a4)
{
long long result; // rax
char *v5; // r15
unsigned long long v6; // r14
unsigned long long v7[6]; // [rsp+0h] [rbp-30h] BYREF
v7[0] = result;
v5 = a3;
if ( *(_DWORD *)(a2 + 156) != 1 || (*(_BYTE *)(a2 + 13) & 0x20) != 0 )
{
*(_DWORD *)(a1 + 8) = 1;
*(_QWORD *)a1 = 0LL;
if ( a4 > 0 )
{
v6 = (unsigned long long)&a3[a4];
do
{
result = (*(long long ( **)(long long, unsigned long long *, char *, unsigned long long))(*(_QWORD *)(a2 + 184)
+ 40LL))(
a2,
v7,
v5,
v6);
if ( (int)result <= 0 )
{
if ( (_DWORD)result )
{
*(_BYTE *)(a1 + 8) |= 2u;
if ( (unsigned int)result < 0xFFFFFF9C )
return result;
LODWORD(result) = -(int)result;
}
else
{
*(_BYTE *)(a1 + 8) |= 2u;
LODWORD(result) = 1;
}
}
else if ( v7[0] >= 0x80 )
{
*(_BYTE *)(a1 + 8) |= 2u;
}
result = (unsigned int)result;
v5 += (unsigned int)result;
++*(_QWORD *)a1;
}
while ( (unsigned long long)v5 < v6 );
}
}
else
{
*(_QWORD *)a1 = a4;
result = 3LL;
if ( !a4 || (*(_DWORD *)(a2 + 12) & 0x2000) == 0 )
{
if ( a4 <= 0 )
{
LABEL_8:
result = 1LL;
}
else
{
while ( *v5 >= 0 )
{
if ( ++v5 >= &a3[a4] )
goto LABEL_8;
}
}
}
*(_DWORD *)(a1 + 8) = result;
}
return result;
}
|
my_string_metadata_get:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
CMP dword ptr [RSI + 0x9c],0x1
JNZ 0x0018ca7d
TEST byte ptr [R12 + 0xd],0x20
JNZ 0x0018ca7d
MOV qword ptr [RBX],R14
MOV EAX,0x3
TEST R14,R14
JZ 0x0018ca5d
MOV ECX,0x2000
AND ECX,dword ptr [R12 + 0xc]
JNZ 0x0018ca78
LAB_0018ca5d:
TEST R14,R14
JLE 0x0018ca73
ADD R14,R15
LAB_0018ca65:
CMP byte ptr [R15],0x0
JS 0x0018ca78
INC R15
CMP R15,R14
JC 0x0018ca65
LAB_0018ca73:
MOV EAX,0x1
LAB_0018ca78:
MOV dword ptr [RBX + 0x8],EAX
JMP 0x0018cae7
LAB_0018ca7d:
MOV dword ptr [RBX + 0x8],0x1
MOV qword ptr [RBX],0x0
TEST R14,R14
JLE 0x0018cae7
ADD R14,R15
LEA R13,[RBP + -0x30]
LAB_0018ca97:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R13
MOV RDX,R15
MOV RCX,R14
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x0018cac2
CMP qword ptr [RBP + -0x30],0x80
JC 0x0018cada
OR byte ptr [RBX + 0x8],0x2
JMP 0x0018cada
LAB_0018cac2:
JZ 0x0018cad1
OR byte ptr [RBX + 0x8],0x2
CMP EAX,-0x64
JC 0x0018cae7
NEG EAX
JMP 0x0018cada
LAB_0018cad1:
OR byte ptr [RBX + 0x8],0x2
MOV EAX,0x1
LAB_0018cada:
MOV EAX,EAX
ADD R15,RAX
INC qword ptr [RBX]
CMP R15,R14
JC 0x0018ca97
LAB_0018cae7:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_string_metadata_get(long *param_1,long param_2,char *param_3,long param_4)
{
int4 uVar1;
uint uVar2;
ulong in_RAX;
char *pcVar3;
ulong local_38;
if ((*(int *)(param_2 + 0x9c) == 1) && ((*(byte *)(param_2 + 0xd) & 0x20) == 0)) {
*param_1 = param_4;
uVar1 = 3;
if ((param_4 == 0) || ((*(uint *)(param_2 + 0xc) & 0x2000) == 0)) {
if (0 < param_4) {
pcVar3 = param_3 + param_4;
do {
if (*param_3 < '\0') goto LAB_0018ca78;
param_3 = param_3 + 1;
} while (param_3 < pcVar3);
}
uVar1 = 1;
}
LAB_0018ca78:
*(int4 *)(param_1 + 1) = uVar1;
}
else {
*(int4 *)(param_1 + 1) = 1;
*param_1 = 0;
if (0 < param_4) {
pcVar3 = param_3 + param_4;
local_38 = in_RAX;
do {
uVar2 = (**(code **)(*(long *)(param_2 + 0xb8) + 0x28))(param_2,&local_38,param_3,pcVar3);
if ((int)uVar2 < 1) {
if (uVar2 == 0) {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
uVar2 = 1;
}
else {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
if (uVar2 < 0xffffff9c) {
return;
}
uVar2 = -uVar2;
}
}
else if (0x7f < local_38) {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
}
param_3 = param_3 + uVar2;
*param_1 = *param_1 + 1;
} while (param_3 < pcVar3);
}
}
return;
}
|
|
57,330
|
ma_copy_key
|
eloqsql/storage/maria/ma_key.c
|
void _ma_copy_key(MARIA_KEY *to, const MARIA_KEY *from)
{
memcpy(to->data, from->data, from->data_length + from->ref_length);
to->keyinfo= from->keyinfo;
to->data_length= from->data_length;
to->ref_length= from->ref_length;
to->flag= from->flag;
}
|
O3
|
c
|
ma_copy_key:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq (%rsi), %rsi
movl 0x14(%rbx), %edx
addl 0x10(%rbx), %edx
callq 0x29080
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movl 0x14(%rbx), %eax
movl %eax, 0x14(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r14)
popq %rbx
popq %r14
popq %rbp
retq
|
_ma_copy_key:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi]
mov rsi, [rsi]
mov edx, [rbx+14h]
add edx, [rbx+10h]
call _memcpy
mov rax, [rbx+8]
mov [r14+8], rax
mov eax, [rbx+10h]
mov [r14+10h], eax
mov eax, [rbx+14h]
mov [r14+14h], eax
mov eax, [rbx+18h]
mov [r14+18h], eax
pop rbx
pop r14
pop rbp
retn
|
long long ma_copy_key(long long a1, long long a2)
{
long long result; // rax
memcpy(*(_QWORD *)a1, *(_QWORD *)a2, (unsigned int)(*(_DWORD *)(a2 + 16) + *(_DWORD *)(a2 + 20)));
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8);
*(_DWORD *)(a1 + 16) = *(_DWORD *)(a2 + 16);
*(_DWORD *)(a1 + 20) = *(_DWORD *)(a2 + 20);
result = *(unsigned int *)(a2 + 24);
*(_DWORD *)(a1 + 24) = result;
return result;
}
|
_ma_copy_key:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
MOV EDX,dword ptr [RBX + 0x14]
ADD EDX,dword ptr [RBX + 0x10]
CALL 0x00129080
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [R14 + 0x8],RAX
MOV EAX,dword ptr [RBX + 0x10]
MOV dword ptr [R14 + 0x10],EAX
MOV EAX,dword ptr [RBX + 0x14]
MOV dword ptr [R14 + 0x14],EAX
MOV EAX,dword ptr [RBX + 0x18]
MOV dword ptr [R14 + 0x18],EAX
POP RBX
POP R14
POP RBP
RET
|
void _ma_copy_key(int8 *param_1,int8 *param_2)
{
memcpy((void *)*param_1,(void *)*param_2,
(ulong)(uint)(*(int *)((long)param_2 + 0x14) + *(int *)(param_2 + 2)));
param_1[1] = param_2[1];
*(int4 *)(param_1 + 2) = *(int4 *)(param_2 + 2);
*(int4 *)((long)param_1 + 0x14) = *(int4 *)((long)param_2 + 0x14);
*(int4 *)(param_1 + 3) = *(int4 *)(param_2 + 3);
return;
}
|
|
57,331
|
my_convert_using_func
|
eloqsql/strings/ctype.c
|
uint32
my_convert_using_func(char *to, size_t to_length,
CHARSET_INFO *to_cs, my_charset_conv_wc_mb wc_mb,
const char *from, size_t from_length,
CHARSET_INFO *from_cs, my_charset_conv_mb_wc mb_wc,
uint *errors)
{
int cnvres;
my_wc_t wc;
const uchar *from_end= (const uchar*) from + from_length;
char *to_start= to;
uchar *to_end= (uchar*) to + to_length;
uint error_count= 0;
while (1)
{
if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0)
from+= cnvres;
else if (cnvres == MY_CS_ILSEQ)
{
error_count++;
from++;
wc= '?';
}
else if (cnvres > MY_CS_TOOSMALL)
{
/*
A correct multibyte sequence detected
But it doesn't have Unicode mapping.
*/
error_count++;
from+= (-cnvres);
wc= '?';
}
else
{
if ((uchar *) from >= from_end)
break; /* End of line */
/* Incomplete byte sequence */
error_count++;
from++;
wc= '?';
}
outp:
if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0)
to+= cnvres;
else if (cnvres == MY_CS_ILUNI && wc != '?')
{
error_count++;
wc= '?';
goto outp;
}
else
break;
}
*errors= error_count;
return (uint32) (to - to_start);
}
|
O0
|
c
|
my_convert_using_func:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x48(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x751a4
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x75222
cmpl $0x0, -0x34(%rbp)
jne 0x751c9
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x75220
cmpl $-0x65, -0x34(%rbp)
jle 0x751f5
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
xorl %ecx, %ecx
subl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x7521e
movq -0x28(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x75201
jmp 0x7527c
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x75220
jmp 0x75222
jmp 0x75224
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x75255
movl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x75277
cmpl $0x0, -0x34(%rbp)
jne 0x75275
cmpq $0x3f, -0x40(%rbp)
je 0x75275
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x75224
jmp 0x7527c
jmp 0x75173
movl -0x5c(%rbp), %ecx
movq 0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_convert_using_func:
push rbp
mov rbp, rsp
sub rsp, 60h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_58], rax
mov [rbp+var_5C], 0
loc_75173:
mov rax, [rbp+arg_8]
mov rdi, [rbp+arg_0]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_48]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_751A4
mov ecx, [rbp+var_34]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp short loc_75222
loc_751A4:
cmp [rbp+var_34], 0
jnz short loc_751C9
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_75220
loc_751C9:
cmp [rbp+var_34], 0FFFFFF9Bh
jle short loc_751F5
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
xor ecx, ecx
sub ecx, [rbp+var_34]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_7521E
loc_751F5:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_48]
jb short loc_75201
jmp short loc_7527C
loc_75201:
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
loc_7521E:
jmp short $+2
loc_75220:
jmp short $+2
loc_75222:
jmp short $+2
loc_75224:
mov rax, [rbp+var_20]
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_8]
mov rcx, [rbp+var_58]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_75255
mov ecx, [rbp+var_34]
mov rax, [rbp+var_8]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_8], rax
jmp short loc_75277
loc_75255:
cmp [rbp+var_34], 0
jnz short loc_75275
cmp [rbp+var_40], 3Fh ; '?'
jz short loc_75275
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_75224
loc_75275:
jmp short loc_7527C
loc_75277:
jmp loc_75173
loc_7527C:
mov ecx, [rbp+var_5C]
mov rax, [rbp+arg_10]
mov [rax], ecx
mov rax, [rbp+var_8]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
|
long long my_convert_using_func(
long long a1,
long long a2,
long long a3,
long long ( *a4)(long long, long long, long long, long long),
unsigned long long a5,
long long a6,
long long a7,
long long ( *a8)(long long, long long *, unsigned long long, unsigned long long),
_DWORD *a9)
{
int v10; // [rsp+4h] [rbp-5Ch]
unsigned long long v11; // [rsp+18h] [rbp-48h]
long long v12; // [rsp+20h] [rbp-40h] BYREF
int v13; // [rsp+2Ch] [rbp-34h]
long long v14; // [rsp+30h] [rbp-30h]
unsigned long long v15; // [rsp+38h] [rbp-28h]
long long ( *v16)(long long, long long, long long, long long); // [rsp+40h] [rbp-20h]
long long v17; // [rsp+48h] [rbp-18h]
long long v18; // [rsp+50h] [rbp-10h]
long long v19; // [rsp+58h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v14 = a6;
v11 = a6 + a5;
v10 = 0;
while ( 1 )
{
v13 = a8(a7, &v12, v15, v11);
if ( v13 > 0 )
{
v15 += v13;
goto LABEL_10;
}
if ( !v13 )
{
++v10;
++v15;
v12 = 63LL;
goto LABEL_10;
}
if ( v13 > -101 )
{
++v10;
v15 += -v13;
v12 = 63LL;
goto LABEL_10;
}
if ( v15 >= v11 )
break;
++v10;
++v15;
v12 = 63LL;
LABEL_10:
while ( 1 )
{
v13 = v16(v17, v12, v19, a2 + a1);
if ( v13 > 0 )
break;
if ( v13 || v12 == 63 )
goto LABEL_15;
++v10;
v12 = 63LL;
}
v19 += v13;
}
LABEL_15:
*a9 = v10;
return v19 - a1;
}
|
my_convert_using_func:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV dword ptr [RBP + -0x5c],0x0
LAB_00175173:
MOV RAX,qword ptr [RBP + 0x18]
MOV RDI,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x001751a4
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00175222
LAB_001751a4:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x001751c9
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x00175220
LAB_001751c9:
CMP dword ptr [RBP + -0x34],-0x65
JLE 0x001751f5
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
XOR ECX,ECX
SUB ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x0017521e
LAB_001751f5:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x00175201
JMP 0x0017527c
LAB_00175201:
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
LAB_0017521e:
JMP 0x00175220
LAB_00175220:
JMP 0x00175222
LAB_00175222:
JMP 0x00175224
LAB_00175224:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x58]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x00175255
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00175277
LAB_00175255:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00175275
CMP qword ptr [RBP + -0x40],0x3f
JZ 0x00175275
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x00175224
LAB_00175275:
JMP 0x0017527c
LAB_00175277:
JMP 0x00175173
LAB_0017527c:
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + 0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_convert_using_func
(long param_1,long param_2,int8 param_3,code *param_4,ulong param_5,
long param_6,int8 param_7,code *param_8,int *param_9)
{
int local_64;
long local_48;
int local_3c;
long local_38;
ulong local_30;
code *local_28;
int8 local_20;
long local_18;
long local_10;
local_64 = 0;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
do {
local_3c = (*param_8)(param_7,&local_48,local_30);
if (local_3c < 1) {
if (local_3c == 0) {
local_30 = local_30 + 1;
}
else if (local_3c < -100) {
if (param_5 + param_6 <= local_30) {
LAB_0017527c:
*param_9 = local_64;
return local_10 - param_1;
}
local_30 = local_30 + 1;
}
else {
local_30 = local_30 + (long)-local_3c;
}
local_64 = local_64 + 1;
local_48 = 0x3f;
}
else {
local_30 = local_30 + (long)local_3c;
}
while (local_3c = (*local_28)(local_20,local_48,local_10,param_1 + param_2), local_3c < 1) {
if ((local_3c != 0) || (local_48 == 0x3f)) goto LAB_0017527c;
local_64 = local_64 + 1;
local_48 = 0x3f;
local_3c = 0;
}
local_10 = local_10 + local_3c;
} while( true );
}
|
|
57,332
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(nlohmann::json_abi_v3_11_3::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
|
basic_json& operator=(basic_json other) noexcept (
std::is_nothrow_move_constructible<value_t>::value&&
std::is_nothrow_move_assignable<value_t>::value&&
std::is_nothrow_move_constructible<json_value>::value&&
std::is_nothrow_move_assignable<json_value>::value&&
std::is_nothrow_move_assignable<json_base_class_t>::value
)
{
// check that passed value is valid
other.assert_invariant();
using std::swap;
swap(m_data.m_type, other.m_data.m_type);
swap(m_data.m_value, other.m_data.m_value);
json_base_class_t::operator=(std::move(other));
set_parents();
assert_invariant();
return *this;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(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
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rbp
movq %rsi, %rdi
movl %ebp, %esi
callq 0x65684
movb (%r14), %al
movb (%rbx), %cl
movb %cl, (%r14)
movb %al, (%rbx)
movq 0x8(%r14), %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x8(%rbx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x65684
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_:
push rbp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
push 1
pop rbp
mov rdi, rsi
mov esi, ebp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov al, [r14]
mov cl, [rbx]
mov [r14], cl
mov [rbx], al
mov rax, [r14+8]
mov rcx, [rbx+8]
mov [r14+8], rcx
mov [rbx+8], rax
mov rdi, r14
mov esi, ebp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, r14
pop rbx
pop r14
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
long long a1,
long long a2)
{
char v2; // al
long long v3; // rax
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a2);
v2 = *(_BYTE *)a1;
*(_BYTE *)a1 = *(_BYTE *)a2;
*(_BYTE *)a2 = v2;
v3 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v3;
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 a1;
}
|
operator=:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
PUSH 0x1
POP RBP
MOV RDI,RSI
MOV ESI,EBP
CALL 0x00165684
MOV AL,byte ptr [R14]
MOV CL,byte ptr [RBX]
MOV byte ptr [R14],CL
MOV byte ptr [RBX],AL
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [R14 + 0x8],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,R14
MOV ESI,EBP
CALL 0x00165684
MOV RAX,R14
POP RBX
POP R14
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::TEMPNAMEPLACEHOLDERVALUE(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>) */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
* __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
assert_invariant(SUB81(param_2,0));
bVar1 = *this;
*this = *param_2;
*param_2 = bVar1;
uVar2 = *(int8 *)(this + 8);
*(int8 *)(this + 8) = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = uVar2;
assert_invariant(SUB81(this,0));
return this;
}
|
|
57,333
|
pfs_get_sp_share_v1
|
eloqsql/storage/perfschema/pfs.cc
|
PSI_sp_share *pfs_get_sp_share_v1(uint sp_type,
const char* schema_name,
uint schema_name_length,
const char* object_name,
uint object_name_length)
{
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
if (object_name_length > COL_OBJECT_NAME_SIZE)
object_name_length= COL_OBJECT_NAME_SIZE;
if (schema_name_length > COL_OBJECT_SCHEMA_SIZE)
schema_name_length= COL_OBJECT_SCHEMA_SIZE;
PFS_program *pfs_program;
pfs_program= find_or_create_program(pfs_thread,
sp_type_to_object_type(sp_type),
object_name,
object_name_length,
schema_name,
schema_name_length);
return reinterpret_cast<PSI_sp_share *>(pfs_program);
}
|
O0
|
cpp
|
pfs_get_sp_share_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
callq 0x48dd0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4f9bf
movq $0x0, -0x8(%rbp)
jmp 0x4fa0f
cmpl $0x40, -0x2c(%rbp)
jbe 0x4f9cc
movl $0x40, -0x2c(%rbp)
cmpl $0x40, -0x1c(%rbp)
jbe 0x4f9d9
movl $0x40, -0x1c(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %edi
callq 0x4fa20
movq -0x48(%rbp), %rdi
movl %eax, %esi
movq -0x28(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %r8
movl -0x1c(%rbp), %r9d
callq 0x38060
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
pfs_get_sp_share_v1:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4F9BF
mov [rbp+var_8], 0
jmp short loc_4FA0F
loc_4F9BF:
cmp [rbp+var_2C], 40h ; '@'
jbe short loc_4F9CC
mov [rbp+var_2C], 40h ; '@'
loc_4F9CC:
cmp [rbp+var_1C], 40h ; '@'
jbe short loc_4F9D9
mov [rbp+var_1C], 40h ; '@'
loc_4F9D9:
mov rax, [rbp+var_38]
mov [rbp+var_48], rax
mov edi, [rbp+var_C]; unsigned int
call _ZL22sp_type_to_object_typej; sp_type_to_object_type(uint)
mov rdi, [rbp+var_48]
mov esi, eax
mov rdx, [rbp+var_28]
mov ecx, [rbp+var_2C]
mov r8, [rbp+var_18]
mov r9d, [rbp+var_1C]
call _Z22find_or_create_programP10PFS_thread16enum_object_typePKcjS3_j; find_or_create_program(PFS_thread *,enum_object_type,char const*,uint,char const*,uint)
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_4FA0F:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
PFS_atomic * pfs_get_sp_share_v1(unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5)
{
unsigned int v5; // eax
PFS_thread *THR_PFS; // [rsp+18h] [rbp-38h]
THR_PFS = (PFS_thread *)my_thread_get_THR_PFS();
if ( !THR_PFS )
return 0LL;
if ( a5 > 0x40 )
a5 = 64;
if ( a3 > 0x40 )
a3 = 64;
v5 = sp_type_to_object_type(a1);
return find_or_create_program(THR_PFS, v5, a4, a5, a2, a3);
}
|
pfs_get_sp_share_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
CALL 0x00148dd0
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014f9bf
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014fa0f
LAB_0014f9bf:
CMP dword ptr [RBP + -0x2c],0x40
JBE 0x0014f9cc
MOV dword ptr [RBP + -0x2c],0x40
LAB_0014f9cc:
CMP dword ptr [RBP + -0x1c],0x40
JBE 0x0014f9d9
MOV dword ptr [RBP + -0x1c],0x40
LAB_0014f9d9:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x0014fa20
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x2c]
MOV R8,qword ptr [RBP + -0x18]
MOV R9D,dword ptr [RBP + -0x1c]
CALL 0x00138060
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014fa0f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
int8
pfs_get_sp_share_v1(uint param_1,int8 param_2,uint param_3,int8 param_4,uint param_5)
{
int4 uVar1;
long lVar2;
int4 local_34;
int4 local_24;
int8 local_10;
lVar2 = my_thread_get_THR_PFS();
if (lVar2 == 0) {
local_10 = 0;
}
else {
local_34 = param_5;
if (0x40 < param_5) {
local_34 = 0x40;
}
local_24 = param_3;
if (0x40 < param_3) {
local_24 = 0x40;
}
uVar1 = sp_type_to_object_type(param_1);
local_10 = find_or_create_program(lVar2,uVar1,param_4,local_34,param_2,local_24);
}
return local_10;
}
|
|
57,334
|
pfs_get_sp_share_v1
|
eloqsql/storage/perfschema/pfs.cc
|
PSI_sp_share *pfs_get_sp_share_v1(uint sp_type,
const char* schema_name,
uint schema_name_length,
const char* object_name,
uint object_name_length)
{
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
if (object_name_length > COL_OBJECT_NAME_SIZE)
object_name_length= COL_OBJECT_NAME_SIZE;
if (schema_name_length > COL_OBJECT_SCHEMA_SIZE)
schema_name_length= COL_OBJECT_SCHEMA_SIZE;
PFS_program *pfs_program;
pfs_program= find_or_create_program(pfs_thread,
sp_type_to_object_type(sp_type),
object_name,
object_name_length,
schema_name,
schema_name_length);
return reinterpret_cast<PSI_sp_share *>(pfs_program);
}
|
O3
|
cpp
|
pfs_get_sp_share_v1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r15
movl %edx, %r13d
movq %rsi, %r14
movl %edi, %r12d
movl 0x3a8fb5(%rip), %edi # 0x3d3354
callq 0x26550
testq %rax, %rax
je 0x2a3f1
pushq $0x40
popq %r9
cmpl %r9d, %ebx
cmovael %r9d, %ebx
cmpl %r9d, %r13d
cmovbl %r13d, %r9d
decl %r12d
xorl %esi, %esi
cmpl $0x5, %r12d
ja 0x2a3d3
movl %r12d, %ecx
leaq 0x59648(%rip), %rdx # 0x83a18
movl (%rdx,%rcx,4), %esi
movq %rax, %rdi
movq %r15, %rdx
movl %ebx, %ecx
movq %r14, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x358c3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
pfs_get_sp_share_v1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, r8d
mov r15, rcx
mov r13d, edx
mov r14, rsi
mov r12d, edi
mov edi, cs:THR_PFS
call _pthread_getspecific
test rax, rax
jz short loc_2A3F1
push 40h ; '@'
pop r9
cmp ebx, r9d
cmovnb ebx, r9d
cmp r13d, r9d
cmovb r9d, r13d
dec r12d
xor esi, esi
cmp r12d, 5
ja short loc_2A3D3
mov ecx, r12d
lea rdx, unk_83A18
mov esi, [rdx+rcx*4]
loc_2A3D3:
mov rdi, rax
mov rdx, r15
mov ecx, ebx
mov r8, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _Z22find_or_create_programP10PFS_thread16enum_object_typePKcjS3_j; find_or_create_program(PFS_thread *,enum_object_type,char const*,uint,char const*,uint)
loc_2A3F1:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long pfs_get_sp_share_v1(int a1, long long a2, long long a3, long long a4, unsigned int a5)
{
long long v8; // rax
long long v9; // rsi
v8 = pthread_getspecific((unsigned int)THR_PFS);
if ( !v8 )
return 0LL;
if ( a5 >= 0x40 )
a5 = 64;
v9 = 0LL;
if ( (unsigned int)(a1 - 1) <= 5 )
v9 = dword_83A18[a1 - 1];
return find_or_create_program(v8, v9, a4, a5, a2);
}
|
pfs_get_sp_share_v1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,R8D
MOV R15,RCX
MOV R13D,EDX
MOV R14,RSI
MOV R12D,EDI
MOV EDI,dword ptr [0x004d3354]
CALL 0x00126550
TEST RAX,RAX
JZ 0x0012a3f1
PUSH 0x40
POP R9
CMP EBX,R9D
CMOVNC EBX,R9D
CMP R13D,R9D
CMOVC R9D,R13D
DEC R12D
XOR ESI,ESI
CMP R12D,0x5
JA 0x0012a3d3
MOV ECX,R12D
LEA RDX,[0x183a18]
MOV ESI,dword ptr [RDX + RCX*0x4]
LAB_0012a3d3:
MOV RDI,RAX
MOV RDX,R15
MOV ECX,EBX
MOV R8,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001358c3
LAB_0012a3f1:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
pfs_get_sp_share_v1(int param_1,int8 param_2,uint param_3,int8 param_4,uint param_5)
{
void *pvVar1;
int8 uVar2;
int4 uVar3;
uint uVar4;
pvVar1 = pthread_getspecific(THR_PFS);
if (pvVar1 != (void *)0x0) {
if (0x3f < param_5) {
param_5 = 0x40;
}
uVar4 = 0x40;
if (param_3 < 0x40) {
uVar4 = param_3;
}
uVar3 = 0;
if (param_1 - 1U < 6) {
uVar3 = *(int4 *)(&DAT_00183a18 + (ulong)(param_1 - 1U) * 4);
}
uVar2 = find_or_create_program(pvVar1,uVar3,param_4,param_5,param_2,uVar4);
return uVar2;
}
return 0;
}
|
|
57,335
|
LefDefParser::defiPinProp::addProperty(char const*, char const*, char)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinProp.cpp
|
void defiPinProp::addProperty(const char* name, const char* value,
const char type) {
int len;
if (numProps_ == propsAllocated_) {
int i;
char** nn;
char** nv;
double* nd;
char* nt;
propsAllocated_ *= 2;
nn = (char**)malloc(sizeof(char*)*propsAllocated_);
nv = (char**)malloc(sizeof(char*)*propsAllocated_);
nd = (double*)malloc(sizeof(double)*propsAllocated_);
nt = (char*)malloc(sizeof(char)*propsAllocated_);
for (i = 0; i < numProps_; i++) {
nn[i] = propNames_[i];
nv[i] = propValues_[i];
nd[i] = propDValues_[i];
nt[i] = propTypes_[i];
}
free((char*)(propNames_));
free((char*)(propValues_));
free((char*)(propDValues_));
free((char*)(propTypes_));
propNames_ = nn;
propValues_ = nv;
propDValues_ = nd;
propTypes_ = nt;
}
len = strlen(name) + 1;
propNames_[numProps_] = (char*)malloc(len);
strcpy(propNames_[numProps_], defData->DEFCASE(name));
len = strlen(value) + 1;
propValues_[numProps_] = (char*)malloc(len);
strcpy(propValues_[numProps_], defData->DEFCASE(value));
propDValues_[numProps_] = 0;
propTypes_[numProps_] = type;
numProps_ += 1;
}
|
O0
|
cpp
|
LefDefParser::defiPinProp::addProperty(char const*, char const*, char):
subq $0x68, %rsp
movb %cl, %al
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movb %al, 0x4f(%rsp)
movq 0x60(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movl 0x20(%rcx), %eax
cmpl 0x24(%rcx), %eax
jne 0x40d38
movq 0x18(%rsp), %rax
movl 0x24(%rax), %ecx
shll %ecx
movl %ecx, 0x24(%rax)
movslq 0x24(%rax), %rdi
shlq $0x3, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x38(%rsp)
movslq 0x24(%rax), %rdi
shlq $0x3, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rsp)
movslq 0x24(%rax), %rdi
shlq $0x3, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x28(%rsp)
movslq 0x24(%rax), %rdi
shlq $0x0, %rdi
callq 0x72d0
movq %rax, 0x20(%rsp)
movl $0x0, 0x44(%rsp)
movq 0x18(%rsp), %rcx
movl 0x44(%rsp), %eax
cmpl 0x20(%rcx), %eax
jge 0x40cd7
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rcx
movslq 0x44(%rsp), %rdx
movq (%rcx,%rdx,8), %rsi
movq 0x38(%rsp), %rcx
movslq 0x44(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x30(%rax), %rcx
movslq 0x44(%rsp), %rdx
movq (%rcx,%rdx,8), %rsi
movq 0x30(%rsp), %rcx
movslq 0x44(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x38(%rax), %rcx
movslq 0x44(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x28(%rsp), %rcx
movslq 0x44(%rsp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x40(%rax), %rax
movslq 0x44(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x20(%rsp), %rax
movslq 0x44(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x40c44
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x72a0
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x72a0
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x72a0
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x72a0
movq 0x18(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x40(%rax)
movq 0x58(%rsp), %rdi
callq 0x70e0
addq $0x1, %rax
movl %eax, 0x48(%rsp)
movslq 0x48(%rsp), %rdi
callq 0x72d0
movq %rax, %rsi
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rcx
movslq 0x20(%rax), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x28(%rax), %rcx
movslq 0x20(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x8(%rsp)
movq 0x48(%rax), %rdi
movq 0x58(%rsp), %rsi
callq 0x27ed0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x7220
movq 0x50(%rsp), %rdi
callq 0x70e0
addq $0x1, %rax
movl %eax, 0x48(%rsp)
movslq 0x48(%rsp), %rdi
callq 0x72d0
movq %rax, %rsi
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rcx
movslq 0x20(%rax), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x30(%rax), %rcx
movslq 0x20(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x10(%rsp)
movq 0x48(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x27ed0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x7220
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rcx
movslq 0x20(%rax), %rdx
xorps %xmm0, %xmm0
movsd %xmm0, (%rcx,%rdx,8)
movb 0x4f(%rsp), %sil
movq 0x40(%rax), %rcx
movslq 0x20(%rax), %rdx
movb %sil, (%rcx,%rdx)
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser11defiPinProp11addPropertyEPKcS2_c:
sub rsp, 68h
mov al, cl
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_19], al
mov rcx, [rsp+68h+var_8]
mov [rsp+68h+var_50], rcx
mov eax, [rcx+20h]
cmp eax, [rcx+24h]
jnz loc_40D38
mov rax, [rsp+68h+var_50]
mov ecx, [rax+24h]
shl ecx, 1
mov [rax+24h], ecx
movsxd rdi, dword ptr [rax+24h]
shl rdi, 3
call _malloc
mov rcx, rax
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_30], rcx
movsxd rdi, dword ptr [rax+24h]
shl rdi, 3
call _malloc
mov rcx, rax
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_38], rcx
movsxd rdi, dword ptr [rax+24h]
shl rdi, 3
call _malloc
mov rcx, rax
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_40], rcx
movsxd rdi, dword ptr [rax+24h]
shl rdi, 0
call _malloc
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_24], 0
loc_40C44:
mov rcx, [rsp+68h+var_50]
mov eax, [rsp+68h+var_24]
cmp eax, [rcx+20h]
jge loc_40CD7
mov rax, [rsp+68h+var_50]
mov rcx, [rax+28h]
movsxd rdx, [rsp+68h+var_24]
mov rsi, [rcx+rdx*8]
mov rcx, [rsp+68h+var_30]
movsxd rdx, [rsp+68h+var_24]
mov [rcx+rdx*8], rsi
mov rcx, [rax+30h]
movsxd rdx, [rsp+68h+var_24]
mov rsi, [rcx+rdx*8]
mov rcx, [rsp+68h+var_38]
movsxd rdx, [rsp+68h+var_24]
mov [rcx+rdx*8], rsi
mov rcx, [rax+38h]
movsxd rdx, [rsp+68h+var_24]
movsd xmm0, qword ptr [rcx+rdx*8]
mov rcx, [rsp+68h+var_40]
movsxd rdx, [rsp+68h+var_24]
movsd qword ptr [rcx+rdx*8], xmm0
mov rax, [rax+40h]
movsxd rcx, [rsp+68h+var_24]
mov dl, [rax+rcx]
mov rax, [rsp+68h+var_48]
movsxd rcx, [rsp+68h+var_24]
mov [rax+rcx], dl
mov eax, [rsp+68h+var_24]
add eax, 1
mov [rsp+68h+var_24], eax
jmp loc_40C44
loc_40CD7:
mov rax, [rsp+68h+var_50]
mov rdi, [rax+28h]
call _free
mov rax, [rsp+68h+var_50]
mov rdi, [rax+30h]
call _free
mov rax, [rsp+68h+var_50]
mov rdi, [rax+38h]
call _free
mov rax, [rsp+68h+var_50]
mov rdi, [rax+40h]
call _free
mov rax, [rsp+68h+var_50]
mov rcx, [rsp+68h+var_30]
mov [rax+28h], rcx
mov rcx, [rsp+68h+var_38]
mov [rax+30h], rcx
mov rcx, [rsp+68h+var_40]
mov [rax+38h], rcx
mov rcx, [rsp+68h+var_48]
mov [rax+40h], rcx
loc_40D38:
mov rdi, [rsp+68h+var_10]
call _strlen
add rax, 1
mov [rsp+68h+var_20], eax
movsxd rdi, [rsp+68h+var_20]
call _malloc
mov rsi, rax
mov rax, [rsp+68h+var_50]
mov rcx, [rax+28h]
movsxd rdx, dword ptr [rax+20h]
mov [rcx+rdx*8], rsi
mov rcx, [rax+28h]
movsxd rdx, dword ptr [rax+20h]
mov rcx, [rcx+rdx*8]
mov [rsp+68h+var_60], rcx
mov rdi, [rax+48h]; this
mov rsi, [rsp+68h+var_10]; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, [rsp+68h+var_60]
mov rsi, rax
call _strcpy
mov rdi, [rsp+68h+var_18]
call _strlen
add rax, 1
mov [rsp+68h+var_20], eax
movsxd rdi, [rsp+68h+var_20]
call _malloc
mov rsi, rax
mov rax, [rsp+68h+var_50]
mov rcx, [rax+30h]
movsxd rdx, dword ptr [rax+20h]
mov [rcx+rdx*8], rsi
mov rcx, [rax+30h]
movsxd rdx, dword ptr [rax+20h]
mov rcx, [rcx+rdx*8]
mov [rsp+68h+var_58], rcx
mov rdi, [rax+48h]; this
mov rsi, [rsp+68h+var_18]; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, [rsp+68h+var_58]
mov rsi, rax
call _strcpy
mov rax, [rsp+68h+var_50]
mov rcx, [rax+38h]
movsxd rdx, dword ptr [rax+20h]
xorps xmm0, xmm0
movsd qword ptr [rcx+rdx*8], xmm0
mov sil, [rsp+68h+var_19]
mov rcx, [rax+40h]
movsxd rdx, dword ptr [rax+20h]
mov [rcx+rdx], sil
mov ecx, [rax+20h]
add ecx, 1
mov [rax+20h], ecx
add rsp, 68h
retn
|
LefDefParser::defiPinProp * LefDefParser::defiPinProp::addProperty(
LefDefParser::defiPinProp *this,
const char *a2,
const char *a3,
char a4)
{
int v4; // eax
const char *v5; // rax
long long v6; // rdx
const char *v7; // rax
long long v8; // rdx
LefDefParser::defiPinProp *result; // rax
long long v10; // [rsp+8h] [rbp-60h]
long long v11; // [rsp+10h] [rbp-58h]
long long v12; // [rsp+20h] [rbp-48h]
long long v13; // [rsp+28h] [rbp-40h]
long long v14; // [rsp+30h] [rbp-38h]
long long v15; // [rsp+38h] [rbp-30h]
int i; // [rsp+44h] [rbp-24h]
int v17; // [rsp+48h] [rbp-20h]
if ( *((_DWORD *)this + 8) == *((_DWORD *)this + 9) )
{
*((_DWORD *)this + 9) *= 2;
v15 = malloc(8LL * *((int *)this + 9));
v14 = malloc(8LL * *((int *)this + 9));
v13 = malloc(8LL * *((int *)this + 9));
v12 = malloc(*((int *)this + 9));
for ( i = 0; i < *((_DWORD *)this + 8); ++i )
{
*(_QWORD *)(v15 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 5) + 8LL * i);
*(_QWORD *)(v14 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 6) + 8LL * i);
*(_QWORD *)(v13 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 7) + 8LL * i);
*(_BYTE *)(v12 + i) = *(_BYTE *)(*((_QWORD *)this + 8) + i);
}
free(*((_QWORD *)this + 5));
free(*((_QWORD *)this + 6));
free(*((_QWORD *)this + 7));
free(*((_QWORD *)this + 8));
*((_QWORD *)this + 5) = v15;
*((_QWORD *)this + 6) = v14;
*((_QWORD *)this + 7) = v13;
*((_QWORD *)this + 8) = v12;
}
v4 = strlen(a2);
*(_QWORD *)(*((_QWORD *)this + 5) + 8LL * *((int *)this + 8)) = malloc(v4 + 1);
v10 = *(_QWORD *)(*((_QWORD *)this + 5) + 8LL * *((int *)this + 8));
v5 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 9), a2);
strcpy(v10, v5, v6);
v17 = strlen(a3) + 1;
*(_QWORD *)(*((_QWORD *)this + 6) + 8LL * *((int *)this + 8)) = malloc(v17);
v11 = *(_QWORD *)(*((_QWORD *)this + 6) + 8LL * *((int *)this + 8));
v7 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 9), a3);
strcpy(v11, v7, v8);
result = this;
*(_QWORD *)(*((_QWORD *)this + 7) + 8LL * *((int *)this + 8)) = 0LL;
*(_BYTE *)(*((_QWORD *)this + 8) + (int)(*((_DWORD *)this + 8))++) = a4;
return result;
}
|
addProperty:
SUB RSP,0x68
MOV AL,CL
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV byte ptr [RSP + 0x4f],AL
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x18],RCX
MOV EAX,dword ptr [RCX + 0x20]
CMP EAX,dword ptr [RCX + 0x24]
JNZ 0x00140d38
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RAX + 0x24]
SHL ECX,0x1
MOV dword ptr [RAX + 0x24],ECX
MOVSXD RDI,dword ptr [RAX + 0x24]
SHL RDI,0x3
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RCX
MOVSXD RDI,dword ptr [RAX + 0x24]
SHL RDI,0x3
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x30],RCX
MOVSXD RDI,dword ptr [RAX + 0x24]
SHL RDI,0x3
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RCX
MOVSXD RDI,dword ptr [RAX + 0x24]
SHL RDI,0x0
CALL 0x001072d0
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x44],0x0
LAB_00140c44:
MOV RCX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0x44]
CMP EAX,dword ptr [RCX + 0x20]
JGE 0x00140cd7
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x28]
MOVSXD RDX,dword ptr [RSP + 0x44]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x38]
MOVSXD RDX,dword ptr [RSP + 0x44]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x30]
MOVSXD RDX,dword ptr [RSP + 0x44]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x30]
MOVSXD RDX,dword ptr [RSP + 0x44]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x38]
MOVSXD RDX,dword ptr [RSP + 0x44]
MOVSD XMM0,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x28]
MOVSXD RDX,dword ptr [RSP + 0x44]
MOVSD qword ptr [RCX + RDX*0x8],XMM0
MOV RAX,qword ptr [RAX + 0x40]
MOVSXD RCX,dword ptr [RSP + 0x44]
MOV DL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x44]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RSP + 0x44]
ADD EAX,0x1
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00140c44
LAB_00140cd7:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x28]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x40]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x28],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x30],RCX
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x38],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x40],RCX
LAB_00140d38:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001070e0
ADD RAX,0x1
MOV dword ptr [RSP + 0x48],EAX
MOVSXD RDI,dword ptr [RSP + 0x48]
CALL 0x001072d0
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x28]
MOVSXD RDX,dword ptr [RAX + 0x20]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x28]
MOVSXD RDX,dword ptr [RAX + 0x20]
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RDI,qword ptr [RAX + 0x48]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00127ed0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
CALL 0x00107220
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001070e0
ADD RAX,0x1
MOV dword ptr [RSP + 0x48],EAX
MOVSXD RDI,dword ptr [RSP + 0x48]
CALL 0x001072d0
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x30]
MOVSXD RDX,dword ptr [RAX + 0x20]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x30]
MOVSXD RDX,dword ptr [RAX + 0x20]
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV RDI,qword ptr [RAX + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00127ed0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
CALL 0x00107220
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x38]
MOVSXD RDX,dword ptr [RAX + 0x20]
XORPS XMM0,XMM0
MOVSD qword ptr [RCX + RDX*0x8],XMM0
MOV SIL,byte ptr [RSP + 0x4f]
MOV RCX,qword ptr [RAX + 0x40]
MOVSXD RDX,dword ptr [RAX + 0x20]
MOV byte ptr [RCX + RDX*0x1],SIL
MOV ECX,dword ptr [RAX + 0x20]
ADD ECX,0x1
MOV dword ptr [RAX + 0x20],ECX
ADD RSP,0x68
RET
|
/* LefDefParser::defiPinProp::addProperty(char const*, char const*, char) */
void __thiscall
LefDefParser::defiPinProp::addProperty(defiPinProp *this,char *param_1,char *param_2,char param_3)
{
char *pcVar1;
void *pvVar2;
void *pvVar3;
void *pvVar4;
void *pvVar5;
size_t sVar6;
char *pcVar7;
int local_24;
if (*(int *)(this + 0x20) == *(int *)(this + 0x24)) {
*(int *)(this + 0x24) = *(int *)(this + 0x24) << 1;
pvVar2 = malloc((long)*(int *)(this + 0x24) << 3);
pvVar3 = malloc((long)*(int *)(this + 0x24) << 3);
pvVar4 = malloc((long)*(int *)(this + 0x24) << 3);
pvVar5 = malloc((long)*(int *)(this + 0x24));
for (local_24 = 0; local_24 < *(int *)(this + 0x20); local_24 = local_24 + 1) {
*(int8 *)((long)pvVar2 + (long)local_24 * 8) =
*(int8 *)(*(long *)(this + 0x28) + (long)local_24 * 8);
*(int8 *)((long)pvVar3 + (long)local_24 * 8) =
*(int8 *)(*(long *)(this + 0x30) + (long)local_24 * 8);
*(int8 *)((long)pvVar4 + (long)local_24 * 8) =
*(int8 *)(*(long *)(this + 0x38) + (long)local_24 * 8);
*(int1 *)((long)pvVar5 + (long)local_24) =
*(int1 *)(*(long *)(this + 0x40) + (long)local_24);
}
free(*(void **)(this + 0x28));
free(*(void **)(this + 0x30));
free(*(void **)(this + 0x38));
free(*(void **)(this + 0x40));
*(void **)(this + 0x28) = pvVar2;
*(void **)(this + 0x30) = pvVar3;
*(void **)(this + 0x38) = pvVar4;
*(void **)(this + 0x40) = pvVar5;
}
sVar6 = strlen(param_1);
pvVar2 = malloc((long)((int)sVar6 + 1));
*(void **)(*(long *)(this + 0x28) + (long)*(int *)(this + 0x20) * 8) = pvVar2;
pcVar1 = *(char **)(*(long *)(this + 0x28) + (long)*(int *)(this + 0x20) * 8);
pcVar7 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x48),param_1);
strcpy(pcVar1,pcVar7);
sVar6 = strlen(param_2);
pvVar2 = malloc((long)((int)sVar6 + 1));
*(void **)(*(long *)(this + 0x30) + (long)*(int *)(this + 0x20) * 8) = pvVar2;
pcVar1 = *(char **)(*(long *)(this + 0x30) + (long)*(int *)(this + 0x20) * 8);
pcVar7 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x48),param_2);
strcpy(pcVar1,pcVar7);
*(int8 *)(*(long *)(this + 0x38) + (long)*(int *)(this + 0x20) * 8) = 0;
*(char *)(*(long *)(this + 0x40) + (long)*(int *)(this + 0x20)) = param_3;
*(int *)(this + 0x20) = *(int *)(this + 0x20) + 1;
return;
}
|
|
57,336
|
LefDefParser::defiPinProp::addProperty(char const*, char const*, char)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinProp.cpp
|
void defiPinProp::addProperty(const char* name, const char* value,
const char type) {
int len;
if (numProps_ == propsAllocated_) {
int i;
char** nn;
char** nv;
double* nd;
char* nt;
propsAllocated_ *= 2;
nn = (char**)malloc(sizeof(char*)*propsAllocated_);
nv = (char**)malloc(sizeof(char*)*propsAllocated_);
nd = (double*)malloc(sizeof(double)*propsAllocated_);
nt = (char*)malloc(sizeof(char)*propsAllocated_);
for (i = 0; i < numProps_; i++) {
nn[i] = propNames_[i];
nv[i] = propValues_[i];
nd[i] = propDValues_[i];
nt[i] = propTypes_[i];
}
free((char*)(propNames_));
free((char*)(propValues_));
free((char*)(propDValues_));
free((char*)(propTypes_));
propNames_ = nn;
propValues_ = nv;
propDValues_ = nd;
propTypes_ = nt;
}
len = strlen(name) + 1;
propNames_[numProps_] = (char*)malloc(len);
strcpy(propNames_[numProps_], defData->DEFCASE(name));
len = strlen(value) + 1;
propValues_[numProps_] = (char*)malloc(len);
strcpy(propValues_[numProps_], defData->DEFCASE(value));
propDValues_[numProps_] = 0;
propTypes_[numProps_] = type;
numProps_ += 1;
}
|
O3
|
cpp
|
LefDefParser::defiPinProp::addProperty(char const*, char const*, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
movl 0x20(%rdi), %r12d
cmpl 0x24(%rdi), %r12d
movl %ecx, 0x4(%rsp)
jne 0x27ceb
movq %r15, 0x8(%rsp)
movslq %r12d, %rbx
leaq (%rbx,%rbx), %r15
movl %r15d, 0x24(%r14)
shlq $0x4, %rbx
movq %rbx, %rdi
callq 0x7270
movq %rax, %r13
movq %rbx, %rdi
callq 0x7270
movq %rax, %rbp
movq %rbx, %rdi
callq 0x7270
movq %rax, %rbx
movq %r15, %rdi
callq 0x7270
movq %rax, %r15
movq 0x28(%r14), %rdi
testl %r12d, %r12d
jle 0x27cb0
movq 0x30(%r14), %rax
movq 0x38(%r14), %rcx
movq 0x40(%r14), %rdx
xorl %esi, %esi
movq (%rdi,%rsi,8), %r8
movq %r8, (%r13,%rsi,8)
movq (%rax,%rsi,8), %r8
movq %r8, (%rbp,%rsi,8)
movsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rbx,%rsi,8)
movb (%rdx,%rsi), %r8b
movb %r8b, (%r15,%rsi)
incq %rsi
cmpq %rsi, %r12
jne 0x27c84
callq 0x7220
movq 0x30(%r14), %rdi
callq 0x7220
movq 0x38(%r14), %rdi
callq 0x7220
movq 0x40(%r14), %rdi
callq 0x7220
movq %r13, 0x28(%r14)
movq %rbp, 0x30(%r14)
movq %rbx, 0x38(%r14)
movq %r15, 0x40(%r14)
movl 0x20(%r14), %r12d
movq 0x8(%rsp), %r15
jmp 0x27cef
movq 0x28(%r14), %r13
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
callq 0x70d0
incl %eax
movslq %eax, %rdi
callq 0x7270
movslq %r12d, %rcx
movq %rax, (%r13,%rcx,8)
movq 0x28(%r14), %rax
movq 0x48(%r14), %rdi
movq (%rax,%rcx,8), %rbx
movq %rbp, %rsi
callq 0x1b638
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
movq %r15, %rdi
callq 0x70d0
incl %eax
movslq %eax, %rdi
callq 0x7270
movq 0x30(%r14), %rcx
movslq 0x20(%r14), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x30(%r14), %rax
movq 0x48(%r14), %rdi
movq (%rax,%rdx,8), %rbx
movq %r15, %rsi
callq 0x1b638
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7190
movq 0x38(%r14), %rax
movslq 0x20(%r14), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x40(%r14), %rax
movl 0x4(%rsp), %edx
movb %dl, (%rax,%rcx)
incl 0x20(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN12LefDefParser11defiPinProp11addPropertyEPKcS2_c:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov [rsp+48h+var_38], rsi
mov r14, rdi
mov r12d, [rdi+20h]
cmp r12d, [rdi+24h]
mov [rsp+48h+var_44], ecx
jnz loc_27CEB
mov [rsp+48h+var_40], r15
movsxd rbx, r12d
lea r15, [rbx+rbx]
mov [r14+24h], r15d
shl rbx, 4
mov rdi, rbx
call _malloc
mov r13, rax
mov rdi, rbx
call _malloc
mov rbp, rax
mov rdi, rbx
call _malloc
mov rbx, rax
mov rdi, r15
call _malloc
mov r15, rax
mov rdi, [r14+28h]
test r12d, r12d
jle short loc_27CB0
mov rax, [r14+30h]
mov rcx, [r14+38h]
mov rdx, [r14+40h]
xor esi, esi
loc_27C84:
mov r8, [rdi+rsi*8]
mov [r13+rsi*8+0], r8
mov r8, [rax+rsi*8]
mov [rbp+rsi*8+0], r8
movsd xmm0, qword ptr [rcx+rsi*8]
movsd qword ptr [rbx+rsi*8], xmm0
mov r8b, [rdx+rsi]
mov [r15+rsi], r8b
inc rsi
cmp r12, rsi
jnz short loc_27C84
loc_27CB0:
call _free
mov rdi, [r14+30h]
call _free
mov rdi, [r14+38h]
call _free
mov rdi, [r14+40h]
call _free
mov [r14+28h], r13
mov [r14+30h], rbp
mov [r14+38h], rbx
mov [r14+40h], r15
mov r12d, [r14+20h]
mov r15, [rsp+48h+var_40]
jmp short loc_27CEF
loc_27CEB:
mov r13, [r14+28h]
loc_27CEF:
mov rbp, [rsp+48h+var_38]
mov rdi, rbp
call _strlen
inc eax
movsxd rdi, eax
call _malloc
movsxd rcx, r12d
mov [r13+rcx*8+0], rax
mov rax, [r14+28h]
mov rdi, [r14+48h]; this
mov rbx, [rax+rcx*8]
mov rsi, rbp; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, rbx
mov rsi, rax
call _strcpy
mov rdi, r15
call _strlen
inc eax
movsxd rdi, eax
call _malloc
mov rcx, [r14+30h]
movsxd rdx, dword ptr [r14+20h]
mov [rcx+rdx*8], rax
mov rax, [r14+30h]
mov rdi, [r14+48h]; this
mov rbx, [rax+rdx*8]
mov rsi, r15; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, rbx
mov rsi, rax
call _strcpy
mov rax, [r14+38h]
movsxd rcx, dword ptr [r14+20h]
mov qword ptr [rax+rcx*8], 0
mov rax, [r14+40h]
mov edx, [rsp+48h+var_44]
mov [rax+rcx], dl
inc dword ptr [r14+20h]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::defiPinProp::addProperty(
LefDefParser::defiPinProp *this,
const char *a2,
const char *a3,
char a4)
{
const char *v4; // r15
long long v6; // r12
long long v7; // r13
long long v8; // rbp
long long v9; // rbx
long long v10; // r15
_QWORD *v11; // rdi
long long v12; // rax
long long v13; // rcx
long long v14; // rdx
long long i; // rsi
int v16; // eax
long long v17; // rbx
const char *v18; // rax
int v19; // eax
long long v20; // rax
long long v21; // rdx
long long v22; // rbx
const char *v23; // rax
long long v24; // rcx
long long result; // rax
v4 = a3;
v6 = *((unsigned int *)this + 8);
if ( (_DWORD)v6 == *((_DWORD *)this + 9) )
{
*((_DWORD *)this + 9) = 2 * v6;
v7 = malloc(16LL * (int)v6);
v8 = malloc(16LL * (int)v6);
v9 = malloc(16LL * (int)v6);
v10 = malloc(2LL * (int)v6);
v11 = (_QWORD *)*((_QWORD *)this + 5);
if ( (int)v6 > 0 )
{
v12 = *((_QWORD *)this + 6);
v13 = *((_QWORD *)this + 7);
v14 = *((_QWORD *)this + 8);
for ( i = 0LL; i != v6; ++i )
{
*(_QWORD *)(v7 + 8 * i) = v11[i];
*(_QWORD *)(v8 + 8 * i) = *(_QWORD *)(v12 + 8 * i);
*(_QWORD *)(v9 + 8 * i) = *(_QWORD *)(v13 + 8 * i);
*(_BYTE *)(v10 + i) = *(_BYTE *)(v14 + i);
}
}
free(v11);
free(*((void **)this + 6));
free(*((void **)this + 7));
free(*((void **)this + 8));
*((_QWORD *)this + 5) = v7;
*((_QWORD *)this + 6) = v8;
*((_QWORD *)this + 7) = v9;
*((_QWORD *)this + 8) = v10;
LODWORD(v6) = *((_DWORD *)this + 8);
v4 = a3;
}
else
{
v7 = *((_QWORD *)this + 5);
}
v16 = strlen(a2);
*(_QWORD *)(v7 + 8LL * (int)v6) = malloc(v16 + 1);
v17 = *(_QWORD *)(*((_QWORD *)this + 5) + 8LL * (int)v6);
v18 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 9), a2);
strcpy(v17, v18);
v19 = strlen(v4);
v20 = malloc(v19 + 1);
v21 = *((int *)this + 8);
*(_QWORD *)(*((_QWORD *)this + 6) + 8 * v21) = v20;
v22 = *(_QWORD *)(*((_QWORD *)this + 6) + 8 * v21);
v23 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 9), v4);
strcpy(v22, v23);
v24 = *((int *)this + 8);
*(_QWORD *)(*((_QWORD *)this + 7) + 8 * v24) = 0LL;
result = *((_QWORD *)this + 8);
*(_BYTE *)(result + v24) = a4;
++*((_DWORD *)this + 8);
return result;
}
|
addProperty:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV qword ptr [RSP + 0x10],RSI
MOV R14,RDI
MOV R12D,dword ptr [RDI + 0x20]
CMP R12D,dword ptr [RDI + 0x24]
MOV dword ptr [RSP + 0x4],ECX
JNZ 0x00127ceb
MOV qword ptr [RSP + 0x8],R15
MOVSXD RBX,R12D
LEA R15,[RBX + RBX*0x1]
MOV dword ptr [R14 + 0x24],R15D
SHL RBX,0x4
MOV RDI,RBX
CALL 0x00107270
MOV R13,RAX
MOV RDI,RBX
CALL 0x00107270
MOV RBP,RAX
MOV RDI,RBX
CALL 0x00107270
MOV RBX,RAX
MOV RDI,R15
CALL 0x00107270
MOV R15,RAX
MOV RDI,qword ptr [R14 + 0x28]
TEST R12D,R12D
JLE 0x00127cb0
MOV RAX,qword ptr [R14 + 0x30]
MOV RCX,qword ptr [R14 + 0x38]
MOV RDX,qword ptr [R14 + 0x40]
XOR ESI,ESI
LAB_00127c84:
MOV R8,qword ptr [RDI + RSI*0x8]
MOV qword ptr [R13 + RSI*0x8],R8
MOV R8,qword ptr [RAX + RSI*0x8]
MOV qword ptr [RBP + RSI*0x8],R8
MOVSD XMM0,qword ptr [RCX + RSI*0x8]
MOVSD qword ptr [RBX + RSI*0x8],XMM0
MOV R8B,byte ptr [RDX + RSI*0x1]
MOV byte ptr [R15 + RSI*0x1],R8B
INC RSI
CMP R12,RSI
JNZ 0x00127c84
LAB_00127cb0:
CALL 0x00107220
MOV RDI,qword ptr [R14 + 0x30]
CALL 0x00107220
MOV RDI,qword ptr [R14 + 0x38]
CALL 0x00107220
MOV RDI,qword ptr [R14 + 0x40]
CALL 0x00107220
MOV qword ptr [R14 + 0x28],R13
MOV qword ptr [R14 + 0x30],RBP
MOV qword ptr [R14 + 0x38],RBX
MOV qword ptr [R14 + 0x40],R15
MOV R12D,dword ptr [R14 + 0x20]
MOV R15,qword ptr [RSP + 0x8]
JMP 0x00127cef
LAB_00127ceb:
MOV R13,qword ptr [R14 + 0x28]
LAB_00127cef:
MOV RBP,qword ptr [RSP + 0x10]
MOV RDI,RBP
CALL 0x001070d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOVSXD RCX,R12D
MOV qword ptr [R13 + RCX*0x8],RAX
MOV RAX,qword ptr [R14 + 0x28]
MOV RDI,qword ptr [R14 + 0x48]
MOV RBX,qword ptr [RAX + RCX*0x8]
MOV RSI,RBP
CALL 0x0011b638
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00107190
MOV RDI,R15
CALL 0x001070d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOV RCX,qword ptr [R14 + 0x30]
MOVSXD RDX,dword ptr [R14 + 0x20]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x48]
MOV RBX,qword ptr [RAX + RDX*0x8]
MOV RSI,R15
CALL 0x0011b638
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00107190
MOV RAX,qword ptr [R14 + 0x38]
MOVSXD RCX,dword ptr [R14 + 0x20]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [R14 + 0x40]
MOV EDX,dword ptr [RSP + 0x4]
MOV byte ptr [RAX + RCX*0x1],DL
INC dword ptr [R14 + 0x20]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiPinProp::addProperty(char const*, char const*, char) */
void __thiscall
LefDefParser::defiPinProp::addProperty(defiPinProp *this,char *param_1,char *param_2,char param_3)
{
int iVar1;
long lVar2;
long lVar3;
long lVar4;
char *pcVar5;
void *pvVar6;
void *pvVar7;
void *pvVar8;
void *pvVar9;
size_t sVar10;
void *pvVar11;
char *pcVar12;
size_t __size;
ulong uVar13;
uint uVar14;
uVar14 = *(uint *)(this + 0x20);
if (uVar14 == *(uint *)(this + 0x24)) {
sVar10 = (long)(int)uVar14 * 2;
*(int *)(this + 0x24) = (int)sVar10;
__size = (long)(int)uVar14 << 4;
pvVar6 = malloc(__size);
pvVar7 = malloc(__size);
pvVar8 = malloc(__size);
pvVar9 = malloc(sVar10);
pvVar11 = *(void **)(this + 0x28);
if (0 < (int)uVar14) {
lVar2 = *(long *)(this + 0x30);
lVar3 = *(long *)(this + 0x38);
lVar4 = *(long *)(this + 0x40);
uVar13 = 0;
do {
*(int8 *)((long)pvVar6 + uVar13 * 8) = *(int8 *)((long)pvVar11 + uVar13 * 8);
*(int8 *)((long)pvVar7 + uVar13 * 8) = *(int8 *)(lVar2 + uVar13 * 8);
*(int8 *)((long)pvVar8 + uVar13 * 8) = *(int8 *)(lVar3 + uVar13 * 8);
*(int1 *)((long)pvVar9 + uVar13) = *(int1 *)(lVar4 + uVar13);
uVar13 = uVar13 + 1;
} while (uVar14 != uVar13);
}
free(pvVar11);
free(*(void **)(this + 0x30));
free(*(void **)(this + 0x38));
free(*(void **)(this + 0x40));
*(void **)(this + 0x28) = pvVar6;
*(void **)(this + 0x30) = pvVar7;
*(void **)(this + 0x38) = pvVar8;
*(void **)(this + 0x40) = pvVar9;
uVar14 = *(uint *)(this + 0x20);
}
else {
pvVar6 = *(void **)(this + 0x28);
}
sVar10 = strlen(param_1);
pvVar11 = malloc((long)((int)sVar10 + 1));
*(void **)((long)pvVar6 + (long)(int)uVar14 * 8) = pvVar11;
pcVar5 = *(char **)(*(long *)(this + 0x28) + (long)(int)uVar14 * 8);
pcVar12 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x48),param_1);
strcpy(pcVar5,pcVar12);
sVar10 = strlen(param_2);
pvVar6 = malloc((long)((int)sVar10 + 1));
iVar1 = *(int *)(this + 0x20);
*(void **)(*(long *)(this + 0x30) + (long)iVar1 * 8) = pvVar6;
pcVar5 = *(char **)(*(long *)(this + 0x30) + (long)iVar1 * 8);
pcVar12 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x48),param_2);
strcpy(pcVar5,pcVar12);
iVar1 = *(int *)(this + 0x20);
*(int8 *)(*(long *)(this + 0x38) + (long)iVar1 * 8) = 0;
*(char *)(*(long *)(this + 0x40) + (long)iVar1) = param_3;
*(int *)(this + 0x20) = *(int *)(this + 0x20) + 1;
return;
}
|
|
57,337
|
fn_ext
|
eloqsql/mysys/mf_fn_ext.c
|
char *fn_ext(const char *name)
{
register const char *pos, *gpos;
DBUG_ENTER("fn_ext");
DBUG_PRINT("mfunkt",("name: '%s'",name));
#if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL)
{
char buff[FN_REFLEN];
size_t res_length;
gpos= name+ dirname_part(buff,(char*) name, &res_length);
}
#else
if (!(gpos= strrchr(name, FN_LIBCHAR)))
gpos= name;
#endif
pos= strchr(gpos, FN_EXTCHAR);
DBUG_RETURN((char*) (pos ? pos : strend(gpos)));
}
|
O0
|
c
|
fn_ext:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x82cce
movq -0x8(%rbp), %rdi
movl $0x2f, %esi
callq 0x38980
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x82cee
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2e, %esi
callq 0x38500
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x82d11
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x82d1e
movq -0x18(%rbp), %rdi
callq 0xd57e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
|
fn_ext:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
jmp short $+2
loc_82CCE:
mov rdi, [rbp+var_8]
mov esi, 2Fh ; '/'
call _strrchr
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_82CEE
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
loc_82CEE:
mov rdi, [rbp+var_18]
mov esi, 2Eh ; '.'
call _strchr
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_82D11
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
jmp short loc_82D1E
loc_82D11:
mov rdi, [rbp+var_18]
call strend
mov [rbp+var_20], rax
loc_82D1E:
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
|
long long fn_ext(long long a1)
{
long long v3; // [rsp+18h] [rbp-18h]
long long v4; // [rsp+20h] [rbp-10h]
v3 = strrchr(a1, 47LL);
if ( !v3 )
v3 = a1;
v4 = strchr(v3, 46LL);
if ( v4 )
return v4;
else
return strend(v3);
}
|
fn_ext:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00182cce
LAB_00182cce:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x2f
CALL 0x00138980
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00182cee
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00182cee:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x2e
CALL 0x00138500
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00182d11
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00182d1e
LAB_00182d11:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001d57e0
MOV qword ptr [RBP + -0x20],RAX
LAB_00182d1e:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
char * fn_ext(char *param_1)
{
int8 local_28;
int8 local_20;
local_20 = strrchr(param_1,0x2f);
if (local_20 == (char *)0x0) {
local_20 = param_1;
}
local_28 = strchr(local_20,0x2e);
if (local_28 == (char *)0x0) {
local_28 = (char *)strend(local_20);
}
return local_28;
}
|
|
57,338
|
my_instr_simple
|
eloqsql/strings/ctype-simple.c
|
uint my_instr_simple(CHARSET_INFO *cs,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skip:
while (str != end)
{
if (cs->sort_order[*str++] == cs->sort_order[*search])
{
register const uchar *i,*j;
i= str;
j= search+1;
while (j != search_end)
if (cs->sort_order[*i++] != cs->sort_order[*j++])
goto skip;
if (nmatch > 0)
{
match[0].beg= 0;
match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mb_len= match[0].end;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= match[1].end-match[1].beg;
}
}
return 2;
}
}
}
return 0;
}
|
O3
|
c
|
my_instr_simple:
xorl %eax, %eax
cmpq %rdx, %r8
ja 0x71308
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x10(%rbp), %r11d
testq %r8, %r8
je 0x712ce
addq %rsi, %rdx
subq %r8, %rdx
incq %rdx
movq %rsi, %r10
cmpq %rdx, %r10
je 0x712fe
movq %r10, %rbx
movq 0x58(%rdi), %r14
incq %r10
movzbl (%rbx), %r15d
movb (%r14,%r15), %r15b
movzbl (%rcx), %r12d
cmpb (%r14,%r12), %r15b
jne 0x7124e
movl $0x1, %r15d
cmpq %r15, %r8
je 0x71297
movzbl (%rbx,%r15), %r12d
movb (%r14,%r12), %r12b
movzbl (%rcx,%r15), %r13d
incq %r15
cmpb (%r14,%r13), %r12b
je 0x71279
jmp 0x7124e
movl $0x2, %eax
testl %r11d, %r11d
je 0x712fe
movl $0x0, (%r9)
notl %esi
addl %esi, %r10d
movl %r10d, 0x4(%r9)
movl %r10d, 0x8(%r9)
cmpl $0x1, %r11d
je 0x712fe
movl %r10d, 0xc(%r9)
addl %r8d, %r10d
movl $0x14, %ecx
movl $0x10, %edx
jmp 0x712ef
testl %r11d, %r11d
je 0x712f9
movl $0x0, (%r9)
movl $0x1, %eax
movl $0x8, %ecx
xorl %r10d, %r10d
movl $0x4, %edx
xorl %r8d, %r8d
movl %r10d, (%r9,%rdx)
movl %r8d, (%r9,%rcx)
jmp 0x712fe
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_instr_simple:
xor eax, eax
cmp r8, rdx
ja locret_71308
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov r11d, [rbp+10h]
test r8, r8
jz loc_712CE
add rdx, rsi
sub rdx, r8
inc rdx
mov r10, rsi
loc_7124E:
cmp r10, rdx
jz loc_712FE
mov rbx, r10
mov r14, [rdi+58h]
inc r10
movzx r15d, byte ptr [rbx]
mov r15b, [r14+r15]
movzx r12d, byte ptr [rcx]
cmp r15b, [r14+r12]
jnz short loc_7124E
mov r15d, 1
loc_71279:
cmp r8, r15
jz short loc_71297
movzx r12d, byte ptr [rbx+r15]
mov r12b, [r14+r12]
movzx r13d, byte ptr [rcx+r15]
inc r15
cmp r12b, [r14+r13]
jz short loc_71279
jmp short loc_7124E
loc_71297:
mov eax, 2
test r11d, r11d
jz short loc_712FE
mov dword ptr [r9], 0
not esi
add r10d, esi
mov [r9+4], r10d
mov [r9+8], r10d
cmp r11d, 1
jz short loc_712FE
mov [r9+0Ch], r10d
add r10d, r8d
mov ecx, 14h
mov edx, 10h
jmp short loc_712EF
loc_712CE:
test r11d, r11d
jz short loc_712F9
mov dword ptr [r9], 0
mov eax, 1
mov ecx, 8
xor r10d, r10d
mov edx, 4
xor r8d, r8d
loc_712EF:
mov [r9+rdx], r10d
mov [r9+rcx], r8d
jmp short loc_712FE
loc_712F9:
mov eax, 1
loc_712FE:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_71308:
retn
|
long long my_instr_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
_DWORD *a6,
int a7)
{
long long result; // rax
long long v8; // rdx
unsigned __int8 *v9; // r10
unsigned __int8 *v10; // rbx
long long v11; // r14
long long v12; // r15
char v13; // r12
long long v14; // r13
int v15; // r10d
int v16; // r10d
long long v17; // rcx
long long v18; // rdx
result = 0LL;
if ( a5 <= a3 )
{
if ( a5 )
{
v8 = (long long)&a2[a3 - a5 + 1];
v9 = a2;
LABEL_4:
while ( v9 != (unsigned __int8 *)v8 )
{
v10 = v9;
v11 = *(_QWORD *)(a1 + 88);
++v9;
if ( *(_BYTE *)(v11 + *v10) == *(_BYTE *)(v11 + *a4) )
{
v12 = 1LL;
while ( a5 != v12 )
{
v13 = *(_BYTE *)(v11 + v10[v12]);
v14 = a4[v12++];
if ( v13 != *(_BYTE *)(v11 + v14) )
goto LABEL_4;
}
result = 2LL;
if ( a7 )
{
*a6 = 0;
v15 = ~(_DWORD)a2 + (_DWORD)v9;
a6[1] = v15;
a6[2] = v15;
if ( a7 != 1 )
{
a6[3] = v15;
v16 = a5 + v15;
v17 = 5LL;
v18 = 4LL;
goto LABEL_15;
}
}
return result;
}
}
}
else if ( a7 )
{
*a6 = 0;
result = 1LL;
v17 = 2LL;
v16 = 0;
v18 = 1LL;
LODWORD(a5) = 0;
LABEL_15:
a6[v18] = v16;
a6[v17] = a5;
}
else
{
return 1LL;
}
}
return result;
}
|
my_instr_simple:
XOR EAX,EAX
CMP R8,RDX
JA 0x00171308
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R11D,dword ptr [RBP + 0x10]
TEST R8,R8
JZ 0x001712ce
ADD RDX,RSI
SUB RDX,R8
INC RDX
MOV R10,RSI
LAB_0017124e:
CMP R10,RDX
JZ 0x001712fe
MOV RBX,R10
MOV R14,qword ptr [RDI + 0x58]
INC R10
MOVZX R15D,byte ptr [RBX]
MOV R15B,byte ptr [R14 + R15*0x1]
MOVZX R12D,byte ptr [RCX]
CMP R15B,byte ptr [R14 + R12*0x1]
JNZ 0x0017124e
MOV R15D,0x1
LAB_00171279:
CMP R8,R15
JZ 0x00171297
MOVZX R12D,byte ptr [RBX + R15*0x1]
MOV R12B,byte ptr [R14 + R12*0x1]
MOVZX R13D,byte ptr [RCX + R15*0x1]
INC R15
CMP R12B,byte ptr [R14 + R13*0x1]
JZ 0x00171279
JMP 0x0017124e
LAB_00171297:
MOV EAX,0x2
TEST R11D,R11D
JZ 0x001712fe
MOV dword ptr [R9],0x0
NOT ESI
ADD R10D,ESI
MOV dword ptr [R9 + 0x4],R10D
MOV dword ptr [R9 + 0x8],R10D
CMP R11D,0x1
JZ 0x001712fe
MOV dword ptr [R9 + 0xc],R10D
ADD R10D,R8D
MOV ECX,0x14
MOV EDX,0x10
JMP 0x001712ef
LAB_001712ce:
TEST R11D,R11D
JZ 0x001712f9
MOV dword ptr [R9],0x0
MOV EAX,0x1
MOV ECX,0x8
XOR R10D,R10D
MOV EDX,0x4
XOR R8D,R8D
LAB_001712ef:
MOV dword ptr [R9 + RDX*0x1],R10D
MOV dword ptr [R9 + RCX*0x1],R8D
JMP 0x001712fe
LAB_001712f9:
MOV EAX,0x1
LAB_001712fe:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_00171308:
RET
|
int8
my_instr_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5,
int4 *param_6,int param_7)
{
byte *pbVar1;
byte *pbVar2;
int8 uVar3;
long lVar4;
long lVar5;
int iVar6;
byte *pbVar7;
byte *pbVar8;
ulong uVar9;
uVar3 = 0;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 == 0) {
uVar3 = 1;
}
else {
*param_6 = 0;
uVar3 = 1;
lVar4 = 8;
iVar6 = 0;
lVar5 = 4;
param_5 = 0;
LAB_001712ef:
*(int *)((long)param_6 + lVar5) = iVar6;
*(int *)((long)param_6 + lVar4) = (int)param_5;
}
}
else {
pbVar8 = param_2;
while (pbVar7 = pbVar8, pbVar7 != param_2 + (param_3 - param_5) + 1) {
lVar4 = *(long *)(param_1 + 0x58);
pbVar8 = pbVar7 + 1;
if (*(char *)(lVar4 + (ulong)*pbVar7) == *(char *)(lVar4 + (ulong)*param_4)) {
uVar9 = 1;
do {
if (param_5 == uVar9) {
uVar3 = 2;
if (param_7 == 0) {
return 2;
}
*param_6 = 0;
iVar6 = (int)pbVar8 + ~(uint)param_2;
param_6[1] = iVar6;
param_6[2] = iVar6;
if (param_7 == 1) {
return 2;
}
param_6[3] = iVar6;
iVar6 = iVar6 + (int)param_5;
lVar4 = 0x14;
lVar5 = 0x10;
goto LAB_001712ef;
}
pbVar1 = pbVar7 + uVar9;
pbVar2 = param_4 + uVar9;
uVar9 = uVar9 + 1;
} while (*(char *)(lVar4 + (ulong)*pbVar1) == *(char *)(lVar4 + (ulong)*pbVar2));
}
}
}
}
return uVar3;
}
|
|
57,339
|
ma_bitmap_create_missing_into_pagecache
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool
_ma_bitmap_create_missing_into_pagecache(MARIA_SHARE *share,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t from,
pgcache_page_no_t to,
uchar *zeroes)
{
pgcache_page_no_t i;
/*
We do not use my_chsize() because there can be a race between when it
reads the physical size and when it writes (assume data_file_length is 10,
physical length is 8 and two data pages are in cache, and here we do a
my_chsize: my_chsize sees physical length is 8, then the two data pages go
to disk then my_chsize writes from page 8 and so overwrites the two data
pages, wrongly).
We instead rely on the filesystem filling gaps with zeroes.
*/
for (i= from; i <= to; i+= bitmap->pages_covered)
{
/**
No need to keep them pinned, they are new so flushable.
@todo but we may want to keep them pinned, as an optimization: if they
are not pinned they may go to disk before the data pages go (so, the
physical pages would be in non-ascending "sparse" order on disk), or the
filesystem may fill gaps with zeroes physically which is a waste of
time.
*/
if (pagecache_write(share->pagecache,
&bitmap->file, i, 0,
zeroes, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE))
goto err;
}
/*
Data pages after data_file_length are full of zeroes but that is allowed
as they are marked empty in the bitmap.
*/
return FALSE;
err:
_ma_set_fatal_error_with_share(share, my_errno);
return TRUE;
}
|
O3
|
c
|
ma_bitmap_create_missing_into_pagecache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
xorl %r14d, %r14d
cmpq %rcx, %rdx
ja 0x42fb6
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
leaq 0x40(%rsi), %r15
movq -0x30(%rbp), %rax
movq 0x600(%rax), %rdi
movl 0x80(%rdi), %eax
movl %eax, 0x30(%rsp)
movl %r14d, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movl %r14d, 0x10(%rsp)
movl %r14d, (%rsp)
movl $0x1, 0x8(%rsp)
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movq -0x38(%rbp), %r8
movl $0x1, %r9d
callq 0x3497a
testb %al, %al
jne 0x42fa3
addq 0x138(%rbx), %r13
cmpq %r12, %r13
jbe 0x42f44
xorl %r14d, %r14d
jmp 0x42fb6
callq 0xa29fe
movl (%rax), %esi
movq -0x30(%rbp), %rdi
callq 0x3795e
movb $0x1, %r14b
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_bitmap_create_missing_into_pagecache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_38], r8
mov [rbp+var_30], rdi
xor r14d, r14d
cmp rdx, rcx
ja short loc_42FB6
mov r12, rcx
mov r13, rdx
mov rbx, rsi
lea r15, [rsi+40h]
loc_42F44:
mov rax, [rbp+var_30]
mov rdi, [rax+600h]
mov eax, [rdi+80h]
mov [rsp+70h+var_40], eax
mov [rsp+70h+var_48], r14d
xorps xmm0, xmm0
movups [rsp+70h+var_58], xmm0
mov [rsp+70h+var_60], r14d
mov [rsp+70h+var_70], r14d
mov [rsp+70h+var_68], 1
mov rsi, r15
mov rdx, r13
xor ecx, ecx
mov r8, [rbp+var_38]
mov r9d, 1
call pagecache_write_part
test al, al
jnz short loc_42FA3
add r13, [rbx+138h]
cmp r13, r12
jbe short loc_42F44
xor r14d, r14d
jmp short loc_42FB6
loc_42FA3:
call _my_thread_var
mov esi, [rax]
mov rdi, [rbp+var_30]
call _ma_set_fatal_error_with_share
mov r14b, 1
loc_42FB6:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_bitmap_create_missing_into_pagecache(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
char *a5)
{
unsigned int v5; // r14d
unsigned long long v7; // r13
char *v8; // r15
__m128i *v9; // rdi
long long v10; // rdx
long long v11; // rcx
long long v12; // r8
int *v13; // rax
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
int v17; // r9d
v5 = 0;
if ( a3 <= a4 )
{
v7 = a3;
v8 = (char *)(a2 + 64);
while ( 1 )
{
v9 = *(__m128i **)(a1 + 1536);
if ( (unsigned __int8)pagecache_write_part(v9, v8, v7, 0, a5, 1, 0, 1u, 0, 0LL, 0LL, 0, v9[8].m128i_u32[0]) )
break;
v7 += *(_QWORD *)(a2 + 312);
if ( v7 > a4 )
return 0;
}
v13 = (int *)my_thread_var(v9, v8, v10, v11, v12);
ma_set_fatal_error_with_share(a1, *v13, v14, v15, v16, v17);
LOBYTE(v5) = 1;
}
return v5;
}
|
_ma_bitmap_create_missing_into_pagecache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDI
XOR R14D,R14D
CMP RDX,RCX
JA 0x00142fb6
MOV R12,RCX
MOV R13,RDX
MOV RBX,RSI
LEA R15,[RSI + 0x40]
LAB_00142f44:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RDI + 0x80]
MOV dword ptr [RSP + 0x30],EAX
MOV dword ptr [RSP + 0x28],R14D
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV dword ptr [RSP + 0x10],R14D
MOV dword ptr [RSP],R14D
MOV dword ptr [RSP + 0x8],0x1
MOV RSI,R15
MOV RDX,R13
XOR ECX,ECX
MOV R8,qword ptr [RBP + -0x38]
MOV R9D,0x1
CALL 0x0013497a
TEST AL,AL
JNZ 0x00142fa3
ADD R13,qword ptr [RBX + 0x138]
CMP R13,R12
JBE 0x00142f44
XOR R14D,R14D
JMP 0x00142fb6
LAB_00142fa3:
CALL 0x001a29fe
MOV ESI,dword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0013795e
MOV R14B,0x1
LAB_00142fb6:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ma_bitmap_create_missing_into_pagecache
(long param_1,long param_2,ulong param_3,ulong param_4,int8 param_5)
{
char cVar1;
int4 *puVar2;
if (param_3 <= param_4) {
do {
cVar1 = pagecache_write_part
(*(long *)(param_1 + 0x600),param_2 + 0x40,param_3,0,param_5,1,0,1,0,0,0,0,
*(int4 *)(*(long *)(param_1 + 0x600) + 0x80));
if (cVar1 != '\0') {
puVar2 = (int4 *)_my_thread_var();
_ma_set_fatal_error_with_share(param_1,*puVar2);
return 1;
}
param_3 = param_3 + *(long *)(param_2 + 0x138);
} while (param_3 <= param_4);
}
return 0;
}
|
|
57,340
|
std::conditional<true, std::pair<std::vector<PolyLine<float>, std::allocator<PolyLine<float>>>, bool>, std::pair<PolyLine<float>, bool>>::type PolyLine<float>::elm<true, true>() const
|
zkingston[P]unknot/src/knot.hh
|
[[nodiscard]] auto elm() const -> std::
conditional_t<debug, std::pair<std::vector<PolyLine<RealT>>, bool>, std::pair<PolyLine<RealT>, bool>>
{
auto k_prime = *this;
bool removed = false;
std::vector<PolyLine<RealT>> result;
for (auto i = 0U; i < k_prime.size() and k_prime.size() > 3;)
{
const auto p0 = k_prime[i];
const auto &p_p = k_prime[(i + k_prime.size() - 1) % k_prime.size()];
const auto &p_n = k_prime[(i + 1) % k_prime.size()];
const auto &midpoint = interpolate(p_p, p_n, RealT{0.5});
const auto &zeros = k_prime.find_interpolation_intersections(i, midpoint);
// Ignore if full extent not possible
if (zeros.empty() or std::abs(zeros.back() - 1.) > epsilon)
{
i++;
continue;
}
// Check if vertex can be safely moved to all intermediate positions
bool valid = true;
for (const auto &z : zeros)
{
k_prime[i] = interpolate(p0, midpoint, z);
auto clr = k_prime.clearance();
if (clr < tolerance)
{
valid = false;
break;
}
}
k_prime[i] = p0;
if (valid)
{
// If in debug mode, record intermediate states
if constexpr (debug)
{
for (const auto &z : zeros)
{
k_prime[i] = interpolate(p0, midpoint, z);
result.emplace_back(k_prime);
}
}
// Remove vertex and restart from beginning
k_prime.remove(i);
removed = true;
i = 0;
if constexpr (debug)
{
result.emplace_back(k_prime);
}
if constexpr (only_one)
{
break;
}
}
else
{
i++;
}
}
if constexpr (debug)
{
return {result, removed};
}
else
{
return {k_prime, removed};
}
}
|
O0
|
cpp
|
std::conditional<true, std::pair<std::vector<PolyLine<float>, std::allocator<PolyLine<float>>>, bool>, std::pair<PolyLine<float>, bool>>::type PolyLine<float>::elm<true, true>() const:
subq $0x1a8, %rsp # imm = 0x1A8
movq %rdi, 0x80(%rsp)
movq %rdi, %rax
movq %rax, 0x88(%rsp)
movq %rdi, 0x1a0(%rsp)
movq %rsi, 0x198(%rsp)
movq 0x198(%rsp), %rsi
leaq 0x180(%rsp), %rdi
callq 0x8c6a0
movb $0x0, 0x17f(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x18170
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
movq %rax, 0x70(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x8c780
movq 0x70(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x7f(%rsp)
jae 0x93b93
leaq 0x180(%rsp), %rdi
callq 0x8c780
cmpq $0x3, %rax
seta %al
movb %al, 0x7f(%rsp)
movb 0x7f(%rsp), %al
testb $0x1, %al
jne 0x93ba0
jmp 0x9408e
movl 0x15c(%rsp), %eax
movl %eax, %esi
leaq 0x180(%rsp), %rdi
callq 0x94ea0
movq %rax, 0x68(%rsp)
jmp 0x93bbd
movq 0x68(%rsp), %rsi
leaq 0x150(%rsp), %rdi
callq 0x8a200
jmp 0x93bd1
movl 0x15c(%rsp), %eax
movq %rax, 0x48(%rsp)
leaq 0x180(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x8c780
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movq 0x48(%rsp), %rax
leaq -0x1(%rax,%rcx), %rax
movq %rax, 0x58(%rsp)
callq 0x8c780
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movq 0x58(%rsp), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
callq 0x94ea0
movq %rax, 0x60(%rsp)
jmp 0x93c2c
movq 0x60(%rsp), %rax
movq %rax, 0x138(%rsp)
movl 0x15c(%rsp), %eax
incl %eax
movq %rax, 0x38(%rsp)
leaq 0x180(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x8c780
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movq 0x38(%rsp), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
callq 0x94ea0
movq %rax, 0x40(%rsp)
jmp 0x93c7a
movq 0x40(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x138(%rsp), %rsi
movq 0x130(%rsp), %rdx
leaq 0x11c(%rsp), %rdi
vmovss 0x538379(%rip), %xmm0 # 0x5cc020
callq 0x94ed0
jmp 0x93cae
leaq 0x11c(%rsp), %rax
movq %rax, 0x128(%rsp)
movl 0x15c(%rsp), %eax
movl %eax, %edx
movq 0x128(%rsp), %rcx
leaq 0xf8(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x94f80
jmp 0x93ce6
leaq 0xf8(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rdi
callq 0x95460
testb $0x1, %al
jne 0x93d3b
movq 0x110(%rsp), %rdi
callq 0x954b0
vmovss (%rax), %xmm1
vcvtss2sd %xmm1, %xmm0, %xmm0
vmovsd 0x53833c(%rip), %xmm1 # 0x5cc060
vsubsd %xmm1, %xmm0, %xmm0
callq 0x8e090
vmovsd 0x538333(%rip), %xmm1 # 0x5cc068
vucomisd %xmm1, %xmm0
jbe 0x93d75
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
movl $0x3, 0xf4(%rsp)
jmp 0x9405b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x940e2
movb $0x1, 0xf3(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x954f0
movq %rax, 0xe0(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x95520
movq %rax, 0xd8(%rsp)
leaq 0xe0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x95550
testb $0x1, %al
jne 0x93dd5
jmp 0x93ebf
leaq 0xe0(%rsp), %rdi
callq 0x95590
movq %rax, 0xd0(%rsp)
movq 0x128(%rsp), %rdx
movq 0xd0(%rsp), %rax
vmovss (%rax), %xmm0
leaq 0xc4(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x94ed0
jmp 0x93e15
movl 0x15c(%rsp), %eax
movl %eax, %esi
leaq 0x180(%rsp), %rdi
callq 0x94ea0
movq %rax, 0x28(%rsp)
jmp 0x93e32
movq 0x28(%rsp), %rdi
leaq 0xc4(%rsp), %rsi
callq 0x955a0
leaq 0x180(%rsp), %rdi
callq 0x955d0
vmovss %xmm0, 0x24(%rsp)
jmp 0x93e59
vmovss 0x24(%rsp), %xmm0
vmovss %xmm0, 0xc0(%rsp)
vmovss 0x5381b8(%rip), %xmm0 # 0x5cc028
vucomiss 0xc0(%rsp), %xmm0
jbe 0x93eab
movb $0x0, 0xf3(%rsp)
jmp 0x93ebf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x94e40
jmp 0x940e2
jmp 0x93ead
leaq 0xe0(%rsp), %rdi
callq 0x95710
jmp 0x93db7
movl 0x15c(%rsp), %eax
movl %eax, %esi
leaq 0x180(%rsp), %rdi
callq 0x94ea0
movq %rax, 0x18(%rsp)
jmp 0x93edc
movq 0x18(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x8adc0
jmp 0x93ef0
testb $0x1, 0xf3(%rsp)
je 0x9403f
movq 0x110(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x954f0
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x95520
movq %rax, 0xa8(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x95550
testb $0x1, %al
jne 0x93f56
jmp 0x93ff0
leaq 0xb0(%rsp), %rdi
callq 0x95590
movq %rax, 0xa0(%rsp)
movq 0x128(%rsp), %rdx
movq 0xa0(%rsp), %rax
vmovss (%rax), %xmm0
leaq 0x94(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x94ed0
jmp 0x93f96
movl 0x15c(%rsp), %eax
movl %eax, %esi
leaq 0x180(%rsp), %rdi
callq 0x94ea0
movq %rax, 0x10(%rsp)
jmp 0x93fb3
movq 0x10(%rsp), %rdi
leaq 0x94(%rsp), %rsi
callq 0x955a0
leaq 0x160(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x95730
jmp 0x93fdc
jmp 0x93fde
leaq 0xb0(%rsp), %rdi
callq 0x95710
jmp 0x93f38
movl 0x15c(%rsp), %eax
movl %eax, %esi
leaq 0x180(%rsp), %rdi
callq 0x957b0
jmp 0x94008
movb $0x1, 0x17f(%rsp)
movl $0x0, 0x15c(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x95730
jmp 0x94032
movl $0x2, 0xf4(%rsp)
jmp 0x9405b
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
movl $0x0, 0xf4(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x94e40
movl 0xf4(%rsp), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x94089
jmp 0x94079
movl 0xc(%rsp), %eax
subl $0x2, %eax
je 0x9408e
jmp 0x94084
jmp 0x93b4f
jmp 0x93b4f
movq 0x80(%rsp), %rdi
leaq 0x160(%rsp), %rsi
leaq 0x17f(%rsp), %rdx
callq 0x95810
jmp 0x940ad
movl $0x1, 0xf4(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x18e10
leaq 0x180(%rsp), %rdi
callq 0x18160
movq 0x88(%rsp), %rax
addq $0x1a8, %rsp # imm = 0x1A8
retq
leaq 0x160(%rsp), %rdi
callq 0x18e10
leaq 0x180(%rsp), %rdi
callq 0x18160
movq 0x148(%rsp), %rdi
callq 0x13540
nopl (%rax)
|
_ZNK8PolyLineIfE3elmILb1ELb1EEENSt11conditionalIXT0_ESt4pairISt6vectorIS0_SaIS0_EEbES3_IS0_bEE4typeEv:
sub rsp, 1A8h
mov [rsp+1A8h+var_128], rdi
mov rax, rdi
mov [rsp+1A8h+var_120], rax
mov [rsp+1A8h+var_8], rdi
mov [rsp+1A8h+var_10], rsi
mov rsi, [rsp+1A8h+var_10]
lea rdi, [rsp+1A8h+var_28]
call _ZN8PolyLineIfEC2ERKS0_; PolyLine<float>::PolyLine(PolyLine<float> const&)
mov [rsp+1A8h+var_29], 0
lea rdi, [rsp+1A8h+var_48]
call _ZNSt6vectorI8PolyLineIfESaIS1_EEC2Ev; std::vector<PolyLine<float>>::vector(void)
mov [rsp+1A8h+var_4C], 0
loc_93B4F:
mov eax, [rsp+1A8h+var_4C]
mov [rsp+1A8h+var_138], rax
lea rdi, [rsp+1A8h+var_28]
call _ZNK8PolyLineIfE4sizeEv; PolyLine<float>::size(void)
mov rcx, [rsp+1A8h+var_138]
mov rdx, rax
xor eax, eax
cmp rcx, rdx
mov [rsp+1A8h+var_129], al
jnb short loc_93B93
lea rdi, [rsp+1A8h+var_28]
call _ZNK8PolyLineIfE4sizeEv; PolyLine<float>::size(void)
cmp rax, 3
setnbe al
mov [rsp+1A8h+var_129], al
loc_93B93:
mov al, [rsp+1A8h+var_129]
test al, 1
jnz short loc_93BA0
jmp loc_9408E
loc_93BA0:
mov eax, [rsp+1A8h+var_4C]
mov esi, eax
lea rdi, [rsp+1A8h+var_28]
call _ZN8PolyLineIfEixEm; PolyLine<float>::operator[](ulong)
mov [rsp+1A8h+var_140], rax
jmp short $+2
loc_93BBD:
mov rsi, [rsp+1A8h+var_140]
lea rdi, [rsp+1A8h+var_58]
call _ZN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEC2ERKS1_; Eigen::Matrix<float,3,1,0,3,1>::Matrix(Eigen::Matrix<float,3,1,0,3,1> const&)
jmp short $+2
loc_93BD1:
mov eax, [rsp+1A8h+var_4C]
mov [rsp+1A8h+var_160], rax
lea rdi, [rsp+1A8h+var_28]
mov [rsp+1A8h+var_158], rdi
call _ZNK8PolyLineIfE4sizeEv; PolyLine<float>::size(void)
mov rdi, [rsp+1A8h+var_158]
mov rcx, rax
mov rax, [rsp+1A8h+var_160]
lea rax, [rax+rcx-1]
mov [rsp+1A8h+var_150], rax
call _ZNK8PolyLineIfE4sizeEv; PolyLine<float>::size(void)
mov rdi, [rsp+1A8h+var_158]
mov rcx, rax
mov rax, [rsp+1A8h+var_150]
xor edx, edx
div rcx
mov rsi, rdx
call _ZN8PolyLineIfEixEm; PolyLine<float>::operator[](ulong)
mov [rsp+1A8h+var_148], rax
jmp short $+2
loc_93C2C:
mov rax, [rsp+1A8h+var_148]
mov [rsp+1A8h+var_70], rax
mov eax, [rsp+1A8h+var_4C]
inc eax
mov [rsp+1A8h+var_170], rax
lea rdi, [rsp+1A8h+var_28]
mov [rsp+1A8h+var_178], rdi
call _ZNK8PolyLineIfE4sizeEv; PolyLine<float>::size(void)
mov rdi, [rsp+1A8h+var_178]
mov rcx, rax
mov rax, [rsp+1A8h+var_170]
xor edx, edx
div rcx
mov rsi, rdx
call _ZN8PolyLineIfEixEm; PolyLine<float>::operator[](ulong)
mov [rsp+1A8h+var_168], rax
jmp short $+2
loc_93C7A:
mov rax, [rsp+1A8h+var_168]
mov [rsp+1A8h+var_78], rax
mov rsi, [rsp+1A8h+var_70]
mov rdx, [rsp+1A8h+var_78]
lea rdi, [rsp+1A8h+var_8C]
vmovss xmm0, cs:flt_5CC020
call _Z11interpolateIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEET0_RKS3_S5_T_; interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&,float)
jmp short $+2
loc_93CAE:
lea rax, [rsp+1A8h+var_8C]
mov [rsp+1A8h+var_80], rax
mov eax, [rsp+1A8h+var_4C]
mov edx, eax
mov rcx, [rsp+1A8h+var_80]
lea rdi, [rsp+1A8h+var_B0]
lea rsi, [rsp+1A8h+var_28]
call _ZNK8PolyLineIfE32find_interpolation_intersectionsEmRKN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEE; PolyLine<float>::find_interpolation_intersections(ulong,Eigen::Matrix<float,3,1,0,3,1> const&)
jmp short $+2
loc_93CE6:
lea rax, [rsp+1A8h+var_B0]
mov [rsp+1A8h+var_98], rax
mov rdi, [rsp+1A8h+var_98]
call _ZNKSt6vectorIfSaIfEE5emptyEv; std::vector<float>::empty(void)
test al, 1
jnz short loc_93D3B
mov rdi, [rsp+1A8h+var_98]
call _ZNKSt6vectorIfSaIfEE4backEv; std::vector<float>::back(void)
vmovss xmm1, dword ptr [rax]
vcvtss2sd xmm0, xmm0, xmm1
vmovsd xmm1, cs:dbl_5CC060
vsubsd xmm0, xmm0, xmm1; double
call _ZSt3absd; std::abs(double)
vmovsd xmm1, cs:qword_5CC068
vucomisd xmm0, xmm1
jbe short loc_93D75
loc_93D3B:
mov eax, [rsp+1A8h+var_4C]
add eax, 1
mov [rsp+1A8h+var_4C], eax
mov [rsp+1A8h+var_B4], 3
jmp loc_9405B
mov rcx, rax
mov eax, edx
mov [rsp+arg_140], rcx
mov [rsp+arg_13C], eax
jmp loc_940E2
loc_93D75:
mov [rsp+1A8h+var_B5], 1
mov rax, [rsp+1A8h+var_98]
mov [rsp+1A8h+var_C0], rax
mov rdi, [rsp+1A8h+var_C0]
call _ZNKSt6vectorIfSaIfEE5beginEv; std::vector<float>::begin(void)
mov [rsp+1A8h+var_C8], rax
mov rdi, [rsp+1A8h+var_C0]
call _ZNKSt6vectorIfSaIfEE3endEv; std::vector<float>::end(void)
mov [rsp+1A8h+var_D0], rax
loc_93DB7:
lea rdi, [rsp+1A8h+var_C8]
lea rsi, [rsp+1A8h+var_D0]
call _ZN9__gnu_cxxneIPKfSt6vectorIfSaIfEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<float const*,std::vector<float>>(__gnu_cxx::__normal_iterator<float const*,std::vector<float>> const&,__gnu_cxx::__normal_iterator<float const*,std::vector<float>> const&)
test al, 1
jnz short loc_93DD5
jmp loc_93EBF
loc_93DD5:
lea rdi, [rsp+1A8h+var_C8]
call _ZNK9__gnu_cxx17__normal_iteratorIPKfSt6vectorIfSaIfEEEdeEv; __gnu_cxx::__normal_iterator<float const*,std::vector<float>>::operator*(void)
mov [rsp+1A8h+var_D8], rax
mov rdx, [rsp+1A8h+var_80]
mov rax, [rsp+1A8h+var_D8]
vmovss xmm0, dword ptr [rax]
lea rdi, [rsp+1A8h+var_E4]
lea rsi, [rsp+1A8h+var_58]
call _Z11interpolateIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEET0_RKS3_S5_T_; interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&,float)
jmp short $+2
loc_93E15:
mov eax, [rsp+1A8h+var_4C]
mov esi, eax
lea rdi, [rsp+1A8h+var_28]
call _ZN8PolyLineIfEixEm; PolyLine<float>::operator[](ulong)
mov [rsp+1A8h+var_180], rax
jmp short $+2
loc_93E32:
mov rdi, [rsp+1A8h+var_180]
lea rsi, [rsp+1A8h+var_E4]
call _ZN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEaSEOS1_; Eigen::Matrix<float,3,1,0,3,1>::operator=(Eigen::Matrix<float,3,1,0,3,1>&&)
lea rdi, [rsp+1A8h+var_28]
call _ZNK8PolyLineIfE9clearanceEv; PolyLine<float>::clearance(void)
vmovss [rsp+1A8h+var_184], xmm0
jmp short $+2
loc_93E59:
vmovss xmm0, [rsp+1A8h+var_184]
vmovss [rsp+1A8h+var_E8], xmm0
vmovss xmm0, cs:dword_5CC028
vucomiss xmm0, [rsp+1A8h+var_E8]
jbe short loc_93EAB
mov [rsp+1A8h+var_B5], 0
jmp short loc_93EBF
mov rcx, rax
mov eax, edx
mov [rsp+arg_140], rcx
mov [rsp+arg_13C], eax
lea rdi, [rsp+arg_F0]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
jmp loc_940E2
loc_93EAB:
jmp short $+2
loc_93EAD:
lea rdi, [rsp+1A8h+var_C8]
call _ZN9__gnu_cxx17__normal_iteratorIPKfSt6vectorIfSaIfEEEppEv; __gnu_cxx::__normal_iterator<float const*,std::vector<float>>::operator++(void)
jmp loc_93DB7
loc_93EBF:
mov eax, [rsp+1A8h+var_4C]
mov esi, eax
lea rdi, [rsp+1A8h+var_28]
call _ZN8PolyLineIfEixEm; PolyLine<float>::operator[](ulong)
mov [rsp+1A8h+var_190], rax
jmp short $+2
loc_93EDC:
mov rdi, [rsp+1A8h+var_190]
lea rsi, [rsp+1A8h+var_58]
call _ZN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEaSERKS1_; Eigen::Matrix<float,3,1,0,3,1>::operator=(Eigen::Matrix<float,3,1,0,3,1> const&)
jmp short $+2
loc_93EF0:
test [rsp+1A8h+var_B5], 1
jz loc_9403F
mov rax, [rsp+1A8h+var_98]
mov [rsp+1A8h+var_F0], rax
mov rdi, [rsp+1A8h+var_F0]
call _ZNKSt6vectorIfSaIfEE5beginEv; std::vector<float>::begin(void)
mov [rsp+1A8h+var_F8], rax
mov rdi, [rsp+1A8h+var_F0]
call _ZNKSt6vectorIfSaIfEE3endEv; std::vector<float>::end(void)
mov [rsp+1A8h+var_100], rax
loc_93F38:
lea rdi, [rsp+1A8h+var_F8]
lea rsi, [rsp+1A8h+var_100]
call _ZN9__gnu_cxxneIPKfSt6vectorIfSaIfEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<float const*,std::vector<float>>(__gnu_cxx::__normal_iterator<float const*,std::vector<float>> const&,__gnu_cxx::__normal_iterator<float const*,std::vector<float>> const&)
test al, 1
jnz short loc_93F56
jmp loc_93FF0
loc_93F56:
lea rdi, [rsp+1A8h+var_F8]
call _ZNK9__gnu_cxx17__normal_iteratorIPKfSt6vectorIfSaIfEEEdeEv; __gnu_cxx::__normal_iterator<float const*,std::vector<float>>::operator*(void)
mov [rsp+1A8h+var_108], rax
mov rdx, [rsp+1A8h+var_80]
mov rax, [rsp+1A8h+var_108]
vmovss xmm0, dword ptr [rax]
lea rdi, [rsp+1A8h+var_114]
lea rsi, [rsp+1A8h+var_58]
call _Z11interpolateIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEET0_RKS3_S5_T_; interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&,float)
jmp short $+2
loc_93F96:
mov eax, [rsp+1A8h+var_4C]
mov esi, eax
lea rdi, [rsp+1A8h+var_28]
call _ZN8PolyLineIfEixEm; PolyLine<float>::operator[](ulong)
mov [rsp+1A8h+var_198], rax
jmp short $+2
loc_93FB3:
mov rdi, [rsp+1A8h+var_198]
lea rsi, [rsp+1A8h+var_114]
call _ZN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEaSEOS1_; Eigen::Matrix<float,3,1,0,3,1>::operator=(Eigen::Matrix<float,3,1,0,3,1>&&)
lea rdi, [rsp+1A8h+var_48]
lea rsi, [rsp+1A8h+var_28]
call _ZNSt6vectorI8PolyLineIfESaIS1_EE12emplace_backIJRS1_EEES5_DpOT_; std::vector<PolyLine<float>>::emplace_back<PolyLine<float>&>(PolyLine<float>&)
jmp short $+2
loc_93FDC:
jmp short $+2
loc_93FDE:
lea rdi, [rsp+1A8h+var_F8]
call _ZN9__gnu_cxx17__normal_iteratorIPKfSt6vectorIfSaIfEEEppEv; __gnu_cxx::__normal_iterator<float const*,std::vector<float>>::operator++(void)
jmp loc_93F38
loc_93FF0:
mov eax, [rsp+1A8h+var_4C]
mov esi, eax
lea rdi, [rsp+1A8h+var_28]
call _ZN8PolyLineIfE6removeEm; PolyLine<float>::remove(ulong)
jmp short $+2
loc_94008:
mov [rsp+1A8h+var_29], 1
mov [rsp+1A8h+var_4C], 0
lea rdi, [rsp+1A8h+var_48]
lea rsi, [rsp+1A8h+var_28]
call _ZNSt6vectorI8PolyLineIfESaIS1_EE12emplace_backIJRS1_EEES5_DpOT_; std::vector<PolyLine<float>>::emplace_back<PolyLine<float>&>(PolyLine<float>&)
jmp short $+2
loc_94032:
mov [rsp+1A8h+var_B4], 2
jmp short loc_9405B
loc_9403F:
mov eax, [rsp+1A8h+var_4C]
add eax, 1
mov [rsp+1A8h+var_4C], eax
mov [rsp+1A8h+var_B4], 0
loc_9405B:
lea rdi, [rsp+1A8h+var_B0]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
mov eax, [rsp+1A8h+var_B4]
mov [rsp+1A8h+var_19C], eax
test eax, eax
jz short loc_94089
jmp short $+2
loc_94079:
mov eax, [rsp+1A8h+var_19C]
sub eax, 2
jz short loc_9408E
jmp short $+2
loc_94084:
jmp loc_93B4F
loc_94089:
jmp loc_93B4F
loc_9408E:
mov rdi, [rsp+1A8h+var_128]
lea rsi, [rsp+1A8h+var_48]
lea rdx, [rsp+1A8h+var_29]
call _ZNSt4pairISt6vectorI8PolyLineIfESaIS2_EEbEC2IRS4_RbTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_
jmp short $+2
loc_940AD:
mov [rsp+1A8h+var_B4], 1
lea rdi, [rsp+1A8h+var_48]
call _ZNSt6vectorI8PolyLineIfESaIS1_EED2Ev; std::vector<PolyLine<float>>::~vector()
lea rdi, [rsp+1A8h+var_28]
call _ZN8PolyLineIfED2Ev; PolyLine<float>::~PolyLine()
mov rax, [rsp+1A8h+var_120]
add rsp, 1A8h
retn
loc_940E2:
lea rdi, [rsp+arg_158]
call _ZNSt6vectorI8PolyLineIfESaIS1_EED2Ev; std::vector<PolyLine<float>>::~vector()
lea rdi, [rsp+arg_178]
call _ZN8PolyLineIfED2Ev; PolyLine<float>::~PolyLine()
mov rdi, [rsp+arg_140]
call __Unwind_Resume
|
long long PolyLine<float>::elm<true,true>(long long a1, _QWORD *a2)
{
unsigned long long v2; // rax
unsigned long long v3; // rax
int v5; // r8d
int v6; // r9d
char v14; // cf
char v15; // zf
int v21; // [rsp+0h] [rbp-1A8h]
int v22; // [rsp+8h] [rbp-1A0h]
long long v23; // [rsp+10h] [rbp-198h]
long long v24; // [rsp+18h] [rbp-190h]
int v25; // [rsp+20h] [rbp-188h]
long long v27; // [rsp+28h] [rbp-180h]
unsigned long long v28; // [rsp+38h] [rbp-170h]
long long v29; // [rsp+40h] [rbp-168h]
long long v30; // [rsp+48h] [rbp-160h]
unsigned long long v31; // [rsp+58h] [rbp-150h]
long long v32; // [rsp+60h] [rbp-148h]
long long v33; // [rsp+68h] [rbp-140h]
unsigned long long v34; // [rsp+70h] [rbp-138h]
int v35; // [rsp+78h] [rbp-130h]
bool v36; // [rsp+7Fh] [rbp-129h]
long long v37; // [rsp+80h] [rbp-128h]
long long v38; // [rsp+88h] [rbp-120h]
int v39; // [rsp+90h] [rbp-118h]
_BYTE v40[4]; // [rsp+94h] [rbp-114h] BYREF
int v41; // [rsp+98h] [rbp-110h]
long long v42; // [rsp+A0h] [rbp-108h]
long long v43; // [rsp+A8h] [rbp-100h] BYREF
long long v44; // [rsp+B0h] [rbp-F8h] BYREF
_DWORD *v45; // [rsp+B8h] [rbp-F0h]
int v46; // [rsp+C0h] [rbp-E8h]
_BYTE v47[4]; // [rsp+C4h] [rbp-E4h] BYREF
int v48; // [rsp+C8h] [rbp-E0h]
long long v49; // [rsp+D0h] [rbp-D8h]
long long v50; // [rsp+D8h] [rbp-D0h] BYREF
long long v51; // [rsp+E0h] [rbp-C8h] BYREF
_DWORD *v52; // [rsp+E8h] [rbp-C0h]
int v53; // [rsp+F0h] [rbp-B8h]
int v54; // [rsp+F4h] [rbp-B4h]
_DWORD v55[6]; // [rsp+F8h] [rbp-B0h] BYREF
_DWORD *v56; // [rsp+110h] [rbp-98h]
int v57; // [rsp+118h] [rbp-90h]
_BYTE v58[4]; // [rsp+11Ch] [rbp-8Ch] BYREF
long long v59; // [rsp+120h] [rbp-88h]
_BYTE *v60; // [rsp+128h] [rbp-80h]
long long v61; // [rsp+130h] [rbp-78h]
long long v62; // [rsp+138h] [rbp-70h]
_BYTE v63[12]; // [rsp+150h] [rbp-58h] BYREF
unsigned int v64; // [rsp+15Ch] [rbp-4Ch]
long long v65[3]; // [rsp+160h] [rbp-48h] BYREF
char v66; // [rsp+17Fh] [rbp-29h] BYREF
long long v67[5]; // [rsp+180h] [rbp-28h] BYREF
v37 = a1;
v38 = a1;
v67[4] = a1;
v67[3] = (long long)a2;
PolyLine<float>::PolyLine(v67, a2);
v66 = 0;
std::vector<PolyLine<float>>::vector((long long)v65);
v64 = 0;
do
{
v34 = v64;
v36 = 0;
if ( v34 < PolyLine<float>::size(v67) )
v36 = (unsigned long long)PolyLine<float>::size(v67) > 3;
if ( !v36 )
break;
v33 = PolyLine<float>::operator[](v67, v64);
Eigen::Matrix<float,3,1,0,3,1>::Matrix((long long)v63, v33);
v30 = v64;
v31 = v30 + PolyLine<float>::size(v67) - 1;
v2 = PolyLine<float>::size(v67);
v32 = PolyLine<float>::operator[](v67, v31 % v2);
v62 = v32;
v28 = v64 + 1;
v3 = PolyLine<float>::size(v67);
v29 = PolyLine<float>::operator[](v67, v28 % v3);
v61 = v29;
__asm { vmovss xmm0, cs:flt_5CC020 }
interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(v58, v62, v29, *(double *)&_XMM0);
v60 = v58;
PolyLine<float>::find_interpolation_intersections(
(unsigned int)v55,
(unsigned int)v67,
v64,
(unsigned int)v58,
v5,
v6,
v21,
v22,
v23,
v24,
v25,
v27,
(unsigned int)v67,
v28,
v29,
v30,
(unsigned int)v67,
v31,
v32,
v33,
v34,
v35,
v37,
v38,
v39,
v41,
v42,
v43,
v44,
(_DWORD)v45,
v46,
v48,
v49,
v50,
v51,
(_DWORD)v52,
v53,
v55[0],
v55[2],
v55[4],
(_DWORD)v56,
v57,
v59);
v56 = v55;
if ( (std::vector<float>::empty(v55) & 1) != 0 )
goto LABEL_7;
_RAX = std::vector<float>::back(v56);
__asm
{
vmovss xmm1, dword ptr [rax]
vcvtss2sd xmm0, xmm0, xmm1
vmovsd xmm1, cs:dbl_5CC060
vsubsd xmm0, xmm0, xmm1; double
}
_XMM0 = std::abs(_XMM0);
__asm
{
vmovsd xmm1, cs:qword_5CC068
vucomisd xmm0, xmm1
}
if ( v14 | v15 )
{
HIBYTE(v53) = 1;
v52 = v56;
v51 = std::vector<float>::begin(v56);
v50 = std::vector<float>::end(v52);
while ( (__gnu_cxx::operator!=<float const*,std::vector<float>>(&v51, &v50) & 1) != 0 )
{
v49 = __gnu_cxx::__normal_iterator<float const*,std::vector<float>>::operator*(&v51);
__asm { vmovss xmm0, dword ptr [rax] }
interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(v47, v63, v60, *(double *)&_XMM0);
v27 = PolyLine<float>::operator[](v67, v64);
Eigen::Matrix<float,3,1,0,3,1>::operator=(v27, v47);
*(double *)&_XMM0 = PolyLine<float>::clearance(v67);
__asm
{
vmovss [rsp+1A8h+var_184], xmm0
vmovss xmm0, [rsp+1A8h+var_184]
vmovss [rsp+1A8h+var_E8], xmm0
vmovss xmm0, cs:dword_5CC028
vucomiss xmm0, [rsp+1A8h+var_E8]
}
if ( !(v14 | v15) )
{
HIBYTE(v53) = 0;
break;
}
__gnu_cxx::__normal_iterator<float const*,std::vector<float>>::operator++(&v51);
}
v24 = PolyLine<float>::operator[](v67, v64);
Eigen::Matrix<float,3,1,0,3,1>::operator=(v24, (long long)v63);
if ( (v53 & 0x1000000) != 0 )
{
v45 = v56;
v44 = std::vector<float>::begin(v56);
v43 = std::vector<float>::end(v45);
while ( (__gnu_cxx::operator!=<float const*,std::vector<float>>(&v44, &v43) & 1) != 0 )
{
v42 = __gnu_cxx::__normal_iterator<float const*,std::vector<float>>::operator*(&v44);
__asm { vmovss xmm0, dword ptr [rax] }
interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(v40, v63, v60, *(double *)&_XMM0);
v23 = PolyLine<float>::operator[](v67, v64);
Eigen::Matrix<float,3,1,0,3,1>::operator=(v23, v40);
std::vector<PolyLine<float>>::emplace_back<PolyLine<float>&>(v65, v67);
__gnu_cxx::__normal_iterator<float const*,std::vector<float>>::operator++(&v44);
}
PolyLine<float>::remove(v67, v64);
v66 = 1;
v64 = 0;
std::vector<PolyLine<float>>::emplace_back<PolyLine<float>&>(v65, v67);
v54 = 2;
}
else
{
++v64;
v54 = 0;
}
}
else
{
LABEL_7:
++v64;
v54 = 3;
}
std::vector<float>::~vector(v55);
}
while ( v54 != 2 );
ZNSt4pairISt6vectorI8PolyLineIfESaIS2_EEbEC2IRS4_RbTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_(
v37,
v65,
&v66);
v54 = 1;
std::vector<PolyLine<float>>::~vector(v65);
PolyLine<float>::~PolyLine(v67);
return v38;
}
|
elm<true,true>:
SUB RSP,0x1a8
MOV qword ptr [RSP + 0x80],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x1a0],RDI
MOV qword ptr [RSP + 0x198],RSI
MOV RSI,qword ptr [RSP + 0x198]
LEA RDI,[RSP + 0x180]
CALL 0x0018c6a0
MOV byte ptr [RSP + 0x17f],0x0
LEA RDI,[RSP + 0x160]
CALL 0x00118170
MOV dword ptr [RSP + 0x15c],0x0
LAB_00193b4f:
MOV EAX,dword ptr [RSP + 0x15c]
MOV qword ptr [RSP + 0x70],RAX
LEA RDI,[RSP + 0x180]
CALL 0x0018c780
MOV RCX,qword ptr [RSP + 0x70]
MOV RDX,RAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RSP + 0x7f],AL
JNC 0x00193b93
LEA RDI,[RSP + 0x180]
CALL 0x0018c780
CMP RAX,0x3
SETA AL
MOV byte ptr [RSP + 0x7f],AL
LAB_00193b93:
MOV AL,byte ptr [RSP + 0x7f]
TEST AL,0x1
JNZ 0x00193ba0
JMP 0x0019408e
LAB_00193ba0:
MOV EAX,dword ptr [RSP + 0x15c]
MOV ESI,EAX
LAB_00193ba9:
LEA RDI,[RSP + 0x180]
CALL 0x00194ea0
MOV qword ptr [RSP + 0x68],RAX
JMP 0x00193bbd
LAB_00193bbd:
MOV RSI,qword ptr [RSP + 0x68]
LEA RDI,[RSP + 0x150]
CALL 0x0018a200
JMP 0x00193bd1
LAB_00193bd1:
MOV EAX,dword ptr [RSP + 0x15c]
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x180]
MOV qword ptr [RSP + 0x50],RDI
CALL 0x0018c780
MOV RDI,qword ptr [RSP + 0x50]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x48]
LEA RAX,[RAX + RCX*0x1 + -0x1]
MOV qword ptr [RSP + 0x58],RAX
CALL 0x0018c780
MOV RDI,qword ptr [RSP + 0x50]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
XOR EDX,EDX
DIV RCX
MOV RSI,RDX
CALL 0x00194ea0
MOV qword ptr [RSP + 0x60],RAX
JMP 0x00193c2c
LAB_00193c2c:
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x138],RAX
MOV EAX,dword ptr [RSP + 0x15c]
INC EAX
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0x180]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x0018c780
MOV RDI,qword ptr [RSP + 0x30]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x38]
XOR EDX,EDX
DIV RCX
MOV RSI,RDX
CALL 0x00194ea0
MOV qword ptr [RSP + 0x40],RAX
JMP 0x00193c7a
LAB_00193c7a:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x130],RAX
MOV RSI,qword ptr [RSP + 0x138]
MOV RDX,qword ptr [RSP + 0x130]
LEA RDI,[RSP + 0x11c]
VMOVSS XMM0,dword ptr [0x006cc020]
CALL 0x00194ed0
JMP 0x00193cae
LAB_00193cae:
LEA RAX,[RSP + 0x11c]
MOV qword ptr [RSP + 0x128],RAX
MOV EAX,dword ptr [RSP + 0x15c]
MOV EDX,EAX
MOV RCX,qword ptr [RSP + 0x128]
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0x180]
CALL 0x00194f80
JMP 0x00193ce6
LAB_00193ce6:
LEA RAX,[RSP + 0xf8]
MOV qword ptr [RSP + 0x110],RAX
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x00195460
TEST AL,0x1
JNZ 0x00193d3b
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x001954b0
VMOVSS XMM1,dword ptr [RAX]
VCVTSS2SD XMM0,XMM0,XMM1
VMOVSD XMM1,qword ptr [0x006cc060]
VSUBSD XMM0,XMM0,XMM1
CALL 0x0018e090
VMOVSD XMM1,qword ptr [0x006cc068]
VUCOMISD XMM0,XMM1
JBE 0x00193d75
LAB_00193d3b:
MOV EAX,dword ptr [RSP + 0x15c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x15c],EAX
MOV dword ptr [RSP + 0xf4],0x3
JMP 0x0019405b
LAB_00193d75:
MOV byte ptr [RSP + 0xf3],0x1
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0xe8],RAX
MOV RDI,qword ptr [RSP + 0xe8]
CALL 0x001954f0
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xe8]
CALL 0x00195520
MOV qword ptr [RSP + 0xd8],RAX
LAB_00193db7:
LEA RDI,[RSP + 0xe0]
LEA RSI,[RSP + 0xd8]
CALL 0x00195550
TEST AL,0x1
JNZ 0x00193dd5
JMP 0x00193ebf
LAB_00193dd5:
LEA RDI,[RSP + 0xe0]
CALL 0x00195590
MOV qword ptr [RSP + 0xd0],RAX
MOV RDX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RSP + 0xd0]
VMOVSS XMM0,dword ptr [RAX]
LAB_00193dfe:
LEA RDI,[RSP + 0xc4]
LEA RSI,[RSP + 0x150]
CALL 0x00194ed0
JMP 0x00193e15
LAB_00193e15:
MOV EAX,dword ptr [RSP + 0x15c]
MOV ESI,EAX
LEA RDI,[RSP + 0x180]
CALL 0x00194ea0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x00193e32
LAB_00193e32:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0xc4]
CALL 0x001955a0
LEA RDI,[RSP + 0x180]
CALL 0x001955d0
VMOVSS dword ptr [RSP + 0x24],XMM0
JMP 0x00193e59
LAB_00193e59:
VMOVSS XMM0,dword ptr [RSP + 0x24]
VMOVSS dword ptr [RSP + 0xc0],XMM0
VMOVSS XMM0,dword ptr [0x006cc028]
VUCOMISS XMM0,dword ptr [RSP + 0xc0]
JBE 0x00193eab
MOV byte ptr [RSP + 0xf3],0x0
JMP 0x00193ebf
LAB_00193eab:
JMP 0x00193ead
LAB_00193ead:
LEA RDI,[RSP + 0xe0]
CALL 0x00195710
JMP 0x00193db7
LAB_00193ebf:
MOV EAX,dword ptr [RSP + 0x15c]
MOV ESI,EAX
LEA RDI,[RSP + 0x180]
CALL 0x00194ea0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00193edc
LAB_00193edc:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x150]
CALL 0x0018adc0
JMP 0x00193ef0
LAB_00193ef0:
TEST byte ptr [RSP + 0xf3],0x1
JZ 0x0019403f
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0xb8],RAX
MOV RDI,qword ptr [RSP + 0xb8]
CALL 0x001954f0
MOV qword ptr [RSP + 0xb0],RAX
MOV RDI,qword ptr [RSP + 0xb8]
CALL 0x00195520
MOV qword ptr [RSP + 0xa8],RAX
LAB_00193f38:
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0xa8]
CALL 0x00195550
TEST AL,0x1
JNZ 0x00193f56
JMP 0x00193ff0
LAB_00193f56:
LEA RDI,[RSP + 0xb0]
CALL 0x00195590
MOV qword ptr [RSP + 0xa0],RAX
MOV RDX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RSP + 0xa0]
VMOVSS XMM0,dword ptr [RAX]
LEA RDI,[RSP + 0x94]
LEA RSI,[RSP + 0x150]
CALL 0x00194ed0
JMP 0x00193f96
LAB_00193f96:
MOV EAX,dword ptr [RSP + 0x15c]
MOV ESI,EAX
LEA RDI,[RSP + 0x180]
CALL 0x00194ea0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00193fb3
LAB_00193fb3:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x94]
CALL 0x001955a0
LEA RDI,[RSP + 0x160]
LEA RSI,[RSP + 0x180]
CALL 0x00195730
JMP 0x00193fdc
LAB_00193fdc:
JMP 0x00193fde
LAB_00193fde:
LEA RDI,[RSP + 0xb0]
CALL 0x00195710
JMP 0x00193f38
LAB_00193ff0:
MOV EAX,dword ptr [RSP + 0x15c]
MOV ESI,EAX
LEA RDI,[RSP + 0x180]
CALL 0x001957b0
JMP 0x00194008
LAB_00194008:
MOV byte ptr [RSP + 0x17f],0x1
MOV dword ptr [RSP + 0x15c],0x0
LEA RDI,[RSP + 0x160]
LEA RSI,[RSP + 0x180]
CALL 0x00195730
JMP 0x00194032
LAB_00194032:
MOV dword ptr [RSP + 0xf4],0x2
JMP 0x0019405b
LAB_0019403f:
MOV EAX,dword ptr [RSP + 0x15c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x15c],EAX
MOV dword ptr [RSP + 0xf4],0x0
LAB_0019405b:
LEA RDI,[RSP + 0xf8]
CALL 0x00194e40
MOV EAX,dword ptr [RSP + 0xf4]
MOV dword ptr [RSP + 0xc],EAX
TEST EAX,EAX
JZ 0x00194089
JMP 0x00194079
LAB_00194079:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x2
JZ 0x0019408e
JMP 0x00194084
LAB_00194084:
JMP 0x00193b4f
LAB_00194089:
JMP 0x00193b4f
LAB_0019408e:
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[RSP + 0x160]
LEA RDX,[RSP + 0x17f]
CALL 0x00195810
LAB_001940ab:
JMP 0x001940ad
LAB_001940ad:
MOV dword ptr [RSP + 0xf4],0x1
LEA RDI,[RSP + 0x160]
CALL 0x00118e10
LEA RDI,[RSP + 0x180]
CALL 0x00118160
MOV RAX,qword ptr [RSP + 0x88]
ADD RSP,0x1a8
RET
|
/* std::conditional<true, std::pair<std::vector<PolyLine<float>, std::allocator<PolyLine<float> > >,
bool>, std::pair<PolyLine<float>, bool> >::type PolyLine<float>::elm<true, true>() const */
int8 PolyLine<float>::elm<true,true>(void)
{
bool bVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
Matrix *pMVar5;
long lVar6;
float *pfVar7;
Matrix<float,3,1,0,3,1> *pMVar8;
PolyLine *in_RSI;
int8 in_RDI;
double dVar9;
Matrix local_114 [12];
float *local_108;
int8 local_100;
int8 local_f8;
vector<float,std::allocator<float>> *local_f0;
float local_e8;
Matrix local_e4 [12];
float *local_d8;
int8 local_d0;
int8 local_c8;
vector<float,std::allocator<float>> *local_c0;
byte local_b5;
int local_b4;
vector<float,std::allocator<float>> local_b0 [24];
vector<float,std::allocator<float>> *local_98;
Matrix local_8c [12];
Matrix *local_80;
int8 local_78;
Matrix *local_70;
Matrix<float,3,1,0,3,1> local_58 [12];
uint local_4c;
vector<PolyLine<float>,std::allocator<PolyLine<float>>> local_48 [31];
int1 local_29;
PolyLine<float> local_28 [40];
PolyLine(local_28,in_RSI);
local_29 = 0;
std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>::vector(local_48);
local_4c = 0;
do {
uVar4 = (ulong)local_4c;
uVar3 = size(local_28);
bVar1 = false;
if (uVar4 < uVar3) {
uVar4 = size(local_28);
bVar1 = 3 < uVar4;
}
if (!bVar1) break;
/* try { // try from 00193ba9 to 00193ce3 has its CatchHandler @ 00193d5c */
pMVar5 = (Matrix *)operator[](local_28,(ulong)local_4c);
Eigen::Matrix<float,3,1,0,3,1>::Matrix(local_58,pMVar5);
uVar4 = (ulong)local_4c;
lVar6 = size(local_28);
uVar3 = size(local_28);
local_70 = (Matrix *)operator[](local_28,((uVar4 - 1) + lVar6) % uVar3);
uVar2 = local_4c + 1;
uVar4 = size(local_28);
local_78 = operator[](local_28,(ulong)uVar2 % uVar4);
interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(local_8c,local_70,DAT_006cc020);
local_80 = local_8c;
find_interpolation_intersections((ulong)local_b0,(Matrix *)local_28);
local_98 = local_b0;
uVar4 = std::vector<float,std::allocator<float>>::empty(local_98);
if ((uVar4 & 1) == 0) {
pfVar7 = (float *)std::vector<float,std::allocator<float>>::back(local_98);
dVar9 = (double)std::abs((double)*pfVar7 - DAT_006cc060);
if (DAT_006cc068 < dVar9) goto LAB_00193d3b;
local_b5 = 1;
local_c0 = local_98;
local_c8 = std::vector<float,std::allocator<float>>::begin(local_98);
local_d0 = std::vector<float,std::allocator<float>>::end(local_c0);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_c8,(__normal_iterator *)&local_d0),
bVar1) {
local_d8 = (float *)__gnu_cxx::
__normal_iterator<float_const*,std::vector<float,std::allocator<float>>>
::operator*((__normal_iterator<float_const*,std::vector<float,std::allocator<float>>>
*)&local_c8);
/* try { // try from 00193dfe to 0019402f has its CatchHandler @ 00193e85 */
interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(local_e4,(Matrix *)local_58,*local_d8);
pMVar8 = (Matrix<float,3,1,0,3,1> *)operator[](local_28,(ulong)local_4c);
Eigen::Matrix<float,3,1,0,3,1>::operator=(pMVar8,local_e4);
local_e8 = (float)clearance(local_28);
if (local_e8 < DAT_006cc028) {
local_b5 = 0;
break;
}
__gnu_cxx::__normal_iterator<float_const*,std::vector<float,std::allocator<float>>>::
operator++((__normal_iterator<float_const*,std::vector<float,std::allocator<float>>> *)
&local_c8);
}
pMVar8 = (Matrix<float,3,1,0,3,1> *)operator[](local_28,(ulong)local_4c);
Eigen::Matrix<float,3,1,0,3,1>::operator=(pMVar8,(Matrix *)local_58);
if ((local_b5 & 1) == 0) {
local_4c = local_4c + 1;
local_b4 = 0;
}
else {
local_f0 = local_98;
local_f8 = std::vector<float,std::allocator<float>>::begin(local_98);
local_100 = std::vector<float,std::allocator<float>>::end(local_f0);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_f8,(__normal_iterator *)&local_100),
bVar1) {
local_108 = (float *)__gnu_cxx::
__normal_iterator<float_const*,std::vector<float,std::allocator<float>>>
::operator*((__normal_iterator<float_const*,std::vector<float,std::allocator<float>>>
*)&local_f8);
interpolate<float,Eigen::Matrix<float,3,1,0,3,1>>(local_114,(Matrix *)local_58,*local_108)
;
pMVar8 = (Matrix<float,3,1,0,3,1> *)operator[](local_28,(ulong)local_4c);
Eigen::Matrix<float,3,1,0,3,1>::operator=(pMVar8,local_114);
std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>::
emplace_back<PolyLine<float>&>(local_48,(PolyLine *)local_28);
__gnu_cxx::__normal_iterator<float_const*,std::vector<float,std::allocator<float>>>::
operator++((__normal_iterator<float_const*,std::vector<float,std::allocator<float>>> *)
&local_f8);
}
remove(local_28,(ulong)local_4c);
local_29 = 1;
local_4c = 0;
std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>::emplace_back<PolyLine<float>&>
(local_48,(PolyLine *)local_28);
local_b4 = 2;
}
}
else {
LAB_00193d3b:
local_4c = local_4c + 1;
local_b4 = 3;
}
std::vector<float,std::allocator<float>>::~vector(local_b0);
} while ((local_b4 == 0) || (local_b4 != 2));
/* try { // try from 0019408e to 001940aa has its CatchHandler @ 00193d5c */
_ZNSt4pairISt6vectorI8PolyLineIfESaIS2_EEbEC2IRS4_RbTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_
(in_RDI,local_48,&local_29);
local_b4 = 1;
std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>::~vector(local_48);
~PolyLine(local_28);
return in_RDI;
}
|
|
57,341
|
my_uca_generate_page
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_generate_page(MY_CHARSET_LOADER *loader,
MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src,
uint pageno)
{
DBUG_ASSERT(dst->levelno == src->levelno);
return src->lengths[pageno] ?
/*
A page with explicit weights and some special rules.
Copy all weights from the page in "src".
*/
my_uca_copy_page(loader, src, dst, pageno) :
/*
A page with implicit weights and some special rules.
Generate default weights for all characters on this page
algorithmically now, at initialization time.
*/
my_uca_generate_implicit_page(loader, dst, pageno);
}
|
O0
|
c
|
my_uca_generate_page:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
jmp 0x505c9
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x505fb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x1c(%rbp), %eax
movl %eax, %ecx
callq 0x50620
movsbl %al, %eax
movl %eax, -0x20(%rbp)
jmp 0x50611
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x50750
movsbl %al, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_uca_generate_page:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
jmp short $+2
loc_505C9:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_1C]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_505FB
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_10]
mov eax, [rbp+var_1C]
mov ecx, eax
call my_uca_copy_page
movsx eax, al
mov [rbp+var_20], eax
jmp short loc_50611
loc_505FB:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_1C]
call my_uca_generate_implicit_page
movsx eax, al
mov [rbp+var_20], eax
loc_50611:
mov eax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
|
long long my_uca_generate_page(long long a1, long long a2, long long a3, unsigned int a4)
{
if ( *(_BYTE *)(*(_QWORD *)(a3 + 8) + a4) )
return (unsigned int)(char)my_uca_copy_page(a1, a3, a2, a4);
else
return (unsigned int)(char)my_uca_generate_implicit_page(a1, a2, a4);
}
|
my_uca_generate_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
JMP 0x001505c9
LAB_001505c9:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x1c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x001505fb
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,EAX
CALL 0x00150620
MOVSX EAX,AL
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00150611
LAB_001505fb:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x00150750
MOVSX EAX,AL
MOV dword ptr [RBP + -0x20],EAX
LAB_00150611:
MOV EAX,dword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
int my_uca_generate_page(int8 param_1,int8 param_2,long param_3,uint param_4)
{
char cVar1;
int4 local_28;
if (*(char *)(*(long *)(param_3 + 8) + (ulong)param_4) == '\0') {
cVar1 = my_uca_generate_implicit_page(param_1,param_2,param_4);
}
else {
cVar1 = my_uca_copy_page(param_1,param_3,param_2,param_4);
}
local_28 = (int)cVar1;
return local_28;
}
|
|
57,342
|
elf_file::content(elf32_ph_entry const&) const
|
msxemulator/build_O3/_deps/picotool-src/elf/elf_file.cpp
|
std::vector<uint8_t> elf_file::content(const elf32_ph_entry &ph) const {
std::vector<uint8_t> content;
std::copy(elf_bytes.begin() + ph.offset, elf_bytes.begin() + ph.offset + ph.filez, std::back_inserter(content));
return content;
}
|
O3
|
cpp
|
elf_file::content(elf32_ph_entry const&) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0x4(%rdx), %edi
movl 0x10(%rdx), %eax
addq 0x38(%rsi), %rdi
addq %rdi, %rax
movq %rax, %rsi
movq %rbx, %rdx
callq 0x78a1c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xa1e79
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0xf470
movq %r14, %rdi
callq 0xf7d0
nop
|
_ZNK8elf_file7contentERK14elf32_ph_entry:
push r14
push rbx
push rax
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov edi, [rdx+4]
mov eax, [rdx+10h]
add rdi, [rsi+38h]
add rax, rdi
mov rsi, rax
mov rdx, rbx
call _ZNSt11__copy_moveILb0ELb0ESt26random_access_iterator_tagE8__copy_mIPKhSt20back_insert_iteratorISt6vectorIhSaIhEEEEET0_T_SB_SA_; std::__copy_move<false,false,std::random_access_iterator_tag>::__copy_m<uchar const*,std::back_insert_iterator<std::vector<uchar>>>(uchar const*,uchar const*,std::back_insert_iterator<std::vector<uchar>>)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_A1E79
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A1E79:
mov rdi, r14
call __Unwind_Resume
|
long long elf_file::content(long long a1, long long a2, long long a3)
{
_BYTE *v4; // rdi
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = (_BYTE *)(*(_QWORD *)(a2 + 56) + *(unsigned int *)(a3 + 4));
std::__copy_move<false,false,std::random_access_iterator_tag>::__copy_m<unsigned char const*,std::back_insert_iterator<std::vector<unsigned char>>>(
v4,
(long long)&v4[*(unsigned int *)(a3 + 16)],
a1);
return a1;
}
|
content:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV EDI,dword ptr [RDX + 0x4]
MOV EAX,dword ptr [RDX + 0x10]
ADD RDI,qword ptr [RSI + 0x38]
ADD RAX,RDI
LAB_001a1e4c:
MOV RSI,RAX
MOV RDX,RBX
CALL 0x00178a1c
LAB_001a1e57:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* elf_file::content(elf32_ph_entry const&) const */
elf32_ph_entry * elf_file::content(elf32_ph_entry *param_1)
{
long in_RDX;
long in_RSI;
long lVar1;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar1 = (ulong)*(uint *)(in_RDX + 4) + *(long *)(in_RSI + 0x38);
/* try { // try from 001a1e4c to 001a1e56 has its CatchHandler @ 001a1e62 */
std::__copy_move<false,false,std::random_access_iterator_tag>::
__copy_m<unsigned_char_const*,std::back_insert_iterator<std::vector<unsigned_char,std::allocator<unsigned_char>>>>
(lVar1,(ulong)*(uint *)(in_RDX + 0x10) + lVar1,param_1);
return param_1;
}
|
|
57,343
|
ss_check
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int ss_check(JSContext *ctx, StackSizeState *s,
int pos, int op, int stack_len, int catch_pos)
{
if ((unsigned)pos >= s->bc_len) {
JS_ThrowInternalError(ctx, "bytecode buffer overflow (op=%d, pc=%d)", op, pos);
return -1;
}
if (stack_len > s->stack_len_max) {
s->stack_len_max = stack_len;
if (s->stack_len_max > JS_STACK_SIZE_MAX) {
JS_ThrowInternalError(ctx, "stack overflow (op=%d, pc=%d)", op, pos);
return -1;
}
}
if (s->stack_level_tab[pos] != 0xffff) {
/* already explored: check that the stack size is consistent */
if (s->stack_level_tab[pos] != stack_len) {
JS_ThrowInternalError(ctx, "inconsistent stack size: %d %d (pc=%d)",
s->stack_level_tab[pos], stack_len, pos);
return -1;
} else if (s->catch_pos_tab[pos] != catch_pos) {
JS_ThrowInternalError(ctx, "inconsistent catch position: %d %d (pc=%d)",
s->catch_pos_tab[pos], catch_pos, pos);
return -1;
} else {
return 0;
}
}
/* mark as explored and store the stack size */
s->stack_level_tab[pos] = stack_len;
s->catch_pos_tab[pos] = catch_pos;
/* queue the new PC to explore */
if (js_resize_array(ctx, (void **)&s->pc_stack, sizeof(s->pc_stack[0]),
&s->pc_stack_size, s->pc_stack_len + 1))
return -1;
s->pc_stack[s->pc_stack_len++] = pos;
return 0;
}
|
O0
|
c
|
ss_check:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movl %edx, 0x4c(%rsp)
movl %ecx, 0x48(%rsp)
movl %r8d, 0x44(%rsp)
movl %r9d, 0x40(%rsp)
movl 0x4c(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl (%rcx), %eax
jb 0xbbe5f
movq 0x58(%rsp), %rdi
movl 0x48(%rsp), %edx
movl 0x4c(%rsp), %ecx
leaq 0x531e5(%rip), %rsi # 0x10f026
movb $0x0, %al
callq 0x2c220
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xbc032
movl 0x44(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jle 0xbbebb
movl 0x44(%rsp), %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x50(%rsp), %rax
cmpl $0xfffe, 0x4(%rax) # imm = 0xFFFE
jle 0xbbeb9
movq 0x58(%rsp), %rdi
movl 0x48(%rsp), %edx
movl 0x4c(%rsp), %ecx
leaq 0x531d2(%rip), %rsi # 0x10f06d
movb $0x0, %al
callq 0x2c220
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xbc032
jmp 0xbbebb
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x4c(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0xbbf9c
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x4c(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl 0x44(%rsp), %eax
je 0xbbf35
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x4c(%rsp), %rcx
movzwl (%rax,%rcx,2), %edx
movl 0x44(%rsp), %ecx
movl 0x4c(%rsp), %r8d
leaq 0x53193(%rip), %rsi # 0x10f0aa
movb $0x0, %al
callq 0x2c220
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xbc032
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
cmpl 0x40(%rsp), %eax
je 0xbbf8f
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movl 0x40(%rsp), %ecx
movl 0x4c(%rsp), %r8d
leaq 0x5315f(%rip), %rsi # 0x10f0d1
movb $0x0, %al
callq 0x2c220
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xbc032
movl $0x0, 0x64(%rsp)
jmp 0xbc032
movl 0x44(%rsp), %eax
movw %ax, %dx
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x4c(%rsp), %rcx
movw %dx, (%rax,%rcx,2)
movl 0x40(%rsp), %edx
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
addq $0x18, %rsi
movq 0x50(%rsp), %rcx
addq $0x24, %rcx
movq 0x50(%rsp), %rax
movl 0x20(%rax), %r8d
addl $0x1, %r8d
movl $0x4, %edx
callq 0x71e80
cmpl $0x0, %eax
je 0xbc007
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xbc032
movl 0x4c(%rsp), %edx
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x50(%rsp), %rsi
movl 0x20(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x20(%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
|
ss_check:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_1C], edx
mov [rsp+68h+var_20], ecx
mov [rsp+68h+var_24], r8d
mov [rsp+68h+var_28], r9d
mov eax, [rsp+68h+var_1C]
mov rcx, [rsp+68h+var_18]
cmp eax, [rcx]
jb short loc_BBE5F
mov rdi, [rsp+68h+var_10]
mov edx, [rsp+68h+var_20]
mov ecx, [rsp+68h+var_1C]
lea rsi, aBytecodeBuffer; "bytecode buffer overflow (op=%d, pc=%d)"
mov al, 0
call JS_ThrowInternalError
mov [rsp+68h+var_38], rax
mov [rsp+68h+var_30], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_BC032
loc_BBE5F:
mov eax, [rsp+68h+var_24]
mov rcx, [rsp+68h+var_18]
cmp eax, [rcx+4]
jle short loc_BBEBB
mov ecx, [rsp+68h+var_24]
mov rax, [rsp+68h+var_18]
mov [rax+4], ecx
mov rax, [rsp+68h+var_18]
cmp dword ptr [rax+4], 0FFFEh
jle short loc_BBEB9
mov rdi, [rsp+68h+var_10]
mov edx, [rsp+68h+var_20]
mov ecx, [rsp+68h+var_1C]
lea rsi, aStackOverflowO; "stack overflow (op=%d, pc=%d)"
mov al, 0
call JS_ThrowInternalError
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_40], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_BC032
loc_BBEB9:
jmp short $+2
loc_BBEBB:
mov rax, [rsp+68h+var_18]
mov rax, [rax+8]
movsxd rcx, [rsp+68h+var_1C]
movzx eax, word ptr [rax+rcx*2]
cmp eax, 0FFFFh
jz loc_BBF9C
mov rax, [rsp+68h+var_18]
mov rax, [rax+8]
movsxd rcx, [rsp+68h+var_1C]
movzx eax, word ptr [rax+rcx*2]
cmp eax, [rsp+68h+var_24]
jz short loc_BBF35
mov rdi, [rsp+68h+var_10]
mov rax, [rsp+68h+var_18]
mov rax, [rax+8]
movsxd rcx, [rsp+68h+var_1C]
movzx edx, word ptr [rax+rcx*2]
mov ecx, [rsp+68h+var_24]
mov r8d, [rsp+68h+var_1C]
lea rsi, aInconsistentSt; "inconsistent stack size: %d %d (pc=%d)"
mov al, 0
call JS_ThrowInternalError
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_50], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_BC032
loc_BBF35:
mov rax, [rsp+68h+var_18]
mov rax, [rax+10h]
movsxd rcx, [rsp+68h+var_1C]
mov eax, [rax+rcx*4]
cmp eax, [rsp+68h+var_28]
jz short loc_BBF8F
mov rdi, [rsp+68h+var_10]
mov rax, [rsp+68h+var_18]
mov rax, [rax+10h]
movsxd rcx, [rsp+68h+var_1C]
mov edx, [rax+rcx*4]
mov ecx, [rsp+68h+var_28]
mov r8d, [rsp+68h+var_1C]
lea rsi, aInconsistentCa; "inconsistent catch position: %d %d (pc="...
mov al, 0
call JS_ThrowInternalError
mov [rsp+68h+var_68], rax
mov [rsp+68h+var_60], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_BC032
loc_BBF8F:
mov [rsp+68h+var_4], 0
jmp loc_BC032
loc_BBF9C:
mov eax, [rsp+68h+var_24]
mov dx, ax
mov rax, [rsp+68h+var_18]
mov rax, [rax+8]
movsxd rcx, [rsp+68h+var_1C]
mov [rax+rcx*2], dx
mov edx, [rsp+68h+var_28]
mov rax, [rsp+68h+var_18]
mov rax, [rax+10h]
movsxd rcx, [rsp+68h+var_1C]
mov [rax+rcx*4], edx
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_18]
add rsi, 18h
mov rcx, [rsp+68h+var_18]
add rcx, 24h ; '$'
mov rax, [rsp+68h+var_18]
mov r8d, [rax+20h]
add r8d, 1
mov edx, 4
call js_resize_array
cmp eax, 0
jz short loc_BC007
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_BC032
loc_BC007:
mov edx, [rsp+68h+var_1C]
mov rax, [rsp+68h+var_18]
mov rax, [rax+18h]
mov rsi, [rsp+68h+var_18]
mov ecx, [rsi+20h]
mov edi, ecx
add edi, 1
mov [rsi+20h], edi
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov [rsp+68h+var_4], 0
loc_BC032:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
|
long long ss_check(
long long a1,
long long a2,
unsigned int a3,
unsigned int a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rax
int v15; // ecx
char v17; // [rsp+0h] [rbp-68h]
if ( a3 < *(_DWORD *)a2 )
{
if ( (int)a5 <= *(_DWORD *)(a2 + 4) || (*(_DWORD *)(a2 + 4) = a5, *(int *)(a2 + 4) <= 65534) )
{
if ( *(unsigned __int16 *)(*(_QWORD *)(a2 + 8) + 2LL * (int)a3) == 0xFFFF )
{
*(_WORD *)(*(_QWORD *)(a2 + 8) + 2LL * (int)a3) = a5;
*(_DWORD *)(*(_QWORD *)(a2 + 16) + 4LL * (int)a3) = a6;
if ( (unsigned int)js_resize_array(a1, a2 + 24, 4u, (_DWORD *)(a2 + 36), *(_DWORD *)(a2 + 32) + 1) )
{
return (unsigned int)-1;
}
else
{
v14 = *(_QWORD *)(a2 + 24);
v15 = *(_DWORD *)(a2 + 32);
*(_DWORD *)(a2 + 32) = v15 + 1;
*(_DWORD *)(v14 + 4LL * v15) = a3;
return 0;
}
}
else if ( *(unsigned __int16 *)(*(_QWORD *)(a2 + 8) + 2LL * (int)a3) == (_DWORD)a5 )
{
if ( *(_DWORD *)(*(_QWORD *)(a2 + 16) + 4LL * (int)a3) == (_DWORD)a6 )
{
return 0;
}
else
{
JS_ThrowInternalError(
a1,
(long long)"inconsistent catch position: %d %d (pc=%d)",
*(unsigned int *)(*(_QWORD *)(a2 + 16) + 4LL * (int)a3),
(unsigned int)a6,
a3,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v17);
return (unsigned int)-1;
}
}
else
{
JS_ThrowInternalError(
a1,
(long long)"inconsistent stack size: %d %d (pc=%d)",
*(unsigned __int16 *)(*(_QWORD *)(a2 + 8) + 2LL * (int)a3),
(unsigned int)a5,
a3,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v17);
return (unsigned int)-1;
}
}
else
{
JS_ThrowInternalError(
a1,
(long long)"stack overflow (op=%d, pc=%d)",
a4,
a3,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v17);
return (unsigned int)-1;
}
}
else
{
JS_ThrowInternalError(
a1,
(long long)"bytecode buffer overflow (op=%d, pc=%d)",
a4,
a3,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v17);
return (unsigned int)-1;
}
}
|
ss_check:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RSI
MOV dword ptr [RSP + 0x4c],EDX
MOV dword ptr [RSP + 0x48],ECX
MOV dword ptr [RSP + 0x44],R8D
MOV dword ptr [RSP + 0x40],R9D
MOV EAX,dword ptr [RSP + 0x4c]
MOV RCX,qword ptr [RSP + 0x50]
CMP EAX,dword ptr [RCX]
JC 0x001bbe5f
MOV RDI,qword ptr [RSP + 0x58]
MOV EDX,dword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x4c]
LEA RSI,[0x20f026]
MOV AL,0x0
CALL 0x0012c220
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001bc032
LAB_001bbe5f:
MOV EAX,dword ptr [RSP + 0x44]
MOV RCX,qword ptr [RSP + 0x50]
CMP EAX,dword ptr [RCX + 0x4]
JLE 0x001bbebb
MOV ECX,dword ptr [RSP + 0x44]
MOV RAX,qword ptr [RSP + 0x50]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RSP + 0x50]
CMP dword ptr [RAX + 0x4],0xfffe
JLE 0x001bbeb9
MOV RDI,qword ptr [RSP + 0x58]
MOV EDX,dword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x4c]
LEA RSI,[0x20f06d]
MOV AL,0x0
CALL 0x0012c220
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001bc032
LAB_001bbeb9:
JMP 0x001bbebb
LAB_001bbebb:
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,0xffff
JZ 0x001bbf9c
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,dword ptr [RSP + 0x44]
JZ 0x001bbf35
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOVZX EDX,word ptr [RAX + RCX*0x2]
MOV ECX,dword ptr [RSP + 0x44]
MOV R8D,dword ptr [RSP + 0x4c]
LEA RSI,[0x20f0aa]
MOV AL,0x0
CALL 0x0012c220
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001bc032
LAB_001bbf35:
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOV EAX,dword ptr [RAX + RCX*0x4]
CMP EAX,dword ptr [RSP + 0x40]
JZ 0x001bbf8f
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOV EDX,dword ptr [RAX + RCX*0x4]
MOV ECX,dword ptr [RSP + 0x40]
MOV R8D,dword ptr [RSP + 0x4c]
LEA RSI,[0x20f0d1]
MOV AL,0x0
CALL 0x0012c220
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001bc032
LAB_001bbf8f:
MOV dword ptr [RSP + 0x64],0x0
JMP 0x001bc032
LAB_001bbf9c:
MOV EAX,dword ptr [RSP + 0x44]
MOV DX,AX
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOV word ptr [RAX + RCX*0x2],DX
MOV EDX,dword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x50]
ADD RSI,0x18
MOV RCX,qword ptr [RSP + 0x50]
ADD RCX,0x24
MOV RAX,qword ptr [RSP + 0x50]
MOV R8D,dword ptr [RAX + 0x20]
ADD R8D,0x1
MOV EDX,0x4
CALL 0x00171e80
CMP EAX,0x0
JZ 0x001bc007
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001bc032
LAB_001bc007:
MOV EDX,dword ptr [RSP + 0x4c]
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x50]
MOV ECX,dword ptr [RSI + 0x20]
MOV EDI,ECX
ADD EDI,0x1
MOV dword ptr [RSI + 0x20],EDI
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV dword ptr [RSP + 0x64],0x0
LAB_001bc032:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4
ss_check(int8 param_1,uint *param_2,uint param_3,int4 param_4,uint param_5,int param_6)
{
uint uVar1;
int iVar2;
int4 local_4;
if (param_3 < *param_2) {
if (((int)param_2[1] < (int)param_5) && (param_2[1] = param_5, 0xfffe < (int)param_2[1])) {
JS_ThrowInternalError(param_1,"stack overflow (op=%d, pc=%d)",param_4,param_3);
local_4 = 0xffffffff;
}
else if (*(short *)(*(long *)(param_2 + 2) + (long)(int)param_3 * 2) == -1) {
*(short *)(*(long *)(param_2 + 2) + (long)(int)param_3 * 2) = (short)param_5;
*(int *)(*(long *)(param_2 + 4) + (long)(int)param_3 * 4) = param_6;
iVar2 = js_resize_array(param_1,param_2 + 6,4,param_2 + 9,param_2[8] + 1);
if (iVar2 == 0) {
uVar1 = param_2[8];
param_2[8] = uVar1 + 1;
*(uint *)(*(long *)(param_2 + 6) + (long)(int)uVar1 * 4) = param_3;
local_4 = 0;
}
else {
local_4 = 0xffffffff;
}
}
else if (*(ushort *)(*(long *)(param_2 + 2) + (long)(int)param_3 * 2) == param_5) {
if (*(int *)(*(long *)(param_2 + 4) + (long)(int)param_3 * 4) == param_6) {
local_4 = 0;
}
else {
JS_ThrowInternalError
(param_1,"inconsistent catch position: %d %d (pc=%d)",
*(int4 *)(*(long *)(param_2 + 4) + (long)(int)param_3 * 4),param_6,param_3)
;
local_4 = 0xffffffff;
}
}
else {
JS_ThrowInternalError
(param_1,"inconsistent stack size: %d %d (pc=%d)",
*(int2 *)(*(long *)(param_2 + 2) + (long)(int)param_3 * 2),param_5,param_3);
local_4 = 0xffffffff;
}
}
else {
JS_ThrowInternalError(param_1,"bytecode buffer overflow (op=%d, pc=%d)",param_4,param_3);
local_4 = 0xffffffff;
}
return local_4;
}
|
|
57,344
|
ss_check
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int ss_check(JSContext *ctx, StackSizeState *s,
int pos, int op, int stack_len, int catch_pos)
{
if ((unsigned)pos >= s->bc_len) {
JS_ThrowInternalError(ctx, "bytecode buffer overflow (op=%d, pc=%d)", op, pos);
return -1;
}
if (stack_len > s->stack_len_max) {
s->stack_len_max = stack_len;
if (s->stack_len_max > JS_STACK_SIZE_MAX) {
JS_ThrowInternalError(ctx, "stack overflow (op=%d, pc=%d)", op, pos);
return -1;
}
}
if (s->stack_level_tab[pos] != 0xffff) {
/* already explored: check that the stack size is consistent */
if (s->stack_level_tab[pos] != stack_len) {
JS_ThrowInternalError(ctx, "inconsistent stack size: %d %d (pc=%d)",
s->stack_level_tab[pos], stack_len, pos);
return -1;
} else if (s->catch_pos_tab[pos] != catch_pos) {
JS_ThrowInternalError(ctx, "inconsistent catch position: %d %d (pc=%d)",
s->catch_pos_tab[pos], catch_pos, pos);
return -1;
} else {
return 0;
}
}
/* mark as explored and store the stack size */
s->stack_level_tab[pos] = stack_len;
s->catch_pos_tab[pos] = catch_pos;
/* queue the new PC to explore */
if (js_resize_array(ctx, (void **)&s->pc_stack, sizeof(s->pc_stack[0]),
&s->pc_stack_size, s->pc_stack_len + 1))
return -1;
s->pc_stack[s->pc_stack_len++] = pos;
return 0;
}
|
O1
|
c
|
ss_check:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
cmpl %edx, (%rsi)
jbe 0x6eb94
movq %rsi, %r14
cmpl %r8d, 0x4(%rsi)
jge 0x6eba8
movl %r8d, 0x4(%r14)
cmpl $0xffff, %r8d # imm = 0xFFFF
jl 0x6eba8
leaq 0x314df(%rip), %rsi # 0xa0071
jmp 0x6eb9b
leaq 0x3148f(%rip), %rsi # 0xa002a
movl %ecx, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x21a7f
jmp 0x6ec1b
movq 0x8(%r14), %rcx
movslq %ebx, %rax
movzwl (%rcx,%rax,2), %edx
cmpl $0xffff, %edx # imm = 0xFFFF
je 0x6ebda
cmpl %r8d, %edx
jne 0x6ec07
movq 0x10(%r14), %rcx
movl (%rcx,%rax,4), %edx
xorl %eax, %eax
cmpl %r9d, %edx
je 0x6ec20
leaq 0x31500(%rip), %rsi # 0xa00d5
movl %r9d, %ecx
jmp 0x6ec11
movw %r8w, (%rcx,%rax,2)
movq 0x10(%r14), %rcx
movl %r9d, (%rcx,%rax,4)
movl 0x20(%r14), %r8d
cmpl %r8d, 0x24(%r14)
jle 0x6ec28
movq 0x18(%r14), %rax
movslq 0x20(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x20(%r14)
movl %ebx, (%rax,%rcx,4)
xorl %eax, %eax
jmp 0x6ec20
leaq 0x314a0(%rip), %rsi # 0xa00ae
movl %r8d, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x21a7f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x18(%r14), %rsi
leaq 0x24(%r14), %rcx
incl %r8d
movl $0x4, %edx
callq 0x428db
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x6ec20
jmp 0x6ebf1
|
ss_check:
push r14
push rbx
push rax
mov ebx, edx
cmp [rsi], edx
jbe short loc_6EB94
mov r14, rsi
cmp [rsi+4], r8d
jge short loc_6EBA8
mov [r14+4], r8d
cmp r8d, 0FFFFh
jl short loc_6EBA8
lea rsi, aStackOverflowO; "stack overflow (op=%d, pc=%d)"
jmp short loc_6EB9B
loc_6EB94:
lea rsi, aBytecodeBuffer; "bytecode buffer overflow (op=%d, pc=%d)"
loc_6EB9B:
mov edx, ecx
mov ecx, ebx
xor eax, eax
call JS_ThrowInternalError
jmp short loc_6EC1B
loc_6EBA8:
mov rcx, [r14+8]
movsxd rax, ebx
movzx edx, word ptr [rcx+rax*2]
cmp edx, 0FFFFh
jz short loc_6EBDA
cmp edx, r8d
jnz short loc_6EC07
mov rcx, [r14+10h]
mov edx, [rcx+rax*4]
xor eax, eax
cmp edx, r9d
jz short loc_6EC20
lea rsi, aInconsistentCa; "inconsistent catch position: %d %d (pc="...
mov ecx, r9d
jmp short loc_6EC11
loc_6EBDA:
mov [rcx+rax*2], r8w
mov rcx, [r14+10h]
mov [rcx+rax*4], r9d
mov r8d, [r14+20h]
cmp [r14+24h], r8d
jle short loc_6EC28
loc_6EBF1:
mov rax, [r14+18h]
movsxd rcx, dword ptr [r14+20h]
lea edx, [rcx+1]
mov [r14+20h], edx
mov [rax+rcx*4], ebx
xor eax, eax
jmp short loc_6EC20
loc_6EC07:
lea rsi, aInconsistentSt; "inconsistent stack size: %d %d (pc=%d)"
mov ecx, r8d
loc_6EC11:
mov r8d, ebx
xor eax, eax
call JS_ThrowInternalError
loc_6EC1B:
mov eax, 0FFFFFFFFh
loc_6EC20:
add rsp, 8
pop rbx
pop r14
retn
loc_6EC28:
lea rsi, [r14+18h]
lea rcx, [r14+24h]
inc r8d
mov edx, 4
call js_realloc_array
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_6EC20
jmp short loc_6EBF1
|
long long ss_check(
long long a1,
long long a2,
unsigned int a3,
unsigned int a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
const char *v16; // rsi
long long v17; // rcx
long long v18; // rdx
long long result; // rax
const char *v20; // rsi
long long v21; // rcx
int v22; // r8d
long long v23; // rax
long long v24; // rcx
int v25; // ecx
char v26; // [rsp-8h] [rbp-18h]
v26 = v14;
if ( *(_DWORD *)a2 <= a3 )
{
v16 = "bytecode buffer overflow (op=%d, pc=%d)";
goto LABEL_6;
}
if ( *(_DWORD *)(a2 + 4) < (int)a5 )
{
*(_DWORD *)(a2 + 4) = a5;
if ( (int)a5 >= 0xFFFF )
{
v16 = "stack overflow (op=%d, pc=%d)";
LABEL_6:
JS_ThrowInternalError(a1, (long long)v16, a4, a3, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
return 0xFFFFFFFFLL;
}
}
v17 = *(_QWORD *)(a2 + 8);
v18 = *(unsigned __int16 *)(v17 + 2LL * (int)a3);
if ( (_DWORD)v18 != 0xFFFF )
{
if ( (_DWORD)v18 == (_DWORD)a5 )
{
v18 = *(unsigned int *)(*(_QWORD *)(a2 + 16) + 4LL * (int)a3);
result = 0LL;
if ( (_DWORD)v18 == (_DWORD)a6 )
return result;
v20 = "inconsistent catch position: %d %d (pc=%d)";
v21 = (unsigned int)a6;
}
else
{
v20 = "inconsistent stack size: %d %d (pc=%d)";
v21 = (unsigned int)a5;
}
JS_ThrowInternalError(a1, (long long)v20, v18, v21, a3, a6, a7, a8, a9, a10, a11, a12, a13, a14, v26);
return 0xFFFFFFFFLL;
}
*(_WORD *)(v17 + 2LL * (int)a3) = a5;
*(_DWORD *)(*(_QWORD *)(a2 + 16) + 4LL * (int)a3) = a6;
v22 = *(_DWORD *)(a2 + 32);
if ( *(_DWORD *)(a2 + 36) > v22
|| (v25 = js_realloc_array(a1, (long long *)(a2 + 24), 4u, (_DWORD *)(a2 + 36), v22 + 1), result = 0xFFFFFFFFLL, !v25) )
{
v23 = *(_QWORD *)(a2 + 24);
v24 = *(int *)(a2 + 32);
*(_DWORD *)(a2 + 32) = v24 + 1;
*(_DWORD *)(v23 + 4 * v24) = a3;
return 0LL;
}
return result;
}
|
ss_check:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
CMP dword ptr [RSI],EDX
JBE 0x0016eb94
MOV R14,RSI
CMP dword ptr [RSI + 0x4],R8D
JGE 0x0016eba8
MOV dword ptr [R14 + 0x4],R8D
CMP R8D,0xffff
JL 0x0016eba8
LEA RSI,[0x1a0071]
JMP 0x0016eb9b
LAB_0016eb94:
LEA RSI,[0x1a002a]
LAB_0016eb9b:
MOV EDX,ECX
MOV ECX,EBX
XOR EAX,EAX
CALL 0x00121a7f
JMP 0x0016ec1b
LAB_0016eba8:
MOV RCX,qword ptr [R14 + 0x8]
MOVSXD RAX,EBX
MOVZX EDX,word ptr [RCX + RAX*0x2]
CMP EDX,0xffff
JZ 0x0016ebda
CMP EDX,R8D
JNZ 0x0016ec07
MOV RCX,qword ptr [R14 + 0x10]
MOV EDX,dword ptr [RCX + RAX*0x4]
XOR EAX,EAX
CMP EDX,R9D
JZ 0x0016ec20
LEA RSI,[0x1a00d5]
MOV ECX,R9D
JMP 0x0016ec11
LAB_0016ebda:
MOV word ptr [RCX + RAX*0x2],R8W
MOV RCX,qword ptr [R14 + 0x10]
MOV dword ptr [RCX + RAX*0x4],R9D
MOV R8D,dword ptr [R14 + 0x20]
CMP dword ptr [R14 + 0x24],R8D
JLE 0x0016ec28
LAB_0016ebf1:
MOV RAX,qword ptr [R14 + 0x18]
MOVSXD RCX,dword ptr [R14 + 0x20]
LEA EDX,[RCX + 0x1]
MOV dword ptr [R14 + 0x20],EDX
MOV dword ptr [RAX + RCX*0x4],EBX
XOR EAX,EAX
JMP 0x0016ec20
LAB_0016ec07:
LEA RSI,[0x1a00ae]
MOV ECX,R8D
LAB_0016ec11:
MOV R8D,EBX
XOR EAX,EAX
CALL 0x00121a7f
LAB_0016ec1b:
MOV EAX,0xffffffff
LAB_0016ec20:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0016ec28:
LEA RSI,[R14 + 0x18]
LEA RCX,[R14 + 0x24]
INC R8D
MOV EDX,0x4
CALL 0x001428db
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0016ec20
JMP 0x0016ebf1
|
int8
ss_check(int8 param_1,uint *param_2,uint param_3,int4 param_4,uint param_5,uint param_6)
{
ushort uVar1;
int iVar2;
long lVar3;
uint uVar4;
char *pcVar5;
if (param_3 < *param_2) {
if (((int)param_5 <= (int)param_2[1]) || (param_2[1] = param_5, (int)param_5 < 0xffff)) {
lVar3 = (long)(int)param_3;
uVar1 = *(ushort *)(*(long *)(param_2 + 2) + lVar3 * 2);
uVar4 = (uint)uVar1;
if (uVar1 != 0xffff) {
if (uVar1 == param_5) {
uVar4 = *(uint *)(*(long *)(param_2 + 4) + lVar3 * 4);
if (uVar4 == param_6) {
return 0;
}
pcVar5 = "inconsistent catch position: %d %d (pc=%d)";
param_5 = param_6;
}
else {
pcVar5 = "inconsistent stack size: %d %d (pc=%d)";
}
JS_ThrowInternalError(param_1,pcVar5,uVar4,param_5,param_3);
return 0xffffffff;
}
*(short *)(*(long *)(param_2 + 2) + lVar3 * 2) = (short)param_5;
*(uint *)(*(long *)(param_2 + 4) + lVar3 * 4) = param_6;
if (((int)param_2[9] <= (int)param_2[8]) &&
(iVar2 = js_realloc_array(param_1,param_2 + 6,4,param_2 + 9,param_2[8] + 1), iVar2 != 0)) {
return 0xffffffff;
}
uVar4 = param_2[8];
param_2[8] = uVar4 + 1;
*(uint *)(*(long *)(param_2 + 6) + (long)(int)uVar4 * 4) = param_3;
return 0;
}
pcVar5 = "stack overflow (op=%d, pc=%d)";
}
else {
pcVar5 = "bytecode buffer overflow (op=%d, pc=%d)";
}
JS_ThrowInternalError(param_1,pcVar5,param_4,param_3);
return 0xffffffff;
}
|
|
57,345
|
ss_check
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int ss_check(JSContext *ctx, StackSizeState *s,
int pos, int op, int stack_len, int catch_pos)
{
if ((unsigned)pos >= s->bc_len) {
JS_ThrowInternalError(ctx, "bytecode buffer overflow (op=%d, pc=%d)", op, pos);
return -1;
}
if (stack_len > s->stack_len_max) {
s->stack_len_max = stack_len;
if (s->stack_len_max > JS_STACK_SIZE_MAX) {
JS_ThrowInternalError(ctx, "stack overflow (op=%d, pc=%d)", op, pos);
return -1;
}
}
if (s->stack_level_tab[pos] != 0xffff) {
/* already explored: check that the stack size is consistent */
if (s->stack_level_tab[pos] != stack_len) {
JS_ThrowInternalError(ctx, "inconsistent stack size: %d %d (pc=%d)",
s->stack_level_tab[pos], stack_len, pos);
return -1;
} else if (s->catch_pos_tab[pos] != catch_pos) {
JS_ThrowInternalError(ctx, "inconsistent catch position: %d %d (pc=%d)",
s->catch_pos_tab[pos], catch_pos, pos);
return -1;
} else {
return 0;
}
}
/* mark as explored and store the stack size */
s->stack_level_tab[pos] = stack_len;
s->catch_pos_tab[pos] = catch_pos;
/* queue the new PC to explore */
if (js_resize_array(ctx, (void **)&s->pc_stack, sizeof(s->pc_stack[0]),
&s->pc_stack_size, s->pc_stack_len + 1))
return -1;
s->pc_stack[s->pc_stack_len++] = pos;
return 0;
}
|
O3
|
c
|
ss_check:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
cmpl %edx, (%rsi)
jbe 0x70e3f
movq %rsi, %r14
cmpl %r8d, 0x4(%rsi)
jge 0x70e53
movl %r8d, 0x4(%r14)
cmpl $0xffff, %r8d # imm = 0xFFFF
jl 0x70e53
leaq 0x321ee(%rip), %rsi # 0xa302b
jmp 0x70e46
leaq 0x3219e(%rip), %rsi # 0xa2fe4
movl %ecx, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2227b
jmp 0x70ec6
movq 0x8(%r14), %rcx
movslq %ebx, %rax
movzwl (%rcx,%rax,2), %edx
cmpl $0xffff, %edx # imm = 0xFFFF
je 0x70e85
cmpl %r8d, %edx
jne 0x70eb2
movq 0x10(%r14), %rcx
movl (%rcx,%rax,4), %edx
xorl %eax, %eax
cmpl %r9d, %edx
je 0x70ecb
leaq 0x3220f(%rip), %rsi # 0xa308f
movl %r9d, %ecx
jmp 0x70ebc
movw %r8w, (%rcx,%rax,2)
movq 0x10(%r14), %rcx
movl %r9d, (%rcx,%rax,4)
movl 0x20(%r14), %r8d
cmpl %r8d, 0x24(%r14)
jle 0x70ed3
movq 0x18(%r14), %rax
leal 0x1(%r8), %ecx
movl %ecx, 0x20(%r14)
movslq %r8d, %rcx
movl %ebx, (%rax,%rcx,4)
xorl %eax, %eax
jmp 0x70ecb
leaq 0x321af(%rip), %rsi # 0xa3068
movl %r8d, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x2227b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x18(%r14), %rsi
leaq 0x24(%r14), %rcx
incl %r8d
movl $0x4, %edx
callq 0x444ee
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x70ecb
movl 0x20(%r14), %r8d
jmp 0x70e9c
|
ss_check:
push r14
push rbx
push rax
mov ebx, edx
cmp [rsi], edx
jbe short loc_70E3F
mov r14, rsi
cmp [rsi+4], r8d
jge short loc_70E53
mov [r14+4], r8d
cmp r8d, 0FFFFh
jl short loc_70E53
lea rsi, aStackOverflowO; "stack overflow (op=%d, pc=%d)"
jmp short loc_70E46
loc_70E3F:
lea rsi, aBytecodeBuffer; "bytecode buffer overflow (op=%d, pc=%d)"
loc_70E46:
mov edx, ecx
mov ecx, ebx
xor eax, eax
call JS_ThrowInternalError
jmp short loc_70EC6
loc_70E53:
mov rcx, [r14+8]
movsxd rax, ebx
movzx edx, word ptr [rcx+rax*2]
cmp edx, 0FFFFh
jz short loc_70E85
cmp edx, r8d
jnz short loc_70EB2
mov rcx, [r14+10h]
mov edx, [rcx+rax*4]
xor eax, eax
cmp edx, r9d
jz short loc_70ECB
lea rsi, aInconsistentCa; "inconsistent catch position: %d %d (pc="...
mov ecx, r9d
jmp short loc_70EBC
loc_70E85:
mov [rcx+rax*2], r8w
mov rcx, [r14+10h]
mov [rcx+rax*4], r9d
mov r8d, [r14+20h]
cmp [r14+24h], r8d
jle short loc_70ED3
loc_70E9C:
mov rax, [r14+18h]
lea ecx, [r8+1]
mov [r14+20h], ecx
movsxd rcx, r8d
mov [rax+rcx*4], ebx
xor eax, eax
jmp short loc_70ECB
loc_70EB2:
lea rsi, aInconsistentSt; "inconsistent stack size: %d %d (pc=%d)"
mov ecx, r8d
loc_70EBC:
mov r8d, ebx
xor eax, eax
call JS_ThrowInternalError
loc_70EC6:
mov eax, 0FFFFFFFFh
loc_70ECB:
add rsp, 8
pop rbx
pop r14
retn
loc_70ED3:
lea rsi, [r14+18h]
lea rcx, [r14+24h]
inc r8d
mov edx, 4
call js_realloc_array
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_70ECB
mov r8d, [r14+20h]
jmp short loc_70E9C
|
long long ss_check(
long long a1,
long long a2,
unsigned int a3,
unsigned int a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
const char *v16; // rsi
long long v17; // rcx
long long v18; // rdx
long long result; // rax
const char *v20; // rsi
long long v21; // rcx
int v22; // r8d
long long v23; // rax
int v24; // ecx
char v25; // [rsp-8h] [rbp-18h]
v25 = v14;
if ( *(_DWORD *)a2 <= a3 )
{
v16 = "bytecode buffer overflow (op=%d, pc=%d)";
goto LABEL_6;
}
if ( *(_DWORD *)(a2 + 4) < (int)a5 )
{
*(_DWORD *)(a2 + 4) = a5;
if ( (int)a5 >= 0xFFFF )
{
v16 = "stack overflow (op=%d, pc=%d)";
LABEL_6:
JS_ThrowInternalError(a1, (long long)v16, a4, a3, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
return 0xFFFFFFFFLL;
}
}
v17 = *(_QWORD *)(a2 + 8);
v18 = *(unsigned __int16 *)(v17 + 2LL * (int)a3);
if ( (_DWORD)v18 != 0xFFFF )
{
if ( (_DWORD)v18 == (_DWORD)a5 )
{
v18 = *(unsigned int *)(*(_QWORD *)(a2 + 16) + 4LL * (int)a3);
result = 0LL;
if ( (_DWORD)v18 == (_DWORD)a6 )
return result;
v20 = "inconsistent catch position: %d %d (pc=%d)";
v21 = (unsigned int)a6;
}
else
{
v20 = "inconsistent stack size: %d %d (pc=%d)";
v21 = (unsigned int)a5;
}
JS_ThrowInternalError(a1, (long long)v20, v18, v21, a3, a6, a7, a8, a9, a10, a11, a12, a13, a14, v25);
return 0xFFFFFFFFLL;
}
*(_WORD *)(v17 + 2LL * (int)a3) = a5;
*(_DWORD *)(*(_QWORD *)(a2 + 16) + 4LL * (int)a3) = a6;
v22 = *(_DWORD *)(a2 + 32);
if ( *(_DWORD *)(a2 + 36) > v22 )
{
LABEL_12:
v23 = *(_QWORD *)(a2 + 24);
*(_DWORD *)(a2 + 32) = v22 + 1;
*(_DWORD *)(v23 + 4LL * v22) = a3;
return 0LL;
}
v24 = js_realloc_array(a1, (long long *)(a2 + 24), 4u, (_DWORD *)(a2 + 36), v22 + 1);
result = 0xFFFFFFFFLL;
if ( !v24 )
{
v22 = *(_DWORD *)(a2 + 32);
goto LABEL_12;
}
return result;
}
|
ss_check:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
CMP dword ptr [RSI],EDX
JBE 0x00170e3f
MOV R14,RSI
CMP dword ptr [RSI + 0x4],R8D
JGE 0x00170e53
MOV dword ptr [R14 + 0x4],R8D
CMP R8D,0xffff
JL 0x00170e53
LEA RSI,[0x1a302b]
JMP 0x00170e46
LAB_00170e3f:
LEA RSI,[0x1a2fe4]
LAB_00170e46:
MOV EDX,ECX
MOV ECX,EBX
XOR EAX,EAX
CALL 0x0012227b
JMP 0x00170ec6
LAB_00170e53:
MOV RCX,qword ptr [R14 + 0x8]
MOVSXD RAX,EBX
MOVZX EDX,word ptr [RCX + RAX*0x2]
CMP EDX,0xffff
JZ 0x00170e85
CMP EDX,R8D
JNZ 0x00170eb2
MOV RCX,qword ptr [R14 + 0x10]
MOV EDX,dword ptr [RCX + RAX*0x4]
XOR EAX,EAX
CMP EDX,R9D
JZ 0x00170ecb
LEA RSI,[0x1a308f]
MOV ECX,R9D
JMP 0x00170ebc
LAB_00170e85:
MOV word ptr [RCX + RAX*0x2],R8W
MOV RCX,qword ptr [R14 + 0x10]
MOV dword ptr [RCX + RAX*0x4],R9D
MOV R8D,dword ptr [R14 + 0x20]
CMP dword ptr [R14 + 0x24],R8D
JLE 0x00170ed3
LAB_00170e9c:
MOV RAX,qword ptr [R14 + 0x18]
LEA ECX,[R8 + 0x1]
MOV dword ptr [R14 + 0x20],ECX
MOVSXD RCX,R8D
MOV dword ptr [RAX + RCX*0x4],EBX
XOR EAX,EAX
JMP 0x00170ecb
LAB_00170eb2:
LEA RSI,[0x1a3068]
MOV ECX,R8D
LAB_00170ebc:
MOV R8D,EBX
XOR EAX,EAX
CALL 0x0012227b
LAB_00170ec6:
MOV EAX,0xffffffff
LAB_00170ecb:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00170ed3:
LEA RSI,[R14 + 0x18]
LEA RCX,[R14 + 0x24]
INC R8D
MOV EDX,0x4
CALL 0x001444ee
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x00170ecb
MOV R8D,dword ptr [R14 + 0x20]
JMP 0x00170e9c
|
int8
ss_check(int8 param_1,uint *param_2,uint param_3,int4 param_4,uint param_5,uint param_6)
{
ushort uVar1;
int iVar2;
long lVar3;
uint uVar4;
char *pcVar5;
if (param_3 < *param_2) {
if (((int)param_5 <= (int)param_2[1]) || (param_2[1] = param_5, (int)param_5 < 0xffff)) {
lVar3 = (long)(int)param_3;
uVar1 = *(ushort *)(*(long *)(param_2 + 2) + lVar3 * 2);
uVar4 = (uint)uVar1;
if (uVar1 == 0xffff) {
*(short *)(*(long *)(param_2 + 2) + lVar3 * 2) = (short)param_5;
*(uint *)(*(long *)(param_2 + 4) + lVar3 * 4) = param_6;
uVar4 = param_2[8];
if ((int)param_2[9] <= (int)uVar4) {
iVar2 = js_realloc_array(param_1,param_2 + 6,4,param_2 + 9,uVar4 + 1);
if (iVar2 != 0) {
return 0xffffffff;
}
uVar4 = param_2[8];
}
param_2[8] = uVar4 + 1;
*(uint *)(*(long *)(param_2 + 6) + (long)(int)uVar4 * 4) = param_3;
return 0;
}
if (uVar1 == param_5) {
uVar4 = *(uint *)(*(long *)(param_2 + 4) + lVar3 * 4);
if (uVar4 == param_6) {
return 0;
}
pcVar5 = "inconsistent catch position: %d %d (pc=%d)";
param_5 = param_6;
}
else {
pcVar5 = "inconsistent stack size: %d %d (pc=%d)";
}
JS_ThrowInternalError(param_1,pcVar5,uVar4,param_5,param_3);
return 0xffffffff;
}
pcVar5 = "stack overflow (op=%d, pc=%d)";
}
else {
pcVar5 = "bytecode buffer overflow (op=%d, pc=%d)";
}
JS_ThrowInternalError(param_1,pcVar5,param_4,param_3);
return 0xffffffff;
}
|
|
57,346
|
nglog::ShutdownLogging()
|
ng-log[P]ng-log/src/logging.cc
|
void ShutdownLogging() {
ShutdownLoggingUtilities();
LogDestination::DeleteLogDestinations();
logging_directories_list = nullptr;
g_prefix_formatter = nullptr;
}
|
O1
|
cpp
|
nglog::ShutdownLogging():
pushq %rax
callq 0x2148b
callq 0x99a6
leaq 0x308e2(%rip), %rdi # 0x3ec00
xorl %esi, %esi
callq 0x1ef72
movq 0x217c4(%rip), %rdi # 0x2faf0
movq $0x0, 0x217b9(%rip) # 0x2faf0
testq %rdi, %rdi
je 0xe347
movl $0x18, %esi
popq %rax
jmp 0x7540
popq %rax
retq
|
_ZN5nglog15ShutdownLoggingEv:
push rax
call _ZN5nglog5tools24ShutdownLoggingUtilitiesEv; nglog::tools::ShutdownLoggingUtilities(void)
call _ZN5nglog14LogDestination21DeleteLogDestinationsEv; nglog::LogDestination::DeleteLogDestinations(void)
lea rdi, _ZN5nglogL24logging_directories_listB5cxx11E; nglog::logging_directories_list
xor esi, esi
call _ZNSt15__uniq_ptr_implISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESt14default_deleteIS8_EE5resetEPS8_; std::__uniq_ptr_impl<std::vector<std::string>,std::default_delete<std::vector<std::string>>>::reset(std::vector<std::string>*)
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void *
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
jz short loc_E347
mov esi, 18h; unsigned __int64
pop rax
jmp __ZdlPvm; operator delete(void *,ulong)
loc_E347:
pop rax
retn
|
void nglog::ShutdownLogging(nglog *this)
{
void *v1; // rdi
nglog::tools::ShutdownLoggingUtilities(this);
nglog::LogDestination::DeleteLogDestinations(this);
std::__uniq_ptr_impl<std::vector<std::string>,std::default_delete<std::vector<std::string>>>::reset(
&nglog::logging_directories_list[abi:cxx11],
0LL);
v1 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = 0LL;
if ( v1 )
operator delete(v1, 0x18uLL);
}
|
ShutdownLogging:
PUSH RAX
CALL 0x0012148b
CALL 0x001099a6
LEA RDI,[0x13ec00]
XOR ESI,ESI
CALL 0x0011ef72
MOV RDI,qword ptr [0x0012faf0]
MOV qword ptr [0x0012faf0],0x0
TEST RDI,RDI
JZ 0x0010e347
MOV ESI,0x18
POP RAX
JMP 0x00107540
LAB_0010e347:
POP RAX
RET
|
/* nglog::ShutdownLogging() */
int8 nglog::ShutdownLogging(void)
{
void *pvVar1;
int8 in_RAX;
int8 extraout_RAX;
tools::ShutdownLoggingUtilities();
LogDestination::DeleteLogDestinations();
std::
__uniq_ptr_impl<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::default_delete<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
::reset((__uniq_ptr_impl<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::default_delete<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
*)&logging_directories_list_abi_cxx11_,(vector *)0x0);
pvVar1 = (anonymous_namespace)::g_prefix_formatter;
(anonymous_namespace)::g_prefix_formatter = (void *)0x0;
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,0x18);
return extraout_RAX;
}
return in_RAX;
}
|
|
57,347
|
clz_dec
|
bluesky950520[P]quickjs/libbf.c
|
static int clz_dec(limb_t a)
{
if (a == 0)
return LIMB_DIGITS;
switch(LIMB_BITS - 1 - clz(a)) {
case 0: /* 1-1 */
return LIMB_DIGITS - 1;
case 1: /* 2-3 */
return LIMB_DIGITS - 1;
case 2: /* 4-7 */
return LIMB_DIGITS - 1;
case 3: /* 8-15 */
if (a < 10)
return LIMB_DIGITS - 1;
else
return LIMB_DIGITS - 2;
case 4: /* 16-31 */
return LIMB_DIGITS - 2;
case 5: /* 32-63 */
return LIMB_DIGITS - 2;
case 6: /* 64-127 */
if (a < 100)
return LIMB_DIGITS - 2;
else
return LIMB_DIGITS - 3;
case 7: /* 128-255 */
return LIMB_DIGITS - 3;
case 8: /* 256-511 */
return LIMB_DIGITS - 3;
case 9: /* 512-1023 */
if (a < 1000)
return LIMB_DIGITS - 3;
else
return LIMB_DIGITS - 4;
case 10: /* 1024-2047 */
return LIMB_DIGITS - 4;
case 11: /* 2048-4095 */
return LIMB_DIGITS - 4;
case 12: /* 4096-8191 */
return LIMB_DIGITS - 4;
case 13: /* 8192-16383 */
if (a < 10000)
return LIMB_DIGITS - 4;
else
return LIMB_DIGITS - 5;
case 14: /* 16384-32767 */
return LIMB_DIGITS - 5;
case 15: /* 32768-65535 */
return LIMB_DIGITS - 5;
case 16: /* 65536-131071 */
if (a < 100000)
return LIMB_DIGITS - 5;
else
return LIMB_DIGITS - 6;
case 17: /* 131072-262143 */
return LIMB_DIGITS - 6;
case 18: /* 262144-524287 */
return LIMB_DIGITS - 6;
case 19: /* 524288-1048575 */
if (a < 1000000)
return LIMB_DIGITS - 6;
else
return LIMB_DIGITS - 7;
case 20: /* 1048576-2097151 */
return LIMB_DIGITS - 7;
case 21: /* 2097152-4194303 */
return LIMB_DIGITS - 7;
case 22: /* 4194304-8388607 */
return LIMB_DIGITS - 7;
case 23: /* 8388608-16777215 */
if (a < 10000000)
return LIMB_DIGITS - 7;
else
return LIMB_DIGITS - 8;
case 24: /* 16777216-33554431 */
return LIMB_DIGITS - 8;
case 25: /* 33554432-67108863 */
return LIMB_DIGITS - 8;
case 26: /* 67108864-134217727 */
if (a < 100000000)
return LIMB_DIGITS - 8;
else
return LIMB_DIGITS - 9;
#if LIMB_BITS == 64
case 27: /* 134217728-268435455 */
return LIMB_DIGITS - 9;
case 28: /* 268435456-536870911 */
return LIMB_DIGITS - 9;
case 29: /* 536870912-1073741823 */
if (a < 1000000000)
return LIMB_DIGITS - 9;
else
return LIMB_DIGITS - 10;
case 30: /* 1073741824-2147483647 */
return LIMB_DIGITS - 10;
case 31: /* 2147483648-4294967295 */
return LIMB_DIGITS - 10;
case 32: /* 4294967296-8589934591 */
return LIMB_DIGITS - 10;
case 33: /* 8589934592-17179869183 */
if (a < 10000000000)
return LIMB_DIGITS - 10;
else
return LIMB_DIGITS - 11;
case 34: /* 17179869184-34359738367 */
return LIMB_DIGITS - 11;
case 35: /* 34359738368-68719476735 */
return LIMB_DIGITS - 11;
case 36: /* 68719476736-137438953471 */
if (a < 100000000000)
return LIMB_DIGITS - 11;
else
return LIMB_DIGITS - 12;
case 37: /* 137438953472-274877906943 */
return LIMB_DIGITS - 12;
case 38: /* 274877906944-549755813887 */
return LIMB_DIGITS - 12;
case 39: /* 549755813888-1099511627775 */
if (a < 1000000000000)
return LIMB_DIGITS - 12;
else
return LIMB_DIGITS - 13;
case 40: /* 1099511627776-2199023255551 */
return LIMB_DIGITS - 13;
case 41: /* 2199023255552-4398046511103 */
return LIMB_DIGITS - 13;
case 42: /* 4398046511104-8796093022207 */
return LIMB_DIGITS - 13;
case 43: /* 8796093022208-17592186044415 */
if (a < 10000000000000)
return LIMB_DIGITS - 13;
else
return LIMB_DIGITS - 14;
case 44: /* 17592186044416-35184372088831 */
return LIMB_DIGITS - 14;
case 45: /* 35184372088832-70368744177663 */
return LIMB_DIGITS - 14;
case 46: /* 70368744177664-140737488355327 */
if (a < 100000000000000)
return LIMB_DIGITS - 14;
else
return LIMB_DIGITS - 15;
case 47: /* 140737488355328-281474976710655 */
return LIMB_DIGITS - 15;
case 48: /* 281474976710656-562949953421311 */
return LIMB_DIGITS - 15;
case 49: /* 562949953421312-1125899906842623 */
if (a < 1000000000000000)
return LIMB_DIGITS - 15;
else
return LIMB_DIGITS - 16;
case 50: /* 1125899906842624-2251799813685247 */
return LIMB_DIGITS - 16;
case 51: /* 2251799813685248-4503599627370495 */
return LIMB_DIGITS - 16;
case 52: /* 4503599627370496-9007199254740991 */
return LIMB_DIGITS - 16;
case 53: /* 9007199254740992-18014398509481983 */
if (a < 10000000000000000)
return LIMB_DIGITS - 16;
else
return LIMB_DIGITS - 17;
case 54: /* 18014398509481984-36028797018963967 */
return LIMB_DIGITS - 17;
case 55: /* 36028797018963968-72057594037927935 */
return LIMB_DIGITS - 17;
case 56: /* 72057594037927936-144115188075855871 */
if (a < 100000000000000000)
return LIMB_DIGITS - 17;
else
return LIMB_DIGITS - 18;
case 57: /* 144115188075855872-288230376151711743 */
return LIMB_DIGITS - 18;
case 58: /* 288230376151711744-576460752303423487 */
return LIMB_DIGITS - 18;
case 59: /* 576460752303423488-1152921504606846975 */
if (a < 1000000000000000000)
return LIMB_DIGITS - 18;
else
return LIMB_DIGITS - 19;
#endif
default:
return 0;
}
}
|
O0
|
c
|
clz_dec:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xf35ae
movl $0x13, 0x14(%rsp)
jmp 0xf3abd
movq 0x8(%rsp), %rdi
callq 0xe6160
movl %eax, %ecx
movl $0x3f, %eax
subl %ecx, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x3b, %eax
ja 0xf3ab5
movq (%rsp), %rax
leaq 0x1e341(%rip), %rcx # 0x11191c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x12, 0x14(%rsp)
jmp 0xf3abd
movl $0x12, 0x14(%rsp)
jmp 0xf3abd
movl $0x12, 0x14(%rsp)
jmp 0xf3abd
cmpq $0xa, 0x8(%rsp)
jae 0xf3620
movl $0x12, 0x14(%rsp)
jmp 0xf3abd
movl $0x11, 0x14(%rsp)
jmp 0xf3abd
movl $0x11, 0x14(%rsp)
jmp 0xf3abd
movl $0x11, 0x14(%rsp)
jmp 0xf3abd
cmpq $0x64, 0x8(%rsp)
jae 0xf365c
movl $0x11, 0x14(%rsp)
jmp 0xf3abd
movl $0x10, 0x14(%rsp)
jmp 0xf3abd
movl $0x10, 0x14(%rsp)
jmp 0xf3abd
movl $0x10, 0x14(%rsp)
jmp 0xf3abd
cmpq $0x3e8, 0x8(%rsp) # imm = 0x3E8
jae 0xf369b
movl $0x10, 0x14(%rsp)
jmp 0xf3abd
movl $0xf, 0x14(%rsp)
jmp 0xf3abd
movl $0xf, 0x14(%rsp)
jmp 0xf3abd
movl $0xf, 0x14(%rsp)
jmp 0xf3abd
movl $0xf, 0x14(%rsp)
jmp 0xf3abd
cmpq $0x2710, 0x8(%rsp) # imm = 0x2710
jae 0xf36e7
movl $0xf, 0x14(%rsp)
jmp 0xf3abd
movl $0xe, 0x14(%rsp)
jmp 0xf3abd
movl $0xe, 0x14(%rsp)
jmp 0xf3abd
movl $0xe, 0x14(%rsp)
jmp 0xf3abd
cmpq $0x186a0, 0x8(%rsp) # imm = 0x186A0
jae 0xf3726
movl $0xe, 0x14(%rsp)
jmp 0xf3abd
movl $0xd, 0x14(%rsp)
jmp 0xf3abd
movl $0xd, 0x14(%rsp)
jmp 0xf3abd
movl $0xd, 0x14(%rsp)
jmp 0xf3abd
cmpq $0xf4240, 0x8(%rsp) # imm = 0xF4240
jae 0xf3765
movl $0xd, 0x14(%rsp)
jmp 0xf3abd
movl $0xc, 0x14(%rsp)
jmp 0xf3abd
movl $0xc, 0x14(%rsp)
jmp 0xf3abd
movl $0xc, 0x14(%rsp)
jmp 0xf3abd
movl $0xc, 0x14(%rsp)
jmp 0xf3abd
cmpq $0x989680, 0x8(%rsp) # imm = 0x989680
jae 0xf37b1
movl $0xc, 0x14(%rsp)
jmp 0xf3abd
movl $0xb, 0x14(%rsp)
jmp 0xf3abd
movl $0xb, 0x14(%rsp)
jmp 0xf3abd
movl $0xb, 0x14(%rsp)
jmp 0xf3abd
cmpq $0x5f5e100, 0x8(%rsp) # imm = 0x5F5E100
jae 0xf37f0
movl $0xb, 0x14(%rsp)
jmp 0xf3abd
movl $0xa, 0x14(%rsp)
jmp 0xf3abd
movl $0xa, 0x14(%rsp)
jmp 0xf3abd
movl $0xa, 0x14(%rsp)
jmp 0xf3abd
cmpq $0x3b9aca00, 0x8(%rsp) # imm = 0x3B9ACA00
jae 0xf382f
movl $0xa, 0x14(%rsp)
jmp 0xf3abd
movl $0x9, 0x14(%rsp)
jmp 0xf3abd
movl $0x9, 0x14(%rsp)
jmp 0xf3abd
movl $0x9, 0x14(%rsp)
jmp 0xf3abd
movl $0x9, 0x14(%rsp)
jmp 0xf3abd
movabsq $0x2540be400, %rax # imm = 0x2540BE400
cmpq %rax, 0x8(%rsp)
jae 0xf3881
movl $0x9, 0x14(%rsp)
jmp 0xf3abd
movl $0x8, 0x14(%rsp)
jmp 0xf3abd
movl $0x8, 0x14(%rsp)
jmp 0xf3abd
movl $0x8, 0x14(%rsp)
jmp 0xf3abd
movabsq $0x174876e800, %rax # imm = 0x174876E800
cmpq %rax, 0x8(%rsp)
jae 0xf38c6
movl $0x8, 0x14(%rsp)
jmp 0xf3abd
movl $0x7, 0x14(%rsp)
jmp 0xf3abd
movl $0x7, 0x14(%rsp)
jmp 0xf3abd
movl $0x7, 0x14(%rsp)
jmp 0xf3abd
movabsq $0xe8d4a51000, %rax # imm = 0xE8D4A51000
cmpq %rax, 0x8(%rsp)
jae 0xf390b
movl $0x7, 0x14(%rsp)
jmp 0xf3abd
movl $0x6, 0x14(%rsp)
jmp 0xf3abd
movl $0x6, 0x14(%rsp)
jmp 0xf3abd
movl $0x6, 0x14(%rsp)
jmp 0xf3abd
movl $0x6, 0x14(%rsp)
jmp 0xf3abd
movabsq $0x9184e72a000, %rax # imm = 0x9184E72A000
cmpq %rax, 0x8(%rsp)
jae 0xf395d
movl $0x6, 0x14(%rsp)
jmp 0xf3abd
movl $0x5, 0x14(%rsp)
jmp 0xf3abd
movl $0x5, 0x14(%rsp)
jmp 0xf3abd
movl $0x5, 0x14(%rsp)
jmp 0xf3abd
movabsq $0x5af3107a4000, %rax # imm = 0x5AF3107A4000
cmpq %rax, 0x8(%rsp)
jae 0xf39a2
movl $0x5, 0x14(%rsp)
jmp 0xf3abd
movl $0x4, 0x14(%rsp)
jmp 0xf3abd
movl $0x4, 0x14(%rsp)
jmp 0xf3abd
movl $0x4, 0x14(%rsp)
jmp 0xf3abd
movabsq $0x38d7ea4c68000, %rax # imm = 0x38D7EA4C68000
cmpq %rax, 0x8(%rsp)
jae 0xf39e7
movl $0x4, 0x14(%rsp)
jmp 0xf3abd
movl $0x3, 0x14(%rsp)
jmp 0xf3abd
movl $0x3, 0x14(%rsp)
jmp 0xf3abd
movl $0x3, 0x14(%rsp)
jmp 0xf3abd
movl $0x3, 0x14(%rsp)
jmp 0xf3abd
movabsq $0x2386f26fc10000, %rax # imm = 0x2386F26FC10000
cmpq %rax, 0x8(%rsp)
jae 0xf3a39
movl $0x3, 0x14(%rsp)
jmp 0xf3abd
movl $0x2, 0x14(%rsp)
jmp 0xf3abd
movl $0x2, 0x14(%rsp)
jmp 0xf3abd
movl $0x2, 0x14(%rsp)
jmp 0xf3abd
movabsq $0x16345785d8a0000, %rax # imm = 0x16345785D8A0000
cmpq %rax, 0x8(%rsp)
jae 0xf3a72
movl $0x2, 0x14(%rsp)
jmp 0xf3abd
movl $0x1, 0x14(%rsp)
jmp 0xf3abd
movl $0x1, 0x14(%rsp)
jmp 0xf3abd
movl $0x1, 0x14(%rsp)
jmp 0xf3abd
movabsq $0xde0b6b3a7640000, %rax # imm = 0xDE0B6B3A7640000
cmpq %rax, 0x8(%rsp)
jae 0xf3aab
movl $0x1, 0x14(%rsp)
jmp 0xf3abd
movl $0x0, 0x14(%rsp)
jmp 0xf3abd
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
clz_dec:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
cmp [rsp+18h+var_10], 0
jnz short loc_F35AE
mov [rsp+18h+var_4], 13h
jmp loc_F3ABD
loc_F35AE:
mov rdi, [rsp+18h+var_10]
call clz
mov ecx, eax
mov eax, 3Fh ; '?'
sub eax, ecx
mov ecx, eax
mov [rsp+18h+var_18], rcx
sub eax, 3Bh; switch 60 cases
ja def_F35E2; jumptable 00000000000F35E2 default case
mov rax, [rsp+18h+var_18]
lea rcx, jpt_F35E2
movsxd rax, ds:(jpt_F35E2 - 11191Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_F35E4:
mov [rsp+18h+var_4], 12h; jumptable 00000000000F35E2 case 0
jmp loc_F3ABD
loc_F35F1:
mov [rsp+18h+var_4], 12h; jumptable 00000000000F35E2 case 1
jmp loc_F3ABD
loc_F35FE:
mov [rsp+18h+var_4], 12h; jumptable 00000000000F35E2 case 2
jmp loc_F3ABD
loc_F360B:
cmp [rsp+18h+var_10], 0Ah; jumptable 00000000000F35E2 case 3
jnb short loc_F3620
mov [rsp+18h+var_4], 12h
jmp loc_F3ABD
loc_F3620:
mov [rsp+18h+var_4], 11h
jmp loc_F3ABD
loc_F362D:
mov [rsp+18h+var_4], 11h; jumptable 00000000000F35E2 case 4
jmp loc_F3ABD
loc_F363A:
mov [rsp+18h+var_4], 11h; jumptable 00000000000F35E2 case 5
jmp loc_F3ABD
loc_F3647:
cmp [rsp+18h+var_10], 64h ; 'd'; jumptable 00000000000F35E2 case 6
jnb short loc_F365C
mov [rsp+18h+var_4], 11h
jmp loc_F3ABD
loc_F365C:
mov [rsp+18h+var_4], 10h
jmp loc_F3ABD
loc_F3669:
mov [rsp+18h+var_4], 10h; jumptable 00000000000F35E2 case 7
jmp loc_F3ABD
loc_F3676:
mov [rsp+18h+var_4], 10h; jumptable 00000000000F35E2 case 8
jmp loc_F3ABD
loc_F3683:
cmp [rsp+18h+var_10], 3E8h; jumptable 00000000000F35E2 case 9
jnb short loc_F369B
mov [rsp+18h+var_4], 10h
jmp loc_F3ABD
loc_F369B:
mov [rsp+18h+var_4], 0Fh
jmp loc_F3ABD
loc_F36A8:
mov [rsp+18h+var_4], 0Fh; jumptable 00000000000F35E2 case 10
jmp loc_F3ABD
loc_F36B5:
mov [rsp+18h+var_4], 0Fh; jumptable 00000000000F35E2 case 11
jmp loc_F3ABD
loc_F36C2:
mov [rsp+18h+var_4], 0Fh; jumptable 00000000000F35E2 case 12
jmp loc_F3ABD
loc_F36CF:
cmp [rsp+18h+var_10], 2710h; jumptable 00000000000F35E2 case 13
jnb short loc_F36E7
mov [rsp+18h+var_4], 0Fh
jmp loc_F3ABD
loc_F36E7:
mov [rsp+18h+var_4], 0Eh
jmp loc_F3ABD
loc_F36F4:
mov [rsp+18h+var_4], 0Eh; jumptable 00000000000F35E2 case 14
jmp loc_F3ABD
loc_F3701:
mov [rsp+18h+var_4], 0Eh; jumptable 00000000000F35E2 case 15
jmp loc_F3ABD
loc_F370E:
cmp [rsp+18h+var_10], offset loc_186A0; jumptable 00000000000F35E2 case 16
jnb short loc_F3726
mov [rsp+18h+var_4], 0Eh
jmp loc_F3ABD
loc_F3726:
mov [rsp+18h+var_4], 0Dh
jmp loc_F3ABD
loc_F3733:
mov [rsp+18h+var_4], 0Dh; jumptable 00000000000F35E2 case 17
jmp loc_F3ABD
loc_F3740:
mov [rsp+18h+var_4], 0Dh; jumptable 00000000000F35E2 case 18
jmp loc_F3ABD
loc_F374D:
cmp [rsp+18h+var_10], 0F4240h; jumptable 00000000000F35E2 case 19
jnb short loc_F3765
mov [rsp+18h+var_4], 0Dh
jmp loc_F3ABD
loc_F3765:
mov [rsp+18h+var_4], 0Ch
jmp loc_F3ABD
loc_F3772:
mov [rsp+18h+var_4], 0Ch; jumptable 00000000000F35E2 case 20
jmp loc_F3ABD
loc_F377F:
mov [rsp+18h+var_4], 0Ch; jumptable 00000000000F35E2 case 21
jmp loc_F3ABD
loc_F378C:
mov [rsp+18h+var_4], 0Ch; jumptable 00000000000F35E2 case 22
jmp loc_F3ABD
loc_F3799:
cmp [rsp+18h+var_10], 989680h; jumptable 00000000000F35E2 case 23
jnb short loc_F37B1
mov [rsp+18h+var_4], 0Ch
jmp loc_F3ABD
loc_F37B1:
mov [rsp+18h+var_4], 0Bh
jmp loc_F3ABD
loc_F37BE:
mov [rsp+18h+var_4], 0Bh; jumptable 00000000000F35E2 case 24
jmp loc_F3ABD
loc_F37CB:
mov [rsp+18h+var_4], 0Bh; jumptable 00000000000F35E2 case 25
jmp loc_F3ABD
loc_F37D8:
cmp [rsp+18h+var_10], 5F5E100h; jumptable 00000000000F35E2 case 26
jnb short loc_F37F0
mov [rsp+18h+var_4], 0Bh
jmp loc_F3ABD
loc_F37F0:
mov [rsp+18h+var_4], 0Ah
jmp loc_F3ABD
loc_F37FD:
mov [rsp+18h+var_4], 0Ah; jumptable 00000000000F35E2 case 27
jmp loc_F3ABD
loc_F380A:
mov [rsp+18h+var_4], 0Ah; jumptable 00000000000F35E2 case 28
jmp loc_F3ABD
loc_F3817:
cmp [rsp+18h+var_10], 3B9ACA00h; jumptable 00000000000F35E2 case 29
jnb short loc_F382F
mov [rsp+18h+var_4], 0Ah
jmp loc_F3ABD
loc_F382F:
mov [rsp+18h+var_4], 9
jmp loc_F3ABD
loc_F383C:
mov [rsp+18h+var_4], 9; jumptable 00000000000F35E2 case 30
jmp loc_F3ABD
loc_F3849:
mov [rsp+18h+var_4], 9; jumptable 00000000000F35E2 case 31
jmp loc_F3ABD
loc_F3856:
mov [rsp+18h+var_4], 9; jumptable 00000000000F35E2 case 32
jmp loc_F3ABD
loc_F3863:
mov rax, 2540BE400h; jumptable 00000000000F35E2 case 33
cmp [rsp+18h+var_10], rax
jnb short loc_F3881
mov [rsp+18h+var_4], 9
jmp loc_F3ABD
loc_F3881:
mov [rsp+18h+var_4], 8
jmp loc_F3ABD
loc_F388E:
mov [rsp+18h+var_4], 8; jumptable 00000000000F35E2 case 34
jmp loc_F3ABD
loc_F389B:
mov [rsp+18h+var_4], 8; jumptable 00000000000F35E2 case 35
jmp loc_F3ABD
loc_F38A8:
mov rax, 174876E800h; jumptable 00000000000F35E2 case 36
cmp [rsp+18h+var_10], rax
jnb short loc_F38C6
mov [rsp+18h+var_4], 8
jmp loc_F3ABD
loc_F38C6:
mov [rsp+18h+var_4], 7
jmp loc_F3ABD
loc_F38D3:
mov [rsp+18h+var_4], 7; jumptable 00000000000F35E2 case 37
jmp loc_F3ABD
loc_F38E0:
mov [rsp+18h+var_4], 7; jumptable 00000000000F35E2 case 38
jmp loc_F3ABD
loc_F38ED:
mov rax, 0E8D4A51000h; jumptable 00000000000F35E2 case 39
cmp [rsp+18h+var_10], rax
jnb short loc_F390B
mov [rsp+18h+var_4], 7
jmp loc_F3ABD
loc_F390B:
mov [rsp+18h+var_4], 6
jmp loc_F3ABD
loc_F3918:
mov [rsp+18h+var_4], 6; jumptable 00000000000F35E2 case 40
jmp loc_F3ABD
loc_F3925:
mov [rsp+18h+var_4], 6; jumptable 00000000000F35E2 case 41
jmp loc_F3ABD
loc_F3932:
mov [rsp+18h+var_4], 6; jumptable 00000000000F35E2 case 42
jmp loc_F3ABD
loc_F393F:
mov rax, 9184E72A000h; jumptable 00000000000F35E2 case 43
cmp [rsp+18h+var_10], rax
jnb short loc_F395D
mov [rsp+18h+var_4], 6
jmp loc_F3ABD
loc_F395D:
mov [rsp+18h+var_4], 5
jmp loc_F3ABD
loc_F396A:
mov [rsp+18h+var_4], 5; jumptable 00000000000F35E2 case 44
jmp loc_F3ABD
loc_F3977:
mov [rsp+18h+var_4], 5; jumptable 00000000000F35E2 case 45
jmp loc_F3ABD
loc_F3984:
mov rax, 5AF3107A4000h; jumptable 00000000000F35E2 case 46
cmp [rsp+18h+var_10], rax
jnb short loc_F39A2
mov [rsp+18h+var_4], 5
jmp loc_F3ABD
loc_F39A2:
mov [rsp+18h+var_4], 4
jmp loc_F3ABD
loc_F39AF:
mov [rsp+18h+var_4], 4; jumptable 00000000000F35E2 case 47
jmp loc_F3ABD
loc_F39BC:
mov [rsp+18h+var_4], 4; jumptable 00000000000F35E2 case 48
jmp loc_F3ABD
loc_F39C9:
mov rax, 38D7EA4C68000h; jumptable 00000000000F35E2 case 49
cmp [rsp+18h+var_10], rax
jnb short loc_F39E7
mov [rsp+18h+var_4], 4
jmp loc_F3ABD
loc_F39E7:
mov [rsp+18h+var_4], 3
jmp loc_F3ABD
loc_F39F4:
mov [rsp+18h+var_4], 3; jumptable 00000000000F35E2 case 50
jmp loc_F3ABD
loc_F3A01:
mov [rsp+18h+var_4], 3; jumptable 00000000000F35E2 case 51
jmp loc_F3ABD
loc_F3A0E:
mov [rsp+18h+var_4], 3; jumptable 00000000000F35E2 case 52
jmp loc_F3ABD
loc_F3A1B:
mov rax, 2386F26FC10000h; jumptable 00000000000F35E2 case 53
cmp [rsp+18h+var_10], rax
jnb short loc_F3A39
mov [rsp+18h+var_4], 3
jmp loc_F3ABD
loc_F3A39:
mov [rsp+18h+var_4], 2
jmp short loc_F3ABD
loc_F3A43:
mov [rsp+18h+var_4], 2; jumptable 00000000000F35E2 case 54
jmp short loc_F3ABD
loc_F3A4D:
mov [rsp+18h+var_4], 2; jumptable 00000000000F35E2 case 55
jmp short loc_F3ABD
loc_F3A57:
mov rax, 16345785D8A0000h; jumptable 00000000000F35E2 case 56
cmp [rsp+18h+var_10], rax
jnb short loc_F3A72
mov [rsp+18h+var_4], 2
jmp short loc_F3ABD
loc_F3A72:
mov [rsp+18h+var_4], 1
jmp short loc_F3ABD
loc_F3A7C:
mov [rsp+18h+var_4], 1; jumptable 00000000000F35E2 case 57
jmp short loc_F3ABD
loc_F3A86:
mov [rsp+18h+var_4], 1; jumptable 00000000000F35E2 case 58
jmp short loc_F3ABD
loc_F3A90:
mov rax, 0DE0B6B3A7640000h; jumptable 00000000000F35E2 case 59
cmp [rsp+18h+var_10], rax
jnb short loc_F3AAB
mov [rsp+18h+var_4], 1
jmp short loc_F3ABD
loc_F3AAB:
mov [rsp+18h+var_4], 0
jmp short loc_F3ABD
def_F35E2:
mov [rsp+18h+var_4], 0; jumptable 00000000000F35E2 default case
loc_F3ABD:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long clz_dec(unsigned long long a1)
{
unsigned int v2; // [rsp+14h] [rbp-4h]
if ( a1 )
{
switch ( 63 - (unsigned int)clz(a1) )
{
case 0u:
v2 = 18;
break;
case 1u:
v2 = 18;
break;
case 2u:
v2 = 18;
break;
case 3u:
if ( a1 >= 0xA )
v2 = 17;
else
v2 = 18;
break;
case 4u:
v2 = 17;
break;
case 5u:
v2 = 17;
break;
case 6u:
if ( a1 >= 0x64 )
v2 = 16;
else
v2 = 17;
break;
case 7u:
v2 = 16;
break;
case 8u:
v2 = 16;
break;
case 9u:
if ( a1 >= 0x3E8 )
v2 = 15;
else
v2 = 16;
break;
case 0xAu:
v2 = 15;
break;
case 0xBu:
v2 = 15;
break;
case 0xCu:
v2 = 15;
break;
case 0xDu:
if ( a1 >= 0x2710 )
v2 = 14;
else
v2 = 15;
break;
case 0xEu:
v2 = 14;
break;
case 0xFu:
v2 = 14;
break;
case 0x10u:
if ( a1 >= (unsigned long long)&loc_186A0 )
v2 = 13;
else
v2 = 14;
break;
case 0x11u:
v2 = 13;
break;
case 0x12u:
v2 = 13;
break;
case 0x13u:
if ( a1 >= 0xF4240 )
v2 = 12;
else
v2 = 13;
break;
case 0x14u:
v2 = 12;
break;
case 0x15u:
v2 = 12;
break;
case 0x16u:
v2 = 12;
break;
case 0x17u:
if ( a1 >= 0x989680 )
v2 = 11;
else
v2 = 12;
break;
case 0x18u:
v2 = 11;
break;
case 0x19u:
v2 = 11;
break;
case 0x1Au:
if ( a1 >= 0x5F5E100 )
v2 = 10;
else
v2 = 11;
break;
case 0x1Bu:
v2 = 10;
break;
case 0x1Cu:
v2 = 10;
break;
case 0x1Du:
if ( a1 >= 0x3B9ACA00 )
v2 = 9;
else
v2 = 10;
break;
case 0x1Eu:
v2 = 9;
break;
case 0x1Fu:
v2 = 9;
break;
case 0x20u:
v2 = 9;
break;
case 0x21u:
if ( a1 >= 0x2540BE400LL )
v2 = 8;
else
v2 = 9;
break;
case 0x22u:
v2 = 8;
break;
case 0x23u:
v2 = 8;
break;
case 0x24u:
if ( a1 >= 0x174876E800LL )
v2 = 7;
else
v2 = 8;
break;
case 0x25u:
v2 = 7;
break;
case 0x26u:
v2 = 7;
break;
case 0x27u:
if ( a1 >= 0xE8D4A51000LL )
v2 = 6;
else
v2 = 7;
break;
case 0x28u:
v2 = 6;
break;
case 0x29u:
v2 = 6;
break;
case 0x2Au:
v2 = 6;
break;
case 0x2Bu:
if ( a1 >= 0x9184E72A000LL )
v2 = 5;
else
v2 = 6;
break;
case 0x2Cu:
v2 = 5;
break;
case 0x2Du:
v2 = 5;
break;
case 0x2Eu:
if ( a1 >= 0x5AF3107A4000LL )
v2 = 4;
else
v2 = 5;
break;
case 0x2Fu:
v2 = 4;
break;
case 0x30u:
v2 = 4;
break;
case 0x31u:
if ( a1 >= 0x38D7EA4C68000LL )
v2 = 3;
else
v2 = 4;
break;
case 0x32u:
v2 = 3;
break;
case 0x33u:
v2 = 3;
break;
case 0x34u:
v2 = 3;
break;
case 0x35u:
if ( a1 >= 0x2386F26FC10000LL )
v2 = 2;
else
v2 = 3;
break;
case 0x36u:
v2 = 2;
break;
case 0x37u:
v2 = 2;
break;
case 0x38u:
if ( a1 >= 0x16345785D8A0000LL )
v2 = 1;
else
v2 = 2;
break;
case 0x39u:
v2 = 1;
break;
case 0x3Au:
v2 = 1;
break;
case 0x3Bu:
v2 = a1 < 0xDE0B6B3A7640000LL;
break;
default:
v2 = 0;
break;
}
}
else
{
return 19;
}
return v2;
}
|
clz_dec:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001f35ae
MOV dword ptr [RSP + 0x14],0x13
JMP 0x001f3abd
LAB_001f35ae:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001e6160
MOV ECX,EAX
MOV EAX,0x3f
SUB EAX,ECX
MOV ECX,EAX
MOV qword ptr [RSP],RCX
SUB EAX,0x3b
JA 0x001f3ab5
MOV RAX,qword ptr [RSP]
LEA RCX,[0x21191c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_ffffffc1:
MOV dword ptr [RSP + 0x14],0x12
JMP 0x001f3abd
caseD_ffffffc2:
MOV dword ptr [RSP + 0x14],0x12
JMP 0x001f3abd
caseD_ffffffc3:
MOV dword ptr [RSP + 0x14],0x12
JMP 0x001f3abd
caseD_ffffffc4:
CMP qword ptr [RSP + 0x8],0xa
JNC 0x001f3620
MOV dword ptr [RSP + 0x14],0x12
JMP 0x001f3abd
LAB_001f3620:
MOV dword ptr [RSP + 0x14],0x11
JMP 0x001f3abd
caseD_ffffffc5:
MOV dword ptr [RSP + 0x14],0x11
JMP 0x001f3abd
caseD_ffffffc6:
MOV dword ptr [RSP + 0x14],0x11
JMP 0x001f3abd
caseD_ffffffc7:
CMP qword ptr [RSP + 0x8],0x64
JNC 0x001f365c
MOV dword ptr [RSP + 0x14],0x11
JMP 0x001f3abd
LAB_001f365c:
MOV dword ptr [RSP + 0x14],0x10
JMP 0x001f3abd
caseD_ffffffc8:
MOV dword ptr [RSP + 0x14],0x10
JMP 0x001f3abd
caseD_ffffffc9:
MOV dword ptr [RSP + 0x14],0x10
JMP 0x001f3abd
caseD_ffffffca:
CMP qword ptr [RSP + 0x8],0x3e8
JNC 0x001f369b
MOV dword ptr [RSP + 0x14],0x10
JMP 0x001f3abd
LAB_001f369b:
MOV dword ptr [RSP + 0x14],0xf
JMP 0x001f3abd
caseD_ffffffcb:
MOV dword ptr [RSP + 0x14],0xf
JMP 0x001f3abd
caseD_ffffffcc:
MOV dword ptr [RSP + 0x14],0xf
JMP 0x001f3abd
caseD_ffffffcd:
MOV dword ptr [RSP + 0x14],0xf
JMP 0x001f3abd
caseD_ffffffce:
CMP qword ptr [RSP + 0x8],0x2710
JNC 0x001f36e7
MOV dword ptr [RSP + 0x14],0xf
JMP 0x001f3abd
LAB_001f36e7:
MOV dword ptr [RSP + 0x14],0xe
JMP 0x001f3abd
caseD_ffffffcf:
MOV dword ptr [RSP + 0x14],0xe
JMP 0x001f3abd
caseD_ffffffd0:
MOV dword ptr [RSP + 0x14],0xe
JMP 0x001f3abd
caseD_ffffffd1:
CMP qword ptr [RSP + 0x8],0x186a0
JNC 0x001f3726
MOV dword ptr [RSP + 0x14],0xe
JMP 0x001f3abd
LAB_001f3726:
MOV dword ptr [RSP + 0x14],0xd
JMP 0x001f3abd
caseD_ffffffd2:
MOV dword ptr [RSP + 0x14],0xd
JMP 0x001f3abd
caseD_ffffffd3:
MOV dword ptr [RSP + 0x14],0xd
JMP 0x001f3abd
caseD_ffffffd4:
CMP qword ptr [RSP + 0x8],0xf4240
JNC 0x001f3765
MOV dword ptr [RSP + 0x14],0xd
JMP 0x001f3abd
LAB_001f3765:
MOV dword ptr [RSP + 0x14],0xc
JMP 0x001f3abd
caseD_ffffffd5:
MOV dword ptr [RSP + 0x14],0xc
JMP 0x001f3abd
caseD_ffffffd6:
MOV dword ptr [RSP + 0x14],0xc
JMP 0x001f3abd
caseD_ffffffd7:
MOV dword ptr [RSP + 0x14],0xc
JMP 0x001f3abd
caseD_ffffffd8:
CMP qword ptr [RSP + 0x8],0x989680
JNC 0x001f37b1
MOV dword ptr [RSP + 0x14],0xc
JMP 0x001f3abd
LAB_001f37b1:
MOV dword ptr [RSP + 0x14],0xb
JMP 0x001f3abd
caseD_ffffffd9:
MOV dword ptr [RSP + 0x14],0xb
JMP 0x001f3abd
caseD_ffffffda:
MOV dword ptr [RSP + 0x14],0xb
JMP 0x001f3abd
caseD_ffffffdb:
CMP qword ptr [RSP + 0x8],0x5f5e100
JNC 0x001f37f0
MOV dword ptr [RSP + 0x14],0xb
JMP 0x001f3abd
LAB_001f37f0:
MOV dword ptr [RSP + 0x14],0xa
JMP 0x001f3abd
caseD_ffffffdc:
MOV dword ptr [RSP + 0x14],0xa
JMP 0x001f3abd
caseD_ffffffdd:
MOV dword ptr [RSP + 0x14],0xa
JMP 0x001f3abd
caseD_ffffffde:
CMP qword ptr [RSP + 0x8],0x3b9aca00
JNC 0x001f382f
MOV dword ptr [RSP + 0x14],0xa
JMP 0x001f3abd
LAB_001f382f:
MOV dword ptr [RSP + 0x14],0x9
JMP 0x001f3abd
caseD_ffffffdf:
MOV dword ptr [RSP + 0x14],0x9
JMP 0x001f3abd
caseD_ffffffe0:
MOV dword ptr [RSP + 0x14],0x9
JMP 0x001f3abd
caseD_ffffffe1:
MOV dword ptr [RSP + 0x14],0x9
JMP 0x001f3abd
caseD_ffffffe2:
MOV RAX,0x2540be400
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f3881
MOV dword ptr [RSP + 0x14],0x9
JMP 0x001f3abd
LAB_001f3881:
MOV dword ptr [RSP + 0x14],0x8
JMP 0x001f3abd
caseD_ffffffe3:
MOV dword ptr [RSP + 0x14],0x8
JMP 0x001f3abd
caseD_ffffffe4:
MOV dword ptr [RSP + 0x14],0x8
JMP 0x001f3abd
caseD_ffffffe5:
MOV RAX,0x174876e800
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f38c6
MOV dword ptr [RSP + 0x14],0x8
JMP 0x001f3abd
LAB_001f38c6:
MOV dword ptr [RSP + 0x14],0x7
JMP 0x001f3abd
caseD_ffffffe6:
MOV dword ptr [RSP + 0x14],0x7
JMP 0x001f3abd
caseD_ffffffe7:
MOV dword ptr [RSP + 0x14],0x7
JMP 0x001f3abd
caseD_ffffffe8:
MOV RAX,0xe8d4a51000
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f390b
MOV dword ptr [RSP + 0x14],0x7
JMP 0x001f3abd
LAB_001f390b:
MOV dword ptr [RSP + 0x14],0x6
JMP 0x001f3abd
caseD_ffffffe9:
MOV dword ptr [RSP + 0x14],0x6
JMP 0x001f3abd
caseD_ffffffea:
MOV dword ptr [RSP + 0x14],0x6
JMP 0x001f3abd
caseD_ffffffeb:
MOV dword ptr [RSP + 0x14],0x6
JMP 0x001f3abd
caseD_ffffffec:
MOV RAX,0x9184e72a000
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f395d
MOV dword ptr [RSP + 0x14],0x6
JMP 0x001f3abd
LAB_001f395d:
MOV dword ptr [RSP + 0x14],0x5
JMP 0x001f3abd
caseD_ffffffed:
MOV dword ptr [RSP + 0x14],0x5
JMP 0x001f3abd
caseD_ffffffee:
MOV dword ptr [RSP + 0x14],0x5
JMP 0x001f3abd
caseD_ffffffef:
MOV RAX,0x5af3107a4000
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f39a2
MOV dword ptr [RSP + 0x14],0x5
JMP 0x001f3abd
LAB_001f39a2:
MOV dword ptr [RSP + 0x14],0x4
JMP 0x001f3abd
caseD_fffffff0:
MOV dword ptr [RSP + 0x14],0x4
JMP 0x001f3abd
caseD_fffffff1:
MOV dword ptr [RSP + 0x14],0x4
JMP 0x001f3abd
caseD_fffffff2:
MOV RAX,0x38d7ea4c68000
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f39e7
MOV dword ptr [RSP + 0x14],0x4
JMP 0x001f3abd
LAB_001f39e7:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x001f3abd
caseD_fffffff3:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x001f3abd
caseD_fffffff4:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x001f3abd
caseD_fffffff5:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x001f3abd
caseD_fffffff6:
MOV RAX,0x2386f26fc10000
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f3a39
MOV dword ptr [RSP + 0x14],0x3
JMP 0x001f3abd
LAB_001f3a39:
MOV dword ptr [RSP + 0x14],0x2
JMP 0x001f3abd
caseD_fffffff7:
MOV dword ptr [RSP + 0x14],0x2
JMP 0x001f3abd
caseD_fffffff8:
MOV dword ptr [RSP + 0x14],0x2
JMP 0x001f3abd
caseD_fffffff9:
MOV RAX,0x16345785d8a0000
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f3a72
MOV dword ptr [RSP + 0x14],0x2
JMP 0x001f3abd
LAB_001f3a72:
MOV dword ptr [RSP + 0x14],0x1
JMP 0x001f3abd
caseD_fffffffa:
MOV dword ptr [RSP + 0x14],0x1
JMP 0x001f3abd
caseD_fffffffb:
MOV dword ptr [RSP + 0x14],0x1
JMP 0x001f3abd
caseD_fffffffc:
MOV RAX,0xde0b6b3a7640000
CMP qword ptr [RSP + 0x8],RAX
JNC 0x001f3aab
MOV dword ptr [RSP + 0x14],0x1
JMP 0x001f3abd
LAB_001f3aab:
MOV dword ptr [RSP + 0x14],0x0
JMP 0x001f3abd
default:
MOV dword ptr [RSP + 0x14],0x0
LAB_001f3abd:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
int4 clz_dec(ulong param_1)
{
int iVar1;
int4 local_4;
if (param_1 == 0) {
local_4 = 0x13;
}
else {
iVar1 = clz(param_1);
switch(-iVar1) {
case -0x3f:
local_4 = 0x12;
break;
case -0x3e:
local_4 = 0x12;
break;
case -0x3d:
local_4 = 0x12;
break;
case -0x3c:
if (param_1 < 10) {
local_4 = 0x12;
}
else {
local_4 = 0x11;
}
break;
case -0x3b:
local_4 = 0x11;
break;
case -0x3a:
local_4 = 0x11;
break;
case -0x39:
if (param_1 < 100) {
local_4 = 0x11;
}
else {
local_4 = 0x10;
}
break;
case -0x38:
local_4 = 0x10;
break;
case -0x37:
local_4 = 0x10;
break;
case -0x36:
if (param_1 < 1000) {
local_4 = 0x10;
}
else {
local_4 = 0xf;
}
break;
case -0x35:
local_4 = 0xf;
break;
case -0x34:
local_4 = 0xf;
break;
case -0x33:
local_4 = 0xf;
break;
case -0x32:
if (param_1 < 10000) {
local_4 = 0xf;
}
else {
local_4 = 0xe;
}
break;
case -0x31:
local_4 = 0xe;
break;
case -0x30:
local_4 = 0xe;
break;
case -0x2f:
if (param_1 < 100000) {
local_4 = 0xe;
}
else {
local_4 = 0xd;
}
break;
case -0x2e:
local_4 = 0xd;
break;
case -0x2d:
local_4 = 0xd;
break;
case -0x2c:
if (param_1 < 1000000) {
local_4 = 0xd;
}
else {
local_4 = 0xc;
}
break;
case -0x2b:
local_4 = 0xc;
break;
case -0x2a:
local_4 = 0xc;
break;
case -0x29:
local_4 = 0xc;
break;
case -0x28:
if (param_1 < 10000000) {
local_4 = 0xc;
}
else {
local_4 = 0xb;
}
break;
case -0x27:
local_4 = 0xb;
break;
case -0x26:
local_4 = 0xb;
break;
case -0x25:
if (param_1 < 100000000) {
local_4 = 0xb;
}
else {
local_4 = 10;
}
break;
case -0x24:
local_4 = 10;
break;
case -0x23:
local_4 = 10;
break;
case -0x22:
if (param_1 < 1000000000) {
local_4 = 10;
}
else {
local_4 = 9;
}
break;
case -0x21:
local_4 = 9;
break;
case -0x20:
local_4 = 9;
break;
case -0x1f:
local_4 = 9;
break;
case -0x1e:
if (param_1 < 10000000000) {
local_4 = 9;
}
else {
local_4 = 8;
}
break;
case -0x1d:
local_4 = 8;
break;
case -0x1c:
local_4 = 8;
break;
case -0x1b:
if (param_1 < 100000000000) {
local_4 = 8;
}
else {
local_4 = 7;
}
break;
case -0x1a:
local_4 = 7;
break;
case -0x19:
local_4 = 7;
break;
case -0x18:
if (param_1 < 1000000000000) {
local_4 = 7;
}
else {
local_4 = 6;
}
break;
case -0x17:
local_4 = 6;
break;
case -0x16:
local_4 = 6;
break;
case -0x15:
local_4 = 6;
break;
case -0x14:
if (param_1 < 10000000000000) {
local_4 = 6;
}
else {
local_4 = 5;
}
break;
case -0x13:
local_4 = 5;
break;
case -0x12:
local_4 = 5;
break;
case -0x11:
if (param_1 < 100000000000000) {
local_4 = 5;
}
else {
local_4 = 4;
}
break;
case -0x10:
local_4 = 4;
break;
case -0xf:
local_4 = 4;
break;
case -0xe:
if (param_1 < 1000000000000000) {
local_4 = 4;
}
else {
local_4 = 3;
}
break;
case -0xd:
local_4 = 3;
break;
case -0xc:
local_4 = 3;
break;
case -0xb:
local_4 = 3;
break;
case -10:
if (param_1 < 10000000000000000) {
local_4 = 3;
}
else {
local_4 = 2;
}
break;
case -9:
local_4 = 2;
break;
case -8:
local_4 = 2;
break;
case -7:
if (param_1 < 100000000000000000) {
local_4 = 2;
}
else {
local_4 = 1;
}
break;
case -6:
local_4 = 1;
break;
case -5:
local_4 = 1;
break;
case -4:
if (param_1 < 1000000000000000000) {
local_4 = 1;
}
else {
local_4 = 0;
}
break;
default:
local_4 = 0;
}
}
return local_4;
}
|
|
57,348
|
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::set_parent(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, unsigned long)
|
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
|
reference set_parent(reference j, std::size_t old_capacity = detail::unknown_size())
{
#if JSON_DIAGNOSTICS
if (old_capacity != detail::unknown_size())
{
// see https://github.com/nlohmann/json/issues/2838
JSON_ASSERT(type() == value_t::array);
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
return j;
}
}
// ordered_json uses a vector internally, so pointers could have
// been invalidated; see https://github.com/nlohmann/json/issues/2962
#ifdef JSON_HEDLEY_MSVC_VERSION
#pragma warning(push )
#pragma warning(disable : 4127) // ignore warning to replace if with if constexpr
#endif
if (detail::is_ordered_map<object_t>::value)
{
set_parents();
return j;
}
#ifdef JSON_HEDLEY_MSVC_VERSION
#pragma warning( pop )
#endif
j.m_parent = this;
#else
static_cast<void>(j);
static_cast<void>(old_capacity);
#endif
return j;
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::set_parent(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, unsigned long):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parent(
long long a1,
long long a2)
{
return a2;
}
|
set_parent:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >,
void>::set_parent(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, unsigned long) */
ulong nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::set_parent(basic_json *param_1,ulong param_2)
{
return param_2;
}
|
|
57,349
|
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
}
|
O1
|
cpp
|
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp # imm = 0x160
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x304(%rip), %rax # 0xbeb7c
movq %rax, 0x18(%rsi)
leaq 0x325(%rip), %rax # 0xbeba8
movq %rax, 0x10(%rsi)
movzbl (%rdx), %eax
movzbl 0x1(%rdx), %ecx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0xc1dfa
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbe8b4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movq %r15, (%rsp)
leaq 0x2f5(%rip), %rax # 0xbebc0
movq %rax, 0x18(%rsp)
leaq 0x2fb(%rip), %rax # 0xbebd2
movq %rax, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x306(%rip), %rax # 0xbebf8
movq %rax, 0x38(%rsp)
leaq 0x3ac(%rip), %rax # 0xbecaa
movq %rax, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x2e37(%rip), %rax # 0xc1750
movq %rax, 0x58(%rsp)
leaq 0x2e95(%rip), %rax # 0xc17ba
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x10(%r14)
je 0xbea0b
movq %rsp, %rsi
movq %r14, %rdi
callq *0x18(%r14)
leaq 0x68(%rsp), %rdi
callq 0xc1ffc
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xc21b2
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xbe96f
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xbe988
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbe99f
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x148(%rsp), %rdi
callq 0x23eea
leaq 0x130(%rsp), %rdi
callq 0x23eea
leaq 0xf8(%rsp), %rdi
callq 0x81344
leaq 0xc0(%rsp), %rdi
callq 0xc29c6
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0xc2aa8
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xbe9fb
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
callq 0x1b320
jmp 0xbea36
jmp 0xbea36
jmp 0xbea36
jmp 0xbea36
jmp 0xbea36
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbea53
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xbea53
movq %rax, %rdi
callq 0x242ab
movq %rax, %rbx
movq %rsp, %rdi
callq 0xc22be
leaq 0x68(%rsp), %rdi
callq 0xc2314
movq %rbx, %rdi
callq 0x1c030
nop
|
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
push r15
push r14
push rbx
sub rsp, 160h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp; int
movaps xmmword ptr [rsi], xmm0
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
movzx eax, byte ptr [rdx]
movzx ecx, byte ptr [rdx+1]; int
lea r15, [rsp+178h+var_110]
mov rdi, r15; int
mov edx, eax; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&,bool,bool)
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_BE8B4
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BE8B4:
xorps xmm0, xmm0
movaps [rsp+178h+var_178], xmm0
movaps [rsp+178h+var_168], xmm0
mov qword ptr [rsp+178h+var_178], r15
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&)
mov qword ptr [rsp+178h+var_168+8], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_168], rax
movaps [rsp+178h+var_158], xmm0
movaps [rsp+178h+var_148], xmm0
mov qword ptr [rsp+178h+var_158], r15
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov qword ptr [rsp+178h+var_148+8], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_148], rax
movaps [rsp+178h+var_138], xmm0
movaps [rsp+178h+var_128], xmm0
mov qword ptr [rsp+178h+var_138], r15
lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov qword ptr [rsp+178h+var_128+8], rax
lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_128], rax
cmp qword ptr [r14+10h], 0
jz loc_BEA0B
mov rsi, rsp
mov rdi, r14
call qword ptr [r14+18h]
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
lea rsi, [rsp+178h+var_110]
mov rdi, rbx
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
mov rax, qword ptr [rsp+178h+var_128]
test rax, rax
jz short loc_BE96F
lea rdi, [rsp+178h+var_138]
mov rsi, rdi
mov edx, 3
call rax
loc_BE96F:
mov rax, qword ptr [rsp+178h+var_148]
test rax, rax
jz short loc_BE988
lea rdi, [rsp+178h+var_158]
mov rsi, rdi
mov edx, 3
call rax
loc_BE988:
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_BE99F
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BE99F:
lea rdi, [rsp+178h+var_30]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_80]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+178h+var_B8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea r14, [rsp+178h+var_E8]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rax, [r14-18h]
test rax, rax
jz short loc_BE9FB
lea rdi, [rsp+178h+var_110]
mov rsi, rdi
mov edx, 3
call rax
loc_BE9FB:
mov rax, rbx
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_BEA0B:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_BEA36
jmp short loc_BEA36
jmp short loc_BEA36
jmp short loc_BEA36
jmp short loc_BEA36
mov rbx, rax
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_BEA53
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_BEA53
loc_BEA36:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_BEA53:
mov rdi, rbx
call __Unwind_Resume
|
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
__int128 v11; // [rsp+0h] [rbp-178h] BYREF
long long ( *v12)(); // [rsp+10h] [rbp-168h]
void *v13; // [rsp+18h] [rbp-160h]
__int128 v14; // [rsp+20h] [rbp-158h] BYREF
long long ( *v15)(); // [rsp+30h] [rbp-148h]
long long ( *v16)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h]
__int128 v17; // [rsp+40h] [rbp-138h] BYREF
long long ( *v18)(); // [rsp+50h] [rbp-128h]
long long ( *v19)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h]
int v20; // [rsp+60h] [rbp-118h]
int v21[4]; // [rsp+68h] [rbp-110h] BYREF
void ( *v22)(int *, int *, long long); // [rsp+78h] [rbp-100h]
_BYTE v23[48]; // [rsp+90h] [rbp-E8h] BYREF
_BYTE v24[56]; // [rsp+C0h] [rbp-B8h] BYREF
_BYTE v25[56]; // [rsp+F8h] [rbp-80h] BYREF
_QWORD v26[3]; // [rsp+130h] [rbp-48h] BYREF
_QWORD v27[6]; // [rsp+148h] [rbp-30h] BYREF
SchemaConverter::SchemaConverter(
(int)v21,
(int)&v11,
*a3,
a3[1],
a5,
a6,
0LL,
0,
(long long)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager,
(int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke,
(void *)v14,
SDWORD2(v14),
(long long)v15);
if ( v12 )
((void ( *)(__int128 *, __int128 *, long long))v12)(&v11, &v11, 3LL);
v11 = (unsigned long long)v21;
v13 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke;
v12 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager;
v14 = (unsigned long long)v21;
v16 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke;
v15 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager;
v17 = (unsigned long long)v21;
v19 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke;
v18 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, __int128 *))(a2 + 24))(a2, &v11);
SchemaConverter::check_errors((SchemaConverter *)v21);
SchemaConverter::format_grammar[abi:cxx11](
a1,
(unsigned int)v21,
v6,
v7,
v8,
v9,
v11,
DWORD2(v11),
(_DWORD)v12,
(_DWORD)v13,
v14,
DWORD2(v14),
(_DWORD)v15,
(_DWORD)v16,
v17,
DWORD2(v17),
(_DWORD)v18,
(_DWORD)v19,
v20,
v21[0],
v21[2],
(char)v22);
if ( v18 )
((void ( *)(__int128 *, __int128 *, long long))v18)(&v17, &v17, 3LL);
if ( v15 )
((void ( *)(__int128 *, __int128 *, long long))v15)(&v14, &v14, 3LL);
if ( v12 )
((void ( *)(__int128 *, __int128 *, long long))v12)(&v11, &v11, 3LL);
std::vector<std::string>::~vector(v27);
std::vector<std::string>::~vector(v26);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v25);
std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v24);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v23);
if ( v22 )
v22(v21, v21, 3LL);
return a1;
}
|
build_grammar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x160
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
LEA RAX,[0x1beb7c]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1beba8]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EAX,byte ptr [RDX]
MOVZX ECX,byte ptr [RDX + 0x1]
LAB_001be88e:
LEA R15,[RSP + 0x68]
MOV RDI,R15
MOV EDX,EAX
CALL 0x001c1dfa
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001be8b4
LAB_001be8a7:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be8b4:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP],R15
LEA RAX,[0x1bebc0]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[0x1bebd2]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x20],R15
LEA RAX,[0x1bebf8]
MOV qword ptr [RSP + 0x38],RAX
LEA RAX,[0x1becaa]
MOV qword ptr [RSP + 0x30],RAX
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOV qword ptr [RSP + 0x40],R15
LEA RAX,[0x1c1750]
MOV qword ptr [RSP + 0x58],RAX
LEA RAX,[0x1c17ba]
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001bea0b
LAB_001be935:
MOV RSI,RSP
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
LEA RDI,[RSP + 0x68]
CALL 0x001c1ffc
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x001c21b2
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001be96f
LEA RDI,[RSP + 0x40]
LAB_001be965:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be96f:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001be988
LEA RDI,[RSP + 0x20]
LAB_001be97e:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be988:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001be99f
LAB_001be992:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be99f:
LEA RDI,[RSP + 0x148]
CALL 0x00123eea
LEA RDI,[RSP + 0x130]
CALL 0x00123eea
LEA RDI,[RSP + 0xf8]
CALL 0x00181344
LEA RDI,[RSP + 0xc0]
CALL 0x001c29c6
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x001c2aa8
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001be9fb
LAB_001be9ec:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be9fb:
MOV RAX,RBX
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001bea0b:
CALL 0x0011b320
|
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&,
common_grammar_options const&) */
function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2)
{
long in_RDX;
SchemaConverter *local_178;
int8 uStack_170;
code *local_168;
code *pcStack_160;
SchemaConverter *local_158;
int8 uStack_150;
code *local_148;
code *pcStack_140;
SchemaConverter *local_138;
int8 uStack_130;
code *local_128;
code *pcStack_120;
SchemaConverter local_110 [16];
code *local_100;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_e8 [48];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
local_b8 [56];
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
local_80 [56];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24];
local_178 = (SchemaConverter *)0x0;
uStack_170 = 0;
pcStack_160 = std::
_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_invoke;
local_168 = std::
_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_manager;
/* try { // try from 001be88e to 001be89c has its CatchHandler @ 001bea1a */
SchemaConverter::SchemaConverter
(local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1));
if (local_168 != (code *)0x0) {
/* try { // try from 001be8a7 to 001be8b3 has its CatchHandler @ 001bea18 */
(*local_168)(&local_178,&local_178,3);
}
uStack_170 = 0;
pcStack_160 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_invoke;
local_168 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_manager;
uStack_150 = 0;
pcStack_140 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_invoke;
local_148 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_manager;
uStack_130 = 0;
pcStack_120 = std::
_Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_invoke;
local_128 = std::
_Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_manager;
local_178 = local_110;
local_158 = local_110;
local_138 = local_110;
if (*(long *)(param_2 + 0x10) != 0) {
/* try { // try from 001be935 to 001be955 has its CatchHandler @ 001bea3e */
(**(code **)(param_2 + 0x18))(param_2,&local_178);
SchemaConverter::check_errors(local_110);
SchemaConverter::format_grammar_abi_cxx11_();
if (local_128 != (code *)0x0) {
/* try { // try from 001be965 to 001be96e has its CatchHandler @ 001bea16 */
(*local_128)(&local_138,&local_138,3);
}
if (local_148 != (code *)0x0) {
/* try { // try from 001be97e to 001be987 has its CatchHandler @ 001bea14 */
(*local_148)(&local_158,&local_158,3);
}
if (local_168 != (code *)0x0) {
/* try { // try from 001be992 to 001be99e has its CatchHandler @ 001bea12 */
(*local_168)(&local_178,&local_178,3);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable(local_80);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_e8);
if (local_100 != (code *)0x0) {
/* try { // try from 001be9ec to 001be9fa has its CatchHandler @ 001bea10 */
(*local_100)(local_110,local_110,3);
}
return param_1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001bea0b to 001bea0f has its CatchHandler @ 001bea3e */
std::__throw_bad_function_call();
}
|
|
57,350
|
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
}
|
O3
|
cpp
|
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp # imm = 0x160
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x2f4(%rip), %rax # 0xbe25e
movq %rax, 0x18(%rsi)
leaq 0x315(%rip), %rax # 0xbe28a
movq %rax, 0x10(%rsi)
movzbl (%rdx), %eax
movzbl 0x1(%rdx), %ecx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0xc152c
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbdfa6
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r15, (%rsp)
leaq 0x2ea(%rip), %rcx # 0xbe2a2
movq %rcx, 0x18(%rsp)
leaq 0x2f0(%rip), %rcx # 0xbe2b4
movq %rcx, 0x10(%rsp)
movq %rax, 0x28(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x300(%rip), %rcx # 0xbe2da
movq %rcx, 0x38(%rsp)
leaq 0x3a6(%rip), %rcx # 0xbe38c
movq %rcx, 0x30(%rsp)
movq %rax, 0x48(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x2e86(%rip), %rcx # 0xc0e82
movq %rcx, 0x58(%rsp)
leaq 0x2ee4(%rip), %rcx # 0xc0eec
movq %rcx, 0x50(%rsp)
cmpq %rax, 0x10(%r14)
je 0xbe0ed
movq %rsp, %rsi
movq %r14, %rdi
callq *0x18(%r14)
leaq 0x68(%rsp), %rdi
callq 0xc172e
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xc18f6
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xbe051
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xbe06a
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbe081
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x148(%rsp), %rdi
callq 0x23e92
leaq 0x130(%rsp), %rdi
callq 0x23e92
leaq 0xf8(%rsp), %rdi
callq 0x812b6
leaq 0xc0(%rsp), %rdi
callq 0xc210a
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0xc21ec
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xbe0dd
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
callq 0x1b320
jmp 0xbe118
jmp 0xbe118
jmp 0xbe118
jmp 0xbe118
jmp 0xbe118
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbe135
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xbe135
movq %rax, %rdi
callq 0x24259
movq %rax, %rbx
movq %rsp, %rdi
callq 0xc1a02
leaq 0x68(%rsp), %rdi
callq 0xc1a58
movq %rbx, %rdi
callq 0x1c030
nop
|
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
push r15
push r14
push rbx
sub rsp, 160h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp; int
movaps xmmword ptr [rsi], xmm0
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
movzx eax, byte ptr [rdx]
movzx ecx, byte ptr [rdx+1]; int
lea r15, [rsp+178h+var_110]
mov rdi, r15; int
mov edx, eax; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&,bool,bool)
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BDFA6
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BDFA6:
xor eax, eax
mov [rsp+178h+var_170], rax
mov [rsp+178h+var_178], r15
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&)
mov [rsp+178h+var_160], rcx
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_168], rcx
mov [rsp+178h+var_150], rax
mov [rsp+178h+var_158], r15
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov [rsp+178h+var_140], rcx
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_148], rcx
mov [rsp+178h+var_130], rax
mov [rsp+178h+var_138], r15
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov [rsp+178h+var_120], rcx
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_128], rcx
cmp [r14+10h], rax
jz loc_BE0ED
mov rsi, rsp
mov rdi, r14
call qword ptr [r14+18h]
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
lea rsi, [rsp+178h+var_110]
mov rdi, rbx
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
mov rax, [rsp+178h+var_128]
test rax, rax
jz short loc_BE051
lea rdi, [rsp+178h+var_138]
mov rsi, rdi
mov edx, 3
call rax
loc_BE051:
mov rax, [rsp+178h+var_148]
test rax, rax
jz short loc_BE06A
lea rdi, [rsp+178h+var_158]
mov rsi, rdi
mov edx, 3
call rax
loc_BE06A:
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BE081
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BE081:
lea rdi, [rsp+178h+var_30]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_80]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+178h+var_B8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea r14, [rsp+178h+var_E8]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rax, [r14-18h]
test rax, rax
jz short loc_BE0DD
lea rdi, [rsp+178h+var_110]
mov rsi, rdi
mov edx, 3
call rax
loc_BE0DD:
mov rax, rbx
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_BE0ED:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_BE118
jmp short loc_BE118
jmp short loc_BE118
jmp short loc_BE118
jmp short loc_BE118
mov rbx, rax
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BE135
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_BE135
loc_BE118:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_BE135:
mov rdi, rbx
call __Unwind_Resume
|
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int *v11; // [rsp+0h] [rbp-178h] BYREF
long long v12; // [rsp+8h] [rbp-170h]
long long ( *v13)(); // [rsp+10h] [rbp-168h]
void *v14; // [rsp+18h] [rbp-160h]
int *v15; // [rsp+20h] [rbp-158h] BYREF
long long v16; // [rsp+28h] [rbp-150h]
long long ( *v17)(); // [rsp+30h] [rbp-148h]
long long ( *v18)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h]
int *v19; // [rsp+40h] [rbp-138h] BYREF
long long v20; // [rsp+48h] [rbp-130h]
long long ( *v21)(); // [rsp+50h] [rbp-128h]
long long ( *v22)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h]
int v23; // [rsp+60h] [rbp-118h]
int v24[4]; // [rsp+68h] [rbp-110h] BYREF
void ( *v25)(int *, int *, long long); // [rsp+78h] [rbp-100h]
_BYTE v26[48]; // [rsp+90h] [rbp-E8h] BYREF
_BYTE v27[56]; // [rsp+C0h] [rbp-B8h] BYREF
_BYTE v28[56]; // [rsp+F8h] [rbp-80h] BYREF
_BYTE v29[24]; // [rsp+130h] [rbp-48h] BYREF
_BYTE v30[48]; // [rsp+148h] [rbp-30h] BYREF
SchemaConverter::SchemaConverter(
(int)v24,
(int)&v11,
*a3,
a3[1],
a5,
a6,
0LL,
0,
(long long)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager,
(int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke,
v15,
v16,
(long long)v17);
if ( v13 )
((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL);
v12 = 0LL;
v11 = v24;
v14 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke;
v13 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager;
v16 = 0LL;
v15 = v24;
v18 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke;
v17 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager;
v20 = 0LL;
v19 = v24;
v22 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke;
v21 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, int **))(a2 + 24))(a2, &v11);
SchemaConverter::check_errors((SchemaConverter *)v24);
SchemaConverter::format_grammar[abi:cxx11](
a1,
(unsigned int)v24,
v6,
v7,
v8,
v9,
(_DWORD)v11,
v12,
(_DWORD)v13,
(_DWORD)v14,
(_DWORD)v15,
v16,
(_DWORD)v17,
(_DWORD)v18,
(_DWORD)v19,
v20,
(_DWORD)v21,
(_DWORD)v22,
v23,
v24[0],
v24[2],
(char)v25);
if ( v21 )
((void ( *)(int **, int **, long long))v21)(&v19, &v19, 3LL);
if ( v17 )
((void ( *)(int **, int **, long long))v17)(&v15, &v15, 3LL);
if ( v13 )
((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL);
std::vector<std::string>::~vector((long long)v30);
std::vector<std::string>::~vector((long long)v29);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v28);
std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v27);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v26);
if ( v25 )
v25(v24, v24, 3LL);
return a1;
}
|
build_grammar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x160
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
LEA RAX,[0x1be25e]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1be28a]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EAX,byte ptr [RDX]
MOVZX ECX,byte ptr [RDX + 0x1]
LAB_001bdf80:
LEA R15,[RSP + 0x68]
MOV RDI,R15
MOV EDX,EAX
CALL 0x001c152c
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001bdfa6
LAB_001bdf99:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bdfa6:
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],R15
LEA RCX,[0x1be2a2]
MOV qword ptr [RSP + 0x18],RCX
LEA RCX,[0x1be2b4]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],R15
LEA RCX,[0x1be2da]
MOV qword ptr [RSP + 0x38],RCX
LEA RCX,[0x1be38c]
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x40],R15
LEA RCX,[0x1c0e82]
MOV qword ptr [RSP + 0x58],RCX
LEA RCX,[0x1c0eec]
MOV qword ptr [RSP + 0x50],RCX
CMP qword ptr [R14 + 0x10],RAX
JZ 0x001be0ed
LAB_001be017:
MOV RSI,RSP
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
LEA RDI,[RSP + 0x68]
CALL 0x001c172e
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x001c18f6
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001be051
LEA RDI,[RSP + 0x40]
LAB_001be047:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be051:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001be06a
LEA RDI,[RSP + 0x20]
LAB_001be060:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be06a:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001be081
LAB_001be074:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be081:
LEA RDI,[RSP + 0x148]
CALL 0x00123e92
LEA RDI,[RSP + 0x130]
CALL 0x00123e92
LEA RDI,[RSP + 0xf8]
CALL 0x001812b6
LEA RDI,[RSP + 0xc0]
CALL 0x001c210a
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x001c21ec
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001be0dd
LAB_001be0ce:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001be0dd:
MOV RAX,RBX
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001be0ed:
CALL 0x0011b320
|
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&,
common_grammar_options const&) */
function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2)
{
long in_RDX;
SchemaConverter *local_178;
int8 uStack_170;
code *local_168;
code *local_160;
SchemaConverter *local_158;
int8 local_150;
code *local_148;
code *local_140;
SchemaConverter *local_138;
int8 local_130;
code *local_128;
code *local_120;
SchemaConverter local_110 [16];
code *local_100;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_e8 [48];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
local_b8 [56];
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
local_80 [56];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24];
local_178 = (SchemaConverter *)0x0;
uStack_170 = 0;
local_160 = std::
_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_invoke;
local_168 = std::
_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_manager;
/* try { // try from 001bdf80 to 001bdf8e has its CatchHandler @ 001be0fc */
SchemaConverter::SchemaConverter
(local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1));
if (local_168 != (code *)0x0) {
/* try { // try from 001bdf99 to 001bdfa5 has its CatchHandler @ 001be0fa */
(*local_168)(&local_178,&local_178,3);
}
uStack_170 = 0;
local_160 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_invoke;
local_168 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_manager;
local_150 = 0;
local_140 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_invoke;
local_148 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_manager;
local_130 = 0;
local_120 = std::
_Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_invoke;
local_128 = std::
_Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_manager;
local_178 = local_110;
local_158 = local_110;
local_138 = local_110;
if (*(long *)(param_2 + 0x10) != 0) {
/* try { // try from 001be017 to 001be037 has its CatchHandler @ 001be120 */
(**(code **)(param_2 + 0x18))(param_2,&local_178);
SchemaConverter::check_errors(local_110);
SchemaConverter::format_grammar_abi_cxx11_();
if (local_128 != (code *)0x0) {
/* try { // try from 001be047 to 001be050 has its CatchHandler @ 001be0f8 */
(*local_128)(&local_138,&local_138,3);
}
if (local_148 != (code *)0x0) {
/* try { // try from 001be060 to 001be069 has its CatchHandler @ 001be0f6 */
(*local_148)(&local_158,&local_158,3);
}
if (local_168 != (code *)0x0) {
/* try { // try from 001be074 to 001be080 has its CatchHandler @ 001be0f4 */
(*local_168)(&local_178,&local_178,3);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable(local_80);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_e8);
if (local_100 != (code *)0x0) {
/* try { // try from 001be0ce to 001be0dc has its CatchHandler @ 001be0f2 */
(*local_100)(local_110,local_110,3);
}
return param_1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001be0ed to 001be0f1 has its CatchHandler @ 001be120 */
std::__throw_bad_function_call();
}
|
|
57,351
|
js_string_toWellFormed
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_toWellFormed(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
JSValue ret;
JSString *p;
uint32_t c, i, n;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return JS_EXCEPTION;
p = JS_VALUE_GET_STRING(str);
if (!p->is_wide_char || p->len == 0)
return str; // by definition well-formed
// TODO(bnoordhuis) don't clone when input is well-formed
ret = js_new_string16_len(ctx, p->u.str16, p->len);
JS_FreeValue(ctx, str);
if (JS_IsException(ret))
return JS_EXCEPTION;
p = JS_VALUE_GET_STRING(ret);
for (i = 0, n = p->len; i < n; i++) {
c = p->u.str16[i];
if (!is_surrogate(c))
continue;
if (is_lo_surrogate(c) || i + 1 == n) {
p->u.str16[i] = 0xFFFD;
continue;
}
c = p->u.str16[++i];
if (!is_lo_surrogate(c))
p->u.str16[--i] = 0xFFFD;
}
return ret;
}
|
O0
|
c
|
js_string_toWellFormed:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x6f510
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xd2597
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0xd275f
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
je 0xd25ca
movq 0x38(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
cmpl $0x0, %eax
jne 0xd25e9
movq 0x50(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0xd275f
movq 0x70(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq $0x18, %rsi
movq 0x38(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %edx
callq 0x5f4a0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x229d0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xd266f
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0xd275f
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x0, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, 0x2c(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jae 0xd2745
movq 0x38(%rsp), %rax
movl 0x30(%rsp), %ecx
movzwl 0x18(%rax,%rcx,2), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %edi
callq 0x84e00
cmpl $0x0, %eax
jne 0xd26c4
jmp 0xd2735
movl 0x34(%rsp), %edi
callq 0x28b40
cmpl $0x0, %eax
jne 0xd26df
movl 0x30(%rsp), %eax
addl $0x1, %eax
cmpl 0x2c(%rsp), %eax
jne 0xd26f1
movq 0x38(%rsp), %rax
movl 0x30(%rsp), %ecx
movw $0xfffd, 0x18(%rax,%rcx,2) # imm = 0xFFFD
jmp 0xd2735
movq 0x38(%rsp), %rax
movl 0x30(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x30(%rsp)
movl %ecx, %ecx
movzwl 0x18(%rax,%rcx,2), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %edi
callq 0x28b40
cmpl $0x0, %eax
jne 0xd2733
movq 0x38(%rsp), %rax
movl 0x30(%rsp), %ecx
addl $-0x1, %ecx
movl %ecx, 0x30(%rsp)
movl %ecx, %ecx
movw $0xfffd, 0x18(%rax,%rcx,2) # imm = 0xFFFD
jmp 0xd2735
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0xd2694
movq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopw (%rax,%rax)
|
js_string_toWellFormed:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_20]
mov rdx, [rsp+98h+var_18]
call JS_ToStringCheckObject
mov [rsp+98h+var_80], rax
mov [rsp+98h+var_78], rdx
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_48], rax
mov rax, [rsp+98h+var_78]
mov [rsp+98h+var_40], rax
mov rdi, [rsp+98h+var_48]
mov rsi, [rsp+98h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_D2597
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_D275F
loc_D2597:
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_60], rax
mov rax, [rsp+98h+var_60]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jz short loc_D25CA
mov rax, [rsp+98h+var_60]
mov rax, [rax+4]
and rax, 7FFFFFFFh
cmp eax, 0
jnz short loc_D25E9
loc_D25CA:
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_40]
mov [rsp+98h+var_8], rax
jmp loc_D275F
loc_D25E9:
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_60]
add rsi, 18h
mov rax, [rsp+98h+var_60]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov edx, eax
call js_new_string16_len
mov [rsp+98h+var_90], rax
mov [rsp+98h+var_88], rdx
mov rax, [rsp+98h+var_90]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_50], rax
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_48]
mov rdx, [rsp+98h+var_40]
call JS_FreeValue
mov rdi, [rsp+98h+var_58]
mov rsi, [rsp+98h+var_50]
call JS_IsException_1
cmp eax, 0
jz short loc_D266F
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_D275F
loc_D266F:
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_60], rax
mov [rsp+98h+var_68], 0
mov rax, [rsp+98h+var_60]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov [rsp+98h+var_6C], eax
loc_D2694:
mov eax, [rsp+98h+var_68]
cmp eax, [rsp+98h+var_6C]
jnb loc_D2745
mov rax, [rsp+98h+var_60]
mov ecx, [rsp+98h+var_68]
movzx eax, word ptr [rax+rcx*2+18h]
mov [rsp+98h+var_64], eax
mov edi, [rsp+98h+var_64]
call is_surrogate
cmp eax, 0
jnz short loc_D26C4
jmp short loc_D2735
loc_D26C4:
mov edi, [rsp+98h+var_64]
call is_lo_surrogate_0
cmp eax, 0
jnz short loc_D26DF
mov eax, [rsp+98h+var_68]
add eax, 1
cmp eax, [rsp+98h+var_6C]
jnz short loc_D26F1
loc_D26DF:
mov rax, [rsp+98h+var_60]
mov ecx, [rsp+98h+var_68]
mov word ptr [rax+rcx*2+18h], 0FFFDh
jmp short loc_D2735
loc_D26F1:
mov rax, [rsp+98h+var_60]
mov ecx, [rsp+98h+var_68]
add ecx, 1
mov [rsp+98h+var_68], ecx
mov ecx, ecx
movzx eax, word ptr [rax+rcx*2+18h]
mov [rsp+98h+var_64], eax
mov edi, [rsp+98h+var_64]
call is_lo_surrogate_0
cmp eax, 0
jnz short loc_D2733
mov rax, [rsp+98h+var_60]
mov ecx, [rsp+98h+var_68]
add ecx, 0FFFFFFFFh
mov [rsp+98h+var_68], ecx
mov ecx, ecx
mov word ptr [rax+rcx*2+18h], 0FFFDh
loc_D2733:
jmp short $+2
loc_D2735:
mov eax, [rsp+98h+var_68]
add eax, 1
mov [rsp+98h+var_68], eax
jmp loc_D2694
loc_D2745:
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_8], rax
loc_D275F:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
|
long long js_string_toWellFormed(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
int v15; // edx
long long v17; // [rsp+8h] [rbp-90h]
long long v18; // [rsp+18h] [rbp-80h]
unsigned int v19; // [rsp+2Ch] [rbp-6Ch]
unsigned int v20; // [rsp+30h] [rbp-68h]
unsigned int v21; // [rsp+34h] [rbp-64h]
int v22; // [rsp+48h] [rbp-50h]
long long v23; // [rsp+58h] [rbp-40h]
long long v24; // [rsp+88h] [rbp-10h]
v18 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v23 = v14;
if ( JS_IsException_1(v18, v14) )
{
LODWORD(v24) = 0;
}
else if ( (*(_QWORD *)(v18 + 4) & 0x80000000LL) != 0 && (*(_DWORD *)(v18 + 4) & 0x7FFFFFFF) != 0 )
{
v17 = js_new_string16_len(a1, v18 + 24, *(_DWORD *)(v18 + 4) & 0x7FFFFFFF);
v22 = v15;
JS_FreeValue(a1, v18, v23);
if ( JS_IsException_1(v17, v22) )
{
LODWORD(v24) = 0;
}
else
{
v20 = 0;
v19 = *(_DWORD *)(v17 + 4) & 0x7FFFFFFF;
while ( v20 < v19 )
{
v21 = *(unsigned __int16 *)(v17 + 2LL * v20 + 24);
if ( is_surrogate(v21) )
{
if ( is_lo_surrogate_0(v21) || v20 + 1 == v19 )
{
*(_WORD *)(v17 + 2LL * v20 + 24) = -3;
}
else if ( !is_lo_surrogate_0(*(unsigned __int16 *)(v17 + 2LL * ++v20 + 24)) )
{
*(_WORD *)(v17 + 2LL * --v20 + 24) = -3;
}
}
++v20;
}
return v17;
}
}
else
{
return v18;
}
return v24;
}
|
js_string_toWellFormed:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
CALL 0x0016f510
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001d2597
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x001d275f
LAB_001d2597:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JZ 0x001d25ca
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
CMP EAX,0x0
JNZ 0x001d25e9
LAB_001d25ca:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x90],RAX
JMP 0x001d275f
LAB_001d25e9:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x38]
ADD RSI,0x18
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EDX,EAX
CALL 0x0015f4a0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001d266f
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x001d275f
LAB_001d266f:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x38],RAX
MOV dword ptr [RSP + 0x30],0x0
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV dword ptr [RSP + 0x2c],EAX
LAB_001d2694:
MOV EAX,dword ptr [RSP + 0x30]
CMP EAX,dword ptr [RSP + 0x2c]
JNC 0x001d2745
MOV RAX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x30]
MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18]
MOV dword ptr [RSP + 0x34],EAX
MOV EDI,dword ptr [RSP + 0x34]
CALL 0x00184e00
CMP EAX,0x0
JNZ 0x001d26c4
JMP 0x001d2735
LAB_001d26c4:
MOV EDI,dword ptr [RSP + 0x34]
CALL 0x00128b40
CMP EAX,0x0
JNZ 0x001d26df
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
CMP EAX,dword ptr [RSP + 0x2c]
JNZ 0x001d26f1
LAB_001d26df:
MOV RAX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x30]
MOV word ptr [RAX + RCX*0x2 + 0x18],0xfffd
JMP 0x001d2735
LAB_001d26f1:
MOV RAX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x30]
ADD ECX,0x1
MOV dword ptr [RSP + 0x30],ECX
MOV ECX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18]
MOV dword ptr [RSP + 0x34],EAX
MOV EDI,dword ptr [RSP + 0x34]
CALL 0x00128b40
CMP EAX,0x0
JNZ 0x001d2733
MOV RAX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x30]
ADD ECX,-0x1
MOV dword ptr [RSP + 0x30],ECX
MOV ECX,ECX
MOV word ptr [RAX + RCX*0x2 + 0x18],0xfffd
LAB_001d2733:
JMP 0x001d2735
LAB_001d2735:
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
MOV dword ptr [RSP + 0x30],EAX
JMP 0x001d2694
LAB_001d2745:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x90],RAX
LAB_001d275f:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16] js_string_toWellFormed(int8 param_1,int8 param_2,int8 param_3)
{
int2 uVar1;
uint uVar2;
int iVar3;
uint uVar4;
long lVar6;
int1 auVar8 [16];
uint local_68;
int4 local_10;
int4 uStack_c;
int8 local_8;
long lVar5;
int8 uVar7;
auVar8 = JS_ToStringCheckObject(param_1,param_2,param_3);
uVar7 = auVar8._8_8_;
lVar5 = auVar8._0_8_;
iVar3 = JS_IsException(lVar5,uVar7);
if (iVar3 == 0) {
if (((*(ulong *)(lVar5 + 4) >> 0x1f & 1) == 0) || ((*(ulong *)(lVar5 + 4) & 0x7fffffff) == 0)) {
local_10 = auVar8._0_4_;
uStack_c = auVar8._4_4_;
local_8 = uVar7;
}
else {
auVar8 = js_new_string16_len(param_1,lVar5 + 0x18,
(uint)*(int8 *)(lVar5 + 4) & 0x7fffffff);
local_8 = auVar8._8_8_;
lVar6 = auVar8._0_8_;
JS_FreeValue(param_1,lVar5,uVar7);
iVar3 = JS_IsException(lVar6,local_8);
if (iVar3 == 0) {
local_68 = 0;
uVar4 = (uint)*(int8 *)(lVar6 + 4) & 0x7fffffff;
for (; local_68 < uVar4; local_68 = local_68 + 1) {
uVar1 = *(int2 *)(lVar6 + 0x18 + (ulong)local_68 * 2);
iVar3 = is_surrogate(uVar1);
uVar2 = local_68;
if (iVar3 != 0) {
iVar3 = is_lo_surrogate(uVar1);
if ((iVar3 == 0) && (local_68 + 1 != uVar4)) {
iVar3 = is_lo_surrogate(*(int2 *)(lVar6 + 0x18 + (ulong)(local_68 + 1) * 2));
uVar2 = local_68 + 1;
if (iVar3 == 0) {
*(int2 *)(lVar6 + 0x18 + (ulong)local_68 * 2) = 0xfffd;
uVar2 = local_68;
}
}
else {
*(int2 *)(lVar6 + 0x18 + (ulong)local_68 * 2) = 0xfffd;
}
}
local_68 = uVar2;
}
local_10 = auVar8._0_4_;
uStack_c = auVar8._4_4_;
}
else {
local_10 = 0;
local_8 = 6;
}
}
}
else {
local_10 = 0;
local_8 = 6;
}
auVar8._4_4_ = uStack_c;
auVar8._0_4_ = local_10;
auVar8._8_8_ = local_8;
return auVar8;
}
|
|
57,352
|
js_string_toWellFormed
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_toWellFormed(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
JSValue ret;
JSString *p;
uint32_t c, i, n;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return JS_EXCEPTION;
p = JS_VALUE_GET_STRING(str);
if (!p->is_wide_char || p->len == 0)
return str; // by definition well-formed
// TODO(bnoordhuis) don't clone when input is well-formed
ret = js_new_string16_len(ctx, p->u.str16, p->len);
JS_FreeValue(ctx, str);
if (JS_IsException(ret))
return JS_EXCEPTION;
p = JS_VALUE_GET_STRING(ret);
for (i = 0, n = p->len; i < n; i++) {
c = p->u.str16[i];
if (!is_surrogate(c))
continue;
if (is_lo_surrogate(c) || i + 1 == n) {
p->u.str16[i] = 0xFFFD;
continue;
}
c = p->u.str16[++i];
if (!is_lo_surrogate(c))
p->u.str16[--i] = 0xFFFD;
}
return ret;
}
|
O2
|
c
|
js_string_toWellFormed:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r13
callq 0x39714
movq %rdx, %rbp
pushq $0x6
popq %r12
cmpl $0x6, %ebp
jne 0x66c8b
xorl %ebx, %ebx
jmp 0x66d2e
movq %rax, %rbx
movq 0x4(%rax), %rdx
testl %edx, %edx
jns 0x66d2b
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
je 0x66d2b
movq %rbx, %rsi
addq $0x18, %rsi
movq %r13, %rdi
callq 0x35477
movq %rax, %r14
movq %rdx, %r15
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x174a2
xorl %ebx, %ebx
cmpl $0x6, %r15d
je 0x66d2e
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
andl 0x4(%r14), %eax
cmpl %eax, %ebx
jae 0x66d43
movl %ebx, %ecx
movzwl 0x18(%r14,%rcx,2), %edx
movl %edx, %esi
andl $0xf800, %esi # imm = 0xF800
cmpl $0xd800, %esi # imm = 0xD800
jne 0x66d23
notl %edx
testw $0xdc00, %dx # imm = 0xDC00
je 0x66d1b
leal 0x1(%rbx), %edx
cmpl %eax, %edx
je 0x66d1b
movl %edx, %esi
movzwl 0x18(%r14,%rsi,2), %esi
andl $0xfc00, %esi # imm = 0xFC00
cmpw $0xdc00, %si # imm = 0xDC00
je 0x66d25
movw $0xfffd, 0x18(%r14,%rcx,2) # imm = 0xFFFD
movl %ebx, %edx
incl %edx
movl %edx, %ebx
jmp 0x66cda
movq %rbp, %r12
movq %rbx, %rax
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rbx
movq %r15, %r12
jmp 0x66d2e
|
js_string_toWellFormed:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, rdi
call JS_ToStringCheckObject
mov rbp, rdx
push 6
pop r12
cmp ebp, 6
jnz short loc_66C8B
xor ebx, ebx
jmp loc_66D2E
loc_66C8B:
mov rbx, rax
mov rdx, [rax+4]
test edx, edx
jns loc_66D2B
and edx, 7FFFFFFFh
jz loc_66D2B
mov rsi, rbx
add rsi, 18h
mov rdi, r13
call js_new_string16_len
mov r14, rax
mov r15, rdx
mov rdi, r13
mov rsi, rbx
mov rdx, rbp
call JS_FreeValue
xor ebx, ebx
cmp r15d, 6
jz short loc_66D2E
mov eax, 7FFFFFFFh
and eax, [r14+4]
loc_66CDA:
cmp ebx, eax
jnb short loc_66D43
mov ecx, ebx
movzx edx, word ptr [r14+rcx*2+18h]
mov esi, edx
and esi, 0F800h
cmp esi, 0D800h
jnz short loc_66D23
not edx
test dx, 0DC00h
jz short loc_66D1B
lea edx, [rbx+1]
cmp edx, eax
jz short loc_66D1B
mov esi, edx
movzx esi, word ptr [r14+rsi*2+18h]
and esi, 0FC00h
cmp si, 0DC00h
jz short loc_66D25
loc_66D1B:
mov word ptr [r14+rcx*2+18h], 0FFFDh
loc_66D23:
mov edx, ebx
loc_66D25:
inc edx
mov ebx, edx
jmp short loc_66CDA
loc_66D2B:
mov r12, rbp
loc_66D2E:
mov rax, rbx
mov rdx, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_66D43:
mov rbx, r14
mov r12, r15
jmp short loc_66D2E
|
long long js_string_toWellFormed(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rax
long long v15; // rdx
long long v16; // rbp
long long v17; // rbx
long long v18; // rdx
unsigned int v19; // edx
long long v20; // r14
int v21; // edx
int v22; // r15d
unsigned int v23; // eax
unsigned int v24; // edx
v14 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v16 = v15;
if ( (_DWORD)v15 == 6 )
return 0LL;
v17 = v14;
v18 = *(_QWORD *)(v14 + 4);
if ( (int)v18 < 0 )
{
v19 = v18 & 0x7FFFFFFF;
if ( v19 )
{
v20 = js_new_string16_len(a1, v14 + 24, v19);
v22 = v21;
JS_FreeValue(a1, v17, v16);
v17 = 0LL;
if ( v22 != 6 )
{
v23 = *(_DWORD *)(v20 + 4) & 0x7FFFFFFF;
while ( 1 )
{
if ( (unsigned int)v17 >= v23 )
return v20;
if ( (*(_WORD *)(v20 + 2LL * (unsigned int)v17 + 24) & 0xF800) != 0xD800 )
goto LABEL_13;
if ( (~*(_WORD *)(v20 + 2LL * (unsigned int)v17 + 24) & 0xDC00) == 0 )
break;
v24 = v17 + 1;
if ( (_DWORD)v17 + 1 == v23 || (*(_WORD *)(v20 + 2LL * v24 + 24) & 0xFC00) != 0xDC00 )
break;
LABEL_14:
LODWORD(v17) = v24 + 1;
}
*(_WORD *)(v20 + 2LL * (unsigned int)v17 + 24) = -3;
LABEL_13:
v24 = v17;
goto LABEL_14;
}
}
}
return v17;
}
|
js_string_toWellFormed:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,RDI
CALL 0x00139714
MOV RBP,RDX
PUSH 0x6
POP R12
CMP EBP,0x6
JNZ 0x00166c8b
XOR EBX,EBX
JMP 0x00166d2e
LAB_00166c8b:
MOV RBX,RAX
MOV RDX,qword ptr [RAX + 0x4]
TEST EDX,EDX
JNS 0x00166d2b
AND EDX,0x7fffffff
JZ 0x00166d2b
MOV RSI,RBX
ADD RSI,0x18
MOV RDI,R13
CALL 0x00135477
MOV R14,RAX
MOV R15,RDX
MOV RDI,R13
MOV RSI,RBX
MOV RDX,RBP
CALL 0x001174a2
XOR EBX,EBX
CMP R15D,0x6
JZ 0x00166d2e
MOV EAX,0x7fffffff
AND EAX,dword ptr [R14 + 0x4]
LAB_00166cda:
CMP EBX,EAX
JNC 0x00166d43
MOV ECX,EBX
MOVZX EDX,word ptr [R14 + RCX*0x2 + 0x18]
MOV ESI,EDX
AND ESI,0xf800
CMP ESI,0xd800
JNZ 0x00166d23
NOT EDX
TEST DX,0xdc00
JZ 0x00166d1b
LEA EDX,[RBX + 0x1]
CMP EDX,EAX
JZ 0x00166d1b
MOV ESI,EDX
MOVZX ESI,word ptr [R14 + RSI*0x2 + 0x18]
AND ESI,0xfc00
CMP SI,0xdc00
JZ 0x00166d25
LAB_00166d1b:
MOV word ptr [R14 + RCX*0x2 + 0x18],0xfffd
LAB_00166d23:
MOV EDX,EBX
LAB_00166d25:
INC EDX
MOV EBX,EDX
JMP 0x00166cda
LAB_00166d2b:
MOV R12,RBP
LAB_00166d2e:
MOV RAX,RBX
MOV RDX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00166d43:
MOV RBX,R14
MOV R12,R15
JMP 0x00166d2e
|
int1 [16] js_string_toWellFormed(int8 param_1)
{
ushort uVar1;
uint uVar2;
long lVar3;
long lVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
auVar8 = JS_ToStringCheckObject();
lVar3 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
auVar8 = ZEXT816(6) << 0x40;
}
else if (((int)*(ulong *)(lVar3 + 4) < 0) && ((*(ulong *)(lVar3 + 4) & 0x7fffffff) != 0)) {
auVar9 = js_new_string16_len(param_1,lVar3 + 0x18);
lVar4 = auVar9._0_8_;
JS_FreeValue(param_1,lVar3,auVar8._8_8_);
uVar7 = 0;
auVar8 = ZEXT816(6) << 0x40;
if (auVar9._8_4_ != 6) {
uVar2 = *(uint *)(lVar4 + 4) & 0x7fffffff;
while (uVar6 = (uint)uVar7, auVar8 = auVar9, uVar6 < uVar2) {
uVar1 = *(ushort *)(lVar4 + 0x18 + uVar7 * 2);
uVar5 = uVar6;
if (((uVar1 & 0xf800) == 0xd800) &&
((((~uVar1 & 0xdc00) == 0 || (uVar5 = uVar6 + 1, uVar5 == uVar2)) ||
((*(ushort *)(lVar4 + 0x18 + (ulong)uVar5 * 2) & 0xfc00) != 0xdc00)))) {
*(int2 *)(lVar4 + 0x18 + uVar7 * 2) = 0xfffd;
uVar5 = uVar6;
}
uVar7 = (ulong)(uVar5 + 1);
}
}
}
return auVar8;
}
|
|
57,353
|
js_string_toWellFormed
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_toWellFormed(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
JSValue ret;
JSString *p;
uint32_t c, i, n;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return JS_EXCEPTION;
p = JS_VALUE_GET_STRING(str);
if (!p->is_wide_char || p->len == 0)
return str; // by definition well-formed
// TODO(bnoordhuis) don't clone when input is well-formed
ret = js_new_string16_len(ctx, p->u.str16, p->len);
JS_FreeValue(ctx, str);
if (JS_IsException(ret))
return JS_EXCEPTION;
p = JS_VALUE_GET_STRING(ret);
for (i = 0, n = p->len; i < n; i++) {
c = p->u.str16[i];
if (!is_surrogate(c))
continue;
if (is_lo_surrogate(c) || i + 1 == n) {
p->u.str16[i] = 0xFFFD;
continue;
}
c = p->u.str16[++i];
if (!is_lo_surrogate(c))
p->u.str16[--i] = 0xFFFD;
}
return ret;
}
|
O3
|
c
|
js_string_toWellFormed:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r12
callq 0x4350b
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x7d086
movl $0x6, %r14d
xorl %r15d, %r15d
jmp 0x7d173
movq %rax, %r15
movq 0x4(%rax), %r13
testl %r13d, %r13d
jns 0x7d173
andl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
je 0x7d173
movq %r12, %rdi
movl %r13d, %esi
movl $0x1, %edx
callq 0x20686
testq %rax, %rax
je 0x7d0dd
movq %rax, %rbx
movq %r15, %rsi
addq $0x18, %rsi
movq %rax, %rdi
addq $0x18, %rdi
addl %r13d, %r13d
movq %r13, %rdx
callq 0xe5a0
movq $-0x7, %r13
jmp 0x7d0e5
movl $0x6, %r13d
xorl %ebx, %ebx
cmpl $-0x9, %r14d
jb 0x7d109
movq 0x18(%r12), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x7d109
movq %r15, %rsi
movq %r14, %rdx
callq 0x20d90
cmpl $0x6, %r13d
je 0x7d078
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
andl 0x4(%rbx), %eax
je 0x7d16d
xorl %ecx, %ecx
movl %ecx, %edx
movzwl 0x18(%rbx,%rdx,2), %esi
movl %esi, %edi
andl $0xf800, %edi # imm = 0xF800
cmpl $0xd800, %edi # imm = 0xD800
jne 0x7d163
notl %esi
testl $0xdc00, %esi # imm = 0xDC00
je 0x7d15c
leal 0x1(%rcx), %esi
cmpl %eax, %esi
je 0x7d15c
movl %esi, %edi
movzwl 0x18(%rbx,%rdi,2), %edi
andl $0xfc00, %edi # imm = 0xFC00
cmpl $0xdc00, %edi # imm = 0xDC00
je 0x7d165
movw $0xfffd, 0x18(%rbx,%rdx,2) # imm = 0xFFFD
movl %ecx, %esi
incl %esi
movl %esi, %ecx
cmpl %eax, %esi
jb 0x7d11f
movq %rbx, %r15
movq %r13, %r14
movq %r15, %rax
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
js_string_toWellFormed:
push r15
push r14
push r13
push r12
push rbx
mov r12, rdi
call JS_ToStringCheckObject
mov r14, rdx
cmp r14d, 6
jnz short loc_7D086
loc_7D078:
mov r14d, 6
xor r15d, r15d
jmp loc_7D173
loc_7D086:
mov r15, rax
mov r13, [rax+4]
test r13d, r13d
jns loc_7D173
and r13d, 7FFFFFFFh
jz loc_7D173
mov rdi, r12
mov esi, r13d
mov edx, 1
call js_alloc_string
test rax, rax
jz short loc_7D0DD
mov rbx, rax
mov rsi, r15
add rsi, 18h
mov rdi, rax
add rdi, 18h
add r13d, r13d
mov rdx, r13
call _memcpy
mov r13, 0FFFFFFFFFFFFFFF9h
jmp short loc_7D0E5
loc_7D0DD:
mov r13d, 6
xor ebx, ebx
loc_7D0E5:
cmp r14d, 0FFFFFFF7h
jb short loc_7D109
mov rdi, [r12+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_7D109
mov rsi, r15
mov rdx, r14
call js_free_value_rt
loc_7D109:
cmp r13d, 6
jz loc_7D078
mov eax, 7FFFFFFFh
and eax, [rbx+4]
jz short loc_7D16D
xor ecx, ecx
loc_7D11F:
mov edx, ecx
movzx esi, word ptr [rbx+rdx*2+18h]
mov edi, esi
and edi, 0F800h
cmp edi, 0D800h
jnz short loc_7D163
not esi
test esi, 0DC00h
jz short loc_7D15C
lea esi, [rcx+1]
cmp esi, eax
jz short loc_7D15C
mov edi, esi
movzx edi, word ptr [rbx+rdi*2+18h]
and edi, 0FC00h
cmp edi, 0DC00h
jz short loc_7D165
loc_7D15C:
mov word ptr [rbx+rdx*2+18h], 0FFFDh
loc_7D163:
mov esi, ecx
loc_7D165:
inc esi
mov ecx, esi
cmp esi, eax
jb short loc_7D11F
loc_7D16D:
mov r15, rbx
mov r14, r13
loc_7D173:
mov rax, r15
mov rdx, r14
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
_QWORD * js_string_toWellFormed(
long long a1,
_DWORD *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)
{
unsigned long long v14; // rax
long long v15; // rdx
long long v16; // r14
_QWORD *v17; // r15
long long v18; // r13
unsigned int v19; // r13d
long long v20; // rax
long long v21; // r8
long long v22; // r9
long long v23; // rbx
int v24; // r13d
long long v25; // rdi
int v26; // eax
long long v27; // rcx
unsigned int v28; // eax
unsigned int v29; // ecx
unsigned int v30; // esi
v14 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v16 = v15;
if ( (_DWORD)v15 == 6 )
return 0LL;
v17 = (_QWORD *)v14;
v18 = *(_QWORD *)(v14 + 4);
if ( (int)v18 < 0 )
{
v19 = v18 & 0x7FFFFFFF;
if ( v19 )
{
v20 = js_alloc_string(a1, v19, 1u);
if ( v20 )
{
v23 = v20;
memcpy(v20 + 24, v17 + 3, 2 * v19);
v24 = -7;
}
else
{
v24 = 6;
v23 = 0LL;
}
if ( (unsigned int)v16 >= 0xFFFFFFF7 )
{
v25 = *(_QWORD *)(a1 + 24);
v26 = *(_DWORD *)v17;
v27 = (unsigned int)(*(_DWORD *)v17 - 1);
*(_DWORD *)v17 = v27;
if ( v26 <= 1 )
js_free_value_rt(v25, v17, v16, v27, v21, v22);
}
if ( v24 == 6 )
return 0LL;
v28 = *(_DWORD *)(v23 + 4) & 0x7FFFFFFF;
if ( !v28 )
return (_QWORD *)v23;
v29 = 0;
while ( 1 )
{
if ( (*(_WORD *)(v23 + 2LL * v29 + 24) & 0xF800) == 0xD800 )
{
if ( (~*(_WORD *)(v23 + 2LL * v29 + 24) & 0xDC00) != 0 )
{
v30 = v29 + 1;
if ( v29 + 1 != v28 && (*(_WORD *)(v23 + 2LL * v30 + 24) & 0xFC00) == 0xDC00 )
goto LABEL_20;
}
*(_WORD *)(v23 + 2LL * v29 + 24) = -3;
}
v30 = v29;
LABEL_20:
v29 = v30 + 1;
if ( v30 + 1 >= v28 )
return (_QWORD *)v23;
}
}
}
return v17;
}
|
js_string_toWellFormed:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R12,RDI
CALL 0x0014350b
MOV R14,RDX
CMP R14D,0x6
JNZ 0x0017d086
LAB_0017d078:
MOV R14D,0x6
XOR R15D,R15D
JMP 0x0017d173
LAB_0017d086:
MOV R15,RAX
MOV R13,qword ptr [RAX + 0x4]
TEST R13D,R13D
JNS 0x0017d173
AND R13D,0x7fffffff
JZ 0x0017d173
MOV RDI,R12
MOV ESI,R13D
MOV EDX,0x1
CALL 0x00120686
TEST RAX,RAX
JZ 0x0017d0dd
MOV RBX,RAX
MOV RSI,R15
ADD RSI,0x18
MOV RDI,RAX
ADD RDI,0x18
ADD R13D,R13D
MOV RDX,R13
CALL 0x0010e5a0
MOV R13,-0x7
JMP 0x0017d0e5
LAB_0017d0dd:
MOV R13D,0x6
XOR EBX,EBX
LAB_0017d0e5:
CMP R14D,-0x9
JC 0x0017d109
MOV RDI,qword ptr [R12 + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x0017d109
MOV RSI,R15
MOV RDX,R14
CALL 0x00120d90
LAB_0017d109:
CMP R13D,0x6
JZ 0x0017d078
MOV EAX,0x7fffffff
AND EAX,dword ptr [RBX + 0x4]
JZ 0x0017d16d
XOR ECX,ECX
LAB_0017d11f:
MOV EDX,ECX
MOVZX ESI,word ptr [RBX + RDX*0x2 + 0x18]
MOV EDI,ESI
AND EDI,0xf800
CMP EDI,0xd800
JNZ 0x0017d163
NOT ESI
TEST ESI,0xdc00
JZ 0x0017d15c
LEA ESI,[RCX + 0x1]
CMP ESI,EAX
JZ 0x0017d15c
MOV EDI,ESI
MOVZX EDI,word ptr [RBX + RDI*0x2 + 0x18]
AND EDI,0xfc00
CMP EDI,0xdc00
JZ 0x0017d165
LAB_0017d15c:
MOV word ptr [RBX + RDX*0x2 + 0x18],0xfffd
LAB_0017d163:
MOV ESI,ECX
LAB_0017d165:
INC ESI
MOV ECX,ESI
CMP ESI,EAX
JC 0x0017d11f
LAB_0017d16d:
MOV R15,RBX
MOV R14,R13
LAB_0017d173:
MOV RAX,R15
MOV RDX,R14
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16] js_string_toWellFormed(long param_1)
{
ushort uVar1;
int iVar2;
int8 uVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int *piVar6;
long lVar7;
uint uVar8;
uint uVar10;
int8 uVar11;
int1 auVar12 [16];
uint uVar9;
auVar12 = JS_ToStringCheckObject();
piVar6 = auVar12._0_8_;
if (auVar12._8_4_ != 6) {
uVar10 = (uint)*(ulong *)(piVar6 + 1);
if (-1 < (int)uVar10) {
return auVar12;
}
uVar10 = uVar10 & 0x7fffffff;
if ((*(ulong *)(piVar6 + 1) & 0x7fffffff) == 0) {
return auVar12;
}
lVar7 = js_alloc_string(param_1,uVar10,1);
if (lVar7 == 0) {
uVar11 = 6;
lVar7 = 0;
}
else {
memcpy((void *)(lVar7 + 0x18),piVar6 + 6,(ulong)(uVar10 * 2));
uVar11 = 0xfffffffffffffff9;
}
auVar5._8_8_ = uVar11;
auVar5._0_8_ = lVar7;
auVar4._8_8_ = uVar11;
auVar4._0_8_ = lVar7;
if (0xfffffff6 < auVar12._8_4_) {
uVar3 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar6;
*piVar6 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar3,piVar6,auVar12._8_8_);
}
}
if ((int)uVar11 != 6) {
uVar10 = *(uint *)(lVar7 + 4) & 0x7fffffff;
if (uVar10 == 0) {
return auVar4;
}
uVar8 = 0;
do {
uVar1 = *(ushort *)(lVar7 + (ulong)uVar8 * 2 + 0x18);
uVar9 = uVar8;
if (((uVar1 & 0xf800) == 0xd800) &&
((((~uVar1 & 0xdc00) == 0 || (uVar9 = uVar8 + 1, uVar9 == uVar10)) ||
((*(ushort *)(lVar7 + (ulong)uVar9 * 2 + 0x18) & 0xfc00) != 0xdc00)))) {
*(int2 *)(lVar7 + (ulong)uVar8 * 2 + 0x18) = 0xfffd;
uVar9 = uVar8;
}
uVar8 = uVar9 + 1;
} while (uVar8 < uVar10);
return auVar5;
}
}
return ZEXT816(6) << 0x40;
}
|
|
57,354
|
ma_cmp_static_unique
|
eloqsql/storage/maria/ma_statrec.c
|
my_bool _ma_cmp_static_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def,
const uchar *record, MARIA_RECORD_POS pos)
{
DBUG_ENTER("_ma_cmp_static_unique");
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, info->rec_buff, info->s->base.reclength,
pos, MYF(MY_NABP)))
DBUG_RETURN(1);
DBUG_RETURN(_ma_unique_comp(def, record, info->rec_buff,
def->null_are_equal));
}
|
O0
|
c
|
ma_cmp_static_unique:
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 -0x10(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x6e0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x3a0(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x28(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x9d02b
jmp 0x9d025
movb $0x1, -0x1(%rbp)
jmp 0x9d050
jmp 0x9d02d
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x3a0(%rax), %rdx
movq -0x18(%rbp), %rax
movsbl 0x3(%rax), %ecx
callq 0x6e0b0
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ma_cmp_static_unique:
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_10]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_10]
mov rsi, [rcx+3A0h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_28]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_9D02B
jmp short $+2
loc_9D025:
mov [rbp+var_1], 1
jmp short loc_9D050
loc_9D02B:
jmp short $+2
loc_9D02D:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rdx, [rax+3A0h]
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax+3]
call _ma_unique_comp
mov [rbp+var_1], al
loc_9D050:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char ma_cmp_static_unique(long long a1, long long a2, long long a3, long long a4)
{
*(_DWORD *)(a1 + 1432) = 1;
if ( (*(long long ( **)(long long, _QWORD, _QWORD, long long, long long))(*(_QWORD *)a1 + 1760LL))(
a1,
*(_QWORD *)(a1 + 928),
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
a4,
4LL) )
{
return 1;
}
else
{
return ma_unique_comp(a2, a3, *(_QWORD *)(a1 + 928), *(_BYTE *)(a2 + 3));
}
}
|
_ma_cmp_static_unique:
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 + -0x10]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x0019d02b
JMP 0x0019d025
LAB_0019d025:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0019d050
LAB_0019d02b:
JMP 0x0019d02d
LAB_0019d02d:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX + 0x3]
CALL 0x0016e0b0
MOV byte ptr [RBP + -0x1],AL
LAB_0019d050:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 _ma_cmp_static_unique(long *param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
int1 local_9;
*(int4 *)(param_1 + 0xb3) = 1;
lVar1 = (**(code **)(*param_1 + 0x6e0))
(param_1,param_1[0x74],*(int8 *)(*param_1 + 0x398),param_4,4);
if (lVar1 == 0) {
local_9 = _ma_unique_comp(param_2,param_3,param_1[0x74],(int)*(char *)(param_2 + 3));
}
else {
local_9 = 1;
}
return local_9;
}
|
|
57,355
|
blst_miller_loop_lines
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/pairing.c
|
void blst_miller_loop_lines(vec384fp12 ret, const vec384fp6 Qlines[68],
const POINTonE1_affine *P)
{ miller_loop_lines(ret, Qlines, P); }
|
O2
|
c
|
blst_miller_loop_lines:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x80(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0x56a78
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x56a89
leaq -0x50(%rbp), %rdi
addq $0x30, %r12
movq %r12, %rsi
movq %r12, %rdx
callq 0x56a78
leaq -0x1a0(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5da2a
movl $0x240, %esi # imm = 0x240
movq %rbx, %rdi
callq 0x50ea6
movl $0xc0, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x51055
leaq 0x180(%rbx), %rdi
leaq -0xe0(%rbp), %rsi
pushq $0x60
popq %rdx
callq 0x51055
leaq 0x120(%r14), %rsi
pushq $0x2
popq %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x5daa4
leaq 0x480(%r14), %rsi
pushq $0x3
popq %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x5daa4
leaq 0x900(%r14), %rsi
pushq $0x9
popq %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x5daa4
leaq 0x1440(%r14), %rsi
pushq $0x20
popq %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x5daa4
addq $0x3960, %r14 # imm = 0x3960
pushq $0x10
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5daa4
movq %rbx, %rdi
callq 0x561f3
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
blst_miller_loop_lines:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 180h
mov r12, rdx
mov r14, rsi
mov rbx, rdi
lea r15, [rbp+var_80]
mov rdi, r15
mov rsi, rdx
call add_fp
push 1
pop rdx
mov rdi, r15
mov rsi, r15
call cneg_fp
lea rdi, [rbp+var_50]
add r12, 30h ; '0'
mov rsi, r12
mov rdx, r12
call add_fp
lea r12, [rbp+var_1A0]
mov rdi, r12
mov rsi, r14
mov rdx, r15
call post_line_by_Px2
mov esi, 240h
mov rdi, rbx
call vec_zero
mov edx, 0C0h
mov rdi, rbx
mov rsi, r12
call vec_copy
lea rdi, [rbx+180h]
lea rsi, [rbp+var_E0]
push 60h ; '`'
pop rdx
call vec_copy
lea rsi, [r14+120h]
push 2
pop rcx
mov rdi, rbx
mov rdx, r15
call post_add_n_dbl
lea rsi, [r14+480h]
push 3
pop rcx
mov rdi, rbx
mov rdx, r15
call post_add_n_dbl
lea rsi, [r14+900h]
push 9
pop rcx
mov rdi, rbx
mov rdx, r15
call post_add_n_dbl
lea rsi, [r14+1440h]
push 20h ; ' '
pop rcx
mov rdi, rbx
mov rdx, r15
call post_add_n_dbl
add r14, 3960h
push 10h
pop rcx
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call post_add_n_dbl
mov rdi, rbx
call conjugate_fp12
add rsp, 180h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long blst_miller_loop_lines(long long a1, long long a2, long long a3)
{
_BYTE v5[192]; // [rsp+0h] [rbp-1A0h] BYREF
_BYTE v6[96]; // [rsp+C0h] [rbp-E0h] BYREF
_BYTE v7[48]; // [rsp+120h] [rbp-80h] BYREF
_BYTE v8[80]; // [rsp+150h] [rbp-50h] BYREF
add_fp((long long)v7, a3, a3);
cneg_fp((long long)v7, (long long)v7, 1LL);
add_fp((long long)v8, a3 + 48, a3 + 48);
post_line_by_Px2(v5, a2, v7);
vec_zero(a1, 0x240uLL);
vec_copy(a1, (long long)v5, 0xC0uLL);
vec_copy(a1 + 384, (long long)v6, 0x60uLL);
post_add_n_dbl(a1, a2 + 288, v7, 2LL);
post_add_n_dbl(a1, a2 + 1152, v7, 3LL);
post_add_n_dbl(a1, a2 + 2304, v7, 9LL);
post_add_n_dbl(a1, a2 + 5184, v7, 32LL);
post_add_n_dbl(a1, a2 + 14688, v7, 16LL);
return conjugate_fp12(a1);
}
|
blst_miller_loop_lines:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x180
MOV R12,RDX
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RBP + -0x80]
MOV RDI,R15
MOV RSI,RDX
CALL 0x00156a78
PUSH 0x1
POP RDX
MOV RDI,R15
MOV RSI,R15
CALL 0x00156a89
LEA RDI,[RBP + -0x50]
ADD R12,0x30
MOV RSI,R12
MOV RDX,R12
CALL 0x00156a78
LEA R12,[RBP + -0x1a0]
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
CALL 0x0015da2a
MOV ESI,0x240
MOV RDI,RBX
CALL 0x00150ea6
MOV EDX,0xc0
MOV RDI,RBX
MOV RSI,R12
CALL 0x00151055
LEA RDI,[RBX + 0x180]
LEA RSI,[RBP + -0xe0]
PUSH 0x60
POP RDX
CALL 0x00151055
LEA RSI,[R14 + 0x120]
PUSH 0x2
POP RCX
MOV RDI,RBX
MOV RDX,R15
CALL 0x0015daa4
LEA RSI,[R14 + 0x480]
PUSH 0x3
POP RCX
MOV RDI,RBX
MOV RDX,R15
CALL 0x0015daa4
LEA RSI,[R14 + 0x900]
PUSH 0x9
POP RCX
MOV RDI,RBX
MOV RDX,R15
CALL 0x0015daa4
LEA RSI,[R14 + 0x1440]
PUSH 0x20
POP RCX
MOV RDI,RBX
MOV RDX,R15
CALL 0x0015daa4
ADD R14,0x3960
PUSH 0x10
POP RCX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0015daa4
MOV RDI,RBX
CALL 0x001561f3
ADD RSP,0x180
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void blst_miller_loop_lines(long param_1,long param_2,long param_3)
{
int1 local_1a8 [192];
int1 local_e8 [96];
int1 local_88 [48];
int1 local_58 [48];
add_fp(local_88,param_3);
cneg_fp(local_88,local_88,1);
add_fp(local_58,param_3 + 0x30,param_3 + 0x30);
post_line_by_Px2(local_1a8,param_2,local_88);
vec_zero(param_1,0x240);
vec_copy(param_1,local_1a8,0xc0);
vec_copy(param_1 + 0x180,local_e8,0x60);
post_add_n_dbl(param_1,param_2 + 0x120,local_88,2);
post_add_n_dbl(param_1,param_2 + 0x480,local_88,3);
post_add_n_dbl(param_1,param_2 + 0x900,local_88,9);
post_add_n_dbl(param_1,param_2 + 0x1440,local_88,0x20);
post_add_n_dbl(param_1,param_2 + 0x3960,local_88,0x10);
conjugate_fp12(param_1);
return;
}
|
|
57,356
|
my_charset_get_by_name
|
eloqsql/mysys/charset.c
|
CHARSET_INFO *
my_charset_get_by_name(MY_CHARSET_LOADER *loader,
const char *cs_name, uint cs_flags, myf flags)
{
uint cs_number;
CHARSET_INFO *cs;
DBUG_ENTER("get_charset_by_csname");
DBUG_PRINT("enter",("name: '%s'", cs_name));
my_pthread_once(&charsets_initialized, init_available_charsets);
cs_number= get_charset_number(cs_name, cs_flags, flags);
cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL;
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file);
}
DBUG_RETURN(cs);
}
|
O3
|
c
|
my_charset_get_by_name:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq 0x39080a(%rip), %rdi # 0x3d9b90
leaq -0x9ae(%rip), %rsi # 0x489df
callq 0x26300
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq 0x48bca
testl %eax, %eax
je 0x493b6
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x48e6e
movq %rax, %r14
jmp 0x493b9
xorl %r14d, %r14d
testq %r14, %r14
setne %al
testb $0x10, %r15b
sete %cl
orb %al, %cl
jne 0x49403
leaq -0x240(%rbp), %r15
movq %r15, %rdi
callq 0x4879f
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
movl $0x4, %esi
movl $0x16, %edi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x4b447
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x49425
movq %r14, %rax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x263a0
|
my_charset_get_by_name:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r15, rcx
mov r12d, edx
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
mov esi, r12d
mov rdx, r15
call get_charset_number
test eax, eax
jz short loc_493B6
mov rdi, r14
mov esi, eax
mov rdx, r15
call get_internal_charset
mov r14, rax
jmp short loc_493B9
loc_493B6:
xor r14d, r14d
loc_493B9:
test r14, r14
setnz al
test r15b, 10h
setz cl
or cl, al
jnz short loc_49403
lea r15, [rbp+var_240]
mov rdi, r15
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
mov esi, 4
mov edi, 16h
mov rdx, rbx
mov rcx, r15
xor eax, eax
call my_error
loc_49403:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_49425
mov rax, r14
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_49425:
call ___stack_chk_fail
|
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4)
{
unsigned int charset_number; // eax
long long internal_charset; // r14
int v8; // r8d
int v9; // r9d
_WORD v11[268]; // [rsp+0h] [rbp-240h] BYREF
unsigned long long v12; // [rsp+218h] [rbp-28h]
v12 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
charset_number = get_charset_number(a2, a3, a4);
if ( charset_number )
internal_charset = get_internal_charset(a1, charset_number, a4);
else
internal_charset = 0LL;
if ( internal_charset == 0 && (a4 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir(v11), "Index.xml");
my_error(22, 4, a2, (unsigned int)v11, v8, v9);
}
return internal_charset;
}
|
my_charset_get_by_name:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R15,RCX
MOV R12D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[0x4d9b90]
LEA RSI,[0x1489df]
CALL 0x00126300
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R15
CALL 0x00148bca
TEST EAX,EAX
JZ 0x001493b6
MOV RDI,R14
MOV ESI,EAX
MOV RDX,R15
CALL 0x00148e6e
MOV R14,RAX
JMP 0x001493b9
LAB_001493b6:
XOR R14D,R14D
LAB_001493b9:
TEST R14,R14
SETNZ AL
TEST R15B,0x10
SETZ CL
OR CL,AL
JNZ 0x00149403
LEA R15,[RBP + -0x240]
MOV RDI,R15
CALL 0x0014879f
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
MOV ESI,0x4
MOV EDI,0x16
MOV RDX,RBX
MOV RCX,R15
XOR EAX,EAX
CALL 0x0014b447
LAB_00149403:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00149425
MOV RAX,R14
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00149425:
CALL 0x001263a0
|
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4)
{
int iVar1;
long lVar2;
int8 *puVar3;
long in_FS_OFFSET;
int1 local_248 [536];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
iVar1 = get_charset_number(param_2,param_3,param_4);
if (iVar1 == 0) {
lVar2 = 0;
}
else {
lVar2 = get_internal_charset(param_1,iVar1,param_4);
}
if ((param_4 & 0x10) != 0 && lVar2 == 0) {
puVar3 = (int8 *)get_charsets_dir(local_248);
*puVar3 = 0x6d782e7865646e49;
*(int2 *)(puVar3 + 1) = 0x6c;
my_error(0x16,4,param_2,local_248);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return lVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,357
|
insert_at
|
eloqsql/mysys/queues.c
|
static void insert_at(QUEUE *queue, uchar *element, uint idx)
{
uint next_index, offset_to_key= queue->offset_to_key;
uint offset_to_queue_pos= queue->offset_to_queue_pos;
/* max_at_top swaps the comparison if we want to order by desc */
while ((next_index= idx >> 1) > 0 &&
queue->compare(queue->first_cmp_arg,
element + offset_to_key,
queue->root[next_index] + offset_to_key) *
queue->max_at_top < 0)
{
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]= element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
}
|
O3
|
c
|
insert_at:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movq %rdi, %r14
movl 0x1c(%rdi), %r13d
cmpl $0x2, %edx
movq %rsi, -0x30(%rbp)
jae 0xa515f
movl %r15d, %ebx
jmp 0xa51b7
movl 0x18(%r14), %r12d
leaq (%rsi,%r12), %rax
movq %rax, -0x38(%rbp)
movl %r15d, %ebx
shrl %ebx
movq (%r14), %rax
movq 0x8(%r14), %rdi
movq (%rax,%rbx,8), %rdx
addq %r12, %rdx
movq -0x38(%rbp), %rsi
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jns 0xa515a
movq (%r14), %rcx
movq (%rcx,%rbx,8), %rdx
movl %r15d, %eax
movq %rdx, (%rcx,%rax,8)
testq %r13, %r13
je 0xa51ae
movq (%r14), %rcx
movq (%rcx,%rax,8), %rax
movl %r15d, -0x1(%rax,%r13)
cmpl $0x3, %r15d
movl %ebx, %r15d
ja 0xa516e
movq (%r14), %rax
movl %ebx, %ecx
movq -0x30(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
testq %r13, %r13
je 0xa51ce
movl %ebx, -0x1(%rdx,%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
insert_at:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, edx
mov r14, rdi
mov r13d, [rdi+1Ch]
cmp edx, 2
mov [rbp+var_30], rsi
jnb short loc_A515F
loc_A515A:
mov ebx, r15d
jmp short loc_A51B7
loc_A515F:
mov r12d, [r14+18h]
lea rax, [rsi+r12]
mov [rbp+var_38], rax
mov ebx, r15d
loc_A516E:
shr ebx, 1
mov rax, [r14]
mov rdi, [r14+8]
mov rdx, [rax+rbx*8]
add rdx, r12
mov rsi, [rbp+var_38]
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jns short loc_A515A
mov rcx, [r14]
mov rdx, [rcx+rbx*8]
mov eax, r15d
mov [rcx+rax*8], rdx
test r13, r13
jz short loc_A51AE
mov rcx, [r14]
mov rax, [rcx+rax*8]
mov [rax+r13-1], r15d
loc_A51AE:
cmp r15d, 3
mov r15d, ebx
ja short loc_A516E
loc_A51B7:
mov rax, [r14]
mov ecx, ebx
mov rdx, [rbp+var_30]
mov [rax+rcx*8], rdx
test r13, r13
jz short loc_A51CE
mov [rdx+r13-1], ebx
loc_A51CE:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long insert_at(long long *a1, long long a2, unsigned int a3)
{
unsigned int v3; // r15d
long long v4; // r13
long long v5; // rbx
long long v6; // r12
bool v7; // cc
long long result; // rax
v3 = a3;
v4 = *((unsigned int *)a1 + 7);
if ( a3 >= 2 )
{
v6 = *((unsigned int *)a1 + 6);
LODWORD(v5) = a3;
while ( 1 )
{
v5 = (unsigned int)v5 >> 1;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
a2 + v6,
v6 + *(_QWORD *)(*a1 + 8 * v5))) >= 0 )
break;
*(_QWORD *)(*a1 + 8LL * v3) = *(_QWORD *)(*a1 + 8 * v5);
if ( v4 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v3) + v4 - 1) = v3;
v7 = v3 <= 3;
v3 = v5;
if ( v7 )
goto LABEL_8;
}
}
LODWORD(v5) = v3;
LABEL_8:
result = *a1;
*(_QWORD *)(*a1 + 8LL * (unsigned int)v5) = a2;
if ( v4 )
*(_DWORD *)(a2 + v4 - 1) = v5;
return result;
}
|
insert_at:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,EDX
MOV R14,RDI
MOV R13D,dword ptr [RDI + 0x1c]
CMP EDX,0x2
MOV qword ptr [RBP + -0x30],RSI
JNC 0x001a515f
LAB_001a515a:
MOV EBX,R15D
JMP 0x001a51b7
LAB_001a515f:
MOV R12D,dword ptr [R14 + 0x18]
LEA RAX,[RSI + R12*0x1]
MOV qword ptr [RBP + -0x38],RAX
MOV EBX,R15D
LAB_001a516e:
SHR EBX,0x1
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [R14 + 0x8]
MOV RDX,qword ptr [RAX + RBX*0x8]
ADD RDX,R12
MOV RSI,qword ptr [RBP + -0x38]
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JNS 0x001a515a
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [RCX + RBX*0x8]
MOV EAX,R15D
MOV qword ptr [RCX + RAX*0x8],RDX
TEST R13,R13
JZ 0x001a51ae
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV dword ptr [RAX + R13*0x1 + -0x1],R15D
LAB_001a51ae:
CMP R15D,0x3
MOV R15D,EBX
JA 0x001a516e
LAB_001a51b7:
MOV RAX,qword ptr [R14]
MOV ECX,EBX
MOV RDX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + RCX*0x8],RDX
TEST R13,R13
JZ 0x001a51ce
MOV dword ptr [RDX + R13*0x1 + -0x1],EBX
LAB_001a51ce:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void insert_at(long *param_1,long param_2,uint param_3)
{
uint uVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
uVar4 = (ulong)param_3;
uVar5 = (ulong)*(uint *)((long)param_1 + 0x1c);
if (1 < param_3) {
uVar1 = *(uint *)(param_1 + 3);
do {
uVar2 = uVar4 >> 1;
iVar3 = (*(code *)param_1[5])
(param_1[1],param_2 + (ulong)uVar1,
*(long *)(*param_1 + uVar2 * 8) + (ulong)uVar1);
if (-1 < iVar3 * *(int *)((long)param_1 + 0x24)) break;
uVar6 = (uint)uVar4;
*(int8 *)(*param_1 + uVar4 * 8) = *(int8 *)(*param_1 + uVar2 * 8);
if (uVar5 != 0) {
*(uint *)(*(long *)(*param_1 + uVar4 * 8) + -1 + uVar5) = uVar6;
}
uVar4 = uVar2;
} while (3 < uVar6);
}
*(long *)(*param_1 + uVar4 * 8) = param_2;
if (uVar5 != 0) {
*(int *)(param_2 + -1 + uVar5) = (int)uVar4;
}
return;
}
|
|
57,358
|
evmone::instr::core::blockhash(evmone::StackTop, evmone::ExecutionState&)
|
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
|
inline void blockhash(StackTop stack, ExecutionState& state) noexcept
{
auto& number = stack.top();
const auto upper_bound = state.get_tx_context().block_number;
const auto lower_bound = std::max(upper_bound - 256, decltype(upper_bound){0});
const auto n = static_cast<int64_t>(number);
const auto header =
(number < upper_bound && n >= lower_bound) ? state.host.get_block_hash(n) : evmc::bytes32{};
number = intx::be::load<uint256>(header);
}
|
O0
|
cpp
|
evmone::instr::core::blockhash(evmone::StackTop, evmone::ExecutionState&):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x5fb80
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x677d0
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $-0x100, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x68860
movq %rax, -0xa8(%rbp)
jmp 0x6877d
movq -0xa8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x688a0
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x688c0
testb $0x1, %al
jne 0x687ab
jmp 0x687cc
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x687cc
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movq -0x40(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x3a1b0
jmp 0x6880b
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x36430
leaq -0xa0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x67700
movq -0x18(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x98(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x90(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x88(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x36420
nopl (%rax,%rax)
|
_ZN6evmone5instr4core9blockhashENS_8StackTopERNS_14ExecutionStateE:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_8]; this
call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void)
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]; this
call _ZN6evmone14ExecutionState14get_tx_contextEv; evmone::ExecutionState::get_tx_context(void)
mov rax, [rax+48h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFF00h
mov [rbp+var_30], rax
mov [rbp+var_38], 0
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_38]
call _ZSt3maxIlERKT_S2_S2_; std::max<long>(long const&,long const&)
mov [rbp+var_A8], rax
jmp short $+2
loc_6877D:
mov rax, [rbp+var_A8]
mov rax, [rax]
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
call _ZNK4intx4uintILj256EEcvT_IlvEEv; intx::uint<256u>::operator long<long,void>(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_20]
call _ZN4intxltILj256ElvEEbRKNS_4uintIXT_EEERKT0_; intx::operator<<256u,long,void>(intx::uint<256u> const&,long const&)
test al, 1
jnz short loc_687AB
jmp short loc_687CC
loc_687AB:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_28]
jl short loc_687CC
mov rsi, [rbp+var_10]
add rsi, 28h ; '('; __int64
mov rdx, [rbp+var_40]
lea rdi, [rbp+var_60]; this
call _ZNK4evmc11HostContext14get_block_hashEl; evmc::HostContext::get_block_hash(long)
jmp short loc_6880B
loc_687CC:
lea rdi, [rbp+var_80]
xor esi, esi
mov edx, 20h ; ' '
call _memset
lea rdi, [rbp+var_60]
lea rax, [rbp+var_80]
mov rcx, [rax]
mov [rsp+0D0h+var_D0], rcx
mov rcx, [rax+8]
mov [rsp+0D0h+var_C8], rcx
mov rcx, [rax+10h]
mov [rsp+0D0h+var_C0], rcx
mov rax, [rax+18h]
mov [rsp+0D0h+var_B8], rax
call _ZN4evmc7bytes32C2E12evmc_bytes32; evmc::bytes32::bytes32(evmc_bytes32)
loc_6880B:
lea rdi, [rbp+var_A0]
lea rsi, [rbp+var_60]
call _ZN4intx2be4loadINS_4uintILj256EEEN4evmc7bytes32EEET_RKT0_; intx::be::load<intx::uint<256u>,evmc::bytes32>(evmc::bytes32 const&)
mov rax, [rbp+var_18]
mov rcx, [rbp+var_A0]
mov [rax], rcx
mov rcx, [rbp+var_98]
mov [rax+8], rcx
mov rcx, [rbp+var_90]
mov [rax+10h], rcx
mov rcx, [rbp+var_88]
mov [rax+18h], rcx
add rsp, 0D0h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
|
_QWORD * evmone::instr::core::blockhash(long long a1, evmone::ExecutionState *a2)
{
int v2; // edx
int v3; // r8d
int v4; // r9d
_QWORD *result; // rax
_QWORD v6[4]; // [rsp+30h] [rbp-A0h] BYREF
long long v7[2]; // [rsp+50h] [rbp-80h] BYREF
long long v8; // [rsp+60h] [rbp-70h]
long long v9; // [rsp+68h] [rbp-68h]
_QWORD v10[4]; // [rsp+70h] [rbp-60h] BYREF
long long v11; // [rsp+90h] [rbp-40h]
long long v12; // [rsp+98h] [rbp-38h] BYREF
long long v13; // [rsp+A0h] [rbp-30h] BYREF
long long v14; // [rsp+A8h] [rbp-28h]
long long v15; // [rsp+B0h] [rbp-20h] BYREF
_QWORD *v16; // [rsp+B8h] [rbp-18h]
evmone::ExecutionState *v17; // [rsp+C0h] [rbp-10h]
long long v18; // [rsp+C8h] [rbp-8h] BYREF
v18 = a1;
v17 = a2;
v16 = (_QWORD *)evmone::StackTop::top((evmone::StackTop *)&v18);
v15 = *(_QWORD *)(evmone::ExecutionState::get_tx_context(a2) + 72);
v13 = v15 - 256;
v12 = 0LL;
v14 = *(_QWORD *)std::max<long>(&v13, &v12);
v11 = intx::uint<256u>::operator long<long,void>(v16);
if ( (intx::operator<<256u,long,void>(v16, &v15) & 1) != 0 && v11 >= v14 )
{
evmc::HostContext::get_block_hash((evmc::HostContext *)v10, (long long)v17 + 40, v11);
}
else
{
memset(v7, 0LL, 32LL);
evmc::bytes32::bytes32(v10, 0, v2, v8, v3, v4, v7[0], v7[1], v8, v9);
}
intx::be::load<intx::uint<256u>,evmc::bytes32>(v6, v10);
result = v16;
*v16 = v6[0];
result[1] = v6[1];
result[2] = v6[2];
result[3] = v6[3];
return result;
}
|
blockhash:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x8]
CALL 0x0015fb80
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001677d0
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x100
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x38],0x0
LAB_00168767:
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x38]
CALL 0x00168860
LAB_00168774:
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x0016877d
LAB_0016877d:
MOV RAX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001688a0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x20]
CALL 0x001688c0
TEST AL,0x1
JNZ 0x001687ab
JMP 0x001687cc
LAB_001687ab:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x28]
JL 0x001687cc
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x28
MOV RDX,qword ptr [RBP + -0x40]
LEA RDI,[RBP + -0x60]
CALL 0x0013a1b0
JMP 0x0016880b
LAB_001687cc:
LEA RDI,[RBP + -0x80]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
LEA RDI,[RBP + -0x60]
LEA RAX,[RBP + -0x80]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00136430
LAB_0016880b:
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0x60]
CALL 0x00167700
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0xa0]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x98]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x90]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0x18],RCX
ADD RSP,0xd0
POP RBP
RET
|
/* evmone::instr::core::blockhash(evmone::StackTop, evmone::ExecutionState&) */
void evmone::instr::core::blockhash(int8 param_1,ExecutionState *param_2)
{
bool bVar1;
long lVar2;
long *plVar3;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_90;
int1 local_88 [32];
bytes32 local_68 [32];
long local_48;
long local_40;
long local_38;
long local_30;
long local_28;
uint *local_20;
ExecutionState *local_18;
int8 local_10;
local_18 = param_2;
local_10 = param_1;
local_20 = (uint *)StackTop::top((StackTop *)&local_10);
lVar2 = ExecutionState::get_tx_context(local_18);
local_28 = *(long *)(lVar2 + 0x48);
local_38 = local_28 + -0x100;
local_40 = 0;
/* try { // try from 00168767 to 00168773 has its CatchHandler @ 00168853 */
plVar3 = std::max<long>(&local_38,&local_40);
local_30 = *plVar3;
local_48 = intx::uint::operator_cast_to_long(local_20);
bVar1 = intx::operator<(local_20,&local_28);
if ((bVar1) && (local_30 <= local_48)) {
evmc::HostContext::get_block_hash((long)local_68);
}
else {
memset(local_88,0,0x20);
evmc::bytes32::bytes32(local_68);
}
intx::be::load<intx::uint<256u>,evmc::bytes32>((be *)&local_a8,local_68);
*(int8 *)local_20 = local_a8;
*(int8 *)(local_20 + 8) = local_a0;
*(int8 *)(local_20 + 0x10) = local_98;
*(int8 *)(local_20 + 0x18) = local_90;
return;
}
|
|
57,359
|
Tensor::remove_redundant_rows(std::shared_ptr<Tensor>)
|
deependujha[P]DeepTensor/csrc/tensor.h
|
void remove_redundant_rows(std::shared_ptr<Tensor> t) {
// remove redundant rows(1)
std::vector<int> new_shape = {};
for (auto& e : t->shape) {
if (e > 1) {
new_shape.push_back(e);
}
}
if (new_shape.size() == 0) {
new_shape.push_back(1);
}
t->shape = new_shape;
t->compute_stride();
}
|
O2
|
c
|
Tensor::remove_redundant_rows(std::shared_ptr<Tensor>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
andq $0x0, 0x10(%r14)
movaps %xmm0, (%r14)
movq (%rsi), %rax
movq 0x10(%rax), %r15
movq 0x18(%rax), %r12
cmpq %r12, %r15
je 0x1b8d2
cmpl $0x2, (%r15)
jl 0x1b8cc
movq %r14, %rdi
movq %r15, %rsi
callq 0x1b9d2
addq $0x4, %r15
jmp 0x1b8b6
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
jne 0x1b8f0
leaq 0x24(%rsp), %rsi
movl $0x1, (%rsi)
movq %rsp, %rdi
callq 0x1bb7c
movq (%rbx), %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x1b9f0
movq (%rbx), %rdi
callq 0x169da
movq %rsp, %rdi
callq 0x16914
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1b91f
jmp 0x1b91f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x16914
movq %rbx, %rdi
callq 0xba20
|
_ZN6Tensor21remove_redundant_rowsESt10shared_ptrIS_E:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rsi
xorps xmm0, xmm0
mov r14, rsp
and qword ptr [r14+10h], 0
movaps xmmword ptr [r14], xmm0
mov rax, [rsi]
mov r15, [rax+10h]
mov r12, [rax+18h]
loc_1B8B6:
cmp r15, r12
jz short loc_1B8D2
cmp dword ptr [r15], 2
jl short loc_1B8CC
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
loc_1B8CC:
add r15, 4
jmp short loc_1B8B6
loc_1B8D2:
mov rax, [rsp+48h+var_40]
cmp rax, [rsp+48h+var_48]
jnz short loc_1B8F0
lea rsi, [rsp+48h+var_24]
mov dword ptr [rsi], 1
mov rdi, rsp
call _ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_; std::vector<int>::emplace_back<int>(int &&)
loc_1B8F0:
mov rdi, [rbx]
add rdi, 10h
mov rsi, rsp
call _ZNSt6vectorIiSaIiEEaSERKS1_; std::vector<int>::operator=(std::vector<int> const&)
mov rdi, [rbx]; this
call _ZN6Tensor14compute_strideEv; Tensor::compute_stride(void)
mov rdi, rsp
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_1B91F
jmp short $+2
loc_1B91F:
mov rbx, rax
mov rdi, rsp
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
|
char * Tensor::remove_redundant_rows(long long a1, Tensor **a2)
{
int *v2; // r15
int *v3; // r12
char *result; // rax
__int128 v5; // [rsp+0h] [rbp-48h] BYREF
long long v6; // [rsp+10h] [rbp-38h]
int v7[9]; // [rsp+24h] [rbp-24h] BYREF
v6 = 0LL;
v5 = 0LL;
v2 = (int *)*((_QWORD *)*a2 + 2);
v3 = (int *)*((_QWORD *)*a2 + 3);
while ( v2 != v3 )
{
if ( *v2 >= 2 )
std::vector<int>::push_back(&v5, v2);
++v2;
}
if ( *((_QWORD *)&v5 + 1) == (_QWORD)v5 )
{
v7[0] = 1;
std::vector<int>::emplace_back<int>(&v5, v7);
}
std::vector<int>::operator=((char *)*a2 + 16, &v5);
result = Tensor::compute_stride(*a2);
std::_Vector_base<int>::~_Vector_base(&v5);
return result;
}
|
remove_redundant_rows:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
XORPS XMM0,XMM0
MOV R14,RSP
AND qword ptr [R14 + 0x10],0x0
MOVAPS xmmword ptr [R14],XMM0
MOV RAX,qword ptr [RSI]
MOV R15,qword ptr [RAX + 0x10]
MOV R12,qword ptr [RAX + 0x18]
LAB_0011b8b6:
CMP R15,R12
JZ 0x0011b8d2
CMP dword ptr [R15],0x2
JL 0x0011b8cc
LAB_0011b8c1:
MOV RDI,R14
MOV RSI,R15
CALL 0x0011b9d2
LAB_0011b8cc:
ADD R15,0x4
JMP 0x0011b8b6
LAB_0011b8d2:
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP]
JNZ 0x0011b8f0
LEA RSI,[RSP + 0x24]
MOV dword ptr [RSI],0x1
LAB_0011b8e8:
MOV RDI,RSP
CALL 0x0011bb7c
LAB_0011b8f0:
MOV RDI,qword ptr [RBX]
ADD RDI,0x10
LAB_0011b8f7:
MOV RSI,RSP
CALL 0x0011b9f0
MOV RDI,qword ptr [RBX]
CALL 0x001169da
LAB_0011b907:
MOV RDI,RSP
CALL 0x00116914
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Tensor::remove_redundant_rows(std::shared_ptr<Tensor>) */
void __thiscall Tensor::remove_redundant_rows(int8 param_1,long *param_2)
{
int *piVar1;
int *piVar2;
long local_48;
long lStack_40;
int8 local_38;
int local_24;
local_38 = 0;
local_48 = 0;
lStack_40 = 0;
piVar1 = *(int **)(*param_2 + 0x18);
for (piVar2 = *(int **)(*param_2 + 0x10); piVar2 != piVar1; piVar2 = piVar2 + 1) {
if (1 < *piVar2) {
/* try { // try from 0011b8c1 to 0011b8cb has its CatchHandler @ 0011b91f */
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)&local_48,piVar2);
}
}
if (lStack_40 == local_48) {
local_24 = 1;
/* try { // try from 0011b8e8 to 0011b8ef has its CatchHandler @ 0011b91b */
std::vector<int,std::allocator<int>>::emplace_back<int>
((vector<int,std::allocator<int>> *)&local_48,&local_24);
}
/* try { // try from 0011b8f7 to 0011b906 has its CatchHandler @ 0011b91d */
std::vector<int,std::allocator<int>>::operator=
((vector<int,std::allocator<int>> *)(*param_2 + 0x10),(vector *)&local_48);
compute_stride((Tensor *)*param_2);
std::_Vector_base<int,std::allocator<int>>::~_Vector_base
((_Vector_base<int,std::allocator<int>> *)&local_48);
return;
}
|
|
57,360
|
retrieve_auto_increment
|
eloqsql/storage/myisam/mi_key.c
|
ulonglong retrieve_auto_increment(MI_INFO *info,const uchar *record)
{
ulonglong value= 0; /* Store unsigned values here */
longlong s_value= 0; /* Store signed values here */
HA_KEYSEG *keyseg= info->s->keyinfo[info->s->base.auto_key-1].seg;
const uchar *key= (uchar*) record + keyseg->start;
switch (keyseg->type) {
case HA_KEYTYPE_INT8:
s_value= (longlong) *(const signed char*) key;
break;
case HA_KEYTYPE_BINARY:
value=(ulonglong) *(uchar*) key;
break;
case HA_KEYTYPE_SHORT_INT:
s_value= (longlong) sint2korr(key);
break;
case HA_KEYTYPE_USHORT_INT:
value=(ulonglong) uint2korr(key);
break;
case HA_KEYTYPE_LONG_INT:
s_value= (longlong) sint4korr(key);
break;
case HA_KEYTYPE_ULONG_INT:
value=(ulonglong) uint4korr(key);
break;
case HA_KEYTYPE_INT24:
s_value= (longlong) sint3korr(key);
break;
case HA_KEYTYPE_UINT24:
value=(ulonglong) uint3korr(key);
break;
case HA_KEYTYPE_FLOAT: /* This shouldn't be used */
{
float f_1;
float4get(f_1,key);
/* Ignore negative values */
value = (f_1 < (float) 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_DOUBLE: /* This shouldn't be used */
{
double f_1;
float8get(f_1,key);
/* Ignore negative values */
value = (f_1 < 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_LONGLONG:
s_value= sint8korr(key);
break;
case HA_KEYTYPE_ULONGLONG:
value= uint8korr(key);
break;
default:
DBUG_ASSERT(0);
value=0; /* Error */
break;
}
/*
The following code works because if s_value < 0 then value is 0
and if s_value == 0 then value will contain either s_value or the
correct value.
*/
return (s_value > 0) ? (ulonglong) s_value : value;
}
|
O0
|
c
|
retrieve_auto_increment:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq 0x218(%rcx), %rax
movl 0x184(%rcx), %ecx
decl %ecx
imulq $0x70, %rcx, %rcx
movq 0x28(%rax,%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movzbl 0x18(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x48(%rbp)
subl $0xc, %eax
ja 0xafede
movq -0x48(%rbp), %rax
leaq 0xa976a(%rip), %rcx # 0x159480
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rax
movsbq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movswq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movzwl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xafdbd
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
orl $0xff000000, %eax # imm = 0xFF000000
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x4c(%rbp)
jmp 0xafde1
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cltq
movq %rax, -0x20(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x30(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x34(%rbp), %xmm0
jbe 0xafe35
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0xafe64
movss -0x34(%rbp), %xmm0
movss 0xa11c2(%rip), %xmm2 # 0x151004
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
cvttss2si %xmm1, %rcx
cvttss2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x40(%rbp), %xmm0
jbe 0xafe8b
xorl %eax, %eax
movq %rax, -0x60(%rbp)
jmp 0xafeba
movsd -0x40(%rbp), %xmm0
movsd 0xa8dc0(%rip), %xmm2 # 0x158c58
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xafeea
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xafeea
jmp 0xafee0
jmp 0xafee2
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jle 0xafefb
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0xaff03
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
popq %rbp
retq
nopl (%rax)
|
retrieve_auto_increment:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov [rbp+var_20], 0
mov rax, [rbp+var_8]
mov rcx, [rax]
mov rax, [rcx+218h]
mov ecx, [rcx+184h]
dec ecx
imul rcx, 70h ; 'p'
mov rax, [rax+rcx+28h]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
mov ecx, [rcx+8]
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax+18h]
add eax, 0FFFFFFFEh; switch 13 cases
mov ecx, eax
mov [rbp+var_48], rcx
sub eax, 0Ch
ja def_AFD1D; jumptable 00000000000AFD1D default case, case 7
mov rax, [rbp+var_48]
lea rcx, jpt_AFD1D
movsxd rax, ds:(jpt_AFD1D - 159480h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_AFD1F:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 14
movsx rax, byte ptr [rax]
mov [rbp+var_20], rax
jmp loc_AFEEA
loc_AFD30:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 2
movzx eax, byte ptr [rax]
mov [rbp+var_18], rax
jmp loc_AFEEA
loc_AFD40:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 3
movsx rax, word ptr [rax]
mov [rbp+var_20], rax
jmp loc_AFEEA
loc_AFD51:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 8
movzx eax, word ptr [rax]
mov [rbp+var_18], rax
jmp loc_AFEEA
loc_AFD61:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 4
movsxd rax, dword ptr [rax]
mov [rbp+var_20], rax
jmp loc_AFEEA
loc_AFD71:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 9
mov eax, [rax]
mov [rbp+var_18], rax
jmp loc_AFEEA
loc_AFD80:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 12
movzx eax, byte ptr [rax+2]
and eax, 80h
cmp eax, 0
jz short loc_AFDBD
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax+2]
shl eax, 10h
or eax, 0FF000000h
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx]
or eax, ecx
mov [rbp+var_4C], eax
jmp short loc_AFDE1
loc_AFDBD:
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax+2]
shl eax, 10h
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx]
or eax, ecx
mov [rbp+var_4C], eax
loc_AFDE1:
mov eax, [rbp+var_4C]
cdqe
mov [rbp+var_20], rax
jmp loc_AFEEA
loc_AFDEF:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 13
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_18], rax
jmp loc_AFEEA
loc_AFE1B:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 5
mov eax, [rax]
mov [rbp+var_34], eax
xorps xmm0, xmm0
ucomiss xmm0, [rbp+var_34]
jbe short loc_AFE35
xor eax, eax
mov [rbp+var_58], rax
jmp short loc_AFE64
loc_AFE35:
movss xmm0, [rbp+var_34]
movss xmm2, cs:dword_151004
movaps xmm1, xmm0
subss xmm1, xmm2
cvttss2si rcx, xmm1
cvttss2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_58], rax
loc_AFE64:
mov rax, [rbp+var_58]
mov [rbp+var_18], rax
jmp short loc_AFEEA
loc_AFE6E:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 6
mov rax, [rax]
mov [rbp+var_40], rax
xorps xmm0, xmm0
ucomisd xmm0, [rbp+var_40]
jbe short loc_AFE8B
xor eax, eax
mov [rbp+var_60], rax
jmp short loc_AFEBA
loc_AFE8B:
movsd xmm0, [rbp+var_40]
movsd xmm2, cs:qword_158C58
movaps xmm1, xmm0
subsd xmm1, xmm2
cvttsd2si rcx, xmm1
cvttsd2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_60], rax
loc_AFEBA:
mov rax, [rbp+var_60]
mov [rbp+var_18], rax
jmp short loc_AFEEA
loc_AFEC4:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 10
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_AFEEA
loc_AFED1:
mov rax, [rbp+var_30]; jumptable 00000000000AFD1D case 11
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_AFEEA
def_AFD1D:
jmp short $+2; jumptable 00000000000AFD1D default case, case 7
loc_AFEE0:
jmp short $+2
loc_AFEE2:
mov [rbp+var_18], 0
loc_AFEEA:
cmp [rbp+var_20], 0
jle short loc_AFEFB
mov rax, [rbp+var_20]
mov [rbp+var_68], rax
jmp short loc_AFF03
loc_AFEFB:
mov rax, [rbp+var_18]
mov [rbp+var_68], rax
loc_AFF03:
mov rax, [rbp+var_68]
pop rbp
retn
|
long long retrieve_auto_increment(long long a1, long long a2)
{
long long v4; // [rsp+8h] [rbp-60h]
long long v5; // [rsp+10h] [rbp-58h]
signed int v6; // [rsp+1Ch] [rbp-4Ch]
float *v7; // [rsp+38h] [rbp-30h]
long long v8; // [rsp+40h] [rbp-28h]
long long v9; // [rsp+48h] [rbp-20h]
long long v10; // [rsp+50h] [rbp-18h]
v10 = 0LL;
v9 = 0LL;
v8 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL)
+ 112LL * (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 388LL) - 1)
+ 40);
v7 = (float *)(*(unsigned int *)(v8 + 8) + a2);
switch ( *(_BYTE *)(v8 + 24) )
{
case 2:
v10 = *(unsigned __int8 *)v7;
break;
case 3:
v9 = *(__int16 *)v7;
break;
case 4:
v9 = *(int *)v7;
break;
case 5:
if ( *v7 >= 0.0 )
v5 = (unsigned int)(int)*v7;
else
v5 = 0LL;
v10 = v5;
break;
case 6:
if ( *(double *)v7 >= 0.0 )
v4 = (unsigned int)(int)*(double *)v7;
else
v4 = 0LL;
v10 = v4;
break;
case 8:
v10 = *(unsigned __int16 *)v7;
break;
case 9:
v10 = *(unsigned int *)v7;
break;
case 0xA:
v9 = *(_QWORD *)v7;
break;
case 0xB:
v10 = *(_QWORD *)v7;
break;
case 0xC:
if ( (*((_BYTE *)v7 + 2) & 0x80) != 0 )
v6 = *(unsigned __int8 *)v7 | (*((unsigned __int8 *)v7 + 1) << 8) | (*((unsigned __int8 *)v7 + 2) << 16) | 0xFF000000;
else
v6 = *(unsigned __int8 *)v7 | (*((unsigned __int8 *)v7 + 1) << 8) | (*((unsigned __int8 *)v7 + 2) << 16);
v9 = v6;
break;
case 0xD:
v10 = (*((unsigned __int8 *)v7 + 2) << 16) | (unsigned int)*(unsigned __int16 *)v7;
break;
case 0xE:
v9 = *(char *)v7;
break;
default:
v10 = 0LL;
break;
}
if ( v9 <= 0 )
return v10;
else
return v9;
}
|
retrieve_auto_increment:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV qword ptr [RBP + -0x20],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RCX + 0x218]
MOV ECX,dword ptr [RCX + 0x184]
DEC ECX
IMUL RCX,RCX,0x70
MOV RAX,qword ptr [RAX + RCX*0x1 + 0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + 0x18]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x48],RCX
SUB EAX,0xc
JA 0x001afede
MOV RAX,qword ptr [RBP + -0x48]
LEA RCX,[0x259480]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_e:
MOV RAX,qword ptr [RBP + -0x30]
MOVSX RAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001afeea
caseD_2:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001afeea
caseD_3:
MOV RAX,qword ptr [RBP + -0x30]
MOVSX RAX,word ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001afeea
caseD_8:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001afeea
caseD_4:
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001afeea
caseD_9:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001afeea
caseD_c:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX + 0x2]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001afdbd
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x10
OR EAX,0xff000000
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX]
OR EAX,ECX
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001afde1
LAB_001afdbd:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x10
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX]
OR EAX,ECX
MOV dword ptr [RBP + -0x4c],EAX
LAB_001afde1:
MOV EAX,dword ptr [RBP + -0x4c]
CDQE
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001afeea
caseD_d:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001afeea
caseD_5:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
XORPS XMM0,XMM0
UCOMISS XMM0,dword ptr [RBP + -0x34]
JBE 0x001afe35
XOR EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001afe64
LAB_001afe35:
MOVSS XMM0,dword ptr [RBP + -0x34]
MOVSS XMM2,dword ptr [0x00251004]
MOVAPS XMM1,XMM0
SUBSS XMM1,XMM2
CVTTSS2SI RCX,XMM1
CVTTSS2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LAB_001afe64:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001afeea
caseD_6:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
XORPS XMM0,XMM0
UCOMISD XMM0,qword ptr [RBP + -0x40]
JBE 0x001afe8b
XOR EAX,EAX
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001afeba
LAB_001afe8b:
MOVSD XMM0,qword ptr [RBP + -0x40]
MOVSD XMM2,qword ptr [0x00258c58]
MOVAPS XMM1,XMM0
SUBSD XMM1,XMM2
CVTTSD2SI RCX,XMM1
CVTTSD2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_001afeba:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001afeea
caseD_a:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001afeea
caseD_b:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001afeea
caseD_7:
JMP 0x001afee0
LAB_001afee0:
JMP 0x001afee2
LAB_001afee2:
MOV qword ptr [RBP + -0x18],0x0
LAB_001afeea:
CMP qword ptr [RBP + -0x20],0x0
JLE 0x001afefb
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x68],RAX
JMP 0x001aff03
LAB_001afefb:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x68],RAX
LAB_001aff03:
MOV RAX,qword ptr [RBP + -0x68]
POP RBP
RET
|
double retrieve_auto_increment(long *param_1,long param_2)
{
float fVar1;
long lVar2;
double dVar3;
double *pdVar4;
double local_70;
double local_68;
double local_60;
uint local_54;
double local_28;
double local_20;
local_20 = 0.0;
local_28 = 0.0;
lVar2 = *(long *)(*(long *)(*param_1 + 0x218) + 0x28 +
(ulong)(*(int *)(*param_1 + 0x184) - 1) * 0x70);
pdVar4 = (double *)(param_2 + (ulong)*(uint *)(lVar2 + 8));
switch(*(int1 *)(lVar2 + 0x18)) {
case 2:
local_20 = (double)(ulong)*(byte *)pdVar4;
break;
case 3:
local_28 = (double)(long)(short)*(ushort *)pdVar4;
break;
case 4:
local_28 = (double)(long)(int)*(float *)pdVar4;
break;
case 5:
fVar1 = *(float *)pdVar4;
if (0.0 <= fVar1) {
local_60 = (double)((long)fVar1 | (long)(fVar1 - DAT_00251004) & (long)fVar1 >> 0x3f);
}
else {
local_60 = 0.0;
}
local_20 = local_60;
break;
case 6:
dVar3 = *pdVar4;
if (0.0 <= dVar3) {
local_68 = (double)((long)dVar3 | (long)(dVar3 - DAT_00258c58) & (long)dVar3 >> 0x3f);
}
else {
local_68 = 0.0;
}
local_20 = local_68;
break;
default:
local_20 = 0.0;
break;
case 8:
local_20 = (double)(ulong)*(ushort *)pdVar4;
break;
case 9:
local_20 = (double)(ulong)(uint)*(float *)pdVar4;
break;
case 10:
local_28 = *pdVar4;
break;
case 0xb:
local_20 = *pdVar4;
break;
case 0xc:
if (((ulong)*pdVar4 & 0x800000) == 0) {
local_54 = (uint)*(byte *)((long)pdVar4 + 2) << 0x10 | (uint)*(byte *)((long)pdVar4 + 1) << 8
| (uint)*(byte *)pdVar4;
}
else {
local_54 = (uint)*(byte *)((long)pdVar4 + 2) << 0x10 | 0xff000000 |
(uint)*(byte *)((long)pdVar4 + 1) << 8 | (uint)*(byte *)pdVar4;
}
local_28 = (double)(long)(int)local_54;
break;
case 0xd:
local_20 = (double)(ulong)*(uint3 *)pdVar4;
break;
case 0xe:
local_28 = (double)(long)(char)*(byte *)pdVar4;
}
if ((long)local_28 < 1) {
local_70 = local_20;
}
else {
local_70 = local_28;
}
return local_70;
}
|
|
57,361
|
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const
|
llama.cpp/common/json.hpp
|
bool operator==(const IterImpl& other) const
{
// if objects are not the same, the comparison is undefined
if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
{
JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object));
}
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
return (m_it.object_iterator == other.m_it.object_iterator);
case value_t::array:
return (m_it.array_iterator == other.m_it.array_iterator);
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return (m_it.primitive_iterator == other.m_it.primitive_iterator);
}
}
|
O3
|
cpp
|
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rdi), %rax
cmpq (%rsi), %rax
jne 0xd10fb
testq %rax, %rax
je 0xd1159
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xd10db
cmpl $0x1, %eax
jne 0xd10e5
movq 0x8(%r14), %rax
cmpq 0x8(%rsi), %rax
jmp 0xd10ed
movq 0x10(%r14), %rax
cmpq 0x10(%rsi), %rax
jmp 0xd10ed
movq 0x18(%r14), %rax
cmpq 0x18(%rsi), %rax
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x216d0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4b8f8(%rip), %rsi # 0x11ca10
leaq 0x4b921(%rip), %rdx # 0x11ca40
leaq 0x8(%rsp), %rdi
callq 0x28f28
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xd4, %esi
callq 0xc01d4
xorl %ebp, %ebp
leaq 0x91eb6(%rip), %rsi # 0x163000
leaq -0x58569(%rip), %rdx # 0x78be8
movq %rbx, %rdi
callq 0x21b60
leaq 0x4a89a(%rip), %rdi # 0x11b9fa
leaq 0x4a8ce(%rip), %rdx # 0x11ba35
leaq 0x50b1a(%rip), %rcx # 0x121c88
movl $0x3422, %esi # imm = 0x3422
xorl %eax, %eax
callq 0x21fc0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xd1194
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21190
testb %bpl, %bpl
jne 0xd119e
jmp 0xd11a6
movq %rax, %r14
movq %rbx, %rdi
callq 0x22080
movq %r14, %rdi
callq 0x21c20
|
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_:
push rbp; void *
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov r14, rdi
mov rax, [rdi]
cmp rax, [rsi]
jnz short loc_D10FB
test rax, rax
jz loc_D1159
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_D10DB
cmp eax, 1
jnz short loc_D10E5
mov rax, [r14+8]
cmp rax, [rsi+8]
jmp short loc_D10ED
loc_D10DB:
mov rax, [r14+10h]
cmp rax, [rsi+10h]
jmp short loc_D10ED
loc_D10E5:
mov rax, [r14+18h]
cmp rax, [rsi+18h]
loc_D10ED:
setz al
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_D10FB:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotCompareI; "cannot compare iterators of different c"...
lea rdx, aCannotCompareI+30h; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0D4h; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_D1159:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 3422h
xor eax, eax
call _ggml_abort
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_D1194
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D1194:
test bpl, bpl
jnz short loc_D119E
jmp short loc_D11A6
mov r14, rax
loc_D119E:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_D11A6:
mov rdi, r14
call __Unwind_Resume
|
bool ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
unsigned __int8 **a1,
unsigned __int8 **a2)
{
void *v2; // rbx
char v3; // bp
void *v4; // r15
unsigned __int8 *v5; // rax
int v6; // eax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
long long v10; // rax
long long v11; // r14
void *v12[2]; // [rsp+8h] [rbp-40h] BYREF
long long v13; // [rsp+18h] [rbp-30h] BYREF
v5 = *a1;
if ( *a1 != *a2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v12[0] = &v13;
std::string::_M_construct<char const*>(
(long long)v12,
"cannot compare iterators of different containers",
(long long)"");
ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
212,
v12);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if ( !v5 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
13346LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
v11 = v10;
if ( v12[0] != v4 )
operator delete(v12[0], v13 + 1);
if ( v3 )
__cxa_free_exception(v2);
_Unwind_Resume(v11);
}
v6 = *v5;
if ( v6 == 2 )
return a1[2] == a2[2];
if ( v6 == 1 )
return a1[1] == a2[1];
return a1[3] == a2[3];
}
|
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP RAX,qword ptr [RSI]
JNZ 0x001d10fb
TEST RAX,RAX
JZ 0x001d1159
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001d10db
CMP EAX,0x1
JNZ 0x001d10e5
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RSI + 0x8]
JMP 0x001d10ed
LAB_001d10db:
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RSI + 0x10]
JMP 0x001d10ed
LAB_001d10e5:
MOV RAX,qword ptr [R14 + 0x18]
CMP RAX,qword ptr [RSI + 0x18]
LAB_001d10ed:
SETZ AL
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001d10fb:
MOV EDI,0x20
CALL 0x001216d0
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_001d1111:
LEA RSI,[0x21ca10]
LEA RDX,[0x21ca40]
LEA RDI,[RSP + 0x8]
CALL 0x00128f28
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_001d112f:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xd4
CALL 0x001c01d4
XOR EBP,EBP
LEA RSI,[0x263000]
LEA RDX,[0x178be8]
MOV RDI,RBX
CALL 0x00121b60
LAB_001d1159:
LEA RDI,[0x21b9fa]
LEA RDX,[0x21ba35]
LEA RCX,[0x221c88]
MOV ESI,0x3422
XOR EAX,EAX
CALL 0x00121fc0
|
int8
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(int8 *param_1,int8 *param_2)
{
char *pcVar1;
long lVar2;
int8 uVar3;
bool bVar4;
int1 *local_40 [2];
int1 local_30 [16];
pcVar1 = (char *)*param_1;
if (pcVar1 != (char *)*param_2) {
uVar3 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 001d1111 to 001d1128 has its CatchHandler @ 001d119b */
std::__cxx11::string::_M_construct<char_const*>
(local_40,"cannot compare iterators of different containers","");
/* try { // try from 001d112f to 001d1158 has its CatchHandler @ 001d117a */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar3,0xd4,local_40,*param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (pcVar1 != (char *)0x0) {
if (*pcVar1 == '\x02') {
lVar2 = param_1[2];
bVar4 = lVar2 == param_2[2];
}
else if (*pcVar1 == '\x01') {
lVar2 = param_1[1];
bVar4 = lVar2 == param_2[1];
}
else {
lVar2 = param_1[3];
bVar4 = lVar2 == param_2[3];
}
return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4);
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x3422,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
|
|
57,362
|
my_stat
|
eloqsql/mysys/my_lib.c
|
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
{
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT),
my_flags)))
goto error;
#ifndef _WIN32
if (!stat((char *) path, (struct stat *) stat_area))
{
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(stat_area);
}
#else
if (!my_win_stat(path, stat_area))
DBUG_RETURN(stat_area);
#endif
DBUG_PRINT("error",("Got errno: %d from stat", errno));
my_errno= errno;
if (m_used) /* Free if new area */
my_free(stat_area);
error:
if (my_flags & (MY_FAE+MY_WME))
{
my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
}
|
O3
|
c
|
my_stat:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %r14
testq %rsi, %rsi
jne 0x60c80
leaq 0x35b57f(%rip), %rax # 0x3bc1e8
movl (%rax), %edi
movl $0x90, %esi
movq %r15, %rdx
callq 0x60d25
movq %rax, %r14
testq %rax, %rax
je 0x60cac
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36a40
testl %eax, %eax
je 0x60cd5
callq 0x369d0
movl (%rax), %r13d
callq 0x62176
movl %r13d, (%rax)
testq %r12, %r12
jne 0x60cac
movq %r14, %rdi
callq 0x60f52
testb $0x18, %r15b
je 0x60cd2
callq 0x62176
movl (%rax), %ecx
xorl %r14d, %r14d
movl $0x4, %esi
movl $0xd, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5d5bf
jmp 0x60cd5
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_stat:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r14, rsi
test rsi, rsi
jnz short loc_60C80
lea rax, key_memory_MY_STAT
mov edi, [rax]
mov esi, 90h
mov rdx, r15
call my_malloc
mov r14, rax
test rax, rax
jz short loc_60CAC
loc_60C80:
mov rdi, rbx
mov rsi, r14
call _stat64
test eax, eax
jz short loc_60CD5
call ___errno_location
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r12, r12
jnz short loc_60CAC
mov rdi, r14
call my_free
loc_60CAC:
test r15b, 18h
jz short loc_60CD2
call _my_thread_var
mov ecx, [rax]
xor r14d, r14d
mov esi, 4
mov edi, 0Dh
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_60CD5
loc_60CD2:
xor r14d, r14d
loc_60CD5:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_stat(long long a1, long long a2, char a3)
{
long long v5; // r14
long long v6; // rdi
int v7; // r13d
unsigned int *v8; // rax
v5 = a2;
if ( a2 || (v6 = key_memory_MY_STAT, (v5 = my_malloc(key_memory_MY_STAT, 144LL)) != 0) )
{
v6 = a1;
if ( !(unsigned int)stat64(a1, v5) )
return v5;
v7 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var(a1) = v7;
if ( !a2 )
{
v6 = v5;
my_free(v5);
}
}
if ( (a3 & 0x18) == 0 )
return 0LL;
v8 = (unsigned int *)my_thread_var(v6);
v5 = 0LL;
my_error(0xDu, 4LL, a1, *v8);
return v5;
}
|
my_stat:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,RSI
TEST RSI,RSI
JNZ 0x00160c80
LEA RAX,[0x4bc1e8]
MOV EDI,dword ptr [RAX]
MOV ESI,0x90
MOV RDX,R15
CALL 0x00160d25
MOV R14,RAX
TEST RAX,RAX
JZ 0x00160cac
LAB_00160c80:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00136a40
TEST EAX,EAX
JZ 0x00160cd5
CALL 0x001369d0
MOV R13D,dword ptr [RAX]
CALL 0x00162176
MOV dword ptr [RAX],R13D
TEST R12,R12
JNZ 0x00160cac
MOV RDI,R14
CALL 0x00160f52
LAB_00160cac:
TEST R15B,0x18
JZ 0x00160cd2
CALL 0x00162176
MOV ECX,dword ptr [RAX]
XOR R14D,R14D
MOV ESI,0x4
MOV EDI,0xd
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0015d5bf
JMP 0x00160cd5
LAB_00160cd2:
XOR R14D,R14D
LAB_00160cd5:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3)
{
int iVar1;
stat64 *__buf;
int *piVar2;
int4 *puVar3;
__buf = param_2;
if ((param_2 != (stat64 *)0x0) ||
(__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) {
iVar1 = stat64(param_1,__buf);
if (iVar1 == 0) {
return __buf;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if (param_2 == (stat64 *)0x0) {
my_free(__buf);
}
}
if ((param_3 & 0x18) != 0) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xd,4,param_1,*puVar3);
}
return (stat64 *)0x0;
}
|
|
57,363
|
blst_p1_affine_compress
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e1.c
|
void blst_p1_affine_compress(unsigned char out[48], const POINTonE1_affine *in)
{
if (vec_is_zero(in->X, 2*sizeof(in->X))) {
bytes_zero(out, 48);
out[0] = 0xc0; /* compressed and infinity bits */
} else {
limb_t sign = POINTonE1_affine_Compress_BE(out, in);
out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4));
}
}
|
O1
|
c
|
blst_p1_affine_compress:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x60, %esi
movq %r14, %rdi
callq 0x30680
testq %rax, %rax
je 0x197ad
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movb $-0x40, %al
jmp 0x197c1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x197c8
shlb $0x4, %al
andb $0x20, %al
orb (%rbx), %al
orb $-0x80, %al
movb %al, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
|
blst_p1_affine_compress:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov esi, 60h ; '`'
mov rdi, r14
call vec_is_zero_16x
test rax, rax
jz short loc_197AD
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx], xmm0
mov al, 0C0h
jmp short loc_197C1
loc_197AD:
mov rdi, rbx
mov rsi, r14
call POINTonE1_affine_Compress_BE
shl al, 4
and al, 20h
or al, [rbx]
or al, 80h
loc_197C1:
mov [rbx], al
pop rbx
pop r14
pop rbp
retn
|
char blst_p1_affine_compress(_OWORD *a1, long long a2)
{
char result; // al
if ( vec_is_zero_16x(a2, 96LL) )
{
a1[2] = 0LL;
a1[1] = 0LL;
*a1 = 0LL;
result = -64;
}
else
{
result = *(_BYTE *)a1 | (16 * POINTonE1_affine_Compress_BE(a1, a2)) & 0x20 | 0x80;
}
*(_BYTE *)a1 = result;
return result;
}
|
blst_p1_affine_compress:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV ESI,0x60
MOV RDI,R14
CALL 0x00130680
TEST RAX,RAX
JZ 0x001197ad
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV AL,0xc0
JMP 0x001197c1
LAB_001197ad:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001197c8
SHL AL,0x4
AND AL,0x20
OR AL,byte ptr [RBX]
OR AL,0x80
LAB_001197c1:
MOV byte ptr [RBX],AL
POP RBX
POP R14
POP RBP
RET
|
void blst_p1_affine_compress(byte *param_1,int8 param_2)
{
long lVar1;
byte bVar2;
lVar1 = vec_is_zero_16x(param_2,0x60);
if (lVar1 == 0) {
bVar2 = POINTonE1_affine_Compress_BE(param_1,param_2);
bVar2 = (bVar2 & 2) << 4 | *param_1 | 0x80;
}
else {
param_1[0x20] = 0;
param_1[0x21] = 0;
param_1[0x22] = 0;
param_1[0x23] = 0;
param_1[0x24] = 0;
param_1[0x25] = 0;
param_1[0x26] = 0;
param_1[0x27] = 0;
param_1[0x28] = 0;
param_1[0x29] = 0;
param_1[0x2a] = 0;
param_1[0x2b] = 0;
param_1[0x2c] = 0;
param_1[0x2d] = 0;
param_1[0x2e] = 0;
param_1[0x2f] = 0;
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;
param_1[0x19] = 0;
param_1[0x1a] = 0;
param_1[0x1b] = 0;
param_1[0x1c] = 0;
param_1[0x1d] = 0;
param_1[0x1e] = 0;
param_1[0x1f] = 0;
param_1[0] = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0;
param_1[4] = 0;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
param_1[8] = 0;
param_1[9] = 0;
param_1[10] = 0;
param_1[0xb] = 0;
param_1[0xc] = 0;
param_1[0xd] = 0;
param_1[0xe] = 0;
param_1[0xf] = 0;
bVar2 = 0xc0;
}
*param_1 = bVar2;
return;
}
|
|
57,364
|
bitmap_test_and_clear
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_clear(map, bitmap_bit);
bitmap_unlock(map);
return res;
}
|
O0
|
c
|
bitmap_test_and_clear:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xf8881
jmp 0xf8883
jmp 0xf8885
movq -0x8(%rbp), %rdi
callq 0xf87a0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xf8810
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
callq 0xf87e0
movb -0xd(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nop
|
bitmap_test_and_clear:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_F8881:
jmp short $+2
loc_F8883:
jmp short $+2
loc_F8885:
mov rdi, [rbp+var_8]
call bitmap_lock
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
call bitmap_fast_test_and_clear
mov [rbp+var_D], al
mov rdi, [rbp+var_8]
call bitmap_unlock
mov al, [rbp+var_D]
add rsp, 10h
pop rbp
retn
|
char bitmap_test_and_clear(_QWORD *a1, unsigned int a2)
{
char v3; // [rsp+3h] [rbp-Dh]
bitmap_lock((long long)a1);
v3 = bitmap_fast_test_and_clear(a1, a2);
bitmap_unlock((long long)a1);
return v3;
}
|
bitmap_test_and_clear:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001f8881
LAB_001f8881:
JMP 0x001f8883
LAB_001f8883:
JMP 0x001f8885
LAB_001f8885:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001f87a0
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001f8810
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001f87e0
MOV AL,byte ptr [RBP + -0xd]
ADD RSP,0x10
POP RBP
RET
|
int1 bitmap_test_and_clear(int8 param_1,int4 param_2)
{
int1 uVar1;
bitmap_lock(param_1);
uVar1 = bitmap_fast_test_and_clear(param_1,param_2);
bitmap_unlock(param_1);
return uVar1;
}
|
|
57,365
|
js_date_setYear
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_date_setYear(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// setYear(y)
double y;
JSValue args[1];
if (JS_ThisTimeValue(ctx, &y, this_val) || JS_ToFloat64(ctx, &y, argv[0]))
return JS_EXCEPTION;
y = +y;
if (isnan(y))
return JS_SetThisTimeValue(ctx, this_val, y);
if (isfinite(y)) {
y = trunc(y);
if (y >= 0 && y < 100)
y += 1900;
}
args[0] = js_float64(y);
return set_date_field(ctx, this_val, 1, args, 0x011);
}
|
O2
|
c
|
js_date_setYear:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4dfb3
pushq $0x6
popq %r12
testl %eax, %eax
jne 0x4dd9e
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x24e2f
testl %eax, %eax
je 0x4ddb9
xorl %eax, %eax
xorl %r13d, %r13d
movl %eax, %eax
orq %r13, %rax
movq %r12, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x4de3f
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0x4de0d
callq 0xe160
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4de0d
movsd 0x3ac91(%rip), %xmm1 # 0x88a90
ucomisd %xmm0, %xmm1
jbe 0x4de0d
addsd 0x3ac8b(%rip), %xmm0 # 0x88a98
leaq 0x10(%rsp), %r8
movsd %xmm0, (%r8)
movq $0x7, 0x8(%r8)
pushq $0x1
popq %rcx
pushq $0x11
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4dc16
movq %rdx, %r12
andq %rax, %r13
jmp 0x4dda3
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4e317
jmp 0x4de34
|
js_date_setYear:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rsi, [rsp+48h+var_40]
mov rdx, r14
mov rcx, rbx
call JS_ThisTimeValue
push 6
pop r12
test eax, eax
jnz short loc_4DD9E
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+48h+var_40]
mov rdi, r15
call JS_ToFloat64
test eax, eax
jz short loc_4DDB9
loc_4DD9E:
xor eax, eax
xor r13d, r13d
loc_4DDA3:
mov eax, eax
or rax, r13
mov rdx, r12
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_4DDB9:
mov r13, 0FFFFFFFF00000000h
movsd xmm0, [rsp+48h+var_40]
ucomisd xmm0, xmm0
jp short loc_4DE3F
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg short loc_4DE0D
call _trunc
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_4DE0D
movsd xmm1, cs:qword_88A90
ucomisd xmm1, xmm0
jbe short loc_4DE0D
addsd xmm0, cs:qword_88A98
loc_4DE0D:
lea r8, [rsp+48h+var_38]
movsd qword ptr [r8], xmm0
mov qword ptr [r8+8], 7
push 1
pop rcx
push 11h
pop r9
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call set_date_field
loc_4DE34:
mov r12, rdx
and r13, rax
jmp loc_4DDA3
loc_4DE3F:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetThisTimeValue
jmp short loc_4DE34
|
unsigned long long js_date_setYear(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v7; // rax
unsigned long long v8; // r13
double v10; // xmm0_8
double v11; // [rsp+8h] [rbp-40h] BYREF
double v12[7]; // [rsp+10h] [rbp-38h] BYREF
if ( (unsigned int)JS_ThisTimeValue(a1, &v11, a2, a3)
|| (unsigned int)JS_ToFloat64(a1, (long long)&v11, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
LODWORD(v7) = 0;
v8 = 0LL;
}
else
{
v10 = v11;
if ( (*(_QWORD *)&v11 & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL )
{
v10 = trunc(v11);
if ( v10 >= 0.0 && v10 < 100.0 )
v10 = v10 + 1900.0;
}
v12[0] = v10;
*(_QWORD *)&v12[1] = 7LL;
v7 = set_date_field(a1, a2, a3, 1, (long long)v12, 0x11u, v10);
v8 = v7 & 0xFFFFFFFF00000000LL;
}
return v8 | (unsigned int)v7;
}
|
js_date_setYear:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV RDX,R14
MOV RCX,RBX
CALL 0x0014dfb3
PUSH 0x6
POP R12
TEST EAX,EAX
JNZ 0x0014dd9e
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x00124e2f
TEST EAX,EAX
JZ 0x0014ddb9
LAB_0014dd9e:
XOR EAX,EAX
XOR R13D,R13D
LAB_0014dda3:
MOV EAX,EAX
OR RAX,R13
MOV RDX,R12
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0014ddb9:
MOV R13,-0x100000000
MOVSD XMM0,qword ptr [RSP + 0x8]
UCOMISD XMM0,XMM0
JP 0x0014de3f
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7fefffffffffffff
CMP RAX,RCX
JG 0x0014de0d
CALL 0x0010e160
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x0014de0d
MOVSD XMM1,qword ptr [0x00188a90]
UCOMISD XMM1,XMM0
JBE 0x0014de0d
ADDSD XMM0,qword ptr [0x00188a98]
LAB_0014de0d:
LEA R8,[RSP + 0x10]
MOVSD qword ptr [R8],XMM0
MOV qword ptr [R8 + 0x8],0x7
PUSH 0x1
POP RCX
PUSH 0x11
POP R9
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0014dc16
LAB_0014de34:
MOV R12,RDX
AND R13,RAX
JMP 0x0014dda3
LAB_0014de3f:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0014e317
JMP 0x0014de34
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_setYear(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
ulong uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
double local_40;
double local_38 [2];
iVar1 = JS_ThisTimeValue(param_1,&local_40,param_2,param_3);
if (iVar1 == 0) {
iVar1 = JS_ToFloat64(param_1,&local_40,*param_5,param_5[1]);
if (iVar1 == 0) {
if (NAN(local_40)) {
auVar4 = JS_SetThisTimeValue(param_1,param_2,param_3);
}
else {
if ((ulong)ABS(local_40) < 0x7ff0000000000000) {
local_40 = trunc(local_40);
if ((0.0 <= local_40) && (local_40 < DAT_00188a90)) {
local_40 = local_40 + _DAT_00188a98;
}
}
local_38[1] = 3.45845952088873e-323;
local_38[0] = local_40;
auVar4 = set_date_field(param_1,param_2,param_3,1,local_38,0x11);
}
uVar2 = auVar4._0_8_ & 0xffffffff00000000;
goto LAB_0014dda3;
}
}
auVar4 = ZEXT816(6) << 0x40;
uVar2 = 0;
LAB_0014dda3:
auVar3._0_8_ = auVar4._0_8_ & 0xffffffff | uVar2;
auVar3._8_8_ = auVar4._8_8_;
return auVar3;
}
|
|
57,366
|
ft_parse
|
eloqsql/storage/myisam/ft_parser.c
|
int ft_parse(TREE *wtree, uchar *doc, int doclen,
struct st_mysql_ftparser *parser,
MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root)
{
MY_FT_PARSER_PARAM my_param;
DBUG_ENTER("ft_parse");
DBUG_ASSERT(parser);
my_param.wtree= wtree;
my_param.mem_root= mem_root;
param->mysql_parse= ft_parse_internal;
param->mysql_add_word= ft_add_word;
param->mysql_ftparam= &my_param;
param->cs= wtree->custom_arg;
param->doc= (char*) doc;
param->length= doclen;
param->mode= MYSQL_FTPARSER_SIMPLE_MODE;
DBUG_RETURN(parser->parse(param));
}
|
O3
|
c
|
ft_parse:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x10(%rbp), %rax
movq %rdi, (%rax)
movq %r9, 0x8(%rax)
leaq 0x39(%rip), %r9 # 0x73db1
movq %r9, (%r8)
leaq 0xa6(%rip), %r9 # 0x73e28
movq %r9, 0x8(%r8)
movq %rax, 0x18(%r8)
movq 0x230(%rdi), %rax
movq %rax, 0x20(%r8)
movq %rsi, 0x28(%r8)
movl %edx, 0x30(%r8)
movl $0x0, 0x38(%r8)
movq %r8, %rdi
callq *0x8(%rcx)
addq $0x10, %rsp
popq %rbp
retq
|
ft_parse:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, [rbp+var_10]
mov [rax], rdi
mov [rax+8], r9
lea r9, ft_parse_internal
mov [r8], r9
lea r9, ft_add_word
mov [r8+8], r9
mov [r8+18h], rax
mov rax, [rdi+230h]
mov [r8+20h], rax
mov [r8+28h], rsi
mov [r8+30h], edx
mov dword ptr [r8+38h], 0
mov rdi, r8
call qword ptr [rcx+8]
add rsp, 10h
pop rbp
retn
|
long long ft_parse(long long a1, long long a2, int a3, long long a4, long long a5, long long a6)
{
_QWORD v7[2]; // [rsp+0h] [rbp-10h] BYREF
v7[0] = a1;
v7[1] = a6;
*(_QWORD *)a5 = ft_parse_internal;
*(_QWORD *)(a5 + 8) = ft_add_word;
*(_QWORD *)(a5 + 24) = v7;
*(_QWORD *)(a5 + 32) = *(_QWORD *)(a1 + 560);
*(_QWORD *)(a5 + 40) = a2;
*(_DWORD *)(a5 + 48) = a3;
*(_DWORD *)(a5 + 56) = 0;
return (*(long long ( **)(long long))(a4 + 8))(a5);
}
|
ft_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[RBP + -0x10]
MOV qword ptr [RAX],RDI
MOV qword ptr [RAX + 0x8],R9
LEA R9,[0x173db1]
MOV qword ptr [R8],R9
LEA R9,[0x173e28]
MOV qword ptr [R8 + 0x8],R9
MOV qword ptr [R8 + 0x18],RAX
MOV RAX,qword ptr [RDI + 0x230]
MOV qword ptr [R8 + 0x20],RAX
MOV qword ptr [R8 + 0x28],RSI
MOV dword ptr [R8 + 0x30],EDX
MOV dword ptr [R8 + 0x38],0x0
MOV RDI,R8
CALL qword ptr [RCX + 0x8]
ADD RSP,0x10
POP RBP
RET
|
void ft_parse(long param_1,int8 param_2,int4 param_3,long param_4,int8 *param_5,
int8 param_6)
{
long local_18;
int8 local_10;
*param_5 = ft_parse_internal;
param_5[1] = ft_add_word;
param_5[3] = &local_18;
param_5[4] = *(int8 *)(param_1 + 0x230);
param_5[5] = param_2;
*(int4 *)(param_5 + 6) = param_3;
*(int4 *)(param_5 + 7) = 0;
local_18 = param_1;
local_10 = param_6;
(**(code **)(param_4 + 8))(param_5);
return;
}
|
|
57,367
|
uf_space_prespace
|
eloqsql/storage/maria/ma_packrec.c
|
static void uf_space_prespace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill(to, (end-to), ' ');
else
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
bfill(to, spaces, ' ');
if (to+spaces != end)
decode_bytes(rec,bit_buff,to+spaces,end);
}
}
|
O0
|
c
|
uf_space_prespace:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x499f7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x49a1b
jmp 0x49a39
movq -0x10(%rbp), %rdi
callq 0x48ac0
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0x49a39
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0x20, %esi
callq 0x29280
jmp 0x49af1
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jb 0x49a7c
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, %edx
leaq 0x2775dc(%rip), %rcx # 0x2c1050
andl (%rcx,%rdx,4), %eax
movl %eax, -0x28(%rbp)
jmp 0x49a8f
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x48270
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jbe 0x49ab1
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0x49af1
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
movl $0x20, %esi
callq 0x29280
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
je 0x49aef
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %eax
addq %rax, %rdx
movq -0x20(%rbp), %rcx
callq 0x48e00
jmp 0x49af1
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
uf_space_prespace:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_499F7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_49A1B
jmp short loc_49A39
loc_499F7:
mov rdi, [rbp+var_10]
call fill_buffer
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_49A39
loc_49A1B:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rdx, rax
mov esi, 20h ; ' '
call _memset
jmp loc_49AF1
loc_49A39:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+24h]
jb short loc_49A7C
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+24h]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+24h]
mov edx, ecx
lea rcx, mask
and eax, [rcx+rdx*4]
mov [rbp+var_28], eax
jmp short loc_49A8F
loc_49A7C:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+24h]
call fill_and_get_bits
mov [rbp+var_28], eax
loc_49A8F:
mov ecx, [rbp+var_28]
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
cmp rax, [rbp+var_20]
jbe short loc_49AB1
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 1
jmp short loc_49AF1
loc_49AB1:
mov rdi, [rbp+var_18]
mov eax, [rbp+var_24]
mov edx, eax
mov esi, 20h ; ' '
call _memset
mov rax, [rbp+var_18]
mov ecx, [rbp+var_24]
add rax, rcx
cmp rax, [rbp+var_20]
jz short loc_49AEF
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov eax, [rbp+var_24]
add rdx, rax
mov rcx, [rbp+var_20]
call decode_bytes
loc_49AEF:
jmp short $+2
loc_49AF1:
add rsp, 30h
pop rbp
retn
|
long long uf_space_prespace(long long a1, int *a2, long long a3, _BYTE *a4)
{
int v4; // eax
int v5; // ecx
long long result; // rax
unsigned int v7; // eax
int v8; // ecx
unsigned int bits; // [rsp+8h] [rbp-28h]
if ( a2[1] )
{
v4 = *a2;
v5 = a2[1] - 1;
a2[1] = v5;
if ( ((1 << v5) & v4) == 0 )
goto LABEL_6;
return memset(a3, 32LL, &a4[-a3]);
}
fill_buffer((long long)a2);
a2[1] = 31;
if ( *a2 < 0 )
return memset(a3, 32LL, &a4[-a3]);
LABEL_6:
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) )
{
bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36));
}
else
{
v7 = *a2;
v8 = a2[1] - *(_DWORD *)(a1 + 36);
a2[1] = v8;
bits = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v8);
}
if ( (unsigned long long)bits + a3 <= (unsigned long long)a4 )
{
memset(a3, 32LL, bits);
result = bits + a3;
if ( (_BYTE *)result != a4 )
return decode_bytes(a1, (long long)a2, (_BYTE *)(bits + a3), a4);
}
else
{
result = (long long)a2;
a2[10] = 1;
}
return result;
}
|
uf_space_prespace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001499f7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x00149a1b
JMP 0x00149a39
LAB_001499f7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00148ac0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x00149a39
LAB_00149a1b:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RDX,RAX
MOV ESI,0x20
CALL 0x00129280
JMP 0x00149af1
LAB_00149a39:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x24]
JC 0x00149a7c
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x24]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x24]
MOV EDX,ECX
LEA RCX,[0x3c1050]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00149a8f
LAB_00149a7c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x24]
CALL 0x00148270
MOV dword ptr [RBP + -0x28],EAX
LAB_00149a8f:
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00149ab1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x1
JMP 0x00149af1
LAB_00149ab1:
MOV RDI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
MOV ESI,0x20
CALL 0x00129280
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00149aef
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x00148e00
LAB_00149aef:
JMP 0x00149af1
LAB_00149af1:
ADD RSP,0x30
POP RBP
RET
|
void uf_space_prespace(long param_1,uint *param_2,void *param_3,ulong param_4)
{
uint uVar1;
uint local_30;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] < *(uint *)(param_1 + 0x24)) {
local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x24);
param_2[1] = uVar1;
local_30 = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4);
}
if (param_4 < (long)param_3 + (ulong)local_30) {
param_2[10] = 1;
}
else {
memset(param_3,0x20,(ulong)local_30);
if ((long)param_3 + (ulong)local_30 != param_4) {
decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4);
}
}
}
else {
memset(param_3,0x20,param_4 - (long)param_3);
}
return;
}
|
|
57,368
|
ggml_is_contiguous_n
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
static bool ggml_is_contiguous_n(const struct ggml_tensor * tensor, int n) {
size_t next_nb = ggml_type_size(tensor->type);
if (tensor->ne[0] != ggml_blck_size(tensor->type) && tensor->nb[0] != next_nb) {
return false;
}
next_nb *= tensor->ne[0]/ggml_blck_size(tensor->type);
for (int i = 1; i < GGML_MAX_DIMS; i++) {
if (tensor->ne[i] != 1) {
if (i > n) {
if (tensor->nb[i] != next_nb) {
return false;
}
next_nb *= tensor->ne[i];
} else {
// this dimension does not need to be contiguous
next_nb = tensor->ne[i]*tensor->nb[i];
}
}
}
return true;
}
|
O3
|
c
|
ggml_is_contiguous_n:
movl (%rdi), %eax
imulq $0x38, %rax, %rax
leaq 0x52cda(%rip), %rcx # 0x6cda0
movq 0x8(%rax,%rcx), %r8
movq 0x18(%rax,%rcx), %rcx
movq 0x10(%rdi), %rax
cmpq %r8, %rax
je 0x1a0df
cmpq %rcx, 0x30(%rdi)
jne 0x1a123
cqto
idivq %r8
imulq %rcx, %rax
movslq %esi, %rcx
xorl %edx, %edx
movq %rdx, %r8
incq %rdx
movq 0x18(%rdi,%r8,8), %rsi
cmpq $0x1, %rsi
je 0x1a11a
movq 0x38(%rdi,%r8,8), %r8
cmpq %rcx, %rdx
jle 0x1a113
cmpq %rax, %r8
jne 0x1a123
imulq %rsi, %rax
jmp 0x1a11a
imulq %rsi, %r8
movq %r8, %rax
cmpq $0x3, %rdx
jne 0x1a0ed
movb $0x1, %al
retq
xorl %eax, %eax
retq
|
ggml_is_contiguous_n:
mov eax, [rdi]
imul rax, 38h ; '8'
lea rcx, type_traits
mov r8, [rax+rcx+8]
mov rcx, [rax+rcx+18h]
mov rax, [rdi+10h]
cmp rax, r8
jz short loc_1A0DF
cmp [rdi+30h], rcx
jnz short loc_1A123
loc_1A0DF:
cqo
idiv r8
imul rax, rcx
movsxd rcx, esi
xor edx, edx
loc_1A0ED:
mov r8, rdx
inc rdx
mov rsi, [rdi+r8*8+18h]
cmp rsi, 1
jz short loc_1A11A
mov r8, [rdi+r8*8+38h]
cmp rdx, rcx
jle short loc_1A113
cmp r8, rax
jnz short loc_1A123
imul rax, rsi
jmp short loc_1A11A
loc_1A113:
imul r8, rsi
mov rax, r8
loc_1A11A:
cmp rdx, 3
jnz short loc_1A0ED
mov al, 1
retn
loc_1A123:
xor eax, eax
retn
|
char ggml_is_contiguous_n(unsigned int *a1, int a2)
{
long long v2; // rax
long long v3; // r8
char *v4; // rcx
long long v5; // rax
long long v6; // rax
long long v7; // rcx
long long v8; // rdx
long long v9; // r8
long long v10; // rsi
long long v11; // r8
v2 = 7LL * *a1;
v3 = (long long)(&type_traits)[v2 + 1];
v4 = (&type_traits)[v2 + 3];
v5 = *((_QWORD *)a1 + 2);
if ( v5 != v3 && *((char **)a1 + 6) != v4 )
return 0;
v6 = (_QWORD)v4 * (v5 / v3);
v7 = a2;
v8 = 0LL;
do
{
v9 = v8++;
v10 = *(_QWORD *)&a1[2 * v9 + 6];
if ( v10 != 1 )
{
v11 = *(_QWORD *)&a1[2 * v9 + 14];
if ( v8 <= v7 )
{
v6 = v10 * v11;
}
else
{
if ( v11 != v6 )
return 0;
v6 *= v10;
}
}
}
while ( v8 != 3 );
return 1;
}
|
ggml_is_contiguous_n:
MOV EAX,dword ptr [RDI]
IMUL RAX,RAX,0x38
LEA RCX,[0x16cda0]
MOV R8,qword ptr [RAX + RCX*0x1 + 0x8]
MOV RCX,qword ptr [RAX + RCX*0x1 + 0x18]
MOV RAX,qword ptr [RDI + 0x10]
CMP RAX,R8
JZ 0x0011a0df
CMP qword ptr [RDI + 0x30],RCX
JNZ 0x0011a123
LAB_0011a0df:
CQO
IDIV R8
IMUL RAX,RCX
MOVSXD RCX,ESI
XOR EDX,EDX
LAB_0011a0ed:
MOV R8,RDX
INC RDX
MOV RSI,qword ptr [RDI + R8*0x8 + 0x18]
CMP RSI,0x1
JZ 0x0011a11a
MOV R8,qword ptr [RDI + R8*0x8 + 0x38]
CMP RDX,RCX
JLE 0x0011a113
CMP R8,RAX
JNZ 0x0011a123
IMUL RAX,RSI
JMP 0x0011a11a
LAB_0011a113:
IMUL R8,RSI
MOV RAX,R8
LAB_0011a11a:
CMP RDX,0x3
JNZ 0x0011a0ed
MOV AL,0x1
RET
LAB_0011a123:
XOR EAX,EAX
RET
|
int8 ggml_is_contiguous_n(uint *param_1,int param_2)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
if ((*(long *)(param_1 + 4) != *(long *)(type_traits + (ulong)*param_1 * 0x38 + 8)) &&
(*(long *)(param_1 + 0xc) != *(long *)(type_traits + (ulong)*param_1 * 0x38 + 0x18))) {
return 0;
}
lVar2 = (*(long *)(param_1 + 4) / *(long *)(type_traits + (ulong)*param_1 * 0x38 + 8)) *
*(long *)(type_traits + (ulong)*param_1 * 0x38 + 0x18);
lVar3 = 0;
do {
lVar4 = lVar3 + 1;
lVar1 = *(long *)(param_1 + lVar3 * 2 + 6);
if (lVar1 != 1) {
if (param_2 < lVar4) {
if (*(long *)(param_1 + lVar3 * 2 + 0xe) != lVar2) {
return 0;
}
lVar2 = lVar2 * lVar1;
}
else {
lVar2 = *(long *)(param_1 + lVar3 * 2 + 0xe) * lVar1;
}
}
lVar3 = lVar4;
} while (lVar4 != 3);
return CONCAT71((int7)((ulong)lVar2 >> 8),1);
}
|
|
57,369
|
cxxopts::values::parser_tool::ParseArgument(char const*, bool&)
|
shubhamoy[P]dir2txt/include/cxxopts.hpp
|
inline ArguDesc ParseArgument(const char *arg, bool &matched)
{
static const std::basic_regex<char> option_matcher(option_pattern);
std::match_results<const char*> result;
std::regex_match(arg, result, option_matcher);
matched = !result.empty();
ArguDesc argu_desc;
if (matched) {
argu_desc.arg_name = result[1].str();
argu_desc.set_value = result[2].length() > 0;
argu_desc.value = result[3].str();
if (result[4].length() > 0)
{
argu_desc.grouping = true;
argu_desc.arg_name = result[4].str();
}
}
return argu_desc;
}
|
O3
|
cpp
|
cxxopts::values::parser_tool::ParseArgument(char const*, bool&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb 0x2e959(%rip), %al # 0x4e8c0
testb %al, %al
je 0x20229
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r15, %rdi
callq 0x8180
leaq (%rax,%r15), %rsi
leaq 0x2e90b(%rip), %rcx # 0x4e8a0
movq %r15, %rdi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0x18413
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, %rcx
subq %rdi, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rdx
leaq 0x10(%rbx), %rsi
xorl %r8d, %r8d
cmpq $0x4, %rdx
setae (%r14)
leaq 0x38(%rbx), %r9
movq %rsi, (%rbx)
movq %r8, 0x8(%rbx)
movb %r8b, 0x10(%rbx)
movw $0x0, 0x20(%rbx)
movq %r9, 0x28(%rbx)
movq %r8, 0x30(%rbx)
movb %r8b, 0x38(%rbx)
jae 0x2001b
testq %rdi, %rdi
je 0x2000c
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x8380
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq $-0x5, %rdx
leaq 0x18(%rdi), %r8
cmpq $-0x2, %rdx
leaq -0x48(%rdi,%rcx), %rcx
cmovaeq %rcx, %r8
cmpq %rax, %rdi
cmoveq %rcx, %r8
cmpb $0x1, 0x10(%r8)
jne 0x20058
movq (%r8), %rsi
movq 0x8(%r8), %rdx
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %rdi
callq 0x9a9e
jmp 0x2006c
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x86c0
movq (%r14), %rdi
leaq 0x10(%rsp), %r12
cmpq %r12, %rdi
je 0x20094
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8380
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
movq %rdx, %rcx
subq %rax, %rcx
je 0x200c1
movq %rcx, %rsi
sarq $0x3, %rsi
imulq %r15, %rsi
addq $-0x6, %rsi
cmpq $-0x4, %rsi
ja 0x200c1
leaq 0x30(%rax), %rsi
jmp 0x200c9
leaq (%rax,%rcx), %rsi
addq $-0x48, %rsi
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
testq %rdi, %rdi
setg %dil
andb 0x10(%rsi), %dil
movb %dil, 0x21(%rbx)
cmpq %rdx, %rax
je 0x200ff
movq %rcx, %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
addq $-0x7, %rdx
cmpq $-0x5, %rdx
ja 0x200ff
addq $0x48, %rax
jmp 0x20106
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x20120
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %r12, (%rdi)
callq 0x9a9e
jmp 0x20132
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x28(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x86c0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x20156
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8380
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rcx
movq %rcx, %rax
subq %rdi, %rax
je 0x20183
movq %rax, %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
addq $-0x8, %rdx
cmpq $-0x6, %rdx
ja 0x20183
leaq 0x60(%rdi), %rdx
jmp 0x2018b
leaq (%rdi,%rax), %rdx
addq $-0x48, %rdx
cmpb $0x1, 0x10(%rdx)
jne 0x1fffa
movq 0x8(%rdx), %rsi
subq (%rdx), %rsi
testq %rsi, %rsi
jle 0x1fffa
movb $0x1, 0x20(%rbx)
cmpq %rcx, %rdi
je 0x201c9
movq %rax, %rcx
sarq $0x3, %rcx
imulq %r15, %rcx
addq $-0x8, %rcx
cmpq $-0x6, %rcx
ja 0x201c9
addq $0x60, %rdi
jmp 0x201d0
addq %rax, %rdi
addq $-0x48, %rdi
cmpb $0x1, 0x10(%rdi)
jne 0x201ea
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq %rsp, %rdi
movq %r12, (%rdi)
callq 0x9a9e
jmp 0x201fc
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x86c0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x2021f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8380
movq 0x20(%rsp), %rdi
jmp 0x1fffa
leaq 0x2e690(%rip), %rdi # 0x4e8c0
callq 0x85e0
testl %eax, %eax
je 0x1ff6f
leaq 0x2e65c(%rip), %rdi # 0x4e8a0
leaq 0x15f23(%rip), %rsi # 0x3616e
movl $0x10, %edx
callq 0xcc3a
leaq -0x135ba(%rip), %rdi # 0xcca2
leaq 0x2e63d(%rip), %rsi # 0x4e8a0
leaq 0x2e0fe(%rip), %rdx # 0x4e368
callq 0x8330
leaq 0x2e64a(%rip), %rdi # 0x4e8c0
callq 0x8260
jmp 0x1ff6f
movq %rax, %r14
leaq 0x2e636(%rip), %rdi # 0x4e8c0
callq 0x8240
jmp 0x202bc
jmp 0x20295
jmp 0x20295
movq %rax, %r14
movq %rbx, %rdi
callq 0x20612
jmp 0x202a5
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x202bc
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x8380
movq %r14, %rdi
callq 0x85d0
|
_ZN7cxxopts6values11parser_tool13ParseArgumentEPKcRb:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov al, cs:_ZGVZN7cxxopts6values11parser_tool13ParseArgumentEPKcRbE14option_matcherB5cxx11; `guard variable for'cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher
test al, al
jz loc_20229
loc_1FF6F:
xorps xmm0, xmm0
lea r12, [rsp+68h+var_48]
movaps xmmword ptr [r12+10h], xmm0
movaps xmmword ptr [r12], xmm0
mov rdi, r15
call _strlen
lea rsi, [rax+r15]
lea rcx, _ZZN7cxxopts6values11parser_tool13ParseArgumentEPKcRbE14option_matcherB5cxx11; cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher
mov rdi, r15
mov rdx, r12
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIPKcSaINSt7__cxx119sub_matchIS2_EEEcNS3_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb1EEEbT_SA_RNS3_13match_resultsISA_T0_EERKNS3_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<char const*,std::allocator<std::sub_match<char const*>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(char const*,char const*,std::match_results<char const*> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
mov rdi, [rsp+68h+var_48]; void *
mov rax, [rsp+68h+var_40]
mov rcx, rax
sub rcx, rdi
mov rdx, rcx
sar rdx, 3
mov r15, 0AAAAAAAAAAAAAAABh
imul rdx, r15
lea rsi, [rbx+10h]
xor r8d, r8d
cmp rdx, 4
setnb byte ptr [r14]
lea r9, [rbx+38h]
mov [rbx], rsi
mov [rbx+8], r8
mov [rbx+10h], r8b
mov word ptr [rbx+20h], 0
mov [rbx+28h], r9
mov [rbx+30h], r8
mov [rbx+38h], r8b
jnb short loc_2001B
loc_1FFFA:
test rdi, rdi
jz short loc_2000C
mov rsi, [rsp+68h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2000C:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
loc_2001B:
add rdx, 0FFFFFFFFFFFFFFFBh
lea r8, [rdi+18h]
cmp rdx, 0FFFFFFFFFFFFFFFEh
lea rcx, [rdi+rcx-48h]
cmovnb r8, rcx
cmp rdi, rax
cmovz r8, rcx
cmp byte ptr [r8+10h], 1
jnz short loc_20058
mov rsi, [r8]
mov rdx, [r8+8]
lea rax, [rsp+68h+var_58]
mov [rax-10h], rax
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)
jmp short loc_2006C
loc_20058:
lea rax, [rsp+68h+var_58]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
loc_2006C:
mov r14, rsp
mov rdi, rbx
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
lea r12, [rsp+68h+var_58]
cmp rdi, r12
jz short loc_20094
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20094:
mov rax, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_40]
mov rcx, rdx
sub rcx, rax
jz short loc_200C1
mov rsi, rcx
sar rsi, 3
imul rsi, r15
add rsi, 0FFFFFFFFFFFFFFFAh
cmp rsi, 0FFFFFFFFFFFFFFFCh
ja short loc_200C1
lea rsi, [rax+30h]
jmp short loc_200C9
loc_200C1:
lea rsi, [rax+rcx]
add rsi, 0FFFFFFFFFFFFFFB8h
loc_200C9:
mov rdi, [rsi+8]
sub rdi, [rsi]
test rdi, rdi
setnle dil
and dil, [rsi+10h]
mov [rbx+21h], dil
cmp rax, rdx
jz short loc_200FF
mov rdx, rcx
sar rdx, 3
imul rdx, r15
add rdx, 0FFFFFFFFFFFFFFF9h
cmp rdx, 0FFFFFFFFFFFFFFFBh
ja short loc_200FF
add rax, 48h ; 'H'
jmp short loc_20106
loc_200FF:
add rax, rcx
add rax, 0FFFFFFFFFFFFFFB8h
loc_20106:
cmp byte ptr [rax+10h], 1
jnz short loc_20120
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, rsp
mov [rdi], 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)
jmp short loc_20132
loc_20120:
mov [rsp+68h+var_68], r12
mov [rsp+68h+var_60], 0
mov byte ptr [rsp+68h+var_58], 0
loc_20132:
lea rdi, [rbx+28h]
mov r14, rsp
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_20156
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20156:
mov rdi, [rsp+68h+var_48]
mov rcx, [rsp+68h+var_40]
mov rax, rcx
sub rax, rdi
jz short loc_20183
mov rdx, rax
sar rdx, 3
imul rdx, r15
add rdx, 0FFFFFFFFFFFFFFF8h
cmp rdx, 0FFFFFFFFFFFFFFFAh
ja short loc_20183
lea rdx, [rdi+60h]
jmp short loc_2018B
loc_20183:
lea rdx, [rdi+rax]
add rdx, 0FFFFFFFFFFFFFFB8h
loc_2018B:
cmp byte ptr [rdx+10h], 1
jnz loc_1FFFA
mov rsi, [rdx+8]
sub rsi, [rdx]
test rsi, rsi
jle loc_1FFFA
mov byte ptr [rbx+20h], 1
cmp rdi, rcx
jz short loc_201C9
mov rcx, rax
sar rcx, 3
imul rcx, r15
add rcx, 0FFFFFFFFFFFFFFF8h
cmp rcx, 0FFFFFFFFFFFFFFFAh
ja short loc_201C9
add rdi, 60h ; '`'
jmp short loc_201D0
loc_201C9:
add rdi, rax
add rdi, 0FFFFFFFFFFFFFFB8h
loc_201D0:
cmp byte ptr [rdi+10h], 1
jnz short loc_201EA
mov rsi, [rdi]
mov rdx, [rdi+8]
mov rdi, rsp
mov [rdi], 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)
jmp short loc_201FC
loc_201EA:
mov [rsp+68h+var_68], r12
mov [rsp+68h+var_60], 0
mov byte ptr [rsp+68h+var_58], 0
loc_201FC:
mov r14, rsp
mov rdi, rbx
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_2021F
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2021F:
mov rdi, [rsp+68h+var_48]
jmp loc_1FFFA
loc_20229:
lea rdi, _ZGVZN7cxxopts6values11parser_tool13ParseArgumentEPKcRbE14option_matcherB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_1FF6F
lea rdi, _ZZN7cxxopts6values11parser_tool13ParseArgumentEPKcRbE14option_matcherB5cxx11; cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher
lea rsi, aAlnumAlnumAlnu_0; "--([[:alnum:]][-_[:alnum:]\\.]+)(=(.*))"...
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, _ZZN7cxxopts6values11parser_tool13ParseArgumentEPKcRbE14option_matcherB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN7cxxopts6values11parser_tool13ParseArgumentEPKcRbE14option_matcherB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_1FF6F
mov r14, rax
lea rdi, _ZGVZN7cxxopts6values11parser_tool13ParseArgumentEPKcRbE14option_matcherB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_202BC
jmp short loc_20295
jmp short $+2
loc_20295:
mov r14, rax
mov rdi, rbx; this
call _ZN7cxxopts6values11parser_tool8ArguDescD2Ev; cxxopts::values::parser_tool::ArguDesc::~ArguDesc()
jmp short loc_202A5
mov r14, rax
loc_202A5:
mov rdi, [rsp+arg_18]; void *
test rdi, rdi
jz short loc_202BC
mov rsi, [rsp+arg_28]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_202BC:
mov rdi, r14
call __Unwind_Resume
|
cxxopts::values::parser_tool * cxxopts::values::parser_tool::ParseArgument(
cxxopts::values::parser_tool *this,
const char *a2,
bool *a3)
{
long long v5; // rax
char *v6; // rax
char *v7; // rdi
long long v8; // rcx
unsigned long long v9; // rdx
char *v11; // r8
long long v12; // rcx
_BYTE *v13; // rsi
long long v14; // rdx
__int128 v15; // rax
long long v16; // rcx
long long v17; // rsi
long long v18; // rax
_BYTE *v19; // rsi
long long v20; // rdx
char *v21; // rcx
long long v22; // rax
long long v23; // rdx
long long v24; // rdi
_BYTE *v25; // rsi
long long v26; // rdx
_QWORD *v27; // [rsp+0h] [rbp-68h] BYREF
long long v28; // [rsp+8h] [rbp-60h]
_QWORD v29[2]; // [rsp+10h] [rbp-58h] BYREF
__int128 v30; // [rsp+20h] [rbp-48h] BYREF
__int128 v31; // [rsp+30h] [rbp-38h]
if ( !(_BYTE)`guard variable for'cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher[abi:cxx11],
(long long)"--([[:alnum:]][-_[:alnum:]\\.]+)(=(.*))?|-([[:alnum:]].*)",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher[abi:cxx11]);
}
v31 = 0LL;
v30 = 0LL;
v5 = strlen(a2);
std::__detail::__regex_algo_impl<char const*,std::allocator<std::sub_match<char const*>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(
(long long)a2,
(long long)&a2[v5],
(long long *)&v30,
(long long)&cxxopts::values::parser_tool::ParseArgument(char const*,bool &)::option_matcher[abi:cxx11],
0);
v6 = (char *)*((_QWORD *)&v30 + 1);
v7 = (char *)v30;
v8 = *((_QWORD *)&v30 + 1) - v30;
v9 = 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v30 + 1) - v30) >> 3);
*a3 = v9 >= 4;
*(_QWORD *)this = (char *)this + 16;
*((_QWORD *)this + 1) = 0LL;
*((_BYTE *)this + 16) = 0;
*((_WORD *)this + 16) = 0;
*((_QWORD *)this + 5) = (char *)this + 56;
*((_QWORD *)this + 6) = 0LL;
*((_BYTE *)this + 56) = 0;
if ( v9 >= 4 )
{
v11 = v7 + 24;
v12 = (long long)&v7[v8 - 72];
if ( v9 - 5 >= 0xFFFFFFFFFFFFFFFELL )
v11 = (char *)v12;
if ( v7 == v6 )
v11 = (char *)v12;
if ( v11[16] == 1 )
{
v13 = *(_BYTE **)v11;
v14 = *((_QWORD *)v11 + 1);
v27 = v29;
std::string::_M_construct<char const*>((long long)&v27, v13, v14);
}
else
{
v27 = v29;
v28 = 0LL;
LOBYTE(v29[0]) = 0;
}
std::string::operator=(this, (long long)&v27);
if ( v27 != v29 )
operator delete(v27, v29[0] + 1LL);
v15 = v30;
v16 = *((_QWORD *)&v30 + 1) - v30;
if ( *((_QWORD *)&v30 + 1) == (_QWORD)v30 || 0xAAAAAAAAAAAAAAABLL * (v16 >> 3) - 6 > 0xFFFFFFFFFFFFFFFCLL )
v17 = *((_QWORD *)&v30 + 1) - 72LL;
else
v17 = v30 + 48;
*((_BYTE *)this + 33) = *(_BYTE *)(v17 + 16) & (*(_QWORD *)(v17 + 8) - *(_QWORD *)v17 > 0LL);
if ( (_QWORD)v15 == *((_QWORD *)&v15 + 1) || 0xAAAAAAAAAAAAAAABLL * (v16 >> 3) - 7 > 0xFFFFFFFFFFFFFFFBLL )
v18 = v16 + v15 - 72;
else
v18 = v15 + 72;
if ( *(_BYTE *)(v18 + 16) == 1 )
{
v19 = *(_BYTE **)v18;
v20 = *(_QWORD *)(v18 + 8);
v27 = v29;
std::string::_M_construct<char const*>((long long)&v27, v19, v20);
}
else
{
v27 = v29;
v28 = 0LL;
LOBYTE(v29[0]) = 0;
}
std::string::operator=((_QWORD *)this + 5, (long long)&v27);
if ( v27 != v29 )
operator delete(v27, v29[0] + 1LL);
v21 = (char *)*((_QWORD *)&v30 + 1);
v7 = (char *)v30;
v22 = *((_QWORD *)&v30 + 1) - v30;
if ( *((_QWORD *)&v30 + 1) == (_QWORD)v30 || 0xAAAAAAAAAAAAAAABLL * (v22 >> 3) - 8 > 0xFFFFFFFFFFFFFFFALL )
v23 = *((_QWORD *)&v30 + 1) - 72LL;
else
v23 = v30 + 96;
if ( *(_BYTE *)(v23 + 16) == 1 && (long long)(*(_QWORD *)(v23 + 8) - *(_QWORD *)v23) > 0 )
{
*((_BYTE *)this + 32) = 1;
if ( v7 == v21 || 0xAAAAAAAAAAAAAAABLL * (v22 >> 3) - 8 > 0xFFFFFFFFFFFFFFFALL )
v24 = (long long)&v7[v22 - 72];
else
v24 = (long long)(v7 + 96);
if ( *(_BYTE *)(v24 + 16) == 1 )
{
v25 = *(_BYTE **)v24;
v26 = *(_QWORD *)(v24 + 8);
v27 = v29;
std::string::_M_construct<char const*>((long long)&v27, v25, v26);
}
else
{
v27 = v29;
v28 = 0LL;
LOBYTE(v29[0]) = 0;
}
std::string::operator=(this, (long long)&v27);
if ( v27 != v29 )
operator delete(v27, v29[0] + 1LL);
v7 = (char *)v30;
}
}
if ( v7 )
operator delete(v7, v31 - (_QWORD)v7);
return this;
}
|
ParseArgument:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV AL,byte ptr [0x0014e8c0]
TEST AL,AL
JZ 0x00120229
LAB_0011ff6f:
XORPS XMM0,XMM0
LEA R12,[RSP + 0x20]
MOVAPS xmmword ptr [R12 + 0x10],XMM0
MOVAPS xmmword ptr [R12],XMM0
MOV RDI,R15
CALL 0x00108180
LEA RSI,[RAX + R15*0x1]
LAB_0011ff8e:
LEA RCX,[0x14e8a0]
MOV RDI,R15
MOV RDX,R12
XOR R8D,R8D
CALL 0x00118413
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,RAX
SUB RCX,RDI
MOV RDX,RCX
SAR RDX,0x3
MOV R15,-0x5555555555555555
IMUL RDX,R15
LEA RSI,[RBX + 0x10]
XOR R8D,R8D
CMP RDX,0x4
SETNC byte ptr [R14]
LEA R9,[RBX + 0x38]
MOV qword ptr [RBX],RSI
MOV qword ptr [RBX + 0x8],R8
MOV byte ptr [RBX + 0x10],R8B
MOV word ptr [RBX + 0x20],0x0
MOV qword ptr [RBX + 0x28],R9
MOV qword ptr [RBX + 0x30],R8
MOV byte ptr [RBX + 0x38],R8B
JNC 0x0012001b
LAB_0011fffa:
TEST RDI,RDI
JZ 0x0012000c
MOV RSI,qword ptr [RSP + 0x30]
SUB RSI,RDI
CALL 0x00108380
LAB_0012000c:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0012001b:
ADD RDX,-0x5
LEA R8,[RDI + 0x18]
CMP RDX,-0x2
LEA RCX,[RDI + RCX*0x1 + -0x48]
CMOVNC R8,RCX
CMP RDI,RAX
CMOVZ R8,RCX
CMP byte ptr [R8 + 0x10],0x1
JNZ 0x00120058
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
LAB_0012004e:
MOV RDI,RSP
CALL 0x00109a9e
JMP 0x0012006c
LAB_00120058:
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LAB_0012006c:
MOV R14,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x001086c0
MOV RDI,qword ptr [R14]
LEA R12,[RSP + 0x10]
CMP RDI,R12
JZ 0x00120094
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00108380
LAB_00120094:
MOV RAX,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,RDX
SUB RCX,RAX
JZ 0x001200c1
MOV RSI,RCX
SAR RSI,0x3
IMUL RSI,R15
ADD RSI,-0x6
CMP RSI,-0x4
JA 0x001200c1
LEA RSI,[RAX + 0x30]
JMP 0x001200c9
LAB_001200c1:
LEA RSI,[RAX + RCX*0x1]
ADD RSI,-0x48
LAB_001200c9:
MOV RDI,qword ptr [RSI + 0x8]
SUB RDI,qword ptr [RSI]
TEST RDI,RDI
SETG DIL
AND DIL,byte ptr [RSI + 0x10]
MOV byte ptr [RBX + 0x21],DIL
CMP RAX,RDX
JZ 0x001200ff
MOV RDX,RCX
SAR RDX,0x3
IMUL RDX,R15
ADD RDX,-0x7
CMP RDX,-0x5
JA 0x001200ff
ADD RAX,0x48
JMP 0x00120106
LAB_001200ff:
ADD RAX,RCX
ADD RAX,-0x48
LAB_00120106:
CMP byte ptr [RAX + 0x10],0x1
JNZ 0x00120120
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,RSP
MOV qword ptr [RDI],R12
LAB_00120119:
CALL 0x00109a9e
JMP 0x00120132
LAB_00120120:
MOV qword ptr [RSP],R12
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
LAB_00120132:
LEA RDI,[RBX + 0x28]
MOV R14,RSP
MOV RSI,R14
CALL 0x001086c0
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x00120156
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00108380
LAB_00120156:
MOV RDI,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,RCX
SUB RAX,RDI
JZ 0x00120183
MOV RDX,RAX
SAR RDX,0x3
IMUL RDX,R15
ADD RDX,-0x8
CMP RDX,-0x6
JA 0x00120183
LEA RDX,[RDI + 0x60]
JMP 0x0012018b
LAB_00120183:
LEA RDX,[RDI + RAX*0x1]
ADD RDX,-0x48
LAB_0012018b:
CMP byte ptr [RDX + 0x10],0x1
JNZ 0x0011fffa
MOV RSI,qword ptr [RDX + 0x8]
SUB RSI,qword ptr [RDX]
TEST RSI,RSI
JLE 0x0011fffa
MOV byte ptr [RBX + 0x20],0x1
CMP RDI,RCX
JZ 0x001201c9
MOV RCX,RAX
SAR RCX,0x3
IMUL RCX,R15
ADD RCX,-0x8
CMP RCX,-0x6
JA 0x001201c9
ADD RDI,0x60
JMP 0x001201d0
LAB_001201c9:
ADD RDI,RAX
ADD RDI,-0x48
LAB_001201d0:
CMP byte ptr [RDI + 0x10],0x1
JNZ 0x001201ea
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV RDI,RSP
MOV qword ptr [RDI],R12
LAB_001201e3:
CALL 0x00109a9e
JMP 0x001201fc
LAB_001201ea:
MOV qword ptr [RSP],R12
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
LAB_001201fc:
MOV R14,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x001086c0
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x0012021f
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00108380
LAB_0012021f:
MOV RDI,qword ptr [RSP + 0x20]
JMP 0x0011fffa
LAB_00120229:
LEA RDI,[0x14e8c0]
CALL 0x001085e0
TEST EAX,EAX
JZ 0x0011ff6f
LAB_0012023d:
LEA RDI,[0x14e8a0]
LEA RSI,[0x13616e]
MOV EDX,0x10
CALL 0x0010cc3a
LAB_00120255:
LEA RDI,[0x10cca2]
LEA RSI,[0x14e8a0]
LEA RDX,[0x14e368]
CALL 0x00108330
LEA RDI,[0x14e8c0]
CALL 0x00108260
JMP 0x0011ff6f
|
/* cxxopts::values::parser_tool::ParseArgument(char const*, bool&) */
parser_tool * __thiscall
cxxopts::values::parser_tool::ParseArgument(parser_tool *this,char *param_1,bool *param_2)
{
int iVar1;
size_t sVar2;
int8 *puVar3;
long lVar4;
ulong uVar5;
long *plVar6;
int8 *puVar7;
int1 *local_68;
int8 local_60;
int1 local_58;
int7 uStack_57;
void *local_48;
void *pvStack_40;
long local_38;
int8 uStack_30;
if ((ParseArgument(char_const*,bool&)::option_matcher_abi_cxx11_ == '\0') &&
(iVar1 = __cxa_guard_acquire(&ParseArgument(char_const*,bool&)::option_matcher_abi_cxx11_),
iVar1 != 0)) {
/* try { // try from 0012023d to 00120254 has its CatchHandler @ 00120280 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
ParseArgument(char_const*,bool&)::option_matcher_abi_cxx11_,
"--([[:alnum:]][-_[:alnum:]\\.]+)(=(.*))?|-([[:alnum:]].*)",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
ParseArgument(char_const*,bool&)::option_matcher_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&ParseArgument(char_const*,bool&)::option_matcher_abi_cxx11_);
}
local_38 = 0;
uStack_30 = 0;
local_48 = (void *)0x0;
pvStack_40 = (void *)0x0;
sVar2 = strlen(param_1);
/* try { // try from 0011ff8e to 0011ffa2 has its CatchHandler @ 001202a2 */
std::__detail::
__regex_algo_impl<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>
(param_1,param_1 + sVar2,&local_48,
ParseArgument(char_const*,bool&)::option_matcher_abi_cxx11_);
uVar5 = ((long)pvStack_40 - (long)local_48 >> 3) * -0x5555555555555555;
*param_2 = 3 < uVar5;
*(parser_tool **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (parser_tool)0x0;
*(int2 *)(this + 0x20) = 0;
*(parser_tool **)(this + 0x28) = this + 0x38;
*(int8 *)(this + 0x30) = 0;
this[0x38] = (parser_tool)0x0;
if (3 < uVar5) {
puVar3 = (int8 *)((long)local_48 + ((long)pvStack_40 - (long)local_48) + -0x48);
puVar7 = (int8 *)((long)local_48 + 0x18);
if (0xfffffffffffffffd < uVar5 - 5) {
puVar7 = puVar3;
}
if (local_48 == pvStack_40) {
puVar7 = puVar3;
}
if (*(char *)(puVar7 + 2) == '\x01') {
local_68 = &local_58;
/* try { // try from 0012004e to 00120055 has its CatchHandler @ 00120295 */
std::__cxx11::string::_M_construct<char_const*>(&local_68,*puVar7,puVar7[1]);
}
else {
local_68 = &local_58;
local_60 = 0;
local_58 = 0;
}
std::__cxx11::string::operator=((string *)this,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,CONCAT71(uStack_57,local_58) + 1);
}
lVar4 = (long)pvStack_40 - (long)local_48;
if ((lVar4 == 0) || (0xfffffffffffffffc < (lVar4 >> 3) * -0x5555555555555555 - 6U)) {
plVar6 = (long *)((long)local_48 + lVar4 + -0x48);
}
else {
plVar6 = (long *)((long)local_48 + 0x30);
}
this[0x21] = (parser_tool)
((plVar6[1] != *plVar6 && -1 < plVar6[1] - *plVar6) & *(byte *)(plVar6 + 2));
if ((local_48 == pvStack_40) || (0xfffffffffffffffb < (lVar4 >> 3) * -0x5555555555555555 - 7U))
{
puVar3 = (int8 *)((long)local_48 + lVar4 + -0x48);
}
else {
puVar3 = (int8 *)((long)local_48 + 0x48);
}
local_68 = &local_58;
if (*(char *)(puVar3 + 2) == '\x01') {
/* try { // try from 00120119 to 0012011d has its CatchHandler @ 00120293 */
std::__cxx11::string::_M_construct<char_const*>(&local_68,*puVar3,puVar3[1]);
}
else {
local_60 = 0;
local_58 = 0;
}
std::__cxx11::string::operator=((string *)(this + 0x28),(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,CONCAT71(uStack_57,local_58) + 1);
}
lVar4 = (long)pvStack_40 - (long)local_48;
if ((lVar4 == 0) || (0xfffffffffffffffa < (lVar4 >> 3) * -0x5555555555555555 - 8U)) {
plVar6 = (long *)((long)local_48 + lVar4 + -0x48);
}
else {
plVar6 = (long *)((long)local_48 + 0x60);
}
if (((char)plVar6[2] == '\x01') && (plVar6[1] != *plVar6 && -1 < plVar6[1] - *plVar6)) {
this[0x20] = (parser_tool)0x1;
if ((local_48 == pvStack_40) || (0xfffffffffffffffa < (lVar4 >> 3) * -0x5555555555555555 - 8U)
) {
puVar3 = (int8 *)((long)local_48 + lVar4 + -0x48);
}
else {
puVar3 = (int8 *)((long)local_48 + 0x60);
}
if (*(char *)(puVar3 + 2) == '\x01') {
local_68 = &local_58;
/* try { // try from 001201e3 to 001201e7 has its CatchHandler @ 00120291 */
std::__cxx11::string::_M_construct<char_const*>(&local_68,*puVar3,puVar3[1]);
}
else {
local_60 = 0;
local_58 = 0;
local_68 = &local_58;
}
std::__cxx11::string::operator=((string *)this,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,CONCAT71(uStack_57,local_58) + 1);
}
}
}
if (local_48 != (void *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return this;
}
|
|
57,370
|
ftxui::hcenter(std::shared_ptr<ftxui::Node>)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/composite_decorator.cpp
|
Element hcenter(Element child) {
return hbox(filler(), std::move(child), filler());
}
|
O3
|
cpp
|
ftxui::hcenter(std::shared_ptr<ftxui::Node>):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
callq 0x23598
movups (%r14), %xmm0
xorl %eax, %eax
movq %rax, 0x8(%r14)
movaps %xmm0, (%rsp)
movq %rax, (%r14)
leaq 0x18(%rsp), %rdi
callq 0x23598
leaq 0x28(%rsp), %rsi
movq %rsp, %rdx
leaq 0x18(%rsp), %rcx
movq %rbx, %rdi
callq 0x232d5
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2309e
callq 0x14af8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x230ad
callq 0x14af8
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x230bc
callq 0x14af8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x230de
callq 0x14af8
jmp 0x230de
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x230ed
callq 0x14af8
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x230fc
callq 0x14af8
movq %rbx, %rdi
callq 0xb780
|
_ZN5ftxui7hcenterESt10shared_ptrINS_4NodeEE:
push r14
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+48h+var_20]; this
call _ZN5ftxui6fillerEv; ftxui::filler(void)
movups xmm0, xmmword ptr [r14]
xor eax, eax
mov [r14+8], rax
movaps [rsp+48h+var_48], xmm0
mov [r14], rax
lea rdi, [rsp+48h+var_30]; this
call _ZN5ftxui6fillerEv; ftxui::filler(void)
lea rsi, [rsp+48h+var_20]
mov rdx, rsp
lea rcx, [rsp+48h+var_30]
mov rdi, rbx
call _ZN5ftxui4hboxIJSt10shared_ptrINS_4NodeEES3_S3_EEES3_DpT_; ftxui::hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>)
mov rdi, [rsp+48h+var_28]
test rdi, rdi
jz short loc_2309E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2309E:
mov rdi, qword ptr [rsp+48h+var_48+8]
test rdi, rdi
jz short loc_230AD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_230AD:
mov rdi, [rsp+48h+var_18]
test rdi, rdi
jz short loc_230BC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_230BC:
mov rax, rbx
add rsp, 38h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_230DE
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_230DE
mov rbx, rax
loc_230DE:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_230ED
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_230ED:
mov rdi, [rsp+arg_28]
test rdi, rdi
jz short loc_230FC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_230FC:
mov rdi, rbx
call __Unwind_Resume
|
long long ftxui::hcenter(long long a1, __int128 *a2)
{
__int128 v2; // xmm0
int v3; // r8d
int v4; // r9d
__int128 v6; // [rsp+0h] [rbp-48h] BYREF
long long v7; // [rsp+10h] [rbp-38h]
int v8; // [rsp+18h] [rbp-30h] BYREF
volatile signed __int32 *v9; // [rsp+20h] [rbp-28h]
int v10; // [rsp+28h] [rbp-20h] BYREF
volatile signed __int32 *v11; // [rsp+30h] [rbp-18h]
ftxui::filler((ftxui *)&v10);
v2 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
v6 = v2;
*(_QWORD *)a2 = 0LL;
ftxui::filler((ftxui *)&v8);
ftxui::hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(
a1,
(unsigned int)&v10,
(unsigned int)&v6,
(unsigned int)&v8,
v3,
v4,
v6,
DWORD2(v6),
v7,
v8,
(long long)v9,
v10,
(char)v11);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
if ( *((_QWORD *)&v6 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v6 + 1));
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
return a1;
}
|
hcenter:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x28]
CALL 0x00123598
MOVUPS XMM0,xmmword ptr [R14]
XOR EAX,EAX
MOV qword ptr [R14 + 0x8],RAX
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [R14],RAX
LAB_00123070:
LEA RDI,[RSP + 0x18]
CALL 0x00123598
LAB_0012307a:
LEA RSI,[RSP + 0x28]
MOV RDX,RSP
LEA RCX,[RSP + 0x18]
MOV RDI,RBX
CALL 0x001232d5
LAB_0012308f:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0012309e
CALL 0x00114af8
LAB_0012309e:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001230ad
CALL 0x00114af8
LAB_001230ad:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001230bc
CALL 0x00114af8
LAB_001230bc:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* ftxui::hcenter(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::hcenter(ftxui *this,int8 *param_2)
{
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
ftxui local_30 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
ftxui local_20 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18;
filler(local_20);
local_48 = *param_2;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 00123070 to 00123079 has its CatchHandler @ 001230db */
filler(local_30);
/* try { // try from 0012307a to 0012308e has its CatchHandler @ 001230c7 */
hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>
(this,local_20,&local_48,local_30);
if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18);
}
return this;
}
|
|
57,371
|
simple_key_cache_read
|
eloqsql/mysys/mf_keycache.c
|
uchar *simple_key_cache_read(SIMPLE_KEY_CACHE_CB *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length __attribute__((unused)),
int return_buffer __attribute__((unused)))
{
my_bool locked_and_incremented= FALSE;
int error=0;
uchar *start= buff;
DBUG_ENTER("simple_key_cache_read");
DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u",
(uint) file, (ulong) filepos, length));
if (keycache->key_cache_inited)
{
/* Key cache is used */
reg1 BLOCK_LINK *block;
uint read_length;
uint offset;
int page_st;
if (MYSQL_KEYCACHE_READ_START_ENABLED())
{
MYSQL_KEYCACHE_READ_START(my_filename(file), length,
(ulong) (keycache->blocks_used *
keycache->key_cache_block_size),
(ulong) (keycache->blocks_unused *
keycache->key_cache_block_size));
}
/*
When the key cache is once initialized, we use the cache_lock to
reliably distinguish the cases of normal operation, resizing, and
disabled cache. We always increment and decrement
'cnt_for_resize_op' so that a resizer can wait for pending I/O.
*/
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
Cache resizing has two phases: Flushing and re-initializing. In
the flush phase read requests are allowed to bypass the cache for
blocks not in the cache. find_key_block() returns NULL in this
case.
After the flush phase new I/O requests must wait until the
re-initialization is done. The re-initialization can be done only
if no I/O request is in progress. The reason is that
key_cache_block_size can change. With enabled cache, I/O is done
in chunks of key_cache_block_size. Every chunk tries to use a
cache block first. If the block size changes in the middle, a
block could be missed and old data could be read.
*/
while (keycache->in_resize && !keycache->resize_in_flush)
wait_on_queue(&keycache->resize_queue, &keycache->cache_lock);
/* Register the I/O for the next resize. */
inc_counter_for_resize_op(keycache);
locked_and_incremented= TRUE;
/* Requested data may not always be aligned to cache blocks. */
offset= (uint) (filepos % keycache->key_cache_block_size);
/* Read data in key_cache_block_size increments */
do
{
/* Cache could be disabled in a later iteration. */
if (!keycache->can_be_used)
{
KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used"));
goto no_key_cache;
}
/* Start reading at the beginning of the cache block. */
filepos-= offset;
/* Do not read beyond the end of the cache block. */
read_length= length;
set_if_smaller(read_length, keycache->key_cache_block_size-offset);
KEYCACHE_DBUG_ASSERT(read_length > 0);
/* Request the cache block that matches file/pos. */
keycache->global_cache_r_requests++;
MYSQL_KEYCACHE_READ_BLOCK(keycache->key_cache_block_size);
block=find_key_block(keycache, file, filepos, level, 0, &page_st);
if (!block)
{
/*
This happens only for requests submitted during key cache
resize. The block is not in the cache and shall not go in.
Read directly from file.
*/
keycache->global_cache_read++;
keycache_pthread_mutex_unlock(&keycache->cache_lock);
error= (my_pread(file, (uchar*) buff, read_length,
filepos + offset, MYF(MY_NABP)) != 0);
keycache_pthread_mutex_lock(&keycache->cache_lock);
goto next_block;
}
if (!(block->status & BLOCK_ERROR))
{
if (page_st == PAGE_TO_BE_READ)
{
MYSQL_KEYCACHE_READ_MISS();
read_block_primary(keycache, block,
keycache->key_cache_block_size, read_length+offset);
}
else if (page_st == PAGE_WAIT_TO_BE_READ)
{
MYSQL_KEYCACHE_READ_MISS();
/* The requested page is to be read into the block buffer */
read_block_secondary(keycache, block);
/*
A secondary request must now have the block assigned to the
requested file block.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
}
else if (block->length < read_length + offset)
{
/*
Impossible if nothing goes wrong:
this could only happen if we are using a file with
small key blocks and are trying to read outside the file
*/
my_errno= -1;
block->status|= BLOCK_ERROR;
}
else
{
MYSQL_KEYCACHE_READ_HIT();
}
}
/* block status may have added BLOCK_ERROR in the above 'if'. */
if (!(block->status & BLOCK_ERROR))
{
{
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
#endif
/* Copy data from the cache buffer */
memcpy(buff, block->buffer+offset, (size_t) read_length);
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_lock(&keycache->cache_lock);
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
#endif
}
}
remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_read_block_error",
block->status|= BLOCK_ERROR;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/*
Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block.
*/
unreg_request(keycache, block, 1);
}
else
{
free_block(keycache, block);
error= 1;
break;
}
next_block:
buff+= read_length;
filepos+= read_length+offset;
offset= 0;
} while ((length-= read_length));
if (MYSQL_KEYCACHE_READ_DONE_ENABLED())
{
MYSQL_KEYCACHE_READ_DONE((ulong) (keycache->blocks_used *
keycache->key_cache_block_size),
(ulong) (keycache->blocks_unused *
keycache->key_cache_block_size));
}
goto end;
}
KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache not initialized"));
no_key_cache:
/* Key cache is not used */
keycache->global_cache_r_requests++;
keycache->global_cache_read++;
if (locked_and_incremented)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP)))
error= 1;
if (locked_and_incremented)
keycache_pthread_mutex_lock(&keycache->cache_lock);
end:
if (locked_and_incremented)
{
dec_counter_for_resize_op(keycache);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
}
DBUG_PRINT("exit", ("error: %d", error ));
DBUG_RETURN(error ? (uchar*) 0 : start);
}
|
O3
|
c
|
simple_key_cache_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movl %ecx, -0x6c(%rbp)
movq %rdx, %rcx
movq %rdi, %r13
cmpb $0x0, (%rdi)
je 0x9a258
movq %rcx, %r12
movl %r9d, -0x38(%rbp)
leaq 0xc0(%r13), %r15
cmpq $0x0, 0x100(%r13)
movl %esi, -0x34(%rbp)
jne 0x9a36f
movq %r15, %rdi
callq 0x291e0
movq %r14, -0x58(%rbp)
cmpb $0x0, 0x1(%r13)
je 0x9a00c
leaq 0x108(%r13), %rbx
cmpb $0x0, 0x2(%r13)
jne 0x9a00c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9a3e8
cmpb $0x0, 0x1(%r13)
jne 0x99ff3
movq %r15, -0x30(%rbp)
incq 0x70(%r13)
movl 0x18(%r13), %ecx
movq $0x0, -0x40(%rbp)
movq %r12, %r15
movq %r12, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r12
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x38(%rbp), %eax
movq %r13, -0x48(%rbp)
cmpb $0x0, 0x3(%r13)
je 0x9a292
movl %r12d, %ecx
movq %r15, %r14
movq %rcx, -0x60(%rbp)
subq %rcx, %r14
movl 0x18(%r13), %ebx
subl %r12d, %ebx
cmpl %ebx, %eax
movl %eax, -0x38(%rbp)
cmovbl %eax, %ebx
incq 0x150(%r13)
movq %r13, %rdi
movl -0x34(%rbp), %esi
movq %r14, %rdx
movl -0x6c(%rbp), %ecx
xorl %r8d, %r8d
leaq -0x70(%rbp), %r9
callq 0x9a479
movq %r13, %rcx
movq %rax, %r13
movl %ebx, %eax
movq %rax, -0x68(%rbp)
testq %r13, %r13
je 0x9a0cc
testb $0x1, 0x50(%r13)
jne 0x9a163
movl -0x70(%rbp), %eax
cmpl $0x2, %eax
je 0x9a137
cmpl $0x1, %eax
jne 0x9a149
movq -0x48(%rbp), %rdi
movl 0x18(%rdi), %edx
leal (%rbx,%r12), %ecx
movq %r13, %rsi
callq 0x9ac7a
jmp 0x9a163
movq %r15, -0x60(%rbp)
incq 0x158(%rcx)
movq 0x100(%rcx), %rdi
testq %rdi, %rdi
movq %rcx, %r13
jne 0x9a1fe
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x291b0
movl $0x4, %r8d
movl -0x34(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0xa32d8
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movq %rcx, -0x40(%rbp)
cmpq $0x0, 0x100(%r13)
jne 0x9a213
movq %r15, %rdi
callq 0x291e0
jmp 0x9a1da
movq %r13, %rdi
addq $0x28, %rdi
movq -0x30(%rbp), %rsi
callq 0x9a3e8
jmp 0x9a163
leal (%rbx,%r12), %eax
cmpl %eax, 0x4c(%r13)
jae 0x9a163
callq 0xa48d6
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
orb $0x1, 0x50(%r13)
testb $0x1, 0x50(%r13)
jne 0x9a1b3
movq -0x48(%rbp), %r15
movq 0x100(%r15), %rdi
testq %rdi, %rdi
jne 0x9a229
movq -0x30(%rbp), %rdi
callq 0x291b0
movq -0x60(%rbp), %rsi
addq 0x40(%r13), %rsi
movq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rdx
callq 0x29090
cmpq $0x0, 0x100(%r15)
jne 0x9a23e
movq -0x30(%rbp), %rdi
callq 0x291e0
movq %r13, %rdi
callq 0x9ad48
testb $0x1, 0x50(%r13)
jne 0x9a30c
movq -0x48(%rbp), %rdi
movq %r13, %rsi
movq %rdi, %r13
movl $0x1, %edx
callq 0x9ad90
movq -0x68(%rbp), %rax
addq %rax, -0x50(%rbp)
addl %ebx, %r12d
addq %r12, %r14
xorl %r12d, %r12d
movq %r14, %r15
movl -0x38(%rbp), %eax
subl %ebx, %eax
jne 0x9a03d
jmp 0x9a324
leaq 0x2eee5b(%rip), %rax # 0x389060
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9a0ea
movq %r15, %rdi
leaq 0x44247(%rip), %rsi # 0xde464
movl $0xb29, %edx # imm = 0xB29
callq 0x2ee5b
jmp 0x9a1da
leaq 0x2eee30(%rip), %rax # 0x389060
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9a17e
movq -0x30(%rbp), %rdi
leaq 0x4421b(%rip), %rsi # 0xde464
movl $0xb5e, %edx # imm = 0xB5E
callq 0x2ee5b
jmp 0x9a1b3
movdqu 0x150(%r13), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x150(%r13)
movl %r9d, %edx
movl $0x4, %r8d
movl %esi, %edi
movq %r14, %rsi
callq 0xa32d8
xorl %ebx, %ebx
testq %rax, %rax
setne %bl
jmp 0x9a358
movq %r15, %r14
movl %eax, %ebx
movdqu 0x150(%r13), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x150(%r13)
movq 0x100(%r13), %rdi
testq %rdi, %rdi
jne 0x9a39a
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x291b0
movl %ebx, %edx
movl $0x4, %r8d
movl -0x34(%rbp), %edi
movq -0x50(%rbp), %rsi
movq %r14, %rcx
callq 0xa32d8
testq %rax, %rax
movl $0x1, %ebx
cmovel -0x40(%rbp), %ebx
cmpq $0x0, 0x100(%r13)
movq -0x58(%rbp), %r14
jne 0x9a3af
movq %r15, %rdi
callq 0x291e0
jmp 0x9a332
movq -0x48(%rbp), %rdi
movq %r13, %rsi
movq %rdi, %r13
callq 0x9ae98
movl $0x1, %eax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl %eax, %ebx
movq -0x58(%rbp), %r14
movq -0x30(%rbp), %r15
decq 0x70(%r13)
jne 0x9a344
leaq 0x110(%r13), %rdi
callq 0x9b69d
movq 0x100(%r13), %rdi
testq %rdi, %rdi
jne 0x9a388
movq %r15, %rdi
callq 0x291b0
xorl %eax, %eax
testl %ebx, %ebx
cmoveq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x440ee(%rip), %rsi # 0xde464
movq %r15, %rdi
movl $0xaf2, %edx # imm = 0xAF2
callq 0x2ee5b
jmp 0x99fe1
leaq 0x2eecd1(%rip), %rax # 0x389060
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9a350
leaq 0x2eecbf(%rip), %rax # 0x389060
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9a2c1
leaq 0x440ae(%rip), %rsi # 0xde464
movq %r15, %rdi
movl $0xb96, %edx # imm = 0xB96
callq 0x2ee5b
jmp 0x9a332
|
simple_key_cache_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, r8
mov [rbp+var_6C], ecx
mov rcx, rdx
mov r13, rdi
cmp byte ptr [rdi], 0
jz loc_9A258
mov r12, rcx
mov [rbp+var_38], r9d
lea r15, [r13+0C0h]
cmp qword ptr [r13+100h], 0
mov [rbp+var_34], esi
jnz loc_9A36F
mov rdi, r15
call _pthread_mutex_lock
loc_99FE1:
mov [rbp+var_58], r14
cmp byte ptr [r13+1], 0
jz short loc_9A00C
lea rbx, [r13+108h]
loc_99FF3:
cmp byte ptr [r13+2], 0
jnz short loc_9A00C
mov rdi, rbx
mov rsi, r15
call wait_on_queue
cmp byte ptr [r13+1], 0
jnz short loc_99FF3
loc_9A00C:
mov [rbp+var_30], r15
inc qword ptr [r13+70h]
mov ecx, [r13+18h]
mov [rbp+var_40], 0
mov r15, r12
mov rax, r12
xor edx, edx
div rcx
mov r12, rdx
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
mov eax, [rbp+var_38]
mov [rbp+var_48], r13
loc_9A03D:
cmp byte ptr [r13+3], 0
jz loc_9A292
mov ecx, r12d
mov r14, r15
mov [rbp+var_60], rcx
sub r14, rcx
mov ebx, [r13+18h]
sub ebx, r12d
cmp eax, ebx
mov [rbp+var_38], eax
cmovb ebx, eax
inc qword ptr [r13+150h]
mov rdi, r13
mov esi, [rbp+var_34]
mov rdx, r14
mov ecx, [rbp+var_6C]
xor r8d, r8d
lea r9, [rbp+var_70]
call find_key_block
mov rcx, r13
mov r13, rax
mov eax, ebx
mov [rbp+var_68], rax
test r13, r13
jz short loc_9A0CC
test byte ptr [r13+50h], 1
jnz loc_9A163
mov eax, [rbp+var_70]
cmp eax, 2
jz loc_9A137
cmp eax, 1
jnz loc_9A149
mov rdi, [rbp+var_48]
mov edx, [rdi+18h]
lea ecx, [rbx+r12]
mov rsi, r13
call read_block_primary
jmp loc_9A163
loc_9A0CC:
mov [rbp+var_60], r15
inc qword ptr [rcx+158h]
mov rdi, [rcx+100h]
test rdi, rdi
mov r13, rcx
jnz loc_9A1FE
loc_9A0EA:
mov r15, [rbp+var_30]
mov rdi, r15
call _pthread_mutex_unlock
mov r8d, 4
mov edi, [rbp+var_34]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_68]
mov rcx, [rbp+var_60]
call my_pread
xor ecx, ecx
test rax, rax
setnz cl
mov [rbp+var_40], rcx
cmp qword ptr [r13+100h], 0
jnz loc_9A213
mov rdi, r15
call _pthread_mutex_lock
jmp loc_9A1DA
loc_9A137:
mov rdi, r13
add rdi, 28h ; '('
mov rsi, [rbp+var_30]
call wait_on_queue
jmp short loc_9A163
loc_9A149:
lea eax, [rbx+r12]
cmp [r13+4Ch], eax
jnb short loc_9A163
call _my_thread_var
mov dword ptr [rax], 0FFFFFFFFh
or byte ptr [r13+50h], 1
loc_9A163:
test byte ptr [r13+50h], 1
jnz short loc_9A1B3
mov r15, [rbp+var_48]
mov rdi, [r15+100h]
test rdi, rdi
jnz loc_9A229
loc_9A17E:
mov rdi, [rbp+var_30]
call _pthread_mutex_unlock
mov rsi, [rbp+var_60]
add rsi, [r13+40h]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_68]
call _memcpy
cmp qword ptr [r15+100h], 0
jnz loc_9A23E
mov rdi, [rbp+var_30]
call _pthread_mutex_lock
loc_9A1B3:
mov rdi, r13
call remove_reader
test byte ptr [r13+50h], 1
jnz loc_9A30C
mov rdi, [rbp+var_48]
mov rsi, r13
mov r13, rdi
mov edx, 1
call unreg_request_0
loc_9A1DA:
mov rax, [rbp+var_68]
add [rbp+var_50], rax
add r12d, ebx
add r14, r12
xor r12d, r12d
mov r15, r14
mov eax, [rbp+var_38]
sub eax, ebx
jnz loc_9A03D
jmp loc_9A324
loc_9A1FE:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_9A0EA
loc_9A213:
mov rdi, r15
lea rsi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B29h
call psi_mutex_lock
jmp short loc_9A1DA
loc_9A229:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_9A17E
loc_9A23E:
mov rdi, [rbp+var_30]
lea rsi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B5Eh
call psi_mutex_lock
jmp loc_9A1B3
loc_9A258:
movdqu xmm0, xmmword ptr [r13+150h]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword ptr [r13+150h], xmm0
mov edx, r9d
mov r8d, 4
mov edi, esi
mov rsi, r14
call my_pread
xor ebx, ebx
test rax, rax
setnz bl
jmp loc_9A358
loc_9A292:
mov r14, r15
mov ebx, eax
movdqu xmm0, xmmword ptr [r13+150h]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword ptr [r13+150h], xmm0
mov rdi, [r13+100h]
test rdi, rdi
jnz loc_9A39A
loc_9A2C1:
mov r15, [rbp+var_30]
mov rdi, r15
call _pthread_mutex_unlock
mov edx, ebx
mov r8d, 4
mov edi, [rbp+var_34]
mov rsi, [rbp+var_50]
mov rcx, r14
call my_pread
test rax, rax
mov ebx, 1
cmovz ebx, dword ptr [rbp+var_40]
cmp qword ptr [r13+100h], 0
mov r14, [rbp+var_58]
jnz loc_9A3AF
mov rdi, r15
call _pthread_mutex_lock
jmp short loc_9A332
loc_9A30C:
mov rdi, [rbp+var_48]
mov rsi, r13
mov r13, rdi
call free_block_0
mov eax, 1
mov [rbp+var_40], rax
loc_9A324:
mov rax, [rbp+var_40]
mov ebx, eax
mov r14, [rbp+var_58]
mov r15, [rbp+var_30]
loc_9A332:
dec qword ptr [r13+70h]
jnz short loc_9A344
lea rdi, [r13+110h]
call release_whole_queue
loc_9A344:
mov rdi, [r13+100h]
test rdi, rdi
jnz short loc_9A388
loc_9A350:
mov rdi, r15
call _pthread_mutex_unlock
loc_9A358:
xor eax, eax
test ebx, ebx
cmovz rax, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A36F:
lea rsi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov edx, 0AF2h
call psi_mutex_lock
jmp loc_99FE1
loc_9A388:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_9A350
loc_9A39A:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_9A2C1
loc_9A3AF:
lea rsi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov edx, 0B96h
call psi_mutex_lock
jmp loc_9A332
|
long long simple_key_cache_read(
const __m128i *a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned int a6)
{
long long v6; // r14
const __m128i *v7; // r13
bool v9; // zf
unsigned long long v10; // rcx
long long v11; // r15
unsigned long long v12; // r12
unsigned int v13; // eax
long long v14; // r14
unsigned int v15; // ebx
const __m128i *v16; // rdi
long long v17; // rsi
long long key_block; // rax
long long v19; // rdx
const __m128i *v20; // rcx
long long v21; // r13
long long v22; // r15
const __m128i *v23; // r15
long long v24; // rdi
long long v25; // rsi
long long v26; // r14
BOOL v27; // ebx
long long v28; // r14
unsigned int v29; // ebx
long long v30; // r15
long long v31; // rax
long long v32; // rsi
long long result; // rax
int v34; // [rsp+0h] [rbp-70h] BYREF
unsigned int v35; // [rsp+4h] [rbp-6Ch]
long long v36; // [rsp+8h] [rbp-68h]
long long v37; // [rsp+10h] [rbp-60h]
long long v38; // [rsp+18h] [rbp-58h]
long long v39; // [rsp+20h] [rbp-50h]
const __m128i *v40; // [rsp+28h] [rbp-48h]
_BOOL8 v41; // [rsp+30h] [rbp-40h]
unsigned int v42; // [rsp+38h] [rbp-38h]
unsigned int v43; // [rsp+3Ch] [rbp-34h]
const __m128i *v44; // [rsp+40h] [rbp-30h]
v6 = a5;
v35 = a4;
v7 = a1;
if ( a1->m128i_i8[0] )
{
v42 = a6;
v9 = a1[16].m128i_i64[0] == 0;
v43 = a2;
if ( v9 )
pthread_mutex_lock(&a1[12]);
else
psi_mutex_lock(
(long long)a1[12].m128i_i64,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xAF2u);
v38 = v6;
while ( a1->m128i_i8[1] )
{
if ( a1->m128i_i8[2] )
break;
wait_on_queue(&a1[16].m128i_u64[1], &a1[12]);
}
v44 = a1 + 12;
++a1[7].m128i_i64[0];
v10 = a1[1].m128i_u32[2];
v41 = 0LL;
v11 = a3;
v12 = a3 % v10;
v39 = v38;
v13 = v42;
v40 = a1;
while ( v7->m128i_i8[3] )
{
v37 = (unsigned int)v12;
v14 = v11 - (unsigned int)v12;
v15 = v7[1].m128i_i32[2] - v12;
v42 = v13;
if ( v13 < v15 )
v15 = v13;
++v7[21].m128i_i64[0];
v16 = v7;
v17 = v43;
key_block = find_key_block(v7, v43, v11 - (unsigned int)v12, v35, 0LL, &v34);
v20 = v7;
v21 = key_block;
v36 = v15;
if ( key_block )
{
if ( (*(_BYTE *)(key_block + 80) & 1) == 0 )
{
if ( v34 == 2 )
{
v17 = (long long)v44;
wait_on_queue(key_block + 40, v44);
}
else if ( v34 == 1 )
{
v17 = key_block;
read_block_primary(v40, key_block, v40[1].m128i_u32[2], v15 + (unsigned int)v12);
}
else if ( *(_DWORD *)(key_block + 76) < v15 + (unsigned int)v12 )
{
*(_DWORD *)my_thread_var(v16) = -1;
*(_BYTE *)(v21 + 80) |= 1u;
}
}
if ( (*(_BYTE *)(v21 + 80) & 1) == 0 )
{
v23 = v40;
v24 = v40[16].m128i_i64[0];
if ( v24 )
((void ( *)(long long, long long, long long, const __m128i *))PSI_server[44])(v24, v17, v19, v20);
pthread_mutex_unlock(v44);
v17 = *(_QWORD *)(v21 + 64) + v37;
memcpy(v39, v17, v36);
if ( v23[16].m128i_i64[0] )
{
v17 = (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c";
psi_mutex_lock(
(long long)v44,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xB5Eu);
}
else
{
pthread_mutex_lock(v44);
}
}
remove_reader(v21, v17, v19, v20);
if ( (*(_BYTE *)(v21 + 80) & 1) != 0 )
{
v32 = v21;
v7 = v40;
free_block_0(v40, v32);
v41 = 1LL;
LABEL_42:
v27 = v41;
v6 = v38;
v30 = (long long)v44;
goto LABEL_43;
}
v25 = v21;
v7 = v40;
unreg_request_0(v40, v25, 1LL);
}
else
{
v37 = v11;
++v20[21].m128i_i64[1];
v7 = v20;
if ( v20[16].m128i_i64[0] )
PSI_server[44]();
v22 = (long long)v44;
pthread_mutex_unlock(v44);
v41 = my_pread(v43, v39, v36, v37, 4LL) != 0;
if ( v7[16].m128i_i64[0] )
psi_mutex_lock(v22, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB29u);
else
pthread_mutex_lock(v22);
}
v39 += v36;
v26 = v15 + (unsigned int)v12 + v14;
LODWORD(v12) = 0;
v11 = v26;
v13 = v42 - v15;
if ( v42 == v15 )
goto LABEL_42;
}
v28 = v11;
v29 = v13;
v7[21] = _mm_sub_epi64(_mm_loadu_si128(v7 + 21), (__m128i)-1LL);
if ( v7[16].m128i_i64[0] )
PSI_server[44]();
v30 = (long long)v44;
pthread_mutex_unlock(v44);
v31 = my_pread(v43, v39, v29, v28, 4LL);
v27 = 1;
if ( !v31 )
v27 = v41;
v6 = v38;
if ( v7[16].m128i_i64[0] )
psi_mutex_lock(v30, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB96u);
else
pthread_mutex_lock(v30);
LABEL_43:
v9 = v7[7].m128i_i64[0]-- == 1;
if ( v9 )
release_whole_queue(&v7[17]);
if ( v7[16].m128i_i64[0] )
PSI_server[44]();
pthread_mutex_unlock(v30);
}
else
{
a1[21] = _mm_sub_epi64(_mm_loadu_si128(a1 + 21), (__m128i)-1LL);
v27 = my_pread(a2, a5, a6, a3, 4LL) != 0;
}
result = 0LL;
if ( !v27 )
return v6;
return result;
}
|
simple_key_cache_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,R8
MOV dword ptr [RBP + -0x6c],ECX
MOV RCX,RDX
MOV R13,RDI
CMP byte ptr [RDI],0x0
JZ 0x0019a258
MOV R12,RCX
MOV dword ptr [RBP + -0x38],R9D
LEA R15,[R13 + 0xc0]
CMP qword ptr [R13 + 0x100],0x0
MOV dword ptr [RBP + -0x34],ESI
JNZ 0x0019a36f
MOV RDI,R15
CALL 0x001291e0
LAB_00199fe1:
MOV qword ptr [RBP + -0x58],R14
CMP byte ptr [R13 + 0x1],0x0
JZ 0x0019a00c
LEA RBX,[R13 + 0x108]
LAB_00199ff3:
CMP byte ptr [R13 + 0x2],0x0
JNZ 0x0019a00c
MOV RDI,RBX
MOV RSI,R15
CALL 0x0019a3e8
CMP byte ptr [R13 + 0x1],0x0
JNZ 0x00199ff3
LAB_0019a00c:
MOV qword ptr [RBP + -0x30],R15
INC qword ptr [R13 + 0x70]
MOV ECX,dword ptr [R13 + 0x18]
MOV qword ptr [RBP + -0x40],0x0
MOV R15,R12
MOV RAX,R12
XOR EDX,EDX
DIV RCX
MOV R12,RDX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],R13
LAB_0019a03d:
CMP byte ptr [R13 + 0x3],0x0
JZ 0x0019a292
MOV ECX,R12D
MOV R14,R15
MOV qword ptr [RBP + -0x60],RCX
SUB R14,RCX
MOV EBX,dword ptr [R13 + 0x18]
SUB EBX,R12D
CMP EAX,EBX
MOV dword ptr [RBP + -0x38],EAX
CMOVC EBX,EAX
INC qword ptr [R13 + 0x150]
MOV RDI,R13
MOV ESI,dword ptr [RBP + -0x34]
MOV RDX,R14
MOV ECX,dword ptr [RBP + -0x6c]
XOR R8D,R8D
LEA R9,[RBP + -0x70]
CALL 0x0019a479
MOV RCX,R13
MOV R13,RAX
MOV EAX,EBX
MOV qword ptr [RBP + -0x68],RAX
TEST R13,R13
JZ 0x0019a0cc
TEST byte ptr [R13 + 0x50],0x1
JNZ 0x0019a163
MOV EAX,dword ptr [RBP + -0x70]
CMP EAX,0x2
JZ 0x0019a137
CMP EAX,0x1
JNZ 0x0019a149
MOV RDI,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RDI + 0x18]
LEA ECX,[RBX + R12*0x1]
MOV RSI,R13
CALL 0x0019ac7a
JMP 0x0019a163
LAB_0019a0cc:
MOV qword ptr [RBP + -0x60],R15
INC qword ptr [RCX + 0x158]
MOV RDI,qword ptr [RCX + 0x100]
TEST RDI,RDI
MOV R13,RCX
JNZ 0x0019a1fe
LAB_0019a0ea:
MOV R15,qword ptr [RBP + -0x30]
MOV RDI,R15
CALL 0x001291b0
MOV R8D,0x4
MOV EDI,dword ptr [RBP + -0x34]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x60]
CALL 0x001a32d8
XOR ECX,ECX
TEST RAX,RAX
SETNZ CL
MOV qword ptr [RBP + -0x40],RCX
CMP qword ptr [R13 + 0x100],0x0
JNZ 0x0019a213
MOV RDI,R15
CALL 0x001291e0
JMP 0x0019a1da
LAB_0019a137:
MOV RDI,R13
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0019a3e8
JMP 0x0019a163
LAB_0019a149:
LEA EAX,[RBX + R12*0x1]
CMP dword ptr [R13 + 0x4c],EAX
JNC 0x0019a163
CALL 0x001a48d6
MOV dword ptr [RAX],0xffffffff
OR byte ptr [R13 + 0x50],0x1
LAB_0019a163:
TEST byte ptr [R13 + 0x50],0x1
JNZ 0x0019a1b3
MOV R15,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [R15 + 0x100]
TEST RDI,RDI
JNZ 0x0019a229
LAB_0019a17e:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001291b0
MOV RSI,qword ptr [RBP + -0x60]
ADD RSI,qword ptr [R13 + 0x40]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x00129090
CMP qword ptr [R15 + 0x100],0x0
JNZ 0x0019a23e
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001291e0
LAB_0019a1b3:
MOV RDI,R13
CALL 0x0019ad48
TEST byte ptr [R13 + 0x50],0x1
JNZ 0x0019a30c
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,R13
MOV R13,RDI
MOV EDX,0x1
CALL 0x0019ad90
LAB_0019a1da:
MOV RAX,qword ptr [RBP + -0x68]
ADD qword ptr [RBP + -0x50],RAX
ADD R12D,EBX
ADD R14,R12
XOR R12D,R12D
MOV R15,R14
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,EBX
JNZ 0x0019a03d
JMP 0x0019a324
LAB_0019a1fe:
LEA RAX,[0x489060]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019a0ea
LAB_0019a213:
MOV RDI,R15
LEA RSI,[0x1de464]
MOV EDX,0xb29
CALL 0x0012ee5b
JMP 0x0019a1da
LAB_0019a229:
LEA RAX,[0x489060]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019a17e
LAB_0019a23e:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1de464]
MOV EDX,0xb5e
CALL 0x0012ee5b
JMP 0x0019a1b3
LAB_0019a258:
MOVDQU XMM0,xmmword ptr [R13 + 0x150]
PCMPEQD XMM1,XMM1
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [R13 + 0x150],XMM0
MOV EDX,R9D
MOV R8D,0x4
MOV EDI,ESI
MOV RSI,R14
CALL 0x001a32d8
XOR EBX,EBX
TEST RAX,RAX
SETNZ BL
JMP 0x0019a358
LAB_0019a292:
MOV R14,R15
MOV EBX,EAX
MOVDQU XMM0,xmmword ptr [R13 + 0x150]
PCMPEQD XMM1,XMM1
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [R13 + 0x150],XMM0
MOV RDI,qword ptr [R13 + 0x100]
TEST RDI,RDI
JNZ 0x0019a39a
LAB_0019a2c1:
MOV R15,qword ptr [RBP + -0x30]
MOV RDI,R15
CALL 0x001291b0
MOV EDX,EBX
MOV R8D,0x4
MOV EDI,dword ptr [RBP + -0x34]
MOV RSI,qword ptr [RBP + -0x50]
MOV RCX,R14
CALL 0x001a32d8
TEST RAX,RAX
MOV EBX,0x1
CMOVZ EBX,dword ptr [RBP + -0x40]
CMP qword ptr [R13 + 0x100],0x0
MOV R14,qword ptr [RBP + -0x58]
JNZ 0x0019a3af
MOV RDI,R15
CALL 0x001291e0
JMP 0x0019a332
LAB_0019a30c:
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,R13
MOV R13,RDI
CALL 0x0019ae98
MOV EAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_0019a324:
MOV RAX,qword ptr [RBP + -0x40]
MOV EBX,EAX
MOV R14,qword ptr [RBP + -0x58]
MOV R15,qword ptr [RBP + -0x30]
LAB_0019a332:
DEC qword ptr [R13 + 0x70]
JNZ 0x0019a344
LEA RDI,[R13 + 0x110]
CALL 0x0019b69d
LAB_0019a344:
MOV RDI,qword ptr [R13 + 0x100]
TEST RDI,RDI
JNZ 0x0019a388
LAB_0019a350:
MOV RDI,R15
CALL 0x001291b0
LAB_0019a358:
XOR EAX,EAX
TEST EBX,EBX
CMOVZ RAX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a36f:
LEA RSI,[0x1de464]
MOV RDI,R15
MOV EDX,0xaf2
CALL 0x0012ee5b
JMP 0x00199fe1
LAB_0019a388:
LEA RAX,[0x489060]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019a350
LAB_0019a39a:
LEA RAX,[0x489060]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019a2c1
LAB_0019a3af:
LEA RSI,[0x1de464]
MOV RDI,R15
MOV EDX,0xb96
CALL 0x0012ee5b
JMP 0x0019a332
|
void * simple_key_cache_read
(char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5,
uint param_6)
{
long *plVar1;
uint uVar2;
char *pcVar3;
uint uVar4;
long lVar5;
int4 *puVar6;
void *pvVar7;
ulong uVar8;
ulong uVar9;
int iVar10;
pthread_mutex_t *ppVar11;
int local_78;
int4 local_74;
ulong local_70;
ulong local_68;
void *local_60;
void *local_58;
char *local_50;
ulong local_48;
uint local_40;
int4 local_3c;
pthread_mutex_t *local_38;
local_74 = param_4;
if (*param_1 == '\0') {
*(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1;
*(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1;
lVar5 = my_pread(param_2,param_5,param_6,param_3,4);
uVar4 = (uint)(lVar5 != 0);
}
else {
ppVar11 = (pthread_mutex_t *)(param_1 + 0xc0);
local_40 = param_6;
local_3c = param_2;
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(ppVar11);
}
else {
psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xaf2);
}
local_60 = param_5;
if (param_1[1] != '\0') {
do {
if (param_1[2] != '\0') break;
wait_on_queue(param_1 + 0x108,ppVar11);
} while (param_1[1] != '\0');
}
*(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + 1;
local_48 = 0;
uVar8 = param_3 % (ulong)*(uint *)(param_1 + 0x18);
local_58 = local_60;
uVar4 = local_40;
local_50 = param_1;
local_38 = ppVar11;
do {
if (param_1[3] == '\0') {
*(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1;
*(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1;
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
ppVar11 = local_38;
pthread_mutex_unlock(local_38);
lVar5 = my_pread(local_3c,local_58,uVar4,param_3,4);
param_5 = local_60;
uVar4 = 1;
if (lVar5 == 0) {
uVar4 = (uint)local_48;
}
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(ppVar11);
}
else {
psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb96);
}
goto LAB_0019a332;
}
iVar10 = (int)uVar8;
uVar2 = *(int *)(param_1 + 0x18) - iVar10;
if (uVar4 < (uint)(*(int *)(param_1 + 0x18) - iVar10)) {
uVar2 = uVar4;
}
uVar9 = (ulong)uVar2;
*(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1;
local_68 = uVar8;
local_40 = uVar4;
lVar5 = find_key_block(param_1,local_3c,param_3 - uVar8,local_74,0,&local_78);
local_70 = uVar9;
if (lVar5 == 0) {
*(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1;
local_68 = param_3;
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
ppVar11 = local_38;
pthread_mutex_unlock(local_38);
lVar5 = my_pread(local_3c,local_58,local_70,local_68);
local_48 = (ulong)(lVar5 != 0);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(ppVar11);
}
else {
psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb29);
}
}
else {
if ((*(byte *)(lVar5 + 0x50) & 1) == 0) {
if (local_78 == 2) {
wait_on_queue(lVar5 + 0x28,local_38);
}
else if (local_78 == 1) {
read_block_primary(local_50,lVar5,*(int4 *)(local_50 + 0x18),uVar2 + iVar10);
}
else if (*(uint *)(lVar5 + 0x4c) < uVar2 + iVar10) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0xffffffff;
*(byte *)(lVar5 + 0x50) = *(byte *)(lVar5 + 0x50) | 1;
}
}
pcVar3 = local_50;
if ((*(byte *)(lVar5 + 0x50) & 1) == 0) {
if (*(long *)(local_50 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(local_38);
memcpy(local_58,(void *)(local_68 + *(long *)(lVar5 + 0x40)),local_70);
if (*(long *)(pcVar3 + 0x100) == 0) {
pthread_mutex_lock(local_38);
}
else {
psi_mutex_lock(local_38,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb5e);
}
}
remove_reader(lVar5);
param_1 = local_50;
if ((*(byte *)(lVar5 + 0x50) & 1) != 0) {
free_block(local_50,lVar5);
local_48 = 1;
break;
}
unreg_request(local_50,lVar5,1);
}
local_58 = (void *)((long)local_58 + local_70);
param_3 = (param_3 - uVar8) + (ulong)(iVar10 + uVar2);
uVar8 = 0;
uVar4 = local_40 - uVar2;
} while (uVar4 != 0);
uVar4 = (uint)local_48;
param_5 = local_60;
ppVar11 = local_38;
LAB_0019a332:
plVar1 = (long *)(param_1 + 0x70);
*plVar1 = *plVar1 + -1;
if (*plVar1 == 0) {
release_whole_queue(param_1 + 0x110);
}
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar11);
}
pvVar7 = (void *)0x0;
if (uVar4 == 0) {
pvVar7 = param_5;
}
return pvVar7;
}
|
|
57,372
|
my_wildcmp_bin_impl
|
eloqsql/strings/ctype-bin.c
|
static
int my_wildcmp_bin_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return(str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return(result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return(-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* match if w_many is last */
if (str == str_end)
return(-1);
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
INC_PTR(cs,wildstr,wildend); /* This is compared through cmp */
cmp=likeconv(cs,cmp);
do
{
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
str++;
if (str++ == str_end)
return(-1);
{
int tmp=my_wildcmp_bin_impl(cs,str,str_end,wildstr,wildend,escape,w_one,
w_many, recurse_level + 1);
if (tmp <= 0)
return(tmp);
}
} while (str != str_end);
return(-1);
}
}
return(str != str_end ? 1 : 0);
}
|
O0
|
c
|
my_wildcmp_bin_impl:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
leaq 0x363d69(%rip), %rax # 0x3f9420
cmpq $0x0, (%rax)
je 0x956dd
leaq 0x363d5c(%rip), %rax # 0x3f9420
movq (%rax), %rax
movl 0x20(%rbp), %edi
callq *%rax
cmpl $0x0, %eax
je 0x956dd
movl $0x1, -0x4(%rbp)
jmp 0x959da
jmp 0x956df
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x959c2
jmp 0x956ef
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl 0x18(%rbp), %ecx
movb %al, -0x41(%rbp)
je 0x95710
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x9571c
jmp 0x957ae
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl -0x34(%rbp), %eax
jne 0x95742
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
je 0x95742
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x95774
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x95780
movl $0x1, -0x4(%rbp)
jmp 0x959da
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x957a2
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x959da
movl $0x1, -0x38(%rbp)
jmp 0x956ef
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
jne 0x9581c
jmp 0x957bc
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x957d1
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x959da
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0x95804
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
sete %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x957bc
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x9581a
jmp 0x959c2
jmp 0x9581c
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x18(%rbp), %eax
jne 0x959bd
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x95890
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x18(%rbp), %eax
jne 0x95850
jmp 0x95882
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
jne 0x95880
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x95872
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x959da
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x95882
jmp 0x95890
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x95838
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x958a6
movl $0x0, -0x4(%rbp)
jmp 0x959da
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x958bc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x959da
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x39(%rbp)
movzbl %al, %eax
cmpl -0x34(%rbp), %eax
jne 0x958f0
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
je 0x958f0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb 0x1(%rax), %al
movb %al, -0x39(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movb -0x39(%rbp), %al
movb %al, -0x39(%rbp)
jmp 0x95904
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x43(%rbp)
je 0x95926
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movzbl -0x39(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x43(%rbp)
movb -0x43(%rbp), %al
testb $0x1, %al
jne 0x9592f
jmp 0x9593d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x95904
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq -0x20(%rbp), %rax
jne 0x9595b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x959da
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
addl $0x1, %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x95680
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x959a4
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x959da
jmp 0x959a6
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x95902
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x959da
jmp 0x956df
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_wildcmp_bin_impl:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_10]
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov [rbp+var_38], 0FFFFFFFFh
lea rax, my_string_stack_guard
cmp qword ptr [rax], 0
jz short loc_956DD
lea rax, my_string_stack_guard
mov rax, [rax]
mov edi, [rbp+arg_10]
call rax
cmp eax, 0
jz short loc_956DD
mov [rbp+var_4], 1
jmp loc_959DA
loc_956DD:
jmp short $+2
loc_956DF:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz loc_959C2
jmp short $+2
loc_956EF:
mov rax, [rbp+var_28]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, [rbp+arg_8]
mov [rbp+var_41], al
jz short loc_95710
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
setnz al
mov [rbp+var_41], al
loc_95710:
mov al, [rbp+var_41]
test al, 1
jnz short loc_9571C
jmp loc_957AE
loc_9571C:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+var_34]
jnz short loc_95742
mov rax, [rbp+var_28]
add rax, 1
cmp rax, [rbp+var_30]
jz short loc_95742
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_95742:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jz short loc_95774
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 1
mov [rbp+var_18], rdx
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_95780
loc_95774:
mov [rbp+var_4], 1
jmp loc_959DA
loc_95780:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_957A2
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
setnz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_959DA
loc_957A2:
mov [rbp+var_38], 1
jmp loc_956EF
loc_957AE:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
jnz short loc_9581C
jmp short $+2
loc_957BC:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_957D1
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp loc_959DA
loc_957D1:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
add rcx, 1
mov [rbp+var_28], rcx
xor eax, eax
cmp rcx, [rbp+var_30]
mov [rbp+var_42], al
jnb short loc_95804
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
setz al
mov [rbp+var_42], al
loc_95804:
mov al, [rbp+var_42]
test al, 1
jnz short loc_957BC
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_9581A
jmp loc_959C2
loc_9581A:
jmp short $+2
loc_9581C:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_8]
jnz loc_959BD
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_95838:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz short loc_95890
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_8]
jnz short loc_95850
jmp short loc_95882
loc_95850:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
jnz short loc_95880
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_95872
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_959DA
loc_95872:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_95882
loc_95880:
jmp short loc_95890
loc_95882:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_95838
loc_95890:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_958A6
mov [rbp+var_4], 0
jmp loc_959DA
loc_958A6:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_958BC
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_959DA
loc_958BC:
mov rax, [rbp+var_28]
mov al, [rax]
mov [rbp+var_39], al
movzx eax, al
cmp eax, [rbp+var_34]
jnz short loc_958F0
mov rax, [rbp+var_28]
add rax, 1
cmp rax, [rbp+var_30]
jz short loc_958F0
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov al, [rax+1]
mov [rbp+var_39], al
loc_958F0:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov al, [rbp+var_39]
mov [rbp+var_39], al
loc_95902:
jmp short $+2
loc_95904:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_43], al
jz short loc_95926
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
movzx ecx, [rbp+var_39]
cmp eax, ecx
setnz al
mov [rbp+var_43], al
loc_95926:
mov al, [rbp+var_43]
test al, 1
jnz short loc_9592F
jmp short loc_9593D
loc_9592F:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_95904
loc_9593D:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
cmp rax, [rbp+var_20]
jnz short loc_9595B
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_959DA
loc_9595B:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_34]
mov r11d, [rbp+arg_0]
mov r10d, [rbp+arg_8]
mov eax, [rbp+arg_10]
add eax, 1
mov [rsp+60h+var_60], r11d
mov [rsp+60h+var_58], r10d
mov [rsp+60h+var_50], eax
call my_wildcmp_bin_impl
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_959A4
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
jmp short loc_959DA
loc_959A4:
jmp short $+2
loc_959A6:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz loc_95902
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_959DA
loc_959BD:
jmp loc_956DF
loc_959C2:
mov rdx, [rbp+var_18]
mov rsi, [rbp+var_20]
xor eax, eax
mov ecx, 1
cmp rdx, rsi
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_959DA:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long my_wildcmp_bin_impl(
int a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
char *v9; // rax
unsigned __int8 *v10; // rcx
char *v11; // rax
unsigned __int8 *v12; // rax
bool v14; // [rsp+1Dh] [rbp-43h]
bool v15; // [rsp+1Eh] [rbp-42h]
bool v16; // [rsp+1Fh] [rbp-41h]
int v17; // [rsp+20h] [rbp-40h]
unsigned __int8 v18; // [rsp+27h] [rbp-39h]
unsigned int v19; // [rsp+28h] [rbp-38h]
char *i; // [rsp+38h] [rbp-28h]
int v24; // [rsp+38h] [rbp-28h]
v19 = -1;
if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) )
{
return 1;
}
else
{
do
{
if ( a4 != a5 )
{
while ( 1 )
{
v16 = 0;
if ( *a4 != a8 )
v16 = *a4 != a7;
if ( !v16 )
break;
if ( *a4 == a6 && a4 + 1 != a5 )
++a4;
if ( a2 == a3 )
return 1;
v9 = a4++;
v10 = a2++;
if ( *v9 != (char)*v10 )
return 1;
if ( a4 == a5 )
return a2 != a3;
v19 = 1;
}
if ( *a4 != a7 )
continue;
do
{
if ( a2 == a3 )
return v19;
++a2;
++a4;
v15 = 0;
if ( a4 < a5 )
v15 = *a4 == a7;
}
while ( v15 );
if ( a4 != a5 )
continue;
}
return a2 != a3;
}
while ( *a4 != a8 );
for ( i = a4 + 1; i != a5; ++i )
{
if ( *i != a8 )
{
if ( *i != a7 )
break;
if ( a2 == a3 )
return (unsigned int)-1;
++a2;
}
}
if ( i == a5 )
{
return 0;
}
else if ( a2 == a3 )
{
return (unsigned int)-1;
}
else
{
v18 = *i;
if ( (unsigned __int8)*i == a6 && i + 1 != a5 )
{
v11 = i;
LODWORD(i) = (_DWORD)i + 1;
v18 = v11[1];
}
v24 = (_DWORD)i + 1;
do
{
while ( 1 )
{
v14 = 0;
if ( a2 != a3 )
v14 = *a2 != v18;
if ( !v14 )
break;
++a2;
}
v12 = a2++;
if ( v12 == a3 )
return (unsigned int)-1;
v17 = my_wildcmp_bin_impl(a1, (_DWORD)a2, (_DWORD)a3, v24, (_DWORD)a5, a6, a7, a8, a9 + 1);
if ( v17 <= 0 )
return (unsigned int)v17;
}
while ( a2 != a3 );
return (unsigned int)-1;
}
}
}
|
my_wildcmp_bin_impl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
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 qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV dword ptr [RBP + -0x38],0xffffffff
LEA RAX,[0x4f9420]
CMP qword ptr [RAX],0x0
JZ 0x001956dd
LEA RAX,[0x4f9420]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
CMP EAX,0x0
JZ 0x001956dd
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001959da
LAB_001956dd:
JMP 0x001956df
LAB_001956df:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001959c2
JMP 0x001956ef
LAB_001956ef:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,dword ptr [RBP + 0x18]
MOV byte ptr [RBP + -0x41],AL
JZ 0x00195710
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_00195710:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0019571c
JMP 0x001957ae
LAB_0019571c:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x00195742
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x00195742
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_00195742:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00195774
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOVSX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x00195780
LAB_00195774:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001959da
LAB_00195780:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001957a2
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001959da
LAB_001957a2:
MOV dword ptr [RBP + -0x38],0x1
JMP 0x001956ef
LAB_001957ae:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
JNZ 0x0019581c
JMP 0x001957bc
LAB_001957bc:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001957d1
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001959da
LAB_001957d1:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x30]
MOV byte ptr [RBP + -0x42],AL
JNC 0x00195804
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
SETZ AL
MOV byte ptr [RBP + -0x42],AL
LAB_00195804:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x001957bc
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0019581a
JMP 0x001959c2
LAB_0019581a:
JMP 0x0019581c
LAB_0019581c:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x18]
JNZ 0x001959bd
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_00195838:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x00195890
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x18]
JNZ 0x00195850
JMP 0x00195882
LAB_00195850:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
JNZ 0x00195880
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00195872
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001959da
LAB_00195872:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00195882
LAB_00195880:
JMP 0x00195890
LAB_00195882:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00195838
LAB_00195890:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001958a6
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001959da
LAB_001958a6:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001958bc
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001959da
LAB_001958bc:
MOV RAX,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x39],AL
MOVZX EAX,AL
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x001958f0
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001958f0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV AL,byte ptr [RAX + 0x1]
MOV byte ptr [RBP + -0x39],AL
LAB_001958f0:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV AL,byte ptr [RBP + -0x39]
MOV byte ptr [RBP + -0x39],AL
LAB_00195902:
JMP 0x00195904
LAB_00195904:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x43],AL
JZ 0x00195926
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOVZX ECX,byte ptr [RBP + -0x39]
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RBP + -0x43],AL
LAB_00195926:
MOV AL,byte ptr [RBP + -0x43]
TEST AL,0x1
JNZ 0x0019592f
JMP 0x0019593d
LAB_0019592f:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00195904
LAB_0019593d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0019595b
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001959da
LAB_0019595b:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x34]
MOV R11D,dword ptr [RBP + 0x10]
MOV R10D,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP],R11D
MOV dword ptr [RSP + 0x8],R10D
MOV dword ptr [RSP + 0x10],EAX
CALL 0x00195680
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x001959a4
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001959da
LAB_001959a4:
JMP 0x001959a6
LAB_001959a6:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00195902
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001959da
LAB_001959bd:
JMP 0x001956df
LAB_001959c2:
MOV RDX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,RSI
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001959da:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
uint my_wildcmp_bin_impl(int8 param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,
uint param_6,int param_7,int param_8,int param_9)
{
int iVar1;
uint uVar2;
byte *pbVar3;
bool bVar4;
byte local_41;
uint local_40;
byte *local_30;
byte *local_20;
uint local_c;
local_40 = 0xffffffff;
local_30 = param_4;
local_20 = param_2;
if ((my_string_stack_guard == (code *)0x0) ||
(iVar1 = (*my_string_stack_guard)(param_9), iVar1 == 0)) {
do {
if (local_30 == param_5) {
LAB_001959c2:
return (uint)(local_20 != param_3);
}
while( true ) {
bVar4 = false;
if ((char)*local_30 != param_8) {
bVar4 = (char)*local_30 != param_7;
}
if (!bVar4) break;
if (((int)(char)*local_30 == param_6) && (local_30 + 1 != param_5)) {
local_30 = local_30 + 1;
}
if (local_20 == param_3) {
return 1;
}
if (*local_30 != *local_20) {
return 1;
}
if (local_30 + 1 == param_5) {
return (uint)(local_20 + 1 != param_3);
}
local_40 = 1;
local_30 = local_30 + 1;
local_20 = local_20 + 1;
}
if ((char)*local_30 == param_7) {
do {
if (local_20 == param_3) {
return local_40;
}
local_20 = local_20 + 1;
local_30 = local_30 + 1;
bVar4 = false;
if (local_30 < param_5) {
bVar4 = (char)*local_30 == param_7;
}
} while (bVar4);
if (local_30 == param_5) goto LAB_001959c2;
}
} while ((char)*local_30 != param_8);
while (pbVar3 = local_30, local_30 = pbVar3 + 1, local_30 != param_5) {
if ((char)*local_30 != param_8) {
if ((char)*local_30 != param_7) break;
if (local_20 == param_3) {
return 0xffffffff;
}
local_20 = local_20 + 1;
}
}
if (local_30 == param_5) {
local_c = 0;
}
else if (local_20 == param_3) {
local_c = 0xffffffff;
}
else {
local_41 = *local_30;
if ((local_41 == param_6) && (pbVar3 + 2 != param_5)) {
local_30 = pbVar3 + 2;
local_41 = pbVar3[2];
}
do {
while( true ) {
bVar4 = false;
if (local_20 != param_3) {
bVar4 = *local_20 != local_41;
}
if (!bVar4) break;
local_20 = local_20 + 1;
}
pbVar3 = local_20 + 1;
if (local_20 == param_3) {
return 0xffffffff;
}
uVar2 = my_wildcmp_bin_impl(param_1,pbVar3,param_3,local_30 + 1,param_5,param_6,param_7,
param_8,param_9 + 1);
if ((int)uVar2 < 1) {
return uVar2;
}
local_20 = pbVar3;
} while (pbVar3 != param_3);
local_c = 0xffffffff;
}
}
else {
local_c = 1;
}
return local_c;
}
|
|
57,373
|
stop_waiting
|
eloqsql/mysys/waiting_threads.c
|
static int stop_waiting(WT_THD *thd)
{
int ret;
WT_RESOURCE *rc= thd->waiting_for;
DBUG_ENTER("stop_waiting");
if (!rc)
DBUG_RETURN(WT_OK);
/*
nobody's trying to free the resource now,
as its waiter_count is guaranteed to be non-zero
*/
rc_wrlock(rc);
ret= stop_waiting_locked(thd);
DBUG_RETURN(ret);
}
|
O3
|
c
|
stop_waiting:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0xc6f21
addq $0x18, %rdi
callq 0xc3e11
movq 0x28(%rbx), %rsi
decl 0x10(%rsi)
movq $0x0, 0x28(%rbx)
movq %rbx, %rdi
callq 0xc7265
cmpb $0x0, 0x60(%rbx)
setne %cl
testl %eax, %eax
setne %al
orb %cl, %al
movzbl %al, %eax
negl %eax
jmp 0xc6f23
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
stop_waiting:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+28h]
test rdi, rdi
jz short loc_C6F21
add rdi, 18h
call my_rw_wrlock
mov rsi, [rbx+28h]
dec dword ptr [rsi+10h]
mov qword ptr [rbx+28h], 0
mov rdi, rbx
call unlock_lock_and_free_resource
cmp byte ptr [rbx+60h], 0
setnz cl
test eax, eax
setnz al
or al, cl
movzx eax, al
neg eax
jmp short loc_C6F23
loc_C6F21:
xor eax, eax
loc_C6F23:
add rsp, 8
pop rbx
pop rbp
retn
|
long long stop_waiting(long long a1)
{
long long v2; // rdi
v2 = *(_QWORD *)(a1 + 40);
if ( !v2 )
return 0LL;
my_rw_wrlock(v2 + 24);
--*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL);
*(_QWORD *)(a1 + 40) = 0LL;
return (unsigned int)-((*(_BYTE *)(a1 + 96) != 0) | ((unsigned int)unlock_lock_and_free_resource(a1) != 0));
}
|
stop_waiting:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x28]
TEST RDI,RDI
JZ 0x001c6f21
ADD RDI,0x18
CALL 0x001c3e11
MOV RSI,qword ptr [RBX + 0x28]
DEC dword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x28],0x0
MOV RDI,RBX
CALL 0x001c7265
CMP byte ptr [RBX + 0x60],0x0
SETNZ CL
TEST EAX,EAX
SETNZ AL
OR AL,CL
MOVZX EAX,AL
NEG EAX
JMP 0x001c6f23
LAB_001c6f21:
XOR EAX,EAX
LAB_001c6f23:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int stop_waiting(long param_1)
{
int *piVar1;
int iVar2;
if (*(long *)(param_1 + 0x28) == 0) {
iVar2 = 0;
}
else {
my_rw_wrlock(*(long *)(param_1 + 0x28) + 0x18);
piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10);
*piVar1 = *piVar1 + -1;
*(int8 *)(param_1 + 0x28) = 0;
iVar2 = unlock_lock_and_free_resource(param_1);
iVar2 = -(uint)(iVar2 != 0 || *(char *)(param_1 + 0x60) != '\0');
}
return iVar2;
}
|
|
57,374
|
l_find(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned long, CURSOR*, LF_PINS*, char (*)(void*, void*))
|
eloqsql/mysys/lf_hash.cc
|
static int l_find(LF_SLIST **head, CHARSET_INFO *cs, uint32 hashnr,
const uchar *key, size_t keylen, CURSOR *cursor, LF_PINS *pins,
my_hash_walk_action callback)
{
uint32 cur_hashnr;
const uchar *cur_key;
size_t cur_keylen;
intptr link;
DBUG_ASSERT(!cs || !callback); /* should not be set both */
DBUG_ASSERT(!keylen || !callback); /* should not be set both */
retry:
cursor->prev= (intptr *) my_assume_aligned<sizeof(intptr)>(head);
do { /* PTR() isn't necessary below, head is a dummy node */
cursor->curr= my_assume_aligned<sizeof(LF_SLIST *)>((LF_SLIST *)(*cursor->prev));
lf_pin(pins, 1, cursor->curr);
} while (my_atomic_loadptr(
(void **)my_assume_aligned<sizeof(LF_SLIST *)>(cursor->prev))
!= cursor->curr && LF_BACKOFF());
for (;;)
{
if (unlikely(!cursor->curr))
return 0; /* end of the list */
cur_hashnr= cursor->curr->hashnr;
cur_keylen= cursor->curr->keylen;
/* The key element needs to be aligned, not necessary what it points to */
my_assume_aligned<sizeof(const uchar *)>(&cursor->curr->key);
cur_key= (const uchar *) my_atomic_loadptr_explicit((void **) &cursor->curr->key,
MY_MEMORY_ORDER_ACQUIRE);
do {
/* attempting to my_assume_aligned onlink below broke the implementation */
link= (intptr) my_atomic_loadptr_explicit((void **) &cursor->curr->link,
MY_MEMORY_ORDER_RELAXED);
cursor->next= my_assume_aligned<sizeof(LF_SLIST *)>(PTR(link));
lf_pin(pins, 0, cursor->next);
} while (link != (intptr) my_atomic_loadptr((void *volatile *) &cursor->curr->link)
&& LF_BACKOFF());
if (!DELETED(link))
{
if (unlikely(callback))
{
if (cur_hashnr & 1 && callback(cursor->curr + 1, (void*)key))
return 1;
}
else if (cur_hashnr >= hashnr)
{
int r= 1;
if (cur_hashnr > hashnr ||
(r= my_strnncoll(cs, cur_key, cur_keylen, key, keylen)) >= 0)
return !r;
}
cursor->prev= &(cursor->curr->link);
if (!(cur_hashnr & 1)) /* dummy node */
head= (LF_SLIST **)cursor->prev;
lf_pin(pins, 2, cursor->curr);
}
else
{
/*
we found a deleted node - be nice, help the other thread
and remove this deleted node
*/
if (my_atomic_casptr((void **) cursor->prev,
(void **) &cursor->curr, cursor->next) && LF_BACKOFF())
lf_alloc_free(pins, cursor->curr);
else
goto retry;
}
cursor->curr= cursor->next;
lf_pin(pins, 1, cursor->curr);
}
}
|
O0
|
cpp
|
l_find(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned long, CURSOR*, LF_PINS*, char (*)(void*, void*)):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
jmp 0xfdbbc
jmp 0xfdbbe
jmp 0xfdbc0
jmp 0xfdbc2
movq -0x10(%rbp), %rdi
callq 0xfdff0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0xfe000
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xfdbf1
jmp 0xfdbf3
movq 0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
xchgq %rax, 0x8(%rcx)
jmp 0xfdc0d
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0xfe010
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rcx
movq -0x38(%rbp), %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0xb1(%rbp)
je 0xfdc47
callq 0xfe020
cmpl $0x0, %eax
setne %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0xfdbd5
jmp 0xfdc53
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xfdc77
movl $0x0, -0x4(%rbp)
jmp 0xfdf21
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x18(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
callq 0xfe060
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
andq $-0x2, %rdi
callq 0xfe000
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0xfdcef
jmp 0xfdcf1
movq 0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
xchgq %rax, (%rcx)
jmp 0xfdd0a
movq -0x58(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xb2(%rbp)
je 0xfdd45
callq 0xfe020
cmpl $0x0, %eax
setne %al
movb %al, -0xb2(%rbp)
movb -0xb2(%rbp), %al
testb $0x1, %al
jne 0xfdcbe
movq -0x58(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0xfde57
cmpq $0x0, 0x18(%rbp)
je 0xfdd9f
movl -0x3c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xfdd9d
movq 0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rdi
addq $0x20, %rdi
movq -0x28(%rbp), %rsi
callq *%rax
cmpb $0x0, %al
je 0xfdd9d
movl $0x1, -0x4(%rbp)
jmp 0xfdf21
jmp 0xfde09
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jb 0xfde07
movl $0x1, -0x8c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
ja 0xfddec
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
xorl %r9d, %r9d
callq *%rax
movl %eax, -0x8c(%rbp)
cmpl $0x0, %eax
jl 0xfde05
cmpl $0x0, -0x8c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0xfdf21
jmp 0xfde07
jmp 0xfde09
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xfde2e
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xfde30
jmp 0xfde32
jmp 0xfde34
movq 0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
xchgq %rax, 0x10(%rcx)
jmp 0xfdeea
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0xd0(%rbp)
movq (%rax), %rcx
movq 0x10(%rax), %rdx
movq %rdx, -0xa0(%rbp)
movq 0x8(%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0xc1(%rbp)
movq %rcx, -0xc0(%rbp)
testb $0x1, %al
jne 0xfdeaf
movq -0xd0(%rbp), %rax
movq -0xc0(%rbp), %rcx
movq %rcx, (%rax)
movb -0xc1(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
testb $0x1, -0xa1(%rbp)
je 0xfdee3
callq 0xfe020
cmpl $0x0, %eax
je 0xfdee3
movq 0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xfc120
jmp 0xfdee8
jmp 0xfdbc2
jmp 0xfdeea
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xfdefc
jmp 0xfdefe
movq 0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
xchgq %rax, 0x8(%rcx)
jmp 0xfdc53
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
jmp short $+2
loc_FDBBC:
jmp short $+2
loc_FDBBE:
jmp short $+2
loc_FDBC0:
jmp short $+2
loc_FDBC2:
mov rdi, [rbp+var_10]
call _ZL17my_assume_alignedILm8EPP8LF_SLISTET0_S3_; my_assume_aligned<8ul,LF_SLIST **>(LF_SLIST **)
mov rcx, rax
mov rax, [rbp+var_38]
mov [rax], rcx
loc_FDBD5:
mov rax, [rbp+var_38]
mov rax, [rax]
mov rdi, [rax]
call _ZL17my_assume_alignedILm8EP8LF_SLISTET0_S2_; my_assume_aligned<8ul,LF_SLIST *>(LF_SLIST *)
mov rcx, rax
mov rax, [rbp+var_38]
mov [rax+8], rcx
jmp short $+2
loc_FDBF1:
jmp short $+2
loc_FDBF3:
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
xchg rax, [rcx+8]
jmp short $+2
loc_FDC0D:
mov rax, [rbp+var_38]
mov rdi, [rax]
call _ZL17my_assume_alignedILm8EPmET0_S1_; my_assume_aligned<8ul,ulong *>(ulong *)
mov rax, [rax]
mov [rbp+var_68], rax
mov rcx, [rbp+var_68]
mov rdx, [rbp+var_38]
xor eax, eax
cmp rcx, [rdx+8]
mov [rbp+var_B1], al
jz short loc_FDC47
call _ZL10LF_BACKOFFv; LF_BACKOFF(void)
cmp eax, 0
setnz al
mov [rbp+var_B1], al
loc_FDC47:
mov al, [rbp+var_B1]
test al, 1
jnz short loc_FDBD5
jmp short $+2
loc_FDC53:
mov rax, [rbp+var_38]
cmp qword ptr [rax+8], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_FDC77
mov [rbp+var_4], 0
jmp loc_FDF21
loc_FDC77:
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov eax, [rax+18h]
mov [rbp+var_3C], eax
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov rax, [rax+10h]
mov [rbp+var_50], rax
mov rax, [rbp+var_38]
mov rdi, [rax+8]
add rdi, 8
call _ZL17my_assume_alignedILm8EPPKhET0_S3_; my_assume_aligned<8ul,uchar const**>(uchar const**)
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov rax, [rax+8]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov [rbp+var_48], rax
loc_FDCBE:
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov rax, [rax]
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
mov rdi, [rbp+var_58]
and rdi, 0FFFFFFFFFFFFFFFEh
call _ZL17my_assume_alignedILm8EP8LF_SLISTET0_S2_; my_assume_aligned<8ul,LF_SLIST *>(LF_SLIST *)
mov rcx, rax
mov rax, [rbp+var_38]
mov [rax+10h], rcx
jmp short $+2
loc_FDCEF:
jmp short $+2
loc_FDCF1:
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov [rbp+var_80], rax
mov rax, [rbp+var_80]
xchg rax, [rcx]
jmp short $+2
loc_FDD0A:
mov rcx, [rbp+var_58]
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov rax, [rax]
mov [rbp+var_88], rax
mov rdx, [rbp+var_88]
xor eax, eax
cmp rcx, rdx
mov [rbp+var_B2], al
jz short loc_FDD45
call _ZL10LF_BACKOFFv; LF_BACKOFF(void)
cmp eax, 0
setnz al
mov [rbp+var_B2], al
loc_FDD45:
mov al, [rbp+var_B2]
test al, 1
jnz loc_FDCBE
mov rax, [rbp+var_58]
and rax, 1
cmp rax, 0
jnz loc_FDE57
cmp [rbp+arg_8], 0
jz short loc_FDD9F
mov eax, [rbp+var_3C]
and eax, 1
cmp eax, 0
jz short loc_FDD9D
mov rax, [rbp+arg_8]
mov rcx, [rbp+var_38]
mov rdi, [rcx+8]
add rdi, 20h ; ' '
mov rsi, [rbp+var_28]
call rax
cmp al, 0
jz short loc_FDD9D
mov [rbp+var_4], 1
jmp loc_FDF21
loc_FDD9D:
jmp short loc_FDE09
loc_FDD9F:
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_1C]
jb short loc_FDE07
mov [rbp+var_8C], 1
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_1C]
ja short loc_FDDEC
mov rax, [rbp+var_18]
mov rax, [rax+0C0h]
mov rax, [rax+8]
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_50]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
xor r9d, r9d
call rax
mov [rbp+var_8C], eax
cmp eax, 0
jl short loc_FDE05
loc_FDDEC:
cmp [rbp+var_8C], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_FDF21
loc_FDE05:
jmp short $+2
loc_FDE07:
jmp short $+2
loc_FDE09:
mov rax, [rbp+var_38]
mov rcx, [rax+8]
mov rax, [rbp+var_38]
mov [rax], rcx
mov eax, [rbp+var_3C]
and eax, 1
cmp eax, 0
jnz short loc_FDE2E
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_10], rax
loc_FDE2E:
jmp short $+2
loc_FDE30:
jmp short $+2
loc_FDE32:
jmp short $+2
loc_FDE34:
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_98], rax
mov rax, [rbp+var_98]
xchg rax, [rcx+10h]
jmp loc_FDEEA
loc_FDE57:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 8
mov [rbp+var_D0], rcx
mov rcx, [rax]
mov rdx, [rax+10h]
mov [rbp+var_A0], rdx
mov rax, [rax+8]
mov rdx, [rbp+var_A0]
lock cmpxchg [rcx], rdx
mov rcx, rax
setz al
mov [rbp+var_C1], al
mov [rbp+var_C0], rcx
test al, 1
jnz short loc_FDEAF
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_C0]
mov [rax], rcx
loc_FDEAF:
mov al, [rbp+var_C1]
and al, 1
mov [rbp+var_A1], al
test [rbp+var_A1], 1
jz short loc_FDEE3
call _ZL10LF_BACKOFFv; LF_BACKOFF(void)
cmp eax, 0
jz short loc_FDEE3
mov rdi, [rbp+arg_0]
mov rax, [rbp+var_38]
mov rsi, [rax+8]
call lf_pinbox_free
jmp short loc_FDEE8
loc_FDEE3:
jmp loc_FDBC2
loc_FDEE8:
jmp short $+2
loc_FDEEA:
mov rax, [rbp+var_38]
mov rcx, [rax+10h]
mov rax, [rbp+var_38]
mov [rax+8], rcx
jmp short $+2
loc_FDEFC:
jmp short $+2
loc_FDEFE:
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_B0], rax
mov rax, [rbp+var_B0]
xchg rax, [rcx+8]
jmp loc_FDC53
loc_FDF21:
mov eax, [rbp+var_4]
add rsp, 0D0h
pop rbp
retn
|
_BOOL8 l_find(
volatile signed long long *a1,
long long a2,
unsigned int a3,
long long a4,
long long a5,
volatile signed long long **a6,
volatile long long *a7,
unsigned __int8 ( *a8)(volatile signed long long *, long long))
{
signed long long v8; // rtt
signed long long v9; // rcx
bool v11; // [rsp+Fh] [rbp-C1h]
bool v12; // [rsp+1Eh] [rbp-B2h]
bool v13; // [rsp+1Fh] [rbp-B1h]
int v14; // [rsp+44h] [rbp-8Ch]
long long v15; // [rsp+78h] [rbp-58h]
long long v16; // [rsp+80h] [rbp-50h]
long long v17; // [rsp+88h] [rbp-48h]
unsigned int v18; // [rsp+94h] [rbp-3Ch]
LABEL_1:
*a6 = (volatile signed long long *)my_assume_aligned<8ul,LF_SLIST **>(a1);
do
{
a6[1] = (volatile signed long long *)my_assume_aligned<8ul,LF_SLIST *>(**a6);
_InterlockedExchange64(a7 + 1, (long long)a6[1]);
v13 = 0;
if ( *(volatile signed long long **)my_assume_aligned<8ul,unsigned long *>(*a6) != a6[1] )
v13 = (unsigned int)LF_BACKOFF() != 0;
}
while ( v13 );
while ( 1 )
{
if ( !a6[1] )
return 0;
v18 = *((_DWORD *)a6[1] + 6);
v16 = *((_QWORD *)a6[1] + 2);
my_assume_aligned<8ul,unsigned char const**>(a6[1] + 1);
v17 = *((_QWORD *)a6[1] + 1);
do
{
v15 = *a6[1];
a6[2] = (volatile signed long long *)my_assume_aligned<8ul,LF_SLIST *>(v15 & 0xFFFFFFFFFFFFFFFELL);
_InterlockedExchange64(a7, (long long)a6[2]);
v12 = 0;
if ( v15 != *a6[1] )
v12 = (unsigned int)LF_BACKOFF() != 0;
}
while ( v12 );
if ( (v15 & 1) == 0 )
break;
v8 = (signed long long)a6[1];
v9 = _InterlockedCompareExchange64(*a6, (signed long long)a6[2], v8);
v11 = v8 == v9;
if ( v8 != v9 )
a6[1] = (volatile signed long long *)v9;
if ( !v11 || !(unsigned int)LF_BACKOFF() )
goto LABEL_1;
lf_pinbox_free((long long)a7, (const char *)a6[1]);
LABEL_30:
a6[1] = a6[2];
_InterlockedExchange64(a7 + 1, (long long)a6[1]);
}
if ( a8 )
{
if ( (v18 & 1) != 0 && a8(a6[1] + 4, a4) )
return 1;
goto LABEL_21;
}
if ( v18 < a3
|| (v14 = 1, v18 <= a3)
&& (v14 = (*(long long ( **)(long long, long long, long long, long long, long long, _QWORD))(*(_QWORD *)(a2 + 192)
+ 8LL))(
a2,
v17,
v16,
a4,
a5,
0LL),
v14 < 0) )
{
LABEL_21:
*a6 = a6[1];
if ( (v18 & 1) == 0 )
a1 = *a6;
_InterlockedExchange64(a7 + 2, (long long)a6[1]);
goto LABEL_30;
}
return v14 == 0;
}
|
l_find:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
JMP 0x001fdbbc
LAB_001fdbbc:
JMP 0x001fdbbe
LAB_001fdbbe:
JMP 0x001fdbc0
LAB_001fdbc0:
JMP 0x001fdbc2
LAB_001fdbc2:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001fdff0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LAB_001fdbd5:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX]
CALL 0x001fe000
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001fdbf1
LAB_001fdbf1:
JMP 0x001fdbf3
LAB_001fdbf3:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
XCHG qword ptr [RCX + 0x8],RAX
JMP 0x001fdc0d
LAB_001fdc0d:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX]
CALL 0x001fe010
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x38]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x8]
MOV byte ptr [RBP + -0xb1],AL
JZ 0x001fdc47
CALL 0x001fe020
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0xb1],AL
LAB_001fdc47:
MOV AL,byte ptr [RBP + -0xb1]
TEST AL,0x1
JNZ 0x001fdbd5
JMP 0x001fdc53
LAB_001fdc53:
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x8],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001fdc77
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001fdf21
LAB_001fdc77:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x8]
ADD RDI,0x8
CALL 0x001fe060
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x48],RAX
LAB_001fdcbe:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x58]
AND RDI,-0x2
CALL 0x001fe000
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001fdcef
LAB_001fdcef:
JMP 0x001fdcf1
LAB_001fdcf1:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x80]
XCHG qword ptr [RCX],RAX
JMP 0x001fdd0a
LAB_001fdd0a:
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x88],RAX
MOV RDX,qword ptr [RBP + -0x88]
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0xb2],AL
JZ 0x001fdd45
CALL 0x001fe020
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0xb2],AL
LAB_001fdd45:
MOV AL,byte ptr [RBP + -0xb2]
TEST AL,0x1
JNZ 0x001fdcbe
MOV RAX,qword ptr [RBP + -0x58]
AND RAX,0x1
CMP RAX,0x0
JNZ 0x001fde57
CMP qword ptr [RBP + 0x18],0x0
JZ 0x001fdd9f
MOV EAX,dword ptr [RBP + -0x3c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001fdd9d
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RCX + 0x8]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x28]
CALL RAX
CMP AL,0x0
JZ 0x001fdd9d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001fdf21
LAB_001fdd9d:
JMP 0x001fde09
LAB_001fdd9f:
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x1c]
JC 0x001fde07
MOV dword ptr [RBP + -0x8c],0x1
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x1c]
JA 0x001fddec
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
XOR R9D,R9D
CALL RAX
MOV dword ptr [RBP + -0x8c],EAX
CMP EAX,0x0
JL 0x001fde05
LAB_001fddec:
CMP dword ptr [RBP + -0x8c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001fdf21
LAB_001fde05:
JMP 0x001fde07
LAB_001fde07:
JMP 0x001fde09
LAB_001fde09:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x3c]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001fde2e
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
LAB_001fde2e:
JMP 0x001fde30
LAB_001fde30:
JMP 0x001fde32
LAB_001fde32:
JMP 0x001fde34
LAB_001fde34:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x98]
XCHG qword ptr [RCX + 0x10],RAX
JMP 0x001fdeea
LAB_001fde57:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RBP + -0xd0],RCX
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0xa0],RDX
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0xa0]
CMPXCHG.LOCK qword ptr [RCX],RDX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0xc1],AL
MOV qword ptr [RBP + -0xc0],RCX
TEST AL,0x1
JNZ 0x001fdeaf
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0xc0]
MOV qword ptr [RAX],RCX
LAB_001fdeaf:
MOV AL,byte ptr [RBP + -0xc1]
AND AL,0x1
MOV byte ptr [RBP + -0xa1],AL
TEST byte ptr [RBP + -0xa1],0x1
JZ 0x001fdee3
CALL 0x001fe020
CMP EAX,0x0
JZ 0x001fdee3
MOV RDI,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001fc120
JMP 0x001fdee8
LAB_001fdee3:
JMP 0x001fdbc2
LAB_001fdee8:
JMP 0x001fdeea
LAB_001fdeea:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001fdefc
LAB_001fdefc:
JMP 0x001fdefe
LAB_001fdefe:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0xb0]
XCHG qword ptr [RCX + 0x8],RAX
JMP 0x001fdc53
LAB_001fdf21:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xd0
POP RBP
RET
|
/* l_find(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned long,
CURSOR*, LF_PINS*, char (*)(void*, void*)) */
byte l_find(LF_SLIST **param_1,charset_info_st *param_2,uint param_3,uchar *param_4,ulong param_5,
CURSOR *param_6,LF_PINS *param_7,_func_char_void_ptr_void_ptr *param_8)
{
uint uVar1;
int8 uVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
char cVar6;
int iVar7;
LF_SLIST **ppLVar8;
LF_SLIST *pLVar9;
ulong *puVar10;
long lVar11;
bool bVar12;
int local_94;
LF_SLIST **local_18;
local_18 = param_1;
LAB_001fdbc2:
ppLVar8 = my_assume_aligned<8ul,LF_SLIST**>(local_18);
*(LF_SLIST ***)param_6 = ppLVar8;
do {
pLVar9 = my_assume_aligned<8ul,LF_SLIST*>((LF_SLIST *)**(int8 **)param_6);
*(LF_SLIST **)(param_6 + 8) = pLVar9;
LOCK();
*(int8 *)(param_7 + 8) = *(int8 *)(param_6 + 8);
UNLOCK();
puVar10 = my_assume_aligned<8ul,unsigned_long*>(*(ulong **)param_6);
bVar12 = false;
if (*puVar10 != *(ulong *)(param_6 + 8)) {
iVar7 = LF_BACKOFF();
bVar12 = iVar7 != 0;
}
} while (bVar12);
do {
if (*(long *)(param_6 + 8) == 0) {
return 0;
}
uVar1 = *(uint *)(*(long *)(param_6 + 8) + 0x18);
uVar2 = *(int8 *)(*(long *)(param_6 + 8) + 0x10);
my_assume_aligned<8ul,unsigned_char_const**>((uchar **)(*(long *)(param_6 + 8) + 8));
uVar3 = *(int8 *)(*(long *)(param_6 + 8) + 8);
do {
uVar4 = **(ulong **)(param_6 + 8);
pLVar9 = my_assume_aligned<8ul,LF_SLIST*>((LF_SLIST *)(uVar4 & 0xfffffffffffffffe));
*(LF_SLIST **)(param_6 + 0x10) = pLVar9;
LOCK();
*(int8 *)param_7 = *(int8 *)(param_6 + 0x10);
UNLOCK();
bVar12 = false;
if (uVar4 != **(ulong **)(param_6 + 8)) {
iVar7 = LF_BACKOFF();
bVar12 = iVar7 != 0;
}
} while (bVar12);
if ((uVar4 & 1) == 0) {
if (param_8 == (_func_char_void_ptr_void_ptr *)0x0) {
if ((param_3 <= uVar1) &&
((local_94 = 1, param_3 < uVar1 ||
(local_94 = (**(code **)(*(long *)(param_2 + 0xc0) + 8))
(param_2,uVar3,uVar2,param_4,param_5,0), -1 < local_94)))) {
return (local_94 != 0 ^ 0xffU) & 1;
}
}
else if (((uVar1 & 1) != 0) &&
(cVar6 = (*param_8)((void *)(*(long *)(param_6 + 8) + 0x20),param_4), cVar6 != '\0'))
{
return 1;
}
*(int8 *)param_6 = *(int8 *)(param_6 + 8);
if ((uVar1 & 1) == 0) {
local_18 = *(LF_SLIST ***)param_6;
}
LOCK();
*(int8 *)(param_7 + 0x10) = *(int8 *)(param_6 + 8);
UNLOCK();
}
else {
lVar5 = *(long *)(param_6 + 8);
LOCK();
lVar11 = **(long **)param_6;
bVar12 = lVar5 == lVar11;
if (bVar12) {
**(long **)param_6 = *(long *)(param_6 + 0x10);
lVar11 = lVar5;
}
UNLOCK();
if (!bVar12) {
*(long *)(param_6 + 8) = lVar11;
goto LAB_001fdbc2;
}
iVar7 = LF_BACKOFF();
if (iVar7 == 0) goto LAB_001fdbc2;
lf_pinbox_free(param_7,*(int8 *)(param_6 + 8));
}
*(int8 *)(param_6 + 8) = *(int8 *)(param_6 + 0x10);
LOCK();
*(int8 *)(param_7 + 8) = *(int8 *)(param_6 + 8);
UNLOCK();
} while( true );
}
|
|
57,375
|
list_delete
|
eloqsql/mysys/list.c
|
LIST *list_delete(LIST *root, LIST *element)
{
if (element->prev)
element->prev->next=element->next;
else
root=element->next;
if (element->next)
element->next->prev=element->prev;
return root;
}
|
O3
|
c
|
list_delete:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
movq 0x8(%rsi), %rcx
movq %rcx, %rax
testq %rdx, %rdx
je 0x94322
movq %rcx, 0x8(%rdx)
movq %rdi, %rax
testq %rcx, %rcx
je 0x9432d
movq (%rsi), %rdx
movq %rdx, (%rcx)
popq %rbp
retq
|
list_delete:
push rbp
mov rbp, rsp
mov rdx, [rsi]
mov rcx, [rsi+8]
mov rax, rcx
test rdx, rdx
jz short loc_94322
mov [rdx+8], rcx
mov rax, rdi
loc_94322:
test rcx, rcx
jz short loc_9432D
mov rdx, [rsi]
mov [rcx], rdx
loc_9432D:
pop rbp
retn
|
_QWORD * list_delete(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // rcx
_QWORD *result; // rax
v2 = (_QWORD *)a2[1];
result = v2;
if ( *a2 )
{
*(_QWORD *)(*a2 + 8LL) = v2;
result = a1;
}
if ( v2 )
*v2 = *a2;
return result;
}
|
list_delete:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
MOV RAX,RCX
TEST RDX,RDX
JZ 0x00194322
MOV qword ptr [RDX + 0x8],RCX
MOV RAX,RDI
LAB_00194322:
TEST RCX,RCX
JZ 0x0019432d
MOV RDX,qword ptr [RSI]
MOV qword ptr [RCX],RDX
LAB_0019432d:
POP RBP
RET
|
long * list_delete(long *param_1,long *param_2)
{
long *plVar1;
long *plVar2;
plVar1 = (long *)param_2[1];
plVar2 = plVar1;
if (*param_2 != 0) {
*(long **)(*param_2 + 8) = plVar1;
plVar2 = param_1;
}
if (plVar1 != (long *)0x0) {
*plVar1 = *param_2;
}
return plVar2;
}
|
|
57,376
|
typed_array_is_oob
|
bluesky950520[P]quickjs/quickjs.c
|
static BOOL typed_array_is_oob(JSObject *p)
{
JSArrayBuffer *abuf;
JSTypedArray *ta;
int len, size_elem;
int64_t end;
assert(p->class_id >= JS_CLASS_UINT8C_ARRAY);
assert(p->class_id <= JS_CLASS_FLOAT64_ARRAY);
ta = p->u.typed_array;
abuf = ta->buffer->u.array_buffer;
if (abuf->detached)
return TRUE;
len = abuf->byte_length;
if (ta->offset > len)
return TRUE;
if (ta->track_rab)
return FALSE;
if (len < (int64_t)ta->offset + ta->length)
return TRUE;
size_elem = 1 << typed_array_size_log2(p->class_id);
end = (int64_t)ta->offset + (int64_t)p->u.array.count * size_elem;
return end > len;
}
|
O1
|
c
|
typed_array_is_oob:
movq 0x30(%rdi), %rcx
movq 0x18(%rcx), %rax
movq 0x30(%rax), %rdx
movl $0x1, %eax
cmpb $0x0, 0x8(%rdx)
je 0x396dc
retq
movslq (%rdx), %rdx
movl 0x20(%rcx), %esi
cmpl %edx, %esi
ja 0x396db
xorl %eax, %eax
cmpl $0x0, 0x28(%rcx)
jne 0x396db
movl 0x24(%rcx), %ecx
addq %rsi, %rcx
movl $0x1, %eax
cmpq %rdx, %rcx
jg 0x396db
movzwl 0x6(%rdi), %eax
leaq 0x641d6(%rip), %rcx # 0x9d8df
movb -0x15(%rax,%rcx), %cl
movl $0x1, %eax
shll %cl, %eax
movl 0x40(%rdi), %ecx
movslq %eax, %rdi
imulq %rcx, %rdi
addq %rsi, %rdi
xorl %eax, %eax
cmpq %rdx, %rdi
setg %al
retq
|
typed_array_is_oob:
mov rcx, [rdi+30h]
mov rax, [rcx+18h]
mov rdx, [rax+30h]
mov eax, 1
cmp byte ptr [rdx+8], 0
jz short loc_396DC
locret_396DB:
retn
loc_396DC:
movsxd rdx, dword ptr [rdx]
mov esi, [rcx+20h]
cmp esi, edx
ja short locret_396DB
xor eax, eax
cmp dword ptr [rcx+28h], 0
jnz short locret_396DB
mov ecx, [rcx+24h]
add rcx, rsi
mov eax, 1
cmp rcx, rdx
jg short locret_396DB
movzx eax, word ptr [rdi+6]
lea rcx, typed_array_size_log2
mov cl, [rax+rcx-15h]
mov eax, 1
shl eax, cl
mov ecx, [rdi+40h]
movsxd rdi, eax
imul rdi, rcx
add rdi, rsi
xor eax, eax
cmp rdi, rdx
setnle al
retn
|
_BOOL8 typed_array_is_oob(long long a1)
{
long long v1; // rcx
int *v2; // rdx
_BOOL8 result; // rax
signed long long v4; // rdx
long long v5; // rsi
v1 = *(_QWORD *)(a1 + 48);
v2 = *(int **)(*(_QWORD *)(v1 + 24) + 48LL);
result = 1LL;
if ( !*((_BYTE *)v2 + 8) )
{
v4 = *v2;
v5 = *(unsigned int *)(v1 + 32);
if ( (unsigned int)v5 <= (unsigned int)v4 )
{
result = 0LL;
if ( !*(_DWORD *)(v1 + 40) )
{
result = 1LL;
if ( v5 + *(unsigned int *)(v1 + 36) <= v4 )
return v5
+ *(unsigned int *)(a1 + 64) * (long long)(1 << typed_array_size_log2[*(unsigned __int16 *)(a1 + 6) - 21]) > v4;
}
}
}
return result;
}
|
typed_array_is_oob:
MOV RCX,qword ptr [RDI + 0x30]
MOV RAX,qword ptr [RCX + 0x18]
MOV RDX,qword ptr [RAX + 0x30]
MOV EAX,0x1
CMP byte ptr [RDX + 0x8],0x0
JZ 0x001396dc
LAB_001396db:
RET
LAB_001396dc:
MOVSXD RDX,dword ptr [RDX]
MOV ESI,dword ptr [RCX + 0x20]
CMP ESI,EDX
JA 0x001396db
XOR EAX,EAX
CMP dword ptr [RCX + 0x28],0x0
JNZ 0x001396db
MOV ECX,dword ptr [RCX + 0x24]
ADD RCX,RSI
MOV EAX,0x1
CMP RCX,RDX
JG 0x001396db
MOVZX EAX,word ptr [RDI + 0x6]
LEA RCX,[0x19d8df]
MOV CL,byte ptr [RAX + RCX*0x1 + -0x15]
MOV EAX,0x1
SHL EAX,CL
MOV ECX,dword ptr [RDI + 0x40]
MOVSXD RDI,EAX
IMUL RDI,RCX
ADD RDI,RSI
XOR EAX,EAX
CMP RDI,RDX
SETG AL
RET
|
bool typed_array_is_oob(long param_1)
{
uint uVar1;
uint uVar2;
long lVar3;
uint *puVar4;
bool bVar5;
lVar3 = *(long *)(param_1 + 0x30);
puVar4 = *(uint **)(*(long *)(lVar3 + 0x18) + 0x30);
bVar5 = true;
if ((char)puVar4[2] == '\0') {
uVar1 = *puVar4;
uVar2 = *(uint *)(lVar3 + 0x20);
if (((uVar2 <= uVar1) && (bVar5 = false, *(int *)(lVar3 + 0x28) == 0)) &&
(bVar5 = true, (long)((ulong)*(uint *)(lVar3 + 0x24) + (ulong)uVar2) <= (long)(int)uVar1)) {
return (long)(int)uVar1 <
(long)((long)(1 << ("toSorted"[(ulong)*(ushort *)(param_1 + 6) + 6] & 0x1fU)) *
(ulong)*(uint *)(param_1 + 0x40) + (ulong)uVar2);
}
}
return bVar5;
}
|
|
57,377
|
typed_array_is_oob
|
bluesky950520[P]quickjs/quickjs.c
|
static BOOL typed_array_is_oob(JSObject *p)
{
JSArrayBuffer *abuf;
JSTypedArray *ta;
int len, size_elem;
int64_t end;
assert(p->class_id >= JS_CLASS_UINT8C_ARRAY);
assert(p->class_id <= JS_CLASS_FLOAT64_ARRAY);
ta = p->u.typed_array;
abuf = ta->buffer->u.array_buffer;
if (abuf->detached)
return TRUE;
len = abuf->byte_length;
if (ta->offset > len)
return TRUE;
if (ta->track_rab)
return FALSE;
if (len < (int64_t)ta->offset + ta->length)
return TRUE;
size_elem = 1 << typed_array_size_log2(p->class_id);
end = (int64_t)ta->offset + (int64_t)p->u.array.count * size_elem;
return end > len;
}
|
O2
|
c
|
typed_array_is_oob:
movq 0x30(%rdi), %r8
movq 0x18(%r8), %rax
movq 0x30(%rax), %rax
pushq $0x1
popq %rcx
cmpb $0x0, 0x8(%rax)
jne 0x32856
movslq (%rax), %rdx
movl 0x20(%r8), %esi
cmpl %edx, %esi
jbe 0x32859
movl %ecx, %eax
retq
xorl %eax, %eax
cmpl $0x0, 0x28(%r8)
je 0x32863
retq
movl 0x24(%r8), %r8d
addq %rsi, %r8
movl %ecx, %eax
cmpq %rdx, %r8
jg 0x32862
movzwl 0x6(%rdi), %eax
leaq 0x52003(%rip), %rcx # 0x8487f
movb -0x15(%rax,%rcx), %cl
pushq $0x1
popq %rax
shll %cl, %eax
movl 0x40(%rdi), %ecx
movslq %eax, %rdi
imulq %rcx, %rdi
addq %rsi, %rdi
xorl %eax, %eax
cmpq %rdx, %rdi
setg %al
retq
|
typed_array_is_oob:
mov r8, [rdi+30h]
mov rax, [r8+18h]
mov rax, [rax+30h]
push 1
pop rcx
cmp byte ptr [rax+8], 0
jnz short loc_32856
movsxd rdx, dword ptr [rax]
mov esi, [r8+20h]
cmp esi, edx
jbe short loc_32859
loc_32856:
mov eax, ecx
retn
loc_32859:
xor eax, eax
cmp dword ptr [r8+28h], 0
jz short loc_32863
locret_32862:
retn
loc_32863:
mov r8d, [r8+24h]
add r8, rsi
mov eax, ecx
cmp r8, rdx
jg short locret_32862
movzx eax, word ptr [rdi+6]
lea rcx, typed_array_size_log2
mov cl, [rax+rcx-15h]
push 1
pop rax
shl eax, cl
mov ecx, [rdi+40h]
movsxd rdi, eax
imul rdi, rcx
add rdi, rsi
xor eax, eax
cmp rdi, rdx
setnle al
retn
|
_BOOL8 typed_array_is_oob(long long a1)
{
long long v1; // r8
int *v2; // rax
signed long long v3; // rdx
long long v4; // rsi
_BOOL8 result; // rax
v1 = *(_QWORD *)(a1 + 48);
v2 = *(int **)(*(_QWORD *)(v1 + 24) + 48LL);
if ( *((_BYTE *)v2 + 8) )
return 1LL;
v3 = *v2;
v4 = *(unsigned int *)(v1 + 32);
if ( (unsigned int)v4 > (unsigned int)v3 )
return 1LL;
result = 0LL;
if ( !*(_DWORD *)(v1 + 40) )
{
result = 1LL;
if ( v4 + *(unsigned int *)(v1 + 36) <= v3 )
return v4 + *(unsigned int *)(a1 + 64) * (long long)(1 << typed_array_size_log2[*(unsigned __int16 *)(a1 + 6) - 21]) > v3;
}
return result;
}
|
typed_array_is_oob:
MOV R8,qword ptr [RDI + 0x30]
MOV RAX,qword ptr [R8 + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
PUSH 0x1
POP RCX
CMP byte ptr [RAX + 0x8],0x0
JNZ 0x00132856
MOVSXD RDX,dword ptr [RAX]
MOV ESI,dword ptr [R8 + 0x20]
CMP ESI,EDX
JBE 0x00132859
LAB_00132856:
MOV EAX,ECX
RET
LAB_00132859:
XOR EAX,EAX
CMP dword ptr [R8 + 0x28],0x0
JZ 0x00132863
LAB_00132862:
RET
LAB_00132863:
MOV R8D,dword ptr [R8 + 0x24]
ADD R8,RSI
MOV EAX,ECX
CMP R8,RDX
JG 0x00132862
MOVZX EAX,word ptr [RDI + 0x6]
LEA RCX,[0x18487f]
MOV CL,byte ptr [RAX + RCX*0x1 + -0x15]
PUSH 0x1
POP RAX
SHL EAX,CL
MOV ECX,dword ptr [RDI + 0x40]
MOVSXD RDI,EAX
IMUL RDI,RCX
ADD RDI,RSI
XOR EAX,EAX
CMP RDI,RDX
SETG AL
RET
|
bool typed_array_is_oob(long param_1)
{
uint uVar1;
uint uVar2;
long lVar3;
uint *puVar4;
bool bVar5;
lVar3 = *(long *)(param_1 + 0x30);
puVar4 = *(uint **)(*(long *)(lVar3 + 0x18) + 0x30);
if ((char)puVar4[2] == '\0') {
uVar1 = *puVar4;
uVar2 = *(uint *)(lVar3 + 0x20);
if (uVar2 <= uVar1) {
bVar5 = false;
if ((*(int *)(lVar3 + 0x28) == 0) &&
(bVar5 = true, (long)((ulong)*(uint *)(lVar3 + 0x24) + (ulong)uVar2) <= (long)(int)uVar1))
{
return (long)(int)uVar1 <
(long)((long)(1 << ("toSorted"[(ulong)*(ushort *)(param_1 + 6) + 6] & 0x1fU)) *
(ulong)*(uint *)(param_1 + 0x40) + (ulong)uVar2);
}
return bVar5;
}
}
return true;
}
|
|
57,378
|
psi_prlock_wrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line);
int result= rw_pr_wrlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_prlock_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1af61e(%rip), %rax # 0x1e3e98
movq (%rax), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x68(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34f30
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x348d0
leaq 0x1af5db(%rip), %rax # 0x1e3e98
movq (%rax), %rax
movq 0x1b8(%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_prlock_wrlock:
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+1B0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+68h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call rw_pr_wrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_348D0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_348D0:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_prlock_wrlock(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, long long, long long, _QWORD))PSI_server + 54))(
v6,
*(_QWORD *)(a1 + 104),
1LL,
a2,
a3);
v4 = rw_pr_wrlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server + 55))(v5, v4);
return v4;
}
|
psi_prlock_wrlock:
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,[0x2e3e98]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00134f30
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001348d0
LEA RAX,[0x2e3e98]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_001348d0:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_prlock_wrlock(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 + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x68),1,param_2,param_3);
uVar1 = rw_pr_wrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
57,379
|
psi_prlock_wrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line);
int result= rw_pr_wrlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O3
|
c
|
psi_prlock_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x2d5430(%rip), %r15 # 0x2f9e58
movq (%r15), %rax
movq 0x68(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
callq *0x1b0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x2f455
movl %eax, %r14d
testq %rbx, %rbx
je 0x24a5e
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1b8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
psi_prlock_wrlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+68h]
lea rdi, [rbp+var_48]
push 1
pop rdx
call qword ptr [rax+1B0h]
mov rbx, rax
mov rdi, r14
call rw_pr_wrlock
mov r14d, eax
test rbx, rbx
jz short loc_24A5E
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1B8h]
loc_24A5E:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long psi_prlock_wrlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server + 54))(
v6,
*(_QWORD *)(a1 + 104),
1LL,
a2,
a3);
v4 = rw_pr_wrlock(a1);
if ( v3 )
(*((void ( **)(long long, _QWORD))PSI_server + 55))(v3, v4);
return v4;
}
|
psi_prlock_wrlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x3f9e58]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x68]
LEA RDI,[RBP + -0x48]
PUSH 0x1
POP RDX
CALL qword ptr [RAX + 0x1b0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x0012f455
MOV R14D,EAX
TEST RBX,RBX
JZ 0x00124a5e
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1b8]
LAB_00124a5e:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_prlock_wrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x68),1,param_2,param_3);
uVar1 = rw_pr_wrlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
57,380
|
js_date_setTime
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_date_setTime(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// setTime(v)
double v;
if (JS_ThisTimeValue(ctx, &v, this_val) || JS_ToFloat64(ctx, &v, argv[0]))
return JS_EXCEPTION;
return JS_SetThisTimeValue(ctx, this_val, time_clip(v));
}
|
O2
|
c
|
js_date_setTime:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4a403
pushq $0x6
popq %r12
testl %eax, %eax
jne 0x4a005
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2127f
testl %eax, %eax
je 0x4a018
xorl %eax, %eax
movq %r12, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movsd 0x8(%rsp), %xmm0
movapd 0x3b6da(%rip), %xmm1 # 0x85700
andpd %xmm0, %xmm1
movsd 0x3b7de(%rip), %xmm2 # 0x85810
ucomisd %xmm1, %xmm2
jae 0x4a042
movsd 0x3b790(%rip), %xmm0 # 0x857d0
jmp 0x4a053
callq 0xe150
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4a767
movq %rdx, %r12
jmp 0x4a007
|
js_date_setTime:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rsi, [rsp+38h+var_30]
mov rdx, r14
mov rcx, rbx
call JS_ThisTimeValue
push 6
pop r12
test eax, eax
jnz short loc_4A005
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+38h+var_30]
mov rdi, r15
call JS_ToFloat64
test eax, eax
jz short loc_4A018
loc_4A005:
xor eax, eax
loc_4A007:
mov rdx, r12
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_4A018:
movsd xmm0, [rsp+38h+var_30]
movapd xmm1, cs:xmmword_85700
andpd xmm1, xmm0
movsd xmm2, cs:qword_85810
ucomisd xmm2, xmm1
jnb short loc_4A042
movsd xmm0, cs:qword_857D0
jmp short loc_4A053
loc_4A042:
call _trunc
movapd xmm1, xmm0
xorpd xmm0, xmm0
addsd xmm0, xmm1
loc_4A053:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetThisTimeValue
mov r12, rdx
jmp short loc_4A007
|
long long js_date_setTime(long long a1, long long a2, long long a3, long long a4, long long a5)
{
double v8; // xmm0_8
double v9[6]; // [rsp+8h] [rbp-30h] BYREF
if ( (unsigned int)JS_ThisTimeValue(a1, v9, a2, a3)
|| (unsigned int)JS_ToFloat64(a1, (long long)v9, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
return 0LL;
}
if ( fabs(v9[0]) <= 8.64e15 )
v8 = trunc(v9[0]) + 0.0;
else
v8 = NAN;
return JS_SetThisTimeValue(a1, a2, a3, v8);
}
|
js_date_setTime:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV RDX,R14
MOV RCX,RBX
CALL 0x0014a403
PUSH 0x6
POP R12
TEST EAX,EAX
JNZ 0x0014a005
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x0012127f
TEST EAX,EAX
JZ 0x0014a018
LAB_0014a005:
XOR EAX,EAX
LAB_0014a007:
MOV RDX,R12
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0014a018:
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVAPD XMM1,xmmword ptr [0x00185700]
ANDPD XMM1,XMM0
MOVSD XMM2,qword ptr [0x00185810]
UCOMISD XMM2,XMM1
JNC 0x0014a042
MOVSD XMM0,qword ptr [0x001857d0]
JMP 0x0014a053
LAB_0014a042:
CALL 0x0010e150
MOVAPD XMM1,XMM0
XORPD XMM0,XMM0
ADDSD XMM0,XMM1
LAB_0014a053:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0014a767
MOV R12,RDX
JMP 0x0014a007
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_setTime(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
double dVar2;
int1 auVar3 [16];
double local_30;
iVar1 = JS_ThisTimeValue(param_1,&local_30,param_2,param_3);
if ((iVar1 == 0) && (iVar1 = JS_ToFloat64(param_1,&local_30,*param_5,param_5[1]), iVar1 == 0)) {
dVar2 = DAT_001857d0;
if ((double)(_DAT_00185700 & (ulong)local_30) <= DAT_00185810) {
dVar2 = trunc(local_30);
dVar2 = dVar2 + 0.0;
}
auVar3 = JS_SetThisTimeValue(dVar2,param_1,param_2,param_3);
}
else {
auVar3 = ZEXT816(6) << 0x40;
}
return auVar3;
}
|
|
57,381
|
ma_get_static_key
|
eloqsql/storage/maria/ma_search.c
|
uint _ma_get_static_key(MARIA_KEY *key, uint page_flag, uint nod_flag,
register uchar **page)
{
register MARIA_KEYDEF *keyinfo= key->keyinfo;
uint key_length= keyinfo->keylength;
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= key_length - key->ref_length;
key->flag= 0;
if (page_flag & KEYPAGE_FLAG_HAS_TRANSID)
{
uchar *end= *page + keyinfo->keylength;
if (key_has_transid(end-1))
{
uint trans_length= transid_packed_length(end);
key->ref_length+= trans_length;
key_length+= trans_length;
key->flag= SEARCH_PAGE_KEY_HAS_TRANSID;
}
}
key_length+= nod_flag;
memcpy(key->data, *page, key_length);
*page+= key_length;
return key_length - nod_flag;
}
|
O0
|
c
|
ma_get_static_key:
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
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xaa(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x740(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
subl 0x14(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3d797
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movzbl -0x1(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3d795
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xf3, %eax
jge 0x3d75f
movl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3d76e
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
subl $0xf8, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movl -0x34(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl $0x100000, 0x18(%rax) # imm = 0x100000
jmp 0x3d797
movl -0x10(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x29090
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x24(%rbp), %eax
subl -0x10(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_get_static_key:
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 rax, [rax+8]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0AAh]
mov [rbp+var_24], eax
mov rax, [rbp+var_20]
mov rax, [rax]
mov ecx, [rax+740h]
mov rax, [rbp+var_8]
mov [rax+14h], ecx
mov ecx, [rbp+var_24]
mov rax, [rbp+var_8]
sub ecx, [rax+14h]
mov rax, [rbp+var_8]
mov [rax+10h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+18h], 0
mov eax, [rbp+var_C]
and eax, 2
cmp eax, 0
jz short loc_3D797
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rbp+var_20]
movzx ecx, word ptr [rcx+0AAh]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax-1]
and eax, 1
cmp eax, 0
jz short loc_3D795
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
cmp eax, 0F3h
jge short loc_3D75F
mov eax, 1
mov [rbp+var_38], eax
jmp short loc_3D76E
loc_3D75F:
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
sub eax, 0F8h
mov [rbp+var_38], eax
loc_3D76E:
mov eax, [rbp+var_38]
mov [rbp+var_34], eax
mov ecx, [rbp+var_34]
mov rax, [rbp+var_8]
add ecx, [rax+14h]
mov [rax+14h], ecx
mov eax, [rbp+var_34]
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov dword ptr [rax+18h], 100000h
loc_3D795:
jmp short $+2
loc_3D797:
mov eax, [rbp+var_10]
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov rdi, [rax]
mov rax, [rbp+var_18]
mov rsi, [rax]
mov eax, [rbp+var_24]
mov edx, eax
call _memcpy
mov edx, [rbp+var_24]
mov rax, [rbp+var_18]
mov rcx, [rax]
mov edx, edx
add rcx, rdx
mov [rax], rcx
mov eax, [rbp+var_24]
sub eax, [rbp+var_10]
add rsp, 40h
pop rbp
retn
|
long long ma_get_static_key(long long a1, char a2, int a3, _QWORD *a4)
{
int v5; // [rsp+8h] [rbp-38h]
unsigned __int8 *v6; // [rsp+10h] [rbp-30h]
int v7; // [rsp+1Ch] [rbp-24h]
unsigned int v8; // [rsp+1Ch] [rbp-24h]
unsigned __int16 *v9; // [rsp+20h] [rbp-20h]
v9 = *(unsigned __int16 **)(a1 + 8);
v7 = v9[85];
*(_DWORD *)(a1 + 20) = *(_DWORD *)(*(_QWORD *)v9 + 1856LL);
*(_DWORD *)(a1 + 16) = v7 - *(_DWORD *)(a1 + 20);
*(_DWORD *)(a1 + 24) = 0;
if ( (a2 & 2) != 0 )
{
v6 = (unsigned __int8 *)(v9[85] + *a4);
if ( (*(v6 - 1) & 1) != 0 )
{
if ( *v6 >= 0xF3u )
v5 = *v6 - 248;
else
v5 = 1;
*(_DWORD *)(a1 + 20) += v5;
v7 += v5;
*(_DWORD *)(a1 + 24) = 0x100000;
}
}
v8 = v7 + a3;
memcpy(*(_QWORD *)a1, *a4, v8);
*a4 += v8;
return v8 - a3;
}
|
_ma_get_static_key:
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 RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x740]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x14],ECX
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x8]
SUB ECX,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x18],0x0
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0013d797
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RCX + 0xaa]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX + -0x1]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0013d795
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xf3
JGE 0x0013d75f
MOV EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0013d76e
LAB_0013d75f:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
SUB EAX,0xf8
MOV dword ptr [RBP + -0x38],EAX
LAB_0013d76e:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x34],EAX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x8]
ADD ECX,dword ptr [RAX + 0x14]
MOV dword ptr [RAX + 0x14],ECX
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x18],0x100000
LAB_0013d795:
JMP 0x0013d797
LAB_0013d797:
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
CALL 0x00129090
MOV EDX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,dword ptr [RBP + -0x10]
ADD RSP,0x40
POP RBP
RET
|
int _ma_get_static_key(int8 *param_1,uint param_2,int param_3,long *param_4)
{
long *plVar1;
byte *pbVar2;
int local_40;
uint local_2c;
plVar1 = (long *)param_1[1];
local_2c = (uint)*(ushort *)((long)plVar1 + 0xaa);
*(int4 *)((long)param_1 + 0x14) = *(int4 *)(*plVar1 + 0x740);
*(uint *)(param_1 + 2) = local_2c - *(int *)((long)param_1 + 0x14);
*(int4 *)(param_1 + 3) = 0;
if (((param_2 & 2) != 0) &&
(pbVar2 = (byte *)(*param_4 + (long)(int)(uint)*(ushort *)((long)plVar1 + 0xaa)),
(pbVar2[-1] & 1) != 0)) {
if (*pbVar2 < 0xf3) {
local_40 = 1;
}
else {
local_40 = *pbVar2 - 0xf8;
}
*(int *)((long)param_1 + 0x14) = local_40 + *(int *)((long)param_1 + 0x14);
local_2c = local_40 + local_2c;
*(int4 *)(param_1 + 3) = 0x100000;
}
local_2c = param_3 + local_2c;
memcpy((void *)*param_1,(void *)*param_4,(ulong)local_2c);
*param_4 = *param_4 + (ulong)local_2c;
return local_2c - param_3;
}
|
|
57,382
|
my_setwd
|
eloqsql/mysys/my_getwd.c
|
int my_setwd(const char *dir, myf MyFlags)
{
int res;
size_t length;
char *start, *pos;
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags));
start=(char *) dir;
if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
dir=FN_ROOTDIR;
if ((res=chdir((char*) dir)) != 0)
{
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
if (test_if_hard_path(start))
{ /* Hard pathname */
pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1);
if (pos[-1] != FN_LIBCHAR)
{
length=(uint) (pos-(char*) curr_dir);
curr_dir[length]=FN_LIBCHAR; /* must end with '/' */
curr_dir[length+1]='\0';
}
}
else
curr_dir[0]='\0'; /* Don't save name */
}
DBUG_RETURN(res);
}
|
O0
|
c
|
my_setwd:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x445c2
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x445ec
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x445f7
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x445f7
leaq 0x4cc01(%rip), %rax # 0x911f4
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x25590
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x44650
callq 0x25040
movl (%rax), %eax
movl %eax, -0x34(%rbp)
callq 0x31720
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x4464e
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x25040
movq -0x40(%rbp), %rdx
movl (%rax), %ecx
movl $0x11, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x43530
jmp 0x446c5
movq -0x28(%rbp), %rdi
callq 0x446e0
cmpl $0x0, %eax
je 0x446b9
movq -0x28(%rbp), %rsi
leaq 0x36cb87(%rip), %rdi # 0x3b11f0
movl $0x1ff, %edx # imm = 0x1FF
callq 0x8bc00
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x446b7
movq -0x30(%rbp), %rax
leaq 0x36cb61(%rip), %rcx # 0x3b11f0
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x36cb4d(%rip), %rax # 0x3b11f0
movb $0x2f, (%rax,%rcx)
movq -0x20(%rbp), %rcx
leaq 0x36cb3e(%rip), %rax # 0x3b11f0
movb $0x0, 0x1(%rax,%rcx)
jmp 0x446c3
leaq 0x36cb30(%rip), %rax # 0x3b11f0
movb $0x0, (%rax)
jmp 0x446c5
jmp 0x446c7
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_setwd:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_445C2:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz short loc_445EC
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_445F7
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jnz short loc_445F7
loc_445EC:
lea rax, unk_911F4
mov [rbp+var_8], rax
loc_445F7:
mov rdi, [rbp+var_8]
call _chdir
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_44650
call ___errno_location
mov eax, [rax]
mov [rbp+var_34], eax
call _my_thread_var
mov ecx, [rbp+var_34]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 10h
cmp rax, 0
jz short loc_4464E
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
call ___errno_location
mov rdx, [rbp+var_40]
mov ecx, [rax]
mov edi, 11h
mov esi, 4
mov al, 0
call my_error
loc_4464E:
jmp short loc_446C5
loc_44650:
mov rdi, [rbp+var_28]
call test_if_hard_path
cmp eax, 0
jz short loc_446B9
mov rsi, [rbp+var_28]
lea rdi, curr_dir
mov edx, 1FFh
call strmake
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_446B7
mov rax, [rbp+var_30]
lea rcx, curr_dir
sub rax, rcx
mov eax, eax
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx], 2Fh ; '/'
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx+1], 0
loc_446B7:
jmp short loc_446C3
loc_446B9:
lea rax, curr_dir
mov byte ptr [rax], 0
loc_446C3:
jmp short $+2
loc_446C5:
jmp short $+2
loc_446C7:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
|
long long my_setwd(_BYTE *a1, char a2)
{
unsigned int *v2; // rax
int v4; // [rsp+1Ch] [rbp-34h]
long long v5; // [rsp+20h] [rbp-30h]
unsigned int v6; // [rsp+3Ch] [rbp-14h]
void *v7; // [rsp+48h] [rbp-8h]
v7 = a1;
if ( !*a1 || *a1 == 47 && !a1[1] )
v7 = &unk_911F4;
v6 = chdir(v7);
if ( v6 )
{
v4 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v4;
if ( (a2 & 0x10) != 0 )
{
v2 = (unsigned int *)__errno_location();
my_error(0x11u, 4LL, a1, *v2);
}
}
else if ( (unsigned int)test_if_hard_path(a1) )
{
v5 = strmake(curr_dir, a1, 511LL);
if ( *(_BYTE *)(v5 - 1) != 47 )
{
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir)] = 47;
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir) + 1] = 0;
}
}
else
{
curr_dir[0] = 0;
}
return v6;
}
|
my_setwd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001445c2
LAB_001445c2:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x001445ec
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001445f7
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JNZ 0x001445f7
LAB_001445ec:
LEA RAX,[0x1911f4]
MOV qword ptr [RBP + -0x8],RAX
LAB_001445f7:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00125590
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x00144650
CALL 0x00125040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CALL 0x00131720
MOV ECX,dword ptr [RBP + -0x34]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0014464e
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x00125040
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RAX]
MOV EDI,0x11
MOV ESI,0x4
MOV AL,0x0
CALL 0x00143530
LAB_0014464e:
JMP 0x001446c5
LAB_00144650:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001446e0
CMP EAX,0x0
JZ 0x001446b9
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[0x4b11f0]
MOV EDX,0x1ff
CALL 0x0018bc00
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x001446b7
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x4b11f0]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x4b11f0]
MOV byte ptr [RAX + RCX*0x1],0x2f
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x4b11f0]
MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0
LAB_001446b7:
JMP 0x001446c3
LAB_001446b9:
LEA RAX,[0x4b11f0]
MOV byte ptr [RAX],0x0
LAB_001446c3:
JMP 0x001446c5
LAB_001446c5:
JMP 0x001446c7
LAB_001446c7:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_setwd(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
uint uVar3;
int *piVar4;
long lVar5;
char *local_10;
if ((*param_1 == '\0') || ((local_10 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) {
local_10 = "/";
}
iVar1 = chdir(local_10);
if (iVar1 == 0) {
iVar2 = test_if_hard_path(param_1);
if (iVar2 == 0) {
curr_dir = 0;
}
else {
lVar5 = strmake(&curr_dir,param_1,0x1ff);
if (*(char *)(lVar5 + -1) != '/') {
uVar3 = (int)lVar5 - 0x4b11f0;
(&curr_dir)[uVar3] = 0x2f;
(&DAT_004b11f1)[uVar3] = 0;
}
}
}
else {
piVar4 = __errno_location();
iVar2 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar2;
if ((param_2 & 0x10) != 0) {
piVar4 = __errno_location();
my_error(0x11,4,param_1,*piVar4);
}
}
return iVar1;
}
|
|
57,383
|
js_typed_array_set
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_typed_array_set(JSContext *ctx,
JSValue this_val,
int argc, JSValue *argv)
{
JSValue offset = JS_UNDEFINED;
if (argc > 1) {
offset = argv[1];
}
return js_typed_array_set_internal(ctx, this_val, argv[0], offset);
}
|
O1
|
c
|
js_typed_array_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
cmpl $0x2, %ecx
jl 0x7fdfa
movq 0x10(%r8), %r12
movq 0x18(%r8), %r15
jmp 0x7fe03
movl $0x3, %r15d
xorl %r12d, %r12d
movq (%r8), %rbp
movq 0x8(%r8), %r14
movq $0x0, 0x20(%rsp)
movq %rsi, 0x70(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x78(%rsp)
cmpl $-0x1, %edx
jne 0x7fe3a
movq 0x40(%rsp), %r13
movzwl 0x6(%r13), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jb 0x7fe4e
leaq 0x20ec8(%rip), %rsi # 0xa0d09
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x3, %ecx
testq %r13, %r13
je 0x7ff05
movq %r12, 0x40(%rsp)
cmpl $-0x9, %r15d
jb 0x7fe6e
movq 0x40(%rsp), %rax
incl (%rax)
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x26ba8
testl %eax, %eax
movl $0x3, %ecx
jne 0x7ff05
movq 0x80(%rsp), %r12
testq %r12, %r12
js 0x7fec4
movq %r13, %rdi
callq 0x38ab0
movl $0x3, %ecx
testl %eax, %eax
je 0x7fee6
leaq 0x20e68(%rip), %rsi # 0xa0d1a
movq %rbx, %rdi
xorl %eax, %eax
movq %rcx, %r14
callq 0x21953
movq %r14, %rcx
jmp 0x7ff05
movl $0x3, %eax
movq %rax, 0x18(%rsp)
leaq 0x1dbc1(%rip), %rsi # 0x9da96
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1fec9
movq 0x18(%rsp), %rcx
jmp 0x7ff05
movl 0x40(%r13), %r15d
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x261c9
movq %rdx, %rcx
movq %rax, 0x20(%rsp)
cmpl $0x6, %ecx
jne 0x7ff2f
movq 0x20(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq %rcx, %rdx
callq 0x1ccb2
movl $0x6, %edx
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x28(%rsp)
movq 0x20(%rsp), %r15
movzwl 0x6(%r15), %r14d
leal -0x15(%r14), %eax
cmpw $0xb, %ax
movq %rcx, 0x18(%rsp)
ja 0x80029
movq 0x30(%r13), %rax
movq %rax, 0x50(%rsp)
movq 0x18(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x30(%r15), %rax
movq %rax, 0x68(%rsp)
movq 0x18(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
movzwl 0x6(%r13), %ebp
leaq 0x1c246(%rip), %rax # 0x9c1cf
movzbl -0x15(%rbp,%rax), %eax
movq %rax, 0x60(%rsp)
movq %r15, %rdi
callq 0x38ab0
movl $0x4, %ecx
testl %eax, %eax
jne 0x80004
movl 0x40(%r15), %edx
movq %rdx, 0x38(%rsp)
movq 0x28(%rsp), %rax
subq %rdx, %rax
movl $0x3, %ecx
cmpq %rax, %r12
jg 0x80004
xorl %ecx, %ecx
cmpw %bp, %r14w
jne 0x80004
movq 0x50(%rsp), %rax
movl 0x20(%rax), %eax
movq 0x58(%rsp), %rcx
addq 0x10(%rcx), %rax
movq %r12, %rdi
movq 0x60(%rsp), %rcx
shlq %cl, %rdi
addq %rax, %rdi
movq 0x68(%rsp), %rax
movl 0x20(%rax), %esi
movq 0x30(%rsp), %rax
addq 0x10(%rax), %rsi
shlq %cl, %rdx
callq 0xe710
movl $0x5, %ecx
cmpl $0x5, %ecx
ja 0x7ff1b
movl %ecx, %eax
leaq 0x1c04e(%rip), %rcx # 0x9c064
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rcx
jmp 0x7feab
movq 0x20(%rsp), %rdx
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x21ec8
testl %eax, %eax
jne 0x7fedf
movq 0x28(%rsp), %rax
subq 0x38(%rsp), %rax
cmpq %rax, %r12
jg 0x7fece
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
jle 0x80124
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x1, %ebp
xorl %ecx, %ecx
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x235a0
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x7fedf
movq %rax, %r15
movq %r13, %rdi
callq 0x38ab0
testl %eax, %eax
je 0x800b9
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ccb2
jmp 0x80112
movq %r15, 0x40(%rsp)
movl %r12d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
testl %r12d, %r12d
movq %xmm0, %rcx
cmovnsq %rax, %rcx
movq %r14, 0x48(%rsp)
movl $0x7, %r8d
movl $0x0, %eax
cmovnsq %rax, %r8
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movl $0x4000, %r9d # imm = 0x4000
callq 0x24145
testl %eax, %eax
js 0x7fedf
movl %ebp, %ecx
incl %r12d
incl %ebp
cmpq %rcx, 0x28(%rsp)
jg 0x8007a
movq 0x20(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq 0x18(%rsp), %rdx
callq 0x1ccb2
movl $0x3, %edx
jmp 0x7ff1b
|
js_typed_array_set:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rbx, rdi
cmp ecx, 2
jl short loc_7FDFA
mov r12, [r8+10h]
mov r15, [r8+18h]
jmp short loc_7FE03
loc_7FDFA:
mov r15d, 3
xor r12d, r12d
loc_7FE03:
mov rbp, [r8]
mov r14, [r8+8]
mov [rsp+0B8h+var_98], 0
mov [rsp+0B8h+var_48], rsi
mov qword ptr [rsp+0B8h+var_78], rsi
mov [rsp+0B8h+var_40], rdx
cmp edx, 0FFFFFFFFh
jnz short loc_7FE3A
mov r13, qword ptr [rsp+0B8h+var_78]
movzx eax, word ptr [r13+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jb short loc_7FE4E
loc_7FE3A:
lea rsi, aNotATypedarray; "not a TypedArray"
xor r13d, r13d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_7FE4E:
mov ecx, 3
test r13, r13
jz loc_7FF05
mov qword ptr [rsp+0B8h+var_78], r12
cmp r15d, 0FFFFFFF7h
jb short loc_7FE6E
mov rax, qword ptr [rsp+0B8h+var_78]
inc dword ptr [rax]
loc_7FE6E:
lea rsi, [rsp+0B8h+var_38]
mov rdi, rbx
mov rdx, r12
mov rcx, r15
call JS_ToInt64SatFree
test eax, eax
mov ecx, 3
jnz short loc_7FF05
mov r12, [rsp+0B8h+var_38]
test r12, r12
js short loc_7FEC4
mov rdi, r13
call typed_array_is_oob
mov ecx, 3
test eax, eax
jz short loc_7FEE6
loc_7FEAB:
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
mov rdi, rbx
xor eax, eax
mov r14, rcx
call JS_ThrowTypeError
mov rcx, r14
jmp short loc_7FF05
loc_7FEC4:
mov eax, 3
mov [rsp+0B8h+var_A0], rax
loc_7FECE:
lea rsi, aInvalidArrayLe; jumptable 000000000008001D case 3
mov rdi, rbx
xor eax, eax
call JS_ThrowRangeError
loc_7FEDF:
mov rcx, [rsp+0B8h+var_A0]
jmp short loc_7FF05
loc_7FEE6:
mov r15d, [r13+40h]
mov rdi, rbx
mov rsi, rbp
mov rdx, r14
call JS_ToObject
mov rcx, rdx
mov [rsp+0B8h+var_98], rax
cmp ecx, 6
jnz short loc_7FF2F
loc_7FF05:
mov rsi, [rsp+0B8h+var_98]
mov rdi, [rbx+18h]
mov rdx, rcx
call JS_FreeValueRT
mov edx, 6
def_8001D:
xor eax, eax; jumptable 000000000008001D default case, cases 1,2
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7FF2F:
mov [rsp+0B8h+var_90], r15
mov r15, [rsp+0B8h+var_98]
movzx r14d, word ptr [r15+6]
lea eax, [r14-15h]
cmp ax, 0Bh
mov [rsp+0B8h+var_A0], rcx
ja loc_80029
mov rax, [r13+30h]
mov [rsp+0B8h+var_68], rax
mov rax, [rax+18h]
mov rax, [rax+30h]
mov [rsp+0B8h+var_60], rax
mov rax, [r15+30h]
mov [rsp+0B8h+var_50], rax
mov rax, [rax+18h]
mov rax, [rax+30h]
mov [rsp+0B8h+var_88], rax
movzx ebp, word ptr [r13+6]
lea rax, typed_array_size_log2
movzx eax, byte ptr [rbp+rax-15h]
mov [rsp+0B8h+var_58], rax
mov rdi, r15
call typed_array_is_oob
mov ecx, 4
test eax, eax
jnz short loc_80004
mov edx, [r15+40h]
mov [rsp+0B8h+var_80], rdx
mov rax, [rsp+0B8h+var_90]
sub rax, rdx
mov ecx, 3
cmp r12, rax
jg short loc_80004
xor ecx, ecx
cmp r14w, bp
jnz short loc_80004
mov rax, [rsp+0B8h+var_68]
mov eax, [rax+20h]
mov rcx, [rsp+0B8h+var_60]
add rax, [rcx+10h]
mov rdi, r12
mov rcx, [rsp+0B8h+var_58]
shl rdi, cl
add rdi, rax
mov rax, [rsp+0B8h+var_50]
mov esi, [rax+20h]
mov rax, [rsp+0B8h+var_88]
add rsi, [rax+10h]
shl rdx, cl
call _memmove
mov ecx, 5
loc_80004:
cmp ecx, 5; switch 6 cases
ja def_8001D; jumptable 000000000008001D default case, cases 1,2
mov eax, ecx
lea rcx, jpt_8001D
movsxd rax, ds:(jpt_8001D - 9C064h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_8001F:
mov rcx, [rsp+0B8h+var_A0]; jumptable 000000000008001D case 4
jmp loc_7FEAB
loc_80029:
mov rdx, [rsp+0B8h+var_98]
lea rsi, [rsp+0B8h+var_80]
mov rdi, rbx
call js_get_length64
test eax, eax
jnz loc_7FEDF
mov rax, [rsp+0B8h+var_90]
sub rax, [rsp+0B8h+var_80]
cmp r12, rax
jg loc_7FECE; jumptable 000000000008001D case 3
loc_80056:
mov rax, [rsp+0B8h+var_80]; jumptable 000000000008001D case 0
mov [rsp+0B8h+var_90], rax
test rax, rax
jle loc_80124; jumptable 000000000008001D case 5
mov rax, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_88], rax
mov ebp, 1
xor ecx, ecx
loc_8007A:
mov rdi, rbx
mov rsi, [rsp+0B8h+var_88]
mov rdx, [rsp+0B8h+var_A0]
call JS_GetPropertyInt64
mov r14, rdx
cmp r14d, 6
jz loc_7FEDF
mov r15, rax
mov rdi, r13
call typed_array_is_oob
test eax, eax
jz short loc_800B9
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
jmp short loc_80112
loc_800B9:
mov qword ptr [rsp+0B8h+var_78], r15
mov eax, r12d
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
test r12d, r12d
movq rcx, xmm0
cmovns rcx, rax
mov qword ptr [rsp+0B8h+var_78+8], r14
mov r8d, 7
mov eax, 0
cmovns r8, rax
movups xmm0, [rsp+0B8h+var_78]
movups [rsp+0B8h+var_B8], xmm0
mov rdi, rbx
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_40]
mov r9d, 4000h
call JS_SetPropertyValue
test eax, eax
js loc_7FEDF
loc_80112:
mov ecx, ebp
inc r12d
inc ebp
cmp [rsp+0B8h+var_90], rcx
jg loc_8007A
loc_80124:
mov rsi, [rsp+0B8h+var_98]; jumptable 000000000008001D case 5
mov rdi, [rbx+18h]
mov rdx, [rsp+0B8h+var_A0]
call JS_FreeValueRT
mov edx, 3
jmp def_8001D; jumptable 000000000008001D default case, cases 1,2
|
long long js_typed_array_set(
long long a1,
unsigned long long a2,
long long a3,
long long a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // r12
long long v15; // r15
long long v16; // rbp
long long v17; // r14
long long v18; // r13
long long v19; // rcx
int v20; // eax
long long v21; // rdx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // r12
BOOL is_oob; // eax
long long v28; // rcx
long long v29; // r14
long long v30; // r15
_DWORD *v31; // rax
long long v32; // rdx
__int16 v34; // r14
long long v35; // rbp
BOOL v36; // eax
unsigned int v37; // ebp
signed long long v38; // rcx
unsigned long long PropertyInt64; // rax
long long v40; // rdx
long long v41; // r14
_DWORD *v42; // r15
double v43; // xmm4_8
double v44; // xmm5_8
double v45; // rcx
long long v46; // r8
char v47; // [rsp+0h] [rbp-B8h]
long long v48; // [rsp+18h] [rbp-A0h]
_DWORD *v49; // [rsp+20h] [rbp-98h]
signed long long v50; // [rsp+28h] [rbp-90h]
long long v51; // [rsp+30h] [rbp-88h]
long long v52; // [rsp+38h] [rbp-80h] BYREF
__int128 v53; // [rsp+40h] [rbp-78h]
long long v54; // [rsp+50h] [rbp-68h]
long long v55; // [rsp+58h] [rbp-60h]
long long v56; // [rsp+60h] [rbp-58h]
long long v57; // [rsp+68h] [rbp-50h]
unsigned long long v58; // [rsp+70h] [rbp-48h]
unsigned long long v59; // [rsp+78h] [rbp-40h]
unsigned long long v60[7]; // [rsp+80h] [rbp-38h] BYREF
if ( (int)a4 < 2 )
{
v15 = 3LL;
v14 = 0LL;
}
else
{
v14 = a5[2];
v15 = a5[3];
}
v16 = *a5;
v17 = a5[1];
v49 = 0LL;
v58 = a2;
*(_QWORD *)&v53 = a2;
v59 = a3;
if ( (_DWORD)a3 != -1 || (v18 = v53, (unsigned __int16)(*(_WORD *)(v53 + 6) - 21) >= 0xCu) )
{
v18 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"not a TypedArray",
a3,
a4,
(long long)a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v47);
}
v19 = 3LL;
if ( !v18 )
goto LABEL_18;
*(_QWORD *)&v53 = v14;
if ( (unsigned int)v15 >= 0xFFFFFFF7 )
++*(_DWORD *)v53;
v20 = JS_ToInt64SatFree(a1, v60, v14, v15);
v19 = 3LL;
if ( v20 )
goto LABEL_18;
v26 = v60[0];
if ( (v60[0] & 0x8000000000000000LL) != 0LL )
{
v48 = 3LL;
goto LABEL_15;
}
is_oob = typed_array_is_oob(v18);
v28 = 3LL;
if ( is_oob )
{
LABEL_13:
v29 = v28;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v21,
v28,
v22,
v23,
a7,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v47);
v19 = v29;
LABEL_18:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v49, v19);
return 0LL;
}
v30 = *(unsigned int *)(v18 + 64);
v31 = JS_ToObject(a1, v16, v17, 3LL, v22, v23, a7, a8, a9, a10, v24, v25, a13, a14);
v19 = v32;
v49 = v31;
if ( (_DWORD)v32 == 6 )
goto LABEL_18;
v34 = *((_WORD *)v31 + 3);
v48 = v32;
if ( (unsigned __int16)(v34 - 21) > 0xBu )
{
if ( (unsigned int)js_get_length64(a1, &v52, (int)v31, v32) )
goto LABEL_16;
if ( v26 <= v30 - v52 )
{
LABEL_29:
v50 = v52;
if ( v52 <= 0 )
{
LABEL_40:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v49, v48);
return 0LL;
}
v37 = 1;
v38 = 0LL;
while ( 1 )
{
PropertyInt64 = JS_GetPropertyInt64(a1, (long long)v49, v48, v38);
v41 = v40;
if ( (_DWORD)v40 == 6 )
goto LABEL_16;
v42 = (_DWORD *)PropertyInt64;
if ( typed_array_is_oob(v18) )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v42, v41);
}
else
{
*(_QWORD *)&v53 = v42;
v45 = (double)(int)v26;
if ( (int)v26 >= 0 )
*(_QWORD *)&v45 = (unsigned int)v26;
*((_QWORD *)&v53 + 1) = v41;
v46 = 7LL;
if ( (int)v26 >= 0 )
v46 = 0LL;
if ( (int)JS_SetPropertyValue(
a1,
v58,
v59,
*(_DWORD **)&v45,
v46,
0x4000u,
*(double *)&v53,
a8,
a9,
a10,
v43,
v44,
a13,
a14,
v53) < 0 )
goto LABEL_16;
}
v38 = v37;
LODWORD(v26) = v26 + 1;
++v37;
if ( v50 <= v38 )
goto LABEL_40;
}
}
LABEL_15:
JS_ThrowRangeError(
a1,
(long long)"invalid array length",
v21,
v19,
v22,
v23,
a7,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v47);
LABEL_16:
v19 = v48;
goto LABEL_18;
}
v54 = *(_QWORD *)(v18 + 48);
v55 = *(_QWORD *)(*(_QWORD *)(v54 + 24) + 48LL);
v57 = *((_QWORD *)v31 + 6);
v51 = *(_QWORD *)(*(_QWORD *)(v57 + 24) + 48LL);
v35 = *(unsigned __int16 *)(v18 + 6);
v56 = (unsigned __int8)typed_array_size_log2[v35 - 21];
v36 = typed_array_is_oob((long long)v31);
v19 = 4LL;
if ( !v36 )
{
v21 = (unsigned int)v49[16];
v52 = v21;
v19 = 3LL;
if ( v26 <= v30 - v21 )
{
v19 = 0LL;
if ( v34 == (_WORD)v35 )
{
memmove(
*(_QWORD *)(v55 + 16) + *(unsigned int *)(v54 + 32) + (v26 << v56),
*(_QWORD *)(v51 + 16) + *(unsigned int *)(v57 + 32),
v21 << v56);
v19 = 5LL;
}
}
}
switch ( (int)v19 )
{
case 0:
goto LABEL_29;
case 3:
goto LABEL_15;
case 4:
v28 = v48;
goto LABEL_13;
case 5:
goto LABEL_40;
default:
return 0LL;
}
return 0LL;
}
|
js_typed_array_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBX,RDI
CMP ECX,0x2
JL 0x0017fdfa
MOV R12,qword ptr [R8 + 0x10]
MOV R15,qword ptr [R8 + 0x18]
JMP 0x0017fe03
LAB_0017fdfa:
MOV R15D,0x3
XOR R12D,R12D
LAB_0017fe03:
MOV RBP,qword ptr [R8]
MOV R14,qword ptr [R8 + 0x8]
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x70],RSI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x78],RDX
CMP EDX,-0x1
JNZ 0x0017fe3a
MOV R13,qword ptr [RSP + 0x40]
MOVZX EAX,word ptr [R13 + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JC 0x0017fe4e
LAB_0017fe3a:
LEA RSI,[0x1a0d09]
XOR R13D,R13D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
LAB_0017fe4e:
MOV ECX,0x3
TEST R13,R13
JZ 0x0017ff05
MOV qword ptr [RSP + 0x40],R12
CMP R15D,-0x9
JC 0x0017fe6e
MOV RAX,qword ptr [RSP + 0x40]
INC dword ptr [RAX]
LAB_0017fe6e:
LEA RSI,[RSP + 0x80]
MOV RDI,RBX
MOV RDX,R12
MOV RCX,R15
CALL 0x00126ba8
TEST EAX,EAX
MOV ECX,0x3
JNZ 0x0017ff05
MOV R12,qword ptr [RSP + 0x80]
TEST R12,R12
JS 0x0017fec4
MOV RDI,R13
CALL 0x00138ab0
MOV ECX,0x3
TEST EAX,EAX
JZ 0x0017fee6
LAB_0017feab:
LEA RSI,[0x1a0d1a]
MOV RDI,RBX
XOR EAX,EAX
MOV R14,RCX
CALL 0x00121953
MOV RCX,R14
JMP 0x0017ff05
LAB_0017fec4:
MOV EAX,0x3
MOV qword ptr [RSP + 0x18],RAX
caseD_3:
LEA RSI,[0x19da96]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011fec9
LAB_0017fedf:
MOV RCX,qword ptr [RSP + 0x18]
JMP 0x0017ff05
LAB_0017fee6:
MOV R15D,dword ptr [R13 + 0x40]
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R14
CALL 0x001261c9
MOV RCX,RDX
MOV qword ptr [RSP + 0x20],RAX
CMP ECX,0x6
JNZ 0x0017ff2f
LAB_0017ff05:
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,RCX
CALL 0x0011ccb2
MOV EDX,0x6
caseD_1:
XOR EAX,EAX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017ff2f:
MOV qword ptr [RSP + 0x28],R15
MOV R15,qword ptr [RSP + 0x20]
MOVZX R14D,word ptr [R15 + 0x6]
LEA EAX,[R14 + -0x15]
CMP AX,0xb
MOV qword ptr [RSP + 0x18],RCX
JA 0x00180029
MOV RAX,qword ptr [R13 + 0x30]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [R15 + 0x30]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x30],RAX
MOVZX EBP,word ptr [R13 + 0x6]
LEA RAX,[0x19c1cf]
MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x15]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,R15
CALL 0x00138ab0
MOV ECX,0x4
TEST EAX,EAX
JNZ 0x00180004
MOV EDX,dword ptr [R15 + 0x40]
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,RDX
MOV ECX,0x3
CMP R12,RAX
JG 0x00180004
XOR ECX,ECX
CMP R14W,BP
JNZ 0x00180004
MOV RAX,qword ptr [RSP + 0x50]
MOV EAX,dword ptr [RAX + 0x20]
MOV RCX,qword ptr [RSP + 0x58]
ADD RAX,qword ptr [RCX + 0x10]
MOV RDI,R12
MOV RCX,qword ptr [RSP + 0x60]
SHL RDI,CL
ADD RDI,RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV ESI,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x30]
ADD RSI,qword ptr [RAX + 0x10]
SHL RDX,CL
CALL 0x0010e710
MOV ECX,0x5
LAB_00180004:
CMP ECX,0x5
JA 0x0017ff1b
MOV EAX,ECX
LEA RCX,[0x19c064]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOV RCX,qword ptr [RSP + 0x18]
JMP 0x0017feab
LAB_00180029:
MOV RDX,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x38]
MOV RDI,RBX
CALL 0x00121ec8
TEST EAX,EAX
JNZ 0x0017fedf
MOV RAX,qword ptr [RSP + 0x28]
SUB RAX,qword ptr [RSP + 0x38]
CMP R12,RAX
JG 0x0017fece
caseD_0:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JLE 0x00180124
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
MOV EBP,0x1
XOR ECX,ECX
LAB_0018007a:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x001235a0
MOV R14,RDX
CMP R14D,0x6
JZ 0x0017fedf
MOV R15,RAX
MOV RDI,R13
CALL 0x00138ab0
TEST EAX,EAX
JZ 0x001800b9
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ccb2
JMP 0x00180112
LAB_001800b9:
MOV qword ptr [RSP + 0x40],R15
MOV EAX,R12D
XORPS XMM0,XMM0
CVTSI2SD XMM0,RAX
TEST R12D,R12D
MOVQ RCX,XMM0
CMOVNS RCX,RAX
MOV qword ptr [RSP + 0x48],R14
MOV R8D,0x7
MOV EAX,0x0
CMOVNS R8,RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
MOV R9D,0x4000
CALL 0x00124145
TEST EAX,EAX
JS 0x0017fedf
LAB_00180112:
MOV ECX,EBP
INC R12D
INC EBP
CMP qword ptr [RSP + 0x28],RCX
JG 0x0018007a
caseD_5:
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x0011ccb2
MOV EDX,0x3
JMP 0x0017ff1b
|
int8
js_typed_array_set(long param_1,long param_2,int8 param_3,int param_4,int8 *param_5)
{
ushort uVar1;
ushort uVar2;
uint uVar3;
int8 uVar4;
int8 uVar5;
long lVar6;
bool bVar7;
ulong uVar8;
int iVar9;
long lVar10;
int4 uVar11;
ulong uVar12;
double dVar13;
ulong uVar14;
int8 uVar15;
int iVar16;
int *piVar17;
ulong uVar18;
int1 auVar19 [16];
int1 auVar20 [16];
int8 local_98;
ulong local_80;
int1 local_78 [16];
long local_68;
long local_60;
ulong local_58;
long local_50;
long local_48;
int8 local_40;
ulong local_38;
if (param_4 < 2) {
uVar15 = 3;
piVar17 = (int *)0x0;
}
else {
piVar17 = (int *)param_5[2];
uVar15 = param_5[3];
}
uVar4 = *param_5;
uVar5 = param_5[1];
local_78._0_8_ = param_2;
local_48 = param_2;
local_40 = param_3;
if (((int)param_3 != -1) || (0xb < (ushort)(*(short *)(param_2 + 6) - 0x15U))) {
param_2 = 0;
JS_ThrowTypeError(param_1,"not a TypedArray");
}
auVar19 = ZEXT816(3) << 0x40;
if (param_2 == 0) goto LAB_0017ff05;
if (0xfffffff6 < (uint)uVar15) {
*piVar17 = *piVar17 + 1;
}
local_78._0_8_ = piVar17;
iVar9 = JS_ToInt64SatFree(param_1,&local_38,piVar17,uVar15);
auVar19 = ZEXT816(3) << 0x40;
if (iVar9 != 0) goto LAB_0017ff05;
if ((long)local_38 < 0) {
auVar19 = ZEXT816(3) << 0x40;
}
else {
iVar9 = typed_array_is_oob(param_2);
auVar19 = ZEXT816(3) << 0x40;
if (iVar9 != 0) {
LAB_0017feab:
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
goto LAB_0017ff05;
}
uVar3 = *(uint *)(param_2 + 0x40);
auVar19 = JS_ToObject(param_1,uVar4,uVar5);
lVar10 = auVar19._0_8_;
if (auVar19._8_4_ == 6) goto LAB_0017ff05;
uVar1 = *(ushort *)(lVar10 + 6);
if ((ushort)(uVar1 - 0x15) < 0xc) {
local_68 = *(long *)(param_2 + 0x30);
local_60 = *(long *)(*(long *)(local_68 + 0x18) + 0x30);
local_50 = *(long *)(lVar10 + 0x30);
lVar6 = *(long *)(*(long *)(local_50 + 0x18) + 0x30);
uVar2 = *(ushort *)(param_2 + 6);
local_58 = (ulong)(byte)"toSorted"[(ulong)uVar2 + 6];
iVar9 = typed_array_is_oob(lVar10);
uVar11 = 4;
if (iVar9 == 0) {
local_80 = (ulong)*(uint *)(lVar10 + 0x40);
uVar11 = 3;
if (((long)local_38 <= (long)(uVar3 - local_80)) && (uVar11 = 0, uVar1 == uVar2)) {
memmove((void *)((local_38 << ((byte)local_58 & 0x3f)) +
(ulong)*(uint *)(local_68 + 0x20) + *(long *)(local_60 + 0x10)),
(void *)((ulong)*(uint *)(local_50 + 0x20) + *(long *)(lVar6 + 0x10)),
local_80 << ((byte)local_58 & 0x3f));
uVar11 = 5;
}
}
switch(uVar11) {
case 0:
switchD_0018001d_caseD_0:
uVar8 = local_80;
if (0 < (long)local_80) {
uVar12 = 0;
uVar14 = 1;
uVar18 = local_38;
do {
auVar20 = JS_GetPropertyInt64(param_1,lVar10,auVar19._8_8_,uVar12);
if (auVar20._8_4_ == 6) goto LAB_0017ff05;
iVar9 = typed_array_is_oob(param_2);
iVar16 = (int)uVar18;
if (iVar9 == 0) {
dVar13 = (double)(uVar18 & 0xffffffff);
if (-1 < iVar16) {
dVar13 = (double)(uVar18 & 0xffffffff);
}
uVar15 = 7;
if (-1 < iVar16) {
uVar15 = 0;
}
local_78._0_4_ = auVar20._0_4_;
iVar9 = JS_SetPropertyValue(param_1,local_48,local_40,dVar13,uVar15,0x4000,
local_78._0_4_,auVar20._8_4_);
local_78 = auVar20;
if (iVar9 < 0) goto LAB_0017ff05;
}
else {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar20._0_8_,auVar20._8_8_);
}
uVar18 = (ulong)(iVar16 + 1);
bVar7 = (long)uVar14 < (long)uVar8;
uVar12 = uVar14;
uVar14 = (ulong)((int)uVar14 + 1);
} while (bVar7);
}
case 5:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar10,auVar19._8_8_);
return 0;
default:
return 0;
case 3:
goto switchD_0018001d_caseD_3;
case 4:
goto LAB_0017feab;
}
}
iVar9 = js_get_length64(param_1,&local_80,lVar10);
if (iVar9 != 0) goto LAB_0017ff05;
if ((long)local_38 <= (long)(uVar3 - local_80)) goto switchD_0018001d_caseD_0;
}
switchD_0018001d_caseD_3:
JS_ThrowRangeError(param_1,"invalid array length");
LAB_0017ff05:
local_98 = auVar19._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_98,auVar19._8_8_);
return 0;
}
|
|
57,384
|
js_typed_array_set
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_typed_array_set(JSContext *ctx,
JSValue this_val,
int argc, JSValue *argv)
{
JSValue offset = JS_UNDEFINED;
if (argc > 1) {
offset = argv[1];
}
return js_typed_array_set_internal(ctx, this_val, argv[0], offset);
}
|
O3
|
c
|
js_typed_array_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
cmpl $0x2, %ecx
jl 0x828e7
movq 0x10(%r8), %rdx
movq 0x18(%r8), %rcx
jmp 0x828ee
movl $0x3, %ecx
xorl %edx, %edx
cmpl $-0x1, %r13d
jne 0x82960
movzwl 0x6(%rbp), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jae 0x82960
movq (%r8), %r12
movq 0x8(%r8), %r15
cmpl $-0x9, %ecx
jb 0x8290f
incl (%rdx)
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0x2723e
movl $0x6, %r14d
testl %eax, %eax
jne 0x82977
movq 0x58(%rsp), %rax
testq %rax, %rax
js 0x8298b
movq %rax, 0x20(%rsp)
movq %rbp, %rdi
callq 0x39ddd
testl %eax, %eax
je 0x829aa
movl $0x3, %r12d
xorl %r15d, %r15d
leaq 0x21383(%rip), %rsi # 0xa3cd4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2214f
jmp 0x82a58
leaq 0x2135c(%rip), %rsi # 0xa3cc3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %r14d
xorl %eax, %eax
movq %r14, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, %r12d
xorl %r15d, %r15d
leaq 0x1e0cb(%rip), %rsi # 0xa0a66
movq %rbx, %rdi
xorl %eax, %eax
callq 0x205f0
jmp 0x82a58
movl 0x40(%rbp), %eax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x268d8
movq %rax, %r15
movq %rdx, %r12
cmpl $0x6, %r12d
je 0x82a58
movzwl 0x6(%r15), %ecx
leal -0x15(%rcx), %eax
cmpw $0xb, %ax
ja 0x82a41
movq %rcx, 0x30(%rsp)
movq %r12, 0x8(%rsp)
movq 0x30(%rbp), %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%r15), %rax
movq %rax, 0x50(%rsp)
movq 0x18(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, 0x40(%rsp)
movzwl 0x6(%rbp), %r12d
leaq 0x1c73f(%rip), %rax # 0x9f15f
movzbl -0x15(%r12,%rax), %eax
movq %rax, 0x38(%rsp)
movq %r15, %rdi
callq 0x39ddd
testl %eax, %eax
je 0x82a88
movq 0x8(%rsp), %r12
jmp 0x8294a
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0x226df
testl %eax, %eax
je 0x82acb
cmpl $-0x9, %r12d
jb 0x82977
movq 0x18(%rbx), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x82977
movq %r15, %rsi
movq %r12, %rdx
callq 0x20d90
jmp 0x82977
movq 0x28(%rsp), %r10
movq 0x48(%rsp), %r9
movq 0x38(%rsp), %rcx
movq 0x50(%rsp), %rsi
movq 0x40(%rsp), %r8
movq %r15, 0x10(%rsp)
movl 0x40(%r15), %edx
movq 0x18(%rsp), %rax
subq %rdx, %rax
movq 0x20(%rsp), %rdi
cmpq %rax, %rdi
jle 0x82ae8
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %r15
jmp 0x82994
movq 0x60(%rsp), %rdx
movq 0x18(%rsp), %rax
subq %rdx, %rax
movq 0x20(%rsp), %rdi
cmpq %rax, %rdi
jg 0x82994
jmp 0x82b21
cmpw %r12w, 0x30(%rsp)
jne 0x82b17
movl 0x20(%r10), %eax
addq 0x10(%r9), %rax
shlq %cl, %rdi
addq %rax, %rdi
movl 0x20(%rsi), %esi
addq 0x10(%r8), %rsi
shlq %cl, %rdx
callq 0xe710
movq 0x8(%rsp), %r12
jmp 0x82c09
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %r15
movq %r15, 0x10(%rsp)
testq %rdx, %rdx
jle 0x82c09
movl $0x1, %r15d
xorl %ecx, %ecx
movq %r12, 0x8(%rsp)
movq %rdx, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x23bcc
movq %rax, 0x18(%rsp)
movq %rdx, %r12
cmpl $0x6, %r12d
je 0x82c37
movq %rbp, %rdi
callq 0x39ddd
testl %eax, %eax
je 0x82b9e
cmpl $-0x9, %r12d
jb 0x82be9
movq 0x18(%rbx), %rdi
movq 0x18(%rsp), %rdx
movl (%rdx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rdx)
cmpl $0x1, %eax
jg 0x82be9
movq 0x18(%rsp), %rsi
movq %r12, %rdx
callq 0x20d90
jmp 0x82be9
movq 0x20(%rsp), %rcx
movl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
testl %ecx, %ecx
movq %xmm0, %rcx
cmovnsq %rax, %rcx
movl $0x7, %r8d
movl $0x0, %eax
cmovnsq %rax, %r8
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq 0x18(%rsp), %r9
pushq $0x4000 # imm = 0x4000
pushq %r12
callq 0x24773
addq $0x10, %rsp
testl %eax, %eax
js 0x82c37
movl %r15d, %ecx
movq 0x20(%rsp), %rdi
incl %edi
incl %r15d
movq 0x28(%rsp), %rdx
cmpq %rcx, %rdx
movq 0x8(%rsp), %r12
ja 0x82b41
movl $0x3, %r14d
cmpl $-0x9, %r12d
jb 0x82977
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x82977
jmp 0x82a7b
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %r15
jmp 0x82a58
|
js_typed_array_set:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r13, rdx
mov rbp, rsi
mov rbx, rdi
cmp ecx, 2
jl short loc_828E7
mov rdx, [r8+10h]
mov rcx, [r8+18h]
jmp short loc_828EE
loc_828E7:
mov ecx, 3
xor edx, edx
loc_828EE:
cmp r13d, 0FFFFFFFFh
jnz short loc_82960
movzx eax, word ptr [rbp+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jnb short loc_82960
mov r12, [r8]
mov r15, [r8+8]
cmp ecx, 0FFFFFFF7h
jb short loc_8290F
inc dword ptr [rdx]
loc_8290F:
lea rsi, [rsp+98h+var_40]
mov rdi, rbx
call JS_ToInt64SatFree
mov r14d, 6
test eax, eax
jnz short loc_82977
mov rax, [rsp+98h+var_40]
test rax, rax
js short loc_8298B
mov [rsp+98h+var_78], rax
mov rdi, rbp
call typed_array_is_oob
test eax, eax
jz short loc_829AA
mov r12d, 3
xor r15d, r15d
loc_8294A:
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp loc_82A58
loc_82960:
lea rsi, aNotATypedarray; "not a TypedArray"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
loc_82977:
xor eax, eax
mov rdx, r14
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8298B:
mov r12d, 3
xor r15d, r15d
loc_82994:
lea rsi, aInvalidArrayLe; "invalid array length"
mov rdi, rbx
xor eax, eax
call JS_ThrowRangeError
jmp loc_82A58
loc_829AA:
mov eax, [rbp+40h]
mov [rsp+98h+var_80], rax
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call JS_ToObject
mov r15, rax
mov r12, rdx
cmp r12d, 6
jz loc_82A58
movzx ecx, word ptr [r15+6]
lea eax, [rcx-15h]
cmp ax, 0Bh
ja short loc_82A41
mov [rsp+98h+var_68], rcx
mov [rsp+98h+var_90], r12
mov rax, [rbp+30h]
mov [rsp+98h+var_70], rax
mov rax, [rax+18h]
mov rax, [rax+30h]
mov [rsp+98h+var_50], rax
mov rax, [r15+30h]
mov [rsp+98h+var_48], rax
mov rax, [rax+18h]
mov rax, [rax+30h]
mov [rsp+98h+var_58], rax
movzx r12d, word ptr [rbp+6]
lea rax, typed_array_size_log2
movzx eax, byte ptr [r12+rax-15h]
mov [rsp+98h+var_60], rax
mov rdi, r15
call typed_array_is_oob
test eax, eax
jz short loc_82A88
mov r12, [rsp+98h+var_90]
jmp loc_8294A
loc_82A41:
lea rsi, [rsp+98h+var_38]
mov rdi, rbx
mov rdx, r15
mov rcx, r12
call js_get_length64
test eax, eax
jz short loc_82ACB
loc_82A58:
cmp r12d, 0FFFFFFF7h
jb loc_82977
mov rdi, [rbx+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg loc_82977
mov rsi, r15
loc_82A7B:
mov rdx, r12
call js_free_value_rt
jmp loc_82977
loc_82A88:
mov r10, [rsp+98h+var_70]
mov r9, [rsp+98h+var_50]
mov rcx, [rsp+98h+var_60]
mov rsi, [rsp+98h+var_48]
mov r8, [rsp+98h+var_58]
mov [rsp+98h+var_88], r15
mov edx, [r15+40h]
mov rax, [rsp+98h+var_80]
sub rax, rdx
mov rdi, [rsp+98h+var_78]
cmp rdi, rax
jle short loc_82AE8
mov r12, [rsp+98h+var_90]
mov r15, [rsp+98h+var_88]
jmp loc_82994
loc_82ACB:
mov rdx, [rsp+98h+var_38]
mov rax, [rsp+98h+var_80]
sub rax, rdx
mov rdi, [rsp+98h+var_78]
cmp rdi, rax
jg loc_82994
jmp short loc_82B21
loc_82AE8:
cmp word ptr [rsp+98h+var_68], r12w
jnz short loc_82B17
mov eax, [r10+20h]
add rax, [r9+10h]
shl rdi, cl
add rdi, rax
mov esi, [rsi+20h]
add rsi, [r8+10h]
shl rdx, cl
call _memmove
mov r12, [rsp+98h+var_90]
jmp loc_82C09
loc_82B17:
mov r12, [rsp+98h+var_90]
mov r15, [rsp+98h+var_88]
loc_82B21:
mov [rsp+98h+var_88], r15
test rdx, rdx
jle loc_82C09
mov r15d, 1
xor ecx, ecx
mov [rsp+98h+var_90], r12
mov [rsp+98h+var_70], rdx
loc_82B41:
mov [rsp+98h+var_78], rdi
mov rdi, rbx
mov rsi, [rsp+98h+var_88]
mov rdx, r12
call JS_GetPropertyInt64
mov [rsp+98h+var_80], rax
mov r12, rdx
cmp r12d, 6
jz loc_82C37
mov rdi, rbp
call typed_array_is_oob
test eax, eax
jz short loc_82B9E
cmp r12d, 0FFFFFFF7h
jb short loc_82BE9
mov rdi, [rbx+18h]
mov rdx, [rsp+98h+var_80]
mov eax, [rdx]
lea ecx, [rax-1]
mov [rdx], ecx
cmp eax, 1
jg short loc_82BE9
mov rsi, [rsp+98h+var_80]
mov rdx, r12
call js_free_value_rt
jmp short loc_82BE9
loc_82B9E:
mov rcx, [rsp+98h+var_78]
mov eax, ecx
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
test ecx, ecx
movq rcx, xmm0
cmovns rcx, rax
mov r8d, 7
mov eax, 0
cmovns r8, rax
mov rdi, rbx
mov rsi, rbp
mov rdx, r13
mov r9, [rsp+98h+var_80]
push 4000h
push r12
call JS_SetPropertyValue
add rsp, 10h
test eax, eax
js short loc_82C37
loc_82BE9:
mov ecx, r15d
mov rdi, [rsp+98h+var_78]
inc edi
inc r15d
mov rdx, [rsp+98h+var_70]
cmp rdx, rcx
mov r12, [rsp+98h+var_90]
ja loc_82B41
loc_82C09:
mov r14d, 3
cmp r12d, 0FFFFFFF7h
jb loc_82977
mov rdi, [rbx+18h]
mov rsi, [rsp+98h+var_88]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg loc_82977
jmp loc_82A7B
loc_82C37:
mov r12, [rsp+98h+var_90]
mov r15, [rsp+98h+var_88]
jmp loc_82A58
|
long long js_typed_array_set(
long long a1,
long long a2,
unsigned long long a3,
int a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_DWORD *v16; // rdx
long long v17; // rcx
long long v18; // r12
long long v19; // r15
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rdx
long long v27; // rcx
long long v28; // r8
long long v29; // r9
long long v30; // r12
_DWORD *v31; // r15
long long v33; // rax
long long v34; // rdx
long long v35; // r12
long long v36; // rdi
int v37; // eax
long long v38; // rcx
_QWORD *v39; // rsi
int v40; // edi
unsigned int v41; // r15d
unsigned long long v42; // rcx
long long v43; // rdx
long long v44; // r12
double v45; // xmm4_8
double v46; // xmm5_8
long long v47; // rdi
int v48; // eax
long long v49; // rcx
double v50; // rcx
long long v51; // r8
int v52; // eax
char v53; // [rsp+0h] [rbp-98h]
long long v54; // [rsp+8h] [rbp-90h]
long long v55; // [rsp+8h] [rbp-90h]
_DWORD *v56; // [rsp+10h] [rbp-88h]
long long v57; // [rsp+18h] [rbp-80h]
_QWORD *PropertyInt64; // [rsp+18h] [rbp-80h]
long long v59; // [rsp+20h] [rbp-78h]
int v60; // [rsp+20h] [rbp-78h]
long long v61; // [rsp+28h] [rbp-70h]
unsigned long long v62; // [rsp+28h] [rbp-70h]
__int16 v63; // [rsp+30h] [rbp-68h]
long long v64; // [rsp+38h] [rbp-60h]
long long v65; // [rsp+40h] [rbp-58h]
long long v66; // [rsp+48h] [rbp-50h]
long long v67; // [rsp+50h] [rbp-48h]
long long v68; // [rsp+58h] [rbp-40h] BYREF
long long v69[7]; // [rsp+60h] [rbp-38h] BYREF
if ( a4 < 2 )
{
v17 = 3LL;
v16 = 0LL;
}
else
{
v16 = (_DWORD *)a5[2];
v17 = a5[3];
}
if ( (_DWORD)a3 != -1 || (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu )
{
JS_ThrowTypeError(
a1,
(long long)"not a TypedArray",
(long long)v16,
v17,
(long long)a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v53);
return 0LL;
}
v18 = *a5;
v19 = a5[1];
if ( (unsigned int)v17 >= 0xFFFFFFF7 )
++*v16;
if ( !(unsigned int)JS_ToInt64SatFree(a1, (unsigned long long *)&v68, (long long)v16, v17) )
{
if ( v68 < 0 )
{
v30 = 3LL;
v31 = 0LL;
LABEL_16:
JS_ThrowRangeError(
a1,
(long long)"invalid array length",
v20,
v21,
v22,
v23,
a7,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v53);
goto LABEL_22;
}
v59 = v68;
if ( typed_array_is_oob(a2) )
{
v30 = 3LL;
v31 = 0LL;
LABEL_12:
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v26,
v27,
v28,
v29,
a7,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v53);
goto LABEL_22;
}
v57 = *(unsigned int *)(a2 + 64);
v33 = JS_ToObject(a1, v18, v19, v27, v28, v29, a7, a8, a9, a10, v24, v25, a13, a14);
v31 = (_DWORD *)v33;
v30 = v34;
if ( (_DWORD)v34 == 6 )
goto LABEL_22;
if ( (unsigned __int16)(*(_WORD *)(v33 + 6) - 21) > 0xBu )
{
if ( (unsigned int)js_get_length64(a1, v69, v33, v34) )
goto LABEL_22;
v20 = v69[0];
v40 = v59;
if ( v59 > v57 - v69[0] )
goto LABEL_16;
}
else
{
v63 = *(_WORD *)(v33 + 6);
v54 = v34;
v61 = *(_QWORD *)(a2 + 48);
v66 = *(_QWORD *)(*(_QWORD *)(v61 + 24) + 48LL);
v67 = *(_QWORD *)(v33 + 48);
v65 = *(_QWORD *)(*(_QWORD *)(v67 + 24) + 48LL);
v35 = *(unsigned __int16 *)(a2 + 6);
v64 = (unsigned __int8)typed_array_size_log2[v35 - 21];
if ( typed_array_is_oob(v33) )
{
v30 = v54;
goto LABEL_12;
}
v23 = v66;
v21 = v64;
v22 = v65;
v56 = v31;
v20 = (unsigned int)v31[16];
v40 = v59;
if ( v59 > v57 - v20 )
{
v30 = v54;
goto LABEL_16;
}
if ( v63 == (_WORD)v35 )
{
memmove(
*(_QWORD *)(v66 + 16) + *(unsigned int *)(v61 + 32) + (v59 << v64),
*(_QWORD *)(v65 + 16) + *(unsigned int *)(v67 + 32),
v20 << v64);
v30 = v54;
goto LABEL_46;
}
v30 = v54;
}
v56 = v31;
if ( v20 > 0 )
{
v41 = 1;
v42 = 0LL;
v55 = v30;
v62 = v20;
while ( 1 )
{
v60 = v40;
PropertyInt64 = (_QWORD *)JS_GetPropertyInt64(a1, (long long)v56, v30, v42);
v44 = v43;
if ( (_DWORD)v43 == 6 )
break;
if ( typed_array_is_oob(a2) )
{
if ( (unsigned int)v44 >= 0xFFFFFFF7 )
{
v47 = *(_QWORD *)(a1 + 24);
v48 = *(_DWORD *)PropertyInt64;
v49 = (unsigned int)(*(_DWORD *)PropertyInt64 - 1);
*(_DWORD *)PropertyInt64 = v49;
if ( v48 <= 1 )
js_free_value_rt(v47, PropertyInt64, v44, v49, v22, v23);
}
}
else
{
v50 = (double)v40;
if ( v40 >= 0 )
*(_QWORD *)&v50 = (unsigned int)v40;
v51 = 7LL;
if ( v40 >= 0 )
v51 = 0LL;
if ( (int)JS_SetPropertyValue(
a1,
a2,
a3,
*(int **)&v50,
v51,
(long long)PropertyInt64,
(double)v40,
a8,
a9,
a10,
v45,
v46,
a13,
a14,
v44,
0x4000u) < 0 )
break;
}
v42 = v41;
v40 = v60 + 1;
++v41;
v30 = v55;
if ( v62 <= v42 )
goto LABEL_46;
}
v30 = v55;
v31 = v56;
LABEL_22:
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
{
v36 = *(_QWORD *)(a1 + 24);
v37 = *v31;
v38 = (unsigned int)(*v31 - 1);
*v31 = v38;
if ( v37 <= 1 )
{
v39 = v31;
LABEL_25:
js_free_value_rt(v36, v39, v30, v38, v22, v23);
return 0LL;
}
}
return 0LL;
}
LABEL_46:
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
{
v36 = *(_QWORD *)(a1 + 24);
v39 = v56;
v52 = *v56;
v38 = (unsigned int)(*v56 - 1);
*v56 = v38;
if ( v52 <= 1 )
goto LABEL_25;
}
}
return 0LL;
}
|
js_typed_array_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R13,RDX
MOV RBP,RSI
MOV RBX,RDI
CMP ECX,0x2
JL 0x001828e7
MOV RDX,qword ptr [R8 + 0x10]
MOV RCX,qword ptr [R8 + 0x18]
JMP 0x001828ee
LAB_001828e7:
MOV ECX,0x3
XOR EDX,EDX
LAB_001828ee:
CMP R13D,-0x1
JNZ 0x00182960
MOVZX EAX,word ptr [RBP + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JNC 0x00182960
MOV R12,qword ptr [R8]
MOV R15,qword ptr [R8 + 0x8]
CMP ECX,-0x9
JC 0x0018290f
INC dword ptr [RDX]
LAB_0018290f:
LEA RSI,[RSP + 0x58]
MOV RDI,RBX
CALL 0x0012723e
MOV R14D,0x6
TEST EAX,EAX
JNZ 0x00182977
MOV RAX,qword ptr [RSP + 0x58]
TEST RAX,RAX
JS 0x0018298b
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,RBP
CALL 0x00139ddd
TEST EAX,EAX
JZ 0x001829aa
MOV R12D,0x3
XOR R15D,R15D
LAB_0018294a:
LEA RSI,[0x1a3cd4]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012214f
JMP 0x00182a58
LAB_00182960:
LEA RSI,[0x1a3cc3]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012214f
MOV R14D,0x6
LAB_00182977:
XOR EAX,EAX
MOV RDX,R14
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018298b:
MOV R12D,0x3
XOR R15D,R15D
LAB_00182994:
LEA RSI,[0x1a0a66]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001205f0
JMP 0x00182a58
LAB_001829aa:
MOV EAX,dword ptr [RBP + 0x40]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL 0x001268d8
MOV R15,RAX
MOV R12,RDX
CMP R12D,0x6
JZ 0x00182a58
MOVZX ECX,word ptr [R15 + 0x6]
LEA EAX,[RCX + -0x15]
CMP AX,0xb
JA 0x00182a41
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x8],R12
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [R15 + 0x30]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x40],RAX
MOVZX R12D,word ptr [RBP + 0x6]
LEA RAX,[0x19f15f]
MOVZX EAX,byte ptr [R12 + RAX*0x1 + -0x15]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,R15
CALL 0x00139ddd
TEST EAX,EAX
JZ 0x00182a88
MOV R12,qword ptr [RSP + 0x8]
JMP 0x0018294a
LAB_00182a41:
LEA RSI,[RSP + 0x60]
MOV RDI,RBX
MOV RDX,R15
MOV RCX,R12
CALL 0x001226df
TEST EAX,EAX
JZ 0x00182acb
LAB_00182a58:
CMP R12D,-0x9
JC 0x00182977
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x00182977
MOV RSI,R15
LAB_00182a7b:
MOV RDX,R12
CALL 0x00120d90
JMP 0x00182977
LAB_00182a88:
MOV R10,qword ptr [RSP + 0x28]
MOV R9,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x50]
MOV R8,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x10],R15
MOV EDX,dword ptr [R15 + 0x40]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RDX
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,RAX
JLE 0x00182ae8
MOV R12,qword ptr [RSP + 0x8]
MOV R15,qword ptr [RSP + 0x10]
JMP 0x00182994
LAB_00182acb:
MOV RDX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RDX
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,RAX
JG 0x00182994
JMP 0x00182b21
LAB_00182ae8:
CMP word ptr [RSP + 0x30],R12W
JNZ 0x00182b17
MOV EAX,dword ptr [R10 + 0x20]
ADD RAX,qword ptr [R9 + 0x10]
SHL RDI,CL
ADD RDI,RAX
MOV ESI,dword ptr [RSI + 0x20]
ADD RSI,qword ptr [R8 + 0x10]
SHL RDX,CL
CALL 0x0010e710
MOV R12,qword ptr [RSP + 0x8]
JMP 0x00182c09
LAB_00182b17:
MOV R12,qword ptr [RSP + 0x8]
MOV R15,qword ptr [RSP + 0x10]
LAB_00182b21:
MOV qword ptr [RSP + 0x10],R15
TEST RDX,RDX
JLE 0x00182c09
MOV R15D,0x1
XOR ECX,ECX
MOV qword ptr [RSP + 0x8],R12
MOV qword ptr [RSP + 0x28],RDX
LAB_00182b41:
MOV qword ptr [RSP + 0x20],RDI
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R12
CALL 0x00123bcc
MOV qword ptr [RSP + 0x18],RAX
MOV R12,RDX
CMP R12D,0x6
JZ 0x00182c37
MOV RDI,RBP
CALL 0x00139ddd
TEST EAX,EAX
JZ 0x00182b9e
CMP R12D,-0x9
JC 0x00182be9
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RDX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDX],ECX
CMP EAX,0x1
JG 0x00182be9
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,R12
CALL 0x00120d90
JMP 0x00182be9
LAB_00182b9e:
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,ECX
XORPS XMM0,XMM0
CVTSI2SD XMM0,RAX
TEST ECX,ECX
MOVQ RCX,XMM0
CMOVNS RCX,RAX
MOV R8D,0x7
MOV EAX,0x0
CMOVNS R8,RAX
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R13
MOV R9,qword ptr [RSP + 0x18]
PUSH 0x4000
PUSH R12
CALL 0x00124773
ADD RSP,0x10
TEST EAX,EAX
JS 0x00182c37
LAB_00182be9:
MOV ECX,R15D
MOV RDI,qword ptr [RSP + 0x20]
INC EDI
INC R15D
MOV RDX,qword ptr [RSP + 0x28]
CMP RDX,RCX
MOV R12,qword ptr [RSP + 0x8]
JA 0x00182b41
LAB_00182c09:
MOV R14D,0x3
CMP R12D,-0x9
JC 0x00182977
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00182977
JMP 0x00182a7b
LAB_00182c37:
MOV R12,qword ptr [RSP + 0x8]
MOV R15,qword ptr [RSP + 0x10]
JMP 0x00182a58
|
int1 [16]
js_typed_array_set(long param_1,long param_2,int8 param_3,int param_4,int8 *param_5)
{
byte bVar1;
ushort uVar2;
ushort uVar3;
int8 uVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
bool bVar9;
int iVar10;
int *piVar11;
uint uVar12;
int iVar13;
ulong uVar14;
double dVar15;
int *piVar16;
ulong uVar17;
ulong uVar18;
int8 uVar19;
ulong uVar20;
ulong uVar21;
int1 auVar22 [16];
int1 auVar23 [16];
ulong local_40;
ulong local_38;
if (param_4 < 2) {
uVar12 = 3;
piVar16 = (int *)0x0;
}
else {
piVar16 = (int *)param_5[2];
uVar12 = (uint)param_5[3];
}
if (((int)param_3 != -1) || (0xb < (ushort)(*(short *)(param_2 + 6) - 0x15U))) {
JS_ThrowTypeError(param_1,"not a TypedArray");
uVar20 = 6;
goto LAB_00182977;
}
uVar19 = *param_5;
uVar4 = param_5[1];
if (0xfffffff6 < uVar12) {
*piVar16 = *piVar16 + 1;
}
iVar10 = JS_ToInt64SatFree(param_1,&local_40);
uVar20 = 6;
if (iVar10 != 0) goto LAB_00182977;
if ((long)local_40 < 0) {
auVar22 = ZEXT816(3) << 0x40;
goto LAB_00182994;
}
iVar10 = typed_array_is_oob(param_2);
if (iVar10 == 0) {
uVar12 = *(uint *)(param_2 + 0x40);
auVar22 = JS_ToObject(param_1,uVar19,uVar4);
piVar16 = auVar22._0_8_;
if (auVar22._8_4_ == 6) goto LAB_00182a58;
uVar2 = *(ushort *)((long)piVar16 + 6);
if (0xb < (ushort)(uVar2 - 0x15)) {
iVar10 = js_get_length64(param_1,&local_38,piVar16,auVar22._8_8_);
if (iVar10 == 0) {
uVar17 = local_38;
if ((long)local_40 <= (long)(uVar12 - local_38)) {
LAB_00182b21:
if (0 < (long)uVar17) {
uVar14 = 0;
uVar18 = local_40;
uVar21 = 1;
do {
auVar23 = JS_GetPropertyInt64(param_1,piVar16,auVar22._8_8_,uVar14);
piVar11 = auVar23._0_8_;
if (auVar23._8_4_ == 6) goto LAB_00182a58;
iVar10 = typed_array_is_oob(param_2);
iVar13 = (int)uVar18;
if (iVar10 == 0) {
dVar15 = (double)(uVar18 & 0xffffffff);
if (-1 < iVar13) {
dVar15 = (double)(uVar18 & 0xffffffff);
}
uVar19 = 7;
if (-1 < iVar13) {
uVar19 = 0;
}
iVar10 = JS_SetPropertyValue(param_1,param_2,param_3,dVar15,uVar19,piVar11,
auVar23._8_8_,0x4000);
if (iVar10 < 0) goto LAB_00182a58;
}
else if (0xfffffff6 < auVar23._8_4_) {
uVar19 = *(int8 *)(param_1 + 0x18);
iVar10 = *piVar11;
*piVar11 = iVar10 + -1;
if (iVar10 < 2) {
js_free_value_rt(uVar19,piVar11,auVar23._8_8_);
}
}
uVar18 = (ulong)(iVar13 + 1);
bVar9 = uVar21 < uVar17;
uVar14 = uVar21;
uVar21 = (ulong)((int)uVar21 + 1);
} while (bVar9);
}
goto LAB_00182c09;
}
LAB_00182994:
JS_ThrowRangeError(param_1,"invalid array length");
}
goto LAB_00182a58;
}
lVar5 = *(long *)(param_2 + 0x30);
lVar6 = *(long *)(*(long *)(lVar5 + 0x18) + 0x30);
lVar7 = *(long *)(piVar16 + 0xc);
lVar8 = *(long *)(*(long *)(lVar7 + 0x18) + 0x30);
uVar3 = *(ushort *)(param_2 + 6);
bVar1 = "toSorted"[(ulong)uVar3 + 6];
iVar10 = typed_array_is_oob(piVar16);
if (iVar10 != 0) goto LAB_0018294a;
uVar17 = (ulong)(uint)piVar16[0x10];
if ((long)(uVar12 - uVar17) < (long)local_40) goto LAB_00182994;
if (uVar2 != uVar3) goto LAB_00182b21;
memmove((void *)((local_40 << (bVar1 & 0x3f)) +
(ulong)*(uint *)(lVar5 + 0x20) + *(long *)(lVar6 + 0x10)),
(void *)((ulong)*(uint *)(lVar7 + 0x20) + *(long *)(lVar8 + 0x10)),
uVar17 << (bVar1 & 0x3f));
LAB_00182c09:
uVar20 = 3;
if (auVar22._8_4_ < 0xfffffff7) goto LAB_00182977;
uVar19 = *(int8 *)(param_1 + 0x18);
iVar10 = *piVar16;
*piVar16 = iVar10 + -1;
}
else {
auVar22 = ZEXT816(3) << 0x40;
LAB_0018294a:
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
LAB_00182a58:
if (auVar22._8_4_ < 0xfffffff7) goto LAB_00182977;
uVar19 = *(int8 *)(param_1 + 0x18);
iVar10 = *auVar22._0_8_;
*auVar22._0_8_ = iVar10 + -1;
}
if (iVar10 < 2) {
js_free_value_rt(uVar19,auVar22._0_8_,auVar22._8_8_);
}
LAB_00182977:
auVar22._8_8_ = 0;
auVar22._0_8_ = uVar20;
return auVar22 << 0x40;
}
|
|
57,385
|
my_error_unregister
|
eloqsql/mysys/my_error.c
|
my_bool my_error_unregister(uint first, uint last)
{
struct my_err_head *meh_p;
struct my_err_head **search_meh_pp;
/* Search for the registration in the list. */
for (search_meh_pp= &my_errmsgs_list;
*search_meh_pp;
search_meh_pp= &(*search_meh_pp)->meh_next)
{
if (((*search_meh_pp)->meh_first == first) &&
((*search_meh_pp)->meh_last == last))
break;
}
if (! *search_meh_pp)
return TRUE;
/* Remove header from the chain. */
meh_p= *search_meh_pp;
*search_meh_pp= meh_p->meh_next;
my_free(meh_p);
return FALSE;
}
|
O0
|
c
|
my_error_unregister:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x1cfcd3(%rip), %rax # 0x2bf9c8
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0xefd32
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0xefd23
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x14(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xefd23
jmp 0xefd32
jmp 0xefd25
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xefcf9
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xefd42
movb $0x1, -0x1(%rbp)
jmp 0xefd68
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
callq 0xf3ba0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_error_unregister:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], edi
mov [rbp+var_C], esi
lea rax, my_errmsgs_list
mov [rbp+var_20], rax
loc_EFCF9:
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_EFD32
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+10h]
cmp eax, [rbp+var_8]
jnz short loc_EFD23
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+14h]
cmp eax, [rbp+var_C]
jnz short loc_EFD23
jmp short loc_EFD32
loc_EFD23:
jmp short $+2
loc_EFD25:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_EFCF9
loc_EFD32:
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jnz short loc_EFD42
mov [rbp+var_1], 1
jmp short loc_EFD68
loc_EFD42:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rcx, [rax]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rdi, [rbp+var_18]
call my_free
mov [rbp+var_1], 0
loc_EFD68:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char my_error_unregister(int a1, int a2)
{
long long **i; // [rsp+0h] [rbp-20h]
long long *v4; // [rsp+8h] [rbp-18h]
for ( i = &my_errmsgs_list; *i && (*((_DWORD *)*i + 4) != a1 || *((_DWORD *)*i + 5) != a2); i = (long long **)*i )
;
if ( !*i )
return 1;
v4 = *i;
*i = (long long *)**i;
my_free(v4);
return 0;
}
|
my_error_unregister:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],ESI
LEA RAX,[0x3bf9c8]
MOV qword ptr [RBP + -0x20],RAX
LAB_001efcf9:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x001efd32
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x10]
CMP EAX,dword ptr [RBP + -0x8]
JNZ 0x001efd23
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x14]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x001efd23
JMP 0x001efd32
LAB_001efd23:
JMP 0x001efd25
LAB_001efd25:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001efcf9
LAB_001efd32:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JNZ 0x001efd42
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001efd68
LAB_001efd42:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001f3ba0
MOV byte ptr [RBP + -0x1],0x0
LAB_001efd68:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
bool my_error_unregister(int param_1,int param_2)
{
long *plVar1;
int *puVar2;
int **local_28;
bool local_9;
for (local_28 = &my_errmsgs_list;
(*local_28 != (int *)0x0 &&
((*(int *)(*local_28 + 0x10) != param_1 || (*(int *)(*local_28 + 0x14) != param_2))));
local_28 = (int **)*local_28) {
}
puVar2 = *local_28;
if (puVar2 != (int *)0x0) {
plVar1 = (long *)*local_28;
*local_28 = (int *)*plVar1;
my_free(plVar1);
}
local_9 = puVar2 == (int *)0x0;
return local_9;
}
|
|
57,386
|
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>::size() const
|
llama.cpp/common/json.hpp
|
size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types have size 1
return 1;
}
}
}
|
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>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x8869e
cmpl $0x1, %eax
je 0x8867b
cmpl $0x2, %eax
jne 0x88699
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
retq
movl $0x1, %eax
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_8869E
cmp eax, 1
jz short loc_8867B
cmp eax, 2
jnz short loc_88699
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_8867B:
mov rax, [rdi+8]
mov rcx, [rax+8]
sub rcx, [rax]
sar rcx, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rcx
retn
loc_88699:
mov eax, 1
locret_8869E:
retn
|
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>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4);
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
|
size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0018869e
CMP EAX,0x1
JZ 0x0018867b
CMP EAX,0x2
JNZ 0x00188699
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_0018867b:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
SAR RCX,0x4
MOV RAX,-0x5555555555555555
IMUL RAX,RCX
RET
LAB_00188699:
MOV EAX,0x1
LAB_0018869e:
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::size() const */
ulong __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>
::size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
|
|
57,387
|
my_casedn_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_tolower_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O3
|
c
|
my_casedn_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x6687b
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0x6687b
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0x6685d
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x6685d
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0x6687b
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0x66816
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_casedn_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_6687B
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_66816:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_6687B
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_6685D
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_6685D
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4+4]
mov [rbp+var_40], rsi
loc_6685D:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_6687B
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_66816
loc_6687B:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17 + 4);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
|
my_casedn_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x0016687b
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_00166816:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x0016687b
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x0016685d
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x0016685d
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_0016685d:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x0016687b
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x00166816
LAB_0016687b:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + 4 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
|
|
57,388
|
init_io_cache_share
|
eloqsql/mysys/mf_iocache.c
|
void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
IO_CACHE *write_cache, uint num_threads)
{
DBUG_ENTER("init_io_cache_share");
DBUG_PRINT("io_cache_share", ("read_cache: %p share: %p "
"write_cache: %p threads: %u",
read_cache, cshare,
write_cache, num_threads));
DBUG_ASSERT(num_threads > 1);
DBUG_ASSERT(read_cache->type == READ_CACHE);
DBUG_ASSERT(!write_cache || (write_cache->type == WRITE_CACHE));
mysql_mutex_init(key_IO_CACHE_SHARE_mutex,
&cshare->mutex, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_IO_CACHE_SHARE_cond, &cshare->cond, 0);
mysql_cond_init(key_IO_CACHE_SHARE_cond_writer, &cshare->cond_writer, 0);
cshare->running_threads= num_threads;
cshare->total_threads= num_threads;
cshare->error= 0; /* Initialize. */
cshare->buffer= read_cache->buffer;
cshare->read_end= NULL; /* See function comment of lock_io_cache(). */
cshare->pos_in_file= 0; /* See function comment of lock_io_cache(). */
cshare->source_cache= write_cache; /* Can be NULL. */
read_cache->share= cshare;
read_cache->read_function= _my_b_cache_read_r;
if (write_cache)
{
write_cache->share= cshare;
write_cache->write_function= _my_b_cache_write_r;
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
init_io_cache_share:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
jmp 0x6ebc9
jmp 0x6ebcb
jmp 0x6ebcd
jmp 0x6ebcf
jmp 0x6ebd1
jmp 0x6ebd3
jmp 0x6ebd5
leaq 0x3895dc(%rip), %rax # 0x3f81b8
movl (%rax), %edi
movq -0x10(%rbp), %rsi
leaq 0x38a2e7(%rip), %rdx # 0x3f8ed0
callq 0x6de80
leaq 0x38960f(%rip), %rax # 0x3f8204
movl (%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x48, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x6ece0
leaq 0x3895f9(%rip), %rax # 0x3f8208
movl (%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x80, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x6ece0
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xd8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xdc(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xb8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
leaq 0x89(%rip), %rcx # 0x6ed30
movq %rcx, 0xa0(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x6ecd6
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x18(%rbp), %rax
leaq 0x491(%rip), %rcx # 0x6f160
movq %rcx, 0xa8(%rax)
jmp 0x6ecd8
jmp 0x6ecda
addq $0x20, %rsp
popq %rbp
retq
|
init_io_cache_share:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
jmp short $+2
loc_6EBC9:
jmp short $+2
loc_6EBCB:
jmp short $+2
loc_6EBCD:
jmp short $+2
loc_6EBCF:
jmp short $+2
loc_6EBD1:
jmp short $+2
loc_6EBD3:
jmp short $+2
loc_6EBD5:
lea rax, key_IO_CACHE_SHARE_mutex
mov edi, [rax]
mov rsi, [rbp+var_10]
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_0
lea rax, key_IO_CACHE_SHARE_cond
mov edi, [rax]
mov rsi, [rbp+var_10]
add rsi, 48h ; 'H'
xor eax, eax
mov edx, eax
call inline_mysql_cond_init
lea rax, key_IO_CACHE_SHARE_cond_writer
mov edi, [rax]
mov rsi, [rbp+var_10]
add rsi, 80h
xor eax, eax
mov edx, eax
call inline_mysql_cond_init
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov [rax+0D8h], ecx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov [rax+0DCh], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 0
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
mov rax, [rbp+var_10]
mov [rax+0C8h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+0D0h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+0B8h], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0C0h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+98h], rcx
mov rax, [rbp+var_8]
lea rcx, _my_b_cache_read_r
mov [rax+0A0h], rcx
cmp [rbp+var_18], 0
jz short loc_6ECD6
mov rcx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax+98h], rcx
mov rax, [rbp+var_18]
lea rcx, _my_b_cache_write_r
mov [rax+0A8h], rcx
loc_6ECD6:
jmp short $+2
loc_6ECD8:
jmp short $+2
loc_6ECDA:
add rsp, 20h
pop rbp
retn
|
_QWORD * init_io_cache_share(_QWORD *a1, long long a2, _QWORD *a3, int a4)
{
_QWORD *result; // rax
inline_mysql_mutex_init_0(key_IO_CACHE_SHARE_mutex, (_QWORD *)a2, (long long)&my_fast_mutexattr);
inline_mysql_cond_init(key_IO_CACHE_SHARE_cond, a2 + 72, 0LL);
inline_mysql_cond_init(key_IO_CACHE_SHARE_cond_writer, a2 + 128, 0LL);
*(_DWORD *)(a2 + 216) = a4;
*(_DWORD *)(a2 + 220) = a4;
*(_DWORD *)(a2 + 224) = 0;
*(_QWORD *)(a2 + 200) = a1[4];
*(_QWORD *)(a2 + 208) = 0LL;
*(_QWORD *)(a2 + 184) = 0LL;
*(_QWORD *)(a2 + 192) = a3;
a1[19] = a2;
result = a1;
a1[20] = my_b_cache_read_r;
if ( a3 )
{
a3[19] = a2;
result = a3;
a3[21] = my_b_cache_write_r;
}
return result;
}
|
init_io_cache_share:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
JMP 0x0016ebc9
LAB_0016ebc9:
JMP 0x0016ebcb
LAB_0016ebcb:
JMP 0x0016ebcd
LAB_0016ebcd:
JMP 0x0016ebcf
LAB_0016ebcf:
JMP 0x0016ebd1
LAB_0016ebd1:
JMP 0x0016ebd3
LAB_0016ebd3:
JMP 0x0016ebd5
LAB_0016ebd5:
LEA RAX,[0x4f81b8]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x4f8ed0]
CALL 0x0016de80
LEA RAX,[0x4f8204]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x48
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0016ece0
LEA RAX,[0x4f8208]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x80
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0016ece0
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xd8],ECX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xdc],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd0],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xb8],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc0],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x16ed30]
MOV qword ptr [RAX + 0xa0],RCX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0016ecd6
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x16f160]
MOV qword ptr [RAX + 0xa8],RCX
LAB_0016ecd6:
JMP 0x0016ecd8
LAB_0016ecd8:
JMP 0x0016ecda
LAB_0016ecda:
ADD RSP,0x20
POP RBP
RET
|
void init_io_cache_share(long param_1,long param_2,long param_3,int4 param_4)
{
inline_mysql_mutex_init(key_IO_CACHE_SHARE_mutex,param_2,&my_fast_mutexattr);
inline_mysql_cond_init(key_IO_CACHE_SHARE_cond,param_2 + 0x48,0);
inline_mysql_cond_init(key_IO_CACHE_SHARE_cond_writer,param_2 + 0x80,0);
*(int4 *)(param_2 + 0xd8) = param_4;
*(int4 *)(param_2 + 0xdc) = param_4;
*(int4 *)(param_2 + 0xe0) = 0;
*(int8 *)(param_2 + 200) = *(int8 *)(param_1 + 0x20);
*(int8 *)(param_2 + 0xd0) = 0;
*(int8 *)(param_2 + 0xb8) = 0;
*(long *)(param_2 + 0xc0) = param_3;
*(long *)(param_1 + 0x98) = param_2;
*(code **)(param_1 + 0xa0) = _my_b_cache_read_r;
if (param_3 != 0) {
*(long *)(param_3 + 0x98) = param_2;
*(code **)(param_3 + 0xa8) = _my_b_cache_write_r;
}
return;
}
|
|
57,389
|
my_dirend
|
eloqsql/mysys/my_lib.c
|
void my_dirend(MY_DIR *dir)
{
MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir;
DBUG_ENTER("my_dirend");
if (dirh)
{
delete_dynamic(&dirh->array);
free_root(&dirh->root, MYF(0));
my_free(dirh);
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_dirend:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x651a2
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x58240
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x68a00
movq -0x10(%rbp), %rdi
callq 0x592a0
jmp 0x651a4
jmp 0x651a6
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
my_dirend:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_651A2
mov rdi, [rbp+var_10]
add rdi, 10h
call delete_dynamic
mov rdi, [rbp+var_10]
add rdi, 38h ; '8'
xor eax, eax
mov esi, eax
call free_root
mov rdi, [rbp+var_10]
call my_free
loc_651A2:
jmp short $+2
loc_651A4:
jmp short $+2
loc_651A6:
add rsp, 10h
pop rbp
retn
|
long long my_dirend(long long a1)
{
long long result; // rax
result = a1;
if ( a1 )
{
delete_dynamic(a1 + 16);
free_root(a1 + 56, 0LL);
return my_free(a1);
}
return result;
}
|
my_dirend:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001651a2
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10
CALL 0x00158240
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x38
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00168a00
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001592a0
LAB_001651a2:
JMP 0x001651a4
LAB_001651a4:
JMP 0x001651a6
LAB_001651a6:
ADD RSP,0x10
POP RBP
RET
|
void my_dirend(long param_1)
{
if (param_1 != 0) {
delete_dynamic(param_1 + 0x10);
free_root(param_1 + 0x38,0);
my_free(param_1);
}
return;
}
|
|
57,390
|
my_mutex_end
|
eloqsql/mysys/thr_mutex.c
|
void my_mutex_end()
{
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_fast_mutexattr);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
#endif
}
|
O3
|
c
|
my_mutex_end:
pushq %rbp
movq %rsp, %rbp
leaq 0xb64e15(%rip), %rdi # 0xc0a570
callq 0x291d0
leaq 0xb64e0d(%rip), %rdi # 0xc0a574
popq %rbp
jmp 0x291d0
nopl (%rax)
|
my_mutex_end:
push rbp
mov rbp, rsp
lea rdi, my_fast_mutexattr
call _pthread_mutexattr_destroy
lea rdi, my_errorcheck_mutexattr
pop rbp
jmp _pthread_mutexattr_destroy
|
long long my_mutex_end()
{
pthread_mutexattr_destroy(&my_fast_mutexattr);
return pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
}
|
my_mutex_end:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0xd0a570]
CALL 0x001291d0
LEA RDI,[0xd0a574]
POP RBP
JMP 0x001291d0
|
void my_mutex_end(void)
{
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
return;
}
|
|
57,391
|
google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(__gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*, std::vector<google::protobuf::FieldDescriptor const*, std::allocator<google::protobuf::FieldDescriptor const*>>>, __gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*, std::vector<google::protobuf::FieldDescriptor const*, std::allocator<google::protobuf::FieldDescriptor const*>>>, google::protobuf::FieldDescriptor const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::UnknownFieldSet const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
bool DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(
std::vector<const FieldDescriptor*>::const_iterator
intermediate_fields_iter,
std::vector<const FieldDescriptor*>::const_iterator intermediate_fields_end,
const FieldDescriptor* innermost_field, const std::string& debug_msg_name,
const UnknownFieldSet& unknown_fields) {
// We do linear searches of the UnknownFieldSet and its sub-groups. This
// should be fine since it's unlikely that any one options structure will
// contain more than a handful of options.
if (intermediate_fields_iter == intermediate_fields_end) {
// We're at the innermost submessage.
for (int i = 0; i < unknown_fields.field_count(); i++) {
if (unknown_fields.field(i).number() == innermost_field->number()) {
return AddNameError("Option \"" + debug_msg_name +
"\" was already set.");
}
}
return true;
}
for (int i = 0; i < unknown_fields.field_count(); i++) {
if (unknown_fields.field(i).number() ==
(*intermediate_fields_iter)->number()) {
const UnknownField* unknown_field = &unknown_fields.field(i);
FieldDescriptor::Type type = (*intermediate_fields_iter)->type();
// Recurse into the next submessage.
switch (type) {
case FieldDescriptor::TYPE_MESSAGE:
if (unknown_field->type() == UnknownField::TYPE_LENGTH_DELIMITED) {
UnknownFieldSet intermediate_unknown_fields;
if (intermediate_unknown_fields.ParseFromString(
unknown_field->length_delimited()) &&
!ExamineIfOptionIsSet(intermediate_fields_iter + 1,
intermediate_fields_end, innermost_field,
debug_msg_name,
intermediate_unknown_fields)) {
return false; // Error already added.
}
}
break;
case FieldDescriptor::TYPE_GROUP:
if (unknown_field->type() == UnknownField::TYPE_GROUP) {
if (!ExamineIfOptionIsSet(intermediate_fields_iter + 1,
intermediate_fields_end, innermost_field,
debug_msg_name, unknown_field->group())) {
return false; // Error already added.
}
}
break;
default:
GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_MESSAGE: " << type;
return false;
}
}
}
return true;
}
|
O3
|
cpp
|
google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(__gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*, std::vector<google::protobuf::FieldDescriptor const*, std::allocator<google::protobuf::FieldDescriptor const*>>>, __gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*, std::vector<google::protobuf::FieldDescriptor const*, std::allocator<google::protobuf::FieldDescriptor const*>>>, google::protobuf::FieldDescriptor const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::UnknownFieldSet const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, 0x18(%rsp)
movq %rsi, %rbp
movq %rdi, 0x10(%rsp)
movq (%r9), %r13
movq 0x8(%r9), %rsi
subq %r13, %rsi
shrq $0x4, %rsi
movq %rdx, 0x60(%rsp)
cmpq %rdx, %rbp
je 0x3884d
movb $0x1, %al
testl %esi, %esi
jle 0x38987
movq %r9, %r12
leaq 0x8(%rbp), %rax
movq %rax, 0x58(%rsp)
movl $0x8, %r15d
xorl %ebx, %ebx
movl -0x8(%r13,%r15), %eax
movq (%rbp), %r14
cmpl 0x4(%r14), %eax
jne 0x38829
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x38755
leaq 0x24e4(%rip), %rax # 0x3ac20
movq %rax, 0x20(%rsp)
movq %r14, 0x68(%rsp)
leaq 0x20(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x3fc96
movzbl 0x2(%r14), %r14d
cmpl $0xa, %r14d
je 0x387f6
cmpl $0xb, %r14d
jne 0x388d1
cmpl $0x3, -0x4(%r13,%r15)
jne 0x38829
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq (%r13,%r15), %rax
movq (%rax), %rsi
movl 0x8(%rax), %edx
leaq 0x20(%rsp), %rdi
callq 0x880ca
testb %al, %al
je 0x387cf
movq 0x10(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %r8
leaq 0x20(%rsp), %r9
callq 0x386bc
testb %al, %al
je 0x38999
movq 0x20(%rsp), %rdi
cmpq 0x28(%rsp), %rdi
je 0x387ea
leaq 0x20(%rsp), %rdi
callq 0x8793e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x38829
callq 0xf330
jmp 0x38829
cmpl $0x4, -0x4(%r13,%r15)
jne 0x38829
movq (%r13,%r15), %r9
movq 0x10(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %r8
callq 0x386bc
testb %al, %al
je 0x38985
incq %rbx
movq (%r12), %r13
movq 0x8(%r12), %rax
subq %r13, %rax
shrq $0x4, %rax
cltq
addq $0x10, %r15
cmpq %rax, %rbx
jl 0x38719
jmp 0x3887b
testl %esi, %esi
jle 0x3887b
movq 0x18(%rsp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
xorl %edx, %edx
cmpl %ecx, (%r13)
je 0x38882
incq %rdx
addq $0x10, %r13
cmpq %rdx, %rsi
jne 0x38861
setbe %al
jmp 0x38987
movb $0x1, %al
jmp 0x38987
leaq 0x7f442(%rip), %rsi # 0xb7ccb
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %rdx
callq 0x1397f
leaq 0x7f699(%rip), %rsi # 0xb7f3b
movq %rbx, %rdi
callq 0x13a08
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x38922
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x38929
leaq 0x7d50c(%rip), %rdx # 0xb5de4
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0x1e2c, %ecx # imm = 0x1E2C
callq 0x169ca
leaq 0x7f5fc(%rip), %rsi # 0xb7ef2
movq %rbx, %rdi
callq 0x164c8
movq %rax, %rdi
movl %r14d, %esi
callq 0x167f0
leaq 0x68(%rsp), %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x20(%rsp), %rdi
callq 0x169e8
jmp 0x38985
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %r8
movq %rdx, 0x8(%r8)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
addq $0x20, %rsi
movq 0x10(%rax), %rdx
movl $0x7, %ecx
callq 0x279ac
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x38972
callq 0xf330
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38985
callq 0xf330
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rsp), %rdi
cmpq 0x28(%rsp), %rdi
je 0x389b4
leaq 0x20(%rsp), %rdi
callq 0x8793e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
jne 0x38980
jmp 0x38985
jmp 0x389fa
jmp 0x389eb
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x389d6
callq 0xf330
jmp 0x389d6
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38a0f
callq 0xf330
jmp 0x38a0f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x169e8
jmp 0x38a0f
movq %rax, %rdi
callq 0x13387
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3f79e
movq %rbx, %rdi
callq 0xf570
nop
|
_ZN6google8protobuf17DescriptorBuilder17OptionInterpreter20ExamineIfOptionIsSetEN9__gnu_cxx17__normal_iteratorIPKPKNS0_15FieldDescriptorESt6vectorIS7_SaIS7_EEEESD_S7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_15UnknownFieldSetE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov [rsp+0B8h+var_B0], r8
mov [rsp+0B8h+var_A0], rcx
mov rbp, rsi
mov [rsp+0B8h+var_A8], rdi
mov r13, [r9]
mov rsi, [r9+8]
sub rsi, r13
shr rsi, 4
mov [rsp+0B8h+var_58], rdx
cmp rbp, rdx
jz loc_3884D
mov al, 1
test esi, esi
jle loc_38987
mov r12, r9
lea rax, [rbp+8]
mov [rsp+0B8h+var_60], rax
mov r15d, 8
xor ebx, ebx
loc_38719:
mov eax, [r13+r15-8]
mov r14, [rbp+0]
cmp eax, [r14+4]
jnz loc_38829
mov rdi, [r14+18h]
test rdi, rdi
jz short loc_38755
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
mov [rsp+0B8h+var_98], rax
mov [rsp+0B8h+var_50], r14
lea rsi, [rsp+0B8h+var_98]
lea rdx, [rsp+0B8h+var_50]
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_38755:
movzx r14d, byte ptr [r14+2]
cmp r14d, 0Ah
jz loc_387F6
cmp r14d, 0Bh
jnz loc_388D1
cmp dword ptr [r13+r15-4], 3
jnz loc_38829
xorps xmm0, xmm0
movaps xmmword ptr [rsp+0B8h+var_98], xmm0
mov [rsp+0B8h+var_88], 0
mov rax, [r13+r15+0]
mov rsi, [rax]; void *
mov edx, [rax+8]; int
lea rdi, [rsp+0B8h+var_98]; this
call _ZN6google8protobuf15UnknownFieldSet14ParseFromArrayEPKvi; google::protobuf::UnknownFieldSet::ParseFromArray(void const*,int)
test al, al
jz short loc_387CF
mov rdi, [rsp+0B8h+var_A8]
mov rsi, [rsp+0B8h+var_60]
mov rdx, [rsp+0B8h+var_58]
mov rcx, [rsp+0B8h+var_A0]
mov r8, [rsp+0B8h+var_B0]
lea r9, [rsp+0B8h+var_98]
call _ZN6google8protobuf17DescriptorBuilder17OptionInterpreter20ExamineIfOptionIsSetEN9__gnu_cxx17__normal_iteratorIPKPKNS0_15FieldDescriptorESt6vectorIS7_SaIS7_EEEESD_S7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_15UnknownFieldSetE; google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(__gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*,std::vector<google::protobuf::FieldDescriptor const*>>,__gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*,std::vector<google::protobuf::FieldDescriptor const*>>,google::protobuf::FieldDescriptor const*,std::string const&,google::protobuf::UnknownFieldSet const&)
test al, al
jz loc_38999
loc_387CF:
mov rdi, [rsp+0B8h+var_98]
cmp rdi, [rsp+0B8h+var_98+8]
jz short loc_387EA
lea rdi, [rsp+0B8h+var_98]; this
call _ZN6google8protobuf15UnknownFieldSet13ClearFallbackEv; google::protobuf::UnknownFieldSet::ClearFallback(void)
mov rdi, [rsp+0B8h+var_98]; void *
loc_387EA:
test rdi, rdi
jz short loc_38829
call __ZdlPv; operator delete(void *)
jmp short loc_38829
loc_387F6:
cmp dword ptr [r13+r15-4], 4
jnz short loc_38829
mov r9, [r13+r15+0]
mov rdi, [rsp+0B8h+var_A8]
mov rsi, [rsp+0B8h+var_60]
mov rdx, [rsp+0B8h+var_58]
mov rcx, [rsp+0B8h+var_A0]
mov r8, [rsp+0B8h+var_B0]
call _ZN6google8protobuf17DescriptorBuilder17OptionInterpreter20ExamineIfOptionIsSetEN9__gnu_cxx17__normal_iteratorIPKPKNS0_15FieldDescriptorESt6vectorIS7_SaIS7_EEEESD_S7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_15UnknownFieldSetE; google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(__gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*,std::vector<google::protobuf::FieldDescriptor const*>>,__gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*,std::vector<google::protobuf::FieldDescriptor const*>>,google::protobuf::FieldDescriptor const*,std::string const&,google::protobuf::UnknownFieldSet const&)
test al, al
jz loc_38985
loc_38829:
inc rbx
mov r13, [r12]
mov rax, [r12+8]
sub rax, r13
shr rax, 4
cdqe
add r15, 10h
cmp rbx, rax
jl loc_38719
jmp short loc_3887B
loc_3884D:
test esi, esi
jle short loc_3887B
mov rax, [rsp+0B8h+var_A0]
mov ecx, [rax+4]
and esi, 7FFFFFFFh
xor edx, edx
loc_38861:
cmp [r13+0], ecx
jz short loc_38882
inc rdx
add r13, 10h
cmp rsi, rdx
jnz short loc_38861
setbe al
jmp loc_38987
loc_3887B:
mov al, 1
jmp loc_38987
loc_38882:
lea rsi, aOption; "Option \""
lea rbx, [rsp+0B8h+var_50]
mov rdi, rbx
mov rdx, [rsp+0B8h+var_B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rsi, aWasAlreadySet; "\" was already set."
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r14, [rsp+0B8h+var_88]
mov [r14-10h], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_38922
mov [rsp+0B8h+var_98], rdx
mov rdx, [rcx]
mov [rsp+0B8h+var_88], rdx
jmp short loc_38929
loc_388D1:
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/aimrt_"...
lea rbx, [rsp+0B8h+var_98]
mov rdi, rbx
mov esi, 3
mov ecx, 1E2Ch
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aInvalidWireTyp; "Invalid wire type for CPPTYPE_MESSAGE: "
mov rdi, rbx
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rdi, rax
mov esi, r14d
call _ZN6google8protobuf8internal10LogMessagelsEi; google::protobuf::internal::LogMessage::operator<<(int)
lea rdi, [rsp+0B8h+var_50]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+0B8h+var_98]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short loc_38985
loc_38922:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_38929:
mov rdx, [rax+8]
lea r8, [rsp+0B8h+var_98]
mov [r8+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rax, [rsp+0B8h+var_A8]
mov rdi, [rax]
mov rsi, [rax+8]
add rsi, 20h ; ' '
mov rdx, [rax+10h]
mov ecx, 7
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,std::string const&)
mov rdi, [rsp+0B8h+var_98]; void *
cmp rdi, r14
jz short loc_38972
call __ZdlPv; operator delete(void *)
loc_38972:
lea rax, [rsp+0B8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_38985
loc_38980:
call __ZdlPv; operator delete(void *)
loc_38985:
xor eax, eax
loc_38987:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_38999:
mov rdi, [rsp+0B8h+var_98]
cmp rdi, [rsp+0B8h+var_98+8]
jz short loc_389B4
lea rdi, [rsp+0B8h+var_98]; this
call _ZN6google8protobuf15UnknownFieldSet13ClearFallbackEv; google::protobuf::UnknownFieldSet::ClearFallback(void)
mov rdi, [rsp+0B8h+var_98]
loc_389B4:
test rdi, rdi
jnz short loc_38980
jmp short loc_38985
jmp short loc_389FA
jmp short loc_389EB
mov rbx, rax
mov rdi, [rsp+0B8h+var_98]; void *
cmp rdi, r14
jz short loc_389D6
call __ZdlPv; operator delete(void *)
jmp short loc_389D6
mov rbx, rax
loc_389D6:
lea rax, [rsp+0B8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_38A0F
call __ZdlPv; operator delete(void *)
jmp short loc_38A0F
loc_389EB:
mov rbx, rax
lea rdi, [rsp+0B8h+var_98]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short loc_38A0F
loc_389FA:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
lea rdi, [rsp+0B8h+var_98]; this
call _ZN6google8protobuf15UnknownFieldSetD2Ev; google::protobuf::UnknownFieldSet::~UnknownFieldSet()
loc_38A0F:
mov rdi, rbx
call __Unwind_Resume
|
bool google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(
long long *a1,
long long *a2,
long long *a3,
long long a4,
_QWORD *a5,
long long a6)
{
_DWORD *v7; // r13
long long v8; // rsi
bool result; // al
long long v11; // r15
long long v12; // rbx
long long v13; // r14
long long v14; // rdi
unsigned int v15; // r14d
void *v16; // rdi
int v17; // ecx
unsigned long long v18; // rsi
unsigned long long v19; // rdx
long long v20; // rax
_OWORD *v21; // rcx
long long v22; // rax
char *v23; // rdx
google::protobuf::internal::LogMessage *v24; // rax
void *v25; // rdi
void *v29[2]; // [rsp+20h] [rbp-98h] BYREF
_OWORD v30[2]; // [rsp+30h] [rbp-88h] BYREF
long long *v31; // [rsp+58h] [rbp-60h]
long long *v32; // [rsp+60h] [rbp-58h]
_QWORD v33[2]; // [rsp+68h] [rbp-50h] BYREF
char v34; // [rsp+78h] [rbp-40h] BYREF
v7 = *(_DWORD **)a6;
v8 = (*(_QWORD *)(a6 + 8) - *(_QWORD *)a6) >> 4;
v32 = a3;
if ( a2 == a3 )
{
if ( (int)v8 <= 0 )
{
return 1;
}
else
{
v17 = *(_DWORD *)(a4 + 4);
v18 = v8 & 0x7FFFFFFF;
v19 = 0LL;
while ( *v7 != v17 )
{
++v19;
v7 += 4;
if ( v18 == v19 )
return v18 <= v19;
}
std::operator+<char>((long long)v33, (long long)"Option \"", a5);
v20 = std::string::append((long long)v33, (long long)"\" was already set.");
v29[0] = v30;
v21 = (_OWORD *)(v20 + 16);
if ( *(_QWORD *)v20 == v20 + 16 )
{
v30[0] = *v21;
}
else
{
v29[0] = *(void **)v20;
*(_QWORD *)&v30[0] = *(_QWORD *)v21;
}
v29[1] = *(void **)(v20 + 8);
*(_QWORD *)v20 = v21;
*(_QWORD *)(v20 + 8) = 0LL;
*(_BYTE *)(v20 + 16) = 0;
google::protobuf::DescriptorBuilder::AddError(*a1, a1[1] + 32, a1[2], 7u, (long long)v29);
if ( v29[0] != v30 )
operator delete(v29[0]);
v25 = (void *)v33[0];
if ( (char *)v33[0] != &v34 )
goto LABEL_33;
return 0;
}
}
else
{
result = 1;
if ( (int)v8 > 0 )
{
v31 = a2 + 1;
v11 = 2LL;
v12 = 0LL;
while ( 1 )
{
v13 = *a2;
if ( v7[v11 - 2] == *(_DWORD *)(*a2 + 4) )
{
v14 = *(_QWORD *)(v13 + 24);
if ( v14 )
{
v29[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v33[0] = v13;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v14,
v29,
v33);
}
v15 = *(unsigned __int8 *)(v13 + 2);
if ( v15 == 10 )
{
if ( v7[v11 - 1] == 4
&& !(unsigned __int8)google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(
a1,
v31,
v32,
a4,
a5,
*(_QWORD *)&v7[v11]) )
{
return 0;
}
}
else
{
if ( v15 != 11 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v29,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc",
7724);
v22 = google::protobuf::internal::LogMessage::operator<<(
(long long)v29,
(long long)"Invalid wire type for CPPTYPE_MESSAGE: ");
v24 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
v22,
v15,
v23);
google::protobuf::internal::LogFinisher::operator=((long long)v33, v24);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v29);
return 0;
}
if ( v7[v11 - 1] == 3 )
{
*(_OWORD *)v29 = 0LL;
*(_QWORD *)&v30[0] = 0LL;
if ( (unsigned __int8)google::protobuf::UnknownFieldSet::ParseFromArray(
(google::protobuf::UnknownFieldSet *)v29,
**(const void ***)&v7[v11],
*(_DWORD *)(*(_QWORD *)&v7[v11] + 8LL))
&& !(unsigned __int8)google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(
a1,
v31,
v32,
a4,
a5,
v29) )
{
v25 = v29[0];
if ( v29[0] != v29[1] )
{
google::protobuf::UnknownFieldSet::ClearFallback((google::protobuf::UnknownFieldSet *)v29);
v25 = v29[0];
}
if ( !v25 )
return 0;
LABEL_33:
operator delete(v25);
return 0;
}
v16 = v29[0];
if ( v29[0] != v29[1] )
{
google::protobuf::UnknownFieldSet::ClearFallback((google::protobuf::UnknownFieldSet *)v29);
v16 = v29[0];
}
if ( v16 )
operator delete(v16);
}
}
}
++v12;
v7 = *(_DWORD **)a6;
v11 += 4LL;
if ( v12 >= (int)((*(_QWORD *)(a6 + 8) - *(_QWORD *)a6) >> 4) )
return 1;
}
}
}
return result;
}
|
ExamineIfOptionIsSet:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RSP + 0x8],R8
MOV qword ptr [RSP + 0x18],RCX
MOV RBP,RSI
MOV qword ptr [RSP + 0x10],RDI
MOV R13,qword ptr [R9]
MOV RSI,qword ptr [R9 + 0x8]
SUB RSI,R13
SHR RSI,0x4
MOV qword ptr [RSP + 0x60],RDX
CMP RBP,RDX
JZ 0x0013884d
MOV AL,0x1
TEST ESI,ESI
JLE 0x00138987
MOV R12,R9
LEA RAX,[RBP + 0x8]
MOV qword ptr [RSP + 0x58],RAX
MOV R15D,0x8
XOR EBX,EBX
LAB_00138719:
MOV EAX,dword ptr [R13 + R15*0x1 + -0x8]
MOV R14,qword ptr [RBP]
CMP EAX,dword ptr [R14 + 0x4]
JNZ 0x00138829
MOV RDI,qword ptr [R14 + 0x18]
TEST RDI,RDI
JZ 0x00138755
LEA RAX,[0x13ac20]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x68],R14
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x68]
CALL 0x0013fc96
LAB_00138755:
MOVZX R14D,byte ptr [R14 + 0x2]
CMP R14D,0xa
JZ 0x001387f6
CMP R14D,0xb
JNZ 0x001388d1
CMP dword ptr [R13 + R15*0x1 + -0x4],0x3
JNZ 0x00138829
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],0x0
MOV RAX,qword ptr [R13 + R15*0x1]
MOV RSI,qword ptr [RAX]
MOV EDX,dword ptr [RAX + 0x8]
LAB_00138796:
LEA RDI,[RSP + 0x20]
CALL 0x001880ca
TEST AL,AL
JZ 0x001387cf
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x8]
LEA R9,[RSP + 0x20]
CALL 0x001386bc
TEST AL,AL
JZ 0x00138999
LAB_001387cf:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,qword ptr [RSP + 0x28]
JZ 0x001387ea
LAB_001387db:
LEA RDI,[RSP + 0x20]
CALL 0x0018793e
LAB_001387e5:
MOV RDI,qword ptr [RSP + 0x20]
LAB_001387ea:
TEST RDI,RDI
JZ 0x00138829
CALL 0x0010f330
JMP 0x00138829
LAB_001387f6:
CMP dword ptr [R13 + R15*0x1 + -0x4],0x4
JNZ 0x00138829
MOV R9,qword ptr [R13 + R15*0x1]
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x8]
CALL 0x001386bc
TEST AL,AL
JZ 0x00138985
LAB_00138829:
INC RBX
MOV R13,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
SUB RAX,R13
SHR RAX,0x4
CDQE
ADD R15,0x10
CMP RBX,RAX
JL 0x00138719
JMP 0x0013887b
LAB_0013884d:
TEST ESI,ESI
JLE 0x0013887b
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RAX + 0x4]
AND ESI,0x7fffffff
XOR EDX,EDX
LAB_00138861:
CMP dword ptr [R13],ECX
JZ 0x00138882
INC RDX
ADD R13,0x10
CMP RSI,RDX
JNZ 0x00138861
SETBE AL
JMP 0x00138987
LAB_0013887b:
MOV AL,0x1
JMP 0x00138987
LAB_00138882:
LEA RSI,[0x1b7ccb]
LEA RBX,[RSP + 0x68]
MOV RDI,RBX
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x0011397f
LAB_0013889b:
LEA RSI,[0x1b7f3b]
MOV RDI,RBX
CALL 0x00113a08
LAB_001388aa:
LEA R14,[RSP + 0x30]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00138922
MOV qword ptr [RSP + 0x20],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
JMP 0x00138929
LAB_001388d1:
LEA RDX,[0x1b5de4]
LEA RBX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x3
MOV ECX,0x1e2c
CALL 0x001169ca
LAB_001388ef:
LEA RSI,[0x1b7ef2]
MOV RDI,RBX
CALL 0x001164c8
MOV RDI,RAX
MOV ESI,R14D
CALL 0x001167f0
LAB_00138909:
LEA RDI,[RSP + 0x68]
MOV RSI,RAX
CALL 0x001165a2
LEA RDI,[RSP + 0x20]
CALL 0x001169e8
JMP 0x00138985
LAB_00138922:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_00138929:
MOV RDX,qword ptr [RAX + 0x8]
LEA R8,[RSP + 0x20]
MOV qword ptr [R8 + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,0x20
MOV RDX,qword ptr [RAX + 0x10]
LAB_00138959:
MOV ECX,0x7
CALL 0x001279ac
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R14
JZ 0x00138972
CALL 0x0010f330
LAB_00138972:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00138985
LAB_00138980:
CALL 0x0010f330
LAB_00138985:
XOR EAX,EAX
LAB_00138987:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00138999:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,qword ptr [RSP + 0x28]
JZ 0x001389b4
LAB_001389a5:
LEA RDI,[RSP + 0x20]
CALL 0x0018793e
LAB_001389af:
MOV RDI,qword ptr [RSP + 0x20]
LAB_001389b4:
TEST RDI,RDI
JNZ 0x00138980
JMP 0x00138985
|
/* google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet(__gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor
const* const*, std::vector<google::protobuf::FieldDescriptor const*,
std::allocator<google::protobuf::FieldDescriptor const*> > >,
__gnu_cxx::__normal_iterator<google::protobuf::FieldDescriptor const* const*,
std::vector<google::protobuf::FieldDescriptor const*,
std::allocator<google::protobuf::FieldDescriptor const*> > >, google::protobuf::FieldDescriptor
const*, std::__cxx11::string const&, google::protobuf::UnknownFieldSet const&) */
bool __thiscall
google::protobuf::DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet
(OptionInterpreter *this,long *param_2,long *param_3,long param_4,int8 param_5,
int8 *param_6)
{
FieldDescriptor FVar1;
char cVar2;
long *plVar3;
LogMessage *pLVar4;
ulong uVar5;
long lVar6;
uint uVar7;
FieldDescriptor *pFVar8;
int *piVar9;
long lVar10;
FieldDescriptor *local_98;
FieldDescriptor *pFStack_90;
long local_88;
int4 uStack_80;
int4 uStack_7c;
long *local_60;
long *local_58;
FieldDescriptor *local_50 [2];
FieldDescriptor local_40 [16];
piVar9 = (int *)*param_6;
uVar7 = (uint)((ulong)(param_6[1] - (long)piVar9) >> 4);
local_58 = param_3;
if (param_2 == param_3) {
if (0 < (int)uVar7) {
uVar5 = 0;
while (*piVar9 != *(int *)(param_4 + 4)) {
uVar5 = uVar5 + 1;
piVar9 = piVar9 + 4;
if ((uVar7 & 0x7fffffff) == uVar5) {
return (uVar7 & 0x7fffffff) <= uVar5;
}
}
std::operator+((char *)local_50,(string *)"Option \"");
/* try { // try from 0013889b to 001388a9 has its CatchHandler @ 001389d3 */
plVar3 = (long *)std::__cxx11::string::append((string *)local_50,"\" was already set.");
pFVar8 = (FieldDescriptor *)(plVar3 + 2);
if ((FieldDescriptor *)*plVar3 == pFVar8) {
local_88 = *(long *)pFVar8;
uStack_80 = (int4)plVar3[3];
uStack_7c = *(int4 *)((long)plVar3 + 0x1c);
local_98 = (FieldDescriptor *)&local_88;
}
else {
local_88 = *(long *)pFVar8;
local_98 = (FieldDescriptor *)*plVar3;
}
pFStack_90 = (FieldDescriptor *)plVar3[1];
*plVar3 = (long)pFVar8;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 00138959 to 00138962 has its CatchHandler @ 001389bf */
AddError(*(DescriptorBuilder **)this,*(long *)(this + 8) + 0x20,*(int8 *)(this + 0x10),7
);
if (local_98 != (FieldDescriptor *)&local_88) {
operator_delete(local_98);
}
pFVar8 = local_50[0];
if (local_50[0] != local_40) {
LAB_00138980:
operator_delete(pFVar8);
}
return false;
}
}
else {
if ((int)uVar7 < 1) {
return true;
}
local_60 = param_2 + 1;
lVar10 = 8;
lVar6 = 0;
do {
pFVar8 = (FieldDescriptor *)*param_2;
if (*(int *)((long)piVar9 + lVar10 + -8) == *(int *)(pFVar8 + 4)) {
if (*(once_flag **)(pFVar8 + 0x18) != (once_flag *)0x0) {
local_98 = (FieldDescriptor *)FieldDescriptor::TypeOnceInit;
local_50[0] = pFVar8;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(pFVar8 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_98,
local_50);
}
FVar1 = pFVar8[2];
if (FVar1 == (FieldDescriptor)0xa) {
if ((*(int *)((long)piVar9 + lVar10 + -4) == 4) &&
(cVar2 = ExamineIfOptionIsSet
(this,local_60,local_58,param_4,param_5,
*(int8 *)((long)piVar9 + lVar10)), cVar2 == '\0')) {
return false;
}
}
else {
if (FVar1 != (FieldDescriptor)0xb) {
internal::LogMessage::LogMessage
((LogMessage *)&local_98,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc"
,0x1e2c);
/* try { // try from 001388ef to 00138908 has its CatchHandler @ 001389eb */
pLVar4 = (LogMessage *)
internal::LogMessage::operator<<
((LogMessage *)&local_98,"Invalid wire type for CPPTYPE_MESSAGE: ");
pLVar4 = (LogMessage *)internal::LogMessage::operator<<(pLVar4,(uint)(byte)FVar1);
/* try { // try from 00138909 to 00138915 has its CatchHandler @ 001389bd */
internal::LogFinisher::operator=((LogFinisher *)local_50,pLVar4);
internal::LogMessage::~LogMessage((LogMessage *)&local_98);
return false;
}
if (*(int *)((long)piVar9 + lVar10 + -4) == 3) {
local_98 = (FieldDescriptor *)0x0;
pFStack_90 = (FieldDescriptor *)0x0;
local_88 = 0;
/* try { // try from 00138796 to 001387c6 has its CatchHandler @ 00138a02 */
cVar2 = UnknownFieldSet::ParseFromArray
((UnknownFieldSet *)&local_98,
(void *)**(int8 **)((long)piVar9 + lVar10),
*(int *)(*(int8 **)((long)piVar9 + lVar10) + 1));
if ((cVar2 != '\0') &&
(cVar2 = ExamineIfOptionIsSet(this,local_60,local_58,param_4,param_5,&local_98),
cVar2 == '\0')) {
if (local_98 != pFStack_90) {
/* try { // try from 001389a5 to 001389ae has its CatchHandler @ 001389bb */
UnknownFieldSet::ClearFallback((UnknownFieldSet *)&local_98);
}
pFVar8 = local_98;
if (local_98 == (FieldDescriptor *)0x0) {
return false;
}
goto LAB_00138980;
}
if (local_98 != pFStack_90) {
/* try { // try from 001387db to 001387e4 has its CatchHandler @ 001389fa */
UnknownFieldSet::ClearFallback((UnknownFieldSet *)&local_98);
}
if (local_98 != (FieldDescriptor *)0x0) {
operator_delete(local_98);
}
}
}
}
lVar6 = lVar6 + 1;
piVar9 = (int *)*param_6;
lVar10 = lVar10 + 0x10;
} while (lVar6 < (int)((ulong)(param_6[1] - (long)piVar9) >> 4));
}
return true;
}
|
|
57,392
|
remove_reader
|
eloqsql/storage/maria/ma_pagecache.c
|
static inline void remove_reader(PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("remove_reader");
PCBLOCK_INFO(block);
DBUG_ASSERT(block->hash_link->requests > 0);
if (! --block->hash_link->requests && block->condvar)
pagecache_pthread_cond_signal(block->condvar);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
remove_reader:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x98eae
jmp 0x98eb0
jmp 0x98eb2
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
movl 0x68(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x68(%rcx)
cmpl $0x0, %eax
jne 0x98ee0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x98ee0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x9c8f0
jmp 0x98ee2
jmp 0x98ee4
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
remove_reader:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_98EAE:
jmp short $+2
loc_98EB0:
jmp short $+2
loc_98EB2:
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
mov eax, [rcx+68h]
add eax, 0FFFFFFFFh
mov [rcx+68h], eax
cmp eax, 0
jnz short loc_98EE0
mov rax, [rbp+var_8]
cmp qword ptr [rax+28h], 0
jz short loc_98EE0
mov rax, [rbp+var_8]
mov rdi, [rax+28h]
call inline_mysql_cond_signal_0
loc_98EE0:
jmp short $+2
loc_98EE2:
jmp short $+2
loc_98EE4:
add rsp, 10h
pop rbp
retn
|
long long remove_reader(long long a1)
{
long long v1; // rcx
long long result; // rax
v1 = *(_QWORD *)(a1 + 32);
result = (unsigned int)(*(_DWORD *)(v1 + 104) - 1);
*(_DWORD *)(v1 + 104) = result;
if ( !(_DWORD)result )
{
result = a1;
if ( *(_QWORD *)(a1 + 40) )
return inline_mysql_cond_signal_0(*(_QWORD *)(a1 + 40));
}
return result;
}
|
remove_reader:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00198eae
LAB_00198eae:
JMP 0x00198eb0
LAB_00198eb0:
JMP 0x00198eb2
LAB_00198eb2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
MOV EAX,dword ptr [RCX + 0x68]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x68],EAX
CMP EAX,0x0
JNZ 0x00198ee0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00198ee0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x28]
CALL 0x0019c8f0
LAB_00198ee0:
JMP 0x00198ee2
LAB_00198ee2:
JMP 0x00198ee4
LAB_00198ee4:
ADD RSP,0x10
POP RBP
RET
|
void remove_reader(long param_1)
{
int iVar1;
iVar1 = *(int *)(*(long *)(param_1 + 0x20) + 0x68) + -1;
*(int *)(*(long *)(param_1 + 0x20) + 0x68) = iVar1;
if ((iVar1 == 0) && (*(long *)(param_1 + 0x28) != 0)) {
inline_mysql_cond_signal(*(int8 *)(param_1 + 0x28));
}
return;
}
|
|
57,393
|
js_map_set
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_map_set(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
JSMapRecord *mr;
JSValue key, value;
int is_set;
if (!s)
return JS_EXCEPTION;
is_set = (magic & MAGIC_SET);
key = map_normalize_key(ctx, argv[0]);
if (s->is_weak && !is_valid_weakref_target(key))
return JS_ThrowTypeError(ctx, "invalid value used as %s key", is_set ? "WeakSet" : "WeakMap");
if (is_set)
value = JS_UNDEFINED;
else
value = argv[1];
mr = map_find_record(ctx, s, key);
if (mr) {
JS_FreeValue(ctx, mr->value);
} else {
mr = map_add_record(ctx, s, key);
if (!mr)
return JS_EXCEPTION;
}
mr->value = js_dup(value);
return js_dup(this_val);
}
|
O0
|
c
|
js_map_set:
subq $0xb8, %rsp
movq %rsi, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rdi, 0x90(%rsp)
movl %ecx, 0x8c(%rsp)
movq %r8, 0x80(%rsp)
movl %r9d, 0x7c(%rsp)
movq 0x90(%rsp), %rdi
movl 0x7c(%rsp), %ecx
addl $0x23, %ecx
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x370f0
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x7c6f0
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
jmp 0x7c8ca
movl 0x7c(%rsp), %eax
andl $0x1, %eax
movl %eax, 0x44(%rsp)
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x7c8f0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rax
cmpl $0x0, (%rax)
je 0x7c797
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x7c960
cmpl $0x0, %eax
jne 0x7c797
movq 0x90(%rsp), %rdi
movl 0x44(%rsp), %ecx
leaq 0x90c01(%rip), %rdx # 0x10d367
leaq 0x90bf2(%rip), %rax # 0x10d35f
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x90bc7(%rip), %rsi # 0x10d342
movb $0x0, %al
callq 0x2c040
movq %rax, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
jmp 0x7c8ca
cmpl $0x0, 0x44(%rsp)
je 0x7c7c5
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x7c7df
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x48(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0x7c9c0
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0x7c824
movq 0x90(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
callq 0x229d0
jmp 0x7c868
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0x7caa0
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x7c866
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
jmp 0x7c8ca
jmp 0x7c868
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x20410
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x40(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x48(%rax)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x20410
movq %rax, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rdx
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_map_set:
sub rsp, 0B8h
mov [rsp+0B8h+var_20], rsi
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_28], rdi
mov [rsp+0B8h+var_2C], ecx
mov [rsp+0B8h+var_38], r8
mov [rsp+0B8h+var_3C], r9d
mov rdi, [rsp+0B8h+var_28]
mov ecx, [rsp+0B8h+var_3C]
add ecx, 23h ; '#'
mov rsi, [rsp+0B8h+var_20]
mov rdx, [rsp+0B8h+var_18]
call JS_GetOpaque2
mov [rsp+0B8h+var_48], rax
cmp [rsp+0B8h+var_48], 0
jnz short loc_7C6F0
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
jmp loc_7C8CA
loc_7C6F0:
mov eax, [rsp+0B8h+var_3C]
and eax, 1
mov [rsp+0B8h+var_74], eax
mov rdi, [rsp+0B8h+var_28]
mov rax, [rsp+0B8h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call map_normalize_key
mov [rsp+0B8h+var_88], rax
mov [rsp+0B8h+var_80], rdx
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_60], rax
mov rax, [rsp+0B8h+var_80]
mov [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_48]
cmp dword ptr [rax], 0
jz short loc_7C797
mov rdi, [rsp+0B8h+var_60]
mov rsi, [rsp+0B8h+var_58]
call is_valid_weakref_target
cmp eax, 0
jnz short loc_7C797
mov rdi, [rsp+0B8h+var_28]
mov ecx, [rsp+0B8h+var_74]
lea rdx, aWeakmap; "WeakMap"
lea rax, aWeakset; "WeakSet"
cmp ecx, 0
cmovnz rdx, rax
lea rsi, aInvalidValueUs; "invalid value used as %s key"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0B8h+var_10], rax
mov [rsp+0B8h+var_8], rdx
jmp loc_7C8CA
loc_7C797:
cmp [rsp+0B8h+var_74], 0
jz short loc_7C7C5
mov dword ptr [rsp+0B8h+var_98], 0
mov [rsp+0B8h+var_90], 3
mov rax, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_70], rax
mov rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_68], rax
jmp short loc_7C7DF
loc_7C7C5:
mov rax, [rsp+0B8h+var_38]
mov rcx, [rax+10h]
mov [rsp+0B8h+var_70], rcx
mov rax, [rax+18h]
mov [rsp+0B8h+var_68], rax
loc_7C7DF:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_60]
mov rcx, [rsp+0B8h+var_58]
call map_find_record
mov [rsp+0B8h+var_50], rax
cmp [rsp+0B8h+var_50], 0
jz short loc_7C824
mov rdi, [rsp+0B8h+var_28]
mov rax, [rsp+0B8h+var_50]
mov rsi, [rax+40h]
mov rdx, [rax+48h]
call JS_FreeValue
jmp short loc_7C868
loc_7C824:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_60]
mov rcx, [rsp+0B8h+var_58]
call map_add_record
mov [rsp+0B8h+var_50], rax
cmp [rsp+0B8h+var_50], 0
jnz short loc_7C866
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
jmp short loc_7C8CA
loc_7C866:
jmp short $+2
loc_7C868:
mov rax, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_B0], rax
mov rdi, [rsp+0B8h+var_70]
mov rsi, [rsp+0B8h+var_68]
call js_dup
mov rcx, rax
mov rax, [rsp+0B8h+var_B0]
mov [rsp+0B8h+var_A8], rcx
mov [rsp+0B8h+var_A0], rdx
mov rcx, [rsp+0B8h+var_A8]
mov [rax+40h], rcx
mov rcx, [rsp+0B8h+var_A0]
mov [rax+48h], rcx
mov rdi, [rsp+0B8h+var_20]
mov rsi, [rsp+0B8h+var_18]
call js_dup
mov [rsp+0B8h+var_10], rax
mov [rsp+0B8h+var_8], rdx
loc_7C8CA:
mov rax, [rsp+0B8h+var_10]
mov rdx, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
|
_DWORD * js_map_set(
long long a1,
_DWORD *a2,
unsigned int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
_QWORD *a13,
int a14)
{
long long v14; // rdx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
const char *v19; // rdx
long long v20; // rdx
char v22; // [rsp+0h] [rbp-B8h]
_DWORD *v23; // [rsp+20h] [rbp-98h]
long long v24; // [rsp+30h] [rbp-88h]
_DWORD *v25; // [rsp+48h] [rbp-70h]
long long v26; // [rsp+50h] [rbp-68h]
long long v27; // [rsp+60h] [rbp-58h]
long long record; // [rsp+68h] [rbp-50h]
_DWORD *Opaque2; // [rsp+70h] [rbp-48h]
char v30; // [rsp+7Ch] [rbp-3Ch]
long long v33; // [rsp+A8h] [rbp-10h]
v30 = a14;
Opaque2 = (_DWORD *)JS_GetOpaque2(a1, (long long)a2, a3, a14 + 35);
if ( Opaque2 )
{
v24 = map_normalize_key(a1, *a13, a13[1]);
v27 = v14;
if ( !*Opaque2 || (unsigned int)is_valid_weakref_target(v24, v14) )
{
if ( (v30 & 1) != 0 )
{
LODWORD(v23) = 0;
v25 = v23;
LODWORD(v26) = 3;
}
else
{
v25 = (_DWORD *)a13[2];
v26 = a13[3];
}
record = map_find_record(a1, Opaque2, v24, v27);
if ( record )
{
JS_FreeValue(a1, *(_QWORD *)(record + 64), *(_QWORD *)(record + 72));
}
else
{
record = map_add_record(a1, Opaque2, v24, v27);
if ( !record )
{
LODWORD(v33) = 0;
return (_DWORD *)v33;
}
}
*(_QWORD *)(record + 64) = js_dup(v25, v26);
*(_QWORD *)(record + 72) = v20;
return js_dup(a2, a3);
}
v19 = "WeakMap";
if ( (v30 & 1) != 0 )
v19 = "WeakSet";
return (_DWORD *)JS_ThrowTypeError(
a1,
(long long)"invalid value used as %s key",
(long long)v19,
v30 & 1,
v15,
v16,
a4,
a5,
a6,
a7,
v17,
v18,
a10,
a11,
v22);
}
else
{
LODWORD(v33) = 0;
}
return (_DWORD *)v33;
}
|
js_map_set:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV qword ptr [RSP + 0x90],RDI
MOV dword ptr [RSP + 0x8c],ECX
MOV qword ptr [RSP + 0x80],R8
MOV dword ptr [RSP + 0x7c],R9D
MOV RDI,qword ptr [RSP + 0x90]
MOV ECX,dword ptr [RSP + 0x7c]
ADD ECX,0x23
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x001370f0
MOV qword ptr [RSP + 0x70],RAX
CMP qword ptr [RSP + 0x70],0x0
JNZ 0x0017c6f0
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
JMP 0x0017c8ca
LAB_0017c6f0:
MOV EAX,dword ptr [RSP + 0x7c]
AND EAX,0x1
MOV dword ptr [RSP + 0x44],EAX
MOV RDI,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0017c8f0
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x70]
CMP dword ptr [RAX],0x0
JZ 0x0017c797
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x0017c960
CMP EAX,0x0
JNZ 0x0017c797
MOV RDI,qword ptr [RSP + 0x90]
MOV ECX,dword ptr [RSP + 0x44]
LEA RDX,[0x20d367]
LEA RAX,[0x20d35f]
CMP ECX,0x0
CMOVNZ RDX,RAX
LEA RSI,[0x20d342]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xb0],RDX
JMP 0x0017c8ca
LAB_0017c797:
CMP dword ptr [RSP + 0x44],0x0
JZ 0x0017c7c5
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x50],RAX
JMP 0x0017c7df
LAB_0017c7c5:
MOV RAX,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x48],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x50],RAX
LAB_0017c7df:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x60]
CALL 0x0017c9c0
MOV qword ptr [RSP + 0x68],RAX
CMP qword ptr [RSP + 0x68],0x0
JZ 0x0017c824
MOV RDI,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RAX + 0x40]
MOV RDX,qword ptr [RAX + 0x48]
CALL 0x001229d0
JMP 0x0017c868
LAB_0017c824:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x60]
CALL 0x0017caa0
MOV qword ptr [RSP + 0x68],RAX
CMP qword ptr [RSP + 0x68],0x0
JNZ 0x0017c866
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
JMP 0x0017c8ca
LAB_0017c866:
JMP 0x0017c868
LAB_0017c868:
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00120410
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x48],RCX
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x00120410
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xb0],RDX
LAB_0017c8ca:
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
int1 [16]
js_map_set(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5,uint param_6)
{
int iVar1;
int *piVar2;
char *pcVar5;
int1 auVar6 [16];
uint uStack_94;
long local_70;
int8 local_68;
long local_50;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar3;
int8 uVar4;
piVar2 = (int *)JS_GetOpaque2(param_1,param_2,param_3,param_6 + 0x23);
if (piVar2 == (int *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
auVar6 = map_normalize_key(param_1,*param_5,param_5[1]);
uVar4 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
if ((*piVar2 == 0) || (iVar1 = is_valid_weakref_target(uVar3,uVar4), iVar1 != 0)) {
if ((param_6 & 1) == 0) {
local_70 = param_5[2];
local_68 = param_5[3];
}
else {
local_70 = (ulong)uStack_94 << 0x20;
local_68 = 3;
}
local_50 = map_find_record(param_1,piVar2,uVar3,uVar4);
if (local_50 == 0) {
local_50 = map_add_record(param_1,piVar2,uVar3,uVar4);
if (local_50 == 0) {
local_10 = 0;
local_8 = 6;
goto LAB_0017c8ca;
}
}
else {
JS_FreeValue(param_1,*(int8 *)(local_50 + 0x40),*(int8 *)(local_50 + 0x48));
}
auVar6 = js_dup(local_70,local_68);
*(int1 (*) [16])(local_50 + 0x40) = auVar6;
auVar6 = js_dup(param_2,param_3);
local_8 = auVar6._8_8_;
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
}
else {
pcVar5 = "WeakMap";
if ((param_6 & 1) != 0) {
pcVar5 = "WeakSet";
}
auVar6 = JS_ThrowTypeError(param_1,"invalid value used as %s key",pcVar5);
local_8 = auVar6._8_8_;
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
}
}
LAB_0017c8ca:
auVar6._4_4_ = uStack_c;
auVar6._0_4_ = local_10;
auVar6._8_8_ = local_8;
return auVar6;
}
|
|
57,394
|
js_map_set
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_map_set(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
JSMapRecord *mr;
JSValue key, value;
int is_set;
if (!s)
return JS_EXCEPTION;
is_set = (magic & MAGIC_SET);
key = map_normalize_key(ctx, argv[0]);
if (s->is_weak && !is_valid_weakref_target(key))
return JS_ThrowTypeError(ctx, "invalid value used as %s key", is_set ? "WeakSet" : "WeakMap");
if (is_set)
value = JS_UNDEFINED;
else
value = argv[1];
mr = map_find_record(ctx, s, key);
if (mr) {
JS_FreeValue(ctx, mr->value);
} else {
mr = map_add_record(ctx, s, key);
if (!mr)
return JS_EXCEPTION;
}
mr->value = js_dup(value);
return js_dup(this_val);
}
|
O3
|
c
|
js_map_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leal 0x23(%r9), %esi
cmpl $-0x1, %ebx
jne 0x4842a
movzwl 0x6(%r14), %eax
cmpl %eax, %esi
jne 0x4842a
movq 0x30(%r14), %r10
testq %r10, %r10
je 0x4842a
movq (%r8), %rdx
movq 0x8(%r8), %rbp
movl %ebp, %eax
xorq $0x7, %rax
movq %rdx, %rcx
btrq $0x3f, %rcx
xorl %esi, %esi
orq %rax, %rcx
cmoveq %rsi, %rdx
cmoveq %rsi, %rbp
cmpl $0x0, (%r10)
je 0x48455
cmpl $-0x1, %ebp
je 0x48455
cmpl $-0x8, %ebp
jne 0x483f9
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movabsq $-0x4000000000000000, %rcx # imm = 0xC000000000000000
andq 0x4(%rdx), %rcx
incq %rax
cmpq %rax, %rcx
jne 0x48455
testb $0x1, %r9b
leaq 0x58f37(%rip), %rax # 0xa133b
leaq 0x58f28(%rip), %rdx # 0xa1333
cmoveq %rax, %rdx
leaq 0x58f00(%rip), %rsi # 0xa1316
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %ebx
jmp 0x4843a
movq %r15, %rdi
callq 0x270bb
movl $0x6, %ebx
xorl %r14d, %r14d
xorl %r13d, %r13d
orq %r13, %r14
movq %r14, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
testb $0x1, %r9b
jne 0x48482
movq 0x10(%r8), %rax
movq 0x18(%r8), %rcx
movq %rcx, 0x10(%rsp)
movl %eax, %ecx
movq %rcx, (%rsp)
andq %r13, %rax
movq %rax, 0x8(%rsp)
jmp 0x4849d
movl $0x3, %eax
movq %rax, 0x10(%rsp)
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq %r15, %rdi
movq %r10, %rsi
movq %rbp, %rcx
movq %r10, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
callq 0x4852f
testq %rax, %rax
je 0x4850d
movq %rax, %r12
movq 0x48(%rax), %rdx
cmpl $-0x9, %edx
jb 0x484e0
movq 0x40(%r12), %rsi
movq 0x18(%r15), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x484e0
callq 0x20d90
movq 0x8(%rsp), %rcx
orq (%rsp), %rcx
movq 0x10(%rsp), %rax
cmpl $-0x9, %eax
jb 0x484f5
incl (%rcx)
movq %rcx, 0x40(%r12)
movq %rax, 0x48(%r12)
incl (%r14)
andq %r14, %r13
movl %r14d, %r14d
jmp 0x4843d
movq %r15, %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbp, %rcx
callq 0x119be
movq %rax, %r12
testq %rax, %rax
jne 0x484e0
jmp 0x48432
|
js_map_set:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea esi, [r9+23h]
cmp ebx, 0FFFFFFFFh
jnz loc_4842A
movzx eax, word ptr [r14+6]
cmp esi, eax
jnz loc_4842A
mov r10, [r14+30h]
test r10, r10
jz loc_4842A
mov rdx, [r8]
mov rbp, [r8+8]
mov eax, ebp
xor rax, 7
mov rcx, rdx
btr rcx, 3Fh ; '?'
xor esi, esi
or rcx, rax
cmovz rdx, rsi
cmovz rbp, rsi
cmp dword ptr [r10], 0
jz loc_48455
cmp ebp, 0FFFFFFFFh
jz loc_48455
cmp ebp, 0FFFFFFF8h
jnz short loc_483F9
mov rax, 7FFFFFFFFFFFFFFFh
mov rcx, 0C000000000000000h
and rcx, [rdx+4]
inc rax
cmp rcx, rax
jnz short loc_48455
loc_483F9:
test r9b, 1
lea rax, aWeakmap; "WeakMap"
lea rdx, aWeakset; "WeakSet"
cmovz rdx, rax
lea rsi, aInvalidValueUs; "invalid value used as %s key"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov ebx, 6
jmp short loc_4843A
loc_4842A:
mov rdi, r15
call JS_ThrowTypeErrorInvalidClass
loc_48432:
mov ebx, 6
xor r14d, r14d
loc_4843A:
xor r13d, r13d
loc_4843D:
or r14, r13
mov rax, r14
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_48455:
mov r13, 0FFFFFFFF00000000h
test r9b, 1
jnz short loc_48482
mov rax, [r8+10h]
mov rcx, [r8+18h]
mov [rsp+58h+var_48], rcx
mov ecx, eax
mov [rsp+58h+var_58], rcx
and rax, r13
mov [rsp+58h+var_50], rax
jmp short loc_4849D
loc_48482:
mov eax, 3
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_58], 0
mov [rsp+58h+var_50], 0
loc_4849D:
mov rdi, r15
mov rsi, r10
mov rcx, rbp
mov [rsp+58h+var_40], r10
mov [rsp+58h+var_38], rdx
call map_find_record
test rax, rax
jz short loc_4850D
mov r12, rax
mov rdx, [rax+48h]
cmp edx, 0FFFFFFF7h
jb short loc_484E0
mov rsi, [r12+40h]
mov rdi, [r15+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_484E0
call js_free_value_rt
loc_484E0:
mov rcx, [rsp+58h+var_50]
or rcx, [rsp+58h+var_58]
mov rax, [rsp+58h+var_48]
cmp eax, 0FFFFFFF7h
jb short loc_484F5
inc dword ptr [rcx]
loc_484F5:
mov [r12+40h], rcx
mov [r12+48h], rax
inc dword ptr [r14]
and r13, r14
mov r14d, r14d
jmp loc_4843D
loc_4850D:
mov rdi, r15
mov rsi, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_38]
mov rcx, rbp
call map_add_record
mov r12, rax
test rax, rax
jnz short loc_484E0
jmp loc_48432
|
unsigned long long js_map_set(
long long a1,
long long a2,
int 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)
{
int v15; // esi
_DWORD *v16; // r10
long long v17; // rdx
long long v18; // rbp
long long v19; // rcx
const char *v20; // rdx
unsigned long long v21; // r13
long long v23; // rax
long long record; // rax
long long v25; // r8
long long v26; // r9
_QWORD *v27; // r12
long long v28; // rdx
_QWORD *v29; // rsi
long long v30; // rdi
int v31; // eax
long long v32; // rcx
_DWORD *v33; // rcx
char v34; // [rsp+0h] [rbp-58h]
long long v35; // [rsp+0h] [rbp-58h]
unsigned long long v36; // [rsp+8h] [rbp-50h]
long long v37; // [rsp+10h] [rbp-48h]
long long v38; // [rsp+18h] [rbp-40h]
_DWORD *v39; // [rsp+20h] [rbp-38h]
v15 = a14 + 35;
if ( a3 != -1 || v15 != *(unsigned __int16 *)(a2 + 6) || (v16 = *(_DWORD **)(a2 + 48)) == 0LL )
{
JS_ThrowTypeErrorInvalidClass(a1, v15, a4, a5, a6, a7, *(double *)a8.m128_u64, *(double *)a9.m128_u64, a10, a11);
goto LABEL_14;
}
v17 = *a13;
v18 = a13[1];
v19 = (unsigned int)v18 ^ 7LL | *a13 & 0x7FFFFFFFFFFFFFFFLL;
if ( !v19 )
{
v17 = 0LL;
v18 = 0LL;
}
if ( *v16 )
{
if ( (_DWORD)v18 != -1 )
{
if ( (_DWORD)v18 != -8 || (v19 = *(_QWORD *)(v17 + 4) & 0xC000000000000000LL, v19 == 0x8000000000000000LL) )
{
v20 = "WeakSet";
if ( (a14 & 1) == 0 )
v20 = "WeakMap";
a2 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"invalid value used as %s key",
(long long)v20,
v19,
(long long)a13,
a14,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
v34);
goto LABEL_15;
}
}
}
if ( (a14 & 1) != 0 )
{
v37 = 3LL;
v35 = 0LL;
v36 = 0LL;
}
else
{
v23 = a13[2];
v37 = a13[3];
v35 = (unsigned int)v23;
v36 = v23 & 0xFFFFFFFF00000000LL;
}
v38 = *(_QWORD *)(a2 + 48);
v39 = (_DWORD *)v17;
record = map_find_record(a1, v16, v17, v18);
if ( record )
{
v27 = (_QWORD *)record;
v28 = *(_QWORD *)(record + 72);
if ( (unsigned int)v28 >= 0xFFFFFFF7 )
{
v29 = *(_QWORD **)(record + 64);
v30 = *(_QWORD *)(a1 + 24);
v31 = *(_DWORD *)v29;
v32 = (unsigned int)(*(_DWORD *)v29 - 1);
*(_DWORD *)v29 = v32;
if ( v31 <= 1 )
js_free_value_rt(v30, v29, v28, v32, v25, v26);
}
goto LABEL_24;
}
v27 = map_add_record(a1, v38, v39, v18);
if ( !v27 )
{
LABEL_14:
a2 = 0LL;
LABEL_15:
v21 = 0LL;
return v21 | a2;
}
LABEL_24:
v33 = (_DWORD *)(v35 | v36);
if ( (unsigned int)v37 >= 0xFFFFFFF7 )
++*v33;
v27[8] = v33;
v27[9] = v37;
++*(_DWORD *)a2;
v21 = a2 & 0xFFFFFFFF00000000LL;
a2 = (unsigned int)a2;
return v21 | a2;
}
|
js_map_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA ESI,[R9 + 0x23]
CMP EBX,-0x1
JNZ 0x0014842a
MOVZX EAX,word ptr [R14 + 0x6]
CMP ESI,EAX
JNZ 0x0014842a
MOV R10,qword ptr [R14 + 0x30]
TEST R10,R10
JZ 0x0014842a
MOV RDX,qword ptr [R8]
MOV RBP,qword ptr [R8 + 0x8]
MOV EAX,EBP
XOR RAX,0x7
MOV RCX,RDX
BTR RCX,0x3f
XOR ESI,ESI
OR RCX,RAX
CMOVZ RDX,RSI
CMOVZ RBP,RSI
CMP dword ptr [R10],0x0
JZ 0x00148455
CMP EBP,-0x1
JZ 0x00148455
CMP EBP,-0x8
JNZ 0x001483f9
MOV RAX,0x7fffffffffffffff
MOV RCX,-0x4000000000000000
AND RCX,qword ptr [RDX + 0x4]
INC RAX
CMP RCX,RAX
JNZ 0x00148455
LAB_001483f9:
TEST R9B,0x1
LEA RAX,[0x1a133b]
LEA RDX,[0x1a1333]
CMOVZ RDX,RAX
LEA RSI,[0x1a1316]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
MOV EBX,0x6
JMP 0x0014843a
LAB_0014842a:
MOV RDI,R15
CALL 0x001270bb
LAB_00148432:
MOV EBX,0x6
XOR R14D,R14D
LAB_0014843a:
XOR R13D,R13D
LAB_0014843d:
OR R14,R13
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00148455:
MOV R13,-0x100000000
TEST R9B,0x1
JNZ 0x00148482
MOV RAX,qword ptr [R8 + 0x10]
MOV RCX,qword ptr [R8 + 0x18]
MOV qword ptr [RSP + 0x10],RCX
MOV ECX,EAX
MOV qword ptr [RSP],RCX
AND RAX,R13
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0014849d
LAB_00148482:
MOV EAX,0x3
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
LAB_0014849d:
MOV RDI,R15
MOV RSI,R10
MOV RCX,RBP
MOV qword ptr [RSP + 0x18],R10
MOV qword ptr [RSP + 0x20],RDX
CALL 0x0014852f
TEST RAX,RAX
JZ 0x0014850d
MOV R12,RAX
MOV RDX,qword ptr [RAX + 0x48]
CMP EDX,-0x9
JC 0x001484e0
MOV RSI,qword ptr [R12 + 0x40]
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x001484e0
CALL 0x00120d90
LAB_001484e0:
MOV RCX,qword ptr [RSP + 0x8]
OR RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x10]
CMP EAX,-0x9
JC 0x001484f5
INC dword ptr [RCX]
LAB_001484f5:
MOV qword ptr [R12 + 0x40],RCX
MOV qword ptr [R12 + 0x48],RAX
INC dword ptr [R14]
AND R13,R14
MOV R14D,R14D
JMP 0x0014843d
LAB_0014850d:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,RBP
CALL 0x001119be
MOV R12,RAX
TEST RAX,RAX
JNZ 0x001484e0
JMP 0x00148432
|
int1 [16]
js_map_set(long param_1,int *param_2,int8 param_3,int8 param_4,ulong *param_5,
uint param_6)
{
int iVar1;
int8 uVar2;
long lVar3;
int *piVar4;
char *pcVar5;
ulong uVar6;
ulong uVar7;
int1 auVar8 [16];
ulong local_58;
ulong local_50;
ulong local_48;
if ((((int)param_3 == -1) && (param_6 + 0x23 == (uint)*(ushort *)((long)param_2 + 6))) &&
(piVar4 = *(int **)(param_2 + 0xc), piVar4 != (int *)0x0)) {
uVar6 = param_5[1];
uVar7 = *param_5;
if ((*param_5 & 0x7fffffffffffffff) == 0 && (param_5[1] & 0xffffffff) == 7) {
uVar6 = 0;
uVar7 = 0;
}
if (((*piVar4 == 0) || ((int)uVar6 == -1)) ||
(((int)uVar6 == -8 && ((*(ulong *)(uVar7 + 4) & 0xc000000000000000) != 0x8000000000000000))))
{
if ((param_6 & 1) == 0) {
local_48 = param_5[3];
local_58 = param_5[2] & 0xffffffff;
local_50 = param_5[2] & 0xffffffff00000000;
}
else {
local_48 = 3;
local_58 = 0;
local_50 = 0;
}
lVar3 = map_find_record(param_1,piVar4,uVar7,uVar6);
if (lVar3 == 0) {
lVar3 = map_add_record(param_1,piVar4,uVar7,uVar6);
if (lVar3 == 0) goto LAB_0014843a;
}
else if (0xfffffff6 < (uint)*(int8 *)(lVar3 + 0x48)) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = **(int **)(lVar3 + 0x40);
**(int **)(lVar3 + 0x40) = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2);
}
}
piVar4 = (int *)(local_50 | local_58);
if (0xfffffff6 < (uint)local_48) {
*piVar4 = *piVar4 + 1;
}
*(int **)(lVar3 + 0x40) = piVar4;
*(ulong *)(lVar3 + 0x48) = local_48;
*param_2 = *param_2 + 1;
uVar7 = (ulong)param_2 & 0xffffffff00000000;
uVar6 = (ulong)param_2 & 0xffffffff;
goto LAB_0014843d;
}
pcVar5 = "WeakSet";
if ((param_6 & 1) == 0) {
pcVar5 = "WeakMap";
}
JS_ThrowTypeError(param_1,"invalid value used as %s key",pcVar5);
}
else {
JS_ThrowTypeErrorInvalidClass(param_1);
}
LAB_0014843a:
uVar6 = 0;
param_3 = 6;
uVar7 = 0;
LAB_0014843d:
auVar8._8_8_ = param_3;
auVar8._0_8_ = uVar6 | uVar7;
return auVar8;
}
|
|
57,395
|
blst_expand_message_xmd
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/hash_to_field.c
|
void blst_expand_message_xmd(unsigned char *bytes, size_t len_in_bytes,
const unsigned char *msg, size_t msg_len,
const unsigned char *DST, size_t DST_len)
{
size_t buf_len = (len_in_bytes+31) & ((size_t)0-32);
unsigned char *buf_ptr = bytes;
if (buf_len > 255*32)
return;
if (buf_len != len_in_bytes)
buf_ptr = alloca(buf_len);
expand_message_xmd(buf_ptr, len_in_bytes, NULL, 0, msg, msg_len,
DST, DST_len);
if (buf_ptr != bytes) {
unsigned char *ptr = buf_ptr;
while (len_in_bytes--)
*bytes++ = *ptr++;
vec_zero(buf_ptr, buf_len);
}
}
|
O2
|
c
|
blst_expand_message_xmd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x1f(%rsi), %rbx
andq $-0x20, %rbx
cmpq $0x1fe0, %rbx # imm = 0x1FE0
ja 0x50c3c
movq %r9, %r10
movq %r8, %rax
movq %rcx, %r9
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, %r15
movq %rdi, %r12
cmpq %rsi, %rbx
je 0x50c04
movq %rsp, %r12
leaq 0xf(%rbx), %rcx
andq $-0x10, %rcx
subq %rcx, %r12
movq %r12, %rsp
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
pushq %r10
pushq %rax
callq 0x50c49
popq %rax
popq %rcx
cmpq %r15, %r12
je 0x50c3c
xorl %eax, %eax
cmpq %rax, %r14
je 0x50c31
movb (%r12,%rax), %cl
movb %cl, (%r15,%rax)
incq %rax
jmp 0x50c1f
movq %r12, %rdi
movq %rbx, %rsi
callq 0x50ea6
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
blst_expand_message_xmd:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
lea rbx, [rsi+1Fh]
and rbx, 0FFFFFFFFFFFFFFE0h
cmp rbx, 1FE0h
ja short loc_50C3C
mov r10, r9
mov rax, r8
mov r9, rcx
mov r8, rdx
mov r14, rsi
mov r15, rdi
mov r12, rdi
cmp rbx, rsi
jz short loc_50C04
mov r12, rsp
lea rcx, [rbx+0Fh]
and rcx, 0FFFFFFFFFFFFFFF0h
sub r12, rcx
mov rsp, r12
loc_50C04:
mov rdi, r12
mov rsi, r14
xor edx, edx
xor ecx, ecx
push r10
push rax
call expand_message_xmd
pop rax
pop rcx
cmp r12, r15
jz short loc_50C3C
xor eax, eax
loc_50C1F:
cmp r14, rax
jz short loc_50C31
mov cl, [r12+rax]
mov [r15+rax], cl
inc rax
jmp short loc_50C1F
loc_50C31:
mov rdi, r12
mov rsi, rbx
call vec_zero
loc_50C3C:
lea rsp, [rbp-20h]
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
void blst_expand_message_xmd(char *a1, long long a2, int a3, int a4, long long a5, long long a6)
{
unsigned long long v6; // rbx
char *v7; // r12
long long i; // rax
long long v9; // [rsp+0h] [rbp-20h] BYREF
v6 = (a2 + 31) & 0xFFFFFFFFFFFFFFE0LL;
if ( v6 <= 0x1FE0 )
{
v7 = a1;
if ( v6 != a2 )
v7 = (char *)&v9 - ((v6 + 15) & 0xFFFFFFFFFFFFFFF0LL);
expand_message_xmd((_DWORD)v7, a2, 0, 0, a3, a4, a5, a6);
if ( v7 != a1 )
{
for ( i = 0LL; a2 != i; ++i )
a1[i] = v7[i];
vec_zero(v7, v6);
}
}
}
|
blst_expand_message_xmd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
LEA RBX,[RSI + 0x1f]
AND RBX,-0x20
CMP RBX,0x1fe0
JA 0x00150c3c
MOV R10,R9
MOV RAX,R8
MOV R9,RCX
MOV R8,RDX
MOV R14,RSI
MOV R15,RDI
MOV R12,RDI
CMP RBX,RSI
JZ 0x00150c04
MOV R12,RSP
LEA RCX,[RBX + 0xf]
AND RCX,-0x10
SUB R12,RCX
MOV RSP,R12
LAB_00150c04:
MOV RDI,R12
MOV RSI,R14
XOR EDX,EDX
XOR ECX,ECX
PUSH R10
PUSH RAX
CALL 0x00150c49
POP RAX
POP RCX
CMP R12,R15
JZ 0x00150c3c
XOR EAX,EAX
LAB_00150c1f:
CMP R14,RAX
JZ 0x00150c31
MOV CL,byte ptr [R12 + RAX*0x1]
MOV byte ptr [R15 + RAX*0x1],CL
INC RAX
JMP 0x00150c1f
LAB_00150c31:
MOV RDI,R12
MOV RSI,RBX
CALL 0x00150ea6
LAB_00150c3c:
LEA RSP,[RBP + -0x20]
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void blst_expand_message_xmd
(int1 *param_1,ulong param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
ulong uVar1;
int8 uVar2;
int8 extraout_RDX;
ulong uVar3;
int1 *puVar4;
int1 *puVar5;
puVar4 = &stack0xffffffffffffffd8;
uVar3 = param_2 + 0x1f & 0xffffffffffffffe0;
if (uVar3 < 0x1fe1) {
puVar5 = param_1;
if (uVar3 != param_2) {
puVar4 = &stack0xffffffffffffffd8 + -uVar3;
puVar5 = puVar4;
}
*(int8 *)(puVar4 + -8) = param_6;
*(int8 *)(puVar4 + -0x10) = param_5;
*(int8 *)(puVar4 + -0x18) = 0x150c16;
expand_message_xmd(puVar5,param_2,0,0,param_3,param_4);
uVar2 = *(int8 *)(puVar4 + -8);
if (puVar5 != param_1) {
for (uVar1 = 0; param_2 != uVar1; uVar1 = uVar1 + 1) {
uVar2 = CONCAT71((int7)((ulong)uVar2 >> 8),puVar5[uVar1]);
param_1[uVar1] = puVar5[uVar1];
}
*(int8 *)(puVar4 + -8) = 0x150c3c;
vec_zero(puVar5,uVar3,extraout_RDX,uVar2);
}
}
return;
}
|
|
57,396
|
my_wildcmp_uca_impl
|
eloqsql/strings/ctype-uca.c
|
static
int my_wildcmp_uca_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
my_wc_t s_wc, w_wc;
int scan;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (1)
{
my_bool escaped= 0;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
result= 1; /* Found an anchor char */
break;
}
wildstr+= scan;
if (w_wc == (my_wc_t) escape && wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
escaped= 1;
}
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
if (!escaped && w_wc == (my_wc_t) w_one)
{
result= 1; /* Found an anchor char */
}
else
{
if (my_uca_charcmp(cs,s_wc,w_wc))
return 1; /* No match */
}
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
}
if (w_wc == (my_wc_t) w_many)
{ /* Found w_many */
/* Remove any '%' and '_' from the wild search string */
for ( ; wildstr != wildend ; )
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
wildstr+= scan;
continue;
}
if (w_wc == (my_wc_t) w_one)
{
wildstr+= scan;
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return 0; /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
if (w_wc == (my_wc_t) escape)
{
if (wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
}
}
while (1)
{
/* Skip until the first character from wildstr is found */
while (str != str_end)
{
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
if (!my_uca_charcmp(cs,s_wc,w_wc))
break;
str+= scan;
}
if (str == str_end)
return -1;
str+= scan;
result= my_wildcmp_uca_impl(cs, str, str_end, wildstr, wildend,
escape, w_one, w_many,
recurse_level + 1);
if (result <= 0)
return result;
}
}
}
return (str != str_end ? 1 : 0);
}
|
O0
|
c
|
my_wildcmp_uca_impl:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
leaq 0x35cf7b(%rip), %rax # 0x3ba318
cmpq $0x0, (%rax)
je 0x5d3c3
leaq 0x35cf6e(%rip), %rax # 0x3ba318
movq (%rax), %rax
movl 0x20(%rbp), %edi
callq *%rax
cmpl $0x0, %eax
je 0x5d3c3
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
jmp 0x5d3c5
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x5d785
jmp 0x5d3d5
movb $0x0, -0x59(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0x5d403
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
movq -0x48(%rbp), %rax
movslq 0x18(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5d41c
movl $0x1, -0x38(%rbp)
jmp 0x5d525
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5d483
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x5d483
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0x5d46e
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movb $0x1, -0x59(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0x5d4ad
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpb $0x0, -0x59(%rbp)
jne 0x5d4da
movq -0x48(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5d4da
movl $0x1, -0x38(%rbp)
jmp 0x5d4fe
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x62760
cmpl $0x0, %eax
je 0x5d4fc
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
jmp 0x5d4fe
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x5d520
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x5d79d
jmp 0x5d3d5
movq -0x48(%rbp), %rax
movslq 0x18(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5d780
jmp 0x5d538
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x5d5f0
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0x5d570
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
movq -0x48(%rbp), %rax
movslq 0x18(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5d590
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x5d538
movq -0x48(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5d5ee
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0x5d5d8
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x5d538
jmp 0x5d5f0
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x5d606
movl $0x0, -0x4(%rbp)
jmp 0x5d79d
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x5d61c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d79d
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0x5d646
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5d6ab
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x5d6a9
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0x5d698
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x5d6ab
jmp 0x5d6ad
jmp 0x5d6af
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x5d70e
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0x5d6e3
movl $0x1, -0x4(%rbp)
jmp 0x5d79d
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x62760
cmpl $0x0, %eax
jne 0x5d6fb
jmp 0x5d70e
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x5d6af
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x5d721
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d79d
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
addl $0x1, %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x5d350
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jg 0x5d77b
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5d79d
jmp 0x5d6ad
jmp 0x5d3c5
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wildcmp_uca_impl:
push rbp
mov rbp, rsp
sub rsp, 80h
mov eax, [rbp+arg_10]
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov [rbp+var_38], 0FFFFFFFFh
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
lea rax, my_string_stack_guard
cmp qword ptr [rax], 0
jz short loc_5D3C3
lea rax, my_string_stack_guard
mov rax, [rax]
mov edi, [rbp+arg_10]
call rax
cmp eax, 0
jz short loc_5D3C3
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D3C3:
jmp short $+2
loc_5D3C5:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz loc_5D785
jmp short $+2
loc_5D3D5:
mov [rbp+var_59], 0
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_5D403
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D403:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_8]
cmp rax, rcx
jnz short loc_5D41C
mov [rbp+var_38], 1
jmp loc_5D525
loc_5D41C:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_34]
cmp rax, rcx
jnz short loc_5D483
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_5D483
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_5D46E
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D46E:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov [rbp+var_59], 1
loc_5D483:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_5D4AD
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D4AD:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
cmp [rbp+var_59], 0
jnz short loc_5D4DA
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_0]
cmp rax, rcx
jnz short loc_5D4DA
mov [rbp+var_38], 1
jmp short loc_5D4FE
loc_5D4DA:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call my_uca_charcmp
cmp eax, 0
jz short loc_5D4FC
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D4FC:
jmp short $+2
loc_5D4FE:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_5D520
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
setnz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_5D79D
loc_5D520:
jmp loc_5D3D5
loc_5D525:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_8]
cmp rax, rcx
jnz loc_5D780
jmp short $+2
loc_5D538:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz loc_5D5F0
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_5D570
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D570:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_8]
cmp rax, rcx
jnz short loc_5D590
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp short loc_5D538
loc_5D590:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_0]
cmp rax, rcx
jnz short loc_5D5EE
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_5D5D8
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D5D8:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp loc_5D538
loc_5D5EE:
jmp short $+2
loc_5D5F0:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_5D606
mov [rbp+var_4], 0
jmp loc_5D79D
loc_5D606:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_5D61C
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_5D79D
loc_5D61C:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_5D646
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D646:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_34]
cmp rax, rcx
jnz short loc_5D6AB
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_5D6A9
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_5D698
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D698:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
loc_5D6A9:
jmp short $+2
loc_5D6AB:
jmp short $+2
loc_5D6AD:
jmp short $+2
loc_5D6AF:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jz short loc_5D70E
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_5D6E3
mov [rbp+var_4], 1
jmp loc_5D79D
loc_5D6E3:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call my_uca_charcmp
cmp eax, 0
jnz short loc_5D6FB
jmp short loc_5D70E
loc_5D6FB:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_5D6AF
loc_5D70E:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_5D721
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_5D79D
loc_5D721:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_34]
mov r11d, [rbp+arg_0]
mov r10d, [rbp+arg_8]
mov eax, [rbp+arg_10]
add eax, 1
mov [rsp+80h+var_80], r11d
mov [rsp+80h+var_78], r10d
mov [rsp+80h+var_70], eax
call my_wildcmp_uca_impl
mov [rbp+var_38], eax
cmp [rbp+var_38], 0
jg short loc_5D77B
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp short loc_5D79D
loc_5D77B:
jmp loc_5D6AD
loc_5D780:
jmp loc_5D3C5
loc_5D785:
mov rdx, [rbp+var_18]
mov rsi, [rbp+var_20]
xor eax, eax
mov ecx, 1
cmp rdx, rsi
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_5D79D:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long my_wildcmp_uca_impl(
long long a1,
unsigned long long a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
char v10; // [rsp+27h] [rbp-59h]
long long ( *v11)(long long, long long *, unsigned long long, unsigned long long); // [rsp+28h] [rbp-58h]
int v12; // [rsp+34h] [rbp-4Ch]
int v13; // [rsp+34h] [rbp-4Ch]
int v14; // [rsp+34h] [rbp-4Ch]
int v15; // [rsp+34h] [rbp-4Ch]
int v16; // [rsp+34h] [rbp-4Ch]
int v17; // [rsp+34h] [rbp-4Ch]
long long v18; // [rsp+38h] [rbp-48h] BYREF
long long v19; // [rsp+40h] [rbp-40h] BYREF
int v20; // [rsp+48h] [rbp-38h]
int v21; // [rsp+4Ch] [rbp-34h]
unsigned long long v22; // [rsp+50h] [rbp-30h]
unsigned long long v23; // [rsp+58h] [rbp-28h]
unsigned long long v24; // [rsp+60h] [rbp-20h]
unsigned long long v25; // [rsp+68h] [rbp-18h]
long long v26; // [rsp+70h] [rbp-10h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = -1;
v11 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) )
{
return 1;
}
else
{
do
{
if ( v23 == v22 )
return v25 != v24;
while ( 1 )
{
v10 = 0;
v12 = v11(v26, &v18, v23, v22);
if ( v12 <= 0 )
return 1;
if ( v18 == a8 )
break;
v23 += v12;
if ( v18 == v21 && v23 < v22 )
{
v13 = v11(v26, &v18, v23, v22);
if ( v13 <= 0 )
return 1;
v23 += v13;
v10 = 1;
}
v14 = v11(v26, &v19, v25, v24);
if ( v14 <= 0 )
return 1;
v25 += v14;
if ( v10 || v18 != a7 )
{
if ( (unsigned int)my_uca_charcmp(v26, v19, v18) )
return 1;
}
else
{
v20 = 1;
}
if ( v23 == v22 )
return v25 != v24;
}
v20 = 1;
}
while ( v18 != a8 );
while ( v23 != v22 )
{
v15 = v11(v26, &v18, v23, v22);
if ( v15 <= 0 )
return 1;
if ( v18 == a8 )
{
v23 += v15;
}
else
{
if ( v18 != a7 )
break;
v23 += v15;
v16 = v11(v26, &v19, v25, v24);
if ( v16 <= 0 )
return 1;
v25 += v16;
}
}
if ( v23 == v22 )
{
return 0;
}
else if ( v25 == v24 )
{
return (unsigned int)-1;
}
else
{
v17 = v11(v26, &v18, v23, v22);
if ( v17 > 0 )
{
v23 += v17;
if ( v18 == v21 && v23 < v22 )
{
v17 = v11(v26, &v18, v23, v22);
if ( v17 > 0 )
{
v23 += v17;
goto LABEL_45;
}
return 1;
}
else
{
do
{
LABEL_45:
while ( v25 != v24 )
{
v17 = v11(v26, &v19, v25, v24);
if ( v17 <= 0 )
return 1;
if ( !(unsigned int)my_uca_charcmp(v26, v19, v18) )
break;
v25 += v17;
}
if ( v25 == v24 )
return (unsigned int)-1;
v25 += v17;
v20 = my_wildcmp_uca_impl(v26, v25, v24, v23, v22, v21, a7, a8, a9 + 1);
}
while ( v20 > 0 );
return (unsigned int)v20;
}
}
else
{
return 1;
}
}
}
}
|
my_wildcmp_uca_impl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV EAX,dword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
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 qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV dword ptr [RBP + -0x38],0xffffffff
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[0x4ba318]
CMP qword ptr [RAX],0x0
JZ 0x0015d3c3
LEA RAX,[0x4ba318]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
CMP EAX,0x0
JZ 0x0015d3c3
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d3c3:
JMP 0x0015d3c5
LAB_0015d3c5:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x0015d785
JMP 0x0015d3d5
LAB_0015d3d5:
MOV byte ptr [RBP + -0x59],0x0
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x0015d403
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d403:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x18]
CMP RAX,RCX
JNZ 0x0015d41c
MOV dword ptr [RBP + -0x38],0x1
JMP 0x0015d525
LAB_0015d41c:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x34]
CMP RAX,RCX
JNZ 0x0015d483
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0015d483
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x0015d46e
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d46e:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV byte ptr [RBP + -0x59],0x1
LAB_0015d483:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x0015d4ad
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d4ad:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
CMP byte ptr [RBP + -0x59],0x0
JNZ 0x0015d4da
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x10]
CMP RAX,RCX
JNZ 0x0015d4da
MOV dword ptr [RBP + -0x38],0x1
JMP 0x0015d4fe
LAB_0015d4da:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00162760
CMP EAX,0x0
JZ 0x0015d4fc
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d4fc:
JMP 0x0015d4fe
LAB_0015d4fe:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015d520
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015d79d
LAB_0015d520:
JMP 0x0015d3d5
LAB_0015d525:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x18]
CMP RAX,RCX
JNZ 0x0015d780
JMP 0x0015d538
LAB_0015d538:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x0015d5f0
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x0015d570
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d570:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x18]
CMP RAX,RCX
JNZ 0x0015d590
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015d538
LAB_0015d590:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x10]
CMP RAX,RCX
JNZ 0x0015d5ee
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x0015d5d8
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d5d8:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0015d538
LAB_0015d5ee:
JMP 0x0015d5f0
LAB_0015d5f0:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015d606
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015d79d
LAB_0015d606:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0015d61c
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015d79d
LAB_0015d61c:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x0015d646
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d646:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x34]
CMP RAX,RCX
JNZ 0x0015d6ab
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0015d6a9
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x0015d698
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d698:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_0015d6a9:
JMP 0x0015d6ab
LAB_0015d6ab:
JMP 0x0015d6ad
LAB_0015d6ad:
JMP 0x0015d6af
LAB_0015d6af:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0015d70e
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x0015d6e3
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d79d
LAB_0015d6e3:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00162760
CMP EAX,0x0
JNZ 0x0015d6fb
JMP 0x0015d70e
LAB_0015d6fb:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0015d6af
LAB_0015d70e:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0015d721
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015d79d
LAB_0015d721:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x34]
MOV R11D,dword ptr [RBP + 0x10]
MOV R10D,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP],R11D
MOV dword ptr [RSP + 0x8],R10D
MOV dword ptr [RSP + 0x10],EAX
CALL 0x0015d350
MOV dword ptr [RBP + -0x38],EAX
CMP dword ptr [RBP + -0x38],0x0
JG 0x0015d77b
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015d79d
LAB_0015d77b:
JMP 0x0015d6ad
LAB_0015d780:
JMP 0x0015d3c5
LAB_0015d785:
MOV RDX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,RSI
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_0015d79d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
uint my_wildcmp_uca_impl(long param_1,long param_2,long param_3,ulong param_4,ulong param_5,
int param_6,int param_7,int param_8,int param_9)
{
code *pcVar1;
bool bVar2;
int iVar3;
int local_54;
long local_50;
int8 local_48;
uint local_40;
int local_3c;
ulong local_38;
ulong local_30;
long local_28;
long local_20;
long local_18;
uint local_c;
local_40 = 0xffffffff;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_3c = param_6;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((my_string_stack_guard == (code *)0x0) ||
(iVar3 = (*my_string_stack_guard)(param_9), iVar3 == 0)) {
do {
if (local_30 == local_38) {
return (uint)(local_20 != local_28);
}
while( true ) {
bVar2 = false;
iVar3 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (iVar3 < 1) {
return 1;
}
if (local_50 == param_8) break;
local_30 = local_30 + (long)iVar3;
if ((local_50 == local_3c) && (local_30 < local_38)) {
iVar3 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (iVar3 < 1) {
return 1;
}
local_30 = local_30 + (long)iVar3;
bVar2 = true;
}
iVar3 = (*pcVar1)(local_18,&local_48,local_20,local_28);
if (iVar3 < 1) {
return 1;
}
local_20 = local_20 + iVar3;
if ((bVar2) || (local_50 != param_7)) {
iVar3 = my_uca_charcmp(local_18,local_48,local_50);
if (iVar3 != 0) {
return 1;
}
}
else {
local_40 = 1;
}
if (local_30 == local_38) {
return (uint)(local_20 != local_28);
}
}
local_40 = 1;
} while (local_50 != param_8);
while (local_30 != local_38) {
iVar3 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (iVar3 < 1) {
return 1;
}
if (local_50 == param_8) {
local_30 = local_30 + (long)iVar3;
}
else {
if (local_50 != param_7) break;
local_30 = local_30 + (long)iVar3;
iVar3 = (*pcVar1)(local_18,&local_48,local_20,local_28);
if (iVar3 < 1) {
return 1;
}
local_20 = local_20 + iVar3;
}
}
if (local_30 == local_38) {
local_c = 0;
}
else if (local_20 == local_28) {
local_c = 0xffffffff;
}
else {
local_54 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (local_54 < 1) {
local_c = 1;
}
else {
local_30 = local_30 + (long)local_54;
if ((local_50 == local_3c) && (local_30 < local_38)) {
local_54 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (local_54 < 1) {
return 1;
}
local_30 = local_30 + (long)local_54;
}
LAB_0015d6af:
do {
if (local_20 != local_28) {
local_54 = (*pcVar1)(local_18,&local_48,local_20,local_28);
if (local_54 < 1) {
return 1;
}
iVar3 = my_uca_charcmp(local_18,local_48,local_50);
if (iVar3 != 0) {
local_20 = local_20 + local_54;
goto LAB_0015d6af;
}
}
if (local_20 == local_28) {
return 0xffffffff;
}
local_20 = local_20 + local_54;
local_40 = my_wildcmp_uca_impl(local_18,local_20,local_28,local_30,local_38,local_3c,
param_7,param_8,param_9 + 1);
local_c = local_40;
} while (0 < (int)local_40);
}
}
}
else {
local_c = 1;
}
return local_c;
}
|
|
57,397
|
stmt_cursor_fetch
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static int stmt_cursor_fetch(MYSQL_STMT *stmt, uchar **row)
{
uchar buf[STMT_ID_LENGTH + 4];
MYSQL_DATA *result= &stmt->result;
if (stmt->state < MYSQL_STMT_USE_OR_STORE_CALLED)
{
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
/* do we have some prefetched rows available ? */
if (stmt->result_cursor)
return(stmt_buffered_fetch(stmt, row));
if (stmt->upsert_status.server_status & SERVER_STATUS_LAST_ROW_SENT)
stmt->upsert_status.server_status&= ~SERVER_STATUS_LAST_ROW_SENT;
else
{
int4store(buf, stmt->stmt_id);
int4store(buf + STMT_ID_LENGTH, stmt->prefetch_rows);
if (stmt->mysql->methods->db_command(stmt->mysql, COM_STMT_FETCH, (char *)buf, sizeof(buf), 1, stmt))
{
UPDATE_STMT_ERROR(stmt);
return(1);
}
/* free previously allocated buffer */
ma_free_root(&result->alloc, MYF(MY_KEEP_PREALLOC));
result->data= 0;
result->rows= 0;
if (!stmt->mysql->options.extension->skip_read_response)
{
if (stmt->mysql->methods->db_stmt_read_all_rows(stmt))
return(1);
return(stmt_buffered_fetch(stmt, row));
}
}
/* no more cursor data available */
*row= NULL;
return(MYSQL_NO_DATA);
}
|
O0
|
c
|
stmt_cursor_fetch:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x4, 0x50(%rax)
jae 0x58076
jmp 0x58007
movq -0x20(%rbp), %rax
movl $0x7de, 0x108(%rax) # imm = 0x7DE
movq -0x20(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1f19a9(%rip), %rax # 0x2499d0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x38140
movq -0x20(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x20(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1f198f(%rip), %rax # 0x2499e0
movq 0x70(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x38140
movq -0x20(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x14(%rbp)
jmp 0x582e2
movq -0x20(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
je 0x58099
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x5ce90
movl %eax, -0x14(%rbp)
jmp 0x582e2
movq -0x20(%rbp), %rax
movl 0xf4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x580c8
movq -0x20(%rbp), %rax
movl 0xf4(%rax), %ecx
andl $0xffffff7f, %ecx # imm = 0xFFFFFF7F
movl %ecx, 0xf4(%rax)
jmp 0x582d0
jmp 0x580ca
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movb %al, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x8, %rax
movb %al, -0xf(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x10, %rax
movb %al, -0xe(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x18, %rax
movb %al, -0xd(%rbp)
jmp 0x58104
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
movb %al, -0xc(%rbp)
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
shrq $0x8, %rax
movb %al, -0xb(%rbp)
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
shrq $0x10, %rax
movb %al, -0xa(%rbp)
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
shrq $0x18, %rax
movb %al, -0x9(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x38(%rcx), %rdi
leaq -0x10(%rbp), %rdx
movq -0x20(%rbp), %r9
movl $0x1c, %esi
movl $0x8, %ecx
movl $0x1, %r8d
callq *%rax
cmpl $0x0, %eax
je 0x58254
jmp 0x58188
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x20(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x38140
movq -0x20(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x20(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
cmpq $0x0, %rax
je 0x58205
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
movq %rax, -0x40(%rbp)
jmp 0x5822b
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x1f17bd(%rip), %rax # 0x2499e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x38140
movq -0x20(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x14(%rbp)
jmp 0x582e2
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
movl $0x1, %esi
callq 0x56820
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
cmpb $0x0, 0x148(%rax)
jne 0x582ce
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x60(%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
cmpl $0x0, %eax
je 0x582bc
movl $0x1, -0x14(%rbp)
jmp 0x582e2
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x5ce90
movl %eax, -0x14(%rbp)
jmp 0x582e2
jmp 0x582d0
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movl $0x64, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x58303
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
callq 0x382c0
nopl (%rax,%rax)
|
stmt_cursor_fetch:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov rax, [rbp+var_20]
add rax, 80h
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
cmp dword ptr [rax+50h], 4
jnb short loc_58076
jmp short $+2
loc_58007:
mov rax, [rbp+var_20]
mov dword ptr [rax+108h], 7DEh
mov rdi, [rbp+var_20]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_20]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_14], 1
jmp loc_582E2
loc_58076:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0E0h], 0
jz short loc_58099
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call stmt_buffered_fetch
mov [rbp+var_14], eax
jmp loc_582E2
loc_58099:
mov rax, [rbp+var_20]
mov eax, [rax+0F4h]
and eax, 80h
cmp eax, 0
jz short loc_580C8
mov rax, [rbp+var_20]
mov ecx, [rax+0F4h]
and ecx, 0FFFFFF7Fh
mov [rax+0F4h], ecx
jmp loc_582D0
loc_580C8:
jmp short $+2
loc_580CA:
mov rax, [rbp+var_20]
mov rax, [rax+40h]
mov [rbp+var_10], al
mov rax, [rbp+var_20]
mov rax, [rax+40h]
shr rax, 8
mov [rbp+var_F], al
mov rax, [rbp+var_20]
mov rax, [rax+40h]
shr rax, 10h
mov [rbp+var_E], al
mov rax, [rbp+var_20]
mov rax, [rax+40h]
shr rax, 18h
mov [rbp+var_D], al
jmp short $+2
loc_58104:
mov rax, [rbp+var_20]
mov rax, [rax+318h]
mov [rbp+var_C], al
mov rax, [rbp+var_20]
mov rax, [rax+318h]
shr rax, 8
mov [rbp+var_B], al
mov rax, [rbp+var_20]
mov rax, [rax+318h]
shr rax, 10h
mov [rbp+var_A], al
mov rax, [rbp+var_20]
mov rax, [rax+318h]
shr rax, 18h
mov [rbp+var_9], al
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov rdi, [rcx+38h]
lea rdx, [rbp+var_10]
mov r9, [rbp+var_20]
mov esi, 1Ch
mov ecx, 8
mov r8d, 1
call rax
cmp eax, 0
jz loc_58254
jmp short $+2
loc_58188:
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov ecx, [rax+90h]
mov rax, [rbp+var_20]
mov [rax+108h], ecx
mov rdi, [rbp+var_20]
add rdi, 30Dh
mov rax, [rbp+var_20]
mov rsi, [rax+38h]
add rsi, 297h
mov edx, 5
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_20]
add rax, 10Ch
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov rax, [rax+38h]
add rax, 97h
cmp rax, 0
jz short loc_58205
mov rax, [rbp+var_20]
mov rax, [rax+38h]
add rax, 97h
mov [rbp+var_40], rax
jmp short loc_5822B
loc_58205:
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_40], rax
loc_5822B:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_40]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_14], 1
jmp loc_582E2
loc_58254:
mov rdi, [rbp+var_30]
add rdi, 10h
mov esi, 1
call ma_free_root
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov qword ptr [rax+48h], 0
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov rax, [rax+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_582CE
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+60h]
mov rdi, [rbp+var_20]
call rax
cmp eax, 0
jz short loc_582BC
mov [rbp+var_14], 1
jmp short loc_582E2
loc_582BC:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call stmt_buffered_fetch
mov [rbp+var_14], eax
jmp short loc_582E2
loc_582CE:
jmp short $+2
loc_582D0:
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
mov [rbp+var_14], 64h ; 'd'
loc_582E2:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_58303
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
loc_58303:
call ___stack_chk_fail
|
long long stmt_cursor_fetch(long long a1, _QWORD *a2)
{
char *v2; // rax
_BYTE v5[8]; // [rsp+40h] [rbp-10h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-8h]
v6 = __readfsqword(0x28u);
if ( *(_DWORD *)(a1 + 80) < 4u )
{
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[14], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
if ( *(_QWORD *)(a1 + 224) )
return (unsigned int)stmt_buffered_fetch(a1, a2);
if ( (*(_DWORD *)(a1 + 244) & 0x80) != 0 )
{
*(_DWORD *)(a1 + 244) &= ~0x80u;
LABEL_16:
*a2 = 0LL;
return 100;
}
v5[0] = *(_QWORD *)(a1 + 64);
v5[1] = BYTE1(*(_QWORD *)(a1 + 64));
v5[2] = BYTE2(*(_QWORD *)(a1 + 64));
v5[3] = BYTE3(*(_QWORD *)(a1 + 64));
v5[4] = *(_QWORD *)(a1 + 792);
v5[5] = BYTE1(*(_QWORD *)(a1 + 792));
v5[6] = BYTE2(*(_QWORD *)(a1 + 792));
v5[7] = BYTE3(*(_QWORD *)(a1 + 792));
if ( (*(unsigned int ( **)(_QWORD, long long, _BYTE *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL)
+ 16LL))(
*(_QWORD *)(a1 + 56),
28LL,
v5,
8LL,
1LL,
a1) )
{
*(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL);
strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL);
*(_BYTE *)(a1 + 786) = 0;
if ( *(_QWORD *)(a1 + 56) == -151LL )
v2 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000];
else
v2 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
strncpy(a1 + 268, v2, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
else
{
ma_free_root((_QWORD *)(a1 + 144), 1);
*(_QWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 200) = 0LL;
if ( *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1152LL) + 328LL) )
goto LABEL_16;
if ( (*(unsigned int ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 96LL))(a1) )
return 1;
else
return (unsigned int)stmt_buffered_fetch(a1, a2);
}
}
|
stmt_cursor_fetch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x80
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x50],0x4
JNC 0x00158076
JMP 0x00158007
LAB_00158007:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x108],0x7de
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x30d
LEA RAX,[0x3499d0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x10c
LEA RAX,[0x3499e0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x200
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001582e2
LAB_00158076:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xe0],0x0
JZ 0x00158099
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0015ce90
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001582e2
LAB_00158099:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0xf4]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001580c8
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0xf4]
AND ECX,0xffffff7f
MOV dword ptr [RAX + 0xf4],ECX
JMP 0x001582d0
LAB_001580c8:
JMP 0x001580ca
LAB_001580ca:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
MOV byte ptr [RBP + -0x10],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x8
MOV byte ptr [RBP + -0xf],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x10
MOV byte ptr [RBP + -0xe],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x18
MOV byte ptr [RBP + -0xd],AL
JMP 0x00158104
LAB_00158104:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x318]
MOV byte ptr [RBP + -0xc],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x318]
SHR RAX,0x8
MOV byte ptr [RBP + -0xb],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x318]
SHR RAX,0x10
MOV byte ptr [RBP + -0xa],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x318]
SHR RAX,0x18
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RCX + 0x38]
LEA RDX,[RBP + -0x10]
MOV R9,qword ptr [RBP + -0x20]
MOV ESI,0x1c
MOV ECX,0x8
MOV R8D,0x1
CALL RAX
CMP EAX,0x0
JZ 0x00158254
JMP 0x00158188
LAB_00158188:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x108],ECX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x30d
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x38]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
CMP RAX,0x0
JZ 0x00158205
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0015822b
LAB_00158205:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x3499e0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x40],RAX
LAB_0015822b:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,0x200
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001582e2
LAB_00158254:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x10
MOV ESI,0x1
CALL 0x00156820
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x48],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x001582ce
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x60]
MOV RDI,qword ptr [RBP + -0x20]
CALL RAX
CMP EAX,0x0
JZ 0x001582bc
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001582e2
LAB_001582bc:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0015ce90
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001582e2
LAB_001582ce:
JMP 0x001582d0
LAB_001582d0:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x14],0x64
LAB_001582e2:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00158303
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
LAB_00158303:
CALL 0x001382c0
|
int4 stmt_cursor_fetch(long param_1,int8 *param_2)
{
int iVar1;
long in_FS_OFFSET;
char *local_48;
int4 local_1c;
int1 local_18;
int1 local_17;
int1 local_16;
int1 local_15;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (*(uint *)(param_1 + 0x50) < 4) {
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00349a50,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_1c = 1;
}
else if (*(long *)(param_1 + 0xe0) == 0) {
if ((*(uint *)(param_1 + 0xf4) & 0x80) == 0) {
local_18 = (int1)*(int8 *)(param_1 + 0x40);
local_17 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 8);
local_16 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10);
local_15 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18);
local_14 = (int1)*(int8 *)(param_1 + 0x318);
local_13 = (int1)((ulong)*(int8 *)(param_1 + 0x318) >> 8);
local_12 = (int1)((ulong)*(int8 *)(param_1 + 0x318) >> 0x10);
local_11 = (int1)((ulong)*(int8 *)(param_1 + 0x318) >> 0x18);
iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10))
(*(int8 *)(param_1 + 0x38),0x1c,&local_18,8,1,param_1);
if (iVar1 != 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
if (*(long *)(param_1 + 0x38) == -0x97) {
local_48 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000];
}
else {
local_48 = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),local_48,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_1c = 1;
goto LAB_001582e2;
}
ma_free_root(param_1 + 0x90,1);
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 200) = 0;
if (*(char *)(*(long *)(*(long *)(param_1 + 0x38) + 0x480) + 0x148) == '\0') {
iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x60))(param_1);
if (iVar1 == 0) {
local_1c = stmt_buffered_fetch(param_1,param_2);
}
else {
local_1c = 1;
}
goto LAB_001582e2;
}
}
else {
*(uint *)(param_1 + 0xf4) = *(uint *)(param_1 + 0xf4) & 0xffffff7f;
}
*param_2 = 0;
local_1c = 100;
}
else {
local_1c = stmt_buffered_fetch(param_1,param_2);
}
LAB_001582e2:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_1c;
}
|
|
57,398
|
ModelLoader::init_from_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/model.cpp
|
bool ModelLoader::init_from_gguf_file(const std::string& file_path, const std::string& prefix) {
LOG_DEBUG("init from '%s'", file_path.c_str());
file_paths_.push_back(file_path);
size_t file_index = file_paths_.size() - 1;
gguf_context* ctx_gguf_ = NULL;
ggml_context* ctx_meta_ = NULL;
ctx_gguf_ = gguf_init_from_file(file_path.c_str(), {true, &ctx_meta_});
if (!ctx_gguf_) {
LOG_ERROR("failed to open '%s'", file_path.c_str());
return false;
}
int n_tensors = gguf_get_n_tensors(ctx_gguf_);
size_t total_size = 0;
size_t data_offset = gguf_get_data_offset(ctx_gguf_);
for (int i = 0; i < n_tensors; i++) {
std::string name = gguf_get_tensor_name(ctx_gguf_, i);
struct ggml_tensor* dummy = ggml_get_tensor(ctx_meta_, name.c_str());
size_t offset = data_offset + gguf_get_tensor_offset(ctx_gguf_, i);
// LOG_DEBUG("%s", name.c_str());
TensorStorage tensor_storage(prefix + name, dummy->type, dummy->ne, ggml_n_dims(dummy), file_index, offset);
GGML_ASSERT(ggml_nbytes(dummy) == tensor_storage.nbytes());
tensor_storages.push_back(tensor_storage);
}
gguf_free(ctx_gguf_);
ggml_free(ctx_meta_);
return true;
}
|
O0
|
cpp
|
ModelLoader::init_from_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x1a8, %rsp # imm = 0x1A8
movq %rdi, 0x198(%rsp)
movq %rsi, 0x190(%rsp)
movq %rdx, 0x188(%rsp)
movq 0x198(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x190(%rsp), %rdi
callq 0xb280
movq %rax, %r8
xorl %edi, %edi
leaq 0xc79be(%rip), %rsi # 0x183e63
movl $0x28f, %edx # imm = 0x28F
leaq 0xc7a8e(%rip), %rcx # 0x183f3f
movb $0x0, %al
callq 0xeb5e0
movq 0x68(%rsp), %rdi
movq 0x190(%rsp), %rsi
callq 0xa02c0
movq 0x68(%rsp), %rdi
callq 0x73780
subq $0x1, %rax
movq %rax, 0x180(%rsp)
movq $0x0, 0x178(%rsp)
movq $0x0, 0x170(%rsp)
movq 0x190(%rsp), %rdi
callq 0xb280
movq %rax, %rdi
movb $0x1, 0x160(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, 0x168(%rsp)
movb 0x160(%rsp), %al
movq 0x168(%rsp), %rdx
movzbl %al, %esi
callq 0x1369b0
movq %rax, 0x178(%rsp)
cmpq $0x0, 0x178(%rsp)
jne 0xbc586
movq 0x190(%rsp), %rdi
callq 0xb280
movq %rax, %r8
movl $0x3, %edi
leaq 0xc78fd(%rip), %rsi # 0x183e63
movl $0x297, %edx # imm = 0x297
leaq 0xc79dc(%rip), %rcx # 0x183f4e
movb $0x0, %al
callq 0xeb5e0
movb $0x0, 0x1a7(%rsp)
jmp 0xbc8a8
movq 0x178(%rsp), %rdi
callq 0x1395b0
movl %eax, 0x15c(%rsp)
movq $0x0, 0x150(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1383c0
movq %rax, 0x148(%rsp)
movl $0x0, 0x144(%rsp)
movl 0x144(%rsp), %eax
cmpl 0x15c(%rsp), %eax
jge 0xbc886
movq 0x178(%rsp), %rdi
movl 0x144(%rsp), %esi
callq 0x139640
movq %rax, 0x58(%rsp)
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xbd40
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0x120(%rsp), %rdi
callq 0x30260
jmp 0xbc61e
leaq 0x11f(%rsp), %rdi
callq 0xb820
movq 0x170(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x120(%rsp), %rdi
callq 0xb280
movq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0x11e880
movq %rax, 0x50(%rsp)
jmp 0xbc659
movq 0x50(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x178(%rsp), %rdi
movl 0x144(%rsp), %esi
callq 0x139670
movq %rax, 0x40(%rsp)
jmp 0xbc68e
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %rax
addq %rcx, %rax
movq %rax, 0xf8(%rsp)
movq 0x188(%rsp), %rsi
leaq 0x70(%rsp), %rdi
leaq 0x120(%rsp), %rdx
callq 0xc2210
jmp 0xbc6bf
movq 0x100(%rsp), %rdi
movl (%rdi), %eax
movl %eax, 0x24(%rsp)
movq %rdi, %rax
addq $0x10, %rax
movq %rax, 0x28(%rsp)
callq 0x11b310
movl %eax, 0x34(%rsp)
jmp 0xbc6e4
movl 0x34(%rsp), %r8d
movq 0x28(%rsp), %rcx
movl 0x24(%rsp), %edx
movq 0x180(%rsp), %r9
movq 0xf8(%rsp), %rsi
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xc35f0
jmp 0xbc71c
leaq 0x70(%rsp), %rdi
callq 0xbf00
movq 0x100(%rsp), %rdi
callq 0x11ae90
movq %rax, 0x18(%rsp)
jmp 0xbc73a
leaq 0x90(%rsp), %rdi
callq 0xc36d0
movq %rax, 0x10(%rsp)
jmp 0xbc74e
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq %rcx, %rax
je 0xbc82b
movq 0x11b7c0(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
jmp 0xbc772
movq 0x11b82f(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0xc3497(%rip), %rsi # 0x17fc1a
leaq 0xc76d9(%rip), %rdx # 0x183e63
leaq 0xc77d1(%rip), %r8 # 0x183f62
xorl %eax, %eax
movl $0x2a8, %ecx # imm = 0x2A8
callq 0xbae0
callq 0x11a4f0
jmp 0xbc7a4
callq 0xb3a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x11f(%rsp), %rdi
callq 0xb820
jmp 0xbc8b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0xbc877
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xbf00
jmp 0xbc877
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x516b0
jmp 0xbc877
jmp 0xbc82d
jmp 0xbc82f
movq 0x68(%rsp), %rdi
addq $0x18, %rdi
leaq 0x90(%rsp), %rsi
callq 0xc2f30
jmp 0xbc847
leaq 0x90(%rsp), %rdi
callq 0x516b0
leaq 0x120(%rsp), %rdi
callq 0xbf00
movl 0x144(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x144(%rsp)
jmp 0xbc5c6
leaq 0x120(%rsp), %rdi
callq 0xbf00
jmp 0xbc8b9
movq 0x178(%rsp), %rdi
callq 0x137f60
movq 0x170(%rsp), %rdi
callq 0x11bfa0
movb $0x1, 0x1a7(%rsp)
movb 0x1a7(%rsp), %al
andb $0x1, %al
addq $0x1a8, %rsp # imm = 0x1A8
retq
movq 0x110(%rsp), %rdi
callq 0xbd30
nopw %cs:(%rax,%rax)
|
_ZN11ModelLoader19init_from_gguf_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
sub rsp, 1A8h
mov [rsp+1A8h+var_10], rdi
mov [rsp+1A8h+var_18], rsi
mov qword ptr [rsp+1A8h+var_20], rdx
mov rax, [rsp+1A8h+var_10]
mov [rsp+1A8h+var_140], rax
mov rdi, [rsp+1A8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov r8, rax
xor edi, edi
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov edx, 28Fh
lea rcx, aInitFromS; "init from '%s'"
mov al, 0
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
mov rdi, [rsp+1A8h+var_140]
mov rsi, [rsp+1A8h+var_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
mov rdi, [rsp+1A8h+var_140]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
sub rax, 1
mov [rsp+1A8h+var_28], rax
mov [rsp+1A8h+var_30], 0
mov [rsp+1A8h+var_38], 0
mov rdi, [rsp+1A8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
mov [rsp+1A8h+var_48], 1
lea rax, [rsp+1A8h+var_38]
mov [rsp+1A8h+var_40], rax
mov al, [rsp+1A8h+var_48]
mov rdx, [rsp+1A8h+var_40]
movzx esi, al
call gguf_init_from_file
mov [rsp+1A8h+var_30], rax
cmp [rsp+1A8h+var_30], 0
jnz short loc_BC586
mov rdi, [rsp+1A8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov r8, rax
mov edi, 3
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov edx, 297h
lea rcx, aFailedToOpenS; "failed to open '%s'"
mov al, 0
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
mov [rsp+1A8h+var_1], 0
jmp loc_BC8A8
loc_BC586:
mov rdi, [rsp+1A8h+var_30]
call gguf_get_n_tensors
mov [rsp+1A8h+var_4C], eax
mov [rsp+1A8h+var_58], 0
mov rdi, [rsp+1A8h+var_30]
call gguf_get_data_offset
mov [rsp+1A8h+var_60], rax
mov [rsp+1A8h+var_64], 0
loc_BC5C6:
mov eax, [rsp+1A8h+var_64]
cmp eax, [rsp+1A8h+var_4C]
jge loc_BC886
mov rdi, [rsp+1A8h+var_30]
mov esi, [rsp+1A8h+var_64]
call gguf_get_tensor_name
mov [rsp+1A8h+var_150], rax
lea rdi, [rsp+1A8h+var_89]
mov [rsp+1A8h+var_148], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+1A8h+var_150]
mov rdx, [rsp+1A8h+var_148]
lea rdi, [rsp+1A8h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_BC61E:
lea rdi, [rsp+1A8h+var_89]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+1A8h+var_38]
mov [rsp+1A8h+var_160], rax
lea rdi, [rsp+1A8h+var_88]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+1A8h+var_160]
mov rsi, rax
call ggml_get_tensor
mov [rsp+1A8h+var_158], rax
jmp short $+2
loc_BC659:
mov rax, [rsp+1A8h+var_158]
mov [rsp+1A8h+var_A8], rax
mov rax, [rsp+1A8h+var_60]
mov [rsp+1A8h+var_170], rax
mov rdi, [rsp+1A8h+var_30]
mov esi, [rsp+1A8h+var_64]
call gguf_get_tensor_offset
mov qword ptr [rsp+1A8h+var_168], rax
jmp short $+2
loc_BC68E:
mov rcx, qword ptr [rsp+1A8h+var_168]; int
mov rax, [rsp+1A8h+var_170]
add rax, rcx
mov [rsp+1A8h+var_B0], rax
mov rsi, qword ptr [rsp+1A8h+var_20]; int
lea rdi, [rsp+1A8h+var_138]; int
lea rdx, [rsp+1A8h+var_88]; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
jmp short $+2
loc_BC6BF:
mov rdi, [rsp+1A8h+var_A8]
mov eax, [rdi]
mov [rsp+1A8h+var_184], eax
mov rax, rdi
add rax, 10h
mov [rsp+1A8h+var_180], rax
call ggml_n_dims
mov [rsp+1A8h+var_174], eax
jmp short $+2
loc_BC6E4:
mov r8d, [rsp+1A8h+var_174]
mov rcx, [rsp+1A8h+var_180]
mov edx, [rsp+1A8h+var_184]
mov r9, [rsp+1A8h+var_28]
mov rsi, [rsp+1A8h+var_B0]
mov rax, rsp
mov [rax], rsi
lea rdi, [rsp+1A8h+var_118]
lea rsi, [rsp+1A8h+var_138]
call _ZN13TensorStorageC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE9ggml_typePlimm; TensorStorage::TensorStorage(std::string const&,ggml_type,long *,int,ulong,ulong)
jmp short $+2
loc_BC71C:
lea rdi, [rsp+1A8h+var_138]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+1A8h+var_A8]
call ggml_nbytes
mov [rsp+1A8h+var_190], rax
jmp short $+2
loc_BC73A:
lea rdi, [rsp+1A8h+var_118]; this
call _ZNK13TensorStorage6nbytesEv; TensorStorage::nbytes(void)
mov [rsp+1A8h+var_198], rax
jmp short $+2
loc_BC74E:
mov rax, [rsp+1A8h+var_190]
mov rcx, [rsp+1A8h+var_198]
cmp rax, rcx
jz loc_BC82B
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_BC772:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea r8, aGgmlNbytesDumm; "ggml_nbytes(dummy) == tensor_storage.nb"...
xor eax, eax
mov ecx, 2A8h
call _fprintf
call ggml_print_backtrace
jmp short $+2
loc_BC7A4:
call _abort
mov rcx, rax
mov eax, edx
mov [rsp+1A8h+var_98], rcx
mov [rsp+1A8h+var_9C], eax
lea rdi, [rsp+1A8h+var_89]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_BC8B9
mov rcx, rax
mov eax, edx
mov [rsp+1A8h+var_98], rcx
mov [rsp+1A8h+var_9C], eax
jmp loc_BC877
mov rcx, rax
mov eax, edx
mov [rsp+1A8h+var_98], rcx
mov [rsp+1A8h+var_9C], eax
lea rdi, [rsp+1A8h+var_138]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_BC877
mov rcx, rax
mov eax, edx
mov [rsp+1A8h+var_98], rcx
mov [rsp+1A8h+var_9C], eax
lea rdi, [rsp+1A8h+var_118]; this
call _ZN13TensorStorageD2Ev; TensorStorage::~TensorStorage()
jmp short loc_BC877
loc_BC82B:
jmp short $+2
loc_BC82D:
jmp short $+2
loc_BC82F:
mov rdi, [rsp+1A8h+var_140]
add rdi, 18h
lea rsi, [rsp+1A8h+var_118]
call _ZNSt6vectorI13TensorStorageSaIS0_EE9push_backERKS0_; std::vector<TensorStorage>::push_back(TensorStorage const&)
jmp short $+2
loc_BC847:
lea rdi, [rsp+1A8h+var_118]; this
call _ZN13TensorStorageD2Ev; TensorStorage::~TensorStorage()
lea rdi, [rsp+1A8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov eax, [rsp+1A8h+var_64]
add eax, 1
mov [rsp+1A8h+var_64], eax
jmp loc_BC5C6
loc_BC877:
lea rdi, [rsp+1A8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_BC8B9
loc_BC886:
mov rdi, [rsp+1A8h+var_30]
call gguf_free
mov rdi, [rsp+1A8h+var_38]
call ggml_free
mov [rsp+1A8h+var_1], 1
loc_BC8A8:
mov al, [rsp+1A8h+var_1]
and al, 1
add rsp, 1A8h
retn
loc_BC8B9:
mov rdi, [rsp+1A8h+var_98]
call __Unwind_Resume
|
char ModelLoader::init_from_gguf_file(_QWORD *a1, long long a2, long long a3)
{
int v3; // eax
int v4; // r9d
long long v5; // rax
int v6; // eax
int v7; // r9d
long long v8; // rax
int v9; // r8d
int v10; // r9d
int v12; // [rsp+0h] [rbp-1A8h]
void *v13; // [rsp+8h] [rbp-1A0h]
long long v14; // [rsp+10h] [rbp-198h]
long long v15; // [rsp+18h] [rbp-190h]
int v16; // [rsp+24h] [rbp-184h]
int v17; // [rsp+28h] [rbp-180h]
int v18; // [rsp+34h] [rbp-174h]
long long v19; // [rsp+38h] [rbp-170h]
int v20[2]; // [rsp+40h] [rbp-168h]
long long v21; // [rsp+48h] [rbp-160h]
long long tensor_name; // [rsp+58h] [rbp-150h]
int v23[8]; // [rsp+70h] [rbp-138h] BYREF
_BYTE v24[104]; // [rsp+90h] [rbp-118h] BYREF
long long v25; // [rsp+F8h] [rbp-B0h]
int *tensor; // [rsp+100h] [rbp-A8h]
char v27; // [rsp+11Fh] [rbp-89h] BYREF
int v28[9]; // [rsp+120h] [rbp-88h] BYREF
unsigned int i; // [rsp+144h] [rbp-64h]
long long data_offset; // [rsp+148h] [rbp-60h]
long long v31; // [rsp+150h] [rbp-58h]
int n_tensors; // [rsp+15Ch] [rbp-4Ch]
char v33; // [rsp+160h] [rbp-48h]
long long *v34; // [rsp+168h] [rbp-40h]
long long v35; // [rsp+170h] [rbp-38h] BYREF
long long v36; // [rsp+178h] [rbp-30h]
long long v37; // [rsp+180h] [rbp-28h]
int v38[2]; // [rsp+188h] [rbp-20h]
long long v39; // [rsp+190h] [rbp-18h]
_QWORD *v40; // [rsp+198h] [rbp-10h]
char v41; // [rsp+1A7h] [rbp-1h]
v40 = a1;
v39 = a2;
*(_QWORD *)v38 = a3;
v3 = std::string::c_str(a2);
log_printf(
0,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
655,
(unsigned int)"init from '%s'",
v3,
v4);
std::vector<std::string>::push_back(a1, a2);
v37 = std::vector<std::string>::size(a1) - 1;
v36 = 0LL;
v35 = 0LL;
v5 = std::string::c_str(a2);
v33 = 1;
v34 = &v35;
v36 = gguf_init_from_file(v5, 1LL, &v35);
if ( v36 )
{
n_tensors = gguf_get_n_tensors(v36);
v31 = 0LL;
data_offset = gguf_get_data_offset(v36);
for ( i = 0; (int)i < n_tensors; ++i )
{
tensor_name = gguf_get_tensor_name(v36, i);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v28, tensor_name, (long long)&v27);
std::allocator<char>::~allocator(&v27);
v21 = v35;
v8 = std::string::c_str(v28);
tensor = (int *)ggml_get_tensor(v21, v8);
v19 = data_offset;
*(_QWORD *)v20 = gguf_get_tensor_offset(v36, i);
v25 = *(_QWORD *)v20 + v19;
std::operator+<char>((int)v23, v38[0], (int)v28, v20[0], v9, v10, v12, v13, v14, v15);
v16 = *tensor;
v17 = (_DWORD)tensor + 16;
v18 = ggml_n_dims(tensor);
TensorStorage::TensorStorage((unsigned int)v24, (unsigned int)v23, v16, v17, v18, v37, v25);
std::string::~string(v23);
v15 = ggml_nbytes(tensor);
v14 = TensorStorage::nbytes((TensorStorage *)v24);
if ( v15 != v14 )
{
fflush(stdout);
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
680,
"ggml_nbytes(dummy) == tensor_storage.nbytes()");
ggml_print_backtrace();
abort();
}
std::vector<TensorStorage>::push_back(a1 + 3, v24);
TensorStorage::~TensorStorage((TensorStorage *)v24);
std::string::~string(v28);
}
gguf_free(v36);
ggml_free(v35);
v41 = 1;
}
else
{
v6 = std::string::c_str(v39);
log_printf(
3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
663,
(unsigned int)"failed to open '%s'",
v6,
v7);
v41 = 0;
}
return v41 & 1;
}
|
init_from_gguf_file:
SUB RSP,0x1a8
MOV qword ptr [RSP + 0x198],RDI
MOV qword ptr [RSP + 0x190],RSI
MOV qword ptr [RSP + 0x188],RDX
MOV RAX,qword ptr [RSP + 0x198]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x190]
CALL 0x0010b280
MOV R8,RAX
XOR EDI,EDI
LEA RSI,[0x283e63]
MOV EDX,0x28f
LEA RCX,[0x283f3f]
MOV AL,0x0
CALL 0x001eb5e0
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x190]
CALL 0x001a02c0
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x00173780
SUB RAX,0x1
MOV qword ptr [RSP + 0x180],RAX
MOV qword ptr [RSP + 0x178],0x0
MOV qword ptr [RSP + 0x170],0x0
MOV RDI,qword ptr [RSP + 0x190]
CALL 0x0010b280
MOV RDI,RAX
MOV byte ptr [RSP + 0x160],0x1
LEA RAX,[RSP + 0x170]
MOV qword ptr [RSP + 0x168],RAX
MOV AL,byte ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
MOVZX ESI,AL
CALL 0x002369b0
MOV qword ptr [RSP + 0x178],RAX
CMP qword ptr [RSP + 0x178],0x0
JNZ 0x001bc586
MOV RDI,qword ptr [RSP + 0x190]
CALL 0x0010b280
MOV R8,RAX
MOV EDI,0x3
LEA RSI,[0x283e63]
MOV EDX,0x297
LEA RCX,[0x283f4e]
MOV AL,0x0
CALL 0x001eb5e0
MOV byte ptr [RSP + 0x1a7],0x0
JMP 0x001bc8a8
LAB_001bc586:
MOV RDI,qword ptr [RSP + 0x178]
CALL 0x002395b0
MOV dword ptr [RSP + 0x15c],EAX
MOV qword ptr [RSP + 0x150],0x0
MOV RDI,qword ptr [RSP + 0x178]
CALL 0x002383c0
MOV qword ptr [RSP + 0x148],RAX
MOV dword ptr [RSP + 0x144],0x0
LAB_001bc5c6:
MOV EAX,dword ptr [RSP + 0x144]
CMP EAX,dword ptr [RSP + 0x15c]
JGE 0x001bc886
MOV RDI,qword ptr [RSP + 0x178]
MOV ESI,dword ptr [RSP + 0x144]
CALL 0x00239640
MOV qword ptr [RSP + 0x58],RAX
LEA RDI,[RSP + 0x11f]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x0010bd40
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
LAB_001bc60f:
LEA RDI,[RSP + 0x120]
CALL 0x00130260
JMP 0x001bc61e
LAB_001bc61e:
LEA RDI,[RSP + 0x11f]
CALL 0x0010b820
MOV RAX,qword ptr [RSP + 0x170]
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x120]
CALL 0x0010b280
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,RAX
LAB_001bc64d:
CALL 0x0021e880
MOV qword ptr [RSP + 0x50],RAX
JMP 0x001bc659
LAB_001bc659:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0x148]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x178]
MOV ESI,dword ptr [RSP + 0x144]
CALL 0x00239670
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001bc68e
LAB_001bc68e:
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,RCX
MOV qword ptr [RSP + 0xf8],RAX
MOV RSI,qword ptr [RSP + 0x188]
LEA RDI,[RSP + 0x70]
LEA RDX,[RSP + 0x120]
CALL 0x001c2210
JMP 0x001bc6bf
LAB_001bc6bf:
MOV RDI,qword ptr [RSP + 0x100]
MOV EAX,dword ptr [RDI]
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,RDI
ADD RAX,0x10
MOV qword ptr [RSP + 0x28],RAX
LAB_001bc6d9:
CALL 0x0021b310
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001bc6e4
LAB_001bc6e4:
MOV R8D,dword ptr [RSP + 0x34]
MOV RCX,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x24]
MOV R9,qword ptr [RSP + 0x180]
MOV RSI,qword ptr [RSP + 0xf8]
MOV RAX,RSP
MOV qword ptr [RAX],RSI
LEA RDI,[RSP + 0x90]
LEA RSI,[RSP + 0x70]
CALL 0x001c35f0
JMP 0x001bc71c
LAB_001bc71c:
LEA RDI,[RSP + 0x70]
CALL 0x0010bf00
MOV RDI,qword ptr [RSP + 0x100]
LAB_001bc72e:
CALL 0x0021ae90
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001bc73a
LAB_001bc73a:
LEA RDI,[RSP + 0x90]
CALL 0x001c36d0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001bc74e
LAB_001bc74e:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
CMP RAX,RCX
JZ 0x001bc82b
MOV RAX,qword ptr [0x002d7f28]
MOV RDI,qword ptr [RAX]
CALL 0x0010b8e0
JMP 0x001bc772
LAB_001bc772:
MOV RAX,qword ptr [0x002d7fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x27fc1a]
LEA RDX,[0x283e63]
LEA R8,[0x283f62]
XOR EAX,EAX
MOV ECX,0x2a8
CALL 0x0010bae0
CALL 0x0021a4f0
JMP 0x001bc7a4
LAB_001bc7a4:
CALL 0x0010b3a0
LAB_001bc82b:
JMP 0x001bc82d
LAB_001bc82d:
JMP 0x001bc82f
LAB_001bc82f:
MOV RDI,qword ptr [RSP + 0x68]
ADD RDI,0x18
LEA RSI,[RSP + 0x90]
CALL 0x001c2f30
LAB_001bc845:
JMP 0x001bc847
LAB_001bc847:
LEA RDI,[RSP + 0x90]
CALL 0x001516b0
LEA RDI,[RSP + 0x120]
CALL 0x0010bf00
MOV EAX,dword ptr [RSP + 0x144]
ADD EAX,0x1
MOV dword ptr [RSP + 0x144],EAX
JMP 0x001bc5c6
LAB_001bc886:
MOV RDI,qword ptr [RSP + 0x178]
CALL 0x00237f60
MOV RDI,qword ptr [RSP + 0x170]
CALL 0x0021bfa0
MOV byte ptr [RSP + 0x1a7],0x1
LAB_001bc8a8:
MOV AL,byte ptr [RSP + 0x1a7]
AND AL,0x1
ADD RSP,0x1a8
RET
|
/* ModelLoader::init_from_gguf_file(std::__cxx11::string const&, std::__cxx11::string const&) */
int1 __thiscall
ModelLoader::init_from_gguf_file(ModelLoader *this,string *param_1,string *param_2)
{
int4 uVar1;
int4 uVar2;
int8 uVar3;
char *pcVar4;
int8 uVar5;
int4 *puVar6;
long lVar7;
long lVar8;
string local_138 [32];
TensorStorage local_118 [104];
long local_b0;
int4 *local_a8;
allocator local_89;
string local_88 [36];
int local_64;
long local_60;
int8 local_58;
int local_4c;
int1 local_48;
int8 *local_40;
int8 local_38;
long local_30;
long local_28;
string *local_20;
string *local_18;
ModelLoader *local_10;
int1 local_1;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
uVar3 = std::__cxx11::string::c_str();
log_printf(0,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
0x28f,"init from \'%s\'",uVar3);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,local_18);
local_28 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this);
local_28 = local_28 + -1;
local_30 = 0;
local_38 = 0;
uVar3 = std::__cxx11::string::c_str();
local_48 = 1;
local_40 = &local_38;
local_30 = gguf_init_from_file(uVar3,1,local_40);
if (local_30 == 0) {
uVar3 = std::__cxx11::string::c_str();
log_printf(3,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
0x297,"failed to open \'%s\'",uVar3);
local_1 = 0;
}
else {
local_4c = gguf_get_n_tensors(local_30);
local_58 = 0;
local_60 = gguf_get_data_offset(local_30);
for (local_64 = 0; local_64 < local_4c; local_64 = local_64 + 1) {
pcVar4 = (char *)gguf_get_tensor_name(local_30,local_64);
std::allocator<char>::allocator();
/* try { // try from 001bc60f to 001bc61b has its CatchHandler @ 001bc7a9 */
std::__cxx11::string::string<std::allocator<char>>(local_88,pcVar4,&local_89);
std::allocator<char>::~allocator((allocator<char> *)&local_89);
uVar3 = local_38;
uVar5 = std::__cxx11::string::c_str();
/* try { // try from 001bc64d to 001bc6bc has its CatchHandler @ 001bc7cf */
local_a8 = (int4 *)ggml_get_tensor(uVar3,uVar5);
lVar7 = local_60;
local_b0 = gguf_get_tensor_offset(local_30,local_64);
local_b0 = lVar7 + local_b0;
std::operator+(local_138,local_20);
uVar1 = *local_a8;
puVar6 = local_a8 + 4;
/* try { // try from 001bc6d9 to 001bc719 has its CatchHandler @ 001bc7e8 */
uVar2 = ggml_n_dims();
TensorStorage::TensorStorage(local_118,local_138,uVar1,puVar6,uVar2,local_28,local_b0);
std::__cxx11::string::~string(local_138);
/* try { // try from 001bc72e to 001bc844 has its CatchHandler @ 001bc808 */
lVar7 = ggml_nbytes(local_a8);
lVar8 = TensorStorage::nbytes(local_118);
if (lVar7 != lVar8) {
fflush(*(FILE **)PTR_stdout_002d7f28);
fprintf(*(FILE **)PTR_stderr_002d7fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
0x2a8,"ggml_nbytes(dummy) == tensor_storage.nbytes()");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
std::vector<TensorStorage,std::allocator<TensorStorage>>::push_back
((vector<TensorStorage,std::allocator<TensorStorage>> *)(this + 0x18),local_118);
TensorStorage::~TensorStorage(local_118);
std::__cxx11::string::~string(local_88);
}
gguf_free(local_30);
ggml_free(local_38);
local_1 = 1;
}
return local_1;
}
|
|
57,399
|
ModelLoader::init_from_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/model.cpp
|
bool ModelLoader::init_from_gguf_file(const std::string& file_path, const std::string& prefix) {
LOG_DEBUG("init from '%s'", file_path.c_str());
file_paths_.push_back(file_path);
size_t file_index = file_paths_.size() - 1;
gguf_context* ctx_gguf_ = NULL;
ggml_context* ctx_meta_ = NULL;
ctx_gguf_ = gguf_init_from_file(file_path.c_str(), {true, &ctx_meta_});
if (!ctx_gguf_) {
LOG_ERROR("failed to open '%s'", file_path.c_str());
return false;
}
int n_tensors = gguf_get_n_tensors(ctx_gguf_);
size_t total_size = 0;
size_t data_offset = gguf_get_data_offset(ctx_gguf_);
for (int i = 0; i < n_tensors; i++) {
std::string name = gguf_get_tensor_name(ctx_gguf_, i);
struct ggml_tensor* dummy = ggml_get_tensor(ctx_meta_, name.c_str());
size_t offset = data_offset + gguf_get_tensor_offset(ctx_gguf_, i);
// LOG_DEBUG("%s", name.c_str());
TensorStorage tensor_storage(prefix + name, dummy->type, dummy->ne, ggml_n_dims(dummy), file_index, offset);
GGML_ASSERT(ggml_nbytes(dummy) == tensor_storage.nbytes());
tensor_storages.push_back(tensor_storage);
}
gguf_free(ctx_gguf_);
ggml_free(ctx_meta_);
return true;
}
|
O1
|
cpp
|
ModelLoader::init_from_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, 0x60(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r8
leaq 0x58e25(%rip), %rsi # 0xc1dd3
leaq 0x58efa(%rip), %rcx # 0xc1eaf
xorl %edi, %edi
movl $0x28f, %edx # imm = 0x28F
xorl %eax, %eax
callq 0x7a4d6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5e2a4
movq 0x8(%r14), %rax
movq %r14, 0x18(%rsp)
subq (%r14), %rax
movq %rax, %r14
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
movq (%rbx), %rdi
movl $0x1, %esi
callq 0x9ce56
movq %rax, %r15
testq %rax, %rax
je 0x691e3
movq %r15, %rdi
callq 0x9de36
movl %eax, %ebx
movq %r15, %rdi
callq 0x9daaf
movq %rax, 0x58(%rsp)
movl %ebx, 0x14(%rsp)
testl %ebx, %ebx
jle 0x691cf
sarq $0x5, %r14
decq %r14
movq %r14, 0x50(%rsp)
addq $0x18, 0x18(%rsp)
xorl %ebx, %ebx
leaq 0x28(%rsp), %r12
leaq 0x70(%rsp), %rbp
movq %r15, 0x48(%rsp)
movq %r15, %rdi
movl %ebx, %esi
callq 0x9de93
movq %r12, %rdi
movq %rax, %rsi
leaq 0x90(%rsp), %rdx
callq 0x2f0ca
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x90b73
movq %rax, %r13
movq %r15, %rdi
movl %ebx, %esi
callq 0x9dea4
movq %rax, %r14
movq %rbp, %rdi
movq 0x60(%rsp), %rsi
movq %r12, %rdx
callq 0x6c98c
movl (%r13), %r12d
movq %r13, %rdi
callq 0x8e2c1
addq 0x58(%rsp), %r14
movq %r13, %rcx
addq $0x10, %rcx
movq %r14, (%rsp)
leaq 0x90(%rsp), %rdi
movq %rbp, %rsi
movl %r12d, %edx
movl %eax, %r8d
movq 0x50(%rsp), %r9
callq 0x6d52a
movq %rbx, 0x68(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x690f2
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq %r13, %rdi
callq 0x8e066
movq %rax, %r13
movq 0xb8(%rsp), %r15
movq 0xc0(%rsp), %rbp
movq 0xc8(%rsp), %r14
movq 0xd0(%rsp), %rbx
movl 0xb0(%rsp), %edi
callq 0x8e159
movq %rax, %r12
movl 0xb0(%rsp), %edi
callq 0x8e147
imulq %r15, %rbp
imulq %rbx, %r14
imulq %rbp, %r14
imulq %r12, %r14
movslq %eax, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
cmpq %rax, %r13
jne 0x6921d
movq 0x18(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6d2b0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x69193
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
movq 0x48(%rsp), %r15
movq 0x68(%rsp), %rbx
leaq 0x28(%rsp), %r12
leaq 0x70(%rsp), %rbp
je 0x691c3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5e0
incl %ebx
cmpl %ebx, 0x14(%rsp)
jne 0x69048
movq %r15, %rdi
callq 0x9d888
movq 0x20(%rsp), %rdi
callq 0x8e752
jmp 0x69205
movq (%rbx), %r8
leaq 0x58be6(%rip), %rsi # 0xc1dd3
leaq 0x58cca(%rip), %rcx # 0xc1ebe
movl $0x3, %edi
movl $0x297, %edx # imm = 0x297
xorl %eax, %eax
callq 0x7a4d6
testq %r15, %r15
setne %al
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8dd34(%rip), %rax # 0xf6f58
movq (%rax), %rdi
callq 0xa6e0
movq 0x8dd85(%rip), %rax # 0xf6fb8
movq (%rax), %rdi
leaq 0x550b1(%rip), %rsi # 0xbe2ee
leaq 0x58b8f(%rip), %rdx # 0xc1dd3
leaq 0x58c87(%rip), %r8 # 0xc1ed2
movl $0x2a8, %ecx # imm = 0x2A8
xorl %eax, %eax
callq 0xa8b0
callq 0x8db48
callq 0xa310
jmp 0x69265
jmp 0x69265
movq %rax, %rbx
jmp 0x692b3
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x692b3
movq 0x80(%rsp), %rsi
jmp 0x692ab
jmp 0x6928b
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x692b3
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x692cf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq %rbx, %rdi
callq 0xaae0
nop
|
_ZN11ModelLoader19init_from_gguf_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov [rsp+128h+var_C8], rdx
mov rbx, rsi
mov r14, rdi
mov r8, [rsi]
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aInitFromS; "init from '%s'"
xor edi, edi
mov edx, 28Fh
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
mov rdi, r14
mov rsi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
mov rax, [r14+8]
mov [rsp+128h+var_110], r14
sub rax, [r14]
mov r14, rax
lea rdx, [rsp+128h+var_108]
mov qword ptr [rdx], 0
mov rdi, [rbx]
mov esi, 1
call gguf_init_from_file
mov r15, rax
test rax, rax
jz loc_691E3
mov rdi, r15
call gguf_get_n_tensors
mov ebx, eax
mov rdi, r15
call gguf_get_data_offset
mov [rsp+128h+var_D0], rax
mov [rsp+128h+var_114], ebx
test ebx, ebx
jle loc_691CF
sar r14, 5
dec r14
mov [rsp+128h+var_D8], r14
add [rsp+128h+var_110], 18h
xor ebx, ebx
lea r12, [rsp+128h+var_100]
lea rbp, [rsp+128h+var_B8]
mov [rsp+128h+var_E0], r15
loc_69048:
mov rdi, r15
mov esi, ebx
call gguf_get_tensor_name
mov rdi, r12
mov rsi, rax
lea rdx, [rsp+128h+var_98]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, [rsp+128h+var_108]
mov rsi, [rsp+128h+var_100]
call ggml_get_tensor
mov r13, rax
mov rdi, r15
mov esi, ebx
call gguf_get_tensor_offset
mov r14, rax
mov rdi, rbp
mov rsi, [rsp+128h+var_C8]
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
mov r12d, [r13+0]
mov rdi, r13
call ggml_n_dims
add r14, [rsp+128h+var_D0]
mov rcx, r13
add rcx, 10h
mov [rsp+128h+var_128], r14
lea rdi, [rsp+128h+var_98]
mov rsi, rbp
mov edx, r12d
mov r8d, eax
mov r9, [rsp+128h+var_D8]
call _ZN13TensorStorageC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE9ggml_typePlimm; TensorStorage::TensorStorage(std::string const&,ggml_type,long *,int,ulong,ulong)
mov [rsp+128h+var_C0], rbx
mov rdi, [rsp+128h+var_B8]; void *
lea rax, [rsp+128h+var_A8]
cmp rdi, rax
jz short loc_690F2
mov rsi, [rsp+128h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_690F2:
mov rdi, r13
call ggml_nbytes
mov r13, rax
mov r15, [rsp+128h+var_70]
mov rbp, [rsp+128h+var_68]
mov r14, [rsp+128h+var_60]
mov rbx, [rsp+128h+var_58]
mov edi, [rsp+128h+var_78]
call ggml_type_size
mov r12, rax
mov edi, [rsp+128h+var_78]
call ggml_blck_size
imul rbp, r15
imul r14, rbx
imul r14, rbp
imul r14, r12
movsxd rcx, eax
mov rax, r14
xor edx, edx
div rcx
cmp r13, rax
jnz loc_6921D
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_98]
call _ZNSt6vectorI13TensorStorageSaIS0_EE9push_backERKS0_; std::vector<TensorStorage>::push_back(TensorStorage const&)
mov rdi, [rsp+128h+var_98]; void *
lea rax, [rsp+128h+var_88]
cmp rdi, rax
jz short loc_69193
mov rsi, [rsp+128h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_69193:
mov rdi, [rsp+128h+var_100]; void *
lea rax, [rsp+128h+var_F0]
cmp rdi, rax
mov r15, [rsp+128h+var_E0]
mov rbx, [rsp+128h+var_C0]
lea r12, [rsp+128h+var_100]
lea rbp, [rsp+128h+var_B8]
jz short loc_691C3
mov rsi, [rsp+128h+var_F0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_691C3:
inc ebx
cmp [rsp+128h+var_114], ebx
jnz loc_69048
loc_691CF:
mov rdi, r15
call gguf_free
mov rdi, [rsp+128h+var_108]
call ggml_free
jmp short loc_69205
loc_691E3:
mov r8, [rbx]
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aFailedToOpenS; "failed to open '%s'"
mov edi, 3
mov edx, 297h
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
loc_69205:
test r15, r15
setnz al
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6921D:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aGgmlNbytesDumm; "ggml_nbytes(dummy) == tensor_storage.nb"...
mov ecx, 2A8h
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
jmp short loc_69265
jmp short $+2
loc_69265:
mov rbx, rax
jmp short loc_692B3
mov rbx, rax
mov rdi, [rsp+128h+var_B8]
lea rax, [rsp+128h+var_A8]
cmp rdi, rax
jz short loc_692B3
mov rsi, [rsp+128h+var_A8]
jmp short loc_692AB
jmp short $+2
loc_6928B:
mov rbx, rax
mov rdi, [rsp+128h+var_98]; void *
lea rax, [rsp+128h+var_88]
cmp rdi, rax
jz short loc_692B3
mov rsi, [rsp+128h+var_88]
loc_692AB:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_692B3:
mov rdi, [rsp+128h+var_100]; void *
lea rax, [rsp+128h+var_F0]
cmp rdi, rax
jz short loc_692CF
mov rsi, [rsp+128h+var_F0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_692CF:
mov rdi, rbx
call __Unwind_Resume
|
bool ModelLoader::init_from_gguf_file(_QWORD *a1, _QWORD *a2, long long a3, long long a4, long long a5, int a6)
{
long long v6; // r14
long long v7; // rax
int v8; // r9d
long long v9; // r15
int n_tensors; // ebx
long long v11; // rbx
long long tensor_name; // rax
int *tensor; // r13
long long tensor_offset; // r14
int v15; // r12d
int v16; // eax
long long v17; // r13
long long v18; // r15
long long v19; // rbp
long long v20; // r14
long long v21; // rbx
long long v22; // r12
int v23; // ebx
long long v25; // rdi
int v26; // [rsp+14h] [rbp-114h]
long long v27; // [rsp+20h] [rbp-108h] BYREF
void *v28[2]; // [rsp+28h] [rbp-100h] BYREF
long long v29; // [rsp+38h] [rbp-F0h] BYREF
long long v30; // [rsp+48h] [rbp-E0h]
long long v31; // [rsp+50h] [rbp-D8h]
long long data_offset; // [rsp+58h] [rbp-D0h]
long long v33; // [rsp+60h] [rbp-C8h]
long long v34; // [rsp+68h] [rbp-C0h]
void *v35[2]; // [rsp+70h] [rbp-B8h] BYREF
long long v36; // [rsp+80h] [rbp-A8h] BYREF
void *v37[2]; // [rsp+90h] [rbp-98h] BYREF
long long v38; // [rsp+A0h] [rbp-88h] BYREF
unsigned int v39; // [rsp+B0h] [rbp-78h]
long long v40; // [rsp+B8h] [rbp-70h]
long long v41; // [rsp+C0h] [rbp-68h]
long long v42; // [rsp+C8h] [rbp-60h]
long long v43; // [rsp+D0h] [rbp-58h]
v33 = a3;
log_printf(
0,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
655,
(unsigned int)"init from '%s'",
*a2,
a6);
std::vector<std::string>::push_back((long long)a1, (long long)a2);
v6 = a1[1] - *a1;
v27 = 0LL;
v7 = gguf_init_from_file(*a2, 1LL, &v27);
v9 = v7;
if ( v7 )
{
n_tensors = gguf_get_n_tensors(v7);
data_offset = gguf_get_data_offset(v9);
v26 = n_tensors;
if ( n_tensors > 0 )
{
v31 = (v6 >> 5) - 1;
v11 = 0LL;
v30 = v9;
do
{
tensor_name = gguf_get_tensor_name(v9, (unsigned int)v11);
std::string::basic_string<std::allocator<char>>(v28, tensor_name);
tensor = (int *)ggml_get_tensor(v27, v28[0]);
tensor_offset = gguf_get_tensor_offset(v9, (unsigned int)v11);
std::operator+<char>(v35, v33, v28);
v15 = *tensor;
v16 = ggml_n_dims(tensor);
TensorStorage::TensorStorage(
(unsigned int)v37,
(unsigned int)v35,
v15,
(_DWORD)tensor + 16,
v16,
v31,
data_offset + tensor_offset);
v34 = v11;
if ( v35[0] != &v36 )
operator delete(v35[0], v36 + 1);
v17 = ggml_nbytes(tensor);
v18 = v40;
v19 = v41;
v20 = v42;
v21 = v43;
v22 = ggml_type_size(v39);
if ( v17 != v22 * v18 * v19 * v21 * v20 / (unsigned long long)(int)ggml_blck_size(v39) )
{
fflush(stdout);
v25 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
680,
"ggml_nbytes(dummy) == tensor_storage.nbytes()");
ggml_print_backtrace(v25);
abort(v25);
}
std::vector<TensorStorage>::push_back(a1 + 3, v37);
if ( v37[0] != &v38 )
operator delete(v37[0], v38 + 1);
v9 = v30;
v23 = v34;
if ( v28[0] != &v29 )
operator delete(v28[0], v29 + 1);
v11 = (unsigned int)(v23 + 1);
}
while ( v26 != (_DWORD)v11 );
}
gguf_free(v9);
ggml_free(v27);
}
else
{
log_printf(
3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/model.cpp",
663,
(unsigned int)"failed to open '%s'",
*a2,
v8);
}
return v9 != 0;
}
|
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.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.