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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
18,600
|
minja::Parser::parseExpansion()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseExpansion() {
static std::regex expansion_tok(R"(\*\*?)");
auto op_str = consumeToken(expansion_tok);
auto expr = parseValueExpression();
if (op_str.empty()) return expr;
if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression");
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict);
}
|
O2
|
cpp
|
minja::Parser::parseExpansion():
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x9abe0(%rip), %rax # 0x1022e0
movb (%rax), %al
testb %al, %al
je 0x677dc
leaq 0x9abaf(%rip), %rdx # 0x1022c0
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x63232
movq %rsp, %rdi
movq %r14, %rsi
callq 0x678d8
cmpq $0x0, 0x38(%rsp)
movq (%rsp), %rax
je 0x677a6
testq %rax, %rax
je 0x67831
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x62e0e
leaq 0x55277(%rip), %rsi # 0xbc9cc
leaq 0x30(%rsp), %rdi
callq 0x29612
movzbl %al, %eax
pushq $0x4
popq %rdx
subl %eax, %edx
leaq 0x14(%rsp), %rcx
movl %edx, (%rcx)
leaq 0x50(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
callq 0x680c4
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x5224c
leaq 0x20(%rsp), %rdi
callq 0x5224c
jmp 0x677bd
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x5224c
leaq 0x30(%rsp), %rdi
callq 0x25478
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
leaq 0x9aafd(%rip), %rdi # 0x1022e0
callq 0x25270
testl %eax, %eax
je 0x6770a
leaq 0x9aac9(%rip), %rdi # 0x1022c0
leaq 0x4e9e6(%rip), %rsi # 0xb61e4
pushq $0x10
popq %rdx
callq 0x48d9e
leaq -0x1e849(%rip), %rdi # 0x48fc4
leaq 0x9aaac(%rip), %rsi # 0x1022c0
leaq 0x9a22d(%rip), %rdx # 0x101a48
callq 0x248e0
leaq 0x9aab9(%rip), %rdi # 0x1022e0
callq 0x24700
jmp 0x6770a
pushq $0x10
popq %rdi
callq 0x24520
movq %rax, %r14
leaq 0x4e9a7(%rip), %rsi # 0xb61ea
movq %rax, %rdi
callq 0x24390
movq 0x9979e(%rip), %rsi # 0x100ff0
movq 0x996ff(%rip), %rdx # 0x100f58
movq %r14, %rdi
callq 0x25150
movq %rax, %rbx
leaq 0x9aa75(%rip), %rdi # 0x1022e0
callq 0x246f0
jmp 0x678ac
jmp 0x67890
movq %rax, %rbx
movq %r14, %rdi
callq 0x247a0
jmp 0x67893
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5224c
jmp 0x67893
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5224c
jmp 0x678a2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x25478
movq %rbx, %rdi
callq 0x251e0
|
_ZN5minja6Parser14parseExpansionEv:
push r14
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok
mov al, [rax]
test al, al
jz loc_677DC
loc_6770A:
lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rdi, [rsp+78h+var_48]
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)
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void)
cmp [rsp+78h+var_40], 0
mov rax, [rsp+78h+var_78]
jz short loc_677A6
test rax, rax
jz loc_67831
lea rdi, [rsp+78h+var_60]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rsi, asc_BC9CB+1; "*"
lea rdi, [rsp+78h+var_48]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
movzx eax, al
push 4
pop rdx
sub edx, eax
lea rcx, [rsp+78h+var_64]
mov [rcx], edx
lea rdi, [rsp+78h+var_28]
lea rsi, [rsp+78h+var_60]
mov rdx, rsp
call _ZSt11make_sharedIN5minja11UnaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEENS1_2OpEEES3_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+78h+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+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_677BD
loc_677A6:
mov [rbx], rax
mov rax, [rsp+78h+var_70]
and [rsp+78h+var_70], 0
mov [rbx+8], rax
and [rsp+78h+var_78], 0
loc_677BD:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
retn
loc_677DC:
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_6770A
lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rsi, asc_B61E4; "\\*\\*?"
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, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_6770A
loc_67831:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' expression"
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, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_678AC
jmp short loc_67890
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_67893
mov rbx, rax
lea rdi, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_67893
loc_67890:
mov rbx, rax
loc_67893:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_678A2
mov rbx, rax
loc_678A2:
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_678AC:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, _QWORD *a2)
{
__int128 v2; // xmm0
long long v3; // rax
std::runtime_error *exception; // r14
long long v6; // [rsp+0h] [rbp-78h] BYREF
long long v7; // [rsp+8h] [rbp-70h] BYREF
int v8; // [rsp+14h] [rbp-64h]
_BYTE v9[8]; // [rsp+18h] [rbp-60h] BYREF
long long v10; // [rsp+20h] [rbp-58h] BYREF
_QWORD v11[4]; // [rsp+30h] [rbp-48h] BYREF
_OWORD v12[2]; // [rsp+50h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
(long long)"\\*\\*?",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v11,
(long long)a2,
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
1u);
minja::Parser::parseValueExpression((minja::Parser *)&v6);
if ( v11[1] )
{
if ( !v6 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)v9, a2);
v8 = 4 - std::operator==<char>((long long)v11);
std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
v12,
v9,
&v6);
v2 = v12[0];
*((_QWORD *)&v12[0] + 1) = 0LL;
*(_OWORD *)this = v2;
*(_QWORD *)&v12[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v12 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
}
else
{
*(_QWORD *)this = v6;
v3 = v7;
v7 = 0LL;
*((_QWORD *)this + 1) = v3;
v6 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7);
std::string::~string(v11);
return this;
}
|
parseExpansion:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x2022e0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001677dc
LAB_0016770a:
LEA RDX,[0x2022c0]
LEA RDI,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x00163232
LAB_00167721:
MOV RDI,RSP
MOV RSI,R14
CALL 0x001678d8
CMP qword ptr [RSP + 0x38],0x0
MOV RAX,qword ptr [RSP]
JZ 0x001677a6
TEST RAX,RAX
JZ 0x00167831
LAB_00167741:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x00162e0e
LEA RSI,[0x1bc9cc]
LEA RDI,[RSP + 0x30]
CALL 0x00129612
MOVZX EAX,AL
PUSH 0x4
POP RDX
SUB EDX,EAX
LEA RCX,[RSP + 0x14]
MOV dword ptr [RCX],EDX
LAB_0016776e:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x18]
MOV RDX,RSP
CALL 0x001680c4
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0015224c
LEA RDI,[RSP + 0x20]
CALL 0x0015224c
JMP 0x001677bd
LAB_001677a6:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
AND qword ptr [RSP + 0x8],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP],0x0
LAB_001677bd:
LEA RDI,[RSP + 0x8]
CALL 0x0015224c
LEA RDI,[RSP + 0x30]
CALL 0x00125478
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
RET
LAB_001677dc:
LEA RDI,[0x2022e0]
CALL 0x00125270
TEST EAX,EAX
JZ 0x0016770a
LAB_001677f0:
LEA RDI,[0x2022c0]
LEA RSI,[0x1b61e4]
PUSH 0x10
POP RDX
CALL 0x00148d9e
LAB_00167806:
LEA RDI,[0x148fc4]
LEA RSI,[0x2022c0]
LEA RDX,[0x201a48]
CALL 0x001248e0
LEA RDI,[0x2022e0]
CALL 0x00124700
JMP 0x0016770a
LAB_00167831:
PUSH 0x10
POP RDI
CALL 0x00124520
MOV R14,RAX
LAB_0016783c:
LEA RSI,[0x1b61ea]
MOV RDI,RAX
CALL 0x00124390
LAB_0016784b:
MOV RSI,qword ptr [0x00200ff0]
MOV RDX,qword ptr [0x00200f58]
MOV RDI,R14
CALL 0x00125150
|
/* minja::Parser::parseExpansion() */
void minja::Parser::parseExpansion(void)
{
long lVar1;
bool bVar2;
int iVar3;
runtime_error *this;
long *in_RDI;
long local_78;
long local_70;
int local_64;
shared_ptr local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
string local_48 [8];
long local_40;
long local_28;
long alStack_20 [2];
if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 001677f0 to 00167805 has its CatchHandler @ 00167861 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_);
}
}
consumeToken(local_48);
/* try { // try from 00167721 to 0016772b has its CatchHandler @ 0016789f */
parseValueExpression();
lVar1 = local_70;
if (local_40 == 0) {
*in_RDI = local_78;
local_70 = 0;
in_RDI[1] = lVar1;
local_78 = 0;
}
else {
if (local_78 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016783c to 0016784a has its CatchHandler @ 00167874 */
std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression");
/* try { // try from 0016784b to 00167860 has its CatchHandler @ 00167872 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f58);
}
/* try { // try from 00167741 to 0016774d has its CatchHandler @ 00167890 */
get_location();
bVar2 = std::operator==(local_48,"*");
local_64 = 4 - (uint)bVar2;
/* try { // try from 0016776e to 0016777f has its CatchHandler @ 00167881 */
std::
make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((Location *)&local_28,local_60,(Op *)&local_78);
lVar1 = alStack_20[0];
alStack_20[0] = 0;
*in_RDI = local_28;
in_RDI[1] = lVar1;
local_28 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70);
std::__cxx11::string::~string(local_48);
return;
}
|
|
18,601
|
google::protobuf::Reflection::UnsafeArenaReleaseLast(google::protobuf::Message*, google::protobuf::FieldDescriptor const*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc
|
Message* Reflection::UnsafeArenaReleaseLast(
Message* message, const FieldDescriptor* field) const {
USAGE_CHECK_ALL(UnsafeArenaReleaseLast, REPEATED, MESSAGE);
CheckInvalidAccess(schema_, field);
if (field->is_extension()) {
return static_cast<Message*>(
MutableExtensionSet(message)->UnsafeArenaReleaseLast(field->number()));
} else {
if (IsMapFieldInApi(field)) {
return MutableRaw<MapFieldBase>(message, field)
->MutableRepeatedField()
->UnsafeArenaReleaseLast<GenericTypeHandler<Message>>();
} else {
return MutableRaw<RepeatedPtrFieldBase>(message, field)
->UnsafeArenaReleaseLast<GenericTypeHandler<Message>>();
}
}
}
|
O3
|
cpp
|
google::protobuf::Reflection::UnsafeArenaReleaseLast(google::protobuf::Message*, google::protobuf::FieldDescriptor const*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rdi
cmpq %rdi, 0x20(%rdx)
je 0x8f514
leaq 0xd91b6(%rip), %rdx # 0x1686bb
leaq 0xd908d(%rip), %rcx # 0x168599
movq %r14, %rsi
callq 0x8ee9e
movb 0x1(%r14), %al
notb %al
testb $0x60, %al
je 0x8f537
movq (%r15), %rdi
leaq 0xd9193(%rip), %rdx # 0x1686bb
leaq 0xd912d(%rip), %rcx # 0x16865c
movq %r14, %rsi
callq 0x8ee9e
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x8f55c
leaq 0x4dc0d(%rip), %rax # 0xdd154
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdx
movq %r14, (%rdx)
callq 0x97dfb
movzbl 0x2(%r14), %eax
leaq 0xdc798(%rip), %rcx # 0x16bd00
cmpl $0xa, (%rcx,%rax,4)
je 0x8f585
movq (%r15), %rdi
leaq 0xd9143(%rip), %rdx # 0x1686bb
movq %r14, %rsi
movl $0xa, %ecx
callq 0x8f3a5
testb $0x8, 0x1(%r14)
jne 0x8f5c8
movq %r14, %rdi
callq 0x8d966
movl %eax, %ebp
addq $0x8, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x97f78
movl %eax, %eax
addq %rax, %rbx
testb %bpl, %bpl
je 0x8f5dd
movq %rbx, %rdi
callq 0x99cba
movq 0x10(%rax), %rcx
movslq 0x8(%rax), %rdx
leaq -0x1(%rdx), %rsi
movl %esi, 0x8(%rax)
jmp 0x8f5ec
movl 0x28(%r15), %eax
addq %rax, %rbx
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0xb5acc
jmp 0x8f604
movq 0x10(%rbx), %rcx
movslq 0x8(%rbx), %rdx
leaq -0x1(%rdx), %rax
movl %eax, 0x8(%rbx)
movq (%rcx,%rdx,8), %rax
movslq (%rcx), %rsi
leal -0x1(%rsi), %edi
movl %edi, (%rcx)
cmpl %esi, %edx
jge 0x8f604
movq (%rcx,%rsi,8), %rsi
movq %rsi, (%rcx,%rdx,8)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZNK6google8protobuf10Reflection22UnsafeArenaReleaseLastEPNS0_7MessageEPKNS0_15FieldDescriptorE:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rdi, [rdi]; this
cmp [rdx+20h], rdi
jz short loc_8F514
lea rdx, aUnsafearenarel; "UnsafeArenaReleaseLast"
lea rcx, aFieldDoesNotMa; "Field does not match message type."
mov rsi, r14; google::protobuf::Descriptor *
call _ZN6google8protobuf12_GLOBAL__N_126ReportReflectionUsageErrorEPKNS0_10DescriptorEPKNS0_15FieldDescriptorEPKcS9_; google::protobuf::`anonymous namespace'::ReportReflectionUsageError(google::protobuf::Descriptor const*,google::protobuf::FieldDescriptor const*,char const*,char const*)
loc_8F514:
mov al, [r14+1]
not al
test al, 60h
jz short loc_8F537
mov rdi, [r15]; this
lea rdx, aUnsafearenarel; "UnsafeArenaReleaseLast"
lea rcx, aFieldIsSingula; "Field is singular; the method requires "...
mov rsi, r14; google::protobuf::Descriptor *
call _ZN6google8protobuf12_GLOBAL__N_126ReportReflectionUsageErrorEPKNS0_10DescriptorEPKNS0_15FieldDescriptorEPKcS9_; google::protobuf::`anonymous namespace'::ReportReflectionUsageError(google::protobuf::Descriptor const*,google::protobuf::FieldDescriptor const*,char const*,char const*)
loc_8F537:
mov rdi, [r14+18h]
test rdi, rdi
jz short loc_8F55C
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+38h+var_28]
mov [rsi], rax
lea rdx, [rsp+38h+var_30]
mov [rdx], r14
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_8F55C:
movzx eax, byte ptr [r14+2]
lea rcx, _ZN6google8protobuf15FieldDescriptor17kTypeToCppTypeMapE; google::protobuf::FieldDescriptor::kTypeToCppTypeMap
cmp dword ptr [rcx+rax*4], 0Ah
jz short loc_8F585
mov rdi, [r15]
lea rdx, aUnsafearenarel; "UnsafeArenaReleaseLast"
mov rsi, r14; google::protobuf::FieldDescriptor *
mov ecx, 0Ah
call _ZN6google8protobuf12_GLOBAL__N_130ReportReflectionUsageTypeErrorEPKNS0_10DescriptorEPKNS0_15FieldDescriptorEPKcNS5_7CppTypeE; google::protobuf::`anonymous namespace'::ReportReflectionUsageTypeError(google::protobuf::Descriptor const*,google::protobuf::FieldDescriptor const*,char const*,google::protobuf::FieldDescriptor::CppType)
loc_8F585:
test byte ptr [r14+1], 8
jnz short loc_8F5C8
mov rdi, r14; this
call _ZN6google8protobuf12_GLOBAL__N_115IsMapFieldInApiEPKNS0_15FieldDescriptorE; google::protobuf::`anonymous namespace'::IsMapFieldInApi(google::protobuf::FieldDescriptor const*)
mov ebp, eax
add r15, 8
mov rdi, r15; this
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema14GetFieldOffsetEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::GetFieldOffset(google::protobuf::FieldDescriptor const*)
mov eax, eax
add rbx, rax
test bpl, bpl
jz short loc_8F5DD
mov rdi, rbx; this
call _ZN6google8protobuf8internal12MapFieldBase20MutableRepeatedFieldEv; google::protobuf::internal::MapFieldBase::MutableRepeatedField(void)
mov rcx, [rax+10h]
movsxd rdx, dword ptr [rax+8]
lea rsi, [rdx-1]
mov [rax+8], esi
jmp short loc_8F5EC
loc_8F5C8:
mov eax, [r15+28h]
add rbx, rax
mov esi, [r14+4]; int
mov rdi, rbx; this
call _ZN6google8protobuf8internal12ExtensionSet22UnsafeArenaReleaseLastEi; google::protobuf::internal::ExtensionSet::UnsafeArenaReleaseLast(int)
jmp short loc_8F604
loc_8F5DD:
mov rcx, [rbx+10h]
movsxd rdx, dword ptr [rbx+8]
lea rax, [rdx-1]
mov [rbx+8], eax
loc_8F5EC:
mov rax, [rcx+rdx*8]
movsxd rsi, dword ptr [rcx]
lea edi, [rsi-1]
mov [rcx], edi
cmp edx, esi
jge short loc_8F604
mov rsi, [rcx+rsi*8]
mov [rcx+rdx*8], rsi
loc_8F604:
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long google::protobuf::Reflection::UnsafeArenaReleaseLast(
google::protobuf::_anonymous_namespace_ **this,
google::protobuf::Message *a2,
const google::protobuf::FieldDescriptor *a3,
long long a4,
const char *a5)
{
google::protobuf::Message *v6; // rbx
google::protobuf::_anonymous_namespace_ *v8; // rdi
long long v9; // rdi
char IsMapFieldInApi; // bp
google::protobuf::internal::MapFieldBase *v11; // rbx
long long v12; // rax
int *v13; // rcx
long long v14; // rdx
long long result; // rax
long long v16; // rsi
_QWORD v17[5]; // [rsp+10h] [rbp-28h] BYREF
v6 = a2;
v8 = *this;
if ( *((google::protobuf::_anonymous_namespace_ **)a3 + 4) != v8 )
{
a2 = a3;
google::protobuf::`anonymous namespace'::ReportReflectionUsageError(
v8,
a3,
(const google::protobuf::FieldDescriptor *)"UnsafeArenaReleaseLast",
"Field does not match message type.",
a5);
}
if ( (~*((_BYTE *)a3 + 1) & 0x60) != 0 )
{
a2 = a3;
google::protobuf::`anonymous namespace'::ReportReflectionUsageError(
*this,
a3,
(const google::protobuf::FieldDescriptor *)"UnsafeArenaReleaseLast",
"Field is singular; the method requires a repeated field.",
a5);
}
v9 = *((_QWORD *)a3 + 3);
if ( v9 )
{
a2 = (google::protobuf::Message *)v17;
v17[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(v9, v17);
}
if ( google::protobuf::FieldDescriptor::kTypeToCppTypeMap[*((unsigned __int8 *)a3 + 2)] != 10 )
{
a2 = a3;
google::protobuf::`anonymous namespace'::ReportReflectionUsageTypeError(
(long long)*this,
(long long)a3,
(long long)"UnsafeArenaReleaseLast",
10);
}
if ( (*((_BYTE *)a3 + 1) & 8) != 0 )
return google::protobuf::internal::ExtensionSet::UnsafeArenaReleaseLast(
(google::protobuf::Message *)((char *)v6 + *((unsigned int *)this + 10)),
*((_DWORD *)a3 + 1));
IsMapFieldInApi = google::protobuf::`anonymous namespace'::IsMapFieldInApi(a3, a2);
v11 = (google::protobuf::Message *)((char *)v6
+ (unsigned int)google::protobuf::internal::ReflectionSchema::GetFieldOffset(
(google::protobuf::internal::ReflectionSchema *)(this + 1),
a3));
if ( IsMapFieldInApi )
{
v12 = google::protobuf::internal::MapFieldBase::MutableRepeatedField(v11);
v13 = *(int **)(v12 + 16);
v14 = *(int *)(v12 + 8);
*(_DWORD *)(v12 + 8) = v14 - 1;
}
else
{
v13 = (int *)*((_QWORD *)v11 + 2);
v14 = *((int *)v11 + 2);
*((_DWORD *)v11 + 2) = v14 - 1;
}
result = *(_QWORD *)&v13[2 * v14];
v16 = *v13;
*v13 = v16 - 1;
if ( (int)v14 < (int)v16 )
*(_QWORD *)&v13[2 * v14] = *(_QWORD *)&v13[2 * v16];
return result;
}
|
UnsafeArenaReleaseLast:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RDI,qword ptr [RDI]
CMP qword ptr [RDX + 0x20],RDI
JZ 0x0018f514
LEA RDX,[0x2686bb]
LEA RCX,[0x268599]
MOV RSI,R14
CALL 0x0018ee9e
LAB_0018f514:
MOV AL,byte ptr [R14 + 0x1]
NOT AL
TEST AL,0x60
JZ 0x0018f537
MOV RDI,qword ptr [R15]
LEA RDX,[0x2686bb]
LEA RCX,[0x26865c]
MOV RSI,R14
CALL 0x0018ee9e
LAB_0018f537:
MOV RDI,qword ptr [R14 + 0x18]
TEST RDI,RDI
JZ 0x0018f55c
LEA RAX,[0x1dd154]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],R14
CALL 0x00197dfb
LAB_0018f55c:
MOVZX EAX,byte ptr [R14 + 0x2]
LEA RCX,[0x26bd00]
CMP dword ptr [RCX + RAX*0x4],0xa
JZ 0x0018f585
MOV RDI,qword ptr [R15]
LEA RDX,[0x2686bb]
MOV RSI,R14
MOV ECX,0xa
CALL 0x0018f3a5
LAB_0018f585:
TEST byte ptr [R14 + 0x1],0x8
JNZ 0x0018f5c8
MOV RDI,R14
CALL 0x0018d966
MOV EBP,EAX
ADD R15,0x8
MOV RDI,R15
MOV RSI,R14
CALL 0x00197f78
MOV EAX,EAX
ADD RBX,RAX
TEST BPL,BPL
JZ 0x0018f5dd
MOV RDI,RBX
CALL 0x00199cba
MOV RCX,qword ptr [RAX + 0x10]
MOVSXD RDX,dword ptr [RAX + 0x8]
LEA RSI,[RDX + -0x1]
MOV dword ptr [RAX + 0x8],ESI
JMP 0x0018f5ec
LAB_0018f5c8:
MOV EAX,dword ptr [R15 + 0x28]
ADD RBX,RAX
MOV ESI,dword ptr [R14 + 0x4]
MOV RDI,RBX
CALL 0x001b5acc
JMP 0x0018f604
LAB_0018f5dd:
MOV RCX,qword ptr [RBX + 0x10]
MOVSXD RDX,dword ptr [RBX + 0x8]
LEA RAX,[RDX + -0x1]
MOV dword ptr [RBX + 0x8],EAX
LAB_0018f5ec:
MOV RAX,qword ptr [RCX + RDX*0x8]
MOVSXD RSI,dword ptr [RCX]
LEA EDI,[RSI + -0x1]
MOV dword ptr [RCX],EDI
CMP EDX,ESI
JGE 0x0018f604
MOV RSI,qword ptr [RCX + RSI*0x8]
MOV qword ptr [RCX + RDX*0x8],RSI
LAB_0018f604:
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::Reflection::UnsafeArenaReleaseLast(google::protobuf::Message*,
google::protobuf::FieldDescriptor const*) const */
int8 __thiscall
google::protobuf::Reflection::UnsafeArenaReleaseLast
(Reflection *this,Message *param_1,FieldDescriptor *param_2)
{
int iVar1;
int iVar2;
char cVar3;
uint uVar4;
long lVar5;
int8 uVar6;
int *piVar7;
MapFieldBase *this_00;
FieldDescriptor *local_30;
code *local_28;
if (*(Descriptor **)(param_2 + 0x20) != *(Descriptor **)this) {
(anonymous_namespace)::ReportReflectionUsageError
(*(Descriptor **)this,param_2,"UnsafeArenaReleaseLast",
"Field does not match message type.");
}
if ((~(byte)param_2[1] & 0x60) != 0) {
(anonymous_namespace)::ReportReflectionUsageError
(*(Descriptor **)this,param_2,"UnsafeArenaReleaseLast",
"Field is singular; the method requires a repeated field.");
}
if (*(once_flag **)(param_2 + 0x18) != (once_flag *)0x0) {
local_28 = FieldDescriptor::TypeOnceInit;
local_30 = param_2;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_2 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_28,&local_30
);
}
if (*(int *)(FieldDescriptor::kTypeToCppTypeMap + (ulong)(byte)param_2[2] * 4) != 10) {
(anonymous_namespace)::ReportReflectionUsageTypeError
(*(int8 *)this,param_2,"UnsafeArenaReleaseLast",10);
}
if (((byte)param_2[1] & 8) == 0) {
cVar3 = (anonymous_namespace)::IsMapFieldInApi(param_2);
uVar4 = internal::ReflectionSchema::GetFieldOffset((ReflectionSchema *)(this + 8),param_2);
this_00 = (MapFieldBase *)(param_1 + uVar4);
if (cVar3 == '\0') {
piVar7 = *(int **)(this_00 + 0x10);
iVar1 = *(int *)(this_00 + 8);
*(int *)(this_00 + 8) = iVar1 + -1;
}
else {
lVar5 = internal::MapFieldBase::MutableRepeatedField(this_00);
piVar7 = *(int **)(lVar5 + 0x10);
iVar1 = *(int *)(lVar5 + 8);
*(int *)(lVar5 + 8) = iVar1 + -1;
}
uVar6 = *(int8 *)(piVar7 + (long)iVar1 * 2);
iVar2 = *piVar7;
*piVar7 = iVar2 + -1;
if (iVar1 < iVar2) {
*(int8 *)(piVar7 + (long)iVar1 * 2) = *(int8 *)(piVar7 + (long)iVar2 * 2);
}
}
else {
uVar6 = internal::ExtensionSet::UnsafeArenaReleaseLast
((ExtensionSet *)(param_1 + *(uint *)(this + 0x28)),*(int *)(param_2 + 4));
}
return uVar6;
}
|
|
18,602
|
serial_cpp::Serial::SerialImpl::setDTR(bool)
|
ami-iit[P]serial_cpp/src/impl/unix.cc
|
void
Serial::SerialImpl::setDTR (bool level)
{
if (is_open_ == false) {
throw PortNotOpenedException ("Serial::setDTR");
}
int command = TIOCM_DTR;
if (level) {
if (-1 == ioctl (fd_, TIOCMBIS, &command))
{
stringstream ss;
ss << "setDTR failed on a call to ioctl(TIOCMBIS): " << errno << " " << strerror(errno);
throw(SerialException(ss.str().c_str()));
}
} else {
if (-1 == ioctl (fd_, TIOCMBIC, &command))
{
stringstream ss;
ss << "setDTR failed on a call to ioctl(TIOCMBIC): " << errno << " " << strerror(errno);
throw(SerialException(ss.str().c_str()));
}
}
}
|
O2
|
cpp
|
serial_cpp::Serial::SerialImpl::setDTR(bool):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
cmpb $0x0, 0x2c(%rdi)
je 0x67f1
movl $0x2, 0x4(%rsp)
movl 0x28(%rdi), %edi
leaq 0x4(%rsp), %rdx
testb %sil, %sil
je 0x67d4
movl $0x5416, %esi # imm = 0x5416
xorl %eax, %eax
callq 0x33c0
cmpl $-0x1, %eax
jne 0x67e5
leaq 0x28(%rsp), %rdi
callq 0x31d0
leaq 0x38(%rsp), %rdi
leaq 0x302f(%rip), %rsi # 0x977e
callq 0x32b0
movq %rax, %r14
callq 0x3040
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x34b0
leaq 0x3066(%rip), %rsi # 0x97d6
movq %rax, %rdi
callq 0x32b0
movq %rax, %r14
movl (%rbx), %edi
callq 0x30d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x32b0
pushq $0x28
popq %rdi
callq 0x3170
movq %rax, %r14
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3440
movb $0x1, %bpl
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x71a0
xorl %ebp, %ebp
leaq 0x7520(%rip), %rsi # 0xdce0
leaq 0xaa9(%rip), %rdx # 0x7270
movq %r14, %rdi
callq 0x34a0
jmp 0x68b7
movl $0x5417, %esi # imm = 0x5417
xorl %eax, %eax
callq 0x33c0
cmpl $-0x1, %eax
je 0x6821
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x3170
movq %rax, %r14
leaq 0x2f6c(%rip), %rsi # 0x976f
movq %rax, %rdi
callq 0x753e
leaq 0x74fe(%rip), %rsi # 0xdd10
leaq 0xdf5(%rip), %rdx # 0x760e
movq %r14, %rdi
callq 0x34a0
leaq 0x28(%rsp), %rdi
callq 0x31d0
leaq 0x38(%rsp), %rdi
leaq 0x2f74(%rip), %rsi # 0x97ab
callq 0x32b0
movq %rax, %r14
callq 0x3040
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x34b0
leaq 0x2f7e(%rip), %rsi # 0x97d6
movq %rax, %rdi
callq 0x32b0
movq %rax, %r14
movl (%rbx), %edi
callq 0x30d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x32b0
pushq $0x28
popq %rdi
callq 0x3170
movq %rax, %r14
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3440
movb $0x1, %bpl
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x71a0
xorl %ebp, %ebp
leaq 0x7438(%rip), %rsi # 0xdce0
leaq 0x9c1(%rip), %rdx # 0x7270
movq %r14, %rdi
callq 0x34a0
jmp 0x68b9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3140
testb %bpl, %bpl
jne 0x68d2
jmp 0x68e1
jmp 0x68cf
movq %rax, %rbx
movq %r14, %rdi
callq 0x31f0
jmp 0x68e1
jmp 0x68de
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3210
jmp 0x68f8
movq %rax, %rbx
movq %r14, %rdi
callq 0x31f0
movq %rbx, %rdi
callq 0x34d0
|
_ZN10serial_cpp6Serial10SerialImpl6setDTREb:
push rbp
push r14
push rbx
sub rsp, 1B0h
cmp byte ptr [rdi+2Ch], 0
jz loc_67F1
mov [rsp+1C8h+var_1C4], 2
mov edi, [rdi+28h]
lea rdx, [rsp+1C8h+var_1C4]
test sil, sil
jz loc_67D4
mov esi, 5416h
xor eax, eax
call _ioctl
cmp eax, 0FFFFFFFFh
jnz loc_67E5
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+1C8h+var_190]
lea rsi, aSetdtrFailedOn; "setDTR failed on a call to ioctl(TIOCMB"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r14, rax
call ___errno_location
mov rbx, rax
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aSetdtrFailedOn_0+2Bh; " "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r14, rax
mov edi, [rbx]
call _strerror
mov rdi, r14
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
push 28h ; '('
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+1C8h+var_188]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
mov rsi, [rsp+1C8h+var_1C0]; char *
mov rdi, r14; this
call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*)
xor ebp, ebp
lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo
lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_68B7
loc_67D4:
mov esi, 5417h
xor eax, eax
call _ioctl
cmp eax, 0FFFFFFFFh
jz short loc_6821
loc_67E5:
add rsp, 1B0h
pop rbx
pop r14
pop rbp
retn
loc_67F1:
push 28h ; '('
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aSerialSetdtr; "Serial::setDTR"
mov rdi, rax; this
call _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc; serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*)
lea rsi, _ZTIN10serial_cpp22PortNotOpenedExceptionE; lptinfo
lea rdx, _ZN10serial_cpp22PortNotOpenedExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6821:
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+1C8h+var_190]
lea rsi, aSetdtrFailedOn_0; "setDTR failed on a call to ioctl(TIOCMB"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r14, rax
call ___errno_location
mov rbx, rax
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aSetdtrFailedOn_0+2Bh; " "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r14, rax
mov edi, [rbx]
call _strerror
mov rdi, r14
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
push 28h ; '('
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+1C8h+var_188]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
mov rsi, [rsp+1C8h+var_1C0]; char *
mov rdi, r14; this
call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*)
xor ebp, ebp
lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo
lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_68B7:
jmp short $+2
loc_68B9:
mov rbx, rax
lea rdi, [rsp+1C8h+var_1C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_68D2
jmp short loc_68E1
jmp short $+2
loc_68CF:
mov rbx, rax
loc_68D2:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_68E1
jmp short $+2
loc_68DE:
mov rbx, rax
loc_68E1:
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
jmp short loc_68F8
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
loc_68F8:
mov rdi, rbx
call __Unwind_Resume
|
long long serial_cpp::Serial::SerialImpl::setDTR(serial_cpp::Serial::SerialImpl *this, char a2)
{
long long v2; // rdi
long long result; // rax
long long v4; // r14
unsigned int *v5; // rbx
long long v6; // rax
long long v7; // r14
long long v8; // rax
serial_cpp::SerialException *v9; // r14
serial_cpp::PortNotOpenedException *exception; // r14
long long v11; // r14
unsigned int *v12; // rbx
long long v13; // rax
long long v14; // r14
long long v15; // rax
serial_cpp::SerialException *v16; // r14
int v17; // [rsp+4h] [rbp-1C4h] BYREF
char *v18[4]; // [rsp+8h] [rbp-1C0h] BYREF
_BYTE v19[16]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v20[8]; // [rsp+38h] [rbp-190h] BYREF
_BYTE v21[392]; // [rsp+40h] [rbp-188h] BYREF
if ( !*((_BYTE *)this + 44) )
{
exception = (serial_cpp::PortNotOpenedException *)__cxa_allocate_exception(0x28uLL);
serial_cpp::PortNotOpenedException::PortNotOpenedException(exception, "Serial::setDTR");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'serial_cpp::PortNotOpenedException,
serial_cpp::PortNotOpenedException::~PortNotOpenedException);
}
v17 = 2;
v2 = *((unsigned int *)this + 10);
if ( a2 )
{
result = ioctl(v2, 21526LL, &v17);
if ( (_DWORD)result == -1 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v19);
v4 = std::operator<<<std::char_traits<char>>(v20, "setDTR failed on a call to ioctl(TIOCMBIS): ");
v5 = (unsigned int *)__errno_location();
v6 = std::ostream::operator<<(v4, *v5);
v7 = std::operator<<<std::char_traits<char>>(v6, " ");
v8 = strerror(*v5);
std::operator<<<std::char_traits<char>>(v7, v8);
v9 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL);
std::stringbuf::str(v18, v21);
serial_cpp::SerialException::SerialException(v9, v18[0]);
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'serial_cpp::SerialException,
serial_cpp::SerialException::~SerialException);
}
}
else
{
result = ioctl(v2, 21527LL, &v17);
if ( (_DWORD)result == -1 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v19);
v11 = std::operator<<<std::char_traits<char>>(v20, "setDTR failed on a call to ioctl(TIOCMBIC): ");
v12 = (unsigned int *)__errno_location();
v13 = std::ostream::operator<<(v11, *v12);
v14 = std::operator<<<std::char_traits<char>>(v13, " ");
v15 = strerror(*v12);
std::operator<<<std::char_traits<char>>(v14, v15);
v16 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL);
std::stringbuf::str(v18, v21);
serial_cpp::SerialException::SerialException(v16, v18[0]);
__cxa_throw(
v16,
(struct type_info *)&`typeinfo for'serial_cpp::SerialException,
serial_cpp::SerialException::~SerialException);
}
}
return result;
}
|
setDTR:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1b0
CMP byte ptr [RDI + 0x2c],0x0
JZ 0x001067f1
MOV dword ptr [RSP + 0x4],0x2
MOV EDI,dword ptr [RDI + 0x28]
LEA RDX,[RSP + 0x4]
TEST SIL,SIL
JZ 0x001067d4
MOV ESI,0x5416
XOR EAX,EAX
CALL 0x001033c0
CMP EAX,-0x1
JNZ 0x001067e5
LEA RDI,[RSP + 0x28]
CALL 0x001031d0
LEA RDI,[RSP + 0x38]
LAB_00106748:
LEA RSI,[0x10977e]
CALL 0x001032b0
MOV R14,RAX
CALL 0x00103040
MOV RBX,RAX
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x001034b0
LEA RSI,[0x1097d6]
MOV RDI,RAX
CALL 0x001032b0
MOV R14,RAX
MOV EDI,dword ptr [RBX]
CALL 0x001030d0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001032b0
LAB_0010678d:
PUSH 0x28
POP RDI
CALL 0x00103170
MOV R14,RAX
LEA RSI,[RSP + 0x40]
LAB_0010679d:
LEA RDI,[RSP + 0x8]
CALL 0x00103440
MOV BPL,0x1
MOV RSI,qword ptr [RSP + 0x8]
LAB_001067af:
MOV RDI,R14
CALL 0x001071a0
XOR EBP,EBP
LEA RSI,[0x10dce0]
LEA RDX,[0x107270]
MOV RDI,R14
CALL 0x001034a0
LAB_001067d4:
MOV ESI,0x5417
XOR EAX,EAX
CALL 0x001033c0
CMP EAX,-0x1
JZ 0x00106821
LAB_001067e5:
ADD RSP,0x1b0
POP RBX
POP R14
POP RBP
RET
LAB_001067f1:
PUSH 0x28
POP RDI
CALL 0x00103170
MOV R14,RAX
LAB_001067fc:
LEA RSI,[0x10976f]
MOV RDI,RAX
CALL 0x0010753e
LAB_0010680b:
LEA RSI,[0x10dd10]
LEA RDX,[0x10760e]
MOV RDI,R14
CALL 0x001034a0
LAB_00106821:
LEA RDI,[RSP + 0x28]
CALL 0x001031d0
LEA RDI,[RSP + 0x38]
LAB_00106830:
LEA RSI,[0x1097ab]
CALL 0x001032b0
MOV R14,RAX
CALL 0x00103040
MOV RBX,RAX
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x001034b0
LEA RSI,[0x1097d6]
MOV RDI,RAX
CALL 0x001032b0
MOV R14,RAX
MOV EDI,dword ptr [RBX]
CALL 0x001030d0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001032b0
LAB_00106875:
PUSH 0x28
POP RDI
CALL 0x00103170
MOV R14,RAX
LEA RSI,[RSP + 0x40]
LAB_00106885:
LEA RDI,[RSP + 0x8]
CALL 0x00103440
MOV BPL,0x1
MOV RSI,qword ptr [RSP + 0x8]
LAB_00106897:
MOV RDI,R14
CALL 0x001071a0
XOR EBP,EBP
LEA RSI,[0x10dce0]
LEA RDX,[0x107270]
MOV RDI,R14
CALL 0x001034a0
|
/* serial_cpp::Serial::SerialImpl::setDTR(bool) */
void __thiscall serial_cpp::Serial::SerialImpl::setDTR(SerialImpl *this,bool param_1)
{
int iVar1;
ostream *poVar2;
int *piVar3;
char *pcVar4;
SerialException *pSVar5;
PortNotOpenedException *this_00;
int4 local_1c4;
char *local_1c0;
stringstream local_1a0 [16];
ostream local_190 [376];
if (this[0x2c] == (SerialImpl)0x0) {
this_00 = (PortNotOpenedException *)__cxa_allocate_exception(0x28);
/* try { // try from 001067fc to 0010680a has its CatchHandler @ 001068ed */
PortNotOpenedException::PortNotOpenedException(this_00,"Serial::setDTR");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,&PortNotOpenedException::typeinfo,
PortNotOpenedException::~PortNotOpenedException);
}
local_1c4 = 2;
if (param_1) {
iVar1 = ioctl(*(int *)(this + 0x28),0x5416,&local_1c4);
if (iVar1 == -1) {
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 00106748 to 0010678c has its CatchHandler @ 001068de */
poVar2 = std::operator<<(local_190,"setDTR failed on a call to ioctl(TIOCMBIS): ");
piVar3 = __errno_location();
poVar2 = (ostream *)std::ostream::operator<<(poVar2,*piVar3);
poVar2 = std::operator<<(poVar2," ");
pcVar4 = strerror(*piVar3);
std::operator<<(poVar2,pcVar4);
pSVar5 = (SerialException *)__cxa_allocate_exception(0x28);
/* try { // try from 0010679d to 001067a6 has its CatchHandler @ 001068cf */
std::__cxx11::stringbuf::str();
/* try { // try from 001067af to 001067ce has its CatchHandler @ 001068b9 */
SerialException::SerialException(pSVar5,local_1c0);
/* WARNING: Subroutine does not return */
__cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException);
}
}
else {
iVar1 = ioctl(*(int *)(this + 0x28),0x5417,&local_1c4);
if (iVar1 == -1) {
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 00106830 to 00106874 has its CatchHandler @ 001068dc */
poVar2 = std::operator<<(local_190,"setDTR failed on a call to ioctl(TIOCMBIC): ");
piVar3 = __errno_location();
poVar2 = (ostream *)std::ostream::operator<<(poVar2,*piVar3);
poVar2 = std::operator<<(poVar2," ");
pcVar4 = strerror(*piVar3);
std::operator<<(poVar2,pcVar4);
pSVar5 = (SerialException *)__cxa_allocate_exception(0x28);
/* try { // try from 00106885 to 0010688e has its CatchHandler @ 001068cd */
std::__cxx11::stringbuf::str();
/* try { // try from 00106897 to 001068b6 has its CatchHandler @ 001068b7 */
SerialException::SerialException(pSVar5,local_1c0);
/* WARNING: Subroutine does not return */
__cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException);
}
}
return;
}
|
|
18,603
|
serial_cpp::Serial::SerialImpl::setDTR(bool)
|
ami-iit[P]serial_cpp/src/impl/unix.cc
|
void
Serial::SerialImpl::setDTR (bool level)
{
if (is_open_ == false) {
throw PortNotOpenedException ("Serial::setDTR");
}
int command = TIOCM_DTR;
if (level) {
if (-1 == ioctl (fd_, TIOCMBIS, &command))
{
stringstream ss;
ss << "setDTR failed on a call to ioctl(TIOCMBIS): " << errno << " " << strerror(errno);
throw(SerialException(ss.str().c_str()));
}
} else {
if (-1 == ioctl (fd_, TIOCMBIC, &command))
{
stringstream ss;
ss << "setDTR failed on a call to ioctl(TIOCMBIC): " << errno << " " << strerror(errno);
throw(SerialException(ss.str().c_str()));
}
}
}
|
O3
|
cpp
|
serial_cpp::Serial::SerialImpl::setDTR(bool):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
cmpb $0x0, 0x2c(%rdi)
je 0x7331
movl $0x2, 0x4(%rsp)
movl 0x28(%rdi), %edi
leaq 0x4(%rsp), %rdx
testb %sil, %sil
je 0x7314
movl $0x5416, %esi # imm = 0x5416
xorl %eax, %eax
callq 0x33c0
cmpl $-0x1, %eax
jne 0x7325
leaq 0x28(%rsp), %rdi
callq 0x31c0
leaq 0x38(%rsp), %r14
leaq 0x450b(%rip), %rsi # 0xb78e
movl $0x2c, %edx
movq %r14, %rdi
callq 0x3330
callq 0x3050
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x34d0
movq %rax, %r14
leaq 0x453a(%rip), %rsi # 0xb7e6
movl $0x1, %edx
movq %rax, %rdi
callq 0x3330
movl (%rbx), %edi
callq 0x30e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x32a0
movl $0x28, %edi
callq 0x3150
movq %rax, %r14
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3460
movb $0x1, %bpl
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7e74
xorl %ebp, %ebp
leaq 0x89d0(%rip), %rsi # 0xfcd0
leaq 0xcc7(%rip), %rdx # 0x7fce
movq %r14, %rdi
callq 0x34c0
jmp 0x7405
movl $0x5417, %esi # imm = 0x5417
xorl %eax, %eax
callq 0x33c0
cmpl $-0x1, %eax
je 0x7363
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
movl $0x28, %edi
callq 0x3150
movq %rax, %r14
leaq 0x443a(%rip), %rsi # 0xb77f
movq %rax, %rdi
callq 0x845a
leaq 0x89ac(%rip), %rsi # 0xfd00
leaq 0x1259(%rip), %rdx # 0x85b4
movq %r14, %rdi
callq 0x34c0
leaq 0x28(%rsp), %rdi
callq 0x31c0
leaq 0x38(%rsp), %r14
leaq 0x4442(%rip), %rsi # 0xb7bb
movl $0x2c, %edx
movq %r14, %rdi
callq 0x3330
callq 0x3050
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x34d0
movq %rax, %r14
leaq 0x4444(%rip), %rsi # 0xb7e6
movl $0x1, %edx
movq %rax, %rdi
callq 0x3330
movl (%rbx), %edi
callq 0x30e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x32a0
movl $0x28, %edi
callq 0x3150
movq %rax, %r14
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3460
movb $0x1, %bpl
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7e74
xorl %ebp, %ebp
leaq 0x88da(%rip), %rsi # 0xfcd0
leaq 0xbd1(%rip), %rdx # 0x7fce
movq %r14, %rdi
callq 0x34c0
jmp 0x7407
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7425
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
testb %bpl, %bpl
jne 0x7431
jmp 0x7440
jmp 0x742e
movq %rax, %rbx
movq %r14, %rdi
callq 0x31e0
jmp 0x7440
jmp 0x743d
movq %rax, %rbx
movq 0x8b59(%rip), %rsi # 0xffa0
leaq 0x28(%rsp), %rdi
callq 0x3200
leaq 0xa8(%rsp), %rdi
callq 0x30d0
jmp 0x746b
movq %rax, %rbx
movq %r14, %rdi
callq 0x31e0
movq %rbx, %rdi
callq 0x34f0
nop
|
_ZN10serial_cpp6Serial10SerialImpl6setDTREb:
push rbp
push r14
push rbx
sub rsp, 1B0h
cmp byte ptr [rdi+2Ch], 0
jz loc_7331
mov [rsp+1C8h+var_1C4], 2
mov edi, [rdi+28h]
lea rdx, [rsp+1C8h+var_1C4]
test sil, sil
jz loc_7314
mov esi, 5416h
xor eax, eax
call _ioctl
cmp eax, 0FFFFFFFFh
jnz loc_7325
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea r14, [rsp+1C8h+var_190]
lea rsi, aSetdtrFailedOn; "setDTR failed on a call to ioctl(TIOCMB"...
mov edx, 2Ch ; ','
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
call ___errno_location
mov rbx, rax
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
mov r14, rax
lea rsi, aSetdtrFailedOn_0+2Bh; " "
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edi, [rbx]
call _strerror
mov rdi, r14
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+1C8h+var_188]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
mov rsi, [rsp+1C8h+var_1C0]; char *
mov rdi, r14; this
call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*)
xor ebp, ebp
lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo
lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_7405
loc_7314:
mov esi, 5417h
xor eax, eax
call _ioctl
cmp eax, 0FFFFFFFFh
jz short loc_7363
loc_7325:
add rsp, 1B0h
pop rbx
pop r14
pop rbp
retn
loc_7331:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aSerialSetdtr; "Serial::setDTR"
mov rdi, rax; this
call _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc; serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*)
lea rsi, _ZTIN10serial_cpp22PortNotOpenedExceptionE; lptinfo
lea rdx, _ZN10serial_cpp22PortNotOpenedExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_7363:
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea r14, [rsp+1C8h+var_190]
lea rsi, aSetdtrFailedOn_0; "setDTR failed on a call to ioctl(TIOCMB"...
mov edx, 2Ch ; ','
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
call ___errno_location
mov rbx, rax
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
mov r14, rax
lea rsi, aSetdtrFailedOn_0+2Bh; " "
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edi, [rbx]
call _strerror
mov rdi, r14
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+1C8h+var_188]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
mov rsi, [rsp+1C8h+var_1C0]; char *
mov rdi, r14; this
call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*)
xor ebp, ebp
lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo
lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_7405:
jmp short $+2
loc_7407:
mov rbx, rax
lea rax, [rsp+1C8h+var_1B0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7425
mov rsi, [rsp+1C8h+var_1B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7425:
test bpl, bpl
jnz short loc_7431
jmp short loc_7440
jmp short $+2
loc_742E:
mov rbx, rax
loc_7431:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_7440
jmp short $+2
loc_743D:
mov rbx, rax
loc_7440:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1C8h+var_120]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_746B
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
loc_746B:
mov rdi, rbx
call __Unwind_Resume
|
long long serial_cpp::Serial::SerialImpl::setDTR(serial_cpp::Serial::SerialImpl *this, char a2)
{
long long v2; // rdi
long long result; // rax
unsigned int *v4; // rbx
long long v5; // r14
long long v6; // rax
serial_cpp::SerialException *v7; // r14
serial_cpp::PortNotOpenedException *exception; // r14
unsigned int *v9; // rbx
long long v10; // r14
long long v11; // rax
serial_cpp::SerialException *v12; // r14
int v13; // [rsp+4h] [rbp-1C4h] BYREF
char *v14[2]; // [rsp+8h] [rbp-1C0h] BYREF
_BYTE v15[16]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v16[8]; // [rsp+38h] [rbp-190h] BYREF
_BYTE v17[104]; // [rsp+40h] [rbp-188h] BYREF
if ( !*((_BYTE *)this + 44) )
{
exception = (serial_cpp::PortNotOpenedException *)__cxa_allocate_exception(0x28uLL);
serial_cpp::PortNotOpenedException::PortNotOpenedException(exception, "Serial::setDTR");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'serial_cpp::PortNotOpenedException,
serial_cpp::PortNotOpenedException::~PortNotOpenedException);
}
v13 = 2;
v2 = *((unsigned int *)this + 10);
if ( a2 )
{
result = ioctl(v2, 21526LL, &v13);
if ( (_DWORD)result == -1 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v15);
std::__ostream_insert<char,std::char_traits<char>>(v16, "setDTR failed on a call to ioctl(TIOCMBIS): ", 44LL);
v4 = (unsigned int *)__errno_location();
v5 = std::ostream::operator<<(v16, *v4);
std::__ostream_insert<char,std::char_traits<char>>(v5, " ", 1LL);
v6 = strerror(*v4);
std::operator<<<std::char_traits<char>>(v5, v6);
v7 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL);
std::stringbuf::str(v14, v17);
serial_cpp::SerialException::SerialException(v7, v14[0]);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'serial_cpp::SerialException,
serial_cpp::SerialException::~SerialException);
}
}
else
{
result = ioctl(v2, 21527LL, &v13);
if ( (_DWORD)result == -1 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v15);
std::__ostream_insert<char,std::char_traits<char>>(v16, "setDTR failed on a call to ioctl(TIOCMBIC): ", 44LL);
v9 = (unsigned int *)__errno_location();
v10 = std::ostream::operator<<(v16, *v9);
std::__ostream_insert<char,std::char_traits<char>>(v10, " ", 1LL);
v11 = strerror(*v9);
std::operator<<<std::char_traits<char>>(v10, v11);
v12 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL);
std::stringbuf::str(v14, v17);
serial_cpp::SerialException::SerialException(v12, v14[0]);
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'serial_cpp::SerialException,
serial_cpp::SerialException::~SerialException);
}
}
return result;
}
|
setDTR:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1b0
CMP byte ptr [RDI + 0x2c],0x0
JZ 0x00107331
MOV dword ptr [RSP + 0x4],0x2
MOV EDI,dword ptr [RDI + 0x28]
LEA RDX,[RSP + 0x4]
TEST SIL,SIL
JZ 0x00107314
MOV ESI,0x5416
XOR EAX,EAX
CALL 0x001033c0
CMP EAX,-0x1
JNZ 0x00107325
LEA RDI,[RSP + 0x28]
CALL 0x001031c0
LEA R14,[RSP + 0x38]
LAB_0010727c:
LEA RSI,[0x10b78e]
MOV EDX,0x2c
MOV RDI,R14
CALL 0x00103330
CALL 0x00103050
MOV RBX,RAX
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x001034d0
MOV R14,RAX
LEA RSI,[0x10b7e6]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103330
MOV EDI,dword ptr [RBX]
CALL 0x001030e0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001032a0
LAB_001072cb:
MOV EDI,0x28
CALL 0x00103150
MOV R14,RAX
LEA RSI,[RSP + 0x40]
LAB_001072dd:
LEA RDI,[RSP + 0x8]
CALL 0x00103460
MOV BPL,0x1
MOV RSI,qword ptr [RSP + 0x8]
LAB_001072ef:
MOV RDI,R14
CALL 0x00107e74
XOR EBP,EBP
LEA RSI,[0x10fcd0]
LEA RDX,[0x107fce]
MOV RDI,R14
CALL 0x001034c0
LAB_00107314:
MOV ESI,0x5417
XOR EAX,EAX
CALL 0x001033c0
CMP EAX,-0x1
JZ 0x00107363
LAB_00107325:
ADD RSP,0x1b0
POP RBX
POP R14
POP RBP
RET
LAB_00107331:
MOV EDI,0x28
CALL 0x00103150
MOV R14,RAX
LAB_0010733e:
LEA RSI,[0x10b77f]
MOV RDI,RAX
CALL 0x0010845a
LAB_0010734d:
LEA RSI,[0x10fd00]
LEA RDX,[0x1085b4]
MOV RDI,R14
CALL 0x001034c0
LAB_00107363:
LEA RDI,[RSP + 0x28]
CALL 0x001031c0
LEA R14,[RSP + 0x38]
LAB_00107372:
LEA RSI,[0x10b7bb]
MOV EDX,0x2c
MOV RDI,R14
CALL 0x00103330
CALL 0x00103050
MOV RBX,RAX
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x001034d0
MOV R14,RAX
LEA RSI,[0x10b7e6]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103330
MOV EDI,dword ptr [RBX]
CALL 0x001030e0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001032a0
LAB_001073c1:
MOV EDI,0x28
CALL 0x00103150
MOV R14,RAX
LEA RSI,[RSP + 0x40]
LAB_001073d3:
LEA RDI,[RSP + 0x8]
CALL 0x00103460
MOV BPL,0x1
MOV RSI,qword ptr [RSP + 0x8]
LAB_001073e5:
MOV RDI,R14
CALL 0x00107e74
XOR EBP,EBP
LEA RSI,[0x10fcd0]
LEA RDX,[0x107fce]
MOV RDI,R14
CALL 0x001034c0
|
/* serial_cpp::Serial::SerialImpl::setDTR(bool) */
void __thiscall serial_cpp::Serial::SerialImpl::setDTR(SerialImpl *this,bool param_1)
{
int iVar1;
int *piVar2;
ostream *poVar3;
char *pcVar4;
SerialException *pSVar5;
PortNotOpenedException *this_00;
int4 local_1c4;
char *local_1c0;
stringstream local_1a0 [16];
ostream local_190 [376];
if (this[0x2c] == (SerialImpl)0x0) {
this_00 = (PortNotOpenedException *)__cxa_allocate_exception(0x28);
/* try { // try from 0010733e to 0010734c has its CatchHandler @ 00107460 */
PortNotOpenedException::PortNotOpenedException(this_00,"Serial::setDTR");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,&PortNotOpenedException::typeinfo,
PortNotOpenedException::~PortNotOpenedException);
}
local_1c4 = 2;
if (param_1) {
iVar1 = ioctl(*(int *)(this + 0x28),0x5416,&local_1c4);
if (iVar1 == -1) {
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 0010727c to 001072ca has its CatchHandler @ 0010743d */
std::__ostream_insert<char,std::char_traits<char>>
(local_190,"setDTR failed on a call to ioctl(TIOCMBIS): ",0x2c);
piVar2 = __errno_location();
poVar3 = (ostream *)std::ostream::operator<<(local_190,*piVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1);
pcVar4 = strerror(*piVar2);
std::operator<<(poVar3,pcVar4);
pSVar5 = (SerialException *)__cxa_allocate_exception(0x28);
/* try { // try from 001072dd to 001072e6 has its CatchHandler @ 0010742e */
std::__cxx11::stringbuf::str();
/* try { // try from 001072ef to 0010730e has its CatchHandler @ 00107407 */
SerialException::SerialException(pSVar5,local_1c0);
/* WARNING: Subroutine does not return */
__cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException);
}
}
else {
iVar1 = ioctl(*(int *)(this + 0x28),0x5417,&local_1c4);
if (iVar1 == -1) {
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 00107372 to 001073c0 has its CatchHandler @ 0010743b */
std::__ostream_insert<char,std::char_traits<char>>
(local_190,"setDTR failed on a call to ioctl(TIOCMBIC): ",0x2c);
piVar2 = __errno_location();
poVar3 = (ostream *)std::ostream::operator<<(local_190,*piVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1);
pcVar4 = strerror(*piVar2);
std::operator<<(poVar3,pcVar4);
pSVar5 = (SerialException *)__cxa_allocate_exception(0x28);
/* try { // try from 001073d3 to 001073dc has its CatchHandler @ 0010742c */
std::__cxx11::stringbuf::str();
/* try { // try from 001073e5 to 00107404 has its CatchHandler @ 00107405 */
SerialException::SerialException(pSVar5,local_1c0);
/* WARNING: Subroutine does not return */
__cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException);
}
}
return;
}
|
|
18,604
|
httplib::detail::split(char const*, char const*, char, unsigned long, std::function<void (char const*, char const*)>)
|
llama.cpp/examples/server/httplib.h
|
inline void split(const char *b, const char *e, char d, size_t m,
std::function<void(const char *, const char *)> fn) {
size_t i = 0;
size_t beg = 0;
size_t count = 1;
while (e ? (b + i < e) : (b[i] != '\0')) {
if (b[i] == d && count < m) {
auto r = trim(b, e, beg, i);
if (r.first < r.second) { fn(&b[r.first], &b[r.second]); }
beg = i + 1;
count++;
}
i++;
}
if (i) {
auto r = trim(b, e, beg, i);
if (r.first < r.second) { fn(&b[r.first], &b[r.second]); }
}
}
|
O3
|
c
|
httplib::detail::split(char const*, char const*, char, unsigned long, std::function<void (char const*, char const*)>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
subq %r14, %rdi
movl $0x1, %ebx
xorl %eax, %eax
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rax, %r13
leaq (%r14,%r13), %rcx
testq %r15, %r15
je 0x6a326
cmpq %r15, %rcx
jae 0x6a3e9
movb (%rcx), %cl
jmp 0x6a330
movb (%rcx), %cl
testb %cl, %cl
je 0x6a3e9
cmpq %r12, %rbx
setb %r9b
cmpb %bpl, %cl
sete %cl
testb %r9b, %cl
jne 0x6a347
incq %r13
jmp 0x6a310
leaq (%r14,%rax), %rcx
cmpq %r15, %rcx
jae 0x6a371
movzbl (%r14,%rax), %ecx
cmpl $0x20, %ecx
je 0x6a35f
cmpl $0x9, %ecx
jne 0x6a371
leaq (%r14,%rax), %rcx
incq %rcx
incq %rax
cmpq %r15, %rcx
jb 0x6a350
movq %rdi, %rax
testq %r13, %r13
je 0x6a390
movq %r13, %rcx
movzbl -0x1(%r14,%rcx), %r9d
cmpl $0x20, %r9d
je 0x6a38b
cmpl $0x9, %r9d
jne 0x6a392
decq %rcx
jne 0x6a379
xorl %ecx, %ecx
cmpq %rcx, %rax
jae 0x6a3db
movq %rdi, 0x20(%rsp)
addq %r14, %rax
addq %r14, %rcx
movq %rax, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
cmpq $0x0, 0x10(%r8)
je 0x6a46c
movq %r8, %rdi
movq %r8, 0x18(%rsp)
movq 0x18(%rsp), %rax
callq *0x18(%rax)
leaq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %rdi
incq %r13
incq %rbx
movq %r13, %rax
jmp 0x6a310
testq %r13, %r13
je 0x6a45d
leaq (%r14,%rax), %rcx
cmpq %r15, %rcx
jae 0x6a418
movzbl (%r14,%rax), %ecx
cmpl $0x20, %ecx
je 0x6a406
cmpl $0x9, %ecx
jne 0x6a418
leaq (%r14,%rax), %rcx
incq %rcx
incq %rax
cmpq %r15, %rcx
jb 0x6a3f7
movq %rdi, %rax
movzbl -0x1(%r14,%r13), %ecx
cmpl $0x20, %ecx
je 0x6a428
cmpl $0x9, %ecx
jne 0x6a430
decq %r13
jne 0x6a418
xorl %r13d, %r13d
cmpq %r13, %rax
jae 0x6a45d
addq %r14, %rax
addq %r14, %r13
movq %rax, 0x10(%rsp)
movq %r13, 0x8(%rsp)
cmpq $0x0, 0x10(%r8)
je 0x6a46c
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r8, %rdi
callq *0x18(%r8)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x265f0
nop
|
_ZN7httplib6detail5splitEPKcS2_cmSt8functionIFvS2_S2_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rcx
mov ebp, edx
mov r15, rsi
mov r14, rdi
mov rdi, rsi
sub rdi, r14
mov ebx, 1
xor eax, eax
lea rsi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_50]
mov r13, rax
loc_6A310:
lea rcx, [r14+r13]
test r15, r15
jz short loc_6A326
cmp rcx, r15
jnb loc_6A3E9
mov cl, [rcx]
jmp short loc_6A330
loc_6A326:
mov cl, [rcx]
test cl, cl
jz loc_6A3E9
loc_6A330:
cmp rbx, r12
setb r9b
cmp cl, bpl
setz cl
test cl, r9b
jnz short loc_6A347
inc r13
jmp short loc_6A310
loc_6A347:
lea rcx, [r14+rax]
cmp rcx, r15
jnb short loc_6A371
loc_6A350:
movzx ecx, byte ptr [r14+rax]
cmp ecx, 20h ; ' '
jz short loc_6A35F
cmp ecx, 9
jnz short loc_6A371
loc_6A35F:
lea rcx, [r14+rax]
inc rcx
inc rax
cmp rcx, r15
jb short loc_6A350
mov rax, rdi
loc_6A371:
test r13, r13
jz short loc_6A390
mov rcx, r13
loc_6A379:
movzx r9d, byte ptr [r14+rcx-1]
cmp r9d, 20h ; ' '
jz short loc_6A38B
cmp r9d, 9
jnz short loc_6A392
loc_6A38B:
dec rcx
jnz short loc_6A379
loc_6A390:
xor ecx, ecx
loc_6A392:
cmp rax, rcx
jnb short loc_6A3DB
mov [rsp+58h+var_38], rdi
add rax, r14
add rcx, r14
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_50], rcx
cmp qword ptr [r8+10h], 0
jz loc_6A46C
mov rdi, r8
mov [rsp+58h+var_40], r8
mov rax, [rsp+58h+var_40]
call qword ptr [rax+18h]
lea rdx, [rsp+58h+var_50]
lea rsi, [rsp+58h+var_48]
mov r8, [rsp+58h+var_40]
mov rdi, [rsp+58h+var_38]
loc_6A3DB:
inc r13
inc rbx
mov rax, r13
jmp loc_6A310
loc_6A3E9:
test r13, r13
jz short loc_6A45D
lea rcx, [r14+rax]
cmp rcx, r15
jnb short loc_6A418
loc_6A3F7:
movzx ecx, byte ptr [r14+rax]
cmp ecx, 20h ; ' '
jz short loc_6A406
cmp ecx, 9
jnz short loc_6A418
loc_6A406:
lea rcx, [r14+rax]
inc rcx
inc rax
cmp rcx, r15
jb short loc_6A3F7
mov rax, rdi
loc_6A418:
movzx ecx, byte ptr [r14+r13-1]
cmp ecx, 20h ; ' '
jz short loc_6A428
cmp ecx, 9
jnz short loc_6A430
loc_6A428:
dec r13
jnz short loc_6A418
xor r13d, r13d
loc_6A430:
cmp rax, r13
jnb short loc_6A45D
add rax, r14
add r13, r14
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_50], r13
cmp qword ptr [r8+10h], 0
jz short loc_6A46C
lea rsi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_50]
mov rdi, r8
call qword ptr [r8+18h]
loc_6A45D:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6A46C:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
|
unsigned long long httplib::detail::split(
long long a1,
unsigned long long a2,
char a3,
unsigned long long a4,
long long a5)
{
unsigned long long v8; // rdi
unsigned long long v9; // rbx
unsigned long long result; // rax
unsigned long long v11; // r13
char *v12; // rcx
char v13; // cl
int v14; // ecx
unsigned long long v15; // rcx
unsigned long long v16; // rcx
int v17; // r9d
int v18; // ecx
unsigned long long v19; // rcx
int v20; // ecx
long long v21; // [rsp+8h] [rbp-50h] BYREF
long long v22; // [rsp+10h] [rbp-48h] BYREF
long long v23; // [rsp+18h] [rbp-40h]
unsigned long long v24; // [rsp+20h] [rbp-38h]
v8 = a2 - a1;
v9 = 1LL;
result = 0LL;
v11 = 0LL;
while ( 1 )
{
v12 = (char *)(a1 + v11);
if ( a2 )
{
if ( (unsigned long long)v12 >= a2 )
break;
v13 = *v12;
goto LABEL_6;
}
v13 = *v12;
if ( !v13 )
break;
LABEL_6:
if ( v9 < a4 && v13 == a3 )
{
if ( a1 + result < a2 )
{
while ( 1 )
{
v14 = *(unsigned __int8 *)(a1 + result);
if ( v14 != 32 && v14 != 9 )
break;
v15 = a1 + result++ + 1;
if ( v15 >= a2 )
{
result = v8;
break;
}
}
}
if ( v11 )
{
v16 = v11;
while ( 1 )
{
v17 = *(unsigned __int8 *)(a1 + v16 - 1);
if ( v17 != 32 && v17 != 9 )
break;
if ( !--v16 )
goto LABEL_18;
}
}
else
{
LABEL_18:
v16 = 0LL;
}
if ( result < v16 )
{
v24 = v8;
v22 = a1 + result;
v21 = a1 + v16;
if ( !*(_QWORD *)(a5 + 16) )
goto LABEL_37;
v23 = a5;
(*(void ( **)(long long, long long *, long long *))(a5 + 24))(a5, &v22, &v21);
a5 = v23;
v8 = v24;
}
++v11;
++v9;
result = v11;
}
else
{
++v11;
}
}
if ( v11 )
{
if ( a1 + result < a2 )
{
while ( 1 )
{
v18 = *(unsigned __int8 *)(a1 + result);
if ( v18 != 32 && v18 != 9 )
break;
v19 = a1 + result++ + 1;
if ( v19 >= a2 )
{
result = v8;
break;
}
}
}
while ( 1 )
{
v20 = *(unsigned __int8 *)(a1 + v11 - 1);
if ( v20 != 32 && v20 != 9 )
break;
if ( !--v11 )
{
v11 = 0LL;
break;
}
}
if ( result < v11 )
{
v22 = a1 + result;
v21 = a1 + v11;
if ( !*(_QWORD *)(a5 + 16) )
LABEL_37:
std::__throw_bad_function_call();
return (*(long long ( **)(long long, long long *, long long *))(a5 + 24))(a5, &v22, &v21);
}
}
return result;
}
|
split:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RCX
MOV EBP,EDX
MOV R15,RSI
MOV R14,RDI
MOV RDI,RSI
SUB RDI,R14
MOV EBX,0x1
XOR EAX,EAX
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x8]
MOV R13,RAX
LAB_0016a310:
LEA RCX,[R14 + R13*0x1]
TEST R15,R15
JZ 0x0016a326
CMP RCX,R15
JNC 0x0016a3e9
MOV CL,byte ptr [RCX]
JMP 0x0016a330
LAB_0016a326:
MOV CL,byte ptr [RCX]
TEST CL,CL
JZ 0x0016a3e9
LAB_0016a330:
CMP RBX,R12
SETC R9B
CMP CL,BPL
SETZ CL
TEST CL,R9B
JNZ 0x0016a347
INC R13
JMP 0x0016a310
LAB_0016a347:
LEA RCX,[R14 + RAX*0x1]
CMP RCX,R15
JNC 0x0016a371
LAB_0016a350:
MOVZX ECX,byte ptr [R14 + RAX*0x1]
CMP ECX,0x20
JZ 0x0016a35f
CMP ECX,0x9
JNZ 0x0016a371
LAB_0016a35f:
LEA RCX,[R14 + RAX*0x1]
INC RCX
INC RAX
CMP RCX,R15
JC 0x0016a350
MOV RAX,RDI
LAB_0016a371:
TEST R13,R13
JZ 0x0016a390
MOV RCX,R13
LAB_0016a379:
MOVZX R9D,byte ptr [R14 + RCX*0x1 + -0x1]
CMP R9D,0x20
JZ 0x0016a38b
CMP R9D,0x9
JNZ 0x0016a392
LAB_0016a38b:
DEC RCX
JNZ 0x0016a379
LAB_0016a390:
XOR ECX,ECX
LAB_0016a392:
CMP RAX,RCX
JNC 0x0016a3db
MOV qword ptr [RSP + 0x20],RDI
ADD RAX,R14
ADD RCX,R14
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x8],RCX
CMP qword ptr [R8 + 0x10],0x0
JZ 0x0016a46c
MOV RDI,R8
MOV qword ptr [RSP + 0x18],R8
MOV RAX,qword ptr [RSP + 0x18]
CALL qword ptr [RAX + 0x18]
LEA RDX,[RSP + 0x8]
LEA RSI,[RSP + 0x10]
MOV R8,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x20]
LAB_0016a3db:
INC R13
INC RBX
MOV RAX,R13
JMP 0x0016a310
LAB_0016a3e9:
TEST R13,R13
JZ 0x0016a45d
LEA RCX,[R14 + RAX*0x1]
CMP RCX,R15
JNC 0x0016a418
LAB_0016a3f7:
MOVZX ECX,byte ptr [R14 + RAX*0x1]
CMP ECX,0x20
JZ 0x0016a406
CMP ECX,0x9
JNZ 0x0016a418
LAB_0016a406:
LEA RCX,[R14 + RAX*0x1]
INC RCX
INC RAX
CMP RCX,R15
JC 0x0016a3f7
MOV RAX,RDI
LAB_0016a418:
MOVZX ECX,byte ptr [R14 + R13*0x1 + -0x1]
CMP ECX,0x20
JZ 0x0016a428
CMP ECX,0x9
JNZ 0x0016a430
LAB_0016a428:
DEC R13
JNZ 0x0016a418
XOR R13D,R13D
LAB_0016a430:
CMP RAX,R13
JNC 0x0016a45d
ADD RAX,R14
ADD R13,R14
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x8],R13
CMP qword ptr [R8 + 0x10],0x0
JZ 0x0016a46c
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x8]
MOV RDI,R8
CALL qword ptr [R8 + 0x18]
LAB_0016a45d:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016a46c:
CALL 0x001265f0
|
/* httplib::detail::split(char const*, char const*, char, unsigned long, std::function<void (char
const*, char const*)>) */
void httplib::detail::split(long param_1,char *param_2,char param_3,ulong param_4,long param_5)
{
ulong uVar1;
ulong uVar2;
char cVar3;
char *pcVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
long local_50;
long local_48;
long local_40;
ulong local_38;
uVar7 = (long)param_2 - param_1;
uVar6 = 1;
uVar1 = 0;
uVar8 = uVar1;
LAB_0016a310:
pcVar4 = (char *)(param_1 + uVar8);
if (param_2 == (char *)0x0) {
cVar3 = *pcVar4;
if (cVar3 == '\0') goto LAB_0016a3e9;
}
else {
if (param_2 <= pcVar4) goto LAB_0016a3e9;
cVar3 = *pcVar4;
}
if (cVar3 == param_3 && uVar6 < param_4) {
pcVar4 = (char *)(param_1 + uVar1);
uVar2 = uVar1;
for (; (uVar5 = uVar8, pcVar4 < param_2 &&
((*(char *)(param_1 + uVar1) == ' ' ||
(uVar2 = uVar1, *(char *)(param_1 + uVar1) == '\t')))); uVar1 = uVar1 + 1) {
pcVar4 = (char *)(param_1 + uVar1 + 1);
uVar2 = uVar7;
}
for (; uVar5 != 0; uVar5 = uVar5 - 1) {
cVar3 = *(char *)(param_1 + -1 + uVar5);
if ((cVar3 != ' ') && (cVar3 != '\t')) goto LAB_0016a392;
}
uVar5 = 0;
LAB_0016a392:
if (uVar2 < uVar5) {
local_48 = uVar2 + param_1;
local_50 = uVar5 + param_1;
local_38 = uVar7;
if (*(long *)(param_5 + 0x10) == 0) goto LAB_0016a46c;
local_40 = param_5;
(**(code **)(param_5 + 0x18))(param_5,&local_48,&local_50);
uVar7 = local_38;
param_5 = local_40;
}
uVar1 = uVar8 + 1;
uVar6 = uVar6 + 1;
uVar8 = uVar1;
}
else {
uVar8 = uVar8 + 1;
}
goto LAB_0016a310;
LAB_0016a3e9:
if (uVar8 != 0) {
pcVar4 = (char *)(param_1 + uVar1);
uVar6 = uVar1;
for (; (pcVar4 < param_2 &&
((*(char *)(param_1 + uVar1) == ' ' ||
(uVar6 = uVar1, *(char *)(param_1 + uVar1) == '\t')))); uVar1 = uVar1 + 1) {
pcVar4 = (char *)(param_1 + uVar1 + 1);
uVar6 = uVar7;
}
do {
cVar3 = *(char *)(param_1 + -1 + uVar8);
if ((cVar3 != ' ') && (cVar3 != '\t')) goto LAB_0016a430;
uVar8 = uVar8 - 1;
} while (uVar8 != 0);
uVar8 = 0;
LAB_0016a430:
if (uVar6 < uVar8) {
local_48 = uVar6 + param_1;
local_50 = uVar8 + param_1;
if (*(long *)(param_5 + 0x10) == 0) {
LAB_0016a46c:
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
(**(code **)(param_5 + 0x18))(param_5,&local_48,&local_50);
}
}
return;
}
|
|
18,605
|
ha_find_null
|
eloqsql/mysys/my_compare.c
|
HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, const uchar *a)
{
for (; (enum ha_base_keytype) keyseg->type != HA_KEYTYPE_END; keyseg++)
{
const uchar *end;
if (keyseg->null_bit)
{
if (!*a++)
return keyseg;
}
end= a+ keyseg->length;
switch ((enum ha_base_keytype) keyseg->type) {
case HA_KEYTYPE_TEXT:
case HA_KEYTYPE_BINARY:
case HA_KEYTYPE_BIT:
if (keyseg->flag & HA_SPACE_PACK)
{
int a_length;
get_key_length(a_length, a);
a += a_length;
break;
}
else
a= end;
break;
case HA_KEYTYPE_VARTEXT1:
case HA_KEYTYPE_VARTEXT2:
case HA_KEYTYPE_VARBINARY1:
case HA_KEYTYPE_VARBINARY2:
{
int a_length;
get_key_length(a_length, a);
a+= a_length;
break;
}
case HA_KEYTYPE_NUM:
if (keyseg->flag & HA_SPACE_PACK)
{
int alength= *a++;
end= a+alength;
}
a= end;
break;
case HA_KEYTYPE_INT8:
case HA_KEYTYPE_SHORT_INT:
case HA_KEYTYPE_USHORT_INT:
case HA_KEYTYPE_LONG_INT:
case HA_KEYTYPE_ULONG_INT:
case HA_KEYTYPE_INT24:
case HA_KEYTYPE_UINT24:
#ifdef HAVE_LONG_LONG
case HA_KEYTYPE_LONGLONG:
case HA_KEYTYPE_ULONGLONG:
#endif
case HA_KEYTYPE_FLOAT:
case HA_KEYTYPE_DOUBLE:
a= end;
break;
case HA_KEYTYPE_END: /* purecov: inspected */
/* keep compiler happy */
DBUG_ASSERT(0);
break;
}
}
return keyseg;
}
|
O3
|
c
|
ha_find_null:
movq %rdi, %rax
movb 0x18(%rdi), %dl
testb %dl, %dl
je 0xc305b
pushq %rbp
movq %rsp, %rbp
leaq 0x4bbde(%rip), %rcx # 0x10ebbc
cmpb $0x0, 0x19(%rax)
je 0xc2fec
cmpb $0x0, (%rsi)
je 0xc305a
incq %rsi
movzbl %dl, %edx
decl %edx
cmpl $0x12, %edx
ja 0xc3035
movzwl 0x14(%rax), %edi
addq %rsi, %rdi
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
testb $0x1, 0x12(%rax)
je 0xc3038
movzbl (%rsi), %edx
cmpq $0xff, %rdx
je 0xc301f
movl $0x1, %edi
jmp 0xc302f
movzwl 0x1(%rsi), %edx
rolw $0x8, %dx
movzwl %dx, %edx
movl $0x3, %edi
addq %rdi, %rsi
addq %rdx, %rsi
movq %rsi, %rdi
movb 0x38(%rax), %dl
addq $0x20, %rax
movq %rdi, %rsi
testb %dl, %dl
jne 0xc2fde
jmp 0xc305a
testb $0x1, 0x12(%rax)
je 0xc3038
movzbl (%rsi), %edx
leaq (%rsi,%rdx), %rdi
incq %rdi
jmp 0xc3038
popq %rbp
retq
|
ha_find_null:
mov rax, rdi
mov dl, [rdi+18h]
test dl, dl
jz locret_C305B
push rbp
mov rbp, rsp
lea rcx, jpt_C3004
loc_C2FDE:
cmp byte ptr [rax+19h], 0
jz short loc_C2FEC
cmp byte ptr [rsi], 0
jz short loc_C305A
inc rsi
loc_C2FEC:
movzx edx, dl
dec edx; switch 19 cases
cmp edx, 12h
ja short def_C3004; jumptable 00000000000C3004 default case
movzx edi, word ptr [rax+14h]
add rdi, rsi
movsxd rdx, ds:(jpt_C3004 - 10EBBCh)[rcx+rdx*4]
add rdx, rcx
jmp rdx; switch jump
loc_C3006:
test byte ptr [rax+12h], 1; jumptable 00000000000C3004 cases 1,2,19
jz short loc_C3038; jumptable 00000000000C3004 cases 3-6,8-14
loc_C300C:
movzx edx, byte ptr [rsi]; jumptable 00000000000C3004 cases 15-18
cmp rdx, 0FFh
jz short loc_C301F
mov edi, 1
jmp short loc_C302F
loc_C301F:
movzx edx, word ptr [rsi+1]
rol dx, 8
movzx edx, dx
mov edi, 3
loc_C302F:
add rsi, rdi
add rsi, rdx
def_C3004:
mov rdi, rsi; jumptable 00000000000C3004 default case
loc_C3038:
mov dl, [rax+38h]; jumptable 00000000000C3004 cases 3-6,8-14
add rax, 20h ; ' '
mov rsi, rdi
test dl, dl
jnz short loc_C2FDE
jmp short loc_C305A
loc_C3048:
test byte ptr [rax+12h], 1; jumptable 00000000000C3004 case 7
jz short loc_C3038; jumptable 00000000000C3004 cases 3-6,8-14
movzx edx, byte ptr [rsi]
lea rdi, [rsi+rdx]
inc rdi
jmp short loc_C3038; jumptable 00000000000C3004 cases 3-6,8-14
loc_C305A:
pop rbp
locret_C305B:
retn
|
long long ha_find_null(long long a1, unsigned __int8 *a2)
{
long long result; // rax
char i; // dl
long long v4; // rdi
long long v5; // rdx
long long v6; // rdi
result = a1;
for ( i = *(_BYTE *)(a1 + 24); i; a2 = (unsigned __int8 *)v4 )
{
if ( *(_BYTE *)(result + 25) )
{
if ( !*a2 )
return result;
++a2;
}
v4 = (long long)&a2[*(unsigned __int16 *)(result + 20)];
switch ( i )
{
case 1:
case 2:
case 19:
if ( (*(_BYTE *)(result + 18) & 1) != 0 )
goto LABEL_7;
break;
case 3:
case 4:
case 5:
case 6:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
break;
case 7:
if ( (*(_BYTE *)(result + 18) & 1) != 0 )
v4 = (long long)&a2[*a2 + 1];
break;
case 15:
case 16:
case 17:
case 18:
LABEL_7:
v5 = *a2;
if ( v5 == 255 )
{
v5 = (unsigned __int16)__ROL2__(*(_WORD *)(a2 + 1), 8);
v6 = 3LL;
}
else
{
v6 = 1LL;
}
a2 += v5 + v6;
goto LABEL_11;
default:
LABEL_11:
v4 = (long long)a2;
break;
}
i = *(_BYTE *)(result + 56);
result += 32LL;
}
return result;
}
|
ha_find_null:
MOV RAX,RDI
MOV DL,byte ptr [RDI + 0x18]
TEST DL,DL
JZ 0x001c305b
PUSH RBP
MOV RBP,RSP
LEA RCX,[0x20ebbc]
LAB_001c2fde:
CMP byte ptr [RAX + 0x19],0x0
JZ 0x001c2fec
CMP byte ptr [RSI],0x0
JZ 0x001c305a
INC RSI
LAB_001c2fec:
MOVZX EDX,DL
DEC EDX
CMP EDX,0x12
JA 0x001c3035
MOVZX EDI,word ptr [RAX + 0x14]
ADD RDI,RSI
MOVSXD RDX,dword ptr [RCX + RDX*0x4]
ADD RDX,RCX
switchD:
JMP RDX
caseD_1:
TEST byte ptr [RAX + 0x12],0x1
JZ 0x001c3038
caseD_f:
MOVZX EDX,byte ptr [RSI]
CMP RDX,0xff
JZ 0x001c301f
MOV EDI,0x1
JMP 0x001c302f
LAB_001c301f:
MOVZX EDX,word ptr [RSI + 0x1]
ROL DX,0x8
MOVZX EDX,DX
MOV EDI,0x3
LAB_001c302f:
ADD RSI,RDI
ADD RSI,RDX
LAB_001c3035:
MOV RDI,RSI
caseD_3:
MOV DL,byte ptr [RAX + 0x38]
ADD RAX,0x20
MOV RSI,RDI
TEST DL,DL
JNZ 0x001c2fde
JMP 0x001c305a
caseD_7:
TEST byte ptr [RAX + 0x12],0x1
JZ 0x001c3038
MOVZX EDX,byte ptr [RSI]
LEA RDI,[RSI + RDX*0x1]
INC RDI
JMP 0x001c3038
LAB_001c305a:
POP RBP
LAB_001c305b:
RET
|
void ha_find_null(long param_1,byte *param_2)
{
byte bVar1;
ulong uVar2;
byte *pbVar3;
long lVar4;
bVar1 = *(byte *)(param_1 + 0x18);
do {
if (bVar1 == 0) {
return;
}
if (*(char *)(param_1 + 0x19) != '\0') {
if (*param_2 == 0) {
return;
}
param_2 = param_2 + 1;
}
pbVar3 = param_2;
if (bVar1 - 1 < 0x13) {
pbVar3 = param_2 + *(ushort *)(param_1 + 0x14);
switch((uint)bVar1) {
case 1:
case 2:
case 0x13:
if ((*(byte *)(param_1 + 0x12) & 1) != 0) goto switchD_001c3004_caseD_f;
break;
case 7:
if ((*(byte *)(param_1 + 0x12) & 1) != 0) {
pbVar3 = param_2 + (ulong)*param_2 + 1;
}
break;
case 0xf:
case 0x10:
case 0x11:
case 0x12:
switchD_001c3004_caseD_f:
uVar2 = (ulong)*param_2;
if (uVar2 == 0xff) {
uVar2 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8);
lVar4 = 3;
}
else {
lVar4 = 1;
}
pbVar3 = param_2 + uVar2 + lVar4;
}
}
bVar1 = *(byte *)(param_1 + 0x38);
param_1 = param_1 + 0x20;
param_2 = pbVar3;
} while( true );
}
|
|
18,606
|
read_user_name
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void read_user_name(char *name)
{
if (geteuid() == 0)
strcpy(name,"root"); /* allow use of surun */
else
{
#ifdef HAVE_GETPWUID
struct passwd *skr;
const char *str;
if ((skr=getpwuid(geteuid())) != NULL)
{
str=skr->pw_name;
} else if ((str=getlogin()) == NULL)
{
if (!(str=getenv("USER")) && !(str=getenv("LOGNAME")) &&
!(str=getenv("LOGIN")))
str="UNKNOWN_USER";
}
ma_strmake(name,str,USERNAME_LENGTH);
#elif defined(HAVE_CUSERID)
(void) cuserid(name);
#else
ma_strmake(name,"UNKNOWN_USER", USERNAME_LENGTH);
#endif
}
return;
}
|
O0
|
c
|
read_user_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x14290
cmpl $0x0, %eax
jne 0x317fb
movq -0x8(%rbp), %rdi
leaq 0x34117(%rip), %rsi # 0x65908
callq 0x143d0
jmp 0x31890
callq 0x14290
movl %eax, %edi
callq 0x144f0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x3181e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3187e
callq 0x14440
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3187c
leaq 0x3939c(%rip), %rdi # 0x6abd0
callq 0x14550
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3187a
leaq 0x39370(%rip), %rdi # 0x6abba
callq 0x14550
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3187a
leaq 0x39362(%rip), %rdi # 0x6abc2
callq 0x14550
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3187a
leaq 0x39352(%rip), %rax # 0x6abc8
movq %rax, -0x18(%rbp)
jmp 0x3187c
jmp 0x3187e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x4c650
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
read_user_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
call _geteuid
cmp eax, 0
jnz short loc_317FB
mov rdi, [rbp+var_8]
lea rsi, aRoot; "root"
call _strcpy
jmp loc_31890
loc_317FB:
call _geteuid
mov edi, eax
call _getpwuid
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_3181E
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_3187E
loc_3181E:
call _getlogin
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3187C
lea rdi, aUnknownUser+8; "USER"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3187A
lea rdi, aLogname; "LOGNAME"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3187A
lea rdi, aLogin; "LOGIN"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3187A
lea rax, aUnknownUser; "UNKNOWN_USER"
mov [rbp+var_18], rax
loc_3187A:
jmp short $+2
loc_3187C:
jmp short $+2
loc_3187E:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov edx, 200h
call ma_strmake
loc_31890:
add rsp, 20h
pop rbp
retn
|
long long read_user_name(long long a1)
{
unsigned int v2; // eax
const char *v3; // [rsp+8h] [rbp-18h]
_QWORD *v4; // [rsp+10h] [rbp-10h]
if ( !(unsigned int)geteuid() )
return strcpy(a1, "root");
v2 = geteuid();
v4 = (_QWORD *)getpwuid(v2);
if ( v4 )
return ma_strmake(a1, *v4, 512LL);
v3 = (const char *)getlogin();
if ( !v3 )
{
v3 = (const char *)getenv("USER");
if ( !v3 )
{
v3 = (const char *)getenv("LOGNAME");
if ( !v3 )
{
v3 = (const char *)getenv("LOGIN");
if ( !v3 )
v3 = "UNKNOWN_USER";
}
}
}
return ma_strmake(a1, v3, 512LL);
}
|
read_user_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
CALL 0x00114290
CMP EAX,0x0
JNZ 0x001317fb
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x165908]
CALL 0x001143d0
JMP 0x00131890
LAB_001317fb:
CALL 0x00114290
MOV EDI,EAX
CALL 0x001144f0
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x0013181e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013187e
LAB_0013181e:
CALL 0x00114440
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013187c
LEA RDI,[0x16abd0]
CALL 0x00114550
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013187a
LEA RDI,[0x16abba]
CALL 0x00114550
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013187a
LEA RDI,[0x16abc2]
CALL 0x00114550
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013187a
LEA RAX,[0x16abc8]
MOV qword ptr [RBP + -0x18],RAX
LAB_0013187a:
JMP 0x0013187c
LAB_0013187c:
JMP 0x0013187e
LAB_0013187e:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x200
CALL 0x0014c650
LAB_00131890:
ADD RSP,0x20
POP RBP
RET
|
void read_user_name(char *param_1)
{
__uid_t _Var1;
passwd *ppVar2;
char *local_20;
_Var1 = geteuid();
if (_Var1 == 0) {
strcpy(param_1,"root");
}
else {
_Var1 = geteuid();
ppVar2 = getpwuid(_Var1);
if (ppVar2 == (passwd *)0x0) {
local_20 = getlogin();
if ((((local_20 == (char *)0x0) && (local_20 = getenv("USER"), local_20 == (char *)0x0)) &&
(local_20 = getenv("LOGNAME"), local_20 == (char *)0x0)) &&
(local_20 = getenv("LOGIN"), local_20 == (char *)0x0)) {
local_20 = "UNKNOWN_USER";
}
}
else {
local_20 = ppVar2->pw_name;
}
ma_strmake(param_1,local_20,0x200);
}
return;
}
|
|
18,607
|
read_user_name
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void read_user_name(char *name)
{
if (geteuid() == 0)
strcpy(name,"root"); /* allow use of surun */
else
{
#ifdef HAVE_GETPWUID
struct passwd *skr;
const char *str;
if ((skr=getpwuid(geteuid())) != NULL)
{
str=skr->pw_name;
} else if ((str=getlogin()) == NULL)
{
if (!(str=getenv("USER")) && !(str=getenv("LOGNAME")) &&
!(str=getenv("LOGIN")))
str="UNKNOWN_USER";
}
ma_strmake(name,str,USERNAME_LENGTH);
#elif defined(HAVE_CUSERID)
(void) cuserid(name);
#else
ma_strmake(name,"UNKNOWN_USER", USERNAME_LENGTH);
#endif
}
return;
}
|
O3
|
c
|
read_user_name:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x142a0
testl %eax, %eax
je 0x277ff
callq 0x142a0
movl %eax, %edi
callq 0x14550
testq %rax, %rax
je 0x27810
movq (%rax), %rsi
jmp 0x2783f
movb $0x0, 0x4(%rbx)
movl $0x746f6f72, (%rbx) # imm = 0x746F6F72
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x14490
testq %rax, %rax
jne 0x2783c
leaq 0x23fbd(%rip), %rdi # 0x4b7de
callq 0x145b0
testq %rax, %rax
jne 0x2783c
leaq 0x23f96(%rip), %rdi # 0x4b7c8
callq 0x145b0
testq %rax, %rax
je 0x27852
movq %rax, %rsi
movl $0x200, %edx # imm = 0x200
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x367b7
leaq 0x23f77(%rip), %rdi # 0x4b7d0
callq 0x145b0
testq %rax, %rax
leaq 0x23f6e(%rip), %rsi # 0x4b7d6
cmovneq %rax, %rsi
jmp 0x2783f
|
read_user_name:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call _geteuid
test eax, eax
jz short loc_277FF
call _geteuid
mov edi, eax
call _getpwuid
test rax, rax
jz short loc_27810
mov rsi, [rax]
jmp short loc_2783F
loc_277FF:
mov byte ptr [rbx+4], 0
mov dword ptr [rbx], 746F6F72h
add rsp, 8
pop rbx
pop rbp
retn
loc_27810:
call _getlogin
test rax, rax
jnz short loc_2783C
lea rdi, aUnknownUser+8; "USER"
call _getenv
test rax, rax
jnz short loc_2783C
lea rdi, aLogname; "LOGNAME"
call _getenv
test rax, rax
jz short loc_27852
loc_2783C:
mov rsi, rax
loc_2783F:
mov edx, 200h
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp ma_strmake
loc_27852:
lea rdi, aLogin; "LOGIN"
call _getenv
test rax, rax
lea rsi, aUnknownUser; "UNKNOWN_USER"
cmovnz rsi, rax
jmp short loc_2783F
|
long long read_user_name(char *a1)
{
long long result; // rax
unsigned int v2; // eax
const char **v3; // rax
const char *v4; // rsi
long long v5; // rax
long long v6; // rax
result = geteuid(a1);
if ( (_DWORD)result )
{
v2 = geteuid(a1);
v3 = (const char **)getpwuid(v2);
if ( v3 )
{
v4 = *v3;
}
else
{
v5 = getlogin();
if ( v5 || (v5 = getenv("USER")) != 0 || (v5 = getenv("LOGNAME")) != 0 )
{
v4 = (const char *)v5;
}
else
{
v6 = getenv("LOGIN");
v4 = "UNKNOWN_USER";
if ( v6 )
v4 = (const char *)v6;
}
}
return ma_strmake(a1, v4, 512LL);
}
else
{
strcpy(a1, "root");
}
return result;
}
|
read_user_name:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x001142a0
TEST EAX,EAX
JZ 0x001277ff
CALL 0x001142a0
MOV EDI,EAX
CALL 0x00114550
TEST RAX,RAX
JZ 0x00127810
MOV RSI,qword ptr [RAX]
JMP 0x0012783f
LAB_001277ff:
MOV byte ptr [RBX + 0x4],0x0
MOV dword ptr [RBX],0x746f6f72
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00127810:
CALL 0x00114490
TEST RAX,RAX
JNZ 0x0012783c
LEA RDI,[0x14b7de]
CALL 0x001145b0
TEST RAX,RAX
JNZ 0x0012783c
LEA RDI,[0x14b7c8]
CALL 0x001145b0
TEST RAX,RAX
JZ 0x00127852
LAB_0012783c:
MOV RSI,RAX
LAB_0012783f:
MOV EDX,0x200
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001367b7
LAB_00127852:
LEA RDI,[0x14b7d0]
CALL 0x001145b0
TEST RAX,RAX
LEA RSI,[0x14b7d6]
CMOVNZ RSI,RAX
JMP 0x0012783f
|
void read_user_name(int4 *param_1)
{
__uid_t _Var1;
passwd *ppVar2;
char *pcVar3;
char *pcVar4;
_Var1 = geteuid();
if (_Var1 != 0) {
_Var1 = geteuid();
ppVar2 = getpwuid(_Var1);
if (ppVar2 == (passwd *)0x0) {
pcVar3 = getlogin();
if (((pcVar3 == (char *)0x0) && (pcVar3 = getenv("USER"), pcVar3 == (char *)0x0)) &&
(pcVar3 = getenv("LOGNAME"), pcVar3 == (char *)0x0)) {
pcVar4 = getenv("LOGIN");
pcVar3 = "UNKNOWN_USER";
if (pcVar4 != (char *)0x0) {
pcVar3 = pcVar4;
}
}
}
else {
pcVar3 = ppVar2->pw_name;
}
ma_strmake(param_1,pcVar3,0x200);
return;
}
*(int1 *)(param_1 + 1) = 0;
*param_1 = 0x746f6f72;
return;
}
|
|
18,608
|
exchange_int128s
|
bluesky950520[P]quickjs/cutils.c
|
static void exchange_int128s(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
for (size /= sizeof(uint64_t) * 2; size-- != 0; ap += 2, bp += 2) {
uint64_t t = ap[0];
uint64_t u = ap[1];
ap[0] = bp[0];
ap[1] = bp[1];
bp[0] = t;
bp[1] = u;
}
}
|
O0
|
c
|
exchange_int128s:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x18(%rsp), %rax
shrq $0x4, %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rsp)
cmpq $0x0, %rax
je 0x21261
movq -0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rsp)
movq -0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rsp)
movq -0x28(%rsp), %rax
movq (%rax), %rcx
movq -0x20(%rsp), %rax
movq %rcx, (%rax)
movq -0x28(%rsp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rsp), %rcx
movq -0x28(%rsp), %rax
movq %rcx, (%rax)
movq -0x38(%rsp), %rcx
movq -0x28(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rsp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rsp)
movq -0x28(%rsp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rsp)
jmp 0x211d1
retq
nopw %cs:(%rax,%rax)
|
exchange_int128s:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_18], rdx
mov rax, [rsp+var_8]
mov [rsp+var_20], rax
mov rax, [rsp+var_10]
mov [rsp+var_28], rax
mov rax, [rsp+var_18]
shr rax, 4
mov [rsp+var_18], rax
loc_211D1:
mov rax, [rsp+var_18]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_18], rcx
cmp rax, 0
jz short locret_21261
mov rax, [rsp+var_20]
mov rax, [rax]
mov [rsp+var_30], rax
mov rax, [rsp+var_20]
mov rax, [rax+8]
mov [rsp+var_38], rax
mov rax, [rsp+var_28]
mov rcx, [rax]
mov rax, [rsp+var_20]
mov [rax], rcx
mov rax, [rsp+var_28]
mov rcx, [rax+8]
mov rax, [rsp+var_20]
mov [rax+8], rcx
mov rcx, [rsp+var_30]
mov rax, [rsp+var_28]
mov [rax], rcx
mov rcx, [rsp+var_38]
mov rax, [rsp+var_28]
mov [rax+8], rcx
mov rax, [rsp+var_20]
add rax, 10h
mov [rsp+var_20], rax
mov rax, [rsp+var_28]
add rax, 10h
mov [rsp+var_28], rax
jmp loc_211D1
locret_21261:
retn
|
long long exchange_int128s(long long *a1, long long *a2, unsigned long long a3)
{
long long result; // rax
long long v4; // [rsp+0h] [rbp-38h]
long long v5; // [rsp+8h] [rbp-30h]
unsigned long long v8; // [rsp+20h] [rbp-18h]
v8 = a3 >> 4;
while ( 1 )
{
result = v8--;
if ( !result )
break;
v5 = *a1;
v4 = a1[1];
*a1 = *a2;
a1[1] = a2[1];
*a2 = v5;
a2[1] = v4;
a1 += 2;
a2 += 2;
}
return result;
}
|
exchange_int128s:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV qword ptr [RSP + -0x18],RDX
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x18]
SHR RAX,0x4
MOV qword ptr [RSP + -0x18],RAX
LAB_001211d1:
MOV RAX,qword ptr [RSP + -0x18]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + -0x18],RCX
CMP RAX,0x0
JZ 0x00121261
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + -0x30],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + -0x38],RAX
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + -0x30]
MOV RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + -0x20]
ADD RAX,0x10
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x28]
ADD RAX,0x10
MOV qword ptr [RSP + -0x28],RAX
JMP 0x001211d1
LAB_00121261:
RET
|
void exchange_int128s(int8 *param_1,int8 *param_2,ulong param_3)
{
int8 uVar1;
int8 uVar2;
int8 *local_28;
int8 *local_20;
ulong local_18;
local_28 = param_2;
local_20 = param_1;
local_18 = param_3 >> 4;
while (local_18 != 0) {
uVar1 = *local_20;
uVar2 = local_20[1];
*local_20 = *local_28;
local_20[1] = local_28[1];
*local_28 = uVar1;
local_28[1] = uVar2;
local_20 = local_20 + 2;
local_28 = local_28 + 2;
local_18 = local_18 - 1;
}
return;
}
|
|
18,609
|
exchange_int128s
|
bluesky950520[P]quickjs/cutils.c
|
static void exchange_int128s(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
for (size /= sizeof(uint64_t) * 2; size-- != 0; ap += 2, bp += 2) {
uint64_t t = ap[0];
uint64_t u = ap[1];
ap[0] = bp[0];
ap[1] = bp[1];
bp[0] = t;
bp[1] = u;
}
}
|
O1
|
c
|
exchange_int128s:
cmpq $0x10, %rdx
jb 0x1c8d8
shrq $0x4, %rdx
xorl %eax, %eax
movq (%rsi,%rax), %rcx
movups (%rdi,%rax), %xmm0
movq %rcx, (%rdi,%rax)
movq 0x8(%rsi,%rax), %rcx
movq %rcx, 0x8(%rdi,%rax)
movups %xmm0, (%rsi,%rax)
addq $0x10, %rax
decq %rdx
jne 0x1c8b5
retq
|
exchange_int128s:
cmp rdx, 10h
jb short locret_1C8D8
shr rdx, 4
xor eax, eax
loc_1C8B5:
mov rcx, [rsi+rax]
movups xmm0, xmmword ptr [rdi+rax]
mov [rdi+rax], rcx
mov rcx, [rsi+rax+8]
mov [rdi+rax+8], rcx
movups xmmword ptr [rsi+rax], xmm0
add rax, 10h
dec rdx
jnz short loc_1C8B5
locret_1C8D8:
retn
|
void exchange_int128s(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rdx
long long v4; // rax
__int128 v5; // xmm0
if ( a3 >= 0x10 )
{
v3 = a3 >> 4;
v4 = 0LL;
do
{
v5 = *(_OWORD *)(a1 + v4);
*(_QWORD *)(a1 + v4) = *(_QWORD *)(a2 + v4);
*(_QWORD *)(a1 + v4 + 8) = *(_QWORD *)(a2 + v4 + 8);
*(_OWORD *)(a2 + v4) = v5;
v4 += 16LL;
--v3;
}
while ( v3 );
}
}
|
exchange_int128s:
CMP RDX,0x10
JC 0x0011c8d8
SHR RDX,0x4
XOR EAX,EAX
LAB_0011c8b5:
MOV RCX,qword ptr [RSI + RAX*0x1]
MOVUPS XMM0,xmmword ptr [RDI + RAX*0x1]
MOV qword ptr [RDI + RAX*0x1],RCX
MOV RCX,qword ptr [RSI + RAX*0x1 + 0x8]
MOV qword ptr [RDI + RAX*0x1 + 0x8],RCX
MOVUPS xmmword ptr [RSI + RAX*0x1],XMM0
ADD RAX,0x10
DEC RDX
JNZ 0x0011c8b5
LAB_0011c8d8:
RET
|
void exchange_int128s(long param_1,long param_2,ulong param_3)
{
int8 uVar1;
int8 uVar2;
long lVar3;
if (0xf < param_3) {
param_3 = param_3 >> 4;
lVar3 = 0;
do {
uVar1 = *(int8 *)(param_1 + lVar3);
uVar2 = ((int8 *)(param_1 + lVar3))[1];
*(int8 *)(param_1 + lVar3) = *(int8 *)(param_2 + lVar3);
*(int8 *)(param_1 + 8 + lVar3) = *(int8 *)(param_2 + 8 + lVar3);
*(int8 *)(param_2 + lVar3) = uVar1;
((int8 *)(param_2 + lVar3))[1] = uVar2;
lVar3 = lVar3 + 0x10;
param_3 = param_3 - 1;
} while (param_3 != 0);
}
return;
}
|
|
18,610
|
exchange_int128s
|
bluesky950520[P]quickjs/cutils.c
|
static void exchange_int128s(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
for (size /= sizeof(uint64_t) * 2; size-- != 0; ap += 2, bp += 2) {
uint64_t t = ap[0];
uint64_t u = ap[1];
ap[0] = bp[0];
ap[1] = bp[1];
bp[0] = t;
bp[1] = u;
}
}
|
O2
|
c
|
exchange_int128s:
shrq $0x4, %rdx
xorl %eax, %eax
subq $0x1, %rdx
jb 0x16ee8
movq (%rsi,%rax), %rcx
movups (%rdi,%rax), %xmm0
movq %rcx, (%rdi,%rax)
movq 0x8(%rsi,%rax), %rcx
movq %rcx, 0x8(%rdi,%rax)
movups %xmm0, (%rsi,%rax)
addq $0x10, %rax
jmp 0x16ec2
retq
|
exchange_int128s:
shr rdx, 4
xor eax, eax
loc_16EC2:
sub rdx, 1
jb short locret_16EE8
mov rcx, [rsi+rax]
movups xmm0, xmmword ptr [rdi+rax]
mov [rdi+rax], rcx
mov rcx, [rsi+rax+8]
mov [rdi+rax+8], rcx
movups xmmword ptr [rsi+rax], xmm0
add rax, 10h
jmp short loc_16EC2
locret_16EE8:
retn
|
long long exchange_int128s(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rdx
long long result; // rax
__int128 v6; // xmm0
v3 = a3 >> 4;
for ( result = 0LL; v3-- != 0; result += 16LL )
{
v6 = *(_OWORD *)(a1 + result);
*(_QWORD *)(a1 + result) = *(_QWORD *)(a2 + result);
*(_QWORD *)(a1 + result + 8) = *(_QWORD *)(a2 + result + 8);
*(_OWORD *)(a2 + result) = v6;
}
return result;
}
|
exchange_int128s:
SHR RDX,0x4
XOR EAX,EAX
LAB_00116ec2:
SUB RDX,0x1
JC 0x00116ee8
MOV RCX,qword ptr [RSI + RAX*0x1]
MOVUPS XMM0,xmmword ptr [RDI + RAX*0x1]
MOV qword ptr [RDI + RAX*0x1],RCX
MOV RCX,qword ptr [RSI + RAX*0x1 + 0x8]
MOV qword ptr [RDI + RAX*0x1 + 0x8],RCX
MOVUPS xmmword ptr [RSI + RAX*0x1],XMM0
ADD RAX,0x10
JMP 0x00116ec2
LAB_00116ee8:
RET
|
void exchange_int128s(long param_1,long param_2,ulong param_3)
{
int8 uVar1;
int8 uVar2;
long lVar3;
bool bVar4;
param_3 = param_3 >> 4;
lVar3 = 0;
while (bVar4 = param_3 != 0, param_3 = param_3 - 1, bVar4) {
uVar1 = *(int8 *)(param_1 + lVar3);
uVar2 = ((int8 *)(param_1 + lVar3))[1];
*(int8 *)(param_1 + lVar3) = *(int8 *)(param_2 + lVar3);
*(int8 *)(param_1 + 8 + lVar3) = *(int8 *)(param_2 + 8 + lVar3);
*(int8 *)(param_2 + lVar3) = uVar1;
((int8 *)(param_2 + lVar3))[1] = uVar2;
lVar3 = lVar3 + 0x10;
}
return;
}
|
|
18,611
|
stbi__loadf_main(stbi__context*, int*, int*, int*, int)
|
SDL3Lite/dependencies/stb_image.h
|
static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
unsigned char *data;
#ifndef STBI_NO_HDR
if (stbi__hdr_test(s)) {
stbi__result_info ri;
float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri);
if (hdr_data)
stbi__float_postprocess(hdr_data,x,y,comp,req_comp);
return hdr_data;
}
#endif
data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp);
if (data)
return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
}
|
O3
|
c
|
stbi__loadf_main(stbi__context*, int*, int*, int*, int):
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movl %r8d, 0x2c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl 0x2c(%rsp), %r8d
callq 0x282a0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x28b81
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x2c(%rsp)
je 0x28b59
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x28b64
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %esi
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %ecx
callq 0x2bf90
movq %rax, 0x50(%rsp)
jmp 0x28b9d
leaq 0xc524(%rip), %rdi # 0x350ac
callq 0x28190
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw (%rax,%rax)
|
_ZL16stbi__loadf_mainP13stbi__contextPiS1_S1_i:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_20], rdx
mov [rsp+58h+var_28], rcx
mov [rsp+58h+var_2C], r8d
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_20]
mov rcx, [rsp+58h+var_28]
mov r8d, [rsp+58h+var_2C]
call _ZL31stbi__load_and_postprocess_8bitP13stbi__contextPiS1_S1_i; stbi__load_and_postprocess_8bit(stbi__context *,int *,int *,int *,int)
mov [rsp+58h+var_38], rax
cmp [rsp+58h+var_38], 0
jz short loc_28B81
mov rax, [rsp+58h+var_38]
mov [rsp+58h+var_48], rax
mov rax, [rsp+58h+var_18]
mov eax, [rax]
mov [rsp+58h+var_40], eax
mov rax, [rsp+58h+var_20]
mov eax, [rax]
mov [rsp+58h+var_3C], eax
cmp [rsp+58h+var_2C], 0
jz short loc_28B59
mov eax, [rsp+58h+var_2C]
mov [rsp+58h+var_4C], eax
jmp short loc_28B64
loc_28B59:
mov rax, [rsp+58h+var_28]
mov eax, [rax]
mov [rsp+58h+var_4C], eax
loc_28B64:
mov edx, [rsp+58h+var_3C]; int
mov esi, [rsp+58h+var_40]; int
mov rdi, [rsp+58h+var_48]; unsigned __int8 *
mov ecx, [rsp+58h+var_4C]; int
call _ZL16stbi__ldr_to_hdrPhiii; stbi__ldr_to_hdr(uchar *,int,int,int)
mov [rsp+58h+var_8], rax
jmp short loc_28B9D
loc_28B81:
lea rdi, aUnknownImageTy; "unknown image type"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+58h+var_8], rax
loc_28B9D:
mov rax, [rsp+58h+var_8]
add rsp, 58h
retn
|
long long stbi__loadf_main(long long a1, int *a2, int *a3, int *a4, int a5)
{
int v7; // [rsp+18h] [rbp-40h]
int v8; // [rsp+1Ch] [rbp-3Ch]
unsigned __int8 *v9; // [rsp+20h] [rbp-38h]
v9 = (unsigned __int8 *)stbi__load_and_postprocess_8bit(a1, a2, a3, a4, a5);
if ( v9 )
{
v7 = *a2;
v8 = *a3;
if ( a5 )
return stbi__ldr_to_hdr(v9, v7, v8, a5);
else
return stbi__ldr_to_hdr(v9, v7, v8, *a4);
}
else
{
stbi__err("unknown image type");
return 0LL;
}
}
|
stbi__loadf_main:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x30],RCX
MOV dword ptr [RSP + 0x2c],R8D
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x30]
MOV R8D,dword ptr [RSP + 0x2c]
CALL 0x001282a0
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00128b81
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x18],EAX
MOV RAX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x2c],0x0
JZ 0x00128b59
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00128b64
LAB_00128b59:
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0xc],EAX
LAB_00128b64:
MOV EDX,dword ptr [RSP + 0x1c]
MOV ESI,dword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
CALL 0x0012bf90
MOV qword ptr [RSP + 0x50],RAX
JMP 0x00128b9d
LAB_00128b81:
LEA RDI,[0x1350ac]
CALL 0x00128190
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x50],RAX
LAB_00128b9d:
MOV RAX,qword ptr [RSP + 0x50]
ADD RSP,0x58
RET
|
/* stbi__loadf_main(stbi__context*, int*, int*, int*, int) */
int8
stbi__loadf_main(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5)
{
uchar *puVar1;
int local_4c;
int8 local_8;
puVar1 = (uchar *)stbi__load_and_postprocess_8bit(param_1,param_2,param_3,param_4,param_5);
if (puVar1 == (uchar *)0x0) {
stbi__err("unknown image type");
local_8 = 0;
}
else {
local_4c = param_5;
if (param_5 == 0) {
local_4c = *param_4;
}
local_8 = stbi__ldr_to_hdr(puVar1,*param_2,*param_3,local_4c);
}
return local_8;
}
|
|
18,612
|
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};
}
|
O2
|
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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
leaq 0x18(%rdi), %r13
cmpq 0x8(%r14), %rbx
je 0x6b7bf
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x6b7e8
testb %al, %al
jne 0x6b7d9
addq $0x60, %rbx
jmp 0x6b7a1
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x6b822
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x6b7db
xorl %edx, %edx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
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 r15
push r14
push r13
push r12
push rbx
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
lea r13, [rdi+18h]
loc_6B7A1:
cmp rbx, [r14+8]
jz short loc_6B7BF
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_6B7D9
add rbx, 60h ; '`'
jmp short loc_6B7A1
loc_6B7BF:
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_6B7DB
loc_6B7D9:
xor edx, edx
loc_6B7DB:
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
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 i; // rbx
for ( i = *a1; i != a1[1]; i += 96LL )
{
if ( (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,
i,
a2) )
return i;
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::emplace_back<std::string const&,minja::Value>(
a1,
a2,
a3);
return a1[1] - 96;
}
|
_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 R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
LEA R13,[RDI + 0x18]
LAB_0016b7a1:
CMP RBX,qword ptr [R14 + 0x8]
JZ 0x0016b7bf
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R12
CALL 0x0016b7e8
TEST AL,AL
JNZ 0x0016b7d9
ADD RBX,0x60
JMP 0x0016b7a1
LAB_0016b7bf:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0016b822
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x0016b7db
LAB_0016b7d9:
XOR EDX,EDX
LAB_0016b7db:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
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;
int1 auVar4 [16];
pbVar3 = *(basic_json **)param_1;
do {
if (pbVar3 == *(basic_json **)(param_1 + 8)) {
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::emplace_back<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_0016b7db:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = pbVar3;
return auVar4;
}
cVar1 = std::equal_to<void>::operator()((equal_to<void> *)(param_1 + 0x18),pbVar3,param_2);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_0016b7db;
}
pbVar3 = pbVar3 + 0x60;
} while( true );
}
|
|
18,613
|
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool)
|
monkey531[P]llama/common/common.cpp
|
std::string common_chat_format_single(
const common_chat_template & tmpl,
const std::vector<common_chat_msg> & past_msg,
const common_chat_msg & new_msg,
bool add_ass,
bool use_jinja) {
std::ostringstream ss;
auto fmt_past_msg = past_msg.empty() ? "" : common_chat_apply_template(tmpl, past_msg, false, use_jinja);
std::vector<common_chat_msg> chat_new(past_msg);
// if the past_msg ends with a newline, we must preserve it in the formatted version
if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') {
ss << "\n";
};
// format chat with new_msg
chat_new.push_back(new_msg);
auto fmt_new_msg = common_chat_apply_template(tmpl, chat_new, add_ass, use_jinja);
// get the diff part
ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size());
return ss.str();
}
|
O3
|
cpp
|
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp # imm = 0x1F8
movl %r9d, %r15d
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%rsp), %rdi
callq 0x1a9d0
movq (%r13), %rax
movzbl %r15b, %r15d
cmpq 0x8(%r13), %rax
je 0x27b1b
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movl %r15d, %r8d
callq 0x27374
jmp 0x27b38
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x845a3(%rip), %rdx # 0xac0ce
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x20d82
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x2fbc6
testb %bpl, %bpl
je 0x27b79
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x27b79
movq 0x8(%rsp), %rcx
cmpb $0xa, -0x1(%rcx,%rax)
jne 0x27b79
leaq 0x84566(%rip), %rsi # 0xac0cd
leaq 0x80(%rsp), %rdi
movl $0x1, %edx
callq 0x1a870
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0x2fc5e
movzbl %bpl, %ecx
leaq 0x60(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movq %r14, %rsi
movl %r15d, %r8d
callq 0x27374
movq 0x10(%rsp), %rdx
leaq 0x60(%rsp), %rsi
movq 0x8(%rsi), %rcx
subq %rdx, %rcx
leaq 0x28(%rsp), %rdi
callq 0x1a7a0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0x1a870
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27bec
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a740
leaq 0x88(%rsp), %rsi
movq %rbx, %rdi
callq 0x1abc0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27c17
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a740
leaq 0x48(%rsp), %rdi
callq 0x2fc8a
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27c3c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a740
movq 0xbb345(%rip), %rsi # 0xe2f88
leaq 0x80(%rsp), %rdi
callq 0x1a3e0
leaq 0xf0(%rsp), %rdi
callq 0x1a220
movq %rbx, %rax
addq $0x1f8, %rsp # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27c74
movq %rax, %rbx
jmp 0x27cea
jmp 0x27c9b
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27c9e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x27c9e
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27cc5
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x27cc5
jmp 0x27cc2
movq %rax, %rbx
jmp 0x27ccf
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2fc8a
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27cea
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a740
movq 0xbb297(%rip), %rsi # 0xe2f88
leaq 0x80(%rsp), %rdi
callq 0x1a3e0
leaq 0xf0(%rsp), %rdi
callq 0x1a220
movq %rbx, %rdi
callq 0x1ad30
|
_Z25common_chat_format_singleB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EERKS4_bb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1F8h
mov r15d, r9d
mov ebp, r8d
mov r12, rcx
mov r13, rdx
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+228h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [r13+0]
movzx r15d, r15b
cmp rax, [r13+8]
jz short loc_27B1B
lea rdi, [rsp+228h+var_220]
mov rsi, r14
mov rdx, r13
xor ecx, ecx
mov r8d, r15d
call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool)
jmp short loc_27B38
loc_27B1B:
lea rax, [rsp+228h+var_210]
mov [rax-10h], rax
lea rdx, aSUnableToOpenT+2Bh; ""
lea rdi, [rsp+228h+var_220]
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_27B38:
lea rdi, [rsp+228h+var_1E0]
mov rsi, r13
call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ERKS2_; std::vector<common_chat_msg>::vector(std::vector<common_chat_msg> const&)
test bpl, bpl
jz short loc_27B79
mov rax, [rsp+228h+var_218]
test rax, rax
jz short loc_27B79
mov rcx, [rsp+228h+var_220]
cmp byte ptr [rcx+rax-1], 0Ah
jnz short loc_27B79
lea rsi, aSUnableToOpenT+2Ah; "\n"
lea rdi, [rsp+228h+var_1A8]
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_27B79:
lea rdi, [rsp+228h+var_1E0]
mov rsi, r12
call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&)
movzx ecx, bpl
lea rdi, [rsp+228h+var_1C8]
lea rdx, [rsp+228h+var_1E0]
mov rsi, r14
mov r8d, r15d
call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool)
mov rdx, [rsp+228h+var_218]
lea rsi, [rsp+228h+var_1C8]
mov rcx, [rsi+8]
sub rcx, rdx
lea rdi, [rsp+228h+var_200]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rsp+228h+var_200]
mov rdx, [rsp+228h+var_1F8]
lea rdi, [rsp+228h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+228h+var_1F0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_27BEC
mov rsi, [rsp+228h+var_1F0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27BEC:
lea rsi, [rsp+228h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rax, [rsp+228h+var_1B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_27C17
mov rsi, [rsp+228h+var_1B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27C17:
lea rdi, [rsp+228h+var_1E0]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
lea rax, [rsp+228h+var_210]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_27C3C
mov rsi, [rsp+228h+var_210]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27C3C:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+228h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+228h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 1F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_27C74:
mov rbx, rax
jmp short loc_27CEA
jmp short loc_27C9B
mov rbx, rax
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_27C9E
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_27C9E
loc_27C9B:
mov rbx, rax
loc_27C9E:
lea rax, [rsp+arg_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_27CC5
mov rsi, [rsp+arg_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_27CC5
jmp short loc_27CC2
mov rbx, rax
jmp short loc_27CCF
loc_27CC2:
mov rbx, rax
loc_27CC5:
lea rdi, [rsp+arg_40]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
loc_27CCF:
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_27CEA
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27CEA:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_78]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_E8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long common_chat_format_single[abi:cxx11](
long long a1,
common_chat_inputs *a2,
long long *a3,
long long a4,
unsigned __int8 a5,
unsigned __int8 a6)
{
char *v11; // [rsp+8h] [rbp-220h] BYREF
long long v12; // [rsp+10h] [rbp-218h]
_QWORD v13[2]; // [rsp+18h] [rbp-210h] BYREF
void *v14[2]; // [rsp+28h] [rbp-200h] BYREF
long long v15; // [rsp+38h] [rbp-1F0h] BYREF
long long v16[3]; // [rsp+48h] [rbp-1E0h] BYREF
void *v17[2]; // [rsp+60h] [rbp-1C8h] BYREF
long long v18; // [rsp+70h] [rbp-1B8h] BYREF
_BYTE v19[8]; // [rsp+80h] [rbp-1A8h] BYREF
_BYTE v20[104]; // [rsp+88h] [rbp-1A0h] BYREF
_BYTE v21[312]; // [rsp+F0h] [rbp-138h] BYREF
std::ostringstream::basic_ostringstream(v19);
if ( *a3 == a3[1] )
{
v11 = (char *)v13;
std::string::_M_construct<char const*>((long long)&v11, "", (long long)"");
}
else
{
common_chat_apply_template[abi:cxx11](&v11, a2, a3, 0, a6);
}
std::vector<common_chat_msg>::vector(v16, a3);
if ( a5 && v12 && v11[v12 - 1] == 10 )
std::__ostream_insert<char,std::char_traits<char>>(v19, "\n", 1LL);
std::vector<common_chat_msg>::push_back(v16, a4);
common_chat_apply_template[abi:cxx11](v17, a2, v16, a5, a6);
std::string::substr(v14, v17, v12, (char *)v17[1] - v12);
std::__ostream_insert<char,std::char_traits<char>>(v19, v14[0], v14[1]);
if ( v14[0] != &v15 )
operator delete(v14[0], v15 + 1);
std::stringbuf::str(a1, v20);
if ( v17[0] != &v18 )
operator delete(v17[0], v18 + 1);
std::vector<common_chat_msg>::~vector(v16);
if ( v11 != (char *)v13 )
operator delete(v11, v13[0] + 1LL);
std::ostringstream::~ostringstream(v19, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v21);
return a1;
}
|
common_chat_format_single[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1f8
MOV R15D,R9D
MOV EBP,R8D
MOV R12,RCX
MOV R13,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x80]
CALL 0x0011a9d0
MOV RAX,qword ptr [R13]
MOVZX R15D,R15B
CMP RAX,qword ptr [R13 + 0x8]
JZ 0x00127b1b
LAB_00127b04:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,R13
XOR ECX,ECX
MOV R8D,R15D
CALL 0x00127374
JMP 0x00127b38
LAB_00127b1b:
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
LAB_00127b24:
LEA RDX,[0x1ac0ce]
LEA RDI,[RSP + 0x8]
MOV RSI,RDX
CALL 0x00120d82
LAB_00127b38:
LEA RDI,[RSP + 0x48]
MOV RSI,R13
CALL 0x0012fbc6
TEST BPL,BPL
JZ 0x00127b79
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00127b79
MOV RCX,qword ptr [RSP + 0x8]
CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa
JNZ 0x00127b79
LAB_00127b60:
LEA RSI,[0x1ac0cd]
LEA RDI,[RSP + 0x80]
MOV EDX,0x1
CALL 0x0011a870
LAB_00127b79:
LEA RDI,[RSP + 0x48]
MOV RSI,R12
CALL 0x0012fc5e
LAB_00127b86:
MOVZX ECX,BPL
LEA RDI,[RSP + 0x60]
LEA RDX,[RSP + 0x48]
MOV RSI,R14
MOV R8D,R15D
CALL 0x00127374
MOV RDX,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x60]
MOV RCX,qword ptr [RSI + 0x8]
SUB RCX,RDX
LAB_00127bb0:
LEA RDI,[RSP + 0x28]
CALL 0x0011a7a0
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LAB_00127bc4:
LEA RDI,[RSP + 0x80]
CALL 0x0011a870
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00127bec
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a740
LAB_00127bec:
LEA RSI,[RSP + 0x88]
LAB_00127bf4:
MOV RDI,RBX
CALL 0x0011abc0
LAB_00127bfc:
LEA RAX,[RSP + 0x70]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00127c17
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a740
LAB_00127c17:
LEA RDI,[RSP + 0x48]
CALL 0x0012fc8a
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00127c3c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a740
LAB_00127c3c:
MOV RSI,qword ptr [0x001e2f88]
LEA RDI,[RSP + 0x80]
CALL 0x0011a3e0
LEA RDI,[RSP + 0xf0]
CALL 0x0011a220
MOV RAX,RBX
ADD RSP,0x1f8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg,
std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */
chat_template *
common_chat_format_single_abi_cxx11_
(chat_template *param_1,vector *param_2,common_chat_msg *param_3,bool param_4,bool param_5
)
{
int7 in_register_00000009;
long *local_220;
long local_218;
long local_210 [2];
long *local_200;
long local_1f8;
long local_1f0 [2];
vector<common_chat_msg,std::allocator<common_chat_msg>> local_1e0 [24];
long *local_1c8 [2];
long local_1b8 [2];
ostringstream local_1a8 [112];
ios_base local_138 [264];
std::__cxx11::ostringstream::ostringstream(local_1a8);
if (*(long *)param_3 == *(long *)(param_3 + 8)) {
local_220 = local_210;
/* try { // try from 00127b24 to 00127b37 has its CatchHandler @ 00127c72 */
std::__cxx11::string::_M_construct<char_const*>(&local_220,"");
}
else {
/* try { // try from 00127b04 to 00127b18 has its CatchHandler @ 00127c74 */
common_chat_apply_template_abi_cxx11_
((chat_template *)&local_220,param_2,SUB81(param_3,0),false);
}
/* try { // try from 00127b38 to 00127b44 has its CatchHandler @ 00127cbd */
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector(local_1e0,(vector *)param_3);
if (((param_5) && (local_218 != 0)) && (*(char *)((long)local_220 + local_218 + -1) == '\n')) {
/* try { // try from 00127b60 to 00127b85 has its CatchHandler @ 00127cc2 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,"\n",1);
}
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back
(local_1e0,(common_chat_msg *)CONCAT71(in_register_00000009,param_4));
/* try { // try from 00127b86 to 00127b9e has its CatchHandler @ 00127cbb */
common_chat_apply_template_abi_cxx11_
((chat_template *)local_1c8,param_2,SUB81(local_1e0,0),param_5);
/* try { // try from 00127bb0 to 00127bb9 has its CatchHandler @ 00127c9b */
std::__cxx11::string::substr((ulong)&local_200,(ulong)local_1c8);
/* try { // try from 00127bc4 to 00127bd0 has its CatchHandler @ 00127c7b */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_200,local_1f8);
if (local_200 != local_1f0) {
operator_delete(local_200,local_1f0[0] + 1);
}
/* try { // try from 00127bf4 to 00127bfb has its CatchHandler @ 00127c79 */
std::__cxx11::stringbuf::str();
if (local_1c8[0] != local_1b8) {
operator_delete(local_1c8[0],local_1b8[0] + 1);
}
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_1e0);
if (local_220 != local_210) {
operator_delete(local_220,local_210[0] + 1);
}
std::__cxx11::ostringstream::~ostringstream(local_1a8);
std::ios_base::~ios_base(local_138);
return param_1;
}
|
|
18,614
|
my_mb_wc_euc_kr
|
eloqsql/strings/ctype-euc_kr.c
|
static int
my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
}
|
O3
|
c
|
my_mb_wc_euc_kr:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xae0ed
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0xae0ac
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xae0ed
movzbl %dil, %ecx
xorl %eax, %eax
cmpl $0x80, %ecx
je 0xae0ed
cmpl $0xff, %ecx
je 0xae0ed
movzbl 0x1(%rdx), %edx
leal 0x1(%rdx), %edi
cmpb $-0x7f, %dil
ja 0xae0ee
movl %edx, %edi
andb $-0x21, %dil
addb $-0x5b, %dil
cmpb $-0x1a, %dil
jae 0xae0ee
retq
pushq %rbp
movq %rsp, %rbp
shll $0x8, %ecx
leal (%rcx,%rdx), %eax
addl $0xffff7ebf, %eax # imm = 0xFFFF7EBF
cmpl $0x47bd, %eax # imm = 0x47BD
ja 0xae10f
movl %eax, %eax
leaq 0x8d473(%rip), %rcx # 0x13b580
jmp 0xae128
orl %edx, %ecx
addl $0xffff355f, %ecx # imm = 0xFFFF355F
cmpl $0x335e, %ecx # imm = 0x335E
jae 0xae141
movl %ecx, %eax
leaq 0x963d8(%rip), %rcx # 0x144500
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0xae14d
jmp 0xae148
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
|
my_mb_wc_euc_kr:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_AE0ED
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_AE0AC
mov [rsi], rdi
mov eax, 1
retn
loc_AE0AC:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_AE0ED
movzx ecx, dil
xor eax, eax
cmp ecx, 80h
jz short locret_AE0ED
cmp ecx, 0FFh
jz short locret_AE0ED
movzx edx, byte ptr [rdx+1]
lea edi, [rdx+1]
cmp dil, 81h
ja short loc_AE0EE
mov edi, edx
and dil, 0DFh
add dil, 0A5h
cmp dil, 0E6h
jnb short loc_AE0EE
locret_AE0ED:
retn
loc_AE0EE:
push rbp
mov rbp, rsp
shl ecx, 8
lea eax, [rcx+rdx]
add eax, 0FFFF7EBFh
cmp eax, 47BDh
ja short loc_AE10F
mov eax, eax
lea rcx, tab_ksc5601_uni0
jmp short loc_AE128
loc_AE10F:
or ecx, edx
add ecx, 0FFFF355Fh
cmp ecx, 335Eh
jnb short loc_AE141
mov eax, ecx
lea rcx, tab_ksc5601_uni1
loc_AE128:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_AE14D
jmp short loc_AE148
loc_AE141:
mov qword ptr [rsi], 0
loc_AE148:
mov eax, 0FFFFFFFEh
loc_AE14D:
pop rbp
retn
|
long long my_mb_wc_euc_kr(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // edx
int v7; // ecx
long long v8; // rax
unsigned __int16 *v9; // rcx
unsigned int v10; // ecx
long long v11; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) > 0x81u || (unsigned __int8)((v6 & 0xDF) - 91) >= 0xE6u )
{
v7 = (unsigned __int8)v5 << 8;
LODWORD(v8) = v7 + v6 - 33089;
if ( (unsigned int)v8 > 0x47BD )
{
v10 = (v6 | v7) - 51873;
if ( v10 >= 0x335E )
{
*a2 = 0LL;
return 4294967294LL;
}
v8 = v10;
v9 = (unsigned __int16 *)&tab_ksc5601_uni1;
}
else
{
v8 = (unsigned int)v8;
v9 = (unsigned __int16 *)&tab_ksc5601_uni0;
}
v11 = v9[v8];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
|
my_mb_wc_euc_kr:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001ae0ed
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001ae0ac
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001ae0ac:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001ae0ed
MOVZX ECX,DIL
XOR EAX,EAX
CMP ECX,0x80
JZ 0x001ae0ed
CMP ECX,0xff
JZ 0x001ae0ed
MOVZX EDX,byte ptr [RDX + 0x1]
LEA EDI,[RDX + 0x1]
CMP DIL,0x81
JA 0x001ae0ee
MOV EDI,EDX
AND DIL,0xdf
ADD DIL,0xa5
CMP DIL,0xe6
JNC 0x001ae0ee
LAB_001ae0ed:
RET
LAB_001ae0ee:
PUSH RBP
MOV RBP,RSP
SHL ECX,0x8
LEA EAX,[RCX + RDX*0x1]
ADD EAX,0xffff7ebf
CMP EAX,0x47bd
JA 0x001ae10f
MOV EAX,EAX
LEA RCX,[0x23b580]
JMP 0x001ae128
LAB_001ae10f:
OR ECX,EDX
ADD ECX,0xffff355f
CMP ECX,0x335e
JNC 0x001ae141
MOV EAX,ECX
LEA RCX,[0x244500]
LAB_001ae128:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x001ae14d
JMP 0x001ae148
LAB_001ae141:
MOV qword ptr [RSI],0x0
LAB_001ae148:
MOV EAX,0xfffffffe
LAB_001ae14d:
POP RBP
RET
|
int8 my_mb_wc_euc_kr(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
uint uVar4;
int1 *puVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (bVar1 == 0x80) {
return 0;
}
if (bVar1 == 0xff) {
return 0;
}
bVar2 = param_3[1];
if (((byte)(bVar2 + 1) < 0x82) && ((byte)((bVar2 & 0xdf) + 0xa5) < 0xe6)) {
return 0;
}
uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8141;
if (uVar4 < 0x47be) {
puVar5 = tab_ksc5601_uni0;
}
else {
uVar4 = CONCAT11(bVar1,bVar2) - 0xcaa1;
if (0x335d < uVar4) {
*param_2 = 0;
return 0xfffffffe;
}
puVar5 = tab_ksc5601_uni1;
}
uVar3 = *(ushort *)(puVar5 + (ulong)uVar4 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
|
|
18,615
|
my_demangle_symbols
|
eloqsql/mysys/stacktrace.c
|
static void my_demangle_symbols(char **addrs, int n)
{
int status, i;
char *begin, *end, *demangled;
for (i= 0; i < n; i++)
{
demangled= NULL;
begin= strchr(addrs[i], '(');
end= begin ? strchr(begin, '+') : NULL;
if (begin && end)
{
*begin++= *end++= '\0';
demangled= my_demangle(begin, &status);
if (!demangled || status)
{
demangled= NULL;
begin[-1]= '(';
end[-1]= '+';
}
}
if (demangled)
my_safe_printf_stderr("%s(%s+%s\n", addrs[i], demangled, end);
else
my_safe_printf_stderr("%s\n", addrs[i]);
}
}
|
O0
|
c
|
my_demangle_symbols:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x13294ee
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x28, %esi
callq 0x776a70
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x132941f
movq -0x20(%rbp), %rdi
movl $0x2b, %esi
callq 0x776a70
movq %rax, -0x38(%rbp)
jmp 0x1329427
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x1329427
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1329499
cmpq $0x0, -0x28(%rbp)
je 0x1329499
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x0, (%rax)
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x890550
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x132947f
cmpl $0x0, -0x10(%rbp)
je 0x1329497
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movb $0x28, -0x1(%rax)
movq -0x28(%rbp), %rax
movb $0x2b, -0x1(%rax)
jmp 0x1329499
cmpq $0x0, -0x30(%rbp)
je 0x13294c4
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x17a0cb(%rip), %rdi # 0x14a3586
movb $0x0, %al
callq 0x1329070
jmp 0x13294de
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xc2842(%rip), %rdi # 0x13ebd19
movb $0x0, %al
callq 0x1329070
jmp 0x13294e0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x13293d6
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_demangle_symbols:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_14], 0
loc_13293D6:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_C]
jge loc_13294EE
mov [rbp+var_30], 0
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_14]
mov rdi, [rax+rcx*8]
mov esi, 28h ; '('
call _strchr
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_132941F
mov rdi, [rbp+var_20]
mov esi, 2Bh ; '+'
call _strchr
mov [rbp+var_38], rax
jmp short loc_1329427
loc_132941F:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_1329427:
mov rax, [rbp+var_38]
mov [rbp+var_28], rax
cmp [rbp+var_20], 0
jz short loc_1329499
cmp [rbp+var_28], 0
jz short loc_1329499
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov byte ptr [rax], 0
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
call my_demangle
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_132947F
cmp [rbp+var_10], 0
jz short loc_1329497
loc_132947F:
mov [rbp+var_30], 0
mov rax, [rbp+var_20]
mov byte ptr [rax-1], 28h ; '('
mov rax, [rbp+var_28]
mov byte ptr [rax-1], 2Bh ; '+'
loc_1329497:
jmp short $+2
loc_1329499:
cmp [rbp+var_30], 0
jz short loc_13294C4
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_14]
mov rsi, [rax+rcx*8]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_28]
lea rdi, aSSS_5; "%s(%s+%s\n"
mov al, 0
call my_safe_printf_stderr
jmp short loc_13294DE
loc_13294C4:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_14]
mov rsi, [rax+rcx*8]
lea rdi, aSSS_1+6; "%s\n"
mov al, 0
call my_safe_printf_stderr
loc_13294DE:
jmp short $+2
loc_13294E0:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_13293D6
loc_13294EE:
add rsp, 40h
pop rbp
retn
|
long long my_demangle_symbols(long long a1, int a2)
{
long long result; // rax
_BYTE *v3; // rax
char *v4; // [rsp+8h] [rbp-38h]
char *v5; // [rsp+10h] [rbp-30h]
const char *v6; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
const char *v8; // [rsp+20h] [rbp-20h]
unsigned int i; // [rsp+2Ch] [rbp-14h]
int v10; // [rsp+30h] [rbp-10h] BYREF
int v11; // [rsp+34h] [rbp-Ch]
long long v12; // [rsp+38h] [rbp-8h]
v12 = a1;
v11 = a2;
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= v11 )
break;
v5 = 0LL;
v7 = strchr(*(_QWORD *)(v12 + 8LL * (int)i), 40LL);
if ( v7 )
v4 = (char *)strchr(v7, 43LL);
else
v4 = 0LL;
v6 = v4;
if ( v7 )
{
if ( v4 )
{
v6 = v4 + 1;
*v4 = 0;
v3 = (_BYTE *)v7;
v8 = (const char *)(v7 + 1);
*v3 = 0;
v5 = my_demangle(v8, &v10);
if ( !v5 || v10 )
{
v5 = 0LL;
*((_BYTE *)v8 - 1) = 40;
*v4 = 43;
}
}
}
if ( v5 )
my_safe_printf_stderr((long long)"%s(%s+%s\n", *(const char **)(v12 + 8LL * (int)i), v5, v6);
else
my_safe_printf_stderr((long long)"%s\n", *(const char **)(v12 + 8LL * (int)i));
}
return result;
}
|
ut_new_boot:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x5c0
LEA RAX,[0x1c88ec0]
MOV RAX,qword ptr [RAX]
LEA RDI,[0x14ec20d]
LEA RSI,[0x1c86280]
MOV EDX,0x9
CALL qword ptr [RAX + 0x3d8]
MOV dword ptr [RBP + -0x5a4],0x0
LAB_013293f8:
CMP dword ptr [RBP + -0x5a4],0x3c
JGE 0x0132948d
MOVSXD RCX,dword ptr [RBP + -0x5a4]
LEA RAX,[0x2710e80]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x5c0],RAX
MOVSXD RCX,dword ptr [RBP + -0x5a4]
LEA RAX,[0x1c2a8c0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x5b8],RAX
MOV dword ptr [RBP + -0x5b0],0x0
MOVSXD RCX,dword ptr [RBP + -0x5a4]
LEA RAX,[RBP + -0x5a0]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x5c0]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x5b8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x5b0]
MOV qword ptr [RAX + 0x10],RCX
MOV EAX,dword ptr [RBP + -0x5a4]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5a4],EAX
JMP 0x013293f8
LAB_0132948d:
LEA RAX,[0x1c88ec0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3d8]
LEA RSI,[RBP + -0x5a0]
LEA RDI,[0x14ec20d]
MOV EDX,0x3c
CALL RAX
ADD RSP,0x5c0
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ut_new_boot() */
void ut_new_boot(void)
{
long lVar1;
long lVar2;
uint uStack_5b4;
int local_5ac;
long local_5a8 [180];
(**(code **)(PSI_server + 0x3d8))("innodb",pfs_info,9);
for (local_5ac = 0; local_5ac < 0x3c; local_5ac = local_5ac + 1) {
lVar1 = *(long *)(auto_event_names + (long)local_5ac * 8);
lVar2 = (long)local_5ac;
local_5a8[lVar2 * 3] = (long)(auto_event_keys + (long)local_5ac * 4);
local_5a8[lVar2 * 3 + 1] = lVar1;
local_5a8[lVar2 * 3 + 2] = (ulong)uStack_5b4 << 0x20;
}
(**(code **)(PSI_server + 0x3d8))("innodb",local_5a8,0x3c);
return;
}
|
|
18,616
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long)
|
monkey531[P]llama/common/./json.hpp
|
bool start_object(std::size_t len)
{
ref_stack.push_back(handle_value(BasicJsonType::value_t::object));
if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back()));
}
return true;
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long):
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movb $0x1, 0x7f(%rsp)
leaq 0x7f(%rsp), %rsi
callq 0xc3dc0
movq 0x20(%rsp), %rdi
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rsi
callq 0xc3d90
xorl %eax, %eax
cmpq $-0x1, 0x88(%rsp)
movb %al, 0x2a(%rsp)
je 0xc371f
movq 0x18(%rsp), %rdi
movq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x8, %rdi
callq 0xb9880
movq (%rax), %rdi
callq 0xb98c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
seta %al
movb %al, 0x2a(%rsp)
movb 0x2a(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xc3730
jmp 0xc380d
movb $0x1, 0x2b(%rsp)
movl $0x20, %edi
callq 0x50540
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0xb9ba0
jmp 0xc3758
leaq 0x10b4bd(%rip), %rsi # 0x1cec1c
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0xb9af0
jmp 0xc3770
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0xb9880
movq 0x8(%rsp), %rdi
movq (%rax), %rcx
movl $0x198, %esi # imm = 0x198
leaq 0x58(%rsp), %rdx
callq 0xb9940
jmp 0xc3797
movq 0x8(%rsp), %rdi
movb $0x0, 0x2b(%rsp)
leaq 0x18ea38(%rip), %rsi # 0x2521e0
leaq -0xa86f(%rip), %rdx # 0xb8f40
callq 0x508f0
jmp 0xc3823
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0xc37f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0xc37ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x510c0
leaq 0x38(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x2b(%rsp)
jne 0xc3801
jmp 0xc380b
movq 0x8(%rsp), %rdi
callq 0x50c40
jmp 0xc3819
movb $0x1, %al
andb $0x1, %al
addq $0x98, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm:
sub rsp, 98h
mov qword ptr [rsp+98h+var_8], rdi; char
mov [rsp+98h+var_10], rsi; int
mov rdi, qword ptr [rsp+98h+var_8]
mov qword ptr [rsp+98h+var_80], rdi; char
mov rax, rdi
add rax, 8
mov qword ptr [rsp+98h+var_78], rax; int
mov [rsp+98h+var_19], 1
lea rsi, [rsp+98h+var_19]
call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&)
mov rdi, qword ptr [rsp+98h+var_78]
mov qword ptr [rsp+98h+var_18], rax; int
lea rsi, [rsp+98h+var_18]
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backEOSE_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *&&)
xor eax, eax
cmp [rsp+98h+var_10], 0FFFFFFFFFFFFFFFFh
mov [rsp+98h+var_6E], al
jz short loc_C371F
mov rdi, qword ptr [rsp+98h+var_80]
mov rax, [rsp+98h+var_10]
mov qword ptr [rsp+98h+var_88], rax; int
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void)
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void)
mov rcx, rax
mov rax, qword ptr [rsp+98h+var_88]
cmp rax, rcx
setnbe al
mov [rsp+98h+var_6E], al
loc_C371F:
mov al, [rsp+98h+var_6E]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_C3730
jmp loc_C380D
loc_C3730:
mov [rsp+98h+var_6D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+98h+var_90], rax; int
mov rsi, [rsp+98h+var_10]; unsigned __int64
lea rdi, [rsp+98h+var_60]; this
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
jmp short $+2
loc_C3758:
lea rsi, aExcessiveObjec; "excessive object size: "
lea rdi, [rsp+98h+var_40]
lea rdx, [rsp+98h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&)
jmp short $+2
loc_C3770:
mov rdi, qword ptr [rsp+98h+var_80]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void)
mov rdi, [rsp+98h+var_90]; int
mov rcx, [rax]
mov esi, 198h
lea rdx, [rsp+98h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_C3797:
mov rdi, [rsp+98h+var_90]; void *
mov [rsp+98h+var_6D], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_C3823
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_C37F8
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_C37EE
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_C37EE:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_C37F8:
test [rsp+arg_23], 1
jnz short loc_C3801
jmp short loc_C380B
loc_C3801:
mov rdi, [rsp+arg_0]; void *
call ___cxa_free_exception
loc_C380B:
jmp short loc_C3819
loc_C380D:
mov al, 1
and al, 1
add rsp, 98h
retn
loc_C3819:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
loc_C3823:
nop word ptr [rax+rax+00000000h]
nop dword ptr [rax]
|
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_object(
long long a1,
unsigned long long a2)
{
long long *v2; // rax
long long *v3; // rax
nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // [rsp+8h] [rbp-90h]
unsigned long long v6; // [rsp+10h] [rbp-88h]
bool v7; // [rsp+2Ah] [rbp-6Eh]
_BYTE v8[32]; // [rsp+38h] [rbp-60h] BYREF
_BYTE v9[39]; // [rsp+58h] [rbp-40h] BYREF
char v10; // [rsp+7Fh] [rbp-19h] BYREF
int v11[2]; // [rsp+80h] [rbp-18h] BYREF
unsigned long long v12; // [rsp+88h] [rbp-10h]
char v13[8]; // [rsp+90h] [rbp-8h]
*(_QWORD *)v13 = a1;
v12 = a2;
v10 = 1;
*(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
&v10);
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back(
a1 + 8,
v11);
v7 = 0;
if ( v12 != -1LL )
{
v6 = v12;
v2 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8);
v7 = v6 > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(*v2);
}
if ( v7 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v8, v12);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(
(long long)v9,
(long long)"excessive object size: ",
(long long)v8);
v3 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8);
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408,
(long long)v9,
*v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range);
}
return 1;
}
|
start_object:
SUB RSP,0x98
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
MOV RDI,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
ADD RAX,0x8
MOV qword ptr [RSP + 0x20],RAX
MOV byte ptr [RSP + 0x7f],0x1
LEA RSI,[RSP + 0x7f]
CALL 0x001c3dc0
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x80],RAX
LEA RSI,[RSP + 0x80]
CALL 0x001c3d90
XOR EAX,EAX
CMP qword ptr [RSP + 0x88],-0x1
MOV byte ptr [RSP + 0x2a],AL
JZ 0x001c371f
MOV RDI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x10],RAX
ADD RDI,0x8
CALL 0x001b9880
MOV RDI,qword ptr [RAX]
CALL 0x001b98c0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,RCX
SETA AL
MOV byte ptr [RSP + 0x2a],AL
LAB_001c371f:
MOV AL,byte ptr [RSP + 0x2a]
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001c3730
JMP 0x001c380d
LAB_001c3730:
MOV byte ptr [RSP + 0x2b],0x1
MOV EDI,0x20
CALL 0x00150540
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RSP + 0x88]
LAB_001c374c:
LEA RDI,[RSP + 0x38]
CALL 0x001b9ba0
JMP 0x001c3758
LAB_001c3758:
LEA RSI,[0x2cec1c]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x38]
CALL 0x001b9af0
JMP 0x001c3770
LAB_001c3770:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x8
CALL 0x001b9880
MOV RDI,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX]
LAB_001c3786:
MOV ESI,0x198
LEA RDX,[RSP + 0x58]
CALL 0x001b9940
JMP 0x001c3797
LAB_001c3797:
MOV RDI,qword ptr [RSP + 0x8]
MOV byte ptr [RSP + 0x2b],0x0
LEA RSI,[0x3521e0]
LEA RDX,[0x1b8f40]
CALL 0x001508f0
LAB_001c380d:
MOV AL,0x1
AND AL,0x1
ADD RSP,0x98
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::start_object(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::start_object(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong param_1)
{
bool bVar1;
ulong uVar2;
int8 *puVar3;
ulong uVar4;
int7 uVar6;
int8 uVar5;
__cxx11 local_60 [32];
detail local_40 [39];
value_t local_19;
basic_json *local_18;
ulong local_10;
json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*local_8;
local_19 = 1;
local_10 = param_1;
local_8 = this;
local_18 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_19);
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),&local_18);
uVar2 = local_10;
uVar6 = 0;
bVar1 = false;
if (local_10 != 0xffffffffffffffff) {
puVar3 = (int8 *)
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>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar4 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::max_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>
*)*puVar3);
bVar1 = uVar4 < uVar2;
uVar6 = (int7)(uVar2 >> 8);
}
if (!bVar1) {
return CONCAT71(uVar6,1);
}
uVar5 = __cxa_allocate_exception(0x20);
/* try { // try from 001c374c to 001c3755 has its CatchHandler @ 001c37b6 */
std::__cxx11::to_string(local_60,local_10);
/* try { // try from 001c3758 to 001c376d has its CatchHandler @ 001c37c6 */
concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string>
(local_40,"excessive object size: ",(string *)local_60);
puVar3 = (int8 *)
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>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
/* try { // try from 001c3786 to 001c37b3 has its CatchHandler @ 001c37d6 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar5,0x198,local_40,*puVar3);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&out_of_range::typeinfo,out_of_range::~out_of_range);
}
|
|
18,617
|
fill_quick_table
|
eloqsql/storage/maria/ma_packrec.c
|
static void fill_quick_table(uint16 *table, uint bits, uint max_bits,
uint value)
{
uint16 *end;
DBUG_ENTER("fill_quick_table");
/*
Bits 1..8 of value represent the decoded uchar value.
Bits 9..14 become the length of the Huffman code for this uchar value.
Bit 16 flags a valid code (IS_CHAR).
*/
value|= (max_bits - bits) << 8 | IS_CHAR;
for (end= table + ((my_ptrdiff_t) 1 << bits); table < end; table++)
{
*table= (uint16) value;
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
fill_quick_table:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0x10(%rbp), %eax
subl -0xc(%rbp), %eax
shll $0x8, %eax
orl $0x8000, %eax # imm = 0x8000
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x4bb56
movl -0x14(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0x4bb31
jmp 0x4bb58
jmp 0x4bb5a
popq %rbp
retq
nopl (%rax)
|
fill_quick_table:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov eax, [rbp+var_10]
sub eax, [rbp+var_C]
shl eax, 8
or eax, 8000h
or eax, [rbp+var_14]
mov [rbp+var_14], eax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
shl rcx, 1
add rax, rcx
mov [rbp+var_20], rax
loc_4BB31:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jnb short loc_4BB56
mov eax, [rbp+var_14]
mov cx, ax
mov rax, [rbp+var_8]
mov [rax], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
jmp short loc_4BB31
loc_4BB56:
jmp short $+2
loc_4BB58:
jmp short $+2
loc_4BB5A:
pop rbp
retn
|
_WORD * fill_quick_table(_WORD *a1, __int16 a2, __int16 a3, __int16 a4)
{
_WORD *result; // rax
_WORD *i; // [rsp+18h] [rbp-8h]
for ( i = a1; ; ++i )
{
result = i;
if ( i >= &a1[1LL << a2] )
break;
*i = a4 | ((a3 - a2) << 8) | 0x8000;
}
return result;
}
|
fill_quick_table:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV EAX,dword ptr [RBP + -0x10]
SUB EAX,dword ptr [RBP + -0xc]
SHL EAX,0x8
OR EAX,0x8000
OR EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_0014bb31:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0014bb56
MOV EAX,dword ptr [RBP + -0x14]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014bb31
LAB_0014bb56:
JMP 0x0014bb58
LAB_0014bb58:
JMP 0x0014bb5a
LAB_0014bb5a:
POP RBP
RET
|
void fill_quick_table(ushort *param_1,short param_2,short param_3,ushort param_4)
{
ushort *local_10;
for (local_10 = param_1; local_10 < param_1 + (1L << ((byte)param_2 & 0x3f));
local_10 = local_10 + 1) {
*local_10 = (param_3 - param_2) * 0x100 | 0x8000U | param_4;
}
return;
}
|
|
18,618
|
google::protobuf::compiler::cpp::EnumGenerator::GenerateDefinition(google::protobuf::io::Printer*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/enum.cc
|
void EnumGenerator::GenerateDefinition(io::Printer* printer) {
Formatter format(printer, variables_);
format("enum ${1$$classname$$}$ : int {\n", descriptor_);
format.Indent();
const EnumValueDescriptor* min_value = descriptor_->value(0);
const EnumValueDescriptor* max_value = descriptor_->value(0);
for (int i = 0; i < descriptor_->value_count(); i++) {
auto format_value = format;
format_value.Set("name", EnumValueName(descriptor_->value(i)));
// In C++, an value of -2147483648 gets interpreted as the negative of
// 2147483648, and since 2147483648 can't fit in an integer, this produces a
// compiler warning. This works around that issue.
format_value.Set("number", Int32ToString(descriptor_->value(i)->number()));
format_value.Set("deprecation",
DeprecatedAttribute(options_, descriptor_->value(i)));
if (i > 0) format_value(",\n");
format_value("${1$$prefix$$name$$}$ $deprecation$= $number$",
descriptor_->value(i));
if (descriptor_->value(i)->number() < min_value->number()) {
min_value = descriptor_->value(i);
}
if (descriptor_->value(i)->number() > max_value->number()) {
max_value = descriptor_->value(i);
}
}
if (descriptor_->file()->syntax() == FileDescriptor::SYNTAX_PROTO3) {
// For new enum semantics: generate min and max sentinel values equal to
// INT32_MIN and INT32_MAX
if (descriptor_->value_count() > 0) format(",\n");
format(
"$classname$_$prefix$INT_MIN_SENTINEL_DO_NOT_USE_ = "
"std::numeric_limits<$int32$>::min(),\n"
"$classname$_$prefix$INT_MAX_SENTINEL_DO_NOT_USE_ = "
"std::numeric_limits<$int32$>::max()");
}
format.Outdent();
format("\n};\n");
format(
"$dllexport_decl $bool $classname$_IsValid(int value);\n"
"constexpr $classname$ ${1$$prefix$$short_name$_MIN$}$ = "
"$prefix$$2$;\n"
"constexpr $classname$ ${1$$prefix$$short_name$_MAX$}$ = "
"$prefix$$3$;\n",
descriptor_, EnumValueName(min_value), EnumValueName(max_value));
if (generate_array_size_) {
format(
"constexpr int ${1$$prefix$$short_name$_ARRAYSIZE$}$ = "
"$prefix$$short_name$_MAX + 1;\n\n",
descriptor_);
}
if (HasDescriptorMethods(descriptor_->file(), options_)) {
format(
"$dllexport_decl $const ::$proto_ns$::EnumDescriptor* "
"$classname$_descriptor();\n");
}
// The _Name and _Parse functions. The lite implementation is table-based, so
// we make sure to keep the tables hidden in the .cc file.
if (!HasDescriptorMethods(descriptor_->file(), options_)) {
format("const std::string& $classname$_Name($classname$ value);\n");
}
// The _Name() function accepts the enum type itself but also any integral
// type.
format(
"template<typename T>\n"
"inline const std::string& $classname$_Name(T enum_t_value) {\n"
" static_assert(::std::is_same<T, $classname$>::value ||\n"
" ::std::is_integral<T>::value,\n"
" \"Incorrect type passed to function $classname$_Name.\");\n");
if (HasDescriptorMethods(descriptor_->file(), options_)) {
format(
" return ::$proto_ns$::internal::NameOfEnum(\n"
" $classname$_descriptor(), enum_t_value);\n");
} else {
format(
" return $classname$_Name(static_cast<$classname$>(enum_t_value));\n");
}
format("}\n");
if (HasDescriptorMethods(descriptor_->file(), options_)) {
format(
"inline bool $classname$_Parse(\n"
" ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, $classname$* "
"value) "
"{\n"
" return ::$proto_ns$::internal::ParseNamedEnum<$classname$>(\n"
" $classname$_descriptor(), name, value);\n"
"}\n");
} else {
format(
"bool $classname$_Parse(\n"
" ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, $classname$* "
"value);\n");
}
}
|
O3
|
cpp
|
google::protobuf::compiler::cpp::EnumGenerator::GenerateDefinition(google::protobuf::io::Printer*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r15
leaq 0x38(%rdi), %rax
leaq 0x58(%rsp), %rdi
movq %rsi, -0x8(%rdi)
movq %rax, %rsi
callq 0x7e61e
leaq 0x1067ad(%rip), %rsi # 0x1c6659
leaq 0x50(%rsp), %rdi
movq %r15, %rdx
callq 0xc0ce6
movq 0x50(%rsp), %rdi
callq 0x16d126
movq (%r15), %rax
movq 0x28(%rax), %r12
cmpl $0x0, 0x4(%rax)
jle 0xc0141
movq %r15, (%rsp)
leaq 0x98(%rsp), %rdi
xorl %ebp, %ebp
leaq 0x90(%rsp), %r15
xorl %r13d, %r13d
movq %r12, 0x28(%rsp)
movq %r12, %rdx
movq %rdx, 0x88(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x58(%rsp), %rsi
callq 0x7e61e
leaq 0x18(%rsp), %r14
movq %r14, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0xdcdf1(%rip), %rsi # 0x19cd1b
leaq 0xdcdee(%rip), %rdx # 0x19cd1f
callq 0x250b2
leaq 0x40(%rsp), %r12
movq (%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rsi
addq %rbp, %rsi
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x360eb
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x7e2b0
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xbff75
callq 0x1f4a0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xbff84
callq 0x1f4a0
movq %r14, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0xfba99(%rip), %rsi # 0x1bba2e
leaq 0xfba98(%rip), %rdx # 0x1bba34
callq 0x250b2
movq (%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movl 0x4(%rax,%rbp), %esi
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x365ca
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x7e2b0
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xbffdc
callq 0x1f4a0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xbffeb
callq 0x1f4a0
movq %r14, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x116320(%rip), %rsi # 0x1d631c
leaq 0x116324(%rip), %rdx # 0x1d6327
callq 0x250b2
movq (%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax,%rbp), %rax
movb 0x48(%rax), %al
leaq 0x1077a8(%rip), %rsi # 0x1c77ca
testb %al, %al
leaq 0x30(%rsp), %rbx
jne 0xc0032
leaq 0xda577(%rip), %rsi # 0x19a5a9
leaq 0x19(%rsi), %rdx
testb %al, %al
movq %r12, 0x30(%rsp)
cmoveq %rsi, %rdx
movq %rbx, %rdi
callq 0x250b2
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x7e2b0
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xc0068
callq 0x1f4a0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xc0077
callq 0x1f4a0
testq %rbp, %rbp
je 0xc008b
movq %r15, %rdi
leaq 0xe00e9(%rip), %rsi # 0x1a016f
callq 0x39938
movq (%rsp), %r14
movq (%r14), %rax
movq 0x28(%rax), %rax
addq %rbp, %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x1065d2(%rip), %rsi # 0x1c667a
leaq 0x8(%rsp), %rdx
callq 0xc0d8e
movq (%r14), %rax
movq 0x28(%rax), %r14
movl 0x4(%r14,%rbp), %eax
addq %rbp, %r14
movq %r14, %r12
movq 0x88(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jl 0xc00d4
movq %rcx, %r12
movq 0x28(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jg 0xc00e1
movq %rcx, %r14
leaq 0x98(%rsp), %rdi
callq 0x2e5e0
leaq 0x98(%rsp), %rdi
incq %r13
movq (%rsp), %rax
movq (%rax), %rcx
movslq 0x4(%rcx), %rax
addq $0x20, %rbp
movq %r14, 0x28(%rsp)
movq %r12, %rdx
cmpq %rax, %r13
jl 0xbfef5
movq 0x10(%rcx), %rcx
cmpb $0x3, 0x3(%rcx)
jne 0xc0153
testl %eax, %eax
movq (%rsp), %r15
jle 0xc015c
leaq 0xe003d(%rip), %rsi # 0x1a016f
leaq 0x50(%rsp), %rdi
callq 0x39938
movq %r12, %r13
jmp 0xc015f
movq 0x10(%rax), %rax
cmpb $0x3, 0x3(%rax)
movq %r12, %r14
movq %r12, %r13
je 0xc015f
jmp 0xc0176
movq %r14, %r13
movq (%rsp), %r15
jmp 0xc0176
movq %r12, %r13
movq %r13, %r12
leaq 0x10653f(%rip), %rsi # 0x1c66a8
leaq 0x50(%rsp), %rdi
callq 0x39938
movq %r14, %r13
movq 0x50(%rsp), %rdi
callq 0x16d136
leaq 0xeeef6(%rip), %rsi # 0x1af07d
leaq 0x50(%rsp), %rdi
callq 0x39938
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x360eb
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x360eb
leaq 0x1065a2(%rip), %rsi # 0x1c6757
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %r15, %rdx
callq 0xc0e36
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc01e2
callq 0x1f4a0
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc01f8
callq 0x1f4a0
cmpb $0x1, 0x30(%r15)
jne 0xc0213
leaq 0x106612(%rip), %rsi # 0x1c6818
leaq 0x50(%rsp), %rdi
movq %r15, %rdx
callq 0xc0ce6
movq (%r15), %rax
movq 0x28(%r15), %rsi
movq 0x10(%rax), %rdi
xorl %edx, %edx
callq 0x38ac3
cmpl $0x3, %eax
je 0xc023b
leaq 0x10663d(%rip), %rsi # 0x1c686e
leaq 0x50(%rsp), %rdi
callq 0x39938
movq (%r15), %rax
movq 0x28(%r15), %rsi
movq 0x10(%rax), %rdi
xorl %edx, %edx
callq 0x38ac3
cmpl $0x3, %eax
jne 0xc0263
leaq 0x106665(%rip), %rsi # 0x1c68be
leaq 0x50(%rsp), %rdi
callq 0x39938
leaq 0x10668d(%rip), %rsi # 0x1c68f7
leaq 0x50(%rsp), %rdi
callq 0x39938
movq (%r15), %rax
movq 0x28(%r15), %rsi
movq 0x10(%rax), %rdi
xorl %edx, %edx
callq 0x38ac3
cmpl $0x3, %eax
leaq 0x1067ac(%rip), %rax # 0x1c6a3c
leaq 0x10674a(%rip), %rsi # 0x1c69e1
cmoveq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0x39938
leaq 0x121e6b(%rip), %rsi # 0x1e2117
leaq 0x50(%rsp), %rdi
callq 0x39938
movq (%r15), %rax
movq 0x28(%r15), %rsi
movq 0x10(%rax), %rdi
xorl %edx, %edx
callq 0x38ac3
cmpl $0x3, %eax
leaq 0x106884(%rip), %rax # 0x1c6b56
leaq 0x1067a7(%rip), %rsi # 0x1c6a80
cmoveq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0x39938
leaq 0x58(%rsp), %rdi
callq 0x2e5e0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc031e
callq 0x1f4a0
jmp 0xc031e
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc038e
callq 0x1f4a0
jmp 0xc038e
jmp 0xc033e
jmp 0xc033e
jmp 0xc033e
jmp 0xc037e
movq %rax, %rbx
jmp 0xc038e
jmp 0xc037e
jmp 0xc0351
jmp 0xc0356
jmp 0xc037e
jmp 0xc0351
jmp 0xc0356
jmp 0xc037e
movq %rax, %rbx
jmp 0xc0368
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xc0368
callq 0x1f4a0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xc0381
callq 0x1f4a0
jmp 0xc0381
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2e5e0
leaq 0x58(%rsp), %rdi
callq 0x2e5e0
movq %rbx, %rdi
callq 0x1f860
|
_ZN6google8protobuf8compiler3cpp13EnumGenerator18GenerateDefinitionEPNS0_2io7PrinterE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r15, rdi
lea rax, [rdi+38h]
lea rdi, [rsp+0F8h+var_A0]
mov [rdi-8], rsi
mov rsi, rax
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; 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(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>>> const&)
lea rsi, aEnum1Classname; "enum ${1$$classname$$}$ : int {\n"
lea rdi, [rsp+0F8h+var_A8]
mov rdx, r15
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJPKNS0_14EnumDescriptorEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::EnumDescriptor const*>(char const*,google::protobuf::EnumDescriptor const* const&)
mov rdi, [rsp+0F8h+var_A8]; this
call _ZN6google8protobuf2io7Printer6IndentEv; google::protobuf::io::Printer::Indent(void)
mov rax, [r15]
mov r12, [rax+28h]
cmp dword ptr [rax+4], 0
jle loc_C0141
mov [rsp+0F8h+var_F8], r15
lea rdi, [rsp+0F8h+var_60]
xor ebp, ebp
lea r15, [rsp+0F8h+var_68]
xor r13d, r13d
mov [rsp+0F8h+var_D0], r12
mov rdx, r12
loc_BFEF5:
mov [rsp+0F8h+var_70], rdx
mov rax, [rsp+0F8h+var_A8]
mov [rsp+0F8h+var_68], rax
lea rsi, [rsp+0F8h+var_A0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; 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(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>>> const&)
lea r14, [rsp+0F8h+var_E0]
mov [rsp+0F8h+var_F0], r14
lea rdi, [rsp+0F8h+var_F0]
lea rsi, aAnnotationPrag+12h; "name"
lea rdx, aAnnotationPrag+16h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea r12, [rsp+0F8h+var_B8]
mov rax, [rsp+0F8h+var_F8]
mov rax, [rax]
mov rsi, [rax+28h]
add rsi, rbp
lea rbx, [rsp+0F8h+var_C8]
mov rdi, rbx
call _ZN6google8protobuf8compiler3cpp13EnumValueNameB5cxx11EPKNS0_19EnumValueDescriptorE; google::protobuf::compiler::cpp::EnumValueName(google::protobuf::EnumValueDescriptor const*)
mov rdi, r15
lea rsi, [rsp+0F8h+var_F0]
mov rdx, rbx
call _ZN6google8protobuf8compiler3cpp9Formatter3SetINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKSA_RKT_; google::protobuf::compiler::cpp::Formatter::Set<std::string>(std::string const&,std::string const&)
mov rdi, [rsp+0F8h+var_C8]; void *
cmp rdi, r12
jz short loc_BFF75
call __ZdlPv; operator delete(void *)
loc_BFF75:
mov rdi, [rsp+0F8h+var_F0]; void *
cmp rdi, r14
jz short loc_BFF84
call __ZdlPv; operator delete(void *)
loc_BFF84:
mov [rsp+0F8h+var_F0], r14
lea rdi, [rsp+0F8h+var_F0]
lea rsi, aFieldNumber_0+6; "number"
lea rdx, aFieldNumber_0+0Ch; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+0F8h+var_F8]
mov rax, [rax]
mov rax, [rax+28h]
mov esi, [rax+rbp+4]
lea rbx, [rsp+0F8h+var_C8]
mov rdi, rbx
call _ZN6google8protobuf8compiler3cpp13Int32ToStringB5cxx11Ei; google::protobuf::compiler::cpp::Int32ToString(int)
mov rdi, r15
lea rsi, [rsp+0F8h+var_F0]
mov rdx, rbx
call _ZN6google8protobuf8compiler3cpp9Formatter3SetINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKSA_RKT_; google::protobuf::compiler::cpp::Formatter::Set<std::string>(std::string const&,std::string const&)
mov rdi, [rsp+0F8h+var_C8]; void *
cmp rdi, r12
jz short loc_BFFDC
call __ZdlPv; operator delete(void *)
loc_BFFDC:
mov rdi, [rsp+0F8h+var_F0]; void *
cmp rdi, r14
jz short loc_BFFEB
call __ZdlPv; operator delete(void *)
loc_BFFEB:
mov [rsp+0F8h+var_F0], r14
lea rdi, [rsp+0F8h+var_F0]
lea rsi, aKtDeprecation+3; "deprecation"
lea rdx, aKtDeprecation+0Eh; ""
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 rax, [rsp+0F8h+var_F8]
mov rax, [rax]
mov rax, [rax+28h]
mov rax, [rax+rbp+18h]
mov al, [rax+48h]
lea rsi, aProtobufDeprec; "PROTOBUF_DEPRECATED_ENUM "
test al, al
lea rbx, [rsp+0F8h+var_C8]
jnz short loc_C0032
lea rsi, asc_19A5A7+2; ""
loc_C0032:
lea rdx, [rsi+19h]
test al, al
mov [rsp+0F8h+var_C8], r12
cmovz rdx, rsi
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r15
lea rsi, [rsp+0F8h+var_F0]
mov rdx, rbx
call _ZN6google8protobuf8compiler3cpp9Formatter3SetINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKSA_RKT_; google::protobuf::compiler::cpp::Formatter::Set<std::string>(std::string const&,std::string const&)
mov rdi, [rsp+0F8h+var_C8]; void *
cmp rdi, r12
jz short loc_C0068
call __ZdlPv; operator delete(void *)
loc_C0068:
mov rdi, [rsp+0F8h+var_F0]; void *
cmp rdi, r14
jz short loc_C0077
call __ZdlPv; operator delete(void *)
loc_C0077:
test rbp, rbp
jz short loc_C008B
mov rdi, r15
lea rsi, aBase64_0+0Ah; ",\n"
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
loc_C008B:
mov r14, [rsp+0F8h+var_F8]
mov rax, [r14]
mov rax, [rax+28h]
add rax, rbp
mov [rsp+0F8h+var_F0], rax
mov rdi, r15
lea rsi, a1PrefixNameDep; "${1$$prefix$$name$$}$ $deprecation$= $n"...
lea rdx, [rsp+0F8h+var_F0]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJPKNS0_19EnumValueDescriptorEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::EnumValueDescriptor const*>(char const*,google::protobuf::EnumValueDescriptor const* const&)
mov rax, [r14]
mov r14, [rax+28h]
mov eax, [r14+rbp+4]
add r14, rbp
mov r12, r14
mov rcx, [rsp+0F8h+var_70]
cmp eax, [rcx+4]
jl short loc_C00D4
mov r12, rcx
loc_C00D4:
mov rcx, [rsp+0F8h+var_D0]
cmp eax, [rcx+4]
jg short loc_C00E1
mov r14, rcx
loc_C00E1:
lea rdi, [rsp+0F8h+var_60]
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()
lea rdi, [rsp+0F8h+var_60]
inc r13
mov rax, [rsp+0F8h+var_F8]
mov rcx, [rax]
movsxd rax, dword ptr [rcx+4]
add rbp, 20h ; ' '
mov [rsp+0F8h+var_D0], r14
mov rdx, r12
cmp r13, rax
jl loc_BFEF5
mov rcx, [rcx+10h]
cmp byte ptr [rcx+3], 3
jnz short loc_C0153
test eax, eax
mov r15, [rsp+0F8h+var_F8]
jle short loc_C015C
lea rsi, aBase64_0+0Ah; ",\n"
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov r13, r12
jmp short loc_C015F
loc_C0141:
mov rax, [rax+10h]
cmp byte ptr [rax+3], 3
mov r14, r12
mov r13, r12
jz short loc_C015F
jmp short loc_C0176
loc_C0153:
mov r13, r14
mov r15, [rsp+0F8h+var_F8]
jmp short loc_C0176
loc_C015C:
mov r13, r12
loc_C015F:
mov r12, r13
lea rsi, aClassnamePrefi; "$classname$_$prefix$INT_MIN_SENTINEL_DO"...
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov r13, r14
loc_C0176:
mov rdi, [rsp+0F8h+var_A8]; this
call _ZN6google8protobuf2io7Printer7OutdentEv; google::protobuf::io::Printer::Outdent(void)
lea rsi, aFriendStructTa_0+1Eh; "\n};\n"
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
lea rdi, [rsp+0F8h+var_68]
mov rsi, r12
call _ZN6google8protobuf8compiler3cpp13EnumValueNameB5cxx11EPKNS0_19EnumValueDescriptorE; google::protobuf::compiler::cpp::EnumValueName(google::protobuf::EnumValueDescriptor const*)
lea rdi, [rsp+0F8h+var_F0]
mov rsi, r13
call _ZN6google8protobuf8compiler3cpp13EnumValueNameB5cxx11EPKNS0_19EnumValueDescriptorE; google::protobuf::compiler::cpp::EnumValueName(google::protobuf::EnumValueDescriptor const*)
lea rsi, aDllexportDeclB; "$dllexport_decl $bool $classname$_IsVal"...
lea rdi, [rsp+0F8h+var_A8]
lea rcx, [rsp+0F8h+var_68]
lea r8, [rsp+0F8h+var_F0]
mov rdx, r15
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJPKNS0_14EnumDescriptorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_EEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::EnumDescriptor const*,std::string,std::string>(char const*,google::protobuf::EnumDescriptor const*,std::string,std::string const&)
lea rax, [rsp+0F8h+var_E0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C01E2
call __ZdlPv; operator delete(void *)
loc_C01E2:
lea rax, [rsp+0F8h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C01F8
call __ZdlPv; operator delete(void *)
loc_C01F8:
cmp byte ptr [r15+30h], 1
jnz short loc_C0213
lea rsi, aConstexprInt1P; "constexpr int ${1$$prefix$$short_name$_"...
lea rdi, [rsp+0F8h+var_A8]
mov rdx, r15
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJPKNS0_14EnumDescriptorEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::EnumDescriptor const*>(char const*,google::protobuf::EnumDescriptor const* const&)
loc_C0213:
mov rax, [r15]
mov rsi, [r15+28h]; google::protobuf::FileDescriptor *
mov rdi, [rax+10h]; this
xor edx, edx; google::protobuf::compiler::cpp::Options *
call _ZN6google8protobuf8compiler3cpp14GetOptimizeForEPKNS0_14FileDescriptorERKNS2_7OptionsEPb; google::protobuf::compiler::cpp::GetOptimizeFor(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::Options const&,bool *)
cmp eax, 3
jz short loc_C023B
lea rsi, aDllexportDeclC; "$dllexport_decl $const ::$proto_ns$::En"...
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
loc_C023B:
mov rax, [r15]
mov rsi, [r15+28h]; google::protobuf::FileDescriptor *
mov rdi, [rax+10h]; this
xor edx, edx; google::protobuf::compiler::cpp::Options *
call _ZN6google8protobuf8compiler3cpp14GetOptimizeForEPKNS0_14FileDescriptorERKNS2_7OptionsEPb; google::protobuf::compiler::cpp::GetOptimizeFor(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::Options const&,bool *)
cmp eax, 3
jnz short loc_C0263
lea rsi, aConstStdString; "const std::string& $classname$_Name($cl"...
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
loc_C0263:
lea rsi, aTemplateTypena_3; "template<typename T>\ninline const std:"...
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov rax, [r15]
mov rsi, [r15+28h]; google::protobuf::FileDescriptor *
mov rdi, [rax+10h]; this
xor edx, edx; google::protobuf::compiler::cpp::Options *
call _ZN6google8protobuf8compiler3cpp14GetOptimizeForEPKNS0_14FileDescriptorERKNS2_7OptionsEPb; google::protobuf::compiler::cpp::GetOptimizeFor(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::Options const&,bool *)
cmp eax, 3
lea rax, aReturnClassnam; " return $classname$_Name(static_cast<$"...
lea rsi, aReturnProtoNsI; " return ::$proto_ns$::internal::NameOf"...
cmovz rsi, rax
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
lea rsi, aIfOtherHasCapi_1+6Dh; "}\n"
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov rax, [r15]
mov rsi, [r15+28h]; google::protobuf::FileDescriptor *
mov rdi, [rax+10h]; this
xor edx, edx; google::protobuf::compiler::cpp::Options *
call _ZN6google8protobuf8compiler3cpp14GetOptimizeForEPKNS0_14FileDescriptorERKNS2_7OptionsEPb; google::protobuf::compiler::cpp::GetOptimizeFor(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::Options const&,bool *)
cmp eax, 3
lea rax, aBoolClassnameP_0; "bool $classname$_Parse(\n ::PROTOBUF"...
lea rsi, aInlineBoolClas_6; "inline bool $classname$_Parse(\n ::P"...
cmovz rsi, rax
lea rdi, [rsp+0F8h+var_A8]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
lea rdi, [rsp+0F8h+var_A0]
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()
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C031E
call __ZdlPv; operator delete(void *)
jmp short loc_C031E
mov rbx, rax
loc_C031E:
lea rax, [rsp+arg_98]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C038E
call __ZdlPv; operator delete(void *)
jmp short loc_C038E
jmp short loc_C033E
jmp short loc_C033E
jmp short loc_C033E
jmp short loc_C037E
loc_C033E:
mov rbx, rax
jmp short loc_C038E
jmp short loc_C037E
jmp short loc_C0351
jmp short loc_C0356
jmp short loc_C037E
jmp short loc_C0351
jmp short loc_C0356
jmp short loc_C037E
loc_C0351:
mov rbx, rax
jmp short loc_C0368
loc_C0356:
mov rbx, rax
mov rdi, [rsp+arg_28]; void *
cmp rdi, r12
jz short loc_C0368
call __ZdlPv; operator delete(void *)
loc_C0368:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_C0381
call __ZdlPv; operator delete(void *)
jmp short loc_C0381
loc_C037E:
mov rbx, rax
loc_C0381:
lea rdi, [rsp+arg_90]
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()
loc_C038E:
lea rdi, [rsp+arg_50]
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 rdi, rbx
call __Unwind_Resume
|
long long google::protobuf::compiler::cpp::EnumGenerator::GenerateDefinition(
google::protobuf::compiler::cpp::EnumGenerator *this,
google::protobuf::io::Printer *a2)
{
google::protobuf::compiler::cpp::EnumGenerator *v2; // r15
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v6; // r12
long long v7; // rbp
long long v8; // r13
long long v9; // rdx
char *v10; // rdx
char v11; // al
char *v12; // rsi
long long v13; // rdx
int v14; // ecx
int v15; // r8d
int v16; // r9d
google::protobuf::compiler::cpp::EnumGenerator *v17; // r14
long long v18; // r14
int v19; // eax
long long v20; // r14
long long v21; // rcx
long long v22; // rax
long long v23; // r13
bool *v24; // rcx
int v25; // r8d
int v26; // r9d
bool *v27; // rcx
bool *v28; // rcx
const char *v29; // rsi
bool *v30; // rcx
const char *v31; // rsi
long long result; // rax
google::protobuf::compiler::cpp::EnumGenerator *v33; // [rsp+0h] [rbp-F8h]
void *v34; // [rsp+8h] [rbp-F0h] BYREF
int v35; // [rsp+10h] [rbp-E8h]
_DWORD v36[4]; // [rsp+18h] [rbp-E0h] BYREF
long long v37; // [rsp+28h] [rbp-D0h]
void *v38[2]; // [rsp+30h] [rbp-C8h] BYREF
_BYTE v39[16]; // [rsp+40h] [rbp-B8h] BYREF
google::protobuf::io::Printer *v40; // [rsp+50h] [rbp-A8h] BYREF
_BYTE v41[48]; // [rsp+58h] [rbp-A0h] BYREF
long long v42; // [rsp+88h] [rbp-70h]
google::protobuf::io::Printer *v43; // [rsp+90h] [rbp-68h] BYREF
char v44[8]; // [rsp+98h] [rbp-60h] BYREF
char v45; // [rsp+A0h] [rbp-58h] BYREF
v2 = this;
v40 = a2;
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(
(long long)v41,
(long long)this + 56);
google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::EnumDescriptor const*>(
(unsigned int)&v40,
(unsigned int)"enum ${1$$classname$$}$ : int {\n",
(_DWORD)this,
v3,
v4,
v5);
google::protobuf::io::Printer::Indent(v40);
v6 = *(_QWORD *)(*(_QWORD *)this + 40LL);
if ( *(int *)(*(_QWORD *)this + 4LL) > 0 )
{
v33 = this;
v7 = 0LL;
v8 = 0LL;
v37 = *(_QWORD *)(*(_QWORD *)this + 40LL);
v9 = v6;
do
{
v42 = v9;
v43 = v40;
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(
(long long)v44,
(long long)v41);
v34 = v36;
std::string::_M_construct<char const*>((long long)&v34, "name", (long long)"");
google::protobuf::compiler::cpp::EnumValueName[abi:cxx11](v38, v7 + *(_QWORD *)(*(_QWORD *)v33 + 40LL));
google::protobuf::compiler::cpp::Formatter::Set<std::string>((long long)&v43, (long long)&v34, (long long)v38);
if ( v38[0] != v39 )
operator delete(v38[0]);
if ( v34 != v36 )
operator delete(v34);
v34 = v36;
std::string::_M_construct<char const*>((long long)&v34, "number", (long long)"");
google::protobuf::compiler::cpp::Int32ToString[abi:cxx11](
v38,
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)v33 + 40LL) + v7 + 4),
v10);
google::protobuf::compiler::cpp::Formatter::Set<std::string>((long long)&v43, (long long)&v34, (long long)v38);
if ( v38[0] != v39 )
operator delete(v38[0]);
if ( v34 != v36 )
operator delete(v34);
v34 = v36;
std::string::_M_construct<char const*>((long long)&v34, "deprecation", (long long)"");
v11 = *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)v33 + 40LL) + v7 + 24) + 72LL);
v12 = "PROTOBUF_DEPRECATED_ENUM ";
if ( !v11 )
v12 = "";
v13 = (long long)(v12 + 25);
v38[0] = v39;
if ( !v11 )
v13 = (long long)v12;
std::string::_M_construct<char const*>((long long)v38, v12, v13);
google::protobuf::compiler::cpp::Formatter::Set<std::string>((long long)&v43, (long long)&v34, (long long)v38);
if ( v38[0] != v39 )
operator delete(v38[0]);
if ( v34 != v36 )
operator delete(v34);
if ( v7 )
google::protobuf::compiler::cpp::Formatter::operator()<>(&v43, ",\n");
v17 = v33;
google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::EnumValueDescriptor const*>(
(unsigned int)&v43,
(unsigned int)"${1$$prefix$$name$$}$ $deprecation$= $number$",
(unsigned int)&v34,
v14,
v15,
v16,
(_DWORD)v33,
v7 + *(_QWORD *)(*(_QWORD *)v33 + 40LL),
v35,
v36[0],
v36[2],
v37,
(char)v38[0]);
v18 = *(_QWORD *)(*(_QWORD *)v17 + 40LL);
v19 = *(_DWORD *)(v18 + v7 + 4);
v20 = v7 + v18;
v6 = v20;
if ( v19 >= *(_DWORD *)(v42 + 4) )
v6 = v42;
if ( v19 <= *(_DWORD *)(v37 + 4) )
v20 = v37;
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((long long)v44);
++v8;
v21 = *(_QWORD *)v33;
v22 = *(int *)(*(_QWORD *)v33 + 4LL);
v7 += 32LL;
v37 = v20;
v9 = v6;
}
while ( v8 < v22 );
if ( *(_BYTE *)(*(_QWORD *)(v21 + 16) + 3LL) != 3 )
{
v23 = v20;
v2 = v33;
goto LABEL_35;
}
v2 = v33;
if ( (int)v22 > 0 )
google::protobuf::compiler::cpp::Formatter::operator()<>(&v40, ",\n");
v23 = v6;
goto LABEL_34;
}
v20 = *(_QWORD *)(*(_QWORD *)this + 40LL);
v23 = v20;
if ( *(_BYTE *)(*(_QWORD *)(*(_QWORD *)this + 16LL) + 3LL) == 3 )
{
LABEL_34:
v6 = v23;
google::protobuf::compiler::cpp::Formatter::operator()<>(
&v40,
"$classname$_$prefix$INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<$int32$>::min(),\n"
"$classname$_$prefix$INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<$int32$>::max()");
v23 = v20;
}
LABEL_35:
google::protobuf::io::Printer::Outdent(v40);
google::protobuf::compiler::cpp::Formatter::operator()<>(&v40, "\n};\n");
google::protobuf::compiler::cpp::EnumValueName[abi:cxx11](&v43, v6);
google::protobuf::compiler::cpp::EnumValueName[abi:cxx11](&v34, v23);
google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::EnumDescriptor const*,std::string,std::string>(
&v40,
"$dllexport_decl $bool $classname$_IsValid(int value);\n"
"constexpr $classname$ ${1$$prefix$$short_name$_MIN$}$ = $prefix$$2$;\n"
"constexpr $classname$ ${1$$prefix$$short_name$_MAX$}$ = $prefix$$3$;\n",
v2,
&v43,
&v34);
if ( v34 != v36 )
operator delete(v34);
if ( v43 != (google::protobuf::io::Printer *)&v45 )
operator delete(v43);
if ( *((_BYTE *)v2 + 48) == 1 )
google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::EnumDescriptor const*>(
(unsigned int)&v40,
(unsigned int)"constexpr int ${1$$prefix$$short_name$_ARRAYSIZE$}$ = $prefix$$short_name$_MAX + 1;\n\n",
(_DWORD)v2,
(_DWORD)v24,
v25,
v26);
if ( (unsigned int)google::protobuf::compiler::cpp::GetOptimizeFor(
*(google::protobuf::compiler::cpp **)(*(_QWORD *)v2 + 16LL),
*((const google::protobuf::FileDescriptor **)v2 + 5),
0LL,
v24) != 3 )
google::protobuf::compiler::cpp::Formatter::operator()<>(
&v40,
"$dllexport_decl $const ::$proto_ns$::EnumDescriptor* $classname$_descriptor();\n");
if ( (unsigned int)google::protobuf::compiler::cpp::GetOptimizeFor(
*(google::protobuf::compiler::cpp **)(*(_QWORD *)v2 + 16LL),
*((const google::protobuf::FileDescriptor **)v2 + 5),
0LL,
v27) == 3 )
google::protobuf::compiler::cpp::Formatter::operator()<>(
&v40,
"const std::string& $classname$_Name($classname$ value);\n");
google::protobuf::compiler::cpp::Formatter::operator()<>(
&v40,
"template<typename T>\n"
"inline const std::string& $classname$_Name(T enum_t_value) {\n"
" static_assert(::std::is_same<T, $classname$>::value ||\n"
" ::std::is_integral<T>::value,\n"
" \"Incorrect type passed to function $classname$_Name.\");\n");
v29 = " return ::$proto_ns$::internal::NameOfEnum(\n $classname$_descriptor(), enum_t_value);\n";
if ( (unsigned int)google::protobuf::compiler::cpp::GetOptimizeFor(
*(google::protobuf::compiler::cpp **)(*(_QWORD *)v2 + 16LL),
*((const google::protobuf::FileDescriptor **)v2 + 5),
0LL,
v28) == 3 )
v29 = " return $classname$_Name(static_cast<$classname$>(enum_t_value));\n";
google::protobuf::compiler::cpp::Formatter::operator()<>(&v40, v29);
google::protobuf::compiler::cpp::Formatter::operator()<>(&v40, "}\n");
v31 = "inline bool $classname$_Parse(\n"
" ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, $classname$* value) {\n"
" return ::$proto_ns$::internal::ParseNamedEnum<$classname$>(\n"
" $classname$_descriptor(), name, value);\n"
"}\n";
if ( (unsigned int)google::protobuf::compiler::cpp::GetOptimizeFor(
*(google::protobuf::compiler::cpp **)(*(_QWORD *)v2 + 16LL),
*((const google::protobuf::FileDescriptor **)v2 + 5),
0LL,
v30) == 3 )
v31 = "bool $classname$_Parse(\n ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, $classname$* value);\n";
result = google::protobuf::compiler::cpp::Formatter::operator()<>(&v40, v31);
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((long long)v41);
return result;
}
|
GenerateDefinition:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R15,RDI
LEA RAX,[RDI + 0x38]
LEA RDI,[RSP + 0x58]
MOV qword ptr [RDI + -0x8],RSI
MOV RSI,RAX
CALL 0x0017e61e
LAB_001bfea5:
LEA RSI,[0x2c6659]
LEA RDI,[RSP + 0x50]
MOV RDX,R15
CALL 0x001c0ce6
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0026d126
MOV RAX,qword ptr [R15]
MOV R12,qword ptr [RAX + 0x28]
CMP dword ptr [RAX + 0x4],0x0
JLE 0x001c0141
MOV qword ptr [RSP],R15
LEA RDI,[RSP + 0x98]
XOR EBP,EBP
LEA R15,[RSP + 0x90]
XOR R13D,R13D
MOV qword ptr [RSP + 0x28],R12
MOV RDX,R12
LAB_001bfef5:
MOV qword ptr [RSP + 0x88],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x90],RAX
LAB_001bff0a:
LEA RSI,[RSP + 0x58]
CALL 0x0017e61e
LEA R14,[RSP + 0x18]
MOV qword ptr [RSP + 0x8],R14
LAB_001bff1e:
LEA RDI,[RSP + 0x8]
LEA RSI,[0x29cd1b]
LEA RDX,[0x29cd1f]
CALL 0x001250b2
LEA R12,[RSP + 0x40]
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x28]
ADD RSI,RBP
LAB_001bff49:
LEA RBX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x001360eb
LAB_001bff56:
MOV RDI,R15
LEA RSI,[RSP + 0x8]
MOV RDX,RBX
CALL 0x0017e2b0
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,R12
JZ 0x001bff75
CALL 0x0011f4a0
LAB_001bff75:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x001bff84
CALL 0x0011f4a0
LAB_001bff84:
MOV qword ptr [RSP + 0x8],R14
LAB_001bff89:
LEA RDI,[RSP + 0x8]
LEA RSI,[0x2bba2e]
LEA RDX,[0x2bba34]
CALL 0x001250b2
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x28]
MOV ESI,dword ptr [RAX + RBP*0x1 + 0x4]
LAB_001bffb0:
LEA RBX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x001365ca
LAB_001bffbd:
MOV RDI,R15
LEA RSI,[RSP + 0x8]
MOV RDX,RBX
CALL 0x0017e2b0
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,R12
JZ 0x001bffdc
CALL 0x0011f4a0
LAB_001bffdc:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x001bffeb
CALL 0x0011f4a0
LAB_001bffeb:
MOV qword ptr [RSP + 0x8],R14
LAB_001bfff0:
LEA RDI,[RSP + 0x8]
LEA RSI,[0x2d631c]
LEA RDX,[0x2d6327]
CALL 0x001250b2
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX + RBP*0x1 + 0x18]
MOV AL,byte ptr [RAX + 0x48]
LEA RSI,[0x2c77ca]
TEST AL,AL
LEA RBX,[RSP + 0x30]
JNZ 0x001c0032
LEA RSI,[0x29a5a9]
LAB_001c0032:
LEA RDX,[RSI + 0x19]
TEST AL,AL
MOV qword ptr [RSP + 0x30],R12
CMOVZ RDX,RSI
LAB_001c0041:
MOV RDI,RBX
CALL 0x001250b2
LAB_001c0049:
MOV RDI,R15
LEA RSI,[RSP + 0x8]
MOV RDX,RBX
CALL 0x0017e2b0
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,R12
JZ 0x001c0068
CALL 0x0011f4a0
LAB_001c0068:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x001c0077
CALL 0x0011f4a0
LAB_001c0077:
TEST RBP,RBP
JZ 0x001c008b
LAB_001c007c:
MOV RDI,R15
LEA RSI,[0x2a016f]
CALL 0x00139938
LAB_001c008b:
MOV R14,qword ptr [RSP]
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x28]
ADD RAX,RBP
MOV qword ptr [RSP + 0x8],RAX
LAB_001c009e:
MOV RDI,R15
LEA RSI,[0x2c667a]
LEA RDX,[RSP + 0x8]
CALL 0x001c0d8e
MOV RAX,qword ptr [R14]
MOV R14,qword ptr [RAX + 0x28]
MOV EAX,dword ptr [R14 + RBP*0x1 + 0x4]
ADD R14,RBP
MOV R12,R14
MOV RCX,qword ptr [RSP + 0x88]
CMP EAX,dword ptr [RCX + 0x4]
JL 0x001c00d4
MOV R12,RCX
LAB_001c00d4:
MOV RCX,qword ptr [RSP + 0x28]
CMP EAX,dword ptr [RCX + 0x4]
JG 0x001c00e1
MOV R14,RCX
LAB_001c00e1:
LEA RDI,[RSP + 0x98]
CALL 0x0012e5e0
LEA RDI,[RSP + 0x98]
INC R13
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RAX]
MOVSXD RAX,dword ptr [RCX + 0x4]
ADD RBP,0x20
MOV qword ptr [RSP + 0x28],R14
MOV RDX,R12
CMP R13,RAX
JL 0x001bfef5
MOV RCX,qword ptr [RCX + 0x10]
CMP byte ptr [RCX + 0x3],0x3
JNZ 0x001c0153
TEST EAX,EAX
MOV R15,qword ptr [RSP]
JLE 0x001c015c
LAB_001c012b:
LEA RSI,[0x2a016f]
LEA RDI,[RSP + 0x50]
CALL 0x00139938
MOV R13,R12
JMP 0x001c015f
LAB_001c0141:
MOV RAX,qword ptr [RAX + 0x10]
CMP byte ptr [RAX + 0x3],0x3
MOV R14,R12
MOV R13,R12
JZ 0x001c015f
JMP 0x001c0176
LAB_001c0153:
MOV R13,R14
MOV R15,qword ptr [RSP]
JMP 0x001c0176
LAB_001c015c:
MOV R13,R12
LAB_001c015f:
MOV R12,R13
LEA RSI,[0x2c66a8]
LEA RDI,[RSP + 0x50]
CALL 0x00139938
MOV R13,R14
LAB_001c0176:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0026d136
LEA RSI,[0x2af07d]
LEA RDI,[RSP + 0x50]
CALL 0x00139938
LAB_001c0191:
LEA RDI,[RSP + 0x90]
MOV RSI,R12
CALL 0x001360eb
LAB_001c01a1:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
CALL 0x001360eb
LAB_001c01ae:
LEA RSI,[0x2c6757]
LEA RDI,[RSP + 0x50]
LEA RCX,[RSP + 0x90]
LEA R8,[RSP + 0x8]
MOV RDX,R15
CALL 0x001c0e36
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001c01e2
CALL 0x0011f4a0
LAB_001c01e2:
LEA RAX,[RSP + 0xa0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001c01f8
CALL 0x0011f4a0
LAB_001c01f8:
CMP byte ptr [R15 + 0x30],0x1
JNZ 0x001c0213
LAB_001c01ff:
LEA RSI,[0x2c6818]
LEA RDI,[RSP + 0x50]
MOV RDX,R15
CALL 0x001c0ce6
LAB_001c0213:
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [RAX + 0x10]
XOR EDX,EDX
CALL 0x00138ac3
CMP EAX,0x3
JZ 0x001c023b
LEA RSI,[0x2c686e]
LEA RDI,[RSP + 0x50]
CALL 0x00139938
LAB_001c023b:
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [RAX + 0x10]
XOR EDX,EDX
CALL 0x00138ac3
CMP EAX,0x3
JNZ 0x001c0263
LEA RSI,[0x2c68be]
LEA RDI,[RSP + 0x50]
CALL 0x00139938
LAB_001c0263:
LEA RSI,[0x2c68f7]
LEA RDI,[RSP + 0x50]
CALL 0x00139938
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [RAX + 0x10]
XOR EDX,EDX
CALL 0x00138ac3
CMP EAX,0x3
LEA RAX,[0x2c6a3c]
LEA RSI,[0x2c69e1]
CMOVZ RSI,RAX
LEA RDI,[RSP + 0x50]
CALL 0x00139938
LEA RSI,[0x2e2117]
LEA RDI,[RSP + 0x50]
CALL 0x00139938
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [RAX + 0x10]
XOR EDX,EDX
CALL 0x00138ac3
CMP EAX,0x3
LEA RAX,[0x2c6b56]
LEA RSI,[0x2c6a80]
CMOVZ RSI,RAX
LEA RDI,[RSP + 0x50]
CALL 0x00139938
LAB_001c02e7:
LEA RDI,[RSP + 0x58]
CALL 0x0012e5e0
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::compiler::cpp::EnumGenerator::GenerateDefinition(google::protobuf::io::Printer*)
*/
void __thiscall
google::protobuf::compiler::cpp::EnumGenerator::GenerateDefinition
(EnumGenerator *this,Printer *param_1)
{
char cVar1;
int iVar2;
EnumValueDescriptor *pEVar3;
char *pcVar4;
long lVar5;
char *pcVar6;
long lVar7;
EnumValueDescriptor *pEVar8;
EnumValueDescriptor *local_f0 [2];
EnumValueDescriptor local_e0 [16];
EnumValueDescriptor *local_d0;
int1 *local_c8 [2];
int1 local_b8 [16];
Printer *local_a8;
_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_a0 [48];
EnumValueDescriptor *local_70;
Printer *local_68;
_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_60 [8];
Printer local_58 [40];
local_a8 = param_1;
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_a0,(_Rb_tree *)(this + 0x38));
/* try { // try from 001bfea5 to 001bfec2 has its CatchHandler @ 001c0338 */
Formatter::operator()
((Formatter *)&local_a8,"enum ${1$$classname$$}$ : int {\n",(EnumDescriptor **)this);
io::Printer::Indent(local_a8);
lVar5 = *(long *)this;
pEVar3 = *(EnumValueDescriptor **)(lVar5 + 0x28);
if (*(int *)(lVar5 + 4) < 1) {
pEVar8 = pEVar3;
if (*(char *)(*(long *)(lVar5 + 0x10) + 3) != '\x03') goto LAB_001c0176;
}
else {
lVar5 = 0;
lVar7 = 0;
local_d0 = pEVar3;
do {
local_68 = local_a8;
/* try { // try from 001bff0a to 001bff13 has its CatchHandler @ 001c033e */
local_70 = pEVar3;
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_60,(_Rb_tree *)local_a0);
/* try { // try from 001bff1e to 001bff35 has its CatchHandler @ 001c0343 */
local_f0[0] = local_e0;
std::__cxx11::string::_M_construct<char_const*>(local_f0,"name","");
/* try { // try from 001bff49 to 001bff55 has its CatchHandler @ 001c0345 */
EnumValueName_abi_cxx11_
((cpp *)local_c8,(EnumValueDescriptor *)(*(long *)(*(long *)this + 0x28) + lVar5));
/* try { // try from 001bff56 to 001bff65 has its CatchHandler @ 001c0347 */
Formatter::Set<std::__cxx11::string>
((Formatter *)&local_68,(string *)local_f0,(string *)local_c8);
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0]);
}
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0]);
}
/* try { // try from 001bff89 to 001bffa0 has its CatchHandler @ 001c0349 */
local_f0[0] = local_e0;
std::__cxx11::string::_M_construct<char_const*>(local_f0,"number","");
/* try { // try from 001bffb0 to 001bffbc has its CatchHandler @ 001c034b */
Int32ToString_abi_cxx11_
((cpp *)local_c8,*(int *)(*(long *)(*(long *)this + 0x28) + 4 + lVar5));
/* try { // try from 001bffbd to 001bffcc has its CatchHandler @ 001c034d */
Formatter::Set<std::__cxx11::string>
((Formatter *)&local_68,(string *)local_f0,(string *)local_c8);
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0]);
}
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0]);
}
/* try { // try from 001bfff0 to 001c0007 has its CatchHandler @ 001c034f */
local_f0[0] = local_e0;
std::__cxx11::string::_M_construct<char_const*>(local_f0,"deprecation","");
cVar1 = *(char *)(*(long *)(*(long *)(*(long *)this + 0x28) + 0x18 + lVar5) + 0x48);
pcVar6 = "PROTOBUF_DEPRECATED_ENUM ";
if (cVar1 == '\0') {
pcVar6 = "";
}
pcVar4 = pcVar6 + 0x19;
if (cVar1 == '\0') {
pcVar4 = pcVar6;
}
/* try { // try from 001c0041 to 001c0048 has its CatchHandler @ 001c0351 */
local_c8[0] = local_b8;
std::__cxx11::string::_M_construct<char_const*>((string *)local_c8,pcVar6,pcVar4);
/* try { // try from 001c0049 to 001c0058 has its CatchHandler @ 001c0356 */
Formatter::Set<std::__cxx11::string>
((Formatter *)&local_68,(string *)local_f0,(string *)local_c8);
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0]);
}
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0]);
}
if (lVar5 != 0) {
/* try { // try from 001c007c to 001c008a has its CatchHandler @ 001c033c */
Formatter::operator()<>((Formatter *)&local_68,",\n");
}
local_f0[0] = (EnumValueDescriptor *)(*(long *)(*(long *)this + 0x28) + lVar5);
/* try { // try from 001c009e to 001c00b1 has its CatchHandler @ 001c037e */
Formatter::operator()
((Formatter *)&local_68,"${1$$prefix$$name$$}$ $deprecation$= $number$",local_f0);
iVar2 = *(int *)(*(long *)(*(long *)this + 0x28) + 4 + lVar5);
pEVar8 = (EnumValueDescriptor *)(*(long *)(*(long *)this + 0x28) + lVar5);
pEVar3 = pEVar8;
if (*(int *)(local_70 + 4) <= iVar2) {
pEVar3 = local_70;
}
if (iVar2 <= *(int *)(local_d0 + 4)) {
pEVar8 = local_d0;
}
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_60);
lVar7 = lVar7 + 1;
iVar2 = *(int *)(*(long *)this + 4);
lVar5 = lVar5 + 0x20;
local_d0 = pEVar8;
} while (lVar7 < iVar2);
if (*(char *)(*(long *)(*(long *)this + 0x10) + 3) != '\x03') goto LAB_001c0176;
if (0 < iVar2) {
/* try { // try from 001c012b to 001c0190 has its CatchHandler @ 001c033a */
Formatter::operator()<>((Formatter *)&local_a8,",\n");
}
}
Formatter::operator()<>
((Formatter *)&local_a8,
"$classname$_$prefix$INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<$int32$>::min(),\n$classname$_$prefix$INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<$int32$>::max()"
);
LAB_001c0176:
io::Printer::Outdent(local_a8);
Formatter::operator()<>((Formatter *)&local_a8,"\n};\n");
/* try { // try from 001c0191 to 001c01a0 has its CatchHandler @ 001c0336 */
EnumValueName_abi_cxx11_((cpp *)&local_68,pEVar3);
/* try { // try from 001c01a1 to 001c01ad has its CatchHandler @ 001c031b */
EnumValueName_abi_cxx11_((cpp *)local_f0,pEVar8);
/* try { // try from 001c01ae to 001c01ce has its CatchHandler @ 001c0303 */
Formatter::operator()
((Formatter *)&local_a8,
"$dllexport_decl $bool $classname$_IsValid(int value);\nconstexpr $classname$ ${1$$prefix$$short_name$_MIN$}$ = $prefix$$2$;\nconstexpr $classname$ ${1$$prefix$$short_name$_MAX$}$ = $prefix$$3$;\n"
,(EnumDescriptor **)this,(string *)&local_68,(string *)local_f0);
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0]);
}
if (local_68 != local_58) {
operator_delete(local_68);
}
if (this[0x30] == (EnumGenerator)0x1) {
/* try { // try from 001c01ff to 001c02e6 has its CatchHandler @ 001c033a */
Formatter::operator()
((Formatter *)&local_a8,
"constexpr int ${1$$prefix$$short_name$_ARRAYSIZE$}$ = $prefix$$short_name$_MAX + 1;\n\n"
,(EnumDescriptor **)this);
}
iVar2 = GetOptimizeFor(*(FileDescriptor **)(*(long *)this + 0x10),*(Options **)(this + 0x28),
(bool *)0x0);
if (iVar2 != 3) {
Formatter::operator()<>
((Formatter *)&local_a8,
"$dllexport_decl $const ::$proto_ns$::EnumDescriptor* $classname$_descriptor();\n");
}
iVar2 = GetOptimizeFor(*(FileDescriptor **)(*(long *)this + 0x10),*(Options **)(this + 0x28),
(bool *)0x0);
if (iVar2 == 3) {
Formatter::operator()<>
((Formatter *)&local_a8,"const std::string& $classname$_Name($classname$ value);\n");
}
Formatter::operator()<>
((Formatter *)&local_a8,
"template<typename T>\ninline const std::string& $classname$_Name(T enum_t_value) {\n static_assert(::std::is_same<T, $classname$>::value ||\n ::std::is_integral<T>::value,\n \"Incorrect type passed to function $classname$_Name.\");\n"
);
iVar2 = GetOptimizeFor(*(FileDescriptor **)(*(long *)this + 0x10),*(Options **)(this + 0x28),
(bool *)0x0);
pcVar6 =
" return ::$proto_ns$::internal::NameOfEnum(\n $classname$_descriptor(), enum_t_value);\n";
if (iVar2 == 3) {
pcVar6 = " return $classname$_Name(static_cast<$classname$>(enum_t_value));\n";
}
Formatter::operator()<>((Formatter *)&local_a8,pcVar6);
Formatter::operator()<>((Formatter *)&local_a8,"}\n");
iVar2 = GetOptimizeFor(*(FileDescriptor **)(*(long *)this + 0x10),*(Options **)(this + 0x28),
(bool *)0x0);
pcVar6 =
"inline bool $classname$_Parse(\n ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, $classname$* value) {\n return ::$proto_ns$::internal::ParseNamedEnum<$classname$>(\n $classname$_descriptor(), name, value);\n}\n"
;
if (iVar2 == 3) {
pcVar6 =
"bool $classname$_Parse(\n ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, $classname$* value);\n"
;
}
Formatter::operator()<>((Formatter *)&local_a8,pcVar6);
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_a0);
return;
}
|
|
18,619
|
LefDefParser::lefwMacroPinForeignStr(char const*, double, double, char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwMacroPinForeignStr(const char *name,
double xl,
double yl, // optional
const char *orient)
{ // optional
lefwObsoleteNum = LEFW_MACRO_PINFOREIGN;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (!lefwIsMacroPin)
return LEFW_BAD_ORDER;
if (versionNum >= 5.6)
return LEFW_OBSOLETE;
if (!name || name == 0 || *name == 0)
return LEFW_BAD_DATA;
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) " FOREIGN %s ", name);
if (xl || yl) {
encPrint(lefwFile, (char*) "STRUCTURE %.11g %.11g ", xl, yl);
if (orient && *orient != '\0')
encPrint(lefwFile, (char*) "%s ", orient);
} else if (orient && *orient != '\0') { // assume user has 0 0 for pt
encPrint(lefwFile, (char*) "STRUCTURE %.11g %.11g ", xl, yl);
encPrint(lefwFile, (char*) "%s ", orient);
}
encPrint(lefwFile, (char*) ";\n");
} else {
fprintf(lefwFile, " FOREIGN %s ", name);
if (xl || yl) {
fprintf(lefwFile, "STRUCTURE %.11g %.11g ", xl, yl);
if (orient && *orient != '\0')
fprintf(lefwFile, "%s ", orient);
} else if (orient && *orient != '\0') { // assume user has 0 0 for pt
fprintf(lefwFile, "STRUCTURE %.11g %.11g ", xl, yl);
fprintf(lefwFile, "%s ", orient);
}
fprintf(lefwFile, ";\n");
}
lefwLines++;
lefwState = LEFW_MACRO;
return LEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::lefwMacroPinForeignStr(char const*, double, double, char const*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movq %rsi, (%rsp)
movl $0x2d, 0x127c5(%rip) # 0x32d48
leaq 0x12876(%rip), %rax # 0x32e00
cmpq $0x0, (%rax)
jne 0x2059d
movl $0x1, 0x24(%rsp)
jmp 0x2085e
leaq 0x12ab0(%rip), %rax # 0x33054
cmpl $0x0, (%rax)
jne 0x205b6
movl $0x2, 0x24(%rsp)
jmp 0x2085e
leaq 0x12ae3(%rip), %rax # 0x330a0
cmpl $0x0, (%rax)
jne 0x205cf
movl $0x2, 0x24(%rsp)
jmp 0x2085e
movsd 0x12769(%rip), %xmm0 # 0x32d40
movsd 0x8c11(%rip), %xmm1 # 0x291f0
ucomisd %xmm1, %xmm0
jb 0x205f2
movl $0x7, 0x24(%rsp)
jmp 0x2085e
cmpq $0x0, 0x18(%rsp)
je 0x2060f
cmpq $0x0, 0x18(%rsp)
je 0x2060f
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2061c
movl $0x3, 0x24(%rsp)
jmp 0x2085e
cmpl $0x0, 0x12ac9(%rip) # 0x330ec
je 0x20731
leaq 0x127d0(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x18(%rsp), %rdx
leaq 0xb099(%rip), %rsi # 0x2b6d8
movb $0x0, %al
callq 0x289b0
movsd 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2066a
jp 0x2066a
movsd 0x8(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2066a
jp 0x2066a
jmp 0x206bf
leaq 0x1278f(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0xb063(%rip), %rsi # 0x2b6ea
movb $0x2, %al
callq 0x289b0
cmpq $0x0, (%rsp)
je 0x206bd
movq (%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x206bd
leaq 0x12758(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x9db9(%rip), %rsi # 0x2a46f
movb $0x0, %al
callq 0x289b0
jmp 0x20714
cmpq $0x0, (%rsp)
je 0x20712
movq (%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x20712
leaq 0x12727(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0xaffb(%rip), %rsi # 0x2b6ea
movb $0x2, %al
callq 0x289b0
leaq 0x12703(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x9d64(%rip), %rsi # 0x2a46f
movb $0x0, %al
callq 0x289b0
jmp 0x20714
leaq 0x126e5(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x982f(%rip), %rsi # 0x29f54
movb $0x0, %al
callq 0x289b0
jmp 0x20834
leaq 0x126c8(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x18(%rsp), %rdx
leaq 0xaf91(%rip), %rsi # 0x2b6d8
movb $0x0, %al
callq 0x1100
movsd 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x20772
jp 0x20772
movsd 0x8(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x20772
jp 0x20772
jmp 0x207c7
leaq 0x12687(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0xaf5b(%rip), %rsi # 0x2b6ea
movb $0x2, %al
callq 0x1100
cmpq $0x0, (%rsp)
je 0x207c5
movq (%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x207c5
leaq 0x12650(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x9cb1(%rip), %rsi # 0x2a46f
movb $0x0, %al
callq 0x1100
jmp 0x2081c
cmpq $0x0, (%rsp)
je 0x2081a
movq (%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x2081a
leaq 0x1261f(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0xaef3(%rip), %rsi # 0x2b6ea
movb $0x2, %al
callq 0x1100
leaq 0x125fb(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x9c5c(%rip), %rsi # 0x2a46f
movb $0x0, %al
callq 0x1100
jmp 0x2081c
leaq 0x125dd(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x9727(%rip), %rsi # 0x29f54
movb $0x0, %al
callq 0x1100
leaq 0x12811(%rip), %rax # 0x3304c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x12805(%rip), %rax # 0x3304c
movl %ecx, (%rax)
leaq 0x12800(%rip), %rax # 0x33050
movl $0x21, (%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
|
_ZN12LefDefParser22lefwMacroPinForeignStrEPKcddS1_:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
movsd [rsp+28h+var_18], xmm0
movsd [rsp+28h+var_20], xmm1
mov [rsp+28h+var_28], rsi
mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 2Dh ; '-'; LefDefParser::lefwObsoleteNum
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_2059D
mov [rsp+28h+var_4], 1
jmp loc_2085E
loc_2059D:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_205B6
mov [rsp+28h+var_4], 2
jmp loc_2085E
loc_205B6:
lea rax, _ZN12LefDefParser14lefwIsMacroPinE; LefDefParser::lefwIsMacroPin
cmp dword ptr [rax], 0
jnz short loc_205CF
mov [rsp+28h+var_4], 2
jmp loc_2085E
loc_205CF:
movsd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
movsd xmm1, cs:dbl_291F0
ucomisd xmm0, xmm1
jb short loc_205F2
mov [rsp+28h+var_4], 7
jmp loc_2085E
loc_205F2:
cmp [rsp+28h+var_10], 0
jz short loc_2060F
cmp [rsp+28h+var_10], 0
jz short loc_2060F
mov rax, [rsp+28h+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_2061C
loc_2060F:
mov [rsp+28h+var_4], 3
jmp loc_2085E
loc_2061C:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz loc_20731
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+28h+var_10]
lea rsi, aForeignS; " FOREIGN %s "
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
movsd xmm0, [rsp+28h+var_18]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_2066A
jp short loc_2066A
movsd xmm0, [rsp+28h+var_20]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_2066A
jp short loc_2066A
jmp short loc_206BF
loc_2066A:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+28h+var_18]
movsd xmm1, [rsp+28h+var_20]
lea rsi, aStructure11g11; "STRUCTURE %.11g %.11g "
mov al, 2
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
cmp [rsp+28h+var_28], 0
jz short loc_206BD
mov rax, [rsp+28h+var_28]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_206BD
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+28h+var_28]
lea rsi, aS+6; "%s "
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
loc_206BD:
jmp short loc_20714
loc_206BF:
cmp [rsp+28h+var_28], 0
jz short loc_20712
mov rax, [rsp+28h+var_28]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_20712
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+28h+var_18]
movsd xmm1, [rsp+28h+var_20]
lea rsi, aStructure11g11; "STRUCTURE %.11g %.11g "
mov al, 2
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+28h+var_28]
lea rsi, aS+6; "%s "
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
loc_20712:
jmp short $+2
loc_20714:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aDividercharS+11h; ";\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp loc_20834
loc_20731:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+28h+var_10]
lea rsi, aForeignS; " FOREIGN %s "
mov al, 0
call _fprintf
movsd xmm0, [rsp+28h+var_18]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_20772
jp short loc_20772
movsd xmm0, [rsp+28h+var_20]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_20772
jp short loc_20772
jmp short loc_207C7
loc_20772:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+28h+var_18]
movsd xmm1, [rsp+28h+var_20]
lea rsi, aStructure11g11; "STRUCTURE %.11g %.11g "
mov al, 2
call _fprintf
cmp [rsp+28h+var_28], 0
jz short loc_207C5
mov rax, [rsp+28h+var_28]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_207C5
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+28h+var_28]
lea rsi, aS+6; "%s "
mov al, 0
call _fprintf
loc_207C5:
jmp short loc_2081C
loc_207C7:
cmp [rsp+28h+var_28], 0
jz short loc_2081A
mov rax, [rsp+28h+var_28]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_2081A
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+28h+var_18]
movsd xmm1, [rsp+28h+var_20]
lea rsi, aStructure11g11; "STRUCTURE %.11g %.11g "
mov al, 2
call _fprintf
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+28h+var_28]
lea rsi, aS+6; "%s "
mov al, 0
call _fprintf
loc_2081A:
jmp short $+2
loc_2081C:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aDividercharS+11h; ";\n"
mov al, 0
call _fprintf
loc_20834:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 21h ; '!'
mov [rsp+28h+var_4], 0
loc_2085E:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long LefDefParser::lefwMacroPinForeignStr(
LefDefParser *this,
const char *a2,
double a3,
double a4,
const char *a5,
int a6,
int a7,
int a8)
{
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // ecx
int v13; // r8d
int v14; // r9d
LefDefParser::lefwObsoleteNum = 45;
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwIsMacroPin )
{
if ( *(double *)&LefDefParser::versionNum < 5.6 )
{
if ( this && *(_BYTE *)this )
{
if ( LefDefParser::lefwWriteEncrypt )
{
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" FOREIGN %s ",
(_DWORD)this,
a6,
a7,
a8);
if ( a3 == 0.0 && a4 == 0.0 )
{
if ( a2 && *a2 )
{
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)"STRUCTURE %.11g %.11g ",
v8,
v9,
v10,
v11);
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%s ", (_DWORD)a2, v12, v13, v14);
}
}
else
{
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"STRUCTURE %.11g %.11g ", v8, v9, v10, v11);
if ( a2 && *a2 )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%s ", (_DWORD)a2, v9, v10, v11);
}
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v8, v9, v10, v11);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " FOREIGN %s ", (const char *)this);
if ( a3 == 0.0 && a4 == 0.0 )
{
if ( a2 && *a2 )
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "STRUCTURE %.11g %.11g ", a3, a4);
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%s ", a2);
}
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "STRUCTURE %.11g %.11g ", a3, a4);
if ( a2 && *a2 )
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%s ", a2);
}
fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n");
}
++LefDefParser::lefwLines;
LefDefParser::lefwState = 33;
return 0;
}
else
{
return 3;
}
}
else
{
return 7;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
lefwMacroPinForeignStr:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOVSD qword ptr [RSP + 0x10],XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
MOV qword ptr [RSP],RSI
MOV dword ptr [0x00132d48],0x2d
LEA RAX,[0x132e00]
CMP qword ptr [RAX],0x0
JNZ 0x0012059d
MOV dword ptr [RSP + 0x24],0x1
JMP 0x0012085e
LAB_0012059d:
LEA RAX,[0x133054]
CMP dword ptr [RAX],0x0
JNZ 0x001205b6
MOV dword ptr [RSP + 0x24],0x2
JMP 0x0012085e
LAB_001205b6:
LEA RAX,[0x1330a0]
CMP dword ptr [RAX],0x0
JNZ 0x001205cf
MOV dword ptr [RSP + 0x24],0x2
JMP 0x0012085e
LAB_001205cf:
MOVSD XMM0,qword ptr [0x00132d40]
MOVSD XMM1,qword ptr [0x001291f0]
UCOMISD XMM0,XMM1
JC 0x001205f2
MOV dword ptr [RSP + 0x24],0x7
JMP 0x0012085e
LAB_001205f2:
CMP qword ptr [RSP + 0x18],0x0
JZ 0x0012060f
CMP qword ptr [RSP + 0x18],0x0
JZ 0x0012060f
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0012061c
LAB_0012060f:
MOV dword ptr [RSP + 0x24],0x3
JMP 0x0012085e
LAB_0012061c:
CMP dword ptr [0x001330ec],0x0
JZ 0x00120731
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x18]
LEA RSI,[0x12b6d8]
MOV AL,0x0
CALL 0x001289b0
MOVSD XMM0,qword ptr [RSP + 0x10]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x0012066a
JP 0x0012066a
MOVSD XMM0,qword ptr [RSP + 0x8]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x0012066a
JP 0x0012066a
JMP 0x001206bf
LAB_0012066a:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x8]
LEA RSI,[0x12b6ea]
MOV AL,0x2
CALL 0x001289b0
CMP qword ptr [RSP],0x0
JZ 0x001206bd
MOV RAX,qword ptr [RSP]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001206bd
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP]
LEA RSI,[0x12a46f]
MOV AL,0x0
CALL 0x001289b0
LAB_001206bd:
JMP 0x00120714
LAB_001206bf:
CMP qword ptr [RSP],0x0
JZ 0x00120712
MOV RAX,qword ptr [RSP]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00120712
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x8]
LEA RSI,[0x12b6ea]
MOV AL,0x2
CALL 0x001289b0
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP]
LEA RSI,[0x12a46f]
MOV AL,0x0
CALL 0x001289b0
LAB_00120712:
JMP 0x00120714
LAB_00120714:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x129f54]
MOV AL,0x0
CALL 0x001289b0
JMP 0x00120834
LAB_00120731:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x18]
LEA RSI,[0x12b6d8]
MOV AL,0x0
CALL 0x00101100
MOVSD XMM0,qword ptr [RSP + 0x10]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x00120772
JP 0x00120772
MOVSD XMM0,qword ptr [RSP + 0x8]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x00120772
JP 0x00120772
JMP 0x001207c7
LAB_00120772:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x8]
LEA RSI,[0x12b6ea]
MOV AL,0x2
CALL 0x00101100
CMP qword ptr [RSP],0x0
JZ 0x001207c5
MOV RAX,qword ptr [RSP]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001207c5
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP]
LEA RSI,[0x12a46f]
MOV AL,0x0
CALL 0x00101100
LAB_001207c5:
JMP 0x0012081c
LAB_001207c7:
CMP qword ptr [RSP],0x0
JZ 0x0012081a
MOV RAX,qword ptr [RSP]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0012081a
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x8]
LEA RSI,[0x12b6ea]
MOV AL,0x2
CALL 0x00101100
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP]
LEA RSI,[0x12a46f]
MOV AL,0x0
CALL 0x00101100
LAB_0012081a:
JMP 0x0012081c
LAB_0012081c:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x129f54]
MOV AL,0x0
CALL 0x00101100
LAB_00120834:
LEA RAX,[0x13304c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x13304c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x133050]
MOV dword ptr [RAX],0x21
MOV dword ptr [RSP + 0x24],0x0
LAB_0012085e:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
/* LefDefParser::lefwMacroPinForeignStr(char const*, double, double, char const*) */
int4
LefDefParser::lefwMacroPinForeignStr(char *param_1,double param_2,double param_3,char *param_4)
{
int4 local_4;
lefwObsoleteNum = 0x2d;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if (lefwIsMacroPin == 0) {
local_4 = 2;
}
else if (DAT_001291f0 <= versionNum) {
local_4 = 7;
}
else if (((param_1 == (char *)0x0) || (param_1 == (char *)0x0)) || (*param_1 == '\0')) {
local_4 = 3;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," FOREIGN %s ",param_1);
if (((param_2 != 0.0) || (NAN(param_2))) || ((param_3 != 0.0 || (NAN(param_3))))) {
fprintf(lefwFile,"STRUCTURE %.11g %.11g ",param_2,param_3);
if ((param_4 != (char *)0x0) && (*param_4 != '\0')) {
fprintf(lefwFile,"%s ",param_4);
}
}
else if ((param_4 != (char *)0x0) && (*param_4 != '\0')) {
fprintf(lefwFile,"STRUCTURE %.11g %.11g ",param_2,param_3);
fprintf(lefwFile,"%s ",param_4);
}
fprintf(lefwFile,";\n");
}
else {
encPrint(lefwFile," FOREIGN %s ",param_1);
if ((((param_2 != 0.0) || (NAN(param_2))) || (param_3 != 0.0)) || (NAN(param_3))) {
encPrint(lefwFile,"STRUCTURE %.11g %.11g ",param_2,param_3);
if ((param_4 != (char *)0x0) && (*param_4 != '\0')) {
encPrint(lefwFile,"%s ",param_4);
}
}
else if ((param_4 != (char *)0x0) && (*param_4 != '\0')) {
encPrint(lefwFile,"STRUCTURE %.11g %.11g ",param_2,param_3);
encPrint(lefwFile,"%s ",param_4);
}
encPrint(lefwFile,";\n");
}
lefwLines = lefwLines + 1;
lefwState = 0x21;
local_4 = 0;
}
return local_4;
}
|
|
18,620
|
find_longest_bitstream
|
eloqsql/storage/maria/ma_packrec.c
|
static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length=1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length=find_longest_bitstream(next, end)+1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
}
|
O0
|
c
|
find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0x3c2a7
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0x3c284
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x3c294
jmp 0x3c286
jmp 0x3c288
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0x3c332
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3c230
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0x3c32c
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0x3c2f0
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x3c2fd
jmp 0x3c2f2
jmp 0x3c2f4
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0x3c332
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3c230
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jbe 0x3c320
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x3c326
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
find_longest_bitstream:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 1
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_3C2A7
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
ja short loc_3C284
mov rax, [rbp+var_28]
cmp rax, [rbp+var_10]
jnz short loc_3C294
loc_3C284:
jmp short $+2
loc_3C286:
jmp short $+2
loc_3C288:
mov [rbp+var_4], 200h
jmp loc_3C332
loc_3C294:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
call find_longest_bitstream
add eax, 1
mov [rbp+var_1C], eax
loc_3C2A7:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_3C32C
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
ja short loc_3C2F0
mov rax, [rbp+var_30]
cmp rax, [rbp+var_10]
jnz short loc_3C2FD
loc_3C2F0:
jmp short $+2
loc_3C2F2:
jmp short $+2
loc_3C2F4:
mov [rbp+var_4], 200h
jmp short loc_3C332
loc_3C2FD:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
call find_longest_bitstream
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jbe short loc_3C320
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
jmp short loc_3C326
loc_3C320:
mov eax, [rbp+var_20]
mov [rbp+var_34], eax
loc_3C326:
mov eax, [rbp+var_34]
mov [rbp+var_1C], eax
loc_3C32C:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_3C332:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long find_longest_bitstream(unsigned __int16 *a1, unsigned long long a2)
{
unsigned __int16 *v4; // [rsp+10h] [rbp-30h]
unsigned __int16 *v5; // [rsp+18h] [rbp-28h]
unsigned int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
unsigned __int16 *v8; // [rsp+30h] [rbp-10h]
v7 = 1;
if ( (*a1 & 0x8000) != 0 )
{
LABEL_6:
v8 = a1 + 1;
if ( (a1[1] & 0x8000) == 0 )
{
v4 = &v8[*v8];
if ( (unsigned long long)v4 > a2 || v4 == v8 )
return 512;
v6 = find_longest_bitstream(v4, a2) + 1;
if ( v7 <= v6 )
return v6;
else
return v7;
}
return v7;
}
v5 = &a1[*a1];
if ( (unsigned long long)v5 <= a2 && v5 != a1 )
{
v7 = find_longest_bitstream(v5, a2) + 1;
goto LABEL_6;
}
return 512;
}
|
find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x0013c2a7
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x0013c284
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x0013c294
LAB_0013c284:
JMP 0x0013c286
LAB_0013c286:
JMP 0x0013c288
LAB_0013c288:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x0013c332
LAB_0013c294:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013c230
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_0013c2a7:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x0013c32c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x0013c2f0
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x0013c2fd
LAB_0013c2f0:
JMP 0x0013c2f2
LAB_0013c2f2:
JMP 0x0013c2f4
LAB_0013c2f4:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x0013c332
LAB_0013c2fd:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013c230
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JBE 0x0013c320
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0013c326
LAB_0013c320:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x34],EAX
LAB_0013c326:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0013c32c:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0013c332:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
uint find_longest_bitstream(ushort *param_1,ushort *param_2)
{
int iVar1;
ushort *puVar2;
uint local_3c;
uint local_24;
local_24 = 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_24 = iVar1 + 1;
}
param_1 = param_1 + 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_3c = iVar1 + 1;
if (local_3c < local_24) {
local_3c = local_24;
}
local_24 = local_3c;
}
return local_24;
}
|
|
18,621
|
scan_one_character
|
eloqsql/strings/ctype.c
|
static size_t
scan_one_character(const char *s, const char *e, my_wc_t *wc)
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
if (s >= e)
return 0;
/* Escape sequence: \uXXXX */
if (s[0] == '\\' && s + 2 < e && s[1] == 'u' && my_isxdigit(cs, s[2]))
{
size_t len= 3; /* We have at least one digit */
for (s+= 3; s < e && my_isxdigit(cs, s[0]); s++, len++)
{
}
wc[0]= 0;
return len;
}
else if ((int8) s[0] > 0) /* 7-bit character */
{
wc[0]= 0;
return 1;
}
else /* Non-escaped character */
{
int rc= my_ci_mb_wc(cs, wc, (uchar *) s, (uchar *) e);
if (rc > 0)
return (size_t) rc;
}
return 0;
}
|
O0
|
c
|
scan_one_character:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x312525(%rip), %rax # 0x37fa70
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x6d566
movq $0x0, -0x8(%rbp)
jmp 0x6d698
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x6d637
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jae 0x6d637
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x75, %eax
jne 0x6d637
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6d637
movq $0x3, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x35(%rbp)
jae 0x6d5fd
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x6d606
jmp 0x6d622
jmp 0x6d608
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6d5cc
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6d698
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jle 0x6d658
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x6d698
movq -0x28(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jle 0x6d68c
movslq -0x34(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6d698
jmp 0x6d68e
jmp 0x6d690
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
scan_one_character:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
lea rax, my_charset_utf8mb3_general_ci
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jb short loc_6D566
mov [rbp+var_8], 0
jmp loc_6D698
loc_6D566:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_6D637
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jnb loc_6D637
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
cmp eax, 75h ; 'u'
jnz loc_6D637
mov rax, [rbp+var_28]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
jz short loc_6D637
mov [rbp+var_30], 3
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_6D5CC:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_35], al
jnb short loc_6D5FD
mov rax, [rbp+var_28]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
setnz al
mov [rbp+var_35], al
loc_6D5FD:
mov al, [rbp+var_35]
test al, 1
jnz short loc_6D606
jmp short loc_6D622
loc_6D606:
jmp short $+2
loc_6D608:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_6D5CC
loc_6D622:
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp short loc_6D698
loc_6D637:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jle short loc_6D658
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_8], 1
jmp short loc_6D698
loc_6D658:
mov rax, [rbp+var_28]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
call rax
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jle short loc_6D68C
movsxd rax, [rbp+var_34]
mov [rbp+var_8], rax
jmp short loc_6D698
loc_6D68C:
jmp short $+2
loc_6D68E:
jmp short $+2
loc_6D690:
mov [rbp+var_8], 0
loc_6D698:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long scan_one_character(char *a1, unsigned long long a2, _QWORD *a3)
{
bool v4; // [rsp+Bh] [rbp-35h]
int v5; // [rsp+Ch] [rbp-34h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned __int8 *i; // [rsp+30h] [rbp-10h]
if ( (unsigned long long)a1 >= a2 )
return 0LL;
if ( *a1 == 92
&& (unsigned long long)(a1 + 2) < a2
&& a1[1] == 117
&& (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + (unsigned __int8)a1[2] + 1LL) & 0x80) != 0 )
{
v6 = 3LL;
for ( i = (unsigned __int8 *)(a1 + 3); ; ++i )
{
v4 = 0;
if ( (unsigned long long)i < a2 )
v4 = (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *i + 1LL) & 0x80) != 0;
if ( !v4 )
break;
++v6;
}
*a3 = 0LL;
return v6;
}
else if ( *a1 <= 0 )
{
v5 = (*(long long ( **)(unsigned int *, _QWORD *, char *, unsigned long long))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
a3,
a1,
a2);
if ( v5 <= 0 )
return 0LL;
else
return v5;
}
else
{
*a3 = 0LL;
return 1LL;
}
}
|
scan_one_character:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LEA RAX,[0x47fa70]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x0016d566
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0016d698
LAB_0016d566:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x0016d637
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0016d637
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x75
JNZ 0x0016d637
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016d637
MOV qword ptr [RBP + -0x30],0x3
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_0016d5cc:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x35],AL
JNC 0x0016d5fd
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x35],AL
LAB_0016d5fd:
MOV AL,byte ptr [RBP + -0x35]
TEST AL,0x1
JNZ 0x0016d606
JMP 0x0016d622
LAB_0016d606:
JMP 0x0016d608
LAB_0016d608:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0016d5cc
LAB_0016d622:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0016d698
LAB_0016d637:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JLE 0x0016d658
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV qword ptr [RBP + -0x8],0x1
JMP 0x0016d698
LAB_0016d658:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JLE 0x0016d68c
MOVSXD RAX,dword ptr [RBP + -0x34]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0016d698
LAB_0016d68c:
JMP 0x0016d68e
LAB_0016d68e:
JMP 0x0016d690
LAB_0016d690:
MOV qword ptr [RBP + -0x8],0x0
LAB_0016d698:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long scan_one_character(byte *param_1,byte *param_2,int8 *param_3)
{
int iVar1;
bool bVar2;
long local_38;
byte *local_18;
long local_10;
if (param_1 < param_2) {
if ((((*param_1 == 0x5c) && (param_1 + 2 < param_2)) && (param_1[1] == 0x75)) &&
((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)param_1[2]) & 0x80) != 0)) {
local_38 = 3;
local_18 = param_1 + 3;
while( true ) {
bVar2 = false;
if (local_18 < param_2) {
bVar2 = (*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*local_18) & 0x80) !=
0;
}
if (!bVar2) break;
local_18 = local_18 + 1;
local_38 = local_38 + 1;
}
*param_3 = 0;
local_10 = local_38;
}
else if ((char)*param_1 < '\x01') {
iVar1 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,param_3,param_1,param_2);
if (iVar1 < 1) {
local_10 = 0;
}
else {
local_10 = (long)iVar1;
}
}
else {
*param_3 = 0;
local_10 = 1;
}
}
else {
local_10 = 0;
}
return local_10;
}
|
|
18,622
|
ma_get_prev_key
|
eloqsql/storage/maria/ma_search.c
|
static my_bool _ma_get_prev_key(MARIA_KEY *key, MARIA_PAGE *ma_page,
uchar *keypos)
{
uint page_flag, nod_flag;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_get_prev_key");
page_flag= ma_page->flag;
nod_flag= ma_page->node;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) &&
! (page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
bmove(key->data, keypos - keyinfo->keylength - nod_flag,
keyinfo->keylength);
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= keyinfo->keylength - key->ref_length;
key->flag= 0;
DBUG_RETURN(0);
}
else
{
uchar *page;
page= ma_page->buff + keyinfo->share->keypage_header + nod_flag;
key->data[0]= 0; /* safety */
DBUG_ASSERT(page != keypos);
while (page < keypos)
{
if (! (*keyinfo->get_key)(key, page_flag, nod_flag, &page))
{
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(1);
}
}
}
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_get_prev_key:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xa2(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0x6ec74
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x6ec74
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movl -0x28(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movl %eax, %edx
callq 0x2a130
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x740(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x10(%rbp), %rax
subl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x6ecef
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
movl -0x28(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x0, (%rax)
jmp 0x6eca2
jmp 0x6eca4
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x6ece7
movq -0x30(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
leaq -0x38(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x6ece5
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movl $0x7e, %esi
callq 0x33910
movb $0x1, -0x1(%rbp)
jmp 0x6ecef
jmp 0x6eca4
jmp 0x6ece9
jmp 0x6eceb
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ma_get_prev_key:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov [rbp+var_28], eax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0A2h]
and eax, 28h
cmp eax, 0
jnz loc_6EC74
mov eax, [rbp+var_24]
and eax, 2
cmp eax, 0
jnz short loc_6EC74
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
movsxd rcx, eax
xor eax, eax
sub rax, rcx
add rsi, rax
mov eax, [rbp+var_28]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rsi, rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
mov edx, eax
call _memmove
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, [rax+740h]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov rax, [rbp+var_30]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_10]
sub ecx, [rax+14h]
mov rax, [rbp+var_10]
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+18h], 0
mov [rbp+var_1], 0
jmp short loc_6ECEF
loc_6EC74:
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
mov ecx, [rcx+744h]
add rax, rcx
mov ecx, [rbp+var_28]
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov byte ptr [rax], 0
jmp short $+2
loc_6ECA2:
jmp short $+2
loc_6ECA4:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jnb short loc_6ECE7
mov rax, [rbp+var_30]
mov rax, [rax+0E0h]
mov rdi, [rbp+var_10]
mov esi, [rbp+var_24]
mov edx, [rbp+var_28]
lea rcx, [rbp+var_38]
call rax
cmp eax, 0
jnz short loc_6ECE5
mov rax, [rbp+var_30]
mov rdi, [rax]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error_with_share
mov [rbp+var_1], 1
jmp short loc_6ECEF
loc_6ECE5:
jmp short loc_6ECA4
loc_6ECE7:
jmp short $+2
loc_6ECE9:
jmp short $+2
loc_6ECEB:
mov [rbp+var_1], 0
loc_6ECEF:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char ma_get_prev_key(long long a1, long long a2, unsigned long long a3)
{
long long v3; // rdx
long long v4; // rcx
long long v5; // r8
int v6; // r9d
unsigned long long v8; // [rsp+8h] [rbp-38h] BYREF
long long v9; // [rsp+10h] [rbp-30h]
unsigned int v10; // [rsp+18h] [rbp-28h]
unsigned int v11; // [rsp+1Ch] [rbp-24h]
unsigned long long v12; // [rsp+20h] [rbp-20h]
long long v13; // [rsp+28h] [rbp-18h]
long long v14; // [rsp+30h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v9 = *(_QWORD *)(a1 + 8);
v11 = *(_DWORD *)(a2 + 44);
v10 = *(_DWORD *)(a2 + 40);
if ( (*(_WORD *)(v9 + 162) & 0x28) != 0 || (v11 & 2) != 0 )
{
v8 = v10 + *(unsigned int *)(*(_QWORD *)v9 + 1860LL) + *(_QWORD *)(v13 + 16);
**(_BYTE **)v14 = 0;
while ( v8 < v12 )
{
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(v14, v11, v10, &v8) )
{
ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v3, v4, v5, v6);
return 1;
}
}
return 0;
}
else
{
memmove(*(_QWORD *)v14, v12 - *(unsigned __int16 *)(v9 + 170) - v10, *(unsigned __int16 *)(v9 + 170));
*(_DWORD *)(v14 + 20) = *(_DWORD *)(*(_QWORD *)v9 + 1856LL);
*(_DWORD *)(v14 + 16) = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(v14 + 20);
*(_DWORD *)(v14 + 24) = 0;
return 0;
}
}
|
_ma_get_prev_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xa2]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x0016ec74
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x0016ec74
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOVSXD RCX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x28]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV EDX,EAX
CALL 0x0012a130
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x740]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x10]
SUB ECX,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0016ecef
LAB_0016ec74:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV byte ptr [RAX],0x0
JMP 0x0016eca2
LAB_0016eca2:
JMP 0x0016eca4
LAB_0016eca4:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0016ece7
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x38]
CALL RAX
CMP EAX,0x0
JNZ 0x0016ece5
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX]
MOV ESI,0x7e
CALL 0x00133910
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016ecef
LAB_0016ece5:
JMP 0x0016eca4
LAB_0016ece7:
JMP 0x0016ece9
LAB_0016ece9:
JMP 0x0016eceb
LAB_0016eceb:
MOV byte ptr [RBP + -0x1],0x0
LAB_0016ecef:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 _ma_get_prev_key(int8 *param_1,long param_2,ulong param_3)
{
int iVar1;
ulong local_40;
long *local_38;
uint local_30;
uint local_2c;
ulong local_28;
long local_20;
int8 *local_18;
int1 local_9;
local_38 = (long *)param_1[1];
local_2c = *(uint *)(param_2 + 0x2c);
local_30 = *(uint *)(param_2 + 0x28);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (((*(ushort *)((long)local_38 + 0xa2) & 0x28) == 0) && ((local_2c & 2) == 0)) {
memmove((void *)*param_1,
(void *)((param_3 - (long)(int)(uint)*(ushort *)((long)local_38 + 0xaa)) -
(ulong)local_30),(ulong)*(ushort *)((long)local_38 + 0xaa));
*(int4 *)((long)local_18 + 0x14) = *(int4 *)(*local_38 + 0x740);
*(uint *)(local_18 + 2) =
(uint)*(ushort *)((long)local_38 + 0xaa) - *(int *)((long)local_18 + 0x14);
*(int4 *)(local_18 + 3) = 0;
local_9 = 0;
}
else {
local_40 = *(long *)(param_2 + 0x10) + (ulong)*(uint *)(*local_38 + 0x744) + (ulong)local_30;
*(int1 *)*param_1 = 0;
do {
if (local_28 <= local_40) {
return 0;
}
iVar1 = (*(code *)local_38[0x1c])(local_18,local_2c,local_30,&local_40);
} while (iVar1 != 0);
_ma_set_fatal_error_with_share(*local_38,0x7e);
local_9 = 1;
}
return local_9;
}
|
|
18,623
|
ma_ck_write
|
eloqsql/storage/maria/ma_write.c
|
my_bool _ma_ck_write(MARIA_HA *info, MARIA_KEY *key)
{
DBUG_ENTER("_ma_ck_write");
if (info->bulk_insert &&
is_tree_inited(&info->bulk_insert[key->keyinfo->key_nr]))
{
DBUG_RETURN(_ma_ck_write_tree(info, key));
}
DBUG_RETURN(_ma_ck_write_btree(info, key));
}
|
O0
|
c
|
ma_ck_write:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x310(%rax)
je 0x825fc
movq -0x10(%rbp), %rax
movq 0x310(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzbl 0xa5(%rcx), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x825fc
jmp 0x825ea
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x82620
movb %al, -0x1(%rbp)
jmp 0x8260e
jmp 0x825fe
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x826d0
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ma_ck_write:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+310h], 0
jz short loc_825FC
mov rax, [rbp+var_10]
mov rax, [rax+310h]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
movzx ecx, byte ptr [rcx+0A5h]
imul rcx, 298h
add rax, rcx
cmp qword ptr [rax], 0
jz short loc_825FC
jmp short $+2
loc_825EA:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _ma_ck_write_tree
mov [rbp+var_1], al
jmp short loc_8260E
loc_825FC:
jmp short $+2
loc_825FE:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _ma_ck_write_btree
mov [rbp+var_1], al
loc_8260E:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char ma_ck_write(long long a1, long long a2)
{
if ( *(_QWORD *)(a1 + 784)
&& *(_QWORD *)(664LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL) + *(_QWORD *)(a1 + 784)) )
{
return ma_ck_write_tree(a1, a2);
}
else
{
return ma_ck_write_btree(a1, a2);
}
}
|
_ma_ck_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x310],0x0
JZ 0x001825fc
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x310]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
MOVZX ECX,byte ptr [RCX + 0xa5]
IMUL RCX,RCX,0x298
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JZ 0x001825fc
JMP 0x001825ea
LAB_001825ea:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00182620
MOV byte ptr [RBP + -0x1],AL
JMP 0x0018260e
LAB_001825fc:
JMP 0x001825fe
LAB_001825fe:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001826d0
MOV byte ptr [RBP + -0x1],AL
LAB_0018260e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 _ma_ck_write(long param_1,long param_2)
{
int1 local_9;
if ((*(long *)(param_1 + 0x310) == 0) ||
(*(long *)(*(long *)(param_1 + 0x310) + (ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5) * 0x298
) == 0)) {
local_9 = _ma_ck_write_btree(param_1,param_2);
}
else {
local_9 = _ma_ck_write_tree(param_1,param_2);
}
return local_9;
}
|
|
18,624
|
mysql_data_seek
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void STDCALL
mysql_data_seek(MYSQL_RES *result, unsigned long long row)
{
MYSQL_ROWS *tmp=0;
if (result->data)
for (tmp=result->data->data; row-- && tmp ; tmp = tmp->next) ;
result->current_row=0;
result->data_cursor = tmp;
}
|
O0
|
c
|
mysql_data_seek:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3a6ed
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x19(%rbp)
je 0x3a6d3
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x3a6dc
jmp 0x3a6eb
jmp 0x3a6de
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3a6ae
jmp 0x3a6ed
movq -0x8(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_data_seek:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+18h], 0
jz short loc_3A6ED
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov rax, [rax]
mov [rbp+var_18], rax
loc_3A6AE:
mov rcx, [rbp+var_10]
mov rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
xor eax, eax
cmp rcx, 0
mov [rbp+var_19], al
jz short loc_3A6D3
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_19], al
loc_3A6D3:
mov al, [rbp+var_19]
test al, 1
jnz short loc_3A6DC
jmp short loc_3A6EB
loc_3A6DC:
jmp short $+2
loc_3A6DE:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_3A6AE
loc_3A6EB:
jmp short $+2
loc_3A6ED:
mov rax, [rbp+var_8]
mov qword ptr [rax+68h], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+20h], rcx
pop rbp
retn
|
long long mysql_data_seek(long long a1, long long a2)
{
long long v2; // rcx
long long result; // rax
bool v4; // [rsp+1h] [rbp-19h]
_QWORD *i; // [rsp+2h] [rbp-18h]
i = 0LL;
if ( *(_QWORD *)(a1 + 24) )
{
for ( i = **(_QWORD ***)(a1 + 24); ; i = (_QWORD *)*i )
{
v2 = a2--;
v4 = 0;
if ( v2 )
v4 = i != 0LL;
if ( !v4 )
break;
}
}
*(_QWORD *)(a1 + 104) = 0LL;
result = a1;
*(_QWORD *)(a1 + 32) = i;
return result;
}
|
mysql_data_seek:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013a6ed
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_0013a6ae:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x0013a6d3
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_0013a6d3:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0013a6dc
JMP 0x0013a6eb
LAB_0013a6dc:
JMP 0x0013a6de
LAB_0013a6de:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a6ae
LAB_0013a6eb:
JMP 0x0013a6ed
LAB_0013a6ed:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
POP RBP
RET
|
void mysql_data_seek(long param_1,long param_2)
{
int8 *local_20;
long local_18;
local_20 = (int8 *)0x0;
if (*(long *)(param_1 + 0x18) != 0) {
local_18 = param_2;
for (local_20 = (int8 *)**(int8 **)(param_1 + 0x18);
local_18 != 0 && local_20 != (int8 *)0x0; local_20 = (int8 *)*local_20) {
local_18 = local_18 + -1;
}
}
*(int8 *)(param_1 + 0x68) = 0;
*(int8 **)(param_1 + 0x20) = local_20;
return;
}
|
|
18,625
|
LefDefParser::defrData::reload_buffer()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/def_keywords.cpp
|
void
defrData::reload_buffer() {
int nb = 0;
if (first_buffer) {
first_buffer = 0;
if (settings->ReadFunction) {
if ((nb = (*settings->ReadFunction)(File, buffer, 4)) != 4) {
next = NULL;
return;
}
} else {
if ((nb = fread(buffer, 1, 4, File)) != 4) {
next = NULL;
return;
}
}
}
if (nb == 0) {
if (settings->ReadFunction)
nb = (*settings->ReadFunction)(File, buffer, IN_BUF_SIZE);
else
/* This is a normal file so just read some bytes. */
nb = fread(buffer, 1, IN_BUF_SIZE, File);
}
if (nb <= 0) {
next = NULL;
} else {
next = buffer;
last = buffer + nb - 1;
}
}
|
O0
|
cpp
|
LefDefParser::defrData::reload_buffer():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x0, 0xe8(%rax)
je 0x2458b
movq (%rsp), %rax
movl $0x0, 0xe8(%rax)
movq 0x9250(%rax), %rax
cmpq $0x0, 0xb8(%rax)
je 0x24549
movq (%rsp), %rsi
movq 0x9250(%rsi), %rax
movq 0xb8(%rax), %rax
movq 0x92c8(%rsi), %rdi
addq $0x5124, %rsi # imm = 0x5124
movl $0x4, %edx
callq *%rax
movl %eax, 0xc(%rsp)
cmpl $0x4, %eax
je 0x24547
movq (%rsp), %rax
movq $0x0, 0x40(%rax)
jmp 0x2463f
jmp 0x24589
movq (%rsp), %rax
movq %rax, %rdi
addq $0x5124, %rdi # imm = 0x5124
movq 0x92c8(%rax), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x7330
movl %eax, 0xc(%rsp)
cmpl $0x4, %eax
je 0x24587
movq (%rsp), %rax
movq $0x0, 0x40(%rax)
jmp 0x2463f
jmp 0x24589
jmp 0x2458b
cmpl $0x0, 0xc(%rsp)
jne 0x245fe
movq (%rsp), %rax
movq 0x9250(%rax), %rax
cmpq $0x0, 0xb8(%rax)
je 0x245d4
movq (%rsp), %rsi
movq 0x9250(%rsi), %rax
movq 0xb8(%rax), %rax
movq 0x92c8(%rsi), %rdi
addq $0x5124, %rsi # imm = 0x5124
movl $0x4000, %edx # imm = 0x4000
callq *%rax
movl %eax, 0xc(%rsp)
jmp 0x245fc
movq (%rsp), %rax
movq %rax, %rdi
addq $0x5124, %rdi # imm = 0x5124
movq 0x92c8(%rax), %rcx
movl $0x1, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x7330
movl %eax, 0xc(%rsp)
jmp 0x245fe
cmpl $0x0, 0xc(%rsp)
jg 0x24613
movq (%rsp), %rax
movq $0x0, 0x40(%rax)
jmp 0x2463f
movq (%rsp), %rax
movq %rax, %rcx
addq $0x5124, %rcx # imm = 0x5124
movq %rcx, 0x40(%rax)
movq %rax, %rcx
addq $0x5124, %rcx # imm = 0x5124
movslq 0xc(%rsp), %rdx
addq %rdx, %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser8defrData13reload_bufferEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
mov [rsp+18h+var_C], 0
cmp dword ptr [rax+0E8h], 0
jz loc_2458B
mov rax, [rsp+18h+var_18]
mov dword ptr [rax+0E8h], 0
mov rax, [rax+9250h]
cmp qword ptr [rax+0B8h], 0
jz short loc_24549
mov rsi, [rsp+18h+var_18]
mov rax, [rsi+9250h]
mov rax, [rax+0B8h]
mov rdi, [rsi+92C8h]
add rsi, 5124h
mov edx, 4
call rax
mov [rsp+18h+var_C], eax
cmp eax, 4
jz short loc_24547
mov rax, [rsp+18h+var_18]
mov qword ptr [rax+40h], 0
jmp loc_2463F
loc_24547:
jmp short loc_24589
loc_24549:
mov rax, [rsp+18h+var_18]
mov rdi, rax
add rdi, 5124h
mov rcx, [rax+92C8h]
mov esi, 1
mov edx, 4
call _fread
mov [rsp+18h+var_C], eax
cmp eax, 4
jz short loc_24587
mov rax, [rsp+18h+var_18]
mov qword ptr [rax+40h], 0
jmp loc_2463F
loc_24587:
jmp short $+2
loc_24589:
jmp short $+2
loc_2458B:
cmp [rsp+18h+var_C], 0
jnz short loc_245FE
mov rax, [rsp+18h+var_18]
mov rax, [rax+9250h]
cmp qword ptr [rax+0B8h], 0
jz short loc_245D4
mov rsi, [rsp+18h+var_18]
mov rax, [rsi+9250h]
mov rax, [rax+0B8h]
mov rdi, [rsi+92C8h]
add rsi, 5124h
mov edx, 4000h
call rax
mov [rsp+18h+var_C], eax
jmp short loc_245FC
loc_245D4:
mov rax, [rsp+18h+var_18]
mov rdi, rax
add rdi, 5124h
mov rcx, [rax+92C8h]
mov esi, 1
mov edx, 4000h
call _fread
mov [rsp+18h+var_C], eax
loc_245FC:
jmp short $+2
loc_245FE:
cmp [rsp+18h+var_C], 0
jg short loc_24613
mov rax, [rsp+18h+var_18]
mov qword ptr [rax+40h], 0
jmp short loc_2463F
loc_24613:
mov rax, [rsp+18h+var_18]
mov rcx, rax
add rcx, 5124h
mov [rax+40h], rcx
mov rcx, rax
add rcx, 5124h
movsxd rdx, [rsp+18h+var_C]
add rcx, rdx
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+30h], rcx
loc_2463F:
add rsp, 18h
retn
|
LefDefParser::defrData * LefDefParser::defrData::reload_buffer(LefDefParser::defrData *this)
{
LefDefParser::defrData *result; // rax
int v2; // [rsp+Ch] [rbp-Ch]
v2 = 0;
if ( *((_DWORD *)this + 58) )
{
*((_DWORD *)this + 58) = 0;
if ( *(_QWORD *)(*((_QWORD *)this + 4682) + 184LL) )
{
v2 = (*(long long ( **)(_QWORD, char *, long long))(*((_QWORD *)this + 4682) + 184LL))(
*((_QWORD *)this + 4697),
(char *)this + 20772,
4LL);
if ( v2 != 4 )
{
result = this;
*((_QWORD *)this + 8) = 0LL;
return result;
}
}
else
{
v2 = fread((char *)this + 20772, 1LL, 4LL, *((_QWORD *)this + 4697));
if ( v2 != 4 )
{
result = this;
*((_QWORD *)this + 8) = 0LL;
return result;
}
}
}
if ( !v2 )
{
if ( *(_QWORD *)(*((_QWORD *)this + 4682) + 184LL) )
v2 = (*(long long ( **)(_QWORD, char *, long long))(*((_QWORD *)this + 4682) + 184LL))(
*((_QWORD *)this + 4697),
(char *)this + 20772,
0x4000LL);
else
v2 = fread((char *)this + 20772, 1LL, 0x4000LL, *((_QWORD *)this + 4697));
}
result = this;
if ( v2 > 0 )
{
*((_QWORD *)this + 8) = (char *)this + 20772;
*((_QWORD *)this + 6) = (char *)this + v2 + 20771;
}
else
{
*((_QWORD *)this + 8) = 0LL;
}
return result;
}
|
reload_buffer:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0xc],0x0
CMP dword ptr [RAX + 0xe8],0x0
JZ 0x0012458b
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0xe8],0x0
MOV RAX,qword ptr [RAX + 0x9250]
CMP qword ptr [RAX + 0xb8],0x0
JZ 0x00124549
MOV RSI,qword ptr [RSP]
MOV RAX,qword ptr [RSI + 0x9250]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RDI,qword ptr [RSI + 0x92c8]
ADD RSI,0x5124
MOV EDX,0x4
CALL RAX
MOV dword ptr [RSP + 0xc],EAX
CMP EAX,0x4
JZ 0x00124547
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x40],0x0
JMP 0x0012463f
LAB_00124547:
JMP 0x00124589
LAB_00124549:
MOV RAX,qword ptr [RSP]
MOV RDI,RAX
ADD RDI,0x5124
MOV RCX,qword ptr [RAX + 0x92c8]
MOV ESI,0x1
MOV EDX,0x4
CALL 0x00107330
MOV dword ptr [RSP + 0xc],EAX
CMP EAX,0x4
JZ 0x00124587
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x40],0x0
JMP 0x0012463f
LAB_00124587:
JMP 0x00124589
LAB_00124589:
JMP 0x0012458b
LAB_0012458b:
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x001245fe
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x9250]
CMP qword ptr [RAX + 0xb8],0x0
JZ 0x001245d4
MOV RSI,qword ptr [RSP]
MOV RAX,qword ptr [RSI + 0x9250]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RDI,qword ptr [RSI + 0x92c8]
ADD RSI,0x5124
MOV EDX,0x4000
CALL RAX
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001245fc
LAB_001245d4:
MOV RAX,qword ptr [RSP]
MOV RDI,RAX
ADD RDI,0x5124
MOV RCX,qword ptr [RAX + 0x92c8]
MOV ESI,0x1
MOV EDX,0x4000
CALL 0x00107330
MOV dword ptr [RSP + 0xc],EAX
LAB_001245fc:
JMP 0x001245fe
LAB_001245fe:
CMP dword ptr [RSP + 0xc],0x0
JG 0x00124613
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x40],0x0
JMP 0x0012463f
LAB_00124613:
MOV RAX,qword ptr [RSP]
MOV RCX,RAX
ADD RCX,0x5124
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,RAX
ADD RCX,0x5124
MOVSXD RDX,dword ptr [RSP + 0xc]
ADD RCX,RDX
ADD RCX,-0x1
MOV qword ptr [RAX + 0x30],RCX
LAB_0012463f:
ADD RSP,0x18
RET
|
/* LefDefParser::defrData::reload_buffer() */
void __thiscall LefDefParser::defrData::reload_buffer(defrData *this)
{
int iVar1;
size_t sVar2;
int local_c;
local_c = 0;
if (*(int *)(this + 0xe8) != 0) {
*(int4 *)(this + 0xe8) = 0;
if (*(long *)(*(long *)(this + 0x9250) + 0xb8) == 0) {
sVar2 = fread(this + 0x5124,1,4,*(FILE **)(this + 0x92c8));
if ((int)sVar2 != 4) {
*(int8 *)(this + 0x40) = 0;
return;
}
}
else {
iVar1 = (**(code **)(*(long *)(this + 0x9250) + 0xb8))
(*(int8 *)(this + 0x92c8),this + 0x5124,4);
if (iVar1 != 4) {
*(int8 *)(this + 0x40) = 0;
return;
}
}
local_c = 4;
}
if (local_c == 0) {
if (*(long *)(*(long *)(this + 0x9250) + 0xb8) == 0) {
sVar2 = fread(this + 0x5124,1,0x4000,*(FILE **)(this + 0x92c8));
local_c = (int)sVar2;
}
else {
local_c = (**(code **)(*(long *)(this + 0x9250) + 0xb8))
(*(int8 *)(this + 0x92c8),this + 0x5124,0x4000);
}
}
if (local_c < 1) {
*(int8 *)(this + 0x40) = 0;
}
else {
*(defrData **)(this + 0x40) = this + 0x5124;
*(defrData **)(this + 0x30) = this + (long)local_c + 0x5123;
}
return;
}
|
|
18,626
|
testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, 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&, 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&, bool)
|
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
void JsonUnitTestResultPrinter::OutputJsonKey(std::ostream* stream,
const std::string& element_name,
const std::string& name,
const std::string& value,
const std::string& indent,
bool comma) {
const std::vector<std::string>& allowed_names =
GetReservedOutputAttributesForElement(element_name);
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
allowed_names.end())
<< "Key \"" << name << "\" is not allowed for value \"" << element_name
<< "\".";
*stream << indent << "\"" << name << "\": \"" << EscapeJson(value) << "\"";
if (comma) *stream << ",\n";
}
|
O3
|
cpp
|
testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, 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&, 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&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
callq 0x67ac6
movq (%rbp), %rdi
movq 0x8(%rbp), %rsi
movq %r15, %rdx
callq 0x792c2
cmpq 0x38(%rsp), %rax
jne 0x6ab19
leaq 0x1bf15(%rip), %rdx # 0x86992
leaq 0x10(%rsp), %rdi
movl $0x3, %esi
movl $0x1218, %ecx # imm = 0x1218
callq 0x5830c
movq 0x49540(%rip), %rdi # 0xb3fd8
leaq 0x1cbaa(%rip), %rsi # 0x87649
movl $0x65, %edx
callq 0x11b90
movq 0x49528(%rip), %rdi # 0xb3fd8
leaq 0x1cde9(%rip), %rsi # 0x878a0
movl $0x5, %edx
callq 0x11b90
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x49509(%rip), %rdi # 0xb3fd8
callq 0x11b90
movq %rax, %rbp
leaq 0x1cdc8(%rip), %rsi # 0x878a6
movl $0x1c, %edx
movq %rax, %rdi
callq 0x11b90
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbp, %rdi
callq 0x11b90
leaq 0x1cdc1(%rip), %rsi # 0x878c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x11b90
leaq 0x10(%rsp), %rdi
callq 0x5844e
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x11b90
movq %rax, %r12
leaq 0x1ce0a(%rip), %rsi # 0x8793e
movl $0x1, %edx
movq %rax, %rdi
callq 0x11b90
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x11b90
movq %rax, %r15
leaq 0x1cde1(%rip), %rsi # 0x8793b
movl $0x4, %edx
movq %rax, %rdi
callq 0x11b90
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6a844
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x11b90
leaq 0x1cdb1(%rip), %rsi # 0x8793e
movl $0x1, %edx
movq %rax, %rdi
callq 0x11b90
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6abb5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11120
cmpb $0x0, 0xc(%rsp)
je 0x6abd0
leaq 0x1cd55(%rip), %rsi # 0x87918
movl $0x2, %edx
movq %rbx, %rdi
callq 0x11b90
leaq 0x30(%rsp), %rdi
callq 0x73be2
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6ac1e
jmp 0x6ac1e
jmp 0x6ac1e
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ac21
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x6ac21
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5844e
jmp 0x6ac21
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x73be2
movq %rbx, %rdi
callq 0x11760
nop
|
_ZN7testing8internal25JsonUnitTestResultPrinter13OutputJsonKeyEPSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_SA_SA_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_6C], r9d
mov r12, r8
mov r14, rcx
mov r15, rdx
mov r13, rsi
mov rbx, rdi
lea rbp, [rsp+78h+var_48]
mov rdi, rbp
call _ZN7testingL37GetReservedOutputAttributesForElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::GetReservedOutputAttributesForElement(std::string const&)
mov rdi, [rbp+0]
mov rsi, [rbp+8]
mov rdx, r15
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops16_Iter_equals_valIS8_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>,std::random_access_iterator_tag)
cmp rax, [rsp+78h+var_40]
jnz loc_6AB19
lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+78h+var_68]
mov esi, 3
mov ecx, 1218h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aConditionStdFi; "Condition std::find(allowed_names.begin"...
mov edx, 65h ; 'e'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aKey; "Key \""
mov edx, 5
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbp, rax
lea rsi, aIsNotAllowedFo_0; "\" is not allowed for value \""
mov edx, 1Ch
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, rbp
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_878C3; "\"."
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+78h+var_68]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_6AB19:
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, rax
lea rsi, aMessage+0Fh; "\""
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
lea rsi, aMessage+0Ch; "\": \""
mov edx, 4
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+78h+var_68]; int
mov rsi, r14; int
call _ZN7testing8internal25JsonUnitTestResultPrinter10EscapeJsonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::string const&)
mov rsi, qword ptr [rsp+78h+var_68]
mov rdx, [rsp+78h+var_60]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aMessage+0Fh; "\""
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6ABB5
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6ABB5:
cmp byte ptr [rsp+78h+var_6C], 0
jz short loc_6ABD0
lea rsi, asc_87917+1; ",\n"
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_6ABD0:
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6AC1E
jmp short loc_6AC1E
jmp short loc_6AC1E
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6AC21
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6AC21
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_6AC21
loc_6AC1E:
mov rbx, rax
loc_6AC21:
lea rdi, [rsp+arg_28]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(
long long a1,
_QWORD *a2,
_QWORD *a3,
_QWORD *a4,
_QWORD *a5,
char a6)
{
long long v9; // rax
long long v10; // rbp
long long v11; // rax
long long v12; // r12
long long v13; // r15
long long v14; // rax
int v16[2]; // [rsp+10h] [rbp-68h] BYREF
long long v17; // [rsp+18h] [rbp-60h]
long long v18; // [rsp+20h] [rbp-58h] BYREF
long long v19; // [rsp+30h] [rbp-48h] BYREF
long long v20; // [rsp+38h] [rbp-40h]
testing::GetReservedOutputAttributesForElement((long long)&v19, a2);
v9 = std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(
v19,
v20,
a3);
if ( v9 == v20 )
{
testing::internal::GTestLog::GTestLog(
v16,
3,
"/workspace/llm4binary/github2025/AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc",
4632);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cerr,
"Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. ",
101LL);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Key \"", 5LL);
v10 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a3, a3[1]);
std::__ostream_insert<char,std::char_traits<char>>(v10, "\" is not allowed for value \"", 28LL);
v11 = std::__ostream_insert<char,std::char_traits<char>>(v10, *a2, a2[1]);
std::__ostream_insert<char,std::char_traits<char>>(v11, "\".", 2LL);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v16);
}
v12 = std::__ostream_insert<char,std::char_traits<char>>(a1, *a5, a5[1]);
std::__ostream_insert<char,std::char_traits<char>>(v12, "\"", 1LL);
v13 = std::__ostream_insert<char,std::char_traits<char>>(v12, *a3, a3[1]);
std::__ostream_insert<char,std::char_traits<char>>(v13, "\": \"", 4LL);
testing::internal::JsonUnitTestResultPrinter::EscapeJson((long long)v16, a4);
v14 = std::__ostream_insert<char,std::char_traits<char>>(v13, *(_QWORD *)v16, v17);
std::__ostream_insert<char,std::char_traits<char>>(v14, "\"", 1LL);
if ( *(long long **)v16 != &v18 )
operator delete(*(void **)v16, v18 + 1);
if ( a6 )
std::__ostream_insert<char,std::char_traits<char>>(a1, ",\n", 2LL);
std::vector<std::string>::~vector(&v19);
}
|
OutputJsonKey:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0xc],R9D
MOV R12,R8
MOV R14,RCX
MOV R15,RDX
MOV R13,RSI
MOV RBX,RDI
LEA RBP,[RSP + 0x30]
MOV RDI,RBP
CALL 0x00167ac6
MOV RDI,qword ptr [RBP]
MOV RSI,qword ptr [RBP + 0x8]
LAB_0016aa63:
MOV RDX,R15
CALL 0x001792c2
CMP RAX,qword ptr [RSP + 0x38]
JNZ 0x0016ab19
LAB_0016aa76:
LEA RDX,[0x186992]
LEA RDI,[RSP + 0x10]
MOV ESI,0x3
MOV ECX,0x1218
CALL 0x0015830c
LAB_0016aa91:
MOV RDI,qword ptr [0x001b3fd8]
LEA RSI,[0x187649]
MOV EDX,0x65
CALL 0x00111b90
MOV RDI,qword ptr [0x001b3fd8]
LEA RSI,[0x1878a0]
MOV EDX,0x5
CALL 0x00111b90
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [0x001b3fd8]
CALL 0x00111b90
MOV RBP,RAX
LEA RSI,[0x1878a6]
MOV EDX,0x1c
MOV RDI,RAX
CALL 0x00111b90
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,RBP
CALL 0x00111b90
LEA RSI,[0x1878c3]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00111b90
LAB_0016ab0f:
LEA RDI,[RSP + 0x10]
CALL 0x0015844e
LAB_0016ab19:
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LAB_0016ab22:
MOV RDI,RBX
CALL 0x00111b90
MOV R12,RAX
LEA RSI,[0x18793e]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00111b90
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R12
CALL 0x00111b90
MOV R15,RAX
LEA RSI,[0x18793b]
MOV EDX,0x4
MOV RDI,RAX
CALL 0x00111b90
LAB_0016ab67:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0016a844
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_0016ab7e:
MOV RDI,R15
CALL 0x00111b90
LEA RSI,[0x18793e]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00111b90
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0016abb5
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00111120
LAB_0016abb5:
CMP byte ptr [RSP + 0xc],0x0
JZ 0x0016abd0
LAB_0016abbc:
LEA RSI,[0x187918]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x00111b90
LAB_0016abd0:
LEA RDI,[RSP + 0x30]
CALL 0x00173be2
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, std::__cxx11::string
const&, std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&,
bool) */
void testing::internal::JsonUnitTestResultPrinter::OutputJsonKey
(ostream *param_1,string *param_2,string *param_3,string *param_4,string *param_5,
bool param_6)
{
long lVar1;
ostream *poVar2;
long *local_68;
long local_60;
long local_58 [2];
int8 local_48;
long local_40;
GetReservedOutputAttributesForElement((testing *)&local_48,param_2);
/* try { // try from 0016aa63 to 0016aa6a has its CatchHandler @ 0016abed */
lVar1 = std::
__find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>>
(local_48,local_40,param_3);
if (lVar1 == local_40) {
/* try { // try from 0016aa76 to 0016aa90 has its CatchHandler @ 0016abe9 */
GTestLog::GTestLog((GTestLog *)&local_68,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc"
,0x1218);
/* try { // try from 0016aa91 to 0016ab0e has its CatchHandler @ 0016ac0f */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_001b3fd8,
"Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. "
,0x65);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_001b3fd8,"Key \"",5);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_001b3fd8,*(char **)param_3,*(long *)(param_3 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\" is not allowed for value \"",0x1c)
;
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(poVar2,*(char **)param_2,*(long *)(param_2 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\".",2);
GTestLog::~GTestLog((GTestLog *)&local_68);
}
/* try { // try from 0016ab22 to 0016ab66 has its CatchHandler @ 0016ac1e */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(param_1,*(char **)param_5,*(long *)(param_5 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\"",1);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(poVar2,*(char **)param_3,*(long *)(param_3 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\": \"",4);
/* try { // try from 0016ab67 to 0016ab73 has its CatchHandler @ 0016abeb */
EscapeJson((JsonUnitTestResultPrinter *)&local_68,param_4);
/* try { // try from 0016ab7e to 0016ab99 has its CatchHandler @ 0016abef */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>(poVar2,(char *)local_68,local_60);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\"",1);
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (param_6) {
/* try { // try from 0016abbc to 0016abcf has its CatchHandler @ 0016ac1e */
std::__ostream_insert<char,std::char_traits<char>>(param_1,",\n",2);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_48);
return;
}
|
|
18,627
|
spdlog::details::os::utc_minutes_offset(tm const&)
|
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/details/os-inl.h
|
SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm)
{
#ifdef _WIN32
# if _WIN32_WINNT < _WIN32_WINNT_WS08
TIME_ZONE_INFORMATION tzinfo;
auto rv = ::GetTimeZoneInformation(&tzinfo);
# else
DYNAMIC_TIME_ZONE_INFORMATION tzinfo;
auto rv = ::GetDynamicTimeZoneInformation(&tzinfo);
# endif
if (rv == TIME_ZONE_ID_INVALID)
throw_spdlog_ex("Failed getting timezone info. ", errno);
int offset = -tzinfo.Bias;
if (tm.tm_isdst)
{
offset -= tzinfo.DaylightBias;
}
else
{
offset -= tzinfo.StandardBias;
}
return offset;
#else
# if defined(sun) || defined(__sun) || defined(_AIX) || (!defined(_BSD_SOURCE) && !defined(_GNU_SOURCE))
// 'tm_gmtoff' field is BSD extension and it's missing on SunOS/Solaris
struct helper
{
static long int calculate_gmt_offset(const std::tm &localtm = details::os::localtime(), const std::tm &gmtm = details::os::gmtime())
{
int local_year = localtm.tm_year + (1900 - 1);
int gmt_year = gmtm.tm_year + (1900 - 1);
long int days = (
// difference in day of year
localtm.tm_yday -
gmtm.tm_yday
// + intervening leap days
+ ((local_year >> 2) - (gmt_year >> 2)) - (local_year / 100 - gmt_year / 100) +
((local_year / 100 >> 2) - (gmt_year / 100 >> 2))
// + difference in years * 365 */
+ (long int)(local_year - gmt_year) * 365);
long int hours = (24 * days) + (localtm.tm_hour - gmtm.tm_hour);
long int mins = (60 * hours) + (localtm.tm_min - gmtm.tm_min);
long int secs = (60 * mins) + (localtm.tm_sec - gmtm.tm_sec);
return secs;
}
};
auto offset_seconds = helper::calculate_gmt_offset(tm);
# else
auto offset_seconds = tm.tm_gmtoff;
# endif
return static_cast<int>(offset_seconds / 60);
#endif
}
|
O0
|
c
|
spdlog::details::os::utc_minutes_offset(tm const&):
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl $0x3c, %ecx
cqto
idivq %rcx
retq
nopw %cs:(%rax,%rax)
|
_ZN6spdlog7details2os18utc_minutes_offsetERK2tm:
mov [rsp+var_8], rdi
mov rax, [rsp+var_8]
mov rax, [rax+28h]
mov [rsp+var_10], rax
mov rax, [rsp+var_10]
mov ecx, 3Ch ; '<'
cqo
idiv rcx
retn
|
long long spdlog::details::os::utc_minutes_offset(long long a1)
{
return *(_QWORD *)(a1 + 40) / 60LL;
}
|
utc_minutes_offset:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + -0x10],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,0x3c
CQO
IDIV RCX
RET
|
/* spdlog::details::os::utc_minutes_offset(tm const&) */
long spdlog::details::os::utc_minutes_offset(tm *param_1)
{
return param_1->tm_gmtoff / 0x3c;
}
|
|
18,628
|
bitmap_is_subset
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end;
DBUG_ASSERT(map1->bitmap && map2->bitmap);
DBUG_ASSERT(map1->n_bits==map2->n_bits);
end= map1->last_word_ptr;
while (m1 < end)
{
if ((*m1++) & ~(*m2++))
return 0;
}
/* here both maps have the same number of bits - see assert above */
return ((*m1 & ~*m2 & ~map1->last_word_mask) ? 0 : 1);
}
|
O0
|
c
|
bitmap_is_subset:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xeff44
jmp 0xeff46
jmp 0xeff48
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xeff92
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x20(%rbp)
movl (%rax), %eax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, -0x28(%rbp)
movl (%rcx), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xeff90
movb $0x0, -0x1(%rbp)
jmp 0xeffbf
jmp 0xeff54
movq -0x20(%rbp), %rax
movl (%rax), %edx
movq -0x28(%rbp), %rax
movl (%rax), %eax
xorl $-0x1, %eax
andl %eax, %edx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
xorl $-0x1, %eax
andl %eax, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
bitmap_is_subset:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short $+2
loc_EFF44:
jmp short $+2
loc_EFF46:
jmp short $+2
loc_EFF48:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_30], rax
loc_EFF54:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_EFF92
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 4
mov [rbp+var_20], rcx
mov eax, [rax]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 4
mov [rbp+var_28], rdx
mov ecx, [rcx]
xor ecx, 0FFFFFFFFh
and eax, ecx
cmp eax, 0
jz short loc_EFF90
mov [rbp+var_1], 0
jmp short loc_EFFBF
loc_EFF90:
jmp short loc_EFF54
loc_EFF92:
mov rax, [rbp+var_20]
mov edx, [rax]
mov rax, [rbp+var_28]
mov eax, [rax]
xor eax, 0FFFFFFFFh
and edx, eax
mov rax, [rbp+var_10]
mov eax, [rax+18h]
xor eax, 0FFFFFFFFh
and edx, eax
mov eax, 1
xor ecx, ecx
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_1], al
loc_EFFBF:
mov al, [rbp+var_1]
pop rbp
retn
|
bool bitmap_is_subset(long long a1, _DWORD **a2)
{
_DWORD *v2; // rax
_DWORD *v3; // rcx
_DWORD *v5; // [rsp+8h] [rbp-28h]
_DWORD *v6; // [rsp+10h] [rbp-20h]
v6 = *(_DWORD **)a1;
v5 = *a2;
while ( (unsigned long long)v6 < *(_QWORD *)(a1 + 8) )
{
v2 = v6++;
v3 = v5++;
if ( (~*v3 & *v2) != 0 )
return 0;
}
return (~*(_DWORD *)(a1 + 24) & ~*v5 & *v6) == 0;
}
|
bitmap_is_subset:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001eff44
LAB_001eff44:
JMP 0x001eff46
LAB_001eff46:
JMP 0x001eff48
LAB_001eff48:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
LAB_001eff54:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001eff92
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x20],RCX
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x4
MOV qword ptr [RBP + -0x28],RDX
MOV ECX,dword ptr [RCX]
XOR ECX,0xffffffff
AND EAX,ECX
CMP EAX,0x0
JZ 0x001eff90
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001effbf
LAB_001eff90:
JMP 0x001eff54
LAB_001eff92:
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
XOR EAX,0xffffffff
AND EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x18]
XOR EAX,0xffffffff
AND EDX,EAX
MOV EAX,0x1
XOR ECX,ECX
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x1],AL
LAB_001effbf:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int8 bitmap_is_subset(int8 *param_1,int8 *param_2)
{
uint uVar1;
uint *local_30;
uint *local_28;
bool local_9;
ulong uVar2;
local_30 = (uint *)*param_2;
local_28 = (uint *)*param_1;
do {
if ((uint *)param_1[1] <= local_28) {
local_9 = (*local_28 & (*local_30 ^ 0xffffffff) & (*(uint *)(param_1 + 3) ^ 0xffffffff)) == 0;
uVar2 = 0;
goto LAB_001effbf;
}
uVar1 = *local_28 & (*local_30 ^ 0xffffffff);
uVar2 = (ulong)uVar1;
local_30 = local_30 + 1;
local_28 = local_28 + 1;
} while (uVar1 == 0);
local_9 = false;
LAB_001effbf:
return CONCAT71((int7)(uVar2 >> 8),local_9);
}
|
|
18,629
|
my_base64_needed_encoded_length
|
eloqsql/mysys/base64.c
|
int
my_base64_needed_encoded_length(int length_of_data)
{
int nb_base64_chars;
nb_base64_chars= (length_of_data + 2) / 3 * 4;
return
nb_base64_chars + /* base64 char incl padding */
(nb_base64_chars - 1)/ 76 + /* newlines */
1; /* NUL termination of string */
}
|
O0
|
c
|
my_base64_needed_encoded_length:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl $0x2, %eax
movl $0x3, %ecx
cltd
idivl %ecx
shll $0x2, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl $0x4c, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xc(%rbp), %eax
addl %ecx, %eax
addl $0x1, %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_base64_needed_encoded_length:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
add eax, 2
mov ecx, 3
cdq
idiv ecx
shl eax, 2
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
sub eax, 1
mov ecx, 4Ch ; 'L'
cdq
idiv ecx
mov ecx, eax
mov eax, [rbp+var_C]
add eax, ecx
add eax, 1
pop rbp
retn
|
long long my_base64_needed_encoded_length(int a1)
{
return (unsigned int)((4 * ((a1 + 2) / 3) - 1) / 76 + 4 * ((a1 + 2) / 3) + 1);
}
|
my_base64_needed_encoded_length:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x2
MOV ECX,0x3
CDQ
IDIV ECX
SHL EAX,0x2
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x1
MOV ECX,0x4c
CDQ
IDIV ECX
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,ECX
ADD EAX,0x1
POP RBP
RET
|
int my_base64_needed_encoded_length(int param_1)
{
int iVar1;
iVar1 = ((param_1 + 2) / 3) * 4;
return iVar1 + (iVar1 + -1) / 0x4c + 1;
}
|
|
18,630
|
my_base64_needed_encoded_length
|
eloqsql/mysys/base64.c
|
int
my_base64_needed_encoded_length(int length_of_data)
{
int nb_base64_chars;
nb_base64_chars= (length_of_data + 2) / 3 * 4;
return
nb_base64_chars + /* base64 char incl padding */
(nb_base64_chars - 1)/ 76 + /* newlines */
1; /* NUL termination of string */
}
|
O3
|
c
|
my_base64_needed_encoded_length:
pushq %rbp
movq %rsp, %rbp
addl $0x2, %edi
movslq %edi, %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
leal -0x1(,%rax,4), %ecx
movslq %ecx, %rcx
imulq $0x6bca1af3, %rcx, %rcx # imm = 0x6BCA1AF3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
leal (%rcx,%rax,4), %eax
incl %eax
popq %rbp
retq
|
my_base64_needed_encoded_length:
push rbp
mov rbp, rsp
add edi, 2
movsxd rax, edi
imul rax, 55555556h
mov rcx, rax
shr rcx, 3Fh
shr rax, 20h
add eax, ecx
lea ecx, ds:0FFFFFFFFFFFFFFFFh[rax*4]
movsxd rcx, ecx
imul rcx, 6BCA1AF3h
mov rdx, rcx
shr rdx, 3Fh
sar rcx, 25h
add ecx, edx
lea eax, [rcx+rax*4]
inc eax
pop rbp
retn
|
long long my_base64_needed_encoded_length(int a1)
{
return (unsigned int)((4 * ((a1 + 2) / 3) - 1) / 76 + 4 * ((a1 + 2) / 3) + 1);
}
|
my_base64_needed_encoded_length:
PUSH RBP
MOV RBP,RSP
ADD EDI,0x2
MOVSXD RAX,EDI
IMUL RAX,RAX,0x55555556
MOV RCX,RAX
SHR RCX,0x3f
SHR RAX,0x20
ADD EAX,ECX
LEA ECX,[-0x1 + RAX*0x4]
MOVSXD RCX,ECX
IMUL RCX,RCX,0x6bca1af3
MOV RDX,RCX
SHR RDX,0x3f
SAR RCX,0x25
ADD ECX,EDX
LEA EAX,[RCX + RAX*0x4]
INC EAX
POP RBP
RET
|
int my_base64_needed_encoded_length(int param_1)
{
int iVar1;
iVar1 = (param_1 + 2) / 3;
return (iVar1 * 4 + -1) / 0x4c + iVar1 * 4 + 1;
}
|
|
18,631
|
my_coll_parser_scan_reset_sequence
|
eloqsql/strings/ctype-uca.c
|
static int
my_coll_parser_scan_reset_sequence(MY_COLL_RULE_PARSER *p)
{
my_coll_rule_reset(&p->rule);
/* Scan "[before x]" option, if exists */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_OPTION)
my_coll_parser_scan_reset_before(p);
/* Try logical reset position */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_OPTION)
{
if (!my_coll_parser_scan_logical_position(p, p->rule.base, 1))
return 0;
}
else
{
/* Scan single reset character or expansion */
if (!my_coll_parser_scan_character_list(p, p->rule.base,
MY_UCA_MAX_EXPANSION, "Expansion"))
return 0;
}
return 1;
}
|
O0
|
c
|
my_coll_parser_scan_reset_sequence:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0x55e30
movq -0x10(%rbp), %rdi
callq 0x55330
cmpl $0x7, (%rax)
jne 0x55b90
movq -0x10(%rbp), %rdi
callq 0x55e60
movq -0x10(%rbp), %rdi
callq 0x55330
cmpl $0x7, (%rax)
jne 0x55bc4
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movl $0x1, %edx
callq 0x55fd0
cmpl $0x0, %eax
jne 0x55bc2
movl $0x0, -0x4(%rbp)
jmp 0x55bf8
jmp 0x55bf1
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movl $0xa, %edx
leaq 0x2dd04(%rip), %rcx # 0x838e0
callq 0x562f0
cmpl $0x0, %eax
jne 0x55bef
movl $0x0, -0x4(%rbp)
jmp 0x55bf8
jmp 0x55bf1
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_coll_parser_scan_reset_sequence:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call my_coll_rule_reset
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 7
jnz short loc_55B90
mov rdi, [rbp+var_10]
call my_coll_parser_scan_reset_before
loc_55B90:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 7
jnz short loc_55BC4
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
mov edx, 1
call my_coll_parser_scan_logical_position
cmp eax, 0
jnz short loc_55BC2
mov [rbp+var_4], 0
jmp short loc_55BF8
loc_55BC2:
jmp short loc_55BF1
loc_55BC4:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
mov edx, 0Ah
lea rcx, aExpansion; "Expansion"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_55BEF
mov [rbp+var_4], 0
jmp short loc_55BF8
loc_55BEF:
jmp short $+2
loc_55BF1:
mov [rbp+var_4], 1
loc_55BF8:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
|
_BOOL8 my_coll_parser_scan_reset_sequence(long long a1)
{
my_coll_rule_reset(a1 + 80);
if ( *(_DWORD *)my_coll_parser_curr(a1) == 7 )
my_coll_parser_scan_reset_before(a1);
if ( *(_DWORD *)my_coll_parser_curr(a1) != 7 )
return (unsigned int)my_coll_parser_scan_character_list(a1, a1 + 80, 10LL, "Expansion") != 0;
return (unsigned int)my_coll_parser_scan_logical_position(a1, a1 + 80, 1LL) != 0;
}
|
my_coll_parser_scan_reset_sequence:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
CALL 0x00155e30
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00155330
CMP dword ptr [RAX],0x7
JNZ 0x00155b90
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00155e60
LAB_00155b90:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00155330
CMP dword ptr [RAX],0x7
JNZ 0x00155bc4
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
MOV EDX,0x1
CALL 0x00155fd0
CMP EAX,0x0
JNZ 0x00155bc2
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155bf8
LAB_00155bc2:
JMP 0x00155bf1
LAB_00155bc4:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
MOV EDX,0xa
LEA RCX,[0x1838e0]
CALL 0x001562f0
CMP EAX,0x0
JNZ 0x00155bef
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155bf8
LAB_00155bef:
JMP 0x00155bf1
LAB_00155bf1:
MOV dword ptr [RBP + -0x4],0x1
LAB_00155bf8:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 my_coll_parser_scan_reset_sequence(long param_1)
{
int iVar1;
int *piVar2;
my_coll_rule_reset(param_1 + 0x50);
piVar2 = (int *)my_coll_parser_curr(param_1);
if (*piVar2 == 7) {
my_coll_parser_scan_reset_before(param_1);
}
piVar2 = (int *)my_coll_parser_curr(param_1);
if (*piVar2 == 7) {
iVar1 = my_coll_parser_scan_logical_position(param_1,param_1 + 0x50,1);
if (iVar1 == 0) {
return 0;
}
}
else {
iVar1 = my_coll_parser_scan_character_list(param_1,param_1 + 0x50,10,"Expansion");
if (iVar1 == 0) {
return 0;
}
}
return 1;
}
|
|
18,632
|
maria_page_get_lsn
|
eloqsql/storage/maria/ma_blockrec.c
|
TRANSLOG_ADDRESS
maria_page_get_lsn(uchar *page,
pgcache_page_no_t page_no __attribute__((unused)),
uchar* data_ptr __attribute__((unused)))
{
#ifndef DBUG_OFF
const MARIA_SHARE *share= (MARIA_SHARE*)data_ptr;
DBUG_ASSERT(share->page_type == PAGECACHE_LSN_PAGE &&
share->now_transactional);
#endif
return lsn_korr(page);
}
|
O3
|
c
|
maria_page_get_lsn:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %eax
shlq $0x20, %rax
movzbl 0x2(%rdi), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%rdi), %eax
orq %rcx, %rax
popq %rbp
retq
|
maria_page_get_lsn:
push rbp
mov rbp, rsp
movzx eax, word ptr [rdi]
shl rax, 20h
movzx ecx, byte ptr [rdi+2]
shl rcx, 30h
or rcx, rax
mov eax, [rdi+3]
or rax, rcx
pop rbp
retn
|
unsigned long long maria_page_get_lsn(unsigned __int16 *a1)
{
return ((unsigned long long)*a1 << 32) | ((unsigned long long)*((unsigned __int8 *)a1 + 2) << 48) | *(unsigned int *)((char *)a1 + 3);
}
|
maria_page_get_lsn:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,word ptr [RDI]
SHL RAX,0x20
MOVZX ECX,byte ptr [RDI + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV EAX,dword ptr [RDI + 0x3]
OR RAX,RCX
POP RBP
RET
|
ulong maria_page_get_lsn(ushort *param_1)
{
return (ulong)*(uint *)((long)param_1 + 3) |
(ulong)(byte)param_1[1] << 0x30 | (ulong)*param_1 << 0x20;
}
|
|
18,633
|
ma_rec_unpack
|
eloqsql/storage/maria/ma_dynrec.c
|
size_t _ma_rec_unpack(register MARIA_HA *info, register uchar *to, uchar *from,
size_t found_length)
{
uint flag,bit,length,min_pack_length, column_length;
enum en_fieldtype type;
uchar *from_end,*to_end,*packpos;
reg3 MARIA_COLUMNDEF *column, *end_column;
DBUG_ENTER("_ma_rec_unpack");
to_end=to + info->s->base.reclength;
from_end=from+found_length;
flag= (uchar) *from; bit=1; packpos=from;
if (found_length < info->s->base.min_pack_length)
goto err;
from+= info->s->base.pack_bytes;
min_pack_length= info->s->base.min_pack_length - info->s->base.pack_bytes;
if ((length= info->s->base.null_bytes))
{
memcpy(to, from, length);
from+= length;
to+= length;
min_pack_length-= length;
}
for (column= info->s->columndef, end_column= column + info->s->base.fields;
column < end_column ; to+= column_length, column++)
{
column_length= column->length;
if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL &&
(type != FIELD_CHECK))
{
if (type == FIELD_VARCHAR)
{
uint pack_length= HA_VARCHAR_PACKLENGTH(column_length-1);
if (pack_length == 1)
{
length= (uint) *(uchar*) from;
if (length > column_length-1)
goto err;
*to= *from++;
}
else
{
get_key_length(length, from);
if (length > column_length-2)
goto err;
int2store(to,length);
}
if (from+length > from_end)
goto err;
memcpy(to+pack_length, from, length);
MEM_UNDEFINED(to+pack_length + length,
column_length - length - pack_length);
from+= length;
min_pack_length--;
continue;
}
if (flag & bit)
{
if (type == FIELD_BLOB || type == FIELD_SKIP_ZERO)
bzero(to, column_length);
else if (type == FIELD_SKIP_ENDSPACE ||
type == FIELD_SKIP_PRESPACE)
{
if (column->length > 255 && *from & 128)
{
if (from + 1 >= from_end)
goto err;
length= (*from & 127)+ ((uint) (uchar) *(from+1) << 7); from+=2;
}
else
{
if (from == from_end)
goto err;
length= (uchar) *from++;
}
min_pack_length--;
if (length >= column_length ||
min_pack_length + length > (uint) (from_end - from))
goto err;
if (type == FIELD_SKIP_ENDSPACE)
{
memcpy(to, from, (size_t) length);
bfill(to+length, column_length-length, ' ');
}
else
{
bfill(to, column_length-length, ' ');
memcpy(to+column_length-length, from, (size_t) length);
}
from+=length;
}
}
else if (type == FIELD_BLOB)
{
uint size_length=column_length- portable_sizeof_char_ptr;
ulong blob_length= _ma_calc_blob_length(size_length,from);
ulong from_left= (ulong) (from_end - from);
if (from_left < size_length ||
from_left - size_length < blob_length ||
from_left - size_length - blob_length < min_pack_length)
goto err;
memcpy(to, from, (size_t) size_length);
from+=size_length;
memcpy(to+size_length,(uchar*) &from,sizeof(char*));
from+=blob_length;
}
else
{
if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE)
min_pack_length--;
if (min_pack_length + column_length > (uint) (from_end - from))
goto err;
memcpy(to, from, (size_t) column_length); from+=column_length;
}
if ((bit= bit << 1) >= 256)
{
flag= (uchar) *++packpos; bit=1;
}
}
else
{
if (min_pack_length > (uint) (from_end - from))
goto err;
min_pack_length-=column_length;
memcpy(to, from, (size_t) column_length);
from+=column_length;
}
}
if (info->s->calc_checksum)
info->cur_row.checksum= (uint) (uchar) *from++;
if (to == to_end && from == from_end && (bit == 1 || !(flag & ~(bit-1))))
DBUG_RETURN(found_length);
err:
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_PRINT("error",("to_end: %p -> %p from_end: %p -> %p",
to, to_end, from, from_end));
DBUG_DUMP("from", info->rec_buff, info->s->base.min_pack_length);
DBUG_RETURN(MY_FILE_ERROR);
}
|
O3
|
c
|
ma_rec_unpack:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
movq (%rdi), %rax
movq 0x3a8(%rax), %r12
movq %rcx, -0x68(%rbp)
cmpq %rcx, %r12
jbe 0x4bc48
movq -0x50(%rbp), %rdi
movl $0x7f, %esi
callq 0x42bb4
movq $-0x1, -0x68(%rbp)
movq -0x68(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r15
movq 0x398(%rax), %r14
addq %rsi, %r14
movq -0x58(%rbp), %rdx
movzbl (%rdx), %ecx
movl %ecx, -0x44(%rbp)
movl 0x3f4(%rax), %r13d
movl 0x3fc(%rax), %ebx
subl %r13d, %r12d
addq %rdx, %r13
testq %rbx, %rbx
je 0x4bc95
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2a0a0
addq %rbx, %r13
addq %rbx, %r15
subl %ebx, %r12d
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x58(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x38(%rbp)
movl 0x3c8(%rax), %ecx
testq %rcx, %rcx
je 0x4bfab
movq %r14, -0x70(%rbp)
movq 0x588(%rax), %rbx
imulq $0x38, %rcx, %rax
addq %rbx, %rax
movq %rax, -0x78(%rbp)
movl $0x1, -0x2c(%rbp)
movzwl 0x8(%rbx), %r14d
movl (%rbx), %eax
testl %eax, %eax
je 0x4bd1d
cmpl $0x9, %eax
je 0x4bd1d
cmpl $0x8, %eax
jne 0x4bd46
leal -0x1(%r14), %edx
cmpl $0x100, %edx # imm = 0x100
movl $0x2, %edi
sbbq $0x0, %rdi
movb (%r13), %cl
movzbl %cl, %eax
cmpl $0xff, %edx
ja 0x4bd68
cmpl %eax, %edx
jb 0x4bc1f
incq %r13
movb %cl, (%r15)
movq %r13, %rsi
jmp 0x4be5a
movq -0x38(%rbp), %rax
subl %r13d, %eax
cmpl %eax, %r12d
ja 0x4bc1f
subl %r14d, %r12d
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a0a0
addq %r14, %r13
jmp 0x4bf74
movl -0x2c(%rbp), %ecx
testl %ecx, -0x44(%rbp)
je 0x4bd79
leal -0x3(%rax), %ecx
cmpl $0x1, %ecx
ja 0x4bda9
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2a2c0
jmp 0x4bf4a
cmpb $-0x1, %cl
je 0x4be35
incq %r13
jmp 0x4be45
cmpl $0x4, %eax
jne 0x4be7a
leal -0x9(%r14), %eax
cmpl $0x3, %eax
ja 0x4bef8
leaq 0x9d846(%rip), %rcx # 0xe95dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl (%r13), %r8d
jmp 0x4befb
cmpl $0x2, %eax
ja 0x4bf4a
cmpl $0x100, %r14d # imm = 0x100
jb 0x4bdc8
movzbl (%r13), %ecx
testb %cl, %cl
js 0x4bf87
cmpq -0x38(%rbp), %r13
je 0x4bc1f
movzbl (%r13), %esi
incq %r13
movl %r14d, %r8d
subl %esi, %r8d
jbe 0x4bc1f
decl %r12d
leal (%rsi,%r12), %ecx
movq -0x38(%rbp), %rdx
subl %r13d, %edx
cmpl %edx, %ecx
ja 0x4bc1f
cmpl $0x1, %eax
jne 0x4beac
movl %esi, %edx
movq %rdx, -0x40(%rbp)
movq %r15, %rdi
movq %r13, %rsi
movq %r8, -0x60(%rbp)
callq 0x2a0a0
movq -0x40(%rbp), %rax
leaq (%r15,%rax), %rdi
movl $0x20, %esi
movq -0x60(%rbp), %rdx
callq 0x2a2c0
jmp 0x4bf46
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %eax
addq $0x3, %r13
movq %r13, %rsi
movl %r14d, %ecx
addl $-0x2, %ecx
cmpl %ecx, %eax
ja 0x4bc1f
movw %ax, (%r15)
movl %eax, %edx
leaq (%rsi,%rdx), %r13
cmpq -0x38(%rbp), %r13
ja 0x4bc1f
addq %r15, %rdi
callq 0x2a0a0
decl %r12d
jmp 0x4bf74
cmpl $0x3, %eax
sbbl $0x0, %r12d
movl %r14d, %eax
addl %r12d, %eax
movq -0x38(%rbp), %rcx
subl %r13d, %ecx
cmpl %ecx, %eax
ja 0x4bc1f
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a0a0
addq %r14, %r13
jmp 0x4bf4a
movq %r15, %rdi
movq %rsi, -0x40(%rbp)
movl $0x20, %esi
movq %r8, %rdx
callq 0x2a2c0
leaq (%r15,%r14), %rdi
movl -0x40(%rbp), %edx
subq %rdx, %rdi
movq %r13, %rsi
movq %rdx, -0x40(%rbp)
callq 0x2a0a0
jmp 0x4bf46
movzwl (%r13), %eax
movzbl 0x2(%r13), %r8d
shll $0x10, %r8d
orq %rax, %r8
jmp 0x4befb
movl (%r13), %r8d
jmp 0x4befb
movzwl (%r13), %r8d
jmp 0x4befb
xorl %r8d, %r8d
movl %r14d, %ecx
addl $-0x8, %ecx
movq -0x38(%rbp), %rax
subq %r13, %rax
movl %ecx, %edx
subq %rdx, %rax
jb 0x4bc1f
subq %r8, %rax
jb 0x4bc1f
movl %r12d, %ecx
cmpq %rcx, %rax
jb 0x4bc1f
movq %r15, %rdi
movq %r13, %rsi
movq %r8, -0x40(%rbp)
movq %rdx, -0x60(%rbp)
callq 0x2a0a0
movq -0x60(%rbp), %rax
addq %rax, %r13
movq %r13, (%r15,%rax)
addq -0x40(%rbp), %r13
movl -0x2c(%rbp), %eax
addl %eax, %eax
cmpl $0x100, %eax # imm = 0x100
jae 0x4bf5b
movl %eax, -0x2c(%rbp)
jmp 0x4bf74
movq -0x58(%rbp), %rcx
movzbl 0x1(%rcx), %eax
movl %eax, -0x44(%rbp)
incq %rcx
movq %rcx, -0x58(%rbp)
movl $0x1, -0x2c(%rbp)
addq %r14, %r15
addq $0x38, %rbx
cmpq -0x78(%rbp), %rbx
jb 0x4bcd0
jmp 0x4bfb4
leaq 0x1(%r13), %rdx
cmpq -0x38(%rbp), %rdx
jae 0x4bc1f
andl $0x7f, %ecx
movzbl 0x1(%r13), %esi
shll $0x7, %esi
orl %ecx, %esi
addq $0x2, %r13
jmp 0x4bdda
movl $0x1, -0x2c(%rbp)
jmp 0x4bfbf
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %r14
cmpq $0x0, 0x6a8(%rax)
je 0x4bfdb
movzbl (%r13), %eax
incq %r13
movq -0x50(%rbp), %rcx
movl %eax, 0xb0(%rcx)
cmpq %r14, %r15
jne 0x4bc1f
cmpq -0x38(%rbp), %r13
jne 0x4bc1f
movl -0x2c(%rbp), %eax
cmpl $0x1, %eax
je 0x4bc35
negl %eax
testl %eax, -0x44(%rbp)
jne 0x4bc1f
jmp 0x4bc35
|
_ma_rec_unpack:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_58], rdx
mov [rbp+var_50], rdi
mov rax, [rdi]
mov r12, [rax+3A8h]
mov [rbp+var_68], rcx
cmp r12, rcx
jbe short loc_4BC48
loc_4BC1F:
mov rdi, [rbp+var_50]
mov esi, 7Fh
call _ma_set_fatal_error
mov [rbp+var_68], 0FFFFFFFFFFFFFFFFh
loc_4BC35:
mov rax, [rbp+var_68]
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4BC48:
mov r15, rsi
mov r14, [rax+398h]
add r14, rsi
mov rdx, [rbp+var_58]
movzx ecx, byte ptr [rdx]
mov [rbp+var_44], ecx
mov r13d, [rax+3F4h]
mov ebx, [rax+3FCh]
sub r12d, r13d
add r13, rdx
test rbx, rbx
jz short loc_4BC95
mov rdi, r15
mov rsi, r13
mov rdx, rbx
call _memcpy
add r13, rbx
add r15, rbx
sub r12d, ebx
mov rax, [rbp+var_50]
mov rax, [rax]
loc_4BC95:
mov rcx, [rbp+var_68]
mov rdx, [rbp+var_58]
add rcx, rdx
mov [rbp+var_38], rcx
mov ecx, [rax+3C8h]
test rcx, rcx
jz loc_4BFAB
mov [rbp+var_70], r14
mov rbx, [rax+588h]
imul rax, rcx, 38h ; '8'
add rax, rbx
mov [rbp+var_78], rax
mov [rbp+var_2C], 1
loc_4BCD0:
movzx r14d, word ptr [rbx+8]
mov eax, [rbx]
test eax, eax
jz short loc_4BD1D
cmp eax, 9
jz short loc_4BD1D
cmp eax, 8
jnz short loc_4BD46
lea edx, [r14-1]
cmp edx, 100h
mov edi, 2
sbb rdi, 0
mov cl, [r13+0]
movzx eax, cl
cmp edx, 0FFh
ja short loc_4BD68
cmp edx, eax
jb loc_4BC1F
inc r13
mov [r15], cl
mov rsi, r13
jmp loc_4BE5A
loc_4BD1D:
mov rax, [rbp+var_38]
sub eax, r13d
cmp r12d, eax
ja loc_4BC1F
sub r12d, r14d
mov rdi, r15
mov rsi, r13
mov rdx, r14
call _memcpy
add r13, r14
jmp loc_4BF74
loc_4BD46:
mov ecx, [rbp+var_2C]
test [rbp+var_44], ecx
jz short loc_4BD79
lea ecx, [rax-3]
cmp ecx, 1
ja short loc_4BDA9
mov rdi, r15
xor esi, esi
mov rdx, r14
call _memset
jmp loc_4BF4A
loc_4BD68:
cmp cl, 0FFh
jz loc_4BE35
inc r13
jmp loc_4BE45
loc_4BD79:
cmp eax, 4
jnz loc_4BE7A
lea eax, [r14-9]; switch 4 cases
cmp eax, 3
ja def_4BD9D; jumptable 000000000004BD9D default case
lea rcx, jpt_4BD9D
movsxd rax, ds:(jpt_4BD9D - 0E95DCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4BD9F:
movzx r8d, byte ptr [r13+0]; jumptable 000000000004BD9D case 9
jmp loc_4BEFB
loc_4BDA9:
cmp eax, 2
ja loc_4BF4A
cmp r14d, 100h
jb short loc_4BDC8
movzx ecx, byte ptr [r13+0]
test cl, cl
js loc_4BF87
loc_4BDC8:
cmp r13, [rbp+var_38]
jz loc_4BC1F
movzx esi, byte ptr [r13+0]
inc r13
loc_4BDDA:
mov r8d, r14d
sub r8d, esi
jbe loc_4BC1F
dec r12d
lea ecx, [rsi+r12]
mov rdx, [rbp+var_38]
sub edx, r13d
cmp ecx, edx
ja loc_4BC1F
cmp eax, 1
jnz loc_4BEAC
mov edx, esi
mov [rbp+var_40], rdx
mov rdi, r15
mov rsi, r13
mov [rbp+var_60], r8
call _memcpy
mov rax, [rbp+var_40]
lea rdi, [r15+rax]
mov esi, 20h ; ' '
mov rdx, [rbp+var_60]
call _memset
jmp loc_4BF46
loc_4BE35:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx eax, ax
add r13, 3
loc_4BE45:
mov rsi, r13
mov ecx, r14d
add ecx, 0FFFFFFFEh
cmp eax, ecx
ja loc_4BC1F
mov [r15], ax
loc_4BE5A:
mov edx, eax
lea r13, [rsi+rdx]
cmp r13, [rbp+var_38]
ja loc_4BC1F
add rdi, r15
call _memcpy
dec r12d
jmp loc_4BF74
loc_4BE7A:
cmp eax, 3
sbb r12d, 0
mov eax, r14d
add eax, r12d
mov rcx, [rbp+var_38]
sub ecx, r13d
cmp eax, ecx
ja loc_4BC1F
mov rdi, r15
mov rsi, r13
mov rdx, r14
call _memcpy
add r13, r14
jmp loc_4BF4A
loc_4BEAC:
mov rdi, r15
mov [rbp+var_40], rsi
mov esi, 20h ; ' '
mov rdx, r8
call _memset
lea rdi, [r15+r14]
mov edx, dword ptr [rbp+var_40]
sub rdi, rdx
mov rsi, r13
mov [rbp+var_40], rdx
call _memcpy
jmp short loc_4BF46
loc_4BED8:
movzx eax, word ptr [r13+0]; jumptable 000000000004BD9D case 11
movzx r8d, byte ptr [r13+2]
shl r8d, 10h
or r8, rax
jmp short loc_4BEFB
loc_4BEEB:
mov r8d, [r13+0]; jumptable 000000000004BD9D case 12
jmp short loc_4BEFB
loc_4BEF1:
movzx r8d, word ptr [r13+0]; jumptable 000000000004BD9D case 10
jmp short loc_4BEFB
def_4BD9D:
xor r8d, r8d; jumptable 000000000004BD9D default case
loc_4BEFB:
mov ecx, r14d
add ecx, 0FFFFFFF8h
mov rax, [rbp+var_38]
sub rax, r13
mov edx, ecx
sub rax, rdx
jb loc_4BC1F
sub rax, r8
jb loc_4BC1F
mov ecx, r12d
cmp rax, rcx
jb loc_4BC1F
mov rdi, r15
mov rsi, r13
mov [rbp+var_40], r8
mov [rbp+var_60], rdx
call _memcpy
mov rax, [rbp+var_60]
add r13, rax
mov [r15+rax], r13
loc_4BF46:
add r13, [rbp+var_40]
loc_4BF4A:
mov eax, [rbp+var_2C]
add eax, eax
cmp eax, 100h
jnb short loc_4BF5B
mov [rbp+var_2C], eax
jmp short loc_4BF74
loc_4BF5B:
mov rcx, [rbp+var_58]
movzx eax, byte ptr [rcx+1]
mov [rbp+var_44], eax
inc rcx
mov [rbp+var_58], rcx
mov [rbp+var_2C], 1
loc_4BF74:
add r15, r14
add rbx, 38h ; '8'
cmp rbx, [rbp+var_78]
jb loc_4BCD0
jmp short loc_4BFB4
loc_4BF87:
lea rdx, [r13+1]
cmp rdx, [rbp+var_38]
jnb loc_4BC1F
and ecx, 7Fh
movzx esi, byte ptr [r13+1]
shl esi, 7
or esi, ecx
add r13, 2
jmp loc_4BDDA
loc_4BFAB:
mov [rbp+var_2C], 1
jmp short loc_4BFBF
loc_4BFB4:
mov rax, [rbp+var_50]
mov rax, [rax]
mov r14, [rbp+var_70]
loc_4BFBF:
cmp qword ptr [rax+6A8h], 0
jz short loc_4BFDB
movzx eax, byte ptr [r13+0]
inc r13
mov rcx, [rbp+var_50]
mov [rcx+0B0h], eax
loc_4BFDB:
cmp r15, r14
jnz loc_4BC1F
cmp r13, [rbp+var_38]
jnz loc_4BC1F
mov eax, [rbp+var_2C]
cmp eax, 1
jz loc_4BC35
neg eax
test [rbp+var_44], eax
jnz loc_4BC1F
jmp loc_4BC35
|
long long ma_rec_unpack(_DWORD *a1, _WORD *a2, long long a3, unsigned long long a4, unsigned long long a5, int a6)
{
long long v6; // rax
unsigned long long v7; // r12
_WORD *v9; // r15
_WORD *v10; // r14
long long v11; // r13
long long v12; // rbx
unsigned int v13; // r12d
unsigned __int8 *v14; // r13
unsigned long long v15; // rbx
long long v16; // r14
unsigned int v17; // eax
long long v18; // rdi
unsigned int v19; // eax
unsigned __int8 *v20; // rsi
unsigned __int8 *v21; // r13
unsigned int v22; // esi
unsigned __int8 *v23; // r13
unsigned long long v24; // rax
bool v25; // cf
unsigned long long v26; // rax
long long v27; // rax
int v28; // eax
unsigned long long v29; // [rsp+8h] [rbp-78h]
_WORD *v30; // [rsp+10h] [rbp-70h]
unsigned long long v31; // [rsp+18h] [rbp-68h]
long long v32; // [rsp+28h] [rbp-58h]
int v34; // [rsp+3Ch] [rbp-44h]
unsigned long long v35; // [rsp+40h] [rbp-40h]
unsigned long long v36; // [rsp+48h] [rbp-38h]
int v37; // [rsp+54h] [rbp-2Ch]
v32 = a3;
v6 = *(_QWORD *)a1;
v7 = *(_QWORD *)(*(_QWORD *)a1 + 936LL);
v31 = a4;
if ( v7 > a4 )
{
LABEL_2:
ma_set_fatal_error(a1, 127, a3, a4, a5, a6);
return -1LL;
}
v9 = a2;
v10 = (_WORD *)((char *)a2 + *(_QWORD *)(v6 + 920));
v34 = *(unsigned __int8 *)a3;
v11 = *(unsigned int *)(v6 + 1012);
v12 = *(unsigned int *)(v6 + 1020);
v13 = v7 - v11;
v14 = (unsigned __int8 *)(a3 + v11);
if ( *(_DWORD *)(v6 + 1020) )
{
memcpy(a2, v14, *(unsigned int *)(v6 + 1020));
v14 += v12;
v9 = (_WORD *)((char *)a2 + v12);
v13 -= v12;
v6 = *(_QWORD *)a1;
}
a3 = v32;
v36 = v32 + v31;
a4 = *(unsigned int *)(v6 + 968);
if ( *(_DWORD *)(v6 + 968) )
{
v30 = v10;
v15 = *(_QWORD *)(v6 + 1416);
v29 = v15 + 56 * a4;
v37 = 1;
while ( 1 )
{
v16 = *(unsigned __int16 *)(v15 + 8);
v17 = *(_DWORD *)v15;
if ( !*(_DWORD *)v15 || v17 == 9 )
{
if ( v13 > (int)v36 - (int)v14 )
goto LABEL_2;
v13 -= v16;
memcpy(v9, v14, *(unsigned __int16 *)(v15 + 8));
v14 += v16;
goto LABEL_53;
}
if ( v17 == 8 )
{
a3 = (unsigned int)(v16 - 1);
v18 = 2LL - ((unsigned int)a3 < 0x100);
LOBYTE(a4) = *v14;
v19 = *v14;
if ( (unsigned int)a3 > 0xFF )
{
if ( (_BYTE)a4 == 0xFF )
{
v19 = (unsigned __int16)__ROL2__(*(_WORD *)(v14 + 1), 8);
v21 = v14 + 3;
}
else
{
v21 = v14 + 1;
}
v20 = v21;
a4 = (unsigned int)(v16 - 2);
if ( v19 > (unsigned int)a4 )
goto LABEL_2;
*v9 = v19;
}
else
{
if ( (unsigned int)a3 < v19 )
goto LABEL_2;
*(_BYTE *)v9 = a4;
v20 = v14 + 1;
}
a3 = v19;
v14 = &v20[v19];
if ( (unsigned long long)v14 > v36 )
goto LABEL_2;
memcpy((char *)v9 + v18, v20, v19);
--v13;
goto LABEL_53;
}
if ( (v37 & v34) == 0 )
break;
a4 = v17 - 3;
if ( (unsigned int)a4 <= 1 )
{
memset(v9, 0LL, *(unsigned __int16 *)(v15 + 8));
goto LABEL_50;
}
if ( v17 <= 2 )
{
if ( (unsigned int)v16 >= 0x100 && (a4 = *v14, (a4 & 0x80u) != 0LL) )
{
a3 = (long long)(v14 + 1);
if ( (unsigned long long)(v14 + 1) >= v36 )
goto LABEL_2;
a4 &= 0x7Fu;
v22 = a4 | (v14[1] << 7);
v23 = v14 + 2;
}
else
{
if ( v14 == (unsigned __int8 *)v36 )
goto LABEL_2;
v22 = *v14;
v23 = v14 + 1;
}
a5 = (unsigned int)v16 - v22;
if ( (unsigned int)v16 <= v22 )
goto LABEL_2;
--v13;
a4 = v22 + v13;
a3 = (unsigned int)(v36 - (_DWORD)v23);
if ( (unsigned int)a4 > (unsigned int)a3 )
goto LABEL_2;
if ( v17 == 1 )
{
v35 = v22;
memcpy(v9, v23, v22);
memset((char *)v9 + v22, 32LL, (unsigned int)v16 - v22);
}
else
{
memset(v9, 32LL, a5);
v35 = v22;
memcpy((char *)v9 + v16 - (unsigned int)v35, v23, (unsigned int)v35);
}
LABEL_49:
v14 = &v23[v35];
}
LABEL_50:
if ( (unsigned int)(2 * v37) >= 0x100 )
{
v34 = *(unsigned __int8 *)(v32 + 1);
a4 = ++v32;
v37 = 1;
}
else
{
v37 *= 2;
}
LABEL_53:
v9 = (_WORD *)((char *)v9 + v16);
v15 += 56LL;
if ( v15 >= v29 )
{
v6 = *(_QWORD *)a1;
v10 = v30;
goto LABEL_58;
}
}
if ( v17 != 4 )
{
v13 = (__PAIR64__(v13, v17) - 3) >> 32;
a4 = (unsigned int)(v36 - (_DWORD)v14);
if ( v13 + (unsigned int)v16 > (unsigned int)a4 )
goto LABEL_2;
memcpy(v9, v14, *(unsigned __int16 *)(v15 + 8));
v14 += v16;
goto LABEL_50;
}
switch ( *(_WORD *)(v15 + 8) )
{
case 9:
a5 = *v14;
break;
case 0xA:
a5 = *(unsigned __int16 *)v14;
break;
case 0xB:
a5 = *(unsigned __int16 *)v14 | (unsigned long long)(v14[2] << 16);
break;
case 0xC:
a5 = *(unsigned int *)v14;
break;
default:
a5 = 0LL;
break;
}
a4 = (unsigned int)(v16 - 8);
a3 = a4;
v24 = v36 - (_QWORD)v14 - a4;
if ( v36 - (unsigned long long)v14 < a4 )
goto LABEL_2;
v25 = v24 < a5;
v26 = v24 - a5;
if ( v25 )
goto LABEL_2;
a4 = v13;
if ( v26 < v13 )
goto LABEL_2;
v35 = a5;
memcpy(v9, v14, a3);
v27 = (unsigned int)(v16 - 8);
v23 = &v14[v27];
*(_QWORD *)((char *)v9 + v27) = v23;
goto LABEL_49;
}
v37 = 1;
LABEL_58:
if ( *(_QWORD *)(v6 + 1704) )
{
v28 = *v14++;
a4 = (unsigned long long)a1;
a1[44] = v28;
}
if ( v9 != v10 || v14 != (unsigned __int8 *)v36 || v37 != 1 && (-v37 & v34) != 0 )
goto LABEL_2;
return v31;
}
|
_ma_rec_unpack:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RBP + -0x50],RDI
MOV RAX,qword ptr [RDI]
MOV R12,qword ptr [RAX + 0x3a8]
MOV qword ptr [RBP + -0x68],RCX
CMP R12,RCX
JBE 0x0014bc48
LAB_0014bc1f:
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,0x7f
CALL 0x00142bb4
MOV qword ptr [RBP + -0x68],-0x1
LAB_0014bc35:
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014bc48:
MOV R15,RSI
MOV R14,qword ptr [RAX + 0x398]
ADD R14,RSI
MOV RDX,qword ptr [RBP + -0x58]
MOVZX ECX,byte ptr [RDX]
MOV dword ptr [RBP + -0x44],ECX
MOV R13D,dword ptr [RAX + 0x3f4]
MOV EBX,dword ptr [RAX + 0x3fc]
SUB R12D,R13D
ADD R13,RDX
TEST RBX,RBX
JZ 0x0014bc95
MOV RDI,R15
MOV RSI,R13
MOV RDX,RBX
CALL 0x0012a0a0
ADD R13,RBX
ADD R15,RBX
SUB R12D,EBX
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
LAB_0014bc95:
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x58]
ADD RCX,RDX
MOV qword ptr [RBP + -0x38],RCX
MOV ECX,dword ptr [RAX + 0x3c8]
TEST RCX,RCX
JZ 0x0014bfab
MOV qword ptr [RBP + -0x70],R14
MOV RBX,qword ptr [RAX + 0x588]
IMUL RAX,RCX,0x38
ADD RAX,RBX
MOV qword ptr [RBP + -0x78],RAX
MOV dword ptr [RBP + -0x2c],0x1
LAB_0014bcd0:
MOVZX R14D,word ptr [RBX + 0x8]
MOV EAX,dword ptr [RBX]
TEST EAX,EAX
JZ 0x0014bd1d
CMP EAX,0x9
JZ 0x0014bd1d
CMP EAX,0x8
JNZ 0x0014bd46
LEA EDX,[R14 + -0x1]
CMP EDX,0x100
MOV EDI,0x2
SBB RDI,0x0
MOV CL,byte ptr [R13]
MOVZX EAX,CL
CMP EDX,0xff
JA 0x0014bd68
CMP EDX,EAX
JC 0x0014bc1f
INC R13
MOV byte ptr [R15],CL
MOV RSI,R13
JMP 0x0014be5a
LAB_0014bd1d:
MOV RAX,qword ptr [RBP + -0x38]
SUB EAX,R13D
CMP R12D,EAX
JA 0x0014bc1f
SUB R12D,R14D
MOV RDI,R15
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a0a0
ADD R13,R14
JMP 0x0014bf74
LAB_0014bd46:
MOV ECX,dword ptr [RBP + -0x2c]
TEST dword ptr [RBP + -0x44],ECX
JZ 0x0014bd79
LEA ECX,[RAX + -0x3]
CMP ECX,0x1
JA 0x0014bda9
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R14
CALL 0x0012a2c0
JMP 0x0014bf4a
LAB_0014bd68:
CMP CL,0xff
JZ 0x0014be35
INC R13
JMP 0x0014be45
LAB_0014bd79:
CMP EAX,0x4
JNZ 0x0014be7a
LEA EAX,[R14 + -0x9]
CMP EAX,0x3
JA 0x0014bef8
LEA RCX,[0x1e95dc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_9:
MOVZX R8D,byte ptr [R13]
JMP 0x0014befb
LAB_0014bda9:
CMP EAX,0x2
JA 0x0014bf4a
CMP R14D,0x100
JC 0x0014bdc8
MOVZX ECX,byte ptr [R13]
TEST CL,CL
JS 0x0014bf87
LAB_0014bdc8:
CMP R13,qword ptr [RBP + -0x38]
JZ 0x0014bc1f
MOVZX ESI,byte ptr [R13]
INC R13
LAB_0014bdda:
MOV R8D,R14D
SUB R8D,ESI
JBE 0x0014bc1f
DEC R12D
LEA ECX,[RSI + R12*0x1]
MOV RDX,qword ptr [RBP + -0x38]
SUB EDX,R13D
CMP ECX,EDX
JA 0x0014bc1f
CMP EAX,0x1
JNZ 0x0014beac
MOV EDX,ESI
MOV qword ptr [RBP + -0x40],RDX
MOV RDI,R15
MOV RSI,R13
MOV qword ptr [RBP + -0x60],R8
CALL 0x0012a0a0
MOV RAX,qword ptr [RBP + -0x40]
LEA RDI,[R15 + RAX*0x1]
MOV ESI,0x20
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x0012a2c0
JMP 0x0014bf46
LAB_0014be35:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX EAX,AX
ADD R13,0x3
LAB_0014be45:
MOV RSI,R13
MOV ECX,R14D
ADD ECX,-0x2
CMP EAX,ECX
JA 0x0014bc1f
MOV word ptr [R15],AX
LAB_0014be5a:
MOV EDX,EAX
LEA R13,[RSI + RDX*0x1]
CMP R13,qword ptr [RBP + -0x38]
JA 0x0014bc1f
ADD RDI,R15
CALL 0x0012a0a0
DEC R12D
JMP 0x0014bf74
LAB_0014be7a:
CMP EAX,0x3
SBB R12D,0x0
MOV EAX,R14D
ADD EAX,R12D
MOV RCX,qword ptr [RBP + -0x38]
SUB ECX,R13D
CMP EAX,ECX
JA 0x0014bc1f
MOV RDI,R15
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a0a0
ADD R13,R14
JMP 0x0014bf4a
LAB_0014beac:
MOV RDI,R15
MOV qword ptr [RBP + -0x40],RSI
MOV ESI,0x20
MOV RDX,R8
CALL 0x0012a2c0
LEA RDI,[R15 + R14*0x1]
MOV EDX,dword ptr [RBP + -0x40]
SUB RDI,RDX
MOV RSI,R13
MOV qword ptr [RBP + -0x40],RDX
CALL 0x0012a0a0
JMP 0x0014bf46
caseD_b:
MOVZX EAX,word ptr [R13]
MOVZX R8D,byte ptr [R13 + 0x2]
SHL R8D,0x10
OR R8,RAX
JMP 0x0014befb
caseD_c:
MOV R8D,dword ptr [R13]
JMP 0x0014befb
caseD_a:
MOVZX R8D,word ptr [R13]
JMP 0x0014befb
default:
XOR R8D,R8D
LAB_0014befb:
MOV ECX,R14D
ADD ECX,-0x8
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,R13
MOV EDX,ECX
SUB RAX,RDX
JC 0x0014bc1f
SUB RAX,R8
JC 0x0014bc1f
MOV ECX,R12D
CMP RAX,RCX
JC 0x0014bc1f
MOV RDI,R15
MOV RSI,R13
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x60],RDX
CALL 0x0012a0a0
MOV RAX,qword ptr [RBP + -0x60]
ADD R13,RAX
MOV qword ptr [R15 + RAX*0x1],R13
LAB_0014bf46:
ADD R13,qword ptr [RBP + -0x40]
LAB_0014bf4a:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,EAX
CMP EAX,0x100
JNC 0x0014bf5b
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0014bf74
LAB_0014bf5b:
MOV RCX,qword ptr [RBP + -0x58]
MOVZX EAX,byte ptr [RCX + 0x1]
MOV dword ptr [RBP + -0x44],EAX
INC RCX
MOV qword ptr [RBP + -0x58],RCX
MOV dword ptr [RBP + -0x2c],0x1
LAB_0014bf74:
ADD R15,R14
ADD RBX,0x38
CMP RBX,qword ptr [RBP + -0x78]
JC 0x0014bcd0
JMP 0x0014bfb4
LAB_0014bf87:
LEA RDX,[R13 + 0x1]
CMP RDX,qword ptr [RBP + -0x38]
JNC 0x0014bc1f
AND ECX,0x7f
MOVZX ESI,byte ptr [R13 + 0x1]
SHL ESI,0x7
OR ESI,ECX
ADD R13,0x2
JMP 0x0014bdda
LAB_0014bfab:
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x0014bfbf
LAB_0014bfb4:
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
MOV R14,qword ptr [RBP + -0x70]
LAB_0014bfbf:
CMP qword ptr [RAX + 0x6a8],0x0
JZ 0x0014bfdb
MOVZX EAX,byte ptr [R13]
INC R13
MOV RCX,qword ptr [RBP + -0x50]
MOV dword ptr [RCX + 0xb0],EAX
LAB_0014bfdb:
CMP R15,R14
JNZ 0x0014bc1f
CMP R13,qword ptr [RBP + -0x38]
JNZ 0x0014bc1f
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,0x1
JZ 0x0014bc35
NEG EAX
TEST dword ptr [RBP + -0x44],EAX
JNZ 0x0014bc1f
JMP 0x0014bc35
|
ulong _ma_rec_unpack(long *param_1,byte *param_2,byte *param_3,ulong param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
uint uVar4;
uint *puVar5;
ulong uVar6;
long lVar7;
uint *puVar8;
uint uVar9;
ulong __n;
ulong uVar10;
uint *puVar11;
uint uVar12;
uint uVar13;
uint *__src;
byte *__src_00;
ushort *__src_01;
byte *pbVar14;
byte *local_60;
uint local_4c;
size_t local_48;
uint local_34;
lVar7 = *param_1;
if (*(ulong *)(lVar7 + 0x3a8) <= param_4) {
pbVar14 = param_2 + *(long *)(lVar7 + 0x398);
local_4c = (uint)*param_3;
uVar4 = *(uint *)(lVar7 + 0x3fc);
uVar10 = (ulong)uVar4;
uVar13 = (int)*(ulong *)(lVar7 + 0x3a8) - *(uint *)(lVar7 + 0x3f4);
__src = (uint *)(param_3 + *(uint *)(lVar7 + 0x3f4));
if (uVar10 != 0) {
memcpy(param_2,__src,uVar10);
__src = (uint *)((long)__src + uVar10);
param_2 = param_2 + uVar10;
uVar13 = uVar13 - uVar4;
lVar7 = *param_1;
}
puVar8 = (uint *)(param_3 + param_4);
if ((ulong)*(uint *)(lVar7 + 0x3c8) == 0) {
local_34 = 1;
}
else {
puVar11 = *(uint **)(lVar7 + 0x588);
puVar5 = puVar11 + (ulong)*(uint *)(lVar7 + 0x3c8) * 0xe;
local_34 = 1;
local_60 = param_3;
do {
uVar2 = (ushort)puVar11[2];
uVar10 = (ulong)uVar2;
uVar4 = *puVar11;
iVar3 = (int)puVar8;
if ((uVar4 == 0) || (uVar4 == 9)) {
if ((uint)(iVar3 - (int)__src) < uVar13) goto LAB_0014bc1f;
uVar13 = uVar13 - uVar2;
memcpy(param_2,__src,uVar10);
__src = (uint *)((long)__src + uVar10);
}
else if (uVar4 == 8) {
uVar9 = uVar2 - 1;
bVar1 = (byte)*__src;
uVar4 = (uint)bVar1;
if (uVar9 < 0x100) {
if (uVar9 < bVar1) goto LAB_0014bc1f;
__src_00 = (byte *)((long)__src + 1);
*param_2 = bVar1;
}
else {
if (bVar1 == 0xff) {
uVar4 = (uint)(ushort)(*(ushort *)((long)__src + 1) << 8 |
*(ushort *)((long)__src + 1) >> 8);
__src_00 = (byte *)((long)__src + 3);
}
else {
__src_00 = (byte *)((long)__src + 1);
}
if (uVar2 - 2 < uVar4) goto LAB_0014bc1f;
*(short *)param_2 = (short)uVar4;
}
__src = (uint *)(__src_00 + uVar4);
if (puVar8 < __src) goto LAB_0014bc1f;
memcpy(param_2 + (2 - (ulong)(uVar9 < 0x100)),__src_00,(ulong)uVar4);
uVar13 = uVar13 - 1;
}
else {
if ((local_4c & local_34) == 0) {
if (uVar4 == 4) {
switch(uVar2) {
case 9:
local_48 = (size_t)(byte)*__src;
break;
case 10:
local_48 = (size_t)(ushort)*__src;
break;
case 0xb:
local_48 = (size_t)(uint3)*__src;
break;
case 0xc:
local_48 = (size_t)*__src;
break;
default:
local_48 = 0;
}
__n = (ulong)(uVar2 - 8);
uVar6 = ((long)puVar8 - (long)__src) - __n;
if ((((ulong)((long)puVar8 - (long)__src) < __n) || (uVar6 < local_48)) ||
(uVar6 - local_48 < (ulong)uVar13)) goto LAB_0014bc1f;
memcpy(param_2,__src,__n);
__src_01 = (ushort *)((long)__src + __n);
*(ushort **)(param_2 + __n) = __src_01;
LAB_0014bf46:
__src = (uint *)((long)__src_01 + local_48);
}
else {
uVar13 = uVar13 - (uVar4 < 3);
if ((uint)(iVar3 - (int)__src) < uVar2 + uVar13) goto LAB_0014bc1f;
memcpy(param_2,__src,uVar10);
__src = (uint *)((long)__src + uVar10);
}
}
else if (uVar4 - 3 < 2) {
memset(param_2,0,uVar10);
}
else if (uVar4 < 3) {
if ((uVar2 < 0x100) || (-1 < (char)(byte)*__src)) {
if (__src == puVar8) goto LAB_0014bc1f;
local_48 = (size_t)(byte)*__src;
__src_01 = (ushort *)((long)__src + 1);
}
else {
if (puVar8 <= (uint *)((long)__src + 1U)) goto LAB_0014bc1f;
local_48 = (size_t)((uint)*(byte *)((long)__src + 1) << 7 | (byte)*__src & 0x7f);
__src_01 = (ushort *)((long)__src + 2);
}
uVar9 = (uint)local_48;
uVar12 = uVar2 - uVar9;
if ((uVar9 <= uVar2 && uVar12 != 0) &&
(uVar13 = uVar13 - 1, uVar9 + uVar13 <= (uint)(iVar3 - (int)__src_01))) {
if (uVar4 == 1) {
memcpy(param_2,__src_01,local_48);
memset(param_2 + local_48,0x20,(ulong)uVar12);
}
else {
memset(param_2,0x20,(ulong)uVar12);
memcpy(param_2 + (uVar10 - local_48),__src_01,local_48);
}
goto LAB_0014bf46;
}
goto LAB_0014bc1f;
}
local_34 = local_34 * 2;
if (0xff < local_34) {
local_4c = (uint)local_60[1];
local_60 = local_60 + 1;
local_34 = 1;
}
}
param_2 = param_2 + uVar10;
puVar11 = puVar11 + 0xe;
} while (puVar11 < puVar5);
lVar7 = *param_1;
}
if (*(long *)(lVar7 + 0x6a8) != 0) {
uVar4 = *__src;
__src = (uint *)((long)__src + 1);
*(uint *)(param_1 + 0x16) = (uint)(byte)uVar4;
}
if ((param_2 == pbVar14) && (__src == puVar8)) {
if (local_34 == 1) {
return param_4;
}
if ((local_4c & -local_34) == 0) {
return param_4;
}
}
}
LAB_0014bc1f:
_ma_set_fatal_error(param_1,0x7f);
return 0xffffffffffffffff;
}
|
|
18,634
|
printShotResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool)
|
666mxvbee[P]BattleShip/lib/Utils/PrintUtils.cpp
|
void printShotResult(const std::string& result, uint64_t x, uint64_t y, bool isMaster) {
std::string player = isMaster ? "Master" : "Slave";
if (result == "miss") {
std::cout << player << ": Miss at (" << x << ", " << y << ").\n";
} else if (result == "hit") {
std::cout << player << ": Hit at (" << x << ", " << y << ").\n";
} else if (result == "hit_and_sunk") {
std::cout << player << ": Hit and sunk at (" << x << ", " << y << ").\n";
} else {
std::cout << player << ": Unknown shot result '" << result << "' at (" << x << ", " << y << ").\n";
}
}
|
O1
|
cpp
|
printShotResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2c1d(%rip), %rax # 0x1bac0
leaq 0x2c1d(%rip), %rsi # 0x1bac7
testl %ecx, %ecx
cmovneq %rax, %rsi
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movl %ecx, %eax
leaq (%rax,%rsi), %rdx
addq $0x5, %rdx
movq %rsp, %rdi
callq 0x6106
leaq 0x2463(%rip), %rsi # 0x1b335
movq %r15, %rdi
callq 0x752e
testl %eax, %eax
je 0x18f89
leaq 0x2448(%rip), %rsi # 0x1b331
movq %r15, %rdi
callq 0x752e
testl %eax, %eax
je 0x18fdc
leaq 0x2424(%rip), %rsi # 0x1b324
movq %r15, %rdi
callq 0x752e
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
testl %eax, %eax
je 0x1902c
movq 0xc080(%rip), %rdi # 0x24fa0
callq 0x5400
movq %rax, %r12
leaq 0x2bb2(%rip), %rsi # 0x1bae1
movl $0x17, %edx
movq %rax, %rdi
callq 0x5400
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x5400
movq %rax, %r15
leaq 0x2ba4(%rip), %rsi # 0x1baf9
movl $0x6, %edx
movq %rax, %rdi
callq 0x5400
movq %r15, %rdi
movq %r14, %rsi
callq 0x5270
movq %rax, %r14
leaq 0x2393(%rip), %rsi # 0x1b30a
movl $0x2, %edx
movq %rax, %rdi
callq 0x5400
jmp 0x19071
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0xc007(%rip), %rdi # 0x24fa0
callq 0x5400
movq %rax, %r15
leaq 0x23ca(%rip), %rsi # 0x1b372
movl $0xb, %edx
movq %rax, %rdi
callq 0x5400
movq %r15, %rdi
movq %r14, %rsi
callq 0x5270
movq %rax, %r14
leaq 0x2340(%rip), %rsi # 0x1b30a
movl $0x2, %edx
movq %rax, %rdi
callq 0x5400
jmp 0x19071
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0xbfb4(%rip), %rdi # 0x24fa0
callq 0x5400
movq %rax, %r15
leaq 0x2344(%rip), %rsi # 0x1b33f
movl $0xa, %edx
movq %rax, %rdi
callq 0x5400
movq %r15, %rdi
movq %r14, %rsi
callq 0x5270
movq %rax, %r14
leaq 0x22ed(%rip), %rsi # 0x1b30a
movl $0x2, %edx
movq %rax, %rdi
callq 0x5400
jmp 0x19071
movq 0xbf6d(%rip), %rdi # 0x24fa0
callq 0x5400
movq %rax, %r15
leaq 0x2a8b(%rip), %rsi # 0x1bacd
movl $0x13, %edx
movq %rax, %rdi
callq 0x5400
movq %r15, %rdi
movq %r14, %rsi
callq 0x5270
movq %rax, %r14
leaq 0x22a6(%rip), %rsi # 0x1b30a
movl $0x2, %edx
movq %rax, %rdi
callq 0x5400
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5270
leaq 0x2706(%rip), %rsi # 0x1b789
movl $0x3, %edx
movq %rax, %rdi
callq 0x5400
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x190a6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5380
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x190cd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5380
movq %rbx, %rdi
callq 0x55e0
|
_Z15printShotResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmmb:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rax, aMaster_0; "Master"
lea rsi, aSlave_0; "Slave"
test ecx, ecx
cmovnz rsi, rax
lea r13, [rsp+48h+var_38]
mov [r13-10h], r13
mov eax, ecx
lea rdx, [rax+rsi]
add rdx, 5
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aMiss; "miss"
mov rdi, r15
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_18F89
lea rsi, aHit; "hit"
mov rdi, r15
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_18FDC
lea rsi, aHitAndSunk; "hit_and_sunk"
mov rdi, r15
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
mov rsi, [rsp+48h+var_48]
mov rdx, [rsp+48h+var_40]
test eax, eax
jz loc_1902C
mov rdi, cs:_ZSt4cout_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, rax
lea rsi, aUnknownShotRes; ": Unknown shot result '"
mov edx, 17h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
lea rsi, aAt; "' at ("
mov edx, 6
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, r15
mov rsi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, asc_1B30A; ", "
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_19071
loc_18F89:
mov rsi, [rsp+48h+var_48]
mov rdx, [rsp+48h+var_40]
mov rdi, cs:_ZSt4cout_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
lea rsi, aSlaveMissAt+5; ": Miss at ("
mov edx, 0Bh
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, r15
mov rsi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, asc_1B30A; ", "
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_19071
loc_18FDC:
mov rsi, [rsp+48h+var_48]
mov rdx, [rsp+48h+var_40]
mov rdi, cs:_ZSt4cout_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
lea rsi, aSlaveHitAt+5; ": Hit at ("
mov edx, 0Ah
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, r15
mov rsi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, asc_1B30A; ", "
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_19071
loc_1902C:
mov rdi, cs:_ZSt4cout_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
lea rsi, aHitAndSunkAt; ": Hit and sunk at ("
mov edx, 13h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, r15
mov rsi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, asc_1B30A; ", "
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_19071:
mov rdi, r14
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aSlaveExitingBe+2Ah; ").\n"
mov edx, 3
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+48h+var_48]; void *
cmp rdi, r13
jz short loc_190A6
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_190A6:
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r13
jz short loc_190CD
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_190CD:
mov rdi, rbx
call __Unwind_Resume
|
void printShotResult(_QWORD *a1, long long a2, long long a3, int a4)
{
char *v6; // rsi
long long v7; // r12
long long v8; // r15
long long v9; // r14
long long v10; // r15
long long v11; // r15
long long v12; // rax
void *v13; // [rsp+0h] [rbp-48h] BYREF
long long v14; // [rsp+8h] [rbp-40h]
_QWORD v15[7]; // [rsp+10h] [rbp-38h] BYREF
v6 = "Slave";
if ( a4 )
v6 = "Master";
v13 = v15;
std::string::_M_construct<char const*>(&v13, v6, (long long)&v6[a4 + 5]);
if ( !(unsigned int)std::string::compare(a1, (long long)"miss") )
{
v10 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v13, v14);
std::__ostream_insert<char,std::char_traits<char>>(v10, ": Miss at (", 11LL);
v9 = std::ostream::_M_insert<unsigned long>(v10, a2);
std::__ostream_insert<char,std::char_traits<char>>(v9, ", ", 2LL);
}
else if ( !(unsigned int)std::string::compare(a1, (long long)"hit") )
{
v11 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v13, v14);
std::__ostream_insert<char,std::char_traits<char>>(v11, ": Hit at (", 10LL);
v9 = std::ostream::_M_insert<unsigned long>(v11, a2);
std::__ostream_insert<char,std::char_traits<char>>(v9, ", ", 2LL);
}
else
{
if ( !(unsigned int)std::string::compare(a1, (long long)"hit_and_sunk") )
{
v8 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v13, v14);
std::__ostream_insert<char,std::char_traits<char>>(v8, ": Hit and sunk at (", 19LL);
}
else
{
v7 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v13, v14);
std::__ostream_insert<char,std::char_traits<char>>(v7, ": Unknown shot result '", 23LL);
v8 = std::__ostream_insert<char,std::char_traits<char>>(v7, *a1, a1[1]);
std::__ostream_insert<char,std::char_traits<char>>(v8, "' at (", 6LL);
}
v9 = std::ostream::_M_insert<unsigned long>(v8, a2);
std::__ostream_insert<char,std::char_traits<char>>(v9, ", ", 2LL);
}
v12 = std::ostream::_M_insert<unsigned long>(v9, a3);
std::__ostream_insert<char,std::char_traits<char>>(v12, ").\n", 3LL);
if ( v13 != v15 )
operator delete(v13, v15[0] + 1LL);
}
|
printShotResult:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RAX,[0x11bac0]
LEA RSI,[0x11bac7]
TEST ECX,ECX
CMOVNZ RSI,RAX
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
MOV EAX,ECX
LEA RDX,[RAX + RSI*0x1]
ADD RDX,0x5
MOV RDI,RSP
CALL 0x00106106
LEA RSI,[0x11b335]
MOV RDI,R15
CALL 0x0010752e
TEST EAX,EAX
JZ 0x00118f89
LEA RSI,[0x11b331]
MOV RDI,R15
CALL 0x0010752e
TEST EAX,EAX
JZ 0x00118fdc
LEA RSI,[0x11b324]
MOV RDI,R15
CALL 0x0010752e
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
TEST EAX,EAX
JZ 0x0011902c
LAB_00118f19:
MOV RDI,qword ptr [0x00124fa0]
CALL 0x00105400
MOV R12,RAX
LEA RSI,[0x11bae1]
MOV EDX,0x17
MOV RDI,RAX
CALL 0x00105400
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R12
CALL 0x00105400
MOV R15,RAX
LEA RSI,[0x11baf9]
MOV EDX,0x6
MOV RDI,RAX
CALL 0x00105400
MOV RDI,R15
MOV RSI,R14
CALL 0x00105270
MOV R14,RAX
LEA RSI,[0x11b30a]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00105400
JMP 0x00119071
LAB_00118f89:
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [0x00124fa0]
CALL 0x00105400
MOV R15,RAX
LEA RSI,[0x11b372]
MOV EDX,0xb
MOV RDI,RAX
CALL 0x00105400
MOV RDI,R15
MOV RSI,R14
CALL 0x00105270
MOV R14,RAX
LEA RSI,[0x11b30a]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00105400
JMP 0x00119071
LAB_00118fdc:
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [0x00124fa0]
CALL 0x00105400
MOV R15,RAX
LEA RSI,[0x11b33f]
MOV EDX,0xa
MOV RDI,RAX
CALL 0x00105400
MOV RDI,R15
MOV RSI,R14
CALL 0x00105270
MOV R14,RAX
LEA RSI,[0x11b30a]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00105400
JMP 0x00119071
LAB_0011902c:
MOV RDI,qword ptr [0x00124fa0]
CALL 0x00105400
MOV R15,RAX
LEA RSI,[0x11bacd]
MOV EDX,0x13
MOV RDI,RAX
CALL 0x00105400
MOV RDI,R15
MOV RSI,R14
CALL 0x00105270
MOV R14,RAX
LEA RSI,[0x11b30a]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00105400
LAB_00119071:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00105270
LEA RSI,[0x11b789]
MOV EDX,0x3
MOV RDI,RAX
CALL 0x00105400
LAB_00119090:
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x001190a6
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00105380
LAB_001190a6:
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* printShotResult(std::__cxx11::string const&, unsigned long, unsigned long, bool) */
void printShotResult(string *param_1,ulong param_2,ulong param_3,bool param_4)
{
int iVar1;
ostream *poVar2;
int3 in_register_00000009;
char *pcVar3;
long *local_48;
long local_40;
long local_38 [2];
pcVar3 = "Slave";
if (CONCAT31(in_register_00000009,param_4) != 0) {
pcVar3 = "Master";
}
local_48 = local_38;
std::__cxx11::string::_M_construct<char_const*>
(&local_48,pcVar3,pcVar3 + (ulong)CONCAT31(in_register_00000009,param_4) + 5);
iVar1 = std::__cxx11::string::compare(param_1,"miss");
if (iVar1 == 0) {
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,(char *)local_48,local_40);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,": Miss at (",0xb);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,", ",2);
}
else {
iVar1 = std::__cxx11::string::compare(param_1,"hit");
if (iVar1 == 0) {
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,(char *)local_48,local_40);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,": Hit at (",10);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,", ",2);
}
else {
iVar1 = std::__cxx11::string::compare(param_1,"hit_and_sunk");
if (iVar1 == 0) {
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,(char *)local_48,local_40);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,": Hit and sunk at (",0x13);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,", ",2);
}
else {
/* try { // try from 00118f19 to 0011908f has its CatchHandler @ 001190b4 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,(char *)local_48,local_40);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,": Unknown shot result \'",0x17);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(poVar2,*(char **)param_1,*(long *)(param_1 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\' at (",6);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,", ",2);
}
}
}
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,").\n",3);
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return;
}
|
|
18,635
|
printShotResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool)
|
666mxvbee[P]BattleShip/lib/Utils/PrintUtils.cpp
|
void printShotResult(const std::string& result, uint64_t x, uint64_t y, bool isMaster) {
std::string player = isMaster ? "Master" : "Slave";
if (result == "miss") {
std::cout << player << ": Miss at (" << x << ", " << y << ").\n";
} else if (result == "hit") {
std::cout << player << ": Hit at (" << x << ", " << y << ").\n";
} else if (result == "hit_and_sunk") {
std::cout << player << ": Hit and sunk at (" << x << ", " << y << ").\n";
} else {
std::cout << player << ": Unknown shot result '" << result << "' at (" << x << ", " << y << ").\n";
}
}
|
O2
|
cpp
|
printShotResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool):
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x27f9(%rip), %rax # 0x18ad9
leaq 0x27f9(%rip), %rsi # 0x18ae0
testl %ecx, %ecx
cmovneq %rax, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6b2a
leaq 0x2082(%rip), %rsi # 0x18385
movq %r15, %rdi
callq 0x6b65
testb %al, %al
je 0x1632c
movq 0xec82(%rip), %rdi # 0x24f98
leaq 0x10(%rsp), %rsi
callq 0x5310
leaq 0x209b(%rip), %rsi # 0x183c2
jmp 0x163b8
leaq 0x204e(%rip), %rsi # 0x18381
movq %r15, %rdi
callq 0x6b65
testb %al, %al
je 0x16359
movq 0xec52(%rip), %rdi # 0x24f98
leaq 0x10(%rsp), %rsi
callq 0x5310
leaq 0x2038(%rip), %rsi # 0x1838f
jmp 0x163b8
leaq 0x2014(%rip), %rsi # 0x18374
movq %r15, %rdi
callq 0x6b65
testb %al, %al
je 0x16386
movq 0xec25(%rip), %rdi # 0x24f98
leaq 0x10(%rsp), %rsi
callq 0x5310
leaq 0x2762(%rip), %rsi # 0x18ae6
jmp 0x163b8
movq 0xec0b(%rip), %rdi # 0x24f98
leaq 0x10(%rsp), %rsi
callq 0x5310
leaq 0x275c(%rip), %rsi # 0x18afa
movq %rax, %rdi
callq 0x5340
movq %rax, %rdi
movq %r15, %rsi
callq 0x5310
leaq 0x275a(%rip), %rsi # 0x18b12
movq %rax, %rdi
callq 0x5340
movq %rax, %rdi
movq %r14, %rsi
callq 0x5270
leaq 0x1f88(%rip), %rsi # 0x1835a
movq %rax, %rdi
callq 0x5340
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5270
leaq 0x23b6(%rip), %rsi # 0x187a2
movq %rax, %rdi
callq 0x5340
leaq 0x10(%rsp), %rdi
callq 0x5bc0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5bc0
movq %rbx, %rdi
callq 0x5590
|
_Z15printShotResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmmb:
push r15
push r14
push rbx
sub rsp, 30h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rax, aMaster_0; "Master"
lea rsi, aSlave_0; "Slave"
test ecx, ecx
cmovnz rsi, rax
lea rdi, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_39]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aMiss; "miss"
mov rdi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_1632C
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rsp+48h+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aSlaveMissAt+5; ": Miss at ("
jmp loc_163B8
loc_1632C:
lea rsi, aHit; "hit"
mov rdi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_16359
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rsp+48h+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aSlaveHitAt+5; ": Hit at ("
jmp short loc_163B8
loc_16359:
lea rsi, aHitAndSunk; "hit_and_sunk"
mov rdi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_16386
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rsp+48h+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aHitAndSunkAt; ": Hit and sunk at ("
jmp short loc_163B8
loc_16386:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rsp+48h+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aUnknownShotRes; ": Unknown shot result '"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, r15
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aAt; "' at ("
loc_163B8:
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, asc_1835A; ", "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aSlaveExitingBe+2Ah; ").\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [rsp+48h+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 30h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
long long printShotResult(long long a1, long long a2, long long a3, int a4)
{
char *v6; // rsi
long long v7; // rax
char *v8; // rsi
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long result; // rax
_QWORD v16[7]; // [rsp+10h] [rbp-38h] BYREF
v6 = "Slave";
if ( a4 )
v6 = "Master";
std::string::basic_string<std::allocator<char>>(v16, v6);
if ( std::operator==<char>(a1) )
{
v7 = std::operator<<<char>(&std::cout, v16);
v8 = ": Miss at (";
}
else if ( std::operator==<char>(a1) )
{
v7 = std::operator<<<char>(&std::cout, v16);
v8 = ": Hit at (";
}
else if ( std::operator==<char>(a1) )
{
v7 = std::operator<<<char>(&std::cout, v16);
v8 = ": Hit and sunk at (";
}
else
{
v9 = std::operator<<<char>(&std::cout, v16);
v10 = std::operator<<<std::char_traits<char>>(v9, ": Unknown shot result '");
v7 = std::operator<<<char>(v10, a1);
v8 = "' at (";
}
v11 = std::operator<<<std::char_traits<char>>(v7, v8);
v12 = std::ostream::_M_insert<unsigned long>(v11, a2);
v13 = std::operator<<<std::char_traits<char>>(v12, ", ");
v14 = std::ostream::_M_insert<unsigned long>(v13, a3);
result = std::operator<<<std::char_traits<char>>(v14, ").\n");
std::string::~string();
return result;
}
|
printShotResult:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RAX,[0x118ad9]
LEA RSI,[0x118ae0]
TEST ECX,ECX
CMOVNZ RSI,RAX
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x00106b2a
LEA RSI,[0x118385]
MOV RDI,R15
CALL 0x00106b65
TEST AL,AL
JZ 0x0011632c
LAB_0011630f:
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[RSP + 0x10]
CALL 0x00105310
LEA RSI,[0x1183c2]
JMP 0x001163b8
LAB_0011632c:
LEA RSI,[0x118381]
MOV RDI,R15
CALL 0x00106b65
TEST AL,AL
JZ 0x00116359
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[RSP + 0x10]
CALL 0x00105310
LEA RSI,[0x11838f]
JMP 0x001163b8
LAB_00116359:
LEA RSI,[0x118374]
MOV RDI,R15
CALL 0x00106b65
TEST AL,AL
JZ 0x00116386
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[RSP + 0x10]
CALL 0x00105310
LEA RSI,[0x118ae6]
JMP 0x001163b8
LAB_00116386:
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[RSP + 0x10]
CALL 0x00105310
LEA RSI,[0x118afa]
MOV RDI,RAX
CALL 0x00105340
MOV RDI,RAX
MOV RSI,R15
CALL 0x00105310
LEA RSI,[0x118b12]
LAB_001163b8:
MOV RDI,RAX
CALL 0x00105340
MOV RDI,RAX
MOV RSI,R14
CALL 0x00105270
LEA RSI,[0x11835a]
MOV RDI,RAX
CALL 0x00105340
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00105270
LEA RSI,[0x1187a2]
MOV RDI,RAX
CALL 0x00105340
LAB_001163f4:
LEA RDI,[RSP + 0x10]
CALL 0x00105bc0
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* printShotResult(std::__cxx11::string const&, unsigned long, unsigned long, bool) */
void printShotResult(string *param_1,ulong param_2,ulong param_3,bool param_4)
{
bool bVar1;
ostream *poVar2;
int3 in_register_00000009;
char *pcVar3;
allocator local_39;
string local_38 [32];
pcVar3 = "Slave";
if (CONCAT31(in_register_00000009,param_4) != 0) {
pcVar3 = "Master";
}
std::__cxx11::string::string<std::allocator<char>>(local_38,pcVar3,&local_39);
bVar1 = std::operator==(param_1,"miss");
if (bVar1) {
/* try { // try from 0011630f to 001163f3 has its CatchHandler @ 00116408 */
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,local_38);
pcVar3 = ": Miss at (";
}
else {
bVar1 = std::operator==(param_1,"hit");
if (bVar1) {
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,local_38);
pcVar3 = ": Hit at (";
}
else {
bVar1 = std::operator==(param_1,"hit_and_sunk");
if (bVar1) {
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,local_38);
pcVar3 = ": Hit and sunk at (";
}
else {
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,local_38);
poVar2 = std::operator<<(poVar2,": Unknown shot result \'");
poVar2 = std::operator<<(poVar2,param_1);
pcVar3 = "\' at (";
}
}
}
poVar2 = std::operator<<(poVar2,pcVar3);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
poVar2 = std::operator<<(poVar2,", ");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::operator<<(poVar2,").\n");
std::__cxx11::string::~string(local_38);
return;
}
|
|
18,636
|
ma_mark_file_changed_now
|
eloqsql/storage/maria/ma_locking.c
|
int _ma_mark_file_changed_now(register MARIA_SHARE *share)
{
uchar buff[3];
int error= 1;
DBUG_ENTER("_ma_mark_file_changed_now");
if (_MA_ALREADY_MARKED_FILE_CHANGED)
DBUG_RETURN(0);
mysql_mutex_lock(&share->intern_lock); /* recheck under mutex */
if (! _MA_ALREADY_MARKED_FILE_CHANGED)
{
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
if (!share->global_changed)
{
share->changed= share->global_changed= 1;
share->state.open_count++;
}
/*
Temp tables don't need an open_count as they are removed on crash.
In theory transactional tables are fixed by log-based recovery, so don't
need an open_count either, but if recovery has failed and logs have been
removed (by maria-force-start-after-recovery-failures), we still need to
detect dubious tables.
If we didn't maintain open_count on disk for a table, after a crash
we wouldn't know if it was closed at crash time (thus does not need a
check) or not. So we would have to check all tables: overkill.
*/
if (!share->temporary)
{
CRASH_IF_S3_TABLE(share);
mi_int2store(buff,share->state.open_count);
buff[2]=1; /* Mark that it's changed */
if (my_pwrite(share->kfile.file, buff, sizeof(buff),
sizeof(share->state.header) +
MARIA_FILE_OPEN_COUNT_OFFSET,
MYF(MY_NABP)))
goto err;
}
/* Set uuid of file if not yet set (zerofilled file) */
if (share->base.born_transactional &&
!(share->state.org_changed & STATE_NOT_MOVABLE))
{
CRASH_IF_S3_TABLE(share);
/* Lock table to current installation */
if (_ma_set_uuid(share, 0) ||
(share->state.create_rename_lsn == LSN_NEEDS_NEW_STATE_LSNS &&
_ma_update_state_lsns_sub(share, LSN_IMPOSSIBLE,
trnman_get_min_trid(),
TRUE, TRUE)))
goto err;
share->state.changed|= STATE_NOT_MOVABLE;
share->state.org_changed|= STATE_NOT_MOVABLE;
}
}
error= 0;
err:
mysql_mutex_unlock(&share->intern_lock);
DBUG_RETURN(error);
#undef _MA_ALREADY_MARKED_FILE_CHANGED
}
|
O3
|
c
|
ma_mark_file_changed_now:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
testb $0x1, 0x170(%rdi)
je 0x442ba
xorl %r15d, %r15d
cmpb $0x0, 0x7df(%r14)
jne 0x44419
leaq 0x8f0(%r14), %rbx
cmpq $0x0, 0x930(%r14)
jne 0x44427
movq %rbx, %rdi
callq 0x2b230
movl 0x170(%r14), %eax
movb 0x7df(%r14), %cl
testb $0x1, %al
jne 0x442f9
orl $0x19, %eax
movl %eax, 0x170(%r14)
testb %cl, %cl
jne 0x4431f
jmp 0x4430e
xorl %r15d, %r15d
testb %cl, %cl
jne 0x44405
orl $0x19, %eax
movl %eax, 0x170(%r14)
movw $0x101, 0x7de(%r14) # imm = 0x101
incl 0x16c(%r14)
cmpb $0x0, 0x7d9(%r14)
je 0x443c5
xorl %r15d, %r15d
cmpb $0x0, 0x44c(%r14)
je 0x44405
testb $0x1, 0x175(%r14)
jne 0x44405
movl 0x760(%r14), %edi
movzwl 0xc(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
leaq 0x40be9a(%rip), %rsi # 0x450200
movl $0x10, %edx
movl $0x4, %r8d
callq 0xc450a
movl $0x1, %r15d
testb %al, %al
jne 0x44405
cmpq $0x2, 0x178(%r14)
jne 0x443af
callq 0x7382a
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x60b71
testl %eax, %eax
jne 0x44405
movabsq $0x10000000100, %rax # imm = 0x10000000100
orq %rax, 0x170(%r14)
xorl %r15d, %r15d
jmp 0x44405
movl 0x16c(%r14), %eax
leaq -0x1b(%rbp), %rsi
movb %al, 0x1(%rsi)
movb %ah, -0x1b(%rbp)
movb $0x1, 0x2(%rsi)
movl 0x760(%r14), %edi
movl $0x3, %edx
movl $0x18, %ecx
movl $0x4, %r8d
callq 0xc450a
movl $0x1, %r15d
testq %rax, %rax
je 0x4432d
movq 0x930(%r14), %rdi
testq %rdi, %rdi
jne 0x44440
movq %rbx, %rdi
callq 0x2b1f0
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbdf0d(%rip), %rsi # 0x10233b
movq %rbx, %rdi
movl $0x1ad, %edx # imm = 0x1AD
callq 0x324c0
jmp 0x442d7
leaq 0x3747c1(%rip), %rax # 0x3b8c08
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x44411
|
_ma_mark_file_changed_now:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdi
test byte ptr [rdi+170h], 1
jz short loc_442BA
xor r15d, r15d
cmp byte ptr [r14+7DFh], 0
jnz loc_44419
loc_442BA:
lea rbx, [r14+8F0h]
cmp qword ptr [r14+930h], 0
jnz loc_44427
mov rdi, rbx
call _pthread_mutex_lock
loc_442D7:
mov eax, [r14+170h]
mov cl, [r14+7DFh]
test al, 1
jnz short loc_442F9
or eax, 19h
mov [r14+170h], eax
test cl, cl
jnz short loc_4431F
jmp short loc_4430E
loc_442F9:
xor r15d, r15d
test cl, cl
jnz loc_44405
or eax, 19h
mov [r14+170h], eax
loc_4430E:
mov word ptr [r14+7DEh], 101h
inc dword ptr [r14+16Ch]
loc_4431F:
cmp byte ptr [r14+7D9h], 0
jz loc_443C5
loc_4432D:
xor r15d, r15d
cmp byte ptr [r14+44Ch], 0
jz loc_44405
test byte ptr [r14+175h], 1
jnz loc_44405
mov edi, [r14+760h]
movzx eax, word ptr [r14+0Ch]
rol ax, 8
movzx ecx, ax
lea rsi, maria_uuid
mov edx, 10h
mov r8d, 4
call my_pwrite
mov r15d, 1
test al, al
jnz loc_44405
cmp qword ptr [r14+178h], 2
jnz short loc_443AF
call trnman_get_min_trid
mov rdi, r14
xor esi, esi
mov rdx, rax
mov ecx, 1
mov r8d, 1
call _ma_update_state_lsns_sub
test eax, eax
jnz short loc_44405
loc_443AF:
mov rax, 10000000100h
or [r14+170h], rax
xor r15d, r15d
jmp short loc_44405
loc_443C5:
mov eax, [r14+16Ch]
lea rsi, [rbp+var_1B]
mov [rsi+1], al
mov [rbp+var_1B], ah
mov byte ptr [rsi+2], 1
mov edi, [r14+760h]
mov edx, 3
mov ecx, 18h
mov r8d, 4
call my_pwrite
mov r15d, 1
test rax, rax
jz loc_4432D
loc_44405:
mov rdi, [r14+930h]
test rdi, rdi
jnz short loc_44440
loc_44411:
mov rdi, rbx
call _pthread_mutex_unlock
loc_44419:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_44427:
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 1ADh
call psi_mutex_lock
jmp loc_442D7
loc_44440:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_44411
|
long long ma_mark_file_changed_now(long long a1)
{
long long v1; // rax
unsigned int v3; // r15d
int v4; // eax
char v5; // cl
long long v6; // rdi
long long min_trid; // rax
__int16 v8; // kr00_2
long long v9; // rdi
int v11; // [rsp+0h] [rbp-1Ch] BYREF
v11 = HIDWORD(v1);
if ( (*(_BYTE *)(a1 + 368) & 1) != 0 )
{
v3 = 0;
if ( *(_BYTE *)(a1 + 2015) )
return v3;
}
if ( *(_QWORD *)(a1 + 2352) )
psi_mutex_lock(a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x1ADu);
else
pthread_mutex_lock(a1 + 2288);
v4 = *(_DWORD *)(a1 + 368);
v5 = *(_BYTE *)(a1 + 2015);
if ( (v4 & 1) == 0 )
{
*(_DWORD *)(a1 + 368) = v4 | 0x19;
if ( v5 )
goto LABEL_11;
goto LABEL_10;
}
v3 = 0;
if ( !v5 )
{
*(_DWORD *)(a1 + 368) = v4 | 0x19;
LABEL_10:
*(_WORD *)(a1 + 2014) = 257;
++*(_DWORD *)(a1 + 364);
LABEL_11:
if ( *(_BYTE *)(a1 + 2009)
|| (v8 = *(_DWORD *)(a1 + 364),
BYTE1(v11) = HIBYTE(v8),
BYTE2(v11) = v8,
HIBYTE(v11) = 1,
v3 = 1,
!my_pwrite(*(unsigned int *)(a1 + 1888), (char *)&v11 + 1, 3LL, 24LL, 4LL)) )
{
v3 = 0;
if ( *(_BYTE *)(a1 + 1100) )
{
if ( (*(_BYTE *)(a1 + 373) & 1) == 0 )
{
v6 = *(unsigned int *)(a1 + 1888);
v3 = 1;
if ( !(unsigned __int8)my_pwrite(
v6,
&maria_uuid,
16LL,
(unsigned __int16)__ROL2__(*(_WORD *)(a1 + 12), 8),
4LL) )
{
if ( *(_QWORD *)(a1 + 376) != 2LL
|| (min_trid = trnman_get_min_trid(v6),
!(unsigned int)ma_update_state_lsns_sub(a1, 0LL, min_trid, 1LL, 1LL)) )
{
*(_QWORD *)(a1 + 368) |= 0x10000000100uLL;
v3 = 0;
}
}
}
}
}
}
v9 = *(_QWORD *)(a1 + 2352);
if ( v9 )
((void ( *)(long long))PSI_server[44])(v9);
pthread_mutex_unlock(a1 + 2288);
return v3;
}
|
_ma_mark_file_changed_now:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
TEST byte ptr [RDI + 0x170],0x1
JZ 0x001442ba
XOR R15D,R15D
CMP byte ptr [R14 + 0x7df],0x0
JNZ 0x00144419
LAB_001442ba:
LEA RBX,[R14 + 0x8f0]
CMP qword ptr [R14 + 0x930],0x0
JNZ 0x00144427
MOV RDI,RBX
CALL 0x0012b230
LAB_001442d7:
MOV EAX,dword ptr [R14 + 0x170]
MOV CL,byte ptr [R14 + 0x7df]
TEST AL,0x1
JNZ 0x001442f9
OR EAX,0x19
MOV dword ptr [R14 + 0x170],EAX
TEST CL,CL
JNZ 0x0014431f
JMP 0x0014430e
LAB_001442f9:
XOR R15D,R15D
TEST CL,CL
JNZ 0x00144405
OR EAX,0x19
MOV dword ptr [R14 + 0x170],EAX
LAB_0014430e:
MOV word ptr [R14 + 0x7de],0x101
INC dword ptr [R14 + 0x16c]
LAB_0014431f:
CMP byte ptr [R14 + 0x7d9],0x0
JZ 0x001443c5
LAB_0014432d:
XOR R15D,R15D
CMP byte ptr [R14 + 0x44c],0x0
JZ 0x00144405
TEST byte ptr [R14 + 0x175],0x1
JNZ 0x00144405
MOV EDI,dword ptr [R14 + 0x760]
MOVZX EAX,word ptr [R14 + 0xc]
ROL AX,0x8
MOVZX ECX,AX
LEA RSI,[0x550200]
MOV EDX,0x10
MOV R8D,0x4
CALL 0x001c450a
MOV R15D,0x1
TEST AL,AL
JNZ 0x00144405
CMP qword ptr [R14 + 0x178],0x2
JNZ 0x001443af
CALL 0x0017382a
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RAX
MOV ECX,0x1
MOV R8D,0x1
CALL 0x00160b71
TEST EAX,EAX
JNZ 0x00144405
LAB_001443af:
MOV RAX,0x10000000100
OR qword ptr [R14 + 0x170],RAX
XOR R15D,R15D
JMP 0x00144405
LAB_001443c5:
MOV EAX,dword ptr [R14 + 0x16c]
LEA RSI,[RBP + -0x1b]
MOV byte ptr [RSI + 0x1],AL
MOV byte ptr [RBP + -0x1b],AH
MOV byte ptr [RSI + 0x2],0x1
MOV EDI,dword ptr [R14 + 0x760]
MOV EDX,0x3
MOV ECX,0x18
MOV R8D,0x4
CALL 0x001c450a
MOV R15D,0x1
TEST RAX,RAX
JZ 0x0014432d
LAB_00144405:
MOV RDI,qword ptr [R14 + 0x930]
TEST RDI,RDI
JNZ 0x00144440
LAB_00144411:
MOV RDI,RBX
CALL 0x0012b1f0
LAB_00144419:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00144427:
LEA RSI,[0x20233b]
MOV RDI,RBX
MOV EDX,0x1ad
CALL 0x001324c0
JMP 0x001442d7
LAB_00144440:
LEA RAX,[0x4b8c08]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00144411
|
int8 _ma_mark_file_changed_now(long param_1)
{
pthread_mutex_t *__mutex;
uint uVar1;
char cVar2;
int iVar3;
int8 in_RAX;
int8 uVar4;
long lVar5;
int8 uVar6;
int8 uStack_28;
if (((*(byte *)(param_1 + 0x170) & 1) != 0) && (*(char *)(param_1 + 0x7df) != '\0')) {
return 0;
}
__mutex = (pthread_mutex_t *)(param_1 + 0x8f0);
uStack_28 = in_RAX;
if (*(long *)(param_1 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",
0x1ad);
}
uVar1 = *(uint *)(param_1 + 0x170);
if ((uVar1 & 1) == 0) {
*(uint *)(param_1 + 0x170) = uVar1 | 0x19;
if (*(char *)(param_1 + 0x7df) == '\0') goto LAB_0014430e;
}
else {
uVar6 = 0;
if (*(char *)(param_1 + 0x7df) != '\0') goto LAB_00144405;
*(uint *)(param_1 + 0x170) = uVar1 | 0x19;
LAB_0014430e:
*(int2 *)(param_1 + 0x7de) = 0x101;
*(int *)(param_1 + 0x16c) = *(int *)(param_1 + 0x16c) + 1;
}
if (*(char *)(param_1 + 0x7d9) == '\0') {
uStack_28._0_6_ =
CONCAT15((char)((uint)*(int4 *)(param_1 + 0x16c) >> 8),(int5)uStack_28);
uStack_28 = CONCAT17(1,CONCAT16((char)*(int4 *)(param_1 + 0x16c),(int6)uStack_28));
lVar5 = my_pwrite(*(int4 *)(param_1 + 0x760),(long)&uStack_28 + 5,3,0x18,4);
uVar6 = 1;
if (lVar5 != 0) goto LAB_00144405;
}
uVar6 = 0;
if ((*(char *)(param_1 + 0x44c) != '\0') && ((*(byte *)(param_1 + 0x175) & 1) == 0)) {
cVar2 = my_pwrite(*(int4 *)(param_1 + 0x760),maria_uuid,0x10,
*(ushort *)(param_1 + 0xc) << 8 | *(ushort *)(param_1 + 0xc) >> 8,4);
uVar6 = 1;
if (cVar2 == '\0') {
if (*(long *)(param_1 + 0x178) == 2) {
uVar4 = trnman_get_min_trid();
iVar3 = _ma_update_state_lsns_sub(param_1,0,uVar4,1,1);
if (iVar3 != 0) goto LAB_00144405;
}
*(ulong *)(param_1 + 0x170) = *(ulong *)(param_1 + 0x170) | 0x10000000100;
uVar6 = 0;
}
}
LAB_00144405:
if (*(long *)(param_1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return uVar6;
}
|
|
18,637
|
my_strnxfrm_uca_padn
|
eloqsql/strings/ctype-uca.c
|
static uchar *
my_strnxfrm_uca_padn(uchar *dst, uchar *de, uint nweights, int weight)
{
uint count= MY_MIN((uint) (de - dst) / 2, nweights);
for (; count ; count--)
{
*dst++= weight >> 8;
*dst++= weight & 0xFF;
}
return dst;
}
|
O0
|
c
|
my_strnxfrm_uca_padn:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
shrl %eax
cmpl -0x14(%rbp), %eax
jae 0x54c56
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
shrl %eax
movl %eax, -0x20(%rbp)
jmp 0x54c5c
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x54ca7
movl -0x18(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movl -0x18(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x54c62
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
|
my_strnxfrm_uca_padn:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
shr eax, 1
cmp eax, [rbp+var_14]
jnb short loc_54C56
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
shr eax, 1
mov [rbp+var_20], eax
jmp short loc_54C5C
loc_54C56:
mov eax, [rbp+var_14]
mov [rbp+var_20], eax
loc_54C5C:
mov eax, [rbp+var_20]
mov [rbp+var_1C], eax
loc_54C62:
cmp [rbp+var_1C], 0
jz short loc_54CA7
mov eax, [rbp+var_18]
sar eax, 8
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov eax, [rbp+var_18]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov eax, [rbp+var_1C]
add eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
jmp short loc_54C62
loc_54CA7:
mov rax, [rbp+var_8]
pop rbp
retn
|
_BYTE * my_strnxfrm_uca_padn(_BYTE *a1, int a2, unsigned int a3, __int16 a4)
{
_BYTE *v4; // rax
unsigned int v6; // [rsp+0h] [rbp-20h]
unsigned int i; // [rsp+4h] [rbp-1Ch]
_BYTE *v8; // [rsp+18h] [rbp-8h]
v8 = a1;
if ( (unsigned int)(a2 - (_DWORD)a1) >> 1 >= a3 )
v6 = a3;
else
v6 = (unsigned int)(a2 - (_DWORD)a1) >> 1;
for ( i = v6; i; --i )
{
*v8 = HIBYTE(a4);
v4 = v8 + 1;
v8 += 2;
*v4 = a4;
}
return v8;
}
|
my_strnxfrm_uca_padn:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
SHR EAX,0x1
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x00154c56
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
SHR EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00154c5c
LAB_00154c56:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x20],EAX
LAB_00154c5c:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x1c],EAX
LAB_00154c62:
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00154ca7
MOV EAX,dword ptr [RBP + -0x18]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00154c62
LAB_00154ca7:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int1 * my_strnxfrm_uca_padn(int1 *param_1,int param_2,uint param_3,int4 param_4)
{
int1 *puVar1;
uint local_28;
uint local_24;
int1 *local_10;
local_28 = param_3;
if ((uint)(param_2 - (int)param_1) >> 1 < param_3) {
local_28 = (uint)(param_2 - (int)param_1) >> 1;
}
local_10 = param_1;
for (local_24 = local_28; local_24 != 0; local_24 = local_24 - 1) {
puVar1 = local_10 + 1;
*local_10 = (char)((uint)param_4 >> 8);
local_10 = local_10 + 2;
*puVar1 = (char)param_4;
}
return local_10;
}
|
|
18,638
|
trnman_exists_active_transactions
|
eloqsql/storage/maria/trnman.c
|
my_bool trnman_exists_active_transactions(TrID min_id, TrID max_id,
my_bool trnman_is_locked)
{
TRN *trn;
my_bool ret= 0;
if (!trnman_is_locked)
mysql_mutex_lock(&LOCK_trn_list);
mysql_mutex_assert_owner(&LOCK_trn_list);
for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next)
{
/*
We use <= for max_id as max_id is a commit_trid and trn->trid
is transaction id. When calculating commit_trid we use the
current value of global_trid_generator. global_trid_generator is
incremented for each new transaction.
For example, assuming we have
min_id = 5
max_id = 10
A trid of value 5 can't see the history event between 5 & 10
at it vas started before min_id 5 was committed.
A trid of value 10 can't see the next history event (max_id = 10)
as it started before this was committed. In this case it must use
the this event.
*/
if (trn->trid > min_id && trn->trid <= max_id)
{
ret= 1;
break;
}
}
if (!trnman_is_locked)
mysql_mutex_unlock(&LOCK_trn_list);
return ret;
}
|
O3
|
c
|
trnman_exists_active_transactions:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
testb %bl, %bl
jne 0x62125
cmpq $0x0, 0x3a8ae9(%rip) # 0x40ac00
jne 0x62186
leaq 0x3a8aa0(%rip), %rdi # 0x40abc0
callq 0x2a200
movq 0x3a8754(%rip), %rax # 0x40a880
leaq 0x3a8795(%rip), %rcx # 0x40a8c8
cmpq %rcx, %rax
je 0x62154
movq 0x78(%rax), %rdx
cmpq %r15, %rdx
setbe %sil
cmpq %r14, %rdx
seta %dl
orb %sil, %dl
je 0x62159
movq 0x68(%rax), %rax
jmp 0x62133
xorl %r14d, %r14d
jmp 0x6215c
movb $0x1, %r14b
testb %bl, %bl
jne 0x62178
movq 0x3a8a99(%rip), %rdi # 0x40ac00
testq %rdi, %rdi
jne 0x6218d
leaq 0x3a8a4d(%rip), %rdi # 0x40abc0
callq 0x2a1d0
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2bb7b
jmp 0x62125
leaq 0x3318c4(%rip), %rax # 0x393a58
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x6216c
|
trnman_exists_active_transactions:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, edx
mov r14, rsi
mov r15, rdi
test bl, bl
jnz short loc_62125
cmp cs:qword_40AC00, 0
jnz short loc_62186
lea rdi, LOCK_trn_list
call _pthread_mutex_lock
loc_62125:
mov rax, cs:qword_40A880
lea rcx, active_list_max
loc_62133:
cmp rax, rcx
jz short loc_62154
mov rdx, [rax+78h]
cmp rdx, r15
setbe sil
cmp rdx, r14
setnbe dl
or dl, sil
jz short loc_62159
mov rax, [rax+68h]
jmp short loc_62133
loc_62154:
xor r14d, r14d
jmp short loc_6215C
loc_62159:
mov r14b, 1
loc_6215C:
test bl, bl
jnz short loc_62178
mov rdi, cs:qword_40AC00
test rdi, rdi
jnz short loc_6218D
loc_6216C:
lea rdi, LOCK_trn_list
call _pthread_mutex_unlock
loc_62178:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_62186:
call trnman_exists_active_transactions_cold_1
jmp short loc_62125
loc_6218D:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_6216C
|
long long trnman_exists_active_transactions(unsigned long long a1, unsigned long long a2, unsigned long long a3)
{
char v3; // bl
unsigned long long v4; // r14
long long i; // rax
v3 = a3;
v4 = a2;
if ( !(_BYTE)a3 )
{
if ( qword_40AC00 )
trnman_exists_active_transactions_cold_1(a1);
else
pthread_mutex_lock(&LOCK_trn_list);
}
for ( i = qword_40A880; ; i = *(_QWORD *)(i + 104) )
{
if ( (_UNKNOWN *)i == &active_list_max )
{
LODWORD(v4) = 0;
goto LABEL_10;
}
a3 = *(_QWORD *)(i + 120);
LOBYTE(a2) = a3 <= a1;
LOBYTE(a3) = a3 <= a1 || a3 > v4;
if ( !(_BYTE)a3 )
break;
}
LOBYTE(v4) = 1;
LABEL_10:
if ( !v3 )
{
if ( qword_40AC00 )
((void ( *)(long long, unsigned long long, unsigned long long, void *))PSI_server[44])(
qword_40AC00,
a2,
a3,
&active_list_max);
pthread_mutex_unlock(&LOCK_trn_list);
}
return (unsigned int)v4;
}
|
trnman_exists_active_transactions:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R14,RSI
MOV R15,RDI
TEST BL,BL
JNZ 0x00162125
CMP qword ptr [0x0050ac00],0x0
JNZ 0x00162186
LEA RDI,[0x50abc0]
CALL 0x0012a200
LAB_00162125:
MOV RAX,qword ptr [0x0050a880]
LEA RCX,[0x50a8c8]
LAB_00162133:
CMP RAX,RCX
JZ 0x00162154
MOV RDX,qword ptr [RAX + 0x78]
CMP RDX,R15
SETBE SIL
CMP RDX,R14
SETA DL
OR DL,SIL
JZ 0x00162159
MOV RAX,qword ptr [RAX + 0x68]
JMP 0x00162133
LAB_00162154:
XOR R14D,R14D
JMP 0x0016215c
LAB_00162159:
MOV R14B,0x1
LAB_0016215c:
TEST BL,BL
JNZ 0x00162178
MOV RDI,qword ptr [0x0050ac00]
TEST RDI,RDI
JNZ 0x0016218d
LAB_0016216c:
LEA RDI,[0x50abc0]
CALL 0x0012a1d0
LAB_00162178:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00162186:
CALL 0x0012bb7b
JMP 0x00162125
LAB_0016218d:
LEA RAX,[0x493a58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0016216c
|
ulong trnman_exists_active_transactions(ulong param_1,ulong param_2,char param_3)
{
int1 *puVar1;
ulong uVar2;
puVar1 = (int1 *)active_list_min._104_8_;
if (param_3 == '\0') {
if (LOCK_trn_list._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)LOCK_trn_list);
puVar1 = (int1 *)active_list_min._104_8_;
}
else {
trnman_exists_active_transactions_cold_1();
puVar1 = (int1 *)active_list_min._104_8_;
}
}
do {
if (puVar1 == active_list_max) {
uVar2 = 0;
LAB_0016215c:
if (param_3 == '\0') {
if (LOCK_trn_list._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list);
}
return uVar2 & 0xffffffff;
}
if (*(ulong *)(puVar1 + 0x78) <= param_2 && param_1 < *(ulong *)(puVar1 + 0x78)) {
uVar2 = CONCAT71((int7)(param_2 >> 8),1);
goto LAB_0016215c;
}
puVar1 = *(int1 **)(puVar1 + 0x68);
} while( true );
}
|
|
18,639
|
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 0x3dad5
movl %esi, %eax
leaq 0x6e884(%rip), %rcx # 0xac350
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
andq $0x0, (%rbx)
jmp 0x3db04
callq 0x3db06
jmp 0x3db01
movb $0x0, (%rbx)
jmp 0x3db04
callq 0x3db48
jmp 0x3db01
leaq 0x73de4(%rip), %rdi # 0xb18d9
callq 0x3db8a
jmp 0x3db01
callq 0x3dc18
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_3DAD3; jumptable 000000000003DAD3 default case, cases 0,5-7
mov eax, esi
lea rcx, jpt_3DAD3
movsxd rax, ds:(jpt_3DAD3 - 0AC350h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_3DAD3:
and qword ptr [rbx], 0; jumptable 000000000003DAD3 default case, cases 0,5-7
jmp short loc_3DB04
loc_3DADB:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; jumptable 000000000003DAD3 case 1
jmp short loc_3DB01
loc_3DAE2:
mov byte ptr [rbx], 0; jumptable 000000000003DAD3 case 4
jmp short loc_3DB04
loc_3DAE7:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; jumptable 000000000003DAD3 case 2
jmp short loc_3DB01
loc_3DAEE:
lea rdi, aErrorWhileHand_0+34h; jumptable 000000000003DAD3 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_3DB01
loc_3DAFC:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJEEEPT_DpOT0_; jumptable 000000000003DAD3 case 8
loc_3DB01:
mov [rbx], rax
loc_3DB04:
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 0x0013dad5
MOV EAX,ESI
LEA RCX,[0x1ac350]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
AND qword ptr [RBX],0x0
JMP 0x0013db04
caseD_1:
CALL 0x0013db06
JMP 0x0013db01
caseD_4:
MOV byte ptr [RBX],0x0
JMP 0x0013db04
caseD_2:
CALL 0x0013db48
JMP 0x0013db01
caseD_3:
LEA RDI,[0x1b18d9]
CALL 0x0013db8a
JMP 0x0013db01
caseD_8:
CALL 0x0013dc18
LAB_0013db01:
MOV qword ptr [RBX],RAX
LAB_0013db04:
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;
}
|
|
18,640
|
minja::Parser::parseExpansion()
|
llama.cpp/common/minja/minja.hpp
|
std::shared_ptr<Expression> parseExpansion() {
static std::regex expansion_tok(R"(\*\*?)");
auto op_str = consumeToken(expansion_tok);
auto expr = parseValueExpression();
if (op_str.empty()) return expr;
if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression");
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict);
}
|
O3
|
cpp
|
minja::Parser::parseExpansion():
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x81cd8(%rip), %rax # 0x164610
movb (%rax), %al
testb %al, %al
je 0xe2a7a
leaq 0x81ca7(%rip), %rdx # 0x1645f0
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0xdef6a
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xe2b64
cmpq $0x0, 0x40(%rsp)
movq 0x10(%rsp), %rax
je 0xe29a5
testq %rax, %rax
je 0xe2ad1
movq (%r14), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0xe29c6
movq 0x805fd(%rip), %rcx # 0x162f98
cmpb $0x0, (%rcx)
je 0xe29c2
incl 0x8(%rax)
jmp 0xe29c6
movq %rax, (%rbx)
movq 0x18(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, 0x18(%rsp)
movq %rax, 0x8(%rbx)
movq %rcx, 0x10(%rsp)
jmp 0xe2a48
lock
incl 0x8(%rax)
leaq 0x60(%rsp), %r15
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x8(%r15)
leaq 0x3df72(%rip), %rsi # 0x120950
leaq 0x38(%rsp), %rdi
callq 0x20f60
cmpl $0x1, %eax
movl $0x4, %eax
sbbl $0x0, %eax
leaq 0x34(%rsp), %r9
movl %eax, (%r9)
leaq 0x28(%rsp), %r14
movq $0x0, -0x8(%r14)
leaq 0x20(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x58(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r14, %rdi
callq 0xebcc6
movaps 0x20(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movups %xmm0, (%rbx)
movq %rax, 0x20(%rsp)
movq %r14, %rdi
callq 0x70a60
movq %r15, %rdi
callq 0x70a60
leaq 0x18(%rsp), %rdi
callq 0x70a60
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe2a6d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x20180
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x81b8f(%rip), %rdi # 0x164610
callq 0x205a0
testl %eax, %eax
je 0xe2942
leaq 0x81b5b(%rip), %rdi # 0x1645f0
leaq 0x3f078(%rip), %rsi # 0x121b14
movl $0x10, %edx
callq 0x6637a
leaq -0x7c687(%rip), %rdi # 0x66426
leaq 0x81b3c(%rip), %rsi # 0x1645f0
leaq 0x80fbd(%rip), %rdx # 0x163a78
callq 0x20ee0
leaq 0x81b49(%rip), %rdi # 0x164610
callq 0x20960
jmp 0xe2942
movl $0x10, %edi
callq 0x20650
movq %rax, %r14
leaq 0x3f035(%rip), %rsi # 0x121b1a
movq %rax, %rdi
callq 0x20430
movq 0x804cc(%rip), %rsi # 0x162fc0
movq 0x80485(%rip), %rdx # 0x162f80
movq %r14, %rdi
callq 0x20a50
movq %rax, %rbx
leaq 0x81b03(%rip), %rdi # 0x164610
callq 0x206d0
jmp 0xe2b5b
movq %rax, %rbx
jmp 0xe2b31
movq %rax, %rbx
movq %r14, %rdi
callq 0x20f00
jmp 0xe2b31
movq %rax, %rbx
movq %r15, %rdi
callq 0x70a60
leaq 0x18(%rsp), %rdi
callq 0x70a60
jmp 0xe2b40
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe2b5b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x20180
movq %rbx, %rdi
callq 0x20af0
nop
|
_ZN5minja6Parser14parseExpansionEv:
push r15
push r14
push rbx
sub rsp, 70h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok
mov al, [rax]
test al, al
jz loc_E2A7A
loc_E2942:
lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; int
lea rdi, [rsp+88h+var_50]; int
mov rsi, r14; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+88h+var_78]; this
mov rsi, r14
call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void)
cmp [rsp+88h+var_48], 0
mov rax, [rsp+88h+var_78]
jz short loc_E29A5
test rax, rax
jz loc_E2AD1
mov rax, [r14]
mov [rsp+88h+var_30], rax
mov rax, [r14+8]
mov [rsp+88h+var_28], rax
test rax, rax
jz short loc_E29C6
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_E29C2
inc dword ptr [rax+8]
jmp short loc_E29C6
loc_E29A5:
mov [rbx], rax
mov rax, [rsp+88h+var_70]
xor ecx, ecx
mov [rsp+88h+var_70], rcx
mov [rbx+8], rax
mov [rsp+88h+var_78], rcx
jmp loc_E2A48
loc_E29C2:
lock inc dword ptr [rax+8]
loc_E29C6:
lea r15, [rsp+88h+var_28]
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [r15+8], rax
lea rsi, asc_12094F+1; "*"
lea rdi, [rsp+88h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
cmp eax, 1
mov eax, 4
sbb eax, 0
lea r9, [rsp+88h+var_54]
mov [r9], eax
lea r14, [rsp+88h+var_68+8]
mov qword ptr [r14-8], 0
lea rsi, [rsp+88h+var_68]
lea rdx, [rsp+88h+var_79]
lea rcx, [rsp+88h+var_30]
lea r8, [rsp+88h+var_78]
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIvEJNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
movaps xmm0, [rsp+88h+var_68]
xor eax, eax
mov qword ptr [rsp+88h+var_68+8], rax
movups xmmword ptr [rbx], xmm0
mov qword ptr [rsp+88h+var_68], rax
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E2A48:
lea rdi, [rsp+88h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E2A6D
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2A6D:
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
loc_E2A7A:
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_E2942
lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rsi, asc_121B14; "\\*\\*?"
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, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_E2942
loc_E2AD1:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_E2B5B
mov rbx, rax
jmp short loc_E2B31
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_E2B31
mov rbx, rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E2B31:
lea rdi, [rsp+88h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_E2B40
mov rbx, rax
loc_E2B40:
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E2B5B
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2B5B:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
volatile signed __int32 *v3; // rax
__int128 v4; // xmm0
std::runtime_error *exception; // r14
char v7; // [rsp+Fh] [rbp-79h] BYREF
long long v8; // [rsp+10h] [rbp-78h] BYREF
volatile signed __int32 *v9; // [rsp+18h] [rbp-70h] BYREF
__int128 v10; // [rsp+20h] [rbp-68h] BYREF
int v11; // [rsp+34h] [rbp-54h]
void *v12[2]; // [rsp+38h] [rbp-50h] BYREF
long long v13; // [rsp+48h] [rbp-40h] BYREF
long long v14; // [rsp+58h] [rbp-30h] BYREF
volatile signed __int32 *v15[5]; // [rsp+60h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
(long long)"\\*\\*?",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v12,
(long long)a2,
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
1u);
minja::Parser::parseValueExpression((minja::Parser *)&v8);
if ( v12[1] )
{
if ( !v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v14 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v15[0] = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v15[1] = (volatile signed __int32 *)(a2[4] - a2[2]);
v11 = 4 - ((unsigned int)std::string::compare(v12, "*") == 0);
*(_QWORD *)&v10 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(char *)&v10 + 8,
&v10,
&v7,
&v14,
&v8);
v4 = v10;
*((_QWORD *)&v10 + 1) = 0LL;
*(_OWORD *)this = v4;
*(_QWORD *)&v10 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v10 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v15);
}
else
{
*(_QWORD *)this = v8;
v3 = v9;
v9 = 0LL;
*((_QWORD *)this + 1) = v3;
v8 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v9);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
return this;
}
|
parseExpansion:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x264610]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001e2a7a
LAB_001e2942:
LEA RDX,[0x2645f0]
LEA RDI,[RSP + 0x38]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001def6a
LAB_001e295b:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x001e2b64
CMP qword ptr [RSP + 0x40],0x0
MOV RAX,qword ptr [RSP + 0x10]
JZ 0x001e29a5
TEST RAX,RAX
JZ 0x001e2ad1
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x60],RAX
TEST RAX,RAX
JZ 0x001e29c6
MOV RCX,qword ptr [0x00262f98]
CMP byte ptr [RCX],0x0
JZ 0x001e29c2
INC dword ptr [RAX + 0x8]
JMP 0x001e29c6
LAB_001e29a5:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x18]
XOR ECX,ECX
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP + 0x10],RCX
JMP 0x001e2a48
LAB_001e29c2:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001e29c6:
LEA R15,[RSP + 0x60]
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [R15 + 0x8],RAX
LEA RSI,[0x220950]
LEA RDI,[RSP + 0x38]
CALL 0x00120f60
CMP EAX,0x1
MOV EAX,0x4
SBB EAX,0x0
LEA R9,[RSP + 0x34]
MOV dword ptr [R9],EAX
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + -0x8],0x0
LAB_001e2a08:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x58]
LEA R8,[RSP + 0x10]
MOV RDI,R14
CALL 0x001ebcc6
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,R14
CALL 0x00170a60
MOV RDI,R15
CALL 0x00170a60
LAB_001e2a48:
LEA RDI,[RSP + 0x18]
CALL 0x00170a60
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001e2a6d
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00120180
LAB_001e2a6d:
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
LAB_001e2a7a:
LEA RDI,[0x264610]
CALL 0x001205a0
TEST EAX,EAX
JZ 0x001e2942
LAB_001e2a8e:
LEA RDI,[0x2645f0]
LEA RSI,[0x221b14]
MOV EDX,0x10
CALL 0x0016637a
LAB_001e2aa6:
LEA RDI,[0x166426]
LEA RSI,[0x2645f0]
LEA RDX,[0x263a78]
CALL 0x00120ee0
LEA RDI,[0x264610]
CALL 0x00120960
JMP 0x001e2942
LAB_001e2ad1:
MOV EDI,0x10
CALL 0x00120650
MOV R14,RAX
LAB_001e2ade:
LEA RSI,[0x221b1a]
MOV RDI,RAX
CALL 0x00120430
LAB_001e2aed:
MOV RSI,qword ptr [0x00262fc0]
MOV RDX,qword ptr [0x00262f80]
MOV RDI,R14
CALL 0x00120a50
|
/* minja::Parser::parseExpansion() */
void minja::Parser::parseExpansion(void)
{
long lVar1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
long *in_RDI;
int1 local_79;
long local_78;
long local_70;
long local_68;
long lStack_60;
int local_54;
long *local_50;
long local_48;
long local_40 [2];
int8 local_30;
long local_28;
long local_20;
if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 001e2a8e to 001e2aa5 has its CatchHandler @ 001e2b03 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_);
}
}
consumeToken(&local_50);
/* try { // try from 001e295b to 001e2967 has its CatchHandler @ 001e2b3d */
parseValueExpression();
lVar1 = local_70;
if (local_48 == 0) {
*in_RDI = local_78;
local_70 = 0;
in_RDI[1] = lVar1;
local_78 = 0;
}
else {
if (local_78 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e2ade to 001e2aec has its CatchHandler @ 001e2b19 */
std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression");
/* try { // try from 001e2aed to 001e2b02 has its CatchHandler @ 001e2b14 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00262fc0,PTR__runtime_error_00262f80);
}
local_30 = *in_RSI;
local_28 = in_RSI[1];
if (local_28 != 0) {
if (*PTR___libc_single_threaded_00262f98 == '\0') {
LOCK();
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
}
}
local_20 = in_RSI[4] - in_RSI[2];
iVar2 = std::__cxx11::string::compare((char *)&local_50);
local_54 = 4 - (uint)(iVar2 == 0);
local_68 = 0;
/* try { // try from 001e2a08 to 001e2a23 has its CatchHandler @ 001e2b26 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_60,&local_68,&local_79,
&local_30,&local_78);
lVar1 = lStack_60;
lStack_60 = 0;
*in_RDI = local_68;
in_RDI[1] = lVar1;
local_68 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_28);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return;
}
|
|
18,641
|
fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, unsigned int, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, unsigned int, int, int, fmt::v10::detail::digit_grouping<char> const&)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
|
FMT_CONSTEXPR20 auto write_significand(OutputIt out, T significand,
int significand_size, int exponent,
const Grouping& grouping) -> OutputIt {
if (!grouping.has_separator()) {
out = write_significand<Char>(out, significand, significand_size);
return detail::fill_n(out, exponent, static_cast<Char>('0'));
}
auto buffer = memory_buffer();
write_significand<char>(appender(buffer), significand, significand_size);
detail::fill_n(appender(buffer), exponent, '0');
return grouping.apply(out, string_view(buffer.data(), buffer.size()));
}
|
O0
|
c
|
fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, unsigned int, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, unsigned int, int, int, fmt::v10::detail::digit_grouping<char> const&):
subq $0x2f8, %rsp # imm = 0x2F8
movq %rdi, 0x2e8(%rsp)
movl %esi, 0x2e4(%rsp)
movl %edx, 0x2e0(%rsp)
movl %ecx, 0x2dc(%rsp)
movq %r8, 0x2d0(%rsp)
movq 0x2d0(%rsp), %rdi
callq 0xae420
testb $0x1, %al
jne 0xae275
movq 0x2e8(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movl 0x2e4(%rsp), %esi
movl 0x2e0(%rsp), %edx
movq 0x2c0(%rsp), %rdi
callq 0xae440
movq %rax, 0x2c8(%rsp)
movq 0x2c8(%rsp), %rax
movq %rax, 0x2e8(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x2b8(%rsp)
movl 0x2dc(%rsp), %esi
movb $0x30, 0x2b7(%rsp)
movq 0x2b8(%rsp), %rdi
leaq 0x2b7(%rsp), %rdx
callq 0xad2c0
movq %rax, 0x2f0(%rsp)
jmp 0xae3f4
leaq 0x97(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x94520
movq 0x38(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x9e380
jmp 0xae29b
leaq 0x97(%rsp), %rdi
callq 0x96fa0
leaq 0x78(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x9f3a0
jmp 0xae2bc
movl 0x2e4(%rsp), %esi
movl 0x2e0(%rsp), %edx
movq 0x78(%rsp), %rdi
callq 0xae440
movq %rax, 0x30(%rsp)
jmp 0xae2db
movq 0x30(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x9f3a0
jmp 0xae2f9
movl 0x2dc(%rsp), %esi
movb $0x30, 0x67(%rsp)
movq 0x68(%rsp), %rdi
leaq 0x67(%rsp), %rdx
callq 0xad2c0
movq %rax, 0x28(%rsp)
jmp 0xae31b
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x98(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x9efd0
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
callq 0x9f020
movq 0x10(%rsp), %rsi
movq %rax, %rdx
leaq 0x40(%rsp), %rdi
callq 0x9fc80
movq 0x18(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
callq 0xa7160
movq %rax, 0x20(%rsp)
jmp 0xae392
movq 0x20(%rsp), %rax
movq %rax, 0x2f0(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x9ed50
jmp 0xae3f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x97(%rsp), %rdi
callq 0x96fa0
jmp 0xae404
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x9ed50
jmp 0xae404
movq 0x2f0(%rsp), %rax
addq $0x2f8, %rsp # imm = 0x2F8
retq
movq 0x88(%rsp), %rdi
callq 0x90db0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN3fmt3v106detail17write_significandIcNS0_8appenderEjNS1_14digit_groupingIcEEEET0_S6_T1_iiRKT2_:
sub rsp, 2F8h
mov [rsp+2F8h+var_10], rdi
mov [rsp+2F8h+var_14], esi
mov [rsp+2F8h+var_18], edx
mov [rsp+2F8h+var_1C], ecx
mov [rsp+2F8h+var_28], r8
mov rdi, [rsp+2F8h+var_28]
call _ZNK3fmt3v106detail14digit_groupingIcE13has_separatorEv; fmt::v10::detail::digit_grouping<char>::has_separator(void)
test al, 1
jnz loc_AE275
mov rax, [rsp+2F8h+var_10]
mov [rsp+2F8h+var_38], rax
mov esi, [rsp+2F8h+var_14]
mov edx, [rsp+2F8h+var_18]
mov rdi, [rsp+2F8h+var_38]
call _ZN3fmt3v106detail17write_significandIcNS0_8appenderEjEET0_S4_T1_i; fmt::v10::detail::write_significand<char,fmt::v10::appender,uint>(fmt::v10::appender,uint,int)
mov [rsp+2F8h+var_30], rax
mov rax, [rsp+2F8h+var_30]
mov [rsp+2F8h+var_10], rax
mov rax, [rsp+2F8h+var_10]
mov [rsp+2F8h+var_40], rax
mov esi, [rsp+2F8h+var_1C]
mov [rsp+2F8h+var_41], 30h ; '0'
mov rdi, [rsp+2F8h+var_40]
lea rdx, [rsp+2F8h+var_41]
call _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(fmt::v10::appender,int,char const&)
mov [rsp+2F8h+var_8], rax
jmp loc_AE3F4
loc_AE275:
lea rdi, [rsp+2F8h+var_261]
mov [rsp+2F8h+var_2C0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+2F8h+var_2C0]
lea rdi, [rsp+2F8h+var_260]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEEC2ERKS2_; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&)
jmp short $+2
loc_AE29B:
lea rdi, [rsp+2F8h+var_261]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+2F8h+var_280]
lea rsi, [rsp+2F8h+var_260]
call _ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_
jmp short $+2
loc_AE2BC:
mov esi, [rsp+2F8h+var_14]
mov edx, [rsp+2F8h+var_18]
mov rdi, [rsp+2F8h+var_280]
call _ZN3fmt3v106detail17write_significandIcNS0_8appenderEjEET0_S4_T1_i; fmt::v10::detail::write_significand<char,fmt::v10::appender,uint>(fmt::v10::appender,uint,int)
mov [rsp+2F8h+var_2C8], rax
jmp short $+2
loc_AE2DB:
mov rax, [rsp+2F8h+var_2C8]
mov [rsp+2F8h+var_288], rax
lea rdi, [rsp+2F8h+var_290]
lea rsi, [rsp+2F8h+var_260]
call _ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_
jmp short $+2
loc_AE2F9:
mov esi, [rsp+2F8h+var_1C]
mov [rsp+2F8h+var_291], 30h ; '0'
mov rdi, [rsp+2F8h+var_290]
lea rdx, [rsp+2F8h+var_291]
call _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(fmt::v10::appender,int,char const&)
mov [rsp+2F8h+var_2D0], rax
jmp short $+2
loc_AE31B:
mov rax, [rsp+2F8h+var_2D0]
mov [rsp+2F8h+var_2A0], rax
mov rax, [rsp+2F8h+var_28]
mov [rsp+2F8h+var_2E0], rax
mov rax, [rsp+2F8h+var_10]
mov [rsp+2F8h+var_2A8], rax
lea rdi, [rsp+2F8h+var_260]
mov [rsp+2F8h+var_2F0], rdi
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov rdi, [rsp+2F8h+var_2F0]
mov [rsp+2F8h+var_2E8], rax
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov rsi, [rsp+2F8h+var_2E8]
mov rdx, rax
lea rdi, [rsp+2F8h+var_2B8]
call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong)
mov rdi, [rsp+2F8h+var_2E0]
mov rsi, [rsp+2F8h+var_2A8]
mov rdx, [rsp+2F8h+var_2B8]
mov rcx, [rsp+2F8h+var_2B0]
call _ZNK3fmt3v106detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE; fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(fmt::v10::appender,fmt::v10::basic_string_view<char>)
mov [rsp+2F8h+var_2D8], rax
jmp short $+2
loc_AE392:
mov rax, [rsp+2F8h+var_2D8]
mov [rsp+2F8h+var_8], rax
lea rdi, [rsp+2F8h+var_260]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
jmp short loc_AE3F4
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_8F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_AE404
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_90]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
jmp short loc_AE404
loc_AE3F4:
mov rax, [rsp+2F8h+var_8]
add rsp, 2F8h
retn
loc_AE404:
mov rdi, [rsp+arg_80]
call __Unwind_Resume
|
long long fmt::v10::detail::write_significand<char,fmt::v10::appender,unsigned int,fmt::v10::detail::digit_grouping<char>>(
long long a1,
unsigned int a2,
unsigned int a3,
int a4,
long long a5)
{
long long v5; // rax
long long v7; // [rsp+10h] [rbp-2E8h]
long long v8; // [rsp+18h] [rbp-2E0h]
long long v9[2]; // [rsp+40h] [rbp-2B8h] BYREF
long long v10; // [rsp+50h] [rbp-2A8h]
long long v11; // [rsp+58h] [rbp-2A0h]
char v12; // [rsp+67h] [rbp-291h] BYREF
long long v13[2]; // [rsp+68h] [rbp-290h] BYREF
long long v14[3]; // [rsp+78h] [rbp-280h] BYREF
char v15; // [rsp+97h] [rbp-261h] BYREF
_QWORD v16[67]; // [rsp+98h] [rbp-260h] BYREF
char v17; // [rsp+2B7h] [rbp-41h] BYREF
long long v18; // [rsp+2B8h] [rbp-40h]
long long v19; // [rsp+2C0h] [rbp-38h]
long long v20; // [rsp+2C8h] [rbp-30h]
long long v21; // [rsp+2D0h] [rbp-28h]
int v22; // [rsp+2DCh] [rbp-1Ch]
unsigned int v23; // [rsp+2E0h] [rbp-18h]
unsigned int v24; // [rsp+2E4h] [rbp-14h]
long long v25; // [rsp+2E8h] [rbp-10h]
long long v26; // [rsp+2F0h] [rbp-8h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
if ( (fmt::v10::detail::digit_grouping<char>::has_separator(a5) & 1) != 0 )
{
std::allocator<char>::allocator();
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(v16, (long long)&v15);
std::allocator<char>::~allocator(&v15);
ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_((long long)v14, (long long)v16);
v13[1] = fmt::v10::detail::write_significand<char,fmt::v10::appender,unsigned int>(v14[0], v24, v23);
ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_((long long)v13, (long long)v16);
v12 = 48;
v11 = fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(v13[0], v22, &v12);
v8 = v21;
v10 = v25;
v7 = fmt::v10::detail::buffer<char>::data((long long)v16);
v5 = fmt::v10::detail::buffer<char>::size((long long)v16);
fmt::v10::basic_string_view<char>::basic_string_view(v9, v7, v5);
v26 = fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(v8, v10, v9[0], v9[1]);
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer((long long)v16);
}
else
{
v19 = v25;
v20 = fmt::v10::detail::write_significand<char,fmt::v10::appender,unsigned int>(v25, v24, v23);
v25 = v20;
v18 = v20;
v17 = 48;
return fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(v20, v22, &v17);
}
return v26;
}
|
write_significand<char,fmt::v10::appender,unsigned_int,fmt::v10::detail::digit_grouping<char>>:
SUB RSP,0x2f8
MOV qword ptr [RSP + 0x2e8],RDI
MOV dword ptr [RSP + 0x2e4],ESI
MOV dword ptr [RSP + 0x2e0],EDX
MOV dword ptr [RSP + 0x2dc],ECX
MOV qword ptr [RSP + 0x2d0],R8
MOV RDI,qword ptr [RSP + 0x2d0]
CALL 0x001ae420
TEST AL,0x1
JNZ 0x001ae275
MOV RAX,qword ptr [RSP + 0x2e8]
MOV qword ptr [RSP + 0x2c0],RAX
MOV ESI,dword ptr [RSP + 0x2e4]
MOV EDX,dword ptr [RSP + 0x2e0]
MOV RDI,qword ptr [RSP + 0x2c0]
CALL 0x001ae440
MOV qword ptr [RSP + 0x2c8],RAX
MOV RAX,qword ptr [RSP + 0x2c8]
MOV qword ptr [RSP + 0x2e8],RAX
MOV RAX,qword ptr [RSP + 0x2e8]
MOV qword ptr [RSP + 0x2b8],RAX
MOV ESI,dword ptr [RSP + 0x2dc]
MOV byte ptr [RSP + 0x2b7],0x30
MOV RDI,qword ptr [RSP + 0x2b8]
LEA RDX,[RSP + 0x2b7]
CALL 0x001ad2c0
MOV qword ptr [RSP + 0x2f0],RAX
JMP 0x001ae3f4
LAB_001ae275:
LEA RDI,[RSP + 0x97]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x00194520
MOV RSI,qword ptr [RSP + 0x38]
LAB_001ae28c:
LEA RDI,[RSP + 0x98]
CALL 0x0019e380
JMP 0x001ae29b
LAB_001ae29b:
LEA RDI,[RSP + 0x97]
CALL 0x00196fa0
LAB_001ae2a8:
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x98]
CALL 0x0019f3a0
JMP 0x001ae2bc
LAB_001ae2bc:
MOV ESI,dword ptr [RSP + 0x2e4]
MOV EDX,dword ptr [RSP + 0x2e0]
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x001ae440
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001ae2db
LAB_001ae2db:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x70],RAX
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x98]
CALL 0x0019f3a0
JMP 0x001ae2f9
LAB_001ae2f9:
MOV ESI,dword ptr [RSP + 0x2dc]
MOV byte ptr [RSP + 0x67],0x30
MOV RDI,qword ptr [RSP + 0x68]
LEA RDX,[RSP + 0x67]
CALL 0x001ad2c0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001ae31b
LAB_001ae31b:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x2d0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x2e8]
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[RSP + 0x98]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0019efd0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0019f020
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RAX
LEA RDI,[RSP + 0x40]
CALL 0x0019fc80
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
CALL 0x001a7160
LAB_001ae38b:
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001ae392
LAB_001ae392:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x2f0],RAX
LEA RDI,[RSP + 0x98]
CALL 0x0019ed50
JMP 0x001ae3f4
LAB_001ae3f4:
MOV RAX,qword ptr [RSP + 0x2f0]
ADD RSP,0x2f8
RET
|
/* fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, unsigned int,
fmt::v10::detail::digit_grouping<char> >(fmt::v10::appender, unsigned int, int, int,
fmt::v10::detail::digit_grouping<char> const&) */
int8
fmt::v10::detail::
write_significand<char,fmt::v10::appender,unsigned_int,fmt::v10::detail::digit_grouping<char>>
(int8 param_1,int4 param_2,int4 param_3,int4 param_4,
digit_grouping<char> *param_5)
{
digit_grouping<char> *pdVar1;
ulong uVar2;
char *pcVar3;
int8 local_2b8;
int8 local_2b0;
int8 local_2a8;
int8 local_2a0;
int1 local_291;
int8 local_290;
int8 local_288;
int8 local_280 [3];
allocator<char> local_261;
allocator local_260 [543];
int1 local_41;
int8 local_40;
int8 local_38;
int8 local_30;
digit_grouping<char> *local_28;
int4 local_1c;
int4 local_18;
int4 local_14;
int8 local_10;
int8 local_8;
local_28 = param_5;
local_1c = param_4;
local_18 = param_3;
local_14 = param_2;
local_10 = param_1;
uVar2 = digit_grouping<char>::has_separator(param_5);
if ((uVar2 & 1) == 0) {
local_38 = local_10;
local_40 = write_significand<char,fmt::v10::appender,unsigned_int>(local_10,local_14,local_18);
local_41 = 0x30;
local_30 = local_40;
local_10 = local_40;
local_8 = fill_n<fmt::v10::appender,int,char>(local_40,local_1c,&local_41);
}
else {
std::allocator<char>::allocator();
/* try { // try from 001ae28c to 001ae298 has its CatchHandler @ 001ae3ae */
basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(local_260);
std::allocator<char>::~allocator(&local_261);
/* try { // try from 001ae2a8 to 001ae38a has its CatchHandler @ 001ae3d1 */
appender::back_insert_iterator((appender *)local_280,(buffer *)local_260);
local_288 = write_significand<char,fmt::v10::appender,unsigned_int>
(local_280[0],local_14,local_18);
appender::back_insert_iterator((appender *)&local_290,(buffer *)local_260);
local_291 = 0x30;
local_2a0 = fill_n<fmt::v10::appender,int,char>(local_290,local_1c,&local_291);
pdVar1 = local_28;
local_2a8 = local_10;
pcVar3 = (char *)buffer<char>::data((buffer<char> *)local_260);
uVar2 = buffer<char>::size((buffer<char> *)local_260);
basic_string_view<char>::basic_string_view((basic_string_view<char> *)&local_2b8,pcVar3,uVar2);
local_8 = digit_grouping<char>::apply<fmt::v10::appender,char>
(pdVar1,local_2a8,local_2b8,local_2b0);
basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer
((basic_memory_buffer<char,500ul,std::allocator<char>> *)local_260);
}
return local_8;
}
|
|
18,642
|
fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, unsigned int, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, unsigned int, int, int, fmt::v10::detail::digit_grouping<char> const&)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
|
FMT_CONSTEXPR20 auto write_significand(OutputIt out, T significand,
int significand_size, int exponent,
const Grouping& grouping) -> OutputIt {
if (!grouping.has_separator()) {
out = write_significand<Char>(out, significand, significand_size);
return detail::fill_n(out, exponent, static_cast<Char>('0'));
}
auto buffer = memory_buffer();
write_significand<char>(appender(buffer), significand, significand_size);
detail::fill_n(appender(buffer), exponent, '0');
return grouping.apply(out, string_view(buffer.data(), buffer.size()));
}
|
O3
|
c
|
fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, unsigned int, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, unsigned int, int, int, fmt::v10::detail::digit_grouping<char> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movl %ecx, %ebp
movq %rdi, %rbx
cmpq $0x0, 0x28(%r8)
je 0x39a65
movq %r8, %r14
xorl %eax, %eax
leaq 0x30(%rsp), %r15
movq %rax, -0x10(%r15)
leaq 0x1cedb7(%rip), %rcx # 0x2087a8
movq %rcx, -0x20(%r15)
movq %r15, -0x18(%r15)
movq $0x1f4, -0x8(%r15) # imm = 0x1F4
movq %rsp, %rdi
movq %rax, (%rdi)
movw $0x0, 0x8(%rdi)
callq 0x34878
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x348e0
movq %rsp, %rdx
movb $0x30, (%rdx)
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
callq 0x39334
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x37652
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x39aa4
movq 0x28(%rsp), %rsi
callq 0x2d2d0
jmp 0x39aa4
leaq 0x10(%rsp), %r14
movw $0x0, 0x8(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x34878
movq %r14, %rdi
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x348e0
movb $0x30, (%r14)
leaq 0x10(%rsp), %rdx
movq %rax, %rdi
movl %ebp, %esi
callq 0x39334
movq %rax, %rbx
movq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x39ab7
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x39ace
movq 0x28(%rsp), %rsi
callq 0x2d2d0
movq %rbx, %rdi
callq 0x2e220
|
_ZN3fmt3v106detail17write_significandIcNS0_8appenderEjNS1_14digit_groupingIcEEEET0_S6_T1_iiRKT2_:
push rbp
push r15
push r14
push rbx
sub rsp, 228h
mov ebp, ecx
mov rbx, rdi
cmp qword ptr [r8+28h], 0
jz loc_39A65
mov r14, r8
xor eax, eax
lea r15, [rsp+248h+var_218]
mov [r15-10h], rax
lea rcx, off_2087A8
mov [r15-20h], rcx
mov [r15-18h], r15
mov qword ptr [r15-8], 1F4h
mov rdi, rsp
mov [rdi], rax
mov word ptr [rdi+8], 0
call _ZN3fmt3v106detail14format_decimalIcjEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,uint>(char *,uint,int)
mov rdi, rsp
lea rax, [rsp+248h+var_238]
mov rsi, rdx
mov rdx, rax
call _ZN3fmt3v106detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(char *,char *,fmt::v10::appender)
mov rdx, rsp
mov byte ptr [rdx], 30h ; '0'
lea rdi, [rsp+248h+var_238]
mov esi, ebp
call _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(fmt::v10::appender,int,char const&)
mov rdx, [rsp+248h+var_230]; int
mov rcx, qword ptr [rsp+248h+var_228]; int
mov rdi, r14; int
mov rsi, rbx; int
call _ZNK3fmt3v106detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE; fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(fmt::v10::appender,fmt::v10::basic_string_view<char>)
mov rbx, rax
mov rdi, [rsp+248h+var_230]; void *
cmp rdi, r15
jz short loc_39AA4
mov rsi, [rsp+248h+var_220]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_39AA4
loc_39A65:
lea r14, [rsp+248h+var_238]
mov word ptr [r14+8], 0
mov qword ptr [r14], 0
mov rdi, r14
call _ZN3fmt3v106detail14format_decimalIcjEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,uint>(char *,uint,int)
mov rdi, r14
mov rsi, rdx
mov rdx, rbx
call _ZN3fmt3v106detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(char *,char *,fmt::v10::appender)
mov byte ptr [r14], 30h ; '0'
lea rdx, [rsp+248h+var_238]
mov rdi, rax
mov esi, ebp
call _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(fmt::v10::appender,int,char const&)
mov rbx, rax
loc_39AA4:
mov rax, rbx
add rsp, 228h
pop rbx
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_39AB7:
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, r15
jz short loc_39ACE
mov rsi, [rsp+arg_20]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_39ACE:
mov rdi, rbx
call __Unwind_Resume
|
long long fmt::v10::detail::write_significand<char,fmt::v10::appender,unsigned int,fmt::v10::detail::digit_grouping<char>>(
long long a1,
unsigned int a2,
int a3,
int a4,
long long a5)
{
long long v7; // rdx
long long v8; // rbx
long long v9; // rdx
long long v10; // rax
long long v12; // [rsp+0h] [rbp-248h] BYREF
__int16 v13; // [rsp+8h] [rbp-240h]
_UNKNOWN **v14; // [rsp+10h] [rbp-238h] BYREF
void *v15; // [rsp+18h] [rbp-230h]
int v16[2]; // [rsp+20h] [rbp-228h]
unsigned long long v17; // [rsp+28h] [rbp-220h]
_BYTE v18[536]; // [rsp+30h] [rbp-218h] BYREF
if ( *(_QWORD *)(a5 + 40) )
{
*(_QWORD *)v16 = 0LL;
v14 = &off_2087A8;
v15 = v18;
v17 = 500LL;
v12 = 0LL;
v13 = 0;
fmt::v10::detail::format_decimal<char,unsigned int>((long long)&v12, a2, a3);
fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>((long long)&v12, v7, (long long)&v14);
LOBYTE(v12) = 48;
fmt::v10::detail::fill_n<fmt::v10::appender,int,char>((long long)&v14, a4, (char *)&v12);
v8 = fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(a5, a1, (long long)v15, v16[0]);
if ( v15 != v18 )
operator delete(v15, v17);
}
else
{
LOWORD(v15) = 0;
v14 = 0LL;
fmt::v10::detail::format_decimal<char,unsigned int>((long long)&v14, a2, a3);
v10 = fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>((long long)&v14, v9, a1);
LOBYTE(v14) = 48;
return fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(v10, a4, (char *)&v14);
}
return v8;
}
|
write_significand<char,fmt::v10::appender,unsigned_int,fmt::v10::detail::digit_grouping<char>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x228
MOV EBP,ECX
MOV RBX,RDI
CMP qword ptr [R8 + 0x28],0x0
JZ 0x00139a65
MOV R14,R8
XOR EAX,EAX
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],RAX
LEA RCX,[0x3087a8]
MOV qword ptr [R15 + -0x20],RCX
MOV qword ptr [R15 + -0x18],R15
MOV qword ptr [R15 + -0x8],0x1f4
MOV RDI,RSP
MOV qword ptr [RDI],RAX
MOV word ptr [RDI + 0x8],0x0
LAB_00139a0d:
CALL 0x00134878
MOV RDI,RSP
LEA RAX,[RSP + 0x10]
MOV RSI,RDX
MOV RDX,RAX
CALL 0x001348e0
MOV RDX,RSP
MOV byte ptr [RDX],0x30
LAB_00139a2b:
LEA RDI,[RSP + 0x10]
MOV ESI,EBP
CALL 0x00139334
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
LAB_00139a41:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00137652
LAB_00139a4c:
MOV RBX,RAX
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,R15
JZ 0x00139aa4
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0012d2d0
JMP 0x00139aa4
LAB_00139a65:
LEA R14,[RSP + 0x10]
MOV word ptr [R14 + 0x8],0x0
MOV qword ptr [R14],0x0
MOV RDI,R14
CALL 0x00134878
MOV RDI,R14
MOV RSI,RDX
MOV RDX,RBX
CALL 0x001348e0
MOV byte ptr [R14],0x30
LEA RDX,[RSP + 0x10]
MOV RDI,RAX
MOV ESI,EBP
CALL 0x00139334
MOV RBX,RAX
LAB_00139aa4:
MOV RAX,RBX
ADD RSP,0x228
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, unsigned int,
fmt::v10::detail::digit_grouping<char> >(fmt::v10::appender, unsigned int, int, int,
fmt::v10::detail::digit_grouping<char> const&) */
int8
fmt::v10::detail::
write_significand<char,fmt::v10::appender,unsigned_int,fmt::v10::detail::digit_grouping<char>>
(int8 param_1,uint param_2,int param_3,int4 param_4,long param_5)
{
int8 uVar1;
int8 extraout_RDX;
int8 extraout_RDX_00;
char local_248 [16];
int **local_238;
int1 *local_230;
int8 local_228;
ulong local_220;
int1 local_218 [504];
if (*(long *)(param_5 + 0x28) == 0) {
local_230 = (int1 *)((ulong)local_230 & 0xffffffffffff0000);
local_238 = (int **)0x0;
format_decimal<char,unsigned_int>((char *)&local_238,param_2,param_3);
uVar1 = copy_str_noinline<char,char*,fmt::v10::appender>(&local_238,extraout_RDX_00,param_1);
local_238 = (int **)CONCAT71(local_238._1_7_,0x30);
uVar1 = fill_n<fmt::v10::appender,int,char>(uVar1,param_4,&local_238);
}
else {
local_228 = 0;
local_238 = &PTR_grow_003087a8;
local_220 = 500;
local_248[0] = '\0';
local_248[1] = '\0';
local_248[2] = '\0';
local_248[3] = '\0';
local_248[4] = '\0';
local_248[5] = '\0';
local_248[6] = '\0';
local_248[7] = '\0';
local_248[8] = '\0';
local_248[9] = '\0';
local_230 = local_218;
/* try { // try from 00139a0d to 00139a24 has its CatchHandler @ 00139ab7 */
format_decimal<char,unsigned_int>(local_248,param_2,param_3);
copy_str_noinline<char,char*,fmt::v10::appender>(local_248,extraout_RDX,&local_238);
local_248[0] = 0x30;
/* try { // try from 00139a2b to 00139a36 has its CatchHandler @ 00139ab5 */
fill_n<fmt::v10::appender,int,char>(&local_238,param_4);
/* try { // try from 00139a41 to 00139a4b has its CatchHandler @ 00139ab7 */
uVar1 = digit_grouping<char>::apply<fmt::v10::appender,char>
(param_5,param_1,local_230,local_228);
if (local_230 != local_218) {
operator_delete(local_230,local_220);
}
}
return uVar1;
}
|
|
18,643
|
put_blob_in_record
|
eloqsql/storage/myisam/mi_test2.c
|
static void put_blob_in_record(uchar *blob_pos, char **blob_buffer)
{
ulong i,length;
if (use_blob)
{
if (rnd(10) == 0)
{
if (! *blob_buffer &&
!(*blob_buffer=my_malloc(PSI_NOT_INSTRUMENTED, use_blob,MYF(MY_WME))))
{
use_blob=0;
return;
}
length=rnd(use_blob);
for (i=0 ; i < length ; i++)
(*blob_buffer)[i]=(char) (length+i);
int4store(blob_pos,length);
memcpy(blob_pos+4, blob_buffer, sizeof(char*));
}
else
{
int4store(blob_pos,0);
}
}
return;
}
|
O3
|
c
|
put_blob_in_record:
cmpb $0x1, 0x37ce04(%rip) # 0x3aa1d4
jne 0x2d492
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x280d0
andl $0x7fff, %eax # imm = 0x7FFF
cvtsi2sd %eax, %xmm0
divsd 0x66c1c(%rip), %xmm0 # 0x94018
mulsd 0x66c3c(%rip), %xmm0 # 0x94040
cvttsd2si %xmm0, %rax
testl %eax, %eax
je 0x2d415
movl $0x0, (%rbx)
jmp 0x2d488
cmpq $0x0, (%r14)
jne 0x2d436
movzbl 0x37cdb2(%rip), %esi # 0x3aa1d4
movl $0x10, %edx
xorl %edi, %edi
callq 0x5d03d
movq %rax, (%r14)
testq %rax, %rax
je 0x2d493
movzbl 0x37cd96(%rip), %r15d # 0x3aa1d4
callq 0x280d0
andl $0x7fff, %eax # imm = 0x7FFF
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x66bc1(%rip), %xmm0 # 0x94018
cvtsi2sd %r15d, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
testl %eax, %eax
je 0x2d47f
movl %eax, %ecx
xorl %edx, %edx
leal (%rcx,%rdx), %esi
movq (%r14), %rdi
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x2d46d
movl %eax, (%rbx)
movq (%r14), %rax
movq %rax, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x0, 0x37cd3a(%rip) # 0x3aa1d4
jmp 0x2d488
|
put_blob_in_record:
cmp cs:use_blob, 1
jnz locret_2D492
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _rand
and eax, 7FFFh
cvtsi2sd xmm0, eax
divsd xmm0, cs:qword_94018
mulsd xmm0, cs:qword_94040
cvttsd2si rax, xmm0
test eax, eax
jz short loc_2D415
mov dword ptr [rbx], 0
jmp short loc_2D488
loc_2D415:
cmp qword ptr [r14], 0
jnz short loc_2D436
movzx esi, cs:use_blob
mov edx, 10h
xor edi, edi
call my_malloc
mov [r14], rax
test rax, rax
jz short loc_2D493
loc_2D436:
movzx r15d, cs:use_blob
call _rand
and eax, 7FFFh
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
divsd xmm0, cs:qword_94018
cvtsi2sd xmm1, r15d
mulsd xmm1, xmm0
cvttsd2si rax, xmm1
test eax, eax
jz short loc_2D47F
mov ecx, eax
xor edx, edx
loc_2D46D:
lea esi, [rcx+rdx]
mov rdi, [r14]
mov [rdi+rdx], sil
inc rdx
cmp rcx, rdx
jnz short loc_2D46D
loc_2D47F:
mov [rbx], eax
mov rax, [r14]
mov [rbx+4], rax
loc_2D488:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_2D492:
retn
loc_2D493:
mov cs:use_blob, 0
jmp short loc_2D488
|
long long put_blob_in_record(int *a1, unsigned long long a2, long long a3)
{
long long result; // rax
long long *v4; // r14
int *v5; // rbx
long long v6; // rdx
int v7; // r15d
int v8; // eax
long long i; // rdx
if ( use_blob == 1 )
{
v4 = (long long *)a2;
v5 = a1;
result = (unsigned int)(int)((double)(rand(a1, a2, a3) & 0x7FFF) / 32767.0 * 10.0);
if ( (_DWORD)result )
{
*a1 = 0;
}
else if ( *(_QWORD *)a2
|| (a2 = (unsigned __int8)use_blob,
a1 = 0LL,
result = my_malloc(0LL, (unsigned __int8)use_blob, 16LL),
(*v4 = result) != 0) )
{
v7 = (unsigned __int8)use_blob;
v8 = (int)((double)v7 * ((double)(rand(a1, a2, v6) & 0x7FFF) / 32767.0));
if ( v8 )
{
for ( i = 0LL; i != v8; ++i )
*(_BYTE *)(*v4 + i) = v8 + i;
}
*v5 = v8;
result = *v4;
*(_QWORD *)(v5 + 1) = *v4;
}
else
{
use_blob = 0;
}
}
return result;
}
|
put_blob_in_record:
CMP byte ptr [0x004aa1d4],0x1
JNZ 0x0012d492
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x001280d0
AND EAX,0x7fff
CVTSI2SD XMM0,EAX
DIVSD XMM0,qword ptr [0x00194018]
MULSD XMM0,qword ptr [0x00194040]
CVTTSD2SI RAX,XMM0
TEST EAX,EAX
JZ 0x0012d415
MOV dword ptr [RBX],0x0
JMP 0x0012d488
LAB_0012d415:
CMP qword ptr [R14],0x0
JNZ 0x0012d436
MOVZX ESI,byte ptr [0x004aa1d4]
MOV EDX,0x10
XOR EDI,EDI
CALL 0x0015d03d
MOV qword ptr [R14],RAX
TEST RAX,RAX
JZ 0x0012d493
LAB_0012d436:
MOVZX R15D,byte ptr [0x004aa1d4]
CALL 0x001280d0
AND EAX,0x7fff
XORPS XMM0,XMM0
CVTSI2SD XMM0,EAX
DIVSD XMM0,qword ptr [0x00194018]
CVTSI2SD XMM1,R15D
MULSD XMM1,XMM0
CVTTSD2SI RAX,XMM1
TEST EAX,EAX
JZ 0x0012d47f
MOV ECX,EAX
XOR EDX,EDX
LAB_0012d46d:
LEA ESI,[RCX + RDX*0x1]
MOV RDI,qword ptr [R14]
MOV byte ptr [RDI + RDX*0x1],SIL
INC RDX
CMP RCX,RDX
JNZ 0x0012d46d
LAB_0012d47f:
MOV dword ptr [RBX],EAX
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x4],RAX
LAB_0012d488:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_0012d492:
RET
LAB_0012d493:
MOV byte ptr [0x004aa1d4],0x0
JMP 0x0012d488
|
void put_blob_in_record(int *param_1,long *param_2)
{
uint uVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
uint uVar5;
if (use_blob == 1) {
uVar1 = rand();
if ((int)(long)(((double)(uVar1 & 0x7fff) / DAT_00194018) * DAT_00194040) == 0) {
if (*param_2 == 0) {
lVar2 = my_malloc(0,use_blob,0x10);
*param_2 = lVar2;
if (lVar2 == 0) {
use_blob = 0;
return;
}
}
uVar5 = (uint)use_blob;
uVar1 = rand();
uVar3 = (ulong)((double)uVar5 * ((double)(uVar1 & 0x7fff) / DAT_00194018));
if ((int)uVar3 != 0) {
uVar4 = 0;
do {
*(char *)(*param_2 + uVar4) = (char)uVar3 + (char)uVar4;
uVar4 = uVar4 + 1;
} while ((uVar3 & 0xffffffff) != uVar4);
}
*param_1 = (int)uVar3;
*(long *)(param_1 + 1) = *param_2;
}
else {
*param_1 = 0;
}
}
return;
}
|
|
18,644
|
psi_rwlock_wrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_wrlock(mysql_rwlock_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_wrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_rwlock_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1ac54e(%rip), %rax # 0x1db8a8
movq (%rax), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%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 0x31fc0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x2f3b3
leaq 0x1ac508(%rip), %rax # 0x1db8a8
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_rwlock_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+90h]
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 my_rw_wrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_2F3B3
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_2F3B3:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_rwlock_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[0] + 54))(
v6,
*(_QWORD *)(a1 + 144),
1LL,
a2,
a3);
v4 = my_rw_wrlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4);
return v4;
}
|
psi_rwlock_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,[0x2db8a8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00131fc0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0012f3b3
LEA RAX,[0x2db8a8]
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_0012f3b3:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_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 + 0x90),1,param_2,param_3);
uVar1 = my_rw_wrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
18,645
|
LefDefParser::defiNet::setSpacing(char const*, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
|
void defiNet::setSpacing(const char* layer, double d) {
int len = strlen(layer) + 1;
char* l = (char*)malloc(len);
strcpy(l, defData->DEFCASE(layer));
if (numSpacing_ >= spacingAllocated_) {
int i;
char** nl;
double* nd;
double* n1;
double* n2;
spacingAllocated_ = spacingAllocated_ ?
spacingAllocated_ * 2 : 4 ;
nl = (char**)malloc(sizeof(char*) * spacingAllocated_);
nd = (double*)malloc(sizeof(double) * spacingAllocated_);
n1 = (double*)malloc(sizeof(double) * spacingAllocated_);
n2 = (double*)malloc(sizeof(double) * spacingAllocated_);
for (i = 0; i < numSpacing_; i++) {
nl[i] = slayers_[i];
nd[i] = sdist_[i];
n1[i] = sleft_[i];
n2[i] = sright_[i];
}
free((char*)(slayers_));
free((char*)(sdist_));
free((char*)(sleft_));
free((char*)(sright_));
slayers_ = nl;
sdist_ = nd;
sleft_ = n1;
sright_ = n2;
}
slayers_[numSpacing_] = l;
sdist_[numSpacing_] = d;
sleft_[numSpacing_] = d;
sright_[numSpacing_] = d;
(numSpacing_)++;
}
|
O3
|
cpp
|
LefDefParser::defiNet::setSpacing(char const*, double):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x70d0
incl %eax
movslq %eax, %rdi
callq 0x7270
movq %rax, %r12
movq 0x240(%rbx), %rdi
movq %r15, %rsi
callq 0x1b638
movq %r12, %rdi
movq %rax, %rsi
callq 0x7190
movl 0x108(%rbx), %eax
movl 0x10c(%rbx), %r14d
cmpl %eax, %r14d
jge 0x2621b
movq 0x110(%rbx), %r15
jmp 0x2630c
movq %r12, 0x8(%rsp)
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x4, %eax
cmovnel %ecx, %eax
movl %eax, 0x108(%rbx)
movslq %eax, %rbp
shlq $0x3, %rbp
movq %rbp, %rdi
callq 0x7270
movq %rax, %r15
movq %rbp, %rdi
callq 0x7270
movq %rax, %r12
movq %rbp, %rdi
callq 0x7270
movq %rax, %r13
movq %rbp, %rdi
callq 0x7270
movq %rax, %rbp
movq 0x110(%rbx), %rdi
testl %r14d, %r14d
jle 0x262bb
movq 0x118(%rbx), %rax
movq 0x120(%rbx), %rcx
movq 0x128(%rbx), %rdx
xorl %esi, %esi
movq (%rdi,%rsi,8), %r8
movq %r8, (%r15,%rsi,8)
movsd (%rax,%rsi,8), %xmm0
movsd %xmm0, (%r12,%rsi,8)
movsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%r13,%rsi,8)
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rbp,%rsi,8)
incq %rsi
cmpq %rsi, %r14
jne 0x26289
callq 0x7220
movq 0x118(%rbx), %rdi
callq 0x7220
movq 0x120(%rbx), %rdi
callq 0x7220
movq 0x128(%rbx), %rdi
callq 0x7220
movq %r15, 0x110(%rbx)
movq %r12, 0x118(%rbx)
movq %r13, 0x120(%rbx)
movq %rbp, 0x128(%rbx)
movl 0x10c(%rbx), %r14d
movq 0x8(%rsp), %r12
movslq %r14d, %rax
movq %r12, (%r15,%rax,8)
movq 0x118(%rbx), %rcx
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rcx,%rax,8)
movq 0x120(%rbx), %rcx
movsd %xmm0, (%rcx,%rax,8)
movq 0x128(%rbx), %rcx
movsd %xmm0, (%rcx,%rax,8)
incl %eax
movl %eax, 0x10c(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN12LefDefParser7defiNet10setSpacingEPKcd:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
movsd [rsp+48h+var_38], xmm0
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
call _strlen
inc eax
movsxd rdi, eax
call _malloc
mov r12, rax
mov rdi, [rbx+240h]; this
mov rsi, r15; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r12
mov rsi, rax
call _strcpy
mov eax, [rbx+108h]
mov r14d, [rbx+10Ch]
cmp r14d, eax
jge short loc_2621B
mov r15, [rbx+110h]
jmp loc_2630C
loc_2621B:
mov [rsp+48h+var_40], r12
lea ecx, [rax+rax]
test eax, eax
mov eax, 4
cmovnz eax, ecx
mov [rbx+108h], eax
movsxd rbp, eax
shl rbp, 3
mov rdi, rbp
call _malloc
mov r15, rax
mov rdi, rbp
call _malloc
mov r12, rax
mov rdi, rbp
call _malloc
mov r13, rax
mov rdi, rbp
call _malloc
mov rbp, rax
mov rdi, [rbx+110h]
test r14d, r14d
jle short loc_262BB
mov rax, [rbx+118h]
mov rcx, [rbx+120h]
mov rdx, [rbx+128h]
xor esi, esi
loc_26289:
mov r8, [rdi+rsi*8]
mov [r15+rsi*8], r8
movsd xmm0, qword ptr [rax+rsi*8]
movsd qword ptr [r12+rsi*8], xmm0
movsd xmm0, qword ptr [rcx+rsi*8]
movsd qword ptr [r13+rsi*8+0], xmm0
movsd xmm0, qword ptr [rdx+rsi*8]
movsd qword ptr [rbp+rsi*8+0], xmm0
inc rsi
cmp r14, rsi
jnz short loc_26289
loc_262BB:
call _free
mov rdi, [rbx+118h]
call _free
mov rdi, [rbx+120h]
call _free
mov rdi, [rbx+128h]
call _free
mov [rbx+110h], r15
mov [rbx+118h], r12
mov [rbx+120h], r13
mov [rbx+128h], rbp
mov r14d, [rbx+10Ch]
mov r12, [rsp+48h+var_40]
loc_2630C:
movsxd rax, r14d
mov [r15+rax*8], r12
mov rcx, [rbx+118h]
movsd xmm0, [rsp+48h+var_38]
movsd qword ptr [rcx+rax*8], xmm0
mov rcx, [rbx+120h]
movsd qword ptr [rcx+rax*8], xmm0
mov rcx, [rbx+128h]
movsd qword ptr [rcx+rax*8], xmm0
inc eax
mov [rbx+10Ch], eax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::defiNet::setSpacing(LefDefParser::defiNet *this, const char *a2, double a3)
{
int v4; // eax
long long v5; // r12
const char *v6; // rax
int v7; // eax
long long v8; // r14
long long v9; // r15
int v10; // ecx
bool v11; // zf
int v12; // eax
unsigned long long v13; // rbp
long long v14; // r12
long long v15; // r13
long long v16; // rbp
_QWORD *v17; // rdi
long long v18; // rax
long long v19; // rcx
long long v20; // rdx
long long i; // rsi
long long result; // rax
long long v23; // [rsp+8h] [rbp-40h]
v4 = strlen(a2);
v5 = malloc(v4 + 1);
v6 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 72), a2);
strcpy(v5, v6);
v7 = *((_DWORD *)this + 66);
v8 = *((unsigned int *)this + 67);
if ( (int)v8 >= v7 )
{
v23 = v5;
v10 = 2 * v7;
v11 = v7 == 0;
v12 = 4;
if ( !v11 )
v12 = v10;
*((_DWORD *)this + 66) = v12;
v13 = 8LL * v12;
v9 = malloc(v13);
v14 = malloc(v13);
v15 = malloc(v13);
v16 = malloc(v13);
v17 = (_QWORD *)*((_QWORD *)this + 34);
if ( (int)v8 > 0 )
{
v18 = *((_QWORD *)this + 35);
v19 = *((_QWORD *)this + 36);
v20 = *((_QWORD *)this + 37);
for ( i = 0LL; i != v8; ++i )
{
*(_QWORD *)(v9 + 8 * i) = v17[i];
*(_QWORD *)(v14 + 8 * i) = *(_QWORD *)(v18 + 8 * i);
*(_QWORD *)(v15 + 8 * i) = *(_QWORD *)(v19 + 8 * i);
*(_QWORD *)(v16 + 8 * i) = *(_QWORD *)(v20 + 8 * i);
}
}
free(v17);
free(*((void **)this + 35));
free(*((void **)this + 36));
free(*((void **)this + 37));
*((_QWORD *)this + 34) = v9;
*((_QWORD *)this + 35) = v14;
*((_QWORD *)this + 36) = v15;
*((_QWORD *)this + 37) = v16;
LODWORD(v8) = *((_DWORD *)this + 67);
v5 = v23;
}
else
{
v9 = *((_QWORD *)this + 34);
}
*(_QWORD *)(v9 + 8LL * (int)v8) = v5;
*(double *)(*((_QWORD *)this + 35) + 8LL * (int)v8) = a3;
*(double *)(*((_QWORD *)this + 36) + 8LL * (int)v8) = a3;
*(double *)(*((_QWORD *)this + 37) + 8LL * (int)v8) = a3;
result = (unsigned int)(v8 + 1);
*((_DWORD *)this + 67) = result;
return result;
}
|
setSpacing:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOVSD qword ptr [RSP + 0x10],XMM0
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001070d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOV R12,RAX
MOV RDI,qword ptr [RBX + 0x240]
MOV RSI,R15
CALL 0x0011b638
MOV RDI,R12
MOV RSI,RAX
CALL 0x00107190
MOV EAX,dword ptr [RBX + 0x108]
MOV R14D,dword ptr [RBX + 0x10c]
CMP R14D,EAX
JGE 0x0012621b
MOV R15,qword ptr [RBX + 0x110]
JMP 0x0012630c
LAB_0012621b:
MOV qword ptr [RSP + 0x8],R12
LEA ECX,[RAX + RAX*0x1]
TEST EAX,EAX
MOV EAX,0x4
CMOVNZ EAX,ECX
MOV dword ptr [RBX + 0x108],EAX
MOVSXD RBP,EAX
SHL RBP,0x3
MOV RDI,RBP
CALL 0x00107270
MOV R15,RAX
MOV RDI,RBP
CALL 0x00107270
MOV R12,RAX
MOV RDI,RBP
CALL 0x00107270
MOV R13,RAX
MOV RDI,RBP
CALL 0x00107270
MOV RBP,RAX
MOV RDI,qword ptr [RBX + 0x110]
TEST R14D,R14D
JLE 0x001262bb
MOV RAX,qword ptr [RBX + 0x118]
MOV RCX,qword ptr [RBX + 0x120]
MOV RDX,qword ptr [RBX + 0x128]
XOR ESI,ESI
LAB_00126289:
MOV R8,qword ptr [RDI + RSI*0x8]
MOV qword ptr [R15 + RSI*0x8],R8
MOVSD XMM0,qword ptr [RAX + RSI*0x8]
MOVSD qword ptr [R12 + RSI*0x8],XMM0
MOVSD XMM0,qword ptr [RCX + RSI*0x8]
MOVSD qword ptr [R13 + RSI*0x8],XMM0
MOVSD XMM0,qword ptr [RDX + RSI*0x8]
MOVSD qword ptr [RBP + RSI*0x8],XMM0
INC RSI
CMP R14,RSI
JNZ 0x00126289
LAB_001262bb:
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x118]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x120]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x128]
CALL 0x00107220
MOV qword ptr [RBX + 0x110],R15
MOV qword ptr [RBX + 0x118],R12
MOV qword ptr [RBX + 0x120],R13
MOV qword ptr [RBX + 0x128],RBP
MOV R14D,dword ptr [RBX + 0x10c]
MOV R12,qword ptr [RSP + 0x8]
LAB_0012630c:
MOVSXD RAX,R14D
MOV qword ptr [R15 + RAX*0x8],R12
MOV RCX,qword ptr [RBX + 0x118]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD qword ptr [RCX + RAX*0x8],XMM0
MOV RCX,qword ptr [RBX + 0x120]
MOVSD qword ptr [RCX + RAX*0x8],XMM0
MOV RCX,qword ptr [RBX + 0x128]
MOVSD qword ptr [RCX + RAX*0x8],XMM0
INC EAX
MOV dword ptr [RBX + 0x10c],EAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiNet::setSpacing(char const*, double) */
void __thiscall LefDefParser::defiNet::setSpacing(defiNet *this,char *param_1,double param_2)
{
int iVar1;
void *__ptr;
long lVar2;
long lVar3;
int iVar4;
size_t sVar5;
char *__dest;
char *__src;
void *pvVar6;
void *pvVar7;
void *pvVar8;
void *pvVar9;
long lVar10;
ulong uVar11;
uint uVar12;
sVar5 = strlen(param_1);
__dest = (char *)malloc((long)((int)sVar5 + 1));
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x240),param_1);
strcpy(__dest,__src);
iVar1 = *(int *)(this + 0x108);
uVar12 = *(uint *)(this + 0x10c);
if ((int)uVar12 < iVar1) {
pvVar6 = *(void **)(this + 0x110);
}
else {
iVar4 = 4;
if (iVar1 != 0) {
iVar4 = iVar1 * 2;
}
*(int *)(this + 0x108) = iVar4;
sVar5 = (long)iVar4 << 3;
pvVar6 = malloc(sVar5);
pvVar7 = malloc(sVar5);
pvVar8 = malloc(sVar5);
pvVar9 = malloc(sVar5);
__ptr = *(void **)(this + 0x110);
if (0 < (int)uVar12) {
lVar10 = *(long *)(this + 0x118);
lVar2 = *(long *)(this + 0x120);
lVar3 = *(long *)(this + 0x128);
uVar11 = 0;
do {
*(int8 *)((long)pvVar6 + uVar11 * 8) = *(int8 *)((long)__ptr + uVar11 * 8);
*(int8 *)((long)pvVar7 + uVar11 * 8) = *(int8 *)(lVar10 + uVar11 * 8);
*(int8 *)((long)pvVar8 + uVar11 * 8) = *(int8 *)(lVar2 + uVar11 * 8);
*(int8 *)((long)pvVar9 + uVar11 * 8) = *(int8 *)(lVar3 + uVar11 * 8);
uVar11 = uVar11 + 1;
} while (uVar12 != uVar11);
}
free(__ptr);
free(*(void **)(this + 0x118));
free(*(void **)(this + 0x120));
free(*(void **)(this + 0x128));
*(void **)(this + 0x110) = pvVar6;
*(void **)(this + 0x118) = pvVar7;
*(void **)(this + 0x120) = pvVar8;
*(void **)(this + 0x128) = pvVar9;
uVar12 = *(uint *)(this + 0x10c);
}
lVar10 = (long)(int)uVar12;
*(char **)((long)pvVar6 + lVar10 * 8) = __dest;
*(double *)(*(long *)(this + 0x118) + lVar10 * 8) = param_2;
*(double *)(*(long *)(this + 0x120) + lVar10 * 8) = param_2;
*(double *)(*(long *)(this + 0x128) + lVar10 * 8) = param_2;
*(uint *)(this + 0x10c) = uVar12 + 1;
return;
}
|
|
18,646
|
ma_tls_set_error
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
static void ma_tls_set_error(MYSQL *mysql)
{
ulong ssl_errno= ERR_get_error();
char ssl_error[MAX_SSL_ERR_LEN];
const char *ssl_error_reason;
MARIADB_PVIO *pvio= mysql->net.pvio;
int save_errno= errno;
if (ssl_errno && (ssl_error_reason= ERR_reason_error_string(ssl_errno)))
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
0, ssl_error_reason);
return;
}
strerror_r(save_errno, ssl_error, MAX_SSL_ERR_LEN);
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "TLS/SSL error: %s (%d)",
ssl_error, save_errno);
return;
}
|
O0
|
c
|
ma_tls_set_error:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x78(%rbp)
callq 0x135a0
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
callq 0x13050
movl (%rax), %eax
movl %eax, -0x94(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0x373ad
movq -0x80(%rbp), %rdi
callq 0x137e0
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0x373ad
movq -0x90(%rbp), %rax
movq 0x50(%rax), %r9
movq -0x78(%rbp), %rdi
leaq 0x28b4d(%rip), %rax # 0x5fee0
movq (%rax), %rdx
movq -0x88(%rbp), %r8
movl $0x7ea, %esi # imm = 0x7EA
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq *%r9
jmp 0x373f6
movl -0x94(%rbp), %edi
leaq -0x70(%rbp), %rsi
movl $0x64, %edx
callq 0x131d0
movq -0x90(%rbp), %rax
movq 0x50(%rax), %r10
movq -0x78(%rbp), %rdi
leaq 0x28b09(%rip), %rax # 0x5fee0
movq (%rax), %rdx
leaq -0x70(%rbp), %r8
movl -0x94(%rbp), %r9d
movl $0x7ea, %esi # imm = 0x7EA
leaq 0x14cee(%rip), %rcx # 0x4c0df
movb $0x0, %al
callq *%r10
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x37411
addq $0xa0, %rsp
popq %rbp
retq
callq 0x134b0
nopw %cs:(%rax,%rax)
|
ma_tls_set_error:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_78], rdi
call _ERR_get_error
mov [rbp+var_80], rax
mov rax, [rbp+var_78]
mov rax, [rax]
mov [rbp+var_90], rax
call ___errno_location
mov eax, [rax]
mov [rbp+var_94], eax
cmp [rbp+var_80], 0
jz short loc_373AD
mov rdi, [rbp+var_80]
call _ERR_reason_error_string
mov [rbp+var_88], rax
cmp rax, 0
jz short loc_373AD
mov rax, [rbp+var_90]
mov r9, [rax+50h]
mov rdi, [rbp+var_78]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov r8, [rbp+var_88]
mov esi, 7EAh
xor eax, eax
mov ecx, eax
mov al, 0
call r9
jmp short loc_373F6
loc_373AD:
mov edi, [rbp+var_94]
lea rsi, [rbp+var_70]
mov edx, 64h ; 'd'
call ___xpg_strerror_r
mov rax, [rbp+var_90]
mov r10, [rax+50h]
mov rdi, [rbp+var_78]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea r8, [rbp+var_70]
mov r9d, [rbp+var_94]
mov esi, 7EAh
lea rcx, aTlsSslErrorSD; "TLS/SSL error: %s (%d)"
mov al, 0
call r10
loc_373F6:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_37411
add rsp, 0A0h
pop rbp
retn
loc_37411:
call ___stack_chk_fail
|
unsigned long long ma_tls_set_error(long long *a1)
{
unsigned int v2; // [rsp+Ch] [rbp-94h]
long long v3; // [rsp+10h] [rbp-90h]
long long v4; // [rsp+18h] [rbp-88h]
long long error; // [rsp+20h] [rbp-80h]
char v6[104]; // [rsp+30h] [rbp-70h] BYREF
unsigned long long v7; // [rsp+98h] [rbp-8h]
v7 = __readfsqword(0x28u);
error = ERR_get_error();
v3 = *a1;
v2 = *(_DWORD *)__errno_location();
if ( error && (v4 = ERR_reason_error_string(error)) != 0 )
{
(*(void ( **)(long long *, long long, char *, _QWORD, long long))(v3 + 80))(
a1,
2026LL,
SQLSTATE_UNKNOWN,
0LL,
v4);
}
else
{
__xpg_strerror_r(v2, v6, 100LL);
(*(void (**)(long long *, long long, char *, const char *, ...))(v3 + 80))(
a1,
2026LL,
SQLSTATE_UNKNOWN,
"TLS/SSL error: %s (%d)",
v6,
v2);
}
return __readfsqword(0x28u);
}
|
ma_tls_set_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x78],RDI
CALL 0x001135a0
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
CALL 0x00113050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x94],EAX
CMP qword ptr [RBP + -0x80],0x0
JZ 0x001373ad
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x001137e0
MOV qword ptr [RBP + -0x88],RAX
CMP RAX,0x0
JZ 0x001373ad
MOV RAX,qword ptr [RBP + -0x90]
MOV R9,qword ptr [RAX + 0x50]
MOV RDI,qword ptr [RBP + -0x78]
LEA RAX,[0x15fee0]
MOV RDX,qword ptr [RAX]
MOV R8,qword ptr [RBP + -0x88]
MOV ESI,0x7ea
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL R9
JMP 0x001373f6
LAB_001373ad:
MOV EDI,dword ptr [RBP + -0x94]
LEA RSI,[RBP + -0x70]
MOV EDX,0x64
CALL 0x001131d0
MOV RAX,qword ptr [RBP + -0x90]
MOV R10,qword ptr [RAX + 0x50]
MOV RDI,qword ptr [RBP + -0x78]
LEA RAX,[0x15fee0]
MOV RDX,qword ptr [RAX]
LEA R8,[RBP + -0x70]
MOV R9D,dword ptr [RBP + -0x94]
MOV ESI,0x7ea
LEA RCX,[0x14c0df]
MOV AL,0x0
CALL R10
LAB_001373f6:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00137411
ADD RSP,0xa0
POP RBP
RET
LAB_00137411:
CALL 0x001134b0
|
void ma_tls_set_error(long *param_1)
{
int iVar1;
long lVar2;
ulong e;
int *piVar3;
char *pcVar4;
long in_FS_OFFSET;
int1 local_78 [104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
e = ERR_get_error();
lVar2 = *param_1;
piVar3 = __errno_location();
iVar1 = *piVar3;
if (e != 0) {
pcVar4 = ERR_reason_error_string(e);
if (pcVar4 != (char *)0x0) {
(**(code **)(lVar2 + 0x50))(param_1,0x7ea,SQLSTATE_UNKNOWN,0,pcVar4);
goto LAB_001373f6;
}
}
__xpg_strerror_r(iVar1,local_78,100);
(**(code **)(lVar2 + 0x50))
(param_1,0x7ea,SQLSTATE_UNKNOWN,"TLS/SSL error: %s (%d)",local_78,iVar1);
LAB_001373f6:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,647
|
add_pfs_instr_to_array(char const*, char const*)
|
eloqsql/storage/perfschema/pfs_server.cc
|
int add_pfs_instr_to_array(const char* name, const char* value)
{
size_t name_length= strlen(name);
size_t value_length= strlen(value);
/* Allocate structure plus string buffers plus null terminators */
PFS_instr_config* e = (PFS_instr_config*)my_malloc(PSI_NOT_INSTRUMENTED,
sizeof(PFS_instr_config)
+ name_length + 1 + value_length + 1, MYF(MY_WME));
if (!e) return 1;
/* Copy the instrument name */
e->m_name= (char*)e + sizeof(PFS_instr_config);
memcpy(e->m_name, name, name_length);
e->m_name_length= (uint)name_length;
e->m_name[name_length]= '\0';
/* Set flags accordingly */
if (!my_strcasecmp(&my_charset_latin1, value, "counted"))
{
e->m_enabled= true;
e->m_timed= false;
}
else
if (!my_strcasecmp(&my_charset_latin1, value, "true") ||
!my_strcasecmp(&my_charset_latin1, value, "on") ||
!my_strcasecmp(&my_charset_latin1, value, "1") ||
!my_strcasecmp(&my_charset_latin1, value, "yes"))
{
e->m_enabled= true;
e->m_timed= true;
}
else
if (!my_strcasecmp(&my_charset_latin1, value, "false") ||
!my_strcasecmp(&my_charset_latin1, value, "off") ||
!my_strcasecmp(&my_charset_latin1, value, "0") ||
!my_strcasecmp(&my_charset_latin1, value, "no"))
{
e->m_enabled= false;
e->m_timed= false;
}
else
{
my_free(e);
return 1;
}
/* Add to the array of default startup options */
if (pfs_instr_config_array->push(e))
{
my_free(e);
return 1;
}
return 0;
}
|
O3
|
cpp
|
add_pfs_instr_to_array(char const*, char const*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r13
callq 0x26150
movq %rax, %r12
movq %r15, %rdi
callq 0x26150
leaq (%r12,%rax), %rsi
addq $0x12, %rsi
movl $0x10, %edx
xorl %edi, %edi
callq 0x452cd
movq %rax, -0x30(%rbp)
movl $0x1, %r14d
testq %rax, %rax
je 0x38fc8
movq %rax, %rbx
movq %rax, %rdi
addq $0x10, %rdi
movq %rdi, (%rax)
movq %r13, %rsi
movq %r12, %rdx
callq 0x26290
movl %r12d, 0x8(%rbx)
movb $0x0, 0x10(%rbx,%r12)
leaq 0x304fd3(%rip), %r12 # 0x33de40
movq 0xc0(%r12), %rax
leaq 0x432b3(%rip), %rdx # 0x7c12f
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
xorl %r14d, %r14d
testl %eax, %eax
je 0x38f96
movq 0xc0(%r12), %rax
leaq 0x43298(%rip), %rdx # 0x7c137
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
movb $0x1, %r13b
testl %eax, %eax
je 0x38f92
movq 0xc0(%r12), %rax
leaq 0x45c52(%rip), %rdx # 0x7eb14
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
testl %eax, %eax
je 0x38f92
movq 0xc0(%r12), %rax
leaq 0x43a50(%rip), %rdx # 0x7c932
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
testl %eax, %eax
je 0x38f92
movq 0xc0(%r12), %rax
leaq 0x4323a(%rip), %rdx # 0x7c13c
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
movb $0x1, %cl
testl %eax, %eax
je 0x38f9b
movq 0xc0(%r12), %rax
leaq 0x4321c(%rip), %rdx # 0x7c140
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
testl %eax, %eax
je 0x38fda
movq 0xc0(%r12), %rax
leaq 0x43202(%rip), %rdx # 0x7c146
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
testl %eax, %eax
je 0x38fda
movq 0xc0(%r12), %rax
leaq 0x44459(%rip), %rdx # 0x7d3bd
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
testl %eax, %eax
je 0x38fda
movq 0xc0(%r12), %rax
leaq 0x431ca(%rip), %rdx # 0x7c14a
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
testl %eax, %eax
je 0x38fda
movq %rbx, %rdi
jmp 0x38fbd
movb $0x1, %cl
jmp 0x38f9b
movb $0x1, %r13b
xorl %ecx, %ecx
movb %r13b, 0xc(%rbx)
movb %cl, 0xd(%rbx)
leaq 0x3940cf(%rip), %rax # 0x3cd078
movq (%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4496e
testb %al, %al
je 0x38fc8
movq -0x30(%rbp), %rdi
callq 0x454fa
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
jmp 0x38f99
|
_Z22add_pfs_instr_to_arrayPKcS0_:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rsi
mov r13, rdi
call _strlen
mov r12, rax
mov rdi, r15
call _strlen
lea rsi, [r12+rax]
add rsi, 12h
mov edx, 10h
xor edi, edi
call my_malloc
mov [rbp+var_30], rax
mov r14d, 1
test rax, rax
jz loc_38FC8
mov rbx, rax
mov rdi, rax
add rdi, 10h
mov [rax], rdi
mov rsi, r13
mov rdx, r12
call _memcpy
mov [rbx+8], r12d
mov byte ptr [rbx+r12+10h], 0
lea r12, my_charset_latin1
mov rax, [r12+0C0h]
lea rdx, aCounted; "counted"
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
xor r14d, r14d
test eax, eax
jz loc_38F96
mov rax, [r12+0C0h]
lea rdx, aTrue; "true"
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
mov r13b, 1
test eax, eax
jz loc_38F92
mov rax, [r12+0C0h]
lea rdx, aExpansion+7; "on"
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
test eax, eax
jz loc_38F92
mov rax, [r12+0C0h]
lea rdx, aIso88591_2+9; "1"
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
test eax, eax
jz loc_38F92
mov rax, [r12+0C0h]
lea rdx, aYes; "yes"
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
mov cl, 1
test eax, eax
jz loc_38F9B
mov rax, [r12+0C0h]
lea rdx, aFalse; "false"
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
test eax, eax
jz loc_38FDA
mov rax, [r12+0C0h]
lea rdx, aOff; "off"
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
test eax, eax
jz loc_38FDA
mov rax, [r12+0C0h]
lea rdx, unk_7D3BD
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
test eax, eax
jz short loc_38FDA
mov rax, [r12+0C0h]
lea rdx, aNo; "no"
mov rdi, r12
mov rsi, r15
call qword ptr [rax+40h]
test eax, eax
jz short loc_38FDA
mov rdi, rbx
jmp short loc_38FBD
loc_38F92:
mov cl, 1
jmp short loc_38F9B
loc_38F96:
mov r13b, 1
loc_38F99:
xor ecx, ecx
loc_38F9B:
mov [rbx+0Ch], r13b
mov [rbx+0Dh], cl
lea rax, pfs_instr_config_array
mov rdi, [rax]
lea rsi, [rbp+var_30]
call insert_dynamic
test al, al
jz short loc_38FC8
mov rdi, [rbp+var_30]
loc_38FBD:
call my_free
mov r14d, 1
loc_38FC8:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_38FDA:
xor r13d, r13d
jmp short loc_38F99
|
long long add_pfs_instr_to_array(const char *a1, const char *a2)
{
long long v2; // r12
long long v3; // rax
_QWORD *v4; // rax
unsigned int v5; // r14d
_QWORD *v6; // rbx
char v7; // r13
int v8; // eax
long long v9; // rcx
_QWORD *v10; // rdi
_QWORD *v12; // [rsp+0h] [rbp-30h] BYREF
v2 = strlen(a1);
v3 = strlen(a2);
v4 = (_QWORD *)my_malloc(0LL, v2 + v3 + 18, 16LL);
v12 = v4;
v5 = 1;
if ( !v4 )
return v5;
v6 = v4;
*v4 = v4 + 2;
memcpy(v4 + 2, a1, v2);
*((_DWORD *)v6 + 2) = v2;
*((_BYTE *)v6 + v2 + 16) = 0;
v5 = 0;
if ( (*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"counted") )
{
v7 = 1;
if ( !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24)
+ 64LL))(
&my_charset_latin1,
a2,
"true")
|| !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"on")
|| !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"1") )
{
LOBYTE(v9) = 1;
goto LABEL_15;
}
v8 = (*(long long ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"yes");
LOBYTE(v9) = 1;
if ( !v8 )
goto LABEL_15;
if ( (*(unsigned int ( **)(void *, const char *, const char *, long long))(*((_QWORD *)&my_charset_latin1
+ 24)
+ 64LL))(
&my_charset_latin1,
a2,
"false",
v9)
&& (*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"off")
&& (*(unsigned int ( **)(void *, const char *, void *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
&unk_7D3BD)
&& (*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"no") )
{
v10 = v6;
LABEL_17:
my_free(v10);
return 1;
}
v7 = 0;
}
else
{
v7 = 1;
}
LOBYTE(v9) = 0;
LABEL_15:
*((_BYTE *)v6 + 12) = v7;
*((_BYTE *)v6 + 13) = v9;
if ( (unsigned __int8)insert_dynamic(pfs_instr_config_array, &v12) )
{
v10 = v12;
goto LABEL_17;
}
return v5;
}
|
add_pfs_instr_to_array:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV R13,RDI
CALL 0x00126150
MOV R12,RAX
MOV RDI,R15
CALL 0x00126150
LEA RSI,[R12 + RAX*0x1]
ADD RSI,0x12
MOV EDX,0x10
XOR EDI,EDI
CALL 0x001452cd
MOV qword ptr [RBP + -0x30],RAX
MOV R14D,0x1
TEST RAX,RAX
JZ 0x00138fc8
MOV RBX,RAX
MOV RDI,RAX
ADD RDI,0x10
MOV qword ptr [RAX],RDI
MOV RSI,R13
MOV RDX,R12
CALL 0x00126290
MOV dword ptr [RBX + 0x8],R12D
MOV byte ptr [RBX + R12*0x1 + 0x10],0x0
LEA R12,[0x43de40]
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17c12f]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
XOR R14D,R14D
TEST EAX,EAX
JZ 0x00138f96
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17c137]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
MOV R13B,0x1
TEST EAX,EAX
JZ 0x00138f92
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17eb14]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
TEST EAX,EAX
JZ 0x00138f92
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17c932]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
TEST EAX,EAX
JZ 0x00138f92
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17c13c]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
MOV CL,0x1
TEST EAX,EAX
JZ 0x00138f9b
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17c140]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
TEST EAX,EAX
JZ 0x00138fda
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17c146]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
TEST EAX,EAX
JZ 0x00138fda
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17d3bd]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
TEST EAX,EAX
JZ 0x00138fda
MOV RAX,qword ptr [R12 + 0xc0]
LEA RDX,[0x17c14a]
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
TEST EAX,EAX
JZ 0x00138fda
MOV RDI,RBX
JMP 0x00138fbd
LAB_00138f92:
MOV CL,0x1
JMP 0x00138f9b
LAB_00138f96:
MOV R13B,0x1
LAB_00138f99:
XOR ECX,ECX
LAB_00138f9b:
MOV byte ptr [RBX + 0xc],R13B
MOV byte ptr [RBX + 0xd],CL
LEA RAX,[0x4cd078]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0x30]
CALL 0x0014496e
TEST AL,AL
JZ 0x00138fc8
MOV RDI,qword ptr [RBP + -0x30]
LAB_00138fbd:
CALL 0x001454fa
MOV R14D,0x1
LAB_00138fc8:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00138fda:
XOR R13D,R13D
JMP 0x00138f99
|
/* add_pfs_instr_to_array(char const*, char const*) */
int8 add_pfs_instr_to_array(char *param_1,char *param_2)
{
char cVar1;
int iVar2;
size_t __n;
size_t sVar3;
int8 *puVar4;
int1 uVar5;
int1 uVar6;
int8 *local_38;
__n = strlen(param_1);
sVar3 = strlen(param_2);
puVar4 = (int8 *)my_malloc(0,__n + sVar3 + 0x12,0x10);
if (puVar4 == (int8 *)0x0) {
return 1;
}
*puVar4 = puVar4 + 2;
local_38 = puVar4;
memcpy(puVar4 + 2,param_1,__n);
*(int *)(puVar4 + 1) = (int)__n;
*(int1 *)((long)puVar4 + __n + 0x10) = 0;
iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,"counted");
if (iVar2 == 0) {
uVar6 = 1;
LAB_00138f99:
uVar5 = 0;
}
else {
iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,&DAT_0017c137);
uVar6 = 1;
if (((iVar2 == 0) ||
(iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,"on"), iVar2 == 0)) ||
(iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,&DAT_0017c932), iVar2 == 0)) {
uVar5 = 1;
}
else {
iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,&DAT_0017c13c);
uVar5 = 1;
if (iVar2 != 0) {
iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,"false");
if (((iVar2 != 0) &&
(iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,&DAT_0017c146), iVar2 != 0)) &&
((iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,&DAT_0017d3bd), iVar2 != 0 &&
(iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0043df00 + 0x40))
(&my_charset_latin1,param_2,&DAT_0017c14a), iVar2 != 0))))
goto LAB_00138fbd;
uVar6 = 0;
goto LAB_00138f99;
}
}
}
*(int1 *)((long)puVar4 + 0xc) = uVar6;
*(int1 *)((long)puVar4 + 0xd) = uVar5;
cVar1 = insert_dynamic(pfs_instr_config_array,&local_38);
puVar4 = local_38;
if (cVar1 == '\0') {
return 0;
}
LAB_00138fbd:
my_free(puVar4);
return 1;
}
|
|
18,648
|
bitmap_bits_set
|
eloqsql/mysys/my_bitmap.c
|
uint bitmap_bits_set(const MY_BITMAP *map)
{
my_bitmap_map *data_ptr= map->bitmap;
my_bitmap_map *end= map->last_word_ptr;
uint res= 0;
DBUG_ASSERT(map->bitmap);
for (; data_ptr < end; data_ptr++)
res+= my_count_bits_uint32(*data_ptr);
/*Reset last bits to zero*/
res+= my_count_bits_uint32(*map->last_word_ptr & ~map->last_word_mask);
return res;
}
|
O3
|
c
|
bitmap_bits_set:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movq 0x8(%rdi), %rax
xorl %ecx, %ecx
cmpq %rax, %rdx
jae 0x9d7f4
xorl %ecx, %ecx
movl $0x33333333, %esi # imm = 0x33333333
movl (%rdx), %r8d
movl %r8d, %r9d
shrl %r9d
andl $0x55555555, %r9d # imm = 0x55555555
subl %r9d, %r8d
movl %r8d, %r9d
andl %esi, %r9d
shrl $0x2, %r8d
andl %esi, %r8d
addl %r9d, %r8d
movl %r8d, %r9d
shrl $0x4, %r9d
addl %r8d, %r9d
andl $0xf0f0f0f, %r9d # imm = 0xF0F0F0F
imull $0x1010101, %r9d, %r8d # imm = 0x1010101
shrl $0x18, %r8d
addl %r8d, %ecx
addq $0x4, %rdx
cmpq %rax, %rdx
jb 0x9d7a9
movl 0x18(%rdi), %edx
notl %edx
andl (%rax), %edx
movl %edx, %eax
shrl %eax
andl $0x55555555, %eax # imm = 0x55555555
subl %eax, %edx
movl $0x33333333, %eax # imm = 0x33333333
movl %edx, %esi
andl %eax, %esi
shrl $0x2, %edx
andl %eax, %edx
addl %esi, %edx
movl %edx, %eax
shrl $0x4, %eax
addl %edx, %eax
andl $0xf0f0f0f, %eax # imm = 0xF0F0F0F
imull $0x1010101, %eax, %eax # imm = 0x1010101
shrl $0x18, %eax
addl %ecx, %eax
popq %rbp
retq
|
bitmap_bits_set:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov rax, [rdi+8]
xor ecx, ecx
cmp rdx, rax
jnb short loc_9D7F4
xor ecx, ecx
mov esi, 33333333h
loc_9D7A9:
mov r8d, [rdx]
mov r9d, r8d
shr r9d, 1
and r9d, 55555555h
sub r8d, r9d
mov r9d, r8d
and r9d, esi
shr r8d, 2
and r8d, esi
add r8d, r9d
mov r9d, r8d
shr r9d, 4
add r9d, r8d
and r9d, 0F0F0F0Fh
imul r8d, r9d, 1010101h
shr r8d, 18h
add ecx, r8d
add rdx, 4
cmp rdx, rax
jb short loc_9D7A9
loc_9D7F4:
mov edx, [rdi+18h]
not edx
and edx, [rax]
mov eax, edx
shr eax, 1
and eax, 55555555h
sub edx, eax
mov eax, 33333333h
mov esi, edx
and esi, eax
shr edx, 2
and edx, eax
add edx, esi
mov eax, edx
shr eax, 4
add eax, edx
and eax, 0F0F0F0Fh
imul eax, 1010101h
shr eax, 18h
add eax, ecx
pop rbp
retn
|
long long bitmap_bits_set(long long a1)
{
_DWORD *v1; // rdx
_DWORD *v2; // rax
int v3; // ecx
unsigned int v4; // edx
v1 = *(_DWORD **)a1;
v2 = *(_DWORD **)(a1 + 8);
v3 = 0;
if ( *(_QWORD *)a1 < (unsigned long long)v2 )
{
v3 = 0;
do
{
v3 += (16843009
* ((((*v1 - ((*v1 >> 1) & 0x55555555)) & 0x33333333)
+ (((*v1 - ((*v1 >> 1) & 0x55555555u)) >> 2) & 0x33333333)
+ ((((*v1 - ((*v1 >> 1) & 0x55555555)) & 0x33333333)
+ (((*v1 - ((*v1 >> 1) & 0x55555555u)) >> 2) & 0x33333333)) >> 4)) & 0xF0F0F0F)) >> 24;
++v1;
}
while ( v1 < v2 );
}
v4 = (*v2 & ~*(_DWORD *)(a1 + 24)) - (((*v2 & (unsigned int)~*(_DWORD *)(a1 + 24)) >> 1) & 0x55555555);
return v3
+ ((16843009
* (((v4 & 0x33333333) + ((v4 >> 2) & 0x33333333) + (((v4 & 0x33333333) + ((v4 >> 2) & 0x33333333)) >> 4)) & 0xF0F0F0F)) >> 24);
}
|
bitmap_bits_set:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
XOR ECX,ECX
CMP RDX,RAX
JNC 0x0019d7f4
XOR ECX,ECX
MOV ESI,0x33333333
LAB_0019d7a9:
MOV R8D,dword ptr [RDX]
MOV R9D,R8D
SHR R9D,0x1
AND R9D,0x55555555
SUB R8D,R9D
MOV R9D,R8D
AND R9D,ESI
SHR R8D,0x2
AND R8D,ESI
ADD R8D,R9D
MOV R9D,R8D
SHR R9D,0x4
ADD R9D,R8D
AND R9D,0xf0f0f0f
IMUL R8D,R9D,0x1010101
SHR R8D,0x18
ADD ECX,R8D
ADD RDX,0x4
CMP RDX,RAX
JC 0x0019d7a9
LAB_0019d7f4:
MOV EDX,dword ptr [RDI + 0x18]
NOT EDX
AND EDX,dword ptr [RAX]
MOV EAX,EDX
SHR EAX,0x1
AND EAX,0x55555555
SUB EDX,EAX
MOV EAX,0x33333333
MOV ESI,EDX
AND ESI,EAX
SHR EDX,0x2
AND EDX,EAX
ADD EDX,ESI
MOV EAX,EDX
SHR EAX,0x4
ADD EAX,EDX
AND EAX,0xf0f0f0f
IMUL EAX,EAX,0x1010101
SHR EAX,0x18
ADD EAX,ECX
POP RBP
RET
|
int bitmap_bits_set(int8 *param_1)
{
uint *puVar1;
int iVar2;
uint *puVar3;
uint uVar4;
puVar3 = (uint *)*param_1;
puVar1 = (uint *)param_1[1];
iVar2 = 0;
if (puVar3 < puVar1) {
iVar2 = 0;
do {
uVar4 = *puVar3 - (*puVar3 >> 1 & 0x55555555);
uVar4 = (uVar4 >> 2 & 0x33333333) + (uVar4 & 0x33333333);
iVar2 = iVar2 + (((uVar4 >> 4) + uVar4 & 0xf0f0f0f) * 0x1010101 >> 0x18);
puVar3 = puVar3 + 1;
} while (puVar3 < puVar1);
}
uVar4 = (~*(uint *)(param_1 + 3) & *puVar1) -
((~*(uint *)(param_1 + 3) & *puVar1) >> 1 & 0x55555555);
uVar4 = (uVar4 >> 2 & 0x33333333) + (uVar4 & 0x33333333);
return (((uVar4 >> 4) + uVar4 & 0xf0f0f0f) * 0x1010101 >> 0x18) + iVar2;
}
|
|
18,649
|
my_strnxfrm_unicode_full_bin_internal
|
eloqsql/strings/ctype-utf8.c
|
size_t
my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs,
uchar *dst, uchar *de, uint *nweights,
const uchar *src, const uchar *se)
{
my_wc_t UNINIT_VAR(wc);
uchar *dst0= dst;
DBUG_ASSERT(src || !se);
DBUG_ASSERT(cs->state & MY_CS_BINSORT);
for (; dst < de && *nweights; (*nweights)--)
{
int res;
if ((res= my_ci_mb_wc(cs, &wc, src, se)) <= 0)
break;
src+= res;
*dst++= (uchar) (wc >> 16);
if (dst < de)
{
*dst++= (uchar) ((wc >> 8) & 0xFF);
if (dst < de)
*dst++= (uchar) (wc & 0xFF);
}
}
return dst - dst0;
}
|
O0
|
c
|
my_strnxfrm_unicode_full_bin_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x6dd72
jmp 0x6dd74
jmp 0x6dd76
jmp 0x6dd78
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x45(%rbp)
jae 0x6dd94
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x6dda0
jmp 0x6de60
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jg 0x6ddce
jmp 0x6de60
movl -0x44(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x6de4e
movq -0x38(%rbp), %rax
shrq $0x8, %rax
andq $0xff, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x6de4c
movq -0x38(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x6de4e
jmp 0x6de50
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0x6dd78
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strnxfrm_unicode_full_bin_internal:
push rbp
mov rbp, rsp
sub rsp, 50h
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_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
jmp short $+2
loc_6DD72:
jmp short $+2
loc_6DD74:
jmp short $+2
loc_6DD76:
jmp short $+2
loc_6DD78:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_45], al
jnb short loc_6DD94
mov rax, [rbp+var_20]
cmp dword ptr [rax], 0
setnz al
mov [rbp+var_45], al
loc_6DD94:
mov al, [rbp+var_45]
test al, 1
jnz short loc_6DDA0
jmp loc_6DE60
loc_6DDA0:
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_38]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jg short loc_6DDCE
jmp loc_6DE60
loc_6DDCE:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_38]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnb short loc_6DE4E
mov rax, [rbp+var_38]
shr rax, 8
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnb short loc_6DE4C
mov rax, [rbp+var_38]
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_6DE4C:
jmp short $+2
loc_6DE4E:
jmp short $+2
loc_6DE50:
mov rax, [rbp+var_20]
mov ecx, [rax]
add ecx, 0FFFFFFFFh
mov [rax], ecx
jmp loc_6DD78
loc_6DE60:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_40]
sub rax, rcx
add rsp, 50h
pop rbp
retn
|
_BYTE * my_strnxfrm_unicode_full_bin_internal(
long long a1,
_BYTE *a2,
unsigned long long a3,
_DWORD *a4,
long long a5,
long long a6)
{
_BYTE *v6; // rax
_BYTE *v7; // rax
_BYTE *v8; // rax
bool v10; // [rsp+Bh] [rbp-45h]
int v11; // [rsp+Ch] [rbp-44h]
_BYTE v12[8]; // [rsp+18h] [rbp-38h] BYREF
long long v13; // [rsp+20h] [rbp-30h]
long long v14; // [rsp+28h] [rbp-28h]
_DWORD *v15; // [rsp+30h] [rbp-20h]
unsigned long long v16; // [rsp+38h] [rbp-18h]
_BYTE *v17; // [rsp+40h] [rbp-10h]
long long v18; // [rsp+48h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
while ( 1 )
{
v10 = 0;
if ( (unsigned long long)v17 < v16 )
v10 = *v15 != 0;
if ( !v10 )
break;
v11 = (*(long long ( **)(long long, _BYTE *, long long, long long))(*(_QWORD *)(v18 + 184) + 40LL))(
v18,
v12,
v14,
v13);
if ( v11 <= 0 )
break;
v14 += v11;
v6 = v17++;
*v6 = v12[2];
if ( (unsigned long long)v17 < v16 )
{
v7 = v17++;
*v7 = v12[1];
if ( (unsigned long long)v17 < v16 )
{
v8 = v17++;
*v8 = v12[0];
}
}
--*v15;
}
return (_BYTE *)(v17 - a2);
}
|
my_strnxfrm_unicode_full_bin_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0016dd72
LAB_0016dd72:
JMP 0x0016dd74
LAB_0016dd74:
JMP 0x0016dd76
LAB_0016dd76:
JMP 0x0016dd78
LAB_0016dd78:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x45],AL
JNC 0x0016dd94
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x0
SETNZ AL
MOV byte ptr [RBP + -0x45],AL
LAB_0016dd94:
MOV AL,byte ptr [RBP + -0x45]
TEST AL,0x1
JNZ 0x0016dda0
JMP 0x0016de60
LAB_0016dda0:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x38]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JG 0x0016ddce
JMP 0x0016de60
LAB_0016ddce:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0016de4e
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x8
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0016de4c
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_0016de4c:
JMP 0x0016de4e
LAB_0016de4e:
JMP 0x0016de50
LAB_0016de50:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
ADD ECX,-0x1
MOV dword ptr [RAX],ECX
JMP 0x0016dd78
LAB_0016de60:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
ADD RSP,0x50
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin_internal
(long param_1,int1 *param_2,int1 *param_3,int *param_4,long param_5,
int8 param_6)
{
int iVar1;
int1 *puVar2;
int1 *puVar3;
bool bVar4;
int1 local_40 [8];
int8 local_38;
long local_30;
int *local_28;
int1 *local_20;
int1 *local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar4 = false;
if (local_18 < local_20) {
bVar4 = *local_28 != 0;
}
if ((!bVar4) ||
(iVar1 = (**(code **)(*(long *)(local_10 + 0xb8) + 0x28))
(local_10,local_40,local_30,local_38), iVar1 < 1)) break;
local_30 = local_30 + iVar1;
puVar2 = local_18 + 1;
*local_18 = local_40[2];
if (puVar2 < local_20) {
puVar3 = local_18 + 2;
*puVar2 = local_40[1];
puVar2 = puVar3;
if (puVar3 < local_20) {
*puVar3 = local_40[0];
puVar2 = local_18 + 3;
}
}
local_18 = puVar2;
*local_28 = *local_28 + -1;
}
return (long)local_18 - (long)param_2;
}
|
|
18,650
|
mi_dpos
|
eloqsql/storage/myisam/mi_search.c
|
my_off_t _mi_dpos(MI_INFO *info, uint nod_flag, uchar *after_key)
{
my_off_t pos;
after_key-=(nod_flag + info->s->rec_reflength);
switch (info->s->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8: pos= (my_off_t) mi_uint8korr(after_key); break;
case 7: pos= (my_off_t) mi_uint7korr(after_key); break;
case 6: pos= (my_off_t) mi_uint6korr(after_key); break;
case 5: pos= (my_off_t) mi_uint5korr(after_key); break;
#else
case 8: pos= (my_off_t) mi_uint4korr(after_key+4); break;
case 7: pos= (my_off_t) mi_uint4korr(after_key+3); break;
case 6: pos= (my_off_t) mi_uint4korr(after_key+2); break;
case 5: pos= (my_off_t) mi_uint4korr(after_key+1); break;
#endif
case 4: pos= (my_off_t) mi_uint4korr(after_key); break;
case 3: pos= (my_off_t) mi_uint3korr(after_key); break;
case 2: pos= (my_off_t) mi_uint2korr(after_key); break;
default:
pos=0L; /* Shut compiler up */
}
return (info->s->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos :
pos*info->s->base.pack_reclength;
}
|
O0
|
c
|
mi_dpos:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x338(%rax), %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x338(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x6, %eax
ja 0xbf39c
movq -0x28(%rbp), %rax
leaq 0x9a2b2(%rip), %rcx # 0x15951c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
movq -0x18(%rbp), %rdx
movzbl 0x2(%rdx), %edx
shll $0x8, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x1(%rdx), %edx
shll $0x10, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl (%rdx), %edx
shll $0x18, %edx
orl %edx, %ecx
movl %ecx, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xbf3a4
movq -0x18(%rbp), %rdi
callq 0xc0500
movq %rax, -0x20(%rbp)
jmp 0xbf3a4
movq -0x18(%rbp), %rdi
callq 0xc0560
movq %rax, -0x20(%rbp)
jmp 0xbf3a4
movq -0x18(%rbp), %rdi
callq 0xc05b0
movq %rax, -0x20(%rbp)
jmp 0xbf3a4
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0xbf3a4
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0xbf3a4
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movq %rax, -0x20(%rbp)
jmp 0xbf3a4
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x318(%rax), %rax
andq $0x5, %rax
cmpq $0x0, %rax
je 0xbf3c6
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xbf3dd
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
imulq 0x148(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_mi_dpos:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+338h]
add ecx, eax
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+338h]
add eax, 0FFFFFFFEh; switch 7 cases
mov ecx, eax
mov [rbp+var_28], rcx
sub eax, 6
ja def_BF271; jumptable 00000000000BF271 default case
mov rax, [rbp+var_28]
lea rcx, jpt_BF271
movsxd rax, ds:(jpt_BF271 - 15951Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_BF273:
mov rax, [rbp+var_18]; jumptable 00000000000BF271 case 8
movzx eax, byte ptr [rax+7]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+6]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+5]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+4]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+2]
shl edx, 8
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+1]
shl edx, 10h
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx]
shl edx, 18h
or ecx, edx
mov ecx, ecx
shl rcx, 20h
or rax, rcx
mov [rbp+var_20], rax
jmp loc_BF3A4
loc_BF2E4:
mov rdi, [rbp+var_18]; jumptable 00000000000BF271 case 7
call mi_uint7korr_0
mov [rbp+var_20], rax
jmp loc_BF3A4
loc_BF2F6:
mov rdi, [rbp+var_18]; jumptable 00000000000BF271 case 6
call mi_uint6korr_0
mov [rbp+var_20], rax
jmp loc_BF3A4
loc_BF308:
mov rdi, [rbp+var_18]; jumptable 00000000000BF271 case 5
call mi_uint5korr_0
mov [rbp+var_20], rax
jmp loc_BF3A4
loc_BF31A:
mov rax, [rbp+var_18]; jumptable 00000000000BF271 case 4
movzx eax, byte ptr [rax+3]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov [rbp+var_20], rax
jmp short loc_BF3A4
loc_BF350:
mov rax, [rbp+var_18]; jumptable 00000000000BF271 case 3
movzx eax, byte ptr [rax+2]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_20], rax
jmp short loc_BF3A4
loc_BF379:
mov rax, [rbp+var_18]; jumptable 00000000000BF271 case 2
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_20], rax
jmp short loc_BF3A4
def_BF271:
mov [rbp+var_20], 0; jumptable 00000000000BF271 default case
loc_BF3A4:
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+318h]
and rax, 5
cmp rax, 0
jz short loc_BF3C6
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
jmp short loc_BF3DD
loc_BF3C6:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
imul rax, [rcx+148h]
mov [rbp+var_30], rax
loc_BF3DD:
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
|
long long mi_dpos(long long a1, int a2, long long a3)
{
long long v5; // [rsp+10h] [rbp-20h]
unsigned __int8 *v6; // [rsp+18h] [rbp-18h]
v6 = (unsigned __int8 *)(a3 - (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 824LL) + a2));
switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) )
{
case 2:
v5 = _byteswap_ushort(*(_WORD *)v6);
break;
case 3:
v5 = (*v6 << 16) | (v6[1] << 8) | (unsigned int)v6[2];
break;
case 4:
v5 = _byteswap_ulong(*(_DWORD *)v6);
break;
case 5:
v5 = mi_uint5korr_0(v6);
break;
case 6:
v5 = mi_uint6korr_0(v6);
break;
case 7:
v5 = mi_uint7korr_0(v6);
break;
case 8:
v5 = ((unsigned long long)_byteswap_ulong(*(_DWORD *)v6) << 32) | _byteswap_ulong(*((_DWORD *)v6 + 1));
break;
default:
v5 = 0LL;
break;
}
if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) != 0 )
return v5;
else
return *(_QWORD *)(*(_QWORD *)a1 + 328LL) * v5;
}
|
_mi_dpos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x338]
ADD ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x338]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x28],RCX
SUB EAX,0x6
JA 0x001bf39c
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x25951c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x7]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x6]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x5]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x2]
SHL EDX,0x8
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x1]
SHL EDX,0x10
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX]
SHL EDX,0x18
OR ECX,EDX
MOV ECX,ECX
SHL RCX,0x20
OR RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3a4
caseD_7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c0500
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3a4
caseD_6:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c0560
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3a4
caseD_5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c05b0
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3a4
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3a4
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3a4
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3a4
default:
MOV qword ptr [RBP + -0x20],0x0
LAB_001bf3a4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x5
CMP RAX,0x0
JZ 0x001bf3c6
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001bf3dd
LAB_001bf3c6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
IMUL RAX,qword ptr [RCX + 0x148]
MOV qword ptr [RBP + -0x30],RAX
LAB_001bf3dd:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
ulong _mi_dpos(long *param_1,int param_2,long param_3)
{
int1 *puVar1;
ulong local_38;
ulong local_28;
puVar1 = (int1 *)(param_3 - (ulong)(uint)(param_2 + *(int *)(*param_1 + 0x338)));
switch(*(int4 *)(*param_1 + 0x338)) {
case 2:
local_28 = (ulong)CONCAT11(*puVar1,puVar1[1]);
break;
case 3:
local_28 = (ulong)CONCAT12(*puVar1,CONCAT11(puVar1[1],puVar1[2]));
break;
case 4:
local_28 = (ulong)CONCAT13(*puVar1,CONCAT12(puVar1[1],CONCAT11(puVar1[2],puVar1[3])));
break;
case 5:
local_28 = mi_uint5korr(puVar1);
break;
case 6:
local_28 = mi_uint6korr(puVar1);
break;
case 7:
local_28 = mi_uint7korr(puVar1);
break;
case 8:
local_28 = CONCAT44(CONCAT13(*puVar1,CONCAT12(puVar1[1],CONCAT11(puVar1[2],puVar1[3]))),
CONCAT13(puVar1[4],CONCAT12(puVar1[5],CONCAT11(puVar1[6],puVar1[7]))));
break;
default:
local_28 = 0;
}
if ((*(ulong *)(*param_1 + 0x318) & 5) == 0) {
local_38 = local_28 * *(long *)(*param_1 + 0x148);
}
else {
local_38 = local_28;
}
return local_38;
}
|
|
18,651
|
mariadb_get_socket
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static my_socket mariadb_get_socket(MYSQL *mysql)
{
my_socket sock= INVALID_SOCKET;
if (mysql->net.pvio)
{
ma_pvio_get_handle(mysql->net.pvio, &sock);
}
/* if an asynchronous connect is in progress, we need to obtain
pvio handle from async_context until the connection was
successfully established.
*/
else if (mysql->options.extension && mysql->options.extension->async_context &&
mysql->options.extension->async_context->pvio)
{
ma_pvio_get_handle(mysql->options.extension->async_context->pvio, &sock);
}
return sock;
}
|
O0
|
c
|
mariadb_get_socket:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x22e0f
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x248b0
jmp 0x22e63
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x22e61
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x22e61
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x22e61
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x248b0
jmp 0x22e63
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
mariadb_get_socket:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0FFFFFFFFh
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_22E0F
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, [rbp+var_C]
call ma_pvio_get_handle
jmp short loc_22E63
loc_22E0F:
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz short loc_22E61
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_22E61
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
cmp qword ptr [rax+18h], 0
jz short loc_22E61
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov rdi, [rax+18h]
lea rsi, [rbp+var_C]
call ma_pvio_get_handle
loc_22E61:
jmp short $+2
loc_22E63:
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
|
long long mariadb_get_socket(_QWORD *a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch] BYREF
_QWORD *v3; // [rsp+8h] [rbp-8h]
v3 = a1;
v2 = -1;
if ( *a1 )
{
ma_pvio_get_handle(*v3, &v2);
}
else if ( v3[144] && *(_QWORD *)(v3[144] + 40LL) && *(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL) )
{
ma_pvio_get_handle(*(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL), &v2);
}
return v2;
}
|
mariadb_get_socket:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00122e0f
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0xc]
CALL 0x001248b0
JMP 0x00122e63
LAB_00122e0f:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00122e61
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00122e61
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x00122e61
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
LEA RSI,[RBP + -0xc]
CALL 0x001248b0
LAB_00122e61:
JMP 0x00122e63
LAB_00122e63:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int4 mariadb_get_socket(long *param_1)
{
int4 local_14;
long *local_10;
local_14 = 0xffffffff;
local_10 = param_1;
if (*param_1 == 0) {
if (((param_1[0x90] != 0) && (*(long *)(param_1[0x90] + 0x28) != 0)) &&
(*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x18) != 0)) {
ma_pvio_get_handle(*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18),&local_14);
}
}
else {
ma_pvio_get_handle(*param_1,&local_14);
}
return local_14;
}
|
|
18,652
|
translog_new_page_header
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_new_page_header(TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor)
{
uchar *ptr;
DBUG_ENTER("translog_new_page_header");
DBUG_ASSERT(cursor->ptr);
cursor->protected= 0;
ptr= cursor->ptr;
/* Page number */
int3store(ptr, LSN_OFFSET(*horizon) / TRANSLOG_PAGE_SIZE);
ptr+= 3;
/* File number */
int3store(ptr, LSN_FILE_NO(*horizon));
ptr+= 3;
DBUG_ASSERT(TRANSLOG_PAGE_FLAGS == (ptr - cursor->ptr));
cursor->ptr[TRANSLOG_PAGE_FLAGS]= (uchar) log_descriptor.flags;
ptr++;
if (log_descriptor.flags & TRANSLOG_PAGE_CRC)
{
#ifndef DBUG_OFF
DBUG_PRINT("info", ("write 0x11223344 CRC to " LSN_FMT,
LSN_IN_PARTS(*horizon)));
/* This will be overwritten by real CRC; This is just for debugging */
int4store(ptr, 0x11223344);
#endif
/* CRC will be put when page is finished */
ptr+= CRC_SIZE;
}
if (log_descriptor.flags & TRANSLOG_SECTOR_PROTECTION)
{
/*
translog_sector_randmo works like "random" values producer because
it is enough to have such "random" for this purpose and it will
not interfere with higher level pseudo random value generator
*/
ptr[0]= translog_sector_random++;
ptr+= TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
}
{
size_t len= (ptr - cursor->ptr);
(*horizon)+= len; /* increasing the offset part of the address */
cursor->current_page_fill= (uint16)len;
if (!cursor->chaser)
cursor->buffer->size+= (translog_size_t)len;
}
cursor->ptr= ptr;
DBUG_PRINT("info", ("NewP buffer #%u: %p chaser: %d Size: %lu (%lu) "
"Horizon: " LSN_FMT,
(uint) cursor->buffer->buffer_no, cursor->buffer,
cursor->chaser, (ulong) cursor->buffer->size,
(ulong) (cursor->ptr - cursor->buffer->buffer),
LSN_IN_PARTS(*horizon)));
translog_check_cursor(cursor);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_new_page_header:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x38(%rsi)
movq 0x20(%rsi), %rax
movl (%rdi), %ecx
shrl $0xd, %ecx
movb %cl, (%rax)
movl (%rdi), %ecx
shrl $0x15, %ecx
movb %cl, 0x1(%rax)
movl (%rdi), %ecx
shrl $0x1d, %ecx
movb %cl, 0x2(%rax)
movb 0x4(%rdi), %cl
movb %cl, 0x3(%rax)
movb 0x5(%rdi), %cl
movb %cl, 0x4(%rax)
movb 0x6(%rdi), %cl
movb %cl, 0x5(%rax)
movb 0x39a589(%rip), %cl # 0x4007a8
movq 0x20(%rsi), %rdx
movb %cl, 0x6(%rdx)
movl 0x39a57c(%rip), %ecx # 0x4007a8
movl %ecx, %edx
andl $0x1, %edx
leaq (%rax,%rdx,4), %rax
addq $0x7, %rax
testb $0x2, %cl
je 0x66253
movb 0xb9b491(%rip), %cl # 0xc016d5
leal 0x1(%rcx), %edx
movb %dl, 0xb9b488(%rip) # 0xc016d5
movb %cl, (%rax)
addq $0x10, %rax
movq %rax, %rcx
subq 0x20(%rsi), %rcx
addq %rcx, (%rdi)
movw %cx, 0x30(%rsi)
cmpb $0x0, 0x37(%rsi)
jne 0x66271
movq 0x28(%rsi), %rdx
addl %ecx, 0x100030(%rdx)
movq %rax, 0x20(%rsi)
popq %rbp
retq
|
translog_new_page_header:
push rbp
mov rbp, rsp
mov byte ptr [rsi+38h], 0
mov rax, [rsi+20h]
mov ecx, [rdi]
shr ecx, 0Dh
mov [rax], cl
mov ecx, [rdi]
shr ecx, 15h
mov [rax+1], cl
mov ecx, [rdi]
shr ecx, 1Dh
mov [rax+2], cl
mov cl, [rdi+4]
mov [rax+3], cl
mov cl, [rdi+5]
mov [rax+4], cl
mov cl, [rdi+6]
mov [rax+5], cl
mov cl, byte ptr cs:dword_4007A8
mov rdx, [rsi+20h]
mov [rdx+6], cl
mov ecx, cs:dword_4007A8
mov edx, ecx
and edx, 1
lea rax, [rax+rdx*4]
add rax, 7
test cl, 2
jz short loc_66253
mov cl, cs:translog_sector_random
lea edx, [rcx+1]
mov cs:translog_sector_random, dl
mov [rax], cl
add rax, 10h
loc_66253:
mov rcx, rax
sub rcx, [rsi+20h]
add [rdi], rcx
mov [rsi+30h], cx
cmp byte ptr [rsi+37h], 0
jnz short loc_66271
mov rdx, [rsi+28h]
add dword ptr ds:qword_100030[rdx], ecx
loc_66271:
mov [rsi+20h], rax
pop rbp
retn
|
char * translog_new_page_header(long long a1, long long a2)
{
_BYTE *v2; // rax
char *result; // rax
char v4; // cl
char *v5; // rcx
*(_BYTE *)(a2 + 56) = 0;
v2 = *(_BYTE **)(a2 + 32);
*v2 = *(_DWORD *)a1 >> 13;
v2[1] = *(_DWORD *)a1 >> 21;
v2[2] = *(_DWORD *)a1 >> 29;
v2[3] = *(_BYTE *)(a1 + 4);
v2[4] = *(_BYTE *)(a1 + 5);
v2[5] = *(_BYTE *)(a1 + 6);
*(_BYTE *)(*(_QWORD *)(a2 + 32) + 6LL) = dword_4007A8;
result = &v2[4 * (dword_4007A8 & 1) + 7];
if ( (dword_4007A8 & 2) != 0 )
{
v4 = translog_sector_random++;
*result = v4;
result += 16;
}
v5 = &result[-*(_QWORD *)(a2 + 32)];
*(_QWORD *)a1 += v5;
*(_WORD *)(a2 + 48) = (_WORD)v5;
if ( !*(_BYTE *)(a2 + 55) )
*(_DWORD *)((char *)&qword_100030 + *(_QWORD *)(a2 + 40)) += (_DWORD)v5;
*(_QWORD *)(a2 + 32) = result;
return result;
}
|
translog_new_page_header:
PUSH RBP
MOV RBP,RSP
MOV byte ptr [RSI + 0x38],0x0
MOV RAX,qword ptr [RSI + 0x20]
MOV ECX,dword ptr [RDI]
SHR ECX,0xd
MOV byte ptr [RAX],CL
MOV ECX,dword ptr [RDI]
SHR ECX,0x15
MOV byte ptr [RAX + 0x1],CL
MOV ECX,dword ptr [RDI]
SHR ECX,0x1d
MOV byte ptr [RAX + 0x2],CL
MOV CL,byte ptr [RDI + 0x4]
MOV byte ptr [RAX + 0x3],CL
MOV CL,byte ptr [RDI + 0x5]
MOV byte ptr [RAX + 0x4],CL
MOV CL,byte ptr [RDI + 0x6]
MOV byte ptr [RAX + 0x5],CL
MOV CL,byte ptr [0x005007a8]
MOV RDX,qword ptr [RSI + 0x20]
MOV byte ptr [RDX + 0x6],CL
MOV ECX,dword ptr [0x005007a8]
MOV EDX,ECX
AND EDX,0x1
LEA RAX,[RAX + RDX*0x4]
ADD RAX,0x7
TEST CL,0x2
JZ 0x00166253
MOV CL,byte ptr [0x00d016d5]
LEA EDX,[RCX + 0x1]
MOV byte ptr [0x00d016d5],DL
MOV byte ptr [RAX],CL
ADD RAX,0x10
LAB_00166253:
MOV RCX,RAX
SUB RCX,qword ptr [RSI + 0x20]
ADD qword ptr [RDI],RCX
MOV word ptr [RSI + 0x30],CX
CMP byte ptr [RSI + 0x37],0x0
JNZ 0x00166271
MOV RDX,qword ptr [RSI + 0x28]
ADD dword ptr [RDX + 0x100030],ECX
LAB_00166271:
MOV qword ptr [RSI + 0x20],RAX
POP RBP
RET
|
void translog_new_page_header(uint *param_1,long param_2)
{
int1 *puVar1;
char cVar2;
char *pcVar3;
long lVar4;
uint uVar5;
*(int1 *)(param_2 + 0x38) = 0;
puVar1 = *(int1 **)(param_2 + 0x20);
*puVar1 = (char)(*param_1 >> 0xd);
puVar1[1] = (char)(*param_1 >> 0x15);
puVar1[2] = (byte)(*param_1 >> 0x1d);
puVar1[3] = (char)param_1[1];
puVar1[4] = *(int1 *)((long)param_1 + 5);
puVar1[5] = *(int1 *)((long)param_1 + 6);
*(int1 *)(*(long *)(param_2 + 0x20) + 6) = (int1)DAT_005007a8;
uVar5 = DAT_005007a8 & 1;
pcVar3 = puVar1 + (ulong)uVar5 * 4 + 7;
if ((DAT_005007a8 & 2) != 0) {
cVar2 = translog_sector_random + '\x01';
*pcVar3 = translog_sector_random;
translog_sector_random = cVar2;
pcVar3 = puVar1 + (ulong)uVar5 * 4 + 0x17;
}
lVar4 = (long)pcVar3 - *(long *)(param_2 + 0x20);
*(long *)param_1 = *(long *)param_1 + lVar4;
*(short *)(param_2 + 0x30) = (short)lVar4;
if (*(char *)(param_2 + 0x37) == '\0') {
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) =
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) + (int)lVar4;
}
*(char **)(param_2 + 0x20) = pcVar3;
return;
}
|
|
18,653
|
translog_write_variable_record_chunk3_page
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool
translog_write_variable_record_chunk3_page(struct st_translog_parts *parts,
uint16 length,
TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor)
{
LEX_CUSTRING *part;
uchar chunk3_header[1 + 2];
DBUG_ENTER("translog_write_variable_record_chunk3_page");
if (translog_chaser_page_next(horizon, cursor))
DBUG_RETURN(1);
if (length == 0)
{
/* It was call to write page header only (no data for chunk 3) */
DBUG_PRINT("info", ("It is a call to make page header only"));
DBUG_RETURN(0);
}
DBUG_ASSERT(parts->current != 0); /* first part is left for header */
part= parts->parts + (--parts->current);
parts->total_record_length+= (translog_size_t) (part->length= 1 + 2);
part->str= chunk3_header;
/* Puts chunk type */
*chunk3_header= (uchar) (TRANSLOG_CHUNK_LNGTH);
/* Puts chunk length */
int2store(chunk3_header + 1, length);
translog_write_parts_on_page(horizon, cursor, length + 1 + 2, parts);
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_write_variable_record_chunk3_page:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x61190
cmpb $0x0, %al
je 0x60e57
jmp 0x60e4e
movb $0x1, -0x1(%rbp)
jmp 0x60ef3
movzwl -0x12(%rbp), %eax
cmpl $0x0, %eax
jne 0x60e6f
jmp 0x60e62
jmp 0x60e64
jmp 0x60e66
movb $0x0, -0x1(%rbp)
jmp 0x60ef3
jmp 0x60e71
jmp 0x60e73
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdx
movl 0x8(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rdx)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x3, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x4(%rax)
leaq -0x33(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movb $-0x40, -0x33(%rbp)
leaq -0x33(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movw -0x12(%rbp), %cx
movq -0x40(%rbp), %rax
movw %cx, (%rax)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movzwl -0x12(%rbp), %edx
addl $0x1, %edx
addl $0x2, %edx
movq -0x10(%rbp), %rcx
callq 0x60750
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
translog_write_variable_record_chunk3_page:
push rbp
mov rbp, rsp
sub rsp, 40h
mov ax, si
mov [rbp+var_10], rdi
mov [rbp+var_12], ax
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call translog_chaser_page_next
cmp al, 0
jz short loc_60E57
jmp short $+2
loc_60E4E:
mov [rbp+var_1], 1
jmp loc_60EF3
loc_60E57:
movzx eax, [rbp+var_12]
cmp eax, 0
jnz short loc_60E6F
jmp short $+2
loc_60E62:
jmp short $+2
loc_60E64:
jmp short $+2
loc_60E66:
mov [rbp+var_1], 0
jmp loc_60EF3
loc_60E6F:
jmp short $+2
loc_60E71:
jmp short $+2
loc_60E73:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rdx, [rbp+var_10]
mov ecx, [rdx+8]
add ecx, 0FFFFFFFFh
mov [rdx+8], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 3
mov rax, [rbp+var_10]
mov ecx, [rax+4]
add ecx, 3
mov [rax+4], ecx
lea rcx, [rbp+var_33]
mov rax, [rbp+var_30]
mov [rax], rcx
mov [rbp+var_33], 0C0h
lea rax, [rbp+var_33]
add rax, 1
mov [rbp+var_40], rax
mov cx, [rbp+var_12]
mov rax, [rbp+var_40]
mov [rax], cx
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
movzx edx, [rbp+var_12]
add edx, 1
add edx, 2
mov rcx, [rbp+var_10]
call translog_write_parts_on_page
mov [rbp+var_1], 0
loc_60EF3:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char translog_write_variable_record_chunk3_page(long long a1, unsigned __int16 a2, _QWORD *a3, long long a4)
{
long long v4; // rax
unsigned int v5; // ecx
char v7; // [rsp+Dh] [rbp-33h] BYREF
unsigned __int16 v8; // [rsp+Eh] [rbp-32h]
char **v9; // [rsp+10h] [rbp-30h]
long long v10; // [rsp+18h] [rbp-28h]
_QWORD *v11; // [rsp+20h] [rbp-20h]
unsigned __int16 v12; // [rsp+2Eh] [rbp-12h]
long long v13; // [rsp+30h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
if ( (unsigned __int8)translog_chaser_page_next(a3, a4) )
return 1;
if ( v12 )
{
v4 = *(_QWORD *)(v13 + 16);
v5 = *(_DWORD *)(v13 + 8) - 1;
*(_DWORD *)(v13 + 8) = v5;
v9 = (char **)(16LL * v5 + v4);
v9[1] = (_BYTE *)(&dword_0 + 3);
*(_DWORD *)(v13 + 4) += 3;
*v9 = &v7;
v7 = -64;
v8 = v12;
translog_write_parts_on_page(v11, v10, v12 + 3, v13);
}
return 0;
}
|
translog_write_variable_record_chunk3_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AX,SI
MOV qword ptr [RBP + -0x10],RDI
MOV word ptr [RBP + -0x12],AX
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00161190
CMP AL,0x0
JZ 0x00160e57
JMP 0x00160e4e
LAB_00160e4e:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00160ef3
LAB_00160e57:
MOVZX EAX,word ptr [RBP + -0x12]
CMP EAX,0x0
JNZ 0x00160e6f
JMP 0x00160e62
LAB_00160e62:
JMP 0x00160e64
LAB_00160e64:
JMP 0x00160e66
LAB_00160e66:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00160ef3
LAB_00160e6f:
JMP 0x00160e71
LAB_00160e71:
JMP 0x00160e73
LAB_00160e73:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x8]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x8],ECX
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x3
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x3
MOV dword ptr [RAX + 0x4],ECX
LEA RCX,[RBP + -0x33]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x33],0xc0
LEA RAX,[RBP + -0x33]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
MOV CX,word ptr [RBP + -0x12]
MOV RAX,qword ptr [RBP + -0x40]
MOV word ptr [RAX],CX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOVZX EDX,word ptr [RBP + -0x12]
ADD EDX,0x1
ADD EDX,0x2
MOV RCX,qword ptr [RBP + -0x10]
CALL 0x00160750
MOV byte ptr [RBP + -0x1],0x0
LAB_00160ef3:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
translog_write_variable_record_chunk3_page
(long param_1,ushort param_2,int8 param_3,int8 param_4)
{
char cVar1;
uint uVar2;
int1 local_3b;
ushort local_3a;
long *local_38;
int8 local_30;
int8 local_28;
ushort local_1a;
long local_18;
int1 local_9;
local_30 = param_4;
local_28 = param_3;
local_1a = param_2;
local_18 = param_1;
cVar1 = translog_chaser_page_next(param_3,param_4);
if (cVar1 == '\0') {
if (local_1a == 0) {
local_9 = 0;
}
else {
uVar2 = *(int *)(local_18 + 8) - 1;
*(uint *)(local_18 + 8) = uVar2;
local_38 = (long *)(*(long *)(local_18 + 0x10) + (ulong)uVar2 * 0x10);
local_38[1] = 3;
*(int *)(local_18 + 4) = *(int *)(local_18 + 4) + 3;
*local_38 = (long)&local_3b;
local_3b = 0xc0;
local_3a = local_1a;
translog_write_parts_on_page(local_28,local_30,local_1a + 3,local_18);
local_9 = 0;
}
}
else {
local_9 = 1;
}
return local_9;
}
|
|
18,654
|
my_b_read
|
eloqsql/mysys/mf_iocache.c
|
int _my_b_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t left_length;
int res;
/* If the buffer is not empty yet, copy what is available. */
if ((left_length= (size_t) (info->read_end - info->read_pos)))
{
DBUG_ASSERT(Count > left_length);
memcpy(Buffer, info->read_pos, left_length);
Buffer+=left_length;
Count-=left_length;
}
res= info->read_function(info, Buffer, Count);
if (res && info->error >= 0)
info->error+= (int)left_length; /* update number or read bytes */
return res;
}
|
O0
|
c
|
my_b_read:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x75045
jmp 0x75013
jmp 0x75015
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x292d0
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x7508a
movq -0x8(%rbp), %rax
cmpl $0x0, 0xe4(%rax)
jl 0x7508a
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0xe4(%rax), %ecx
movl %ecx, 0xe4(%rax)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_my_b_read:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+10h]
sub rax, rcx
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_75045
jmp short $+2
loc_75013:
jmp short $+2
loc_75015:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax+10h]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_20]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
loc_75045:
mov rax, [rbp+var_8]
mov rax, [rax+0A0h]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call rax
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jz short loc_7508A
mov rax, [rbp+var_8]
cmp dword ptr [rax+0E4h], 0
jl short loc_7508A
mov rax, [rbp+var_20]
mov ecx, eax
mov rax, [rbp+var_8]
add ecx, [rax+0E4h]
mov [rax+0E4h], ecx
loc_7508A:
mov eax, [rbp+var_24]
add rsp, 30h
pop rbp
retn
|
long long my_b_read(long long a1, long long a2, long long a3)
{
unsigned int v4; // [rsp+Ch] [rbp-24h]
long long v5; // [rsp+10h] [rbp-20h]
long long v7; // [rsp+20h] [rbp-10h]
v7 = a2;
v5 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16);
if ( v5 )
{
memcpy(a2, *(_QWORD *)(a1 + 16), v5);
v7 = a2 + v5;
a3 -= v5;
}
v4 = (*(long long ( **)(long long, long long, long long))(a1 + 160))(a1, v7, a3);
if ( v4 && *(int *)(a1 + 228) >= 0 )
*(_DWORD *)(a1 + 228) += v5;
return v4;
}
|
_my_b_read:
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 RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x10]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x00175045
JMP 0x00175013
LAB_00175013:
JMP 0x00175015
LAB_00175015:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001292d0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_00175045:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xa0]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x0017508a
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0xe4],0x0
JL 0x0017508a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
ADD ECX,dword ptr [RAX + 0xe4]
MOV dword ptr [RAX + 0xe4],ECX
LAB_0017508a:
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x30
POP RBP
RET
|
int _my_b_read(long param_1,void *param_2,long param_3)
{
int iVar1;
size_t __n;
int8 local_20;
int8 local_18;
__n = *(long *)(param_1 + 0x18) - *(long *)(param_1 + 0x10);
local_20 = param_3;
local_18 = param_2;
if (__n != 0) {
memcpy(param_2,*(void **)(param_1 + 0x10),__n);
local_18 = (void *)(__n + (long)param_2);
local_20 = param_3 - __n;
}
iVar1 = (**(code **)(param_1 + 0xa0))(param_1,local_18,local_20);
if ((iVar1 != 0) && (-1 < *(int *)(param_1 + 0xe4))) {
*(int *)(param_1 + 0xe4) = (int)__n + *(int *)(param_1 + 0xe4);
}
return iVar1;
}
|
|
18,655
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
|
monkey531[P]llama/common/minja.hpp
|
T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
}
|
O0
|
cpp
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const:
subq $0xa8, %rsp
movb %dl, %al
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
andb $0x1, %al
movb %al, 0x8f(%rsp)
movq 0x98(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x90(%rsp), %rsi
callq 0xdaf40
testb $0x1, %al
jne 0x134a82
movb 0x8f(%rsp), %al
andb $0x1, %al
movb %al, 0xa7(%rsp)
jmp 0x134af2
movq 0x90(%rsp), %rsi
leaq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xab1b0
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x123f00
movq %rax, 0x18(%rsp)
jmp 0x134aaf
movq 0x18(%rsp), %rdi
callq 0xa5670
movb %al, 0xf(%rsp)
jmp 0x134abf
movb 0xf(%rsp), %al
andb $0x1, %al
movb %al, 0xa7(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xa0a10
jmp 0x134af2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xa0a10
jmp 0x134b03
movb 0xa7(%rsp), %al
andb $0x1, %al
addq $0xa8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x50940
nopl (%rax)
|
_ZNK5minja5Value3getIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
sub rsp, 0A8h
mov al, dl
mov [rsp+0A8h+var_10], rdi
mov [rsp+0A8h+var_18], rsi
and al, 1
mov [rsp+0A8h+var_19], al
mov rdi, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_88], rdi
mov rsi, [rsp+0A8h+var_18]
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, 1
jnz short loc_134A82
mov al, [rsp+0A8h+var_19]
and al, 1
mov [rsp+0A8h+var_1], al
jmp short loc_134AF2
loc_134A82:
mov rsi, [rsp+0A8h+var_18]
lea rdi, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_98], rdi
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rsp+0A8h+var_88]; this
mov rsi, [rsp+0A8h+var_98]; minja::Value *
call _ZNK5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov [rsp+0A8h+var_90], rax
jmp short $+2
loc_134AAF:
mov rdi, [rsp+0A8h+var_90]
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
mov [rsp+0A8h+var_99], al
jmp short $+2
loc_134ABF:
mov al, [rsp+0A8h+var_99]
and al, 1
mov [rsp+0A8h+var_1], al
lea rdi, [rsp+0A8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_134AF2
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_30]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_134B03
loc_134AF2:
mov al, [rsp+0A8h+var_1]
and al, 1
add rsp, 0A8h
retn
loc_134B03:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
|
char minja::Value::get<bool>(minja::Value *a1, long long a2, char a3)
{
minja::Value *v4; // [rsp+18h] [rbp-90h]
_BYTE v5[87]; // [rsp+38h] [rbp-70h] BYREF
char v6; // [rsp+8Fh] [rbp-19h]
long long v7; // [rsp+90h] [rbp-18h]
minja::Value *v8; // [rsp+98h] [rbp-10h]
char v9; // [rsp+A7h] [rbp-1h]
v8 = a1;
v7 = a2;
v6 = a3 & 1;
if ( minja::Value::contains((long long)a1, a2) )
{
minja::Value::Value((long long)v5, v7);
v4 = (minja::Value *)minja::Value::at(a1, (const minja::Value *)v5);
v9 = minja::Value::get<bool>(v4) & 1;
minja::Value::~Value((minja::Value *)v5);
}
else
{
v9 = v6;
}
return v9 & 1;
}
| |||
18,656
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
|
monkey531[P]llama/common/minja.hpp
|
T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
}
|
O1
|
cpp
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x55124
testb %al, %al
je 0x7297a
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x42730
movq %r15, %rdi
movq %r14, %rsi
callq 0x54ce8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3f694
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3da52
movq %r14, %rdi
callq 0x4a9be
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x7293b
callq 0x2fb64
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x7294a
callq 0x2fb64
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x72959
callq 0x2fb64
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x729ce
movq 0x6b62e(%rip), %rax # 0xddf98
cmpb $0x0, (%rax)
je 0x729b9
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x729c3
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x72999
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x7299f
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
jmp 0x729ce
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x729ce
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3d9c6
movq %rbx, %rdi
callq 0x18ba0
|
_ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov r14, rcx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov rsi, rdx
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_7297A
lea r14, [rsp+78h+var_70]
mov rdi, r14
mov rsi, r12
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r15; this
mov rsi, r14; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rbx
mov rsi, rax
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea r14, [rsp+78h+var_30]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_7293B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7293B:
mov rdi, [rsp+78h+var_48]
test rdi, rdi
jz short loc_7294A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7294A:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_72959
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_72959:
mov rdi, [rsp+78h+var_68]
test rdi, rdi
jz short loc_729CE
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_729B9
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_729C3
loc_7297A:
lea rcx, [rbx+10h]
mov [rbx], rcx
mov rdx, [r14]
lea rax, [r14+10h]
cmp rdx, rax
jz short loc_72999
mov [rbx], rdx
mov rcx, [rax]
mov [rbx+10h], rcx
jmp short loc_7299F
loc_72999:
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rcx], xmm0
loc_7299F:
mov rcx, [r14+8]
mov [rbx+8], rcx
mov [r14], rax
mov qword ptr [r14+8], 0
mov byte ptr [r14+10h], 0
jmp short loc_729CE
loc_729B9:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_729C3:
cmp eax, 1
jnz short loc_729CE
mov rax, [rdi]
call qword ptr [rax+18h]
loc_729CE:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::get<std::string>(long long a1, minja::Value *a2, long long a3, long long a4)
{
_QWORD *v6; // rax
long long v7; // rdi
signed __int32 v8; // eax
_OWORD *v9; // rax
__int128 v11; // [rsp+8h] [rbp-70h] BYREF
volatile signed __int32 *v12; // [rsp+20h] [rbp-58h]
volatile signed __int32 *v13; // [rsp+30h] [rbp-48h]
volatile signed __int32 *v14; // [rsp+40h] [rbp-38h]
void *v15[6]; // [rsp+48h] [rbp-30h] BYREF
if ( minja::Value::contains((long long)a2) )
{
minja::Value::Value(&v11);
v6 = (_QWORD *)minja::Value::at(a2, (const minja::Value *)&v11);
minja::Value::get<std::string>(a1, v6);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v15);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v15);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
v7 = *((_QWORD *)&v11 + 1);
if ( *((_QWORD *)&v11 + 1) )
{
if ( _libc_single_threaded )
{
v8 = *(_DWORD *)(*((_QWORD *)&v11 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v11 + 1) + 12LL) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v11 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
}
else
{
*(_QWORD *)a1 = a1 + 16;
v9 = (_OWORD *)(a4 + 16);
if ( *(_QWORD *)a4 == a4 + 16 )
{
*(_OWORD *)(a1 + 16) = *v9;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)a4;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v9;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a4 + 8);
*(_QWORD *)a4 = v9;
*(_QWORD *)(a4 + 8) = 0LL;
*(_BYTE *)(a4 + 16) = 0;
}
return a1;
}
|
get<std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RCX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV RSI,RDX
CALL 0x00155124
TEST AL,AL
JZ 0x0017297a
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV RSI,R12
CALL 0x00142730
LAB_00172900:
MOV RDI,R15
MOV RSI,R14
CALL 0x00154ce8
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0013f694
LAB_00172916:
LEA R14,[RSP + 0x48]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013da52
MOV RDI,R14
CALL 0x0014a9be
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0017293b
CALL 0x0012fb64
LAB_0017293b:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x0017294a
CALL 0x0012fb64
LAB_0017294a:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00172959
CALL 0x0012fb64
LAB_00172959:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001729ce
MOV RAX,qword ptr [0x001ddf98]
CMP byte ptr [RAX],0x0
JZ 0x001729b9
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001729c3
LAB_0017297a:
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
MOV RDX,qword ptr [R14]
LEA RAX,[R14 + 0x10]
CMP RDX,RAX
JZ 0x00172999
MOV qword ptr [RBX],RDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],RCX
JMP 0x0017299f
LAB_00172999:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_0017299f:
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x8],RCX
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x8],0x0
MOV byte ptr [R14 + 0x10],0x0
JMP 0x001729ce
LAB_001729b9:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001729c3:
CMP EAX,0x1
JNZ 0x001729ce
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001729ce:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >(std::__cxx11::string const&,
std::__cxx11::string) const */
long * minja::Value::get<std::__cxx11::string>
(long *param_1,Value *param_2,string *param_3,int8 *param_4)
{
long *plVar1;
int *piVar2;
long lVar3;
char cVar4;
int iVar5;
Value local_70 [8];
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
data local_30 [16];
cVar4 = contains(param_2,param_3);
if (cVar4 == '\0') {
*param_1 = (long)(param_1 + 2);
plVar1 = param_4 + 2;
if ((long *)*param_4 == plVar1) {
lVar3 = param_4[3];
param_1[2] = *plVar1;
param_1[3] = lVar3;
}
else {
*param_1 = (long)*param_4;
param_1[2] = *plVar1;
}
param_1[1] = param_4[1];
*param_4 = plVar1;
param_4[1] = 0;
*(int1 *)(param_4 + 2) = 0;
}
else {
Value(local_70,param_3);
/* try { // try from 00172900 to 00172915 has its CatchHandler @ 001729dd */
at(param_2,local_70);
get<std::__cxx11::string>();
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_30,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_30);
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (long *)0x0) {
if (*PTR___libc_single_threaded_001ddf98 == '\0') {
LOCK();
piVar2 = (int *)((long)local_68 + 0xc);
iVar5 = *piVar2;
*piVar2 = *piVar2 + -1;
UNLOCK();
}
else {
iVar5 = *(int *)((long)local_68 + 0xc);
*(int *)((long)local_68 + 0xc) = iVar5 + -1;
}
if (iVar5 == 1) {
(**(code **)(*local_68 + 0x18))();
}
}
}
return param_1;
}
|
|
18,657
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
|
monkey531[P]llama/common/minja.hpp
|
T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
}
|
O2
|
cpp
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x4f3fa
testb %al, %al
je 0x64eaa
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x40148
movq %r14, %rdi
movq %r12, %rsi
callq 0x4f0ac
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3dd1a
leaq 0x8(%rsp), %rdi
callq 0x3c57c
jmp 0x64eb5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x20880
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3c57c
movq %rbx, %rdi
callq 0x20ba0
|
_ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov r12, rcx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
mov rsi, rdx
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz short loc_64EAA
lea r12, [rsp+78h+var_70]
mov rdi, r12
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, r12; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rbx
mov rsi, rax
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea rdi, [rsp+78h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_64EB5
loc_64EAA:
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_; std::string::basic_string(std::string&&)
loc_64EB5:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::get<std::string>(long long a1, minja::Value *a2, long long a3, long long a4)
{
minja::Value *v5; // rax
_OWORD v7[7]; // [rsp+8h] [rbp-70h] BYREF
if ( minja::Value::contains((long long)a2) )
{
minja::Value::Value(v7);
v5 = (minja::Value *)minja::Value::at(a2, (const minja::Value *)v7);
minja::Value::get<std::string>(a1, v5);
minja::Value::~Value((minja::Value *)v7);
}
else
{
std::string::basic_string(a1, a4);
}
return a1;
}
|
get<std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R12,RCX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV RSI,RDX
CALL 0x0014f3fa
TEST AL,AL
JZ 0x00164eaa
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
CALL 0x00140148
LAB_00164e88:
MOV RDI,R14
MOV RSI,R12
CALL 0x0014f0ac
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0013dd1a
LAB_00164e9e:
LEA RDI,[RSP + 0x8]
CALL 0x0013c57c
JMP 0x00164eb5
LAB_00164eaa:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00120880
LAB_00164eb5:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >(std::__cxx11::string const&,
std::__cxx11::string) const */
string * minja::Value::get<std::__cxx11::string>
(string *param_1,string *param_2,string *param_3,string *param_4)
{
char cVar1;
Value local_70 [80];
cVar1 = contains(param_2);
if (cVar1 == '\0') {
std::__cxx11::string::string(param_1,param_4);
}
else {
Value(local_70,param_3);
/* try { // try from 00164e88 to 00164e9d has its CatchHandler @ 00164ec4 */
at((Value *)param_2,local_70);
get<std::__cxx11::string>();
~Value(local_70);
}
return param_1;
}
|
|
18,658
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
|
monkey531[P]llama/common/minja.hpp
|
T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
}
|
O3
|
cpp
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x54116
testb %al, %al
je 0x6fb8a
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x41a72
movq %r14, %rdi
movq %rbx, %rsi
callq 0x53cb8
movq %rax, %rdi
callq 0x3cedc
movq %rax, %rbx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3ce3c
movq %r14, %rdi
callq 0x49a2a
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x6fb36
callq 0x2ef66
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6fb45
callq 0x2ef66
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6fb54
callq 0x2ef66
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6fb8a
movq 0x6c433(%rip), %rax # 0xdbf98
cmpb $0x0, (%rax)
je 0x6fb75
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x6fb7f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x6fb8a
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3cdb0
movq %rbx, %rdi
callq 0x18ba0
|
_ZNK5minja5Value3getIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_6FB8A
mov rbx, rsp
mov rdi, rbx
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, rbx; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rax
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov rbx, rax
lea r14, [rsp+68h+var_28]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_6FB36
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6FB36:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_6FB45
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6FB45:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_6FB54
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6FB54:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_6FB8A
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_6FB75
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_6FB7F
loc_6FB75:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_6FB7F:
cmp eax, 1
jnz short loc_6FB8A
mov rax, [rdi]
call qword ptr [rax+18h]
loc_6FB8A:
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::get<long>(minja::Value *this, long long a2, long long a3)
{
unsigned long long v4; // rax
long long v5; // rdi
signed __int32 v6; // eax
__int128 v8; // [rsp+0h] [rbp-68h] BYREF
volatile signed __int32 *v9; // [rsp+18h] [rbp-50h]
volatile signed __int32 *v10; // [rsp+28h] [rbp-40h]
volatile signed __int32 *v11; // [rsp+38h] [rbp-30h]
void **v12[5]; // [rsp+40h] [rbp-28h] BYREF
if ( minja::Value::contains((long long)this) )
{
minja::Value::Value(&v8);
v4 = minja::Value::at(this, (const minja::Value *)&v8);
a3 = minja::Value::get<long>(v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v12);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v12);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v10 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v10);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
v5 = *((_QWORD *)&v8 + 1);
if ( *((_QWORD *)&v8 + 1) )
{
if ( _libc_single_threaded )
{
v6 = *(_DWORD *)(*((_QWORD *)&v8 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v8 + 1) + 12LL) = v6 - 1;
}
else
{
v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v8 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v6 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL);
}
}
return a3;
}
|
get<long>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
CALL 0x00154116
TEST AL,AL
JZ 0x0016fb8a
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R15
CALL 0x00141a72
LAB_0016fafb:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00153cb8
MOV RDI,RAX
CALL 0x0013cedc
LAB_0016fb0e:
MOV RBX,RAX
LEA R14,[RSP + 0x40]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013ce3c
MOV RDI,R14
CALL 0x00149a2a
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0016fb36
CALL 0x0012ef66
LAB_0016fb36:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0016fb45
CALL 0x0012ef66
LAB_0016fb45:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0016fb54
CALL 0x0012ef66
LAB_0016fb54:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0016fb8a
MOV RAX,qword ptr [0x001dbf98]
CMP byte ptr [RAX],0x0
JZ 0x0016fb75
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0016fb7f
LAB_0016fb75:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0016fb7f:
CMP EAX,0x1
JNZ 0x0016fb8a
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0016fb8a:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* long minja::Value::get<long>(std::__cxx11::string const&, long) const */
long __thiscall minja::Value::get<long>(Value *this,string *param_1,long param_2)
{
int *piVar1;
char cVar2;
int iVar3;
Value *this_00;
Value aVStack_68 [8];
long *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
data local_28 [16];
cVar2 = contains(this,param_1);
if (cVar2 != '\0') {
Value(aVStack_68,param_1);
/* try { // try from 0016fafb to 0016fb0d has its CatchHandler @ 0016fb97 */
this_00 = (Value *)at(this,aVStack_68);
param_2 = get<long>(this_00);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_001dbf98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_60 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_60 + 0xc);
*(int *)((long)local_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_60 + 0x18))();
}
}
}
return param_2;
}
|
|
18,659
|
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&)
|
monkey531[P]llama/common/chat.cpp
|
static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) {
// https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt
common_chat_params data;
json tools = inputs.tools.is_null() ? inputs.tools : json::array();
std::string python_code_argument_name;
auto has_raw_python = false;
data.grammar_lazy = inputs.tool_choice != "required";
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
std::vector<std::string> tool_rules;
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool["function"];
const auto & parameters = function["parameters"];
std::string name = function["name"];
if (name == "python" || name == "ipython") {
if (!parameters.contains("type")) {
throw std::runtime_error("Missing type in python tool");
}
has_raw_python = true;
auto type = parameters.at("type");
if (type == "object") {
auto properties = parameters.at("properties");
for (auto it = properties.begin(); it != properties.end(); ++it) {
if (it.value().at("type") == "string") {
if (!python_code_argument_name.empty()) {
throw std::runtime_error("Multiple string arguments found in python tool");
}
python_code_argument_name = it.key();
}
}
if (python_code_argument_name.empty()) {
throw std::runtime_error("No string argument found in python tool");
}
} else if (type != "string") {
throw std::runtime_error("Invalid type in python tool: " + type.dump());
}
}
tool_rules.push_back(builder.add_rule(name + "-call", "\"<function=" + name + ">\" " + builder.add_schema(name + "-args", parameters) + " \"</function>\" space"));
});
if (has_raw_python) {
tool_rules.push_back(builder.add_rule("python-call", "\"<|python_tag|>\" .*"));
data.grammar_triggers.push_back({"<|python_tag|>", /* .at_start = */ false});
}
auto tool_call = builder.add_rule("tool_call", string_join(tool_rules, " | ")) + " space";
builder.add_rule("root", inputs.parallel_tool_calls ? "(" + tool_call + ")+" : tool_call);
data.grammar_triggers.push_back({"<function=", /* .at_start = */ false});
}, grammar_options);
data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
// TODO: if (has_raw_python)
data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1;
return data;
}
|
O3
|
cpp
|
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, (%rdi)
xorl %eax, %eax
movb %al, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movb %al, 0x28(%rdi)
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq %rax, 0x80(%rdi)
leaq 0x10(%rdx), %r12
cmpb %al, 0x10(%rdx)
je 0xd35d2
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x81a08
jmp 0xd35df
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x6046c
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
xorl %r13d, %r13d
movq %r13, -0x8(%rbp)
movb %r13b, (%rbp)
movb %r13b, 0x17(%rsp)
leaq 0x20(%r14), %rdi
leaq 0x1e36b(%rip), %rsi # 0xf1971
callq 0xa7d5b
movb %al, 0x38(%rbx)
movq %r13, 0x20(%rsp)
movl $0x20, %edi
callq 0x1b9f0
movq %r14, (%rax)
leaq 0x17(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x78(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x9fa9(%rip), %rax # 0xdd5ee
movq %rax, 0x18(%rsi)
leaq 0xa692(%rip), %rax # 0xddce2
movq %rax, 0x10(%rsi)
leaq 0x2424d(%rip), %rdx # 0xf78a8
leaq 0x38(%rsp), %rdi
callq 0xbdec8
leaq 0x18(%rbx), %rdi
leaq 0x38(%rsp), %r13
movq %r13, %rsi
callq 0x1bc30
movq (%r13), %rdi
leaq 0x48(%rsp), %r13
cmpq %r13, %rdi
je 0xd3691
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0xd36aa
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movzbl (%r12), %eax
testl %eax, %eax
je 0xd36d9
cmpl $0x2, %eax
je 0xd36bd
cmpl $0x1, %eax
jne 0xd36ca
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0xd36d9
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x6046c
jmp 0xd36e7
movb $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movzbl 0x68(%r14), %r8d
leaq 0x68(%rsp), %r9
movb $0x0, (%r9)
movq $0x0, 0x8(%r9)
movl $0x1, (%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0xa447a
leaq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x8275c
movb 0x8(%rbx), %al
leaq 0x98(%rsp), %rdi
movb (%rdi), %cl
movb %cl, 0x8(%rbx)
movb %al, (%rdi)
movq 0x10(%rbx), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rdi)
callq 0x60938
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xd3769
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1ba20
leaq 0x68(%rsp), %rdi
callq 0x60938
leaq 0x18(%rsp), %rdi
callq 0x60938
movl $0x8, (%rbx)
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd379d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x1ba20
leaq 0x58(%rsp), %rdi
callq 0x60938
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd3818
jmp 0xd3810
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xd37dc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1ba20
jmp 0xd37dc
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x60938
leaq 0x18(%rsp), %rdi
callq 0x60938
jmp 0xd381b
movq %rax, %r14
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0xd381b
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xd381b
movq %rax, %rdi
callq 0x2290d
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd3835
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x1ba20
leaq 0x58(%rsp), %rdi
callq 0x60938
movq %rbx, %rdi
callq 0x8128e
movq %r14, %rdi
callq 0x1c1e0
movq %rax, %r14
jmp 0xd383f
|
_ZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputs:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
xor eax, eax
mov [rdi+8], al
mov [rdi+10h], rax
lea rcx, [rdi+28h]
mov [rdi+18h], rcx
mov [rdi+20h], rax
mov [rdi+28h], al
mov [rdi+38h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
mov [rdi+80h], rax
lea r12, [rdx+10h]
cmp [rdx+10h], al
jz short loc_D35D2
lea rdi, [rsp+0D8h+var_80]
xor esi, esi
xor edx, edx
xor ecx, ecx
mov r8d, 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
jmp short loc_D35DF
loc_D35D2:
lea rdi, [rsp+0D8h+var_80]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
loc_D35DF:
lea rbp, [rsp+0D8h+var_50]
mov [rbp-10h], rbp
xor r13d, r13d
mov [rbp-8], r13
mov [rbp+0], r13b
mov [rsp+0D8h+var_C1], r13b
lea rdi, [r14+20h]
lea rsi, aRequired; "required"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
mov [rbx+38h], al
mov [rsp+0D8h+var_B8], r13
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r14
lea rcx, [rsp+0D8h+var_C1]
mov [rax+8], rcx
lea rcx, [rsp+0D8h+var_60]
mov [rax+10h], rcx
mov [rax+18h], rbx
lea rsi, [rsp+0D8h+var_C0]
mov [rsi], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdx, _ZL15grammar_options; grammar_options
lea rdi, [rsp+0D8h+var_A0]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+18h]
lea r13, [rsp+0D8h+var_A0]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r13+0]; void *
lea r13, [rsp+0D8h+var_90]
cmp rdi, r13
jz short loc_D3691
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D3691:
mov rax, [rsp+0D8h+var_B0]
test rax, rax
jz short loc_D36AA
lea rdi, [rsp+0D8h+var_C0]
mov rsi, rdi
mov edx, 3
call rax
loc_D36AA:
movzx eax, byte ptr [r12]
test eax, eax
jz short loc_D36D9
cmp eax, 2
jz short loc_D36BD
cmp eax, 1
jnz short loc_D36CA
loc_D36BD:
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_D36D9
loc_D36CA:
lea rdi, [rsp+0D8h+var_C0]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_D36E7
loc_D36D9:
mov [rsp+0D8h+var_C0], 0
mov [rsp+0D8h+var_B8], 0
loc_D36E7:
movzx r8d, byte ptr [r14+68h]
lea r9, [rsp+0D8h+var_70]
mov byte ptr [r9], 0
mov qword ptr [r9+8], 0
mov [rsp+0D8h+var_D8], 1
lea rdi, [rsp+0D8h+var_A0]
lea rcx, [rsp+0D8h+var_C0]
mov rsi, r15
mov rdx, r14
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
lea rdi, [rsp+0D8h+var_40]
lea rsi, [rsp+0D8h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
mov al, [rbx+8]
lea rdi, [rsp+0D8h+var_40]
mov cl, [rdi]
mov [rbx+8], cl
mov [rdi], al
mov rax, [rbx+10h]
mov rcx, [rdi+8]
mov [rbx+10h], rcx
mov [rdi+8], rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+0D8h+var_A0]; void *
cmp rdi, r13
jz short loc_D3769
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D3769:
lea rdi, [rsp+0D8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0D8h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov dword ptr [rbx], 8
mov rdi, [rsp+0D8h+var_60]; void *
cmp rdi, rbp
jz short loc_D379D
mov rsi, [rsp+0D8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D379D:
lea rdi, [rsp+0D8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_D3818
jmp short loc_D3810
mov r14, rax
mov rdi, [rsp+0D8h+var_A0]; void *
cmp rdi, r13
jz short loc_D37DC
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D37DC
mov r14, rax
loc_D37DC:
lea rdi, [rsp+0D8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0D8h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_D381B
mov r14, rax
mov rax, [rsp+0D8h+var_B0]
test rax, rax
jz short loc_D381B
lea rdi, [rsp+0D8h+var_C0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_D381B
loc_D3810:
mov rdi, rax
call __clang_call_terminate
loc_D3818:
mov r14, rax
loc_D381B:
mov rdi, [rsp+0D8h+var_60]; void *
cmp rdi, rbp
jz short loc_D3835
mov rsi, [rsp+0D8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D3835:
lea rdi, [rsp+0D8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_D383F:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
mov r14, rax
jmp short loc_D383F
|
long long common_chat_params_init_functionary_v3_1_llama_3_1(
const minja::chat_template *a1,
const common_chat_inputs *a2,
long long a3)
{
unsigned __int8 *v4; // r12
_QWORD *v5; // rax
int v6; // r8d
int v7; // r9d
int v8; // eax
int v9; // r8d
char v10; // al
long long v11; // rax
char v13; // [rsp+17h] [rbp-C1h] BYREF
_QWORD *v14; // [rsp+18h] [rbp-C0h] BYREF
long long v15; // [rsp+20h] [rbp-B8h]
long long ( *v16)(); // [rsp+28h] [rbp-B0h]
long long ( *v17)(); // [rsp+30h] [rbp-A8h]
void *v18[2]; // [rsp+38h] [rbp-A0h] BYREF
_QWORD v19[2]; // [rsp+48h] [rbp-90h] BYREF
unsigned __int8 v20[16]; // [rsp+58h] [rbp-80h] BYREF
_BYTE v21[8]; // [rsp+68h] [rbp-70h] BYREF
long long v22; // [rsp+70h] [rbp-68h]
void *v23[2]; // [rsp+78h] [rbp-60h] BYREF
_QWORD v24[2]; // [rsp+88h] [rbp-50h] BYREF
char v25[8]; // [rsp+98h] [rbp-40h] BYREF
long long v26; // [rsp+A0h] [rbp-38h]
*(_DWORD *)a1 = 0;
*((_BYTE *)a1 + 8) = 0;
*((_QWORD *)a1 + 2) = 0LL;
*((_QWORD *)a1 + 3) = (char *)a1 + 40;
*((_QWORD *)a1 + 4) = 0LL;
*((_BYTE *)a1 + 40) = 0;
*((_BYTE *)a1 + 56) = 0;
*((_OWORD *)a1 + 4) = 0LL;
*((_OWORD *)a1 + 5) = 0LL;
*((_OWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 7) = 0LL;
*((_QWORD *)a1 + 16) = 0LL;
v4 = (unsigned __int8 *)(a3 + 16);
if ( *(_BYTE *)(a3 + 16) )
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
0LL,
0LL,
0LL,
2LL);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
(unsigned __int8 *)(a3 + 16));
v23[0] = v24;
v23[1] = 0LL;
LOBYTE(v24[0]) = 0;
v13 = 0;
*((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
a3 + 32,
(long long)"required");
v15 = 0LL;
v5 = (_QWORD *)operator new(0x20uLL);
*v5 = a3;
v5[1] = &v13;
v5[2] = v23;
v5[3] = a1;
v14 = v5;
v17 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke;
v16 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager;
build_grammar[abi:cxx11]((long long)v18, (long long)&v14, grammar_options, (long long)v23, v6, v7);
std::string::operator=((char *)a1 + 24, v18);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
if ( v16 )
((void ( *)(_QWORD **, _QWORD **, long long))v16)(&v14, &v14, 3LL);
v8 = *v4;
if ( !*v4 || (v8 == 2 || v8 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
LOBYTE(v14) = 0;
v15 = 0LL;
}
else
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(unsigned __int8 *)&v14,
v4);
}
v9 = *(unsigned __int8 *)(a3 + 104);
v21[0] = 0;
v22 = 0LL;
minja::chat_template::apply((long long)v18, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v14, v9, v21, 1);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v25);
v10 = *((_BYTE *)a1 + 8);
*((_BYTE *)a1 + 8) = v25[0];
v25[0] = v10;
v11 = *((_QWORD *)a1 + 2);
*((_QWORD *)a1 + 2) = v26;
v26 = v11;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v25);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v14);
*(_DWORD *)a1 = 8;
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20);
}
|
common_chat_params_init_functionary_v3_1_llama_3_1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
XOR EAX,EAX
MOV byte ptr [RDI + 0x8],AL
MOV qword ptr [RDI + 0x10],RAX
LEA RCX,[RDI + 0x28]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],RAX
MOV byte ptr [RDI + 0x28],AL
MOV byte ptr [RDI + 0x38],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOV qword ptr [RDI + 0x80],RAX
LEA R12,[RDX + 0x10]
CMP byte ptr [RDX + 0x10],AL
JZ 0x001d35d2
LAB_001d35ba:
LEA RDI,[RSP + 0x58]
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x2
CALL 0x00181a08
JMP 0x001d35df
LAB_001d35d2:
LEA RDI,[RSP + 0x58]
MOV RSI,R12
CALL 0x0016046c
LAB_001d35df:
LEA RBP,[RSP + 0x88]
MOV qword ptr [RBP + -0x10],RBP
XOR R13D,R13D
MOV qword ptr [RBP + -0x8],R13
MOV byte ptr [RBP],R13B
MOV byte ptr [RSP + 0x17],R13B
LEA RDI,[R14 + 0x20]
LEA RSI,[0x1f1971]
CALL 0x001a7d5b
MOV byte ptr [RBX + 0x38],AL
MOV qword ptr [RSP + 0x20],R13
LAB_001d3613:
MOV EDI,0x20
CALL 0x0011b9f0
MOV qword ptr [RAX],R14
LEA RCX,[RSP + 0x17]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[RSP + 0x78]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBX
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],RAX
LEA RAX,[0x1dd5ee]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1ddce2]
MOV qword ptr [RSI + 0x10],RAX
LAB_001d3654:
LEA RDX,[0x1f78a8]
LEA RDI,[RSP + 0x38]
CALL 0x001bdec8
LEA RDI,[RBX + 0x18]
LEA R13,[RSP + 0x38]
MOV RSI,R13
CALL 0x0011bc30
MOV RDI,qword ptr [R13]
LEA R13,[RSP + 0x48]
CMP RDI,R13
JZ 0x001d3691
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011ba20
LAB_001d3691:
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x001d36aa
LAB_001d369b:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001d36aa:
MOVZX EAX,byte ptr [R12]
TEST EAX,EAX
JZ 0x001d36d9
CMP EAX,0x2
JZ 0x001d36bd
CMP EAX,0x1
JNZ 0x001d36ca
LAB_001d36bd:
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x001d36d9
LAB_001d36ca:
LEA RDI,[RSP + 0x18]
MOV RSI,R12
CALL 0x0016046c
JMP 0x001d36e7
LAB_001d36d9:
MOV byte ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LAB_001d36e7:
MOVZX R8D,byte ptr [R14 + 0x68]
LEA R9,[RSP + 0x68]
MOV byte ptr [R9],0x0
MOV qword ptr [R9 + 0x8],0x0
LAB_001d36fd:
MOV dword ptr [RSP],0x1
LEA RDI,[RSP + 0x38]
LEA RCX,[RSP + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x001a447a
LAB_001d3719:
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x38]
CALL 0x0018275c
MOV AL,byte ptr [RBX + 0x8]
LEA RDI,[RSP + 0x98]
MOV CL,byte ptr [RDI]
MOV byte ptr [RBX + 0x8],CL
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [RDI + 0x8],RAX
CALL 0x00160938
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R13
JZ 0x001d3769
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011ba20
LAB_001d3769:
LEA RDI,[RSP + 0x68]
CALL 0x00160938
LEA RDI,[RSP + 0x18]
CALL 0x00160938
MOV dword ptr [RBX],0x8
MOV RDI,qword ptr [RSP + 0x78]
CMP RDI,RBP
JZ 0x001d379d
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x0011ba20
LAB_001d379d:
LEA RDI,[RSP + 0x58]
CALL 0x00160938
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,
common_chat_inputs const&) */
void common_chat_params_init_functionary_v3_1_llama_3_1
(chat_template *param_1,common_chat_inputs *param_2)
{
basic_json *pbVar1;
basic_json bVar2;
int8 uVar3;
chat_template cVar4;
long in_RDX;
int1 local_c1;
long *local_c0;
int8 local_b8;
code *local_b0;
code *local_a8;
long *local_a0 [2];
long local_90 [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>
local_80 [16];
data local_70 [8];
int8 local_68;
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
chat_template local_40 [8];
int8 local_38;
*(int4 *)param_1 = 0;
param_1[8] = (chat_template)0x0;
*(int8 *)(param_1 + 0x10) = 0;
*(chat_template **)(param_1 + 0x18) = param_1 + 0x28;
*(int8 *)(param_1 + 0x20) = 0;
param_1[0x28] = (chat_template)0x0;
param_1[0x38] = (chat_template)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
pbVar1 = (basic_json *)(in_RDX + 0x10);
if (*(char *)(in_RDX + 0x10) == '\0') {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_80,pbVar1);
}
else {
/* try { // try from 001d35ba to 001d35de has its CatchHandler @ 001d384f */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_80,0,0,0,2);
}
local_58 = 0;
local_50 = 0;
local_c1 = 0;
local_60 = &local_50;
cVar4 = (chat_template)
_ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(in_RDX + 0x20,"required");
param_1[0x38] = cVar4;
local_b8 = 0;
/* try { // try from 001d3613 to 001d361c has its CatchHandler @ 001d3818 */
local_c0 = (long *)operator_new(0x20);
*local_c0 = in_RDX;
local_c0[1] = (long)&local_c1;
local_c0[2] = (long)&local_60;
local_c0[3] = (long)param_1;
local_a8 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_invoke;
local_b0 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_manager;
/* try { // try from 001d3654 to 001d3664 has its CatchHandler @ 001d37f2 */
build_grammar_abi_cxx11_((function *)local_a0,(common_grammar_options *)&local_c0);
std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
if (local_b0 != (code *)0x0) {
/* try { // try from 001d369b to 001d36a9 has its CatchHandler @ 001d37bb */
(*local_b0)(&local_c0,&local_c0,3);
}
bVar2 = *pbVar1;
if ((bVar2 == (basic_json)0x0) ||
(((bVar2 == (basic_json)0x2 || (bVar2 == (basic_json)0x1)) &&
(**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) {
local_c0 = (long *)((ulong)local_c0 & 0xffffffffffffff00);
local_b8 = 0;
}
else {
/* try { // try from 001d36ca to 001d36d6 has its CatchHandler @ 001d37b9 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)&local_c0,pbVar1);
}
local_70[0] = (data)0x0;
local_68 = 0;
/* try { // try from 001d36fd to 001d3718 has its CatchHandler @ 001d37d9 */
minja::chat_template::apply
((basic_json *)local_a0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)&local_c0,
*(bool *)(in_RDX + 0x68));
/* try { // try from 001d3719 to 001d372a has its CatchHandler @ 001d37bd */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(local_40,local_a0);
cVar4 = param_1[8];
param_1[8] = local_40[0];
uVar3 = *(int8 *)(param_1 + 0x10);
*(int8 *)(param_1 + 0x10) = local_38;
local_40[0] = cVar4;
local_38 = uVar3;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_40);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_70);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_c0);
*(int4 *)param_1 = 8;
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_80);
return;
}
|
|
18,660
|
clip_model_loader::get_string(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>>&, bool)
|
llama.cpp/examples/llava/clip.cpp
|
void get_string(const std::string & key, std::string & output, bool required = true) {
const int i = gguf_find_key(ctx_gguf.get(), key.c_str());
if (i < 0) {
if (required) throw std::runtime_error("Key not found: " + key);
return;
}
output = std::string(gguf_get_val_str(ctx_gguf.get(), i));
}
|
O3
|
cpp
|
clip_model_loader::get_string(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>>&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rdi
movq (%rsi), %rsi
callq 0x15430
testl %eax, %eax
js 0x35b48
movq 0x8(%r15), %rdi
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq %rax, %rsi
callq 0x15dc0
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1685a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15600
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x35b4d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x15120
jmp 0x35b4d
testb %bpl, %bpl
jne 0x35b58
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x15440
movq %rax, %rbx
leaq 0x11099(%rip), %rsi # 0x46c05
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x35c38
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x15220
xorl %ebp, %ebp
movq 0x1f436(%rip), %rsi # 0x54fc8
movq 0x1f407(%rip), %rdx # 0x54fa0
movq %rbx, %rdi
callq 0x15750
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35bbf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x15120
testb %bpl, %bpl
jne 0x35bc9
jmp 0x35bd1
movq %rax, %r14
movq %rbx, %rdi
callq 0x15a50
movq %r14, %rdi
callq 0x157c0
nop
|
_ZN17clip_model_loader10get_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS5_b:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rdi, [rdi+8]
mov rsi, [rsi]
call _gguf_find_key
test eax, eax
js short loc_35B48
mov rdi, [r15+8]
and eax, 7FFFFFFFh
mov rsi, rax
call _gguf_get_val_str
lea r14, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
mov rdi, r14
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
lea rax, [rsp+48h+var_30]
cmp rdi, rax
jz short loc_35B4D
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_35B4D
loc_35B48:
test bpl, bpl
jnz short loc_35B58
loc_35B4D:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_35B58:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aKeyNotFound; "Key not found: "
lea rdi, [rsp+48h+var_40]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+48h+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:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_35BBF
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_35BBF:
test bpl, bpl
jnz short loc_35BC9
jmp short loc_35BD1
mov r14, rax
loc_35BC9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_35BD1:
mov rdi, r14
call __Unwind_Resume
|
void clip_model_loader::get_string(long long a1, _QWORD *a2, long long a3, char a4)
{
int key; // eax
long long val_str; // rax
void *exception; // rbx
void *v9[2]; // [rsp+8h] [rbp-40h] BYREF
long long v10; // [rsp+18h] [rbp-30h] BYREF
key = gguf_find_key(*(_QWORD *)(a1 + 8), *a2);
if ( key < 0 )
{
if ( a4 )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>(v9, "Key not found: ", a2);
std::runtime_error::runtime_error(exception, v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
else
{
val_str = gguf_get_val_str(*(_QWORD *)(a1 + 8), key & 0x7FFFFFFF);
std::string::basic_string<std::allocator<char>>(v9, val_str);
std::string::operator=(a3, v9);
if ( v9[0] != &v10 )
operator delete(v9[0], v10 + 1);
}
}
|
get_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RSI]
CALL 0x00115430
TEST EAX,EAX
JS 0x00135b48
MOV RDI,qword ptr [R15 + 0x8]
AND EAX,0x7fffffff
MOV RSI,RAX
CALL 0x00115dc0
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
MOV RSI,RAX
CALL 0x0011685a
MOV RDI,RBX
MOV RSI,R14
CALL 0x00115600
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00135b4d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00115120
JMP 0x00135b4d
LAB_00135b48:
TEST BPL,BPL
JNZ 0x00135b58
LAB_00135b4d:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00135b58:
MOV EDI,0x10
CALL 0x00115440
MOV RBX,RAX
LAB_00135b65:
LEA RSI,[0x146c05]
LEA RDI,[RSP + 0x8]
MOV RDX,R14
CALL 0x00135c38
MOV BPL,0x1
LAB_00135b7c:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00115220
XOR EBP,EBP
MOV RSI,qword ptr [0x00154fc8]
MOV RDX,qword ptr [0x00154fa0]
MOV RDI,RBX
CALL 0x00115750
|
/* clip_model_loader::get_string(std::__cxx11::string const&, std::__cxx11::string&, bool) */
void __thiscall
clip_model_loader::get_string(clip_model_loader *this,string *param_1,string *param_2,bool param_3)
{
uint uVar1;
char *pcVar2;
runtime_error *this_00;
allocator local_41;
long *local_40 [2];
long local_30 [2];
uVar1 = gguf_find_key(*(int8 *)(this + 8),*(int8 *)param_1);
if ((int)uVar1 < 0) {
if (param_3) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00135b65 to 00135b78 has its CatchHandler @ 00135bc6 */
std::operator+((char *)local_40,(string *)"Key not found: ");
/* try { // try from 00135b7c to 00135ba0 has its CatchHandler @ 00135ba1 */
std::runtime_error::runtime_error(this_00,(string *)local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00154fc8,PTR__runtime_error_00154fa0);
}
}
else {
pcVar2 = (char *)gguf_get_val_str(*(int8 *)(this + 8),uVar1 & 0x7fffffff);
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,pcVar2,&local_41);
std::__cxx11::string::operator=(param_2,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
}
return;
}
|
|
18,661
|
destroy_file(PFS_thread*, PFS_file*)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
void destroy_file(PFS_thread *thread, PFS_file *pfs)
{
assert(thread != NULL);
assert(pfs != NULL);
PFS_file_class *klass= pfs->m_class;
/* Aggregate to FILE_SUMMARY_BY_EVENT_NAME */
klass->m_file_stat.aggregate(& pfs->m_file_stat);
pfs->m_file_stat.reset();
if (klass->is_singleton())
klass->m_singleton= NULL;
LF_PINS *pins= get_filename_hash_pins(thread);
assert(pins != NULL);
lf_hash_delete(&pfs_filename_hash, pins,
pfs->m_filename, pfs->m_filename_length);
if (klass->is_singleton())
klass->m_singleton= NULL;
global_file_container.deallocate(pfs);
}
|
O0
|
cpp
|
destroy_file(PFS_thread*, PFS_file*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0xa0, %rdi
movq -0x10(%rbp), %rsi
addq $0x228, %rsi # imm = 0x228
callq 0x40050
movq -0x10(%rbp), %rdi
addq $0x228, %rdi # imm = 0x228
callq 0x40080
movq -0x18(%rbp), %rdi
callq 0x3e720
testb $0x1, %al
jne 0x3b719
jmp 0x3b728
movq -0x18(%rbp), %rax
movq $0x0, 0x120(%rax)
movq -0x8(%rbp), %rdi
callq 0x3ab30
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
movq -0x10(%rbp), %rax
movl 0x218(%rax), %ecx
leaq 0x3d242e(%rip), %rdi # 0x40db80
callq 0x5f260
movq -0x18(%rbp), %rdi
callq 0x3e720
testb $0x1, %al
jne 0x3b766
jmp 0x3b775
movq -0x18(%rbp), %rax
movq $0x0, 0x120(%rax)
movq -0x10(%rbp), %rsi
leaq 0x3960b8(%rip), %rdi # 0x3d1838
callq 0x40000
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_Z12destroy_fileP10PFS_threadP8PFS_file:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+220h]
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
add rdi, 0A0h; this
mov rsi, [rbp+var_10]
add rsi, 228h; PFS_file_stat *
call _ZN13PFS_file_stat9aggregateEPKS_; PFS_file_stat::aggregate(PFS_file_stat const*)
mov rdi, [rbp+var_10]
add rdi, 228h; this
call _ZN13PFS_file_stat5resetEv; PFS_file_stat::reset(void)
mov rdi, [rbp+var_18]; this
call _ZNK15PFS_instr_class12is_singletonEv; PFS_instr_class::is_singleton(void)
test al, 1
jnz short loc_3B719
jmp short loc_3B728
loc_3B719:
mov rax, [rbp+var_18]
mov qword ptr [rax+120h], 0
loc_3B728:
mov rdi, [rbp+var_8]; PFS_thread *
call _Z22get_filename_hash_pinsP10PFS_thread; get_filename_hash_pins(PFS_thread *)
mov [rbp+var_20], rax
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_10]
add rdx, 18h
mov rax, [rbp+var_10]
mov ecx, [rax+218h]
lea rdi, pfs_filename_hash
call lf_hash_delete
mov rdi, [rbp+var_18]; this
call _ZNK15PFS_instr_class12is_singletonEv; PFS_instr_class::is_singleton(void)
test al, 1
jnz short loc_3B766
jmp short loc_3B775
loc_3B766:
mov rax, [rbp+var_18]
mov qword ptr [rax+120h], 0
loc_3B775:
mov rsi, [rbp+var_10]
lea rdi, global_file_container
call _ZN29PFS_buffer_scalable_containerI8PFS_fileLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE10deallocateEPS0_; PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::deallocate(PFS_file*)
add rsp, 20h
pop rbp
retn
|
long long destroy_file(PFS_thread *a1, PFS_file *a2)
{
long long filename_hash_pins; // [rsp+0h] [rbp-20h]
PFS_instr_class *v4; // [rsp+8h] [rbp-18h]
v4 = (PFS_instr_class *)*((_QWORD *)a2 + 68);
PFS_file_stat::aggregate((PFS_instr_class *)((char *)v4 + 160), (PFS_file *)((char *)a2 + 552));
PFS_file_stat::reset((PFS_file *)((char *)a2 + 552));
if ( (PFS_instr_class::is_singleton(v4) & 1) != 0 )
*((_QWORD *)v4 + 36) = 0LL;
filename_hash_pins = get_filename_hash_pins(a1);
lf_hash_delete(&pfs_filename_hash, filename_hash_pins, (char *)a2 + 24, *((unsigned int *)a2 + 134));
if ( (PFS_instr_class::is_singleton(v4) & 1) != 0 )
*((_QWORD *)v4 + 36) = 0LL;
return PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::deallocate(
global_file_container,
a2);
}
|
destroy_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x220]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0xa0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x228
CALL 0x00140050
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x228
CALL 0x00140080
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0013e720
TEST AL,0x1
JNZ 0x0013b719
JMP 0x0013b728
LAB_0013b719:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x120],0x0
LAB_0013b728:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013ab30
MOV qword ptr [RBP + -0x20],RAX
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x218]
LEA RDI,[0x50db80]
CALL 0x0015f260
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0013e720
TEST AL,0x1
JNZ 0x0013b766
JMP 0x0013b775
LAB_0013b766:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x120],0x0
LAB_0013b775:
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x4d1838]
CALL 0x00140000
ADD RSP,0x20
POP RBP
RET
|
/* destroy_file(PFS_thread*, PFS_file*) */
void destroy_file(PFS_thread *param_1,PFS_file *param_2)
{
PFS_instr_class *this;
ulong uVar1;
int8 uVar2;
this = *(PFS_instr_class **)(param_2 + 0x220);
PFS_file_stat::aggregate((PFS_file_stat *)(this + 0xa0),(PFS_file_stat *)(param_2 + 0x228));
PFS_file_stat::reset((PFS_file_stat *)(param_2 + 0x228));
uVar1 = PFS_instr_class::is_singleton(this);
if ((uVar1 & 1) != 0) {
*(int8 *)(this + 0x120) = 0;
}
uVar2 = get_filename_hash_pins(param_1);
lf_hash_delete(pfs_filename_hash,uVar2,param_2 + 0x18,*(int4 *)(param_2 + 0x218));
uVar1 = PFS_instr_class::is_singleton(this);
if ((uVar1 & 1) != 0) {
*(int8 *)(this + 0x120) = 0;
}
PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>
::deallocate((PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>
*)&global_file_container,param_2);
return;
}
|
|
18,662
|
mysql_find_charset_nr
|
eloqsql/libmariadb/libmariadb/ma_charset.c
|
const MARIADB_CHARSET_INFO * mysql_find_charset_nr(unsigned int charsetnr)
{
const MARIADB_CHARSET_INFO * c = mariadb_compiled_charsets;
if (my_collation_id_is_uca1400(charsetnr))
charsetnr= my_uca1400_collation_id_uca400_compat(charsetnr);
do {
if (c->nr == charsetnr) {
return(c);
}
++c;
} while (c[0].nr != 0);
return(NULL);
}
|
O0
|
c
|
mysql_find_charset_nr:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
leaq 0x189ae(%rip), %rax # 0x76fa0
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %edi
callq 0x5e650
cmpb $0x0, %al
je 0x5e60d
movl -0xc(%rbp), %edi
callq 0x5e680
movl %eax, -0xc(%rbp)
jmp 0x5e60f
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x5e624
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5e641
movq -0x18(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x5e60f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
mysql_find_charset_nr:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
lea rax, mariadb_compiled_charsets
mov [rbp+var_18], rax
mov edi, [rbp+var_C]
call my_collation_id_is_uca1400
cmp al, 0
jz short loc_5E60D
mov edi, [rbp+var_C]
call my_uca1400_collation_id_uca400_compat
mov [rbp+var_C], eax
loc_5E60D:
jmp short $+2
loc_5E60F:
mov rax, [rbp+var_18]
mov eax, [rax]
cmp eax, [rbp+var_C]
jnz short loc_5E624
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_5E641
loc_5E624:
mov rax, [rbp+var_18]
add rax, 48h ; 'H'
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jnz short loc_5E60F
mov [rbp+var_8], 0
loc_5E641:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
_DWORD * mysql_find_charset_nr(unsigned int a1)
{
_DWORD *v2; // [rsp+8h] [rbp-18h]
unsigned int v3; // [rsp+14h] [rbp-Ch]
v3 = a1;
v2 = &mariadb_compiled_charsets;
if ( (unsigned __int8)my_collation_id_is_uca1400(a1) )
v3 = my_uca1400_collation_id_uca400_compat(a1);
do
{
if ( *v2 == v3 )
return v2;
v2 += 18;
}
while ( *v2 );
return 0LL;
}
|
mysql_find_charset_nr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
LEA RAX,[0x176fa0]
MOV qword ptr [RBP + -0x18],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x0015e650
CMP AL,0x0
JZ 0x0015e60d
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x0015e680
MOV dword ptr [RBP + -0xc],EAX
LAB_0015e60d:
JMP 0x0015e60f
LAB_0015e60f:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x0015e624
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015e641
LAB_0015e624:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x48
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JNZ 0x0015e60f
MOV qword ptr [RBP + -0x8],0x0
LAB_0015e641:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * mysql_find_charset_nr(int param_1)
{
char cVar1;
int *local_20;
int local_14;
local_20 = &mariadb_compiled_charsets;
cVar1 = my_collation_id_is_uca1400(param_1);
local_14 = param_1;
if (cVar1 != '\0') {
local_14 = my_uca1400_collation_id_uca400_compat(param_1);
}
do {
if (*local_20 == local_14) {
return local_20;
}
local_20 = local_20 + 0x12;
} while (*local_20 != 0);
return (int *)0x0;
}
|
|
18,663
|
TC_LOG_MMAP::commit_checkpoint_notify(void*)
|
eloqsql/sql/log.cc
|
void
TC_LOG_MMAP::commit_checkpoint_notify(void *cookie)
{
uint count;
pending_cookies *pending= static_cast<pending_cookies *>(cookie);
mysql_mutex_lock(&LOCK_pending_checkpoint);
DBUG_ASSERT(pending->pending_count > 0);
count= --pending->pending_count;
mysql_mutex_unlock(&LOCK_pending_checkpoint);
if (count == 0)
{
uint i;
for (i= 0; i < tc_log_page_size / sizeof(my_xid); ++i)
delete_entry(pending->cookies[i]);
my_free(pending);
}
}
|
O0
|
cpp
|
TC_LOG_MMAP::commit_checkpoint_notify(void*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x328, %rdi # imm = 0x328
leaq 0x69a1c8(%rip), %rsi # 0x13d7906
movl $0x2749, %edx # imm = 0x2749
callq 0xb44d40
jmp 0xd3d74a
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl 0x4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rcx)
movl %eax, -0x14(%rbp)
addq $0x328, %rdi # imm = 0x328
callq 0xb44fa0
cmpl $0x0, -0x14(%rbp)
jne 0xd3d7b3
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq 0xfc2eef(%rip), %rcx # 0x1d00670
shrq $0x3, %rcx
cmpq %rcx, %rax
jae 0xd3d7aa
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rsi
callq 0xd3d7c0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xd3d777
movq -0x20(%rbp), %rdi
callq 0x12c7520
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN11TC_LOG_MMAP24commit_checkpoint_notifyEPv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_30], rdi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
add rdi, 328h
lea rsi, aWorkspaceLlm4b_100; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2749h
call _Z15coro_mutex_lockP14st_mysql_mutexPKcj; coro_mutex_lock(st_mysql_mutex *,char const*,uint)
jmp short $+2
loc_D3D74A:
mov rdi, [rbp+var_30]
mov rcx, [rbp+var_20]
mov eax, [rcx+4]
add eax, 0FFFFFFFFh
mov [rcx+4], eax
mov [rbp+var_14], eax
add rdi, 328h
call _Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *)
cmp [rbp+var_14], 0
jnz short loc_D3D7B3
mov [rbp+var_24], 0
loc_D3D777:
mov eax, [rbp+var_24]
mov rcx, cs:tc_log_page_size
shr rcx, 3
cmp rax, rcx
jnb short loc_D3D7AA
mov rdi, [rbp+var_30]; this
mov rax, [rbp+var_20]
mov ecx, [rbp+var_24]
mov rsi, [rax+rcx*8+8]; unsigned __int64
call _ZN11TC_LOG_MMAP12delete_entryEm; TC_LOG_MMAP::delete_entry(ulong)
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_D3D777
loc_D3D7AA:
mov rdi, [rbp+var_20]
call my_free
loc_D3D7B3:
add rsp, 30h
pop rbp
retn
|
long long TC_LOG_MMAP::commit_checkpoint_notify(TC_LOG_MMAP *this, _DWORD *a2)
{
int v2; // eax
long long result; // rax
unsigned int i; // [rsp+Ch] [rbp-24h]
int v5; // [rsp+1Ch] [rbp-14h]
coro_mutex_lock((long long)this + 808, (long long)"/workspace/llm4binary/github2025/eloqsql/sql/log.cc", 0x2749u);
v2 = a2[1] - 1;
a2[1] = v2;
v5 = v2;
result = coro_mutex_unlock((long long)this + 808);
if ( !v5 )
{
for ( i = 0; i < (unsigned long long)tc_log_page_size >> 3; ++i )
TC_LOG_MMAP::delete_entry(this, *(_QWORD *)&a2[2 * i + 2]);
return my_free(a2);
}
return result;
}
|
val_str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00d3d72a
LAB_00d3d72a:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xf0]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x180]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,qword ptr [RAX + 0xf0]
MOV RCX,qword ptr [RCX]
MOV CL,byte ptr [RCX + 0x64]
MOV DL,CL
AND DL,0x1
MOV byte ptr [RAX + 0x64],DL
AND CL,0x1
MOVZX EDX,CL
MOV RAX,qword ptr [RAX + 0x100]
MOV CL,byte ptr [RAX + 0x188]
AND CL,0x1
MOVZX ECX,CL
OR ECX,EDX
CMP ECX,0x0
SETNZ CL
AND CL,0x1
MOV byte ptr [RAX + 0x188],CL
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
/* Item_ref_null_helper::val_str(String*) */
int8 __thiscall Item_ref_null_helper::val_str(Item_ref_null_helper *this,String *param_1)
{
byte bVar1;
int8 uVar2;
uVar2 = (**(code **)(*(long *)**(int8 **)(this + 0xf0) + 0x180))
((long *)**(int8 **)(this + 0xf0),param_1);
bVar1 = *(byte *)(**(long **)(this + 0xf0) + 100);
this[100] = (Item_ref_null_helper)(bVar1 & 1);
*(bool *)(*(long *)(this + 0x100) + 0x188) =
(*(byte *)(*(long *)(this + 0x100) + 0x188) & 1) != 0 || (bVar1 & 1) != 0;
return uVar2;
}
|
|
18,664
|
google::protobuf::compiler::python::Generator::FixOptionsForMessage(google::protobuf::Descriptor const&) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc
|
void Generator::FixOptionsForMessage(const Descriptor& descriptor) const {
// Nested messages.
for (int i = 0; i < descriptor.nested_type_count(); ++i) {
FixOptionsForMessage(*descriptor.nested_type(i));
}
// Oneofs.
for (int i = 0; i < descriptor.oneof_decl_count(); ++i) {
FixOptionsForOneof(*descriptor.oneof_decl(i));
}
// Enums.
for (int i = 0; i < descriptor.enum_type_count(); ++i) {
FixOptionsForEnum(*descriptor.enum_type(i));
}
// Fields.
for (int i = 0; i < descriptor.field_count(); ++i) {
const FieldDescriptor& field = *descriptor.field(i);
FixOptionsForField(field);
}
// Extensions.
for (int i = 0; i < descriptor.extension_count(); ++i) {
const FieldDescriptor& field = *descriptor.extension(i);
FixOptionsForField(field);
}
// Message option for this message.
std::string message_options =
OptionsValue(descriptor.options().SerializeAsString());
if (message_options != "None") {
std::string descriptor_name = ModuleLevelDescriptorName(descriptor);
PrintDescriptorOptionsFixingCode(descriptor_name, message_options,
printer_);
}
}
|
O0
|
cpp
|
google::protobuf::compiler::python::Generator::FixOptionsForMessage(google::protobuf::Descriptor const&) const:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0x0, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x3cb40
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0xbe7b5
movq 0xc8(%rsp), %rdi
movl 0xc4(%rsp), %esi
callq 0x3cb50
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0xbe730
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0xbe75f
movl $0x0, 0xc0(%rsp)
movl 0xc0(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x6ee70
movl %eax, %ecx
movl 0x20(%rsp), %eax
cmpl %ecx, %eax
jge 0xbe816
movq 0xc8(%rsp), %rdi
movl 0xc0(%rsp), %esi
callq 0x6ee80
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0xbee40
movl 0xc0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc0(%rsp)
jmp 0xbe7c0
movl $0x0, 0xbc(%rsp)
movl 0xbc(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x5ad50
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0xbe877
movq 0xc8(%rsp), %rdi
movl 0xbc(%rsp), %esi
callq 0x6eea0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0xbe020
movl 0xbc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xbc(%rsp)
jmp 0xbe821
movl $0x0, 0xb8(%rsp)
movl 0xb8(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x3ca80
movl %eax, %ecx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0xbe8e5
movq 0xc8(%rsp), %rdi
movl 0xb8(%rsp), %esi
callq 0x3ca90
movq 0x28(%rsp), %rdi
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rsi
callq 0xbe370
movl 0xb8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb8(%rsp)
jmp 0xbe882
movl $0x0, 0xac(%rsp)
movl 0xac(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x59060
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0xbe953
movq 0xc8(%rsp), %rdi
movl 0xac(%rsp), %esi
callq 0x590a0
movq 0x28(%rsp), %rdi
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rsi
callq 0xbe370
movl 0xac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xac(%rsp)
jmp 0xbe8f0
movq 0xc8(%rsp), %rdi
callq 0x5ab10
movq %rax, %rsi
leaq 0x60(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1f4920
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0xb6930
jmp 0xbe98b
leaq 0x60(%rsp), %rdi
callq 0x21cc8
leaq 0x2f3881(%rip), %rsi # 0x3b221d
leaq 0x80(%rsp), %rdi
callq 0x38b90
movb %al, 0x7(%rsp)
jmp 0xbe9af
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xbe9bc
jmp 0xbea42
movq 0x28(%rsp), %rsi
movq 0xc8(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0xbf960
jmp 0xbe9d5
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rdx
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xbdfe0
jmp 0xbe9f2
leaq 0x30(%rsp), %rdi
callq 0x21cc8
jmp 0xbea42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x21cc8
jmp 0xbea64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0xbea57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x21cc8
jmp 0xbea57
leaq 0x80(%rsp), %rdi
callq 0x21cc8
addq $0xd8, %rsp
retq
leaq 0x80(%rsp), %rdi
callq 0x21cc8
movq 0x58(%rsp), %rdi
callq 0x21700
nop
|
_ZNK6google8protobuf8compiler6python9Generator20FixOptionsForMessageERKNS0_10DescriptorE:
sub rsp, 0D8h
mov qword ptr [rsp+0D8h+var_8], rdi
mov [rsp+0D8h+var_10], rsi
mov rax, qword ptr [rsp+0D8h+var_8]
mov [rsp+0D8h+var_B0], rax; char
mov dword ptr [rsp+0D8h+var_18+4], 0
loc_BE75F:
mov eax, dword ptr [rsp+0D8h+var_18+4]
mov dword ptr [rsp+0D8h+var_B8+4], eax
mov rdi, [rsp+0D8h+var_10]; this
call _ZNK6google8protobuf10Descriptor17nested_type_countEv; google::protobuf::Descriptor::nested_type_count(void)
mov ecx, eax
mov eax, dword ptr [rsp+0D8h+var_B8+4]
cmp eax, ecx
jge short loc_BE7B5
mov rdi, [rsp+0D8h+var_10]; this
mov esi, dword ptr [rsp+0D8h+var_18+4]; int
call _ZNK6google8protobuf10Descriptor11nested_typeEi; google::protobuf::Descriptor::nested_type(int)
mov rdi, [rsp+0D8h+var_B0]; this
mov rsi, rax; google::protobuf::Descriptor *
call _ZNK6google8protobuf8compiler6python9Generator20FixOptionsForMessageERKNS0_10DescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForMessage(google::protobuf::Descriptor const&)
mov eax, dword ptr [rsp+0D8h+var_18+4]
add eax, 1
mov dword ptr [rsp+0D8h+var_18+4], eax
jmp short loc_BE75F
loc_BE7B5:
mov dword ptr [rsp+0D8h+var_18], 0; char
loc_BE7C0:
mov eax, dword ptr [rsp+0D8h+var_18]
mov dword ptr [rsp+0D8h+var_B8], eax; int
mov rdi, [rsp+0D8h+var_10]; this
call _ZNK6google8protobuf10Descriptor16oneof_decl_countEv; google::protobuf::Descriptor::oneof_decl_count(void)
mov ecx, eax
mov eax, dword ptr [rsp+0D8h+var_B8]
cmp eax, ecx
jge short loc_BE816
mov rdi, [rsp+0D8h+var_10]; this
mov esi, dword ptr [rsp+0D8h+var_18]; int
call _ZNK6google8protobuf10Descriptor10oneof_declEi; google::protobuf::Descriptor::oneof_decl(int)
mov rdi, [rsp+0D8h+var_B0]; this
mov rsi, rax; google::protobuf::OneofDescriptor *
call _ZNK6google8protobuf8compiler6python9Generator18FixOptionsForOneofERKNS0_15OneofDescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForOneof(google::protobuf::OneofDescriptor const&)
mov eax, dword ptr [rsp+0D8h+var_18]
add eax, 1
mov dword ptr [rsp+0D8h+var_18], eax
jmp short loc_BE7C0
loc_BE816:
mov [rsp+0D8h+var_1C], 0
loc_BE821:
mov eax, [rsp+0D8h+var_1C]
mov [rsp+0D8h+var_BC], eax
mov rdi, [rsp+0D8h+var_10]; this
call _ZNK6google8protobuf10Descriptor15enum_type_countEv; google::protobuf::Descriptor::enum_type_count(void)
mov ecx, eax
mov eax, [rsp+0D8h+var_BC]
cmp eax, ecx
jge short loc_BE877
mov rdi, [rsp+0D8h+var_10]; this
mov esi, [rsp+0D8h+var_1C]; int
call _ZNK6google8protobuf10Descriptor9enum_typeEi; google::protobuf::Descriptor::enum_type(int)
mov rdi, [rsp+0D8h+var_B0]; this
mov rsi, rax; google::protobuf::EnumDescriptor *
call _ZNK6google8protobuf8compiler6python9Generator17FixOptionsForEnumERKNS0_14EnumDescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForEnum(google::protobuf::EnumDescriptor const&)
mov eax, [rsp+0D8h+var_1C]
add eax, 1
mov [rsp+0D8h+var_1C], eax
jmp short loc_BE821
loc_BE877:
mov [rsp+0D8h+var_20], 0; int
loc_BE882:
mov eax, [rsp+0D8h+var_20]
mov [rsp+0D8h+var_C0], eax; int
mov rdi, [rsp+0D8h+var_10]; this
call _ZNK6google8protobuf10Descriptor11field_countEv; google::protobuf::Descriptor::field_count(void)
mov ecx, eax
mov eax, [rsp+0D8h+var_C0]
cmp eax, ecx
jge short loc_BE8E5
mov rdi, [rsp+0D8h+var_10]; this
mov esi, [rsp+0D8h+var_20]; int
call _ZNK6google8protobuf10Descriptor5fieldEi; google::protobuf::Descriptor::field(int)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_28], rax
mov rsi, [rsp+0D8h+var_28]; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8compiler6python9Generator18FixOptionsForFieldERKNS0_15FieldDescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForField(google::protobuf::FieldDescriptor const&)
mov eax, [rsp+0D8h+var_20]
add eax, 1
mov [rsp+0D8h+var_20], eax
jmp short loc_BE882
loc_BE8E5:
mov [rsp+0D8h+var_2C], 0
loc_BE8F0:
mov eax, [rsp+0D8h+var_2C]
mov [rsp+0D8h+var_C4], eax
mov rdi, [rsp+0D8h+var_10]; this
call _ZNK6google8protobuf10Descriptor15extension_countEv; google::protobuf::Descriptor::extension_count(void)
mov ecx, eax
mov eax, [rsp+0D8h+var_C4]
cmp eax, ecx
jge short loc_BE953
mov rdi, [rsp+0D8h+var_10]; this
mov esi, [rsp+0D8h+var_2C]; int
call _ZNK6google8protobuf10Descriptor9extensionEi; google::protobuf::Descriptor::extension(int)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_38], rax
mov rsi, [rsp+0D8h+var_38]; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8compiler6python9Generator18FixOptionsForFieldERKNS0_15FieldDescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForField(google::protobuf::FieldDescriptor const&)
mov eax, [rsp+0D8h+var_2C]
add eax, 1
mov [rsp+0D8h+var_2C], eax
jmp short loc_BE8F0
loc_BE953:
mov rdi, [rsp+0D8h+var_10]; this
call _ZNK6google8protobuf10Descriptor7optionsEv; google::protobuf::Descriptor::options(void)
mov rsi, rax; int
lea rdi, [rsp+0D8h+var_78]; int
mov qword ptr [rsp+0D8h+var_D0], rdi; int
call _ZNK6google8protobuf11MessageLite17SerializeAsStringB5cxx11Ev; google::protobuf::MessageLite::SerializeAsString(void)
mov rsi, [rsp+0D8h+var_B0]
mov rdx, qword ptr [rsp+0D8h+var_D0]
lea rdi, [rsp+0D8h+var_58]
call _ZNK6google8protobuf8compiler6python9Generator12OptionsValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::python::Generator::OptionsValue(std::string const&)
jmp short $+2
loc_BE98B:
lea rdi, [rsp+0D8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rsi, aGpbdescriptori+20h; "None"
lea rdi, [rsp+0D8h+var_58]
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*)
mov [rsp+0D8h+var_D1], al
jmp short $+2
loc_BE9AF:
mov al, [rsp+0D8h+var_D1]
test al, 1
jnz short loc_BE9BC
jmp loc_BEA42
loc_BE9BC:
mov rsi, [rsp+0D8h+var_B0]
mov rdx, [rsp+0D8h+var_10]
lea rdi, [rsp+0D8h+var_A8]; int
call _ZNK6google8protobuf8compiler6python9Generator25ModuleLevelDescriptorNameINS0_10DescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::Descriptor>(google::protobuf::Descriptor const&)
jmp short $+2
loc_BE9D5:
mov rax, [rsp+0D8h+var_B0]
mov rdx, [rax+58h]
lea rdi, [rsp+0D8h+var_A8]
lea rsi, [rsp+0D8h+var_58]
call _ZN6google8protobuf8compiler6python12_GLOBAL__N_132PrintDescriptorOptionsFixingCodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_PNS0_2io7PrinterE; google::protobuf::compiler::python::`anonymous namespace'::PrintDescriptorOptionsFixingCode(std::string const&,std::string const&,google::protobuf::io::Printer *)
jmp short $+2
loc_BE9F2:
lea rdi, [rsp+0D8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_BEA42
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_BEA64
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp short loc_BEA57
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_BEA57
loc_BEA42:
lea rdi, [rsp+0D8h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
add rsp, 0D8h
retn
loc_BEA57:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_BEA64:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
|
void google::protobuf::compiler::python::Generator::FixOptionsForMessage(
google::protobuf::compiler::python::Generator *this,
const google::protobuf::Descriptor *a2)
{
const google::protobuf::Descriptor *v2; // rax
const google::protobuf::OneofDescriptor *v3; // rax
const google::protobuf::EnumDescriptor *v4; // rax
int v5; // eax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // [rsp+0h] [rbp-D8h]
void *v11; // [rsp+0h] [rbp-D8h]
long long v12; // [rsp+8h] [rbp-D0h]
void *v13; // [rsp+10h] [rbp-C8h]
int v14; // [rsp+10h] [rbp-C8h]
int v15; // [rsp+18h] [rbp-C0h]
long long v16; // [rsp+20h] [rbp-B8h]
int v17; // [rsp+20h] [rbp-B8h]
google::protobuf::compiler::python::Generator *v18; // [rsp+28h] [rbp-B0h]
int v19[6]; // [rsp+30h] [rbp-A8h] BYREF
char v20; // [rsp+48h] [rbp-90h]
int v21; // [rsp+50h] [rbp-88h]
int v22; // [rsp+58h] [rbp-80h]
int v23[8]; // [rsp+60h] [rbp-78h] BYREF
int v24[8]; // [rsp+80h] [rbp-58h] BYREF
google::protobuf::FieldDescriptor *v25; // [rsp+A0h] [rbp-38h]
int v26; // [rsp+A8h] [rbp-30h]
int k; // [rsp+ACh] [rbp-2Ch]
google::protobuf::FieldDescriptor *v28; // [rsp+B0h] [rbp-28h]
int j; // [rsp+B8h] [rbp-20h]
int i; // [rsp+BCh] [rbp-1Ch]
char v31[8]; // [rsp+C0h] [rbp-18h]
google::protobuf::Descriptor *v32; // [rsp+C8h] [rbp-10h]
char v33[8]; // [rsp+D0h] [rbp-8h]
*(_QWORD *)v33 = this;
v32 = a2;
for ( *(_DWORD *)&v31[4] = 0; ; ++*(_DWORD *)&v31[4] )
{
HIDWORD(v16) = *(_DWORD *)&v31[4];
if ( *(int *)&v31[4] >= (int)google::protobuf::Descriptor::nested_type_count(v32) )
break;
v2 = (const google::protobuf::Descriptor *)google::protobuf::Descriptor::nested_type(v32, *(int *)&v31[4]);
google::protobuf::compiler::python::Generator::FixOptionsForMessage(this, v2);
}
for ( *(_DWORD *)v31 = 0; ; ++*(_DWORD *)v31 )
{
LODWORD(v16) = *(_DWORD *)v31;
if ( *(int *)v31 >= (int)google::protobuf::Descriptor::oneof_decl_count(v32) )
break;
v3 = (const google::protobuf::OneofDescriptor *)google::protobuf::Descriptor::oneof_decl(v32, *(int *)v31);
google::protobuf::compiler::python::Generator::FixOptionsForOneof(this, v3);
}
for ( i = 0; i < (int)google::protobuf::Descriptor::enum_type_count(v32); ++i )
{
v4 = (const google::protobuf::EnumDescriptor *)google::protobuf::Descriptor::enum_type(v32, i);
google::protobuf::compiler::python::Generator::FixOptionsForEnum(this, v4);
}
for ( j = 0; j < (int)google::protobuf::Descriptor::field_count(v32); ++j )
{
v28 = (google::protobuf::FieldDescriptor *)google::protobuf::Descriptor::field(v32, j);
google::protobuf::compiler::python::Generator::FixOptionsForField(this, v28);
}
for ( k = 0; ; ++k )
{
HIDWORD(v13) = k;
if ( k >= (int)google::protobuf::Descriptor::extension_count(v32) )
break;
v25 = (google::protobuf::FieldDescriptor *)google::protobuf::Descriptor::extension(v32, k);
google::protobuf::compiler::python::Generator::FixOptionsForField(this, v25);
}
v5 = google::protobuf::Descriptor::options(v32);
google::protobuf::MessageLite::SerializeAsString[abi:cxx11]((int)v23, v5, v6, v7, v8, v9, v10, (int)v23, v13, j, v16);
google::protobuf::compiler::python::Generator::OptionsValue((long long)v24, this, v12);
std::string::~string(v23);
HIBYTE(v11) = std::operator!=<char>((long long)v24, (long long)"None");
if ( (HIBYTE(v11) & 1) != 0 )
{
google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::Descriptor>(
(int)v19,
v11,
v12,
v14,
v15,
v17,
(char)this,
v19[0],
v19[2],
v19[4],
v20,
v21,
v22,
v23[0],
v23[2],
v23[4],
v23[6],
v24[0],
v24[2],
v24[4],
v24[6],
(int)v25,
v26,
(long long)v28,
j,
v31[0]);
google::protobuf::compiler::python::`anonymous namespace'::PrintDescriptorOptionsFixingCode(
v19,
v24,
*((_QWORD *)v18 + 11));
std::string::~string(v19);
}
std::string::~string(v24);
}
|
FixOptionsForMessage:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xd0],RDI
MOV qword ptr [RSP + 0xc8],RSI
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x28],RAX
MOV dword ptr [RSP + 0xc4],0x0
LAB_001be75f:
MOV EAX,dword ptr [RSP + 0xc4]
MOV dword ptr [RSP + 0x24],EAX
MOV RDI,qword ptr [RSP + 0xc8]
CALL 0x0013cb40
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,ECX
JGE 0x001be7b5
MOV RDI,qword ptr [RSP + 0xc8]
MOV ESI,dword ptr [RSP + 0xc4]
CALL 0x0013cb50
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,RAX
CALL 0x001be730
MOV EAX,dword ptr [RSP + 0xc4]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc4],EAX
JMP 0x001be75f
LAB_001be7b5:
MOV dword ptr [RSP + 0xc0],0x0
LAB_001be7c0:
MOV EAX,dword ptr [RSP + 0xc0]
MOV dword ptr [RSP + 0x20],EAX
MOV RDI,qword ptr [RSP + 0xc8]
CALL 0x0016ee70
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x20]
CMP EAX,ECX
JGE 0x001be816
MOV RDI,qword ptr [RSP + 0xc8]
MOV ESI,dword ptr [RSP + 0xc0]
CALL 0x0016ee80
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,RAX
CALL 0x001bee40
MOV EAX,dword ptr [RSP + 0xc0]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc0],EAX
JMP 0x001be7c0
LAB_001be816:
MOV dword ptr [RSP + 0xbc],0x0
LAB_001be821:
MOV EAX,dword ptr [RSP + 0xbc]
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0xc8]
CALL 0x0015ad50
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,ECX
JGE 0x001be877
MOV RDI,qword ptr [RSP + 0xc8]
MOV ESI,dword ptr [RSP + 0xbc]
CALL 0x0016eea0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,RAX
CALL 0x001be020
MOV EAX,dword ptr [RSP + 0xbc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xbc],EAX
JMP 0x001be821
LAB_001be877:
MOV dword ptr [RSP + 0xb8],0x0
LAB_001be882:
MOV EAX,dword ptr [RSP + 0xb8]
MOV dword ptr [RSP + 0x18],EAX
MOV RDI,qword ptr [RSP + 0xc8]
CALL 0x0013ca80
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x18]
CMP EAX,ECX
JGE 0x001be8e5
MOV RDI,qword ptr [RSP + 0xc8]
MOV ESI,dword ptr [RSP + 0xb8]
CALL 0x0013ca90
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0xb0],RAX
MOV RSI,qword ptr [RSP + 0xb0]
CALL 0x001be370
MOV EAX,dword ptr [RSP + 0xb8]
ADD EAX,0x1
MOV dword ptr [RSP + 0xb8],EAX
JMP 0x001be882
LAB_001be8e5:
MOV dword ptr [RSP + 0xac],0x0
LAB_001be8f0:
MOV EAX,dword ptr [RSP + 0xac]
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [RSP + 0xc8]
CALL 0x00159060
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,ECX
JGE 0x001be953
MOV RDI,qword ptr [RSP + 0xc8]
MOV ESI,dword ptr [RSP + 0xac]
CALL 0x001590a0
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0xa0],RAX
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x001be370
MOV EAX,dword ptr [RSP + 0xac]
ADD EAX,0x1
MOV dword ptr [RSP + 0xac],EAX
JMP 0x001be8f0
LAB_001be953:
MOV RDI,qword ptr [RSP + 0xc8]
CALL 0x0015ab10
MOV RSI,RAX
LEA RDI,[RSP + 0x60]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x002f4920
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x8]
LAB_001be97c:
LEA RDI,[RSP + 0x80]
CALL 0x001b6930
JMP 0x001be98b
LAB_001be98b:
LEA RDI,[RSP + 0x60]
CALL 0x00121cc8
LAB_001be995:
LEA RSI,[0x4b221d]
LEA RDI,[RSP + 0x80]
CALL 0x00138b90
MOV byte ptr [RSP + 0x7],AL
JMP 0x001be9af
LAB_001be9af:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x001be9bc
JMP 0x001bea42
LAB_001be9bc:
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0xc8]
LEA RDI,[RSP + 0x30]
CALL 0x001bf960
JMP 0x001be9d5
LAB_001be9d5:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RAX + 0x58]
LAB_001be9de:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x80]
CALL 0x001bdfe0
LAB_001be9f0:
JMP 0x001be9f2
LAB_001be9f2:
LEA RDI,[RSP + 0x30]
CALL 0x00121cc8
JMP 0x001bea42
LAB_001bea42:
LEA RDI,[RSP + 0x80]
CALL 0x00121cc8
ADD RSP,0xd8
RET
|
/* google::protobuf::compiler::python::Generator::FixOptionsForMessage(google::protobuf::Descriptor
const&) const */
void __thiscall
google::protobuf::compiler::python::Generator::FixOptionsForMessage
(Generator *this,Descriptor *param_1)
{
int iVar1;
bool bVar2;
int iVar3;
Descriptor *pDVar4;
OneofDescriptor *pOVar5;
EnumDescriptor *pEVar6;
Descriptor local_a8 [48];
string local_78 [32];
string local_58 [32];
FieldDescriptor *local_38;
int local_2c;
FieldDescriptor *local_28;
int local_20;
int local_1c;
int local_18;
int local_14;
Descriptor *local_10;
Generator *local_8;
local_10 = param_1;
local_8 = this;
for (local_14 = 0; iVar1 = local_14, iVar3 = Descriptor::nested_type_count(local_10),
iVar1 < iVar3; local_14 = local_14 + 1) {
pDVar4 = (Descriptor *)Descriptor::nested_type(local_10,local_14);
FixOptionsForMessage(this,pDVar4);
}
for (local_18 = 0; iVar1 = local_18, iVar3 = Descriptor::oneof_decl_count(local_10), iVar1 < iVar3
; local_18 = local_18 + 1) {
pOVar5 = (OneofDescriptor *)Descriptor::oneof_decl(local_10,local_18);
FixOptionsForOneof(this,pOVar5);
}
for (local_1c = 0; iVar1 = local_1c, iVar3 = Descriptor::enum_type_count(local_10), iVar1 < iVar3;
local_1c = local_1c + 1) {
pEVar6 = (EnumDescriptor *)Descriptor::enum_type(local_10,local_1c);
FixOptionsForEnum(this,pEVar6);
}
for (local_20 = 0; iVar1 = local_20, iVar3 = Descriptor::field_count(local_10), iVar1 < iVar3;
local_20 = local_20 + 1) {
local_28 = (FieldDescriptor *)Descriptor::field(local_10,local_20);
FixOptionsForField(this,local_28);
}
for (local_2c = 0; iVar1 = local_2c, iVar3 = Descriptor::extension_count(local_10), iVar1 < iVar3;
local_2c = local_2c + 1) {
local_38 = (FieldDescriptor *)Descriptor::extension(local_10,local_2c);
FixOptionsForField(this,local_38);
}
Descriptor::options(local_10);
MessageLite::SerializeAsString_abi_cxx11_();
/* try { // try from 001be97c to 001be988 has its CatchHandler @ 001be9fe */
OptionsValue(local_58);
std::__cxx11::string::~string(local_78);
/* try { // try from 001be995 to 001be9d2 has its CatchHandler @ 001bea18 */
bVar2 = std::operator!=(local_58,"None");
if (bVar2) {
ModuleLevelDescriptorName<google::protobuf::Descriptor>(local_a8);
/* try { // try from 001be9de to 001be9ef has its CatchHandler @ 001bea28 */
(anonymous_namespace)::PrintDescriptorOptionsFixingCode
((string *)local_a8,local_58,*(Printer **)(this + 0x58));
std::__cxx11::string::~string((string *)local_a8);
}
std::__cxx11::string::~string(local_58);
return;
}
|
|
18,665
|
google::protobuf::compiler::python::Generator::FixOptionsForMessage(google::protobuf::Descriptor const&) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc
|
void Generator::FixOptionsForMessage(const Descriptor& descriptor) const {
// Nested messages.
for (int i = 0; i < descriptor.nested_type_count(); ++i) {
FixOptionsForMessage(*descriptor.nested_type(i));
}
// Oneofs.
for (int i = 0; i < descriptor.oneof_decl_count(); ++i) {
FixOptionsForOneof(*descriptor.oneof_decl(i));
}
// Enums.
for (int i = 0; i < descriptor.enum_type_count(); ++i) {
FixOptionsForEnum(*descriptor.enum_type(i));
}
// Fields.
for (int i = 0; i < descriptor.field_count(); ++i) {
const FieldDescriptor& field = *descriptor.field(i);
FixOptionsForField(field);
}
// Extensions.
for (int i = 0; i < descriptor.extension_count(); ++i) {
const FieldDescriptor& field = *descriptor.extension(i);
FixOptionsForField(field);
}
// Message option for this message.
std::string message_options =
OptionsValue(descriptor.options().SerializeAsString());
if (message_options != "None") {
std::string descriptor_name = ModuleLevelDescriptorName(descriptor);
PrintDescriptorOptionsFixingCode(descriptor_name, message_options,
printer_);
}
}
|
O3
|
cpp
|
google::protobuf::compiler::python::Generator::FixOptionsForMessage(google::protobuf::Descriptor const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x70(%rsi)
jle 0x6bf4f
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x38(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x6bf10
incq %r12
movslq 0x70(%r14), %rax
addq $0x88, %r15
cmpq %rax, %r12
jl 0x6bf2d
cmpl $0x0, 0x68(%r14)
jle 0x6bf7b
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x30(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x6c468
incq %r12
movslq 0x68(%r14), %rax
addq $0x28, %r15
cmpq %rax, %r12
jl 0x6bf5c
cmpl $0x0, 0x74(%r14)
jle 0x6bfa7
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x40(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x6baf8
incq %r12
movslq 0x74(%r14), %rax
addq $0x48, %r15
cmpq %rax, %r12
jl 0x6bf88
cmpl $0x0, 0x4(%r14)
jle 0x6bfd3
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x28(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x6bd2c
incq %r12
movslq 0x4(%r14), %rax
addq $0x48, %r15
cmpq %rax, %r12
jl 0x6bfb4
cmpl $0x0, 0x7c(%r14)
jle 0x6bfff
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x50(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x6bd2c
incq %r12
movslq 0x7c(%r14), %rax
addq $0x48, %r15
cmpq %rax, %r12
jl 0x6bfe0
movq 0x20(%r14), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xfde30
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x67032
leaq 0x18(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x6c033
callq 0x1f4a0
leaq 0x138029(%rip), %rsi # 0x1a4063
leaq 0x28(%rsp), %rdi
callq 0x1f130
testl %eax, %eax
je 0x6c08f
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6cae0
movq 0x58(%rbx), %rdi
leaq 0x13c8c7(%rip), %rsi # 0x1a892a
leaq 0x18acf6(%rip), %rdx # 0x1f6d60
leaq 0x13c90d(%rip), %r8 # 0x1a897e
leaq 0x8(%rsp), %rcx
leaq 0x28(%rsp), %r9
callq 0x6d6c8
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6c08f
callq 0x1f4a0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c0a2
callq 0x1f4a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6c0c5
callq 0x1f4a0
jmp 0x6c0c5
movq %rax, %rbx
leaq 0x38(%rsp), %rax
jmp 0x6c0d4
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c0e2
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
|
_ZNK6google8protobuf8compiler6python9Generator20FixOptionsForMessageERKNS0_10DescriptorE:
push r15
push r14
push r12
push rbx; char
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
cmp dword ptr [rsi+70h], 0
jle short loc_6BF4F
xor r15d, r15d
xor r12d, r12d
loc_6BF2D:
mov rsi, [r14+38h]
add rsi, r15; google::protobuf::Descriptor *
mov rdi, rbx; this
call _ZNK6google8protobuf8compiler6python9Generator20FixOptionsForMessageERKNS0_10DescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForMessage(google::protobuf::Descriptor const&)
inc r12
movsxd rax, dword ptr [r14+70h]
add r15, 88h
cmp r12, rax
jl short loc_6BF2D
loc_6BF4F:
cmp dword ptr [r14+68h], 0
jle short loc_6BF7B
xor r15d, r15d
xor r12d, r12d
loc_6BF5C:
mov rsi, [r14+30h]
add rsi, r15; google::protobuf::OneofDescriptor *
mov rdi, rbx; this
call _ZNK6google8protobuf8compiler6python9Generator18FixOptionsForOneofERKNS0_15OneofDescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForOneof(google::protobuf::OneofDescriptor const&)
inc r12
movsxd rax, dword ptr [r14+68h]
add r15, 28h ; '('
cmp r12, rax
jl short loc_6BF5C
loc_6BF7B:
cmp dword ptr [r14+74h], 0
jle short loc_6BFA7
xor r15d, r15d
xor r12d, r12d
loc_6BF88:
mov rsi, [r14+40h]
add rsi, r15; google::protobuf::EnumDescriptor *
mov rdi, rbx; this
call _ZNK6google8protobuf8compiler6python9Generator17FixOptionsForEnumERKNS0_14EnumDescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForEnum(google::protobuf::EnumDescriptor const&)
inc r12
movsxd rax, dword ptr [r14+74h]
add r15, 48h ; 'H'
cmp r12, rax
jl short loc_6BF88
loc_6BFA7:
cmp dword ptr [r14+4], 0
jle short loc_6BFD3
xor r15d, r15d
xor r12d, r12d
loc_6BFB4:
mov rsi, [r14+28h]
add rsi, r15; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
call _ZNK6google8protobuf8compiler6python9Generator18FixOptionsForFieldERKNS0_15FieldDescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForField(google::protobuf::FieldDescriptor const&)
inc r12
movsxd rax, dword ptr [r14+4]
add r15, 48h ; 'H'
cmp r12, rax
jl short loc_6BFB4
loc_6BFD3:
cmp dword ptr [r14+7Ch], 0
jle short loc_6BFFF
xor r15d, r15d
xor r12d, r12d
loc_6BFE0:
mov rsi, [r14+50h]
add rsi, r15; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
call _ZNK6google8protobuf8compiler6python9Generator18FixOptionsForFieldERKNS0_15FieldDescriptorE; google::protobuf::compiler::python::Generator::FixOptionsForField(google::protobuf::FieldDescriptor const&)
inc r12
movsxd rax, dword ptr [r14+7Ch]
add r15, 48h ; 'H'
cmp r12, rax
jl short loc_6BFE0
loc_6BFFF:
mov rsi, [r14+20h]
lea r15, [rsp+68h+var_60]
mov rdi, r15
call _ZNK6google8protobuf11MessageLite17SerializeAsStringB5cxx11Ev; google::protobuf::MessageLite::SerializeAsString(void)
lea rdi, [rsp+68h+var_40]
mov rsi, rbx
mov rdx, r15
call _ZNK6google8protobuf8compiler6python9Generator12OptionsValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::python::Generator::OptionsValue(std::string const&)
lea r15, [rsp+68h+var_50]
mov rdi, [r15-10h]; void *
cmp rdi, r15
jz short loc_6C033
call __ZdlPv; operator delete(void *)
loc_6C033:
lea rsi, aNone; "None"
lea rdi, [rsp+68h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6C08F
lea rdi, [rsp+68h+var_60]; int
mov rsi, rbx
mov rdx, r14
call _ZNK6google8protobuf8compiler6python9Generator25ModuleLevelDescriptorNameINS0_10DescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::Descriptor>(google::protobuf::Descriptor const&)
mov rdi, [rbx+58h]
lea rsi, aDescriptorOpti; "$descriptor$._options = None\n$descript"...
lea rdx, aInvalidDescrip+8; "descriptor"
lea r8, aSerializedValu; "serialized_value"
lea rcx, [rsp+68h+var_60]
lea r9, [rsp+68h+var_40]
call _ZN6google8protobuf2io7Printer5PrintIJA11_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA17_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [11],std::string,char [17],std::string>(char const*,char [11],std::string,char [17],std::string const&)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz short loc_6C08F
call __ZdlPv; operator delete(void *)
loc_6C08F:
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6C0A2
call __ZdlPv; operator delete(void *)
loc_6C0A2:
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_6C0C5
call __ZdlPv; operator delete(void *)
jmp short loc_6C0C5
mov rbx, rax
loc_6C0C5:
lea rax, [rsp+arg_30]
jmp short loc_6C0D4
mov rbx, rax
lea rax, [rsp+arg_10]
loc_6C0D4:
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6C0E2
call __ZdlPv; operator delete(void *)
loc_6C0E2:
mov rdi, rbx
call __Unwind_Resume
|
void google::protobuf::compiler::python::Generator::FixOptionsForMessage(
google::protobuf::compiler::python::Generator *this,
const google::protobuf::Descriptor *a2,
long long a3,
int a4,
int a5,
int a6)
{
long long v6; // r15
long long v7; // r12
long long v8; // r15
long long v9; // r12
long long v10; // r15
long long v11; // r12
long long v12; // r15
long long v13; // r12
long long v14; // r15
long long v15; // r12
int v16; // [rsp+0h] [rbp-68h]
void *v17; // [rsp+8h] [rbp-60h] BYREF
int v18; // [rsp+10h] [rbp-58h]
void *v19; // [rsp+18h] [rbp-50h] BYREF
int v20; // [rsp+20h] [rbp-48h]
int *v21; // [rsp+28h] [rbp-40h] BYREF
int v22; // [rsp+30h] [rbp-38h]
int v23[4]; // [rsp+38h] [rbp-30h] BYREF
char v24; // [rsp+48h] [rbp-20h]
if ( *((int *)a2 + 28) > 0 )
{
v6 = 0LL;
v7 = 0LL;
do
{
google::protobuf::compiler::python::Generator::FixOptionsForMessage(
this,
(const google::protobuf::Descriptor *)(v6 + *((_QWORD *)a2 + 7)));
++v7;
v6 += 136LL;
}
while ( v7 < *((int *)a2 + 28) );
}
if ( *((int *)a2 + 26) > 0 )
{
v8 = 0LL;
v9 = 0LL;
do
{
google::protobuf::compiler::python::Generator::FixOptionsForOneof(
this,
(const google::protobuf::OneofDescriptor *)(v8 + *((_QWORD *)a2 + 6)));
++v9;
v8 += 40LL;
}
while ( v9 < *((int *)a2 + 26) );
}
if ( *((int *)a2 + 29) > 0 )
{
v10 = 0LL;
v11 = 0LL;
do
{
google::protobuf::compiler::python::Generator::FixOptionsForEnum(
this,
(const google::protobuf::EnumDescriptor *)(v10 + *((_QWORD *)a2 + 8)),
a3,
a4,
a5,
a6);
++v11;
v10 += 72LL;
}
while ( v11 < *((int *)a2 + 29) );
}
if ( *((int *)a2 + 1) > 0 )
{
v12 = 0LL;
v13 = 0LL;
do
{
google::protobuf::compiler::python::Generator::FixOptionsForField(
this,
(const google::protobuf::FieldDescriptor *)(v12 + *((_QWORD *)a2 + 5)));
++v13;
v12 += 72LL;
}
while ( v13 < *((int *)a2 + 1) );
}
if ( *((int *)a2 + 31) > 0 )
{
v14 = 0LL;
v15 = 0LL;
do
{
google::protobuf::compiler::python::Generator::FixOptionsForField(
this,
(const google::protobuf::FieldDescriptor *)(v14 + *((_QWORD *)a2 + 10)));
++v15;
v14 += 72LL;
}
while ( v15 < *((int *)a2 + 31) );
}
google::protobuf::MessageLite::SerializeAsString[abi:cxx11](&v17, *((_QWORD *)a2 + 4));
google::protobuf::compiler::python::Generator::OptionsValue((long long)&v21, this, (long long)&v17);
if ( v17 != &v19 )
operator delete(v17);
if ( (unsigned int)std::string::compare(&v21, "None") )
{
google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::Descriptor>(
(int)&v17,
v16,
(int)v17,
v18,
v19,
v20,
(int)v21,
v22,
v23[0],
v23[2],
v24);
google::protobuf::io::Printer::Print<char [11],std::string,char [17],std::string>(
*((_QWORD *)this + 11),
"$descriptor$._options = None\n$descriptor$._serialized_options = $serialized_value$\n",
"descriptor",
&v17,
"serialized_value",
&v21);
if ( v17 != &v19 )
operator delete(v17);
}
if ( v21 != v23 )
operator delete(v21);
}
|
FixOptionsForMessage:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
CMP dword ptr [RSI + 0x70],0x0
JLE 0x0016bf4f
XOR R15D,R15D
XOR R12D,R12D
LAB_0016bf2d:
MOV RSI,qword ptr [R14 + 0x38]
ADD RSI,R15
MOV RDI,RBX
CALL 0x0016bf10
INC R12
MOVSXD RAX,dword ptr [R14 + 0x70]
ADD R15,0x88
CMP R12,RAX
JL 0x0016bf2d
LAB_0016bf4f:
CMP dword ptr [R14 + 0x68],0x0
JLE 0x0016bf7b
XOR R15D,R15D
XOR R12D,R12D
LAB_0016bf5c:
MOV RSI,qword ptr [R14 + 0x30]
ADD RSI,R15
MOV RDI,RBX
CALL 0x0016c468
INC R12
MOVSXD RAX,dword ptr [R14 + 0x68]
ADD R15,0x28
CMP R12,RAX
JL 0x0016bf5c
LAB_0016bf7b:
CMP dword ptr [R14 + 0x74],0x0
JLE 0x0016bfa7
XOR R15D,R15D
XOR R12D,R12D
LAB_0016bf88:
MOV RSI,qword ptr [R14 + 0x40]
ADD RSI,R15
MOV RDI,RBX
CALL 0x0016baf8
INC R12
MOVSXD RAX,dword ptr [R14 + 0x74]
ADD R15,0x48
CMP R12,RAX
JL 0x0016bf88
LAB_0016bfa7:
CMP dword ptr [R14 + 0x4],0x0
JLE 0x0016bfd3
XOR R15D,R15D
XOR R12D,R12D
LAB_0016bfb4:
MOV RSI,qword ptr [R14 + 0x28]
ADD RSI,R15
MOV RDI,RBX
CALL 0x0016bd2c
INC R12
MOVSXD RAX,dword ptr [R14 + 0x4]
ADD R15,0x48
CMP R12,RAX
JL 0x0016bfb4
LAB_0016bfd3:
CMP dword ptr [R14 + 0x7c],0x0
JLE 0x0016bfff
XOR R15D,R15D
XOR R12D,R12D
LAB_0016bfe0:
MOV RSI,qword ptr [R14 + 0x50]
ADD RSI,R15
MOV RDI,RBX
CALL 0x0016bd2c
INC R12
MOVSXD RAX,dword ptr [R14 + 0x7c]
ADD R15,0x48
CMP R12,RAX
JL 0x0016bfe0
LAB_0016bfff:
MOV RSI,qword ptr [R14 + 0x20]
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x001fde30
LAB_0016c010:
LEA RDI,[RSP + 0x28]
MOV RSI,RBX
MOV RDX,R15
CALL 0x00167032
LEA R15,[RSP + 0x18]
MOV RDI,qword ptr [R15 + -0x10]
CMP RDI,R15
JZ 0x0016c033
CALL 0x0011f4a0
LAB_0016c033:
LEA RSI,[0x2a4063]
LEA RDI,[RSP + 0x28]
CALL 0x0011f130
TEST EAX,EAX
JZ 0x0016c08f
LAB_0016c048:
LEA RDI,[RSP + 0x8]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0016cae0
MOV RDI,qword ptr [RBX + 0x58]
LAB_0016c05c:
LEA RSI,[0x2a892a]
LEA RDX,[0x2f6d60]
LEA R8,[0x2a897e]
LEA RCX,[RSP + 0x8]
LEA R9,[RSP + 0x28]
CALL 0x0016d6c8
LAB_0016c080:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0016c08f
CALL 0x0011f4a0
LAB_0016c08f:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0016c0a2
CALL 0x0011f4a0
LAB_0016c0a2:
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::compiler::python::Generator::FixOptionsForMessage(google::protobuf::Descriptor
const&) const */
void __thiscall
google::protobuf::compiler::python::Generator::FixOptionsForMessage
(Generator *this,Descriptor *param_1)
{
int iVar1;
long lVar2;
long lVar3;
int1 *local_60 [2];
int1 local_50 [16];
int1 *local_40 [2];
int1 local_30 [16];
if (0 < *(int *)(param_1 + 0x70)) {
lVar3 = 0;
lVar2 = 0;
do {
FixOptionsForMessage(this,(Descriptor *)(*(long *)(param_1 + 0x38) + lVar3));
lVar2 = lVar2 + 1;
lVar3 = lVar3 + 0x88;
} while (lVar2 < *(int *)(param_1 + 0x70));
}
if (0 < *(int *)(param_1 + 0x68)) {
lVar3 = 0;
lVar2 = 0;
do {
FixOptionsForOneof(this,(OneofDescriptor *)(*(long *)(param_1 + 0x30) + lVar3));
lVar2 = lVar2 + 1;
lVar3 = lVar3 + 0x28;
} while (lVar2 < *(int *)(param_1 + 0x68));
}
if (0 < *(int *)(param_1 + 0x74)) {
lVar3 = 0;
lVar2 = 0;
do {
FixOptionsForEnum(this,(EnumDescriptor *)(*(long *)(param_1 + 0x40) + lVar3));
lVar2 = lVar2 + 1;
lVar3 = lVar3 + 0x48;
} while (lVar2 < *(int *)(param_1 + 0x74));
}
if (0 < *(int *)(param_1 + 4)) {
lVar3 = 0;
lVar2 = 0;
do {
FixOptionsForField(this,(FieldDescriptor *)(*(long *)(param_1 + 0x28) + lVar3));
lVar2 = lVar2 + 1;
lVar3 = lVar3 + 0x48;
} while (lVar2 < *(int *)(param_1 + 4));
}
if (0 < *(int *)(param_1 + 0x7c)) {
lVar3 = 0;
lVar2 = 0;
do {
FixOptionsForField(this,(FieldDescriptor *)(*(long *)(param_1 + 0x50) + lVar3));
lVar2 = lVar2 + 1;
lVar3 = lVar3 + 0x48;
} while (lVar2 < *(int *)(param_1 + 0x7c));
}
MessageLite::SerializeAsString_abi_cxx11_();
/* try { // try from 0016c010 to 0016c01f has its CatchHandler @ 0016c0cc */
OptionsValue((string *)local_40);
if (local_60[0] != local_50) {
operator_delete(local_60[0]);
}
iVar1 = std::__cxx11::string::compare((char *)local_40);
if (iVar1 != 0) {
/* try { // try from 0016c048 to 0016c057 has its CatchHandler @ 0016c0c2 */
ModuleLevelDescriptorName<google::protobuf::Descriptor>((Descriptor *)local_60);
/* try { // try from 0016c05c to 0016c07f has its CatchHandler @ 0016c0ae */
io::Printer::Print<char[11],std::__cxx11::string,char[17],std::__cxx11::string>
(*(char **)(this + 0x58),
"$descriptor$._options = None\n$descriptor$._serialized_options = $serialized_value$\n"
,(string *)0x2f6d60,(char *)local_60,(string *)"serialized_value");
if (local_60[0] != local_50) {
operator_delete(local_60[0]);
}
}
if (local_40[0] != local_30) {
operator_delete(local_40[0]);
}
return;
}
|
|
18,666
|
CLI::Formatter::make_subcommand[abi:cxx11](CLI::App const*) const
|
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp
|
CLI11_INLINE std::string Formatter::make_subcommand(const App *sub) const {
std::stringstream out;
detail::format_help(out, sub->get_display_name(true), sub->get_description(), column_width_);
return out.str();
}
|
O0
|
cpp
|
CLI::Formatter::make_subcommand[abi:cxx11](CLI::App const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp # imm = 0x210
movq %rdi, -0x210(%rbp)
movq %rdi, %rax
movq %rax, -0x208(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x200(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x9420
leaq -0x190(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
movl $0x1, %edx
callq 0x3e2b0
jmp 0x12dd4
movq -0x18(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0xd860
jmp 0x12de6
movq -0x1f8(%rbp), %rdi
movq -0x200(%rbp), %rax
movq 0x8(%rax), %rcx
leaq -0x1c0(%rbp), %rsi
leaq -0x1f0(%rbp), %rdx
callq 0x4c500
jmp 0x12e0d
leaq -0x1f0(%rbp), %rdi
callq 0x9b90
leaq -0x1c0(%rbp), %rdi
callq 0x9b90
movq -0x210(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x95d0
jmp 0x12e3a
leaq -0x1a0(%rbp), %rdi
callq 0x9490
movq -0x208(%rbp), %rax
addq $0x210, %rsp # imm = 0x210
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x12ea8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x12e9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x9b90
leaq -0x1c0(%rbp), %rdi
callq 0x9b90
leaq -0x1a0(%rbp), %rdi
callq 0x9490
movq -0x1c8(%rbp), %rdi
callq 0x9a70
|
_ZNK3CLI9Formatter15make_subcommandB5cxx11EPKNS_3AppE:
push rbp
mov rbp, rsp
sub rsp, 210h
mov [rbp+var_210], rdi
mov rax, rdi
mov [rbp+var_208], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_200], rax
lea rdi, [rbp+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rax, [rbp+var_190]
mov [rbp+var_1F8], rax
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_1C0]
mov edx, 1
call _ZNK3CLI3App16get_display_nameB5cxx11Eb; CLI::App::get_display_name(bool)
jmp short $+2
loc_12DD4:
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_1F0]
call _ZNK3CLI3App15get_descriptionB5cxx11Ev; CLI::App::get_description(void)
jmp short $+2
loc_12DE6:
mov rdi, [rbp+var_1F8]
mov rax, [rbp+var_200]
mov rcx, [rax+8]
lea rsi, [rbp+var_1C0]
lea rdx, [rbp+var_1F0]
call _ZN3CLI6detail11format_helpERSoNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS7_m; CLI::detail::format_help(std::ostream &,std::string,std::string const&,ulong)
jmp short $+2
loc_12E0D:
lea rdi, [rbp+var_1F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_1C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_210]
lea rsi, [rbp+var_1A0]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_12E3A:
lea rdi, [rbp+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, [rbp+var_208]
add rsp, 210h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_1C8], rcx
mov [rbp+var_1CC], eax
jmp short loc_12EA8
mov rcx, rax
mov eax, edx
mov [rbp+var_1C8], rcx
mov [rbp+var_1CC], eax
jmp short loc_12E9C
mov rcx, rax
mov eax, edx
mov [rbp+var_1C8], rcx
mov [rbp+var_1CC], eax
lea rdi, [rbp+var_1F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_12E9C:
lea rdi, [rbp+var_1C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_12EA8:
lea rdi, [rbp+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rbp+var_1C8]
call __Unwind_Resume
|
long long CLI::Formatter::make_subcommand[abi:cxx11](long long a1, long long a2, long long a3)
{
_BYTE v4[36]; // [rsp+20h] [rbp-1F0h] BYREF
_BYTE v5[32]; // [rsp+50h] [rbp-1C0h] BYREF
_BYTE v6[16]; // [rsp+70h] [rbp-1A0h] BYREF
_BYTE v7[376]; // [rsp+80h] [rbp-190h] BYREF
long long v8; // [rsp+1F8h] [rbp-18h]
long long v9; // [rsp+200h] [rbp-10h]
long long v10; // [rsp+208h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v6);
CLI::App::get_display_name[abi:cxx11](v5, v8, 1LL);
CLI::App::get_description[abi:cxx11]((long long)v4, v8);
CLI::detail::format_help(v7, v5, v4, *(_QWORD *)(a2 + 8));
std::string::~string(v4);
std::string::~string(v5);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v6);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
return a1;
}
|
make_subcommand[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x210
MOV qword ptr [RBP + -0x210],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x208],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x200],RAX
LEA RDI,[RBP + -0x1a0]
CALL 0x00109420
LEA RAX,[RBP + -0x190]
MOV qword ptr [RBP + -0x1f8],RAX
MOV RSI,qword ptr [RBP + -0x18]
LAB_00112dc1:
LEA RDI,[RBP + -0x1c0]
MOV EDX,0x1
CALL 0x0013e2b0
JMP 0x00112dd4
LAB_00112dd4:
MOV RSI,qword ptr [RBP + -0x18]
LAB_00112dd8:
LEA RDI,[RBP + -0x1f0]
CALL 0x0010d860
JMP 0x00112de6
LAB_00112de6:
MOV RDI,qword ptr [RBP + -0x1f8]
MOV RAX,qword ptr [RBP + -0x200]
MOV RCX,qword ptr [RAX + 0x8]
LAB_00112df8:
LEA RSI,[RBP + -0x1c0]
LEA RDX,[RBP + -0x1f0]
CALL 0x0014c500
JMP 0x00112e0d
LAB_00112e0d:
LEA RDI,[RBP + -0x1f0]
CALL 0x00109b90
LEA RDI,[RBP + -0x1c0]
CALL 0x00109b90
MOV RDI,qword ptr [RBP + -0x210]
LAB_00112e2c:
LEA RSI,[RBP + -0x1a0]
CALL 0x001095d0
LAB_00112e38:
JMP 0x00112e3a
LAB_00112e3a:
LEA RDI,[RBP + -0x1a0]
CALL 0x00109490
MOV RAX,qword ptr [RBP + -0x208]
ADD RSP,0x210
POP RBP
RET
|
/* CLI::Formatter::make_subcommand[abi:cxx11](CLI::App const*) const */
App * CLI::Formatter::make_subcommand_abi_cxx11_(App *param_1)
{
long in_RSI;
int8 in_R8;
int8 in_R9;
App *pAVar1;
string local_1f8 [48];
string local_1c8 [32];
stringstream local_1a8 [16];
int1 local_198 [392];
App *local_10;
pAVar1 = param_1;
local_10 = param_1;
std::__cxx11::stringstream::stringstream(local_1a8);
/* try { // try from 00112dc1 to 00112dd1 has its CatchHandler @ 00112e56 */
App::get_display_name_abi_cxx11_(SUB81(local_1c8,0));
/* try { // try from 00112dd8 to 00112de3 has its CatchHandler @ 00112e6a */
App::get_description_abi_cxx11_();
/* try { // try from 00112df8 to 00112e0a has its CatchHandler @ 00112e7e */
detail::format_help(local_198,local_1c8,local_1f8,*(int8 *)(in_RSI + 8),in_R8,in_R9,pAVar1);
std::__cxx11::string::~string(local_1f8);
std::__cxx11::string::~string(local_1c8);
/* try { // try from 00112e2c to 00112e37 has its CatchHandler @ 00112e56 */
std::__cxx11::stringstream::str();
std::__cxx11::stringstream::~stringstream(local_1a8);
return param_1;
}
|
|
18,667
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/json.hpp
|
T& operator[](const key_type& key)
{
return emplace(key, T{}).first->second;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x57ee4
movq %r14, %rdi
movl $0x1, %esi
callq 0x57ee4
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8e4c2
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x57ee4
movq %r14, %rdi
callq 0x5d352
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8e449
callq 0x6cd76
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8e458
callq 0x6cd76
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8e467
callq 0x6cd76
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8e49d
movq 0x9cb10(%rip), %rax # 0x12af88
cmpb $0x0, (%rax)
je 0x8e488
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x8e492
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x8e49d
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x85832
movq %rbx, %rdi
callq 0x1afa0
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r15, rdi
lea r14, [rsp+68h+var_28]
mov qword ptr [r14+8], 0
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdx, rsp
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value&&)
mov rbx, rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+68h+var_30]
test rdi, rdi
jz short loc_8E449
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E449:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_8E458
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E458:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_8E467
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E467:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_8E49D
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_8E488
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_8E492
loc_8E488:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_8E492:
cmp eax, 1
jnz short loc_8E49D
mov rax, [rdi]
call qword ptr [rax+18h]
loc_8E49D:
add rbx, 10h
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[](
long long a1,
long long a2)
{
long long v2; // rbx
long long v3; // rdi
signed __int32 v4; // eax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h]
__int128 v8; // [rsp+20h] [rbp-48h]
__int128 v9; // [rsp+30h] [rbp-38h]
char v10[8]; // [rsp+40h] [rbp-28h] BYREF
long long v11; // [rsp+48h] [rbp-20h]
v11 = 0LL;
v6 = 0LL;
v7 = 0LL;
v8 = 0LL;
v9 = 0LL;
v10[0] = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
v2 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
a1,
a2,
&v6);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
if ( *((_QWORD *)&v8 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1));
if ( *((_QWORD *)&v7 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1));
v3 = *((_QWORD *)&v6 + 1);
if ( *((_QWORD *)&v6 + 1) )
{
if ( _libc_single_threaded )
{
v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1;
}
else
{
v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v4 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL);
}
return v2 + 16;
}
|
operator[]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RSP + 0x40]
MOV qword ptr [R14 + 0x8],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00157ee4
MOV RDI,R14
MOV ESI,0x1
CALL 0x00157ee4
LAB_0018e417:
MOV RDX,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x0018e4c2
LAB_0018e425:
MOV RBX,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00157ee4
MOV RDI,R14
CALL 0x0015d352
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0018e449
CALL 0x0016cd76
LAB_0018e449:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0018e458
CALL 0x0016cd76
LAB_0018e458:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0018e467
CALL 0x0016cd76
LAB_0018e467:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018e49d
MOV RAX,qword ptr [0x0022af88]
CMP byte ptr [RAX],0x0
JZ 0x0018e488
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0018e492
LAB_0018e488:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0018e492:
CMP EAX,0x1
JNZ 0x0018e49d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0018e49d:
ADD RBX,0x10
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::operator[](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&) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
int *piVar1;
int iVar2;
long lVar3;
bool bVar4;
int8 local_68;
long *plStack_60;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
local_20 = 0;
local_68 = 0;
plStack_60 = (long *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
/* try { // try from 0018e417 to 0018e424 has its CatchHandler @ 0018e4ae */
lVar3 = emplace(this,param_1,(Value *)&local_68);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
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 (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (plStack_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022af88 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_60 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)plStack_60 + 0xc);
*(int *)((long)plStack_60 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*plStack_60 + 0x18))();
}
}
return lVar3 + 0x10;
}
|
|
18,668
|
my_strcasecmp_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
}
|
O3
|
c
|
my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movb (%rsi), %al
testb %al, %al
je 0xcf929
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x30900c(%rip), %r12 # 0x3d8860
cmpb $0x0, (%rbx)
je 0xcf923
testb %al, %al
js 0xcf876
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %r13d
movq %r13, -0x30(%rbp)
incq %r14
jmp 0xcf8bd
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0xcf3e3
testl %eax, %eax
je 0xcf949
movl %eax, %eax
addq %rax, %r14
movq -0x30(%rbp), %r13
cmpq (%r15), %r13
ja 0xcf8bd
movq 0x8(%r15), %rax
movq %r13, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xcf8bd
movzbl %r13b, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %r13d
movq %r13, -0x30(%rbp)
movsbq (%rbx), %rax
testq %rax, %rax
js 0xcf8d4
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %rbx
jmp 0xcf911
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0xcf3e3
testl %eax, %eax
je 0xcf949
movl %eax, %eax
addq %rax, %rbx
movq -0x38(%rbp), %rax
cmpq (%r15), %rax
ja 0xcf911
movq 0x8(%r15), %rcx
movq %rax, %rdx
shrq $0x8, %rdx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xcf911
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %r13
jne 0xcf944
movb (%r14), %al
testb %al, %al
jne 0xcf854
xorl %eax, %eax
movzbl %al, %r13d
jmp 0xcf92c
xorl %r13d, %r13d
movzbl (%rbx), %eax
subl %eax, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %eax, %r13d
jmp 0xcf932
movq %r14, %rdi
movq %rbx, %rsi
callq 0x296a0
movl %eax, %r13d
jmp 0xcf932
|
my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov al, [rsi]
test al, al
jz loc_CF929
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_CF854:
cmp byte ptr [rbx], 0
jz loc_CF923
test al, al
js short loc_CF876
movzx eax, al
lea rax, [rax+rax*2]
mov r13d, [r12+rax*4+4]
mov [rbp+var_30], r13
inc r14
jmp short loc_CF8BD
loc_CF876:
lea rdi, [rbp+var_30]
mov rsi, r14
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz loc_CF949
mov eax, eax
add r14, rax
mov r13, [rbp+var_30]
cmp r13, [r15]
ja short loc_CF8BD
mov rax, [r15+8]
mov rcx, r13
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_CF8BD
movzx ecx, r13b
lea rcx, [rcx+rcx*2]
mov r13d, [rax+rcx*4+4]
mov [rbp+var_30], r13
loc_CF8BD:
movsx rax, byte ptr [rbx]
test rax, rax
js short loc_CF8D4
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc rbx
jmp short loc_CF911
loc_CF8D4:
lea rdi, [rbp+var_38]
mov rsi, rbx
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz short loc_CF949
mov eax, eax
add rbx, rax
mov rax, [rbp+var_38]
cmp rax, [r15]
ja short loc_CF911
mov rcx, [r15+8]
mov rdx, rax
shr rdx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_CF911
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_CF911:
cmp r13, rax
jnz short loc_CF944
mov al, [r14]
test al, al
jnz loc_CF854
xor eax, eax
loc_CF923:
movzx r13d, al
jmp short loc_CF92C
loc_CF929:
xor r13d, r13d
loc_CF92C:
movzx eax, byte ptr [rbx]
sub r13d, eax
loc_CF932:
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CF944:
sub r13d, eax
jmp short loc_CF932
loc_CF949:
mov rdi, r14
mov rsi, rbx
call _strcmp
mov r13d, eax
jmp short loc_CF932
|
long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // al
unsigned __int8 *v5; // r14
_QWORD *v6; // r15
unsigned long long v7; // r13
unsigned int v8; // eax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
unsigned int v12; // eax
long long v13; // rcx
int v14; // r13d
unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v18[6]; // [rsp+10h] [rbp-30h] BYREF
v4 = *a2;
if ( *a2 )
{
v5 = a2;
v6 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
if ( !*a3 )
goto LABEL_19;
if ( (v4 & 0x80u) != 0 )
{
v8 = my_mb_wc_utf8mb4_no_range(v18, v5);
if ( !v8 )
return (unsigned int)strcmp(v5, a3);
v5 += v8;
v7 = v18[0];
if ( v18[0] <= *v6 )
{
v9 = *(_QWORD *)(v6[1] + 8 * (v18[0] >> 8));
if ( v9 )
{
v7 = *(unsigned int *)(v9 + 12LL * LOBYTE(v18[0]) + 4);
v18[0] = v7;
}
}
}
else
{
v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1];
v18[0] = v7;
++v5;
}
v10 = (char)*a3;
if ( v10 < 0 )
{
v12 = my_mb_wc_utf8mb4_no_range(&v17, a3);
if ( !v12 )
return (unsigned int)strcmp(v5, a3);
a3 += v12;
v11 = v17;
if ( v17 <= *v6 )
{
v13 = *(_QWORD *)(v6[1] + 8 * (v17 >> 8));
if ( v13 )
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4);
}
}
else
{
v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1];
++a3;
}
if ( v7 != v11 )
return (unsigned int)(v7 - v11);
v4 = *v5;
if ( !*v5 )
{
v4 = 0;
LABEL_19:
v14 = v4;
return (unsigned int)(v14 - *a3);
}
}
}
v14 = 0;
return (unsigned int)(v14 - *a3);
}
|
my_strcasecmp_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x001cf929
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x4d8860]
LAB_001cf854:
CMP byte ptr [RBX],0x0
JZ 0x001cf923
TEST AL,AL
JS 0x001cf876
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV R13D,dword ptr [R12 + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
INC R14
JMP 0x001cf8bd
LAB_001cf876:
LEA RDI,[RBP + -0x30]
MOV RSI,R14
CALL 0x001cf3e3
TEST EAX,EAX
JZ 0x001cf949
MOV EAX,EAX
ADD R14,RAX
MOV R13,qword ptr [RBP + -0x30]
CMP R13,qword ptr [R15]
JA 0x001cf8bd
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,R13
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001cf8bd
MOVZX ECX,R13B
LEA RCX,[RCX + RCX*0x2]
MOV R13D,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
LAB_001cf8bd:
MOVSX RAX,byte ptr [RBX]
TEST RAX,RAX
JS 0x001cf8d4
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC RBX
JMP 0x001cf911
LAB_001cf8d4:
LEA RDI,[RBP + -0x38]
MOV RSI,RBX
CALL 0x001cf3e3
TEST EAX,EAX
JZ 0x001cf949
MOV EAX,EAX
ADD RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [R15]
JA 0x001cf911
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,RAX
SHR RDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001cf911
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_001cf911:
CMP R13,RAX
JNZ 0x001cf944
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x001cf854
XOR EAX,EAX
LAB_001cf923:
MOVZX R13D,AL
JMP 0x001cf92c
LAB_001cf929:
XOR R13D,R13D
LAB_001cf92c:
MOVZX EAX,byte ptr [RBX]
SUB R13D,EAX
LAB_001cf932:
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cf944:
SUB R13D,EAX
JMP 0x001cf932
LAB_001cf949:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001296a0
MOV R13D,EAX
JMP 0x001cf932
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
byte bVar4;
uint uVar5;
int iVar6;
ulong uVar7;
ulong local_40;
ulong local_38;
bVar4 = *param_2;
if (bVar4 == 0) {
uVar5 = 0;
}
else {
puVar1 = *(ulong **)(param_1 + 0x78);
do {
if (*param_3 == 0) goto LAB_001cf923;
if ((char)bVar4 < '\0') {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_38,param_2);
if (uVar5 == 0) goto LAB_001cf949;
param_2 = param_2 + uVar5;
if ((local_38 <= *puVar1) &&
(lVar2 = *(long *)(puVar1[1] + (local_38 >> 8) * 8), lVar2 != 0)) {
local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc);
}
}
else {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar4 * 0xc + 4);
param_2 = param_2 + 1;
}
uVar3 = local_38;
bVar4 = *param_3;
if ((long)(char)bVar4 < 0) {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_40,param_3);
if (uVar5 == 0) {
LAB_001cf949:
iVar6 = strcmp((char *)param_2,(char *)param_3);
return iVar6;
}
param_3 = param_3 + uVar5;
uVar7 = local_40;
if ((local_40 <= *puVar1) &&
(lVar2 = *(long *)(puVar1[1] + (local_40 >> 8) * 8), lVar2 != 0)) {
uVar7 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
}
else {
param_3 = param_3 + 1;
uVar7 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar4 * 0xc + 4);
}
if (uVar3 != uVar7) {
return (int)uVar3 - (int)uVar7;
}
bVar4 = *param_2;
} while (bVar4 != 0);
bVar4 = 0;
LAB_001cf923:
uVar5 = (uint)bVar4;
}
return uVar5 - *param_3;
}
|
|
18,669
|
ma_read_cache
|
eloqsql/storage/maria/ma_cache.c
|
my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff,
my_off_t pos, size_t length, uint flag)
{
size_t read_length,in_buff_length;
my_off_t offset;
uchar *in_buff_pos;
DBUG_ENTER("_ma_read_cache");
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
if (unlikely(pos >= info->end_of_file) && (flag & READING_HEADER))
DBUG_RETURN(-1);
if (pos < info->pos_in_file)
{
read_length=length;
if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos))
read_length=(uint) (info->pos_in_file-pos);
info->seek_not_done=1;
if (mysql_file_pread(info->file,buff,read_length,pos,MYF(MY_NABP)))
DBUG_RETURN(1);
if (!(length-=read_length))
DBUG_RETURN(0);
pos+=read_length;
buff+=read_length;
}
if (pos >= info->pos_in_file &&
(offset= (my_off_t) (pos - info->pos_in_file)) <
(my_off_t) (info->read_end - info->request_pos))
{
in_buff_pos=info->request_pos+(uint) offset;
in_buff_length= MY_MIN(length,(size_t) (info->read_end-in_buff_pos));
memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length);
if (!(length-=in_buff_length))
DBUG_RETURN(0);
pos+=in_buff_length;
buff+=in_buff_length;
}
else
in_buff_length=0;
if (flag & READING_NEXT)
{
if (pos != (info->pos_in_file +
(uint) (info->read_end - info->request_pos)))
{
info->pos_in_file=pos; /* Force start here */
info->read_pos=info->read_end=info->request_pos; /* Everything used */
info->seek_not_done=1;
}
else
info->read_pos=info->read_end; /* All block used */
if (!_my_b_read(info,buff,length))
DBUG_RETURN(0);
read_length=info->error;
}
else
{
info->seek_not_done=1;
if ((read_length=mysql_file_pread(info->file,buff,length,pos,MYF(0))) == length)
DBUG_RETURN(0);
}
if (!(flag & READING_HEADER) || (int) read_length == -1 ||
read_length+in_buff_length < 3)
{
if ((flag & READING_HEADER) && read_length + in_buff_length == 0)
DBUG_RETURN(-1); /* End of file */
DBUG_PRINT("error",
("Error %d reading next-multi-part block (Got %d of %d bytes)",
my_errno, (int) read_length, (int) length));
if (!my_errno || my_errno == HA_ERR_FILE_TOO_SHORT)
{
if (!handler->in_check_table)
_ma_set_fatal_error(handler, HA_ERR_FILE_TOO_SHORT);
if (!my_errno)
my_errno= HA_ERR_WRONG_IN_RECORD;
}
DBUG_RETURN(1);
}
bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length -
read_length);
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_read_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
jmp 0x7d5d2
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x7d60f
movl -0x34(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7d60f
jmp 0x7d606
movb $-0x1, -0x1(%rbp)
jmp 0x7d97b
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x7d6d3
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
subq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x7d64d
movq -0x18(%rbp), %rax
movq (%rax), %rax
subq -0x28(%rbp), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, 0xe0(%rax)
movq -0x18(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x28(%rbp), %r9
leaq 0xa2960(%rip), %rdi # 0x11ffd8
movl $0x38, %esi
movq $0x4, (%rsp)
callq 0x7d990
cmpq $0x0, %rax
je 0x7d69b
jmp 0x7d692
movb $0x1, -0x1(%rbp)
jmp 0x7d97b
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x7d6bb
jmp 0x7d6b2
movb $0x0, -0x1(%rbp)
jmp 0x7d97b
movq -0x40(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jb 0x7d7b9
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq 0x28(%rdx), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x7d7b9
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x58(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x7d746
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x7d759
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x58(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x50(%rbp), %rax
movl %eax, %eax
addq %rax, %rsi
movq -0x48(%rbp), %rdx
callq 0x270d0
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x7d79f
jmp 0x7d796
movb $0x0, -0x1(%rbp)
jmp 0x7d97b
movq -0x48(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x48(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x7d7c1
movq $0x0, -0x48(%rbp)
movl -0x34(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x7d86d
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq -0x18(%rbp), %rdx
movq 0x18(%rdx), %rdx
movq -0x18(%rbp), %rsi
movq 0x28(%rsi), %rsi
subq %rsi, %rdx
movl %edx, %edx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x7d82b
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0xe0(%rax)
jmp 0x7d83b
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0xb0000
cmpl $0x0, %eax
jne 0x7d85c
jmp 0x7d853
movb $0x0, -0x1(%rbp)
jmp 0x7d97b
movq -0x18(%rbp), %rax
movslq 0xe4(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x7d8c3
movq -0x18(%rbp), %rax
movl $0x1, 0xe0(%rax)
movq -0x18(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x28(%rbp), %r9
leaq 0xa2740(%rip), %rdi # 0x11ffd8
movl $0x5f, %esi
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x7d990
movq %rax, -0x40(%rbp)
cmpq -0x30(%rbp), %rax
jne 0x7d8c1
jmp 0x7d8b8
movb $0x0, -0x1(%rbp)
jmp 0x7d97b
jmp 0x7d8c3
movl -0x34(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7d8e5
movq -0x40(%rbp), %rax
cmpl $-0x1, %eax
je 0x7d8e5
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
cmpq $0x3, %rax
jae 0x7d95b
movl -0x34(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7d906
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
cmpq $0x0, %rax
jne 0x7d906
jmp 0x7d900
movb $-0x1, -0x1(%rbp)
jmp 0x7d97b
jmp 0x7d908
jmp 0x7d90a
callq 0xc0d80
cmpl $0x0, (%rax)
je 0x7d921
callq 0xc0d80
cmpl $0xaf, (%rax)
jne 0x7d953
movq -0x10(%rbp), %rax
cmpb $0x0, 0x683(%rax)
jne 0x7d93c
movq -0x10(%rbp), %rdi
movl $0xaf, %esi
callq 0x38a40
callq 0xc0d80
cmpl $0x0, (%rax)
jne 0x7d951
callq 0xc0d80
movl $0x7f, (%rax)
jmp 0x7d953
jmp 0x7d955
movb $0x1, -0x1(%rbp)
jmp 0x7d97b
movq -0x20(%rbp), %rdi
addq -0x40(%rbp), %rdi
movl $0x14, %edx
subq -0x48(%rbp), %rdx
subq -0x40(%rbp), %rdx
xorl %esi, %esi
callq 0x27310
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_read_cache:
push rbp
mov rbp, rsp
sub rsp, 70h
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
jmp short $+2
loc_7D5D2:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
cmp rax, [rcx+8]
setnb 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_7D60F
mov eax, [rbp+var_34]
and eax, 2
cmp eax, 0
jz short loc_7D60F
jmp short $+2
loc_7D606:
mov [rbp+var_1], 0FFh
jmp loc_7D97B
loc_7D60F:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
cmp rax, [rcx]
jnb loc_7D6D3
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
sub rcx, [rbp+var_28]
cmp rax, rcx
jbe short loc_7D64D
mov rax, [rbp+var_18]
mov rax, [rax]
sub rax, [rbp+var_28]
mov eax, eax
mov [rbp+var_40], rax
loc_7D64D:
mov rax, [rbp+var_18]
mov dword ptr [rax+0E0h], 1
mov rax, [rbp+var_18]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_40]
mov r9, [rbp+var_28]
lea rdi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 38h ; '8'
mov [rsp+70h+var_70], 4
call inline_mysql_file_pread_5
cmp rax, 0
jz short loc_7D69B
jmp short $+2
loc_7D692:
mov [rbp+var_1], 1
jmp loc_7D97B
loc_7D69B:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_30]
sub rax, rcx
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_7D6BB
jmp short $+2
loc_7D6B2:
mov [rbp+var_1], 0
jmp loc_7D97B
loc_7D6BB:
mov rax, [rbp+var_40]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_40]
add rax, [rbp+var_20]
mov [rbp+var_20], rax
loc_7D6D3:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
cmp rax, [rcx]
jb loc_7D7B9
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
sub rax, [rcx]
mov [rbp+var_50], rax
mov rcx, [rbp+var_18]
mov rcx, [rcx+18h]
mov rdx, [rbp+var_18]
mov rdx, [rdx+28h]
sub rcx, rdx
cmp rax, rcx
jnb loc_7D7B9
mov rax, [rbp+var_18]
mov rax, [rax+28h]
mov rcx, [rbp+var_50]
mov ecx, ecx
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
mov rcx, [rcx+18h]
mov rdx, [rbp+var_58]
sub rcx, rdx
cmp rax, rcx
jnb short loc_7D746
mov rax, [rbp+var_30]
mov [rbp+var_60], rax
jmp short loc_7D759
loc_7D746:
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov rcx, [rbp+var_58]
sub rax, rcx
mov [rbp+var_60], rax
loc_7D759:
mov rax, [rbp+var_60]
mov [rbp+var_48], rax
mov rdi, [rbp+var_20]
mov rax, [rbp+var_18]
mov rsi, [rax+28h]
mov rax, [rbp+var_50]
mov eax, eax
add rsi, rax
mov rdx, [rbp+var_48]
call _memcpy
mov rcx, [rbp+var_48]
mov rax, [rbp+var_30]
sub rax, rcx
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_7D79F
jmp short $+2
loc_7D796:
mov [rbp+var_1], 0
jmp loc_7D97B
loc_7D79F:
mov rax, [rbp+var_48]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_48]
add rax, [rbp+var_20]
mov [rbp+var_20], rax
jmp short loc_7D7C1
loc_7D7B9:
mov [rbp+var_48], 0
loc_7D7C1:
mov eax, [rbp+var_34]
and eax, 1
cmp eax, 0
jz loc_7D86D
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
mov rdx, [rbp+var_18]
mov rdx, [rdx+18h]
mov rsi, [rbp+var_18]
mov rsi, [rsi+28h]
sub rdx, rsi
mov edx, edx
add rcx, rdx
cmp rax, rcx
jz short loc_7D82B
mov rcx, [rbp+var_28]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_18]
mov rcx, [rax+28h]
mov rax, [rbp+var_18]
mov [rax+18h], rcx
mov rax, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
mov dword ptr [rax+0E0h], 1
jmp short loc_7D83B
loc_7D82B:
mov rax, [rbp+var_18]
mov rcx, [rax+18h]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
loc_7D83B:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_30]
call _my_b_read
cmp eax, 0
jnz short loc_7D85C
jmp short $+2
loc_7D853:
mov [rbp+var_1], 0
jmp loc_7D97B
loc_7D85C:
mov rax, [rbp+var_18]
movsxd rax, dword ptr [rax+0E4h]
mov [rbp+var_40], rax
jmp short loc_7D8C3
loc_7D86D:
mov rax, [rbp+var_18]
mov dword ptr [rax+0E0h], 1
mov rax, [rbp+var_18]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_30]
mov r9, [rbp+var_28]
lea rdi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5Fh ; '_'
xor eax, eax
mov [rsp+70h+var_70], 0
call inline_mysql_file_pread_5
mov [rbp+var_40], rax
cmp rax, [rbp+var_30]
jnz short loc_7D8C1
jmp short $+2
loc_7D8B8:
mov [rbp+var_1], 0
jmp loc_7D97B
loc_7D8C1:
jmp short $+2
loc_7D8C3:
mov eax, [rbp+var_34]
and eax, 2
cmp eax, 0
jz short loc_7D8E5
mov rax, [rbp+var_40]
cmp eax, 0FFFFFFFFh
jz short loc_7D8E5
mov rax, [rbp+var_40]
add rax, [rbp+var_48]
cmp rax, 3
jnb short loc_7D95B
loc_7D8E5:
mov eax, [rbp+var_34]
and eax, 2
cmp eax, 0
jz short loc_7D906
mov rax, [rbp+var_40]
add rax, [rbp+var_48]
cmp rax, 0
jnz short loc_7D906
jmp short $+2
loc_7D900:
mov [rbp+var_1], 0FFh
jmp short loc_7D97B
loc_7D906:
jmp short $+2
loc_7D908:
jmp short $+2
loc_7D90A:
call _my_thread_var
cmp dword ptr [rax], 0
jz short loc_7D921
call _my_thread_var
cmp dword ptr [rax], 0AFh
jnz short loc_7D953
loc_7D921:
mov rax, [rbp+var_10]
cmp byte ptr [rax+683h], 0
jnz short loc_7D93C
mov rdi, [rbp+var_10]
mov esi, 0AFh
call _ma_set_fatal_error
loc_7D93C:
call _my_thread_var
cmp dword ptr [rax], 0
jnz short loc_7D951
call _my_thread_var
mov dword ptr [rax], 7Fh
loc_7D951:
jmp short $+2
loc_7D953:
jmp short $+2
loc_7D955:
mov [rbp+var_1], 1
jmp short loc_7D97B
loc_7D95B:
mov rdi, [rbp+var_20]
add rdi, [rbp+var_40]
mov edx, 14h
sub rdx, [rbp+var_48]
sub rdx, [rbp+var_40]
xor esi, esi
call _memset
mov [rbp+var_1], 0
loc_7D97B:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
|
char ma_read_cache(
long long a1,
long long a2,
const char *a3,
unsigned long long a4,
unsigned long long a5,
char a6)
{
long long v6; // rcx
const char *v7; // rdi
const char *v8; // rsi
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
int v12; // r9d
unsigned long long v14; // [rsp+10h] [rbp-60h]
long long v15; // [rsp+18h] [rbp-58h]
unsigned long long v16; // [rsp+20h] [rbp-50h]
unsigned long long v17; // [rsp+28h] [rbp-48h]
unsigned long long v18; // [rsp+30h] [rbp-40h]
long long v19; // [rsp+30h] [rbp-40h]
unsigned long long v21; // [rsp+40h] [rbp-30h]
unsigned long long v22; // [rsp+48h] [rbp-28h]
const char *v23; // [rsp+50h] [rbp-20h]
v23 = a3;
v22 = a4;
v21 = a5;
if ( a4 >= *(_QWORD *)(a2 + 8) && (a6 & 2) != 0 )
return -1;
if ( a4 < *(_QWORD *)a2 )
{
v18 = a5;
if ( a5 > *(_QWORD *)a2 - a4 )
v18 = (unsigned int)(*(_DWORD *)a2 - a4);
*(_DWORD *)(a2 + 224) = 1;
if ( inline_mysql_file_pread_5(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c",
56,
*(_DWORD *)(a2 + 212),
(_DWORD)a3,
v18,
a4,
4LL) )
{
return 1;
}
v21 -= v18;
if ( !v21 )
return 0;
v22 += v18;
v23 += v18;
}
if ( v22 < *(_QWORD *)a2 || (v16 = v22 - *(_QWORD *)a2, v16 >= *(_QWORD *)(a2 + 24) - *(_QWORD *)(a2 + 40)) )
{
v17 = 0LL;
}
else
{
v15 = (unsigned int)v16 + *(_QWORD *)(a2 + 40);
if ( v21 >= *(_QWORD *)(a2 + 24) - v15 )
v14 = *(_QWORD *)(a2 + 24) - v15;
else
v14 = v21;
v17 = v14;
memcpy(v23, (unsigned int)v16 + *(_QWORD *)(a2 + 40), v14);
v21 -= v14;
if ( !v21 )
return 0;
v22 += v14;
v23 += v14;
}
if ( (a6 & 1) != 0 )
{
if ( v22 == (unsigned int)*(_QWORD *)(a2 + 24) - (unsigned int)*(_QWORD *)(a2 + 40) + *(_QWORD *)a2 )
{
*(_QWORD *)(a2 + 16) = *(_QWORD *)(a2 + 24);
}
else
{
*(_QWORD *)a2 = v22;
v6 = *(_QWORD *)(a2 + 40);
*(_QWORD *)(a2 + 24) = v6;
*(_QWORD *)(a2 + 16) = v6;
*(_DWORD *)(a2 + 224) = 1;
}
v7 = (const char *)a2;
v8 = v23;
if ( !(unsigned int)my_b_read(a2, v23, v21) )
return 0;
v19 = *(int *)(a2 + 228);
}
else
{
*(_DWORD *)(a2 + 224) = 1;
v7 = "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c";
v8 = (_BYTE *)(&qword_58 + 7);
v19 = inline_mysql_file_pread_5(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c",
95,
*(_DWORD *)(a2 + 212),
(_DWORD)v23,
v21,
v22,
0LL);
if ( v19 == v21 )
return 0;
}
if ( (a6 & 2) != 0 && (_DWORD)v19 != -1 && v17 + v19 >= 3 )
{
memset(&v23[v19], 0LL, 20 - v17 - v19);
return 0;
}
else if ( (a6 & 2) == 0 || v17 + v19 )
{
if ( !*(_DWORD *)my_thread_var(v7, v8) || *(_DWORD *)my_thread_var(v7, v8) == 175 )
{
if ( !*(_BYTE *)(a1 + 1667) )
{
v7 = (const char *)a1;
v8 = (_BYTE *)(&qword_A8 + 7);
ma_set_fatal_error((_DWORD *)a1, 175, v9, v10, v11, v12);
}
if ( !*(_DWORD *)my_thread_var(v7, v8) )
*(_DWORD *)my_thread_var(v7, v8) = 127;
}
return 1;
}
else
{
return -1;
}
}
|
_ma_read_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
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
JMP 0x0017d5d2
LAB_0017d5d2:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x8]
SETNC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0017d60f
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0017d60f
JMP 0x0017d606
LAB_0017d606:
MOV byte ptr [RBP + -0x1],0xff
JMP 0x0017d97b
LAB_0017d60f:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX]
JNC 0x0017d6d3
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
SUB RCX,qword ptr [RBP + -0x28]
CMP RAX,RCX
JBE 0x0017d64d
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x28]
MOV EAX,EAX
MOV qword ptr [RBP + -0x40],RAX
LAB_0017d64d:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x40]
MOV R9,qword ptr [RBP + -0x28]
LEA RDI,[0x21ffd8]
MOV ESI,0x38
MOV qword ptr [RSP],0x4
CALL 0x0017d990
CMP RAX,0x0
JZ 0x0017d69b
JMP 0x0017d692
LAB_0017d692:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017d97b
LAB_0017d69b:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x0017d6bb
JMP 0x0017d6b2
LAB_0017d6b2:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017d97b
LAB_0017d6bb:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
LAB_0017d6d3:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX]
JC 0x0017d7b9
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x50],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x18]
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX + 0x28]
SUB RCX,RDX
CMP RAX,RCX
JNC 0x0017d7b9
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x50]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x18]
MOV RDX,qword ptr [RBP + -0x58]
SUB RCX,RDX
CMP RAX,RCX
JNC 0x0017d746
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0017d759
LAB_0017d746:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x58]
SUB RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_0017d759:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,EAX
ADD RSI,RAX
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x001270d0
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x0017d79f
JMP 0x0017d796
LAB_0017d796:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017d97b
LAB_0017d79f:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0017d7c1
LAB_0017d7b9:
MOV qword ptr [RBP + -0x48],0x0
LAB_0017d7c1:
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0017d86d
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX + 0x18]
MOV RSI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RSI + 0x28]
SUB RDX,RSI
MOV EDX,EDX
ADD RCX,RDX
CMP RAX,RCX
JZ 0x0017d82b
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xe0],0x1
JMP 0x0017d83b
LAB_0017d82b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
LAB_0017d83b:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001b0000
CMP EAX,0x0
JNZ 0x0017d85c
JMP 0x0017d853
LAB_0017d853:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017d97b
LAB_0017d85c:
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RAX,dword ptr [RAX + 0xe4]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0017d8c3
LAB_0017d86d:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x28]
LEA RDI,[0x21ffd8]
MOV ESI,0x5f
XOR EAX,EAX
MOV qword ptr [RSP],0x0
CALL 0x0017d990
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0017d8c1
JMP 0x0017d8b8
LAB_0017d8b8:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017d97b
LAB_0017d8c1:
JMP 0x0017d8c3
LAB_0017d8c3:
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0017d8e5
MOV RAX,qword ptr [RBP + -0x40]
CMP EAX,-0x1
JZ 0x0017d8e5
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x48]
CMP RAX,0x3
JNC 0x0017d95b
LAB_0017d8e5:
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0017d906
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x48]
CMP RAX,0x0
JNZ 0x0017d906
JMP 0x0017d900
LAB_0017d900:
MOV byte ptr [RBP + -0x1],0xff
JMP 0x0017d97b
LAB_0017d906:
JMP 0x0017d908
LAB_0017d908:
JMP 0x0017d90a
LAB_0017d90a:
CALL 0x001c0d80
CMP dword ptr [RAX],0x0
JZ 0x0017d921
CALL 0x001c0d80
CMP dword ptr [RAX],0xaf
JNZ 0x0017d953
LAB_0017d921:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x683],0x0
JNZ 0x0017d93c
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xaf
CALL 0x00138a40
LAB_0017d93c:
CALL 0x001c0d80
CMP dword ptr [RAX],0x0
JNZ 0x0017d951
CALL 0x001c0d80
MOV dword ptr [RAX],0x7f
LAB_0017d951:
JMP 0x0017d953
LAB_0017d953:
JMP 0x0017d955
LAB_0017d955:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017d97b
LAB_0017d95b:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,qword ptr [RBP + -0x40]
MOV EDX,0x14
SUB RDX,qword ptr [RBP + -0x48]
SUB RDX,qword ptr [RBP + -0x40]
XOR ESI,ESI
CALL 0x00127310
MOV byte ptr [RBP + -0x1],0x0
LAB_0017d97b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1
_ma_read_cache(long param_1,ulong *param_2,void *param_3,ulong param_4,ulong param_5,uint param_6)
{
int iVar1;
long lVar2;
ulong uVar3;
int *piVar4;
int4 *puVar5;
size_t local_68;
size_t local_50;
ulong local_48;
ulong local_38;
ulong local_30;
void *local_28;
int1 local_9;
if ((param_2[1] <= param_4) && ((param_6 & 2) != 0)) {
return 0xff;
}
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
if (param_4 < *param_2) {
local_48 = param_5;
if (*param_2 - param_4 < param_5) {
local_48 = (ulong)(uint)((int)*param_2 - (int)param_4);
}
*(int4 *)(param_2 + 0x1c) = 1;
lVar2 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c",0x38,
*(int4 *)((long)param_2 + 0xd4),param_3,local_48,param_4,4);
if (lVar2 != 0) {
return 1;
}
local_38 = param_5 - local_48;
if (local_38 == 0) {
return 0;
}
local_30 = local_48 + param_4;
local_28 = (void *)(local_48 + (long)param_3);
}
if ((local_30 < *param_2) || (uVar3 = local_30 - *param_2, param_2[3] - param_2[5] <= uVar3)) {
local_50 = 0;
}
else {
lVar2 = param_2[5] + (uVar3 & 0xffffffff);
if (local_38 < param_2[3] - lVar2) {
local_68 = local_38;
}
else {
local_68 = param_2[3] - lVar2;
}
local_50 = local_68;
memcpy(local_28,(void *)(param_2[5] + (uVar3 & 0xffffffff)),local_68);
local_38 = local_38 - local_68;
if (local_38 == 0) {
return 0;
}
local_30 = local_68 + local_30;
local_28 = (void *)(local_68 + (long)local_28);
}
if ((param_6 & 1) == 0) {
*(int4 *)(param_2 + 0x1c) = 1;
local_48 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c",0x5f,
*(int4 *)((long)param_2 + 0xd4),local_28,local_38,local_30,0);
if (local_48 == local_38) {
return 0;
}
}
else {
if (local_30 == *param_2 + (ulong)(uint)((int)param_2[3] - (int)param_2[5])) {
param_2[2] = param_2[3];
}
else {
*param_2 = local_30;
param_2[3] = param_2[5];
param_2[2] = param_2[5];
*(int4 *)(param_2 + 0x1c) = 1;
}
iVar1 = _my_b_read(param_2,local_28,local_38);
if (iVar1 == 0) {
return 0;
}
local_48 = (ulong)*(int *)((long)param_2 + 0xe4);
}
if ((((param_6 & 2) == 0) || ((int)local_48 == -1)) || (local_48 + local_50 < 3)) {
if (((param_6 & 2) == 0) || (local_48 + local_50 != 0)) {
piVar4 = (int *)_my_thread_var();
if ((*piVar4 == 0) || (piVar4 = (int *)_my_thread_var(), *piVar4 == 0xaf)) {
if (*(char *)(param_1 + 0x683) == '\0') {
_ma_set_fatal_error(param_1,0xaf);
}
piVar4 = (int *)_my_thread_var();
if (*piVar4 == 0) {
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7f;
}
}
local_9 = 1;
}
else {
local_9 = 0xff;
}
}
else {
memset((void *)((long)local_28 + local_48),0,(0x14 - local_50) - local_48);
local_9 = 0;
}
return local_9;
}
|
|
18,670
|
bytes_from_bits_32
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-quants.c
|
static inline __m256i bytes_from_bits_32(const uint8_t * x) {
uint32_t x32;
memcpy(&x32, x, sizeof(uint32_t));
const __m256i shuf_mask = _mm256_set_epi64x(
0x0303030303030303, 0x0202020202020202,
0x0101010101010101, 0x0000000000000000);
__m256i bytes = _mm256_shuffle_epi8(_mm256_set1_epi32(x32), shuf_mask);
const __m256i bit_mask = _mm256_set1_epi64x(0x7fbfdfeff7fbfdfe);
bytes = _mm256_or_si256(bytes, bit_mask);
return _mm256_cmpeq_epi8(bytes, _mm256_set1_epi64x(-1));
}
|
O0
|
c
|
bytes_from_bits_32:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0x2c0, %rsp # imm = 0x2C0
movq %rdi, 0x78(%rsp)
movq 0x78(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x74(%rsp)
movabsq $0x303030303030303, %rax # imm = 0x303030303030303
movq %rax, 0x138(%rsp)
movabsq $0x202020202020202, %rax # imm = 0x202020202020202
movq %rax, 0x130(%rsp)
movabsq $0x101010101010101, %rax # imm = 0x101010101010101
movq %rax, 0x128(%rsp)
movq $0x0, 0x120(%rsp)
vmovq 0x128(%rsp), %xmm1
vmovq 0x120(%rsp), %xmm0
vpunpcklqdq %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0]
vmovq 0x138(%rsp), %xmm2
vmovq 0x130(%rsp), %xmm1
vpunpcklqdq %xmm2, %xmm1, %xmm1 # xmm1 = xmm1[0],xmm2[0]
vmovdqa %xmm1, 0x110(%rsp)
vmovdqa %xmm0, 0x100(%rsp)
vmovdqa 0x100(%rsp), %ymm0
vmovdqa %ymm0, 0x40(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0x19c(%rsp)
movl 0x19c(%rsp), %eax
movl %eax, 0x1f4(%rsp)
movl %eax, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
movl %eax, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
movl %eax, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
movl %eax, 0x1d8(%rsp)
movl 0x1dc(%rsp), %r8d
movl 0x1e0(%rsp), %edi
movl 0x1e4(%rsp), %esi
movl 0x1ec(%rsp), %edx
movl 0x1f0(%rsp), %ecx
movl 0x1f4(%rsp), %eax
vmovd 0x1d8(%rsp), %xmm0
vpinsrd $0x1, %r8d, %xmm0, %xmm0
vpinsrd $0x2, %edi, %xmm0, %xmm0
vpinsrd $0x3, %esi, %xmm0, %xmm0
vmovd 0x1e8(%rsp), %xmm1
vpinsrd $0x1, %edx, %xmm1, %xmm1
vpinsrd $0x2, %ecx, %xmm1, %xmm1
vpinsrd $0x3, %eax, %xmm1, %xmm1
vmovdqa %xmm1, 0x1b0(%rsp)
vmovdqa %xmm0, 0x1a0(%rsp)
vmovdqa 0x1a0(%rsp), %ymm1
vmovdqa 0x40(%rsp), %ymm0
vmovdqa %ymm1, 0xe0(%rsp)
vmovdqa %ymm0, 0xc0(%rsp)
vmovdqa 0xe0(%rsp), %ymm0
vmovdqa 0xc0(%rsp), %ymm1
vpshufb %ymm1, %ymm0, %ymm0
vmovdqa %ymm0, 0x20(%rsp)
movabsq $0x7fbfdfeff7fbfdfe, %rax # imm = 0x7FBFDFEFF7FBFDFE
movq %rax, 0x258(%rsp)
movq 0x258(%rsp), %rax
movq %rax, 0x2a8(%rsp)
movq %rax, 0x2a0(%rsp)
movq %rax, 0x298(%rsp)
movq %rax, 0x290(%rsp)
vmovq 0x298(%rsp), %xmm1
vmovq 0x290(%rsp), %xmm0
vpunpcklqdq %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0]
vmovq 0x2a8(%rsp), %xmm2
vmovq 0x2a0(%rsp), %xmm1
vpunpcklqdq %xmm2, %xmm1, %xmm1 # xmm1 = xmm1[0],xmm2[0]
vmovdqa %xmm1, 0x270(%rsp)
vmovdqa %xmm0, 0x260(%rsp)
vmovdqa 0x260(%rsp), %ymm0
vmovdqa %ymm0, (%rsp)
vmovdqa 0x20(%rsp), %ymm1
vmovdqa (%rsp), %ymm0
vmovdqa %ymm1, 0xa0(%rsp)
vmovdqa %ymm0, 0x80(%rsp)
vmovdqa 0xa0(%rsp), %ymm0
vmovdqa 0x80(%rsp), %ymm1
vpor %ymm1, %ymm0, %ymm0
vmovdqa %ymm0, 0x20(%rsp)
vmovdqa 0x20(%rsp), %ymm1
movq $-0x1, 0x1f8(%rsp)
movq 0x1f8(%rsp), %rax
movq %rax, 0x250(%rsp)
movq %rax, 0x248(%rsp)
movq %rax, 0x240(%rsp)
movq %rax, 0x238(%rsp)
vmovq 0x240(%rsp), %xmm2
vmovq 0x238(%rsp), %xmm0
vpunpcklqdq %xmm2, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm2[0]
vmovq 0x250(%rsp), %xmm3
vmovq 0x248(%rsp), %xmm2
vpunpcklqdq %xmm3, %xmm2, %xmm2 # xmm2 = xmm2[0],xmm3[0]
vmovdqa %xmm2, 0x210(%rsp)
vmovdqa %xmm0, 0x200(%rsp)
vmovdqa 0x200(%rsp), %ymm0
vmovdqa %ymm1, 0x160(%rsp)
vmovdqa %ymm0, 0x140(%rsp)
vmovdqa 0x160(%rsp), %ymm0
vmovdqa 0x140(%rsp), %ymm1
vpcmpeqb %ymm1, %ymm0, %k0
vpmovm2b %k0, %ymm0
movq %rbp, %rsp
popq %rbp
retq
nop
|
bytes_from_bits_32:
push rbp
mov rbp, rsp
and rsp, 0FFFFFFFFFFFFFFE0h
sub rsp, 2C0h
mov [rsp+2C0h+var_248], rdi
mov rax, [rsp+2C0h+var_248]
mov eax, [rax]
mov [rsp+2C0h+var_24C], eax
mov rax, 303030303030303h
mov [rsp+2C0h+var_188], rax
mov rax, 202020202020202h
mov [rsp+2C0h+var_190], rax
mov rax, 101010101010101h
mov [rsp+2C0h+var_198], rax
mov [rsp+2C0h+var_1A0], 0
vmovq xmm1, [rsp+2C0h+var_198]
vmovq xmm0, [rsp+2C0h+var_1A0]
vpunpcklqdq xmm0, xmm0, xmm1
vmovq xmm2, [rsp+2C0h+var_188]
vmovq xmm1, [rsp+2C0h+var_190]
vpunpcklqdq xmm1, xmm1, xmm2
vmovdqa xmmword ptr [rsp+2C0h+var_1C0+10h], xmm1
vmovdqa xmmword ptr [rsp+2C0h+var_1C0], xmm0
vmovdqa ymm0, [rsp+2C0h+var_1C0]
vmovdqa [rsp+2C0h+var_280], ymm0
mov eax, [rsp+2C0h+var_24C]
mov [rsp+2C0h+var_124], eax
mov eax, [rsp+2C0h+var_124]
mov [rsp+2C0h+var_CC], eax
mov [rsp+2C0h+var_D0], eax
mov [rsp+2C0h+var_D4], eax
mov [rsp+2C0h+var_D8], eax
mov [rsp+2C0h+var_DC], eax
mov [rsp+2C0h+var_E0], eax
mov [rsp+2C0h+var_E4], eax
mov [rsp+2C0h+var_E8], eax
mov r8d, [rsp+2C0h+var_E4]
mov edi, [rsp+2C0h+var_E0]
mov esi, [rsp+2C0h+var_DC]
mov edx, [rsp+2C0h+var_D4]
mov ecx, [rsp+2C0h+var_D0]
mov eax, [rsp+2C0h+var_CC]
vmovd xmm0, [rsp+2C0h+var_E8]
vpinsrd xmm0, xmm0, r8d, 1
vpinsrd xmm0, xmm0, edi, 2
vpinsrd xmm0, xmm0, esi, 3
vmovd xmm1, [rsp+2C0h+var_D8]
vpinsrd xmm1, xmm1, edx, 1
vpinsrd xmm1, xmm1, ecx, 2
vpinsrd xmm1, xmm1, eax, 3
vmovdqa xmmword ptr [rsp+2C0h+var_120+10h], xmm1
vmovdqa xmmword ptr [rsp+2C0h+var_120], xmm0
vmovdqa ymm1, [rsp+2C0h+var_120]
vmovdqa ymm0, [rsp+2C0h+var_280]
vmovdqa [rsp+2C0h+var_1E0], ymm1
vmovdqa [rsp+2C0h+var_200], ymm0
vmovdqa ymm0, [rsp+2C0h+var_1E0]
vmovdqa ymm1, [rsp+2C0h+var_200]
vpshufb ymm0, ymm0, ymm1
vmovdqa [rsp+2C0h+var_2A0], ymm0
mov rax, 7FBFDFEFF7FBFDFEh
mov [rsp+2C0h+var_68], rax
mov rax, [rsp+2C0h+var_68]
mov [rsp+2C0h+var_18], rax
mov [rsp+2C0h+var_20], rax
mov [rsp+2C0h+var_28], rax
mov [rsp+2C0h+var_30], rax
vmovq xmm1, [rsp+2C0h+var_28]
vmovq xmm0, [rsp+2C0h+var_30]
vpunpcklqdq xmm0, xmm0, xmm1
vmovq xmm2, [rsp+2C0h+var_18]
vmovq xmm1, [rsp+2C0h+var_20]
vpunpcklqdq xmm1, xmm1, xmm2
vmovdqa xmmword ptr [rsp+2C0h+var_60+10h], xmm1
vmovdqa xmmword ptr [rsp+2C0h+var_60], xmm0
vmovdqa ymm0, [rsp+2C0h+var_60]
vmovdqa [rsp+2C0h+var_2C0], ymm0
vmovdqa ymm1, [rsp+2C0h+var_2A0]
vmovdqa ymm0, [rsp+2C0h+var_2C0]
vmovdqa [rsp+2C0h+var_220], ymm1
vmovdqa [rsp+2C0h+var_240], ymm0
vmovdqa ymm0, [rsp+2C0h+var_220]
vmovdqa ymm1, [rsp+2C0h+var_240]
vpor ymm0, ymm0, ymm1
vmovdqa [rsp+2C0h+var_2A0], ymm0
vmovdqa ymm1, [rsp+2C0h+var_2A0]
mov [rsp+2C0h+var_C8], 0FFFFFFFFFFFFFFFFh
mov rax, [rsp+2C0h+var_C8]
mov [rsp+2C0h+var_70], rax
mov [rsp+2C0h+var_78], rax
mov [rsp+2C0h+var_80], rax
mov [rsp+2C0h+var_88], rax
vmovq xmm2, [rsp+2C0h+var_80]
vmovq xmm0, [rsp+2C0h+var_88]
vpunpcklqdq xmm0, xmm0, xmm2
vmovq xmm3, [rsp+2C0h+var_70]
vmovq xmm2, [rsp+2C0h+var_78]
vpunpcklqdq xmm2, xmm2, xmm3
vmovdqa xmmword ptr [rsp+2C0h+var_C0+10h], xmm2
vmovdqa xmmword ptr [rsp+2C0h+var_C0], xmm0
vmovdqa ymm0, [rsp+2C0h+var_C0]
vmovdqa [rsp+2C0h+var_160], ymm1
vmovdqa [rsp+2C0h+var_180], ymm0
vmovdqa ymm0, [rsp+2C0h+var_160]
vmovdqa ymm1, [rsp+2C0h+var_180]
vpcmpeqb k0, ymm0, ymm1
vpmovm2b ymm0, k0
mov rsp, rbp
pop rbp
retn
|
long long bytes_from_bits_32(int *a1)
{
long long result; // rax
long long v54; // [rsp+120h] [rbp-1A0h]
long long v55; // [rsp+128h] [rbp-198h]
long long v56; // [rsp+130h] [rbp-190h]
long long v57; // [rsp+138h] [rbp-188h]
int v61; // [rsp+1D8h] [rbp-E8h]
long long v63; // [rsp+238h] [rbp-88h]
long long v64; // [rsp+240h] [rbp-80h]
long long v65; // [rsp+248h] [rbp-78h]
long long v66; // [rsp+250h] [rbp-70h]
long long v68; // [rsp+290h] [rbp-30h]
long long v69; // [rsp+298h] [rbp-28h]
long long v70; // [rsp+2A0h] [rbp-20h]
long long v71; // [rsp+2A8h] [rbp-18h]
v57 = 0x303030303030303LL;
v56 = 0x202020202020202LL;
v55 = 0x101010101010101LL;
v54 = 0LL;
__asm
{
vmovq xmm1, [rsp+2C0h+var_198]
vmovq xmm0, [rsp+2C0h+var_1A0]
vpunpcklqdq xmm0, xmm0, xmm1
vmovq xmm2, [rsp+2C0h+var_188]
vmovq xmm1, [rsp+2C0h+var_190]
vpunpcklqdq xmm1, xmm1, xmm2
vmovdqa xmmword ptr [rsp+2C0h+var_1C0+10h], xmm1
vmovdqa xmmword ptr [rsp+2C0h+var_1C0], xmm0
vmovdqa ymm0, [rsp+2C0h+var_1C0]
vmovdqa [rsp+2C0h+var_280], ymm0
}
v61 = *a1;
__asm
{
vmovd xmm0, [rsp+2C0h+var_E8]
vpinsrd xmm0, xmm0, r8d, 1
vpinsrd xmm0, xmm0, edi, 2
vpinsrd xmm0, xmm0, esi, 3
vmovd xmm1, [rsp+2C0h+var_D8]
vpinsrd xmm1, xmm1, edx, 1
vpinsrd xmm1, xmm1, ecx, 2
vpinsrd xmm1, xmm1, eax, 3
vmovdqa xmmword ptr [rsp+2C0h+var_120+10h], xmm1
vmovdqa xmmword ptr [rsp+2C0h+var_120], xmm0
vmovdqa ymm1, [rsp+2C0h+var_120]
vmovdqa ymm0, [rsp+2C0h+var_280]
vmovdqa [rsp+2C0h+var_1E0], ymm1
vmovdqa [rsp+2C0h+var_200], ymm0
vmovdqa ymm0, [rsp+2C0h+var_1E0]
vmovdqa ymm1, [rsp+2C0h+var_200]
vpshufb ymm0, ymm0, ymm1
vmovdqa [rsp+2C0h+var_2A0], ymm0
}
v71 = 0x7FBFDFEFF7FBFDFELL;
v70 = 0x7FBFDFEFF7FBFDFELL;
v69 = 0x7FBFDFEFF7FBFDFELL;
v68 = 0x7FBFDFEFF7FBFDFELL;
__asm
{
vmovq xmm1, [rsp+2C0h+var_28]
vmovq xmm0, [rsp+2C0h+var_30]
vpunpcklqdq xmm0, xmm0, xmm1
vmovq xmm2, [rsp+2C0h+var_18]
vmovq xmm1, [rsp+2C0h+var_20]
vpunpcklqdq xmm1, xmm1, xmm2
vmovdqa xmmword ptr [rsp+2C0h+var_60+10h], xmm1
vmovdqa xmmword ptr [rsp+2C0h+var_60], xmm0
vmovdqa ymm0, [rsp+2C0h+var_60]
vmovdqa [rsp+2C0h+var_2C0], ymm0
vmovdqa ymm1, [rsp+2C0h+var_2A0]
vmovdqa ymm0, [rsp+2C0h+var_2C0]
vmovdqa [rsp+2C0h+var_220], ymm1
vmovdqa [rsp+2C0h+var_240], ymm0
vmovdqa ymm0, [rsp+2C0h+var_220]
vmovdqa ymm1, [rsp+2C0h+var_240]
vpor ymm0, ymm0, ymm1
vmovdqa [rsp+2C0h+var_2A0], ymm0
vmovdqa ymm1, [rsp+2C0h+var_2A0]
}
result = -1LL;
v66 = -1LL;
v65 = -1LL;
v64 = -1LL;
v63 = -1LL;
__asm
{
vmovq xmm2, [rsp+2C0h+var_80]
vmovq xmm0, [rsp+2C0h+var_88]
vpunpcklqdq xmm0, xmm0, xmm2
vmovq xmm3, [rsp+2C0h+var_70]
vmovq xmm2, [rsp+2C0h+var_78]
vpunpcklqdq xmm2, xmm2, xmm3
vmovdqa xmmword ptr [rsp+2C0h+var_C0+10h], xmm2
vmovdqa xmmword ptr [rsp+2C0h+var_C0], xmm0
vmovdqa ymm0, [rsp+2C0h+var_C0]
vmovdqa [rsp+2C0h+var_160], ymm1
vmovdqa [rsp+2C0h+var_180], ymm0
vmovdqa ymm0, [rsp+2C0h+var_160]
vmovdqa ymm1, [rsp+2C0h+var_180]
vpcmpeqb k0, ymm0, ymm1
vpmovm2b ymm0, k0
}
return result;
}
|
bytes_from_bits_32:
PUSH RBP
MOV RBP,RSP
AND RSP,-0x20
SUB RSP,0x2c0
MOV qword ptr [RSP + 0x78],RDI
MOV RAX,qword ptr [RSP + 0x78]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x74],EAX
MOV RAX,0x303030303030303
MOV qword ptr [RSP + 0x138],RAX
MOV RAX,0x202020202020202
MOV qword ptr [RSP + 0x130],RAX
MOV RAX,0x101010101010101
MOV qword ptr [RSP + 0x128],RAX
MOV qword ptr [RSP + 0x120],0x0
VMOVQ XMM1,qword ptr [RSP + 0x128]
VMOVQ XMM0,qword ptr [RSP + 0x120]
VPUNPCKLQDQ XMM0,XMM0,XMM1
VMOVQ XMM2,qword ptr [RSP + 0x138]
VMOVQ XMM1,qword ptr [RSP + 0x130]
VPUNPCKLQDQ XMM1,XMM1,XMM2
VMOVDQA xmmword ptr [RSP + 0x110],XMM1
VMOVDQA xmmword ptr [RSP + 0x100],XMM0
VMOVDQA YMM0,ymmword ptr [RSP + 0x100]
VMOVDQA ymmword ptr [RSP + 0x40],YMM0
MOV EAX,dword ptr [RSP + 0x74]
MOV dword ptr [RSP + 0x19c],EAX
MOV EAX,dword ptr [RSP + 0x19c]
MOV dword ptr [RSP + 0x1f4],EAX
MOV dword ptr [RSP + 0x1f0],EAX
MOV dword ptr [RSP + 0x1ec],EAX
MOV dword ptr [RSP + 0x1e8],EAX
MOV dword ptr [RSP + 0x1e4],EAX
MOV dword ptr [RSP + 0x1e0],EAX
MOV dword ptr [RSP + 0x1dc],EAX
MOV dword ptr [RSP + 0x1d8],EAX
MOV R8D,dword ptr [RSP + 0x1dc]
MOV EDI,dword ptr [RSP + 0x1e0]
MOV ESI,dword ptr [RSP + 0x1e4]
MOV EDX,dword ptr [RSP + 0x1ec]
MOV ECX,dword ptr [RSP + 0x1f0]
MOV EAX,dword ptr [RSP + 0x1f4]
VMOVD XMM0,dword ptr [RSP + 0x1d8]
VPINSRD XMM0,XMM0,R8D,0x1
VPINSRD XMM0,XMM0,EDI,0x2
VPINSRD XMM0,XMM0,ESI,0x3
VMOVD XMM1,dword ptr [RSP + 0x1e8]
VPINSRD XMM1,XMM1,EDX,0x1
VPINSRD XMM1,XMM1,ECX,0x2
VPINSRD XMM1,XMM1,EAX,0x3
VMOVDQA xmmword ptr [RSP + 0x1b0],XMM1
VMOVDQA xmmword ptr [RSP + 0x1a0],XMM0
VMOVDQA YMM1,ymmword ptr [RSP + 0x1a0]
VMOVDQA YMM0,ymmword ptr [RSP + 0x40]
VMOVDQA ymmword ptr [RSP + 0xe0],YMM1
VMOVDQA ymmword ptr [RSP + 0xc0],YMM0
VMOVDQA YMM0,ymmword ptr [RSP + 0xe0]
VMOVDQA YMM1,ymmword ptr [RSP + 0xc0]
VPSHUFB YMM0,YMM0,YMM1
VMOVDQA ymmword ptr [RSP + 0x20],YMM0
MOV RAX,0x7fbfdfeff7fbfdfe
MOV qword ptr [RSP + 0x258],RAX
MOV RAX,qword ptr [RSP + 0x258]
MOV qword ptr [RSP + 0x2a8],RAX
MOV qword ptr [RSP + 0x2a0],RAX
MOV qword ptr [RSP + 0x298],RAX
MOV qword ptr [RSP + 0x290],RAX
VMOVQ XMM1,qword ptr [RSP + 0x298]
VMOVQ XMM0,qword ptr [RSP + 0x290]
VPUNPCKLQDQ XMM0,XMM0,XMM1
VMOVQ XMM2,qword ptr [RSP + 0x2a8]
VMOVQ XMM1,qword ptr [RSP + 0x2a0]
VPUNPCKLQDQ XMM1,XMM1,XMM2
VMOVDQA xmmword ptr [RSP + 0x270],XMM1
VMOVDQA xmmword ptr [RSP + 0x260],XMM0
VMOVDQA YMM0,ymmword ptr [RSP + 0x260]
VMOVDQA ymmword ptr [RSP],YMM0
VMOVDQA YMM1,ymmword ptr [RSP + 0x20]
VMOVDQA YMM0,ymmword ptr [RSP]
VMOVDQA ymmword ptr [RSP + 0xa0],YMM1
VMOVDQA ymmword ptr [RSP + 0x80],YMM0
VMOVDQA YMM0,ymmword ptr [RSP + 0xa0]
VMOVDQA YMM1,ymmword ptr [RSP + 0x80]
VPOR YMM0,YMM0,YMM1
VMOVDQA ymmword ptr [RSP + 0x20],YMM0
VMOVDQA YMM1,ymmword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x1f8],-0x1
MOV RAX,qword ptr [RSP + 0x1f8]
MOV qword ptr [RSP + 0x250],RAX
MOV qword ptr [RSP + 0x248],RAX
MOV qword ptr [RSP + 0x240],RAX
MOV qword ptr [RSP + 0x238],RAX
VMOVQ XMM2,qword ptr [RSP + 0x240]
VMOVQ XMM0,qword ptr [RSP + 0x238]
VPUNPCKLQDQ XMM0,XMM0,XMM2
VMOVQ XMM3,qword ptr [RSP + 0x250]
VMOVQ XMM2,qword ptr [RSP + 0x248]
VPUNPCKLQDQ XMM2,XMM2,XMM3
VMOVDQA xmmword ptr [RSP + 0x210],XMM2
VMOVDQA xmmword ptr [RSP + 0x200],XMM0
VMOVDQA YMM0,ymmword ptr [RSP + 0x200]
VMOVDQA ymmword ptr [RSP + 0x160],YMM1
VMOVDQA ymmword ptr [RSP + 0x140],YMM0
VMOVDQA YMM0,ymmword ptr [RSP + 0x160]
VMOVDQA YMM1,ymmword ptr [RSP + 0x140]
VPCMPEQB K0 {K0},YMM0,YMM1
VPMOVM2B YMM0,K0
MOV RSP,RBP
POP RBP
RET
|
int8 bytes_from_bits_32(uint *param_1)
{
uint uVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [32];
ulong uVar6;
int1 auVar7 [32];
int1 auVar8 [32];
int1 auVar9 [32];
ulong in_K0;
int8 uStack_1d0;
int8 uStack_1c8;
int8 uStack_130;
int8 uStack_128;
int8 uStack_d0;
int8 uStack_c8;
int8 uStack_70;
int8 uStack_68;
uVar1 = *param_1;
auVar3 = vpunpcklqdq_avx(ZEXT816(0),ZEXT816(0x101010101010101));
auVar4 = vpunpcklqdq_avx(ZEXT816(0x202020202020202),ZEXT816(0x303030303030303));
uStack_1d0 = auVar4._0_8_;
uStack_1c8 = auVar4._8_8_;
auVar4 = vpinsrd_avx(ZEXT416(uVar1),uVar1,1);
auVar4 = vpinsrd_avx(auVar4,uVar1,2);
auVar4 = vpinsrd_avx(auVar4,uVar1,3);
auVar2 = vpinsrd_avx(ZEXT416(uVar1),uVar1,1);
auVar2 = vpinsrd_avx(auVar2,uVar1,2);
auVar2 = vpinsrd_avx(auVar2,uVar1,3);
uStack_130 = auVar2._0_8_;
uStack_128 = auVar2._8_8_;
auVar8._16_8_ = uStack_130;
auVar8._0_16_ = auVar4;
auVar8._24_8_ = uStack_128;
auVar5._16_8_ = uStack_1d0;
auVar5._0_16_ = auVar3;
auVar5._24_8_ = uStack_1c8;
auVar5 = vpshufb_avx2(auVar8,auVar5);
auVar4 = vpunpcklqdq_avx(ZEXT816(0x7fbfdfeff7fbfdfe),ZEXT816(0x7fbfdfeff7fbfdfe));
auVar2 = vpunpcklqdq_avx(ZEXT816(0x7fbfdfeff7fbfdfe),ZEXT816(0x7fbfdfeff7fbfdfe));
uStack_70 = auVar2._0_8_;
uStack_68 = auVar2._8_8_;
auVar7._16_8_ = uStack_70;
auVar7._0_16_ = auVar4;
auVar7._24_8_ = uStack_68;
auVar5 = vpor_avx2(auVar5,auVar7);
auVar4 = vpunpcklqdq_avx(ZEXT816(0xffffffffffffffff),ZEXT816(0xffffffffffffffff));
auVar2 = vpunpcklqdq_avx(ZEXT816(0xffffffffffffffff),ZEXT816(0xffffffffffffffff));
uStack_d0 = auVar2._0_8_;
uStack_c8 = auVar2._8_8_;
auVar9._16_8_ = uStack_d0;
auVar9._0_16_ = auVar4;
auVar9._24_8_ = uStack_c8;
uVar6 = vpcmpeqb_avx512vl(auVar5,auVar9);
auVar5 = vpmovm2b_avx512vl(in_K0 & 0xffffffff & uVar6);
return auVar5._0_8_;
}
|
|
18,671
|
close_cached_file
|
eloqsql/mysys/mf_cache.c
|
void close_cached_file(IO_CACHE *cache)
{
DBUG_ENTER("close_cached_file");
if (my_b_inited(cache))
{
File file=cache->file;
cache->file= -1; /* Don't flush data */
(void) end_io_cache(cache);
if (file >= 0)
{
(void) my_close(file,MYF(0));
#ifdef CANT_DELETE_OPEN_FILES
if (cache->file_name)
{
(void) my_delete(cache->file_name, MYF(MY_WME));
my_free(cache->file_name);
}
#endif
}
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
close_cached_file:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0x20(%rdi)
je 0xa8ae5
movl 0xd4(%rdi), %ebx
movl $0xffffffff, 0xd4(%rdi) # imm = 0xFFFFFFFF
callq 0x963eb
testl %ebx, %ebx
js 0xa8ae5
movl %ebx, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa0469
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
close_cached_file:
push rbp
mov rbp, rsp
push rbx
push rax
cmp qword ptr [rdi+20h], 0
jz short loc_A8AE5
mov ebx, [rdi+0D4h]
mov dword ptr [rdi+0D4h], 0FFFFFFFFh
call end_io_cache
test ebx, ebx
js short loc_A8AE5
mov edi, ebx
xor esi, esi
add rsp, 8
pop rbx
pop rbp
jmp my_close
loc_A8AE5:
add rsp, 8
pop rbx
pop rbp
retn
|
long long close_cached_file(long long a1)
{
int v1; // ebx
long long result; // rax
if ( *(_QWORD *)(a1 + 32) )
{
v1 = *(_DWORD *)(a1 + 212);
*(_DWORD *)(a1 + 212) = -1;
result = end_io_cache(a1);
if ( v1 >= 0 )
return my_close((unsigned int)v1, 0LL);
}
return result;
}
|
close_cached_file:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP qword ptr [RDI + 0x20],0x0
JZ 0x001a8ae5
MOV EBX,dword ptr [RDI + 0xd4]
MOV dword ptr [RDI + 0xd4],0xffffffff
CALL 0x001963eb
TEST EBX,EBX
JS 0x001a8ae5
MOV EDI,EBX
XOR ESI,ESI
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001a0469
LAB_001a8ae5:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void close_cached_file(long param_1)
{
int iVar1;
if (*(long *)(param_1 + 0x20) != 0) {
iVar1 = *(int *)(param_1 + 0xd4);
*(int4 *)(param_1 + 0xd4) = 0xffffffff;
end_io_cache();
if (-1 < iVar1) {
my_close(iVar1,0);
return;
}
}
return;
}
|
|
18,672
|
minja::Parser::unterminated(minja::TemplateToken const&) const
|
monkey531[P]llama/common/minja.hpp
|
std::runtime_error unterminated(const TemplateToken & token) const {
return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
}
|
O2
|
cpp
|
minja::Parser::unterminated(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x72d94
leaq 0x444d0(%rip), %rsi # 0xb68d6
leaq 0x28(%rsp), %rdi
movq %r12, %rdx
callq 0x58a46
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x57f7a
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x39627
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x24e10
leaq 0x48(%rsp), %rdi
callq 0x251b8
leaq 0x8(%rsp), %rdi
callq 0x251b8
leaq 0x28(%rsp), %rdi
callq 0x251b8
leaq 0x68(%rsp), %rdi
callq 0x251b8
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x251b8
jmp 0x72491
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x251b8
jmp 0x724a0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x251b8
jmp 0x724af
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x251b8
movq %rbx, %rdi
callq 0x24f60
nop
|
_ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE:
push r15
push r14
push r12
push rbx
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rsi, aUnterminated; "Unterminated "
lea rdi, [rsp+0A8h+var_80]
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov rsi, [r15]
mov rdx, [r14+20h]
lea rdi, [rsp+0A8h+var_A0]
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, [rsp+0A8h+var_60]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_72491
mov rbx, rax
loc_72491:
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_724A0
mov rbx, rax
loc_724A0:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_724AF
mov rbx, rax
loc_724AF:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
_BYTE v8[64]; // [rsp+68h] [rbp-40h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v8, *(unsigned int *)(a3 + 8));
std::operator+<char>((long long)v6, (long long)"Unterminated ", (long long)v8);
minja::error_location_suffix((long long)v5, *(_QWORD *)a2, *(_QWORD *)(a3 + 32));
std::operator+<char>((long long)v7, v6, v5);
std::runtime_error::runtime_error(this, v7);
std::string::~string(v7);
std::string::~string(v5);
std::string::~string(v6);
std::string::~string(v8);
return this;
}
|
unterminated:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x00172d94
LAB_001723ff:
LEA RSI,[0x1b68d6]
LEA RDI,[RSP + 0x28]
MOV RDX,R12
CALL 0x00158a46
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_0017241a:
LEA RDI,[RSP + 0x8]
CALL 0x00157f7a
LAB_00172424:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00139627
LAB_00172438:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00124e10
LAB_00172445:
LEA RDI,[RSP + 0x48]
CALL 0x001251b8
LEA RDI,[RSP + 0x8]
CALL 0x001251b8
LEA RDI,[RSP + 0x28]
CALL 0x001251b8
LEA RDI,[RSP + 0x68]
CALL 0x001251b8
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unterminated(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unterminated(TemplateToken *param_1)
{
long in_RDX;
int8 *in_RSI;
minja local_a0 [32];
string local_80 [32];
string local_60 [32];
TemplateToken local_40 [32];
TemplateToken::typeToString_abi_cxx11_(local_40,*(int4 *)(in_RDX + 8));
/* try { // try from 001723ff to 00172412 has its CatchHandler @ 001724ac */
std::operator+((char *)local_80,(string *)"Unterminated ");
/* try { // try from 0017241a to 00172423 has its CatchHandler @ 0017249d */
error_location_suffix(local_a0,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
/* try { // try from 00172424 to 00172437 has its CatchHandler @ 0017248e */
std::operator+(local_60,local_80);
/* try { // try from 00172438 to 00172444 has its CatchHandler @ 0017247f */
std::runtime_error::runtime_error((runtime_error *)param_1,local_60);
std::__cxx11::string::~string(local_60);
std::__cxx11::string::~string((string *)local_a0);
std::__cxx11::string::~string(local_80);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
|
|
18,673
|
my_connect_async
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
int
my_connect_async(MARIADB_PVIO *pvio,
const struct sockaddr *name, uint namelen, int vio_timeout)
{
int res;
size_socket s_err_size;
struct mysql_async_context *b= pvio->mysql->options.extension->async_context;
my_socket sock;
ma_pvio_get_handle(pvio, &sock);
/* Make the socket non-blocking. */
ma_pvio_blocking(pvio, 0, 0);
b->events_to_wait_for= 0;
/*
Start to connect asynchronously.
If this will block, we suspend the call and return control to the
application context. The application will then resume us when the socket
polls ready for write, indicating that the connection attempt completed.
*/
res= connect(sock, name, namelen);
if (res != 0)
{
#ifdef _WIN32
int wsa_err= WSAGetLastError();
if (wsa_err != WSAEWOULDBLOCK)
return res;
b->events_to_wait_for|= MYSQL_WAIT_EXCEPT;
#else
int err= errno;
if (err != EINPROGRESS && err != EALREADY && err != EAGAIN)
return res;
#endif
b->events_to_wait_for|= MYSQL_WAIT_WRITE;
if (vio_timeout >= 0)
{
b->timeout_value= vio_timeout;
b->events_to_wait_for|= MYSQL_WAIT_TIMEOUT;
}
else
b->timeout_value= 0;
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
if (b->events_occurred & MYSQL_WAIT_TIMEOUT)
return -1;
s_err_size= sizeof(res);
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (char*) &res, &s_err_size) != 0)
return -1;
if (res)
{
errno= res;
return -1;
}
}
return res;
}
|
O0
|
c
|
my_connect_async:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x23d20
movq -0x10(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x23790
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
movl -0x34(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x13370
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x37dbf
callq 0x13050
movl (%rax), %eax
movl %eax, -0x38(%rbp)
cmpl $0x73, -0x38(%rbp)
je 0x37cd6
cmpl $0x72, -0x38(%rbp)
je 0x37cd6
cmpl $0xb, -0x38(%rbp)
je 0x37cd6
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x37dc5
movq -0x30(%rbp), %rax
movl (%rax), %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x20(%rbp)
jl 0x37cfe
movl -0x20(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movl (%rax), %ecx
orl $0x8, %ecx
movl %ecx, (%rax)
jmp 0x37d09
movq -0x30(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x37d2b
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rsi
movl $0x1, %edi
callq *%rax
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
callq 0x3f550
movq -0x30(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x37d57
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rsi
xorl %edi, %edi
callq *%rax
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x37d6f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x37dc5
movl $0x4, -0x28(%rbp)
movl -0x34(%rbp), %edi
movl $0x1, %esi
movl $0x4, %edx
leaq -0x24(%rbp), %rcx
leaq -0x28(%rbp), %r8
callq 0x13300
cmpl $0x0, %eax
je 0x37d9e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x37dc5
cmpl $0x0, -0x24(%rbp)
je 0x37dbd
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
callq 0x13050
movl -0x3c(%rbp), %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x37dc5
jmp 0x37dbf
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
|
my_connect_async:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_20], ecx
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_34]
call ma_pvio_get_handle
mov rdi, [rbp+var_10]
xor esi, esi
xor eax, eax
mov edx, eax
call ma_pvio_blocking
mov rax, [rbp+var_30]
mov dword ptr [rax], 0
mov edi, [rbp+var_34]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
call _connect
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jz loc_37DBF
call ___errno_location
mov eax, [rax]
mov [rbp+var_38], eax
cmp [rbp+var_38], 73h ; 's'
jz short loc_37CD6
cmp [rbp+var_38], 72h ; 'r'
jz short loc_37CD6
cmp [rbp+var_38], 0Bh
jz short loc_37CD6
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp loc_37DC5
loc_37CD6:
mov rax, [rbp+var_30]
mov ecx, [rax]
or ecx, 2
mov [rax], ecx
cmp [rbp+var_20], 0
jl short loc_37CFE
mov ecx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax+10h], ecx
mov rax, [rbp+var_30]
mov ecx, [rax]
or ecx, 8
mov [rax], ecx
jmp short loc_37D09
loc_37CFE:
mov rax, [rbp+var_30]
mov dword ptr [rax+10h], 0
loc_37D09:
mov rax, [rbp+var_30]
cmp qword ptr [rax+20h], 0
jz short loc_37D2B
mov rax, [rbp+var_30]
mov rax, [rax+20h]
mov rcx, [rbp+var_30]
mov rsi, [rcx+28h]
mov edi, 1
call rax
loc_37D2B:
mov rdi, [rbp+var_30]
add rdi, 38h ; '8'
call my_context_yield
mov rax, [rbp+var_30]
cmp qword ptr [rax+20h], 0
jz short loc_37D57
mov rax, [rbp+var_30]
mov rax, [rax+20h]
mov rcx, [rbp+var_30]
mov rsi, [rcx+28h]
xor edi, edi
call rax
loc_37D57:
mov rax, [rbp+var_30]
mov eax, [rax+4]
and eax, 8
cmp eax, 0
jz short loc_37D6F
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_37DC5
loc_37D6F:
mov [rbp+var_28], 4
mov edi, [rbp+var_34]
mov esi, 1
mov edx, 4
lea rcx, [rbp+var_24]
lea r8, [rbp+var_28]
call _getsockopt
cmp eax, 0
jz short loc_37D9E
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_37DC5
loc_37D9E:
cmp [rbp+var_24], 0
jz short loc_37DBD
mov eax, [rbp+var_24]
mov [rbp+var_3C], eax
call ___errno_location
mov ecx, [rbp+var_3C]
mov [rax], ecx
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_37DC5
loc_37DBD:
jmp short $+2
loc_37DBF:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_37DC5:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long my_connect_async(long long a1, long long a2, unsigned int a3, int a4)
{
unsigned int v5; // [rsp+4h] [rbp-3Ch]
int v6; // [rsp+8h] [rbp-38h]
unsigned int v7; // [rsp+Ch] [rbp-34h] BYREF
long long v8; // [rsp+10h] [rbp-30h]
int v9; // [rsp+18h] [rbp-28h] BYREF
unsigned int v10; // [rsp+1Ch] [rbp-24h] BYREF
int v11; // [rsp+20h] [rbp-20h]
unsigned int v12; // [rsp+24h] [rbp-1Ch]
long long v13; // [rsp+28h] [rbp-18h]
long long v14; // [rsp+30h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
v8 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL);
ma_pvio_get_handle(a1, (long long)&v7);
ma_pvio_blocking(v14, 0, 0LL);
*(_DWORD *)v8 = 0;
v10 = connect(v7, v13, v12);
if ( !v10 )
return v10;
v6 = *(_DWORD *)__errno_location();
if ( v6 == 115 || v6 == 114 || v6 == 11 )
{
*(_DWORD *)v8 |= 2u;
if ( v11 < 0 )
{
*(_DWORD *)(v8 + 16) = 0;
}
else
{
*(_DWORD *)(v8 + 16) = v11;
*(_DWORD *)v8 |= 8u;
}
if ( *(_QWORD *)(v8 + 32) )
(*(void ( **)(long long, _QWORD))(v8 + 32))(1LL, *(_QWORD *)(v8 + 40));
my_context_yield(v8 + 56);
if ( *(_QWORD *)(v8 + 32) )
(*(void ( **)(_QWORD, _QWORD))(v8 + 32))(0LL, *(_QWORD *)(v8 + 40));
if ( (*(_DWORD *)(v8 + 4) & 8) != 0 )
return (unsigned int)-1;
v9 = 4;
if ( (unsigned int)getsockopt(v7, 1LL, 4LL, &v10, &v9) )
return (unsigned int)-1;
if ( v10 )
{
v5 = v10;
*(_DWORD *)__errno_location() = v5;
return (unsigned int)-1;
}
return v10;
}
return v10;
}
|
my_connect_async:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV dword ptr [RBP + -0x20],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x34]
CALL 0x00123d20
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00123790
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0x0
MOV EDI,dword ptr [RBP + -0x34]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x00113370
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00137dbf
CALL 0x00113050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
CMP dword ptr [RBP + -0x38],0x73
JZ 0x00137cd6
CMP dword ptr [RBP + -0x38],0x72
JZ 0x00137cd6
CMP dword ptr [RBP + -0x38],0xb
JZ 0x00137cd6
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00137dc5
LAB_00137cd6:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
OR ECX,0x2
MOV dword ptr [RAX],ECX
CMP dword ptr [RBP + -0x20],0x0
JL 0x00137cfe
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
OR ECX,0x8
MOV dword ptr [RAX],ECX
JMP 0x00137d09
LAB_00137cfe:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x10],0x0
LAB_00137d09:
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00137d2b
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RCX + 0x28]
MOV EDI,0x1
CALL RAX
LAB_00137d2b:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x38
CALL 0x0013f550
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00137d57
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RCX + 0x28]
XOR EDI,EDI
CALL RAX
LAB_00137d57:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x4]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00137d6f
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00137dc5
LAB_00137d6f:
MOV dword ptr [RBP + -0x28],0x4
MOV EDI,dword ptr [RBP + -0x34]
MOV ESI,0x1
MOV EDX,0x4
LEA RCX,[RBP + -0x24]
LEA R8,[RBP + -0x28]
CALL 0x00113300
CMP EAX,0x0
JZ 0x00137d9e
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00137dc5
LAB_00137d9e:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00137dbd
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x3c],EAX
CALL 0x00113050
MOV ECX,dword ptr [RBP + -0x3c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00137dc5
LAB_00137dbd:
JMP 0x00137dbf
LAB_00137dbf:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_00137dc5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int my_connect_async(long param_1,sockaddr *param_2,socklen_t param_3,uint param_4)
{
int iVar1;
int iVar2;
int *piVar3;
int local_3c;
uint *local_38;
socklen_t local_30;
int local_2c;
uint local_28;
socklen_t local_24;
sockaddr *local_20;
long local_18;
local_38 = *(uint **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28);
local_28 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
ma_pvio_get_handle(param_1,&local_3c);
ma_pvio_blocking(local_18,0,0);
*local_38 = 0;
local_2c = connect(local_3c,local_20,local_24);
if (local_2c != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
if (((iVar1 != 0x73) && (iVar1 != 0x72)) && (iVar1 != 0xb)) {
return local_2c;
}
*local_38 = *local_38 | 2;
if ((int)local_28 < 0) {
local_38[4] = 0;
}
else {
local_38[4] = local_28;
*local_38 = *local_38 | 8;
}
if (*(long *)(local_38 + 8) != 0) {
(**(code **)(local_38 + 8))(1,*(int8 *)(local_38 + 10));
}
my_context_yield(local_38 + 0xe);
if (*(long *)(local_38 + 8) != 0) {
(**(code **)(local_38 + 8))(0,*(int8 *)(local_38 + 10));
}
if ((local_38[1] & 8) != 0) {
return -1;
}
local_30 = 4;
iVar2 = getsockopt(local_3c,1,4,&local_2c,&local_30);
iVar1 = local_2c;
if (iVar2 != 0) {
return -1;
}
if (local_2c != 0) {
piVar3 = __errno_location();
*piVar3 = iVar1;
return -1;
}
}
return local_2c;
}
|
|
18,674
|
my_connect_async
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
int
my_connect_async(MARIADB_PVIO *pvio,
const struct sockaddr *name, uint namelen, int vio_timeout)
{
int res;
size_socket s_err_size;
struct mysql_async_context *b= pvio->mysql->options.extension->async_context;
my_socket sock;
ma_pvio_get_handle(pvio, &sock);
/* Make the socket non-blocking. */
ma_pvio_blocking(pvio, 0, 0);
b->events_to_wait_for= 0;
/*
Start to connect asynchronously.
If this will block, we suspend the call and return control to the
application context. The application will then resume us when the socket
polls ready for write, indicating that the connection attempt completed.
*/
res= connect(sock, name, namelen);
if (res != 0)
{
#ifdef _WIN32
int wsa_err= WSAGetLastError();
if (wsa_err != WSAEWOULDBLOCK)
return res;
b->events_to_wait_for|= MYSQL_WAIT_EXCEPT;
#else
int err= errno;
if (err != EINPROGRESS && err != EALREADY && err != EAGAIN)
return res;
#endif
b->events_to_wait_for|= MYSQL_WAIT_WRITE;
if (vio_timeout >= 0)
{
b->timeout_value= vio_timeout;
b->events_to_wait_for|= MYSQL_WAIT_TIMEOUT;
}
else
b->timeout_value= 0;
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
if (b->events_occurred & MYSQL_WAIT_TIMEOUT)
return -1;
s_err_size= sizeof(res);
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (char*) &res, &s_err_size) != 0)
return -1;
if (res)
{
errno= res;
return -1;
}
}
return res;
}
|
O3
|
c
|
my_connect_async:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, -0x30(%rbp)
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r13
movq 0x40(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %r14
leaq -0x34(%rbp), %r15
movq %r15, %rsi
callq 0x1d697
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1d3c4
movl $0x0, (%r14)
movl (%r15), %edi
xorl %r15d, %r15d
movq %r12, %rsi
movl %ebx, %edx
callq 0x133a0
movl %eax, -0x2c(%rbp)
testl %eax, %eax
je 0x28af1
movl %eax, %r12d
callq 0x13060
movq %rax, %rbx
movl (%rax), %eax
leal -0x72(%rax), %ecx
cmpl $0x2, %ecx
jb 0x28a64
movl %r12d, %r15d
cmpl $0xb, %eax
jne 0x28af1
xorl %eax, %eax
xorl %ecx, %ecx
movl -0x30(%rbp), %edx
testl %edx, %edx
setns %cl
cmovnsl %edx, %eax
shll $0x3, %ecx
orl (%r14), %ecx
orl $0x2, %ecx
movl %ecx, (%r14)
movl %eax, 0x10(%r14)
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x28a97
movq 0x28(%r14), %rsi
movl $0x1, %edi
callq *%rax
leaq 0x38(%r14), %rdi
callq 0x2d945
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x28ab1
movq 0x28(%r14), %rsi
xorl %edi, %edi
callq *%rax
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
testb $0x8, 0x4(%r14)
jne 0x28af1
leaq -0x38(%rbp), %r8
movl $0x4, (%r8)
movl -0x34(%rbp), %edi
leaq -0x2c(%rbp), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x13320
testl %eax, %eax
jne 0x28af1
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x28aee
movl %eax, (%rbx)
jmp 0x28af1
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_connect_async:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], ecx
mov ebx, edx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+40h]
mov rax, [rax+480h]
mov r14, [rax+28h]
lea r15, [rbp+var_34]
mov rsi, r15
call ma_pvio_get_handle
mov rdi, r13
xor esi, esi
xor edx, edx
call ma_pvio_blocking
mov dword ptr [r14], 0
mov edi, [r15]
xor r15d, r15d
mov rsi, r12
mov edx, ebx
call _connect
mov [rbp+var_2C], eax
test eax, eax
jz loc_28AF1
mov r12d, eax
call ___errno_location
mov rbx, rax
mov eax, [rax]
lea ecx, [rax-72h]
cmp ecx, 2
jb short loc_28A64
mov r15d, r12d
cmp eax, 0Bh
jnz loc_28AF1
loc_28A64:
xor eax, eax
xor ecx, ecx
mov edx, [rbp+var_30]
test edx, edx
setns cl
cmovns eax, edx
shl ecx, 3
or ecx, [r14]
or ecx, 2
mov [r14], ecx
mov [r14+10h], eax
mov rax, [r14+20h]
test rax, rax
jz short loc_28A97
mov rsi, [r14+28h]
mov edi, 1
call rax
loc_28A97:
lea rdi, [r14+38h]
call my_context_yield
mov rax, [r14+20h]
test rax, rax
jz short loc_28AB1
mov rsi, [r14+28h]
xor edi, edi
call rax
loc_28AB1:
mov r15d, 0FFFFFFFFh
test byte ptr [r14+4], 8
jnz short loc_28AF1
lea r8, [rbp+var_38]
mov dword ptr [r8], 4
mov edi, [rbp+var_34]
lea rcx, [rbp+var_2C]
mov esi, 1
mov edx, 4
call _getsockopt
test eax, eax
jnz short loc_28AF1
mov eax, [rbp+var_2C]
test eax, eax
jz short loc_28AEE
mov [rbx], eax
jmp short loc_28AF1
loc_28AEE:
xor r15d, r15d
loc_28AF1:
mov eax, r15d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_connect_async(long long a1, long long a2, unsigned int a3, int a4)
{
long long v5; // r14
unsigned int v6; // r15d
unsigned int v7; // eax
unsigned int v8; // r12d
unsigned int *v9; // rbx
int v10; // eax
void ( *v11)(long long, _QWORD); // rax
void ( *v12)(_QWORD, _QWORD); // rax
int v14; // [rsp+8h] [rbp-38h] BYREF
unsigned int v15; // [rsp+Ch] [rbp-34h]
int v16; // [rsp+10h] [rbp-30h]
unsigned int v17[11]; // [rsp+14h] [rbp-2Ch] BYREF
v16 = a4;
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL);
ma_pvio_get_handle(a1);
ma_pvio_blocking(a1, 0);
*(_DWORD *)v5 = 0;
v6 = 0;
v7 = connect(v15, a2, a3);
v17[0] = v7;
if ( v7 )
{
v8 = v7;
v9 = (unsigned int *)__errno_location(v15);
if ( *v9 - 114 < 2 || (v6 = v8, *v9 == 11) )
{
v10 = 0;
if ( v16 >= 0 )
v10 = v16;
*(_DWORD *)v5 |= (8 * (v16 >= 0)) | 2;
*(_DWORD *)(v5 + 16) = v10;
v11 = *(void ( **)(long long, _QWORD))(v5 + 32);
if ( v11 )
v11(1LL, *(_QWORD *)(v5 + 40));
my_context_yield(v5 + 56);
v12 = *(void ( **)(_QWORD, _QWORD))(v5 + 32);
if ( v12 )
v12(0LL, *(_QWORD *)(v5 + 40));
v6 = -1;
if ( (*(_BYTE *)(v5 + 4) & 8) == 0 )
{
v14 = 4;
if ( !(unsigned int)getsockopt(v15, 1LL, 4LL, v17, &v14) )
{
if ( v17[0] )
*v9 = v17[0];
else
return 0;
}
}
}
}
return v6;
}
|
my_connect_async:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x30],ECX
MOV EBX,EDX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV R14,qword ptr [RAX + 0x28]
LEA R15,[RBP + -0x34]
MOV RSI,R15
CALL 0x0011d697
MOV RDI,R13
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011d3c4
MOV dword ptr [R14],0x0
MOV EDI,dword ptr [R15]
XOR R15D,R15D
MOV RSI,R12
MOV EDX,EBX
CALL 0x001133a0
MOV dword ptr [RBP + -0x2c],EAX
TEST EAX,EAX
JZ 0x00128af1
MOV R12D,EAX
CALL 0x00113060
MOV RBX,RAX
MOV EAX,dword ptr [RAX]
LEA ECX,[RAX + -0x72]
CMP ECX,0x2
JC 0x00128a64
MOV R15D,R12D
CMP EAX,0xb
JNZ 0x00128af1
LAB_00128a64:
XOR EAX,EAX
XOR ECX,ECX
MOV EDX,dword ptr [RBP + -0x30]
TEST EDX,EDX
SETNS CL
CMOVNS EAX,EDX
SHL ECX,0x3
OR ECX,dword ptr [R14]
OR ECX,0x2
MOV dword ptr [R14],ECX
MOV dword ptr [R14 + 0x10],EAX
MOV RAX,qword ptr [R14 + 0x20]
TEST RAX,RAX
JZ 0x00128a97
MOV RSI,qword ptr [R14 + 0x28]
MOV EDI,0x1
CALL RAX
LAB_00128a97:
LEA RDI,[R14 + 0x38]
CALL 0x0012d945
MOV RAX,qword ptr [R14 + 0x20]
TEST RAX,RAX
JZ 0x00128ab1
MOV RSI,qword ptr [R14 + 0x28]
XOR EDI,EDI
CALL RAX
LAB_00128ab1:
MOV R15D,0xffffffff
TEST byte ptr [R14 + 0x4],0x8
JNZ 0x00128af1
LEA R8,[RBP + -0x38]
MOV dword ptr [R8],0x4
MOV EDI,dword ptr [RBP + -0x34]
LEA RCX,[RBP + -0x2c]
MOV ESI,0x1
MOV EDX,0x4
CALL 0x00113320
TEST EAX,EAX
JNZ 0x00128af1
MOV EAX,dword ptr [RBP + -0x2c]
TEST EAX,EAX
JZ 0x00128aee
MOV dword ptr [RBX],EAX
JMP 0x00128af1
LAB_00128aee:
XOR R15D,R15D
LAB_00128af1:
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_connect_async(long param_1,sockaddr *param_2,socklen_t param_3,uint param_4)
{
uint *puVar1;
int iVar2;
uint uVar3;
int *piVar4;
int iVar5;
socklen_t local_40;
int local_3c;
uint local_38;
int local_34;
puVar1 = *(uint **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28);
local_38 = param_4;
ma_pvio_get_handle(param_1,&local_3c);
ma_pvio_blocking(param_1,0,0);
*puVar1 = 0;
iVar2 = connect(local_3c,param_2,param_3);
iVar5 = 0;
if (iVar2 != 0) {
local_34 = iVar2;
piVar4 = __errno_location();
if ((*piVar4 - 0x72U < 2) || (iVar5 = iVar2, *piVar4 == 0xb)) {
uVar3 = 0;
if (-1 < (int)local_38) {
uVar3 = local_38;
}
*puVar1 = (uint)(-1 < (int)local_38) << 3 | *puVar1 | 2;
puVar1[4] = uVar3;
if (*(code **)(puVar1 + 8) != (code *)0x0) {
(**(code **)(puVar1 + 8))(1,*(int8 *)(puVar1 + 10));
}
my_context_yield(puVar1 + 0xe);
if (*(code **)(puVar1 + 8) != (code *)0x0) {
(**(code **)(puVar1 + 8))(0,*(int8 *)(puVar1 + 10));
}
iVar5 = -1;
if ((puVar1[1] & 8) == 0) {
local_40 = 4;
iVar2 = getsockopt(local_3c,1,4,&local_34,&local_40);
if (iVar2 == 0) {
if (local_34 == 0) {
iVar5 = 0;
}
else {
*piVar4 = local_34;
}
}
}
}
}
return iVar5;
}
|
|
18,675
|
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
|
monkey531[P]llama/common/minja.hpp
|
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const {
if (!callable_) throw std::runtime_error("Value is not callable: " + dump());
return (*callable_)(context, args);
}
|
O0
|
cpp
|
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const:
subq $0x98, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x20(%rsp)
addq $0x30, %rdi
callq 0x110960
testb $0x1, %al
jne 0x12fbfd
movb $0x1, 0x2b(%rsp)
movl $0x10, %edi
callq 0x59660
movq 0x20(%rsp), %rsi
movq %rax, 0x8(%rsp)
leaq 0x38(%rsp), %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x110850
jmp 0x12fb5b
leaq 0xdf477(%rip), %rsi # 0x20efd9
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0xf4e10
jmp 0x12fb73
movq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x594a0
jmp 0x12fb84
movq 0x8(%rsp), %rdi
movb $0x0, 0x2b(%rsp)
movq 0x17041b(%rip), %rsi # 0x29ffb0
movq 0x1703dc(%rip), %rdx # 0x29ff78
callq 0x59ac0
jmp 0x12fc3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x12fbe8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x12fbde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x5a4d8
leaq 0x38(%rsp), %rdi
callq 0x5a4d8
testb $0x1, 0x2b(%rsp)
jne 0x12fbf1
jmp 0x12fbfb
movq 0x8(%rsp), %rdi
callq 0x59f20
jmp 0x12fc32
movq 0x20(%rsp), %rdi
addq $0x30, %rdi
callq 0x1336f0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x133720
movq 0x18(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x59b80
nopl (%rax)
|
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE:
sub rsp, 98h
mov [rsp+98h+var_88], rdi
mov rax, rdi
mov [rsp+98h+var_80], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_20], rcx
mov rdi, [rsp+98h+var_10]
mov [rsp+98h+var_78], rdi
add rdi, 30h ; '0'
call _ZNKSt12__shared_ptrISt8functionIFN5minja5ValueERKSt10shared_ptrINS1_7ContextEERNS1_14ArgumentsValueEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz loc_12FBFD
mov [rsp+98h+var_6D], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rsi, [rsp+98h+var_78]
mov [rsp+98h+var_90], rax
lea rdi, [rsp+98h+var_60]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
jmp short $+2
loc_12FB5B:
lea rsi, aValueIsNotCall; "Value is not callable: "
lea rdi, [rsp+98h+var_40]
lea rdx, [rsp+98h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_12FB73:
mov rdi, [rsp+98h+var_90]
lea rsi, [rsp+98h+var_40]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_12FB84:
mov rdi, [rsp+98h+var_90]; void *
mov [rsp+98h+var_6D], 0
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_12FC3C
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_12FBE8
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_12FBDE
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_12FBDE:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_12FBE8:
test [rsp+arg_23], 1
jnz short loc_12FBF1
jmp short loc_12FBFB
loc_12FBF1:
mov rdi, [rsp+arg_0]; void *
call ___cxa_free_exception
loc_12FBFB:
jmp short loc_12FC32
loc_12FBFD:
mov rdi, [rsp+98h+var_78]
add rdi, 30h ; '0'
call _ZNKSt19__shared_ptr_accessISt8functionIFN5minja5ValueERKSt10shared_ptrINS1_7ContextEERNS1_14ArgumentsValueEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void)
mov rdi, [rsp+98h+var_88]
mov rsi, rax
mov rdx, [rsp+98h+var_18]
mov rcx, [rsp+98h+var_20]
call _ZNKSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEclES6_S8_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov rax, [rsp+98h+var_80]
add rsp, 98h
retn
loc_12FC32:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
loc_12FC3C:
nop dword ptr [rax+00h]
|
long long minja::Value::call(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
void *exception; // [rsp+8h] [rbp-90h]
_BYTE v7[32]; // [rsp+38h] [rbp-60h] BYREF
_BYTE v8[32]; // [rsp+58h] [rbp-40h] BYREF
long long v9; // [rsp+78h] [rbp-20h]
long long v10; // [rsp+80h] [rbp-18h]
long long v11; // [rsp+88h] [rbp-10h]
long long v12; // [rsp+90h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
if ( !std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 48)) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v8, (long long)"Value is not callable: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = std::__shared_ptr_access<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(a2 + 48);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator()(
a1,
v4,
v10,
v9);
return a1;
}
| |||
18,676
|
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
|
monkey531[P]llama/common/minja.hpp
|
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const {
if (!callable_) throw std::runtime_error("Value is not callable: " + dump());
return (*callable_)(context, args);
}
|
O3
|
cpp
|
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq 0x30(%rsi), %rsi
testq %rsi, %rsi
je 0x92aa5
cmpq $0x0, 0x10(%rsi)
je 0x92b00
movq %rdi, %rbx
callq *0x18(%rsi)
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x85792
leaq 0x5cb37(%rip), %rsi # 0xef602
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x77e59
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1adb0
xorl %ebp, %ebp
movq 0x974f7(%rip), %rsi # 0x129fe8
movq 0x97460(%rip), %rdx # 0x129f58
movq %rbx, %rdi
callq 0x1aea0
callq 0x1a300
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92b23
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92b3e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0x92b68
jmp 0x92b70
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92b68
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x92b68
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a640
movq %r14, %rdi
callq 0x1af20
|
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rsi, [rsi+30h]
test rsi, rsi
jz short loc_92AA5
cmp qword ptr [rsi+10h], 0
jz short loc_92B00
mov rbx, rdi
call qword ptr [rsi+18h]
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_92AA5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotCall; "Value is not callable: "
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_92B00:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92B23
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92B23:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92B3E
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92B3E:
test bpl, bpl
jnz short loc_92B68
jmp short loc_92B70
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92B68
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_92B68
mov r14, rax
loc_92B68:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_92B70:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::call(long long a1, long long a2)
{
long long v3; // rsi
void *exception; // rbx
_BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v7[16]; // [rsp+20h] [rbp-38h] BYREF
v3 = *(_QWORD *)(a2 + 48);
if ( !v3 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Value is not callable: ", (long long)v6);
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 *)(v3 + 16) )
std::__throw_bad_function_call();
(*(void (**)(void))(v3 + 24))();
return a1;
}
|
call:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RSI,qword ptr [RSI + 0x30]
TEST RSI,RSI
JZ 0x00192aa5
CMP qword ptr [RSI + 0x10],0x0
JZ 0x00192b00
MOV RBX,RDI
CALL qword ptr [RSI + 0x18]
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00192aa5:
MOV EDI,0x10
CALL 0x0011a430
MOV RBX,RAX
LAB_00192ab2:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00185792
LAB_00192ac4:
LEA RSI,[0x1ef602]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00177e59
MOV BPL,0x1
LAB_00192adb:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011adb0
XOR EBP,EBP
MOV RSI,qword ptr [0x00229fe8]
MOV RDX,qword ptr [0x00229f58]
MOV RDI,RBX
CALL 0x0011aea0
LAB_00192b00:
CALL 0x0011a300
|
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */
shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2)
{
long lVar1;
runtime_error *this;
int1 auStack_58 [32];
string local_38 [32];
lVar1 = *(long *)(param_2 + 0x30);
if (lVar1 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00192ab2 to 00192ac3 has its CatchHandler @ 00192b65 */
dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0));
/* try { // try from 00192ac4 to 00192ad7 has its CatchHandler @ 00192b45 */
std::operator+((char *)local_38,(string *)"Value is not callable: ");
/* try { // try from 00192adb to 00192aff has its CatchHandler @ 00192b05 */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00229fe8,PTR__runtime_error_00229f58);
}
if (*(long *)(lVar1 + 0x10) != 0) {
(**(code **)(lVar1 + 0x18))();
return param_1;
}
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
|
|
18,677
|
CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const
|
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp
|
CLI11_INLINE std::string Formatter::make_option_usage(const Option *opt) const {
// Note that these are positionals usages
std::stringstream out;
out << make_option_name(opt, true);
if(opt->get_expected_max() >= detail::expected_max_vector_size)
out << "...";
else if(opt->get_expected_max() > 1)
out << "(" << opt->get_expected() << "x)";
return opt->get_required() ? out.str() : "[" + out.str() + "]";
}
|
O0
|
cpp
|
CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %rdi, -0x238(%rbp)
movq %rdi, %rax
movq %rax, -0x230(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x9420
movq -0x228(%rbp), %rsi
leaq -0x190(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x18(%rbp), %rdx
movq (%rsi), %rax
movq 0x60(%rax), %rax
leaq -0x1c0(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0x1543f
movq -0x220(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x9550
jmp 0x15454
leaq -0x1c0(%rbp), %rdi
callq 0x9b90
movq -0x18(%rbp), %rdi
callq 0x4dbc0
cmpl $0x20000000, %eax # imm = 0x20000000
jl 0x154c4
leaq -0x190(%rbp), %rdi
leaq 0x5acf1(%rip), %rsi # 0x7016f
callq 0x95e0
jmp 0x15485
jmp 0x15527
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x1565a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x9b90
jmp 0x1565a
movq -0x18(%rbp), %rdi
callq 0x4dbc0
cmpl $0x1, %eax
jle 0x15525
leaq -0x190(%rbp), %rdi
leaq 0x5a17f(%rip), %rsi # 0x6f65f
callq 0x95e0
movq %rax, -0x240(%rbp)
jmp 0x154ee
movq -0x18(%rbp), %rdi
callq 0x4dbe0
movq -0x240(%rbp), %rdi
movl %eax, %esi
callq 0x9a50
movq %rax, -0x248(%rbp)
jmp 0x1550e
movq -0x248(%rbp), %rdi
leaq 0x5ac77(%rip), %rsi # 0x70193
callq 0x95e0
jmp 0x15523
jmp 0x15525
jmp 0x15527
movq -0x18(%rbp), %rdi
callq 0x34440
movb $0x0, -0x211(%rbp)
movb $0x0, -0x212(%rbp)
testb $0x1, %al
jne 0x15544
jmp 0x1555b
movq -0x238(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x95d0
jmp 0x15559
jmp 0x155b8
leaq -0x210(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x95d0
jmp 0x15570
movb $0x1, -0x211(%rbp)
leaq 0x5ac54(%rip), %rsi # 0x701d2
leaq -0x1f0(%rbp), %rdi
leaq -0x210(%rbp), %rdx
callq 0x1e2a0
jmp 0x15593
movq -0x238(%rbp), %rdi
movb $0x1, -0x212(%rbp)
leaq 0x5ab9c(%rip), %rdx # 0x70144
leaq -0x1f0(%rbp), %rsi
callq 0x1e250
jmp 0x155b6
jmp 0x155b8
testb $0x1, -0x212(%rbp)
jne 0x155c3
jmp 0x155cf
leaq -0x1f0(%rbp), %rdi
callq 0x9b90
testb $0x1, -0x211(%rbp)
jne 0x155da
jmp 0x155e6
leaq -0x210(%rbp), %rdi
callq 0x9b90
leaq -0x1a0(%rbp), %rdi
callq 0x9490
movq -0x230(%rbp), %rax
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x15641
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
testb $0x1, -0x212(%rbp)
jne 0x15633
jmp 0x1563f
leaq -0x1f0(%rbp), %rdi
callq 0x9b90
jmp 0x15641
testb $0x1, -0x211(%rbp)
jne 0x1564c
jmp 0x15658
leaq -0x210(%rbp), %rdi
callq 0x9b90
jmp 0x1565a
leaq -0x1a0(%rbp), %rdi
callq 0x9490
movq -0x1c8(%rbp), %rdi
callq 0x9a70
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZNK3CLI9Formatter17make_option_usageB5cxx11EPKNS_6OptionE:
push rbp
mov rbp, rsp
sub rsp, 250h
mov [rbp+var_238], rdi
mov rax, rdi
mov [rbp+var_230], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_228], rax
lea rdi, [rbp+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
mov rsi, [rbp+var_228]
lea rax, [rbp+var_190]
mov [rbp+var_220], rax
mov rdx, [rbp+var_18]
mov rax, [rsi]
mov rax, [rax+60h]
lea rdi, [rbp+var_1C0]
mov ecx, 1
call rax
jmp short $+2
loc_1543F:
mov rdi, [rbp+var_220]
lea rsi, [rbp+var_1C0]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_15454:
lea rdi, [rbp+var_1C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_18]; this
call _ZNK3CLI6Option16get_expected_maxEv; CLI::Option::get_expected_max(void)
cmp eax, 20000000h
jl short loc_154C4
lea rdi, [rbp+var_190]
lea rsi, asc_7016E+1; "..."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_15485:
jmp loc_15527
mov rcx, rax
mov eax, edx
mov [rbp+var_1C8], rcx
mov [rbp+var_1CC], eax
jmp loc_1565A
mov rcx, rax
mov eax, edx
mov [rbp+var_1C8], rcx
mov [rbp+var_1CC], eax
lea rdi, [rbp+var_1C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_1565A
loc_154C4:
mov rdi, [rbp+var_18]; this
call _ZNK3CLI6Option16get_expected_maxEv; CLI::Option::get_expected_max(void)
cmp eax, 1
jle short loc_15525
lea rdi, [rbp+var_190]
lea rsi, aFailedParsingN+16h; "("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_240], rax
jmp short $+2
loc_154EE:
mov rdi, [rbp+var_18]; this
call _ZNK3CLI6Option12get_expectedEv; CLI::Option::get_expected(void)
mov rdi, [rbp+var_240]
mov esi, eax
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_248], rax
jmp short $+2
loc_1550E:
mov rdi, [rbp+var_248]
lea rsi, asc_70193; "x)"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_15523:
jmp short $+2
loc_15525:
jmp short $+2
loc_15527:
mov rdi, [rbp+var_18]
call _ZNK3CLI10OptionBaseINS_6OptionEE12get_requiredEv; CLI::OptionBase<CLI::Option>::get_required(void)
mov [rbp+var_211], 0
mov [rbp+var_212], 0
test al, 1
jnz short loc_15544
jmp short loc_1555B
loc_15544:
mov rdi, [rbp+var_238]
lea rsi, [rbp+var_1A0]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_15559:
jmp short loc_155B8
loc_1555B:
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_1A0]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_15570:
mov [rbp+var_211], 1
lea rsi, aNotInRange+0Eh; "["
lea rdi, [rbp+var_1F0]
lea rdx, [rbp+var_210]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_15593:
mov rdi, [rbp+var_238]
mov [rbp+var_212], 1
lea rdx, aOfTheFollowing_0+26h; "]"
lea rsi, [rbp+var_1F0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_155B6:
jmp short $+2
loc_155B8:
test [rbp+var_212], 1
jnz short loc_155C3
jmp short loc_155CF
loc_155C3:
lea rdi, [rbp+var_1F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_155CF:
test [rbp+var_211], 1
jnz short loc_155DA
jmp short loc_155E6
loc_155DA:
lea rdi, [rbp+var_210]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_155E6:
lea rdi, [rbp+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, [rbp+var_230]
add rsp, 250h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_1C8], rcx
mov [rbp+var_1CC], eax
jmp short loc_15641
mov rcx, rax
mov eax, edx
mov [rbp+var_1C8], rcx
mov [rbp+var_1CC], eax
test [rbp+var_212], 1
jnz short loc_15633
jmp short loc_1563F
loc_15633:
lea rdi, [rbp+var_1F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1563F:
jmp short $+2
loc_15641:
test [rbp+var_211], 1
jnz short loc_1564C
jmp short loc_15658
loc_1564C:
lea rdi, [rbp+var_210]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_15658:
jmp short $+2
loc_1565A:
lea rdi, [rbp+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rbp+var_1C8]
call __Unwind_Resume
|
long long CLI::Formatter::make_option_usage[abi:cxx11](long long a1, long long a2, CLI::Option *a3)
{
unsigned int expected; // eax
long long v5; // [rsp+8h] [rbp-248h]
long long v6; // [rsp+10h] [rbp-240h]
char v7; // [rsp+3Eh] [rbp-212h]
char v8; // [rsp+3Fh] [rbp-211h]
_BYTE v9[32]; // [rsp+40h] [rbp-210h] BYREF
_BYTE v10[36]; // [rsp+60h] [rbp-1F0h] BYREF
_BYTE v11[32]; // [rsp+90h] [rbp-1C0h] BYREF
_BYTE v12[16]; // [rsp+B0h] [rbp-1A0h] BYREF
_BYTE v13[376]; // [rsp+C0h] [rbp-190h] BYREF
CLI::Option *v14; // [rsp+238h] [rbp-18h]
long long v15; // [rsp+240h] [rbp-10h]
long long v16; // [rsp+248h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v12);
(*(void ( **)(_BYTE *, long long, CLI::Option *, long long))(*(_QWORD *)a2 + 96LL))(v11, a2, v14, 1LL);
std::operator<<<char>(v13, v11);
std::string::~string(v11);
if ( (int)CLI::Option::get_expected_max(v14) < 0x20000000 )
{
if ( (int)CLI::Option::get_expected_max(v14) > 1 )
{
v6 = std::operator<<<std::char_traits<char>>(v13, "(");
expected = CLI::Option::get_expected(v14);
v5 = std::ostream::operator<<(v6, expected);
std::operator<<<std::char_traits<char>>(v5, "x)");
}
}
else
{
std::operator<<<std::char_traits<char>>(v13, "...");
}
v8 = 0;
v7 = 0;
if ( (CLI::OptionBase<CLI::Option>::get_required(v14) & 1) != 0 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v12);
}
else
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v9, v12);
v8 = 1;
std::operator+<char>(v10, "[", v9);
v7 = 1;
std::operator+<char>(a1, v10, "]");
}
if ( (v7 & 1) != 0 )
std::string::~string(v10);
if ( (v8 & 1) != 0 )
std::string::~string(v9);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v12);
return a1;
}
|
make_option_usage[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV qword ptr [RBP + -0x238],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x230],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x228],RAX
LEA RDI,[RBP + -0x1a0]
CALL 0x00109420
MOV RSI,qword ptr [RBP + -0x228]
LEA RAX,[RBP + -0x190]
MOV qword ptr [RBP + -0x220],RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RSI]
MOV RAX,qword ptr [RAX + 0x60]
LAB_0011542f:
LEA RDI,[RBP + -0x1c0]
MOV ECX,0x1
CALL RAX
JMP 0x0011543f
LAB_0011543f:
MOV RDI,qword ptr [RBP + -0x220]
LEA RSI,[RBP + -0x1c0]
CALL 0x00109550
JMP 0x00115454
LAB_00115454:
LEA RDI,[RBP + -0x1c0]
CALL 0x00109b90
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0014dbc0
CMP EAX,0x20000000
JL 0x001154c4
LEA RDI,[RBP + -0x190]
LAB_00115477:
LEA RSI,[0x17016f]
CALL 0x001095e0
JMP 0x00115485
LAB_00115485:
JMP 0x00115527
LAB_001154c4:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0014dbc0
CMP EAX,0x1
JLE 0x00115525
LEA RDI,[RBP + -0x190]
LEA RSI,[0x16f65f]
CALL 0x001095e0
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001154ee
LAB_001154ee:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0014dbe0
MOV RDI,qword ptr [RBP + -0x240]
MOV ESI,EAX
CALL 0x00109a50
MOV qword ptr [RBP + -0x248],RAX
JMP 0x0011550e
LAB_0011550e:
MOV RDI,qword ptr [RBP + -0x248]
LEA RSI,[0x170193]
CALL 0x001095e0
JMP 0x00115523
LAB_00115523:
JMP 0x00115525
LAB_00115525:
JMP 0x00115527
LAB_00115527:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00134440
MOV byte ptr [RBP + -0x211],0x0
MOV byte ptr [RBP + -0x212],0x0
TEST AL,0x1
JNZ 0x00115544
JMP 0x0011555b
LAB_00115544:
MOV RDI,qword ptr [RBP + -0x238]
LEA RSI,[RBP + -0x1a0]
CALL 0x001095d0
JMP 0x00115559
LAB_00115559:
JMP 0x001155b8
LAB_0011555b:
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x1a0]
CALL 0x001095d0
JMP 0x00115570
LAB_00115570:
MOV byte ptr [RBP + -0x211],0x1
LAB_00115577:
LEA RSI,[0x1701d2]
LEA RDI,[RBP + -0x1f0]
LEA RDX,[RBP + -0x210]
CALL 0x0011e2a0
JMP 0x00115593
LAB_00115593:
MOV RDI,qword ptr [RBP + -0x238]
MOV byte ptr [RBP + -0x212],0x1
LAB_001155a1:
LEA RDX,[0x170144]
LEA RSI,[RBP + -0x1f0]
CALL 0x0011e250
LAB_001155b4:
JMP 0x001155b6
LAB_001155b6:
JMP 0x001155b8
LAB_001155b8:
TEST byte ptr [RBP + -0x212],0x1
JNZ 0x001155c3
JMP 0x001155cf
LAB_001155c3:
LEA RDI,[RBP + -0x1f0]
CALL 0x00109b90
LAB_001155cf:
TEST byte ptr [RBP + -0x211],0x1
JNZ 0x001155da
JMP 0x001155e6
LAB_001155da:
LEA RDI,[RBP + -0x210]
CALL 0x00109b90
LAB_001155e6:
LEA RDI,[RBP + -0x1a0]
CALL 0x00109490
MOV RAX,qword ptr [RBP + -0x230]
ADD RSP,0x250
POP RBP
RET
|
/* CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const */
Option * CLI::Formatter::make_option_usage_abi_cxx11_(Option *param_1)
{
int iVar1;
ostream *poVar2;
ulong uVar3;
Option *in_RDX;
long *in_RSI;
string local_218 [32];
string local_1f8 [48];
string local_1c8 [32];
stringstream local_1a8 [16];
ostream local_198 [376];
Option *local_20;
Option *local_10;
local_20 = in_RDX;
local_10 = param_1;
std::__cxx11::stringstream::stringstream(local_1a8);
/* try { // try from 0011542f to 0011543c has its CatchHandler @ 0011548a */
(**(code **)(*in_RSI + 0x60))(local_1c8,in_RSI,local_20,1);
/* try { // try from 0011543f to 00115451 has its CatchHandler @ 001154a1 */
std::operator<<(local_198,local_1c8);
std::__cxx11::string::~string(local_1c8);
iVar1 = Option::get_expected_max(local_20);
if (iVar1 < 0x20000000) {
iVar1 = Option::get_expected_max(local_20);
if (1 < iVar1) {
poVar2 = std::operator<<(local_198,"(");
iVar1 = Option::get_expected(local_20);
poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1);
std::operator<<(poVar2,"x)");
}
}
else {
/* try { // try from 00115477 to 0011556d has its CatchHandler @ 0011548a */
std::operator<<(local_198,"...");
}
uVar3 = OptionBase<CLI::Option>::get_required((OptionBase<CLI::Option> *)local_20);
if ((uVar3 & 1) == 0) {
std::__cxx11::stringstream::str();
/* try { // try from 00115577 to 00115590 has its CatchHandler @ 00115602 */
std::operator+((char *)local_1f8,(string *)0x1701d2);
/* try { // try from 001155a1 to 001155b3 has its CatchHandler @ 00115616 */
std::operator+((string *)param_1,(char *)local_1f8);
std::__cxx11::string::~string(local_1f8);
std::__cxx11::string::~string(local_218);
}
else {
std::__cxx11::stringstream::str();
}
std::__cxx11::stringstream::~stringstream(local_1a8);
return param_1;
}
|
|
18,678
|
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&)
|
ng-log[P]ng-log/src/logging.cc
|
void LogFileObject::FlushUnlocked(
const std::chrono::system_clock::time_point& now) {
if (file_ != nullptr) {
fflush(file_.get());
bytes_since_flush_ = 0;
}
// Figure out when we are due for another flush.
next_flush_time_ =
now + std::chrono::duration_cast<std::chrono::system_clock::duration>(
std::chrono::duration<int32>{FLAGS_logbufsecs});
}
|
O0
|
cpp
|
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x98, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1a0d0
testb $0x1, %al
jne 0x157de
jmp 0x15804
movq -0x30(%rbp), %rdi
addq $0x98, %rdi
callq 0x19c50
movq %rax, %rdi
callq 0x98b0
movq -0x30(%rbp), %rax
movl $0x0, 0xa4(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x24(%rbp), %rdi
leaq 0x5b3d1(%rip), %rsi # 0x70be8
callq 0x19f80
leaq -0x24(%rbp), %rdi
callq 0x1a150
movq -0x38(%rbp), %rdi
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x1a100
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, 0xb8(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN5nglog12_GLOBAL__N_113LogFileObject13FlushUnlockedERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEE:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_30], rdi
add rdi, 98h
xor eax, eax
mov esi, eax
call _ZStneI8_IO_FILESt14default_deleteIS0_EEbRKSt10unique_ptrIT_T0_EDn; std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>(std::unique_ptr<_IO_FILE> const&,decltype(nullptr))
test al, 1
jnz short loc_157DE
jmp short loc_15804
loc_157DE:
mov rdi, [rbp+var_30]
add rdi, 98h
call _ZNKSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EE3getEv; std::unique_ptr<_IO_FILE>::get(void)
mov rdi, rax
call _fflush
mov rax, [rbp+var_30]
mov dword ptr [rax+0A4h], 0
loc_15804:
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
lea rdi, [rbp+var_24]
lea rsi, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs
call _ZNSt6chrono8durationIiSt5ratioILl1ELl1EEEC2IivEERKT_; std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(int const&)
lea rdi, [rbp+var_24]
call _ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000000000EEEEiS2_ILl1ELl1EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE
mov rdi, [rbp+var_38]
mov [rbp+var_20], rax
lea rsi, [rbp+var_20]
call _ZNSt6chronoplINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEElS5_EENS_10time_pointIT_NSt11common_typeIJT0_NS3_IT1_T2_EEEE4typeEEERKNS7_IS8_SA_EERKSD_; std::chrono::operator+<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,long,std::ratio<1l,1000000000l>>(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::duration<long,std::ratio<1l,1000000000l>> const&)
mov rcx, rax
mov rax, [rbp+var_30]
mov [rbp+var_18], rcx
mov rcx, [rbp+var_18]
mov [rax+0B8h], rcx
add rsp, 40h
pop rbp
retn
|
long long nglog::`anonymous namespace'::LogFileObject::FlushUnlocked(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
long long result; // rax
long long v5; // [rsp+8h] [rbp-38h]
_BYTE v6[4]; // [rsp+1Ch] [rbp-24h] BYREF
long long v7; // [rsp+20h] [rbp-20h] BYREF
long long v8; // [rsp+30h] [rbp-10h]
long long v9; // [rsp+38h] [rbp-8h]
v9 = a1;
v8 = a2;
if ( (std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>(a1 + 152, 0LL) & 1) != 0 )
{
v2 = std::unique_ptr<_IO_FILE>::get(a1 + 152);
fflush(v2);
*(_DWORD *)(a1 + 164) = 0;
}
v5 = v8;
std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(v6, &fLI::FLAGS_logbufsecs);
v7 = std::chrono::duration_cast<std::chrono::duration<long,std::ratio<1l,1000000000l>>,int,std::ratio<1l,1l>>(v6);
v3 = std::chrono::operator+<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,long,std::ratio<1l,1000000000l>>(
v5,
&v7);
result = a1;
*(_QWORD *)(a1 + 184) = v3;
return result;
}
|
FlushUnlocked:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RDI
ADD RDI,0x98
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0011a0d0
TEST AL,0x1
JNZ 0x001157de
JMP 0x00115804
LAB_001157de:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x98
CALL 0x00119c50
MOV RDI,RAX
CALL 0x001098b0
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0xa4],0x0
LAB_00115804:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x24]
LEA RSI,[0x170be8]
CALL 0x00119f80
LEA RDI,[RBP + -0x24]
CALL 0x0011a150
MOV RDI,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
LEA RSI,[RBP + -0x20]
CALL 0x0011a100
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xb8],RCX
ADD RSP,0x40
POP RBP
RET
|
/* nglog::(anonymous
namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) */
void __thiscall
nglog::(anonymous_namespace)::LogFileObject::FlushUnlocked(LogFileObject *this,time_point *param_1)
{
time_point *ptVar1;
bool bVar2;
FILE *__stream;
int8 uVar3;
duration<int,std::ratio<1l,1l>> local_2c [4];
int8 local_28 [2];
time_point *local_18;
LogFileObject *local_10;
local_18 = param_1;
local_10 = this;
bVar2 = std::operator!=((unique_ptr *)(this + 0x98),(_func_decltype_nullptr *)0x0);
if (bVar2) {
__stream = (FILE *)std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::get
((unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>> *)
(this + 0x98));
fflush(__stream);
*(int4 *)(this + 0xa4) = 0;
}
ptVar1 = local_18;
std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(local_2c,&fLI::FLAGS_logbufsecs);
local_28[0] = std::chrono::
duration_cast<std::chrono::duration<long,std::ratio<1l,1000000000l>>,int,std::ratio<1l,1l>>
((duration *)local_2c);
uVar3 = std::chrono::operator+(ptVar1,(duration *)local_28);
*(int8 *)(this + 0xb8) = uVar3;
return;
}
|
|
18,679
|
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&)
|
ng-log[P]ng-log/src/logging.cc
|
void LogFileObject::FlushUnlocked(
const std::chrono::system_clock::time_point& now) {
if (file_ != nullptr) {
fflush(file_.get());
bytes_since_flush_ = 0;
}
// Figure out when we are due for another flush.
next_flush_time_ =
now + std::chrono::duration_cast<std::chrono::system_clock::duration>(
std::chrono::duration<int32>{FLAGS_logbufsecs});
}
|
O2
|
cpp
|
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0xd55e
callq 0x76c0
andl $0x0, 0xa4(%rbx)
leaq 0x214d3(%rip), %rax # 0x2ea38
movslq (%rax), %rax
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
addq (%r14), %rax
movq %rax, 0xb8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN5nglog12_GLOBAL__N_113LogFileObject13FlushUnlockedERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+98h]
test rdi, rdi
jz short loc_D55E
call _fflush
and dword ptr [rbx+0A4h], 0
loc_D55E:
lea rax, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs
movsxd rax, dword ptr [rax]
imul rax, 3B9ACA00h
add rax, [r14]
mov [rbx+0B8h], rax
add rsp, 8
pop rbx
pop r14
retn
|
long long nglog::`anonymous namespace'::LogFileObject::FlushUnlocked(long long a1, _QWORD *a2)
{
long long v3; // rdi
long long result; // rax
v3 = *(_QWORD *)(a1 + 152);
if ( v3 )
{
fflush(v3);
*(_DWORD *)(a1 + 164) = 0;
}
result = *a2 + 1000000000LL * fLI::FLAGS_logbufsecs;
*(_QWORD *)(a1 + 184) = result;
return result;
}
|
FlushUnlocked:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x98]
TEST RDI,RDI
JZ 0x0010d55e
CALL 0x001076c0
AND dword ptr [RBX + 0xa4],0x0
LAB_0010d55e:
LEA RAX,[0x12ea38]
MOVSXD RAX,dword ptr [RAX]
IMUL RAX,RAX,0x3b9aca00
ADD RAX,qword ptr [R14]
MOV qword ptr [RBX + 0xb8],RAX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* nglog::(anonymous
namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) */
void __thiscall
nglog::(anonymous_namespace)::LogFileObject::FlushUnlocked(LogFileObject *this,time_point *param_1)
{
if (*(FILE **)(this + 0x98) != (FILE *)0x0) {
fflush(*(FILE **)(this + 0x98));
*(int4 *)(this + 0xa4) = 0;
}
*(long *)(this + 0xb8) = (long)fLI::FLAGS_logbufsecs * 1000000000 + *(long *)param_1;
return;
}
|
|
18,680
|
read_block_secondary
|
eloqsql/mysys/mf_keycache.c
|
static void read_block_secondary(SIMPLE_KEY_CACHE_CB *keycache,
BLOCK_LINK *block)
{
KEYCACHE_THREAD_TRACE("read_block_secondary");
/*
This code is executed only by threads that submitted secondary
requests. At this point it could happen that the cache block is
not yet assigned to the hash_link for the requested file block.
But at awake from the wait this should be the case. Unfortunately
we cannot assert this here because we do not know the hash_link
for the requested file block nor the file and position. So we have
to assert this in the caller.
*/
KEYCACHE_DBUG_PRINT("read_block_secondary",
("secondary request waiting for new page to be read"));
wait_on_queue(&block->wqueue[COND_FOR_REQUESTED], &keycache->cache_lock);
KEYCACHE_DBUG_PRINT("read_block_secondary",
("secondary request: new page in cache"));
DBUG_ASSERT(keycache->can_be_used);
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
}
|
O0
|
c
|
read_block_secondary:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x71ce2
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0x711c0
jmp 0x71cfc
jmp 0x71cfe
jmp 0x71d00
jmp 0x71d02
jmp 0x71d04
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
read_block_secondary:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_71CE2:
mov rdi, [rbp+var_10]
add rdi, 28h ; '('
mov rsi, [rbp+var_8]
add rsi, 0C0h
call wait_on_queue
jmp short $+2
loc_71CFC:
jmp short $+2
loc_71CFE:
jmp short $+2
loc_71D00:
jmp short $+2
loc_71D02:
jmp short $+2
loc_71D04:
add rsp, 10h
pop rbp
retn
|
long long read_block_secondary(long long a1, long long a2)
{
return wait_on_queue((long long *)(a2 + 40), (const char *)(a1 + 192));
}
|
read_block_secondary:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00171ce2
LAB_00171ce2:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001711c0
JMP 0x00171cfc
LAB_00171cfc:
JMP 0x00171cfe
LAB_00171cfe:
JMP 0x00171d00
LAB_00171d00:
JMP 0x00171d02
LAB_00171d02:
JMP 0x00171d04
LAB_00171d04:
ADD RSP,0x10
POP RBP
RET
|
void read_block_secondary(long param_1,long param_2)
{
wait_on_queue(param_2 + 0x28,param_1 + 0xc0);
return;
}
|
|
18,681
|
js_resolve_export_throw_error
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_resolve_export_throw_error(JSContext *ctx,
JSResolveResultEnum res,
JSModuleDef *m, JSAtom export_name)
{
char buf1[ATOM_GET_STR_BUF_SIZE];
char buf2[ATOM_GET_STR_BUF_SIZE];
switch(res) {
case JS_RESOLVE_RES_EXCEPTION:
break;
default:
case JS_RESOLVE_RES_NOT_FOUND:
JS_ThrowSyntaxError(ctx, "Could not find export '%s' in module '%s'",
JS_AtomGetStr(ctx, buf1, sizeof(buf1), export_name),
JS_AtomGetStr(ctx, buf2, sizeof(buf2), m->module_name));
break;
case JS_RESOLVE_RES_CIRCULAR:
JS_ThrowSyntaxError(ctx, "circular reference when looking for export '%s' in module '%s'",
JS_AtomGetStr(ctx, buf1, sizeof(buf1), export_name),
JS_AtomGetStr(ctx, buf2, sizeof(buf2), m->module_name));
break;
case JS_RESOLVE_RES_AMBIGUOUS:
JS_ThrowSyntaxError(ctx, "export '%s' in module '%s' is ambiguous",
JS_AtomGetStr(ctx, buf1, sizeof(buf1), export_name),
JS_AtomGetStr(ctx, buf2, sizeof(buf2), m->module_name));
break;
}
}
|
O0
|
c
|
js_resolve_export_throw_error:
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x110(%rsp)
movl %esi, 0x10c(%rsp)
movq %rdx, 0x100(%rsp)
movl %ecx, 0xfc(%rsp)
movl 0x10c(%rsp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, 0x38(%rsp)
subl $0x4, %eax
ja 0x79a24
movq 0x38(%rsp), %rax
leaq 0x977de(%rip), %rcx # 0x1111f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x79b9b
jmp 0x79a26
movq 0x110(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x110(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl 0xfc(%rsp), %ecx
movl $0x40, %edx
callq 0x58df0
movq %rax, 0x30(%rsp)
movq 0x110(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq 0x100(%rsp), %rax
movl 0x4(%rax), %ecx
movl $0x40, %edx
callq 0x58df0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq %rax, %rcx
leaq 0x9af26(%rip), %rsi # 0x1149b5
movb $0x0, %al
callq 0x33500
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
jmp 0x79b9b
movq 0x110(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x110(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl 0xfc(%rsp), %ecx
movl $0x40, %edx
callq 0x58df0
movq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq 0x100(%rsp), %rax
movl 0x4(%rax), %ecx
movl $0x40, %edx
callq 0x58df0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
leaq 0x9aed1(%rip), %rsi # 0x1149df
movb $0x0, %al
callq 0x33500
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
jmp 0x79b9b
movq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x110(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl 0xfc(%rsp), %ecx
movl $0x40, %edx
callq 0x58df0
movq %rax, 0x10(%rsp)
movq 0x110(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq 0x100(%rsp), %rax
movl 0x4(%rax), %ecx
movl $0x40, %edx
callq 0x58df0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
leaq 0x9ae94(%rip), %rsi # 0x114a1e
movb $0x0, %al
callq 0x33500
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
addq $0x118, %rsp # imm = 0x118
retq
nopw %cs:(%rax,%rax)
|
js_resolve_export_throw_error:
sub rsp, 118h
mov [rsp+118h+var_8], rdi
mov [rsp+118h+var_C], esi
mov [rsp+118h+var_18], rdx
mov [rsp+118h+var_1C], ecx
mov eax, [rsp+118h+var_C]
inc eax; switch 5 cases
mov ecx, eax
mov [rsp+118h+var_E0], rcx
sub eax, 4
ja short def_79A1D; jumptable 0000000000079A1D default case, case 0
mov rax, [rsp+118h+var_E0]
lea rcx, jpt_79A1D
movsxd rax, ds:(jpt_79A1D - 1111F4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_79A1F:
jmp loc_79B9B; jumptable 0000000000079A1D case -1
def_79A1D:
jmp short $+2; jumptable 0000000000079A1D default case, case 0
loc_79A26:
mov rax, [rsp+118h+var_8]; jumptable 0000000000079A1D case 1
mov [rsp+118h+var_F0], rax
mov rdi, [rsp+118h+var_8]
lea rsi, [rsp+118h+var_68]
mov ecx, [rsp+118h+var_1C]
mov edx, 40h ; '@'
call JS_AtomGetStr
mov [rsp+118h+var_E8], rax
mov rdi, [rsp+118h+var_8]
lea rsi, [rsp+118h+var_A8]
mov rax, [rsp+118h+var_18]
mov ecx, [rax+4]
mov edx, 40h ; '@'
call JS_AtomGetStr
mov rdi, [rsp+118h+var_F0]
mov rdx, [rsp+118h+var_E8]
mov rcx, rax
lea rsi, aCouldNotFindEx; "Could not find export '%s' in module '%"...
mov al, 0
call JS_ThrowSyntaxError
mov [rsp+118h+var_B8], rax
mov [rsp+118h+var_B0], rdx
jmp loc_79B9B
loc_79AA5:
mov rax, [rsp+118h+var_8]; jumptable 0000000000079A1D case 2
mov [rsp+118h+var_100], rax
mov rdi, [rsp+118h+var_8]
lea rsi, [rsp+118h+var_68]
mov ecx, [rsp+118h+var_1C]
mov edx, 40h ; '@'
call JS_AtomGetStr
mov [rsp+118h+var_F8], rax
mov rdi, [rsp+118h+var_8]
lea rsi, [rsp+118h+var_A8]
mov rax, [rsp+118h+var_18]
mov ecx, [rax+4]
mov edx, 40h ; '@'
call JS_AtomGetStr
mov rdi, [rsp+118h+var_100]
mov rdx, [rsp+118h+var_F8]
mov rcx, rax
lea rsi, aCircularRefere_0; "circular reference when looking for exp"...
mov al, 0
call JS_ThrowSyntaxError
mov [rsp+118h+var_C8], rax
mov [rsp+118h+var_C0], rdx
jmp short loc_79B9B
loc_79B21:
mov rax, [rsp+118h+var_8]; jumptable 0000000000079A1D case 3
mov [rsp+118h+var_110], rax
mov rdi, [rsp+118h+var_8]
lea rsi, [rsp+118h+var_68]
mov ecx, [rsp+118h+var_1C]
mov edx, 40h ; '@'
call JS_AtomGetStr
mov [rsp+118h+var_108], rax
mov rdi, [rsp+118h+var_8]
lea rsi, [rsp+118h+var_A8]
mov rax, [rsp+118h+var_18]
mov ecx, [rax+4]
mov edx, 40h ; '@'
call JS_AtomGetStr
mov rdi, [rsp+118h+var_110]
mov rdx, [rsp+118h+var_108]
mov rcx, rax
lea rsi, aExportSInModul; "export '%s' in module '%s' is ambiguous"
mov al, 0
call JS_ThrowSyntaxError
mov [rsp+118h+var_D8], rax
mov [rsp+118h+var_D0], rdx
loc_79B9B:
add rsp, 118h
retn
|
long long js_resolve_export_throw_error(
long long a1,
int a2,
long long a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long result; // rax
_BYTE *v13; // rax
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
_BYTE *v18; // rax
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
_BYTE *v23; // rax
long long v24; // r8
long long v25; // r9
__m128 v26; // xmm4
__m128 v27; // xmm5
char v28; // [rsp+0h] [rbp-118h]
long long v29; // [rsp+8h] [rbp-110h]
_BYTE *v30; // [rsp+10h] [rbp-108h]
long long v31; // [rsp+18h] [rbp-100h]
_BYTE *Str; // [rsp+20h] [rbp-F8h]
long long v33; // [rsp+28h] [rbp-F0h]
_BYTE *v34; // [rsp+30h] [rbp-E8h]
_BYTE v35[64]; // [rsp+70h] [rbp-A8h] BYREF
_BYTE v36[76]; // [rsp+B0h] [rbp-68h] BYREF
unsigned int v37; // [rsp+FCh] [rbp-1Ch]
long long v38; // [rsp+100h] [rbp-18h]
int v39; // [rsp+10Ch] [rbp-Ch]
long long v40; // [rsp+110h] [rbp-8h]
v40 = a1;
v39 = a2;
v38 = a3;
v37 = a4;
result = (unsigned int)(a2 + 1);
switch ( a2 )
{
case -1:
return result;
case 2:
v31 = v40;
Str = JS_AtomGetStr(v40, v36, 64, v37);
v18 = JS_AtomGetStr(v40, v35, 64, *(_DWORD *)(v38 + 4));
result = JS_ThrowSyntaxError(
v31,
(long long)"circular reference when looking for export '%s' in module '%s'",
(long long)Str,
(long long)v18,
v19,
v20,
a5,
a6,
a7,
a8,
v21,
v22,
a11,
a12,
v28);
break;
case 3:
v29 = v40;
v30 = JS_AtomGetStr(v40, v36, 64, v37);
v23 = JS_AtomGetStr(v40, v35, 64, *(_DWORD *)(v38 + 4));
result = JS_ThrowSyntaxError(
v29,
(long long)"export '%s' in module '%s' is ambiguous",
(long long)v30,
(long long)v23,
v24,
v25,
a5,
a6,
a7,
a8,
v26,
v27,
a11,
a12,
v28);
break;
default:
v33 = v40;
v34 = JS_AtomGetStr(v40, v36, 64, v37);
v13 = JS_AtomGetStr(v40, v35, 64, *(_DWORD *)(v38 + 4));
result = JS_ThrowSyntaxError(
v33,
(long long)"Could not find export '%s' in module '%s'",
(long long)v34,
(long long)v13,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
v28);
break;
}
return result;
}
|
js_resolve_export_throw_error:
SUB RSP,0x118
MOV qword ptr [RSP + 0x110],RDI
MOV dword ptr [RSP + 0x10c],ESI
MOV qword ptr [RSP + 0x100],RDX
MOV dword ptr [RSP + 0xfc],ECX
MOV EAX,dword ptr [RSP + 0x10c]
INC EAX
MOV ECX,EAX
MOV qword ptr [RSP + 0x38],RCX
SUB EAX,0x4
JA 0x00179a24
MOV RAX,qword ptr [RSP + 0x38]
LEA RCX,[0x2111f4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_ffffffff:
JMP 0x00179b9b
caseD_0:
JMP 0x00179a26
caseD_1:
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x110]
LEA RSI,[RSP + 0xb0]
MOV ECX,dword ptr [RSP + 0xfc]
MOV EDX,0x40
CALL 0x00158df0
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x110]
LEA RSI,[RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x100]
MOV ECX,dword ptr [RAX + 0x4]
MOV EDX,0x40
CALL 0x00158df0
MOV RDI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV RCX,RAX
LEA RSI,[0x2149b5]
MOV AL,0x0
CALL 0x00133500
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x68],RDX
JMP 0x00179b9b
caseD_2:
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x110]
LEA RSI,[RSP + 0xb0]
MOV ECX,dword ptr [RSP + 0xfc]
MOV EDX,0x40
CALL 0x00158df0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x110]
LEA RSI,[RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x100]
MOV ECX,dword ptr [RAX + 0x4]
MOV EDX,0x40
CALL 0x00158df0
MOV RDI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,RAX
LEA RSI,[0x2149df]
MOV AL,0x0
CALL 0x00133500
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
JMP 0x00179b9b
caseD_3:
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x110]
LEA RSI,[RSP + 0xb0]
MOV ECX,dword ptr [RSP + 0xfc]
MOV EDX,0x40
CALL 0x00158df0
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x110]
LEA RSI,[RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x100]
MOV ECX,dword ptr [RAX + 0x4]
MOV EDX,0x40
CALL 0x00158df0
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,RAX
LEA RSI,[0x214a1e]
MOV AL,0x0
CALL 0x00133500
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
LAB_00179b9b:
ADD RSP,0x118
RET
|
void js_resolve_export_throw_error
(int8 param_1,int4 param_2,long param_3,int4 param_4)
{
int8 uVar1;
int8 uVar2;
int1 local_a8 [64];
int1 local_68 [76];
int4 local_1c;
long local_18;
int4 local_c;
int8 local_8;
local_1c = param_4;
local_18 = param_3;
local_c = param_2;
local_8 = param_1;
switch(param_2) {
default:
case 1:
uVar1 = JS_AtomGetStr(param_1,local_68,0x40,param_4);
uVar2 = JS_AtomGetStr(local_8,local_a8,0x40,*(int4 *)(local_18 + 4));
JS_ThrowSyntaxError(param_1,"Could not find export \'%s\' in module \'%s\'",uVar1,uVar2);
break;
case 2:
uVar1 = JS_AtomGetStr(param_1,local_68,0x40,param_4);
uVar2 = JS_AtomGetStr(local_8,local_a8,0x40,*(int4 *)(local_18 + 4));
JS_ThrowSyntaxError(param_1,"circular reference when looking for export \'%s\' in module \'%s\'"
,uVar1,uVar2);
break;
case 3:
uVar1 = JS_AtomGetStr(param_1,local_68,0x40,param_4);
uVar2 = JS_AtomGetStr(local_8,local_a8,0x40,*(int4 *)(local_18 + 4));
JS_ThrowSyntaxError(param_1,"export \'%s\' in module \'%s\' is ambiguous",uVar1,uVar2);
break;
case 0xffffffff:
}
return;
}
|
|
18,682
|
minja::Value::size() const
|
monkey531[P]llama/common/./minja.hpp
|
size_t size() const {
if (is_object()) return object_->size();
if (is_array()) return array_->size();
if (is_string()) return primitive_.get<std::string>().length();
throw std::runtime_error("Value is not an array or object: " + dump());
}
|
O0
|
cpp
|
minja::Value::size() const:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xb6db0
testb $0x1, %al
jne 0xc64d7
jmp 0xc64fa
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0xb7a10
movq %rax, %rdi
callq 0xb9d50
movq %rax, 0x90(%rsp)
jmp 0xc663c
movq 0x10(%rsp), %rdi
callq 0xb8380
testb $0x1, %al
jne 0xc650a
jmp 0xc652d
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0xb7930
movq %rax, %rdi
callq 0xb7940
movq %rax, 0x90(%rsp)
jmp 0xc663c
movq 0x10(%rsp), %rdi
callq 0xb7f60
testb $0x1, %al
jne 0xc653d
jmp 0xc6571
movq 0x10(%rsp), %rsi
addq $0x40, %rsi
leaq 0x68(%rsp), %rdi
callq 0x933e0
leaq 0x68(%rsp), %rdi
callq 0x52980
movq %rax, 0x90(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x53408
jmp 0xc663c
movb $0x1, 0x1b(%rsp)
movl $0x10, %edi
callq 0x52670
movq 0x10(%rsp), %rsi
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb6dd0
jmp 0xc659d
leaq 0x1165db(%rip), %rsi # 0x1dcb7f
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x5cf00
jmp 0xc65b5
movq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x524b0
jmp 0xc65c6
movq 0x8(%rsp), %rdi
movb $0x0, 0x1b(%rsp)
movq 0x1a09c9(%rip), %rsi # 0x266fa0
movq 0x1a0982(%rip), %rdx # 0x266f60
callq 0x52a60
jmp 0xc6656
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0xc6627
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0xc661d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x53408
leaq 0x28(%rsp), %rdi
callq 0x53408
testb $0x1, 0x1b(%rsp)
jne 0xc6630
jmp 0xc663a
movq 0x8(%rsp), %rdi
callq 0x52e60
jmp 0xc664c
movq 0x90(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x52ae0
nopw %cs:(%rax,%rax)
|
_ZNK5minja5Value4sizeEv:
sub rsp, 98h
mov [rsp+98h+var_10], rdi
mov rdi, [rsp+98h+var_10]; this
mov [rsp+98h+var_88], rdi
call _ZNK5minja5Value9is_objectEv; minja::Value::is_object(void)
test al, 1
jnz short loc_C64D7
jmp short loc_C64FA
loc_C64D7:
mov rdi, [rsp+98h+var_88]
add rdi, 20h ; ' '
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
call _ZNKSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE4sizeEv; 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>>::size(void)
mov [rsp+98h+var_8], rax
jmp loc_C663C
loc_C64FA:
mov rdi, [rsp+98h+var_88]; this
call _ZNK5minja5Value8is_arrayEv; minja::Value::is_array(void)
test al, 1
jnz short loc_C650A
jmp short loc_C652D
loc_C650A:
mov rdi, [rsp+98h+var_88]
add rdi, 10h
call _ZNKSt19__shared_ptr_accessISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
call _ZNKSt6vectorIN5minja5ValueESaIS1_EE4sizeEv; std::vector<minja::Value>::size(void)
mov [rsp+98h+var_8], rax
jmp loc_C663C
loc_C652D:
mov rdi, [rsp+98h+var_88]; this
call _ZNK5minja5Value9is_stringEv; minja::Value::is_string(void)
test al, 1
jnz short loc_C653D
jmp short loc_C6571
loc_C653D:
mov rsi, [rsp+98h+var_88]
add rsi, 40h ; '@'; __int64
lea rdi, [rsp+98h+var_30]; void *
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3getIS9_S9_EEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS0_6detail12priority_tagILj4EEEEEEv
lea rdi, [rsp+98h+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov [rsp+98h+var_8], rax
lea rdi, [rsp+98h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_C663C
loc_C6571:
mov [rsp+98h+var_7D], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rsi, [rsp+98h+var_88]
mov [rsp+98h+var_90], rax
lea rdi, [rsp+98h+var_70]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
jmp short $+2
loc_C659D:
lea rsi, aValueIsNotAnAr; "Value is not an array or object: "
lea rdi, [rsp+98h+var_50]
lea rdx, [rsp+98h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_C65B5:
mov rdi, [rsp+98h+var_90]
lea rsi, [rsp+98h+var_50]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_C65C6:
mov rdi, [rsp+98h+var_90]; void *
mov [rsp+98h+var_7D], 0
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp short loc_C6656
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
jmp short loc_C6627
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
jmp short loc_C661D
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_C661D:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_C6627:
test [rsp+arg_13], 1
jnz short loc_C6630
jmp short loc_C663A
loc_C6630:
mov rdi, [rsp+arg_0]; void *
call ___cxa_free_exception
loc_C663A:
jmp short loc_C664C
loc_C663C:
mov rax, [rsp+98h+var_8]
add rsp, 98h
retn
loc_C664C:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
loc_C6656:
nop word ptr [rax+rax+00000000h]
|
long long minja::Value::size(minja::Value *this)
{
_QWORD *v1; // rax
_QWORD *v2; // rax
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
void *exception; // [rsp+8h] [rbp-90h]
_BYTE v9[32]; // [rsp+28h] [rbp-70h] BYREF
_BYTE v10[32]; // [rsp+48h] [rbp-50h] BYREF
_BYTE v11[32]; // [rsp+68h] [rbp-30h] BYREF
minja::Value *v12; // [rsp+88h] [rbp-10h]
long long v13; // [rsp+90h] [rbp-8h]
v12 = this;
if ( (minja::Value::is_object(this) & 1) != 0 )
{
v1 = (_QWORD *)std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)this + 32);
return 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>>::size(v1);
}
else if ( minja::Value::is_array(this) )
{
v2 = (_QWORD *)std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)this + 16);
return std::vector<minja::Value>::size(v2);
}
else
{
if ( !minja::Value::is_string(this) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Value is not an array or object: ", (long long)v9);
std::runtime_error::runtime_error(exception, v10);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get<std::string,std::string>(
v11,
(long long)this + 64,
v3,
v4,
v5,
v6);
v13 = std::string::length(v11);
std::string::~string(v11);
}
return v13;
}
|
size:
SUB RSP,0x98
MOV qword ptr [RSP + 0x88],RDI
MOV RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001b6db0
TEST AL,0x1
JNZ 0x001c64d7
JMP 0x001c64fa
LAB_001c64d7:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x20
CALL 0x001b7a10
MOV RDI,RAX
CALL 0x001b9d50
MOV qword ptr [RSP + 0x90],RAX
JMP 0x001c663c
LAB_001c64fa:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001b8380
TEST AL,0x1
JNZ 0x001c650a
JMP 0x001c652d
LAB_001c650a:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x10
CALL 0x001b7930
MOV RDI,RAX
CALL 0x001b7940
MOV qword ptr [RSP + 0x90],RAX
JMP 0x001c663c
LAB_001c652d:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001b7f60
TEST AL,0x1
JNZ 0x001c653d
JMP 0x001c6571
LAB_001c653d:
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x40
LEA RDI,[RSP + 0x68]
CALL 0x001933e0
LEA RDI,[RSP + 0x68]
CALL 0x00152980
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0x68]
CALL 0x00153408
JMP 0x001c663c
LAB_001c6571:
MOV byte ptr [RSP + 0x1b],0x1
MOV EDI,0x10
CALL 0x00152670
MOV RSI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
LAB_001c658a:
LEA RDI,[RSP + 0x28]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b6dd0
JMP 0x001c659d
LAB_001c659d:
LEA RSI,[0x2dcb7f]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x28]
CALL 0x0015cf00
JMP 0x001c65b5
LAB_001c65b5:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x48]
CALL 0x001524b0
JMP 0x001c65c6
LAB_001c65c6:
MOV RDI,qword ptr [RSP + 0x8]
MOV byte ptr [RSP + 0x1b],0x0
MOV RSI,qword ptr [0x00366fa0]
MOV RDX,qword ptr [0x00366f60]
CALL 0x00152a60
LAB_001c663c:
MOV RAX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
/* minja::Value::size() const */
int8 __thiscall minja::Value::size(Value *this)
{
ulong uVar1;
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this_00;
vector<minja::Value,std::allocator<minja::Value>> *this_01;
runtime_error *this_02;
int1 local_70 [32];
string local_50 [32];
string local_30 [32];
Value *local_10;
int8 local_8;
local_10 = this;
uVar1 = is_object(this);
if ((uVar1 & 1) == 0) {
uVar1 = is_array(this);
if ((uVar1 & 1) == 0) {
uVar1 = is_string(this);
if ((uVar1 & 1) == 0) {
this_02 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c658a to 001c659a has its CatchHandler @ 001c65e5 */
dump_abi_cxx11_((int)local_70,SUB81(this,0));
/* try { // try from 001c659d to 001c65b2 has its CatchHandler @ 001c65f5 */
std::operator+((char *)local_50,(string *)"Value is not an array or object: ");
/* try { // try from 001c65b5 to 001c65e2 has its CatchHandler @ 001c6605 */
std::runtime_error::runtime_error(this_02,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this_02,PTR_typeinfo_00366fa0,PTR__runtime_error_00366f60);
}
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>
::get<std::__cxx11::string,std::__cxx11::string>();
local_8 = std::__cxx11::string::length();
std::__cxx11::string::~string(local_30);
}
else {
this_01 = (vector<minja::Value,std::allocator<minja::Value>> *)
std::
__shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false>
*)(this + 0x10));
local_8 = std::vector<minja::Value,std::allocator<minja::Value>>::size(this_01);
}
}
else {
this_00 = (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>>>
*)std::
__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>
*)(this + 0x20));
local_8 = std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::size(this_00);
}
return local_8;
}
|
|
18,683
|
safe_hash_set
|
eloqsql/mysys/my_safehash.c
|
my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length,
uchar *data)
{
SAFE_HASH_ENTRY *entry;
my_bool error= 0;
DBUG_ENTER("safe_hash_set");
DBUG_PRINT("enter",("key: %.*s data: %p", length, key, data));
mysql_rwlock_wrlock(&hash->mutex);
entry= (SAFE_HASH_ENTRY*) my_hash_search(&hash->hash, key, length);
if (data == hash->default_value)
{
/*
The key is to be associated with the default entry. In this case
we can just delete the entry (if it existed) from the hash as a
search will return the default entry
*/
if (!entry) /* nothing to do */
goto end;
/* unlink entry from list */
if ((*entry->prev= entry->next))
entry->next->prev= entry->prev;
my_hash_delete(&hash->hash, (uchar*) entry);
goto end;
}
if (entry)
{
/* Entry existed; Just change the pointer to point at the new data */
entry->data= data;
}
else
{
if (!(entry= (SAFE_HASH_ENTRY *) my_malloc(key_memory_SAFE_HASH_ENTRY,
sizeof(*entry) + length,
MYF(MY_WME))))
{
error= 1;
goto end;
}
entry->key= (uchar*) (entry +1);
memcpy((char*) entry->key, (char*) key, length);
entry->length= length;
entry->data= data;
/* Link entry to list */
if ((entry->next= hash->root))
entry->next->prev= &entry->next;
entry->prev= &hash->root;
hash->root= entry;
if (my_hash_insert(&hash->hash, (uchar*) entry))
{
/* This can only happen if hash got out of memory */
my_free(entry);
error= 1;
goto end;
}
}
end:
mysql_rwlock_unlock(&hash->mutex);
DBUG_RETURN(error);
}
|
O0
|
c
|
safe_hash_set:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movb $0x0, -0x29(%rbp)
jmp 0xfea8d
movq -0x8(%rbp), %rdi
leaq 0x55cf2(%rip), %rsi # 0x15478a
movl $0xcf, %edx
callq 0xfec40
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0xde0a0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x108(%rcx), %rax
jne 0xfeb22
cmpq $0x0, -0x28(%rbp)
jne 0xfeadc
jmp 0xfec1d
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xfeb09
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
movq -0x28(%rbp), %rsi
callq 0xdea80
jmp 0xfec1d
cmpq $0x0, -0x28(%rbp)
je 0xfeb3a
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0xfec1b
leaq 0xb84793(%rip), %rax # 0xc832d4
movl (%rax), %edi
movl -0x14(%rbp), %eax
movl %eax, %esi
addq $0x28, %rsi
movl $0x10, %edx
callq 0xf3860
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0xfeb69
movb $0x1, -0x29(%rbp)
jmp 0xfec1d
movq -0x28(%rbp), %rcx
addq $0x28, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movq -0x28(%rbp), %rcx
movq %rax, 0x18(%rcx)
cmpq $0x0, %rax
je 0xfebd0
movq -0x28(%rbp), %rcx
addq $0x18, %rcx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rcx
addq $0x110, %rcx # imm = 0x110
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
movq -0x28(%rbp), %rsi
callq 0xde490
cmpb $0x0, %al
je 0xfec19
movq -0x28(%rbp), %rdi
callq 0xf3be0
movb $0x1, -0x29(%rbp)
jmp 0xfec1d
jmp 0xfec1b
jmp 0xfec1d
movq -0x8(%rbp), %rdi
callq 0xfea00
movb -0x29(%rbp), %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
safe_hash_set:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_29], 0
jmp short $+2
loc_FEA8D:
mov rdi, [rbp+var_8]
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0CFh
call inline_mysql_rwlock_wrlock_4
mov rdi, [rbp+var_8]
add rdi, 98h
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
call my_hash_search
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+108h]
jnz short loc_FEB22
cmp [rbp+var_28], 0
jnz short loc_FEADC
jmp loc_FEC1D
loc_FEADC:
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov rcx, [rbp+var_28]
mov rcx, [rcx+20h]
mov [rcx], rax
cmp rax, 0
jz short loc_FEB09
mov rax, [rbp+var_28]
mov rcx, [rax+20h]
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov [rax+20h], rcx
loc_FEB09:
mov rdi, [rbp+var_8]
add rdi, 98h
mov rsi, [rbp+var_28]
call my_hash_delete
jmp loc_FEC1D
loc_FEB22:
cmp [rbp+var_28], 0
jz short loc_FEB3A
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+10h], rcx
jmp loc_FEC1B
loc_FEB3A:
lea rax, key_memory_SAFE_HASH_ENTRY
mov edi, [rax]
mov eax, [rbp+var_14]
mov esi, eax
add rsi, 28h ; '('
mov edx, 10h
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_FEB69
mov [rbp+var_29], 1
jmp loc_FEC1D
loc_FEB69:
mov rcx, [rbp+var_28]
add rcx, 28h ; '('
mov rax, [rbp+var_28]
mov [rax], rcx
mov rax, [rbp+var_28]
mov rdi, [rax]
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
mov [rax+8], ecx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+10h], rcx
mov rax, [rbp+var_8]
mov rax, [rax+110h]
mov rcx, [rbp+var_28]
mov [rcx+18h], rax
cmp rax, 0
jz short loc_FEBD0
mov rcx, [rbp+var_28]
add rcx, 18h
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov [rax+20h], rcx
loc_FEBD0:
mov rcx, [rbp+var_8]
add rcx, 110h
mov rax, [rbp+var_28]
mov [rax+20h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+110h], rcx
mov rdi, [rbp+var_8]
add rdi, 98h
mov rsi, [rbp+var_28]
call my_hash_insert
cmp al, 0
jz short loc_FEC19
mov rdi, [rbp+var_28]
call my_free
mov [rbp+var_29], 1
jmp short loc_FEC1D
loc_FEC19:
jmp short $+2
loc_FEC1B:
jmp short $+2
loc_FEC1D:
mov rdi, [rbp+var_8]
call inline_mysql_rwlock_unlock_8
mov al, [rbp+var_29]
mov [rbp+var_2A], al
mov al, [rbp+var_2A]
add rsp, 30h
pop rbp
retn
|
char safe_hash_set(long long a1, long long a2, unsigned int a3, long long a4)
{
long long v4; // rax
long long v5; // rax
char v7; // [rsp+7h] [rbp-29h]
long long v8; // [rsp+8h] [rbp-28h]
long long v9; // [rsp+8h] [rbp-28h]
v7 = 0;
inline_mysql_rwlock_wrlock_4(a1, "/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c", 207LL);
v8 = my_hash_search(a1 + 152, a2, a3);
if ( a4 == *(_QWORD *)(a1 + 264) )
{
if ( v8 )
{
v4 = *(_QWORD *)(v8 + 24);
**(_QWORD **)(v8 + 32) = v4;
if ( v4 )
*(_QWORD *)(*(_QWORD *)(v8 + 24) + 32LL) = *(_QWORD *)(v8 + 32);
my_hash_delete(a1 + 152, v8);
}
}
else if ( v8 )
{
*(_QWORD *)(v8 + 16) = a4;
}
else
{
v9 = my_malloc(key_memory_SAFE_HASH_ENTRY, (const char *)(a3 + 40LL), 16);
if ( v9 )
{
*(_QWORD *)v9 = v9 + 40;
memcpy(*(_QWORD *)v9, a2, a3);
*(_DWORD *)(v9 + 8) = a3;
*(_QWORD *)(v9 + 16) = a4;
v5 = *(_QWORD *)(a1 + 272);
*(_QWORD *)(v9 + 24) = v5;
if ( v5 )
*(_QWORD *)(*(_QWORD *)(v9 + 24) + 32LL) = v9 + 24;
*(_QWORD *)(v9 + 32) = a1 + 272;
*(_QWORD *)(a1 + 272) = v9;
if ( my_hash_insert(a1 + 152, v9) )
{
my_free(v9);
v7 = 1;
}
}
else
{
v7 = 1;
}
}
inline_mysql_rwlock_unlock_8(a1);
return v7;
}
|
safe_hash_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV byte ptr [RBP + -0x29],0x0
JMP 0x001fea8d
LAB_001fea8d:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x25478a]
MOV EDX,0xcf
CALL 0x001fec40
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x98
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x001de0a0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x108]
JNZ 0x001feb22
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001feadc
JMP 0x001fec1d
LAB_001feadc:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX + 0x20]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001feb09
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001feb09:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x98
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001dea80
JMP 0x001fec1d
LAB_001feb22:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001feb3a
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001fec1b
LAB_001feb3a:
LEA RAX,[0xd832d4]
MOV EDI,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EAX
ADD RSI,0x28
MOV EDX,0x10
CALL 0x001f3860
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JNZ 0x001feb69
MOV byte ptr [RBP + -0x29],0x1
JMP 0x001fec1d
LAB_001feb69:
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x28
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x0012a090
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x8],ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x110]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX + 0x18],RAX
CMP RAX,0x0
JZ 0x001febd0
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001febd0:
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x110
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x110],RCX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x98
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001de490
CMP AL,0x0
JZ 0x001fec19
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001f3be0
MOV byte ptr [RBP + -0x29],0x1
JMP 0x001fec1d
LAB_001fec19:
JMP 0x001fec1b
LAB_001fec1b:
JMP 0x001fec1d
LAB_001fec1d:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001fea00
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x2a],AL
MOV AL,byte ptr [RBP + -0x2a]
ADD RSP,0x30
POP RBP
RET
|
int1 safe_hash_set(long param_1,void *param_2,uint param_3,long param_4)
{
long lVar1;
char cVar2;
long lVar3;
int8 *puVar4;
int1 local_31;
local_31 = 0;
inline_mysql_rwlock_wrlock
(param_1,"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c",0xcf);
lVar3 = my_hash_search(param_1 + 0x98,param_2,param_3);
if (param_4 == *(long *)(param_1 + 0x108)) {
if (lVar3 != 0) {
lVar1 = *(long *)(lVar3 + 0x18);
**(long **)(lVar3 + 0x20) = lVar1;
if (lVar1 != 0) {
*(int8 *)(*(long *)(lVar3 + 0x18) + 0x20) = *(int8 *)(lVar3 + 0x20);
}
my_hash_delete(param_1 + 0x98,lVar3);
}
}
else if (lVar3 == 0) {
puVar4 = (int8 *)my_malloc(key_memory_SAFE_HASH_ENTRY,(ulong)param_3 + 0x28,0x10);
if (puVar4 == (int8 *)0x0) {
local_31 = 1;
}
else {
*puVar4 = puVar4 + 5;
memcpy((void *)*puVar4,param_2,(ulong)param_3);
*(uint *)(puVar4 + 1) = param_3;
puVar4[2] = param_4;
lVar3 = *(long *)(param_1 + 0x110);
puVar4[3] = lVar3;
if (lVar3 != 0) {
*(int8 **)(puVar4[3] + 0x20) = puVar4 + 3;
}
puVar4[4] = param_1 + 0x110;
*(int8 **)(param_1 + 0x110) = puVar4;
cVar2 = my_hash_insert(param_1 + 0x98,puVar4);
if (cVar2 != '\0') {
my_free(puVar4);
local_31 = 1;
}
}
}
else {
*(long *)(lVar3 + 0x10) = param_4;
}
inline_mysql_rwlock_unlock(param_1);
return local_31;
}
|
|
18,684
|
qh_gram_schmidt
|
aimrt_mujoco_sim/_deps/qhull-src/src/libqhull_r/geom2_r.c
|
boolT qh_gram_schmidt(qhT *qh, int dim, realT **row) {
realT *rowi, *rowj, norm;
int i, j, k;
for (i=0; i < dim; i++) {
rowi= row[i];
for (norm=0.0, k=dim; k--; rowi++)
norm += *rowi * *rowi;
norm= sqrt(norm);
wmin_(Wmindenom, norm);
if (norm == 0.0) /* either 0 or overflow due to sqrt */
return False;
for (k=dim; k--; )
*(--rowi) /= norm;
for (j=i+1; j < dim; j++) {
rowj= row[j];
for (norm=0.0, k=dim; k--; )
norm += *rowi++ * *rowj++;
for (k=dim; k--; )
*(--rowj) -= *(--rowi) * norm;
}
}
return True;
}
|
O0
|
c
|
qh_gram_schmidt:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0x4c10b1
movq 0x28(%rsp), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rsp)
cmpl $0x0, %eax
je 0x4c0ef4
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
movq 0x20(%rsp), %rax
movsd (%rax), %xmm2
movsd 0x10(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
jmp 0x4c0eac
movsd 0x10(%rsp), %xmm0
callq 0x49370
movsd %xmm0, 0x10(%rsp)
movq 0x38(%rsp), %rax
movsd 0x11c0(%rax), %xmm0
ucomisd 0x10(%rsp), %xmm0
jbe 0x4c0f2d
movsd 0x10(%rsp), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, 0x11c0(%rax)
movsd 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4c0f4b
jp 0x4c0f4b
movl $0x0, 0x44(%rsp)
jmp 0x4c10b9
movl 0x34(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rsp)
cmpl $0x0, %eax
je 0x4c0f8c
movsd 0x10(%rsp), %xmm1
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x20(%rsp)
movsd -0x8(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rax)
jmp 0x4c0f53
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0x4c109f
movq 0x28(%rsp), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rsp)
cmpl $0x0, %eax
je 0x4c101b
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x20(%rsp)
movsd (%rax), %xmm0
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x18(%rsp)
movsd (%rax), %xmm2
movsd 0x10(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0x4c0fc9
movl 0x34(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rsp)
cmpl $0x0, %eax
je 0x4c108d
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x20(%rsp)
movsd -0x8(%rax), %xmm0
movsd 0x10(%rsp), %xmm2
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x18(%rsp)
movsd -0x8(%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rax)
jmp 0x4c1023
jmp 0x4c108f
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c0f97
jmp 0x4c10a1
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4c0e7a
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
qh_gram_schmidt:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov [rsp+48h+var_20], rdx
mov [rsp+48h+var_3C], 0
loc_4C0E7A:
mov eax, [rsp+48h+var_3C]
cmp eax, [rsp+48h+var_14]
jge loc_4C10B1
mov rax, [rsp+48h+var_20]
movsxd rcx, [rsp+48h+var_3C]
mov rax, [rax+rcx*8]
mov [rsp+48h+var_28], rax
xorps xmm0, xmm0
movsd [rsp+48h+var_38], xmm0
mov eax, [rsp+48h+var_14]
mov [rsp+48h+var_44], eax
loc_4C0EAC:
mov eax, [rsp+48h+var_44]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rsp+48h+var_44], ecx
cmp eax, 0
jz short loc_4C0EF4
mov rax, [rsp+48h+var_28]
movsd xmm0, qword ptr [rax]
mov rax, [rsp+48h+var_28]
movsd xmm2, qword ptr [rax]
movsd xmm1, [rsp+48h+var_38]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rsp+48h+var_38], xmm0
mov rax, [rsp+48h+var_28]
add rax, 8
mov [rsp+48h+var_28], rax
jmp short loc_4C0EAC
loc_4C0EF4:
movsd xmm0, [rsp+48h+var_38]
call _sqrt
movsd [rsp+48h+var_38], xmm0
mov rax, [rsp+48h+var_10]
movsd xmm0, qword ptr [rax+11C0h]
ucomisd xmm0, [rsp+48h+var_38]
jbe short loc_4C0F2D
movsd xmm0, [rsp+48h+var_38]
mov rax, [rsp+48h+var_10]
movsd qword ptr [rax+11C0h], xmm0
loc_4C0F2D:
movsd xmm0, [rsp+48h+var_38]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_4C0F4B
jp short loc_4C0F4B
mov [rsp+48h+var_4], 0
jmp loc_4C10B9
loc_4C0F4B:
mov eax, [rsp+48h+var_14]
mov [rsp+48h+var_44], eax
loc_4C0F53:
mov eax, [rsp+48h+var_44]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rsp+48h+var_44], ecx
cmp eax, 0
jz short loc_4C0F8C
movsd xmm1, [rsp+48h+var_38]
mov rax, [rsp+48h+var_28]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rsp+48h+var_28], rcx
movsd xmm0, qword ptr [rax-8]
divsd xmm0, xmm1
movsd qword ptr [rax-8], xmm0
jmp short loc_4C0F53
loc_4C0F8C:
mov eax, [rsp+48h+var_3C]
add eax, 1
mov [rsp+48h+var_40], eax
loc_4C0F97:
mov eax, [rsp+48h+var_40]
cmp eax, [rsp+48h+var_14]
jge loc_4C109F
mov rax, [rsp+48h+var_20]
movsxd rcx, [rsp+48h+var_40]
mov rax, [rax+rcx*8]
mov [rsp+48h+var_30], rax
xorps xmm0, xmm0
movsd [rsp+48h+var_38], xmm0
mov eax, [rsp+48h+var_14]
mov [rsp+48h+var_44], eax
loc_4C0FC9:
mov eax, [rsp+48h+var_44]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rsp+48h+var_44], ecx
cmp eax, 0
jz short loc_4C101B
mov rax, [rsp+48h+var_28]
mov rcx, rax
add rcx, 8
mov [rsp+48h+var_28], rcx
movsd xmm0, qword ptr [rax]
mov rax, [rsp+48h+var_30]
mov rcx, rax
add rcx, 8
mov [rsp+48h+var_30], rcx
movsd xmm2, qword ptr [rax]
movsd xmm1, [rsp+48h+var_38]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rsp+48h+var_38], xmm0
jmp short loc_4C0FC9
loc_4C101B:
mov eax, [rsp+48h+var_14]
mov [rsp+48h+var_44], eax
loc_4C1023:
mov eax, [rsp+48h+var_44]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rsp+48h+var_44], ecx
cmp eax, 0
jz short loc_4C108D
mov rax, [rsp+48h+var_28]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rsp+48h+var_28], rcx
movsd xmm0, qword ptr [rax-8]
movsd xmm2, [rsp+48h+var_38]
mov rax, [rsp+48h+var_30]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rsp+48h+var_30], rcx
movsd xmm1, qword ptr [rax-8]
movq rcx, xmm0
mov rdx, 8000000000000000h
xor rcx, rdx
movq xmm0, rcx
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd qword ptr [rax-8], xmm0
jmp short loc_4C1023
loc_4C108D:
jmp short $+2
loc_4C108F:
mov eax, [rsp+48h+var_40]
add eax, 1
mov [rsp+48h+var_40], eax
jmp loc_4C0F97
loc_4C109F:
jmp short $+2
loc_4C10A1:
mov eax, [rsp+48h+var_3C]
add eax, 1
mov [rsp+48h+var_3C], eax
jmp loc_4C0E7A
loc_4C10B1:
mov [rsp+48h+var_4], 1
loc_4C10B9:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
|
long long qh_gram_schmidt(long long a1, int a2, long long a3)
{
double *v5; // rax
double *v7; // rax
double v8; // xmm0_8
double *v9; // rax
double *v11; // rax
long long v12; // xmm0_8
double *v13; // rax
int v15; // [rsp+4h] [rbp-44h]
int v16; // [rsp+4h] [rbp-44h]
int v17; // [rsp+4h] [rbp-44h]
int v18; // [rsp+4h] [rbp-44h]
int j; // [rsp+8h] [rbp-40h]
int i; // [rsp+Ch] [rbp-3Ch]
double v21; // [rsp+10h] [rbp-38h]
double v22; // [rsp+10h] [rbp-38h]
double v23; // [rsp+10h] [rbp-38h]
double *v24; // [rsp+18h] [rbp-30h]
double *v25; // [rsp+20h] [rbp-28h]
for ( i = 0; i < a2; ++i )
{
v25 = *(double **)(a3 + 8LL * i);
v21 = 0.0;
v15 = a2;
while ( v15-- )
{
v21 = *v25 * *v25 + v21;
++v25;
}
v22 = sqrt(v21);
if ( *(double *)(a1 + 4544) > v22 )
*(double *)(a1 + 4544) = v22;
if ( v22 == 0.0 )
return 0;
v16 = a2;
while ( v16-- )
{
v5 = v25--;
*(v5 - 1) = *(v5 - 1) / v22;
}
for ( j = i + 1; j < a2; ++j )
{
v24 = *(double **)(a3 + 8LL * j);
v23 = 0.0;
v17 = a2;
while ( v17-- )
{
v7 = v25++;
v8 = *v7;
v9 = v24++;
v23 = v8 * *v9 + v23;
}
v18 = a2;
while ( v18-- )
{
v11 = v25--;
v12 = *((_QWORD *)v11 - 1);
v13 = v24--;
*(v13 - 1) = COERCE_DOUBLE(v12 ^ 0x8000000000000000LL) * v23 + *(v13 - 1);
}
}
}
return 1;
}
|
push_back:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RCX + 0x8]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x004c0ea8
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x004c14b0
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,0x8
MOV qword ptr [RAX + 0x8],RCX
JMP 0x004c0ecb
LAB_004c0ea8:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0049b090
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x004c14e0
LAB_004c0ecb:
ADD RSP,0x28
RET
|
/* std::vector<mjCTexture*, std::allocator<mjCTexture*> >::push_back(mjCTexture* const&) */
void __thiscall
std::vector<mjCTexture*,std::allocator<mjCTexture*>>::push_back
(vector<mjCTexture*,std::allocator<mjCTexture*>> *this,mjCTexture **param_1)
{
int8 uVar1;
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
uVar1 = end(this);
_M_realloc_insert<mjCTexture*const&>(this,uVar1,param_1);
}
else {
allocator_traits<std::allocator<mjCTexture*>>::construct<mjCTexture*,mjCTexture*const&>
((allocator *)this,*(mjCTexture ***)(this + 8),param_1);
*(long *)(this + 8) = *(long *)(this + 8) + 8;
}
return;
}
|
|
18,685
|
rw_pr_init
|
eloqsql/mysys/thr_rwlock.c
|
int rw_pr_init(rw_pr_lock_t *rwlock)
{
pthread_mutex_init(&rwlock->lock, NULL);
pthread_cond_init(&rwlock->no_active_readers, NULL);
rwlock->active_readers= 0;
rwlock->writers_waiting_readers= 0;
rwlock->active_writer= FALSE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
return 0;
}
|
O3
|
c
|
rw_pr_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x25480
leaq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0x253a0
movq $0x0, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
rw_pr_init:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
xor esi, esi
call _pthread_mutex_init
lea rdi, [rbx+28h]
xor esi, esi
call _pthread_cond_init
mov qword ptr [rbx+58h], 0
mov byte ptr [rbx+60h], 0
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
|
long long rw_pr_init(long long a1)
{
pthread_mutex_init(a1, 0LL);
pthread_cond_init(a1 + 40, 0LL);
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
return 0LL;
}
|
rw_pr_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR ESI,ESI
CALL 0x00125480
LEA RDI,[RBX + 0x28]
XOR ESI,ESI
CALL 0x001253a0
MOV qword ptr [RBX + 0x58],0x0
MOV byte ptr [RBX + 0x60],0x0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_init(pthread_mutex_t *param_1)
{
pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0);
pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0);
*(int8 *)((long)param_1 + 0x58) = 0;
*(int1 *)((long)param_1 + 0x60) = 0;
return 0;
}
|
|
18,686
|
my_caseup_ucs2
|
eloqsql/strings/ctype-ucs2.c
|
static size_t my_caseup_ucs2(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_ucs2_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0)
{
my_toupper_ucs2(uni_plane, &wc);
if (res != my_uni_ucs2(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O3
|
c
|
my_caseup_ucs2:
movq %rdx, %rax
cmpq $0x2, %rdx
jl 0x80dd3
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x2, %rcx
movzbl (%rsi), %r9d
movzbl 0x1(%rsi), %r10d
movq 0x8(%rdi), %r11
movq (%r11,%r9,8), %r11
testq %r11, %r11
je 0x80d9a
leaq (%r10,%r10,2), %r9
movl (%r11,%r9,4), %r9d
jmp 0x80da1
shll $0x8, %r9d
orq %r10, %r9
cmpq %r8, %rcx
ja 0x80dd2
cmpl $0xffff, %r9d # imm = 0xFFFF
ja 0x80dd2
rolw $0x8, %r9w
movw %r9w, -0x2(%rcx)
leaq 0x2(%rsi), %r9
cmpq %rdx, %r9
jae 0x80dd2
addq $0x4, %rsi
addq $0x2, %rcx
cmpq %rdx, %rsi
movq %r9, %rsi
jbe 0x80d7a
popq %rbp
retq
|
my_caseup_ucs2:
mov rax, rdx
cmp rdx, 2
jl short locret_80DD3
push rbp
mov rbp, rsp
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 2
loc_80D7A:
movzx r9d, byte ptr [rsi]
movzx r10d, byte ptr [rsi+1]
mov r11, [rdi+8]
mov r11, [r11+r9*8]
test r11, r11
jz short loc_80D9A
lea r9, [r10+r10*2]
mov r9d, [r11+r9*4]
jmp short loc_80DA1
loc_80D9A:
shl r9d, 8
or r9, r10
loc_80DA1:
cmp rcx, r8
ja short loc_80DD2
cmp r9d, 0FFFFh
ja short loc_80DD2
rol r9w, 8
mov [rcx-2], r9w
lea r9, [rsi+2]
cmp r9, rdx
jnb short loc_80DD2
add rsi, 4
add rcx, 2
cmp rsi, rdx
mov rsi, r9
jbe short loc_80D7A
loc_80DD2:
pop rbp
locret_80DD3:
retn
|
long long my_caseup_ucs2(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned long long v6; // rdx
unsigned long long v7; // r8
long long v8; // rdi
unsigned long long v9; // rcx
long long v10; // r9
long long v11; // r10
long long v12; // r11
unsigned int v13; // r9d
bool v14; // cc
result = a3;
if ( a3 >= 2 )
{
v6 = (unsigned long long)&a2[a3];
v7 = a4 + a5;
v8 = *(_QWORD *)(a1 + 120);
v9 = a4 + 2;
do
{
v10 = *a2;
v11 = a2[1];
v12 = *(_QWORD *)(*(_QWORD *)(v8 + 8) + 8 * v10);
if ( v12 )
v13 = *(_DWORD *)(v12 + 12 * v11);
else
v13 = v11 | ((_DWORD)v10 << 8);
if ( v9 > v7 )
break;
if ( v13 > 0xFFFF )
break;
*(_WORD *)(v9 - 2) = __ROL2__(v13, 8);
if ( (unsigned long long)(a2 + 2) >= v6 )
break;
v9 += 2LL;
v14 = (unsigned long long)(a2 + 4) <= v6;
a2 += 2;
}
while ( v14 );
}
return result;
}
|
my_caseup_ucs2:
MOV RAX,RDX
CMP RDX,0x2
JL 0x00180dd3
PUSH RBP
MOV RBP,RSP
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x2
LAB_00180d7a:
MOVZX R9D,byte ptr [RSI]
MOVZX R10D,byte ptr [RSI + 0x1]
MOV R11,qword ptr [RDI + 0x8]
MOV R11,qword ptr [R11 + R9*0x8]
TEST R11,R11
JZ 0x00180d9a
LEA R9,[R10 + R10*0x2]
MOV R9D,dword ptr [R11 + R9*0x4]
JMP 0x00180da1
LAB_00180d9a:
SHL R9D,0x8
OR R9,R10
LAB_00180da1:
CMP RCX,R8
JA 0x00180dd2
CMP R9D,0xffff
JA 0x00180dd2
ROL R9W,0x8
MOV word ptr [RCX + -0x2],R9W
LEA R9,[RSI + 0x2]
CMP R9,RDX
JNC 0x00180dd2
ADD RSI,0x4
ADD RCX,0x2
CMP RSI,RDX
MOV RSI,R9
JBE 0x00180d7a
LAB_00180dd2:
POP RBP
LAB_00180dd3:
RET
|
void my_caseup_ucs2(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
long lVar1;
long lVar2;
ulong uVar3;
byte *pbVar4;
byte *pbVar5;
uint uVar6;
if (1 < param_3) {
lVar1 = *(long *)(param_1 + 0x78);
uVar3 = param_4 + 2;
pbVar4 = param_2;
while( true ) {
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (ulong)*pbVar4 * 8);
if (lVar2 == 0) {
uVar6 = (uint)CONCAT11(*pbVar4,pbVar4[1]);
}
else {
uVar6 = *(uint *)(lVar2 + (ulong)pbVar4[1] * 0xc);
}
if (((ulong)(param_5 + param_4) < uVar3) || (0xffff < uVar6)) break;
*(ushort *)(uVar3 - 2) = (ushort)uVar6 << 8 | (ushort)uVar6 >> 8;
if (param_2 + param_3 <= pbVar4 + 2) {
return;
}
pbVar5 = pbVar4 + 4;
uVar3 = uVar3 + 2;
pbVar4 = pbVar4 + 2;
if (param_2 + param_3 < pbVar5) {
return;
}
}
}
return;
}
|
|
18,687
|
reset_root_defaults
|
eloqsql/mysys/my_alloc.c
|
void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
size_t pre_alloc_size __attribute__((unused)))
{
DBUG_ENTER("reset_root_defaults");
DBUG_ASSERT(alloc_root_inited(mem_root));
mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) |
(mem_root->block_size & 1));
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
if (pre_alloc_size)
{
size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM));
if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size)
{
USED_MEM *mem, **prev= &mem_root->free;
/*
Free unused blocks, so that consequent calls
to reset_root_defaults won't eat away memory.
*/
while (*prev)
{
mem= *prev;
if (mem->size == size)
{
/* We found a suitable block, no need to do anything else */
mem_root->pre_alloc= mem;
DBUG_VOID_RETURN;
}
if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size)
{
/* remove block from the list and free it */
*prev= mem->next;
my_free(mem);
}
else
prev= &mem->next;
}
/* Allocate new prealloc block and add it to the end of free list */
if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size,
MYF(MALLOC_FLAG(mem_root->
block_size)))))
{
mem->size= size;
mem->left= pre_alloc_size;
mem->next= *prev;
*prev= mem_root->pre_alloc= mem;
TRASH_MEM(mem);
}
else
{
mem_root->pre_alloc= 0;
}
}
}
else
#endif
mem_root->pre_alloc= 0;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
reset_root_defaults:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x84706
movq -0x10(%rbp), %rcx
subq $0x28, %rcx
andq $-0x2, %rcx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x1, %rax
orq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x8485f
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x84761
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0x8485d
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x847d6
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x8479d
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x8486f
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x18, %rax
movq -0x28(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x847cc
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x8b290
jmp 0x847d4
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x84769
movq -0x8(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
andq $0x1, %rdx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, %eax
movl %eax, %edx
callq 0x8af10
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x8484f
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x84849
jmp 0x8484b
jmp 0x8484d
jmp 0x8485b
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x8485d
jmp 0x8486b
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x8486d
jmp 0x8486f
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
reset_root_defaults:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_84706:
mov rcx, [rbp+var_10]
sub rcx, 28h ; '('
and rcx, 0FFFFFFFFFFFFFFFEh
mov rax, [rbp+var_8]
mov rax, [rax+20h]
and rax, 1
or rcx, rax
mov rax, [rbp+var_8]
mov [rax+20h], rcx
cmp [rbp+var_18], 0
jz loc_8485F
mov rax, [rbp+var_18]
add rax, 18h
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_84761
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rax, [rax+10h]
cmp rax, [rbp+var_20]
jz loc_8485D
loc_84761:
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
loc_84769:
mov rax, [rbp+var_30]
cmp qword ptr [rax], 0
jz short loc_847D6
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+10h]
cmp rax, [rbp+var_20]
jnz short loc_8479D
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
jmp loc_8486F
loc_8479D:
mov rax, [rbp+var_28]
mov rax, [rax+8]
add rax, 18h
mov rcx, [rbp+var_28]
cmp rax, [rcx+10h]
jnz short loc_847CC
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rdi, [rbp+var_28]
call my_free
jmp short loc_847D4
loc_847CC:
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
loc_847D4:
jmp short loc_84769
loc_847D6:
mov rax, [rbp+var_8]
mov edi, [rax+38h]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_8]
mov rdx, [rax+20h]
and rdx, 1
xor eax, eax
mov ecx, 10000h
cmp rdx, 0
cmovnz eax, ecx
mov eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_8484F
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+10h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+8], rcx
mov rax, [rbp+var_30]
mov rcx, [rax]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rax, [rbp+var_30]
mov [rax], rcx
jmp short $+2
loc_84849:
jmp short $+2
loc_8484B:
jmp short $+2
loc_8484D:
jmp short loc_8485B
loc_8484F:
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_8485B:
jmp short $+2
loc_8485D:
jmp short loc_8486B
loc_8485F:
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_8486B:
jmp short $+2
loc_8486D:
jmp short $+2
loc_8486F:
add rsp, 30h
pop rbp
retn
|
long long * reset_root_defaults(long long *a1, long long a2, long long a3)
{
long long *result; // rax
long long v4; // rdi
unsigned int v5; // eax
long long *v6; // [rsp+0h] [rbp-30h]
long long *v7; // [rsp+8h] [rbp-28h]
_QWORD *v8; // [rsp+8h] [rbp-28h]
long long *v9; // [rsp+10h] [rbp-20h]
a1[4] = a1[4] & 1 | (a2 - 40) & 0xFFFFFFFFFFFFFFFELL;
if ( a3 )
{
v9 = (long long *)(a3 + 24);
if ( !a1[2] || (result = *(long long **)(a1[2] + 16), result != v9) )
{
v6 = a1;
while ( *v6 )
{
v7 = (long long *)*v6;
if ( *(long long **)(*v6 + 16) == v9 )
{
result = a1;
a1[2] = (long long)v7;
return result;
}
if ( v7[1] + 24 == v7[2] )
{
*v6 = *v7;
my_free(v7);
}
else
{
v6 = (long long *)*v6;
}
}
v4 = *((unsigned int *)a1 + 14);
v5 = 0;
if ( (a1[4] & 1) != 0 )
v5 = 0x10000;
v8 = (_QWORD *)my_malloc(v4, v9, v5);
if ( v8 )
{
v8[2] = v9;
v8[1] = a3;
*v8 = *v6;
a1[2] = (long long)v8;
result = v6;
*v6 = (long long)v8;
}
else
{
result = a1;
a1[2] = 0LL;
}
}
}
else
{
result = a1;
a1[2] = 0LL;
}
return result;
}
|
reset_root_defaults:
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
JMP 0x00184706
LAB_00184706:
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,0x28
AND RCX,-0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x1
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0018485f
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x18
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00184761
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0018485d
LAB_00184761:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
LAB_00184769:
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX],0x0
JZ 0x001847d6
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0018479d
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x0018486f
LAB_0018479d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,0x18
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x10]
JNZ 0x001847cc
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0018b290
JMP 0x001847d4
LAB_001847cc:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
LAB_001847d4:
JMP 0x00184769
LAB_001847d6:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX + 0x20]
AND RDX,0x1
XOR EAX,EAX
MOV ECX,0x10000
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0018af10
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x0018484f
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
JMP 0x00184849
LAB_00184849:
JMP 0x0018484b
LAB_0018484b:
JMP 0x0018484d
LAB_0018484d:
JMP 0x0018485b
LAB_0018484f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_0018485b:
JMP 0x0018485d
LAB_0018485d:
JMP 0x0018486b
LAB_0018485f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_0018486b:
JMP 0x0018486d
LAB_0018486d:
JMP 0x0018486f
LAB_0018486f:
ADD RSP,0x30
POP RBP
RET
|
void reset_root_defaults(long *param_1,long param_2,long param_3)
{
int4 uVar1;
long lVar2;
long *plVar3;
long *local_38;
param_1[4] = param_2 - 0x28U & 0xfffffffffffffffe | param_1[4] & 1U;
if (param_3 == 0) {
param_1[2] = 0;
}
else {
lVar2 = param_3 + 0x18;
plVar3 = param_1;
if ((param_1[2] == 0) || (plVar3 = param_1, *(long *)(param_1[2] + 0x10) != lVar2)) {
while (local_38 = plVar3, *local_38 != 0) {
plVar3 = (long *)*local_38;
if (plVar3[2] == lVar2) {
param_1[2] = (long)plVar3;
return;
}
if (plVar3[1] + 0x18 == plVar3[2]) {
*local_38 = *plVar3;
my_free(plVar3);
plVar3 = local_38;
}
}
uVar1 = 0;
if ((param_1[4] & 1U) != 0) {
uVar1 = 0x10000;
}
plVar3 = (long *)my_malloc((int)param_1[7],lVar2,uVar1);
if (plVar3 == (long *)0x0) {
param_1[2] = 0;
}
else {
plVar3[2] = lVar2;
plVar3[1] = param_3;
*plVar3 = *local_38;
param_1[2] = (long)plVar3;
*local_38 = (long)plVar3;
}
}
}
return;
}
|
|
18,688
|
minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&)
|
monkey531[P]llama/common/minja.hpp
|
static Value callable(const CallableType & callable) {
return Value(std::make_shared<CallableType>(callable));
}
|
O1
|
cpp
|
minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0xbb6a8
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbb5cc
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbaf1c
callq 0x520bc
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbaf39
callq 0x520bc
movq %rbx, %rdi
callq 0x1e650
nop
|
_ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE:
push r14
push rbx
sub rsp, 18h
mov rcx, rsi
mov rbx, rdi
lea rdi, [rsp+28h+var_18]
mov qword ptr [rdi-8], 0
lea r14, [rsp+28h+var_20]
lea rdx, [rsp+28h+var_21]
mov rsi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2ISt8functionIFN5minja5ValueERKSt10shared_ptrINS5_7ContextEERNS5_14ArgumentsValueEEESaISF_EJRKSF_EEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&>(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> *&,std::_Sp_alloc_shared_tag<std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rdi, rbx
mov rsi, r14
call _ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE; minja::Value::Value(std::shared_ptr<std::function<minja::Value ()(std::shared_ptr const&<minja::Context>,minja::ArgumentsValue &)>> const&)
mov rdi, [rsp+28h+var_18]
test rdi, rdi
jz short loc_BAF1C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BAF1C:
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_BAF39
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BAF39:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::callable(long long a1, long long a2)
{
char v3; // [rsp+7h] [rbp-21h] BYREF
long long v4; // [rsp+8h] [rbp-20h] BYREF
volatile signed __int32 *v5; // [rsp+10h] [rbp-18h] BYREF
v4 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&>(
&v5,
&v4,
&v3,
a2);
minja::Value::Value(a1, &v4);
if ( v5 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
return a1;
}
|
callable:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RCX,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI + -0x8],0x0
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RSI,R14
CALL 0x001bb6a8
LAB_001baf02:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001bb5cc
LAB_001baf0d:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001baf1c
CALL 0x001520bc
LAB_001baf1c:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&,
minja::ArgumentsValue&)> const&) */
Value * __thiscall minja::Value::callable(Value *this,function *param_1)
{
int1 local_21;
int8 local_20;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18;
local_20 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>,std::allocator<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>>,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>const&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_18,(shared_ptr *)&local_20,
&local_21,param_1);
/* try { // try from 001baf02 to 001baf0c has its CatchHandler @ 001baf27 */
Value(this,(shared_ptr *)&local_20);
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;
}
|
|
18,689
|
minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&)
|
monkey531[P]llama/common/minja.hpp
|
static Value callable(const CallableType & callable) {
return Value(std::make_shared<CallableType>(callable));
}
|
O3
|
cpp
|
minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0xba5bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0xba4e8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb9e38
callq 0x516f8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb9e55
callq 0x516f8
movq %rbx, %rdi
callq 0x1e660
nop
|
_ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE:
push r14
push rbx
sub rsp, 18h
mov rcx, rsi
mov rbx, rdi
lea rdi, [rsp+28h+var_18]
mov qword ptr [rdi-8], 0
lea r14, [rsp+28h+var_20]
lea rdx, [rsp+28h+var_21]
mov rsi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2ISt8functionIFN5minja5ValueERKSt10shared_ptrINS5_7ContextEERNS5_14ArgumentsValueEEESaISF_EJRKSF_EEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&>(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> *&,std::_Sp_alloc_shared_tag<std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rdi, rbx
mov rsi, r14
call _ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE; minja::Value::Value(std::shared_ptr<std::function<minja::Value ()(std::shared_ptr const&<minja::Context>,minja::ArgumentsValue &)>> const&)
mov rdi, [rsp+28h+var_18]
test rdi, rdi
jz short loc_B9E38
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B9E38:
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_B9E55
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B9E55:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::callable(long long a1, long long a2)
{
char v3; // [rsp+7h] [rbp-21h] BYREF
long long v4; // [rsp+8h] [rbp-20h] BYREF
volatile signed __int32 *v5; // [rsp+10h] [rbp-18h] BYREF
v4 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&>(
&v5,
&v4,
&v3,
a2);
minja::Value::Value(a1, &v4);
if ( v5 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
return a1;
}
|
callable:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RCX,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI + -0x8],0x0
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RSI,R14
CALL 0x001ba5bc
LAB_001b9e1e:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001ba4e8
LAB_001b9e29:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001b9e38
CALL 0x001516f8
LAB_001b9e38:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&,
minja::ArgumentsValue&)> const&) */
Value * __thiscall minja::Value::callable(Value *this,function *param_1)
{
int1 local_21;
int8 local_20;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18;
local_20 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>,std::allocator<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>>,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>const&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_18,(shared_ptr *)&local_20,
&local_21,param_1);
/* try { // try from 001b9e1e to 001b9e28 has its CatchHandler @ 001b9e43 */
Value(this,(shared_ptr *)&local_20);
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;
}
|
|
18,690
|
my_wc_mb_big5
|
eloqsql/strings/ctype-big5.c
|
static int
my_wc_mb_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((int) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_big5_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O3
|
c
|
my_wc_mb_big5:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb39a1
cmpl $0x7f, %esi
jg 0xb3864
movb %sil, (%rdx)
movl $0x1, %eax
jmp 0xb39a1
leal -0xa2(%rsi), %edi
cmpl $0x55, %edi
ja 0xb387a
movl %edi, %esi
leaq 0x448f8(%rip), %rdi # 0xf8170
jmp 0xb38dc
leal -0x2c7(%rsi), %edi
cmpl $0x18a, %edi # imm = 0x18A
ja 0xb3893
movl %edi, %esi
leaq 0x4498f(%rip), %rdi # 0xf8220
jmp 0xb38dc
leal -0x2013(%rsi), %edi
cmpl $0x2ac, %edi # imm = 0x2AC
ja 0xb38ac
movl %edi, %esi
leaq 0x44c96(%rip), %rdi # 0xf8540
jmp 0xb38dc
leal -0x2460(%rsi), %edi
cmpl $0x1e2, %edi # imm = 0x1E2
ja 0xb38c5
movl %edi, %esi
leaq 0x451dd(%rip), %rdi # 0xf8aa0
jmp 0xb38dc
leal -0x3000(%rsi), %edi
cmpl $0x129, %edi # imm = 0x129
ja 0xb3909
movl %edi, %esi
leaq 0x45594(%rip), %rdi # 0xf8e70
leaq (%rdi,%rsi,2), %rsi
movzwl (%rsi), %edi
testl %edi, %edi
je 0xb399f
leaq 0x2(%rdx), %rsi
cmpq %rcx, %rsi
ja 0xb39a1
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
jmp 0xb39a1
movl $0xa1c0, %edi # imm = 0xA1C0
cmpl $0x32a3, %esi # imm = 0x32A3
je 0xb38eb
leal -0x338e(%rsi), %edi
cmpl $0x47, %edi
ja 0xb392c
movl %edi, %esi
leaq 0x457a6(%rip), %rdi # 0xf90d0
jmp 0xb38dc
leal -0x4e00(%rsi), %edi
cmpl $0x4683, %edi # imm = 0x4683
ja 0xb3945
movl %edi, %esi
leaq 0x4581d(%rip), %rdi # 0xf9160
jmp 0xb38dc
leal -0x9577(%rsi), %edi
cmpl $0xa2d, %edi # imm = 0xA2D
ja 0xb3961
movl %edi, %esi
leaq 0x4e514(%rip), %rdi # 0x101e70
jmp 0xb38dc
movl %esi, %edi
andl $0x7ffffffe, %edi # imm = 0x7FFFFFFE
cmpl $0xfa0c, %edi # imm = 0xFA0C
jne 0xb3983
addl $0xffff05f4, %esi # imm = 0xFFFF05F4
leaq 0x4fcee(%rip), %rdi # 0x10366c
jmp 0xb38dc
addl $0xffff01d0, %esi # imm = 0xFFFF01D0
cmpl $0x1cd, %esi # imm = 0x1CD
ja 0xb399f
movl %esi, %esi
leaq 0x4f936(%rip), %rdi # 0x1032d0
jmp 0xb38dc
xorl %eax, %eax
popq %rbp
retq
|
my_wc_mb_big5:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_B39A1
cmp esi, 7Fh
jg short loc_B3864
mov [rdx], sil
mov eax, 1
jmp loc_B39A1
loc_B3864:
lea edi, [rsi-0A2h]
cmp edi, 55h ; 'U'
ja short loc_B387A
mov esi, edi
lea rdi, tab_uni_big50
jmp short loc_B38DC
loc_B387A:
lea edi, [rsi-2C7h]
cmp edi, 18Ah
ja short loc_B3893
mov esi, edi
lea rdi, tab_uni_big51
jmp short loc_B38DC
loc_B3893:
lea edi, [rsi-2013h]
cmp edi, 2ACh
ja short loc_B38AC
mov esi, edi
lea rdi, tab_uni_big52
jmp short loc_B38DC
loc_B38AC:
lea edi, [rsi-2460h]
cmp edi, 1E2h
ja short loc_B38C5
mov esi, edi
lea rdi, tab_uni_big53
jmp short loc_B38DC
loc_B38C5:
lea edi, [rsi-3000h]
cmp edi, 129h
ja short loc_B3909
mov esi, edi
lea rdi, tab_uni_big54
loc_B38DC:
lea rsi, [rdi+rsi*2]
movzx edi, word ptr [rsi]
test edi, edi
jz loc_B399F
loc_B38EB:
lea rsi, [rdx+2]
cmp rsi, rcx
ja loc_B39A1
rol di, 8
mov [rdx], di
mov eax, 2
jmp loc_B39A1
loc_B3909:
mov edi, 0A1C0h
cmp esi, 32A3h
jz short loc_B38EB
lea edi, [rsi-338Eh]
cmp edi, 47h ; 'G'
ja short loc_B392C
mov esi, edi
lea rdi, tab_uni_big56
jmp short loc_B38DC
loc_B392C:
lea edi, [rsi-4E00h]
cmp edi, 4683h
ja short loc_B3945
mov esi, edi
lea rdi, tab_uni_big57
jmp short loc_B38DC
loc_B3945:
lea edi, [rsi-9577h]
cmp edi, 0A2Dh
ja short loc_B3961
mov esi, edi
lea rdi, tab_uni_big58
jmp loc_B38DC
loc_B3961:
mov edi, esi
and edi, 7FFFFFFEh
cmp edi, 0FA0Ch
jnz short loc_B3983
add esi, 0FFFF05F4h
lea rdi, tab_uni_big59
jmp loc_B38DC
loc_B3983:
add esi, 0FFFF01D0h
cmp esi, 1CDh
ja short loc_B399F
mov esi, esi
lea rdi, tab_uni_big510
jmp loc_B38DC
loc_B399F:
xor eax, eax
loc_B39A1:
pop rbp
retn
|
long long my_wc_mb_big5(long long a1, int a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rsi
_WORD *v6; // rdi
__int16 v7; // di
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 <= 127 )
{
*a3 = a2;
return 1LL;
}
if ( (unsigned int)(a2 - 162) > 0x55 )
{
if ( (unsigned int)(a2 - 711) > 0x18A )
{
if ( (unsigned int)(a2 - 8211) > 0x2AC )
{
if ( (unsigned int)(a2 - 9312) > 0x1E2 )
{
if ( (unsigned int)(a2 - 12288) > 0x129 )
{
v7 = -24128;
if ( a2 == 12963 )
{
LABEL_15:
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*(_WORD *)a3 = __ROL2__(v7, 8);
return 2LL;
}
return result;
}
if ( (unsigned int)(a2 - 13198) > 0x47 )
{
if ( (unsigned int)(a2 - 19968) > 0x4683 )
{
if ( (unsigned int)(a2 - 38263) > 0xA2D )
{
if ( (a2 & 0x7FFFFFFE) == 0xFA0C )
{
v5 = (unsigned int)(a2 - 64012);
v6 = &tab_uni_big59;
}
else
{
LODWORD(v5) = a2 - 65072;
if ( (unsigned int)v5 > 0x1CD )
return 0LL;
v5 = (unsigned int)v5;
v6 = &tab_uni_big510;
}
}
else
{
v5 = (unsigned int)(a2 - 38263);
v6 = &tab_uni_big58;
}
}
else
{
v5 = (unsigned int)(a2 - 19968);
v6 = &tab_uni_big57;
}
}
else
{
v5 = (unsigned int)(a2 - 13198);
v6 = &tab_uni_big56;
}
}
else
{
v5 = (unsigned int)(a2 - 12288);
v6 = &tab_uni_big54;
}
}
else
{
v5 = (unsigned int)(a2 - 9312);
v6 = &tab_uni_big53;
}
}
else
{
v5 = (unsigned int)(a2 - 8211);
v6 = &tab_uni_big52;
}
}
else
{
v5 = (unsigned int)(a2 - 711);
v6 = &tab_uni_big51;
}
}
else
{
v5 = (unsigned int)(a2 - 162);
v6 = &tab_uni_big50;
}
v7 = v6[v5];
if ( v7 )
goto LABEL_15;
return 0LL;
}
return result;
}
|
my_wc_mb_big5:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b39a1
CMP ESI,0x7f
JG 0x001b3864
MOV byte ptr [RDX],SIL
MOV EAX,0x1
JMP 0x001b39a1
LAB_001b3864:
LEA EDI,[RSI + -0xa2]
CMP EDI,0x55
JA 0x001b387a
MOV ESI,EDI
LEA RDI,[0x1f8170]
JMP 0x001b38dc
LAB_001b387a:
LEA EDI,[RSI + -0x2c7]
CMP EDI,0x18a
JA 0x001b3893
MOV ESI,EDI
LEA RDI,[0x1f8220]
JMP 0x001b38dc
LAB_001b3893:
LEA EDI,[RSI + -0x2013]
CMP EDI,0x2ac
JA 0x001b38ac
MOV ESI,EDI
LEA RDI,[0x1f8540]
JMP 0x001b38dc
LAB_001b38ac:
LEA EDI,[RSI + -0x2460]
CMP EDI,0x1e2
JA 0x001b38c5
MOV ESI,EDI
LEA RDI,[0x1f8aa0]
JMP 0x001b38dc
LAB_001b38c5:
LEA EDI,[RSI + -0x3000]
CMP EDI,0x129
JA 0x001b3909
MOV ESI,EDI
LEA RDI,[0x1f8e70]
LAB_001b38dc:
LEA RSI,[RDI + RSI*0x2]
MOVZX EDI,word ptr [RSI]
TEST EDI,EDI
JZ 0x001b399f
LAB_001b38eb:
LEA RSI,[RDX + 0x2]
CMP RSI,RCX
JA 0x001b39a1
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
JMP 0x001b39a1
LAB_001b3909:
MOV EDI,0xa1c0
CMP ESI,0x32a3
JZ 0x001b38eb
LEA EDI,[RSI + -0x338e]
CMP EDI,0x47
JA 0x001b392c
MOV ESI,EDI
LEA RDI,[0x1f90d0]
JMP 0x001b38dc
LAB_001b392c:
LEA EDI,[RSI + -0x4e00]
CMP EDI,0x4683
JA 0x001b3945
MOV ESI,EDI
LEA RDI,[0x1f9160]
JMP 0x001b38dc
LAB_001b3945:
LEA EDI,[RSI + -0x9577]
CMP EDI,0xa2d
JA 0x001b3961
MOV ESI,EDI
LEA RDI,[0x201e70]
JMP 0x001b38dc
LAB_001b3961:
MOV EDI,ESI
AND EDI,0x7ffffffe
CMP EDI,0xfa0c
JNZ 0x001b3983
ADD ESI,0xffff05f4
LEA RDI,[0x20366c]
JMP 0x001b38dc
LAB_001b3983:
ADD ESI,0xffff01d0
CMP ESI,0x1cd
JA 0x001b399f
MOV ESI,ESI
LEA RDI,[0x2032d0]
JMP 0x001b38dc
LAB_001b399f:
XOR EAX,EAX
LAB_001b39a1:
POP RBP
RET
|
int8 my_wc_mb_big5(int8 param_1,uint param_2,ushort *param_3,ushort *param_4)
{
int8 uVar1;
ulong uVar2;
ushort uVar3;
int1 *puVar4;
uVar1 = 0xffffff9b;
if (param_4 <= param_3) {
return 0xffffff9b;
}
if ((int)param_2 < 0x80) {
*(char *)param_3 = (char)param_2;
return 1;
}
if (param_2 - 0xa2 < 0x56) {
uVar2 = (ulong)(param_2 - 0xa2);
puVar4 = tab_uni_big50;
}
else if (param_2 - 0x2c7 < 0x18b) {
uVar2 = (ulong)(param_2 - 0x2c7);
puVar4 = tab_uni_big51;
}
else if (param_2 - 0x2013 < 0x2ad) {
uVar2 = (ulong)(param_2 - 0x2013);
puVar4 = tab_uni_big52;
}
else if (param_2 - 0x2460 < 0x1e3) {
uVar2 = (ulong)(param_2 - 0x2460);
puVar4 = tab_uni_big53;
}
else if (param_2 - 0x3000 < 0x12a) {
uVar2 = (ulong)(param_2 - 0x3000);
puVar4 = tab_uni_big54;
}
else {
uVar3 = 0xa1c0;
if (param_2 == 0x32a3) goto LAB_001b38eb;
if (param_2 - 0x338e < 0x48) {
uVar2 = (ulong)(param_2 - 0x338e);
puVar4 = tab_uni_big56;
}
else if (param_2 - 0x4e00 < 0x4684) {
uVar2 = (ulong)(param_2 - 0x4e00);
puVar4 = tab_uni_big57;
}
else if (param_2 - 0x9577 < 0xa2e) {
uVar2 = (ulong)(param_2 - 0x9577);
puVar4 = tab_uni_big58;
}
else if ((param_2 & 0x7ffffffe) == 0xfa0c) {
uVar2 = (ulong)(param_2 - 0xfa0c);
puVar4 = (int1 *)&tab_uni_big59;
}
else {
if (0x1cd < param_2 - 0xfe30) {
return 0;
}
uVar2 = (ulong)(param_2 - 0xfe30);
puVar4 = tab_uni_big510;
}
}
uVar3 = *(ushort *)((long)puVar4 + uVar2 * 2);
if (uVar3 == 0) {
return 0;
}
LAB_001b38eb:
if (param_3 + 1 <= param_4) {
*param_3 = uVar3 << 8 | uVar3 >> 8;
uVar1 = 2;
}
return uVar1;
}
|
|
18,691
|
ma_tls_async_check_result
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
static my_bool
ma_tls_async_check_result(int res, struct mysql_async_context *b, SSL *ssl)
{
int ssl_err;
b->events_to_wait_for= 0;
if (res >= 0)
return 1;
ssl_err= SSL_get_error(ssl, res);
if (ssl_err == SSL_ERROR_WANT_READ)
b->events_to_wait_for|= MYSQL_WAIT_READ;
else if (ssl_err == SSL_ERROR_WANT_WRITE)
b->events_to_wait_for|= MYSQL_WAIT_WRITE;
else
return 1;
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
return 0;
}
|
O0
|
c
|
ma_tls_async_check_result:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
cmpl $0x0, -0x8(%rbp)
jl 0x68f4c
movb $0x1, -0x1(%rbp)
jmp 0x68fdb
movq -0x18(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x38be0
movl %eax, -0x1c(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0x68f6e
movq -0x10(%rbp), %rax
movl (%rax), %ecx
orl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x68f89
cmpl $0x3, -0x1c(%rbp)
jne 0x68f81
movq -0x10(%rbp), %rax
movl (%rax), %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
jmp 0x68f87
movb $0x1, -0x1(%rbp)
jmp 0x68fdb
jmp 0x68f89
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x68fab
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rsi
movl $0x1, %edi
callq *%rax
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x71030
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x68fd7
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rsi
xorl %edi, %edi
callq *%rax
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_tls_async_check_result:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov dword ptr [rax], 0
cmp [rbp+var_8], 0
jl short loc_68F4C
mov [rbp+var_1], 1
jmp loc_68FDB
loc_68F4C:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_8]
call _SSL_get_error
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 2
jnz short loc_68F6E
mov rax, [rbp+var_10]
mov ecx, [rax]
or ecx, 1
mov [rax], ecx
jmp short loc_68F89
loc_68F6E:
cmp [rbp+var_1C], 3
jnz short loc_68F81
mov rax, [rbp+var_10]
mov ecx, [rax]
or ecx, 2
mov [rax], ecx
jmp short loc_68F87
loc_68F81:
mov [rbp+var_1], 1
jmp short loc_68FDB
loc_68F87:
jmp short $+2
loc_68F89:
mov rax, [rbp+var_10]
cmp qword ptr [rax+20h], 0
jz short loc_68FAB
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rbp+var_10]
mov rsi, [rcx+28h]
mov edi, 1
call rax
loc_68FAB:
mov rdi, [rbp+var_10]
add rdi, 38h ; '8'
call my_context_yield
mov rax, [rbp+var_10]
cmp qword ptr [rax+20h], 0
jz short loc_68FD7
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rbp+var_10]
mov rsi, [rcx+28h]
xor edi, edi
call rax
loc_68FD7:
mov [rbp+var_1], 0
loc_68FDB:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char ma_tls_async_check_result(int a1, long long a2, long long a3)
{
int error; // [rsp+4h] [rbp-1Ch]
*(_DWORD *)a2 = 0;
if ( a1 >= 0 )
return 1;
error = SSL_get_error(a3, (unsigned int)a1);
if ( error == 2 )
{
*(_DWORD *)a2 |= 1u;
}
else
{
if ( error != 3 )
return 1;
*(_DWORD *)a2 |= 2u;
}
if ( *(_QWORD *)(a2 + 32) )
(*(void ( **)(long long, _QWORD))(a2 + 32))(1LL, *(_QWORD *)(a2 + 40));
my_context_yield(a2 + 56);
if ( *(_QWORD *)(a2 + 32) )
(*(void ( **)(_QWORD, _QWORD))(a2 + 32))(0LL, *(_QWORD *)(a2 + 40));
return 0;
}
|
ma_tls_async_check_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x0
CMP dword ptr [RBP + -0x8],0x0
JL 0x00168f4c
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00168fdb
LAB_00168f4c:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x8]
CALL 0x00138be0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x2
JNZ 0x00168f6e
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX]
OR ECX,0x1
MOV dword ptr [RAX],ECX
JMP 0x00168f89
LAB_00168f6e:
CMP dword ptr [RBP + -0x1c],0x3
JNZ 0x00168f81
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX]
OR ECX,0x2
MOV dword ptr [RAX],ECX
JMP 0x00168f87
LAB_00168f81:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00168fdb
LAB_00168f87:
JMP 0x00168f89
LAB_00168f89:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00168fab
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x28]
MOV EDI,0x1
CALL RAX
LAB_00168fab:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x38
CALL 0x00171030
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00168fd7
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x28]
XOR EDI,EDI
CALL RAX
LAB_00168fd7:
MOV byte ptr [RBP + -0x1],0x0
LAB_00168fdb:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 ma_tls_async_check_result(int param_1,uint *param_2,SSL *param_3)
{
int iVar1;
int1 local_9;
*param_2 = 0;
if (param_1 < 0) {
iVar1 = SSL_get_error(param_3,param_1);
if (iVar1 == 2) {
*param_2 = *param_2 | 1;
}
else {
if (iVar1 != 3) {
return 1;
}
*param_2 = *param_2 | 2;
}
if (*(long *)(param_2 + 8) != 0) {
(**(code **)(param_2 + 8))(1,*(int8 *)(param_2 + 10));
}
my_context_yield(param_2 + 0xe);
if (*(long *)(param_2 + 8) != 0) {
(**(code **)(param_2 + 8))(0,*(int8 *)(param_2 + 10));
}
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
|
|
18,692
|
mi_mark_file_changed
|
eloqsql/storage/myisam/mi_locking.c
|
int _mi_mark_file_changed(MI_INFO *info)
{
uchar buff[3];
register MYISAM_SHARE *share=info->s;
DBUG_ENTER("_mi_mark_file_changed");
if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed)
{
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
if (!share->global_changed)
{
share->global_changed=1;
share->state.open_count++;
}
if (!share->temporary)
{
mi_int2store(buff,share->state.open_count);
buff[2]=1; /* Mark that it's changed */
DBUG_RETURN((int)mysql_file_pwrite(share->kfile, buff, sizeof(buff),
sizeof(share->state.header),
MYF(MY_NABP)));
}
}
DBUG_RETURN(0);
}
|
O0
|
c
|
mi_mark_file_changed:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl 0xf0(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb276b
movq -0x20(%rbp), %rax
cmpb $0x0, 0x380(%rax)
jne 0xb2811
movq -0x20(%rbp), %rax
movzbl 0xf0(%rax), %ecx
orl $0x19, %ecx
movb %cl, 0xf0(%rax)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x380(%rax)
jne 0xb27aa
movq -0x20(%rbp), %rax
movb $0x1, 0x380(%rax)
movq -0x20(%rbp), %rax
movl 0xec(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xec(%rax)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x382(%rax)
jne 0xb280f
movq -0x20(%rbp), %rax
movl 0xec(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movb %al, -0x12(%rbp)
movl -0x24(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x13(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x20(%rbp), %rax
movl 0x350(%rax), %edx
leaq -0x13(%rbp), %rcx
leaq 0xa25ef(%rip), %rdi # 0x154ddb
movl $0x26f, %esi # imm = 0x26F
movl $0x3, %r8d
movl $0x18, %r9d
movq $0x4, (%rsp)
callq 0xb2830
movl %eax, -0x4(%rbp)
jmp 0xb281a
jmp 0xb2811
jmp 0xb2813
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_mi_mark_file_changed:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+0F0h]
and eax, 1
cmp eax, 0
jz short loc_B276B
mov rax, [rbp+var_20]
cmp byte ptr [rax+380h], 0
jnz loc_B2811
loc_B276B:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+0F0h]
or ecx, 19h
mov [rax+0F0h], cl
mov rax, [rbp+var_20]
cmp byte ptr [rax+380h], 0
jnz short loc_B27AA
mov rax, [rbp+var_20]
mov byte ptr [rax+380h], 1
mov rax, [rbp+var_20]
mov ecx, [rax+0ECh]
add ecx, 1
mov [rax+0ECh], ecx
loc_B27AA:
mov rax, [rbp+var_20]
cmp byte ptr [rax+382h], 0
jnz short loc_B280F
mov rax, [rbp+var_20]
mov eax, [rax+0ECh]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_12], al
mov eax, [rbp+var_24]
shr eax, 8
mov [rbp+var_13], al
mov [rbp+var_11], 1
mov rax, [rbp+var_20]
mov edx, [rax+350h]
lea rcx, [rbp+var_13]
lea rdi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 26Fh
mov r8d, 3
mov r9d, 18h
mov [rsp+30h+var_30], 4
call inline_mysql_file_pwrite_1
mov [rbp+var_4], eax
jmp short loc_B281A
loc_B280F:
jmp short $+2
loc_B2811:
jmp short $+2
loc_B2813:
mov [rbp+var_4], 0
loc_B281A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long mi_mark_file_changed(long long *a1)
{
__int16 v1; // kr00_2
long long v3; // [rsp+10h] [rbp-20h]
_BYTE v4[3]; // [rsp+1Dh] [rbp-13h] BYREF
long long *v5; // [rsp+20h] [rbp-10h]
v5 = a1;
v3 = *a1;
if ( (*(_BYTE *)(*a1 + 240) & 1) != 0 && *(_BYTE *)(v3 + 896) )
return 0;
*(_BYTE *)(v3 + 240) |= 0x19u;
if ( !*(_BYTE *)(v3 + 896) )
{
*(_BYTE *)(v3 + 896) = 1;
++*(_DWORD *)(v3 + 236);
}
if ( *(_BYTE *)(v3 + 898) )
{
return 0;
}
else
{
v1 = *(_DWORD *)(v3 + 236);
v4[0] = HIBYTE(v1);
v4[1] = v1;
v4[2] = 1;
return (unsigned int)inline_mysql_file_pwrite_1(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c",
623,
*(_DWORD *)(v3 + 848),
(unsigned int)v4,
3,
24,
4LL);
}
}
|
_mi_mark_file_changed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0xf0]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001b276b
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x380],0x0
JNZ 0x001b2811
LAB_001b276b:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0xf0]
OR ECX,0x19
MOV byte ptr [RAX + 0xf0],CL
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x380],0x0
JNZ 0x001b27aa
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x380],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0xec]
ADD ECX,0x1
MOV dword ptr [RAX + 0xec],ECX
LAB_001b27aa:
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x382],0x0
JNZ 0x001b280f
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0xec]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV byte ptr [RBP + -0x12],AL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x8
MOV byte ptr [RBP + -0x13],AL
MOV byte ptr [RBP + -0x11],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX + 0x350]
LEA RCX,[RBP + -0x13]
LEA RDI,[0x254ddb]
MOV ESI,0x26f
MOV R8D,0x3
MOV R9D,0x18
MOV qword ptr [RSP],0x4
CALL 0x001b2830
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b281a
LAB_001b280f:
JMP 0x001b2811
LAB_001b2811:
JMP 0x001b2813
LAB_001b2813:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b281a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 _mi_mark_file_changed(long *param_1)
{
long lVar1;
int4 uVar2;
int1 local_1b;
int1 local_1a;
int1 local_19;
long *local_18;
lVar1 = *param_1;
if (((*(byte *)(lVar1 + 0xf0) & 1) == 0) || (*(char *)(lVar1 + 0x380) == '\0')) {
*(byte *)(lVar1 + 0xf0) = *(byte *)(lVar1 + 0xf0) | 0x19;
if (*(char *)(lVar1 + 0x380) == '\0') {
*(int1 *)(lVar1 + 0x380) = 1;
*(int *)(lVar1 + 0xec) = *(int *)(lVar1 + 0xec) + 1;
}
if (*(char *)(lVar1 + 0x382) == '\0') {
local_1a = (int1)*(int4 *)(lVar1 + 0xec);
local_1b = (int1)((uint)*(int4 *)(lVar1 + 0xec) >> 8);
local_19 = 1;
local_18 = param_1;
uVar2 = inline_mysql_file_pwrite
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c",
0x26f,*(int4 *)(lVar1 + 0x350),&local_1b,3,0x18,4);
return uVar2;
}
}
return 0;
}
|
|
18,693
|
testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
std::string JsonUnitTestResultPrinter::EscapeJson(const std::string& str) {
Message m;
for (size_t i = 0; i < str.size(); ++i) {
const char ch = str[i];
switch (ch) {
case '\\':
case '"':
case '/':
m << '\\' << ch;
break;
case '\b':
m << "\\b";
break;
case '\t':
m << "\\t";
break;
case '\n':
m << "\\n";
break;
case '\f':
m << "\\f";
break;
case '\r':
m << "\\r";
break;
default:
if (ch < ' ') {
m << "\\u00" << String::FormatByte(static_cast<unsigned char>(ch));
} else {
m << ch;
}
break;
}
}
return m.GetString();
}
|
O1
|
cpp
|
testing::internal::JsonUnitTestResultPrinter::EscapeJson(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 $0x38, %rsp
movq %rsi, %r14
movq %rdi, 0x30(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x1cd64
cmpq $0x0, 0x8(%r14)
je 0x29272
movq 0x8(%rsp), %r15
addq $0x10, %r15
xorl %r13d, %r13d
leaq 0x10(%rsp), %rbx
movq (%r14), %rax
movb (%rax,%r13), %r12b
movzbl %r12b, %ebp
leal -0x8(%rbp), %eax
cmpl $0x5, %eax
ja 0x2918a
leaq 0x17c02(%rip), %rcx # 0x40d70
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x1a4c0(%rip), %rsi # 0x4363c
jmpq *%rax
leaq 0x1a4b4(%rip), %rsi # 0x43639
jmp 0x2923f
leal -0x22(%rbp), %eax
cmpl $0x3a, %eax
ja 0x291ce
movabsq $0x400000000002001, %rcx # imm = 0x400000000002001
btq %rax, %rcx
jae 0x291ce
movb $0x5c, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x85b0
movb %r12b, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x85b0
jmp 0x2924c
cmpb $0x1f, %r12b
jg 0x2925b
movl $0x4, %edx
movq %r15, %rdi
leaq 0x1a461(%rip), %rsi # 0x43648
callq 0x85b0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1faae
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x85b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2924c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x2924c
leaq 0x1a415(%rip), %rsi # 0x43642
jmp 0x2923f
leaq 0x1a40f(%rip), %rsi # 0x43645
jmp 0x2923f
leaq 0x1a400(%rip), %rsi # 0x4363f
movl $0x2, %edx
movq %r15, %rdi
callq 0x85b0
incq %r13
cmpq 0x8(%r14), %r13
jb 0x29154
jmp 0x29272
movb %r12b, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x85b0
jmp 0x2924c
movq 0x8(%rsp), %r14
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cfc7
testq %r14, %r14
je 0x29295
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x292ce
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x292d1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x292d1
jmp 0x292ce
jmp 0x292ce
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x292e1
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x8990
nop
|
_ZN7testing8internal25JsonUnitTestResultPrinter10EscapeJsonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov [rsp+68h+var_38], rdi
lea rdi, [rsp+68h+var_60]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
cmp qword ptr [r14+8], 0
jz loc_29272
mov r15, [rsp+68h+var_60]
add r15, 10h
xor r13d, r13d
lea rbx, [rsp+68h+var_58]
loc_29154:
mov rax, [r14]
mov r12b, [rax+r13]
movzx ebp, r12b
lea eax, [rbp-8]; switch 6 cases
cmp eax, 5
ja short def_2917C; jumptable 000000000002917C default case
lea rcx, jpt_2917C
movsxd rax, ds:(jpt_2917C - 40D70h)[rcx+rax*4]
add rax, rcx
lea rsi, aT; "\\t"
jmp rax; switch jump
loc_2917E:
lea rsi, aB; jumptable 000000000002917C case 8
jmp loc_2923F; jumptable 000000000002917C case 9
def_2917C:
lea eax, [rbp-22h]; jumptable 000000000002917C default case
cmp eax, 3Ah ; ':'
ja short loc_291CE; jumptable 000000000002917C case 11
mov rcx, 400000000002001h
bt rcx, rax
jnb short loc_291CE; jumptable 000000000002917C case 11
mov byte ptr [rsp+68h+var_58], 5Ch ; '\'
mov edx, 1
mov rdi, r15
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov byte ptr [rsp+68h+var_58], r12b
mov edx, 1
mov rdi, r15
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_2924C
loc_291CE:
cmp r12b, 1Fh; jumptable 000000000002917C case 11
jg loc_2925B
mov edx, 4
mov rdi, r15
lea rsi, aU00; "\\u00"
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, ebp
call _ZN7testing8internal6String10FormatByteB5cxx11Eh; testing::internal::String::FormatByte(uchar)
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+68h+var_58]; void *
lea rax, [rsp+68h+var_48]
cmp rdi, rax
jz short loc_2924C
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2924C
loc_29226:
lea rsi, asc_43642; jumptable 000000000002917C case 12
jmp short loc_2923F; jumptable 000000000002917C case 9
loc_2922F:
lea rsi, aR; jumptable 000000000002917C case 13
jmp short loc_2923F; jumptable 000000000002917C case 9
loc_29238:
lea rsi, aN; jumptable 000000000002917C case 10
loc_2923F:
mov edx, 2; jumptable 000000000002917C case 9
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_2924C:
inc r13
cmp r13, [r14+8]
jb loc_29154
jmp short loc_29272
loc_2925B:
mov byte ptr [rsp+68h+var_58], r12b
mov edx, 1
mov rdi, r15
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_2924C
loc_29272:
mov r14, [rsp+68h+var_60]
mov rbx, [rsp+68h+var_38]
mov rdi, rbx
mov rsi, r14
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
test r14, r14
jz short loc_29295
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
loc_29295:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_292CE
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
lea rax, [rsp+arg_18]
cmp rdi, rax
jz short loc_292D1
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_292D1
jmp short loc_292CE
jmp short $+2
loc_292CE:
mov rbx, rax
loc_292D1:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_292E1
mov rax, [rdi]
call qword ptr [rax+8]
loc_292E1:
mov rdi, rbx
call __Unwind_Resume
|
long long testing::internal::JsonUnitTestResultPrinter::EscapeJson(long long a1, _QWORD *a2)
{
long long v3; // r15
unsigned long long v4; // r13
unsigned __int8 v5; // r12
const char *v6; // rsi
unsigned long long v7; // rax
long long v8; // rcx
long long v9; // r14
long long v10; // rbx
long long v12; // [rsp+8h] [rbp-60h] BYREF
void *v13[2]; // [rsp+10h] [rbp-58h] BYREF
long long v14; // [rsp+20h] [rbp-48h] BYREF
long long v15; // [rsp+30h] [rbp-38h]
v15 = a1;
testing::Message::Message((testing::Message *)&v12);
if ( a2[1] )
{
v3 = v12 + 16;
v4 = 0LL;
do
{
v5 = *(_BYTE *)(*a2 + v4);
v6 = "\\t";
switch ( v5 )
{
case 8u:
v6 = "\\b";
goto LABEL_14;
case 9u:
goto LABEL_14;
case 0xAu:
v6 = "\\n";
goto LABEL_14;
case 0xBu:
goto LABEL_8;
case 0xCu:
v6 = "\\f";
goto LABEL_14;
case 0xDu:
v6 = "\\r";
LABEL_14:
std::__ostream_insert<char,std::char_traits<char>>(v3, v6, 2LL);
break;
default:
v7 = (unsigned int)v5 - 34;
if ( (unsigned int)v7 <= 0x3A && (v8 = 0x400000000002001LL, _bittest64(&v8, v7)) )
{
LOBYTE(v13[0]) = 92;
std::__ostream_insert<char,std::char_traits<char>>(v3, v13, 1LL);
LOBYTE(v13[0]) = v5;
std::__ostream_insert<char,std::char_traits<char>>(v3, v13, 1LL);
}
else
{
LABEL_8:
if ( (char)v5 > 31 )
{
LOBYTE(v13[0]) = *(_BYTE *)(*a2 + v4);
std::__ostream_insert<char,std::char_traits<char>>(v3, v13, 1LL);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(v3, "\\u00", 4LL);
testing::internal::String::FormatByte[abi:cxx11]((long long)v13, v5);
std::__ostream_insert<char,std::char_traits<char>>(v3, v13[0], v13[1]);
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
}
}
break;
}
++v4;
}
while ( v4 < a2[1] );
}
v9 = v12;
v10 = v15;
testing::internal::StringStreamToString(v15, v12);
if ( v9 )
(*(void ( **)(long long))(*(_QWORD *)v9 + 8LL))(v9);
return v10;
}
|
EscapeJson:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV qword ptr [RSP + 0x30],RDI
LEA RDI,[RSP + 0x8]
CALL 0x0011cd64
CMP qword ptr [R14 + 0x8],0x0
JZ 0x00129272
MOV R15,qword ptr [RSP + 0x8]
ADD R15,0x10
XOR R13D,R13D
LEA RBX,[RSP + 0x10]
LAB_00129154:
MOV RAX,qword ptr [R14]
MOV R12B,byte ptr [RAX + R13*0x1]
MOVZX EBP,R12B
LEA EAX,[RBP + -0x8]
CMP EAX,0x5
JA 0x0012918a
LEA RCX,[0x140d70]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
LEA RSI,[0x14363c]
switchD:
JMP RAX
caseD_8:
LEA RSI,[0x143639]
JMP 0x0012923f
default:
LEA EAX,[RBP + -0x22]
CMP EAX,0x3a
JA 0x001291ce
MOV RCX,0x400000000002001
BT RCX,RAX
JNC 0x001291ce
MOV byte ptr [RSP + 0x10],0x5c
LAB_001291a7:
MOV EDX,0x1
MOV RDI,R15
MOV RSI,RBX
CALL 0x001085b0
MOV byte ptr [RSP + 0x10],R12B
MOV EDX,0x1
MOV RDI,R15
MOV RSI,RBX
CALL 0x001085b0
JMP 0x0012924c
caseD_b:
CMP R12B,0x1f
JG 0x0012925b
LAB_001291d8:
MOV EDX,0x4
MOV RDI,R15
LEA RSI,[0x143648]
CALL 0x001085b0
LAB_001291ec:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0011faae
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_00129200:
MOV RDI,R15
CALL 0x001085b0
MOV RDI,qword ptr [RSP + 0x10]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x0012924c
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001084e0
JMP 0x0012924c
caseD_c:
LEA RSI,[0x143642]
JMP 0x0012923f
caseD_d:
LEA RSI,[0x143645]
JMP 0x0012923f
caseD_a:
LEA RSI,[0x14363f]
caseD_9:
MOV EDX,0x2
MOV RDI,R15
CALL 0x001085b0
LAB_0012924c:
INC R13
CMP R13,qword ptr [R14 + 0x8]
JC 0x00129154
JMP 0x00129272
LAB_0012925b:
MOV byte ptr [RSP + 0x10],R12B
MOV EDX,0x1
MOV RDI,R15
MOV RSI,RBX
CALL 0x001085b0
JMP 0x0012924c
LAB_00129272:
MOV R14,qword ptr [RSP + 0x8]
LAB_00129277:
MOV RBX,qword ptr [RSP + 0x30]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011cfc7
LAB_00129287:
TEST R14,R14
JZ 0x00129295
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX + 0x8]
LAB_00129295:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::__cxx11::string const&) */
stringstream * __thiscall
testing::internal::JsonUnitTestResultPrinter::EscapeJson
(JsonUnitTestResultPrinter *this,string *param_1)
{
byte bVar1;
JsonUnitTestResultPrinter *pJVar2;
char *pcVar3;
ulong uVar4;
ostream *poVar5;
long *local_60;
byte local_58;
int7 uStack_57;
long local_50;
long local_48 [2];
JsonUnitTestResultPrinter *local_38;
local_38 = this;
Message::Message((Message *)&local_60);
if (*(long *)(param_1 + 8) != 0) {
poVar5 = (ostream *)(local_60 + 2);
uVar4 = 0;
do {
bVar1 = *(byte *)(*(long *)param_1 + uVar4);
pcVar3 = "\\t";
switch(bVar1) {
case 8:
pcVar3 = "\\b";
break;
case 9:
break;
case 10:
pcVar3 = "\\n";
break;
case 0xb:
switchD_0012917c_caseD_b:
if ((char)bVar1 < ' ') {
/* try { // try from 001291d8 to 001291eb has its CatchHandler @ 001292ce */
std::__ostream_insert<char,std::char_traits<char>>(poVar5,"\\u00",4);
/* try { // try from 001291ec to 001291f5 has its CatchHandler @ 001292ca */
String::FormatByte_abi_cxx11_((uchar)&local_58);
/* try { // try from 00129200 to 00129207 has its CatchHandler @ 001292a9 */
std::__ostream_insert<char,std::char_traits<char>>
(poVar5,(char *)CONCAT71(uStack_57,local_58),local_50);
if ((long *)CONCAT71(uStack_57,local_58) != local_48) {
operator_delete((long *)CONCAT71(uStack_57,local_58),local_48[0] + 1);
}
}
else {
local_58 = bVar1;
std::__ostream_insert<char,std::char_traits<char>>(poVar5,(char *)&local_58,1);
}
goto LAB_0012924c;
case 0xc:
pcVar3 = "\\f";
break;
case 0xd:
pcVar3 = "\\r";
break;
default:
if ((0x3a < bVar1 - 0x22) ||
((0x400000000002001U >> ((ulong)(bVar1 - 0x22) & 0x3f) & 1) == 0))
goto switchD_0012917c_caseD_b;
local_58 = 0x5c;
/* try { // try from 001291a7 to 001291cb has its CatchHandler @ 001292cc */
std::__ostream_insert<char,std::char_traits<char>>(poVar5,(char *)&local_58,1);
local_58 = bVar1;
std::__ostream_insert<char,std::char_traits<char>>(poVar5,(char *)&local_58,1);
goto LAB_0012924c;
}
/* try { // try from 0012923f to 0012926f has its CatchHandler @ 001292ce */
std::__ostream_insert<char,std::char_traits<char>>(poVar5,pcVar3,2);
LAB_0012924c:
uVar4 = uVar4 + 1;
} while (uVar4 < *(ulong *)(param_1 + 8));
}
pJVar2 = local_38;
/* try { // try from 00129277 to 00129286 has its CatchHandler @ 001292a7 */
StringStreamToString((stringstream *)local_38);
if (local_60 != (long *)0x0) {
(**(code **)(*local_60 + 8))(local_60);
}
return (stringstream *)pJVar2;
}
|
|
18,694
|
ggml_acc_or_set
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
static void ggml_acc_or_set(
struct ggml_context * ctx,
struct ggml_cgraph * cgraph,
size_t isrc,
struct ggml_tensor * tensor,
const size_t nb1,
const size_t nb2,
const size_t nb3,
const size_t offset) {
struct ggml_tensor * src = cgraph->visited_hash_set.keys[isrc];
GGML_ASSERT(src);
if (cgraph->grads[isrc]) {
cgraph->grads[isrc] = ggml_acc_impl(ctx, cgraph->grads[isrc], tensor, nb1, nb2, nb3, offset, cgraph->grad_accs[isrc]);
} else {
struct ggml_tensor * a_zero = ggml_scale(ctx, src, 0.0f); // FIXME this is going to produce NaN if a contains inf/NaN
cgraph->grads[isrc] = ggml_acc_impl(ctx, a_zero, tensor, nb1, nb2, nb3, offset, false);
}
ggml_format_name(cgraph->grads[isrc], "grad for %s", cgraph->visited_hash_set.keys[isrc]->name);
ggml_build_forward_expand(cgraph, cgraph->grads[isrc]);
}
|
O0
|
c
|
ggml_acc_or_set:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
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 -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x5a994
leaq 0x56c3d(%rip), %rdi # 0xb15b7
movl $0x145e, %esi # imm = 0x145E
leaq 0x56c83(%rip), %rdx # 0xb1609
leaq 0x5986f(%rip), %rcx # 0xb41fc
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x5aa10
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
movq 0x18(%rbp), %r11
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %r10
cmpq $0x0, (%rax,%r10,8)
setne %r10b
movq %rsp, %rax
movq %r11, (%rax)
movzbl %r10b, %r10d
andl $0x1, %r10d
movl %r10d, 0x8(%rax)
callq 0x4d100
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x5aa67
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorps %xmm0, %xmm0
callq 0x428a0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
movq 0x18(%rbp), %rax
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x4d100
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x100, %rdx # imm = 0x100
leaq 0x5976b(%rip), %rsi # 0xb4200
movb $0x0, %al
callq 0x481b0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x436a0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
ggml_acc_or_set:
push rbp
mov rbp, rsp
sub rsp, 50h
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_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
mov rax, [rax+rcx*8]
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_5A994
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 145Eh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc; "src"
mov al, 0
call _ggml_abort
loc_5A994:
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_18]
cmp qword ptr [rax+rcx*8], 0
jz short loc_5AA10
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_18]
mov rsi, [rax+rcx*8]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+arg_0]
mov r11, [rbp+arg_8]
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov r10, [rbp+var_18]
cmp qword ptr [rax+r10*8], 0
setnz r10b
mov rax, rsp
mov [rax], r11
movzx r10d, r10b
and r10d, 1
mov [rax+8], r10d
call ggml_acc_impl
mov rdx, rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_18]
mov [rax+rcx*8], rdx
jmp short loc_5AA67
loc_5AA10:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
xorps xmm0, xmm0
call _ggml_scale
mov [rbp+var_40], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+arg_0]
mov rax, [rbp+arg_8]
xor r10d, r10d
mov [rsp+50h+var_50], rax
mov [rsp+50h+var_48], 0
call ggml_acc_impl
mov rdx, rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_18]
mov [rax+rcx*8], rdx
loc_5AA67:
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_18]
mov rdi, [rax+rcx*8]
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
mov rdx, [rax+rcx*8]
add rdx, 100h
lea rsi, aGradForS; "grad for %s"
mov al, 0
call _ggml_format_name
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_18]
mov rsi, [rax+rcx*8]
call _ggml_build_forward_expand
add rsp, 50h
pop rbp
retn
|
long long ggml_acc_or_set(
long long a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
long long a15,
long long a16)
{
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
double v20; // xmm4_8
double v21; // xmm5_8
char v23; // [rsp+0h] [rbp-50h]
unsigned int *v24; // [rsp+10h] [rbp-40h]
long long v25; // [rsp+18h] [rbp-38h]
v25 = *(_QWORD *)(a2[8] + 8 * a3);
if ( !v25 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
5214,
(long long)"GGML_ASSERT(%s) failed",
"src");
if ( *(_QWORD *)(a2[3] + 8 * a3) )
{
*(_QWORD *)(a2[3] + 8 * a3) = ggml_acc_impl(
a1,
*(unsigned int **)(a2[3] + 8 * a3),
a4,
a5,
a6,
a15,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a16,
*(_QWORD *)(a2[4] + 8 * a3) != 0LL);
}
else
{
a7 = 0LL;
v24 = (unsigned int *)ggml_scale(a1, v25, 0.0);
*(_QWORD *)(a2[3] + 8 * a3) = ggml_acc_impl(
a1,
v24,
a4,
a5,
a6,
a15,
(__m128)0LL,
a8,
a9,
a10,
v20,
v21,
a13,
a14,
a16,
0);
}
ggml_format_name(
*(_QWORD *)(a2[3] + 8 * a3),
(long long)"grad for %s",
*(_QWORD *)(a2[8] + 8 * a3) + 256LL,
a3,
v16,
v17,
a7,
a8,
a9,
a10,
v18,
v19,
a13,
a14,
v23);
return ggml_build_forward_expand((long long)a2, *(_QWORD *)(a2[3] + 8 * a3));
}
|
ggml_acc_or_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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 + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0015a994
LEA RDI,[0x1b15b7]
MOV ESI,0x145e
LEA RDX,[0x1b1609]
LEA RCX,[0x1b41fc]
MOV AL,0x0
CALL 0x00148a00
LAB_0015a994:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x0015aa10
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + 0x10]
MOV R11,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV R10,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + R10*0x8],0x0
SETNZ R10B
MOV RAX,RSP
MOV qword ptr [RAX],R11
MOVZX R10D,R10B
AND R10D,0x1
MOV dword ptr [RAX + 0x8],R10D
CALL 0x0014d100
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + RCX*0x8],RDX
JMP 0x0015aa67
LAB_0015aa10:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
XORPS XMM0,XMM0
CALL 0x001428a0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x18]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0x8],0x0
CALL 0x0014d100
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + RCX*0x8],RDX
LAB_0015aa67:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + RCX*0x8]
ADD RDX,0x100
LEA RSI,[0x1b4200]
MOV AL,0x0
CALL 0x001481b0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x001436a0
ADD RSP,0x50
POP RBP
RET
|
void ggml_acc_or_set(int8 param_1,long param_2,long param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8)
{
long lVar1;
int8 uVar2;
lVar1 = *(long *)(*(long *)(param_2 + 0x40) + param_3 * 8);
if (lVar1 == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x145e,"GGML_ASSERT(%s) failed",&DAT_001b41fc);
}
if (*(long *)(*(long *)(param_2 + 0x18) + param_3 * 8) == 0) {
uVar2 = ggml_scale(0,param_1,lVar1);
uVar2 = ggml_acc_impl(param_1,uVar2,param_4,param_5,param_6,param_7,param_8,0);
*(int8 *)(*(long *)(param_2 + 0x18) + param_3 * 8) = uVar2;
}
else {
uVar2 = ggml_acc_impl(param_1,*(int8 *)(*(long *)(param_2 + 0x18) + param_3 * 8),param_4,
param_5,param_6,param_7,param_8,
*(long *)(*(long *)(param_2 + 0x20) + param_3 * 8) != 0);
*(int8 *)(*(long *)(param_2 + 0x18) + param_3 * 8) = uVar2;
}
ggml_format_name(*(int8 *)(*(long *)(param_2 + 0x18) + param_3 * 8),"grad for %s",
*(long *)(*(long *)(param_2 + 0x40) + param_3 * 8) + 0x100);
ggml_build_forward_expand(param_2,*(int8 *)(*(long *)(param_2 + 0x18) + param_3 * 8));
return;
}
|
|
18,695
|
LefDefParser::lefrSetLimitPerMsg(int, int)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefrReader.cpp
|
void
lefrSetLimitPerMsg(int msgId,
int numMsg)
{
LEF_INIT;
char msgStr[10];
if ((msgId <= 0) || (msgId >= NOLEFMSG)) {
sprintf(msgStr, "%d", msgId);
lefError(204, msgStr);
return;
}
lefSettings->MsgLimit[msgId] = numMsg;
}
|
O0
|
cpp
|
LefDefParser::lefrSetLimitPerMsg(int, int):
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
leaq 0x48b83(%rip), %rdi # 0x79e46
callq 0x30e40
cmpl $0x0, 0x14(%rsp)
jle 0x312d9
cmpl $0x125d, 0x14(%rsp) # imm = 0x125D
jl 0x31301
leaq 0x6(%rsp), %rdi
movl 0x14(%rsp), %edx
leaq 0x452d8(%rip), %rsi # 0x765c1
movb $0x0, %al
callq 0x2050
leaq 0x6(%rsp), %rsi
movl $0xcc, %edi
callq 0x34fa0
jmp 0x3131b
movl 0x10(%rsp), %edx
leaq 0x7140c(%rip), %rax # 0xa2718
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movl %edx, 0x130(%rax,%rcx,4)
addq $0x18, %rsp
retq
|
_ZN12LefDefParser18lefrSetLimitPerMsgEii:
sub rsp, 18h
mov [rsp+18h+var_4], edi
mov [rsp+18h+var_8], esi
lea rdi, aLefrsetlimitpe; "lefrSetLimitPerMsg"
call _ZN12LefDefParser8lef_initEPKc; LefDefParser::lef_init(char const*)
cmp [rsp+18h+var_4], 0
jle short loc_312D9
cmp [rsp+18h+var_4], 125Dh
jl short loc_31301
loc_312D9:
lea rdi, [rsp+18h+var_12]
mov edx, [rsp+18h+var_4]
lea rsi, aMaxviastackD+0Ch; "%d"
mov al, 0
call _sprintf
lea rsi, [rsp+18h+var_12]; int
mov edi, (offset qword_C8+4); this
call _ZN12LefDefParser8lefErrorEiPKc; LefDefParser::lefError(int,char const*)
jmp short loc_3131B
loc_31301:
mov edx, [rsp+18h+var_8]
lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rax, [rax]
movsxd rcx, [rsp+18h+var_4]
mov [rax+rcx*4+130h], edx
loc_3131B:
add rsp, 18h
retn
|
LefDefParser::lefrSettings * LefDefParser::lefrSetLimitPerMsg(LefDefParser *this, const char *a2)
{
const char *v2; // rdx
LefDefParser::lefrSettings *result; // rax
int v4[2]; // [rsp+6h] [rbp-12h] BYREF
int v5; // [rsp+10h] [rbp-8h]
int v6; // [rsp+14h] [rbp-4h]
v6 = (int)this;
v5 = (int)a2;
LefDefParser::lef_init((LefDefParser *)"lefrSetLimitPerMsg", a2);
if ( (int)this > 0 && v6 < 4701 )
{
result = LefDefParser::lefSettings;
*((_DWORD *)LefDefParser::lefSettings + v6 + 76) = v5;
}
else
{
sprintf(v4, "%d", v6);
return (LefDefParser::lefrSettings *)LefDefParser::lefError((LefDefParser *)((char *)&qword_C8 + 4), (int)v4, v2);
}
return result;
}
|
lefrSetLimitPerMsg:
SUB RSP,0x18
MOV dword ptr [RSP + 0x14],EDI
MOV dword ptr [RSP + 0x10],ESI
LEA RDI,[0x179e46]
CALL 0x00130e40
CMP dword ptr [RSP + 0x14],0x0
JLE 0x001312d9
CMP dword ptr [RSP + 0x14],0x125d
JL 0x00131301
LAB_001312d9:
LEA RDI,[RSP + 0x6]
MOV EDX,dword ptr [RSP + 0x14]
LEA RSI,[0x1765c1]
MOV AL,0x0
CALL 0x00102050
LEA RSI,[RSP + 0x6]
MOV EDI,0xcc
CALL 0x00134fa0
JMP 0x0013131b
LAB_00131301:
MOV EDX,dword ptr [RSP + 0x10]
LEA RAX,[0x1a2718]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0x14]
MOV dword ptr [RAX + RCX*0x4 + 0x130],EDX
LAB_0013131b:
ADD RSP,0x18
RET
|
/* LefDefParser::lefrSetLimitPerMsg(int, int) */
void LefDefParser::lefrSetLimitPerMsg(int param_1,int param_2)
{
char local_12 [10];
int local_8;
uint local_4;
local_8 = param_2;
local_4 = param_1;
lef_init("lefrSetLimitPerMsg");
if (((int)local_4 < 1) || (0x125c < (int)local_4)) {
sprintf(local_12,"%d",(ulong)local_4);
lefError(0xcc,local_12);
}
else {
*(int *)(lefSettings + 0x130 + (long)(int)local_4 * 4) = local_8;
}
return;
}
|
|
18,696
|
ma_log_new
|
eloqsql/storage/maria/ma_write.c
|
my_bool _ma_log_new(MARIA_PAGE *ma_page, my_bool root_page)
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE * 2 + KEY_NR_STORE_SIZE
+1];
uint page_length;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
MARIA_HA *info= ma_page->info;
MARIA_SHARE *share= info->s;
my_off_t page= ma_page->pos / share->block_size;
DBUG_ENTER("_ma_log_new");
DBUG_PRINT("enter", ("page: %lu", (ulong) page));
DBUG_ASSERT(share->now_transactional);
/* Store address of new root page */
page_store(log_data + FILEID_STORE_SIZE, page);
/* Store link to next unused page */
if (info->key_del_used == 2)
page= 0; /* key_del not changed */
else
page= ((share->key_del_current == HA_OFFSET_ERROR) ? IMPOSSIBLE_PAGE_NO :
share->key_del_current / share->block_size);
page_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, page);
key_nr_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE*2,
ma_page->keyinfo->key_nr);
log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE*2 + KEY_NR_STORE_SIZE]=
(uchar) root_page;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
page_length= ma_page->size - LSN_STORE_SIZE;
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= ma_page->buff + LSN_STORE_SIZE;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= page_length;
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
if (translog_write_record(&lsn, LOGREC_REDO_INDEX_NEW_PAGE,
info->trn, info,
(translog_size_t)
(sizeof(log_data) + page_length),
TRANSLOG_INTERNAL_PARTS + 2, log_array,
log_data, NULL))
DBUG_RETURN(1);
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_log_new:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movb %sil, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x90(%rbp), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x98(%rbp)
jmp 0x682f4
jmp 0x682f6
jmp 0x682f8
jmp 0x682fa
leaq -0x16(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movl %eax, %ecx
movq -0xa0(%rbp), %rax
movl %ecx, (%rax)
movq -0x98(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xa0(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x88(%rbp), %rax
movzbl 0x67e(%rax), %eax
cmpl $0x2, %eax
jne 0x68352
movq $0x0, -0x98(%rbp)
jmp 0x683ab
movq -0x90(%rbp), %rax
cmpq $-0x1, 0x700(%rax)
jne 0x68376
movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF
movq %rax, -0xb0(%rbp)
jmp 0x6839d
movq -0x90(%rbp), %rax
movq 0x700(%rax), %rax
movq -0x90(%rbp), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x683ad
leaq -0x16(%rbp), %rax
addq $0x2, %rax
addq $0x5, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, (%rax)
movq -0x98(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xa8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movb 0xa5(%rax), %al
movb %al, -0xa(%rbp)
movb -0x21(%rbp), %al
movb %al, -0x9(%rbp)
leaq -0x16(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0xe, -0x58(%rbp)
movq -0x20(%rbp), %rax
movl 0x20(%rax), %eax
subl $0x7, %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x7, %rax
movq %rax, -0x50(%rbp)
movl -0x34(%rbp), %eax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x88(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x88(%rbp), %rcx
movl -0x34(%rbp), %eax
addq $0xe, %rax
movl %eax, %r8d
leaq -0x80(%rbp), %r10
leaq -0x16(%rbp), %rax
leaq -0x30(%rbp), %rdi
movl $0xd, %esi
movl $0x4, %r9d
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x32020
cmpb $0x0, %al
je 0x6849b
jmp 0x68495
movb $0x1, -0x17(%rbp)
jmp 0x684a1
jmp 0x6849d
movb $0x0, -0x17(%rbp)
movb -0x17(%rbp), %al
movb %al, -0xb1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x684cb
movb -0xb1(%rbp), %al
addq $0xd0, %rsp
popq %rbp
retq
callq 0x2a260
|
_ma_log_new:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov al, sil
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_20], rdi
mov [rbp+var_21], al
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_88], rax
mov rax, [rbp+var_88]
mov rax, [rax]
mov [rbp+var_90], rax
mov rax, [rbp+var_20]
mov rax, [rax+18h]
mov rcx, [rbp+var_90]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_98], rax
jmp short $+2
loc_682F4:
jmp short $+2
loc_682F6:
jmp short $+2
loc_682F8:
jmp short $+2
loc_682FA:
lea rax, [rbp+var_16]
add rax, 2
mov [rbp+var_A0], rax
mov rax, [rbp+var_98]
mov ecx, eax
mov rax, [rbp+var_A0]
mov [rax], ecx
mov rax, [rbp+var_98]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_A0]
mov [rax+4], cl
mov rax, [rbp+var_88]
movzx eax, byte ptr [rax+67Eh]
cmp eax, 2
jnz short loc_68352
mov [rbp+var_98], 0
jmp short loc_683AB
loc_68352:
mov rax, [rbp+var_90]
cmp qword ptr [rax+700h], 0FFFFFFFFFFFFFFFFh
jnz short loc_68376
mov rax, 0FFFFFFFFFFh
mov [rbp+var_B0], rax
jmp short loc_6839D
loc_68376:
mov rax, [rbp+var_90]
mov rax, [rax+700h]
mov rcx, [rbp+var_90]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_B0], rax
loc_6839D:
mov rax, [rbp+var_B0]
mov [rbp+var_98], rax
loc_683AB:
jmp short $+2
loc_683AD:
lea rax, [rbp+var_16]
add rax, 2
add rax, 5
mov [rbp+var_A8], rax
mov rax, [rbp+var_98]
mov ecx, eax
mov rax, [rbp+var_A8]
mov [rax], ecx
mov rax, [rbp+var_98]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_A8]
mov [rax+4], cl
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov al, [rax+0A5h]
mov [rbp+var_A], al
mov al, [rbp+var_21]
mov [rbp+var_9], al
lea rax, [rbp+var_16]
mov [rbp+var_60], rax
mov [rbp+var_58], 0Eh
mov rax, [rbp+var_20]
mov eax, [rax+20h]
sub eax, 7
mov [rbp+var_34], eax
mov rax, [rbp+var_20]
mov rax, [rax+10h]
add rax, 7
mov [rbp+var_50], rax
mov eax, [rbp+var_34]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov ecx, [rax+20h]
mov rax, [rbp+var_20]
mov [rax+24h], ecx
mov rax, [rbp+var_88]
mov rdx, [rax+8]
mov rcx, [rbp+var_88]
mov eax, [rbp+var_34]
add rax, 0Eh
mov r8d, eax
lea r10, [rbp+var_80]
lea rax, [rbp+var_16]
lea rdi, [rbp+var_30]
mov esi, 0Dh
mov r9d, 4
xor r11d, r11d
mov [rsp+0D0h+var_D0], r10
mov [rsp+0D0h+var_C8], rax
mov [rsp+0D0h+var_C0], 0
call translog_write_record
cmp al, 0
jz short loc_6849B
jmp short $+2
loc_68495:
mov [rbp+var_17], 1
jmp short loc_684A1
loc_6849B:
jmp short $+2
loc_6849D:
mov [rbp+var_17], 0
loc_684A1:
mov al, [rbp+var_17]
mov [rbp+var_B1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_684CB
mov al, [rbp+var_B1]
add rsp, 0D0h
pop rbp
retn
loc_684CB:
call ___stack_chk_fail
|
bool ma_log_new(long long **a1, char a2)
{
unsigned long long v3; // [rsp+20h] [rbp-B0h]
unsigned long long v4; // [rsp+38h] [rbp-98h]
unsigned long long v5; // [rsp+38h] [rbp-98h]
long long v6; // [rsp+40h] [rbp-90h]
long long *v7; // [rsp+48h] [rbp-88h]
_QWORD v8[9]; // [rsp+50h] [rbp-80h] BYREF
unsigned int v9; // [rsp+9Ch] [rbp-34h]
_BYTE v10[15]; // [rsp+A0h] [rbp-30h] BYREF
char v11; // [rsp+AFh] [rbp-21h]
long long **v12; // [rsp+B0h] [rbp-20h]
__int16 v13; // [rsp+BAh] [rbp-16h] BYREF
int v14; // [rsp+BCh] [rbp-14h]
char v15; // [rsp+C0h] [rbp-10h]
int v16; // [rsp+C1h] [rbp-Fh]
char v17; // [rsp+C5h] [rbp-Bh]
char v18; // [rsp+C6h] [rbp-Ah]
char v19; // [rsp+C7h] [rbp-9h]
unsigned long long v20; // [rsp+C8h] [rbp-8h]
v20 = __readfsqword(0x28u);
v12 = a1;
v11 = a2;
v7 = *a1;
v6 = **a1;
v4 = (unsigned long long)a1[3] / *(unsigned int *)(v6 + 1980);
v14 = v4;
v15 = BYTE4(v4);
if ( *((_BYTE *)v7 + 1662) == 2 )
{
v5 = 0LL;
}
else
{
if ( *(_QWORD *)(v6 + 1792) == -1LL )
v3 = 0xFFFFFFFFFFLL;
else
v3 = *(_QWORD *)(v6 + 1792) / (unsigned long long)*(unsigned int *)(v6 + 1980);
v5 = v3;
}
v16 = v5;
v17 = BYTE4(v5);
v18 = *((_BYTE *)v12[1] + 165);
v19 = v11;
v8[4] = &v13;
v8[5] = 14LL;
v9 = *((_DWORD *)v12 + 8) - 7;
v8[6] = (char *)v12[2] + 7;
v8[7] = v9;
*((_DWORD *)v12 + 9) = *((_DWORD *)v12 + 8);
return translog_write_record((long long)v10, 0xDu, v7[1], v7, v9 + 14, 4u, v8, &v13, 0LL) != 0;
}
|
_ma_log_new:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV AL,SIL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x20],RDI
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x90]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001682f4
LAB_001682f4:
JMP 0x001682f6
LAB_001682f6:
JMP 0x001682f8
LAB_001682f8:
JMP 0x001682fa
LAB_001682fa:
LEA RAX,[RBP + -0x16]
ADD RAX,0x2
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xa0]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x98]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xa0]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x88]
MOVZX EAX,byte ptr [RAX + 0x67e]
CMP EAX,0x2
JNZ 0x00168352
MOV qword ptr [RBP + -0x98],0x0
JMP 0x001683ab
LAB_00168352:
MOV RAX,qword ptr [RBP + -0x90]
CMP qword ptr [RAX + 0x700],-0x1
JNZ 0x00168376
MOV RAX,0xffffffffff
MOV qword ptr [RBP + -0xb0],RAX
JMP 0x0016839d
LAB_00168376:
MOV RAX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RAX + 0x700]
MOV RCX,qword ptr [RBP + -0x90]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xb0],RAX
LAB_0016839d:
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0x98],RAX
LAB_001683ab:
JMP 0x001683ad
LAB_001683ad:
LEA RAX,[RBP + -0x16]
ADD RAX,0x2
ADD RAX,0x5
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x98]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xa8]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV AL,byte ptr [RAX + 0xa5]
MOV byte ptr [RBP + -0xa],AL
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0x9],AL
LEA RAX,[RBP + -0x16]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x58],0xe
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x20]
SUB EAX,0x7
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
ADD RAX,0x7
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x88]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x88]
MOV EAX,dword ptr [RBP + -0x34]
ADD RAX,0xe
MOV R8D,EAX
LEA R10,[RBP + -0x80]
LEA RAX,[RBP + -0x16]
LEA RDI,[RBP + -0x30]
MOV ESI,0xd
MOV R9D,0x4
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00132020
CMP AL,0x0
JZ 0x0016849b
JMP 0x00168495
LAB_00168495:
MOV byte ptr [RBP + -0x17],0x1
JMP 0x001684a1
LAB_0016849b:
JMP 0x0016849d
LAB_0016849d:
MOV byte ptr [RBP + -0x17],0x0
LAB_001684a1:
MOV AL,byte ptr [RBP + -0x17]
MOV byte ptr [RBP + -0xb1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001684cb
MOV AL,byte ptr [RBP + -0xb1]
ADD RSP,0xd0
POP RBP
RET
LAB_001684cb:
CALL 0x0012a260
|
int8 _ma_log_new(long *param_1,int1 param_2)
{
long *plVar1;
long lVar2;
char cVar3;
ulong uVar4;
long in_FS_OFFSET;
ulong local_b8;
ulong local_a0;
int1 local_88 [32];
int1 *local_68;
int8 local_60;
long local_58;
ulong local_50;
uint local_3c;
int1 local_38 [15];
int1 local_29;
long *local_28;
int1 local_1f;
int1 local_1e [2];
int4 local_1c;
int1 local_18;
int4 local_17;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
lVar2 = *plVar1;
uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(lVar2 + 0x7bc);
local_1c = (int4)uVar4;
local_18 = (int1)(uVar4 >> 0x20);
if (*(char *)((long)plVar1 + 0x67e) == '\x02') {
local_a0 = 0;
}
else {
if (*(long *)(lVar2 + 0x700) == -1) {
local_b8 = 0xffffffffff;
}
else {
local_b8 = *(ulong *)(lVar2 + 0x700) / (ulong)*(uint *)(lVar2 + 0x7bc);
}
local_a0 = local_b8;
}
local_17 = (int4)local_a0;
local_13 = (int1)(local_a0 >> 0x20);
local_12 = *(int1 *)(param_1[1] + 0xa5);
local_68 = local_1e;
local_60 = 0xe;
local_3c = (int)param_1[4] - 7;
local_58 = param_1[2] + 7;
local_50 = (ulong)local_3c;
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
local_29 = param_2;
local_28 = param_1;
local_11 = param_2;
cVar3 = translog_write_record
(local_38,0xd,plVar1[1],plVar1,(int)param_1[4] + 7,4,local_88,local_1e,0);
local_1f = cVar3 != '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1f);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,697
|
ma_zlib_ctx_init
|
eloqsql/libmariadb/plugins/compress/c_zlib.c
|
static ma_compress_ctx *ma_zlib_ctx_init(int compression_level)
{
ma_compress_ctx *ctx;
if (!(ctx = (ma_compress_ctx *)calloc(1, sizeof(ma_compress_ctx))))
return NULL;
ctx->compression_level= (compression_level == COMPRESSION_LEVEL_DEFAULT) ?
Z_DEFAULT_COMPRESSION : compression_level;
return ctx;
}
|
O0
|
c
|
ma_zlib_ctx_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x132c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x41b2e
movq $0x0, -0x8(%rbp)
jmp 0x41b59
cmpl $0x7fffffff, -0xc(%rbp) # imm = 0x7FFFFFFF
jne 0x41b41
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x1c(%rbp)
jmp 0x41b47
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_zlib_ctx_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
mov edi, 1
mov esi, 20h ; ' '
call _calloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_41B2E
mov [rbp+var_8], 0
jmp short loc_41B59
loc_41B2E:
cmp [rbp+var_C], 7FFFFFFFh
jnz short loc_41B41
mov eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
jmp short loc_41B47
loc_41B41:
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
loc_41B47:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov [rax+10h], ecx
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_41B59:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long ma_zlib_ctx_init(int a1)
{
int v2; // [rsp+4h] [rbp-1Ch]
long long v3; // [rsp+8h] [rbp-18h]
v3 = calloc(1LL, 32LL);
if ( !v3 )
return 0LL;
if ( a1 == 0x7FFFFFFF )
v2 = -1;
else
v2 = a1;
*(_DWORD *)(v3 + 16) = v2;
return v3;
}
|
ma_zlib_ctx_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
MOV EDI,0x1
MOV ESI,0x20
CALL 0x001132c0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00141b2e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00141b59
LAB_00141b2e:
CMP dword ptr [RBP + -0xc],0x7fffffff
JNZ 0x00141b41
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00141b47
LAB_00141b41:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
LAB_00141b47:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00141b59:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
void * ma_zlib_ctx_init(int param_1)
{
int local_24;
void *local_10;
local_10 = calloc(1,0x20);
if (local_10 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
local_24 = param_1;
if (param_1 == 0x7fffffff) {
local_24 = -1;
}
*(int *)((long)local_10 + 0x10) = local_24;
}
return local_10;
}
|
|
18,698
|
xconf_echo
|
xtate/src/xconf.c
|
void xconf_echo(XConf *xconf, FILE *fp) {
unsigned i;
/*
* Print all configuration parameters
*/
xconf->echo = fp;
CONFIG_SET_PARAM tmp = NULL;
for (i = 0; config_parameters[i].name; i++) {
/**
* We may use same `set` func more than one times back-to-back
* in config_paramiters.
* Do a dedup easily when echoing.
*/
if (config_parameters[i].setter == tmp)
continue;
tmp = config_parameters[i].setter;
config_parameters[i].setter(xconf, 0, 0);
}
xconf->echo = 0;
xconf->echo_all = 0;
}
|
O3
|
c
|
xconf_echo:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, 0x2a8(%rdi)
cmpq $0x0, 0x42f7e(%rip) # 0x9e8c0
je 0x5b97e
leaq 0x42f75(%rip), %r14 # 0x9e8c0
movl $0x1, %ebp
xorl %eax, %eax
movq %r14, %rcx
movq 0x8(%rcx), %r15
cmpq %rax, %r15
je 0x5b96b
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *%r15
movq %r15, %rax
movl %ebp, %ecx
imulq $0x68, %rcx, %rdx
leaq (%r14,%rdx), %rcx
incl %ebp
cmpq $0x0, (%rdx,%r14)
jne 0x5b955
movq $0x0, 0x2a8(%rbx)
movl $0x0, 0x2b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
xconf_echo:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov [rdi+2A8h], rsi
cmp cs:config_parameters, 0
jz short loc_5B97E
lea r14, config_parameters
mov ebp, 1
xor eax, eax
mov rcx, r14
loc_5B955:
mov r15, [rcx+8]
cmp r15, rax
jz short loc_5B96B
mov rdi, rbx
xor esi, esi
xor edx, edx
call r15
mov rax, r15
loc_5B96B:
mov ecx, ebp
imul rdx, rcx, 68h ; 'h'
lea rcx, [r14+rdx]
inc ebp
cmp qword ptr [rdx+r14], 0
jnz short loc_5B955
loc_5B97E:
mov qword ptr [rbx+2A8h], 0
mov dword ptr [rbx+2B0h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
char * xconf_echo(long long a1, long long a2)
{
char *result; // rax
unsigned int v3; // ebp
char **v4; // rcx
char *v5; // r15
*(_QWORD *)(a1 + 680) = a2;
if ( config_parameters )
{
v3 = 1;
result = 0LL;
v4 = &config_parameters;
do
{
v5 = v4[1];
if ( v5 != result )
{
((void ( *)(long long, _QWORD, _QWORD))v5)(a1, 0LL, 0LL);
result = v5;
}
v4 = &(&config_parameters)[13 * v3++];
}
while ( *v4 );
}
*(_QWORD *)(a1 + 680) = 0LL;
*(_DWORD *)(a1 + 688) = 0;
return result;
}
|
xconf_echo:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV qword ptr [RDI + 0x2a8],RSI
CMP qword ptr [0x0019e8c0],0x0
JZ 0x0015b97e
LEA R14,[0x19e8c0]
MOV EBP,0x1
XOR EAX,EAX
MOV RCX,R14
LAB_0015b955:
MOV R15,qword ptr [RCX + 0x8]
CMP R15,RAX
JZ 0x0015b96b
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL R15
MOV RAX,R15
LAB_0015b96b:
MOV ECX,EBP
IMUL RDX,RCX,0x68
LEA RCX,[R14 + RDX*0x1]
INC EBP
CMP qword ptr [RDX + R14*0x1],0x0
JNZ 0x0015b955
LAB_0015b97e:
MOV qword ptr [RBX + 0x2a8],0x0
MOV dword ptr [RBX + 0x2b0],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void xconf_echo(long param_1,int8 param_2)
{
code *pcVar1;
long lVar2;
code *pcVar3;
int **ppuVar4;
ulong uVar5;
*(int8 *)(param_1 + 0x2a8) = param_2;
if (config_parameters != (int *)0x0) {
pcVar3 = (code *)0x0;
ppuVar4 = &config_parameters;
uVar5 = 1;
do {
pcVar1 = (code *)ppuVar4[1];
if (pcVar1 != pcVar3) {
(*pcVar1)(param_1,0,0);
pcVar3 = pcVar1;
}
ppuVar4 = &config_parameters + uVar5 * 0xd;
lVar2 = uVar5 * 0xd;
uVar5 = (ulong)((int)uVar5 + 1);
} while ((&config_parameters)[lVar2] != (int *)0x0);
}
*(int8 *)(param_1 + 0x2a8) = 0;
*(int4 *)(param_1 + 0x2b0) = 0;
return;
}
|
|
18,699
|
QUICK_RANGE_SELECT::get_explain(st_mem_root*)
|
eloqsql/sql/opt_range.cc
|
Explain_quick_select* QUICK_RANGE_SELECT::get_explain(MEM_ROOT *local_alloc)
{
Explain_quick_select *res;
if ((res= new (local_alloc) Explain_quick_select(QS_TYPE_RANGE)))
res->range.set(local_alloc, &head->key_info[index], max_used_key_length);
return res;
}
|
O0
|
cpp
|
QUICK_RANGE_SELECT::get_explain(st_mem_root*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movl $0x58, %edi
callq 0x4a34d0
movq %rax, %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, -0x19(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x38(%rbp)
je 0xa51c6c
movq -0x40(%rbp), %rdi
movb $0x1, -0x19(%rbp)
xorl %esi, %esi
callq 0xa5d670
jmp 0xa51c62
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xa51c6c
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xa51ccf
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
movq 0x18(%rax), %rcx
movq 0xa8(%rcx), %rdx
movl 0x20(%rax), %ecx
imulq $0xc0, %rcx, %rcx
addq %rcx, %rdx
movl 0x24(%rax), %ecx
callq 0x75b640
jmp 0xa51ccf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
testb $0x1, -0x19(%rbp)
jne 0xa51cc0
jmp 0xa51ccd
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdi
callq 0x4a3510
jmp 0xa51cd9
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x433ff0
nopw %cs:(%rax,%rax)
|
_ZN18QUICK_RANGE_SELECT11get_explainEP11st_mem_root:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
mov rsi, [rbp+var_10]
mov [rbp+var_48], rsi
mov edi, 58h ; 'X'
call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_40], rcx
mov [rbp+var_19], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_38], rax
jz short loc_A51C6C
mov rdi, [rbp+var_40]; this
mov [rbp+var_19], 1
xor esi, esi; int
call _ZN20Explain_quick_selectC2Ei; Explain_quick_select::Explain_quick_select(int)
jmp short $+2
loc_A51C62:
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
jmp short $+2
loc_A51C6C:
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_A51CCF
mov rax, [rbp+var_50]
mov rdi, [rbp+var_18]
add rdi, 8
mov rsi, [rbp+var_10]
mov rcx, [rax+18h]
mov rdx, [rcx+0A8h]
mov ecx, [rax+20h]
imul rcx, 0C0h
add rdx, rcx
mov ecx, [rax+24h]
call _ZN17Explain_index_use3setEP11st_mem_rootP6st_keyj; Explain_index_use::set(st_mem_root *,st_key *,uint)
jmp short loc_A51CCF
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
test [rbp+var_19], 1
jnz short loc_A51CC0
jmp short loc_A51CCD
loc_A51CC0:
mov rsi, [rbp+var_48]
mov rdi, [rbp+var_40]
call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *)
loc_A51CCD:
jmp short loc_A51CD9
loc_A51CCF:
mov rax, [rbp+var_18]
add rsp, 50h
pop rbp
retn
loc_A51CD9:
mov rdi, [rbp+var_28]
call __Unwind_Resume
|
Explain_quick_select * QUICK_RANGE_SELECT::get_explain(long long a1, long long a2)
{
Explain_quick_select *v3; // [rsp+10h] [rbp-40h]
Explain_quick_select *v4; // [rsp+18h] [rbp-38h]
v3 = (Explain_quick_select *)Sql_alloc::operator new(88LL, a2);
v4 = 0LL;
if ( v3 )
{
Explain_quick_select::Explain_quick_select(v3, 0);
v4 = v3;
}
if ( v4 )
Explain_index_use::set(
(long long)v4 + 8,
a2,
192LL * *(unsigned int *)(a1 + 32) + *(_QWORD *)(*(_QWORD *)(a1 + 24) + 168LL),
*(_DWORD *)(a1 + 36));
return v4;
}
|
Item_str_binary_checksum_func:
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 RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RDI
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x006adcd0
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x13e0ac8]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x20
POP RBP
RET
|
/* Item_str_binary_checksum_func::Item_str_binary_checksum_func(THD*, Item*) */
void __thiscall
Item_str_binary_checksum_func::Item_str_binary_checksum_func
(Item_str_binary_checksum_func *this,THD *param_1,Item *param_2)
{
Item_str_func::Item_str_func((Item_str_func *)this,param_1,param_2);
*(int ***)this = &PTR__Item_str_binary_checksum_func_013e0ad8;
return;
}
|
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.